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?