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.354.1008-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

georgio-2023.354.1008-cp311-none-win_amd64.whl (114.4 kB view details)

Uploaded CPython 3.11Windows x86-64

georgio-2023.354.1008-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

georgio-2023.354.1008-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (476.4 kB view details)

Uploaded CPython 3.11macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

georgio-2023.354.1008-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

File details

Details for the file georgio-2023.354.1008-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for georgio-2023.354.1008-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2634b7c4c8421a4fc2ee43c09c229d76dfb1ccc9965e99d3550bbf1e8ae75f8b
MD5 ac8e81aab72a55afba266d4d218fb81d
BLAKE2b-256 5365f3575a8f0be9447640ec73cceab546df4eac5bacb3b18d899e1c24ce949b

See more details on using hashes here.

File details

Details for the file georgio-2023.354.1008-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for georgio-2023.354.1008-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 a1ae2a024dcadef8a88b1ab3dec74b13ab43ef590117d3edeecba6e275c058eb
MD5 a28d5f7145ed318a95923ea418304d5d
BLAKE2b-256 ec3aa6961166a41fd803ab2cbb15da926b22548539fb219d66a261a310fc6291

See more details on using hashes here.

File details

Details for the file georgio-2023.354.1008-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for georgio-2023.354.1008-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 543f2e70dd42aa4b75e6a01f95034fa622fdb59f4db9912658efde1aa6d0f03c
MD5 b2087dac12d1ed890876ddc1fba395da
BLAKE2b-256 9c2d971a4948c5cc6c00c6acdb5732d36b427498c8f6f435b4ef10e026427f21

See more details on using hashes here.

File details

Details for the file georgio-2023.354.1008-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for georgio-2023.354.1008-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 23f3f14f5ac52b24ce86098ec6d817bf35d68778f82b6f2913bdf3d48bb793a8
MD5 93316240e32b38fc48057a73377ed993
BLAKE2b-256 28a73491422226c91abbd48134f0556c1b8da283b175c94c9f60e712d71d582e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2023.354.1008-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47c2ae263829700aea3df3e13f0486db742ed88169559a0d4e98ca0baafa82e8
MD5 82a1ac67e5c5f15ef1afffe76ccf5080
BLAKE2b-256 07fac6be6cbb2fcfa52288a52cc1eb7e478ccba9761f8163b04342a392fb018f

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