More importantly, and the motivation for the work, no more surprising ClassCastExceptions. Thanks to Boundless for sponsoring this work (and Andrea for reviewing the pull request).

Another bit of code seeing some love is the ECQL representation of Filter. ECQL is our "enhanced" version of OGC common query language.

String cql = ECQL.toCQL(filter);

Will produce: type = 'city'

In effect ECQL is similar to the "WHERE" part of an SQL statement. Be aware that GeoTools is not executing SQL directly, instead the filter data structure is translated into SQL specific for each database we support.

I took the opportunity to make sure some of the more interesting ECQL output correctly:

filter = ECQL.toFilter("type IN ('city','town')");

Thanks to Andrew Hulbert on the geotools-user list for helping catch these glitches.

For more information on filter check out our documentation on the subject.