I have been using gdalwarp to convert a geotiff to NetCDF format.  The odd 
thing is that if the result is in feet, I get blank units in my output metadata 
units.  While if I go to meters, I get the correct units.

So for example this works correctly:


gdalwarp  -t_srs EPSG:3651 -of netCDF cea.tif cea_m.nc

and gdalinof shows data like this:
  x#standard_name=projection_x_coordinate
  x#units=m
  y#long_name=y coordinate of projection
  y#standard_name=projection_y_coordinate
  y#units=m


While this:
gdalwarp  -t_srs EPSG:3652 -of netCDF cea.tif cea_ft.nc

Has this metadata:
  x#standard_name=projection_x_coordinate
  x#units=
  y#long_name=y coordinate of projection
  y#standard_name=projection_y_coordinate
  y#units=

The reason that this is an issue is that I’m trying to view this data with a 
reader that is crashing due to the empty strings.  I have reported a bug there, 
and it is being addressed.
But, it does seem like there is also an issue with gdalwarp generating these 
empty strings for netCDF files.  Shouldn’t these strings contain “feet”?
I did try to use gdal_edit to try to change that, but didn’t have any luck for 
the netCDF file.

Any suggestions for how to fix these files?  And, how to work around this 
problem?

Thanks,

-- Adam

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to