Opened 9 years ago

Last modified 8 years ago

#1296 closed defect

Rasql_Encode in JPEG2000 missing geoference metadata — at Version 3

Reported by: Bang Pham Huu Owned by:
Priority: major Milestone: 10.0
Component: gdal driver Version: development
Keywords: jpeg2000, encode, jp2 Cc: Dimitar Misev, Peter Baumann, Piero Campalani
Complexity: Medium

Description (last modified by Bang Pham Huu)

test data sample from Dimitar (this sample does not work as in http://rasdaman.org/ticket/1300, but can give the idea of problem).

rasql -q 'select encode((marray i in [0:1,0:5,0:5] values 1f)[1,*:*,*:*], "JPEG2000", "xmin=25.0;xmax=75.5;ymin=-40.5;ymax=75.5;crs=EPSG:4326")' --out file

it only return grid axis (output from encoding eobstest)

rasql -q 'select encode((c) [1,*:*,*:*], "JPEG2000", 

"xmin=25.0;xmax=75.5;ymin=-40.5;ymax=75.5;crs=EPSG:4326") 

from eobstest AS c where oid(c)=1537' --out file
Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1)
Files: test1.jp2
Size is 101, 232
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  232.0)
Upper Right (  101.0,    0.0)
Lower Right (  101.0,  232.0)
Center      (   50.5,  116.0)
Band 1 Block=101x232 Type=Int16, ColorInterp=Gray

it should be as same as encode in GTIFF

rasql -q 'select encode((marray i in [0:1,0:5,0:5] values 1f)[1,*:*,*:*], "GTIFF", "xmin=25.0;xmax=75.5;ymin=-40.5;ymax=75.5;crs=EPSG:4326")' --out file

and with georeference metadata

{{{Driver: GTiff/GeoTIFF
Files: rasql_1.tif
Size is 6, 6
Coordinate System is:
GEOGCS["WGS 84",

DATUM["WGS_1984",

SPHEROID["WGS 84",6378137,298.257223563,

AUTHORITY["EPSG","7030"]],

AUTHORITY["EPSG","6326"]],

PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]

Origin = (25.000000000000000,75.500000000000000)
Pixel Size = (8.416666666666666,-19.333333333333332)
Metadata:

AREA_OR_POINT=Area

Image Structure Metadata:

INTERLEAVE=BAND

Corner Coordinates:
Upper Left ( 25.0000000, 75.5000000) ( 25d 0' 0.00"E, 75d30' 0.00"N)
Lower Left ( 25.0000000, -40.5000000) ( 25d 0' 0.00"E, 40d30' 0.00"S)
Upper Right ( 75.5000000, 75.5000000) ( 75d30' 0.00"E, 75d30' 0.00"N)
Lower Right ( 75.5000000, -40.5000000) ( 75d30' 0.00"E, 40d30' 0.00"S)
Center ( 50.2500000, 17.5000000) ( 50d15' 0.00"E, 17d30' 0.00"N)
Band 1 Block=6x6 Type=Float32, ColorInterp=Gray

}}}

Change History (3)

comment:1 by Bang Pham Huu, 9 years ago

Description: modified (diff)

comment:2 by Dimitar Misev, 9 years ago

Please update the outputs and the second query to match the marray example.

in reply to:  2 comment:3 by Bang Pham Huu, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.