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 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
add comment

1 Answer

up vote 2 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=INTERSECT(the_geom, POLYGON((...)))&propertyName=data1,data2,data3

share|improve this answer
add comment

Your Answer

 
discard

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.