help w/ WFS request

Eijnden, B. van den (Bart) b.vdeijnden at AGI.RWS.MINVENW.NL
Thu Apr 20 01:44:06 EDT 2006


Have you tried Perry's suggestion to use:

        <gml:Box srsName="EPSG:4269">
           <gml:coordinates>-95,26.5 -94.75,26.75</gml:coordinates>
        </gml:Box>

?

What's does your LAYER's PROJECTION block look like?

Best regards,
Bart

-----Oorspronkelijk bericht-----
Van: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens John Cartwright
Verzonden: donderdag 20 april 2006 1:17
Aan: MAPSERVER-USERS at LISTS.UMN.EDU
Onderwerp: Re: [UMN_MAPSERVER-USERS] help w/ WFS request


Thanks for the suggestion, Bart.

It didn't seem to make any difference though. The request now reads as 
listed below. I'm assuming that the

<gml:coordinates>-95,26.5 -94.75,26.75</gml:coordinates>

is referring to "minx,miny maxx,maxy".  Also "DUMP TRUE" is set inside the
LAYER section.

-- john

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:gml="http://www.opengis.net/gml"
  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">
  <wfs:Query typeName="soundings">
    <ogc:Filter>
      <ogc:BBOX>
        <ogc:PropertyName>msGeometry</ogc:PropertyName>
        <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4269">
           <gml:coordinates>-95,26.5 -94.75,26.75</gml:coordinates>
        </gml:Box>
      </ogc:BBOX>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>


Eijnden, B. van den (Bart) wrote:

>Some more thoughts:
>
>1. you need to use msGeometry instead of the_geom in your GetFeature
request
>2. just checking, but have you set DUMP TRUE on your LAYER?
>
>Best regards,
>Bart
>
>-----Oorspronkelijk bericht-----
>Van: UMN MapServer Users List
>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens John Cartwright
>Verzonden: dinsdag 18 april 2006 22:19
>Aan: MAPSERVER-USERS at LISTS.UMN.EDU
>Onderwerp: Re: [UMN_MAPSERVER-USERS] help w/ WFS request
>
>
>Thanks for the prompt replies Perry and Bart!
>
>I found part of my problem was that the TNS_ADMIN variable was not being 
>recognized so mapserver was not finding my tnsnames.ora. Having 
>corrected that, I now get the correct coordinates in the response, but 
>it 's not finding  any features. This is mapserver 4.8.3 (on RHEL WS4)  
>running against an Oracle (10.1.0.4) spatial data source.
>
>Here's my current request and response. I expect to find 67 point 
>features w/in this particular geographic extent, but the 
>featureCollection is coming back empty.  The complete 
>DescribeFeatureType response is listed at the bottom of the message.
>
>Thanks again for your help!
>
>-- john
>
>---------------------------------------------------------------------------
-
>---------------------------------------------------------------------------
-
>--------------------------
>Request:
>
><wfs:GetFeature service="WFS" version="1.0.0"
>  outputFormat="GML2"
>  xmlns:wfs="http://www.opengis.net/wfs"
>  xmlns:ogc="http://www.opengis.net/ogc"
>  xmlns:gml="http://www.opengis.net/gml"
>  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">
>  <wfs:Query typeName="soundings">
>    <ogc:PropertyName>OBJECT_ID</ogc:PropertyName>
>    <ogc:Filter>
>      <ogc:BBOX>
>        <ogc:PropertyName>the_geom</ogc:PropertyName>
>        <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4269">
>           <gml:coordinates>-95,26.5 -94.75,26.75</gml:coordinates>
>        </gml:Box>
>      </ogc:BBOX>
>   </ogc:Filter>
>  </wfs:Query>
></wfs:GetFeature>
>
>---------------------------------------------------------------------------
-
>---------------------------------------------------------------------------
-
>--------------------------
>Response (note the empty featureCollection where there should be 67
points):
>
><?xml version='1.0' encoding="ISO-8859-1" ?>
><wfs:FeatureCollection
>   xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
>   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.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd
>                       http://mapserver.gis.umn.edu/mapserver 
>http://lynx.ngdc.noaa.gov:8000/cgi-bin?map=bathydb&amp;SERVICE=WFS&amp;VERS
I
>ON=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=soundings&amp;OUTPUTF
O
>RMAT=XMLSCHEMA">
>      <gml:boundedBy>
>          <gml:Box srsName="EPSG:4269">
>              <gml:coordinates>-94.999165,26.504089 
>-94.757270,26.742092</gml:coordinates>
>          </gml:Box>
>      </gml:boundedBy>
></wfs:FeatureCollection>
>
>---------------------------------------------------------------------------
-
>---------------------------------------------------------------------------
-
>--------------------------
>DescribeFeatureType Response:
>
><schema
>   targetNamespace="http://mapserver.gis.umn.edu/mapserver" 
>   xmlns:ms="http://mapserver.gis.umn.edu/mapserver" 
>   xmlns:ogc="http://www.opengis.net/ogc"
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://www.w3.org/2001/XMLSchema"
>   xmlns:gml="http://www.opengis.net/gml"
>   elementFormDefault="qualified" version="0.1" >
>
>  <import namespace="http://www.opengis.net/gml"
> 
>schemaLocation="http://schemas.opengeospatial.net/gml/2.1.2/feature.xsd" />
>
>  <element name="soundings" 
>           type="ms:soundingsType" 
>           substitutionGroup="gml:_Feature" />
>
>  <complexType name="soundingsType">
>    <complexContent>
>      <extension base="gml:AbstractFeatureType">
>        <sequence>
>
>          <element name="msGeometry" type="gml:GeometryPropertyType"
>minOccurs="0" maxOccurs="1"/>
>          <element name="OBJECT_ID" type="string"/>
>          <element name="SURVEY_ID" type="string"/>
>          <element name="ORIGINAL_LAT" type="string"/>
>          <element name="ORIGINAL_LONG" type="string"/>
>          <element name="CALCULATED_LAT" type="string"/>
>          <element name="CALCULATED_LONG" type="string"/>
>          <element name="ORIGINAL_DEPTH" type="string"/>
>          <element name="CURRENT_DEPTH" type="string"/>
>
>          <element name="CARTOCODE" type="string"/>
>          <element name="OBJECT_CODE" type="string"/>
>          <element name="QUALITY_CODE" type="string"/>
>          <element name="ACTIVE" type="string"/>
>        </sequence>
>      </extension>
>    </complexContent>
>  </complexType>
>
></schema>
>
>
>
>
>
>
>Pericles S. Nacionales wrote:
>
>  
>
>>John,
>>
>>On Tuesday 18 April 2006 13:28, John Cartwright wrote:
>> 
>>
>>    
>>
>>>Hello All,
>>>
>>>I'm trying to get mapserver setup as a simple WFS server. It responds to
>>>a GetCapabilities request OK:
>>>but when I send the following GetFeatures request:
>>>
>>><wfs:GetFeature service="WFS" version="1.0.0"
>>> outputFormat="GML2"
>>> xmlns:wfs="http://www.opengis.net/wfs"
>>> xmlns:ogc="http://www.opengis.net/ogc"
>>> xmlns:gml="http://www.opengis.net/gml"
>>> 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">
>>> <wfs:Query typeName="soundings">
>>>   <ogc:Filter>
>>>     <ogc:BBOX>
>>>       <ogc:PropertyName>the_geom</ogc:PropertyName>
>>>       <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4269">
>>>   
>>>
>>>      
>>>
>>Shouldn't this be "<gml:Box srsName="EPSG:4269">" (or is it EPSG:4326)?
>>    
>>
>Looks 
>  
>
>>like the srsName in your mapfile maybe incorrect.
>>
>>-Perry
>>
>> 
>>
>>    
>>
>>>          <gml:coordinates>-95,26.5 -94.75,26.75</gml:coordinates>
>>>       </gml:Box>
>>>     </ogc:BBOX>
>>>  </ogc:Filter>
>>> </wfs:Query>
>>></wfs:GetFeature>
>>>
>>>I get this response, and don't know what's wrong:
>>>
>>><?xml version='1.0' encoding="ISO-8859-1" ?>
>>><wfs:FeatureCollection
>>>  xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
>>>  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.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd
>>>                      http://mapserver.gis.umn.edu/mapserver
>>>http://lynx.ngdc.noaa.gov:8000/cgi-bin?map=bathydb&amp;SERVICE=WFS&amp;VE
R
>>>      
>>>
>S
>  
>
>>>ION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=soundings&amp;OUTP
U
>>>      
>>>
>TF
>  
>
>>>ORMAT=XMLSCHEMA"> <gml:boundedBy>
>>>     <gml:null>missing</gml:null>
>>>  </gml:boundedBy>
>>></wfs:FeatureCollection>
>>>
>>>It suggests to me that the bounding box coordinates are not being
>>>properly read. I would have expected something like in the response:
>>>
>>><gml:boundedBy>
>>><gml:Box srsName="EPSG:4326">
>>><gml:coordinates> -95, 26.5 -94.75, 26.75</gml:coordinates>
>>></gml:Box>
>>></gml:boundedBy>
>>>
>>>followed by a series of featureMember elements.
>>>
>>>Can someone tell what I'm doing wrong?
>>>
>>>Thanks!
>>>
>>>-- john
>>>   
>>>
>>>      
>>>
>> 
>>
>>    
>>
>
>
>Disclaimer
>************************************************************************
>Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
>uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
>hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
>informeren. Wij adviseren u om bij twijfel over de juistheid of de 
>volledigheid van de mail contact met afzender op te nemen.
>
>This message shall not constitute any rights or obligations.
>This message is intended solely for the addressee.
>If you have received this message in error, please delete it and
>notify the sender immediately. When in doubt whether this message
>is correct or complete, please contact the sender.
>************************************************************************
>
>  
>


Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
informeren. Wij adviseren u om bij twijfel over de juistheid of de 
volledigheid van de mail contact met afzender op te nemen.

This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************



More information about the mapserver-users mailing list