3

I have a 90 MB GML with about 3000 features but QGIS only shows the first three. The fourth feature is a multipart polyline. This an the extract of the feature:

<?xml version="1.0" encoding="UTF-8"?>
    <FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="id-87c8d6ee-112c-4408-a26e-3d7158f27c2b">
<featureMember>
  <Feature gml:id="id-54a7d56e-ce1f-404e-b875-fd06e74f8ee5">
<attribute1></attribute1>
[...]
      <geometry>
             <gml:MultiCurve gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-0" srsName="EPSG:3035" srsDimension="3">
               <gml:curveMember>
                 <gml:LineString gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-1">
                   <gml:posList>Coordinates</gml:posList>
                 </gml:LineString>
              </gml:curveMember>
              <gml:curveMember>
                <gml:LineString gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-2">
                  <gml:posList>Coordinates</gml:posList>
                </gml:LineString>
              </gml:curveMember>
      </geometry>
  </Feature></FeatureCollection>

Is the geometry tag well formed? Or it is just that QGIS cannot render? BTW, the GML was generated with FME and I have no problems to render in FME.

3
  • If I remove the feature I can see more features in QGIS, just until the next multipart polyline.
    – Mikel
    Mar 6, 2016 at 19:39
  • Try to prepare multipolyline in new shp layer then export it to GML and compare with posted structure.
    – Artec
    Mar 7, 2016 at 13:09
  • It would be good to see your FME workspace. How you created the GML... As GML is a type of XML, there are a lot of XML transformers that can help you.
    – Fezter
    Apr 26, 2016 at 1:45

2 Answers 2

2

The problem is you don't close <gml:MultiCurve> in <geometry>.

I used Notepad++ with XML plugin to check the syntax and correct the code:

<?xml version="1.0" encoding="UTF-8"?>
<FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="id-87c8d6ee-112c-4408-a26e-3d7158f27c2b">
    <featureMember>
        <Feature gml:id="id-54a7d56e-ce1f-404e-b875-fd06e74f8ee5">
            <geometry>
                <gml:MultiCurve gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-0" srsName="EPSG:3035" srsDimension="3">
                    <gml:curveMember>
                        <gml:LineString gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-1">
                            <gml:posList>1 2 3 4 5 6</gml:posList>
                        </gml:LineString>
                    </gml:curveMember>
                    <gml:curveMember>
                        <gml:LineString gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-2">
                            <gml:posList>7 8 9 10 11 12</gml:posList>
                        </gml:LineString>
                    </gml:curveMember>
                </gml:MultiCurve>
            </geometry>
        </Feature>
    </featureMember>
</FeatureCollection>

Geometry shows fine in QGIS 2.16.0.

1

You may want to use the option to skip those GML features that it doesn't understand[QGIS options]

It wont solve the problem of not reading some geometries but at least it will render those that it can without stoping early in the process

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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