[gdal-dev] GDAL / Projection Coord. System (PROJCS) in JP2 header

Ahmed Asker ahmed.asker at roames.com.au
Sun Feb 19 18:57:34 EST 2012


Hello gdal-dev group,

I have a question that I'm wondering if you can answer.  I have GDAL 1.9
SVN on my machine, and I am having issues getting the projection coordinate
system (PROJCS) inside the JP2 headers *without *the accompanying XML/GML
sidecar (i.e. when sidecar is removed, running GDALINFO on the JP2 shows `
'  - blank coordinate system).

I have been experimenting with GDALWARP and have managed to get the PROJCS
in the GeoTiff headers (for TIFF files that previously also showed ` ' -
blank projection coord. system)  using the target reference system
arguement -t_srs  .. BUT.. have not managed to get this info to show in the
JP2 headers without an accompanying XML/GML sidecar file

*i.e. when running GDAL_TRANSLATE **and using the -a_srs argument (assign
SRS (spatial reference system) to output) to create a JP2 from** one of
these GeoTiffs (using OPENJpeg2000 raster driver) - the PROJCS does not
show in the JP2 file header, if the XML/GML file is removed - upon running
GDALINFO on this JP2 file *
*
*
*..command-lines, follow.. (below):*

*Command_line>  gdalwarp *-of GTiff -t_srs EPSG:32756 457000_7200000.tif
457000_7200000Test.tif
Creating output file that is 10000P x 10000L.
Processing input file 457000_7200000.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.

*Command_line>  **gdalinfo* 457000_7200000Test.tif
Driver: GTiff/GeoTIFF
*Files: 457000_7200000Test.tif*
Size is 10000, 10000
Coordinate System is:
PROJCS["WGS 84 / UTM zone 56S",
    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"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",153],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32756"]]
Origin = (457000.000000000000000,7200000.000000000000000)
Pixel Size = (0.100000000000000,-0.100000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  457000.000, 7200000.000) (152d34'22.01"E, 25d18'57.36"S)
Lower Left  (  457000.000, 7199000.000) (152d34'21.89"E, 25d19'29.87"S)
Upper Right (  458000.000, 7200000.000) (152d34'57.77"E, 25d18'57.47"S)
Lower Right (  458000.000, 7199000.000) (152d34'57.66"E, 25d19'29.98"S)
Center      (  457500.000, 7199500.000) (152d34'39.84"E, 25d19'13.67"S)
Band 1 Block=10000x1 Type=Byte, ColorInterp=Red
Band 2 Block=10000x1 Type=Byte, ColorInterp=Green
Band 3 Block=10000x1 Type=Byte, ColorInterp=Blue
*
Command_line>**    *gdal_translate -of JP2OpenJPEG -a_srs EPSG:32756
457000_7200000Test.tif 457000_7200000Test.jp2
Input file size is 10000, 10000
0...10...20...30...40...50...60...70...80...90...100 - done.

*Command_line>**    *del 457000_7200000Test.*.*.xml
*
Command_line>  *gdalinfo 457000_7200000Test.jp2
Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
Files: 457000_7200000Test.jp2
Size is 10000, 10000
Coordinate System is `'
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,10000.0)
Upper Right (10000.0,    0.0)
Lower Right (10000.0,10000.0)
Center      ( 5000.0, 5000.0)
Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red
Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green
Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue


Best Regards,
--------------------
Ahmed Asker
Google Earth Builder Administrator, ROAMES (Remote | Observation |
Automated | Modelling | Economic | Simulation ©)
Ergon Energy
Mobile:    0402 058 325
Phone:    (07) 3228 8124
Email:     ahmed.asker at roames.com.au
Web:       http://www.roames.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120220/1cd6affd/attachment.html


More information about the gdal-dev mailing list