Skip to main content

A Python package for geospatial distance calculations and proximity-related functions.

Project description

GeoProximity Package Usage Guide

Introduction

GeoProximity is a Python package designed to facilitate geospatial distance calculations, point projections, and related operations. It includes functions for both Haversine distance (great-circle distance) and Euclidean distance calculations. GeoProximity is suitable for applications that require proximity analysis, spatial operations, and basic geospatial functionality.

Installation

Ensure Python is installed on your system, then install the geoproximity package using pip:

pip install geoproximity

Calculate harversine distance

import geoproximity
geoproximity.haversine_distance(coord1, coord2)

It returns the haversine distance between two points in km.

Find the nearest neighbor from the list of coordinates to the referece point

geoproximity.nearest_neighbor(reference_point, coordinates_list)

It returns a tuple containing the nearest point and distance of the nearest point from the reference point in km.

Example:

reference_point = (37.7749, -122.4194)
other_points = [(34.0522, -118.2437), (40.7128, -74.0060), (41.8781, -87.6298)]

nearest_point, min_distance = geoproximity.nearest_neighbor(reference_point, other_points)

Calculate the area of a polygon

geoproximity.calculate_polygon_area(polygon_geojson)

We need to pass the polygon geojson as a parameter to the calculate_polygon_area function. It returns the area of the polygon in square km.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoproximity-0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

geoproximity-0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file geoproximity-0.1.tar.gz.

File metadata

  • Download URL: geoproximity-0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for geoproximity-0.1.tar.gz
Algorithm Hash digest
SHA256 ccb57663c5ee7243d48f14f836884affcecd27bddaecc4af3854b4a8be4e7f35
MD5 35cb7c8c4932a0249b14715b61090ae9
BLAKE2b-256 688aa5a3f00604135d82dd5a8504eb84abe52649d8776c74b70f317837573ce7

See more details on using hashes here.

File details

Details for the file geoproximity-0.1-py3-none-any.whl.

File metadata

  • Download URL: geoproximity-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for geoproximity-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d31e5793b0f1fa4b23cdc2d82a3739ca9750166a11ee1d4b44090f86e1db513d
MD5 48eef3db3211b0a33219057f62266b93
BLAKE2b-256 55f5ebd70492eb22484b0cc0107645364f29c020f388ef7f2634b87e00e9d403

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page