SimpleFeatureSource featureSource = store.getFeatureSource("locations");
Filter filter = CQL.toFilter("CITY = 'Denver'");
SimpleFeatureCollection features = featureSource.getFeatures(filter);
System.out.println("found :" + features.size() + " feature");
SimpleFeatureIterator iterator = features.features();
try {
while (iterator.hasNext()) {
SimpleFeature feature = iterator.next();
Geometry geometry = (Geometry) feature.getDefaultGeometry();
System.out.println(feature.getID() + " default geometry " + geometry);