BoundaryOp.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2022 ISciences LLC
*
* 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.
*
**********************************************************************
*
* Last port: operation/BoundaryOp.java fd5aebb
*
**********************************************************************/
#pragma once
#include <geos/algorithm/BoundaryNodeRule.h>
#include <geos/geom/Geometry.h>
#include <map>
namespace geos {
namespace geom {
class LineString;
class MultiLineString;
}
}
namespace geos {
namespace operation {
class GEOS_DLL BoundaryOp {
public:
BoundaryOp(const geom::Geometry& geom);
BoundaryOp(const geom::Geometry& geom, const algorithm::BoundaryNodeRule& bnRule);
static std::unique_ptr<geom::Geometry> getBoundary(const geom::Geometry& g);
static std::unique_ptr<geom::Geometry> getBoundary(const geom::Geometry& g, const algorithm::BoundaryNodeRule& bnRule);
static bool hasBoundary(const geom::Geometry& geom, const algorithm::BoundaryNodeRule& boundaryNodeRule);
std::unique_ptr<geom::Geometry> getBoundary();
private:
const geom::Geometry& m_geom;
const geom::GeometryFactory& m_geomFact;
const algorithm::BoundaryNodeRule& m_bnRule;
std::unique_ptr<geom::Geometry> boundaryMultiLineString(const geom::MultiLineString& mLine);
std::unique_ptr<geom::CoordinateSequence> computeBoundaryCoordinates(const geom::MultiLineString& mLine);
std::unique_ptr<geom::Geometry> boundaryLineString(const geom::LineString& line);
};
}
}
geos::algorithm::BoundaryNodeRule
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition BoundaryNodeRule.h:52
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::LineString
Definition LineString.h:66
geos::geom::MultiLineString
Models a collection of LineStrings.
Definition MultiLineString.h:49
geos::operation::BoundaryOp::hasBoundary
static bool hasBoundary(const geom::Geometry &geom, const algorithm::BoundaryNodeRule &boundaryNodeRule)
geos::operation::BoundaryOp::BoundaryOp
BoundaryOp(const geom::Geometry &geom, const algorithm::BoundaryNodeRule &bnRule)
geos::operation::BoundaryOp::getBoundary
static std::unique_ptr< geom::Geometry > getBoundary(const geom::Geometry &g, const algorithm::BoundaryNodeRule &bnRule)
geos::operation::BoundaryOp::BoundaryOp
BoundaryOp(const geom::Geometry &geom)
geos::operation::BoundaryOp::getBoundary
static std::unique_ptr< geom::Geometry > getBoundary(const geom::Geometry &g)
geos::operation::BoundaryOp::getBoundary
std::unique_ptr< geom::Geometry > getBoundary()
geos::geom
Definition Angle.h:26
geos::operation
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38