[postgis-users] Evenly distributing a point set

Nicolas Ribot nicolas.ribot at gmail.com
Sun Jan 25 13:32:20 PST 2015


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150125/ec5e9d83/attachment.html>


More information about the postgis-users mailing list