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.10-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3e50677ab42275d909dda695160423e793e91172316c0af5f167ad822949044 |
|
MD5 | 40ac6d4697dafc73d9b0e2eb5e914430 |
|
BLAKE2b-256 | b8d8a03e6d4a1194e6a25c36c41a31b6f5008a8d14ce835e755413e3548cf8f7 |
Hashes for geodesk-0.1.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b8b4543071581e59088d30b7ab529c1bdd03ebfb1afd0e502414be3b58957e8 |
|
MD5 | a6f766f996d84d4a71677c479d7d97cb |
|
BLAKE2b-256 | 9adfc808b96714045b752d671ce1adc2babba4bba81f1b9c5977f15e1db49347 |
Hashes for geodesk-0.1.10-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1313ce7ddbdd1324087add26de99873511838ceb8c417fe10831bd616c95094 |
|
MD5 | 906232d53b1b6a4a8abb648afdedaea0 |
|
BLAKE2b-256 | 9e5162d1d59983bff3abb84a30b1f15320752f3c0dd27312984e3d39b57e684c |
Hashes for geodesk-0.1.10-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a72cc714cd078db2a68c1e2d62c14cc7a16c57f878909fcec9aa93d82824e32b |
|
MD5 | 3b0c71b05ae123a62adde40a59206c33 |
|
BLAKE2b-256 | cfff7f9ea2b6c4e4a45b4d6918d373770735b1b1068bf7e6a1ed295904827e9b |
Hashes for geodesk-0.1.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43e237acb577b91c1e652341b90c4d980d937730299eb513e0a85c1167ef0a1b |
|
MD5 | 9d15474b2f980c08a764f7e3021f3557 |
|
BLAKE2b-256 | be9ac11c232dd726206cafc4863e5fdbcce375a3d3f6a48788f9f19da5e0875d |
Hashes for geodesk-0.1.10-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8d93778f14eee35a8b28ce161b9ee4602eff9c7a82eb2b4b8dbb3cd5fa58c46 |
|
MD5 | 14f9ca49f27faa5400d9c288df197d16 |
|
BLAKE2b-256 | a1f042e77a0c2916a8da11afb7bebf142dfbd619f7337e85f9de8382f8edf82b |
Hashes for geodesk-0.1.10-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb49f86cbec77907eb841a38ca03491bfa3b1f34b1c29c0d200280f61b34f38 |
|
MD5 | e3459fa03796cc90d406beecf674b388 |
|
BLAKE2b-256 | 72a3fa10b886c62a5622d13bb985e51729286db5918465f0a12e1ff2758169e6 |
Hashes for geodesk-0.1.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb7c76f870f2cc985ec29213bec8eb1971f1a66c527a18194dc54b25f0d83e3 |
|
MD5 | a794159421c234c0387fdcd83b2cf560 |
|
BLAKE2b-256 | f68d4d265aea34ffd4a06d5c309ff3c2df29a4410cb228bbdc0bf9fc4f52674b |
Hashes for geodesk-0.1.10-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dad1a40c134437938b7f0e95ef43cd201204b56fe943428ce7a1f38fa90ca64b |
|
MD5 | 0e614d5dbf1beebe84753e832d390f5a |
|
BLAKE2b-256 | 229702f7e0c61b2758c050b6e4b7e2b88ef2b2f0600e5d34f55720385eec3a8b |
Hashes for geodesk-0.1.10-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4381974ad2c266c8c77433acc6b2d296b6b99f4674c2ca283f1a4f9c539c93 |
|
MD5 | 5ad8e20b5bd067d5727a436f6c1d9a02 |
|
BLAKE2b-256 | 6a068cbd52df68097518c98d9390f4598055951b746c08d78cfcc7dac5a1de6b |
Hashes for geodesk-0.1.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d95ee4f5f649b4bf8b39566a40cde0a9b066cf7c9d75e70c64951ee588d64b |
|
MD5 | 69cd9e73286c83f2dc8bcf8db6bca245 |
|
BLAKE2b-256 | 13366e91d8396f814f4711ab132a7fa14ccfbe03b19d680b078b34daa35deefd |
Hashes for geodesk-0.1.10-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 554630a11b6b87a5f199310ff262e1106ff8352450feee94d67791d2d2177d0a |
|
MD5 | 825d58f3ce467addee198d2d77c5803b |
|
BLAKE2b-256 | 56eb5e2a5505f3f98c99edc123de4f40a00c0687dec256f60146974fa9263af1 |
Hashes for geodesk-0.1.10-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee173cd32d85133f9e4a39146a830abe1ca1cc663ab85a4984e83154bbb3f58 |
|
MD5 | a74eaa4628a17edfc5c577ac6e245939 |
|
BLAKE2b-256 | 6d825ee02960cf2f5cad77df56f7f4ff29a2d13bcc4b50ad0d1d4d4c907813ea |
Hashes for geodesk-0.1.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 075c9606f5e9100cea833daaa666d74ef1582d9e75e55716c902849fc7ca7add |
|
MD5 | d82b79cc7dd5fb227f135d9d5c7343ac |
|
BLAKE2b-256 | c002a61af36c3733bb0fe5b8c438e4c4a66f0727c78fa0ea92c766612a3055a9 |
Hashes for geodesk-0.1.10-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d549399e14b137245208c6e3e9298777ae832031318999ceb3f2d21fd98b777 |
|
MD5 | 27ffc77d2eaebda405b51b259801b761 |
|
BLAKE2b-256 | 1c5d6732bc7c74a9106d928fef383461b943974728bd9a6eeec6039d18966215 |
Hashes for geodesk-0.1.10-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a4e061e6dc8eda14ca4d973aaf77c59a51290e8e640b3ea533a19a62a432660 |
|
MD5 | 160ccdea96bd164cb90469e0af7cf66d |
|
BLAKE2b-256 | 177611152c657e42d77d05a101cef7c140a81ab0413d447f6f38eb7faa66c450 |
Hashes for geodesk-0.1.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 954115cf82c872dd34e68df160f3f1bc8b41a8e728ba3a61c7e2de1c3b2aeb62 |
|
MD5 | 1a947ac23ec8fd041cc89fd97402caa1 |
|
BLAKE2b-256 | cc922ba8d7b5386227e67ccc00dfbf28a18f07085fc6b00606de5c4936299d5a |
Hashes for geodesk-0.1.10-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5261ea1ff40091ff27c6766ecf5f0bbef8c8ac0d6af0cca9f6a76dde5d33d3c |
|
MD5 | b3fe8c631cd72ba62b3d7330a1ee7ba6 |
|
BLAKE2b-256 | 2826ba2ad97f3d8c2efa9dcec8656ef585bdf6a72ee63e24b7a2e3cf70b16bc5 |