pub struct PolygonizerOptions {
pub node_input: bool,
pub snap_grid_size: f64,
pub pre_snap_tolerance: f64,
pub extract_only_polygonal: bool,
pub snap_strategy: SnapStrategy,
pub noding: NodingOptions,
pub containment: ContainmentOptions,
pub determinism: DeterminismOptions,
pub diagnostics: DiagnosticsOptions,
pub provenance: ProvenanceOptions,
pub input_profile_id: Option<String>,
}Expand description
The canonical configuration object for the geo-polygonize engine.
This struct controls every aspect of the polygonization pipeline, including topological robustness, feature output, containment policies, noding, and determinism.
Fields§
§node_input: boolWhether to robustly node the input before polygonization.
Enable this for real-world linework where segment intersections may not already exist as explicit vertices. This is slower than the fast path but avoids missing faces and unresolved crossings.
Default: false
snap_grid_size: f64The snapping grid size used for vertex deduplication and noding operations.
Vertices falling within the same grid cell are coalesced. A size of 0.0
indicates exact floating-point evaluation without grid snapping.
Default: 1e-10
pre_snap_tolerance: f64Snap input segments to nearby vertices from exact-noded input linework before grid noding.
A value of 0.0 disables pre-snap. This mirrors the CFB/Shapely
snap(line, unary_union(all_lines), tolerance) step closely enough to
close small CAD gaps before polygonization.
Default: 0.0
extract_only_polygonal: boolIf true, only pure, outermost polygonal shells are returned.
Floating dangles, internal cut-lines, or invalid rings will be discarded.
Default: false
snap_strategy: SnapStrategyControls robust snap noding and output coordinate handling.
See SnapStrategy for differences between strict Grid snapping and
Shapely/GEOS GeosCompat strategies.
Default: SnapStrategy::Grid
noding: NodingOptionsConfigures the noding engine backend and behavior.
containment: ContainmentOptionsConfigures how topological relationships (containment) are calculated during face formation.
determinism: DeterminismOptionsConfiguration for enforcing exact topological determinism.
diagnostics: DiagnosticsOptionsOptions for capturing diagnostic topology failures.
provenance: ProvenanceOptionsOptions for mapping final faces back to original input geometry IDs.
input_profile_id: Option<String>An optional identifier for the input dataset.
Implementations§
Source§impl PolygonizerOptions
impl PolygonizerOptions
pub fn cfb_robust_v1() -> Self
Trait Implementations§
Source§impl Clone for PolygonizerOptions
impl Clone for PolygonizerOptions
Source§fn clone(&self) -> PolygonizerOptions
fn clone(&self) -> PolygonizerOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolygonizerOptions
impl Debug for PolygonizerOptions
Source§impl Default for PolygonizerOptions
impl Default for PolygonizerOptions
Source§impl<'de> Deserialize<'de> for PolygonizerOptions
impl<'de> Deserialize<'de> for PolygonizerOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PolygonizerOptions
impl Serialize for PolygonizerOptions
Source§impl TS for PolygonizerOptions
impl TS for PolygonizerOptions
Source§type WithoutGenerics = PolygonizerOptions
type WithoutGenerics = PolygonizerOptions
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = PolygonizerOptions
type OptionInnerType = PolygonizerOptions
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for PolygonizerOptions
impl RefUnwindSafe for PolygonizerOptions
impl Send for PolygonizerOptions
impl Sync for PolygonizerOptions
impl Unpin for PolygonizerOptions
impl UnsafeUnpin for PolygonizerOptions
impl UnwindSafe for PolygonizerOptions
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more