WikiPois is a server to provide Wikipedia POIs on the map.
HTTP Request:
GET /?bbox=<minX>,<minY>,<maxX>,<maxY>&scale=<scale>Parameter scale is roughly computed as area of bounding box divided by number of pixels (const scale = turf.area(turf.bboxPolygon(bbox)) / (window.innerHeight * window.innerWidth);).
HTTP Response:
[
[wikipedia, wikidata, lng, lat, id, name],
...
]Create database:
sudo su - postgres
createuser wiki
createdb -E UTF8 -O wiki wiki
psql -d wiki -c "CREATE EXTENSION postgis;"
exitImport OSM data (you can also use eg. extracts from Geofabrik):
PGPASSWORD=wiki osm2pgsql -d wiki -U wiki -H localhost -c -s --flat-nodes flat_nodes --cache 0 -O flex -S wiki.lua planet.osm.pbfPreparation for updates:
PGPASSWORD=wiki osm2pgsql-replication init -d wiki -U wiki -H localhost --osm-file planet.osm.pbfRunning server:
deno run --allow-net --allow-env server.tsRun daily for Geofabrik extracts.
1 4 * * * /path/to/update.sh