开发者

good methods for boolean operations on overlapping polygons

What is the best open source library for performing boolean operations (union, intersect, subtract) on vector geometry (polygons and polylines), such as the type stored in shapefiles? What do you like to use?

OGR looks like it probably has this capability, though I'm having trouble finding the par开发者_如何学JAVAticular commands in their documentation. Shapely definitely does this, and is easy to understand. PostGIS appears to also have some commands for this.

But there must be more, and I'm having trouble finding them.

I don't have much experience with any of the above libraries, and would appreciate any opinions on these or other libraries.

Thanks!


I don't think OGR can help you do this, though it sort of could if your data were in a spatial database that supported these operations via SQL - you could pass in the geomety-manipulating query and OGR would receive the result from the DB in the usual way.

Check out the GEOS library, I'm pretty sure it could do this, but I've not used it so I can't answer further http://trac.osgeo.org/geos/


Just a little correction: Shapely doesn't operate on shapefiles, it operates on single or multipart geometric objects. In conjunction with a shapefile reader/writer it could be used in a program that does binary operations file-wise (for example, I have a service that spatially compares GeoRSS feeds at http://sgillies.net/mush.html), but like you, I haven't seen that type of thing outside of proprietary software like ArcMap.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜