How to change the resolution of .tif raster file without losing data

青春壹個敷衍的年華 提交于 2019-12-11 01:26:24

问题


For example, A .tiff file of 400*200 size, I can read it as a 2-D array(400 x 200) in python.

I want to change the tiff size to 200 x 100 or other ratio.

How to realize that in Python or GIS software(QGIS, ArcGIS et.al).

I know the resemble tool in ArcGIS can change the size of raster data. but the length-width ratio is fixed.

Example Diagram:


(source: tietuku.com)


回答1:


With R you can do things like

library(raster)
r <- raster('file.tif')
a <- aggregate(r, c(2,3))


来源:https://stackoverflow.com/questions/33862849/how-to-change-the-resolution-of-tif-raster-file-without-losing-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!