[gdal-dev] Namespaces in GMLAS
Ari Jolma
ari.jolma at gmail.com
Fri Oct 13 13:19:02 PDT 2017
I've been looking into a GML file ('akaava:Suojelualue') with ogrinfo
I've got from a Finnish WFS
https://opaskartta.turku.fi/TeklaOGCWeb/WFS.ashx?request=GetCapabilities
First, the XSD files needed a bit of fixing: link GML to 3.1.1 instead
of 2.1.2 in opaskartta.turku.fi_Tekl..., and fix [-] to [\-] in
www.paikkatietopalvelu.fi_gml_yhteiset_2.1.6_yhteiset.xsd
After that, ogrinfo does not complain but does not find anything in the
GML file. I dug in a bit and it turns out that
GMLASSchemaAnalyzer::Analyze did not use the correct schema files (gml,
asemakaava, etc) in the 2nd and 3rd passes it does through the
namespaces -- it did in the first pass. For some reason only the
namespace -> schema pairs in the GML get into aoNamespaces array. The
correct ones are available in oMapURIToPrefixWithEmpty.
Probably the way Tekla constructs the GML file is unusual (my guess, I'm
no expert on this subject). The xsi:schemaLocation in the GML file
contains only two pairs: wfs -> wfs-schema and kuntagml -> describe
featuretype request URL. These are in aoNamespaces. The latter then
imports the gml and asemakaava schemas.
Modifying the code to read the namespaces in the 2nd and 3rd pass
similarly as in 1st pass I get a long list of layers with ogrinfo and
can read something real out of the GML file with ogr2ogr. However,
there's two HTTP 404 errors -- probably some schemas are not where
expected(?).
Could you Even sched some light on what's going on?
Thanks,
Ari
More information about the gdal-dev
mailing list