[postgis-users] Aggregating CAD lines to a single polygon?

Stefan Keller sfkeller at gmail.com
Tue Oct 6 13:43:09 PDT 2015


Hi

I got a CAD dataset of crossroads where - you won't believe it - every
single road marking was captured by a closed line! This means, that
there are about 10 marking outlines with a 0.5m gap which make up one
single crossroad on the street.

Now, what I need is just the center point for each crossroad.

My approach:
1. calculate a buffer of ~0.6m around each line,
2. dissolve overlapping geometries (=> (ST_Dump(ST_Union(geom))).geom ?),
3. calculate centroid of resulting polygon.

Any other ideas?

:Stefan


More information about the postgis-users mailing list