Collection of segments from a geometry for interpolation.
More...
#include <SegmentStore.h>
|
| | SegmentStore ()=default |
| | Default constructor.
|
| void | addSegment (const Segment &segment) |
| | Add a segment to the store.
|
| auto | hasZ () const -> bool |
| | Check if store contains segments with Z coordinates.
|
| auto | hasM () const -> bool |
| | Check if store contains segments with M values.
|
| auto | findNearestSegment (double x, double y) const -> Segment |
| | Find the nearest segment to a point.
|
| auto | interpolateZM (double x, double y) const -> std::tuple< double, double > |
| | Interpolate Z and M values for a point.
|
| auto | extractSegments (const LineString &lineString) -> void |
| | Extract segments from a LineString for interpolation.
|
| auto | extractSegments (const Polygon &polygon) -> void |
| | Extract segments from a Polygon for interpolation.
|
| auto | extractSegments (const Geometry &geometry) -> void |
| | Extract segments from all geometry types.
|
| auto | createPoint (double x, double y, CoordinateType dimension) const -> Point |
| | Create a point with interpolated Z and M values.
|
Collection of segments from a geometry for interpolation.
◆ SegmentStore()
| SFCGAL::detail::SegmentStore::SegmentStore |
( |
| ) |
|
|
default |
◆ addSegment()
| void SFCGAL::detail::SegmentStore::addSegment |
( |
const Segment & | segment | ) |
|
|
inline |
Add a segment to the store.
- Parameters
-
| segment | The segment to add |
◆ createPoint()
| auto SFCGAL::detail::SegmentStore::createPoint |
( |
double | x, |
|
|
double | y, |
|
|
CoordinateType | dimension ) const -> Point |
|
inlinenodiscard |
Create a point with interpolated Z and M values.
- Parameters
-
| x | X-coordinate of the point |
| y | Y-coordinate of the point |
| dimension | The coordinate type for the point |
- Returns
- Point with interpolated Z and M values
◆ extractSegments() [1/3]
| auto SFCGAL::detail::SegmentStore::extractSegments |
( |
const Geometry & | geometry | ) |
-> void |
|
inline |
Extract segments from all geometry types.
- Parameters
-
| geometry | The geometry to extract segments from |
◆ extractSegments() [2/3]
| auto SFCGAL::detail::SegmentStore::extractSegments |
( |
const LineString & | lineString | ) |
-> void |
|
inline |
Extract segments from a LineString for interpolation.
- Parameters
-
| lineString | The linestring to extract segments from |
◆ extractSegments() [3/3]
| auto SFCGAL::detail::SegmentStore::extractSegments |
( |
const Polygon & | polygon | ) |
-> void |
|
inline |
Extract segments from a Polygon for interpolation.
- Parameters
-
| polygon | The polygon to extract segments from |
◆ findNearestSegment()
| auto SFCGAL::detail::SegmentStore::findNearestSegment |
( |
double | x, |
|
|
double | y ) const -> Segment |
|
inlinenodiscard |
Find the nearest segment to a point.
- Parameters
-
| x | X-coordinate of the point |
| y | Y-coordinate of the point |
- Returns
- The nearest segment to the given point
◆ hasM()
| auto SFCGAL::detail::SegmentStore::hasM |
( |
| ) |
const -> bool |
|
inlinenodiscard |
Check if store contains segments with M values.
- Returns
- True if any segment has M values
◆ hasZ()
| auto SFCGAL::detail::SegmentStore::hasZ |
( |
| ) |
const -> bool |
|
inlinenodiscard |
Check if store contains segments with Z coordinates.
- Returns
- True if any segment has Z coordinates
◆ interpolateZM()
| auto SFCGAL::detail::SegmentStore::interpolateZM |
( |
double | x, |
|
|
double | y ) const -> std::tuple< double, double > |
|
inlinenodiscard |
Interpolate Z and M values for a point.
- Parameters
-
| x | X-coordinate of the point |
| y | Y-coordinate of the point |
- Returns
- Tuple with interpolated (z, m) values, NaN if not applicable