USGS classes are obsolete. Removed.
This commit is contained in:
parent
18f7e35c1d
commit
d591a24a40
7 changed files with 2 additions and 114 deletions
2
NEWS
2
NEWS
|
@ -91,7 +91,7 @@ New in 0.0.4
|
|||
* Added a new library for reading ArcInfo e00 files (DCW, GeoGratis).
|
||||
* Added a new prep util for creating textured polygons from e00 line
|
||||
data (i.e. for roads, railroads, streams, utility lines, etc.)
|
||||
* Added support for the USGS global land use / loand cover raster data base.
|
||||
* Added support for the USGS global land use / land cover raster data base.
|
||||
* Better MSVC support.
|
||||
* Better Cygwin support.
|
||||
* Weight face normals by triangle area when calculating terrain node normals.
|
||||
|
|
|
@ -20,12 +20,11 @@ add_executable(tg-construct
|
|||
tglandclass.hxx
|
||||
priorities.cxx
|
||||
priorities.hxx
|
||||
usgs.cxx
|
||||
main.cxx)
|
||||
|
||||
set_target_properties(tg-construct PROPERTIES
|
||||
COMPILE_DEFINITIONS
|
||||
"DEFAULT_USGS_MAPFILE=\"${PKGDATADIR}/usgsmap.txt\";DEFAULT_PRIORITIES_FILE=\"${PKGDATADIR}/default_priorities.txt\"" )
|
||||
"DEFAULT_PRIORITIES_FILE=\"${PKGDATADIR}/default_priorities.txt\"" )
|
||||
|
||||
target_link_libraries(tg-construct
|
||||
terragear
|
||||
|
@ -39,5 +38,4 @@ target_link_libraries(tg-construct
|
|||
|
||||
install(TARGETS tg-construct RUNTIME DESTINATION bin)
|
||||
|
||||
INSTALL(FILES usgsmap.txt DESTINATION ${PKGDATADIR} )
|
||||
INSTALL(FILES default_priorities.txt DESTINATION ${PKGDATADIR} )
|
||||
|
|
|
@ -65,7 +65,6 @@ ${CONSTRUCT} \
|
|||
--output-dir=${OUTPUTDIR} \
|
||||
--work-dir=${WORKBASE} \
|
||||
--share-dir=${SHAREDIR} \
|
||||
--usgs-map=${HOME}/terragear/share/TerraGear/usgsmap.txt \
|
||||
--priorities=${HOME}/terragear/share/TerraGear/default_priorities.txt \
|
||||
${NUDGE} ${SPAT} --ignore-landmass \
|
||||
--debug-dir=/home/martin/scenery/Debug \
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "tgconstruct.hxx"
|
||||
#include "priorities.hxx"
|
||||
#include "usgs.hxx"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
@ -59,7 +58,6 @@ static void usage( const string name ) {
|
|||
SG_LOG(SG_GENERAL, SG_ALERT, " --max-lat=<degrees>");
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, " --nudge=<float>");
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, " --priorities=<filename>");
|
||||
// unused: SG_LOG(SG_GENERAL, SG_ALERT, " --usgs-map=<filename>");
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, " --ignore-landmass");
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, " --threads");
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, " --threads=<numthreads>");
|
||||
|
@ -86,7 +84,6 @@ int main(int argc, char **argv) {
|
|||
string match_dir = "";
|
||||
// unused: string cover = "";
|
||||
string priorities_file = DEFAULT_PRIORITIES_FILE;
|
||||
// unused: string usgs_map_file = DEFAULT_USGS_MAPFILE;
|
||||
SGGeod min, max;
|
||||
long tile_id = -1;
|
||||
int num_threads = 1;
|
||||
|
@ -134,8 +131,6 @@ int main(int argc, char **argv) {
|
|||
// unused: cover = arg.substr(8);
|
||||
} else if (arg.find("--priorities=") == 0) {
|
||||
priorities_file = arg.substr(13);
|
||||
// } else if (arg.find("--usgs-map=") == 0) {
|
||||
// unused: usgs_map_file = arg.substr(11);
|
||||
} else if (arg.find("--ignore-landmass") == 0) {
|
||||
ignoreLandmass = true;
|
||||
} else if (arg.find("--threads=") == 0) {
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <simgear/math/SGMath.hxx>
|
||||
|
||||
#include "tgconstruct.hxx"
|
||||
#include "usgs.hxx"
|
||||
|
||||
using std::string;
|
||||
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
// usgs.cxx -- manage USGS mapping
|
||||
//
|
||||
// Written by Ralf Gerlich, started December 2009
|
||||
//
|
||||
// Copyright (C) 2009 Ralf Gerlich - ralf.gerlich <at> custom-scenery <dot> org
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/io/iostreams/sgstream.hxx>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "usgs.hxx"
|
||||
|
||||
using std::ifstream;
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
static vector<unsigned int> usgs_map;
|
||||
|
||||
#if 0 // need area_defs
|
||||
int load_usgs_map( const std::string& filename ) {
|
||||
ifstream in ( filename.c_str() );
|
||||
|
||||
if ( ! in ) {
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, "Unable to open USGS map file " << filename);
|
||||
return 0;
|
||||
}
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, "USGS Map file is " << filename);
|
||||
|
||||
in >> skipcomment;
|
||||
while ( !in.eof() ) {
|
||||
string name;
|
||||
in >> name;
|
||||
usgs_map.push_back( get_area_type( name ) );
|
||||
in >> skipcomment;
|
||||
}
|
||||
|
||||
in.close();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Translate USGS land cover values into TerraGear area types.
|
||||
unsigned int translateUSGSCover (unsigned int usgs_value)
|
||||
{
|
||||
if ( 0<usgs_value && usgs_value<usgs_map.size() ) {
|
||||
return usgs_map[usgs_value-1];
|
||||
} else {
|
||||
return get_default_area_type();
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,34 +0,0 @@
|
|||
// usgs.hxx -- manage USGS mapping
|
||||
//
|
||||
// Written by Ralf Gerlich, started December 2009
|
||||
//
|
||||
// Copyright (C) 2009 Ralf Gerlich - ralf.gerlich <at> custom-scenery <dot> org
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
#ifndef _USGS_HXX
|
||||
#define _USGS_HXX
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include "priorities.hxx"
|
||||
|
||||
int load_usgs_map( const std::string& filename );
|
||||
unsigned int translateUSGSCover( unsigned int usgs_value );
|
||||
|
||||
#endif // _USGS_HXX
|
Loading…
Reference in a new issue