Opened 12 years ago
Closed 12 years ago
#4402 closed defect (fixed)
Issue with netcdf driver and srs units
Reported by: | Kyle Shannon | Owned by: | etourigny |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | netcdf |
Cc: |
Description
In 1.8.x the netcdf driver scales the inputs for the geotransform to find the extents if the units of the srs are in something other than meters. With new features in 1.9dev, the linear unit of the srs is set when writing. If the netcdf file is warped, the gt is scales manually, then the scale is applied again when the new file is created, meaning the extents are multiplied by 1000 (for kilometers) and then the linear units of the srs are set to km. This may cause 'double scaling' if the app using the file respects the UNIT tag in the srs. I suggest the removal of the manual scaling and set the linear unit in the srs appropriately. Currently the linear unit is not set on read, but only on write.
This is hard for me to explain. Attached is a patch to remove the manual scaling code, and I suggest etienne decide what to do as he is more familiar with the current state of the driver. I am not totally comfortable committing a change since I haven't worked on the driver for a while and it has changed a lot.
Attachments (2)
Change History (7)
by , 12 years ago
Attachment: | netcdf_gt_scale_4402.patch added |
---|
comment:1 by , 12 years ago
comment:2 by , 12 years ago
finalizing a fix for this and also for ticket #3324 - the problem there is due to double scaling of units.
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Etienne, Based on my gdalinfo reports and a gdalwarp test, looks good to me, thanks for getting that in. Wish I could've helped a little more. I would say close it.
kss
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Autotest fails with patch, attached another patch to return expected failure until the ticket is closed and perhaps the autotest is replaced with another that checks the fix.