MyTree uses an extract from OpenStreetMap database to retrieve planting dates of trees in europe, a list of trees planted near your birth date is then generated and displayed on a leaflet map.
- Make sure php is installed on your machine, as well as the sqlite3 extension (installed with
apt install php-sqlite3on Debian/Ubuntu) - Move to your public web folder
cd /var/www/- Clone the repo
git clone https://github.com/TTalex/MyTree.git- Download the database from github releases
wget https://github.com/TTalex/MyTree/releases/download/v1.0/trees.db- Access http://localhost/MyTree
- Download an OSM europe dump using https://download.geofabrik.de/europe.html
- Use osmium to filter the data, keeping only nodes with a tag
start_dateand tagnatural=tree
osmium tags-filter europe-latest.osm.pbf n/start_date -o filtered_sd_eu.pbf
osmium tags-filter filtered_sd_eu.pbf n/natural=tree -o filtered_eu.pbf- Convert the resulting pbf file to a sqlite database, for example using pbf2sqlite
wget https://github.com/osmzoso/pbf2sqlite/releases/download/v0.5/pbf2sqlite
chmod +x pbf2sqlite
./pbf2sqlite filtered_eu.pbf trees.db