OVERVIEW:
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.
This commit is contained in:
parent
3911a656b5
commit
01ba584d2e
5 changed files with 19 additions and 17 deletions
|
@ -450,6 +450,7 @@ is_water_area (AreaType type)
|
|||
case OceanArea:
|
||||
case BogArea:
|
||||
case MarshArea:
|
||||
case LittoralArea:
|
||||
case WaterBodyCover:
|
||||
return true;
|
||||
default:
|
||||
|
@ -516,9 +517,6 @@ bool TGClipper::clip_all(const point2d& min, const point2d& max) {
|
|||
for ( i = 0; i < TG_MAX_AREA_TYPES; ++i ) {
|
||||
cout << "num polys of type (" << i << ") = "
|
||||
<< polys_in.polys[i].size() << endl;
|
||||
// current = polys_in.polys[i].begin();
|
||||
// last = polys_in.polys[i].end();
|
||||
// for ( ; current != last; ++current ) {
|
||||
for( j = 0; j < (int)polys_in.polys[i].size(); ++j ) {
|
||||
TGPolygon current = polys_in.polys[i][j];
|
||||
SG_LOG( SG_CLIPPER, SG_INFO, get_area_name( (AreaType)i )
|
||||
|
@ -577,13 +575,14 @@ bool TGClipper::clip_all(const point2d& min, const point2d& max) {
|
|||
// move_slivers) to the clipped polys list
|
||||
if ( result_diff.contours() > 0 ) {
|
||||
polys_clipped.polys[i].push_back(result_diff);
|
||||
}
|
||||
|
||||
// static int count = 0;
|
||||
// cout << "Writing clipped polygon to next-result" << count
|
||||
// << endl;
|
||||
// char filename[256];
|
||||
// sprintf(filename, "next-result-%02d", count++);
|
||||
// FILE *tmpfp= fopen(filename, "w");
|
||||
// gpc_write_polygon(tmpfp, 1, result_diff);
|
||||
// fclose(tmpfp);
|
||||
// sprintf(filename, "next-result-%02d-%02d", i, count++);
|
||||
// result_diff.write(filename);
|
||||
}
|
||||
}
|
||||
accum = result_union;
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ inline static void init ()
|
|||
set_area("Pond", PondArea);
|
||||
set_area("Swamp or Marsh", MarshArea);
|
||||
set_area("Marsh", MarshArea);
|
||||
set_area("Littoral", LittoralArea);
|
||||
set_area("Bog", BogArea);
|
||||
set_area("Sand", SandArea);
|
||||
set_area("Lava", LavaArea);
|
||||
|
@ -80,6 +81,7 @@ inline static void init ()
|
|||
set_area("Canal", CanalArea);
|
||||
set_area("Glacier", GlacierArea);
|
||||
set_area("PackIce", PackIceArea);
|
||||
set_area("PolarIce", PolarIceArea);
|
||||
set_area("Urban", UrbanArea);
|
||||
set_area("Town", TownArea);
|
||||
set_area("BuiltUpCover", BuiltUpCover);
|
||||
|
|
|
@ -51,8 +51,9 @@ enum AreaType {
|
|||
StreamArea,
|
||||
IntStreamArea,
|
||||
CanalArea,
|
||||
GlacierArea, // Any solid ice/snow
|
||||
GlacierArea, // Solid ice/snow
|
||||
PackIceArea, // Water with ice packs
|
||||
PolarIceArea,
|
||||
OceanArea,
|
||||
UrbanArea, // Densely-populated city or large town
|
||||
TownArea, // Small town or village
|
||||
|
@ -60,6 +61,7 @@ enum AreaType {
|
|||
BogArea, // Bog
|
||||
MarshArea, // Marshland or swamp
|
||||
SandArea, // Sand-covered area
|
||||
LittoralArea, // Tidal, Sand-covered area
|
||||
LavaArea, // Lava-covered area
|
||||
|
||||
// USGS Land Covers
|
||||
|
|
|
@ -13,7 +13,7 @@ ${SHAPEDECODE} ${SHAPEBASE}/landmass_default ${WORKBASE}/Shape-LandMass Default
|
|||
# Inland moving water: rivers/streams, intermittent streams, and canals
|
||||
${SHAPEDECODE} --line-width 40 ${SHAPEBASE}/rivers_stream ${WORKBASE}/Shape-Rivers Stream
|
||||
${SHAPEDECODE} --line-width 30 ${SHAPEBASE}/rivers_intermittentstream ${WORKBASE}/Shape-Rivers IntermittentStream
|
||||
${SHAPEDECODE} --line-width 50 ${SHAPEBASE}/canals_stream ${WORKBASE}/Shape-Canals Stream
|
||||
${SHAPEDECODE} --line-width 50 ${SHAPEBASE}/canals_stream ${WORKBASE}/Shape-Canals Canal
|
||||
|
||||
# Inland still water: lakes, intermittent lakes, and flood land
|
||||
${SHAPEDECODE} ${SHAPEBASE}/lakes_lake ${WORKBASE}/Shape-Lakes Lake
|
||||
|
@ -31,7 +31,7 @@ ${SHAPEDECODE} ${SHAPEBASE}/landcover_mixedforestcover ${WORKBASE}/Shape-LandCov
|
|||
|
||||
# Ground cover: sand, tidal, lava, barren, grass, shrub, herb-tundra
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_sand ${WORKBASE}/Shape-LandCover Sand
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_marsh ${WORKBASE}/Shape-LandCover Marsh
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_marsh ${WORKBASE}/Shape-LandCover Littoral
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_lava ${WORKBASE}/Shape-LandCover Lava
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_barrencover ${WORKBASE}/Shape-LandCover BarrenCover
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_grasscover ${WORKBASE}/Shape-LandCover GrassCover
|
||||
|
@ -41,8 +41,7 @@ ${SHAPEDECODE} ${SHAPEBASE}/landcover_herbtundracover ${WORKBASE}/Shape-LandCove
|
|||
# Ice cover: glaciers, pack ice, and sea ice
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_glacier ${WORKBASE}/Shape-LandCover Glacier
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_packice ${WORKBASE}/Shape-LandCover PackIce
|
||||
# FiXME: Two glacier themes; have same name in database
|
||||
# ${SHAPEDECODE} ${SHAPEBASE}/landcover_glacier ${WORKBASE}/Shape-LandCover Glacier
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_glacier ${WORKBASE}/Shape-LandCover PolarIce
|
||||
|
||||
# Marshes: marsh and bog
|
||||
${SHAPEDECODE} ${SHAPEBASE}/landcover_marsh ${WORKBASE}/Shape-LandCover Marsh
|
||||
|
|
|
@ -39,7 +39,7 @@ for REGION in $REGIONS; do
|
|||
# Inland moving water: rivers/streams, intermittent streams, and canals
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-Rivers --material=Stream --width=40 --att=hyc:8 --max-segment=400 $V0PATH $REGION hydro watrcrsl
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-Rivers --material=IntermittentStream --width=30 --att=hyc:6 --max-segment=400 $V0PATH $REGION hydro watrcrsl
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-Canals --material=Stream --width=50 --att=exs:1 --att=loc:8 --max-segment=400 $V0PATH $REGION hydro aquecanl
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-Canals --material=Canal --width=50 --att=exs:1 --att=loc:8 --max-segment=400 $V0PATH $REGION hydro aquecanl
|
||||
|
||||
# Inland still water: lakes, intermittent lakes, and flood land
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-Lakes --material=Lake --att=f_code:BH000 --att=hyc:8 --max-segment=400 $V0PATH $REGION hydro inwatera
|
||||
|
@ -57,7 +57,7 @@ for REGION in $REGIONS; do
|
|||
|
||||
# Ground cover: sand, tidal, lava, barren, grass, shrub, herb-tundra
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Sand --att=smc:88 --att=swc:0 --max-segment=400 $V0PATH $REGION phys grounda
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Marsh --att=smc:88 --att=swc:3 --max-segment=400 $V0PATH $REGION phys grounda
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Littoral --att=smc:88 --att=swc:3 --max-segment=400 $V0PATH $REGION phys grounda
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Lava --att=smc:52 --max-segment=400 $V0PATH $REGION phys grounda
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=BarrenCover --att=smc:119 --max-segment=400 $V0PATH $REGION phys grounda
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=GrassCover --att=f_code:EB010 --max-segment=400 $V0PATH $REGION veg grassa
|
||||
|
@ -67,7 +67,7 @@ for REGION in $REGIONS; do
|
|||
# Ice cover: glaciers, pack ice, and sea ice
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Glacier --max-segment=400 $V0PATH $REGION phys landicea
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=PackIce --att=f_code:BJ070 --max-segment=400 $V0PATH $REGION phys seaicea
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Glacier --att=f_code:BJ080 --max-segment=400 $V0PATH $REGION phys seaicea
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=PolarIce --att=f_code:BJ080 --max-segment=400 $V0PATH $REGION phys seaicea
|
||||
|
||||
# Marshes: marsh and bog
|
||||
${TGVPF} --work-dir=${WORKBASE}/VPF-LandCover --material=Marsh --att=f_code:BH095 --max-segment=400 $V0PATH $REGION veg swampa
|
||||
|
|
Loading…
Reference in a new issue