[Gdal-dev] New GMT grid format trouble

Joaquim Luis jluis at ualg.pt
Thu May 11 19:02:02 EDT 2006


Hi,
I once reported a bug regarding the GDAL inability to distinguish  the 
two flavor of gmt grids.
See
http://bugzilla.remotesensing.org/show_bug.cgi?id=796
Althoug the bug status is NEW the problem has been correctd (thanks)

However, since GMT4.1 a new netCDF format (COARDS compliant) has been 
adopted as the
GMT default grid format. Now this format is not correctly interpreted.
Using the same example as in my original bug report

grdmath -R-15/15/-15/15 -I1 = lixo.grd

D:\>gdalinfo lixo.grd
Driver: netCDF/Network Common Data Format
Size is 512, 512
Coordinate System is `'
Metadata:
  NC_GLOBAL#Conventions=COARDS
  NC_GLOBAL#history=grdmath -R-15/15/-15/15 -I1 = lixo.grd
  NC_GLOBAL#node_offset=0
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"lixo.grd":z
  SUBDATASET_1_DESC=[31x31] z (32-bit floating-point)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)

whereas the correct info is

D:\>grdinfo lixo.grd
lixo.grd: Title: z
lixo.grd: Command: grdmath -R-15/15/-15/15 -I1 = lixo.grd
lixo.grd: Remark:
lixo.grd: Normal node registration used
lixo.grd: grdfile format: nf (# 18)
lixo.grd: x_min: -15 x_max: 15 x_inc: 1 name: x nx: 31
lixo.grd: y_min: -15 y_max: 15 y_inc: 1 name: y ny: 31
lixo.grd: z_min: 0 at x = -15 y = 15 z_max: 0 at x = -15 y = 15
lixo.grd: scale_factor: 1 add_offset: 0


Joaquim Luis



More information about the Gdal-dev mailing list