Geomatys / examind-community

Examind Community (formerly known as Constellation-SDI) is an open source platform dedicated to geographic data infrastructures development. It constitutes the foundation of custom developments carried out by Geomatys and results from more than 10 years of R&D.
Other
6 stars 5 forks source link

problème retourne curl sur le getfeature #44

Open paulemilechilin opened 3 weeks ago

paulemilechilin commented 3 weeks ago

curl -X GET "https://gis.eop.promethee.digital/examind/WS/wfs/EOP_WFS?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=1c176c88a28a4a96ab3d97032cd9e120&PROPERTYNAME=ville"

retourne : <?xml version='1.0' encoding='UTF-8'?>134496.13941362678 5377580.507853128</gml:lowerCorner>203339.56495731144 5430875.355412078</gml:upperCorner></gml:Envelope></wfs:boundedBy>1ToulouseFrance134496.13941362678 5430875.355412078 134496.13941362678 5377580.507853128 203339.56495731144 5377580.507853128 203339.56495731144 5430875.355412078 134496.13941362678 5430875.355412078</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface></wfs:member></wfs:FeatureCollection>

Dans le fichier : DefaultWFSWorker.java putSchemaLocation créé systématiquement une describeRequest (request) de type DescribeFeatureType pour le schéma. Possible de passer en paramètre le noms de la requête vers le bon schéma ?

glegal commented 3 weeks ago

je ne comprend pas vraiment la question. la requete: http://localhost:8080/examind/WS/wfs/default?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=Bridges&PROPERTYNAME=FID

renvoie un XML:

<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" gml:id="Bridges" timeStamp="2024-10-28T16:33:00" 
                       xsi:schemaLocation=" http://localhost:8080/examind/WS/wfs/default?request=DescribeFeatureType&version=1.1.0&service=WFS&namespace=xmlns(ns1=)&typename=ns1:Bridges http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" numberOfFeatures="1">
    <gml:boundedBy>
        <gml:Envelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
            <gml:lowerCorner>2.0E-4 7.0E-4</gml:lowerCorner>
            <gml:upperCorner>2.0E-4 7.0E-4</gml:upperCorner>
        </gml:Envelope>
    </gml:boundedBy>
    <gml:featureMember>
        <Bridges>
            <geometry>
                <gml:Point srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
                    <gml:pos>2.0E-4 7.0E-4</gml:pos>
                </gml:Point>
            </geometry>
            <FID>110</FID>
            <NAME>Cam Bridge</NAME>
        </Bridges>
    </gml:featureMember>
</wfs:FeatureCollection>

Effectivement, le xsi:schemaLocation contient une requête DescribeFeatureType: http://localhost:8080/examind/WS/wfs/default?request=DescribeFeatureType&version=1.1.0&service=WFS&namespace=xmlns(ns1=)&typename=ns1:Bridges qui renvoie un xsd qui decrit le feature type:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
  <xs:element xmlns="" xmlns:gml="http://www.opengis.net/gml" type="BridgesType" substitutionGroup="gml:_Feature" name="Bridges"/>
  <xs:complexType name="BridgesType">
    <xs:complexContent>
      <xs:extension xmlns:gml="http://www.opengis.net/gml" base="gml:AbstractFeatureType">
        <xs:sequence>
          <xs:element type="gml:PointPropertyType" nillable="false" minOccurs="1" maxOccurs="1" name="geometry"/>
          <xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="FID"/>
          <xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="NAME"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>

Je ne vois pas quel serait le "bon schema" dont vous parlez?