- Hands-On Geospatial Analysis with R and QGIS
- Shammunul Islam
- 128字
- 2021-06-10 18:44:28
Changing projection system
To change projection, we can use spTransform() from the rgdal package. We can do so using a CRS() argument inside spTransform():
map_bd = spTransform(map_bd, CRS("+proj=longlat +datum=WGS84"))
The preceding code sets the projection system to the longitude and latitude and the GCS to WGS84. If we want to change the projection to any other layer's (shapefile's) projection inside CRS(), we can write proj4string() to get the CRS of a new layer and then set it to that. For example, if we want to set the projection system of a layer a to the projection system of layer b, we can do so simply by writing the following:
a = spTransform(a, CRS(proj4string(b)))
推薦閱讀
- 中文版Photoshop CS5數(shù)碼照片處理完全自學(xué)一本通
- Mastering VMware vSphere 6.5
- 一本書玩轉(zhuǎn)數(shù)據(jù)分析(雙色圖解版)
- 模型制作
- Mastering Machine Learning Algorithms
- Nginx高性能Web服務(wù)器詳解
- 基于單片機的嵌入式工程開發(fā)詳解
- Linux服務(wù)與安全管理
- Salesforce for Beginners
- 人工智能技術(shù)入門
- 工業(yè)機器人實操進階手冊
- Python文本分析
- Flash CS3動畫制作
- Office 2007典型應(yīng)用四合一
- 嵌入式系統(tǒng)開發(fā)