osgende is a Python-framework for creating customized Postgresql databases from OSM data. It expects the OSM data to be already in a random-accesibly storage and extracts and updates relevant data from there. Currently, the only backing storage implemented is a Osmosis-like Postgresql database with a file-based node-location storage provided by libosmium.
Osgende requires Python3.
-
PostgreSQL >= 9.5 https://www.postgresql.org
Postgres database.
-
psycopg3 https://www.psycopg.org/psycopg3/
Python bindings for PostgreSQL.
-
Shapely http://trac.gispython.org/lab/wiki/Shapely
Python bindings for the geos library. (available as Debian package: python-shapely)
-
pyosmium >= 3.0 https://github.com/osmcode/pyosmium
Python bindings for libosmium, needed for the import tool.
-
SQLAlchemy >= 2.0 http://www.sqlalchemy.org/
SQL toolkit for python. osgende uses the Core package only.
-
GeoAlchemy2 http://geoalchemy-2.readthedocs.org
Postgis extension for SQLAlchemy.
Optionally, the following packages are required by some of the tools:
-
Mapnik >= 3.1 http://mapnik.org/
Map renderer for OSM data.
Osgende can be installed using Python's default setup tools:
pip install .
Osgende always needs a backing database that contains a full copy of the OSM data you like to process. You can use the osgende-import tool to create such a database. To create a new database and import an OSM file into the database run:
osgende-import -d planet -c -i liechtenstein.osm.pbf
It is strongly recommended that you make use of an external node
location file to speed up processing using the -n
option.
You need to create your own MapDB and instances of tables. For an example see the waymarked-trails project.