Malm Paul ha scritto:
> Hi list,
> I have 2 defined geometries, does anybody know how to add a geometry as
> a hole to the other geometry?
I see two ways:
- grab a geometry factory and rebuild the hull/holes set of your polygon
(taking the hull and the holes from the first polygon, adding the
hull of the second polygon as an extra hole)
- use a constructive method such as geometry.difference to have JTS
compute the result for you
The first is fast but you have the responsibility of checking the hole
sits fully inside the first polygon, the second will works anyways
no matter where the hole is but is more CPU expensive.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users