First round of lat,lng -> lng,lat switcheroo

This commit is contained in:
Patrick Niklaus
2016-02-23 21:23:13 +01:00
parent 0fab6b7cab
commit d9d4742130
70 changed files with 893 additions and 817 deletions
+9 -13
View File
@@ -17,8 +17,7 @@
#include "util/exception.hpp"
#include "util/simple_logger.hpp"
#include "util/typedefs.hpp"
#include "osrm/coordinate.hpp"
#include "util/coordinate.hpp"
#ifdef __linux__
#include <sys/mman.h>
@@ -38,11 +37,9 @@ namespace osrm
namespace storage
{
using RTreeLeaf =
typename engine::datafacade::BaseDataFacade::RTreeLeaf;
using RTreeNode = util::StaticRTree<RTreeLeaf,
util::ShM<util::FixedPointCoordinate, true>::vector,
true>::TreeNode;
using RTreeLeaf = typename engine::datafacade::BaseDataFacade::RTreeLeaf;
using RTreeNode =
util::StaticRTree<RTreeLeaf, util::ShM<util::Coordinate, true>::vector, true>::TreeNode;
using QueryGraph = util::StaticGraph<contractor::QueryEdge::EdgeData>;
// delete a shared memory region. report warning if it could not be deleted
@@ -309,8 +306,8 @@ int Storage::Run()
boost::filesystem::ifstream nodes_input_stream(nodes_data_path, std::ios::binary);
unsigned coordinate_list_size = 0;
nodes_input_stream.read((char *)&coordinate_list_size, sizeof(unsigned));
shared_layout_ptr->SetBlockSize<util::FixedPointCoordinate>(SharedDataLayout::COORDINATE_LIST,
coordinate_list_size);
shared_layout_ptr->SetBlockSize<util::Coordinate>(SharedDataLayout::COORDINATE_LIST,
coordinate_list_size);
// load geometries sizes
std::ifstream geometry_input_stream(geometries_data_path.string().c_str(), std::ios::binary);
@@ -438,15 +435,14 @@ int Storage::Run()
}
// Loading list of coordinates
util::FixedPointCoordinate *coordinates_ptr =
shared_layout_ptr->GetBlockPtr<util::FixedPointCoordinate, true>(
shared_memory_ptr, SharedDataLayout::COORDINATE_LIST);
util::Coordinate *coordinates_ptr = shared_layout_ptr->GetBlockPtr<util::Coordinate, true>(
shared_memory_ptr, SharedDataLayout::COORDINATE_LIST);
extractor::QueryNode current_node;
for (unsigned i = 0; i < coordinate_list_size; ++i)
{
nodes_input_stream.read((char *)&current_node, sizeof(extractor::QueryNode));
coordinates_ptr[i] = util::FixedPointCoordinate(current_node.lat, current_node.lon);
coordinates_ptr[i] = util::Coordinate(current_node.lon, current_node.lat);
}
nodes_input_stream.close();