Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fallaciousreasoning/nz-place-search
A tool for searching OSM natural places in NZ.
https://github.com/fallaciousreasoning/nz-place-search
api linz new nz osm osm-data places-api search topo zealand
Last synced: 30 days ago
JSON representation
A tool for searching OSM natural places in NZ.
- Host: GitHub
- URL: https://github.com/fallaciousreasoning/nz-place-search
- Owner: fallaciousreasoning
- Created: 2020-08-07T06:25:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-03T05:25:59.000Z (11 months ago)
- Last Synced: 2024-02-03T06:24:15.318Z (11 months ago)
- Topics: api, linz, new, nz, osm, osm-data, places-api, search, topo, zealand
- Language: TypeScript
- Homepage: https://nz-places.now.sh/api/search?query=Aor
- Size: 11.1 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NZ Place Search
This repository provides a simple tool for searching places in NZ.
## Live version
A live test site is available at https://nz-places.now.sh
(the API is available at https://nz-places.now.sh/api/search?query=Aoraki)
## Run a local search server
`npm run start`The server should be accessible on `localhost:3000`.
## Querying
Query the server at `/api/search/query={query}`.
For example:
Querying `http://localhost:3000/api/search?query=Aoraki` will result in the following json:
```json
[
{
"gazId": "26004",
"name": "Aoraki/Mount Cook",
"lon": "170.141926",
"lat": "-43.595348",
"type": "hill"
},
{
"gazId": "26005",
"name": "Aoraki/Mount Cook",
"lon": "170.098209",
"lat": "-43.735107",
"type": "town"
},
{
"gazId": "48301",
"name": "Aoraki/Mount Cook National Park",
"lon": "170.285431",
"lat": "-43.599748",
"type": "national park"
},
{
"osmId": 2625064349,
"name": "Aoraki / Mount Cook",
"lat": -43.5950017,
"lon": 170.1421677,
"type": "peak"
}
]
```## Update place data
1. rm `data/osm_natural_nz_places.json`
2. `npm run update-data` to refetch the data from OSM.