Opened 9 years ago

Closed 9 years ago

#5960 closed defect (fixed)

JP2 GML Axis Order Problem

Reported by: dengo Owned by: warmerdam
Priority: normal Milestone: 1.11.3
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

we have a Pleiades image, a 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 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>

Change History (1)

comment:1 by Even Rouault, 9 years ago

Milestone: 1.11.3
Resolution: fixed
Status: newclosed
Type: enhancementdefect

trunk r29188 "GMLJP2: on reading, don't do axis inversation if there's an explicit axisName requesting easting, northing order (#5960); also strip axis order in reported SRS"

branches/1.11 r29189 "GMLJP2: on reading, don't do axis inversation if there's an explicit axisName requesting easting, northing order (#5960)"

Note: See TracTickets for help on using tickets.