[gdal-dev] GML (created via ogr2ogr) validation with OpenGIS XSD

Jonathan Beliën jbe at geo6.be
Mon Jul 4 08:04:53 PDT 2016


Hi everyone,

 

I’m trying to validate a GML file produced with ogr2ogr with OpenGIS GML XSD
files.

 

For every file I try to validate I have the same error message : « element
FeatureCollection: Schemas validity error : Element
'{http://ogr.maptools.org/}FeatureCollection': No matching global
declaration available for the validation root. »

 

I suspect I do something wrong but I can’t figure what !?!

 

I tried several -dsco FORMAT parameter and tried to validate on every schema
I could find here http://schemas.opengis.net/gml/ without any success.

 

Does someone know what I’m doing wrong or could help me to validate my file
?

 

Thanks a lot !

 

Copy of my test file :

 

<?xml version="1.0" encoding="utf-8" ?>

<ogr:FeatureCollection

     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

     xsi:schemaLocation="http://ogr.maptools.org/ test.xsd"

     xmlns:ogr="http://ogr.maptools.org/"

     xmlns:gml="http://www.opengis.net/gml">

  <gml:boundedBy>

    <gml:Box>

 
<gml:coord><gml:X>3.38653564453125</gml:X><gml:Y>50.41551870402676</gml:Y></
gml:coord>

 
<gml:coord><gml:X>4.57305908203125</gml:X><gml:Y>50.89956852220873</gml:Y></
gml:coord>

    </gml:Box>

  </gml:boundedBy>

 


  <gml:featureMember>

    <ogr:test fid="test.0">

      <ogr:geometryProperty><gml:Polygon
srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.
49066162109375,50.896103955543587 3.38653564453125,50.60415948856101
4.57305908203125,50.415518704026759 3.61724853515625,50.899568522208732
4.49066162109375,50.896103955543587</gml:coordinates></gml:LinearRing></gml:
outerBoundaryIs></gml:Polygon></ogr:geometryProperty>

      <ogr:userid>userid-1</ogr:userid>

    </ogr:test>

  </gml:featureMember>

  <gml:featureMember>

    <ogr:test fid="test.1">

      <ogr:geometryProperty><gml:MultiPolygon
srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gm
l:LinearRing><gml:coordinates>3.921339446183916,50.745568181163129
4.57305908203125,50.415518704026759 3.38653564453125,50.60415948856101
3.921339446183916,50.745568181163129</gml:coordinates></gml:LinearRing></gml
:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:P
olygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.4906616210937
5,50.896103955543587 3.921339446183916,50.745568181163129
3.61724853515625,50.899568522208732
4.49066162109375,50.896103955543587</gml:coordinates></gml:LinearRing></gml:
outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:g
eometryProperty>

      <ogr:label>label-2</ogr:label>

    </ogr:test>

  </gml:featureMember>

</ogr:FeatureCollection>

 

Jonathan Beliën

GEO-6

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160704/340657b1/attachment.html>


More information about the gdal-dev mailing list