[Geoserver-users] wfs - getFeature

I am having no luck getting a simple bounding box
feature selection to work in GeoServer. Hopefully
someone can give me some help.

Here is my get from wms for a set of layers which
works well:

http://server22:8080/geoserver/wms?width=500&height=500&bbox=1273000.0,239500.0,1274000.0,240500.0&srs=EPSG:2855&request=GetMap&layers=myns:MY_LINES,myns:MY_POINTS&styles=myLines,myPoints&Format=image/png

I expect that the wfs request for a feature will be
similarily defined with the bounding box, but I get no
features returned - I just get:

<wfs:FeatureCollection
...><gml:null>unknown</gml:null></gml:boundedBy></wfs:FeatureCollection>
Here is my getFeature post content (modified from the
demo):

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:myns="http://server22/&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                     
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="myns:MY_POINTS">
    <ogc:PropertyName>myns:JAMP</ogc:PropertyName>
   
    <ogc:Filter>
      <ogc:BBOX>
        <ogc:PropertyName>the_geom</ogc:PropertyName>
        <gml:Box
srsName="http://www.opengis.net/gml/srs/epsg.xml#2855&quot;&gt;
          
<gml:coordinates>1273000.0,239500.0,1274000.0,240500.0</gml:coordinates>
        </gml:Box>
      </ogc:BBOX>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

I am running GeoServer 1.3.0 on a Tomcat 5.5.12
installation with the data store
in Oracle 10.2 Spatial.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

I believe you need a space instead of a , in between your middle coordinates.

<gml:coordinates>1273000.0,239500.0 1274000.0,240500.0</gml:coordinates>
vs.
<gml:coordinates>1273000.0,239500.0,1274000.0,240500.0</gml:coordinates>

In the demo section of the web admin tool, under 'sample requests', you can find a number of examples of WFS requests. The bbox one is:

<wfs:GetFeature service="WFS" version="1.0.0"
   outputFormat="GML2"
   xmlns:topp="http://www.openplans.org/topp&quot;
   xmlns:wfs="http://www.opengis.net/wfs&quot;
   xmlns:ogc="http://www.opengis.net/ogc&quot;
   xmlns:gml="http://www.opengis.net/gml&quot;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation="http://www.opengis.net/wfs
                       http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
   <wfs:Query typeName="topp:states">
     <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
     <ogc:PropertyName>topp:PERSONS</ogc:PropertyName>
     <ogc:Filter>
       <ogc:BBOX>
         <ogc:PropertyName>the_geom</ogc:PropertyName>
         <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
            <gml:coordinates>-75.102613,40.212597 -72.361859,41.512517</gml:coordinates>
         </gml:Box>
       </ogc:BBOX>
    </ogc:Filter>
   </wfs:Query>
</wfs:GetFeature>

best regards,

Chris

scott o wrote:

I am having no luck getting a simple bounding box
feature selection to work in GeoServer. Hopefully
someone can give me some help.

Here is my get from wms for a set of layers which
works well:

http://server22:8080/geoserver/wms?width=500&height=500&bbox=1273000.0,239500.0,1274000.0,240500.0&srs=EPSG:2855&request=GetMap&layers=myns:MY_LINES,myns:MY_POINTS&styles=myLines,myPoints&Format=image/png

I expect that the wfs request for a feature will be
similarily defined with the bounding box, but I get no
features returned - I just get:

<wfs:FeatureCollection
...><gml:null>unknown</gml:null></gml:boundedBy></wfs:FeatureCollection>
Here is my getFeature post content (modified from the
demo):

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:myns="http://server22/&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                     http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="myns:MY_POINTS">
    <ogc:PropertyName>myns:JAMP</ogc:PropertyName>
       <ogc:Filter>
      <ogc:BBOX>
        <ogc:PropertyName>the_geom</ogc:PropertyName>
        <gml:Box
srsName="http://www.opengis.net/gml/srs/epsg.xml#2855&quot;&gt;
          <gml:coordinates>1273000.0,239500.0,1274000.0,240500.0</gml:coordinates>
        </gml:Box>
      </ogc:BBOX>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

I am running GeoServer 1.3.0 on a Tomcat 5.5.12
installation with the data store
in Oracle 10.2 Spatial.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org