diff --git a/src/transformations/segmentize.jl b/src/transformations/segmentize.jl index 32f42d2ff..df5882406 100644 --- a/src/transformations/segmentize.jl +++ b/src/transformations/segmentize.jl @@ -179,8 +179,8 @@ segmentize(method::Manifold, geom, max_distance::Real; threaded = _False()) = se # generic implementation function segmentize(method::Manifold, geom; max_distance, threaded::Union{Bool, BoolsAsTypes} = _False()) @assert max_distance > 0 "`max_distance` should be positive and nonzero! Found $(method.max_distance)." - segmentize_function(x) = _segmentize(method, x; max_distance) - return apply(segmentize_function, TraitTarget(GI.LinearRingTrait(), GI.LineStringTrait()), geom; threaded) + _segmentize_function(geom) = _segmentize(method, geom, GI.trait(geom); max_distance) + return apply(_segmentize_function, TraitTarget(GI.LinearRingTrait(), GI.LineStringTrait()), geom; threaded) end function segmentize(method::SegmentizeMethod, geom; threaded::Union{Bool, BoolsAsTypes} = _False())