Skip to content

Commit e63b4b8

Browse files
authored
use GeoInterface plot macros (#473)
* use GeoInterface plot macros * no GIRecipes * bugfix * needs GeoInterface 1.5
1 parent 318f257 commit e63b4b8

File tree

5 files changed

+24
-18
lines changed

5 files changed

+24
-18
lines changed

Project.toml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
1414
GDAL = "add2ef01-049f-52c4-9ee2-e494f65e021a"
1515
GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f"
1616
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
17-
GeoInterfaceMakie = "0edc0954-3250-4c18-859d-ec71c1660c08"
18-
GeoInterfaceRecipes = "0329782f-3d07-4b52-b9f6-d3137cf03c7a"
1917
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
2018
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
2119

2220
[weakdeps]
2321
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
2422
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
23+
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
2524

2625
[extensions]
27-
ArchGDALMakieExt = "Makie"
2826
ArchGDALJLD2Ext = "JLD2"
27+
ArchGDALMakieExt = "Makie"
28+
ArchGDALRecipesBaseExt = "RecipesBase"
2929

3030
[compat]
3131
CEnum = "0.4, 0.5"
@@ -35,15 +35,10 @@ DiskArrays = "0.3, 0.4"
3535
Extents = "0.1"
3636
GDAL = "1.7"
3737
GeoFormatTypes = "0.4.2"
38-
GeoInterface = "1"
39-
GeoInterfaceMakie = "0.1"
40-
GeoInterfaceRecipes = "1.0"
38+
GeoInterface = "1.5"
4139
ImageCore = "0.8, 0.9, 0.10"
42-
Makie = "0.20, 0.21, 0.22, 0.23, 0.24"
43-
Tables = "1"
4440
JLD2 = "0.4, 0.5"
41+
Makie = "0.23, 0.24"
42+
Tables = "1"
43+
RecipesBase = "1"
4544
julia = "1.10"
46-
47-
[extras]
48-
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
49-
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"

ext/ArchGDALMakieExt.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module ArchGDALMakieExt
2-
using GeoInterfaceMakie: GeoInterfaceMakie
3-
using ArchGDAL: ArchGDAL
42

5-
GeoInterfaceMakie.@enable ArchGDAL.IGeometry
6-
GeoInterfaceMakie.@enable ArchGDAL.Geometry
3+
import ArchGDAL
4+
import GeoInterface
5+
import Makie
6+
7+
GeoInterface.@enable_makie Makie ArchGDAL.IGeometry
8+
GeoInterface.@enable_makie Makie ArchGDAL.Geometry
9+
710
end

ext/ArchGDALRecipesBaseExt.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module ArchGDALRecipesBaseExt
2+
3+
import ArchGDAL
4+
import GeoInterface
5+
import RecipesBase
6+
7+
GeoInterface.@enable_plots RecipesBase ArchGDAL.IGeometry
8+
GeoInterface.@enable_plots RecipesBase ArchGDAL.Geometry
9+
10+
end

src/ArchGDAL.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ using Dates
44
using GDAL: GDAL
55
using GeoFormatTypes: GeoFormatTypes
66
import GeoInterface
7-
using GeoInterfaceRecipes
87
using Tables: Tables
98
using ImageCore: Normed, N0f8, N0f16, N0f32, ImageCore
109
using ColorTypes: ColorTypes

src/geointerface.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM),
7979
GeoInterface.geometry(feat::AbstractFeature) = getgeom(feat, 0)
8080

8181
GeoInterface.isgeometry(::Type{<:AbstractGeometry}) = true
82-
@enable_geo_plots AbstractGeometry
8382
GeoInterface.is3d(::GeometryTraits, geom::AbstractGeometry) = is3d(geom)
8483
function GeoInterface.ismeasured(::GeometryTraits, geom::AbstractGeometry)
8584
return ismeasured(geom)

0 commit comments

Comments
 (0)