Fast and storage-efficient spatial database engine for OpenStreetMap features
Reason this release was yanked:
Fails to build for Python 3.13 on Windows
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.12-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c08606c5238840a4c90807c0ab7ec95360ac092a27df39bb2b32aea3edbbadd |
|
MD5 | b71bbd7b01fc759a2eab9e9f375ef011 |
|
BLAKE2b-256 | 8a14d3334564c1caf40042aff6698c4532aace4057400897d1a70130dfa47523 |
Hashes for geodesk-0.1.12-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f5bac2e418c8426efa89bdd6a6ad8efc5c5003f2452389f11002accac476510 |
|
MD5 | 81cdfcbb4711ca08db5ced03d76e3eed |
|
BLAKE2b-256 | 09516abbf87dd5a8d73d54a4d419ba6e5089a47c7b3a482e20cb9c5a8067085f |
Hashes for geodesk-0.1.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aea30aa5dd6110f6589c5b8491f92793ddf3432d53590edd41d09982c391c7a2 |
|
MD5 | f78fc2cac63f5ef514e5ef76dac983cc |
|
BLAKE2b-256 | d1e9c0bf046e30f50299b94ce987d06150fccc897c5628213feb60e31713de0c |
Hashes for geodesk-0.1.12-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 184bf3f37382ded672c9290943f52436b134222c177a5e4a7ecdaed770dedfcb |
|
MD5 | 13ac769a9438e269db39c38f92b18949 |
|
BLAKE2b-256 | 2020714b64cde6b3a757e4cb34f40c54785033e74873c0cfc376b2655b696b18 |
Hashes for geodesk-0.1.12-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b7873ed30c3bd499c6c27764d43d96c0294b598f07dcf5674c8e2ca97d7932 |
|
MD5 | c700f8b9d02b42f9f48e0f2215a6630c |
|
BLAKE2b-256 | 47015790a3aebb022f1a3e6f2fa641ce71d373af2536493394b4dbd4a36cdb91 |
Hashes for geodesk-0.1.12-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 623099f8c2c430bfdf8075988fef464cd2fc2ee1da192eaf3860a07c89fbca42 |
|
MD5 | 1c02053b46ee42a1aa6f1859bf7a6015 |
|
BLAKE2b-256 | 462c2402627582bd40058e4333c6b63df1ca8ec6d10fe80a1f7e98dec1f3d81d |
Hashes for geodesk-0.1.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04f45355f15c0489cc84e87fea42122d52c63c019d361ce5810589f72097dec1 |
|
MD5 | 2bb7c1db1082b7e139b8f7c0dd0b146b |
|
BLAKE2b-256 | 6b9daddf9b07b2a95692cada18c54173a284e4856c40229eda60641a20222a0d |
Hashes for geodesk-0.1.12-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a4daf18cbc4ddc36478f34e5a06de31ab6be45046461c54c01a4c886b9800af |
|
MD5 | 347d4d70a8693ed3ff4c041e621b06d1 |
|
BLAKE2b-256 | 6833495ddaf13f26f8ed402b8eecdc08f3d663ad09503664dce88016f9c4a0f3 |
Hashes for geodesk-0.1.12-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 158cbfff95188d412c6f71e2287031f389f1c2a83b52cdb59c5428f7951ed91f |
|
MD5 | 86d97a6ce90ad2906ff292466a5f91e9 |
|
BLAKE2b-256 | c30332ff4e7602c5c08487c88b049e7fc915df4a3758cff1919a673c0cd383ef |
Hashes for geodesk-0.1.12-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe51cc8e19660afaff151c108dcbade4dcc3483797006983f813d99e0c843e9 |
|
MD5 | 4fe444a9e22bd651078f69300f2dd983 |
|
BLAKE2b-256 | 2df3e30c280c3276924e4c57bea2ac218995d45c2066cf0276b3551dbbb1ab08 |
Hashes for geodesk-0.1.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2a431072d3d13d446e2e2d8d70308cd8b7ef3e1083c036e9a3a255ed91d575e |
|
MD5 | e36579c148bd5c2785ee275f163d94ab |
|
BLAKE2b-256 | 65f3d3cc3ffb2c3a8a901c8ecdc0e7eeb03632af04a11f7b9cd0ccf388425898 |
Hashes for geodesk-0.1.12-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efe1ae2bc7b4b1cf4208c48addfdafbe1ea6e6f4b8b2316e152b77d688413bc0 |
|
MD5 | d5552e1b8261169adc7e6e98a1fb86e7 |
|
BLAKE2b-256 | 68f2fc929fd90bf4967a3f3231b73a2e112eba6dd1c33fbd1b24fb4bfe2eeb5b |
Hashes for geodesk-0.1.12-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77bc0cb035af281ede806725f65210869368bd7f908f4f358aa4d578b742f60a |
|
MD5 | 9dafd43f3ce7ac399642ce3b1001a72c |
|
BLAKE2b-256 | 4d3f0fc292d6b0ce185a84b46e614fec0bd779eaee8b5069044eecf29645d3dd |
Hashes for geodesk-0.1.12-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecef5466ee58e3c1cf4ea2cf60e647e6bf911618ed23bdc8a58726dc0c647874 |
|
MD5 | f85c8ed7b3e32427b1b9f9d65e470561 |
|
BLAKE2b-256 | 528911822276c151a8e0dc45304234f27796a11828b0f861b4d2e8f3286e3b2a |
Hashes for geodesk-0.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48b6a6fd0256fbcd55dc3972a61b72a00890f06ac27d18847b929e223491295a |
|
MD5 | 39cec1e60650a1ae1f8650c10c11eb5a |
|
BLAKE2b-256 | 5a1cc2f758f61c0298bb0ac4f7b851484af2904b1f56336cbdfd0014976525a2 |
Hashes for geodesk-0.1.12-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 390c52e2af05d267bddfd067c2454fc9923c7d8b960644715148daf4e68f6b7a |
|
MD5 | 46c3f5ec29878f25cc1039057e21c20e |
|
BLAKE2b-256 | 086aadd1e9b7149863ce39186f1eded5a83f6bbd31838866cdc6e8dd5bef5468 |
Hashes for geodesk-0.1.12-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d8ba2999cb5803c88671756b469904db397ebbc0ed29f2a617cd2e642342237 |
|
MD5 | a9d8252c9a918773db691d0b98fd2cd3 |
|
BLAKE2b-256 | eb456bea44237f87a31c2402f744fd0f303494d838d3fb8d63e813c5844a5f01 |
Hashes for geodesk-0.1.12-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e510046a73ead6ad5997dc28d97526fdace64305533b8c9ad45b56850ba5844 |
|
MD5 | 16f3812c19fdc6cbdbaafe54aa744c9d |
|
BLAKE2b-256 | 7dd51f7af0c62d128870036db1c4b2ba2b62fd1e426a0758418bf1d0b34e43e2 |
Hashes for geodesk-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc303230673426a151f1d0e20cd6642423b07f8e2866d6a38c9e97c499638ff5 |
|
MD5 | c899f7670a5a0bbc7c19d1bcd03ffd1b |
|
BLAKE2b-256 | ca533b64b9d35fdd76e9e254e224f8a630131472218b2f5dbaebe7dd10d79bdc |
Hashes for geodesk-0.1.12-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a545a42c488fb99b598735626793469c1ca1816cf723c1a96bb598e48f5d9c |
|
MD5 | 2a68762813a168e4d6af9940136ccd4f |
|
BLAKE2b-256 | 885edb7ad663f83edff017b0c17d0e9c14f3e854aae33d9c532d05c9851a0c19 |
Hashes for geodesk-0.1.12-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4f764258c7080df9bd2bd71c56694d9a0d189a4dba0890811ce3e09bbc74f8a |
|
MD5 | c967e29d2175b2862e90e55fad08aa1b |
|
BLAKE2b-256 | 00efa25f0bb8e85eb34c81ccfc47656bcc5690d96403e492e88d501c1d935409 |
Hashes for geodesk-0.1.12-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 365cf56a1177b90ca33526c661abd9d9aad48f100cf21f2cd1e7cca3ed24dae9 |
|
MD5 | e8701f82b5d2396a51a7fcde5fc92d11 |
|
BLAKE2b-256 | 51d6f844739d1a12d47422d3473ee928019c8a1fa346ab15a690203d95b34a55 |
Hashes for geodesk-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45233da445cce2a8692001b09ad9f4a8abeef65a41708dd94efcc34c91bcae29 |
|
MD5 | 98301ded915bebf4d81bdd90b80ecd02 |
|
BLAKE2b-256 | 95ba3e13a56fd53d3f54756bb056fe77465e25a5a8b9cae41d7f7ec9aa1eb691 |
Hashes for geodesk-0.1.12-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7bbfc6f36b61ca4f7a728b1a2a9587b49c0bae4218b4cfe46d3249eaf49bb7 |
|
MD5 | 4109de3caa4092531f34f5285c33433b |
|
BLAKE2b-256 | b5a44f2a99d6f6b06ec70ea0e443b06a83ad5ae248d739793f314a343bdb8087 |