Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 11 days ago
JSON representation

Tools for working with ndjson, turning geojson into ndjson, spatial tools

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
```