From d591a24a4070c56c7455bb2e04e51b5075192459 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Tue, 2 Apr 2019 22:34:36 -0500 Subject: [PATCH] USGS classes are obsolete. Removed. --- NEWS | 2 +- src/BuildTiles/Main/CMakeLists.txt | 4 +- src/BuildTiles/Main/construct.sh | 1 - src/BuildTiles/Main/main.cxx | 5 -- src/BuildTiles/Main/tgconstruct_landclass.cxx | 1 - src/BuildTiles/Main/usgs.cxx | 69 ------------------- src/BuildTiles/Main/usgs.hxx | 34 --------- 7 files changed, 2 insertions(+), 114 deletions(-) delete mode 100644 src/BuildTiles/Main/usgs.cxx delete mode 100644 src/BuildTiles/Main/usgs.hxx diff --git a/NEWS b/NEWS index 0fa31e18..a09bae50 100644 --- a/NEWS +++ b/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. diff --git a/src/BuildTiles/Main/CMakeLists.txt b/src/BuildTiles/Main/CMakeLists.txt index 699b9c26..702edce3 100644 --- a/src/BuildTiles/Main/CMakeLists.txt +++ b/src/BuildTiles/Main/CMakeLists.txt @@ -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} ) diff --git a/src/BuildTiles/Main/construct.sh b/src/BuildTiles/Main/construct.sh index 93b38cbb..6034b7e5 100755 --- a/src/BuildTiles/Main/construct.sh +++ b/src/BuildTiles/Main/construct.sh @@ -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 \ diff --git a/src/BuildTiles/Main/main.cxx b/src/BuildTiles/Main/main.cxx index 53a4ddf5..5293e539 100644 --- a/src/BuildTiles/Main/main.cxx +++ b/src/BuildTiles/Main/main.cxx @@ -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="); SG_LOG(SG_GENERAL, SG_ALERT, " --nudge="); SG_LOG(SG_GENERAL, SG_ALERT, " --priorities="); - // unused: SG_LOG(SG_GENERAL, SG_ALERT, " --usgs-map="); SG_LOG(SG_GENERAL, SG_ALERT, " --ignore-landmass"); SG_LOG(SG_GENERAL, SG_ALERT, " --threads"); SG_LOG(SG_GENERAL, SG_ALERT, " --threads="); @@ -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) { diff --git a/src/BuildTiles/Main/tgconstruct_landclass.cxx b/src/BuildTiles/Main/tgconstruct_landclass.cxx index cb0888b9..5ceffea6 100644 --- a/src/BuildTiles/Main/tgconstruct_landclass.cxx +++ b/src/BuildTiles/Main/tgconstruct_landclass.cxx @@ -31,7 +31,6 @@ #include #include "tgconstruct.hxx" -#include "usgs.hxx" using std::string; diff --git a/src/BuildTiles/Main/usgs.cxx b/src/BuildTiles/Main/usgs.cxx deleted file mode 100644 index d1938558..00000000 --- a/src/BuildTiles/Main/usgs.cxx +++ /dev/null @@ -1,69 +0,0 @@ -// usgs.cxx -- manage USGS mapping -// -// Written by Ralf Gerlich, started December 2009 -// -// Copyright (C) 2009 Ralf Gerlich - ralf.gerlich custom-scenery 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 -#include -#include - -#include -#include -#include - -#include "usgs.hxx" - -using std::ifstream; -using std::string; -using std::vector; - -static vector 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 custom-scenery 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 - -#include - -#include "priorities.hxx" - -int load_usgs_map( const std::string& filename ); -unsigned int translateUSGSCover( unsigned int usgs_value ); - -#endif // _USGS_HXX