Difference between revisions of "OpasnetUtils/GIS"

From Testiwiki
Jump to: navigation, search
(Created page with "{{method|moderator=|stub="yes"}} Category:OpasnetUtils ==Description== This section contains a couple of general GIS related functions ==Code== https://www.opasnet.org...")
 
(rcode created but does not work)
Line 1: Line 1:
 
{{method|moderator=|stub="yes"}}
 
{{method|moderator=|stub="yes"}}
 
[[Category:OpasnetUtils]]
 
[[Category:OpasnetUtils]]
 +
 +
<rcode graphics="1" variables="
 +
name:LA|description:Latitude of the emission site|default:61.131634|
 +
name:LO|description:Longitude of the emission site|default:21.491318|
 +
name:emissions|description:Emission (Mg/a or tons per year)|default:1
 +
">
 +
library(OpasnetUtils)
 +
 +
cat("Calculating...\n")
 +
 +
concentration <- GIS.Concentration.matrix(Emission = emissions, LA = LA, LO = LO)
 +
 +
print(xtable(head(concentration@output)), type = 'html')
 +
 +
exposure <- GIS.Exposure(concentration, LA = LA, LO = LO)
 +
 +
print(xtable(head(exposure)), type = 'html')
 +
 +
</rcode>
  
 
==Description==
 
==Description==

Revision as of 15:43, 28 February 2013

Latitude of the emission site:

Longitude of the emission site:

Emission (Mg/a or tons per year):

+ Show code

Description

This section contains a couple of general GIS related functions

Code

https://www.opasnet.org/svn/opasnet_utils/trunk/R/GIS%20methods.r

Functions

GIS.Exposure

Exposure computes exposure using a given concentration matrix and protected population data from Heande.

Inputs:

  • Concentration.matrix - A matrix containing spatially dependent concentratio data;
  • LO & LA - coordinates of the center of the concentration matrix;
  • distx & disty - maximum displacement from center of concentration matrix, assumed symmetrical, defaults to 10.5 km (PLTTI matrix);
  • resolution - resolution of concentration matrix, length of side of grid element which are assumed squares, defaults to 1 km (PILTTI matrix)

Output:

  • An ovariable containing result of Population * Concentration. Output and marginal slots are defined. Spatial information lost in summation (though there is an easy way around it).

GIS.Concentration.matrix

Computes a concentration matrix from given emission and coordinates, based on random sampling PILTTI source-receptor-matrices.

Inputs:

  • Emission - emission of substance in Mga^-1;
  • LO & LA - coordinates where emission occurs;
  • distx & disty - maximum displacement in kilometers from center of desired matrix, assumed symmetrical, defaults to 10.5 km (PLTTI matrix);
  • resolution - resolution of desired matrix (length in kilometers of side of grid element which are assumed squares), defaults to 1 km (PILTTI matrix);
  • N - number of iterations to be run

Output:

  • An ovariable containing spatially dependent concentration data. Output and marginal slots are defined.

See also