[postgis-users] Looking for documentation on measures

Christoph Spoerri cspoerri at cavtel.net
Mon Oct 3 20:44:29 PDT 2005


Hi there,

attached is code for some LRS functions that I implemented in my spare time. 
The cover the basics and include:

- create M values based on line length or the percentage along line
- return a measure for a given point (point doesn't need to be on LRS/line)
- return point given a measure
- return a line given two measure (start and end)

Other functions I was think of implementing:
- create M values based on user input (start and end M)
- create M values based on user input (array of M values)
- return line given measure values and an offset value; this one would 
calculate a new line and offset from the original
- recalculate M values based on ???
- others ???

the attached code has a couple more explanation in the header.

In case somebody is new the LRS or is wondering how I implemented the LRS with 
the M value of the postgis LWGEOM, please take a look at 
http://www.gisgeek.com/lrs/. Bill Wheaton was so nice and started a tutorial 
for LRS with some examples.

Note: I'm not an expert C coder, therefore the code still throws some compile 
errors. Yet, so far they didn't lead to any crashes :) Also, if a C expert 
sees some big No-No, please let me know.

Enjoy and let me know what you think or find. If you like what you see and 
would like any additional enhancements, feel free to drop me a note. I would 
love to add some more functionality.

cheers,
Christoph


On Monday 03 October 2005 15:19, Chris Matheson wrote:
> Hello Everyone,
>
> I am new to PostGIS, and I am looking for documentation related to
> "measures" and "linear referencing" (particularly interested in
> functions).  Hopefuly documentation exists, if so would someone please
> be kind enough to send me a reference.
>
> Chris M.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lwgeom_functions_lrs.c
Type: text/x-csrc
Size: 37758 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20051003/4faccfd1/attachment.c>


More information about the postgis-users mailing list