1
0
Fork 0
Commit graph

692 commits

Author SHA1 Message Date
curt
d309a52bee Intial revision. 2003-08-16 01:18:39 +00:00
curt
170783ea73 The terrafit stuff is getting a much deserved and belated promotion ... 2003-08-16 01:18:01 +00:00
curt
533db6e82d Initial revision. 2003-06-12 20:05:01 +00:00
curt
c148689adc Fixes to match changes in SimGear-0.3.3 2003-06-12 20:02:08 +00:00
curt
05c765b397 - Make the bucket/dem coverage check slightly fuzzy in case of slight
numerical rounding errors.
- Convert several usages of int = 0 or 1 to bool = false or true
2003-06-12 20:01:34 +00:00
curt
f7a4a8bfa0 Rainer Emrich:
Updates to DEM parser to make it more compliant with the spec.
2003-04-02 17:39:46 +00:00
david
3169a0255f Roll out the last changes, since they were making far too narrow
polygons out of roads.
2003-04-02 16:39:52 +00:00
curt
07d17d2536 Initial revision of a scipt that leverages the "terra" utility to
impliment essentially the same thing as "ArrayFit".   Requires the terra
program, but the terrafit.py script should take care of the pre/post
processing.
2003-03-31 20:10:27 +00:00
david
51d5fe00ea Install arrayfit along with the other utilities. 2003-03-20 14:50:54 +00:00
david
67ea97f704 Oops -- the array wasn't being read when there was no *.fit file (my fault). 2003-03-20 14:50:33 +00:00
curt
0cbbe80488 Changes to track libArray api tweaks. 2003-03-19 22:52:04 +00:00
curt
bab9af52b3 Just ignore "void" data points when doing the surface fit. I think this
is probably better than guessing at a value and fitting to the guessed value.

For corner points (where we *need* a value to do the fit) use the elevation
of the "closest" euclidean-wise valid point.
2003-03-19 22:51:26 +00:00
curt
869f0412a3 Updates to match libArray api changes. 2003-03-19 22:49:13 +00:00
curt
f526985854 Update counter index names to make the code more explicite. 2003-03-19 22:48:35 +00:00
curt
123fb92d40 Updates to libArray and a few interface tweaks to allow more sensible
handling of void (non-data) in the original DEM/SRTM.
2003-03-19 22:47:45 +00:00
david
dbdc51696e Make sure fitted_in is always allocated, to avoid a segfault. 2003-03-19 01:59:02 +00:00
david
a0b4097f5d Fix iterator assignment. 2003-03-19 00:30:42 +00:00
david
077f32fc60 Ignore generated files. 2003-03-19 00:28:49 +00:00
curt
119d46058b I wrote arrayfit and it worked.
Then I needed to modify libArray code so that other portions of the code
could use the pre-computed fit data.
Today I discovered that arrayfit was messed up.  That is now fixed.
2003-03-17 17:25:11 +00:00
curt
3b6e96a06a Fix a problem for gcc-3.2 2003-03-17 16:31:40 +00:00
curt
06985ebabd Changes corresponding to API changes in libArray.a 2003-03-17 04:50:40 +00:00
curt
90152df81f Changes to support also loading a pre-computed best-fit surface to the
array data.
2003-03-17 04:49:47 +00:00
curt
b019a7d44a Initial revision of utility to fit a much reduced size terrain surface
to a higher res data set, attempting to preserve the most important
features in the original data set.  The user can specify a min and max
number of output nodes as well as a maximum error tolerance that should
not be exceeded (between the original and simplified surfaces.)
2003-03-17 04:48:50 +00:00
curt
6ca738d22d Add src/Prep/ArrayFit/ directory. 2003-03-17 04:46:36 +00:00
curt
cde416c9f3 Initial revision of a tool that uses Michael Garland's algorithm to fit
a simpler TIN surface to a regular array of height values.  The algorithm
is described here:

    http://graphics.cs.uiuc.edu/~garland/software/terra.html
2003-03-16 21:52:10 +00:00
curt
95df768c84 Initial revision. 2003-03-16 13:46:57 +00:00
curt
68a4ac7956 Added a small test program that builds a simplified surface approximation
based on the terrain simplification algorithm in Michael Garlands paper
located here:

   http://graphics.cs.uiuc.edu/~garland/software/terra.html

Essentially start with two triangles forming the bounding surface.
Then add the point that has the greatest error.  Retriangulate.
Recalcuate errors for each remaining point, add the one with the
greatest error.  Lather, rinse, repeat.
2003-03-16 13:33:04 +00:00
curt
9f73338a1f Minor tweaks for scenery building process. 2003-03-14 22:22:48 +00:00
curt
b286e6f600 Test for newest version of nurbs++ libs (with .h extention) 2003-03-14 16:30:24 +00:00
curt
aa37052182 Check point ... 2003-03-14 01:51:18 +00:00
curt
d05fd4a8ff Big round of cascading FG -> TG name cleanups (once you get going it's hard
to stop.) :-)

Also save elevations of 3d polygons into a separate lookup list when they
are loaded by the clipper.
2003-03-13 21:20:46 +00:00
curt
4abf503817 Rewrite for loops with out iterators so they are more readable. 2003-03-13 20:47:58 +00:00
curt
b66f8ce695 Minor tweaks. 2003-03-13 20:47:31 +00:00
curt
ccde971251 Added support for loading 3d polygons. 2003-03-13 20:37:51 +00:00
curt
727e512fad Not that it should matter but change the thresholds a bit to be consistant
with what I do in other portions of the code.
2003-03-13 20:26:56 +00:00
curt
d70cd72fbd Don't automatically try to preserve polygon elevations, but instead provide
a method() to inherit elevations from another polygon.  This gives the calling
layer much more control over preserving or not preserving elevations.
2003-03-13 20:25:02 +00:00
curt
ba3114a8b5 Fixed a compile warning. 2003-03-13 20:23:15 +00:00
curt
c5ab6678f2 Added support for including height information in the intermediate polygon
format.  The big trick was that the polygon clipper is completely 2d.  So
I needed to add code to preserve the elevations in the clipped output and
fill in plausible elevations for any new points created as a result of the
clipping.
2003-03-12 21:25:35 +00:00
curt
9c85f16b5f Working towards the ability to specify elevations for a polygon in it's
intermediate mode.  The goal then is that these elevations would be
preserved throughout the tile construction process and the surrounding
geometry would fill in without gaps.  This has potential applications for
airports and runways of course as well as roads, rivers, streams, railroads,
or any other object where we might want to control the final elevation in
advance.
2003-03-12 18:23:31 +00:00
curt
af89a8a205 Add a utility to reassemble all the array files for a 1x1 degree area and
write them out in a dumb ascii array format.
2003-03-11 20:22:16 +00:00
curt
7c3f6dd15d Dohhh, I knew I would screw it up the first time. But no, I doubly screwed
it up.  Read the rows from bottom to top rather than top to bottom and
flipped row/col ...
2003-03-11 20:21:30 +00:00
curt
c9757cb753 Add the ability to extract out an individual elev by array position rather
than only by lat/lon.
2003-03-11 20:20:04 +00:00
curt
b3935db989 Add back code to clip polygons against land mass. This temporarily breaks
the ability for roads/railways to bridge ocean, but I hope to get that fixed
soon.
2003-03-11 20:19:09 +00:00
curt
ea58728f5c With the latest version of the libnurbs++, the include file extension has
changed from .hh -> .h
Generate a complete enclosing area around the airport including taxiways,
  not just runways.
2003-03-11 20:17:57 +00:00
curt
1bfc2da8ee Fix a compile problem for some platforms/compilers. 2003-03-11 16:04:49 +00:00
curt
6c26352508 Avoid telling the nurbs library to do something it can't do (resulting
in a segfault.)
2003-03-10 15:01:08 +00:00
curt
4bb5decbcb A simple perl::GD script to convert .hgt to a .png for visualization purposes.
The explicite draw each pixel method is inefficient, but used anyway to make
it utterly clear what the data order is in the original .hgt file.
2003-03-10 14:56:12 +00:00
curt
266772ee39 Add a routine to dump out the .hgt data in a simplistic ascii format. 2003-03-10 14:54:42 +00:00
curt
bf96033516 Tweaking parameters. 2003-03-10 03:00:59 +00:00
curt
c986802faa The resulting airport surfaces still had too much undulation from the noise
in the DEM data.  Coarsen the nurbs grid and average some surrounding data
to hide the noise.
2003-03-09 19:19:19 +00:00