Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#138 closed defect (wontfix)

x and y axes swapped inserting 2D grid into rasdaman

Reported by: Marcus Sen Owned by: dmisev
Priority: major Milestone: 8.4
Component: insertutils Version: 8.3
Keywords: Cc: pbaumann


When I try to insert the attached file into rasdaman the x and y dimensions seem to be swapped.

gdalinfo on data set says

Size is 20, 40

Querying domain after insertion says

Result element 1: [0:39,0:19]

Steps to reproduce:

gdalinfo osdtm_small.netcdf
rasql -q 'create collection os_dtm FloatSet' --user rasadmin --passwd ...
rasql -q 'insert into os_dtm values inv_netcdf($1)' --file osdtm_small.netcdf --user rasadmin --passwd ...
rasql -q 'select sdom(m) from os_dtm as m' --user rasadmin --passwd ... --out string

Attachments (1)

osdtm_small.netcdf (4.3 KB) - added by Marcus Sen 6 years ago.
Problem data file

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Marcus Sen

Problem data file

comment:1 Changed 6 years ago by dmisev

If you do ncdump -h osdtm_small.netcdf you'll see that the data variable is specified as Y x X

float Band1(y, x)

Maybe in netcdf the dimensions are specified in reverse order??

comment:2 Changed 6 years ago by dmisev

  • Cc pbaumann added
  • Owner changed from pbaumann to dmisev
  • Status changed from new to accepted


If any or all of the dimensions of a variable have the interpretations of "date or time" (T), "height or depth" (Z), "latitude" (Y), or "longitude" (X) then we recommend, but do not require (see Section 1.4, “Relationship to the COARDS Conventions”), those dimensions to appear in the relative order T, then Z, then Y, then X in the CDL definition corresponding to the file. All other dimensions should, whenever possible, be placed to the left of the spatiotemporal dimensions.

It's recommended that they are in reverse order but it's not required, pretty ambiguous. GDAL seems to always read them in reverse, I guess we'll do the same in rasdaman.

comment:3 Changed 6 years ago by dmisev

  • Resolution set to wontfix
  • Status changed from accepted to closed

Further, there's no way to determine the semantics of a dimension, whether it's an x, y, etc. in the code.

It would be best to look for some tools (maybe NCO?) that allow to reorder the dimensions of a variable before importing to rasdaman.

comment:4 Changed 6 years ago by pbaumann

On a side note, this is one of the issues we are trying to overcome (fascinatingly, GIS world hasn't solved this yet): to have a clear, unambiguous axis semantics. We have submitted a proposal (+implementation) to OGC to identify axes by URLs, and to allow combination of CRSs as sequences of axes. And by establishing first ontological synonyms, such as longitude = Long = long = Lon = lon = y = Y. Will take time, though, until tools will use that.

Note: See TracTickets for help on using tickets.