For the time being of VMap0-data in FlightGear Scenery, there have been
two cases of simplification, where different types of landcover usage
have been stuffed into the same TerraGear work directories:
1.) VMap0 "Glacier" and VMap0 "Polar Ice" have been accumulated in the
'LandCover/Glacier' directory,
2.) VMap0 "Wet Sand" and VMap0 "Marsh" have been mapped together in
'VPF-LandCover/Marsh'.
These have been defined in the 'TGVPF/process.sh' for a long time and
we simply ported the identical mapping over to 'ShapeFile/process.sh',
in order to provide an exact image of what had been done previously
with the TGVPF reader, when we did all those funny ShapeFile thingies.
When I started storing all the landcover data in a PostGIS DB, one goal
I had in mind was to understand and clean up the structure of all those
different layers.
Now, after many hours of reading VMap specs and dealing with this data,
I have come to the point where we could merge VMap1 data into the VMap0
stuff where VMap1 is available and I'd like to have those duplicates
cleaned up before we're getting into an even bigger mess.
This means, and this is what the patch implements, that we're going to
handle "Polar Ice" landcover data separately from "Glacier" as well as
"Wet Sand" (which apparently means "Littoral" in our case) separately
from "Marsh" - in TerraGear. In order to let FlightGear behave the same
as previously, the two mentione mappings are now implemented by
respective additional "name" entries in the 'materials.xml' file. I
already committed these entries.
I'd like to progress with the task of adding improvements to our
landcover data set because I consider it as one of the vital goals of
further development to add more and more diversity to The Scenery. So
I'm eager to see these really small but significant issues resolved.
my patch it is possible to store line width as an attribute in the shape file
itself. This comes especially handy with rivers which can gradually broaden
that way.
Expose a polygon function that will split up long edge lines to keep the
max edge distance below some threshold. This could be used for instance
to reduce long lines in polygon area shapes so they can better follow
the underlying terrain changes.
The patches deal with three separate issues, all rolled up into one
tarball:
Currently, arrayfit always appends .arr.gz onto the name passed on the
command line, meaning that only tile names can be passed. The patch strips
off .arr or .arr.gz if present prior to it's appending, meaning that tile
names or filenames can be passed on the command line.
The interface to the OSGB36 conversion functions is cleaned up a lot. I
can't believe I originally wrote it in such an ugly manner!
A lot of console output (> 5000 lines per tile) is removed from the final
construction process, meaning that the output left can actually be read.
The attached patches significantly quieten the output from genapts, which in it's current form resembles the universe flying by on a bad hair day Remember chaps, console output on Windows is slooowwwwww... Normal service may be resumed using --verbose or -v. I've also added a short help, obtainable with --help or -h. I've also added a couple of extra options, --airport=abcd for just generating a particular airport, and --tile=<[we]xxx[ns]xx> for generating a 1x1 degree tile. We currently have --chunk=<[we]xxx[ns]xx> for generating a 10x10 degree chunk, and I'd like to eventually add --tile as an option to all tools that take --chunk.
This one adds the tile option to
tgvpf.
Erik Hofman:
Some small code changes for IRIX.
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.
impliment essentially the same thing as "ArrayFit". Requires the terra
program, but the terrafit.py script should take care of the pre/post
processing.
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.
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.
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.)
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.
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.
Added --min-area and --max-area options to specify the minimum and
maximum area of a polygon's bounding rectangle in meters square. This
option will make it possible to use different textures for big lakes
and small ponds, or for large cities and smaller towns.
polygons to scenery. It uses the regular XML property format, which
users can create easily in a text editor. See
src/Prep/UserDef/sample.xml for examples.
The following files have been changed to enable the latest Terragear CVS
to compile with MSVC++ 5.0
.\construct\clipper\clipper.cxx
for( int i - lots of places
.\construct\genoutput\genobj.cxx
fix directory logic for windows, line 320 and following
.\construct\main\main.cxx
windows does not have an opendir function
added code for windows directory functions
disabled the mem allocation limit code - windows does not
have similar functions
for ( int i - several places
.\construct\match\match.cxx
moved the definition of file and command outside of the ifdef line 420
.\lib\e00\e00.cxx
for( int i - several places
.\lib\e00\e00.cxx
use simgear/compiler.h constructs
.\lib\geometry\contour_tree.hxx
removed a cout statement
.\lib\geometry\poly_support.cxx
added float.h changed 1.0e+999 to DBL_MAX, windows doesn't go that big
lots of for ( int i changes
lines 193 and 208 no != operator defined - changed logic
line 801 flag should be int, not bool, get_hole_flag returns int
.\lib\landcover\landcover.cxx
.\lib\landcover\landcover.hxx
add include simgear/compiler.h
see comments
.\lib\optimize\genfans.cxx
function canonify added return at end, windows complains
added using std for cout and endl
.\lib\optimize\genstrips.cxx
function tgGenStrips no return value, moved by_node into outer scope
fix for ( int i ...
.\lib\poly2tri\construct.c
added include <memory.h> for windows
remove unused variables lines 435 & 437
.\lib\poly2tri\misc.c
added HAVE_SYS_TIME_H logic for sys/time.h include file
added logic to uses windows functions for time and rand
.\lib\poly2tri\monotone.c
added include <memory.h> for windows
lines 286-288 remove unused variables
.\lib\poly2tri\tri.c
remove sys/time.h - no time functions called
added include <memory.h> for windows
.\lib\polygon\polygon.cxx
function polygon_to_tristrip will not compile I don't think the
logic is complete, no returned data added if else endif around
function and polygon_to_tristrip_old, renamed _old function.
Search of code reveals that function is not called by anyone.
.\lib\polygon\superpoly.cxx
changed include <superpoly.hxx> to "superpoly.hxx"
.\lib\polygon\superpoly.hxx
add include <windows.h> for windows before include <gl.h>
needed for definitions used in Microsoft version of opengl
.\lib\shapelib\dbfopen.c
added include files for windows
lines 195-197 271-272 515-517 removed unused variables
.\lib\shapelib\shpopen.c
added #include <stdlib.h> for malloc() and friends
added include files for windows
line 279 527 813 1127 removed unused variables
line 827 cast result to int
.\lib\win32\mkdir.cpp
documented function, remove debug lines
.\prep\demraw2ascii\main.c
lines 46-50 remove unused variables
.\prep\demraw2ascii\rawdem.c
line 47 changed logic to compile with MSVC
line 244-256 set real constants to float, windows complains with
double constants
.\prep\genairports\build.cxx
lots of for ( int i changes
.\prep\genairports\main.cxx
fix mkdir logic for windows
.\prep\genairports\output.cxx
added using std cout endl
lots of for ( int i changes
fix mkdir logic for windows
.\prep\genairports\runway.cxx
for ( int i changes
lines 117-118 161-162 remove default values for function parameters
.\prep\gshhs\main.cxx
added using std cout
.\prep\shapefile\noaa_decode.cxx
.\prep\shapefile\shape_decode.cxx
added using std for cout
lines 45-49 moved unused variables inside #if 0 block
- increased maximum areas to 128 (for future growth), and added Road
and Railroad areas
- changed the method of calculating the triangle centre in
poly_support.hxx
- added a has_holes() method to polygon.hxx
- added a new library, e00, for reading ArcInfo e00 files (i.e. the
free online ones from DCW and GeoGratis); it needs more work
- added a new prep utility, e00lines, for creating textured polygons
out of e00 line data (with user-specified width and area type); this
is useful for roads, railroads, rivers, and utility lines