15 #include <geos/geom/Point.h>
16 #include <geos/geom/LineString.h>
17 #include <geos/geom/Polygon.h>
18 #include <geos/geom/GeometryCollection.h>
19 #include <geos/geom/prep/PreparedGeometry.h>
21 #include <boost/optional.hpp>
25 namespace MAKVRinTerra
31 #ifdef DtObjectDebugger_Enable
36 typedef std::shared_ptr<DtGeosGeometry>
Ptr;
37 typedef std::shared_ptr<const DtGeosGeometry>
CPtr;
45 typedef geos::geom::Geometry
type;
57 std::unique_ptr<CoordinateVector>, std::unique_ptr< std::vector<CoordinateVector> >,
69 const DtProj&,
double xmin,
double ymin,
double xmax,
double ymax);
73 const DtProj&,
const std::vector<DtPoint>& points);
75 const DtProj&,
const std::vector<DtVector>& points);
83 virtual std::string description()
const override;
84 virtual std::string toWKT()
const override;
86 virtual std::unique_ptr<PointVector> points()
const override;
88 virtual unsigned numberOfPoints()
const override;
90 virtual bool isValid()
const override;
91 virtual bool isEmpty()
const override;
93 virtual unsigned dimension()
const override;
104 virtual std::unique_ptr<DtFeatureGeometry::RelationshipMatrix> relate(
DtFeatureGeometry)
const override;
106 virtual double length()
const override;
108 virtual double area()
const override;
120 virtual DtFeatureGeometry buffer(
double width,
unsigned segments)
const override;
122 virtual DtFeatureGeometry bufferWithFlatCap(
double width,
unsigned segments)
const override;
133 virtual const geos::geom::Geometry& geosGeometry()
const = 0;
135 virtual const geos::geom::prep::PreparedGeometry* geosPreparedGeometry()
const = 0;
137 std::shared_ptr<DtGeosGeometry> shared_from_this();
138 std::shared_ptr<const DtGeosGeometry> shared_from_this()
const;
140 void markValid() { myValidFlag =
true; };
143 boost::optional<bool> myValidFlag;
155 typedef geos::geom::LineString
type;
161 typedef geos::geom::Polygon
type;
167 typedef geos::geom::GeometryCollection
type;
170 template <DtFeatureGeometry::Type T>
173 #ifdef DtObjectDebugger_Enable
179 typedef std::shared_ptr<DtGeosGeometryImpl>
Ptr;
186 virtual Type type()
const override;
188 virtual unsigned numberOfSubGeometries()
const override;
189 virtual std::unique_ptr<GeometryVector> subGeometries()
const override;
#define DT_DLL_features
stop complaining about multiple independent base classes for boost::noncopyable this should probably ...
Definition: featuresDefines.h:41
double length(const dvec3 &theVec)
Definition: DtVecUtils.h:20
DtFeatureGeometry implementation wrapping a geos feature.
Definition: geosGeometry.h:29
DtGeosGeometryImpl()
Definition: geosGeometry.h:181
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
Default on in debug, off in release.
Definition: objectCounter.h:27
Definition: featureGeometry.h:65
geos::geom::Point type
Definition: geosGeometry.h:149
DtGeosGeometryImpl< DtFeatureGeometry::AreaType > DtGeosArea
Definition: geosGeometry.h:200
geos::geom::Geometry type
Definition: geosGeometry.h:45
geos::geom::GeometryCollection type
Definition: geosGeometry.h:167
geos::geom::Polygon type
Definition: geosGeometry.h:161
DtGeosGeometryImpl(const DtGeosGeometryImpl &orig)
Definition: geosGeometry.h:182
Definition: geosGeometry.h:43
Handle< PointType > Point
Definition: featureGeometry.h:74
virtual const GeosType< T >::type & geosGeometry() const override
Definition: geosGeometry.h:191
Represents some coordinate system. The terms "coordinate system", "projection", "spatial reference"...
Definition: proj.h:52
std::shared_ptr< DtGeosGeometryImpl > Ptr
Definition: geosGeometry.h:179
Definition: vrfObjectManipulationHandlerBaseClass.h:60
DtGeosGeometry()
Definition: geosGeometry.h:48
Handle< PathType > Path
Definition: featureGeometry.h:75
std::shared_ptr< DtGeosGeometry > Ptr
Definition: geosGeometry.h:36
DtGeosGeometryImpl< DtFeatureGeometry::PathType > DtGeosPath
Definition: geosGeometry.h:199
Create a new MAK exception type that inherits from boost::exception. Tag is what differentiates this ...
Definition: taggedException.h:15
std::vector< geos::geom::Coordinate > CoordinateVector
Definition: geosGeometry.h:51
#define DtTHROW_NEW_STD_EXCEPTION(exceptionClass, errorMsg)
A version of DtTHROW_NEW that passes char* strings to the exception constructor instead of DtString t...
Definition: featureGeometry.h:24
Definition: geosGeometry.h:171
DtFeatureGeometry::Type Type
Definition: geosGeometry.h:40
DtGeosGeometryImpl< DtFeatureGeometry::PointType > DtGeosPoint
Definition: geosGeometry.h:198
geos::geom::LineString type
Definition: geosGeometry.h:155
DtFeatureGeometry::Implementation Implementation
Definition: geosGeometry.h:39
std::shared_ptr< const DtGeosGeometry > CPtr
Definition: geosGeometry.h:37
Represents a feature geometry.
Definition: featureGeometry.h:44
DtGeosGeometryImpl< DtFeatureGeometry::UnknownType > DtGeosUnknown
Definition: geosGeometry.h:197