Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a statistical analysis project using ASP.NET, Geoserver, and OpenLayers. I need to let the user draw a polygon on OpenLayers then find geometries(villages etc.) that intersects this polygon. Then get their attributes like temperature, population etc., make some mathematical calculations and present this information to user.

My question is can I do the following operation:

(SELECT population,temperature,humidity,height FROM villages WHERE geometry INTERSECTS userDrawnPolygon, SELECT data1,data2,data3 FROM tableX WHERE geometry INTERSECTS userDrawnPolygon .... goes on for multiple tables) with ECQL or CQL or some filter on Geoserver or do I need to develop this algorithm in my ASP.NET code - connecting to MSSQL?

Thanks already.

share|improve this question
up vote 3 down vote accepted

You can use WFS GetFeature, either encoding the filter in CQL or Filter.

Something like:

http://host:port/geoserver/wfs?service=WFS&version=1.0&request=GetFeature&typeName=myLayer&CQL_FILTER=INTERSECTS(the_geom, POLYGON((...)))&propertyName=data1,data2,data3

more here:

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.