smnorris / roadintegrator

Quickly merge multiple BC road datasets into a single layer for Cumulative Effects analysis
Apache License 2.0
10 stars 1 forks source link

roadintegrator

Development and maintenance of this project has been moved to bcgov/CE_integratedroads. Please file any issues/PRs at the new location.

Quckly merge various BC road data sources into a single layer.

Sources

Priority Name Table
1 Digital Road Atlas (DRA) WHSE_BASEMAPPING.TRANSPORT_LINE (from DRA ftp)
2 Forest Tenure Road Section Lines WHSE_FOREST_TENURE.FTEN_ROAD_SECTION_LINES_SVW
3 RESULTS - Forest Cover Inventory - roads WHSE_FOREST_VEGETATION.RSLT_FOREST_COVER_INV_SVW
4 As Built Roads (ABR) WHSE_FOREST_TENURE.ABR_ROAD_SECTION_LINE
5 OGC Petroleum Development Roads Pre-2006 WHSE_MINERAL_TENURE.OG_PETRLM_DEV_RDS_PRE06_PUB_SP
6 Oil and Gas Commission Road Segment Permits WHSE_MINERAL_TENURE.OG_ROAD_SEGMENT_PERMIT_SP
7 Oil and Gas Commission Road Right of Way Permits WHSE_MINERAL_TENURE.OG_ROAD_AREA_PERMIT_SP

Method

First, sources are preprocessed:

Next, all roads are loaded to the output table in order of decreasing priority. Portions of lower priority roads within 7m of a higher priority road are deleted. Where the endpoint of a remaining lower priority road is within 7m of a higher prioirity road, the endpoint of the lower priority road is snapped to the closest point on the higher priority road.

Limitations and Caveats

The authoritative source for built roads in British Columbia is the Digital Road Atlas. The process used in these scripts IS NOT A COMPRENSIVE CONFLATION/MERGE of the input road layers, it is a quick approximation. The intent of the processing is to retain all input features not covered by a higher priority road - due to the nature of duplication in BC road data, the output will always be an over-representation of roads.

Several specific issues will lead to over-representation of roads:

Additional notes:

Requirements

Tested with versions as noted in Dockerfile

Setup

Clone the repository, navigate to the project folder:

    git clone https://github.com/smnorris/roadintegrator.git
    cd roadintegrator

If you do not have above noted requirements installed on your system, installation via conda or Docker is recommended. An environment.yml is provided for users familiar with conda, instructions for Docker usage are below.

Docker

Install Docker for your OS:

Build and start the containers:

    docker-compose build
    docker-compose up -d

As long as you do not remove the container roadintegrator-db, it will retain all the data you put in it. If you have shut down Docker or the container, start it up again with this command:

    docker-compose up -d

Usage

Scripts are run via make. To run the full job:

    make

If using Docker:

    docker-compose run --rm app make

Note that connecting to the dockerized database from your local OS is possible via the port specified in docker-compose.yml:

    psql postgresql://postgres:postgres@localhost:8001/roadintegrator

Duplications

As mentioned above, this analysis is very much a rough approximation. It works well in areas where roads are not duplicated between sources or where source road networks are near-coincident.

These diagrams illustrate a problematic sample area, showing three similar input road layers and the resulting output.

three input layers

inputs

resulting output

inputs

Output summary

Summary of length by data source

Alternative approaches

Road network conflation is a common task, many additional approaches and tools are available. This list provides a starting point for additional reading: