Skip to main content

Fast Geo Rust functions for Python

Project description

georgio

Fast geo Rust helper functions for Python.

Great Circle

To get the great circle distance between two points in meters, this function will use the IUGG mean Earth radius (same as geopy).

distance_in_meters = georgio.great_circle_distance(lon1, lat1, lon2, lat2)

If you want to provide your own radius in meters, you can use this function instead.

distance_in_meters = georgio.great_circle_distance_with_radius(lon1, lat1, lon2, lat2, radius_in_meters)

Bounding Box

This function will return a bounding box that's this specified distance around a particular center point. Note that the bounding box will never extend across the antimeridian (longitude +/-180), below latitude -90, or above latitude 90.

west, south, east, north = georgio.bounding_box_for_point(lon, lat, distance_in_meters)

Web Mercator

To get the longitude/latitude bounds of a Web Mercator tile, use the following function, which will return the values in west, south, east, north order.

west, south, east, north = georgio.wm_bounds(x, y, z)

To get the upper left corner of a tile in longitude, latitude order, use the following function.

longitude, latitude = georgio.wm_upper_left(x, y, z)

To get a bounding box that surrounds a tile at a certain distance, use the following function. This can be useful when searching for centerpoints of objects that might be outside of the tile, where the object might extend into the tile. Note that the bounding box size is calculated in the WGS-84 projection based on the tile's longitude/latitude bounds, since Web Mercator is notoriously bad for calculating sizes/distances. Also note that the bounding box will never extend across the antimeridian (longitude +/-180), below latitude -90, or above latitude 90.

west, south, east, north = georgio.wm_tile_expanded_bbox(x, y, z, search_distance_in_meters)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

georgio-2023.111.1062-cp310-none-win_amd64.whl (113.8 kB view details)

Uploaded CPython 3.10Windows x86-64

georgio-2023.111.1062-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

georgio-2023.111.1062-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (458.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

georgio-2023.111.1062-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file georgio-2023.111.1062-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for georgio-2023.111.1062-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 fe52cb61ecced81fd69787a15fdeaef122d11b8eadeba04759b8c4b64d129732
MD5 61455b9ee6767c10d055410a00e7759f
BLAKE2b-256 ec0e28ff81c23276081b2dea6d4f2934667b83e84003346d1ad791ce7fd97290

See more details on using hashes here.

File details

Details for the file georgio-2023.111.1062-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for georgio-2023.111.1062-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11525311ea8c69c6c76591d48f5e0e61b6dab0abdfe279e9c6dddd3506e65cc9
MD5 fee515a1ca8023727b33ac5876ab13dc
BLAKE2b-256 4c93efe041461c93d21385afe58fadc6be802987ecd0cc58b996f4aab901b989

See more details on using hashes here.

File details

Details for the file georgio-2023.111.1062-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for georgio-2023.111.1062-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0bf3a6bd24aeaa9581681c778c7b2a1fbb69607c9a8a043f644abeb91a40c385
MD5 2115136e4eb878a4997236016ad652ae
BLAKE2b-256 7b2b871e230a1ed0c4d2a64e1faf1c93f9ecf652dec46fbd66eab275fd2bc098

See more details on using hashes here.

File details

Details for the file georgio-2023.111.1062-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for georgio-2023.111.1062-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56533cc57218347ccf6a431ecdfd9069211cff4a1528bcc3f5b09524a4a09f84
MD5 92a294a94881ec4c4db975629fa82f80
BLAKE2b-256 c548dc057368c1fbf05cb603c7dd2abc4f40965cbe00a6cb7fd9891fc28dbf64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page