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
Requirements
- Python 3.7 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
Related Repositories
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for geodesk-0.1.7-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de706426b48959cf9beb9c8d92fcc5adeceb6a927c74524800c63e0a59537176 |
|
MD5 | c340f2725b5ad1faae4ee4ab021f4226 |
|
BLAKE2b-256 | be9d1943b14f7358b553ee3b51e86d9be3d114abd0136f9473665ef8c7aabafd |
Hashes for geodesk-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6986a17d0d4a1d047f2ef401feab3512dbf3655b4e0e45ea2f2b106192f3d3b |
|
MD5 | ec4a249e10030d8878799557840088e2 |
|
BLAKE2b-256 | c491be750a0e894959a5b3452db23409a8e534a9ec821c6808187029d76c5045 |
Hashes for geodesk-0.1.7-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8836518e77c556b0ee03db85f5a01c3b755e2edaabb5006f5da75f581e47dbc |
|
MD5 | 59c5708b2d3bdc94d69fc28f4658bb98 |
|
BLAKE2b-256 | c9dd5b438c73918eda007b44cdcd19b2ad8cf0be7e6b980e4d3484280d450f1e |
Hashes for geodesk-0.1.7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8e7534bd7f2600c5e992ec18b3aca8061fd1a4c296c82c0159e4cbcf7d91532 |
|
MD5 | cc6c9e5b2dfc974df707bcda20336ac2 |
|
BLAKE2b-256 | 98b0223ba8804295c80ffd95212d8cd4440b6c9a45816af142706e57bc4a0f92 |
Hashes for geodesk-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c08548e352fcaa2a7ec0047ebe51a7cb2aad2d8390b32b975bd5c36f3e4141f |
|
MD5 | 9cf6d3dd1924bf59b0c98c41e09de6fd |
|
BLAKE2b-256 | 2a02a401f4f79faf5149d0ba5b3a43692e89f39c4233a19c47af9195917aaba1 |
Hashes for geodesk-0.1.7-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8a4c2df6c36201c21a19b6d9107f776d23f1ea1d1bc3eed7566ca23354e0ba5 |
|
MD5 | f7fcc3e45bc7f389af951fc9dd4ce6ce |
|
BLAKE2b-256 | 95e7423e7e34f608e63229054ae9f7999b6d8518942370c4ec90cc2789232f73 |
Hashes for geodesk-0.1.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54fc0c8f6a8aec2811562f921b682a153cd5605dbcfd5b75d17a8d38d8efad6f |
|
MD5 | 4d09889e4be43a2f820ceafef2947573 |
|
BLAKE2b-256 | 226c5799bc157121837ccf52f0b53ea236864a1701fc768b2f5948541ba23386 |
Hashes for geodesk-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b29f30089cbe19bf5ba2d046ae32e1a363b7723f9b787c35124631b4ba26a49f |
|
MD5 | 1c13527ae118348e04b3849fe99b3398 |
|
BLAKE2b-256 | 38981ee518e4f8ba74c854ffc7da19827746153382498e559783dc7105485075 |
Hashes for geodesk-0.1.7-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f065b20ea51bf5494f02684a402858f610739261e4bc6a1ab7e565381d3b5de8 |
|
MD5 | 159acd1869028ead401f6236b3f901e3 |
|
BLAKE2b-256 | 33ae8e2acdf4b25031a8f4c06d7b6b8e486afad4a274a772f0b9a84ec90937a9 |
Hashes for geodesk-0.1.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4a80a18eea15e1094e74bf0638666f70b10a88dd21d51cd7fed9f5d133e17c4 |
|
MD5 | 5bdd4537da62d6e71def4c8305ca85ed |
|
BLAKE2b-256 | 293d837bd09b2783d3067a443de7b9fa8f8db0bf7490873d0a03eda3a3cf66dc |
Hashes for geodesk-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e15b6cdb7cc915fb5a8e3af0e864c4722a5062445b75f3f50c4c95a354d2edab |
|
MD5 | cea4fc161be21c86e338fe5e26c3fc6f |
|
BLAKE2b-256 | 9db73e148093b1a55284db399d35babf0c72318faea3047a3d150f218ba8baab |
Hashes for geodesk-0.1.7-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a1622b54f1a239503ced8617fafe5ca36c1f082022c9c60ae9a818b25b99446 |
|
MD5 | 3c4ba599d2629e06981f07de9d234830 |
|
BLAKE2b-256 | cf20b57af3961a3855183287a33e9922e08b85bebbfffadf9b226f596ee51f4b |
Hashes for geodesk-0.1.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c64c86147e9c527d11c81c2fe54a7e33db47fda98836ac436136fadd769f73ec |
|
MD5 | 5a4daa13771c3f8629c5ea49a60571d1 |
|
BLAKE2b-256 | 88d813fd058d147aa7da4d5f269ef485fe70e5da1e8241a7e0c9fa7231f6fa96 |
Hashes for geodesk-0.1.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d8ffb2dcd11bfffe477ed118e170618aee6a301002033f9adbd3f9dd8e9d621 |
|
MD5 | 8dbe486113ff39c5131935fdae7739dc |
|
BLAKE2b-256 | 75e3ef6c26a6eadd608ee28f01e3a08f380fe46d8853f5fd0cb21b07e8060618 |
Hashes for geodesk-0.1.7-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 954b49ea46a1382d149aaba27a2bb3ace4a9cf27c0bf66f1ed13b9a658df1e3a |
|
MD5 | 4661e6e6e1a8455775a33d9a12a0ab2e |
|
BLAKE2b-256 | c53c9257fc78bd73c7281e61908244e30971cc52fdc3dfb925b73db27ad969ab |
Hashes for geodesk-0.1.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c228ad24d2635205f3dc3e92252a895b253761c74526b538899e5eb04c73ff2e |
|
MD5 | 0f8937ab6364d9b357f2ebd810afe230 |
|
BLAKE2b-256 | 87eb95526a4079016f5d5b0472bfaaf3efea1c638ad6897c21390724645b09ca |
Hashes for geodesk-0.1.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2796c669f5ffafa149adede7a93cdd1af066d0bc0092d74ff100ec116327a69 |
|
MD5 | 6a4e64f3ffcee74afd50c0b7e75a2c9b |
|
BLAKE2b-256 | 11989231b6f8be32e71040f15ca72877ff98115fef4ee0bf01f12b14be08ea8e |
Hashes for geodesk-0.1.7-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a88a00937064be12793df5443fba81810bbd05394c1900db6ce0cc37a8d8b8e |
|
MD5 | 55fcab87243e90efe21e2356a7a9f3c8 |
|
BLAKE2b-256 | a9e96269f0837112b6fe554f468aee7219f0291f4d35c48e1b73ef435c2aaebb |