@@ -17,12 +17,10 @@ function plottype_from_geomtrait(::Union{GI.GeometryCollectionTrait,GI.PolygonTr
1717 Makie. Poly
1818end
1919
20- GI. _makie_convert_arguments(t, geom) = Makie. convert_arguments(t, _convert_for_makie(geom))
21-
22- # Makie no longer plots MultiPoint so we need to convert it to Vector{Point}
23- _convert_for_makie(geom) = _convert_for_makie(GI. trait(geom), geom)
24- _convert_for_makie(trait:: GI.AbstractGeometryTrait , geom) = GI. convert(GB, geom)
25- _convert_for_makie(trait:: GI.MultiPointTrait , geom) = to_multipoint(trait, geom)
20+ function GI. _convert_arguments(t, geom):: Tuple
21+ geob = GI. convert(GB, geom)
22+ return Makie. convert_arguments(t, geob)
23+ end
2624
2725function operator_nangeom_if_missing_or_func(func, trait:: GI.AbstractGeometryTrait , ndims; numtype= Float64)
2826 nan_geom = _nan_geom(trait, ndims, numtype)
@@ -47,9 +45,8 @@ function GI._makie_convert_array_arguments(plottrait, geoms::AbstractArray{T})::
4745 end
4846 else
4947 # base case
50- _convert_for_makie
48+ Base . Fix1(GI . convert, GB)
5149 end
52-
5350 if Missing <: T
5451 return Makie. convert_arguments(
5552 plottrait,
@@ -67,6 +64,7 @@ function GI._makie_convert_array_arguments(plottrait, geoms::AbstractArray{T})::
6764 end
6865end
6966
67+
7068# Creating empty geometries from traits
7169function _geomtrait_for_array(arr)
7270 idx = findfirst(! ismissing, arr)
@@ -164,14 +162,14 @@ function to_multilinestring(::GI.GeometryCollectionTrait, geom)
164162 return GeometryBasics. MultiLineString(vcat(getproperty.(multilinestrings, :linestrings). .. ))
165163end
166164
167- # GB. MultiPoint does not plot anymore, needs to be a Vector{GB.Point}
165+ # TODO : MultiPoint is broken in Makie, but should be fixed there
168166to_multipoint(poly:: GB.Point ) = GB. MultiPoint([poly])
169- to_multipoint(poly:: Vector{GB.Point} ) = poly
170- to_multipoint(mp:: GB.MultiPoint ) = mp. points
167+ to_multipoint(poly:: Vector{GB.Point} ) = GB . MultiPoint( poly)
168+ to_multipoint(mp:: GB.MultiPoint ) = mp
171169to_multipoint(geom) = to_multipoint(GI. trait(geom), geom)
172170to_multipoint(geom:: AbstractVector ) = to_multipoint.(GI. trait.(geom), geom)
173- to_multipoint(:: GI.PointTrait , geom) = [GI. convert(GB, geom)]
174- to_multipoint(:: GI.MultiPointTrait , geom) = GI. convert.(( GB,), GI . getpoint( geom) )
171+ to_multipoint(:: GI.PointTrait , geom) = GB . MultiPoint( [GI. convert(GB, geom)])
172+ to_multipoint(:: GI.MultiPointTrait , geom) = GI. convert( GB, geom)
175173
176174# TODO
177175# Features and Feature collections
0 commit comments