Re: [Geotools-gt2-users] Geometries within a geometry

2009-01-22 Thread Greg Ederer
Ah, excellent! I thought that something like this must exist. Thanks, Michael! Greg On Jan 22, 2009, at 3:22 PM, Michael Bedward wrote: > HI Greg, > > The general answer is to have your polygons in a spatial index to > avoid querying those that are distant from the query polygon. > > If your d

Re: [Geotools-gt2-users] Geometries within a geometry

2009-01-22 Thread Michael Bedward
HI Greg, The general answer is to have your polygons in a spatial index to avoid querying those that are distant from the query polygon. If your data are in a shapefile, IndexedShapefileDataStore is your friend http://javadoc.geotools.fr/2.5/org/geotools/data/shapefile/indexed/IndexedShapefileDat

[Geotools-gt2-users] Geometries within a geometry

2009-01-22 Thread Greg Ederer
Hi, Is there a convenient way to get a Collection of the geometries that are contained within a given geometry? I could iterate over all of the other polygons in my shapefile, and test whether each one is contained in the given polygon. But, this seems inefficient. Thanks! Greg