API and backend for notesreview
# Deletes all notes that are not included in the notes dump
python scripts/delete.py notes.osn# Imports all notes from the notes dump
python scripts/import.py notes.osn# Creates all necessary indices for the database
python scripts/indices.py# Updates the database by querying the OSM Notes API# in order to receive the latest notes# since a given date of the last check
python scripts/update.py# Download and extract the notes dump# (hosted on https://planet.openstreetmap.org/ or any other mirror)# ${URL} needs to be replaced with the location of the notes dump
curl -L -o notes.osn.bz2 ${URL}&& pbzip2 -d notes.osn.bz2The structure of the notes dump follows this scheme:
<?xml version="1.0" encoding="UTF-8"?>
<osm-notes>
<noteid="${id|required}"lat="${lat|required}"lon="${lon|required}"created_at="${created_at|required}"closed_at="${closed_at|optional}">
<commentaction="${action|required}"timestamp="${timestamp|required}"uid="${uid|optional}"user="${user|optional}">${comment|optional}</comment>
</note>
</osm-notes>