[Geoserver-users] GetMap request for polygon(s) based on BBOX and Attribute Value

Is it possible to formulate a GetMap rquest to build a map of polygons based on a bounding box as well as an feature/attribute value? So, image a Postgis table that contains all the buildings in a metropolitan area. A column in this table indicates the classification of each building (polygon). Could I somehow pass this information as a filter to the GetMap request so that I only retrieve polygons for a building classification?

--

__________________________________
Jeremy Nix
Senior Application Developer
Southwest Financial Services, Ltd.
(513) 621-6699

Hi Jeremy,

Yup, should be possible with an And filter. Something like this:

<Filter>
  <And>
    <BBOX>
      <gml:Box><gml:coordinates>...</gml:coordinates></gml:Box>
    </BBOX>
    <PropertyIsEqualTo>
        <PropertyName>...</PropertyName>
        <Literal>...</Literal>
    </PropertyIsEqualTo>
  </And>

</Filter>

-Justin

Jeremy Nix wrote:

Is it possible to formulate a GetMap rquest to build a map of polygons
based on a bounding box as well as an feature/attribute value? So,
image a Postgis table that contains all the buildings in a metropolitan
area. A column in this table indicates the classification of each
building (polygon). Could I somehow pass this information as a filter
to the GetMap request so that I only retrieve polygons for a building
classification?

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Jeremy Nix ha scritto:

Is it possible to formulate a GetMap rquest to build a map of polygons based on a bounding box as well as an feature/attribute value? So, image a Postgis table that contains all the buildings in a metropolitan area. A column in this table indicates the classification of each building (polygon). Could I somehow pass this information as a filter to the GetMap request so that I only retrieve polygons for a building classification?

Yes you can add whatever filter you want adding either FILTER or CQL_FILTER to your request, just as if it was a WFS GetFeature request
using the GET protocol. More information here:
http://docs.codehaus.org/display/GEOSDOC/WMS+vendor+parameters

(and you should be able to find some samples in the sample requests
shipping with GeoServer as well).

Cheers
Andrea