![]() ![]() The alternative is to create your own manual formula to do the calculation and perform it on the coordinate attributes (which, btw, aren't actually tied to the geometry - changing those values would not affect the point locations or their projection in any way). This method would be easiest because it's all set up in the software already (and is essentially the proper way to do the conversion you're talking about). So if your points are in UTM, and you reproject them to WGS84, and then field calculate the x and y coordinates, you will get the decimal lat/long coordinates you seek. The suggestions to reproject the data are because (at least in ArcGIS, probably in QGIS as well) if you field calculate an x or y coordinate it does so based on the current projection. This makes things a bit easier to convert coordinates between, as since they're on the same datum no transformation is required. It just so happens that the UTM projection system also uses WGS84 as the datum. In this video I have shown how to convert UTM coordinate to latitude longitude (Decimal degree).Convert UTM Coordinates to Decimal degree.More details how to. Projected is flat, geographic is 'round'. ![]() WGS84 is properly a datum, but also refers to a geographic coordinate system whose units are degrees. UTM is a projected coordinate system (aka CRS, what I think you mean in your comment) whose units are meters. Plot(cord.UTM, axes = TRUE, main = "UTM Coordinates", col = "red", cex.axis = 0.Old question, but if you haven't figured it out by now UTM is not a coordinate unit. Plot(c, axes = TRUE, main = "Lat-Long Coordinates", cex.axis = 0.95) # +proj=utm +zone=48 +south +datum=WGS84 +units=m +no_defs # Coordinate Reference System (CRS) arguments: +init=epsg:32748 ![]() # Transforming coordinate to UTM using EPSG=32748 for WGS=84, UTM Zone=48M,Ĭord.UTM <- spTransform(c, CRS("+init=epsg:32748")) # Setting existing coordinate as lat-long system # Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgdal/projĬord.dec = SpatialPoints(cbind(data$long, -data$lat), proj4string = CRS("+proj=longlat")) # Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgdal/gdal # Loaded GDAL runtime: GDAL 1.9.2, released 8 # Geospatial Data Abstraction Library extensions to R successfully loaded The complete R codes.ĭo not expect fancy code with me (LOL). (d) reproj data from the first mapset to the second (r.proj and v.proj commands). ![]() Then you can create new GRASS mapset using your reprojected data. Converting coordinatesĭata Save As… (select new proection in the dialog). Sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstableĪnother way suggested by Robin Lovelace was working on Ubuntu 13.04. According to the same link above, this command was re-ran after switching off the related update site in the Ubuntu's update manager database: Sudo add-apt-repository ppa:marutter/c2d4uĪnother way (that did not work for me, but it might work on you). I googled it and this terminal command did work on my machine running Ubuntu 13.10. It has something to do with libgdal1-dev and libproj-dev files and their version which is corresponding to the Linux kernel version. Installing rgdal on UbuntuĪs I have said, installing rgdal on Linux was not as smooth as installing the other spatial packages, say maptools, geoR, or sp. After installation, call the package using In my case, the installation went well in Mac (running Snow Leopard) and also Windows 7, but it needed a workaround to install it on my Linux machine (Ubuntu 13.10). This is the basic R package that deals with spatial analysis. Now, to do a coordinate conversion, you would need rgdal package. I'll talk about this later, since I'm still figuring out how to use it to make variograms and trend maps. Many R packages in spatial section only read this projection system (correct me if I'm wrong). So If you do spatial analysis using R, you would need to set your coordinate into easting and northing system. Follows the UTM coordinates and divides the world into 6-degree longitude and 20 latitude bands, but MGRS then further. But after several trial and errors, it's really not that hard. I am kind of (forced) to do the spatial analysis in R :-). This bit is part of my work in modeling the hydrology of Cikapundung Catchment. How to convert lat-long coordinates to UTM (easting-northing) How to convert lat-long coordinates to UTM (easting-northing) 1. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |