Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anisotropi4/jay
Helper scripts to run the `mapshaper-xl` simplifier on mixed GeoPKG files
https://github.com/anisotropi4/jay
Last synced: 3 days ago
JSON representation
Helper scripts to run the `mapshaper-xl` simplifier on mixed GeoPKG files
- Host: GitHub
- URL: https://github.com/anisotropi4/jay
- Owner: anisotropi4
- License: apache-2.0
- Created: 2023-04-09T08:45:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-09T14:42:16.000Z (over 1 year ago)
- Last Synced: 2024-11-05T05:26:10.160Z (about 2 months ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jay
These helper scripts that download dependencies and run [mapshaper](https://github.com/mbloch/mapshaper) on mixed geometry [GeoPackage](https://www.ogc.org/standard/geopackage/) geography files
## Assumptions
The GeoPackage data is in a projected rather than longitude and latitude coordinate system
## Implementation
Running the `simplify.sh` script on the GeoPackage file `input.gpkg` to create a simplified `input-simplified.gpkg` in the `output` directory:
$ ./simplify.sh input.gpkg
The script installs a local `python3` and `nodejs` environment and processes and creates simplified GeoPackage layer
### `dumpgeojson.py`
Writes GeoPackage layer data as GeoJSON to the `tmp` directory
### `dumplines.py`
Writes simplified GeoJSON layer in the `tmp` directory to the GeoPackage data layer
### `maplayer.sh`
Wrapper script that simplifies a geometry layer in the GeoPackage file by creating a GeoJSON layer file, simplifying the layer using `mapshaper-xl` and writes the simplified layer to the output GeoPackage file layer
The current `mapshaper` script snaps endpoints, and rounds coordinates to one decimal place
### `node.sh`
Installs a local `nvm` and `nodejs` environment and installs `mapshaper` in the `node` directory
### `simplifypoints.py`
Extracts geometry layers, rounds coordinates to one decimal place for Point geometry layer or prints out the layer name
### `simplify.sh`
The wrapper script that orchestrates the sequencing other scripts