Difference between revisions of "OpasnetUtils/GIS"

From Testiwiki
Jump to: navigation, search
m
m
Line 8: Line 8:
 
">
 
">
 
library(OpasnetUtils)
 
library(OpasnetUtils)
 
cat("Calculating...\n")
 
  
 
concentration <- GIS.Concentration.matrix(Emission = emissions, LA = LA, LO = LO)
 
concentration <- GIS.Concentration.matrix(Emission = emissions, LA = LA, LO = LO)
  
head(concentration@output)
+
oprint(head(concentration@output))
 
 
print(xtable(head(concentration@output)), type = 'html')
 
  
 
exposure <- GIS.Exposure(concentration, LA = LA, LO = LO)
 
exposure <- GIS.Exposure(concentration, LA = LA, LO = LO)
  
print(xtable(head(exposure)), type = 'html')
+
oprint(head(exposure@output))
  
 
</rcode>
 
</rcode>

Revision as of 08:42, 13 March 2013

Latitude of the emission site:

Longitude of the emission site:

Emission of PM2.5 (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