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-2022.357.944-cp310-none-win_amd64.whl (113.7 kB view details)

Uploaded CPython 3.10Windows x86-64

georgio-2022.357.944-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

georgio-2022.357.944-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (446.7 kB view details)

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

georgio-2022.357.944-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for georgio-2022.357.944-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 38dbc30cb98a027dcabc8cbe1a5ed3e1ef3c351df9e8ef65eba7b03818174d6a
MD5 8f4ee87721fd11dea75efdb1e87d2a1c
BLAKE2b-256 510a2915bdcaa8a38f72b4ad9e44a498c2d2dec2dd7111f07d5106f982f3b2d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2022.357.944-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9de493ee2ed17da119e8bd61073119566ca3f0aa56b5e5834937f5adae1b780e
MD5 e0263a19e6d4793b1be6b96f533cdee7
BLAKE2b-256 9f0b4b365e3dbc1ffee42176f0134884f57be7ccd3cd2017d24441f07ec3a922

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2022.357.944-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 10f16cb0787dd6fef89234e024b059193cbf92f8d0573b34f5d8949f19521388
MD5 d79194ef5d189f689e495d6699c5a43c
BLAKE2b-256 ea02bada61e79997f3110c33e7c6539a5ca40397dc453cb7d6cbc655ced63eaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2022.357.944-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0fa900c672f1296c66d884940ac70c3aa8e7e7340cfe5b646efac01d9cc85a95
MD5 967e740424a9014ab2545047a64bc39c
BLAKE2b-256 4c2d20c384a8821bdd06f5329faf55ff217d1bafbb3f8dfe40e3b45a64a58f30

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