[postgis-users] Evenly distributing a point set

Rémi Cura remi.cura at gmail.com
Mon Jan 26 01:50:21 PST 2015


Hey,
I used Nicolas's strategy and it works.
You could slightly improving it by some preprocessing on the linestring
itself
(smoothing or simplifying, depending on your data)
Cheers,
Rémi-C

2015-01-25 22:32 GMT+01:00 Nicolas Ribot <nicolas.ribot at gmail.com>:

> Hello,
>
> You could build the linestring from points (makeLine(geom order by time))
> then , with linear referencing (st_lineInterpolatePoint,
> st_linelocatePoint), you can divide your linestring by the distance you
> want, creating new points.
> Then, if you need to keep time information, you could interpolate time
> from initial segment where a new point lies in.
>
> Nicolas
>
> On 25 January 2015 at 12:54, Dave Barter <dave at phased.co.uk> wrote:
>
>> If I had a table of points which are irregularly distributed and wanted
>> to evenly distribute them what would be the best strategy and query?
>>
>> These points were created from a GPX file along a road journey so they
>> crudely map to a line string.
>>
>> I was thinking compute the KNN distance for each point and remove those
>> that have a KNN < a threshold (say 100 metres)
>>
>> Is that the best way to go about it?
>>
>> --
>> Dave Barter
>>
>> Web: http://www.phased.co.uk
>> Email:dave at phased.co.uk
>> Twitter:@Citizenfishy
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150126/9e01e855/attachment.html>


More information about the postgis-users mailing list