Giter Site home page Giter Site logo

fallaciousreasoning / nz-place-search Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 11.33 MB

A tool for searching OSM natural places in NZ.

Home Page: https://nz-places.now.sh/api/search?query=Aor

TypeScript 88.73% HTML 11.27%
osm osm-data linz topo nz new zealand places-api search api

nz-place-search's Introduction

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:

[
    {
        "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.

nz-place-search's People

Contributors

fallaciousreasoning avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.