Skip to main content

Fast and storage-efficient spatial database engine for OpenStreetMap features

Project description

GeoDesk is a fast and storage-efficient geospatial database for OpenStreetMap data. Also available for Java.

Why GeoDesk?

  • Small storage footprint — GeoDesk's GOL files are only 20% to 50% larger than the original OSM data in PBF format — that's less than a tenth of the storage consumed by a traditional SQL-based database.

  • Fast queries — typically 50 times faster than SQL.

  • Fast to get started — Converting .osm.pbf data to a GOL is 20 times faster than an import into an SQL database. Alternatively, download pre-made data tiles for just the regions you need and automatically assemble them into a GOL.

  • Intuitive API — No need for object-relational mapping; GeoDesk queries return Python objects. Quickly discover tags, way-nodes and relation members. Get a feature's geometry, measure its length/area.

  • Proper handling of relations — (Traditional geospatial databases deal with geometric shapes and require workarounds to support this unique and powerful aspect of OSM data.)

  • Seamless integration with Shapely for advanced geometric operations, such as buffer, union, simplify, convex and concave hulls, Voronoi diagrams, and much more.

  • Modest hardware requirements — If it can run 64-bit Python, it'll run GeoDesk.

Get Started


  • Python 3.7 or above
  • Java 16 or above (for the GOL Tool)


pip install geodesk

Create a GOL

Create a Geographic Object Library based on any .osm.pbf file, using the GOL Tool (Requires Java 16+).

For example:

gol build switzerland switzerland-latest.osm.pbf

Example Application

Find all the pubs in Zurich (Switzerland) and print their names:

from geodesk import *

# Open switzerland.gol
features = Features("switzerland")      

# Get the feature that represents the area of the city of Zurich
zurich = features("a[boundary=adminstrative][admin_level=8][name:en=Zurich]").one

# Define a set that contains nodes and areas that are pubs
pubs = features("na[amenity=pub]")

# Iterate through the pubs that are contained in the area of Zurich
# and print their names
for pub in pubs.within(zurich):

More Examples

Find all movie theaters within 500 meters from a given point:

movieTheaters = features("na[amenity=cinema]").around(
    meters=500, lat=47.37, lon=8.54)

Remember, OSM uses British English for its terminology.

Discover the bus routes that traverse a given street:

for route in street.parents("[route=bus]")):
    print(f"- {route.ref} from {route.from} to {}")

Count the number of entrances of a building:

number_of_entrances = building.nodes("[entrance]").count


GeoDesk Developer's Guide

Related Repositories

  • geodesk — GeoDesk for Java
  • gol-tool — command-line utility for building, maintaining and querying GOL files

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

geodesk-0.1.10-cp312-cp312-win_amd64.whl (314.2 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

geodesk-0.1.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

geodesk-0.1.10-cp312-cp312-macosx_10_15_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 macOS 10.15+ x86-64

geodesk-0.1.10-cp311-cp311-win_amd64.whl (314.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

geodesk-0.1.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

geodesk-0.1.10-cp311-cp311-macosx_10_15_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 macOS 10.15+ x86-64

geodesk-0.1.10-cp310-cp310-win_amd64.whl (314.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

geodesk-0.1.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

geodesk-0.1.10-cp310-cp310-macosx_10_15_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

geodesk-0.1.10-cp39-cp39-win_amd64.whl (314.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

geodesk-0.1.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

geodesk-0.1.10-cp39-cp39-macosx_10_15_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

geodesk-0.1.10-cp38-cp38-win_amd64.whl (314.3 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

geodesk-0.1.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

geodesk-0.1.10-cp38-cp38-macosx_10_15_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

geodesk-0.1.10-cp37-cp37m-win_amd64.whl (314.2 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

geodesk-0.1.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

geodesk-0.1.10-cp37-cp37m-macosx_10_15_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page