Re: [postgis-users] Evenly distributing a point set

2015-01-27 Thread Brent Wood
Replied at  
http://gis.stackexchange.com/questions/131854/spacing-a-set-of-pointswith some 
Postgis options...
Brent Wood
 From: toni hernández t...@sigte.udg.edu
 To: postgis-users@lists.osgeo.org 
 Sent: Wednesday, January 28, 2015 12:05 AM
 Subject: Re: [postgis-users] Evenly distributing a point set
   
 Maybe not on a point.
 I was thinking with linestring
 
 

On 27/01/2015 11:46, Dave Barter wrote:
  
 #yiv5480649879 body{font-family:Helvetica, Arial;font-size:13px;} 
  
  Maybe you can also try to simplify the geometry using X as the tolerance. 
 http://postgis.net/docs/manual-1.4/ST_Simplify.html 
 
 On 25/01/2015 12:54, Dave Barter wrote: 
  KNN distance 
 
 
   
 
 Will that work on a point layer? I have added a diagram and more detail here 
http://gis.stackexchange.com/questions/131854/spacing-a-set-of-points 
  
 ___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users 
 
 
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

  ___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Evenly distributing a point set

2015-01-27 Thread Dave Barter

Maybe you can also try to simplify the geometry using X as the tolerance.  
http://postgis.net/docs/manual-1.4/ST_Simplify.html  

On 25/01/2015 12:54, Dave Barter wrote:  
 KNN distance  



Will that work on a point layer?
I have added a diagram and more detail here 
http://gis.stackexchange.com/questions/131854/spacing-a-set-of-points___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Evenly distributing a point set

2015-01-27 Thread toni hernández

Maybe not on a point.
I was thinking with linestring

On 27/01/2015 11:46, Dave Barter wrote:


Maybe you can also try to simplify the geometry using X as the 
tolerance.

http://postgis.net/docs/manual-1.4/ST_Simplify.html

On 25/01/2015 12:54, Dave Barter wrote:
 KNN distance




Will that work on a point layer?
I have added a diagram and more detail here 
http://gis.stackexchange.com/questions/131854/spacing-a-set-of-points



___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Evenly distributing a point set

2015-01-27 Thread toni hernández

Maybe you can also try to simplify the geometry using X as the tolerance.
http://postgis.net/docs/manual-1.4/ST_Simplify.html

On 25/01/2015 12:54, Dave Barter wrote:

KNN distance


___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


Re: [postgis-users] Evenly distributing a point set

2015-01-26 Thread Rémi Cura
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.ri...@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 d...@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:d...@phased.co.uk
 Twitter:@Citizenfishy

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Evenly distributing a point set

2015-01-26 Thread Rémi Cura
Hey,
it is unclear what you want and how your data looks like.
For better answer it would be good to have better info.

Maybe a screen of your data, some facts, for what usage (admissible error,
expected quality ..) etc etc.

What you are trying to do (reconstruct a network from sampled pieces) is in
general a complicated problem.
It may be simpler depending on your data and hypothesis.

Cheers,
Rémi-C


2015-01-26 9:28 GMT+01:00 Dave Barter d...@phased.co.uk:



  These points were created from a GPX file along a road journey so they
 crudely map to a line string

 Map matching is the term often used to describe the process of assigning
 noisy Gpx points to underlying road network.


 My problem is a bit more involved.

 The GPX points represent the national cycle network in the UK. These
 points cover roads/tracks/paths and all sorts and as such I cannot really
 snap to map. Creating line strings from the points will possibly cause
 errors as well as I think there will be a lot of cases where the wrong
 points are joined.

 I think the safest method is to remove densely distributed points from the
 current set until they all have a KNN value of  X. This will not create a
 completely even distribution but will ensure that no points are created in
 the wrong place which may be the case with line interpolation.

 Can anyone help me with a query to do this?

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Evenly distributing a point set

2015-01-26 Thread Dave Barter


 These points were created from a GPX file along a road journey so they 
 crudely map to a line string  

Map matching is the term often used to describe the process of assigning 
noisy Gpx points to underlying road network.  


My problem is a bit more involved.

The GPX points represent the national cycle network in the UK. These points 
cover roads/tracks/paths and all sorts and as such I cannot really snap to map. 
Creating line strings from the points will possibly cause errors as well as I 
think there will be a lot of cases where the wrong points are joined. 

I think the safest method is to remove densely distributed points from the 
current set until they all have a KNN value of  X. This will not create a 
completely even distribution but will ensure that no points are created in the 
wrong place which may be the case with line interpolation. 

Can anyone help me with a query to do this?___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Evenly distributing a point set

2015-01-25 Thread Nicolas Ribot
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 d...@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:d...@phased.co.uk
 Twitter:@Citizenfishy

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users