- 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)))
推薦閱讀
- 高性能混合信號ARM:ADuC7xxx原理與應用開發
- Natural Language Processing Fundamentals
- 并行數據挖掘及性能優化:關聯規則與數據相關性分析
- 教父母學會上網
- 數控銑削(加工中心)編程與加工
- Python Data Science Essentials
- 大型數據庫管理系統技術、應用與實例分析:SQL Server 2005
- Arduino &樂高創意機器人制作教程
- Visual C++編程全能詞典
- 單片機技術項目化原理與實訓
- 21天學通Linux嵌入式開發
- 未來學徒:讀懂人工智能飛馳時代
- AVR單片機工程師是怎樣煉成的
- 空間機器人智能感知技術
- Hands-On Deep Learning with Go