2010/1/14 tommy408 wrote:
>
> You're right, in my test using filter with datasource was faster for some
> reason.
>
The power of a spatial index :)
Good to hear things are working for you.
cheers
Michael
--
Throughout i
Yes you answered my question Michael.
You're right, in my test using filter with datasource was faster for some
reason.
Thank you
mbedward wrote:
>
> Hello,
>
>> Suppose I'm running the query a lot so I loaded all the geometries into
>> FeatureCollection.
>
> Sorry - do you mean load all fe
Hello,
> Suppose I'm running the query a lot so I loaded all the geometries into
> FeatureCollection.
Sorry - do you mean load all features into memory or a subset of them ?
If you are working with a very large number of features in a database
with a spatial index I think it can be faster to que
Thank you for your help.
Suppose I'm running the query a lot so I loaded all the geometries into
FeatureCollection.
FeatureCollection collection =
ds.getFeatureSource( "all_polygons" ).getFeatures( filter );
And I'm doing queries like: check if this LineString intersect a polygon in
another pol
Sorry - I see that actually the dud line was duplicated by a correct
one in the original post.
Coffee time.
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class ap
oops, this line certainly doesn't make sense...
FilterFactory2 ff = CommonFactoryFinder
it should be...
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
--
This SF.Net email is sponsored by the Verizon D
Hello,
Here's one way that you might do it...
// create map and manually set params for your database
Map connectionParams = ...
// alternatively use the GeoTools swing module JDataStoreWizard
JDataStoreWizard wizard = new JDataStoreWizard( new PostgisDataStoreFactory() );
int result = wizard.sh
I've been using Postgis and normally if I want to look for a nearest geometry
I would do something like
Select the_geom From all_polygons Where ST_Distance(the_geom, new_geom) < 10
How would I do it using geotools? Would it be something like this?
final SpatialIndex spatialIndex= new STRtree()