Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5316 closed enhancement (fixed)

Extend SAGA driver to recognize projection information

Reported by: vwichmann Owned by: warmerdam
Priority: normal Milestone: 1.11.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: SAGA


In the meantime SAGA fully supports projection information for grid datasets and I would like to extent the GDAL SAGA Binary driver to recognize this. SAGA reads/writes a .prj file (besides the .sgrd and .sdat files), which is simply an ESRI projection file (WKT).

I attach a diff (against trunk) which implements this.

Best regards, Volker

Attachments (1)

diff_sagadataset.cpp.txt (6.5 KB ) - added by vwichmann 10 years ago.

Download all attachments as: .zip

Change History (4)

by vwichmann, 10 years ago

Attachment: diff_sagadataset.cpp.txt added

comment:1 by Even Rouault, 10 years ago

Milestone: 2.0
Resolution: fixed
Status: newclosed

I'm not sure which tool you used to make the patch, but I didn't manage to apply it with "patch -p0 < diff_sagadataset.cpp.txt". Anyway as it was simple, I applied it at hand, but for a next file, please make my life easier ;-)

I've removed the part of the patch that deal with the old several lines ESRI .prj format, which you don't need if you just use WKT. So that removes the OSR_GDS() function and the code just after oSRS.importFromESRI( papszLines ) that check if geographic values are in seconds (and that would likely not have worked in read-only mode since it calls SetGeoTransform() )

I've also extended the unit tests to check that projection is well read and written.

Please check I've no messed up things in the whole process.

trunk r26690 "SAGA: add read/write support for .prj files (patch by Volker Wichmann, #5316)"

comment:2 by vwichmann, 10 years ago

Hi Even,

thanks for cleaning and applying! I've run some tests and encountered no problems, seems like everything is working fine.

Thanks again for your support and best regards, Volker

comment:3 by Even Rouault, 10 years ago

Note: See TracTickets for help on using tickets.