[Top] [All Lists]

[TowerTalk] terrain profile algorithm

To: towertalk <>
Subject: [TowerTalk] terrain profile algorithm
From: Jim Lux <>
Date: Sat, 16 Jun 2012 06:21:22 -0700
List-post: <">>
I'm looking for an algorithm for my "generate all profiles for HFTA" app..
I've taken a couple trivial shots at this, but I'm pretty sure someone 
out there knows of a "better way".

here's what I want..

I have an array of heights vs distance at fairly close post spacings (on 
the order of 10 meters) maybe 1000 points or so, representing the 
profile along a particular radial.  What I want to do is "compress" that 
into about 100 or so segments that are connected (e.g. HFTA input). 
That is, I want to convert that to a series of x,y coordinates connected 
by straight lines that "adequately" represents the terrain.

I started with a simple "if the adjacent point is within X meters in 
altitude, then collapse the two into one", but that produces profiles 
that somehow don't look right (and I can't say much about their HFTA 
fidelity).  If the underlying terrain were a ziggurat or mesas with 
valleys, it would probably work, but it turns a gentle slope into a 

This is a classic problem in cartographic generalization, and, as it 
happens, this kind of profile is well represented by a fractal, but not 
that this helps me much.  I was hoping that someone out there knew of a 
clever way to do it.

Preferably in Python, since that's what I've written everything else in, 
but I can convert anything.. so if you have one written in COBOL, that's 

TowerTalk mailing list

<Prev in Thread] Current Thread [Next in Thread>