codeforkansascity / address-api

A address database accessible through an API that will return attributes about the address, neighborhood, council district, zoning...
http://address-api.codeforkc.org
MIT License
5 stars 9 forks source link

Add the ability for within_polygon as a query parameter #123

Open JakeLaCombe opened 7 years ago

JakeLaCombe commented 7 years ago

Socrata API's contain a within_polygon query, that takes in a list of lat and long coordinates, and finds all the data points that lie in that polygon. https://dev.socrata.com/docs/functions/within_polygon.html

How possible would it be for the address-api to get the functionality? I found a few algorithms that address this problem right here. https://stackoverflow.com/questions/9066625/check-if-a-point-is-in-polygon-maps

gregbonner commented 7 years ago

Jake, I can work on this. Would you just be passing lat, long? Or would you be wanting to pass in any other filters on which addresses should be returned within that polygon?

JakeLaCombe commented 7 years ago

For additional filters, I think what's existing in the given possible query parameters would be sufficient enough, meaning for lat and long, we would just need the ability to pass in an array of latitude and longitude points.