[geos-devel] How to build a multipolygon from a list of rings?
Frederik Ramm
frederik at remote.org
Fri Oct 9 03:04:02 EDT 2009
Hi,
zhuliangxiong at hotmail.com wrote:
> how could i build a MultiPolygon from a list of rings directly?
Have you tried using the Polygonizer class to create a collection of
polygons from your data, then make a multipolygon from that?
> It is
> hard for me to find out the relationship of holes and out rings.
I had a similar situation once and cursed GEOS for not allowing me to
find out which ring is inside another - I first had to convert all rings
to polygons individually, then I could check each of these polygons
(using the "contains" method) whether it was contained in any of the
others, and this then allowed me to construct a proper createPolygon
call (or multiple of those).
Bye
Frederik
More information about the geos-devel
mailing list