@@ -19,7 +19,7 @@ complexity involved with handling complex geometry structures.
19
19
For example, a simple way to flip the x and y coordinates of a geometry is:
20
20
21
21
```julia
22
- flipped_geom = GO.apply(GI.PointTrait, geom) do p
22
+ flipped_geom = GO.apply(GI.PointTrait() , geom) do p
23
23
(GI.y(p), GI.x(p))
24
24
end
25
25
```
@@ -157,7 +157,7 @@ by passing the keyword argument `threaded=true` to `apply`.
157
157
=#
158
158
159
159
"""
160
- apply(f, target::Type{<: AbstractTrait}, obj; kw...)
160
+ apply(f, target::Union{TraitTarget, GI. AbstractTrait}, obj; kw...)
161
161
162
162
Reconstruct a geometry, feature, feature collection, or nested vectors of
163
163
either using the function `f` on the `target` trait.
@@ -334,7 +334,7 @@ for T in (
334
334
end
335
335
336
336
"""
337
- applyreduce(f, op, target::Type{<: AbstractTrait}, obj; threaded)
337
+ applyreduce(f, op, target::Union{TraitTarget, GI. AbstractTrait}, obj; threaded)
338
338
339
339
Apply function `f` to all objects with the `target` trait,
340
340
and reduce the result with an `op` like `+`.
363
363
if Tables. istable (iterable)
364
364
_applyreduce_table (f, op, target, iterable; threaded, init)
365
365
else
366
- applyreduce_iterable (i) = _applyreduce (f, op, target, x ; threaded= _False (), init)
366
+ applyreduce_iterable (i) = _applyreduce (f, op, target, i ; threaded= _False (), init)
367
367
if threaded isa _True # Try to `collect` and reduce over the vector with threads
368
368
_applyreduce (f, op, target, collect (iterable); threaded, init)
369
369
else
0 commit comments