https://github.com/boydjohnson/ndjson-spatial
Tools for working with ndjson, turning geojson into ndjson, spatial tools
https://github.com/boydjohnson/ndjson-spatial
ndjson spatial spatial-data-science
Last synced: 8 months ago
JSON representation
Tools for working with ndjson, turning geojson into ndjson, spatial tools
- Host: GitHub
- URL: https://github.com/boydjohnson/ndjson-spatial
- Owner: boydjohnson
- License: apache-2.0
- Created: 2019-05-10T17:57:40.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-01-28T02:31:56.000Z (over 3 years ago)
- Last Synced: 2025-02-23T07:14:34.902Z (over 1 year ago)
- Topics: ndjson, spatial, spatial-data-science
- Language: Rust
- Homepage:
- Size: 115 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repo contains some Rust cli tools for working with new-line delimited geojson
These tools are currently pre-release. There will be releases with builds for linux and macos.
# Build
This repo requires a nightly compiler before 2020-09-28 exclusive.
To build
```
rustup default nightly-2020-09-27
cargo build --release
```
for lto (optimizations for code speed and size) on `ndjson`
```
cd ndjson
cargo build -Z unstable-options --profile=release-ndjson
ls -lh ../target/release-ndjson/ndjson
```
## Current
## ndjson-spatial
```bash
ndjson-spatial centroid
````
```bash
ndjson-spatial intersection --ref
```
- currently: polygon/polygon
```bash
ndjson-spatial nearest-distance --ref --field-name
```
- currently: point/point
```bash
ndjson-spatial area --field-name
```
```bash
ndjson-spatial from-geojson
ndjson-spatial to-geojson
```
## ndjson
```bash
ndjson filter
ndjson filter "d.properties.Area >= 30000.0"
```
```bash
ndjson pick-field
ndjson pick-field "d.properties.distance "
```
```bash
ndjson join --ref --ref-field --stream-field
```
- ref-fields, stream-fields should be space delimited list of 'd.properties.FIELD_NAME'
## Proposed
## ndjson-spatial
```bash
ndjson-spatial join-contains --ref --field-name
```
## ndjson
```bash
ndjson select-count --selector --field-name
ndjson select-count d.properties.join --selector light=yes --field-name NUM_W_LIGHT
```
```bash
ndjson select-avg --selector --field-name
ndjson select-avg d.properties.join --selector light=yes --field-name AVG_W_LIGHT
```