Hello,

I would create a table containing linestrings points (st_dumppoints)
then search for all lines whose points are within 50 meters from
another line, then either snap these points or remove the whole line.
Based on your dataset, you may have to union linestrings based on
attributes, to recreate continuous lines.

Nicolas

On 18 June 2012 10:01, Greg Polanski <polanski.g...@yahoo.com> wrote:
> Hello,
> I have a question about snapping a huge number of linestrings such that all
> lines that are almost parallel and within 50m collapse into one.
>
> I have some 500,000 streets from Openstreetmap (classified as secondary or
> larger roads). Most of them are made of two or more lanes. For a more
> compact storage and faster rendering I need only a visual representation of
> each road. How can I collapse for example the 6 lanes of a motorway into one
> linestring?
>
> Do I have to run a loop over all roads, snapping each of them to all others
> within the given tolerance? This seems extremely slow. Or can it be done
> once for all geometries?
> Do you have some SQL examples for a similar processing step?
>
> Thanks
> Greg
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to