[ANN] SpatialGraphs.jl - Types and constructors for spatially referenced graphs

SpatialGraphs.jl

SpatialGraphs.jl establishes types and constructors for spatially referenced graphs, (e.g. where graph vertices correspond to pixels in a raster). The parent abstract type is an AbstractSpatialGraph , which is itself an AbstractGraph. SpatialGraphs.jl fully implements the Graphs.jl interface, so I’m hoping it will be useful for things like landscape connectivity and hydrology modeling since it extends the wealth of functions that Graphs.jl implements. It’s on track to be released on Thursday following the mandatory 3-day waiting period for new package registration.

Right now, SpatialGraphs.jl only supports raster-backed graphs, but I am planning to add support for vector/geometry-backed graphs as well (where nodes correspond to geometries).

GitHub Repo: GitHub - Circuitscape/SpatialGraphs.jl: Types and constructors for spatially referenced graphs.

Docs: About · SpatialGraphs.jl

A connectivity corridor modeled using SpatialGraphs.jl and Graphs.jl (see the example in the docs for more info):
image

12 Likes

What does this need to work on vector graphs? Just curious, because I could probably move an old project I did i R a couple of years ago. Geo tools in Julia have advanced a lot lately and it could be fun to see if I can switch it. I’ll take a look at the code when I have time.

1 Like

I think it doesn’t need too much. I may just use a MetaGraph for vector-backed graphs (each vertex could have a property for its corresponding geometry?). That way other attributes could also be included in the graph and utilized for defining edges, filtering, etc.

So the main work required will be to have a type that enforces that the MetaGraph has a property for “geometry”, and to create associated constructor and utility functions.