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 hashes)
Built Distribution
Close
Hashes for PointInPolygon-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a12c67f61c2bb6674695a1bb3f14f8550aed0ad468f88a4db5a8b950d3c8d6 |
|
MD5 | bfb4187f2b6750e0e71e9dccf86bccdf |
|
BLAKE2b-256 | d73e1e5e44c8f053d2bb64695af2835e6489b29bc36ccb9bee25d39cb60a46db |