SFCGAL  2.2.0
Namespaces | Classes | Typedefs | Enumerations | Functions
SFCGAL::detail Namespace Reference

Implementation details namespace. More...

Namespaces

 algorithm
 Algorithm detail namespace.
 
 io
 Input/output detail namespace.
 

Classes

struct  BoxCollection
 BoxCollection for use with CGAL::Box_intersection_d. More...
 
class  CollectionElement
 CollectionElement, a Primitive with flags Primitive : Point_d, Segment_d, Surface_d, Volume_d. More...
 
struct  ComparePoints
 
struct  ComplexComparator
 lexicographic order on complex More...
 
struct  ConstraintInfo
 Structure to identify constraint sources for topology-preserving mode. More...
 
struct  ConstraintInfoCompare
 Comparison function for sorting constraints by original order. More...
 
struct  ConstraintOrderInfo
 Structure to store constraint order information Allows recovering the original insertion order after simplification. More...
 
struct  dim_t
 Create a distinct type for each dimension. More...
 
class  EnvelopeVisitor
 Get the list of points from a Geometry. More...
 
class  ForceValidityVisitor
 
class  GeometrySet
 A GeometrySet represents a set of CGAL primitives. More...
 
class  GetPointsVisitor
 Get the list of points from a Geometry. More...
 
struct  Halfedge_with_mark
 Extended polyhedron_3 type with a boolean marker on halfedges This is used internally for polyhedra boolean operations. More...
 
struct  HandleCollection
 HandleCollection. Used to store PrimitiveHandle. More...
 
class  Interval
 Represents an interval. More...
 
struct  IsPrimitiveLarger
 Tests if a primitive type has a larger dimension than another one. More...
 
struct  Items_with_mark_on_hedge
 An items type using my halfedge. More...
 
struct  NoVolume
 
struct  Point_d
 Another way of looking at TypeForDimension<Dim>::Point. More...
 
struct  PrimitiveBox
 PrimitiveBox. Type used for CGAL::Box_intersection_d. More...
 
struct  PrimitiveDimension
 Get a primitive dimension (0: point, 1: line, 2: surface, 3: volume) from a type. More...
 
struct  PrimitiveDimension< TypeForDimension< 2 >::Segment >
 
struct  PrimitiveDimension< TypeForDimension< 2 >::Surface >
 
struct  PrimitiveDimension< TypeForDimension< 2 >::Volume >
 
struct  PrimitiveDimension< TypeForDimension< 3 >::Segment >
 
struct  PrimitiveDimension< TypeForDimension< 3 >::Surface >
 
struct  PrimitiveDimension< TypeForDimension< 3 >::Volume >
 
struct  PrimitiveHandle
 Primitive handle. More...
 
struct  Segment_d
 Another way of looking at TypeForDimension<Dim>::Segment. More...
 
class  SegmentStore
 Collection of segments from a geometry for interpolation. More...
 
struct  Surface_d
 Another way of looking at TypeForDimension<Dim>::Surface. More...
 
struct  TypeForDimension
 Generic traits, default dimension is 2. More...
 
struct  TypeForDimension< 3 >
 Specialization for dimension = 3. More...
 
struct  Volume_d
 Another way of looking at TypeForDimension<Dim>::Volume. More...
 

Typedefs

using K = CGAL::Projection_traits_xy_3< SFCGAL::Kernel >
 
using Vb = PS::Vertex_base_2< K >
 
using Fb = CGAL::Constrained_triangulation_face_base_2< K >
 
using TDS = CGAL::Triangulation_data_structure_2< Vb, Fb >
 
using CDT = CGAL::Constrained_Delaunay_triangulation_2< K, TDS, CGAL::Exact_predicates_tag >
 
using CT = CGAL::Constrained_triangulation_plus_2< CDT >
 
using Constraint_id = CT::Constraint_id
 
using Constraint_iterator = CT::Constraint_iterator
 
using Points_in_constraint_iterator = CT::Points_in_constraint_iterator
 
using Stop = PS::Stop_above_cost_threshold
 
using Cost = PS::Squared_distance_cost
 
using ConstraintInfoType = ConstraintOrderInfo< Constraint_id >
 
typedef CGAL::Polyhedron_3< Kernel, Items_with_mark_on_hedgeMarkedPolyhedron
 

Enumerations

enum  PrimitiveType { PrimitivePoint = 0, PrimitiveSegment = 1, PrimitiveSurface = 2, PrimitiveVolume = 3 }
 Primitive type enumeration. Note that the value is the dimension ! More...
 
enum  ElementFlag { FLAG_IS_PLANAR = 1 }
 Flags available for each type of Geometry type. More...
 

Functions

static std::vector< CGALPoint > extractPointsFromLineString (const LineString &lineString)
 Extracts points from a LineString to create a CGAL point vector. More...
 
static std::vector< CGALPoint > extractPointsFromRing (const LineString &ring)
 Extracts points from a ring to create a CGAL point vector. More...
 
static LineString buildLineStringFromConstraint (const CT &ct, const Constraint_id &cid, const SegmentStore &store, CoordinateType dimension)
 Builds a LineString from constraint points. More...
 
static bool extractLineStringConstraints (const LineString &lineString, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx)
 Extracts LineString constraints and adds them to the triangulation. More...
 
static bool extractPolygonExteriorConstraint (const LineString &ring, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx, std::size_t polyIdx, ConstraintInfo::Type type)
 Extracts polygon exterior ring constraints and adds them to the triangulation. More...
 
static void extractPolygonInteriorConstraints (const Polygon &polygon, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx, std::size_t polyIdx, ConstraintInfo::Type type)
 Extracts polygon interior ring constraints and adds them to the triangulation. More...
 
static void extractPolygonConstraints (const Polygon &polygon, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx)
 Extracts polygon constraints and adds them to the triangulation. More...
 
static void extractMultiPolygonConstraints (const MultiPolygon &multiPolygon, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx)
 Extracts MultiPolygon constraints and adds them to the triangulation. More...
 
static void extractPolyhedralSurfaceConstraints (const PolyhedralSurface &surface, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx)
 Extracts PolyhedralSurface constraints and adds them to the triangulation. More...
 
static void extractAllConstraints (const GeometryCollection &collection, CT &ct, std::vector< ConstraintInfoType > &constraintInfos)
 Extracts constraints from all geometry types in a collection. More...
 
static void organizeSimplifiedConstraints (const CT &ct, const std::vector< ConstraintInfoType > &constraintInfos, const SegmentStore &store, CoordinateType dimension, std::map< size_t, std::unique_ptr< LineString >> &linestrings, std::map< size_t, std::map< size_t, LineString >> &polygonRings, std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &multiPolygonRings, std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &polyhedralSurfaceRings)
 Organizes simplified constraints into corresponding data structures. More...
 
static void reconstructLineString (const std::map< size_t, std::unique_ptr< LineString >> &linestrings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result)
 Reconstructs a LineString in a GeometryCollection from simplified constraints. More...
 
static void reconstructPolygon (const std::map< size_t, std::map< size_t, LineString >> &polygonRings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result)
 Reconstructs a Polygon in a GeometryCollection from simplified rings. More...
 
static void reconstructMultiPolygon (const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &multiPolygonRings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result)
 Reconstructs a MultiPolygon in a GeometryCollection from simplified rings, preserving dimensions. More...
 
static void reconstructPolyhedralSurface (const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &polyhedralSurfaceRings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result)
 Reconstructs a PolyhedralSurface in a GeometryCollection from simplified rings, preserving dimensions. More...
 
static std::unique_ptr< GeometryCollectionreconstructAllGeometries (const GeometryCollection &collection, const std::map< size_t, std::unique_ptr< LineString >> &linestrings, const std::map< size_t, std::map< size_t, LineString >> &polygonRings, const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &multiPolygonRings, const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &polyhedralSurfaceRings)
 Reconstructs all geometries from simplified constraints, preserving dimensions. More...
 
auto simplifyLineString (const LineString &lineString, double threshold, bool, const SegmentStore &store) -> std::unique_ptr< Geometry >
 Simplifies a LineString. More...
 
auto simplifyMultiLineString (const MultiLineString &multiLine, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry >
 Simplifies a MultiLineString. More...
 
auto simplifyPolygon (const Polygon &polygon, double threshold, bool) -> std::unique_ptr< Geometry >
 Simplifies a Polygon. More...
 
auto simplifyMultiPolygon (const MultiPolygon &multiPolygon, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry >
 Simplifies a MultiPolygon. More...
 
auto simplifyPolyhedralSurface (const PolyhedralSurface &polySurface, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry >
 Simplifies a PolyhedralSurface. More...
 
auto simplifyGeometryCollectionTopology (const GeometryCollection &collection, double threshold) -> std::unique_ptr< Geometry >
 Simplifies a GeometryCollection with topology preservation. More...
 
auto simplify (const Geometry &geometry, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry >
 Wrapper for the algorithm::simplify function. More...
 
auto simplifyGeometryCollection (const GeometryCollection &collection, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry >
 Simplifies a GeometryCollection. More...
 
void _decompose_triangle (const Triangle &tri, GeometrySet< 2 >::SurfaceCollection &surfaces, dim_t< 2 >)
 
void _decompose_triangle (const Triangle &tri, GeometrySet< 3 >::SurfaceCollection &surfaces, dim_t< 3 >)
 
void _decompose_polygon (const Polygon &poly, GeometrySet< 2 >::SurfaceCollection &surfaces, dim_t< 2 >)
 
void _decompose_polygon (const Polygon &poly, GeometrySet< 3 >::SurfaceCollection &surfaces, dim_t< 3 >)
 
void _decompose_solid (const Solid &, GeometrySet< 2 >::VolumeCollection &, dim_t< 2 >)
 
void _decompose_solid (const Solid &solid, GeometrySet< 3 >::VolumeCollection &volumes, dim_t< 3 >)
 
template<int Dim>
void recompose_points (const typename GeometrySet< Dim >::PointCollection &points, std::vector< Geometry * > &rpoints, dim_t< Dim >)
 
template<int Dim>
void recompose_segments (const typename GeometrySet< Dim >::SegmentCollection &segments, std::vector< Geometry * > &lines, dim_t< Dim >)
 
void recompose_surfaces (const GeometrySet< 2 >::SurfaceCollection &surfaces, std::vector< Geometry * > &output, dim_t< 2 >)
 
void recompose_surfaces (const GeometrySet< 3 >::SurfaceCollection &surfaces, std::vector< Geometry * > &output, dim_t< 3 >)
 
void recompose_volumes (const GeometrySet< 2 >::VolumeCollection &, std::vector< Geometry * > &, dim_t< 2 >)
 
void recompose_volumes (const GeometrySet< 3 >::VolumeCollection &volumes, std::vector< Geometry * > &output, dim_t< 3 >)
 
void _collect_points (const CGAL::Polygon_with_holes_2< Kernel > &poly, GeometrySet< 2 >::PointCollection &points)
 
void _collect_points (const CGAL::Triangle_3< Kernel > &tri, GeometrySet< 3 >::PointCollection &points)
 
void _collect_points (const NoVolume &, GeometrySet< 2 >::PointCollection &)
 
void _collect_points (const MarkedPolyhedron &poly, GeometrySet< 3 >::PointCollection &points)
 
template<int Dim, class IT >
void _filter_covered (IT ibegin, IT iend, GeometrySet< Dim > &output)
 
auto operator<< (std::ostream &, const GeometrySet< 2 > &g)
 Display operator. More...
 
auto operator<< (std::ostream &, const GeometrySet< 3 > &g)
 Display operator. More...
 
template<class Primitive >
std::ostream & operator<< (std::ostream &ostr, const CollectionElement< Primitive > &p)
 
CGAL::Bbox_2 compute_solid_bbox (const NoVolume &, dim_t< 2 >)
 
CGAL::Bbox_3 compute_solid_bbox (const TypeForDimension< 3 >::Volume &vol, dim_t< 3 >)
 
auto polygonSetToMultiPolygon (const CGAL::Polygon_set_2< Kernel > &polygonSet)
 convert a CGAL::Polygon_set_2 to a MultiPolygon More...
 

Detailed Description

Implementation details namespace.

Typedef Documentation

using SFCGAL::detail::CDT = typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, CGAL::Exact_predicates_tag>
using SFCGAL::detail::Constraint_id = typedef CT::Constraint_id
using SFCGAL::detail::Constraint_iterator = typedef CT::Constraint_iterator
using SFCGAL::detail::Cost = typedef PS::Squared_distance_cost
using SFCGAL::detail::CT = typedef CGAL::Constrained_triangulation_plus_2<CDT>
using SFCGAL::detail::Fb = typedef CGAL::Constrained_triangulation_face_base_2<K>
using SFCGAL::detail::K = typedef CGAL::Projection_traits_xy_3<SFCGAL::Kernel>
using SFCGAL::detail::Points_in_constraint_iterator = typedef CT::Points_in_constraint_iterator
using SFCGAL::detail::Stop = typedef PS::Stop_above_cost_threshold
using SFCGAL::detail::TDS = typedef CGAL::Triangulation_data_structure_2<Vb, Fb>
using SFCGAL::detail::Vb = typedef PS::Vertex_base_2<K>

Enumeration Type Documentation

Flags available for each type of Geometry type.

Primitives can be 'flagged' in order to speed up recomposition

Enumerator
FLAG_IS_PLANAR 

Primitive type enumeration. Note that the value is the dimension !

Enumerator
PrimitivePoint 
PrimitiveSegment 
PrimitiveSurface 
PrimitiveVolume 

Function Documentation

void SFCGAL::detail::_collect_points ( const CGAL::Polygon_with_holes_2< Kernel > &  poly,
GeometrySet< 2 >::PointCollection &  points 
)
void SFCGAL::detail::_collect_points ( const CGAL::Triangle_3< Kernel > &  tri,
GeometrySet< 3 >::PointCollection &  points 
)
void SFCGAL::detail::_collect_points ( const NoVolume ,
GeometrySet< 2 >::PointCollection &   
)
void SFCGAL::detail::_collect_points ( const MarkedPolyhedron poly,
GeometrySet< 3 >::PointCollection &  points 
)
void SFCGAL::detail::_decompose_polygon ( const Polygon poly,
GeometrySet< 2 >::SurfaceCollection &  surfaces,
dim_t< 2 >   
)
void SFCGAL::detail::_decompose_polygon ( const Polygon poly,
GeometrySet< 3 >::SurfaceCollection &  surfaces,
dim_t< 3 >   
)
void SFCGAL::detail::_decompose_solid ( const Solid ,
GeometrySet< 2 >::VolumeCollection &  ,
dim_t< 2 >   
)
void SFCGAL::detail::_decompose_solid ( const Solid solid,
GeometrySet< 3 >::VolumeCollection &  volumes,
dim_t< 3 >   
)
void SFCGAL::detail::_decompose_triangle ( const Triangle tri,
GeometrySet< 2 >::SurfaceCollection &  surfaces,
dim_t< 2 >   
)
void SFCGAL::detail::_decompose_triangle ( const Triangle tri,
GeometrySet< 3 >::SurfaceCollection &  surfaces,
dim_t< 3 >   
)
template<int Dim, class IT >
void SFCGAL::detail::_filter_covered ( IT  ibegin,
IT  iend,
GeometrySet< Dim > &  output 
)
static LineString SFCGAL::detail::buildLineStringFromConstraint ( const CT ct,
const Constraint_id cid,
const SegmentStore store,
CoordinateType  dimension 
)
static

Builds a LineString from constraint points.

Parameters
ctThe constrained triangulation
cidThe constraint ID
storeThe segment store for interpolation
dimensionThe coordinate dimension type
Returns
A LineString built from the simplified constraint
CGAL::Bbox_2 SFCGAL::detail::compute_solid_bbox ( const NoVolume ,
dim_t< 2 >   
)
inline
CGAL::Bbox_3 SFCGAL::detail::compute_solid_bbox ( const TypeForDimension< 3 >::Volume &  vol,
dim_t< 3 >   
)
inline
static void SFCGAL::detail::extractAllConstraints ( const GeometryCollection collection,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos 
)
static

Extracts constraints from all geometry types in a collection.

Parameters
collectionThe source GeometryCollection
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
static bool SFCGAL::detail::extractLineStringConstraints ( const LineString lineString,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos,
std::size_t  geomIdx 
)
static

Extracts LineString constraints and adds them to the triangulation.

Parameters
lineStringThe source LineString
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
geomIdxThe geometry index
Returns
true if constraint was added, false otherwise
static void SFCGAL::detail::extractMultiPolygonConstraints ( const MultiPolygon multiPolygon,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos,
std::size_t  geomIdx 
)
static

Extracts MultiPolygon constraints and adds them to the triangulation.

Parameters
multiPolygonThe source MultiPolygon
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
geomIdxThe geometry index
static std::vector<CGALPoint> SFCGAL::detail::extractPointsFromLineString ( const LineString lineString)
static

Extracts points from a LineString to create a CGAL point vector.

Parameters
lineStringThe source LineString
Returns
Vector of CGALPoints
static std::vector<CGALPoint> SFCGAL::detail::extractPointsFromRing ( const LineString ring)
static

Extracts points from a ring to create a CGAL point vector.

Parameters
ringThe source ring (LineString)
Returns
Vector of CGALPoints
static void SFCGAL::detail::extractPolygonConstraints ( const Polygon polygon,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos,
std::size_t  geomIdx 
)
static

Extracts polygon constraints and adds them to the triangulation.

Parameters
polygonThe source polygon
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
geomIdxThe geometry index
static bool SFCGAL::detail::extractPolygonExteriorConstraint ( const LineString ring,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos,
std::size_t  geomIdx,
std::size_t  polyIdx,
ConstraintInfo::Type  type 
)
static

Extracts polygon exterior ring constraints and adds them to the triangulation.

Parameters
ringThe exterior ring
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
geomIdxThe geometry index
typeThe constraint type
Returns
true if constraint was added, false otherwise
static void SFCGAL::detail::extractPolygonInteriorConstraints ( const Polygon polygon,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos,
std::size_t  geomIdx,
std::size_t  polyIdx,
ConstraintInfo::Type  type 
)
static

Extracts polygon interior ring constraints and adds them to the triangulation.

Parameters
polygonThe source polygon
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
geomIdxThe geometry index
polyIdxThe polygon index in a collection
typeThe constraint type for interior rings
static void SFCGAL::detail::extractPolyhedralSurfaceConstraints ( const PolyhedralSurface surface,
CT ct,
std::vector< ConstraintInfoType > &  constraintInfos,
std::size_t  geomIdx 
)
static

Extracts PolyhedralSurface constraints and adds them to the triangulation.

Parameters
surfaceThe source PolyhedralSurface
ctThe constrained triangulation to add to
constraintInfosCollection of constraint infos
geomIdxThe geometry index
template<class Primitive >
std::ostream& SFCGAL::detail::operator<< ( std::ostream &  ostr,
const CollectionElement< Primitive > &  p 
)
SFCGAL_API std::ostream & SFCGAL::detail::operator<< ( std::ostream &  ostr,
const GeometrySet< 2 > &  g 
) -> std::ostream &

Display operator.

SFCGAL_API std::ostream & SFCGAL::detail::operator<< ( std::ostream &  ostr,
const GeometrySet< 3 > &  g 
) -> std::ostream &

Display operator.

static void SFCGAL::detail::organizeSimplifiedConstraints ( const CT ct,
const std::vector< ConstraintInfoType > &  constraintInfos,
const SegmentStore store,
CoordinateType  dimension,
std::map< size_t, std::unique_ptr< LineString >> &  linestrings,
std::map< size_t, std::map< size_t, LineString >> &  polygonRings,
std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &  multiPolygonRings,
std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &  polyhedralSurfaceRings 
)
static

Organizes simplified constraints into corresponding data structures.

Parameters
ctThe constrained triangulation with simplified constraints
constraintInfosCollection of constraint infos
storeThe segment store for interpolation
dimensionThe coordinate dimension type
linestringsOutput map for linestrings
polygonRingsOutput map for polygon rings
multiPolygonRingsOutput map for multipolygon rings
polyhedralSurfaceRingsOutput map for polyhedral surface rings
SFCGAL_API std::unique_ptr< MultiPolygon > SFCGAL::detail::polygonSetToMultiPolygon ( const CGAL::Polygon_set_2< Kernel > &  polygonSet)

convert a CGAL::Polygon_set_2 to a MultiPolygon

Todo:
unittest
template<int Dim>
void SFCGAL::detail::recompose_points ( const typename GeometrySet< Dim >::PointCollection &  points,
std::vector< Geometry * > &  rpoints,
dim_t< Dim >   
)
template<int Dim>
void SFCGAL::detail::recompose_segments ( const typename GeometrySet< Dim >::SegmentCollection &  segments,
std::vector< Geometry * > &  lines,
dim_t< Dim >   
)
void SFCGAL::detail::recompose_surfaces ( const GeometrySet< 2 >::SurfaceCollection &  surfaces,
std::vector< Geometry * > &  output,
dim_t< 2 >   
)
void SFCGAL::detail::recompose_surfaces ( const GeometrySet< 3 >::SurfaceCollection &  surfaces,
std::vector< Geometry * > &  output,
dim_t< 3 >   
)
void SFCGAL::detail::recompose_volumes ( const GeometrySet< 2 >::VolumeCollection &  ,
std::vector< Geometry * > &  ,
dim_t< 2 >   
)
void SFCGAL::detail::recompose_volumes ( const GeometrySet< 3 >::VolumeCollection &  volumes,
std::vector< Geometry * > &  output,
dim_t< 3 >   
)
static std::unique_ptr<GeometryCollection> SFCGAL::detail::reconstructAllGeometries ( const GeometryCollection collection,
const std::map< size_t, std::unique_ptr< LineString >> &  linestrings,
const std::map< size_t, std::map< size_t, LineString >> &  polygonRings,
const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &  multiPolygonRings,
const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &  polyhedralSurfaceRings 
)
static

Reconstructs all geometries from simplified constraints, preserving dimensions.

Parameters
collectionThe original GeometryCollection
linestringsMap of simplified linestrings
polygonRingsMap of simplified polygon rings
multiPolygonRingsMap of simplified multipolygon rings
polyhedralSurfaceRingsMap of simplified polyhedral surface rings
Returns
A unique_ptr to a GeometryCollection with reconstructed geometries
static void SFCGAL::detail::reconstructLineString ( const std::map< size_t, std::unique_ptr< LineString >> &  linestrings,
const GeometryCollection collection,
std::size_t  geomIdx,
GeometryCollection result 
)
static

Reconstructs a LineString in a GeometryCollection from simplified constraints.

Parameters
linestringsMap of simplified linestrings
collectionThe original GeometryCollection
geomIdxThe geometry index
resultThe output GeometryCollection
static void SFCGAL::detail::reconstructMultiPolygon ( const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &  multiPolygonRings,
const GeometryCollection collection,
std::size_t  geomIdx,
GeometryCollection result 
)
static

Reconstructs a MultiPolygon in a GeometryCollection from simplified rings, preserving dimensions.

Parameters
multiPolygonRingsMap of simplified multipolygon rings
collectionThe original GeometryCollection
geomIdxThe geometry index
resultThe output GeometryCollection
static void SFCGAL::detail::reconstructPolygon ( const std::map< size_t, std::map< size_t, LineString >> &  polygonRings,
const GeometryCollection collection,
std::size_t  geomIdx,
GeometryCollection result 
)
static

Reconstructs a Polygon in a GeometryCollection from simplified rings.

Parameters
polygonRingsMap of simplified polygon rings
collectionThe original GeometryCollection
geomIdxThe geometry index
resultThe output GeometryCollection
static void SFCGAL::detail::reconstructPolyhedralSurface ( const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &  polyhedralSurfaceRings,
const GeometryCollection collection,
std::size_t  geomIdx,
GeometryCollection result 
)
static

Reconstructs a PolyhedralSurface in a GeometryCollection from simplified rings, preserving dimensions.

Parameters
polyhedralSurfaceRingsMap of simplified polyhedral surface rings
collectionThe original GeometryCollection
geomIdxThe geometry index
resultThe output GeometryCollection
auto SFCGAL::detail::simplify ( const Geometry &  geometry,
double  threshold,
bool  preserveTopology 
) -> std::unique_ptr<Geometry>
inline

Wrapper for the algorithm::simplify function.

Parameters
geometryThe geometry to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
Returns
A simplified geometry
auto SFCGAL::detail::simplifyGeometryCollection ( const GeometryCollection collection,
double  threshold,
bool  preserveTopology 
) -> std::unique_ptr< Geometry >

Simplifies a GeometryCollection.

Parameters
collectionThe GeometryCollection to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
Returns
A simplified geometry
auto SFCGAL::detail::simplifyGeometryCollectionTopology ( const GeometryCollection collection,
double  threshold 
) -> std::unique_ptr< Geometry >

Simplifies a GeometryCollection with topology preservation.

Parameters
collectionThe GeometryCollection to simplify
thresholdThe simplification threshold
Returns
A simplified geometry
auto SFCGAL::detail::simplifyLineString ( const LineString lineString,
double  threshold,
bool  ,
const SegmentStore store 
) -> std::unique_ptr< Geometry >

Simplifies a LineString.

Parameters
lineStringThe LineString to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
storeThe segment store for interpolation
Returns
A simplified geometry
auto SFCGAL::detail::simplifyMultiLineString ( const MultiLineString multiLine,
double  threshold,
bool  preserveTopology 
) -> std::unique_ptr< Geometry >

Simplifies a MultiLineString.

Parameters
multiLineThe MultiLineString to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
Returns
A simplified geometry
auto SFCGAL::detail::simplifyMultiPolygon ( const MultiPolygon multiPolygon,
double  threshold,
bool  preserveTopology 
) -> std::unique_ptr< Geometry >

Simplifies a MultiPolygon.

Parameters
multiPolygonThe MultiPolygon to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
Returns
A simplified geometry
auto SFCGAL::detail::simplifyPolygon ( const Polygon polygon,
double  threshold,
bool   
) -> std::unique_ptr< Geometry >

Simplifies a Polygon.

Parameters
polygonThe Polygon to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
Returns
A simplified geometry
auto SFCGAL::detail::simplifyPolyhedralSurface ( const PolyhedralSurface polySurface,
double  threshold,
bool  preserveTopology 
) -> std::unique_ptr< Geometry >

Simplifies a PolyhedralSurface.

Parameters
polySurfaceThe PolyhedralSurface to simplify
thresholdThe simplification threshold
preserveTopologyWhether to preserve topology
Returns
A simplified geometry