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

Paul Ramsey pramsey at cleverelephant.ca
Tue Oct 6 14:23:44 PDT 2015


Something like

http://postgis.net/docs/manual-dev/ST_ClusterWithin.html

If you use PostGIS 2.2?

P

On Tue, Oct 6, 2015 at 1:43 PM, Stefan Keller <sfkeller at gmail.com> wrote:
> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list