Skip to content

CGI-NRM/GPS-convert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GPS convert

This shiny app is used to convert GPS coordinates. Currently the code only supports RT90, SWEREF99TM, WGS84 and UTM32N. It will import a file that holds the gps coordinates (currently supports .xls, .xlsx, .odf, .csv, .txt and .tdf. The last two assumes a tab delimeted file. After specifying the columns with coordinate data and name the app will convert values and generate a simple map showing the coordinates on a map.

If you want to try this code you need to install the following packages.

NB! The conversion is now made with the sf instead of the sp package.

install.packages(c("shiny","DT","tidyverse",
                   "readxl","leaflet", "rgdal","sf", 
		     "xlsx"))

Depending on environment used there are sometimes not possible to install rgdal as above and you need install gdal outside R. On mac os x you can solve the problem by installing gdal via brew.

brew install gdal

On Linux based system one can install gdal via package managers. If using apt-get the following will do

sudo apt-get install libgdal1-dev libproj-dev

and on fedora one can try

sudo dnf install rgdal expat proj

if it fails you will normally get a readable error message from dnf.

The xlsx package is for creating excel files directly from R and need rJava to work. The rJava packages is at times difficult to install as it is dependent on the java version on the computer you are running. In case you can not get it to work, download the code here and just comment out the xlsx package and the only functionality that is lost is the option to download tables as excel files.

After this you can launch the app with

shiny::runGitHub("GPS-Convert", "CGI-NRM")

Note that this procedure requires an active internet connection at launch.

You can also download the app and just open the app.R file in r-studio and just press the “Run app” to start it. If prefer to run it outside r-studio just copy the app.R code and paste it to your r-session to launch the web app.

Packages

No packages published

Languages