All pastes #741448 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-10-18 18:30 UTC
rendered paste body

Question: The two requests given below are giving different responses.  Both are GetFeature requests with (the same) bounding box as a filter.  But one of them responds with a feature, the other does not.  What's going on?

----------------------------------------
----------------------------------------

The URL request:

http://localhost/cgi-bin/proxy.cgi?url=http%3A//jab.openplans.org%3A8080/geoserver/wfs%3Ftypename%3Dtopp%253Asites%26SERVICE%3DWFSV%26VERSION%3D1.0.0%26REQUEST%3DGetFeature%26SRS%3DEPSG%253A900913%26BBOX%3D-8248338.830361658%2C4975353.052789531%2C-8218643.044878186%2C4986054.23674754

----------

The response:

<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openplans.org/topp http://jab.openplans.org:8080/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=topp:sites http://www.opengis.net/wfs http://jab.openplans.org:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"><gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy></wfs:FeatureCollection>

----------------------------------------
----------------------------------------

The XML Request:

<wfs:GetFeature service="WFSV" version="1.0.0" 
  xmlns:topp="http://www.openplans.org/topp"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:wfsv="http://www.opengis.net/wfsv"
 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">
  <wfs:Query typeName="topp:sites">
   <ogc:Filter>
   <ogc:BBOX>
        <ogc:PropertyName>the_geom</ogc:PropertyName>
        <gml:Box srsName="EPSG:900913">
           <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">-8248338.830361658,4975353.052789531 -8218643.044878186,4986054.23674754</gml:coordinates>
        </gml:Box>
      </ogc:BBOX>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

----------

The response

<wfs:FeatureCollection xsi:schemaLocation="http://www.openplans.org/topp http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp:sites http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
  <gml:boundedBy>
    <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#26713">
      <gml:coordinates decimal="." cs="," ts=" ">3133284.25,5005702 3133284.5,5005702.5</gml:coordinates>
    </gml:Box>
  </gml:boundedBy>
  <gml:featureMember>
    <topp:sites fid="sites.26">
      <topp:title>New Feature</topp:title>
      <topp:img_url>./theme/img/marker.png</topp:img_url>
      <topp:description>asdasd</topp:description>
      <topp:the_geom>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#26713">
          <gml:coordinates decimal="." cs="," ts=" ">3133284.37664399,5005702.22379947</gml:coordinates>
        </gml:Point>
      </topp:the_geom>
    </topp:sites>
  </gml:featureMember>
</wfs:FeatureCollection>

----------------------------------------
----------------------------------------

This is the data:

nycdata=# select * from sites;
 gid | cat |    title    |        img_url         | description |                      the_geom                      | revision |       expired       
-----+-----+-------------+------------------------+-------------+----------------------------------------------------+----------+---------------------
  26 |     | New Feature | ./theme/img/marker.png | asdasd      | 010100002059680000CFDE3530B2E74741FFBA528E61185341 |        2 | 9223372036854775807