[gdal-dev] Reading gml with schema

Even Rouault even.rouault at mines-paris.org
Wed May 29 07:00:19 PDT 2013


> I'm cc'ing Pekka Sarkola, as I remember him asking about this a while back.
> 
> Even, by tweaking I hope you mean tweaking the GML itself? 

I really meant the GML driver itself, so as to avoid an additional preliminary 
conversion step. Admitedly this is not a very elegant solution as it adds a 
bit of knowledge of a specific application schema to the GML driver itself (the 
elegant one would be to make the GML driver self discover application schemas 
from the XSD, but this looks like to be a huge and complicated task), but I 
guess this is OK for that kind of public/governmental data sources. The 
changes would likely be to make it understand at which indentation level the 
features are, and to make it recognize Piste as gml:Point, Murtoviiva as 
gml:LineString and Alue as gml:Polygon.

Another option would be to make something similar to the NAS driver which is a 
specialized GML driver for the NAS GML application schema, but NAS has indeed 
specific processing that make it more worthwhile to deserve a specific driver 
for it.

> As I believe
> (being quite ignorant of / unexperienced with XSLT) that with a simple
> XSLT the XML could be made readable by GDAL.

Yes, this is also certainly doable.

> Again, being unexperienced
> with XSLT, I'm not sure but hope that XSLT processors run in sequential
> mode, thus the reading could be conveniently handled with a pipe. Hmm,
> how would that actually work, I'm not sure(?).

I made a quick serach but I couldn't find a definitive answer on whether XSLT 
processors can operate with a SAX parser, and not only on a DOM.


-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list