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

Uploaded CPython 3.10Windows x86-64

georgio-2022.335.152-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.335.152-cp310-cp310-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl (430.5 kB view details)

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

georgio-2022.335.152-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.335.152-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for georgio-2022.335.152-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 248779dec1e5f976ea2bd26ea7371e990879b46155a19e94bc267c73be21d8fc
MD5 efd58f508149fa12fbd6617037c22ee8
BLAKE2b-256 b1cc0834411491bb34d14e7cbb4769213b46ecc6e26add70393fbd656710ca44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2022.335.152-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d637e42eb56141d342d4398544a1cfcf7b96949dd9fb094209a026606527656f
MD5 147c8d654df34b1ef0d14b701b3383a2
BLAKE2b-256 ff161a0f747baa4e762fee248238c74b8d0947a55aac583bd4c461e1e2a07d93

See more details on using hashes here.

File details

Details for the file georgio-2022.335.152-cp310-cp310-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for georgio-2022.335.152-cp310-cp310-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d0675cc472ebd54e05a802cb7961cf30a5a7e69613c2293545db6d7064d4ae5a
MD5 441693b66a8935cc84908934319b80a7
BLAKE2b-256 086f807aa646bc7870653d72559af27f832deeb9180b95a6b963268a0fc862cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for georgio-2022.335.152-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 727b806b446f5e6f735d2eeb0a08ca05df88da9db209b0c7a125a73f6c0bd82f
MD5 722a92fd0a1cd05cc090ab5ca5127f87
BLAKE2b-256 199675d94e5183314920cb121e7a46ea7acf938c56245e8b97cdad25de713d94

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