Hi all I am currently using CQL to find buildings that fall within a
suburb as follows"

SimpleFeatureCollection  suburbs;

SimpleFeatureCollection fc = buildings.getFeaturesInBoundingBox(null);
                                SimpleFeatureIterator it = fc.features();
try {

while (it.hasNext()) {

    SimpleFeature assetShape = it.next();
    Point theGeom = (Point) assetShape.getDefaultGeometry();
    Filter filter = CQL.toFilter("CONTAINS(the_geom, POINT(" + pt.getX() +
" " + pt.getY() + "))”)
    SimpleFeatureCollection sfc = aggfc.subCollection(filter);
} finally {
                                        it.close();
                                }


I don’t think this is the best way to do this, it seems very slow.
Additionally, I would like to make it shape agnostic, so it also handles
more complex shapes. not just points.
What is the best way to make this generic and faster?
Thanx
gaby



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to