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-*.json
files in thedata/grid
folder.npm run family
- fetch family categories for the trees, and generatespecies-info.json
,families-species.json
andfamilies.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 (excludesflowering
andheritage
data) fromtrees-everything.geojson
into:trees.min.json
- Data with two keys;
line
andprops
. 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.json
but compressed with MessagePack. .ico
file extension is used to mask the.mp
extension which is actually a MessagePack file. It's NOT an icon file and the.ico
file 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.mp
as uncompressedapplication/octet-stream
. Cloudflare compressesimage/x-icon
.
- Same as
trees.csv
- same astrees-everything.geojson
but in CSV format. Includes raw coordinates.trees.line.txt
- same asline
fromtrees.min.json
but in plain text.trees-no-coords.csv
- same astrees.csv
but 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.mbtiles
file, to be uploaded on Mapbox Studio as a tileset.