[postgis-users] Linear Referencing: Create Measure

Christoph Spoerri cspoerri at cavtel.net
Mon Jul 31 21:01:26 PDT 2006


Strk,

how are multiline string handled in the LRS functions? Can they be used in 
those functions? If yes, is  linesegement 'drawn'/created between the end 
points of two line strings?

Depending on those answere, the measure functionality should be designed 
accordingly. One options would be to give the user the choice if a 
multilinestring should be a 'linestring' with gaps or a collection of 
linestrings which have all the same start measure and the same end measure 
(in case % are used).

Based on my work with LRS, having the 'gap ' solution makes the most sense in 
case the linestrings have gaps. But then, everybody has a different data 
model in order to fit their needs. So accommodating different approaches 
would be nice.

Christoph


On Thursday 27 July 2006 22:27, strk at refractions.net wrote:
> [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



More information about the postgis-users mailing list