API, GeoJSON, CBOR Support
This commit is contained in:
parent
08eca3e042
commit
a9f98c80df
8 changed files with 113 additions and 40 deletions
18
readme.md
18
readme.md
|
|
@ -90,6 +90,22 @@ Sample Output: `just lookup 52.496846793890256 13.435128880554208`
|
|||
]
|
||||
```
|
||||
|
||||
### 4. Web API
|
||||
|
||||
API on port `8000` with endpoint `get_geodata` that takes the parameter `geojson` (min 4 digits) and `format` (`parquet|geojson|cbor`) and returns a file in the requested format. Supports optional Gzip compression during transfer.
|
||||
|
||||
Start server:
|
||||
|
||||
```bash
|
||||
just serve
|
||||
```
|
||||
|
||||
Request example:
|
||||
|
||||
```bash
|
||||
curl -H "Accept-Encoding: gzip" -o geodata.cbor.gz -v http://localhost:8000/get_geodata/?geohash=svc5&format=geojson
|
||||
```
|
||||
|
||||
## Advanced Use
|
||||
|
||||
### Extract and Filter Data
|
||||
|
|
@ -131,6 +147,6 @@ Sample Output:
|
|||
|
||||
- [X] GeoHash parquet file generation
|
||||
- [X] Append data to existing parquet files
|
||||
- [ ] Create web API server
|
||||
- [X] Create web API server
|
||||
- [ ] Dockerize it
|
||||
- [ ] Scheduled update routine
|
||||
Loading…
Add table
Add a link
Reference in a new issue