I noticed that postgis 2.x uses "geom" instead of "the_geom" as default
name for the geometry column. What is the best way to handle this in
manually created filters? Example: to filter Features stored in
PostGIS/Shapefiles against a geometry in combination with a DE9IM I
create a filter this way:
public static final FilterFactory GT_FF =
CommonFactoryFinder.getFilterFactory(null);
public static String DEFAULT_GEOMETRY_ATTRIBUTE = "the_geom";
...
Expression expr = GT_FF.function("relatePattern",
GT_FF.property(DEFAULT_GEOMETRY_ATTRIBUTE),
GT_FF.literal(geometry),
GT_FF.literal(de9imPattern));
Filter relate = GT_FF.equals(expr, GT_FF.literal(Boolean.TRUE));
...
featureCollection = featureSource.getFeatures(filter);
Because the filter is used both for shapefile and postgis featurestores
and because we will use both postgis 1.x and 2.x in different
deployments, I wonder how to solve this in a smart way. Are there
look-up functions in the feature stores to get the geometry attribute name?
Thanks,
Matthias
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users