Acta Silvae et Ligni 102 (2013), 55-62 Izvirni znanstveni članek / Original scientific paper ON THE USE OF R PROGRAMMING LANGUAGE IN THE ANALYSES OF SPATIAL DATA UPORABA PROGRAMSKEGA OKOLJA R V PROSTORSKIH ANALIZAH Milan KOBAL1, Andrej CEGLAR2, Klemen ELER3, Barbara MEDVED-CVIKL4, Luka HONZAK5, Primož SIMONČIČ6, David HLADNIK7 (1) Gozdarski inštitut Slovenije, 1000 Ljubljana, Slovenija, milan.kobal@gozdis.si (2) Joint Research Centre, Institute for the Environment and Sustainability, 20127 Ispra, Italy, andrej.ceglar@jrc.ec.europa.eu (3) Univerza v Ljubljani, Biotehniška fakulteta, Oddelek za agronomijo, 1000 Ljubljana, Slovenija, klemen.eler@bf.uni-lj.si (4) Ministrstvo za kmetijstvo in okolje, Sektor za urejanje kmetijskega prostora in zemljiške operacije, 1000 Ljubljana, Slovenija, barbara.medved-cvikl1@gov.si (5) BO-MO d.o.o, 1000 Ljubljana, Slovenija, luka@bo-mo.si (6) Gozdarski inštitut Slovenije, 1000 Ljubljana, Slovenija, primoz.simoncic@gozdis.si (7) Univerza v Ljubljani, Biotehniška fakulteta, Oddelek za gozdarstvo in obnovljive gozdne vire, 1000 Ljubljana, Slovenija, david. hladnik@bf.uni-lj.si ABSTRACT R is a powerful and increasingly popular programming language with strong graphical and presentation features and large expandability. Although primarily intended for statistical computing, R has paved its way to the field of GIS through the development of specialized extension packages. It offers a wide range of functions at all GIS levels: data acquisition, data manipulation, graphical representation and quantitative analysis. The paper presents R as an open source alternative to the existing commercial GIS software. It proves especially well when advanced quantitative methods on spatial data are needed (e.g. spatial modelling). We demonstrate R capabilities through spatial analysis of forest area in Snežnik (South Slovenia), where the possibilities of data import, conversion and export into various GIS formats and possibilities of geostatistics, spatial modelling and spatial visualization are demonstrated. Key words: R tool, spatio-temporal data analysis, ecology, geomorphology, Snežnik, Slovenia IZVLEČEK R je zmogljiv in vse bolj priljubljen programski jezik s poudarjenimi grafičnimi in predstavitvenimi funkcijami ter veliko možnostjo razširitve. Čeprav primarno namenjen statističnemu računanju, si je R z razvojem specialnih razširitvenih knjižnic utrl pot tudi na področje GIS. Omogoča širok nabor funkcij na vseh ravneh GIS: na nivoju zajemanja podatkov, na nivoju manipulacije podatkov ter na nivoju grafičnih predstavitev in kvantitativnih analiz. V prispevku predstavljamo R kot odprtokodno alternativo obstoječim komercialnim GIS- orodjem, ki se izkaže še posebno tedaj, kadar želimo na prostorskih podatkih uporabiti zahtevnejše kvantitativne metode (npr. prostorska modeliranja). Prikazujemo ga na primeru prostorskih analiz gozdnega območja na Snežniku (južna Slovenija), kjer demonstriramo možnosti vnosa podatkov, transformiranja in shranjevanja različnih GIS-podlag, možnosti geostatistike, prostorskega modeliranja in prostorske vizualizacije. Ključne besede: R program, prostorsko-časovne analize, ekologija, geomorfologija, Snežnik, Slovenija 1 INTRODUCTION 1 UVOD R is a free (open-source) software environment for statistical computing and graphics (http://cran.r-pro-ject.org/). It is a versatile, object-oriented programming language with strong graphic and demonstration functions. The R community continues to evolve and expand, actively developing new extensions known as libraries. There are currently close to 4,000 such libraries, which enable a variety of specialized data analyses and management, as well as data visualizati- GDK58+91(045)=111 UDK 004.438R:630*58+630*91(045)=111 Prispelo / Received: 30. 07. 2013 Sprejeto / Accepted: 02. 09. 2013 on. R is a command-line program that generally does not possess a graphic interface. This lack of interface may prove particularly challenging for a new user. However, it is specifically the software's code that gives R the capability to repeat commands and to create a user's own methods for data processing and visualization. This demands a qualitative understanding of any acquired data. From this perspective, R greatly exceeds the so-called 'black-box' programs. Current academic research on the use of the R programming environment suggests that R is predominantly used in the following sciences: (1) geosciences, (2) water resources, (3) environmental science, (4) agriculture and soil science, (5/6) mathematics and statistics, (7) ecology, (8) geodesy, (9) the exploitation of fossil fuels, and (10) meteorology (Zhou et al., 2007; Hengl et al., 2009). In addition to these fields, R is used within economics and finance, sociological and psychological sciences, medicine and genetics, and potentially more. Although R is primarily intended for statistical computing (e.g. linear and nonlinear models, regression, multivariate statistics, data mining and machine learning) and for the presentation of results in the form of graphs, its relatively intuitive programming enables integration with other research methods, including GIS. The R programming environment offers a wide range of functions at all three levels of GIS: (1) data collection, (2) data manipulation and (3) data presentation. The complexity of spatiotemporal data analysis has necessitated the development of the 'sp' library, which sets a framework for structuring and storing spatial data. The 'sp' library delineates different classes of spatial data, thereby determining the structure and organization of spatial data and methods. These functions are adapted to individual classes (Bivand et al., 2013). The 'sp' library consists of methods for the point, line, polygon and raster data processing, which provides a wide variety of spatial data processing options within the R environment. It is possible to convert between different classes and save the objects in the form of standard GIS formats and spatial reference systems. In addition to the 'sp' library, the following libraries are relevant for the spatial data processing: • rgdal - to read and write a variety of established raster data (e.g. GeoTIFF, ERDAS Imagine, SDTS, ECW, MrSID, JPEG2000, DTED, NITF) and vector data (SHP, ESRI ArcSDE, MapInfo (tab and mid / mif), GML, KML, PostGIS, Oracle Spatial) to define and transform the projections; • maptools - to read, record and display the most common vector data, in addition to many other features; • raster - special features for handling raster data; • gstat - geostatistical methods (e.g. (co)kriging, va-riograms); • geoR - spatial modelling (e.g. Frequentist inference, Bayesian); and • rgeos - an interface for operations on topologies (e.g. intersection, union, buffer zone). The aim of this article is to demonstrate the R's potential for the spatial data processing and presentation. To demonstrate the competency of R for GIS analyses, we performed a spatiotemporal analysis of actual measured data. Our main focus here is to demonstrate the programming environment, and the spatial analysis itself may be meaningful (i.e. species distribution modelling at a small scale). We illustrate working with vector data, the spatial interpolation of point data and working with raster data. We present an overall picture of large amounts of data processing (e.g. LiDAR) and spatial modelling. At each step, the data are also presented graphically to show the R's capability as a visualization tool. 2 MATERIALS AND METHODS 2 MATERIALI IN METODE All of the data in this paper were obtained from a Snežnik (south Slovenia) forest. The study area measures 20 ha and increases in altitude from 820 m to 880 m. Silver fir and European beech are the dominant tree species. The terrain is characterized by abundant sinkholes. The following data are available for the study area: Air temperature: air temperature was measured at 65 locations, at the intersections of a 50 x 50 m grid using DL-120 TH temperature loggers (sensor SHT 11 sensor, accuracy ± 0.5 °C) from May 1, 2008, to February 28, 2009, every 10 minutes. LiDAR data: 3D point cloud measurements using a Riegl LM5600 laser scanner, mounted on a helicopter with a relative horizontal accuracy of 10 cm, a relative vertical accuracy of 3 cm and a 180 kHz laser pulse frequency. The density of points is 30 points/m2, with a footprint of 30 cm. Vegetation data: a summer survey of shrubs, herbs and mosses at 65 locations, at the intersections of the 50 x 50 m grid, in accordance with the Central European method (Braun-Blanquet, 1964). For detailed description of materials and methods, see Kobal (2011). 3 RESULTS AND DISCUSSION 3 REZULTATI IN RAZPRAVA 3.1 Manipulation of vector data 3.1 Upravljanje vektorskih podatkov At all 65 locations, coordinates were recorded using GPS devices and exported to a text file. This text file was imported into the R environment (with the function 'read.table') using the library 'maptools' (Lewin-Koh and Bivand, 2012). A shapefile was created using the function 'writePointsShape'. At this stage, the attribute table only contained a plot name to which, using the function 'match', minimum temperature values for a random date and a random time (e.g., temperature on May 08, 2008, at 8:00 am) were ascribed. Figure 1 shows the location of the temperature loggers and the symbol size representing the temperature value. Legend / Legenda ■ 8°C □ 9°C ■ 10°C O DL-120TH Fig 1: Raster of interpolated temperature values in the rese- Slika 1: Raster interpoliranih vrednosti temperature na arch area. The size of the symbol delineates the value of the obravnavanem območju. Velikost simbola ponazarja vred- measured temperature May 08, 2008 at 8:00 nost izmerjene temperature 08.05.2008 ob 8:00 3.2 Geospatial spatial interpolation 3.2 Geostatistična prostorska interpolacija The next step was to perform a spatial interpolation (kriging) of the temperature throughout the research area using the library gstat (Pebesma, 2012). During the spatial interpolation procedure, it is first necessary to select the variogram model (functions 'variogram' and 'fit.va-riogram'), which is a function of the spatial dependence of random variables. There are different models of vario-grams. In our study, we selected a circular model, with a threshold of 2.67°C/m2 (this represents the spatial variance), a variogram range of 164 m (i.e., the maximum distance between two points where values of air temperature are related), and a nugget of 0 (i.e. measurement error or variability at the local level). Thus, the point measure- ments were used to create a continuous temperature field in raster format (using the function 'krige') (Figure 1). 3.3 LiDAR data processing 3.3 Obdelava podatkov LiDAR In this part, we present the power of R as a tool for large amounts of data processing, programming and adapting basic functions. The raw LiDAR data for 1 km2 has a size of 539,468 KB (539 MB) and contains 20,736,221 rows and 62,208,663 data points. In R, we wrote an algorithm to eliminate points that represent forest trees in the whole cloud of points, yielding a point of the terrain. The algorithm is based on a point classification that incorporates the distance and angle between the lowest point and its neighbor- 1 1 cj->n — 456600 456700 456800 456900 457000 457100 457200 457300 GauB-Kriiger x coordinate / GauB-Kriiger-jeva x koordinata Fig. 2: The 3D point cloud (gray) of longitudinal profile in the Slika 2: Oblak točk (siva barva) vzdolžnega profila na območju research area. The red points are marked on the floor, which raziskovalnega objekta. Z rdečo barvo so označene točke na were determined based on the algorithm written in R tleh, ki so bile določene na podlagi algoritma, napisanega v R-u Fig. 3: 3D elevation model based on LiDAR data. The surface is coloured with a colour range of the altitude value ing points within a certain area. The algorithm also provides a visual check to remove certain points of the terrain (Figure 2). A digital elevation model (DEM) was produced based on these classified points. We used functions from the library raster for this stage (Hijmans and van Etten, 2012). Within each of the 2 x 2 m raster cells, we calculated an average altitude value (the z value). Where zero points occurred in the raster cell (i.e. with the presence of large trees with dense canopy), the value was interpolated within these cells in relation to the neighboring cells. The DEM was displayed as a 3D image (Figure 3). In addition, we calculate the topographic position index (TPI), as an example of processing raster data in R. The TPI (Weiss, 2001) is based on neighbourhood cells statistics (Jenness, 2006). It is defined as the difference between a chosen cell elevation and the average elevation of the neighbouring cells around a chosen Fig. 4: Topographic position index for research plot in Snežnik area Slika 3: 3D LiDAR posnetek preučevane ploskve, obarvan z barvno paleto po vrednosti nadmorske višine cell (Figure 4). A positive value indicates that the chosen cell is at a higher elevation than its surroundings, whereas a negative value indicates that the cell is lower. If the chosen cell is significantly higher than the surrounding neighbourhood, it may be at or near the top of a hill or ridge (TPI > 0). Significantly low values suggest that the cell is at or near the bottom of a valley (TPI <0). TPI values close to zero could mean either a flat area or a mid-slope area, so the cell slope can be used to distinguish the two (TPI ~ 0). The function for the topographic position index is part of the library raster. 3.4 Spatial modeling 3.4 Prostorsko modeliranje The purpose of this section is to demonstrate the potential of R for use in spatial modelling. We used data on the presence of plant species in our study area. The authors are aware that modelling occurrences of species in such a small area is not a meaningful study, Legend / Legenda □ TPI < 0 □ TPI = 0 ■ TPI > 0 Mil 0 O d g it S 1 S I < % Q Slika 4: Topografski indeks preučevane ploskve na Snežniku O 0.6 > rs 0.4 ■S O 0- 0.2 - 3.0 8.5 9.0 9.5 10.0 Temperature / Temperatura [ °C ] X O ° 00 rp 2 O n Ô0 CO O o 1" 1" X -4 -2 0 2 4 TPI / TPI Fig 5: Probability of species occurrence according to the Slika 5: Verjetnost pojavljanja vrste avstrijski divjakovec glede temperature (left) and the topographic position index (right) na vrednost temperature (levo) in topografski indeks (desno) but our main intention is to show the potential capability of the R software environment for these purposes. In our spatial model (logistic regression), the occurrence of a selected species, Doronicum austriacum Jacq., was used as a dependent variable, while the independent variables used were topography and climate characteristic of a site. A developed GLM model was used to predict the plant species reaction to changes in temperature. A logistic regression analysis (library base) was used to predict the probability of the presence of Doronicum austriacum. Air temperature was chosen as one explanatory variable (presented in detail in section 3.2), and the topographic position index 56600 56550 56500 56450 56400 56350 56600 56550 56500 56450 56400 56350 Fig. 6: Illustration of the species distribution for each decade, based on a potential temperature rise of 1°C by 2040. Hillshade terrain produced in R is used as a background was chosen as another. The latter was calculated using the digital elevation model described in section 3.3. Temperature and the topographic position index proved to be statistically significant variables (pemp = 0.0116; p. = 0.0390). Both of the logistic regression coefficients are negative, meaning that the probability of species occurrence decreases with increasing temperature and topographic position index (Figure 5). This result reflects the ecological niche of the Doronicum austriacum species: it occurs mainly in the colder sinkholes, where the value of the topographic position index is negative and the air temperature is lower. 456900 457000 457100 457200 Slika 6: Prikaz razširjenosti vrste po desetletjih glede na pričakovani dvig temperature 2 °C do leta 2040. Kot podlaga je uporabljen senčeni relief območja raziskave 456700 456800 456900 457000 457100 457200 456700 4561 GauB-Kriiger y coordinate GauB-Kruger-jeva y koordinata 3 ¥ C« » I O 3.5 Visualization of spatial data 3.5 Predstavitev prostorskih podatkov As a demonstration of R's potential for producing spatial animations, we have modelled the probability of Doronicum austriacum occurrence with a potential temperature increase of 1°C by the year 2040. For each decade, we produced a map of species distribution and calculated the area in which the species was maintained. To define the presence and absence of the species, a probability (p = 0.5) was used as a threshold. From the initial surface area of 2.1 ha in 2010, the area of species distribution will be reduced to 0.02 ha by 2040 (Figure 6). The final stage revealed the potential of using R for visualization of 3D LiDAR point cloud data. We used a library RGL (Adler and Murdoch, .•St. WA*' • * ' " . '.•¡•.i-- / : . ' -i * ■ , . 7 i, *:'•,•'V/; % • t , • 'Trti, ... ,'S . "TI ■ H. ... • V" * ■ ?.■ ^ 1 ¿j* ' • ■ VCir.č» i»w»StS»* iV»; r* • • Fig. 7: 3D LiDAR point cloud of tree in the area of Leskova dolina (Snežnik) Slika 7: 3D oblak točk LiDAR drevesa na območju Leskove doline (Snežnik) 2012). The library allows 3D real-time visualization, including a variety of animations (Figure 7). The points are coloured according to their z-value, which represents elevation in this study. 4 CONCLUSIONS 4 ZAKLJUČKI R has become not only a high quality open-source software environment for statistical computing and graphics but also a high performance geographic information system tool that can be used for geospatial data production, analysis, and mapping. A number of studies (Iranpanah et al., 2009, van Etten and Hijmans 2010, Bojanowski et al., 2013, Zwertvaegher et al., 2013) have demonstrated that R, in combination with spatial libraries, is a powerful tool for many research fields and scientific tasks within the domain of environmental science. Using the R software environment for spatial-temporal analysis provides important opportunities for the research community to understand the local, regional and global dynamics of spatiotemporal processes. R allows the implementation of various algorithms, such as those used in this study. Within one programming environment, R provides unlimited possibilities for analyzing and processing spatial data using advanced quantitative methods. This is particularly significant when attempting to solve complex research questions. R allows the usage of many control flows, loops and user-defined functions, as well as multiple input and output data formats and the opportunity to codify the existing data and functions. The entire process of analyzing data within R is run through a written script and syntax, which means that it is simple to rerun these analyses if needed. The fact that R is open-source software is also a significant advantage. If the time course that is used to run scripts is excluded, the software is of no cost to the user. Further, R may benefit many sectors, not just research. However, there are some disadvantages of analyzing spatial data within the R environment. Unlike desktop GIS tools, R requires complex scripting interaction with the map. However, this disadvantage can be overcome with the use of libraries, such as RSAGA (R + SAGA), spgrass6 (R + GRASS), RgoogleMap (R + GoogleMap) and RpyGeo (R + ArcGIS), which make R more competitive with traditional GIS tools. Because spatial analysis often involves vast amounts of data processing, it is significant that R is capable of implementing highly complex processes. Although such processing on a single computer may overburden the available processor core, this limita- tion can be overcome by dividing the servers in a 'cluster supercomputer' (Schmidberger et al., 2009). 5 POVZETEK 5 SUMMARY Programsko okolje ter programski jezik R sta od-prtokodno orodje (angl. open-source), ki je bilo sprva namenjeno predvsem statistični obdelavi podatkov. Gre za objektno orientiran programski jezik s poudarjenimi grafičnimi in predstavitvenimi funkcijami ter veliko razširljivostjo. R je program z ukazno vrstico (angl.: command-line) in, razen izjem, nima grafičnega vmesnika, kar je za novega uporabnika včasih lahko težavno. Vendar pa je izdelava programske kode tisto, kar daje R-u veliko možnost prilagajanja, ponavljanja ukazov, izdelavo lastnih metod obdelave podatkov in njihovo vizualizacijo v obliki, ki uporabniku omogoča kvalitativno razumevanje zajetih podatkov. Čeprav je R predvsem namenjen statističnemu računanju in predstavitvi rezultatov v obliki grafikonov, je razmeroma intuitivno programiranje omogočilo poseganje tudi v manj statistična področja, med drugim tudi na področje GIS. Programsko okolje R ponuja širok nabor funkcij na vseh treh ravneh GIS: na ravni zajemanja podatkov, na ravni upravljanja podatkov ter na ravni predstavitve podatkov. Zlasti zahtevnost pro-storsko-časovnih analiz podatkov je narekovala razvoj knjižnice sp, s katero je bil postavljen okvir za struktu-riranje ter shranjevanje prostorskih podatkov. Knjižnica sp definira različne razrede prostorskih podatkov (angl.: classes). Ti določajo strukturo in organizacijo prostorskih podatkov ter metode (angl.: methods); te so funkcije, prilagojene posameznim razredom. Knjižnico sp sestavljajo metode za obdelavo točk, linij, poligonov in rastrov, s čimer se je v okolju R odprla paleta širokih možnosti za obdelavo podatkov. Vsi podatki tega prispevka so vezani na raziskovalni objekt v gozdnem prostoru na območju Snežnika. Objekt meri 17.3 ha in se razteza na nadmorskih višinah od 820 m do 880 m. Prevladuje starejši jelovo-bukov gozd, relief je razgiban, s številnimi večjimi in manjšimi vrtačami. Gledano v celoti ima odsek lastnost večje vrtače, kjer je opazen mraziščni značaj. Za objekt so na voljo naslednji podatki: a) temperatura zraka na presečiščih mreže 50 x 50 m (65 lokacij) so z merilcem temperature DL-120 TH (tipalo SHT 11, natančnost ± 0.5 °C) izmerjene temperature v obdobju 01.05.2008 - 28.02.2009 (interval merjenja 10 min), b) podatki LiDAR (laserski skener Riegl LM5600 z relativno horizontalno natančnostjo 10 cm in relativno vertikalno natančnostjo 3 cm ter frekvenco oddanih laserskih impulzov 180 kHz). Gostota laserskih točk je ~ 30 točk/ m2, odtis žarka je 30 cm, ter c) vegetacijski podatki - na presečiščih mreže 50 x 50 m (65 lokacij) je bila po srednjeevropski metodi popisana vegetacija (grmovna, zeliščna in mahovna plast) na ploskvah velikosti 200 m2. Za oceno pokrovnosti vrst smo uporabili kombinirano lestvico, slednja združuje obilnost in številčnost vrste. Opravljen je bil poletni popis vegetacije. Na vseh 65 vzorčnih lokacijah smo z napravo GNSS zabeležili koordinate položaja v Gauft-Kruger-jevem koordinatnem sistemu in jih izvozili v tekstovno datoteko. Datoteko smo z uporabo knjižnice maptools uvozili v okolje R ter oblikovali vektorsko datoteko (angl.: shapefile). Preglednica atributov je v osnovni obliki vsebovala samo atribut z oznako ploskve, kateremu smo pripisali vrednosti minimalne temperature naključnega datuma in naključne ure (izbrana je bila temperatura 08.05.2008 ob 8:00). Na sliki 1 so prikazane lokacije postavljenih merilcev in zračne temperature na preučevanem objektu, kjer velikost simbola ponazarja vrednost temperature. Točkovne vrednosti temperature smo s pomočjo knjižnice gstat interpolirali na celotnem območju raziskovalnega objekta (stohastična prostorska interpolacija - osnovni kriging). Najprej smo izbrati variogram, ki predstavlja funkcijo prostorske odvisnosti naključne spremenljivke. Na voljo so različni modeli variograma; v naši študiji smo izbrali krožnični model, kjer je prag variograma 2.67 °C/m2, variogramski razmik 164 m ter merska napaka oz. variabilnost na lokalni ravni 0. Tako so bile točkovne meritve uporabljene za oblikovanje zveznega kontinuiranega polja temperatur v rastrski obliki (slika 1). V R-u smo napisali algoritem za izločitev točk, ki predstavljajo gozdno drevje iz celotnega oblaka točk, s čimer smo dobili točke terena. Algoritem temelji na razvrstitvi točk glede na razdaljo ter kotom med najnižjo točko in sosednjimi točkami znotraj določene površine. Algoritem dodatno omogoča vizualno preverjanje, na osnovi katerega lahko določene točke terena odstranimo (slika 2). Na podlagi klasificiranih točk smo izdelali digitalni model reliefa. Uporabili smo orodja iz knjižnice raster. Znotraj posamezne rastrske celice velikosti 2 x 2 m smo izračunali povprečno vrednost nadmorske višine (vrednost z). V primeru, da znotraj celice ni bilo nobene vrednosti nadmorske višine (v primeru debelega drevja z gostimi krošnjami), smo vrednost znotraj te celice interpolirali glede na sosednje celice. Digitalni model reliefa smo prikazali kot 3D-sliko (slika 3). V nadaljevanju smo kot primer obdelave rastrskih podatkov izračunali topografski indeks površja. Izračunamo ga kot razliko v nadmorski višini opazovane celice in sosednjih celic, pri čemer sosednje celice v tem primeru predstavljajo vse celice od izbrane, oddaljene 25 m. Ko je nadmorska višina sosednjih celic višja, je vrednost TPI negativna (TPI < 0), ko pa so si nadmorske višine sosednjih celic in opazovane celice podobne, se vrednost TPI giblje okoli 0 (TPI ~ 0). Ko je nadmorska višina sosednih celic nižja, je vrednost TPI pozitivna (TPI > 0) (slika 4). Funkcija za izračun topografskega indeksa je vsebovana v knjižnici raster. V sklopu o prostorskem modeliranju prikazujemo možnosti prostorskega modeliranja v okolju R. V ta namen smo uporabili podatke o pojavljanju rastlinskih vrst na preučevanem območju. Avtorji se zavedamo, da modeliranje arealov rastlinskih vrst na tako majhnem območju vsebinsko ni smiselno. S prostorskim modelom smo povezali pojavljanje izbrane vrste (avstrijski divjakovec - Doronicum austriacum Jacq.) in reliefne in temperaturne značilnosti rastišča, na osnovi česar smo predvideli verjetnost pojavljanja te vrste na celotnem območju obdelave. Dodatno smo z dobljenim modelom predvideli tudi vpliv dviga temperature zraka ob pričakovanih podnebnih spremembah na spremembo primernega habitata vrste. Modelirali smo z uporabo logistične funkcije, vključene v osnovno knjižnico base. Kot prvo pojasnjevalno spremenljivko logističnega modela pojavnosti vrste avstrijski divjakovec smo izbrali vrednosti temperature zraka, podrobneje predstavljene v poglavju 3.2, kot drugo pojasnjevalno spremenljivko pa smo izbrali topografski indeks, ki smo ga izračunali na podlagi podatkov digitalnega modela reliefa v poglavju 3.3. V modelu sta vrednost temperature ter topografskega indeksa statistično značilni spremenljivki (ptemp = 0.0116; pp = 0.0390); oba koeficienta logistične regre-sije sta negativna, kar pomeni, da verjetnost za pojavljanje vrste avstrijski divjakovec z naraščanjem temperature in topografskega indeksa pada (slika 5). To kaže na ekološko nišo obravnavane vrste: pojavlja se predvsem v hladnejših kotanjah, kjer je vrednost topografskega indeksa negativna ter kjer so temperature zraka nižje. Zgolj kot prikaz možnosti prostorskih simulacij smo v nadaljevanju modelirali verjetnost pojavljanja te vrste na celotnem območju obdelave glede na potencialno povišanje temperature za 1°C do leta 2040. Za vsako leto posebej smo izdelali karto območja razširjenosti preučevane vrste in izračunali površino, kjer naj bi se vrsta ohranila. Kot mejo za opredelitev pojavljanja / nepojavljanja vrste smo uporabili verjetnost p = 0.5. Iz začetne površine 2.1 ha leta 2010 naj bi se območje vrste do leta 2040 zmanjšalo na površino 0.02 ha (slika 6). V zadnjem sklopu prikazujemo še možnost R-a za 3D prikaz oblaka točk snemanja LiDAR. Uporabili smo knjižnico rgl. Knjižnica omogoča 3D predstavitev v realnem času (angl.: 3D Real-Time Visualization) točkovnih in ploskovnih podatkov, vključno z različnimi animacijami (slika 7). 6 ACKNOWLEDGEMENT 6 ZAHVALA The work was written in the context of EU regional funding initiative - INTERREG IV Alpine Space program; project ''NewFor'' (NEW technologies for a better mountain FORest timber mobilization) and project V4-1141. The data were collected in the previous research project V4-0541, young researcher program (MK) and research program P4-0107. 7 REFERENCES Adler D., Murdoch D. 2012. Package rgl. Internet: http://cran.r-pro- ject.org/web/packages/rgl/rgl.pdf (30.1.2012) Bivand R. S., Pebesma E. J., Gomez-Rubio V. 2013. Applied Spatial Data Analysis with R. 2nd ed. NewYork, Springer: 405 str. Bojanowski J.S., Vrieling A., Skidmore A.K. 2013. Calibration of solar radiation models for Europe using Meteosat Second Generation and weather station data. Agricultural and forest meteorology, 176: 1-9. Braun-Blanquet J. 1964. Pflanzensoziologie. Grundzuge der Vegetationskunde. Wien and New York, Springer-Verlag: 865 str. Hengl T., Minasny B., Gould M. 2009. A geostatistical analysis of geo- statistics. Scientometrics, 80, 2: 493-516. Hijmans R. J., van Etten J. 2012. Package raster. Internet: http:// cran.r-project.org/web/packages/raster/raster.pdf (30.1.2012) Iranpanah N., Mohammadzadeh M., Vahidi Asl M. Q., Yassaghi A. 2009. Spatial data analysis of finite strain data across a thrust sheet using R. Computers and Geosciences, 35, 3: 626-634. Jenness J. 2006. Topographic Position Index extension for ArcView 3.x, v. 1.3a. Jenness Enterprises. Kobal M. 2011. Vpliv sestojnih, talnih in mikrorastiščnih razmer na rast in razvoj jelke (Abies alba Mill.) na visokem krasu Snežnika. Doktorska disertacija. Ljubljana, Univerza v Ljubljani, Biotehniška fakulteta: 148 str. Lewin-Koh N. J., Bivand R. 2012. Package maptools. Internet: http:// cran.r-project.org/web/packages/maptools/maptools.pdf (30.1.2012) Pebesma E. 2012. Package gstat. Internet: http://cran.r-project.org/ web/packages/gstat/gstat.pdf (30.1.2012) Schmidberger M., Morgan M., Eddelbuettel D., Yu H., Tierney L., Man-smann U. 2009. State of the Art in Parallel Computing with R. Journal of Statistical Software 31, 1: 1-51. van Etten J., Hijmans R. 2010. A Geospatial Modelling Approach Integrating Archaeobotany and Genetics to Trace the Origin and Dispersal of Domesticated Plants. PLoS ONE 5, 8: e12060. Weiss A. 2001. Topographic Position and Landforms Analysis. Poster presentation, ESRI User Conference, San Diego. Zhou, F., Huai-Cheng, G., Yun-Shan, H., Chao-Zhong, W. 2007. Scien-tometric analysis of geostatistics using multivariate methods. Scientometrics, 73, 3: 265-279. Zwertvaegher A., Finke P., De Smedt P., Gelorini V., Van Meirvenne M., Bats M., De Reu J., Antrop M., Bourgeois J., De Maeyer P, Verniers J., Crombe P. 2013. Spatio-temporal modeling of soil characteristics for soilscape reconstruction, Geoderma, 207-208: 166-179.