geocodify v0.5.1
geocodify
Geocode streaming CSV data, producing CSV or GeoJSON.
install
npm install -g geocodifygeocoders
mapbox: Mapbox Web Services API
- Worldwide
- Requires
mapid
census: US Census
- US-Only
mapquestopen: MapQuest Open Nominatim
- Worldwide
twofishes: Twofishes
- Worldwide
- Coarse (not street-level)
geogratis: Geogratis
- Canada-Only
- Unforgiving address input format, see service documentation for details.
options
The input is either the first positional argument, like
geocodify input.csvOr a stream, like
cat input.csv | geocodifyThe output is always stdout. To write to a file, just
geocodify input.csv > output.csvThe only currently supported input format is CSV
--format={csv}The input method will attempt to automatically choose fields that are geographic. You can specify manual fields if you want:
--addressfields [ afieldname anotherfield ]Selecting --output=geojson encodes results as GeoJSON
--output={csv,geojson}See geocoders above for details
--source={census,mapbox,mapquestopen,twofishes,geogratis}use
Use the US Census (USA only)
geocodify --source=census < file.csv > geocoded.csvCSV to geocoded CSV
geocodify < file.csv > geocoded.csvCSV to GeoJSON to geojson.io
npm install -g geojsonio-cli
geocodify --output=geojson < file.csv | geojsonioCSV to GeoJSON to KML
npm install -g tokml
geocodify --output=geojson < file.csv | tokmlManually specify address fields
geocodify --addressfields [ columnname othercolumn ] < atypical.csvAPI
geocodify(source, addressFields, mapid)
Returns a transform stream. Source is a geocoder, addressFields is an array of fields, mapid is a Mapbox map id. Transforms JSON objects into geocoded JSON objects.