Skip to content

Cluster Shape Processing

Scott Kirkland edited this page May 9, 2022 · 2 revisions

Cluster shape processing

We store GEOJSON information about each cluster in our database in a table called treatedclustersinfo.

Modify shapes.ts

Our shapes.ts file uses the shpjs library to convert our ArcGIS shapefile to GeoJSON and then upload the results to our production database.

Make sure the db information is complete and the shapefile passed in at the end of the program refers to a valid shapefile before going any further.

Build

Now build this repo as usual using

npm install && npm run build

Run

Finally we simply run the script and let it go to work

node shapes.js

If you have an especially big shapefile, you might need to run node with extra memory allocated. Example:

node --max-old-space-size=16096 shapes.js

Clone this wiki locally