-
-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
…9-03-00-43-00-607-137269820 CompatHelper: bump compat for "ArchGDAL" to "0.7"
Outside of RecipesBase, would there be a way involving |
You might be able to do it with RecipesBase, though I haven't tried. You would do it as an insert plot with the |
I've some code that I think may work but actually doesn't in #123 - this is a first step before putting the figure as an inset panel |
…mpleSDMLayers.jl into interfaces-iteration
💥 This PR is backwards incompatible, for good reasons.
📖 This PR is also heavy on documentation change: NEW DOC HERE
The
getindex
problemIn previous versions,
getindex
was going to either return a value (or series of values, possibly), or return a layer. This was confusing in that the return type ofx[y]
depended on you knowing the type ofy
.In the current version,
getindex
is only ever going to return a value (which can benothing
), and resizing a layer through various ways is done withclip
.Internally, the package now transforms coordinates into
CartesianIndex
(or arrays thereof), and any subtype ofSimpleSDMLayer
behaves much more like anAbstractArray
, but accessing values throughPoint
s is recommended.Coordinates
The mechanism to get a value with
layer[longitude, latitude]
is still there, but the preferred way islayer[Point(x,y,)]
, wherePoint
is the type fromGeometryBasics
. This has been picked over the currentGeoInterface.Point
as there is a discussion over there to converge towards theGeometryBasics
types anyways.This makes it a lot easier to interact with polygons, rectangles, circles, etc, from
GeometryBasics
. There is a new example using circles and polygons with themask
function.As a nice bonus, the internal methods to match coordinates to grid position have been sped up by about 40 times, with a 75% decrease in memory allocation, so the package as a whole should feel more responsive.
Documentation upgrade
The examples are being migrated from
Documenter
toLiterate
, so that they are easier to run independently - learners can download them and run them as standard Julia script, which they are.The documentation of the functions has been regrouped into new pages to make more sense, workflow-wise. The data page has been split into its own section.
Iteration interface
The iteration interface has been much improved, and now returns an array of
Pair{Point2, T}
whereT
is the internal type of the layer. Very importantly, this is only ever done for non-nothing cells. The positions of non-empty cells can be accessed usingkeys
, which returns an array ofPoint2
.Boundaries clipping
In some situations, clipping a layer by another layer resulted in an extra row/column being added; this has been corrected in a few places in the code, and all tests are passing.
New data
The CMIP6 dataset from CHELSA is now accessible. The elevation dataset from WorldClim is also now accessible.
DataFrames support removed
For the moment, I have dropped the DataFrames support from the package, while it's being replaced by a more general Tables interface.
Sliding windows performance
The performance of
slidingwindow
has been improved, thanks to a combination of using theDistances
package and using the new indexing system based onkeys
.Pseudo absences
This PR has a number of
rand
methods to generate pseudo absences, and a new documentation page about it.