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'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


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

Browse other questions tagged or ask your own question.