JuliaGeo / LibGEOS.jl

Julia package for manipulation and analysis of planar geometric objects
MIT License
72 stars 24 forks source link

Makie support #142

Open jw3126 opened 1 year ago

jw3126 commented 1 year ago

With GeoInterfaceMakie it is possible to give Makie support to LibGEOS in one line:

https://github.com/JuliaGeo/GeoInterface.jl/blob/40af14b80d0620f44a8a9d4063b1f36d36c60ab9/GeoInterfaceMakie/test/runtests.jl#L8

The question is where that line should live. My preference would be to have it right here in LibGEOS.jl. That would add GeoInterfaceMakie as a dependency which itself depends on the following:

GeoInterface = "1"  # LibGEOS dependency anyway
GeometryBasics = "0.4.4" # neither super lightweight, nor super heavyweight
MakieCore = "0.5.1" # super lightweight

Is that acceptable?

The alternative would be to create a one-line LibGEOSMakie.jl package.

What do people think about these options?

visr commented 1 year ago

Great that this is possible with one line. What do you think about simply documenting that users need to run this line if they want to plot the geometries with Makie?

jw3126 commented 1 year ago

Mhh, the call is a macro, that overloads a bunch of methods needed to do Makie plotting. If people need to include this in their scripts or even packages, the macro might be called multiple times and this will yield warnings, recompilation etc.