Move Centroid to coordinate_calculation
This commit is contained in:
@@ -64,6 +64,8 @@ double perpendicularDistanceFromProjectedCoordinate(
|
||||
Coordinate &nearest_location,
|
||||
double &ratio);
|
||||
|
||||
Coordinate centroid(const Coordinate lhs, const Coordinate rhs);
|
||||
|
||||
double bearing(const Coordinate first_coordinate, const Coordinate second_coordinate);
|
||||
|
||||
// Get angle of line segment (A,C)->(C,B)
|
||||
|
||||
@@ -137,11 +137,8 @@ class StaticRTree
|
||||
BOOST_ASSERT(current_element.u < coordinate_list.size());
|
||||
BOOST_ASSERT(current_element.v < coordinate_list.size());
|
||||
|
||||
Coordinate current_centroid =
|
||||
EdgeDataT::Centroid(Coordinate(coordinate_list[current_element.u].lon,
|
||||
coordinate_list[current_element.u].lat),
|
||||
Coordinate(coordinate_list[current_element.v].lon,
|
||||
coordinate_list[current_element.v].lat));
|
||||
Coordinate current_centroid = coordinate_calculation::centroid(
|
||||
coordinate_list[current_element.u], coordinate_list[current_element.v]);
|
||||
current_centroid.lat = FixedLatitude(
|
||||
COORDINATE_PRECISION *
|
||||
coordinate_calculation::mercator::latToY(toFloating(current_centroid.lat)));
|
||||
|
||||
Reference in New Issue
Block a user