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 a 64-bit Python, it'll run GeoDesk.
Get Started
Requirements
- Python 3.6 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.7-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8add50526e8950e6d1a98439787a01a0d0e58a05a61050a797c4b7f9633bcc5 |
|
MD5 | 5ffe7a971ed80efc855fa21a38581248 |
|
BLAKE2b-256 | d3fc57ff3a58a6e60392695f40eb886f33ca6272a7e07cf49eeaf6fb681fa833 |
Hashes for geodesk-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7aa753bf0d2fe1db3ecbf7adc88110a5b367d90d613fde3b8404542699eab63 |
|
MD5 | 06fd75468bfd5101456f5640bbbf0e67 |
|
BLAKE2b-256 | f0237c6c23416321623186b8a37e3326f522fb3ac3f913559ad9fcd3ea13cb22 |
Hashes for geodesk-0.0.7-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42dba9b5712edbe602eaae36fbbabe10800509eb0fdd791b1ee6da65ad0b1e4f |
|
MD5 | 522bc636b1e65ba97f8c3e1554ed34c9 |
|
BLAKE2b-256 | 85bc782537c05cafc1f0097ee53abb42609f08ccd0ab1157e0a12c145cf1f1c5 |
Hashes for geodesk-0.0.7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ea60fb217d2e05c07aff00e782daf2ffcca49b6581a94cffe3f9690d0ac772e |
|
MD5 | f6b6fd4aad61976b0220db8c3ccd6dd9 |
|
BLAKE2b-256 | 508ab9ef9f1bccae31b1b3e145bd41ea0650302f4fedf33883a3d22a9733593b |
Hashes for geodesk-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 206381bb43dace8555ea097af2e9691769fdeae8e227c637436053f587c1ca1f |
|
MD5 | c88d478933258e8b7a17b0ade4691ba7 |
|
BLAKE2b-256 | 72e6384e5a77a6fa3c0c96739bcd9c4d7634b60bd7debb308eab41c95b13606b |
Hashes for geodesk-0.0.7-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40057c6fd685aef1e509014a422740a421ecb65320abda56adf3ff3c0417db89 |
|
MD5 | 7f4da3f989b3dd02bad01a0fef0b1ca4 |
|
BLAKE2b-256 | 2c472fcb0adecbfb6b4e1cad8873267c201162395af7837f1ef78ba47b3a7eeb |
Hashes for geodesk-0.0.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58073292e417321febf58ee9240a956ef106ad2012ef520eec7abd56072507a0 |
|
MD5 | 01ee1a67c3d20d3b61a92bafcf6125c5 |
|
BLAKE2b-256 | 75624bca13c212221f40688cb11fc21ac860eab0a0f5272f8a65c89f1446f4ac |
Hashes for geodesk-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e16a9e88027a50e6198307a53d897d1f9a9562eecc2b431b2635264b5ed1847 |
|
MD5 | e4d1cc2cf0a504114977c699e1e952b1 |
|
BLAKE2b-256 | 86dfa46d6414952d1d889223844e665847e822c6c4798427112dc1efabdf8839 |
Hashes for geodesk-0.0.7-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e51f93cd607998af832c1fb003d1db22a6dbe278269caf5d273179eb6d44a75 |
|
MD5 | 935b91e7d59c2db19268ace78e6fead9 |
|
BLAKE2b-256 | 1e14e89b5df21ab723711c823ecc0305dfbe2cbc603230e1ace1311a625028ca |
Hashes for geodesk-0.0.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900ed4202f1a388ad8e3a792afc8881b7591b6774b60927e66afc9ff93dfeb56 |
|
MD5 | 3c4b09560e3caa91cd5da91e0be9ff4d |
|
BLAKE2b-256 | ab12ad264f907883658a968a236560de19fce683a99eb60ac56b16bc9b54022f |
Hashes for geodesk-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b57985ac9a356ec80032783c7ac59a5154c3fdc44742835c569b621cade5060e |
|
MD5 | 920f28a4a453aa6fe6da8701b5ab1592 |
|
BLAKE2b-256 | 84436ee9095aac740b2f55c3d88c5826487afbaeca79ffa480425a60e3dc00f3 |
Hashes for geodesk-0.0.7-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0feccfefef3d90a60776bb477271763f8e0292e5a7b3702d170972f953a1b05a |
|
MD5 | b03a9ef861e47d2698bd5500761fb9cf |
|
BLAKE2b-256 | d2217f8f6e6f59789082a88258fe7b43bc578e039fb327cc28327c260fba916a |
Hashes for geodesk-0.0.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f68263cb232db338a02b6be66317aa9e2d93374e033bee9f1a8f90be9caf7c2 |
|
MD5 | 13ff5ec2c0e05cf930258d29010dea4d |
|
BLAKE2b-256 | 87b1329f516c9a3c6708b870a3728cba1a650fc9bd8500d683067ed3ea8e4702 |
Hashes for geodesk-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1833ba0472a82a87da3948a7e2df83fe5bd8a4be291d1f50fb47df95c4e829a2 |
|
MD5 | 24de04e3877396e5cc01e3c20033c708 |
|
BLAKE2b-256 | 4e8d440f4775433b2e8b039d2dd43395e489f61bce43b55b1173615c1452d378 |
Hashes for geodesk-0.0.7-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0189ef8815a3830823da258538e5d34180fbbad94f8d69887925eaa08f71fe31 |
|
MD5 | 23542432c7f3cbe367333fbc7f8b540f |
|
BLAKE2b-256 | 33abf7f645eae3d77f1f09aad2144930fab31fa99b78479f770fbb5f010f05df |
Hashes for geodesk-0.0.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5856a59a4170755a28709320c4057e49c0c89e6a0a58ea9f56230011229a1ba |
|
MD5 | 5967b85d1cf21daab9ca0a877ecde26b |
|
BLAKE2b-256 | a3fe58cb2fc054bb74dda7a230d393630c56205b96717128b8daa8fd0f233505 |
Hashes for geodesk-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1a9b279db9033bbbc88a0b9b849e79e2e088c3caf5ffd831fe2c78d1349dcdd |
|
MD5 | f0e02b55b2fe470dd900bf95eb7c4cfb |
|
BLAKE2b-256 | 12a1e01d46bd18afa22478169331d8e1f1165d39474e8bd0aee85f30872be82f |
Hashes for geodesk-0.0.7-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17575028ecdd90a1363fdc1208c51047082d5b3fdbd6043b07d2b29db8cbca59 |
|
MD5 | 77df3cc08583af8051a60bbbfe3d3734 |
|
BLAKE2b-256 | ac4816f3cfec77970afe86d5745ca4b96f56babb00ec52f76a6e555bca5a3349 |