Git Product home page Git Product logo

boundaries-api's Introduction

Wondering if a point is inside a city park? Know your latitude and longitude but not sure which city council district you're in? Want to know all the Seattle-related boundaries that a point is inside?

Send a request like this:

https://boundaries-api.seattle.io/boundaries?long=-122.345002&lat=47.667044

Get a FeatureCollection of the matching features from each dataset in response.

Additionally, you can append the extension .topojson to receive the response back in TopoJSON, e.g., the previous request would become http://boundaries.seattle.io/boundaries.topojson?long=-122.345002&lat=47.667044.

Examples

Python 3 & requests

import requests

r = requests.get('https://boundaries-api.seattle.io/boundaries?long=-122.345002&lat=47.667044')

print(r.status_code)
print(r.headers['content-type'])
print(r.json())

Node.js and request

var request = require('request')

request('https://boundaries-api.seattle.io/boundaries?long=-122.345002&lat=47.667044', function (err, res, body) {
  if (err) return console.log(err)
  console.log(res.statusCode)
  console.log(body)
})

Data

This project uses seattle-boundaries, a collection of geojson boundaries for the city of Seattle.

Development

To get this project running on your computer:

  • git clone https://github.com/seattleio/boundaries-api.git
  • cd boundaries-api
  • npm install
  • npm start

boundaries-api's People

Contributors

alimon808 avatar modulitos avatar sethvincent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alimon808

boundaries-api's Issues

ui for checking boundaries

check boundaries by clicking on the map, entering an address, or using html5 geolocation.

show the results as list of features. click an item in the list and see the shape of the boundary on the map.

exclude specific boundaries

boundaries like city limits in particular might need to be excluded.

we should add an exclude query param.

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.