Opened 8 years ago

Last modified 7 years ago

#1403 closed defect

Rasql_Wrong transposition between X and Y axis when encode in netcdf — at Initial Version

Reported by: Bang Pham Huu Owned by: Dimitar Misev
Priority: major Milestone: 9.4
Component: rasql Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

Post from Olly's ticket http://earthserver.eu/trac2/ticket/166

The problem is when encode a coverage in netcdf, the output is transposed between X and Y (in case of 2D).

for example: encode rgb 2D in netcdf (the i1 and k3 as dimensions can be random names so try to swap these variables does not help (e.g: i,j to j,i).

Also the transpose option from http://rasdaman.org/wiki/CommonFormatsInterface does not work (i.e: set values to [1,0] or [111,0] does not have any affect).

rasql -q 'SELECT encode(c[0:10,0:3].0, "netcdf" , "{\"dimensions\":[\"i1\", \"k3\"],\"variables\":{

	\"i1\":{\"type\":\"double\",\"data\":[0,2]},

	\"k3\":{\"type\":\"double\",\"data\":[1,2]},
	\"red\":{\"type\":\"unsigned char\",
\"metadata\":{\"units\":\"10^0\"},\"name\":\"red\"}},
\"metadata\":{}}")

 FROM test_rgb AS c' --out file

when use gdalinfo to show bounding box (wrong: size X(4), size Y (11))

Size is 4, 11
Coordinate System is `'
Metadata:
  red#units=10^0
  red#valid_max=255
  red#valid_min=0
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,   11.0)
Upper Right (    4.0,    0.0)
Lower Right (    4.0,   11.0)
Center      (    2.0,    5.5)

if encode in png

rasql -q 'select encode(c[0:10,0:3].0, "png") from test_rgb as c' --out file

the bounding box is expected (size X: 11, size Y: 4)

Size is 11, 4
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,    4.0)
Upper Right (   11.0,    0.0)
Lower Right (   11.0,    4.0)
Center      (    5.5,    2.0

Change History (0)

Note: See TracTickets for help on using tickets.