Determines which Boston neighborhood a lat/long point falls in, and does it wicked fast without calling out to an external API.
composer require daveross/boston-neighborhood-reverse-geocoder:~1.0.0
or add the dependency to your composer.json file manually:
"require": {
"php": ">=5.3",
"daveross/daveross/boston-neighborhood-reverse-geocoder": "~1.0.0"
}
Copy this library's files to wherever you put third-party libraries in your application. Include src/boston_neighborhoods.php
from this library.
See why I contribute to open source software.
echo 'Boston City Hall is in ' . \DaveRoss\BostonNeighborhoodReverseGeocoder\get_neighborhood( -71.0580, 42.3603 ) . "\n";
echo 'Massachusetts General Hospital is in ' . \DaveRoss\BostonNeighborhoodReverseGeocoder\get_neighborhood( -71.0686, 42.3628 ) . "\n";
echo 'Faneuil Hall is in ' . \DaveRoss\BostonNeighborhoodReverseGeocoder\get_neighborhood( -71.0568, 42.3600 ) . "\n";
Data from Boston Neighborhood Map by Cosmo Catalano