[postgis-users] snapping all close-by lines in a set of 500, 000
Greg Polanski
polanski.greg at yahoo.com
Mon Jun 18 07:16:41 PDT 2012
Hello Nicolas,
thank you for the reply. I don't have enough experience with postgis to understand how your suggestion helps.
Do you suggest to loop over all linestrings (which is really slow!) after st_dumppoints, or is there a single command that does the snapping at once?
What is the advantage of the intermediate points table? st_snap works with a given tolerance, or st_distance can help to select close-by lines... where do the points come in?
Thanks
Greg
________________________________
From: Nicolas Ribot <nicolas.ribot at gmail.com>
To: Greg Polanski <polanski.greg at yahoo.com>; PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Sent: Monday, June 18, 2012 1:33 PM
Subject: Re: [postgis-users] snapping all close-by lines in a set of 500,000
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.greg at 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 at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120618/582c52ce/attachment.html>
More information about the postgis-users
mailing list