Skip to main content

PointInPolygon

Build Status Coverage Status PyPI PyPI - Downloads PyPI - Python Version PyPI - Wheel GitHub contributors GitHub issues GitHub Action GitHub

This package is used to check point inside/outside of polygon/multipolygon. It is supported polygon to array, convert multipolygon dataframe to polygon, find the min and max item in 2D array.

Install

pip install PointInPolygon

or

pip install --upgrade PointInPolygon

Usage

  • Import package
import PointInPolygon as pnp
  • Geometry Polygon to Array (skip steps to simplify the data and reduce the size of array, if it is multipolygon, it needs to convert to polygon first)
pnp.Geo2Array(geo, skip=0)
  • Convert df multipolygon to polygon (the column name should be geometry)
pnp.MultiPolygon2Polygon(df)
  • Check point in polygon (list or 2D tuple)
pnp.PointInPolygon(point, polygon)
  • Get min value from array based on index
pnp.minValue(array, index)
  • Get max value from array based on index
pnp.maxValue(array, index)

Metadata

Release files for PointInPolygon 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PointInPolygon 1.0.2
File Size Uploaded
PointInPolygon-1.0.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PointInPolygon 1.0.2
File Interpreter ABI Platform
PointInPolygon-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / PointInPolygon-1.0.2.tar.gz

Download URL PointInPolygon-1.0.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2ed9d5cb59efe08bfba6f9fb370cd2e33ed92b68c09ee0481a74cb05f2d9c3a4
BLAKE2b-256 checksum
How to use checksums
689b09c6a526c2fcef7181bac1836f87117f10ed78caf11a5444fd86394f2b76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release files / PointInPolygon-1.0.2-py3-none-any.whl

Download URL PointInPolygon-1.0.2-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09a12c67f61c2bb6674695a1bb3f14f8550aed0ad468f88a4db5a8b950d3c8d6
BLAKE2b-256 checksum
How to use checksums
d73e1e5e44c8f053d2bb64695af2835e6489b29bc36ccb9bee25d39cb60a46db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page