1
0
Fork 0
Commit graph

500 commits

Author SHA1 Message Date
curt
3fa11a9348 Fix to build with latest simgear cvs. 2004-01-08 21:35:23 +00:00
curt
9eec038f19 Bevan Anderson:
Add support for generating Calvert-I/II approach lighting schemes.

Curt Olson: a couple tweaks to compile with latest simgear cvs.
2004-01-08 21:34:44 +00:00
curt
b635ee443d (running tgvpf --chunk=e020n40 --work-dir=Lakes --material=Lake /home/romosan/scenery/vmaplv0 eurnasia hydro inwatera).
It looks like the program gets into an infinite loop while findind
edges for a contour (inserting the same edge over and over until the
program runs out of memory). i am not quite sure i understand the code
but the following patch solved the problem for me:
2003-12-18 17:38:05 +00:00
curt
a27a7d9367 Updated to track a minor file naming change. 2003-12-15 16:44:27 +00:00
curt
a4ae777cf2 Add an example usage: 2003-12-15 16:34:09 +00:00
curt
ee4451de4d Initial revision. 2003-12-15 16:30:04 +00:00
david
30de6cb81a Get a little smarter about guessing what's an apron:
Before:

- if it's a concrete taxiway over 150 ft wide, assume it's an apron
  (confusingly called "tiedown")

After:

- if it's an asphalt or concrete taxiway over 150 ft wide, *or* if
  it has no blue taxiway lights, assume it's an apron
2003-11-30 22:03:06 +00:00
curt
e8bcdaa4d0 Updates to track recent changes in simgear. 2003-11-12 22:16:22 +00:00
curt
f2382f77a1 Various changes and updates. 2003-11-12 22:16:03 +00:00
curt
d64f5bdf87 Tweak to taxiway lighting names. 2003-09-23 23:08:26 +00:00
david
c4a3dbd26d Ignore generated files. 2003-09-20 11:06:14 +00:00
curt
467e70faa0 Updates. 2003-09-16 19:32:11 +00:00
curt
56dfd0985d Fix a small bug in handling of x-plane data. 2003-09-05 21:03:27 +00:00
curt
53d6419b43 Give sea plane bases and heliports their proper identification. 2003-09-05 20:14:04 +00:00
curt
ff685ced13 - Add support for displaced thresholds on runways with nonprecision and visual
markings.
- Fix a couple very small alignment/sizing problems.
- Use a different texture (similar to rest) before aim points on nonprecision
  runways.  This will potentially make things easier if we want to add
  skid marks to the textures.
- Fix a couple bugs (el stupido) in precision marking generation.
2003-09-05 20:13:29 +00:00
curt
2538ac773f Added support for generating displaced thresholds (finally) :-) 2003-09-05 01:37:04 +00:00
curt
9a7173d85e For smoothing things like rivers or roads we need to allow some slope.
Originally I through together a really cheap/ugly hack for estimating
distance between two points, but that really started to stink when throwing
a lot of new situations at it.  So now I calculate spherical distances between
two points in meters which is plenty accurate for these purposes.  This gives
us much better control over smoothing.  For instance we could establish a
maximum 10% grade for all roads if we wanted to.
2003-09-04 18:53:53 +00:00
curt
4f2528e8f7 Initial revision. 2003-09-04 02:53:40 +00:00
curt
8f5bc3579a Debugging output tweak. 2003-09-03 22:46:04 +00:00
curt
2c45b3ce5d Do some flattening of intermittent streams as well as roads, railroads, and
freeways.
2003-09-03 22:45:50 +00:00
curt
400db7c3a9 Oops a previous change (thought to be harmless) turned out to be harmful.
This could cause tile edges to no longer match up becuase this routine would
adjust node elevations which it shouldn't have.  Hopefully this change fixes
the problem.
2003-09-03 22:12:45 +00:00
curt
b3e0d4b5f3 Slightly tweak size of grass area surrounding airports. 2003-09-03 22:10:51 +00:00
curt
d33d445cce Add the Utils directory to the build tree. 2003-09-03 22:10:06 +00:00
curt
028c9af689 Fix a bug that could lead to improperly positioned airports in some cases. 2003-09-03 17:09:05 +00:00
curt
5a84f39f83 Allow additional or non-standard terrain source directories to be specified
on the command line with the --terrain= option.  You can specify as many as you like.  Directories specified on the command line will take precidence over
the default directories and the directories will be searched in the order
specified.
2003-09-03 16:38:50 +00:00
curt
473c4d9b94 - Added support for generating green taxiway center lighting (when called for
in Robin's data.)
- Code adjusted to work with slightly modified input data format (part of
  our move away from metakit.)
- Eliminate some debugging output.
2003-08-29 20:34:46 +00:00
curt
bd02f2548c Eliminate some debugging output.
Fix some warnings.
2003-08-29 20:32:41 +00:00
ehofman
52ef60a056 Reorginize the configure script to math the one from FLightGear more closely. Add checks for the presence of GLIB and GTS. 2003-08-29 18:32:28 +00:00
curt
812ab94975 Initial revision of runway.dat generator (tweaks to basic.dat generator) 2003-08-29 13:27:20 +00:00
curt
b8a4a97785 Initial revision of script to generate simple.apt from x-plane's latest
airport database.
2003-08-28 21:14:07 +00:00
curt
5717e1df5f Patch from Norman to fix a slight oversite in file date querying. 2003-08-28 14:54:32 +00:00
ehofman
3ffd52820c Check whether the creatin time of the output file is after the creation time of the input file. If so, skip to next file 2003-08-28 14:44:31 +00:00
ehofman
a9ec1ccdb6 Fix some mistakes 2003-08-28 14:09:05 +00:00
ehofman
703fc67636 Make reads() more robust and easier to follow 2003-08-28 12:36:31 +00:00
ehofman
0599f873dc Don't forget to terminate the string 2003-08-28 12:03:15 +00:00
ehofman
da7d172d37 Convert \r to \n while reading the file 2003-08-28 09:40:50 +00:00
ehofman
6aaec038f8 Solve a dependancy problem 2003-08-28 09:17:19 +00:00
ehofman
fc9f7069ca Allow for header files that are generated on machines with non UNIX like line endings 2003-08-28 09:01:31 +00:00
curt
0a4cc36775 Use <simgear/compiler.h> functionality to make STL includes more portable. 2003-08-27 14:02:29 +00:00
david
20dc0cf8a0 Ignore generated files. 2003-08-25 19:35:50 +00:00
curt
e93197d1b5 David Luff:
Attached are patches to Terragear to enable it to compile out of the box on
Cygwin (once all the relavent libraries have been compiled).  Specifically
they fix a conflict with another version of min/max somewhere on the
system.
2003-08-25 19:12:20 +00:00
david
ced60ae2e2 Remove IOSTREAMH macro -- it turned out to be something specific to
SGI headers, rather than a program-specific compilation macro.  Always
assume that the iostream library is present.
2003-08-25 18:18:58 +00:00
ehofman
4516c4a9d6 Make it somewhat IRIX/MipsPro compliant again. We still need to resolve the IOSTREAMH declaration issue 2003-08-25 17:52:42 +00:00
david
631c9ab968 Fixed to compile and install using an ANSI C++ compiler like G++ 3.3.
Some conditionals may be required to build with other compilers.
2003-08-25 17:11:43 +00:00
ehofman
694bb7a4cc Satisfy a dependency 2003-08-24 19:02:29 +00:00
ehofman
bcb7d5f77f Fix a mistake 2003-08-24 18:59:33 +00:00
ehofman
8c6c0c480c Satisfy a dependency 2003-08-24 18:55:21 +00:00
ehofman
4e1da3cedf Compiler fix 2003-08-24 18:48:18 +00:00
ehofman
e0bc55edd2 Add the simgear debug library because of dependency issues 2003-08-24 18:37:13 +00:00
ehofman
ac2646a365 Also look for getline() in the std namespace 2003-08-24 18:29:08 +00:00
ehofman
23f08fd725 MSVC/MipsPro fix 2003-08-24 17:29:10 +00:00
ehofman
d8fcc7232a Don't bail out when not finding libnurbs++ but just don't create genairport and end with a warning 2003-08-24 17:27:25 +00:00
curt
47771c9bb4 Several changes related to [trying to] make more effective use of the global
land cover/land use raster data, but there seem to be some very significant
issues no matter how you cut it ....
2003-08-22 19:46:28 +00:00
curt
460d6349b0 Add a check for additional degeneracy. 2003-08-22 19:15:48 +00:00
curt
7a4f52e98b Fixes corresponding to slightly different terrafit output. 2003-08-22 19:13:02 +00:00
curt
38bb74f339 Add a routine to catch/remove some addition degeneracy our polygon clipper
can produce.
2003-08-22 17:34:56 +00:00
curt
0dc39b1911 Try to be just a bit smarter about how to assign an area type to a triangle. 2003-08-20 17:18:50 +00:00
curt
83ebd1eba7 Use the correct number of parameters when calling the gen_runway_area()
functions.
2003-08-20 16:52:43 +00:00
curt
5937926a0b Ok, big oops here. I was passing 3 parameters to a 4 parameter function,
but because of the use of default arguments, the compiler wasn't flagging
this as an error.  This caused a) much stupidity and b) additional stupidity.

I also found a case where I passed in a length and width extention parameters
but, used the length parameter twice ignoring the width parameter.  This
yields much more sensible and expected results when building the grass buffer
zone around a runway.
2003-08-20 16:52:04 +00:00
curt
9e9a13bbdf Do some additional processing on the airport surface grid to try to clip
out spikes and other wierdness and generally keep a reasonable bounds
on how much the surface can vary.
2003-08-20 16:49:12 +00:00
david
fafab4a3a0 Ignore another app. 2003-08-20 12:25:14 +00:00
curt
5943155bad Try an idea that is hopefully slightly more intelligent about what land
cover area to assign a "default cover" triangle to.
2003-08-19 02:51:08 +00:00
curt
4ff5acb28c Still support a minimum angle threshold for quality refinement in the
trangulator wrapper, but this isn't used by the calling layer any more.
2003-08-19 02:38:08 +00:00
curt
fe6ff15206 Remove --min-angle option. 2003-08-19 02:36:10 +00:00
curt
730c454320 - Test a different approach for assigning land cover attributes to "default'
cover" areas.  Rather than artificially cut in polygon areas, just lookup
  a land cover type for unassigned triangles.  I think this has potential, but
  it needs more work to eliminate some odd artifacts.

- Revove --min-angle= option.

- Don't re-fit() triangle array to try to achieve a particular range of
  node quantities ... this is all pre-computed with a much smarter, much
  more efficient algorithm.
2003-08-19 02:35:35 +00:00
curt
f5f961b8c0 Remove support for a "minimum triangle angle" quality constraint when
triangulating a tile.  A better strategy is to have better input that doesn't
need to hide behind this trick.
2003-08-19 02:32:11 +00:00
curt
eb3a3a4fa2 Update examples. 2003-08-19 02:30:05 +00:00
curt
efbe6af104 calc_tex_coords() -> sgCalcTexCoords() 2003-08-19 02:29:44 +00:00
curt
0b4b91c90f Unraise the verbosity level. 2003-08-19 02:27:08 +00:00
curt
b2d808f214 Tweak an output message. 2003-08-19 02:26:43 +00:00
curt
39222a737e Handle .zip'd SRTM data files directly. 2003-08-19 02:25:48 +00:00
curt
aec29df1c8 Working towards completely depricating the previous insanely stupid array fit
algorithm.
2003-08-19 02:24:38 +00:00
curt
af6dc9bb0d Various parameter tweaks. 2003-08-19 02:23:25 +00:00
curt
d0f17a2cd7 Fix for properly handling SRTM voids ... terrafit.py rescales the data range
so that all the values are positive this make things a little trickier inside
terra.
2003-08-16 16:28:55 +00:00
curt
9ab16521f4 Minor tweaks for better debugging/monitoring 2003-08-16 15:39:59 +00:00
curt
ad75df026d Ignore SRTM "void" values. 2003-08-16 14:53:00 +00:00
curt
a20d85ac0d Picky, picky :-) 2003-08-16 02:09:06 +00:00
curt
eb04a8771d Initial revision. 2003-08-16 01:59:37 +00:00
curt
bf32c9e447 Fix a compile error. 2003-08-16 01:58:15 +00:00
curt
df54cff836 The TerraGear version of Michael Garland's "Terra" program now supports
minnodes directly, so I have slightly tweaked the python wrapper script
in light of this.
2003-08-16 01:57:28 +00:00
curt
9e38f10dc6 Add src/Prep/Terra and src/Prep/TerraFit 2003-08-16 01:48:38 +00:00
curt
37d4e6f738 - Various tweaks to make the code build with gcc-2.95 under linux.
- added a -n <num> option to specify a minimum number of nodes to emit
  irregardless of the error threshold.
2003-08-16 01:38:22 +00:00
curt
1a3c24506b Original version of Michael Garlands terra program version 0.7 (public domain) 2003-08-16 01:35:54 +00:00
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
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
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
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
curt
846473a424 Make each representative grid point the average of a larger set of points. 2003-03-09 18:51:00 +00:00
curt
c170e77854 Switch to calculating node elevations based on the nurbs surface rather
than raw dem data.
2003-03-09 18:13:53 +00:00
curt
abd30e0352 Initial revsion of testnurbs.cxx which exercises some basic capabilities of
the nurbs++ library.
2003-03-09 18:12:25 +00:00
curt
15ae058d4a First stab at code to build a nurbs surface that approximates the surface
of an airport.
2003-03-09 18:11:29 +00:00
curt
83388f0c38 Switch to bool return types. 2003-03-09 17:27:07 +00:00
curt
0d53ec0be0 Fill in "void" data with surrounding data. 2003-03-09 17:22:22 +00:00
curt
e55881e063 More informative output. 2003-03-09 17:21:47 +00:00
curt
887297d8d0 A slightly more flexible way to find the best elevation data. 2003-03-08 03:25:05 +00:00
curt
e7d08d90d1 A couple minor changes to this helper script. 2003-03-08 01:44:28 +00:00
curt
e6c1dc4c0c Rewrite the line to polygon making routine to (hopefully) make the
line widths consistant and accurate always.
2003-03-08 01:43:47 +00:00
curt
1a741df940 Remove an unneeded define. 2003-03-08 01:42:46 +00:00
curt
1a46456fbd Use .arr as the intermediate height field rather than .dem since .dem
implies a different format.
2003-02-27 21:19:00 +00:00
curt
e483bf0a34 Switch to using .arr as the intermediate height elevation array file extension. 2003-02-27 21:13:17 +00:00
curt
15ba15538b Output file is written with a ".arr" (Array) extension since it's no longer
in .dem format.  The .arr format is a much simpler (and a bit less flexible)
specifically for use as an intermediate format when building scenery.  Any
number of various raw terrain formats could be translated into the common
.arr format which then greatly simplifies life for the build tiles util.
2003-02-27 21:06:57 +00:00
curt
d11e7c7b3f First crack at a Prep utility to process SRTM "hgt" data into TerraGear's
intermediate format.
2003-02-26 21:39:27 +00:00
curt
61764b286d Renamed FGTexParms -> TGTexParams. 2003-02-26 21:20:43 +00:00
curt
0e4f17ad51 Rename FGRunway -> TGRunway. 2003-02-26 21:16:43 +00:00
curt
62a3a1936c Rename FGSuperPoly -> TGSuperPoly 2003-02-26 21:09:39 +00:00
curt
bd1b254506 Rename: FGPolygon to TGPolygon 2003-02-26 20:59:34 +00:00
curt
7709953518 Rename: FGGenFans -> TGGenFans 2003-02-26 20:36:15 +00:00