Singapore Trees data
This is a data-only repository to complement ExploreTrees.SG.
It's in the data/ folder.
npm run trees- fetch all raw tree data from Trees.SG and generategrid-*.jsonfiles in thedata/gridfolder.npm run family- fetch family categories for the trees, and generatespecies-info.json,families-species.jsonandfamilies.json.npm run pois- fetch Points of Interets, mainly the parks, community gardens, heritage roads and skyrise greeneries.
npm run chunk- read all the raw data and generate a cleanertrees-everything.geojson(NOT included in this repository).npm run minify- generate minified/compressed data (excludesfloweringandheritagedata) fromtrees-everything.geojsoninto:trees.min.json- Data with two keys;
lineandprops. line= All tree coordinates combined into a single line encoded with the Encoded Polyline Algorithm Format.props= All other values from GeoJSONfeature.properties
- Data with two keys;
trees.min.mp.ico(NOT included in this repository)- Same as
trees.min.jsonbut compressed with MessagePack. .icofile extension is used to mask the.mpextension which is actually a MessagePack file. It's NOT an icon file and the.icofile extension is meant to fool the server to apply Gzip/Brotli compression on it, since there's no official MIME type for MessagePack. GitHub Pages serves.mpas uncompressedapplication/octet-stream. Cloudflare compressesimage/x-icon.
- Same as
trees.csv- same astrees-everything.geojsonbut in CSV format. Includes raw coordinates.trees.line.txt- same aslinefromtrees.min.jsonbut in plain text.trees-no-coords.csv- same astrees.csvbut without coordinates.heritage-trees.json- list of tree IDs that are in the Heritage Trees list.
npm run tiles- ❗ This requires Tippiecanoe to be installed first.
- generate the ultimate final
trees.mbtilesfile, to be uploaded on Mapbox Studio as a tileset.