Underpass updates a local copy of the OSM database in near real-time. It is designed to be high performance on modest hardware.
sudo apt-get update \
&& apt-get install -y software-properties-common \
&& apt-get update && apt-get install -y \
libboost-dev \
autotools-dev \
swig \
pkg-config \
gcc \
build-essential \
ccache \
libboost-all-dev \
dejagnu \
libjemalloc-dev \
libxml++2.6-dev \
doxygen \
libgdal-dev \
libosmium2-dev \
libpqxx-dev \
postgresql \
libgumbo-dev \
librange-v3-dev
./autogen.sh && \
mkdir build && cd build && \
../configure && make -j$(nproc) && sudo make install
- Import
setup/db/underpass.sql
to a PostGIS database - Download a OSM OBF file, ex:
wget https://download.geofabrik.de/south-america/uruguay-latest.osm.pbf
- Import it
underpass -i uruguay-latest.osm.pbf
- Create indexes importing
setup/db/indexes.sql
the DB
If you already have a GeoJSON, skip steps 1 and 2.
- Download a poly file, ex:
wget https://download.geofabrik.de/south-america/uruguay.poly
- Convert it to GeoJSON, ex:
python utils/poly2geojson.py uruguay.poly
- Copy priority file, ex:
cp uruguay.poly /usr/local/etc/underpass/priority.geojson
underpass -u <OSM Planet path, ex: 006/390/702>
Check these two projects if you want to request and visualize data easily:
- https://github.com/emi420/underpass-simple-api
- https://github.com/emi420/underpass-view
Underpass is free software! you may use any Underpass project under the terms of the GNU General Public License (GPL) Version 3.