Karta是一个开源的Pytho地理空间分析包,可简化处理矢量和栅格数据。
创建矢量地理空间:
poit = Poit((-130.0, 52.0), crs=LoLatWGS84)lie = read_geojso("liedata.jso")polygo = Polygo([(-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)执行简单查询:
poit2 = Poit((-25.0, 48.0), crs=LoLatWGS84)poit.distace(poit2) # Distace i geographical uitslie.itersects(polygo) # True or Falsech = polygo.covex_hull() # Returs a ew polygoch.to_shapefile("poly.shp")加载可操作的格栅数据:
grid = read_gtiff("ladsat_scee.tif") # Leverages GDALgrid.profile(lie) # Collect data alog a liegrid.resample(500.0, 500.0) # Retur a grid resampled at a ew resolutio
评论