微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Karta Python 地理空间分析包

程序名称:Karta

授权协议: MIT

操作系统: 跨平台

开发语言: Python

Karta 介绍

Karta 是一个开源的 Python 地理空间分析包,可简化处理矢量和栅格数据

创建矢量地理空间:

point = Point((-130.0, 52.0), crs=LonLatwgs84)

line = read_geojson("linedata.json")

polygon = polygon([(-515005.78, -1301130.53),
                   (-579174.89, -1282271.94),
                   (-542977.83, -1221147.82),
                   (-437864.05, -1251641.55),
                   (-438160.72, -1252421.48),
                   (-437961.28, -1285314.00)],
                   crs=NSIDCnorth)

执行简单查询

point2 = Point((-25.0, 48.0), crs=LonLatwgs84)
point.distance(point2)          # distance in geographical units

line.intersects(polygon)        # True or False

ch = polygon.convex_hull()      # Returns a new polygon
ch.to_shapefile("poly.shp")

加载可操作的格栅数据:

grid = read_gtiff("landsat_scene.tif")  # Leverages GDAL

grid.profile(line)              # Collect data along a line

grid.resample(500.0, 500.0)     # Return a grid resampled at a new resolution

Karta 官网

http://fortyninemaps.com/karta.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐