CLI tools such as validation and file format conversion for fiboa.
Project description
fiboa CLI
CLI tools such as validation and file format conversion for fiboa.
Installation
You need Python 3.9+ installed.
Run pip install fiboa-cli
to install the validator.
Validation
To validate a fiboa GeoParquet or GeoJSON file, you can for example run:
- GeoJSON:
fiboa validate example.json --collection collection.json
- GeoParquet:
fiboa validate example.parquet --data
Check fiboa validate --help
for more details.
The validator also supports remote files.
http://
orhttps://
: no further configuration is needed.s3://
:s3fs
needs to be installed (runpip install .[s3]
) and you may need to set environment variables. Refer here for how to define credentials.gs://
:gcsfs
needs to be installed (runpip install .[gcs]
). By default,gcsfs
will attempt to use your default gcloud credentials or, attempt to get credentials from the google metadata service, or fall back to anonymous access.
Create fiboa GeoParquet from GeoJSON
To create a fiboa-compliant GeoParquet for a fiboa-compliant set of GeoJSON files containing Features or FeatureCollections, you can for example run:
fiboa create geojson/example.json -o test.parquet -c geojson/collection.json
Check fiboa create --help
for more details.
Inspect fiboa GeoParquet file
To look into a fiboa GeoParquet file to get a rough understanding of the content, the following can be executed:
fiboa describe example.parquet
Check fiboa describe --help
for more details.
Create JSON Schema from fiboa Schema
To create a JSON Schema for a fiboa Schema YAML file, you can for example run:
fiboa jsonschema example.json --id=https://fiboa.github.io/specification/v0.1.0/geojson/schema.json -o schema.json
Check fiboa jsonschema --help
for more details.
Converter for existing datasets
To convert an existing dataset to fiboa using the pre-defined converters:
fiboa convert de_nrw
Available converters:
de_nrw
(Germany, NRW from Shapefile)
Implement a converter
- Create a new file in
fiboa_cli/datasets
based on thetemplate.py
- Implement the
convert()
function - Add missing dependencies into a separate dependency group in
setup.py
- Add the converter to the list above
- Create a PR to submit your converter for review
Development
To install in development mode run pip install -e .
in this folder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fiboa-cli-0.2.0.tar.gz
.
File metadata
- Download URL: fiboa-cli-0.2.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a3dc85398ca7e324564ad10e780aed92409809b3eb40ae980b2039a25ecc191 |
|
MD5 | 8328626576f2398262f7f9d9ae6ed3dd |
|
BLAKE2b-256 | bdddf3818bf6166f4b6f4451c3d27deb9951730d8ee626b4060846c4b96ed115 |
File details
Details for the file fiboa_cli-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: fiboa_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e048e35ed73d18535b76069eda4c4266d938443b0acaf6d0574277b4069b9f19 |
|
MD5 | 5433beb6b66d13b46ce52e2317882cb2 |
|
BLAKE2b-256 | 66a8afa0206190a2959d8128677d4e0a8330550d6bbcbe04d302ba85d140c936 |