output -T geojson as WGS84 coordinates

This commit is contained in:
Patrick Brosi 2019-07-23 21:32:07 +02:00
parent bfca604ab5
commit 27da2a9c9e
2 changed files with 6 additions and 1 deletions

View file

@ -269,7 +269,11 @@ int main(int argc, char** argv) {
auto l = shapeBuilder.shapeL(singleTrip);
o.print(l, util::json::Dict{{"ver", "new"}});
// reproject to WGS84 to match RFC 7946
for (auto& p : l) {
p = util::geo::webMercToLatLng<double>(p.getX(), p.getY());
}
o.flush();
pstr.close();