Skip to content

Commit 477b280

Browse files
evetionasinghvi17
andauthored
Allow conversion from GeometryVector (from GeoDataFrames). (#226)
* Allow conversion from GeometryVector (from GeoDataFrames). * Convert collection to vector in GeometryCollection Ensure collection is converted to a vector for custom axes support. --------- Co-authored-by: Anshul Singhvi <[email protected]>
1 parent 800c6b4 commit 477b280

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LibGEOS"
22
uuid = "a90b1aa1-3769-5649-ba7e-abc5a9d163eb"
33
license = "MIT"
4-
version = "0.9.5"
4+
version = "0.9.6"
55

66
[deps]
77
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"

src/geos_types.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,12 @@ mutable struct GeometryCollection <: AbstractMultiGeometry
378378
context,
379379
)
380380
GeometryCollection(
381-
collection::Vector{<:AbstractGeometry},
381+
collection::AbstractVector{<:AbstractGeometry},
382382
context::GEOSContext = get_global_context(),
383383
) = GeometryCollection(
384384
createCollection(
385385
GEOS_GEOMETRYCOLLECTION,
386-
GEOSGeom[cloneGeom(geom, context) for geom in collection],
386+
vec(GEOSGeom[cloneGeom(geom, context) for geom in collection]), # just in case `collection` has custom axes
387387
context,
388388
),
389389
context,

test/test_geo_interface.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ const LG = LibGEOS
6767
@test GeoInterface.testgeometry(mpt)
6868
@test GeoInterface.is3d(mpt) == false
6969
Plots.plot(mpt)
70-
# Makie no longer plots GeometryBasics.MultiPoint
71-
@test_broken Makie.plot(mpt)
72-
73-
70+
Makie.plot(mpt)
7471

7572
@inferred GeoInterface.ncoord(mpt)
7673
@inferred GeoInterface.ngeom(mpt)

0 commit comments

Comments
 (0)