git: 8a197acffc5e - main - science/py-earthpy: adding a tool to plot and manipulate spatial data in Python

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Fri, 04 Nov 2022 11:59:09 UTC
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a197acffc5e76733ef386a7af18c08e3c98436f

commit 8a197acffc5e76733ef386a7af18c08e3c98436f
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-11-04 11:57:44 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-11-04 11:59:05 +0000

    science/py-earthpy: adding a tool to plot and manipulate spatial data in Python
---
 science/Makefile             |  1 +
 science/py-earthpy/Makefile  | 30 ++++++++++++++++++++++++++++++
 science/py-earthpy/distinfo  |  3 +++
 science/py-earthpy/pkg-descr | 24 ++++++++++++++++++++++++
 science/py-earthpy/pkg-plist | 31 +++++++++++++++++++++++++++++++
 5 files changed, 89 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index a899e6c2ae0d..14cad8237789 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -308,6 +308,7 @@
     SUBDIR += py-dwave-system
     SUBDIR += py-dwave-tabu
     SUBDIR += py-dwavebinarycsp
+    SUBDIR += py-earthpy
     SUBDIR += py-eccodes
     SUBDIR += py-esda
     SUBDIR += py-fresnel
diff --git a/science/py-earthpy/Makefile b/science/py-earthpy/Makefile
new file mode 100644
index 000000000000..bff973fc68bd
--- /dev/null
+++ b/science/py-earthpy/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	earthpy
+PORTVERSION=	0.9.4
+CATEGORIES=	science geography python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	thierry@FreeBSD.org
+COMMENT=	Plot and manipulate spatial data in Python
+WWW=		https://github.com/earthlab/earthpy
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYNUMPY}	\
+		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}rasterio>=0:graphics/py-rasterio@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}matplotlib>=0:math/py-matplotlib@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}geopandas>=0:graphics/py-geopandas@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}scikit-image>=0:graphics/py-scikit-image@${PY_FLAVOR}
+RUN_DEPENDS=	${PYNUMPY}	\
+		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}rasterio>=0:graphics/py-rasterio@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}matplotlib>=0:math/py-matplotlib@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}geopandas>=0:graphics/py-geopandas@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}scikit-image>=0:graphics/py-scikit-image@${PY_FLAVOR}
+
+USES=		python:3.7+
+USE_PYTHON=	distutils
+
+.include <bsd.port.mk>
diff --git a/science/py-earthpy/distinfo b/science/py-earthpy/distinfo
new file mode 100644
index 000000000000..c43a6ab9206a
--- /dev/null
+++ b/science/py-earthpy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1667554646
+SHA256 (earthpy-0.9.4.tar.gz) = 16ec2831ec87ace9d70473ef23840b6bf3cd239e178b9ddb5767da86e5a34c1b
+SIZE (earthpy-0.9.4.tar.gz) = 1366501
diff --git a/science/py-earthpy/pkg-descr b/science/py-earthpy/pkg-descr
new file mode 100644
index 000000000000..97d162ec1911
--- /dev/null
+++ b/science/py-earthpy/pkg-descr
@@ -0,0 +1,24 @@
+Python is a generic programming language designed to support many different
+applications. Because of this, many commonly performed spatial tasks for science
+including plotting and working with spatial data take many steps of code.
+EarthPy builds upon the functionality developed for raster data (rasterio) and
+vector data (geopandas) in Python and simplifies the code needed to:
+
+- Stack and crop raster bands from data such as Landsat into an easy to use
+  numpy array;
+- Work with masks to set bad pixels such a those covered by clouds and
+  cloud-shadows to NA (mask_pixels());
+- Plot rgb (color), color infrared and other 3 band combination images
+  (plot_rgb());
+- Plot bands of a raster quickly using plot_bands();
+- Plot histograms for a set of raster files;
+- Create discrete (categorical) legends;
+- Calculate vegetation indices such as Normalized Difference Vegetation Index
+  (normalized_diff());
+- Create hillshade from a DEM.
+
+EarthPy also has an io module that allows users to
+
+- Quickly access pre-created data subsets used in the earth-analytics courses
+  hosted on www.earthdatascience.org;
+- Download other datasets that they may want to use in their workflows.
diff --git a/science/py-earthpy/pkg-plist b/science/py-earthpy/pkg-plist
new file mode 100644
index 000000000000..34b791425c3e
--- /dev/null
+++ b/science/py-earthpy/pkg-plist
@@ -0,0 +1,31 @@
+%%PYTHON_SITELIBDIR%%/earthpy/__init__.py
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/clip.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/clip.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/io.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/io.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/mask.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/mask.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/plot.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/plot.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/spatial.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/__pycache__/spatial.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/earthpy/clip.py
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/blue.tif
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/colorado-counties.geojson
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/colorado-glaciers.geojson
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/continental-div-trail.geojson
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/epsg.json
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/green.tif
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/red.tif
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/rmnp-dem.tif
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/rmnp-rgb.tif
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/rmnp.dbf
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/rmnp.prj
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/rmnp.shp
+%%PYTHON_SITELIBDIR%%/earthpy/example-data/rmnp.shx
+%%PYTHON_SITELIBDIR%%/earthpy/io.py
+%%PYTHON_SITELIBDIR%%/earthpy/mask.py
+%%PYTHON_SITELIBDIR%%/earthpy/plot.py
+%%PYTHON_SITELIBDIR%%/earthpy/spatial.py