Add changelog entry

This commit is contained in:
Patrick Niklaus
2016-04-20 20:51:45 +02:00
parent 5f9ccadd6c
commit b3957d87b4
2 changed files with 9 additions and 3 deletions
+4 -3
View File
@@ -50,16 +50,17 @@ template <typename ForwardIter> util::json::String makePolyline(ForwardIter begi
template <typename ForwardIter>
util::json::Object makeGeoJSONGeometry(ForwardIter begin, ForwardIter end)
{
auto distance = std::distance(begin, end);
auto num_coordinates = std::distance(begin, end);
BOOST_ASSERT(num_coordinates != 0);
util::json::Object geojson;
if (distance > 1)
if (num_coordinates > 1)
{
geojson.values["type"] = "LineString";
util::json::Array coordinates;
std::transform(begin, end, std::back_inserter(coordinates.values), &detail::coordinateToLonLat);
geojson.values["coordinates"] = std::move(coordinates);
}
else if (distance > 0)
else if (num_coordinates > 0)
{
geojson.values["type"] = "Point";
util::json::Array coordinates;