Python bindings for the NYC Geosupport Desktop application
Project description
python-geosupport is a Python package for using NYC Planning’s Geosupport Desktop Editionâ„¢.
Getting Started
Download and install Geosupport Desktop Edition for Windows:
Windows users: Ensure you select the correct Geosupport installation that corresponds to the Python interpreter you are using. Ex., Python 32-bit will only work with Geosupport 32-bit.
Linux users: Extract the .zip to a folder of your choice and set the GEOFILES and LD_LIBRARY_PATH environmental variables of the fls and lib directories:
$ export GEOFILES=/var/geosupport/version-16c_16.3/fls/
$ export LD_LIBRARY_PATH=/var/geosupport/version-16c_16.3/lib/
Install the python package:
pip install python-geosupport
Import the package and create an instance:
import geosupport
g = geosupport.Geocode()
Geocode some addresses:
Geocode by borough code
r = g.address_borocode(house_number="125", street_name="Worth St", boro_code=1)
Geocode by borough name
r = g.address_boroname(house_number="125", street_name="Worth St", boro_name="MANHATTAN")
Geocode by zip code
r = g.address_zipcode(house_number="125", street_name="Worth St", zip_code="10013")
A dictionary of results is returned:
{'2010 Census Block': '1012', '2010 Census Block Suffix': '', '2010 Census Tract': '31', 'Assembly District': '65', 'Atomic Polygon': '112', 'B10SC First Borough and Street Code': '14549001010', 'Bike Lane': '', 'Borough Block Lot (BBL)': {'Borough code': '1', 'Tax Block': '00168', 'Tax Lot': '0032'}, 'Building Identification Number (BIN) of Input Address or NAP': '1001831', 'City Council District': '01', 'Community District': '101', 'Community School District': '02', 'Congressional District': '10', 'DSNY Snow Priority Code': 'P', 'Election District': '017', 'First Borough Name': 'MANHATTAN', 'House Number Display Format': '125', 'House Number Sort Format': '000125000AA', 'Hurricane Evacuation Zone (HEZ)': '4', 'Latitude': '40.715428', 'Longitude': '-74.002673', 'Message': '', 'NTA Name': 'SoHo-TriBeCa-Civic Center-Little Italy', 'Neighborhood Tabulation Area (NTA)': 'MN24', 'Police Precinct': '005', 'Roadway Type': '1', 'Second Street Name Normalized': 'WORTH STREET', 'Spatial Coordinates of Segment': {'X Coordinate, High Address End': '0983664', 'X Coordinate, Low Address End': '0983410', 'Y Coordinate, High Address End': '0199828', 'Y Coordinate, Low Address End': '0199983', 'Z Coordinate, High Address End': '', 'Z Coordinate, Low Address End': ''}, 'State Senatorial District': '26', 'USPS Preferred City Name': 'NEW YORK', 'X-Y Coordinates of Lot Centroid': '09835980200014', 'XCoord': '0983509', 'YCoord': '0199926', 'Zip Code': '10013'}
Acknowledgments
Credits to Charles Wang who developed an initial proof of concept in python based on Chris Whong and Noah Veltman’s work using Node.js
TODO
Add single line address input
Add more Geosupport functions
More tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for python-geosupport-0.0.4.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0db3d148a75981191b835d29593cb3c971e0c0cef498754faed4c78dd4adc43 |
|
MD5 | a70b5dc5d994ebade22c5f9f860aee08 |
|
BLAKE2b-256 | 2189e85030191ab221e1f23fc1a4f1d3e4d1065fb8a9726105218324d52cf755 |