Hei,
Nils Kuhn schrieb:
By the way:
com.vividsolutions.jts.geom.Geometry.intersects(Geometry geom) is less
expensive than
com.vividsolutions.jts.geom.Geometry.intersection(Geometry geom):
I guess the first does a point in polygon test until there is a true.
The other one really needs to
Hi,
thanks a lot Michaël and Larry.
To limit the (inner) iteration through the features of layer b to those
features which envelopes intersect the envelope of layer a-feature
speeds up things a lot (approx. factor 120!).
The methods
Hi all,
I have the following problem:
I have two polygon-layers with many thousands of features. In layer a I
want to flag in an integer-field for every feature, whether the area of
the intersection with the polygons of layer b amounts more than 1
percent of the area himself.
The attached
Hi Nils,
You are on the right track with the envelope query. Unless your polygons
are unusually overlapped (i.e. many overlap many), you should get good
performance using the results of the envelope query to feed the inner loop
of geometry intersection.
regards,
Larry
On Fri, Jun 25, 2010
Hi,
//STRtree (JTS package) and IndexedFeatureCollection (jump) are your
friends,
//You can use the index like that :
IndexedFeatureCollection ifc = new IndexedFeatureCollection(fcB, new
STRtree());
//Then your second loop just go through the result of the following request
List candidates