Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@
/APC-taxon-2020-02-20-5349.csv
/global_tree_search_trees_1_3.csv
/out/

/APC-taxon-2025-08-12-4559.csv
/global_tree_search_trees_1_9.csv

/shell.nix
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"author": "Steve Bennett <me@stevebennett.me> (http://stevebennett.me)",
"license": "CC-BY-NC-4.0",
"dependencies": {
"@mapbox/mbtiles": "^0.12.1",
"colors": "^1.1.2",
"command-line-args": "^5.1.1",
"command-line-usage": "^6.1.0",
Expand All @@ -27,8 +28,9 @@
"jsonfile": "^4.0.0",
"make-dir": "^3.0.2",
"mapbox-upload": "^4.2.4",
"mbtiles": "^0.9.0",
"ndjson": "^1.5.0",
"ndjson-cli": "^0.3.1",
"nodemon": "^3.1.14",
"recursive-readdir": "^2.2.2",
"tessera": "^0.14.1",
"tippecanoe": "^0.6.0"
Expand Down
38 changes: 20 additions & 18 deletions sources/germany.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
module.exports = [
{
id: 'wuerzburg',
country: 'Germany',
download:
'https://opendata.wuerzburg.de/api/explore/v2.1/catalog/datasets/baumkataster_stadt_wuerzburg/exports/geojson?lang=en&timezone=Europe%2FBerlin',
info: 'https://opendata.wuerzburg.de/explore/dataset/baumkataster_stadt_wuerzburg/information/',
format: 'geojson',
crosswalk: {
scientific: 'baumart_la',
common: 'baumart',
height: 'baumhoehe',
crown: 'kronenbrei',
dbh: props => props.stammumfan ? Math.round(props.stammumfan / Math.PI) : '', // convert circum into diameter
tree_type: 'baumtyp',
ref: 'source_id', },
short: 'Wuerzburg',
license: 'DL-DE-BY-2.0',

},
{
id:'halle',
country: 'Germany',
Expand All @@ -19,23 +38,6 @@ module.exports = [

}
},
{
id:'utrecht',
country: 'Netherlands',
short: 'Utrecht',
long: '',
download: 'https://ckan.dataplatform.nl/datastore/dump/2d6893b4-d56d-4865-b6cc-0bda42e547f5?bom=True',
info:'https://ckan.dataplatform.nl/dataset/bomenkaart/resource/2d6893b4-d56d-4865-b6cc-0bda42e547f5',
format: 'csv',
crosswalk: {
scientific: 'Naam_Wet',
common: 'Naam_NL',
planted: 'Plantjaar',
ref: 'Boomnr',
owner: 'Eigenaar',

}
},
{
id:'leipzig',
country: 'Germany',
Expand Down Expand Up @@ -333,4 +335,4 @@ module.exports = [
srs: 'EPSG:3044',
license: 'https://www.govdata.de/dl-de/by-2-0',
},
].map(s => {s.country = 'Germany'; return s; });
].map(s => {s.country = 'Germany'; return s; });
19 changes: 18 additions & 1 deletion sources/netherlands.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,23 @@ module.exports = [
license: 'CC0-1.0',
srs: 'EPSG:28992',
},
{
id:'utrecht',
country: 'Netherlands',
short: 'Utrecht',
long: '',
download: 'https://ckan.dataplatform.nl/datastore/dump/2d6893b4-d56d-4865-b6cc-0bda42e547f5?bom=True',
info:'https://ckan.dataplatform.nl/dataset/bomenkaart/resource/2d6893b4-d56d-4865-b6cc-0bda42e547f5',
format: 'csv',
crosswalk: {
scientific: 'Naam_Wet',
common: 'Naam_NL',
planted: 'Plantjaar',
ref: 'Boomnr',
owner: 'Eigenaar',

}
},
{
id:'haarlem_nl',
short: 'Haarlem',
Expand All @@ -400,4 +417,4 @@ module.exports = [
},
license: '',
},
].map(x => ({ ...x, country: 'Netherlands' }));
].map(x => ({ ...x, country: 'Netherlands' }));
8 changes: 5 additions & 3 deletions taxa.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ const fs = require('fs');
const byScientific = {};
const treeSearch = {};
function init() {
// from https://biodiversity.org.au/nsl/services/export/index
const text = fs.readFileSync('APC-taxon-2020-02-20-5349.csv', 'utf-8');
// no longer works: https://biodiversity.org.au/nsl/services/export/index
// use https://web.archive.org/web/20260102004909/https://biodiversity.org.au/nsl/services/export/index
const text = fs.readFileSync('APC-taxon-2025-08-12-4559.csv', 'utf-8');
const rows = d3.csvParse(text);
const includeTaxa = {
Species: true,
Expand All @@ -23,7 +24,8 @@ function init() {

function loadTreeSearch() {
// from https://tools.bgci.org/global_tree_search.php
const text = fs.readFileSync('global_tree_search_trees_1_3.csv', 'utf-8');
// returns updated _1_9 version
const text = fs.readFileSync('global_tree_search_trees_1_9.csv', 'utf-8');
const rows = d3.csvParse(text);
for (const row of rows) {
treeSearch[row['Taxon name']] = true;
Expand Down
Loading