Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a set of GML geometries (see here), which I try to load in QGIS. The set contains both points and polygons, but when loaded into QGIS, only points are shown. I tried to follow this thread, but the piece of code suggested for overriding is not present in .gfs file. Any chance to make it work?

I tried using OGR2OGR for converting to .shp, but only the points are converted.

share|improve this question
    
Please post how you tried to manipulate the .gfs. –  underdark Nov 14 '12 at 7:25
    
I tried to change <Name>CadastralParcel</Name> <ElementPath>CadastralParcel</ElementPath> <GeometryType>1</GeometryType> as suggested by Juergen Weichand at this thread.The problem is there is no such part of the code in the file :-) –  zimmi Nov 14 '12 at 7:50
1  
You have to save the file to your hard disk, for example insprire.gml. After loading that into qgis, you get another file inspire.gfs next to it. You have to manipulate that file as discribed in the previous thread. Then close Qgis, reopen it, and load the gml again. –  Andre Joost Nov 14 '12 at 9:11
    
I can't edit the file as supposed in that thread because there is no such code to change. If I just add Juergen's code to .gfs file, nothing happens. –  zimmi Nov 14 '12 at 9:17
1  
Please use Lisboa. The dev version 1.9 is undergoing severe changes in the process of getting to the 2.0 release. Plugins and other tools can suddenly stop working. –  underdark Nov 14 '12 at 9:53

1 Answer 1

Quantum GIS Lisboa creates the following .gfs file:

<GMLFeatureClassList>
  <GMLFeatureClass>
    <Name>CadastralParcel</Name>
    <ElementPath>CadastralParcel</ElementPath>
    <GeometryType>1</GeometryType>
    <SRSName>urn:ogc:def:crs:EPSG::5514</SRSName>
    <DatasetSpecificInfo>
      <FeatureCount>67</FeatureCount>
      <ExtentXMin>-551828.69000</ExtentXMin>
      <ExtentXMax>-549922.10000</ExtentXMax>
      <ExtentYMin>-1124381.29000</ExtentYMin>
      <ExtentYMax>-1123937.92000</ExtentYMax>
    </DatasetSpecificInfo>
    <PropertyDefn>
      <Name>areaValue</Name>
      <ElementPath>areaValue</ElementPath>
      <Type>Integer</Type>
    </PropertyDefn>
    <PropertyDefn>
      <Name>areaValue_uom</Name>
      <ElementPath>areaValue_uom</ElementPath>
      <Type>String</Type>
      <Width>2</Width>
    </PropertyDefn>
    <PropertyDefn>
      <Name>beginLifespanVersion</Name>
      <ElementPath>beginLifespanVersion</ElementPath>
      <Type>String</Type>
      <Width>20</Width>
    </PropertyDefn>
    <PropertyDefn>
      <Name>localId</Name>
      <ElementPath>inspireId|Identifier|localId</ElementPath>
      <Type>String</Type>
      <Width>14</Width>
    </PropertyDefn>
    <PropertyDefn>
      <Name>namespace</Name>
      <ElementPath>inspireId|Identifier|namespace</ElementPath>
      <Type>String</Type>
      <Width>10</Width>
    </PropertyDefn>
    <PropertyDefn>
      <Name>label</Name>
      <ElementPath>label</ElementPath>
      <Type>String</Type>
      <Width>7</Width>
    </PropertyDefn>
    <PropertyDefn>
      <Name>nationalCadastralReference</Name>
      <ElementPath>nationalCadastralReference</ElementPath>
      <Type>String</Type>
      <Width>14</Width>
    </PropertyDefn>
  </GMLFeatureClass>
</GMLFeatureClassList>

Lines 3 to 5 have to be changed.

share|improve this answer
    
Sadly v1.9.0 (alpha) generates this .gfs <GMLFeatureClassList> <GMLFeatureClass> <Name>CadastralParcel</Name> <ElementPath>CadastralParcel</ElementPath> <DatasetSpecificInfo> <FeatureCount>67</FeatureCount> etc. That's why I can't change GeometryType - there is not any. –  zimmi Nov 14 '12 at 9:39
    
strange, on Windows OSGEo4W 1.9.0 (3b88637) I get the same as from Lisboa. Please install Lisboa on your system and try again. After creating and changing the .gfs, you might work on with Qgis Master. Or take my example above, and save it locally as .gfs. –  Andre Joost Nov 14 '12 at 10:11
    
Do you know any other open source that would be capable of loading this GML? –  zimmi Nov 14 '12 at 13:05
    
GvSig is able to load gml data, but I did not get your file running. I'm not very familiar with that software anyway. –  Andre Joost Nov 14 '12 at 16:32
    
I didn't succeed with gvSIG nor uDig. But it's working fine with QGIS Lisboa. Hope it'll be fixed in 1.9.x/2.0. –  zimmi Nov 17 '12 at 8:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.