Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GeoInterfaceMakie as a weak dependency #404

Merged
merged 13 commits into from
Dec 27, 2023
10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ 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"


felixcremer marked this conversation as resolved.
Show resolved Hide resolved
[extensions]
ArchGDALGeoInterfaceMakie = "Makie"
rafaqz marked this conversation as resolved.
Show resolved Hide resolved

[compat]
CEnum = "0.4, 0.5"
ColorTypes = "0.10, 0.11"
Expand All @@ -27,6 +35,8 @@ 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"
rafaqz marked this conversation as resolved.
Show resolved Hide resolved
Tables = "1"
julia = "1.6"
7 changes: 7 additions & 0 deletions ext/ArchGDALGeoInterfaceMakie.jl
felixcremer marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module ArchGDALGeoInterfaceMakie
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
module ArchGDALGeoInterfaceMakie
module ArchGDALMakieExt

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is the extension actually triggers on Makie not GeoInterfaceMakie

using GeoInterfaceMakie: GeoInterfaceMakie
using ArchGDAL: ArchGDAL

GeoInterfaceMakie.@enable ArchGDAL.IGeometry
GeoInterfaceMakie.@enable ArchGDAL.Geometry
end
1 change: 1 addition & 0 deletions src/ArchGDAL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using GDAL: GDAL
using GeoFormatTypes: GeoFormatTypes
import GeoInterface
using GeoInterfaceRecipes
using GeoInterfaceMakie: GeoInterfaceMakie as GIM
felixcremer marked this conversation as resolved.
Show resolved Hide resolved
using Tables: Tables
using ImageCore: Normed, N0f8, N0f16, N0f32, ImageCore
using ColorTypes: ColorTypes
Expand Down
2 changes: 2 additions & 0 deletions src/geointerface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM),

GeoInterface.isgeometry(::Type{<:AbstractGeometry}) = true
@enable_geo_plots AbstractGeometry
#Makie plots
rafaqz marked this conversation as resolved.
Show resolved Hide resolved
GIM.@enable AbstractGeometry
GeoInterface.is3d(::GeometryTraits, geom::AbstractGeometry) = is3d(geom)
function GeoInterface.ismeasured(::GeometryTraits, geom::AbstractGeometry)
return ismeasured(geom)
Expand Down
Loading