Hi,

There are a couple of issues that show when I run this test case.

First is that ERROR 3

$ gdal_grid -ot Float32 -txe 0.000000 10.000000 -tye 0.000000 10.000000 
-outsize 201 201 -a nearest lixo.vrt junk.nc
Warning 1: Several drivers matching nc extension. Using NETCDF
0...10...20...30...40...50...60...70...80...90...100 - done.
ERROR 3: An attempt to read an undefined ID from virtual variable collection 
was made

Repeating the command (that is, overwriting the grid) shows more warnings, 
namely the "dimension #1 (lon) is not a Longitude/X dimension"

$ gdal_grid -ot Float32 -txe 0.000000 10.000000 -tye 0.000000 10.000000 
-outsize 201 201 -a nearest lixo.vrt junk.nc
Warning 1: Several drivers matching nc extension. Using NETCDF
Warning 1: The dataset has several variables that could be identified as vector 
fields, but not all share the same primary dimension. Consequently they will be 
ignored.
Warning 1: dimension #1 (lon) is not a Longitude/X dimension.
Warning 1: dimension #0 (lat) is not a Latitude/Y dimension.
0...10...20...30...40...50...60...70...80...90...ERROR 3: An attempt to read an 
undefined ID from virtual variable collection was made

Which also show in gdalinfo

$ gdalinfo junk.nc
Warning 1: dimension #1 (lon) is not a Longitude/X dimension.
Warning 1: dimension #0 (lat) is not a Latitude/Y dimension.
Driver: netCDF/Network Common Data Format
...

I see that the x,y coordinates are always named "lon,lat" but data is not in 
geographics those names are not true. In GMT we call them "x,y" what data 
represent cartesian units or "lon,lat" when they are geographic. As a 
consequence of this, gdalinfo report those "not a Longitude/X dimension" 
warnings for the former case when the nc grid has not an "spatial_ref" 
attribute.

The data used in this example is attached


Joaquim

Attachment: lixo.vrt
Description: lixo.vrt

Attachment: lixo.csv
Description: lixo.csv

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

Reply via email to