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-2024.246.1123-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (237.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

georgio-2024.246.1123-cp311-none-win_amd64.whl (112.2 kB view details)

Uploaded CPython 3.11Windows x86-64

georgio-2024.246.1123-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (237.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

georgio-2024.246.1123-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (415.5 kB view details)

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

georgio-2024.246.1123-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (237.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for georgio-2024.246.1123-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 57406782d527886876e75a3a1e4fe930c7cecdbfee35eecd9d647f80516cf1bd
MD5 c7727dd934fe23e98292b1c8e085ac59
BLAKE2b-256 1d059b729247c4542448324325b30e95538f9e11ed32789b016147cfd6ee671a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2024.246.1123-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 ea00a8178a7156bdc76536cbf6ca794ecf8e869643ecc389bd22c5991c6554cb
MD5 c4dc849b211fd1196cb1af45735ee08e
BLAKE2b-256 58a36611c8bb6c7c6b4fb862b0a20b3d0e95c8b74aac33cc62cafc5ed226f5cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2024.246.1123-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55400945795a2cbea0d269cff78e9c6e1c48324271fc3ddda4366d7c4ab17afe
MD5 38c16775eb97cddd1ee2bdd71c808ebe
BLAKE2b-256 e9f3fc581d98dfc6fc7d9c502dfc9345817e03fcae9632a7ebe5a6442a4d1692

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2024.246.1123-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 f8ac55af180d5bf32bf653699c01f47f2afabd6dde063d7c8cdab2269cff0b0d
MD5 5445e6ba7cc713597757199b87358c37
BLAKE2b-256 324046d0f9733f1243f1ff2bb4212be8b404042aedf8218216c2ec04c64878de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2024.246.1123-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6aa029ba7caef36284f593cee6f2026ac581f2e54835a5fec804c7de57a6265d
MD5 79bbd9096af90fd48f78c6ba86e6712f
BLAKE2b-256 58195aa98c4d3a4fa076b8ecd0fdcd3bb837800cbce12adc0602f8995286f468

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