databc-geocoder
v0.2.1
Published
British Columbia (BC) Physical Address Geocoding Web Service client.
Downloads
6
Readme
B.C. Physical Address Geocoder Node Client
This is a simple client for Data BC's geocoding service. It's an unofficial client and not endorsed by the government of British Columbia.
Installation
In your ternminal:
yarn add databc-geocoder
# OR
npm install --save databc-geocoder
Usage
See ./src/index.test.mjs
for for examples.
const geocoder = new Geocoder({
accessToken: 'YOUR-API-KEY',
outputFormat: 'json' // optional, json is default
})
geocoder.addresses({
addressString: '1917 Ferndale',
bbox: '-123.308527, 49.004921, -122.081220, 49.394692'
})
.then((data) => {
// do what you like with the data. Returns JSON by default.
})
API
Below is a list of supported functions. See the parameters through the interactive console or JSON spec
client.addresses
client.addresses.nearest
client.addresses.near
client.addresses.within
client.intersections.nearest
client.intersections.near
client.intersections.within
client.occupants.nearest
client.occupants.near
client.occupants.within
TODO
Needs support for:
/sites/{siteID}.{outputFormat}
/intersections/{intersectionID}.{outputFormat}
/occupants/{occupantID}.{outputFormat}
/parcels/pids/{siteID}.{outputFormat}