sample.py 文件源码

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

项目:groundfailure 作者: usgs 项目源码 文件源码
def projectBack(points, proj):
    """
    Project a 2D array of XY points from orthographic projection to decimal
    degrees.

    Args:
        points: 2D numpy array of XY points in orthographic projection.
        proj: PyProj object defining projection.

    Returns:
        2D numpy array of Lon/Lat coordinates.

    """

    mpoints = MultiPoint(points)
    project = partial(
        pyproj.transform,
        proj,
        pyproj.Proj(proj='latlong', datum='WGS84'))
    gmpoints = transform(project, mpoints)
    coords = []
    for point in gmpoints.geoms:
        x, y = point.coords[0]
        coords.append((x, y))
    coords = np.array(coords)
    return coords
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号