Bug report #12780

Correct GML interpreted as plain table when XSD is present

Added by Joeri Theelen over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider/OGR
Affected QGIS version:2.6.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:20879

Description

I'm not sure if this is a bug or not. I have a correct GML file, and it is interpreted as geospatial data by QGIS, but when I add the accompanying XSD-file, the GML is interpreted as a plain table (i.e. the spatial part is not recognized).

See files attached:
Refgew.gml with Refgew.xsd is interpreted as plain attribute table
Refgew2.gml (having no internal link to Refgew.xsd) is interpreted as a geospatial dataset

File source: https://download.agiv.be/Producten/Detail?id=10&title=Voorlopig_referentiebestand_gemeentegrenzen

Refgew.gml (651 KB) Joeri Theelen, 2015-05-20 12:36 AM

Refgew.xsd Magnifier (3.27 KB) Joeri Theelen, 2015-05-20 12:36 AM

Refgew2.gml (651 KB) Joeri Theelen, 2015-05-20 12:36 AM

Voorlopig_referentiebestand_gemeentegrenzen_Gml.zip (4.58 MB) Joeri Theelen, 2015-05-26 02:35 PM

2015-05-26_232432.png (209 KB) Joeri Theelen, 2015-05-26 02:35 PM

History

#1 Updated by Saber Razmjooei over 9 years ago

  • Status changed from Open to Feedback

Works for me in master.

#2 Updated by Joeri Theelen over 9 years ago

Hi, thanks for looking into this. Yes, I've noticed that, with the files that I have uploaded in my original post, the GML with XSD is interpreted correctly (in QGIS 2.6 and 2.8). Strange. However, I have downloaded the original file again from our governments website, having administrative borders in Flanders. You can find the original download attached. I tried again, and it's still not interpreted correctly. See screenshot attached. Refgem.gml + Refgem.xsd (in red) is a plain table. "Refgem - Copy.gml" is the same file as "Refgem.gml", but it does not share the filename-part with the XSD: it is interpreted as a geospatial dataset (blue) as it should be. Maybe using the original download you'll be convinced that there is something wrong here.

#3 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Feedback to Closed
  • Resolution set to up/downstream
  • Assignee deleted (Saber Razmjooei)

Not a QGIS issue.

Try this two ogr commands:

ogrinfo Refgem.gml Refgem

and

ogrinfo Refgem-copy.gml Refgem

you will see that in the first case only attributes will be presented, in the second case also the geometry part.

#4 Updated by Joeri Theelen over 9 years ago

  • Assignee set to Giovanni Manghi

So what you are saying is that this is an OGR issue then? Or is the XML Schema not valid? I cannot test this now, but I remember checking it in XML Spy and the GML and XML Schema were both valid. However, I checked using the Java 8 just now, and there seems to be an issue: Cannot resolve the name 'gml:_FeatureCollection' to a(n) 'element declaration' component.

Anyway, I want to give the person responsible for creating these GML-files valuable feedback: so is it OGR or the XML Schema?

Thanks.

#5 Updated by Giovanni Manghi over 9 years ago

  • Assignee deleted (Giovanni Manghi)

Anyway, I want to give the person responsible for creating these GML-files valuable feedback: so is it OGR or the XML Schema?

with that xml schema ogr does not shows the geometries, so still unclear to me if is ogr or the schema. Better file a ticket on ogr tracker.

#6 Updated by Joeri Theelen over 9 years ago

Ok, thanks for the advice: I have posted this on the OGR issue tracker here:

https://trac.osgeo.org/gdal/ticket/5977

Cheers.

Also available in: Atom PDF