Skip to content

Commit aa24584

Browse files
authored
Add methods for SimpleGraphs and associated tests, rework some internals (#3)
* add simple graph constructors and docs * add test for simplerasterdigraph
1 parent 6ed35e7 commit aa24584

File tree

8 files changed

+361
-82
lines changed

8 files changed

+361
-82
lines changed

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ authors = ["Vincent A. Landau <[email protected]>"]
44
version = "0.0.1"
55

66
[deps]
7-
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
87
GeoData = "9b6fcbb8-86d6-11e9-1ce7-23a6bb139a78"
98
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
109
SimpleWeightedGraphs = "47aef6b3-ad0c-573a-a1e2-d07658019622"
10+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1111
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1212

1313
[compat]
14-
ArchGDAL = "0.6"
1514
julia = "1.6"

docs/src/userguide.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
## Building Graphs from Rasters
44

5-
SpatialGraphs.jl offers options methods for constructing graphs from raster
5+
SpatialGraphs.jl offers several functions for constructing graphs from raster
66
data.
77

8+
### Simple Graphs
9+
```@docs
10+
simplerastergraph
11+
make_simple_raster_graph
12+
```
13+
14+
### Weighted Graphs
815
```@docs
916
weightedrastergraph
10-
make_raster_graph
17+
make_weighted_raster_graph
1118
```

src/SpatialGraphs.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module SpatialGraphs
22

3-
using LightGraphs, SimpleWeightedGraphs, ArchGDAL, GeoData
3+
using LightGraphs, SimpleWeightedGraphs, SparseArrays, GeoData
44

55
include("structs.jl")
66
include("graph_interface.jl")
@@ -13,6 +13,8 @@ export AbstractSpatialGraph, AbstractRasterGraph, SimpleRasterGraph,
1313
SimpleRasterDiGraph, WeightedRasterGraph, WeightedRasterDiGraph
1414

1515
## Raster graph
16-
export make_raster_graph, weightedrastergraph
16+
export make_weighted_raster_graph, weightedrastergraph,
17+
make_simple_raster_graph, simplerastergraph
18+
1719

1820
end # module

0 commit comments

Comments
 (0)