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 C++ and for Java.

This is a pre-release of the upcoming Version 2.0

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

Requirements

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

Download

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):
    print(pub.name)        

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 {route.to}")

Count the number of entrances of a building:

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

Documentation

GeoDesk Developer's Guide

Related Repositories

  • geodesk — GeoDesk for Java
  • libgeodesk — GeoDesk for C++
  • 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

If you're not sure about the file name format, learn more about wheel file names.

geodesk2-2.0.0-cp313-cp313-win_amd64.whl (329.7 kB view details)

Uploaded CPython 3.13Windows x86-64

geodesk2-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

geodesk2-2.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

geodesk2-2.0.0-cp312-cp312-win_amd64.whl (329.6 kB view details)

Uploaded CPython 3.12Windows x86-64

geodesk2-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

geodesk2-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

geodesk2-2.0.0-cp311-cp311-win_amd64.whl (329.7 kB view details)

Uploaded CPython 3.11Windows x86-64

geodesk2-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

geodesk2-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

geodesk2-2.0.0-cp310-cp310-win_amd64.whl (329.8 kB view details)

Uploaded CPython 3.10Windows x86-64

geodesk2-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

geodesk2-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

geodesk2-2.0.0-cp39-cp39-win_amd64.whl (329.9 kB view details)

Uploaded CPython 3.9Windows x86-64

geodesk2-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

geodesk2-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file geodesk2-2.0.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: geodesk2-2.0.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 329.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for geodesk2-2.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a05474d5e249114a89d7569b5d22957ddd7f61ee0af87e3185a6c4235b7ff74f
MD5 24b872224d8c5c65b6dac885032bb929
BLAKE2b-256 3a5b0534f4b5ad17fd68a25036b6da53aeeafeba27b4fd56b01742960ec23386

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0efdeb09ef63fa657924312cd64d47764e722a40e2aa0134596fd8cf4922e2da
MD5 2255434746202b5fa7dd150440adf8ad
BLAKE2b-256 a6b909ccee302a60b4adcf9c530e7fb4009917f0a2fa58797644a5a2b73fe578

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f13a5750ddb15738b2c897d354a76af390b18e86d47dce6dd06974a7ee71207
MD5 2a4a61aeb5c3b906055ce9dfa4af0be5
BLAKE2b-256 ddb6a0263d5814c4775724ad27bbd85c5de87b102ec1d9d48c13a6dc6ff40ace

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: geodesk2-2.0.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 329.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for geodesk2-2.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 10ef98be428fc17fbf06da3ca23702703948b7c13e43f221222abec97711d566
MD5 6f3aa0dbc0559b3d0fdd2d7c9d5f8600
BLAKE2b-256 d7380469d500271fe1c1aded6c2b3ab27ae421628ecab61d47334912a3ff3d3c

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 00832a3a476b4e51ae65b8d99cc8a21829ba32f540c6ae095d6e856adf9e957f
MD5 1bc326e7996d246c9e4eda7ac511dd1f
BLAKE2b-256 c11ca59eb613dabe8f178ff4dd516ce00be006e1d959f93080278b5a0cd897cf

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 995df691d2231bfe8bf23166ec64fbab82c7b46aeecc9f43fa6e9af5137b83e9
MD5 6e6860bf58cc8ade9f5860c65aeeb75f
BLAKE2b-256 31561a2f31ffa8d3610868fc9b59b5bb49f4d30bf82b83ba4a61d3666534c96b

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: geodesk2-2.0.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 329.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for geodesk2-2.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 18042552191ceb8f27eb41600e26dfd23661d9449f59ebe178b177fab2cd8837
MD5 3548b17a57df98b3986133b8f52e54dc
BLAKE2b-256 7a264d4013ae768803cf8ead600888ad932dd94432c9f81cb783eabe78991054

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e728442d440917dadd449f0226608349632c1aff299db51b79714ee3df6b48b8
MD5 87270057ae2c628db3befcc510511559
BLAKE2b-256 ff8cd87850fb22d3dc5275402797b98de282ecf0a06f416edaee9cc4c76929d4

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b888fb9fe7f0328a210edb7e50e94b89168cd7eb938adc38ef24cd813dcb6e8b
MD5 644bfb29a4496aa50c08fce0d97c4bf2
BLAKE2b-256 600f8e074672761b6305ca6883906d3bb52ce567631276298d0e5f535306229c

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: geodesk2-2.0.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 329.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for geodesk2-2.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e0ecd880fbcadd0aa9136a670e077de9933d4ade345705c3f8e8409495f9ac97
MD5 549b4390300c8ed552a01b80c856563f
BLAKE2b-256 a8e9dee2985edf6f9b44a46673b6def40f4389ded23b117f6edd4fb8576045e3

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 74d0cee93564c5af7f601b140dcdf74d21581b0c4bf2b5c94c8599b7f93bc1ec
MD5 0d1562db61c1e3be959f10c47f55b931
BLAKE2b-256 f8ca74bca08eb9cdc466e88171c23c0d444843e37e0885b934bf7644411127e3

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dedb9ca8d01e268550379f4e54c2c509c682ac1977afd2ce3573ae9bcb723938
MD5 2e85bce783eb50deb131e2c165556c00
BLAKE2b-256 2166b34b779a2d65686b70509f591229ddbc0befe0bc0f111bbc470b34421aa6

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: geodesk2-2.0.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 329.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for geodesk2-2.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 925c96c00e07d8566f189a328f74eea6b9b04b3336eae195f3fade93ef107cec
MD5 5ca95ab5373c21c56c0cdbc376b28244
BLAKE2b-256 76ee2fee1a407f03248dde5a07913924de969f2e00b7b6d5b41f166f426363d5

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0108202b2f08e0bdd5ad6531cd9857b46ed163ee8876b4ffd33e28e01610d385
MD5 baadcea8efffb71e8fa42f17d0a20ec0
BLAKE2b-256 fb2d7256da5f008e1df2993dd0c3798eda5eca70b934ea7bff21d7a420633d96

See more details on using hashes here.

File details

Details for the file geodesk2-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geodesk2-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74bc2dc596f565ad29c724a64436c985940c13b3b5ac491f093c99270792dcbb
MD5 4552e1b94e22bd5c4dd59e1e319f62d5
BLAKE2b-256 0ab0710391b6f416cb144ed99098b66a22cbc271188c9954a2136bf33b3975fc

See more details on using hashes here.

Supported by

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