From 420749d9e3a0c9ca917f886fc8764c73549ead7a Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 29 Nov 2023 23:37:42 +0100 Subject: [PATCH 01/12] Try to setup GeoInterfaceMakie as weak dependency --- Project.toml | 11 +++++++++++ ext/ArchGDALGeoInterfaceMakie.jl | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 ext/ArchGDALGeoInterfaceMakie.jl diff --git a/Project.toml b/Project.toml index 1cbfe96d..24a9f91f 100644 --- a/Project.toml +++ b/Project.toml @@ -15,9 +15,19 @@ GDAL = "add2ef01-049f-52c4-9ee2-e494f65e021a" GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f" GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" GeoInterfaceRecipes = "0329782f-3d07-4b52-b9f6-d3137cf03c7a" +GeoInterfaceMakie = "0edc0954-3250-4c18-859d-ec71c1660c08" ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534" +Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +[weakdeps] +Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" +GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" + + +[extensions] +ArchGDALMakie = "Makie" + [compat] CEnum = "0.4, 0.5" ColorTypes = "0.10, 0.11" @@ -27,6 +37,7 @@ GDAL = "1.5.1" GeoFormatTypes = "0.4.2" GeoInterface = "1" GeoInterfaceRecipes = "1.0" +GeoInterfaceMakie = "0.1" ImageCore = "0.8, 0.9, 0.10" Tables = "1" julia = "1.6" diff --git a/ext/ArchGDALGeoInterfaceMakie.jl b/ext/ArchGDALGeoInterfaceMakie.jl new file mode 100644 index 00000000..74832d07 --- /dev/null +++ b/ext/ArchGDALGeoInterfaceMakie.jl @@ -0,0 +1,8 @@ +module ArchGDALGeoInterfaceMakie +using GeoInterfaceMakie: GeoInterfaceMakie as GIM +using ArchGDAL: ArchGDAL + +println("ArchGDALGeoInterfaceMakie.jl") +GIM.@enable ArchGDAL.IGeometry +GIM.@enable ArchGDAL.Geometry +end \ No newline at end of file From 0f4f90b4c805fe225d539dcf79ac30d64ec62cd4 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 29 Nov 2023 23:45:32 +0100 Subject: [PATCH 02/12] Add GeoInterfaceMakie as normal dep This adds GeoInterfaceMakie to enable the easy plotting of ArchGDAL geometries. --- Project.toml | 7 ------- src/ArchGDAL.jl | 1 + src/geointerface.jl | 2 ++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 24a9f91f..88542321 100644 --- a/Project.toml +++ b/Project.toml @@ -20,13 +20,6 @@ ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -[weakdeps] -Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" - - -[extensions] -ArchGDALMakie = "Makie" [compat] CEnum = "0.4, 0.5" diff --git a/src/ArchGDAL.jl b/src/ArchGDAL.jl index e7ad2ad8..620b29b2 100644 --- a/src/ArchGDAL.jl +++ b/src/ArchGDAL.jl @@ -5,6 +5,7 @@ using GDAL: GDAL using GeoFormatTypes: GeoFormatTypes import GeoInterface using GeoInterfaceRecipes +using GeoInterfaceMakie: GeoInterfaceMakie as GIM using Tables: Tables using ImageCore: Normed, N0f8, N0f16, N0f32, ImageCore using ColorTypes: ColorTypes diff --git a/src/geointerface.jl b/src/geointerface.jl index bdaac103..3da05e3c 100644 --- a/src/geointerface.jl +++ b/src/geointerface.jl @@ -64,6 +64,8 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM), GeoInterface.isgeometry(::Type{<:AbstractGeometry}) = true @enable_geo_plots AbstractGeometry + #Makie plots + GIM.@enable AbstractGeometry GeoInterface.is3d(::GeometryTraits, geom::AbstractGeometry) = is3d(geom) function GeoInterface.ismeasured(::GeometryTraits, geom::AbstractGeometry) return ismeasured(geom) From 238f5a2a7429f3072d40e32c7550cc77b3d5abc4 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 29 Nov 2023 23:53:09 +0100 Subject: [PATCH 03/12] Remove Makie from the deps list --- Project.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Project.toml b/Project.toml index 88542321..42d3f17d 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,6 @@ GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" GeoInterfaceRecipes = "0329782f-3d07-4b52-b9f6-d3137cf03c7a" GeoInterfaceMakie = "0edc0954-3250-4c18-859d-ec71c1660c08" ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534" -Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" From f842141dac6faf0f1e84170441a564f53a0409fa Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Tue, 5 Dec 2023 16:48:18 +0100 Subject: [PATCH 04/12] Use full name for GeoInterfaceMakie --- Project.toml | 3 +-- ext/ArchGDALGeoInterfaceMakie.jl | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 24a9f91f..5a198493 100644 --- a/Project.toml +++ b/Project.toml @@ -22,11 +22,10 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [weakdeps] Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" [extensions] -ArchGDALMakie = "Makie" +ArchGDALGeoInterfaceMakie = "Makie" [compat] CEnum = "0.4, 0.5" diff --git a/ext/ArchGDALGeoInterfaceMakie.jl b/ext/ArchGDALGeoInterfaceMakie.jl index 74832d07..4bb24e7e 100644 --- a/ext/ArchGDALGeoInterfaceMakie.jl +++ b/ext/ArchGDALGeoInterfaceMakie.jl @@ -1,8 +1,8 @@ module ArchGDALGeoInterfaceMakie -using GeoInterfaceMakie: GeoInterfaceMakie as GIM +using GeoInterfaceMakie: GeoInterfaceMakie using ArchGDAL: ArchGDAL println("ArchGDALGeoInterfaceMakie.jl") -GIM.@enable ArchGDAL.IGeometry -GIM.@enable ArchGDAL.Geometry +GeoInterfaceMakie.@enable ArchGDAL.IGeometry +GeoInterfaceMakie.@enable ArchGDAL.Geometry end \ No newline at end of file From 0570b931773461c12874c3d17d73128277549d63 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 6 Dec 2023 14:25:12 +0100 Subject: [PATCH 05/12] Compat Makie to 0.20 --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 5a198493..a7b5078b 100644 --- a/Project.toml +++ b/Project.toml @@ -38,5 +38,6 @@ GeoInterface = "1" GeoInterfaceRecipes = "1.0" GeoInterfaceMakie = "0.1" ImageCore = "0.8, 0.9, 0.10" +Makie = "0.20" Tables = "1" julia = "1.6" From e0b43a571e8701979cad0709043bbcc1259a268a Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 6 Dec 2023 14:50:20 +0100 Subject: [PATCH 06/12] Remove print statement --- ext/ArchGDALGeoInterfaceMakie.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/ArchGDALGeoInterfaceMakie.jl b/ext/ArchGDALGeoInterfaceMakie.jl index 4bb24e7e..507fe1f6 100644 --- a/ext/ArchGDALGeoInterfaceMakie.jl +++ b/ext/ArchGDALGeoInterfaceMakie.jl @@ -2,7 +2,6 @@ module ArchGDALGeoInterfaceMakie using GeoInterfaceMakie: GeoInterfaceMakie using ArchGDAL: ArchGDAL -println("ArchGDALGeoInterfaceMakie.jl") GeoInterfaceMakie.@enable ArchGDAL.IGeometry GeoInterfaceMakie.@enable ArchGDAL.Geometry end \ No newline at end of file From afde1da03dd0349d6c4c431afcadd39d6c782892 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 6 Dec 2023 14:54:08 +0100 Subject: [PATCH 07/12] Tidy up unnecessary loading of GeoInterfaceMakie --- Project.toml | 1 - src/ArchGDAL.jl | 1 - src/geointerface.jl | 1 - 3 files changed, 3 deletions(-) diff --git a/Project.toml b/Project.toml index 8e349d18..6c408789 100644 --- a/Project.toml +++ b/Project.toml @@ -22,7 +22,6 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [weakdeps] Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - [extensions] ArchGDALGeoInterfaceMakie = "Makie" diff --git a/src/ArchGDAL.jl b/src/ArchGDAL.jl index 620b29b2..e7ad2ad8 100644 --- a/src/ArchGDAL.jl +++ b/src/ArchGDAL.jl @@ -5,7 +5,6 @@ using GDAL: GDAL using GeoFormatTypes: GeoFormatTypes import GeoInterface using GeoInterfaceRecipes -using GeoInterfaceMakie: GeoInterfaceMakie as GIM using Tables: Tables using ImageCore: Normed, N0f8, N0f16, N0f32, ImageCore using ColorTypes: ColorTypes diff --git a/src/geointerface.jl b/src/geointerface.jl index 3da05e3c..2007d077 100644 --- a/src/geointerface.jl +++ b/src/geointerface.jl @@ -65,7 +65,6 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM), GeoInterface.isgeometry(::Type{<:AbstractGeometry}) = true @enable_geo_plots AbstractGeometry #Makie plots - GIM.@enable AbstractGeometry GeoInterface.is3d(::GeometryTraits, geom::AbstractGeometry) = is3d(geom) function GeoInterface.ismeasured(::GeometryTraits, geom::AbstractGeometry) return ismeasured(geom) From eee9dc5c2f29ea15cab3a8f0a437dc075292d773 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Mon, 11 Dec 2023 16:32:47 +0100 Subject: [PATCH 08/12] Add Makie to extras in Project.toml This should enable to be able to ignore the weak dependency in Julia 1.8 or older. --- Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Project.toml b/Project.toml index 6c408789..97546bed 100644 --- a/Project.toml +++ b/Project.toml @@ -39,3 +39,6 @@ ImageCore = "0.8, 0.9, 0.10" Makie = "0.20" Tables = "1" julia = "1.6" + +["extras"] +Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" \ No newline at end of file From 7fa182b85d3e1ddf22481ee606831f16a02e818b Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Wed, 27 Dec 2023 14:13:37 +0100 Subject: [PATCH 09/12] Update src/geointerface.jl Co-authored-by: Felix Cremer --- src/geointerface.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/geointerface.jl b/src/geointerface.jl index 2007d077..bdaac103 100644 --- a/src/geointerface.jl +++ b/src/geointerface.jl @@ -64,7 +64,6 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM), GeoInterface.isgeometry(::Type{<:AbstractGeometry}) = true @enable_geo_plots AbstractGeometry - #Makie plots GeoInterface.is3d(::GeometryTraits, geom::AbstractGeometry) = is3d(geom) function GeoInterface.ismeasured(::GeometryTraits, geom::AbstractGeometry) return ismeasured(geom) From 0280ff0dbd31cd9e189e92135798f041bdb4a525 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Wed, 27 Dec 2023 18:13:22 +0100 Subject: [PATCH 10/12] Rename ArchGDALGeoInterfaceMakie.jl to ArchGDALMakieExt.jl --- ext/{ArchGDALGeoInterfaceMakie.jl => ArchGDALMakieExt.jl} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ext/{ArchGDALGeoInterfaceMakie.jl => ArchGDALMakieExt.jl} (97%) diff --git a/ext/ArchGDALGeoInterfaceMakie.jl b/ext/ArchGDALMakieExt.jl similarity index 97% rename from ext/ArchGDALGeoInterfaceMakie.jl rename to ext/ArchGDALMakieExt.jl index 507fe1f6..abf0c809 100644 --- a/ext/ArchGDALGeoInterfaceMakie.jl +++ b/ext/ArchGDALMakieExt.jl @@ -4,4 +4,4 @@ using ArchGDAL: ArchGDAL GeoInterfaceMakie.@enable ArchGDAL.IGeometry GeoInterfaceMakie.@enable ArchGDAL.Geometry -end \ No newline at end of file +end From 4ff385e517b31a8fec35dee6827e522dab4ed700 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Wed, 27 Dec 2023 18:13:32 +0100 Subject: [PATCH 11/12] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 97546bed..7b5533d5 100644 --- a/Project.toml +++ b/Project.toml @@ -23,7 +23,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" [extensions] -ArchGDALGeoInterfaceMakie = "Makie" +ArchGDALMakieExt = "Makie" [compat] CEnum = "0.4, 0.5" From 4ce23aea623ed7032f6ab786ca155ff3f755f7a3 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Wed, 27 Dec 2023 18:14:05 +0100 Subject: [PATCH 12/12] Update ext/ArchGDALMakieExt.jl --- ext/ArchGDALMakieExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ArchGDALMakieExt.jl b/ext/ArchGDALMakieExt.jl index abf0c809..b21b2ca0 100644 --- a/ext/ArchGDALMakieExt.jl +++ b/ext/ArchGDALMakieExt.jl @@ -1,4 +1,4 @@ -module ArchGDALGeoInterfaceMakie +module ArchGDALMakieExt using GeoInterfaceMakie: GeoInterfaceMakie using ArchGDAL: ArchGDAL