Skip to content

Commit

Permalink
Move GDALUtils to private.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jun 25, 2020
1 parent 4830fba commit 781aaef
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion apps/pdal.cpp
Expand Up @@ -33,12 +33,12 @@
* OF SUCH DAMAGE.
****************************************************************************/

#include <pdal/GDALUtils.hpp>
#include <pdal/Kernel.hpp>
#include <pdal/PluginManager.hpp>
#include <pdal/StageFactory.hpp>
#include <pdal/pdal_config.hpp>
#include <pdal/util/Backtrace.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#include <iomanip>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion filters/ColorinterpFilter.cpp
Expand Up @@ -34,10 +34,10 @@

#include "ColorinterpFilter.hpp"

#include <pdal/GDALUtils.hpp>
#include <pdal/PointView.hpp>
#include <pdal/util/ProgramArgs.hpp>
#include <pdal/util/Utils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>
#include <pdal/private/gdal/Raster.hpp>

#include <array>
Expand Down
2 changes: 1 addition & 1 deletion filters/CropFilter.cpp
Expand Up @@ -39,7 +39,7 @@
#include <pdal/Polygon.hpp>
#include <pdal/util/Bounds.hpp>
#include <pdal/util/ProgramArgs.hpp>
#include <pdal/GDALUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#include "private/Point.hpp"
#include "private/pnp/GridPnp.hpp"
Expand Down
2 changes: 1 addition & 1 deletion filters/OverlayFilter.cpp
Expand Up @@ -38,8 +38,8 @@

#include <ogr_api.h>

#include <pdal/GDALUtils.hpp>
#include <pdal/util/ProgramArgs.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

namespace pdal
{
Expand Down
5 changes: 3 additions & 2 deletions io/EptReader.cpp
Expand Up @@ -36,12 +36,13 @@

#include <limits>

#include <nlohmann/json.hpp>

#include <pdal/ArtifactManager.hpp>
#include <pdal/GDALUtils.hpp>
#include <pdal/Polygon.hpp>
#include <pdal/SrsBounds.hpp>
#include <pdal/pdal_features.hpp>
#include <nlohmann/json.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#include "private/ept/Connector.hpp"
#include "private/ept/EptArtifact.hpp"
Expand Down
2 changes: 1 addition & 1 deletion io/OGRWriter.cpp
Expand Up @@ -38,7 +38,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#include <pdal/PointView.hpp>
#include <pdal/GDALUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>
#include <pdal/util/FileUtils.hpp>
#include <pdal/private/gdal/ErrorHandler.hpp>

Expand Down
2 changes: 1 addition & 1 deletion io/TIndexReader.cpp
Expand Up @@ -37,8 +37,8 @@
#include <ogr_api.h>

#include <pdal/Polygon.hpp>
#include <pdal/GDALUtils.hpp>
#include <pdal/util/ProgramArgs.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>
#include <pdal/private/gdal/SpatialRef.hpp>

namespace pdal
Expand Down
3 changes: 0 additions & 3 deletions kernels/DensityKernel.cpp
Expand Up @@ -37,7 +37,6 @@
#include "../filters/HexBinFilter.hpp"
#include "private/density/OGR.hpp"

#include <pdal/GDALUtils.hpp>
#include <pdal/util/FileUtils.hpp>

namespace pdal
Expand Down Expand Up @@ -88,8 +87,6 @@ void DensityKernel::outputDensity(pdal::SpatialReference const& reference)

int DensityKernel::execute()
{
gdal::registerDrivers();

if (m_inputFile == "STDIN" ||
(FileUtils::extension(m_inputFile) == ".xml" ||
FileUtils::extension(m_inputFile) == ".json"))
Expand Down
2 changes: 1 addition & 1 deletion kernels/TIndexKernel.cpp
Expand Up @@ -39,11 +39,11 @@

#include <ogr_api.h>

#include <pdal/GDALUtils.hpp>
#include <pdal/PDALUtils.hpp>
#include <pdal/Polygon.hpp>
#include <pdal/StageFactory.hpp>
#include <pdal/util/FileUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>
#include <pdal/private/gdal/SpatialRef.hpp>

#include "../io/LasWriter.hpp"
Expand Down
5 changes: 5 additions & 0 deletions kernels/private/density/OGR.cpp
Expand Up @@ -38,7 +38,11 @@
#include <sstream>
#include <functional>

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

#include <pdal/util/FileUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>
#include <pdal/private/gdal/SpatialRef.hpp>

#include "../filters/private/hexer/HexGrid.hpp"
Expand Down Expand Up @@ -133,6 +137,7 @@ OGR::~OGR()

void OGR::createLayer(const std::string& wkt)
{
gdal::registerDrivers();
OGRSFDriverH driver = OGRGetDriverByName(m_driver.c_str());
if (driver == NULL)
{
Expand Down
7 changes: 2 additions & 5 deletions kernels/private/density/OGR.hpp
Expand Up @@ -35,11 +35,6 @@

#include <string>

#include <pdal/GDALUtils.hpp>

#include "ogr_api.h"
#include "gdal.h"

namespace hexer
{
class HexGrid;
Expand All @@ -50,6 +45,8 @@ namespace pdal

class OGR
{
using OGRDataSourceH = void *;
using OGRLayerH = void *;

public:
OGR(std::string const& filename, const std::string& srs,
Expand Down
3 changes: 2 additions & 1 deletion pdal/Geometry.cpp
Expand Up @@ -36,7 +36,8 @@
#include <ogr_geometry.h>

#include <pdal/Geometry.hpp>
#include <pdal/GDALUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#include "private/SrsTransform.hpp"

namespace pdal
Expand Down
2 changes: 1 addition & 1 deletion pdal/Polygon.cpp
Expand Up @@ -35,8 +35,8 @@
#include <ogr_api.h>
#include <ogr_geometry.h>

#include <pdal/GDALUtils.hpp>
#include <pdal/Polygon.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#include "../filters/private/pnp/GridPnp.hpp"

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pdal/private/gdal/Raster.cpp
Expand Up @@ -35,10 +35,10 @@
#include <gdal.h>
#include <gdal_priv.h>

#include <pdal/GDALUtils.hpp>
#include <pdal/util/Algorithm.hpp>

#include "Raster.hpp"
#include "GDALUtils.hpp"

namespace pdal
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/nitf/io/NitfWriter.cpp
Expand Up @@ -37,8 +37,8 @@

#include "NitfWriter.hpp"

#include <pdal/GDALUtils.hpp>
#include <pdal/PointView.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#ifndef IMPORT_NITRO_API
#define IMPORT_NITRO_API
Expand Down
2 changes: 2 additions & 0 deletions test/unit/filters/CropFilterTest.cpp
Expand Up @@ -47,8 +47,10 @@
#include "Support.hpp"

//ABELL
/**
#include <pdal/util/Bounds.hpp>
#include <pdal/GDALUtils.hpp>
**/

using namespace pdal;

Expand Down
3 changes: 2 additions & 1 deletion test/unit/io/EptReaderTest.cpp
Expand Up @@ -42,9 +42,10 @@
#include <io/LasReader.hpp>
#include <filters/CropFilter.hpp>
#include <filters/ReprojectionFilter.hpp>
#include <pdal/GDALUtils.hpp>
#include <pdal/SrsBounds.hpp>
#include <pdal/util/FileUtils.hpp>
#include <pdal/private/gdal/GDALUtils.hpp>

#include "Support.hpp"

namespace pdal
Expand Down

0 comments on commit 781aaef

Please sign in to comment.