李旭分享 http://blog.sciencenet.cn/u/lixujeremy 代码与散打爱好者!

博文

Python+GDAL:Reprojection

已有 5369 次阅读 2014-10-16 14:44 |个人分类:Python|系统分类:科研笔记| Reprojection

问题:已知一个影像,将另一影像按已知影像进行重投影?

方法:Python+GDAL

练习数据包括两张GEOTIFF文件,STANDARD.tif是已知影像,空间参考信息(Spatial Reference):PROJCS["WGS 84 / UTM zone 50N",GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32650"]]tested.tif是另一影像,转换前的空间参考信息:GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]

reprojected.tif是转换结果,空间参考信息:PROJCS["WGS 84 /UTM zone 50N",GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32650"]]

tested.tifreprojected.tif前后转换对比,如图 1

1

附上练习数据和代码(Practice.rar)。




https://blog.sciencenet.cn/blog-1148346-836184.html

上一篇:Python+GDAL:文件格式的转换
下一篇:ENVI+IDL:Resampling
收藏 IP: 59.64.60.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (2 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-23 11:34

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部