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'm trying to query the database (DataStore) and want to let the datastore calculate a value for me.

In SQL I would do it like this:

SELECT name, ST_Area(ST_Intersection(the_geom, ....) AS myValue FROM ...

Is there any way, how I can do this with CQL. My current approach is this, but I do not know how to add this calculated field. I need this, as I want to sortBy this field.

DataStore ds = ...
Filter filter = CQL.toFilter("INCLUDE");
SimpleFeatureCollection features = source.getFeatures(filter);

Any idea, how to add my area function to the resultset?

share|improve this question

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.