[gdal-dev] JP2 GML Axis Order Problem

Dennis Gocke dengo at gmx.net
Wed May 13 05:00:47 PDT 2015


Hi guys,



we have a Pleiades image here, the jp2 coming directly from the provider
with an GML header like this:



<gml:featureMember>

    <gml:FeatureCollection>

     <gml:featureMember>

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

         <gml:description>Ortho
DS_PHR1A_201306090940372_FR1_PX_E017N43_0315_01434
coverage</gml:description>

         <gml:name>DS_PHR1A_201306090940372_FR1_PX_E017N43_0315_01434</gml:name>

         <gml:rectifiedGridDomain>

            <gml:RectifiedGrid dimension="2">

             <gml:limits>



        <!--  The PLEIADES convention is used: first pixel on the product
is pixel (1,1) -->

                <gml:GridEnvelope>

                 <gml:low>1 1</gml:low>

                 <gml:high>8528 7086</gml:high>

        </gml:GridEnvelope>

             </gml:limits>



      <!--first axis easting: urn:ogc:def:axis-name:EPSG::3035-->

             <gml:axisName>Easting</gml:axisName>



      <!--second axis northing: urn:ogc:def:axis-name:EPSG::3035-->

             <gml:axisName>Northing</gml:axisName>

             <gml:origin>

                <gml:Point srsName="urn:ogc:def:crs:EPSG::3035">

                 <gml:pos>4895767.000000000000000
2296945.000000000000000</gml:pos>

        </gml:Point>

       </gml:origin>

             <gml:offsetVector
srsName="urn:ogc:def:crs:EPSG::3035">2.000000000000000 0</gml:offsetVector>

             <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::3035">0
-2.000000000000000</gml:offsetVector>

            </gml:RectifiedGrid>

         </gml:rectifiedGridDomain>

        <gml:rangeSet>

            <gml:File>

             <gml:rangeParameters>

                <gml:QuantityExtent uom="int">0 255</gml:QuantityExtent>

       </gml:rangeParameters>

             <gml:fileName>gmljp2://codestream/0</gml:fileName>

             <gml:fileStructure>Record Interleaved</gml:fileStructure>

      </gml:File>

     </gml:rangeSet>

        </gml:RectifiedGridCoverage>

     </gml:featureMember>

    </gml:FeatureCollection>

</gml:featureMember>



</gml:FeatureCollection>





The LAEA projection (EPSG::3035) is defined with having an axis order of Y,
X, which means GDAL swaps the axis of the geotransform. But in this case
this gives the wrong result. The JP2 GML defines an X,Y axis order by
putting in <gml:axisName> tags, which are not yet considered by GDAL,
neither GDAL 1.11 nor GDAL 2.0.0 beta1.

We can solve this issue by setting the GDAL_IGNORE_AXIS_ORIENTATION to
true, but maybe it would be better if GDAL would consider the
<gml:axisName>


Best Regards,
Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150513/513a6e29/attachment-0001.html>


More information about the gdal-dev mailing list