aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2022-11-04 11:57:44 +0000
committerThierry Thomas <thierry@FreeBSD.org>2022-11-04 11:59:05 +0000
commit8a197acffc5e76733ef386a7af18c08e3c98436f (patch)
treeea7372acaf0855ac6b69bbc01a71c01474f107b5
parentc86a2b506c8f20441524f1dfe2dd011c31701798 (diff)
downloadports-8a197acffc5e76733ef386a7af18c08e3c98436f.tar.gz
ports-8a197acffc5e76733ef386a7af18c08e3c98436f.zip
science/py-earthpy: adding a tool to plot and manipulate spatial data in Python
-rw-r--r--science/Makefile1
-rw-r--r--science/py-earthpy/Makefile30
-rw-r--r--science/py-earthpy/distinfo3
-rw-r--r--science/py-earthpy/pkg-descr24
-rw-r--r--science/py-earthpy/pkg-plist31
5 files changed, 89 insertions, 0 deletions
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