Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network data model #24

Open
tomalrussell opened this issue Jul 29, 2021 · 0 comments
Open

Network data model #24

tomalrussell opened this issue Jul 29, 2021 · 0 comments
Labels
feature New feature or functionality

Comments

@tomalrussell
Copy link
Member

tomalrussell commented Jul 29, 2021

As in #21, define a spatial network graph G = {V,E} as a set of nodes V and edges E where each edge connects two nodes.

  • see notes below for objects and attributes
  • some opinions about file formats and how to store metadata, conventions to follow for ease of use:
    • nodes and edges of a single network can be stored in one GeoPackage with layers named nodes and edges (a railway network could be in rail.gpkg).
    • if nodes have associated polygon geometries, store them in an node_areas layer in the same GeoPackage, with node_id to link them (GeoPackage modelling guidelines have related guidance)
    • sources can be stored in a CSV or Excel sheet (taking care to have one table per sheet, consistent column naming)
    • asset_type definitions can be captured in two tables: one for asset_types (name, title) and one table for asset_type_attributes, linked to asset type by asset_type column.

Nodes

A node:

  • has a Point geometry
  • has a node_id String/UUID which should be unique within an analysis project
  • has an asset_type String which groups it with other assets sharing custom attributes
  • may have a source String which refers to a third-party dataset
  • may have a source_id which links it to an entry in a third-party dataset
  • may have an associated area Polygon that represents a site, building, or service area
  • may have conventional attributes to support analysis:
    • unit_cost: rehabilitation cost (units must be defined, may be made consistent across a project, e.g. million $USD in 2020)
    • cost_per_km2: rehabilitation cost if partial rehabilitation is possible per unit area

Edges

An edge:

  • has a LineString geometry
  • has an edge_id
  • has from_id and to_id referring to its start and end nodes
  • may have a length_km length in kilometres (which might otherwise be calculated from the geometry)
  • may be directed (True/False), if flows on the graph should only be allowed to traverse the edge in one direction
  • may have conventional attributes to support analysis:
    • unit_cost: rehabilitation cost if any damage is supposed to require full replacement
    • cost_per_km: rehabilitation cost per length damaged if partial repairs are possible

Asset types

An asset type:

  • has an asset_type short name or id, for use in network data to refer back to it
  • has a title human readable name that can be more descriptive
  • may have a description with more details or notes
  • has a list of attributes
    • name used as attribute key or column name, conventionally all in lower_snake_case
    • title human readable name that can be more descriptive
    • description human-readable description (spell out abbreviations)
    • unit units
    • dtype data type: boolean, integer, string, float, categorical
    • categories: list of options if dtype is categorical

Data sources

A data source:

  • has a source short name or id, for use in network data to refer back to it
  • has a title for a longer descriptive name or title
  • may have a description for an abstract or longer description or notes
  • may have a url link
  • may have a citation recommended citation
  • may have a contact.name
  • may have a contact.email
  • may have a release_date year or standard timestamp

For design ideas and similar approaches (particularly for data source/provenance schema):

  • Spatio-Temporal Asset Catalogues STAC
  • Data Catalog Vocabulary DCAT-2
@thomas-fred thomas-fred added the feature New feature or functionality label May 25, 2022
@thomas-fred thomas-fred changed the title Network metadata Network data model May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

No branches or pull requests

2 participants