Re: [postgis-users] LinearReferencing: measure vertex of linestring?

2012-04-03 Thread Andrés Maneiro

http://trac.osgeo.org/postgis/ticket/1747
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] LinearReferencing: measure vertex of linestring?

2012-03-28 Thread Sandro Santilli
On Wed, Mar 28, 2012 at 06:22:28PM +0200, Andrés Maneiro wrote:

  LINESTRINGM(1 0 1,2 0 2,4 0 4)
 
 What I'm wondering is if somehow I could calibrate the vertex of the
 linestring, having as a result, for example, this route:
 
 LINESTRINGM(1 0 1,2 0 *1.7*,4 0 4)

See ST_SetPoint

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] LinearReferencing: measure vertex of linestring?

2012-03-28 Thread Andrés Maneiro

On 28/03/12 18:26, Sandro Santilli wrote:

On Wed, Mar 28, 2012 at 06:22:28PM +0200, Andrés Maneiro wrote:


  LINESTRINGM(1 0 1,2 0 2,4 0 4)


Oh, I get it. And there is a native way in postgis to calibrate the line from a 
given set of measured points instead of using the ends?


--

If I understand it correctly I could:

 1) mylinestringm = ST_AddMeasure(mylinestring, measure_start, measure_end);
 2) Add the given set of points to mylinestringm with ST_AddPoint
 3) Using ST_SetPoint to move the original vertexes.

Is that correct? I'm very interested to know if there is a more direct and 
proper way to create a route from a set of points.


best,
Andrés
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] LinearReferencing: measure vertex of linestring?

2012-03-28 Thread Stephen Woodbridge

On 3/28/2012 1:26 PM, Andrés Maneiro wrote:

On 28/03/12 18:26, Sandro Santilli wrote:

On Wed, Mar 28, 2012 at 06:22:28PM +0200, Andrés Maneiro wrote:


LINESTRINGM(1 0 1,2 0 2,4 0 4)


Oh, I get it. And there is a native way in postgis to calibrate the line
from a given set of measured points instead of using the ends?

--

If I understand it correctly I could:

1) mylinestringm = ST_AddMeasure(mylinestring, measure_start, measure_end);
2) Add the given set of points to mylinestringm with ST_AddPoint
3) Using ST_SetPoint to move the original vertexes.

Is that correct? I'm very interested to know if there is a more direct
and proper way to create a route from a set of points.


ST_MakeLine [1] can be used to aggregate a sequence of points into a line.

[1] http://www.postgis.org/documentation/manual-1.5/ST_MakeLine.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] LinearReferencing: measure vertex of linestring?

2012-03-28 Thread George Silva
I guess the best way to do this is to combine the actual line and a
virtual line, probably a view, with measured points.

This involves a bit of thinking but it might be possible.

George

On Wed, Mar 28, 2012 at 3:03 PM, Stephen Woodbridge wood...@swoodbridge.com
 wrote:

 On 3/28/2012 1:26 PM, Andrés Maneiro wrote:

 On 28/03/12 18:26, Sandro Santilli wrote:

 On Wed, Mar 28, 2012 at 06:22:28PM +0200, Andrés Maneiro wrote:

  LINESTRINGM(1 0 1,2 0 2,4 0 4)


 Oh, I get it. And there is a native way in postgis to calibrate the line
 from a given set of measured points instead of using the ends?

 --

 If I understand it correctly I could:

 1) mylinestringm = ST_AddMeasure(mylinestring, measure_start,
 measure_end);
 2) Add the given set of points to mylinestringm with ST_AddPoint
 3) Using ST_SetPoint to move the original vertexes.

 Is that correct? I'm very interested to know if there is a more direct
 and proper way to create a route from a set of points.


 ST_MakeLine [1] can be used to aggregate a sequence of points into a line.

 [1] 
 http://www.postgis.org/**documentation/manual-1.5/ST_**MakeLine.htmlhttp://www.postgis.org/documentation/manual-1.5/ST_MakeLine.html

 __**_
 postgis-users mailing list
 postgis-users@postgis.**refractions.netpostgis-users@postgis.refractions.net
 http://postgis.refractions.**net/mailman/listinfo/postgis-**usershttp://postgis.refractions.net/mailman/listinfo/postgis-users




-- 
George R. C. Silva

Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] LinearReferencing: measure vertex of linestring?

2012-03-28 Thread Paul Ramsey
Create a ticket describing the calibration, that's useful info and
would be a good utility for LRS users for a future version.

P.

2012/3/28 Andrés Maneiro amane...@icarto.es:
 Hello people,

 I'm reviewing what postgis is able to do in terms of Linear Referencing. As
 fas as I could see, to calibrate a linestring there is only the method
 ST_AddMeasure:
 http://www.postgis.org/docs/ST_AddMeasure.html

 So, as stated in the example, the operation will create a route like:

    SELECT ST_AsEWKT(ST_AddMeasure(
    ST_GeomFromEWKT('LINESTRING(1 0, 2 0, 4 0)'),1,4)) As ewelev;
               ewelev
    
     LINESTRINGM(1 0 1,2 0 2,4 0 4)

 What I'm wondering is if somehow I could calibrate the vertex of the
 linestring, having as a result, for example, this route:

    LINESTRINGM(1 0 1,2 0 *1.7*,4 0 4)

 The project I'm working on is related to road management, and it's very
 common that the ratio between a route's length and its measures is not
 constant. So, my doubt goes: is it somehow possible to create a route in
 postgis where the measure and the distance are not directly related?

 (For those who know how ArcGIS dynamic segmentation works, what I'd like
 to achive is something similar to calibrate a route using points [1]).

 Let me know if I explain myself properly.

 best,
 Andrés

 [1]
 http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/About_calibrating_route_measures_using_points/0039000t00/
 ___
 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