Python port of GeoDesk, a fast and storage-efficient spatial database engine for OpenStreetMap features
Reason this release was yanked:
Removed pre-release
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:
numberOfEntrances = 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.0.8-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8400cea9580ec02d3baa292f06b3a06dcad6e5b9b6790839258f1d95692266b |
|
MD5 | f3a01e98a879556594c21b3158229d64 |
|
BLAKE2b-256 | 75b49f9fdc2cbb97c0d33d7d0e0f32386fcbe0e9fb4df5562ae2deea431000ef |
Hashes for geodesk-0.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 809142a3b39a620dd366812f033dac249e88724ef9d347a3cb757ff7a7fd1757 |
|
MD5 | ae9037fd4ca981b06a9552f80c498f52 |
|
BLAKE2b-256 | a0891f427cd11bc8a6684014473d44bcd4b1713c1839e82dee08c090d2f06985 |
Hashes for geodesk-0.0.8-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a88a20b362ea806174785dfc99d1289f5eb53339dd378c8dffe43300e824705 |
|
MD5 | 6a5e3912d14f3234eb912b6e5c903a4f |
|
BLAKE2b-256 | 450928de16125e2de34c9e6bbce6ed75fff569f22f2c34aff01de27583ec0b63 |
Hashes for geodesk-0.0.8-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26ca745835aaf3b7f4b62acf1e7eb49727ad6f12554a469947d322c85ef0eea7 |
|
MD5 | 39442cb566ce5028328e6be7e6364c86 |
|
BLAKE2b-256 | b7c0e4efc3dd982a58699dfd7945cbcac77811dc86fc99aa1194543ebaace794 |
Hashes for geodesk-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15fea6fd3f13a7843f21ad6bd12a34f1dc912db2b2a701e368f175e756f5e60 |
|
MD5 | 9248cb5fc9b646c6c33c96846c504077 |
|
BLAKE2b-256 | 2543d8decbbc7c71caeee3969cebd08d601e09e66e794c5fd038c804f71d781c |
Hashes for geodesk-0.0.8-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe135f8f2f80b9eb8aa134d1557de1f2fc5cd4796a37f57a06266c1fb1d5234e |
|
MD5 | 2d480aa56c30add0831da750fd2bccef |
|
BLAKE2b-256 | 1258bb399b8b79aa6a803576d4847e2dabd1cb37530bca33399fac5448bcaec0 |
Hashes for geodesk-0.0.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eece580b7a36a685cca0c2a81e38055a4c5f762567fc279ad6c3eb3a4a746806 |
|
MD5 | bd3854ef797a1f2dc94a7400a1ab7304 |
|
BLAKE2b-256 | c323f124fd5d11edee60fdccde83b198d854d91b3917b33e5b7521104cba2bf7 |
Hashes for geodesk-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb7984d51a87e709fc4a9f4603d26ec31310ce517311935b4ac046da60bbb416 |
|
MD5 | 8ca9f757afaa6be8c4fc6267c14b0e40 |
|
BLAKE2b-256 | f9211a2e5b7a405ff4d409919127e4c6173134ecb80613304af0de5ef91378ed |
Hashes for geodesk-0.0.8-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d50e20348cb6f808775101f1b00e182c25dd73d7b3dea447774c58b1a249e54 |
|
MD5 | 1b1adc95cb06728ef8b5d6cb0bf6c1ca |
|
BLAKE2b-256 | b94cb328bfe668d708d33c063e3b549757169d6c326cdfbfef16c3ef2dec0db5 |
Hashes for geodesk-0.0.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a594a754a933549f4b27fa6f6646845c4f0cf562fd795231dff4d459226dbbe |
|
MD5 | 068a9d4eb91ab2addd6ea27762bf056d |
|
BLAKE2b-256 | ba43b3fd465c4982675a390d487cf334b0805fac16d7ec83498eb16cc272f7fa |
Hashes for geodesk-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61a4b57b2e7be78326354b4736f94973fb50c31924dda97f7dd4cd423878b99 |
|
MD5 | b6c276e5b42bb97a297f2dd4ca44e886 |
|
BLAKE2b-256 | 8f1916ddd00dce7d23e10a9a05a65b1b3bc48d72217b6b9895be4db2ff2b595e |
Hashes for geodesk-0.0.8-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 172f8d32fd33f1564f8ca33d3836344c258d54e3ce5489b1087503b41bbebd39 |
|
MD5 | b2f8d6a6e09ee7f61f64f949ea2e29d9 |
|
BLAKE2b-256 | 6270a007ee04df23afdbdb3fae75ada6d9959f3126716d01825080c63792e5e3 |
Hashes for geodesk-0.0.8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da32fbd57a2a06aa2c1a912c9fe179b54f0ecf8c7edeb7e1699dd33792f5231d |
|
MD5 | e33c61877a7e7f9541d180beeb7ced4a |
|
BLAKE2b-256 | 07797bf40f638b65b90ff0f379725f6d25da254c5a9b9846e34b7e637025fb51 |
Hashes for geodesk-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 743a7347878336efb2e884753c5c9030ae0e87c626a8ece3fd9ae0ef4686f6ab |
|
MD5 | c6ec552be6dbbac29b4c9746cb671ec1 |
|
BLAKE2b-256 | c21d8b9ae8cdaf8d9e5c8c8638c3e98ce9e122896049a14ba5a316015c5acc42 |
Hashes for geodesk-0.0.8-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 199e23eed5d1e0612b29a10b5d28ab7b29efdb98012d62db959a5e38e17bb491 |
|
MD5 | 98f96b493d25053975d6bf253e071082 |
|
BLAKE2b-256 | ed2611bbe7d2b355dc0813e2e163c162c3a5899bbdce7eb5985e8268c4c98b46 |
Hashes for geodesk-0.0.8-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0b39be0e3e574afeaed7a42eedd30a0b7b6b6ea241f0d1e261fd95b30f89d37 |
|
MD5 | 3a9d3e72f83e03ea9b94f8d121daea2f |
|
BLAKE2b-256 | 428cf8890552bfa4b4b9770327aef0d9b13f88aa73a0fa465d1bb81334531648 |
Hashes for geodesk-0.0.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffc489b70975b7f548d9ce7c36b4dca59ca0fa70755b0ff06b7dedb481bcb258 |
|
MD5 | c76d09bad004de817397f4cb88022bb3 |
|
BLAKE2b-256 | 44b0ae5789b646ac8d4254592b283f5eaf1d23b770ebddd58c249422bd8790a8 |
Hashes for geodesk-0.0.8-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25943e96455b664fb215a3aebbd669631725c37fdbee8f8888781feada898f08 |
|
MD5 | 807a7e425c48f30139fe1fca4c3a5755 |
|
BLAKE2b-256 | 2189dfeef00ea24ed0195b8015b9cf47006c8a6afcded46d118695b68a039493 |