[postgis-users] Linear Referencing: Create Measure

strk at refractions.net strk at refractions.net
Thu Jul 27 19:27:21 PDT 2006


[sorry for late answer]

I understood the idea, and I like the parametrization of 'from' and 'to'.

This signature seems good:

	 line_create_measure(geometry,[float8],[float8])

The other might just be an SQL wrapper.

	 line_create_measure(geometry)
		RETURN line_create_measure($1, 0, length($1))

What I'm unsure about are multilinestrings.
I don't feel comfortable about considering multilinestrings 
as a single linestring with gaps. 

--strk;

On Mon, Jul 03, 2006 at 10:24:52AM +0100, Düster Horst wrote:
> Hallo strk
> 
> Thak you very much for your response. The required function should measure
> lines or multilines. For instance I need to measure a river network. The
> measures of the rivers are implicit predefined during the creation process
> of the river networkdata and don't represent the real world in all cases.
> The predefinition bases on the two attributes "from" and "to" measure. The
> "from" value represents the lowest measure value and the "to" value highest
> measure value of any linestring in case of our rivernetwork. The units of
> our predefined measures is km and the datatype is float8.  
> The work to do is to interpolate the measure of every vertex point of any
> linestring/multilinestring with respect to "from" and "to". With this
> approach it is also possible to create measures in percent of linelength.
> You have to set from=0 and to=100.
> 
> A second case could be to calculate the measures based on the length of the
> relevant linestring from zero to length. Therefore you don't need to
> predefine from and to.
> 
> In both cases you have to differ between linestrings and multilinestrings.
> In case of continuous linestrings you can interpolate over the whole line.
> In case of multilinestrings you have to consider possible gaps in the
> multilinestring. I'll attach the code of a former version of Christoph
> Spoerri's lrs_create_measure. Unfortunately the lrs_create_measures
> functions don't work correct yet.  
> 
> I think the function call could be:
> line_create_measure(geometry,[float8],[float8])
> 
> line_create_measure(wkb_geometry,from,to) or
> line_create_measure(wkb_geometry,0,1) would solve the first case
> line_create_measure(wkb_geometry) would solve the second case.
> 
> I hope this will be a base for a further discussion.
> 
> With best regards
>  
> Dr. Horst Düster 
> GIS-Koordinator, Stv. Amtschef
> 
> Kanton Solothurn 
> Amt für Geoinformation
> Abteilung SO!GIS® Koordination
> Rötistrasse 4
> CH-4501 Solothurn 
> 
> Tel.: ++41 (0)32 627 25 32 
> Fax: ++41 (0)32 627 22 14
> 
> horst.duester at bd.so.ch 
> www.sogis.so.ch
> 
> 
> 
> > -----Ursprüngliche Nachricht-----
> > Von: strk at refractions.net [mailto:strk at refractions.net]
> > Gesendet am: Donnerstag, 29. Juni 2006 23:57
> > An: 'postgis-users at postgis.refractions.net'
> > Betreff: Re: [postgis-users] Linear Referencing: Create Measure
> > 
> > Maybe we can add such a function, but semantics must be exactly
> > defined. How are 'from' and 'to' defined ? How are they applied
> > to different types of geometries ?
> > 
> > --strk;
> > 
> > On Thu, Jun 29, 2006 at 11:43:44AM +0100, Düster Horst wrote:
> > > I'm faced with the problem to create MGeometries for using 
> > with the "Linear
> > > Referencing" functions of PostGIS. I like to create the 
> > measures defined by
> > > two table attributes meas_from and meas_to. In further 
> > versions of Christoph
> > > Spoerri's LRS functions there exists a function
> > > lrs_create_measure(geometry,from,to). As the result the 
> > M-Values were
> > > interpolated based on a start and a stop value of each line. The new
> > > functions don't offer such a functionality. I would be 
> > greatful for any hint
> > > how to create measures along a line referenced by a from 
> > and a to value of
> > > this line.
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > 
> 


> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-users mailing list