ST_CurveToLine: Avoid slivers and overlaps in postgis 2.1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ST_CurveToLine: Avoid slivers and overlaps in postgis 2.1

Jeker Oliver

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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users

arcs.png (31K) Download Attachment
stroked.png (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ST_CurveToLine: Avoid slivers and overlaps in postgis 2.1

Rémi Cura
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 <[hidden email]>:

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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Loading...