This python 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.
Project description
PointInPolygon
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PointInPolygon-1.0.2.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file PointInPolygon-1.0.2.tar.gz
.
File metadata
- Download URL: PointInPolygon-1.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ed9d5cb59efe08bfba6f9fb370cd2e33ed92b68c09ee0481a74cb05f2d9c3a4 |
|
MD5 | b5c3a1372cafd65f11d56d5b4d15f4c8 |
|
BLAKE2b-256 | 689b09c6a526c2fcef7181bac1836f87117f10ed78caf11a5444fd86394f2b76 |
File details
Details for the file PointInPolygon-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: PointInPolygon-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a12c67f61c2bb6674695a1bb3f14f8550aed0ad468f88a4db5a8b950d3c8d6 |
|
MD5 | bfb4187f2b6750e0e71e9dccf86bccdf |
|
BLAKE2b-256 | d73e1e5e44c8f053d2bb64695af2835e6489b29bc36ccb9bee25d39cb60a46db |