Boost logo

Boost Users :

Subject: Re: [Boost-users] [Geometry] spatial linestring access along line
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-05-25 07:14:32


Hi Stephan,

On 23-5-2012 17:08, Stephan Menzel wrote:
> Hi all,
>
> before I begin, let me tell that geometry is not exactly my strong
> suite so please forgive my probably dumb question.
>
> I have started to work with boost geometry which, I find very neat,
> and assembled a line string.
>
> Now I basically need a method that gives me a point to a length value.
> Like when my linestring is 100 units long and I say give me the point
> at 3 I want the exact position of the point (coordinates) as if I were
> following the line for exactly 3 units.
>
> I have an approach that would allow me to implement this myself by
> following the segments (possibly after indexing them) but I have a
> feeling that one of those many functions provided by the library
> itself might do just that and I simply don't know it. If anyone knows
> if such is the case, would be nice to give me a heads up.
>

There is no such function built in. You are probably looking for a
function as LocateAlong,
http://postgis.refractions.net/documentation/manual-2.0/ST_LocateAlong.html

This function is (ever) planned, it is part of the OGC SF specification.
But it is not there yet.

Regards, Barend


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net