From 143ea6efe6a85612bf90629cc44da6840b5469b2 Mon Sep 17 00:00:00 2001 From: Christian Schmitt Date: Fri, 21 Feb 2014 18:05:55 +0100 Subject: [PATCH] Move to new SGBucket API --- src/Airports/GenAirports850/airport.cxx | 2 +- src/BuildTiles/Main/tgconstruct_shared.cxx | 22 +++++++++------------- src/BuildTiles/Parallel/server.cxx | 10 +++++----- src/Lib/Array/testarray.cxx | 2 +- src/Lib/terragear/tg_chopper.cxx | 9 +++++---- src/Prep/DemChop/demchop.cxx | 17 +++++++---------- src/Prep/DemChop/hgtchop.cxx | 16 +++++++--------- src/Prep/DemChop/srtmchop.cxx | 17 ++++++++--------- src/Prep/DemChop/testassem.cxx | 17 ++++++++--------- src/Prep/GDALChop/gdalchop.cxx | 4 ++-- src/Prep/TerraFit/terrafit.cc | 2 +- 11 files changed, 54 insertions(+), 64 deletions(-) diff --git a/src/Airports/GenAirports850/airport.cxx b/src/Airports/GenAirports850/airport.cxx index 162ca8a3..f0411849 100644 --- a/src/Airports/GenAirports850/airport.cxx +++ b/src/Airports/GenAirports850/airport.cxx @@ -317,7 +317,7 @@ void Airport::BuildBtg(const std::string& root, const string_list& elev_src ) apt_lon = apt_lon / (double)num_samples; apt_lat = apt_lat / (double)num_samples; - SGBucket b( apt_lon, apt_lat ); + SGBucket b( SGGeod::fromDeg(apt_lon, apt_lat) ); TG_LOG(SG_GENERAL, SG_DEBUG, b.gen_base_path() << "/" << b.gen_index_str()); // If we are cutting in the linear features, add them first diff --git a/src/BuildTiles/Main/tgconstruct_shared.cxx b/src/BuildTiles/Main/tgconstruct_shared.cxx index 36ef7c7b..582b6e14 100644 --- a/src/BuildTiles/Main/tgconstruct_shared.cxx +++ b/src/BuildTiles/Main/tgconstruct_shared.cxx @@ -201,11 +201,9 @@ void TGConstruct::LoadSharedEdgeData( int stage ) // we need to read just 4 buckets for stage 1 - 1 for each edge std::vector north, south, east, west; SGBucket nb, sb, eb, wb; - double clon = bucket.get_center_lon(); - double clat = bucket.get_center_lat(); // Read North tile and add its southern nodes - nb = sgBucketOffset(clon, clat, 0, 1); + nb = bucket.sibling(0, 1); LoadNeighboorEdgeDataStage1( nb, north, south, east, west ); // Add southern nodes from northern tile for (unsigned int i=0; i