Skip to content

v0.2.54..v0.2.55 changeset OsmGeoJsonReader.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmGeoJsonReader.cpp b/hoot-core/src/main/cpp/hoot/core/io/OsmGeoJsonReader.cpp
index d4f1f3e..bb8cd3c 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmGeoJsonReader.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmGeoJsonReader.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 #include "OsmGeoJsonReader.h"
@@ -35,6 +35,7 @@
 #include <hoot/core/util/HootException.h>
 #include <hoot/core/util/Log.h>
 #include <hoot/core/util/StringUtils.h>
+#include <hoot/core/util/MapProjector.h>
 
 // Boost
 #include <boost/property_tree/json_parser.hpp>
@@ -116,6 +117,12 @@ void OsmGeoJsonReader::read(const OsmMapPtr& map)
     _loadJSON(_results[i]);
     _parseGeoJson();
   }
+
+  // GeoJSON doesn't support the crs prop anymore, but if you find an old file that has one you can
+  // use something hardcoded like this as a temp solution:
+//  std::shared_ptr<OGRSpatialReference> spatRef(new OGRSpatialReference());
+//  spatRef->importFromEPSG(32618);
+//  map->setProjection(spatRef);
 }
 
 void OsmGeoJsonReader::loadFromString(const QString& jsonStr, const OsmMapPtr& map)
Clone this wiki locally