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.

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)

Line Of Bearing (LOB)

Returns the destination coordinates based on a starting position, bearing, and distance in meters. Bearing is in degrees, clockwise from north. It uses the IUGG mean Earth radius.

dest_lon, dest_lat = georgio.line_of_bearing(start_lon, start_lat, bearing_in_degrees, distance_in_meters)

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

dest_lon, dest_lat = georgio.line_of_bearing_with_radius(start_lon, start_lat, bearing_in_degrees, distance_in_meters, radius_in_meters)

Bounding Box

This function will return a bounding box that encompasses the specified distance around a 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.118.1193-cp310-none-win_amd64.whl (113.9 kB view details)

Uploaded CPython 3.10Windows x86-64

georgio-2023.118.1193-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.118.1193-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (458.9 kB view details)

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

georgio-2023.118.1193-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.118.1193-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for georgio-2023.118.1193-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 9dd1f5f6f3d5c9a044aa7bdc476875ae3ea66d686ce837f07493405520b80e35
MD5 34db528133f8d76e3a3199427d4f377d
BLAKE2b-256 f33962d7f301934bb07a7b88571e9c8e6ea6bca1bbb510f9816b651a414b4b5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2023.118.1193-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 311e9dc270db824fdc5d7d283d1f5b4595d177c2b1c382afe6785600e2653205
MD5 8d4ee5b0643be0013037dda47f922532
BLAKE2b-256 cf8f2e46d95b6f89a6136da609d6566458f6079639791c93e59f41752e318f06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2023.118.1193-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 89b5086a2b72677c2e3bcaa6d7e3aff1a6ca0b41452358e93a9743c9f8942db2
MD5 a8f309195aa852b371d93ba2714ed44b
BLAKE2b-256 ec8ecbef45dc163f323d8a14c794bd299e9511086cfaec18be8dab14d861c261

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2023.118.1193-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 220653d82bd410c1e91e41a41fa1c74e5ed85310cc210533646a867d4d5c9ccb
MD5 cda3c186ee242fc3fdcdc8774a8dfdab
BLAKE2b-256 592b3c35985a25cb0a6322738d87809153dad3214459c2fab45dbd0e991359bd

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