[OpenLayers-Users] polygon display using WFS

Véronique PAYOT veronique.payot at silogic.fr
Tue Jun 26 10:22:30 EDT 2007


Hello,

I'm trying to display a polygon from a WFS server using Openlayer.
The code comes from an example found on Internet (Source:BRGM wfs service) :http://swing.brgm.fr/cgi-bin/carrieres?

Here is the GML code (result of GetFeature) to test Point display :
----------------------------------------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding="UTF-8" ?>
<wfs:FeatureCollection
   xmlns:qua="http://swing.brgm.fr/quarries"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd 
                       http://swing.brgm.fr/quarries http://localhost:8080/Plone/test-listegeo2/wfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=exploitationsponctualsproduction&amp;OUTPUTFORMAT=XMLSCHEMA">
    <gml:featureMember>
      <qua:exploitationsponctualsproduction fid="1">
          <qua:msGeometry>
            <gml:Point srsName="EPSG:4326">
                 <gml:coordinates decimal="." cs="," ts=" ">1.5,44.5</gml:coordinates>
            </gml:Point>
         </qua:msGeometry>
        <qua:gid>1</qua:gid>
        <qua:exploitationname>Petoreau, Champ Luneau, L Ouche de Chez Moreau</qua:exploitationname>
        <qua:communities>LES NOUILLERS</qua:communities>
        <qua:substance>Calcaire</qua:substance>
        <qua:year>2006</qua:year>
        <qua:allowedproduction>300.000000000000000</qua:allowedproduction>
        <qua:sitename>Petoreau, Champ Luneau, L Ouche de Chez Moreau</qua:sitename>
        <qua:sitetype>Excavation (carriere)</qua:sitetype>
      </qua:exploitationsponctualsproduction>
    </gml:featureMember>
</wfs:FeatureCollection>
------------------------------------------------------------------------------------------------------------------------------
There is no problem for points but impossible to display a line or a polygon.

Here is the GML code (result of GetFeature) to test Polygon display :
------------------------------------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding="UTF-8" ?>
<wfs:FeatureCollection
   xmlns:qua="http://swing.brgm.fr/quarries"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd 
                       http://swing.brgm.fr/quarries http://localhost:8080/Plone/test-listegeo2/wfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=exploitationsponctualsproduction&amp;OUTPUTFORMAT=XMLSCHEMA">
    <gml:featureMember>
      <qua:exploitationsponctualsproduction fid="1">
         <gml:boundedBy>
          <gml:Box srsName="EPSG:4326">
              <gml:coordinates>0,40 4,50</gml:coordinates>
          </gml:Box>
        </gml:boundedBy>
        <qua:msGeometry>
        <gml:Polygon srsName="EPSG:4326">
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates>1.5,44.5 1.5,43.5 0.5,43.5 0.5,44.5 1.5,44.5</gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
        </qua:msGeometry>
        <qua:gid>1</qua:gid>
        <qua:exploitationname>Petoreau, Champ Luneau, L Ouche de Chez Moreau</qua:exploitationname>
        <qua:communities>LES NOUILLERS</qua:communities>
        <qua:substance>Calcaire</qua:substance>
        <qua:year>2006</qua:year>
        <qua:allowedproduction>300.000000000000000</qua:allowedproduction>
        <qua:sitename>Petoreau, Champ Luneau, L Ouche de Chez Moreau</qua:sitename>
        <qua:sitetype>Excavation (carriere)</qua:sitetype>
      </qua:exploitationsponctualsproduction>
   </gml:featureMember>
</wfs:FeatureCollection>
---------------------------------------------------------------------------------------------------------------------------------

Have you any idea?

Thanks for your remarks,

Regards,

Véronique PAYOT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070626/fd6dae4b/attachment.html


More information about the Users mailing list