Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to do a query to filter the result inside a polygon or geometry, like this: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/query_buffer.html

But, i need to do this in a opengeo WMS server.

I have the following query:

suite.opengeo.org/geoserver/usa/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=usa%3Astates&QUERY_LAYERS=usa%3Astates&STYLES=&BBOX=-79.89257812499999%2C41.68111756290652%2C-64.88525390624999%2C46.41513877649202&FEATURE_COUNT=5&HEIGHT=600&WIDTH=1366&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=681&Y=298

And i need to filter the results inside of a polygon. The parsed query:

  SERVICE: "WMS",
  VERSION: "1.1.1",
  REQUEST: "GetFeatureInfo",
  LAYERS: "usa:states",
  QUERY_LAYERS: "usa:states",
  STYLES: "",
  BBOX: BBOX,
  FEATURE_COUNT: "5",
  HEIGHT: HEIGHT,
  WIDTH: WIDTH,
  FORMAT: "image/png",
  INFO_FORMAT: "text/html",
  SRS: "EPSG:4326",
  X: X,
  Y: Y

I find this XML code, but i dont know if is this way:

FILTER: '<Filter xmlns:gml="http://www.opengis.net/gml"><Intersects><PropertyName>the_geom</PropertyName><gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#2400"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1 1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>'

EDIT:

In ESRI Wms, we can use this:

**point_within**
Description: An SLD style that uses a "within" spatial filter to render only features within a polygon geometry
URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_within.xml
GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,within&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_within.xml

But, how I can do the same with others WMS? By example the http://suite.opengeo.org/geoserver/usa/wms ? I tried using a FILTER with GML, but I dont know how to do this. Someone help me?

share|improve this question
    
Please, someone. –  Marcelo Rodovalho May 15 '13 at 13:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.