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.8-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 867ae05370cc3fc20eba2d9a4a7408a090b353e3b0d2fe9e97fd85dd90d0298d |
|
MD5 | 09ca19d712eb375f24c0534b63d6628d |
|
BLAKE2b-256 | 2bb22b3d3ab6c4a6ec6336c732165bffe2af6dafc4d50807c64bb27cbe0bd530 |
Hashes for geodesk-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e713bc6a7f449587e72d4359f1b986fa770a77141cec8e5a3b3fb1f49b694f1 |
|
MD5 | a6991399d7c375db9c3a276e3f3b64c5 |
|
BLAKE2b-256 | dd5985a31b21ebe5e33a01b9a2197642e99b1ec96a35c94ee63cdb0977c9715c |
Hashes for geodesk-0.1.8-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f88d06e5a096d59ed07e0f74b7022ead8c081606d4f59a0d3bc1acb565788fa |
|
MD5 | 2fb708aa9e150b8a0b6bb2246519efd4 |
|
BLAKE2b-256 | bdc8b7e24fb2351e78dea21c33b351045731b7728641bd0443bd6d37d11ce21a |
Hashes for geodesk-0.1.8-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f6e9a56a3c532220b68402ea18fa31a2022bf58f42d5c0a02beb58e96a1cc02 |
|
MD5 | 1affd768d3015565f124ebe635328849 |
|
BLAKE2b-256 | 932c7350507a0957e0a8bb64044dc9cf906fde8febff391cc3b67eb51361351d |
Hashes for geodesk-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e63813c1ab7f5567f8e56b7f9f3108e306a277bdb5607ec9b0a101328602f36 |
|
MD5 | fb8d66b581177582c14d84a7ce87ff04 |
|
BLAKE2b-256 | 860c9913425075952e78b06911996dba9e260e43a63406b17f2c4d1337a88e81 |
Hashes for geodesk-0.1.8-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a56724c777b8c3abcac343851de20bcb45cb8c9c9b8d911e9c3735df4a55761 |
|
MD5 | 5f82be4fea3eb4beeb76d3c676095f70 |
|
BLAKE2b-256 | c3c429fc75bb717386508d6e67b451fcd8690fbc4dcdedabbb37ac6b1cf2972f |
Hashes for geodesk-0.1.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ce098ffbafc991b1ecb8af917ffa2deb7b59cf233454630a427b6200223624d |
|
MD5 | 73c27a971ad2603824f4238741263957 |
|
BLAKE2b-256 | 5bae02228dd27efac9a78168fed619f3a68f0ac9490cf66895519c96b7490a3b |
Hashes for geodesk-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f8347e7b4a037da60c9fe0a6ee54936245125465c03f809fbb8f1313bda1fda |
|
MD5 | 04cf8d6344b86666212011a259763c80 |
|
BLAKE2b-256 | 97a5638c12b505ae38046dc9c101739d9ec688f7aa6f8380d4a0f75dc6ce71ba |
Hashes for geodesk-0.1.8-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c742643773147ade43f81cd7eb597c7798d53df904ebca31e775a628c0d4a04 |
|
MD5 | dd067f599c1a48257f5776defaca01e0 |
|
BLAKE2b-256 | cd5c0f9fe098e5debcb80e7f532163930a567d102e098ee08c8c59a31f2d7098 |
Hashes for geodesk-0.1.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39427abe676e9d8548aabb6bac66cff7b3c9543e73bb4ea3eaa38f6d8c874ace |
|
MD5 | 60a8d459f10339343e1ecece25f80b32 |
|
BLAKE2b-256 | b5cadc9173da79ecdc0c7cae574bdba6a88f69bac3966609721e77e13c823da5 |
Hashes for geodesk-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e6d41793ae40d87b046f537615e36bd43d0649680da7ac314921f6890be4792 |
|
MD5 | 8cb1a0b48dcc9bb106f0cd063f5a8b78 |
|
BLAKE2b-256 | 60eee41b6faea5eaee98de4dd92bff2143752efaa377f1b5c3ada75af5c8d527 |
Hashes for geodesk-0.1.8-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 394f78eeb155b97fdd3415bb7545dd90432592cc78dc8a4153cc555ad7575648 |
|
MD5 | a3c3e870e10ed368e1f5ff83815bbc00 |
|
BLAKE2b-256 | 9eaa4baf66ca118b691e1b421d225c5ab39c71b95e12e440ec5c829e249daa7c |
Hashes for geodesk-0.1.8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83520f732dae84eebd7920f00e9151092ea3a30a6d1076c6ab0017661c58813a |
|
MD5 | d2046fff8f47b45ca2103d116fac8026 |
|
BLAKE2b-256 | b3ee9918a8971f781b380a825628ad3ab804af48861fa09265e59744ef1f7131 |
Hashes for geodesk-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb9a316485b4eca03522af2af6cff29d259265b6fc91a7ccd282b770d1fa9eb0 |
|
MD5 | f7a6d95ac638807b328b7974532e0ed4 |
|
BLAKE2b-256 | eeb9f4a17a8dfe444cd12277e6e29d8176b1f90269350f5eed528451733e727f |
Hashes for geodesk-0.1.8-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c0bf303781431e2c1867a5bcc48cc69af82d7fa3e3dcf5c62612561fc66942 |
|
MD5 | de4d88069be9248f18994c9b2042e4a1 |
|
BLAKE2b-256 | 6d77efd3287ee4342ef413f79bf6f1ba45a7ce2aaf5daa06b1b021f30c7a0508 |
Hashes for geodesk-0.1.8-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2cfaee107a5146824eb8050656993fa83356e60b8d9c97d37c87720daf52a30 |
|
MD5 | 96ea481ef002d9a1bef53e9d27a5fde1 |
|
BLAKE2b-256 | 4f2b183db386b24f3901b114f56db7412f1652ce344dd5a7c79c41b6a7e341c5 |
Hashes for geodesk-0.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83d934c6bb0686253508bed97684e0c1cbfcf06dd0a81b548a5bb949ed8e9d1e |
|
MD5 | ffbea59b3264ee97300c33d520b79070 |
|
BLAKE2b-256 | 24f42ac2eabb8a2056d25d6c501e9f342c63ae8d367a3071176f7684921b7b5c |
Hashes for geodesk-0.1.8-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b7840633c1e720ba9ae534165a8dd358718c8de6a501ffe8ba9d35b0ab93895 |
|
MD5 | ddc238d082964b5133c8f3e519049c3d |
|
BLAKE2b-256 | 181c0c6b82af8e3f16e84819f6506f0a9c15679b1f1f8125ed7dde7afb339af4 |