2

I'm doing the test to introduce multiple geometry in a WFS service using GML.

For now the simple geometry is functional, but I still have some bugs with multiple geometry. I think it may come from my GML and XSD which are not valid in multiple geometry.

(validation with this site : http://cite.opengeospatial.org/test_engine/gml/2.1.2 )

The two errors reported :

http://www.hostingpics.net/viewer.php?id=329637Sanstitre1.png

Here is the code of my two test files. The GML :

<?xml version="1.0" encoding="UTF-8"?>
<gml2:FeatureCollection xmlns:gml2="http://www.safe.com/gml2"  xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.safe.com/gml2 Test_creche_multi_geometry.xsd">
<gml:boundedBy>
    <gml:Box srsName="EPSG:31370">
        <gml:coordinates>184929.649440012,128365.014231805 184946.357440016,128378.548198801</gml:coordinates>
    </gml:Box>
</gml:boundedBy>
<gml:featureMember>
    <gml2:Test_creche_multi_geometry>
                <gml2:CODEPICC>xxxxx</gml2:CODEPICC>
                <gml2:CLE>xxxxx</gml2:CLE>
                <gml2:RUE>xxxxx</gml2:RUE>
                <gml2:NUMERO>xxxxx</gml2:NUMERO>
                <gml2:CODEPOSTAL>xxxxx</gml2:CODEPOSTAL>
                <gml2:LOCALITE>xxxxx</gml2:LOCALITE>
                <gml2:COMMUNE>xxxxx</gml2:COMMUNE>
                <gml2:ITINERAIRE>xxxxx</gml2:ITINERAIRE>
                <gml2:FONCTION>xxxxx</gml2:FONCTION>
        <MultiGeometry>
            <geometryMember>
                <gml:polygonProperty>
                    <gml:Polygon srsName="EPSG:31370">
                        <gml:outerBoundaryIs>
                            <gml:LinearRing>
                                <gml:coordinates>
                    184945.971440009,128372.235198804,98.9550000000017 184945.033210008,128365.014231805,96.0626999999949 184929.649440012,128367.213198801,98.8849999999948 184931.385440006,128378.548198801,95.9250000000029 184943.227440013,128376.6961988,98.8410000000003 184946.357440016,128376.194198803,98.8380000000034 184945.971440009,128372.235198804,98.9550000000017
                                </gml:coordinates>
                            </gml:LinearRing>
                        </gml:outerBoundaryIs>
                    </gml:Polygon>
                </gml:polygonProperty>
            </geometryMember>
            <geometryMember>
                <gml:pointProperty>
                    <gml:Point srsName="EPSG:31370">
                            <gml:coordinates>184938.100676204,128371.723142331</gml:coordinates>
                    </gml:Point>
                </gml:pointProperty>
            </geometryMember>
        </MultiGeometry>    
    </gml2:Test_creche_multi_geometry>
</gml:featureMember>
</gml2:FeatureCollection>

The XSD :

<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml"     xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml2="http://www.safe.com/gml2"     targetNamespace="http://www.safe.com/gml2" elementFormDefault="qualified">
<import namespace="http://www.opengis.net/gml"     schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
<element name="FeatureCollection" type="gml2:FeatureCollectionType"     substitutionGroup="gml:_FeatureCollection"/>
<element name="Test_creche_multi_geometry" type="gml2:Test_creche_multi_geometryType" substitutionGroup="gml:_Feature"/>
<complexType name="FeatureCollectionType">
<complexContent>
<extension base="gml:AbstractFeatureCollectionType"></extension>
</complexContent>
</complexType>
<complexType name="MultiGeometryPropertyType">
<complexContent>
<extension base="gml:GeometryAssociationType"></extension>
</complexContent>
</complexType>
<complexType name="Test_creche_multi_geometryType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element name="CODEPICC" type="integer"/>
<element name="CLE">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="RUE">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="NUMERO">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="CODEPOSTAL">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="LOCALITE">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="COMMUNE">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="ITINERAIRE">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<element name="FONCTION">
<simpleType>
<restriction base="string">
<maxLength value="254"/>
</restriction>
</simpleType>
</element>
<choice>
<element ref="gml:MultiGeometry"/>
<element ref="gml:polygonProperty"/>
<element ref="gml:pointProperty"/>
</choice>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>

Thx for your suggestions. :]

1

So, I forgot to put "gml:" before multigeometry and multimember. My mistakes have decreased.

The .xsd is valid but not yet the gml. I also changed multimember into multimembers.

For thr validation error gml, the error is still the same as before.

I still can not generate the sd. Arcgis server in order to allow the generation of a wfs service.

http://img4.hostingpics.net/pics/670546gijhfhbc.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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