https://github.com/arbakker/geobash
Collection of bash scripts to inspect and reproject coordinates, bounding boxes and WKT strings and more
https://github.com/arbakker/geobash
bash geometry geospatial inspection
Last synced: 10 months ago
JSON representation
Collection of bash scripts to inspect and reproject coordinates, bounding boxes and WKT strings and more
- Host: GitHub
- URL: https://github.com/arbakker/geobash
- Owner: arbakker
- License: mit
- Created: 2020-08-05T15:14:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-05T08:15:07.000Z (almost 3 years ago)
- Last Synced: 2025-04-11T19:47:28.765Z (about 1 year ago)
- Topics: bash, geometry, geospatial, inspection
- Language: Shell
- Homepage:
- Size: 43.9 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# README

Collection of bash scripts to inspect and reproject coordinates, bounding boxes and WKT strings.
Most scripts allow to pass the input geometry (bbox, coordinate or wkt string) to be passed on standard input. When passing geometry on standard input replace the input geometry argument with `-`.
## Requirements
Requires `libproj-dev`, `gdal-bin` and `perl` to be installed.
Add directory to PATH (add to `.bashrc` or `.zshrc`):
```sh
export PATH=${geobash_installation_path}:$PATH
```
## Development
Source files are linted with [Shellcheck](https://github.com/koalaman/shellcheck).
## Usage examples
Create GPKG with geometries of all tiles of zoomlevel 3 (nr of tiles per zoomlevel is 2^z, zoomlevel z is zero-based index) of Dutch tiling scheme (EPSG:28992):
```sh
zxy2bbox 28992 4/{0..15}/{0..15} | bbox2wkt | wkt2ogr - 28992 GPKG grid.gpkg grid
```
----
Show tile boundaries of specific tile (Dutch tiling scheme; EPSG:28992):
```sh
zxy2bbox 28992 2/2/1 | bboxproj 28992 4326 - | bboxshow
```
----
Calculate scale denominator of WMS GetMap request:
```sh
wmsmap2scaledenominator https://service.pdok.nl/hwh/luchtfotorgb/wms/v1_0?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=Actueel_ortho25&BBOX=233328.32,554123.2,233382.08,554176.96&WIDTH=256&HEIGHT=256&CRS=EPSG:28992&FORMAT=image/png
```