[Qgis-user] Problems with showing gml file EPSG 3044 in QGIS

Andrea De Felici adefelici at live.com
Thu Nov 30 05:34:33 PST 2023


Hallo, everybody

I cannot visualize correctly a gml file in QGIS (last LTR version 3.28.13 Firenze).

The .gml file contains 1 linear feature (Administrative Buondary) and 1 areal feature (Administrative Unit), all georeferenced EPSG 3044 (ETRS89 / UTM ZONE 32N (N-E))

When I open that file with QGIS (I set the correct 3044 EPSG when QGIS asks me), the linear feature is correctly georeferenced, while the areal feature is georeferenced with inverted coordinate X and Y, so the polygons are in placed in Somalia instead of Italy.

The same result I obtain with a gml 3044 file with the only areal feature: coordinates are inverted only in case of areal feature, but some other other areal features are displayed correctly…

I tried to open  the gml file with a text editor and it seems to be correct: both for areal and linear features the first coordinate is Y (7 integer digits) and the second is X (6 integer digits); here is a short snippet:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

gml:FeatureCollection xmlns:au="http://inspire.ec.europa.eu/schemas/au/4.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:ns1="http://www.w3.org/1999/xhtml" xmlns:gss="http://www.isotc211.org/2005/gss" xmlns:gsr="http://www.isotc211.org/2005/gsr" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/au/4.0 https://inspire.ec.europa.eu/schemas/au/4.0/AdministrativeUnits.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/deprecatedTypes.xsd<http://inspire.ec.europa.eu/schemas/au/4.0%20https:/inspire.ec.europa.eu/schemas/au/4.0/AdministrativeUnits.xsd%20http:/www.opengis.net/gml/3.2%20http:/schemas.opengis.net/gml/3.2.1/deprecatedTypes.xsd>">

  <gml:featureMember>

    <au:AdministrativeUnit gml:id="AdministrativeUnit_id_385577a9-d267-41ef-a9bb-3ca71c56b955">

      <gml:name>IMPERIA</gml:name>

      <au:geometry>

        <gml:MultiSurface>

          <gml:surfaceMember>

            <gml:Polygon srsName="http://www.opengis.net/def/crs/EPSG/0/3044" srsDimension="2">

              <gml:exterior>

                <gml:LinearRing>

                  <gml:posList>4856196.982872699 379221.4296809618 4856153.012608033 379288.4400786731 4856101.092710585 379308.25983894855 4855992.103140529 379319.1789686257 4855970.63314184 379333.2989412164 4855938.893374141 379321.1185031719 4855803.6838102685 379348.71759441256 4855780.623492267 379409.9181218235 4855775.263461644 379417.9181693339 4855761.003115882 379477.2687556814 4855720.332499044 379593.4897888878 4855699.152067357 379670.010521323 4855389.701225213 380002.14175060584 4855354.410952511 380065.8722090269 4855293.321618781 380011.0409913284 4855282.411717165 380004.2308100543 4855236.491942137 380003.03038199147 4855207.772282108 379973.2997601987 4855179.582498212 379961.1993582745 4855072.002978952 379965.04843585216 4855059.623013855 379968.46836620884 4855008.863297664 379961.97782922763 4854977.903487933 379955.50747079897 4854947.173628453 379956.13720157446 4854931.493636088 379965.8171792209 4854910.743755877 379962.6069528013 4854880.523763171 379982.3669236042 4854848.283871256 379988.7967124407 4854835.123858148 379999.79672941327 4854805.853881814 380016.546672364 4854784.883930116 380023.96657519136 4854754.044075761 380023.9562977112 4854670.144294579 380049.95586446853 4854597.034550153 380063.1353706411 4854586.074327666 380103.43577101553 4854558.744095516 380156.5661838027 4854477.884803961 380163.515877593 4854455.885183744 380159.38584979327 4854420.485619669 380177.77611025586 4854329.676822398 380212.88662970375 4854293.80736602 380216.95671528607 4854255.657993287 380214.26672104455 4854221.90853463 380213.8267496932 4854126.360021846 380219.06690918776 4854014.241745526 380228.2771326841



When I open the gml file with QGIS, the software creates a .gfs file, that is the following:



------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<GMLFeatureClassList>

  <SequentialLayers>true</SequentialLayers>

  <GMLFeatureClass>

    <Name>AdministrativeUnit</Name>

    <ElementPath>AdministrativeUnit</ElementPath>

    <GeometryName>geometry</GeometryName>

    <GeometryElementPath>geometry</GeometryElementPath>

    <DatasetSpecificInfo>

      <FeatureCount>274</FeatureCount>

      <ExtentXMin>4847813.57006</ExtentXMin>

      <ExtentXMax>4947064.21378</ExtentXMax>

      <ExtentYMin>379028.49393</ExtentYMin>

     <ExtentYMax>585774.11643</ExtentYMax>

    </DatasetSpecificInfo>

    <PropertyDefn>

      <Name>name</Name>

      <ElementPath>name</ElementPath>

      <Type>String</Type>

      <Width>30</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>nationalCode</Name>

      <ElementPath>nationalCode</ElementPath>

      <Type>Integer</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>localId</Name>

      <ElementPath>inspireId|Identifier|localId</ElementPath>

      <Type>Integer</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>namespace</Name>

      <ElementPath>inspireId|Identifier|namespace</ElementPath>

      <Type>String</Type>

      <Width>11</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>versionId</Name>

      <ElementPath>inspireId|Identifier|versionId</ElementPath>

      <Type>String</Type>

      <Width>10</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>LocalisedCharacterString</Name>

      <ElementPath>nationalLevelName|LocalisedCharacterString</ElementPath>

      <Type>String</Type>

      <Width>9</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>Country</Name>

      <ElementPath>country|Country</ElementPath>

      <Type>String</Type>

      <Width>2</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>language</Name>

      <ElementPath>name|GeographicalName|language</ElementPath>

      <Type>String</Type>

      <Width>3</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>sourceOfName</Name>

      <ElementPath>sourceOfName</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>pronunciationIPA</Name>

      <ElementPath>name|GeographicalName|pronunciation|PronunciationOfName|pronunciationIPA</ElementPath>

      <Type>String</Type>

      <Width>30</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>text</Name>

      <ElementPath>name|GeographicalName|spelling|SpellingOfName|text</ElementPath>

      <Type>String</Type>

      <Width>30</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>script</Name>

      <ElementPath>name|GeographicalName|spelling|SpellingOfName|script</ElementPath>

      <Type>String</Type>

      <Width>4</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>residenceOfAuthority</Name>

      <ElementPath>residenceOfAuthority</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>beginLifespanVersion</Name>

      <ElementPath>beginLifespanVersion</ElementPath>

      <Type>String</Type>

      <Width>20</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>endLifespanVersion</Name>

      <ElementPath>endLifespanVersion</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>administeredBy</Name>

      <ElementPath>administeredBy</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>coAdminister</Name>

      <ElementPath>coAdminister</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

  </GMLFeatureClass>

  <GMLFeatureClass>

    <Name>AdministrativeBoundary</Name>

    <ElementPath>AdministrativeBoundary</ElementPath>

    <GeometryName>geometry</GeometryName>

    <GeometryElementPath>geometry</GeometryElementPath>

    <SRSName>http://www.opengis.net/def/crs/EPSG/0/3044</SRSName<http://www.opengis.net/def/crs/EPSG/0/3044%3c/SRSName>>

    <DatasetSpecificInfo>

      <FeatureCount>754</FeatureCount>

      <ExtentXMin>379028.49393</ExtentXMin>

      <ExtentXMax>585774.11643</ExtentXMax>

      <ExtentYMin>4847813.57006</ExtentYMin>

      <ExtentYMax>4947064.21378</ExtentYMax>

    </DatasetSpecificInfo>

    <PropertyDefn>

      <Name>localId</Name>

      <ElementPath>inspireId|Identifier|localId</ElementPath>

      <Type>Integer</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>namespace</Name>

      <ElementPath>inspireId|Identifier|namespace</ElementPath>

      <Type>String</Type>

      <Width>11</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>versionId</Name>

      <ElementPath>inspireId|Identifier|versionId</ElementPath>

      <Type>String</Type>

      <Width>10</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>Country</Name>

      <ElementPath>country|Country</ElementPath>

      <Type>String</Type>

      <Width>2</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>legalStatus</Name>

      <ElementPath>legalStatus</ElementPath>

      <Type>String</Type>

      <Width>6</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>technicalStatus</Name>

      <ElementPath>technicalStatus</ElementPath>

      <Type>String</Type>

      <Width>11</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>beginLifespanVersion</Name>

      <ElementPath>beginLifespanVersion</ElementPath>

      <Type>String</Type>

      <Width>20</Width>

    </PropertyDefn>

    <PropertyDefn>

      <Name>endLifespanVersion</Name>

      <ElementPath>endLifespanVersion</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

    <PropertyDefn>

      <Name>admUnit</Name>

      <ElementPath>admUnit</ElementPath>

      <Type>Untyped</Type>

    </PropertyDefn>

  </GMLFeatureClass>

</GMLFeatureClassList>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



It seems that for the areal feature (Administrative Units) the bounding box coordinates are inverted (ExtentXMin>4847813.57006</ExtentXMin>…. Etc.), I cannot understand the reason why…



I also tried to open the gml file with other softwares and these are the results:

  *   Global Mapper: ALL the features are shown with inverted coordinates
  *   FME: ALL the features are shown with the correct coordinates



Have you ever heard about this trouble? Did I make some particular mistake?



Thank you so much for your help!



Andrea De Felici
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231130/3a666e67/attachment-0001.htm>


More information about the QGIS-User mailing list