Skip to content

Commit

Permalink
OGR geojson - set to RFC7946
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell13 committed Oct 1, 2024
1 parent 08ca062 commit e28a61a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion filters/private/hexer/OGR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include <gdal.h>
#include <ogr_api.h>
#include <cpl_string.h>

#include <pdal/util/FileUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>
Expand Down Expand Up @@ -143,8 +144,12 @@ void OGR::createLayer(const std::string& wkt)
if (m_layerName.empty())
m_layerName = m_filename;
gdal::SpatialRef srs(wkt);
char **papszOptions = nullptr;
papszOptions = CSLAddNameValue(papszOptions, "RFC7946", "YES");

m_layer = GDALDatasetCreateLayer(m_ds, m_layerName.c_str(), srs.get(),
wkbMultiPolygon, NULL);
wkbMultiPolygon, papszOptions);
CSLDestroy(papszOptions);
if (m_layer == NULL)
throw pdal_error("Layer creation was null!");

Expand Down

0 comments on commit e28a61a

Please sign in to comment.