gis_puller
This Rust crate aims to abstract and implement a general global Geographic Information System (GIS) data catalog and acquisition functionality.
Acquired catalog will follow the data provider derived structural separations as-is.
To build on top the below crates can be in future used to consume the acquired data and beyond:
- gis_loader will be available to load/transform these acquired dataset(s) by this crate into various data stores
- gis_api will be available to provide gRPC API to consume the loaded dataset(s)
Everything should be considered unstable including the interface definitions.
GIS Data Sources Supported
- Australia - Geoscape consumed via https://data.gov.au/
GIS DataSets Catalogued
- Suburb/Locality Boundaries: Australia (GDA94, GDA2020, GeoJSON)
- Address Forward/Reverse Lookup Data: Australia (GNAF)
Also see DIFFICULTIES.md
Environment Variables
- USE_MODE = Environment "default" gets merged with either "development" | "integration" | "production" runtime configuration
- GIS_CONFIG_PATH = Filesystem path where the GIS datasource configuration files live
- TEST_DATA_PATH = Filesystem path where the mocks read data from including the "replay" recordings
Usage
Using Rust Cargo - requires cargo-edit
Or edit Cargo.toml by hand:
[]
= "0.1.0"
Create documentation
Run tests (includes doctests and runs examples) with either replay or mocked datasources
Run clippy for additional lints
Run tarpaulin for code/examples test coverage
NOTE: Tarpaulin requires +nightly: rustup toolchain install nightly
@TODO binary crate -- To use in shell with gis_puller image Docker e.g. with Australia localities boundaries datasets obtained from data.gov.au:
Or to use as a library:
- TBD: Interfaces to appear in future gis_puller::Puller
Currently with AU locality/boundary dataset I doctest fetcher_matcher the below in development the below with recorded result replayed as a mock:
use http_server;
use GET;
use task;
async
Scratchpad for future interface:
let puller_au = gis_puller::Puller::load('au').await?;
let sources_au = puller_au.sources('locality/boundary').await?;
// make sources_au Iterable for .iter()
sources_au.pull_all('/tmp').await?;
sources_au.pull_one('nsw').await?;
The below features can be toggled via Cargo:
- 'xxx': Enables xxx
License
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.