See https://github.com/OSGeo/gdal/issues/4581

Le 20/10/2021 à 02:01, Joaquim Manuel Freire Luís a écrit :

That the geotransform is not detected

gdalinfo xxx.grd

Warning 1: dimension #1 (x) is not a Longitude___/X dimension.

Warning 1: dimension #0 (y) is not a Latitude/Y dimension.

Driver: netCDF/Network Common Data Format

…

Corner Coordinates:

Upper Left  (    0.0, 0.0)

Lower Left  (    0.0, 59.0)

Upper Right (   37.0, 0.0)

Lower Right (   37.0, 59.0)

Center      (   18.5, 29.5)

I can’t get why it’s complaining on “dimension #1 (x) is not a Longitude/X dimension.”

Tried to check the full docs (netcdfdataset.cpp) but not even with a debugger I can understand the why.

Due to it the x,y coordinates are not fished from file, either from Julia or from GMT

NOTE: this works but does not use GDAL

grdinfo xxx.grd

xxx.grd: Title: z

xxx.grd: Command:

xxx.grd: Remark:

xxx.grd: Gridline node registration used [Cartesian grid]

xxx.grd: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7

xxx.grd: x_min: 580155 x_max: 581235 x_inc: 30 name: x n_columns: 37

xxx.grd: y_min: 4416795 y_max: 4418535 y_inc: 30 name: y n_rows: 59

xxx.grd: v_min: 0.205308780074 v_max: 0.56782335043 name: z

…

This DOES NOT WORK (it uses GDAL)

grdinfo xxx.grd=gd

Warning 1: dimension #1 (x) is not a Longitude___/X dimension.

Warning 1: dimension #0 (y) is not a Latitude/Y dimension.

xxx.grd: Title: Grid imported via GDAL

xxx.grd: Command:

xxx.grd: Remark:

xxx.grd: Gridline node registration used [Cartesian grid]

xxx.grd: Grid file format: gd = Import/export through GDAL

xxx.grd: x_min: 0.5 x_max: 36.5 x_inc: 1 name: x n_columns: 37

xxx.grd: y_min: 0.5 y_max: 58.5 y_inc: 1 name: y n_rows: 59

xxx.grd: v_min: 0.205308780074 v_max: 0.56782335043 name: z

xxx.grd: scale_factor: 1 add_offset: 0

+proj=utm +zone=10 +ellps=WGS84 +units=m +no_defs

What’s so wrong with this nc file? I have others that look similar in terms of attributes and things work fine, but for some other cases I get the terrible

Warning 1: dimension #1 (x) is not a Longitude/X dimension.

Warning 1: dimension #0 (y) is not a Latitude/Y dimension.

and I’m screwed.


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to