[gdal-dev] Intersection of polygon layers
yosuke kimura
yosukesabai at gmail.com
Fri Nov 5 15:08:41 EDT 2010
All,
I am trying to calculate intersection of two polygon layers with
polygons. I searched threads, found following thread, and what I got
was that OGR/GEOS provide me to intersection of two features, but I
have to write something in order to perform this operation for two
layers with multiple features.
Open source vector geoprocessing libraries?
http://groups.google.com/group/gdal/browse_thread/thread/7b5a4f461a4db319/
Intersect of two shapefiles
http://groups.google.com/group/gdal/browse_thread/thread/4b178c776aecf425/
My questions are:
1. Did I miss something? Is there development of library which takes
two polygon layers to calculate intersection or other basic geometry
operations that i find in OGR?
2. Assuming no to above, I got started writing code using python
binding. Not having too much experience, I codes to go through all
possible pair (complete bipartite), test with intersect, then run
intersection if it returns true. I am wondering there is faster way
to do this. I am thinking something like get envelope polygon of each
feature first, and then test intersection of them and then perform
intersect operation only when first test passes (i assume that it is
easier to test intersect if there are only handful of vertices as
oppose to hundreds of vertices in my case).
Right now I am trying with layer of hundreds of thousands of polygons
vs. thousands of polygon, and it seems to be taking 10s of hours to
finish in my environment.
Thank you,
Yosuke Kimura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101105/67da9e7b/attachment.html
More information about the gdal-dev
mailing list