2020
09-24
09-24
在Python中用GDAL实现矢量对栅格的切割实例
概述:本文讲述如何在Python中用GDAL实现根据输入矢量边界对栅格数据的裁剪。效果:裁剪前矢量边界裁剪后实现代码:#-*-coding:utf-8-*-"""@authorlzugis@date2017-06-02@brief利用shp裁剪影像"""fromosgeoimportgdal,gdalnumeric,ogrfromPILimportImage,ImageDrawimportosimportoperatorgdal.UseExceptions()#Thisfunctionwillconverttherasterizedclippershapefile#toamaskforusewithinGDAL...
继续阅读 >