目地
用Java实现类似QGIS中【按掩膜图层裁剪栅格】的功能。
其实QGIS本身调用的就是gdalwarp.exe。
官方文档:https://gdal.org/programs/gdalwarp.html#gdalwarp
gdalwarp [--help-general] [--formats]
[-s_srs srs_def] [-t_srs srs_def] [-ct string] [-to "NAME=VALUE"]* [-novshiftgrid]
[-order n | -tps | -rpc | -geoloc] [-et err_threshold]
[-refine_gcps tolerance [minimum_gcps]]
[-te xmin ymin xmax ymax] [-te_srs srs_def]
[-tr xres yres] [-tap] [-ts width height]
[-ovr level|AUTO|AUTO-n|NONE] [-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]
[-srcnodata "value [value...]"] [-dstnodata "value [value...]"]
[-srcalpha|-nosrcalpha] [-dstalpha]
[-r resampling_method] [-wm memory_in_mb] [-multi] [-q]
[-cutline datasource] [-cl layer] [-cwhere expression]
[-csql statement] [-cblend dist_in_pixels] [-crop_to_cutline]
[-if format]* [-of format] [-co "NAME=VALUE"]*

本文介绍如何使用Java实现类似QGIS中的按掩膜图层裁剪栅格图的功能。通过调用GDAL库中的gdalwarp方法,并设置相应的参数,可以完成对栅格图像的精确裁剪。
最低0.47元/天 解锁文章
553

被折叠的 条评论
为什么被折叠?



