Hi Guido,

it's not a problem to interpolate elevation between two points. 

"Assuming two points A(valley) and B(pass)". That is the problem. For an 
algorithm there is no trivial way to select a representative point of the track 
for A and B. Keep in mind this has to work for all kind of input data, with all 
kinds of error scenarios. And it has to be easy to use and easy to understand 
for all users.  If you know how to solve this in a smart way, you are welcome 
share your code with a pull request.

Oliver



> Gesendet: Dienstag, 25. Juli 2017 um 22:08 Uhr
> Von: "Guido Scholz" <guido-sch...@gmx.net>
> An: qlandkartegt-users@lists.sourceforge.net
> Betreff: Re: [Qlandkartegt-users] Feature request: DEM profile interpolation
>
> Am Mon, 24. Jul 2017 um 21:28:42 +0200 schrieb Oliver Eichler:
> 
> Hi Oliver,
> 
> > There is no chance for an algorithm to know what points to use for the 
> > linear 
> > interpolation interval. Without knowing the properties of the terrain, 
> > knowing 
> > that there is a valley floor, that point A and B are good ones and that the 
> > terrain can be represented by a line, it's impossible to define the 
> > intervals 
> > used for interpolation.
> 
> I cannot believe that. Assuming two points A(valley) and B(pass) on a
> freshly routed track which are specified by their data A(long, lat, height)
> and B(long, lat, height). The long and lat data are available from the
> track itself as well as the points of the course in between. The height
> is available from DEM.
> 
> So now we can calculate the total height difference = height(B) - height(A)
> 
> To calculate the inclination we need the length of the track between A
> and B. This is just the sum of all distances between the track points.
> 
> Now we can calculate the inclination = height/length for the selected
> track section.
> 
> For each track point between A and B we now can assign the interpolated
> height(point) = inclination * distance(A, point).
> 
> Remark: distance(A, point) is of course the cumulated distance over each
> track point between A and the target point.
> 
> Guido
> 
> 
> -- 
> http://wie-im-flug.net/
> http://www.lug-burghausen.org/
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot_______________________________________________
> Qlandkartegt-users mailing list
> Qlandkartegt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Qlandkartegt-users mailing list
Qlandkartegt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to