[postgis-devel] ST_Split in 1.5

George Silva georger.silva at gmail.com
Fri Aug 17 06:10:01 PDT 2012


Thanks strk. I got away with ST_Dump and ST_Polygonize.

For future reference:

CREATE OR REPLACE FUNCTION split_polygon(polygon geometry,split_line
geometry) RETURNS SETOF geometry AS
$$
DECLARE

v_geometry geometry;

BEGIN

FOR v_geometry IN SELECT (ST_Dump((
 ST_Polygonize(ST_Union(ST_Boundary(polygon),split_line))
))).geom LOOP
 return next v_geometry;
 END LOOP;
END;

$$ LANGUAGE plpgsql;

On Fri, Aug 17, 2012 at 5:15 AM, Sandro Santilli <strk at keybit.net> wrote:

> I guess the shortest route for you would be to roll your own
> ST_Split in pl/pgsql. There should be something on the wiki
> to start from.
>
> --strk;
>
> On Fri, Aug 17, 2012 at 12:39:52AM -0300, George Silva wrote:
> > Hello guys,
> >
> > I've hitted a roadblock with something I'm creating and I need the
> ST_split
> > function in PostGIS 1.5.
> >
> > Is there a way I can make it available for PostGIS 1.5?
> >
> > Do I need to recompile lwgeom?
> >
> > http://svn.osgeo.org/postgis/trunk/postgis/lwgeom_geos.c
> >
> > Or is there a whole lot of other steps to make it work?
> >
> > @strk: any chance you can point me the steps? Thanks
> >
> > --
> > George R. C. Silva
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



-- 
George R. C. Silva

Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20120817/11fb1bb4/attachment.html>


More information about the postgis-devel mailing list