output all GeoJSON as WGS84 to be RFC 7946 conform

This commit is contained in:
Patrick Brosi 2019-07-23 22:47:35 +02:00
parent 27da2a9c9e
commit feacae92ef
9 changed files with 5369 additions and 4282 deletions

View file

@ -257,7 +257,7 @@ int main(int argc, char** argv) {
util::geo::output::GeoGraphJsonOutput out;
mkdir(cfg.dbgOutputPath.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
std::ofstream fstr(cfg.dbgOutputPath + "/graph.json");
out.print(*shapeBuilder.getGraph(), fstr);
out.printLatLng(*shapeBuilder.getGraph(), fstr);
fstr.close();
}
@ -270,9 +270,7 @@ int main(int argc, char** argv) {
auto l = shapeBuilder.shapeL(singleTrip);
// reproject to WGS84 to match RFC 7946
for (auto& p : l) {
p = util::geo::webMercToLatLng<double>(p.getX(), p.getY());
}
o.printLatLng(l, {});
o.flush();
pstr.close();
@ -288,7 +286,7 @@ int main(int argc, char** argv) {
LOG(INFO) << "Outputting trgraph" + filePost + ".json...";
mkdir(cfg.dbgOutputPath.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
std::ofstream fstr(cfg.dbgOutputPath + "/trgraph" + filePost + ".json");
out.print(ng, fstr);
out.printLatLng(ng, fstr);
fstr.close();
}
} catch (const xml::XmlFileException& ex) {