Skip to content

Add new graph type (compatible with LightGraphs) with additional geospatial fields? #2

@vlandau

Description

@vlandau

Add either lat/lon coordinates for vertices, or entire geometries, as well as info on projections? Not sure what this should look like.

Maybe something like this:

mutable struct SpatialWeightedGraph
    graph::AbstractSimpleWeightedGraph
    geometries::Vector{AbstractGeometry}
end

This would enable easy mapping of of paths or cost distances to geographic space/geometries.

Then add methods for all of the LightGraphs/SimpleWeightedGraphs functions, e.g.:

has_edge(a::SpatialWeightedGraph, b, c) = has_edge(a.graph, b, c)

The alternative is for the user to store this information elsewhere and make sure it remains properly sorted. That asks more of the user and may introduce more opportunities for user error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions