[postgis-devel] st_split(multipolygon,multiline)

Rémi Cura remi.cura at gmail.com
Wed Jul 23 09:31:30 PDT 2014


I found another strategy:
using ST_SymDifference(multipoly, buffer(multiline,very_small_number))
This is about 4 times faster.

It generates less than perfect solution, but the split function has
precision issue anyway, so even woth split I had to use tricks.

Cheers,
Rémi-C


2014-07-23 16:28 GMT+02:00 Sandro Santilli <strk at keybit.net>:

> On Wed, Jul 23, 2014 at 12:17:47PM +0200, Rémi Cura wrote:
>
> > Looking at the C code it seems that the split(polygon, line) case is
> dealed
> > with by unioning the boundary of polygon and line with geos, then
> > polygonizing with geos, then returning face that are not  in polygon
> holes.
> >  (lwgeom_geos_split.c)
> >
> > Any reason it couldn't work with split(multi-polygon, multi-line) ?
>
> I don't see any reason.
>
> > I wrote a plpgsql wrapper to allow this but it is very slow because it
> > successively split the input polygon with each part of multi_line.
>
> A patch for doing that in C is welcome.
> With regress tests, valgrind-clean unit tests and updated documentation :)
>
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140723/78b36f43/attachment.html>


More information about the postgis-devel mailing list