CommonBitsOp.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2005-2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/precision/CommonBitsRemover.h> // for unique_ptr composition
#include <vector>
#include <memory>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
namespace geos {
namespace geom {
class Geometry;
}
namespace precision {
//class CommonBitsRemover;
}
}
namespace geos {
namespace precision { // geos.precision
class GEOS_DLL CommonBitsOp {
private:
bool returnToOriginalPrecision;
std::unique_ptr<CommonBitsRemover> cbr;
std::unique_ptr<geom::Geometry> removeCommonBits(const geom::Geometry* geom0);
void removeCommonBits(
const geom::Geometry* geom0,
const geom::Geometry* geom1,
std::unique_ptr<geom::Geometry>& rgeom0,
std::unique_ptr<geom::Geometry>& rgeom1);
public:
CommonBitsOp();
CommonBitsOp(bool nReturnToOriginalPrecision);
std::unique_ptr<geom::Geometry> intersection(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
std::unique_ptr<geom::Geometry> Union(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
std::unique_ptr<geom::Geometry> difference(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
std::unique_ptr<geom::Geometry> symDifference(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
std::unique_ptr<geom::Geometry> buffer(
const geom::Geometry* geom0,
double distance);
std::unique_ptr<geom::Geometry> computeResultPrecision(
std::unique_ptr<geom::Geometry> result);
};
} // namespace geos.precision
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::precision::CommonBitsOp::difference
std::unique_ptr< geom::Geometry > difference(const geom::Geometry *geom0, const geom::Geometry *geom1)
Computes the set-theoretic difference of two Geometry, using enhanced precision.
geos::precision::CommonBitsOp::symDifference
std::unique_ptr< geom::Geometry > symDifference(const geom::Geometry *geom0, const geom::Geometry *geom1)
Computes the set-theoretic symmetric difference of two geometries, using enhanced precision.
geos::precision::CommonBitsOp::intersection
std::unique_ptr< geom::Geometry > intersection(const geom::Geometry *geom0, const geom::Geometry *geom1)
Computes the set-theoretic intersection of two Geometry, using enhanced precision.
geos::precision::CommonBitsOp::Union
std::unique_ptr< geom::Geometry > Union(const geom::Geometry *geom0, const geom::Geometry *geom1)
Computes the set-theoretic union of two Geometry, using enhanced precision.
geos::precision::CommonBitsOp::buffer
std::unique_ptr< geom::Geometry > buffer(const geom::Geometry *geom0, double distance)
Computes the buffer a geometry, using enhanced precision.
geos::precision::CommonBitsOp::computeResultPrecision
std::unique_ptr< geom::Geometry > computeResultPrecision(std::unique_ptr< geom::Geometry > result)
If required, returning the result to the original precision if required.
geos::precision::CommonBitsOp::CommonBitsOp
CommonBitsOp()
Creates a new instance of class, which reshifts result Geometry.
geos::precision::CommonBitsOp::CommonBitsOp
CommonBitsOp(bool nReturnToOriginalPrecision)
Creates a new instance of class, specifying whether the result geom::Geometrys should be reshifted.
geos::geom
Definition Angle.h:26
geos::precision
Provides classes for manipulating the precision model of Geometries.
Definition namespaces.h:300
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38