- 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)))
推薦閱讀
- 傳感器技術(shù)實(shí)驗(yàn)教程
- 輕松學(xué)PHP
- 自動(dòng)控制原理
- Learning Social Media Analytics with R
- 統(tǒng)計(jì)策略搜索強(qiáng)化學(xué)習(xí)方法及應(yīng)用
- Excel 2007技巧大全
- 統(tǒng)計(jì)挖掘與機(jī)器學(xué)習(xí):大數(shù)據(jù)預(yù)測(cè)建模和分析技術(shù)(原書第3版)
- 電腦上網(wǎng)入門
- Linux Shell Scripting Cookbook(Third Edition)
- 教育創(chuàng)新與創(chuàng)新人才:信息技術(shù)人才培養(yǎng)改革之路(四)
- Getting Started with Tableau 2019.2
- 工廠電氣控制設(shè)備
- 這樣用Word!
- 商務(wù)智能
- Building Smart Drones with ESP8266 and Arduino