[postgis-devel] Re: New version for LRS functions

strk at refractions.net strk at refractions.net
Fri Nov 4 08:33:33 PST 2005


A few comments on your functions, with integration in mind.

> lrsgetmeasure(geom1, geom2):
> 	returns the measure of the closet 'point' on geom1 from geom2
>         geom1 must have a M value

What do you mean by 'closest point' ? Would it be close in terms
of measure or planar distance ?

For planar distance I think this could be generalized with
something like:
	M(closest_linevertex(line, point))
or:
	M(closest_point(geom, point))

> lrs_getgeom(geom, double):
> 	returns a point along the LRS
>       geom must be a LINESTRING or MULTILINESTRING with M values
>       double is the measure along the geom for which you would like
> 	a point returned, should be within the measure range of geom
> 
> lrs_getgeom(geom, double1, double2):
> 	return a new linestring along the LRS
>         geom must be a LINESTRING or MULTILINESTRING with M values
>         double1 is the start measure/point of the new linestring,
> 	should be within the measure range of geom
>         double2 is the end measure/point of the new linestring,
> 	should be within the measure range of geom
>         Note: if double1 or double2 are out of range, the LRS end
> 	points are assumed and used instead
 
Does these only check vertexes or compute interpolation between
them ?

Note that for the function returning linestring we already have
in HEAD branch a line_substring(geometry, float8, float8) function.
The floats are intended as fractions of length, but you might want
to use a name similar to that for measure, like in:

	lrs_line_substring(geometry, float8, float8);
	lrs_line_point_at(geomtetry, float8);

The line_point_at(geometry, float8) is currently missing, but
we might add it.

--strk;


On Mon, Oct 31, 2005 at 10:46:23AM -0500, Christoph Spoerri wrote:
> Good morning,
> 
> i'm send you the new version of the LRS functions. 
> 
> Please note that I change the function names since the last version. It was 
> pointed out to me that the naming convention was a bit of and and could be 
> simplified (e.g. only a single function to get a new shape, lrs_getgeom). 
> Also, I used lrs_getgeom instaed of lrs_getshape since all other functions 
> refere to geometries and not shapes.
> 
> I still didn't fix all the compile warnings, but that should hopefully come 
> soon.
> 
> Please let me know if you find any bugs or other errors.
> 
> thanks,
> Christoph





More information about the postgis-devel mailing list