This repository has been archived by the owner. It is now read-only.
Generates GeoJSON for website map
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
ignore.txt
npm-debug.log
package.json
yarn.lock

README.md

NYC Mesh Nodes

Generate GeoJSON from google spreadsheet

This is a fork of https://github.com/nycoliver/nycmesh-nodes

The paths have been changed to work with the nycmesh.net site

The paths assume this folder, "map-nodes", and the "nycmeshnet.github.io" folder are both in the top level of the same directory. It will write directly to ../nycmeshnet.github.io/map/nodes. It will also look for pictures in ../nycmeshnet.github.io/panorama/

Setup Instructions

Dependencies

Install node.js, if you don't already have it. Then, in this directory, run:

npm install

to install dependencies

Google Sheets API

  1. Go to the Google Developers Console
  2. Create a new project (and then select it)
  3. Enable the Drive API for your project
  • In the sidebar on the left, expand APIs & auth > APIs
  • Search for "drive"
  • Click on "Drive API"
  • click the blue "Enable API" button
  1. Create a service account for your project
  • In the sidebar on the left, expand APIs & auth > Credentials
  • Click blue "Add credentials" button
  • Select the "Service account" option
  • Select the "JSON" key type option
  • Click blue "Create" button
  • your JSON key file is generated and downloaded to your machine (it is the only copy!)
  • note your service account's email address (also available in the JSON key file)
  1. Share the doc (or docs) with your service account using the email noted above
  2. Move the JSON key file to ./credentials.json (put it in the root of this project)
  3. Create file ./spreadsheetid.json and place the google sheet id, e.g.
{  
	"id": "1234qwer1234qwerasdfqwer1234qwerASDF1234qwerr"  
}

Usage

npm start

Writes a GeoJSON file to ./nodes.json

Panoramas

The script will look for photos in the ../nycmeshnet.github.io/panorama/ folder