[gdal-dev] GMLJP2 question

Reynolds, Scott scott at agi.com
Thu Nov 17 17:47:12 EST 2011


Hi,

 

I have a JP2 image whose extent is supposed to be from (0E deg , 0N deg)
to (10E deg, 10N deg) but gdalinfo (from FWTools 2.4.7) is reporting
extents that are off by 0.5 pixel north and west.  The GML identifies
the origin of the image as (0E deg, 10N deg).  My understanding is that
GDAL automatically adjusts to account for pixel center vs. pixel corner
format differences and always reports pixel corners.  What I'm not sure
of is whether GML thinks the origin is centered on the top left pixel or
at the top left corner of the top left pixel.

 

Can someone tell me whether I need to submit a bug against:

 

1)      GDAL

2)      JP2 writer

3)      Me

 

Thanks,

Scott

 

Driver: JP2ECW/ERMapper JPEG2000

Files: e:\TestData\junk.jp2

Size is 256, 256

Coordinate System is:

GEOGCS["WGS 84",

    DATUM["WGS_1984",

        SPHEROID["WGS 84",6378137,298.257223563,

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

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

    PRIMEM["Greenwich",0,

        AUTHORITY["EPSG","8901"]],

    UNIT["degree",0.01745329251994328,

        AUTHORITY["EPSG","9122"]],

    AUTHORITY["EPSG","4326"],

    AXIS["Latitude",NORTH],

    AXIS["Longitude",EAST]]

GeoTransform =

  10.01953125, 0, -0.0390625

  -0.01953125, 0.0390625, 0

Corner Coordinates:

Upper Left  (  10.0195313,  -0.0195313) ( 10d 1'10.31"E,  0d 1'10.31"S)

Lower Left  (   0.0195313,  -0.0195313) (  0d 1'10.31"E,  0d 1'10.31"S)

Upper Right (  10.0195313,   9.9804688) ( 10d 1'10.31"E,  9d58'49.69"N)

Lower Right (   0.0195313,   9.9804688) (  0d 1'10.31"E,  9d58'49.69"N)

Center      (   5.0195313,   4.9804688) (  5d 1'10.31"E,  4d58'49.69"N)

Band 1 Block=256x1 Type=Byte, ColorInterp=Red

  Overviews: arbitrary

Band 2 Block=256x1 Type=Byte, ColorInterp=Green

  Overviews: arbitrary

Band 3 Block=256x1 Type=Byte, ColorInterp=Blue

  Overviews: arbitrary

Band 4 Block=256x1 Type=Byte, ColorInterp=Undefined

  Overviews: arbitrary

 

The GML embedded in the file is

 

<gml:FeatureCollection

xmlns:gml="http://www.opengis.net/gml"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.opengis.net/gml
http://www.math.ubc.ca/~burggraf/gml/gml4jp2.xsd">

<gml:boundedBy>

  <gml:Null>withheld</gml:Null>

</gml:boundedBy>

<gml:featureMember>

  <gml:RectifiedGridCoverage dimension="2" gml:id="RGC0001">

   <gml:rectifiedGridDomain>

    <gml:RectifiedGrid dimension="2">

     <gml:limits>

     <gml:GridEnvelope>

       <gml:low>0 0</gml:low>

       <gml:high>255 255</gml:high>

      </gml:GridEnvelope>

     </gml:limits>

     <gml:axisName>x</gml:axisName>

     <gml:axisName>y</gml:axisName>

     <gml:origin>

      <gml:Point gml:id="P0001" srsName="urn:ogc:def:crs:EPSG::4326">

       <gml:pos>0.0000000000000 10.0000000000000</gml:pos>

      </gml:Point>

     </gml:origin>

     <gml:offsetVector
srsName="urn:ogc:def:crs:EPSG::4326">0.0390625000000
-0.0000000000000</gml:offsetVector>

     <gml:offsetVector
srsName="urn:ogc:def:crs:EPSG::4326">-0.0000000000000
-0.0390625000000</gml:offsetVector>

    </gml:RectifiedGrid>

   </gml:rectifiedGridDomain>

  </gml:RectifiedGridCoverage>

</gml:featureMember>

</gml:FeatureCollection>

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111117/de27551c/attachment-0001.html


More information about the gdal-dev mailing list