Skip to content

Commit

Permalink
Add GeoInterfaceMakie as a weak dependency (#404)
Browse files Browse the repository at this point in the history
* Try to setup GeoInterfaceMakie as weak dependency

* Add GeoInterfaceMakie as normal dep

This adds GeoInterfaceMakie to enable the easy plotting of ArchGDAL geometries.

* Remove Makie from the deps list

* Use full name for GeoInterfaceMakie

* Compat Makie to 0.20

* Remove print statement

* Tidy up unnecessary loading of GeoInterfaceMakie

* Add Makie to extras in Project.toml

This should enable to be able to ignore the weak dependency in Julia 1.8 or older.

* Update src/geointerface.jl

Co-authored-by: Felix Cremer <[email protected]>

* Rename ArchGDALGeoInterfaceMakie.jl to ArchGDALMakieExt.jl

* Update Project.toml

* Update ext/ArchGDALMakieExt.jl

---------

Co-authored-by: Rafael Schouten <[email protected]>
  • Loading branch information
felixcremer and rafaqz authored Dec 27, 2023
1 parent 696d94a commit b878709
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ 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"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[weakdeps]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"

[extensions]
ArchGDALMakieExt = "Makie"

[compat]
CEnum = "0.4, 0.5"
ColorTypes = "0.10, 0.11"
Expand All @@ -27,6 +34,11 @@ GDAL = "1.5.1"
GeoFormatTypes = "0.4.2"
GeoInterface = "1"
GeoInterfaceRecipes = "1.0"
GeoInterfaceMakie = "0.1"
ImageCore = "0.8, 0.9, 0.10"
Makie = "0.20"
Tables = "1"
julia = "1.6"

["extras"]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
7 changes: 7 additions & 0 deletions ext/ArchGDALMakieExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module ArchGDALMakieExt
using GeoInterfaceMakie: GeoInterfaceMakie
using ArchGDAL: ArchGDAL

GeoInterfaceMakie.@enable ArchGDAL.IGeometry
GeoInterfaceMakie.@enable ArchGDAL.Geometry
end

0 comments on commit b878709

Please sign in to comment.