layer.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:geopyspark 作者: locationtech-labs 项目源码 文件源码
def polygonal_min(self, geometry, data_type):
        """Finds the min value for each band that is contained within the given geometry.

        Args:
            geometry (shapely.geometry.Polygon or shapely.geometry.MultiPolygon or bytes): A
                Shapely ``Polygon`` or ``MultiPolygon`` that represents the area where the summary
                should be computed; or a WKB representation of the geometry.
            data_type (type): The type of the values within the rasters. Can either be int or
                float.

        Returns:
            [int] or [float] depending on ``data_type``.

        Raises:
            TypeError: If ``data_type`` is not an int or float.
        """

        if data_type is int:
            return self._process_polygonal_summary(geometry, self.srdd.polygonalMin)
        elif data_type is float:
            return self._process_polygonal_summary(geometry, self.srdd.polygonalMinDouble)
        else:
            raise TypeError("data_type must be either int or float.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号