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.2.0-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e84f88f156e95a310b3f69e6a9663936e5cd190eb2c924bdcb28696fde0cea57 |
|
MD5 | 594ff35fbfef37af76e69833eefa2953 |
|
BLAKE2b-256 | a6a0f9cc430c21e1d097cad11639df9d1bb8fcac08027f5aa2ab788beba03e4f |
Hashes for geodesk-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a53b0efba02eaaea7011e4967aa34ce96a01a1d4140f6a6e38bed454e0e0a423 |
|
MD5 | 060b95ea354a7cc6e8d215b586ad550a |
|
BLAKE2b-256 | 4b21ab369f42877af50a5e09d2413dab2d3c2945b1284da01a0b65c8f23041a1 |
Hashes for geodesk-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf8095fe6cd4f5f41f1bf398b8224a71441cb453976449229f6077663607068 |
|
MD5 | ba63003fccd0ab2461e4d2442d99f7c3 |
|
BLAKE2b-256 | f0c6d49ce3df7e5aa4f487a1f0cfa2e3f569b56c7caf819637abae65dc5b9d7e |
Hashes for geodesk-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 002da193a4651ee16071d57df0950c1249aec53064a51e19929a1044e182f834 |
|
MD5 | 5c71cf818299ef6288fa7b21127c06a1 |
|
BLAKE2b-256 | c6561b20c050fc8e7f58da817306b25bf7eb0c7e19e1226c03812a7e0ce6af8d |
Hashes for geodesk-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cef3555e576e8118d165390f1486690d088074b4caa5311d6690d6f8b5a826aa |
|
MD5 | a602710e20b038f600cf1325158cfa29 |
|
BLAKE2b-256 | 757bea746809c0d461f760fc999cb3480c0fac58341112efab9e5c91f0b5ab93 |
Hashes for geodesk-0.2.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2f1969b7f7152c5a410130cac3f0d1456826e53be5267a934115b9048ae6313 |
|
MD5 | c5aabc9f3ff9dbfaa1069b48e96032c0 |
|
BLAKE2b-256 | 35b4d0c6845cf1ce45ba412cf7568f80f4966daa391a37570deedcaef03b5947 |
Hashes for geodesk-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c150c55090e927b3288738fec6e2ff10a22a68cf8c771b560d63c66b588a33 |
|
MD5 | 7db10d8706637098f4c8d722a4a79a76 |
|
BLAKE2b-256 | f94f5ca20e116df8b43048384936814521574ec218a410d2d91c20c089a63860 |
Hashes for geodesk-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2f01de68ebcba87c25d395e1b9c8293bc0aaffaddd4f35ce831485d116361c |
|
MD5 | d52dd36a51c33291562eb96a43c4905b |
|
BLAKE2b-256 | 4596d1561b840d1ff4c65b6b7df52db7b10a1682227b644e24446c6472af596d |
Hashes for geodesk-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c2f230f49235446395f69d25a8170d654b3e1c8bf5889325d74581a94c50fc8 |
|
MD5 | 6e3b20d1f98b15f5934f33f48ce3b8ee |
|
BLAKE2b-256 | 5634c796041b0c101d0f0059d4fea5c3bf4d29ea30d40c755cc0e05ec1965670 |
Hashes for geodesk-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a1bc1fb593f8a48af36546496e8221cb47ebfabaa99eb787b39cff2f6ba5536 |
|
MD5 | 0df4ebd9195e56285512b5bb8ba17193 |
|
BLAKE2b-256 | d286e1a5616433f3d6cde1c4f0da904b7c725e4d9c48a4f3164e9f9a9e4fe477 |
Hashes for geodesk-0.2.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eef69f53081c5be36ed79433df14608635063c38c59f5f4aedf4f546b01a257 |
|
MD5 | b91890d8db509aa74a2db5e31c037ee0 |
|
BLAKE2b-256 | d8587294c5a5851e22e70f6c0386fcd427215a2910fc88dcade0cad273cfcf04 |
Hashes for geodesk-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e139c2549205e7adb758f4eda4b4815ec1429954870ad2a23a5f6df26ce2b5fb |
|
MD5 | 59cae509f5c7b1a435e9784550f99a0d |
|
BLAKE2b-256 | 66de8b24b07d0f8e625848a9030045db4b3bd3f5db73d5dbe1b14e3c472666a6 |
Hashes for geodesk-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68900ae6e82a1cfe17d2779a437055ba5bd60649a7b2b15bdf3cf16226731d62 |
|
MD5 | 54a7c14b9f7dde00437c9656f1929bd4 |
|
BLAKE2b-256 | 27bb2631a6bd52b3bbec9ba056d3c328daf8ae93984e47154928404de73b1ceb |
Hashes for geodesk-0.2.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fed1c298a27951ca2b94d9ce2592e3d64f716a8563e96198522f366fa9491a1 |
|
MD5 | 244e9ea5e63e27b4659323400cefd8b4 |
|
BLAKE2b-256 | 87ecbbc3204f76a8ef76f491dbd1374d510d37be34d8ffe981254373eae84e26 |
Hashes for geodesk-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c42ae1e1bb65e67c085fb56697ef579edad39df47f9bd50d30967e5bb03d82fa |
|
MD5 | 9b23f5c90dd95a1491e8b807c54563ef |
|
BLAKE2b-256 | bb022e6aaa5c160ba1e4adf92449f9c91cb9463b08ea06b8c805aa3d2dab6cc6 |
Hashes for geodesk-0.2.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7e5ce81f3018a407b75b02f372b8563db61dad9e42686de6728e6f8547e6ca1 |
|
MD5 | 470bae94b49351aa7950b1fe05d99913 |
|
BLAKE2b-256 | e918cf6fcf8e72f8d81d7a93eb767ae9a582573be88c4b791665834aeb68fdcb |
Hashes for geodesk-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 124b0782422046d6396b8b152fde4b8ac885ae1fbdbade5d9d90bf885bff8dd6 |
|
MD5 | 2e0d7f4ba3f950f8d2c4fd39f52a13ad |
|
BLAKE2b-256 | a5ef15346775c352a25b2593a740f70c58f5a58456079edea989686322c97b1d |
Hashes for geodesk-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 445668914e9fd43552d011f61700ac7428b510ce58a388aac5e3b24995d55994 |
|
MD5 | d4e10a414a14f75134fc7867ddeb8890 |
|
BLAKE2b-256 | 19053ea4917b34ec9ff0f838b73c9a8e9ac212bbe12d87ff58469404a9fafb05 |
Hashes for geodesk-0.2.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 547c46840ec1a558e03496046add58158b65186ae1a79edbd8729ace0bd2d023 |
|
MD5 | 44fd0f3eed53000c1d8ef78cf9c864b6 |
|
BLAKE2b-256 | 663bd1a6c5d69b969eb784f3ca51a27d217069df3d74aa804772d91709e81086 |
Hashes for geodesk-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63412afc3b7986b38e363012f028fae4750dd232419ab40b0fad5218124703ff |
|
MD5 | 7906150ceaa47162887a7c2999983ab5 |
|
BLAKE2b-256 | edab1de360d06273a359d6e99858e95dc2f8537c4ee1d69d84c82d64187c7fc4 |
Hashes for geodesk-0.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d27dc5786c2d6078df25214d9f741263dacb14a27e86d44a7ff26230ccd0b2f1 |
|
MD5 | 7a74428a31b74c65c1f0fbed9685d3e5 |
|
BLAKE2b-256 | 25aa0962310fdf1c9f733519533223e22c9bca35a4146656aecc0095f15f9383 |
Hashes for geodesk-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5aaa38b3ce6b4ead635cdf76e9b9b4a8b670d2c045a843a70c15cf4c7b46ae |
|
MD5 | 0e8db815085e58e87f0d1997ed9e162c |
|
BLAKE2b-256 | fd7c8f02a40876876228252a7b57599f8140e0b16faf1d000d7a7088865af512 |
Hashes for geodesk-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a19da8fcc2505382052bfcae56083db13c391c4df4e891a0611d498df70d6cd |
|
MD5 | 2be45b6a6d3336f1059ecc1a79264357 |
|
BLAKE2b-256 | 47fe81b7de1496eaf5390a243757eb71885407a4f0ffbc39728d7448e5641ea4 |
Hashes for geodesk-0.2.0-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dbdbe9ee521a517de7a741f0d2a600496f7cee702edc4458e915b5fcbd9c376 |
|
MD5 | ab670fbcf9e87eee75d5a87343eab3ea |
|
BLAKE2b-256 | c2010d1547eaa513884a27e28480a2fddeeac55e68a488030fa8d089d3848083 |
Hashes for geodesk-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16cabb5eb309115b02a2833657f6e8baeb0ea35f8856e24a64fb26cf016adb5 |
|
MD5 | fad41681ece8b39d0943ad5cd2657878 |
|
BLAKE2b-256 | 0e957c954a814068c41b1cb0a9bf6f8517f935398620e4624ccc581585a1b6c4 |
Hashes for geodesk-0.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b01c595b808e68d99c86234432da3883f3c7e99b5d4c4e4faebf13e44db064 |
|
MD5 | 44b74daa5f848dc1b5400f020eb582b3 |
|
BLAKE2b-256 | d02f807043bb75040987e19f4b8d8907bb5b4ec01983229077257b20c3a5d0ae |
Hashes for geodesk-0.2.0-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e8cda11eb2832a12f9b2ec10d47b51794e9e6181d9d44d88698f54318056e6a |
|
MD5 | 7393b20832893af0961a6fd36a62b530 |
|
BLAKE2b-256 | ceaef29f3f9c7906212e86714d6056039f43e41af2e4b3969cd902622689e865 |
Hashes for geodesk-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24eb1f057fbf622b3ce5fde809162657554a0026a8474d4e3711f6189f00ab15 |
|
MD5 | 09c523ce2257b7be0cceda3f26c540b2 |
|
BLAKE2b-256 | 1b18d649646138334561d7df25256bd4cf0958dc3c0481094ac3f800fa8c21b9 |
Hashes for geodesk-0.2.0-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d33a6f1596a320adbd98f8381bc3679b3ec45370a711b633950705189a2e9c2c |
|
MD5 | 5a09426fb6321cc1d808ea6a8346d74b |
|
BLAKE2b-256 | e7d6c16b90a5cfed4bdf0645242c1c1623dd054b5c2ed95564d64d42abd6aaae |
Hashes for geodesk-0.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69ed2e8a0572efab16399385dcd918b0287cbd39e0c76ff297c95d6a57c68c31 |
|
MD5 | 4b4d86bf70138464aef0f803c066a0d4 |
|
BLAKE2b-256 | 4c820d004ccc54b9eefc46ba12a75e7047a280dd22e15fd05fdab65e2dcdbd4c |