@geops/tree-lib

2.0.0 • Public • Published

tree-lib

This library provides tree recommendations for different climate change scenarios.

Data

Data for tree type projections is provided as a CSV file and needs to be converted into JSON to be usable by the library.

  1. Install NodeJS 10, Yarn and Docker Compose.
  2. Install dependencies: yarn install
  3. Make sure Docker can overwrite JSON files (ie. on Linux chmod 777 data/*.json)
  4. Run transformation: yarn run data:transform

NaiS

NaiS data is provided as CSV files and imported into the PostgreSQL database for further processing. New data needs to be converted to UTF-8 encoding with the following command: iconv -f ISO-8859-1 -t UTF-8 [source].csv > [target].csv

Vector Tiles

Spatial data is downloaded from different sources and imported into the database. To add or update spatial data have a look into data/spatial. For the app we generate one vector tileset using the following commands:

  1. Start database: yarn run data:start
  2. Export spatial data to GeoJSON files (might take a long time): yarn run data:spatial:export
  3. Transform GeoJSON files to single vector tileset: yarn run data:spatial:tile
  4. Generate font glyphs for Mapbox GL (currently only NodeJS 10): yarn run data:spatial:fonts
  5. Deploy tiles to a webserver or to Netlify (currently maintained by geOps): yarn run data:spatial:deploy

Bugs

Please use the GitHub issue tracker for all bugs and feature requests. Before creating a new issue, do a quick search to see if the problem has been reported already.

Development

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.00latest
1.3.1-beta.10beta

Version History

VersionDownloads (Last 7 Days)Published
2.0.00
1.2.10
1.3.1-beta.10
1.3.00
1.2.00
1.1.00
1.0.00
0.9.70
0.9.60
0.9.50
0.9.40
0.9.30
0.9.20
0.9.10
0.9.00
0.8.70
0.8.50
0.8.40
0.8.30
0.8.20
0.8.10
0.8.00
0.7.90
0.7.80
0.7.8-beta.20
0.7.70
0.7.60
0.7.50
0.7.40
0.7.30
0.7.20
0.7.10
0.7.00
0.6.20
0.6.10
0.6.00
0.5.10
0.5.00
0.4.00
0.3.00
0.2.00
0.1.00

Package Sidebar

Install

npm i @geops/tree-lib

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

1.74 MB

Total Files

6

Last publish

Collaborators

  • danji90
  • gevos
  • mario.haertwig
  • lucien.edel
  • geops-admin
  • oterral
  • lb1c
  • friedjoff