[postgis-users] ST_CurveToLine: Avoid slivers and overlaps in postgis 2.1

Rémi Cura remi.cura at gmail.com
Mon Jan 30 06:44:16 PST 2017


Hey,
if your cases are always like those in your illustrations,
problem is tractable without too much effort.
(for polygon sharing an arc, get list of arcs, deduplicate list, change
arcs into linestring, rebuild polygon using linestring).

If you want a solution in all generality (for instance several polygons
sharing parts of an arc),
you are going to suffer
Get all arcs from all polygon, group by arcs sharing a center, transform
the group of arc to linestring, node the linestring to account for parts of
the arcs, rebuild polygonusing correct linestring.

As you notice, this is really bad complexity (you have to consider all
polygons arcs for one change).
Doing it properly would require to use something like CGAL I guess.

Good luck !

:-/
Cheers,
Rémi-C

2017-01-30 10:36 GMT+01:00 Jeker Oliver <Oliver.Jeker at bd.so.ch>:

> Hey ho everybody
>
>
>
> We at sogis are looking for a way to convert arcs (curves) to lines
> without producing slivers and overlaps of adjacent geometries sharing the
> same arc. It is very important for us to find a postgis solution as postgis
> is the “working horse” in all our automatic data transformation processes.
>
> We looked at all available postgis functions and could not find a solution.
>
>
>
> Attachments:
>
> -      arcs.png: The geometries as stored in the postgresql table: lower
> left: two adjacent Polygon’s / upper right: one Multipolygon with two
> adjacent parts in it.
>
> -      stroked.png: The output when using ST_CurveToLine (The same when
> forcing right hand rule before calling ST_CurveToLine)
>
>
>
> Thanks for your thoughts – Maybe will see some of you at FOSSGIS in
> Passau, will give a presentation there…
>
>
>
> Cheers
>
> Oliver
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170130/084d3687/attachment.html>


More information about the postgis-users mailing list