Difference between revisions of "Opasnet map"

From Testiwiki
Jump to: navigation, search
m
m
Line 33: Line 33:
 
library(RColorBrewer)
 
library(RColorBrewer)
 
library(classInt)
 
library(classInt)
library(OpasnetBaseUtils)
+
library(OpasnetUtils)
 +
library(OpasnetUtilsExt)
  
 
shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','kuopio_house')
 
shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','kuopio_house')
Line 126: Line 127:
 
<rcode name='gmapspsqltest3'>
 
<rcode name='gmapspsqltest3'>
  
library(OpasnetBaseUtils)
+
library(OpasnetUtils)
 +
library(OpasnetUtilsExt)
 
library(sorvi)
 
library(sorvi)
 
library(rgdal)
 
library(rgdal)
Line 161: Line 163:
 
library(RColorBrewer)
 
library(RColorBrewer)
 
library(classInt)
 
library(classInt)
library(OpasnetBaseUtils)
+
library(OpasnetUtils)
 +
library(OpasnetUtilsExt)
  
 
shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','watson_wkt')
 
shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','watson_wkt')
Line 191: Line 194:
  
 
<rcode name='gmapspsqltest'>
 
<rcode name='gmapspsqltest'>
library('OpasnetBaseUtils')
+
library(OpasnetUtils)
 +
library(OpasnetUtilsExt)
 
cat("<span style='font-size: 1.2em;font-weight:bold;'>PostgreSQL Test</span>\n")
 
cat("<span style='font-size: 1.2em;font-weight:bold;'>PostgreSQL Test</span>\n")
 
google.show_data_on_maps()
 
google.show_data_on_maps()

Revision as of 13:29, 20 December 2013



Question

How should GIS data be handled and visualised in Opasnet?

Answer

  • Original GIS data is stored in a PostgreSQL database.
  • Data is accessed by R using the RGDAL package and ?? connection.
  • Data in manipulated in R.
  • Data is displayed by producing a KML file with ?? package.
    • The KML file is saved at the R-tools server.
    • Google Maps is used to show the KML file on a web page.

Rationale

All pieces of the puzzle exist already.


Dependencies

Formula

Kuopio buildings on Google maps test

+ Show code


GoogleMaps Sorvi MML TEST

+ Show code

GoogleMaps PostgreSQL test 2

+ Show code

GoogleMaps PostgreSQL test

+ Show code

See also

Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>