Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
0answers
7 views

From track+waypoints to elevation profile with waypoints

I have a track and waypoints (1) imported in QGIS. I want to calculate the closest point from every waypoint to the track (2). Then, I want a table with data that allows me to draw an elevation ...
0
votes
0answers
9 views

Calculating maximum mean temperature of the coldest month with a lists of rasters

I need calculate the maximum mean temperature of the coldest month. I need first select the coldest month in a list and then in this month determine the maximum temperature. I do this: Create the ...
13
votes
1answer
8k views

Projecting sp objects in R

I have a number of shapefiles in different CRSs (mostly WGS84 lat/lon) that I'd like to transform into a common projectly (likely Albers Equal Area Conic, but I may ask for help on choosing in another ...
1
vote
0answers
21 views

how to calculate distance in sub pixel mapping from Atkinson's paper?

Condition from atkindon's paper http://info.asprs.org/publications/pers/2005journal/july/2005_july_839-846.pdf for every sub-pixel the attractiveness Ai of a pixel i is predicted as a ...
6
votes
3answers
96 views

Waypoints with coordinates in R

I have a SpatialLineDataFrame with 20 observations of 4 variables (in WGS84). I want to create waypoints every 10 meters. Every waypoint will has the x y coordinates. I tried to do it manually like: ...
1
vote
0answers
35 views

Download Google maps data points

Is it possible to download google map data points? it would be usefull in order to gather in datasets all the restaurants in a dataset for example. I am using R but suggestions is other programs are ...
4
votes
3answers
33 views

Save and load maps for ggmap to use without internet access

I would like to use the ggmap package to download and display maps. Unfortunately I have some firewall restrictions preventing R from accessing the internet directly. The error I get from get_map is ...
5
votes
1answer
457 views

Convert coordinates from readShapePoly in R to long-lat coordinates

I'm trying to find some centroids of a shapefile for Danish municipalities and afterwards find the driving time between them. I use R's readShapePoly function from maptools combined with the ...
1
vote
0answers
23 views

Modelling zero-inflated spatially autocorrelated data with extreme values

I have spatially explicit data (above; Longitude, Latitude) with measurements on a random variable (z). This data was not collected in a random or systematic fashion, but instead was recorded ...
0
votes
1answer
93 views

R using fortify to project shapefile on google map gives wrong results

I have a shapefile that looks like this > str(FieldsMap) Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 3 obs. of 2 variables: .. ..$ id : ...
1
vote
1answer
46 views

Convert shapefile to WGS84 [duplicate]

I have a shapefile with shapelength and shapearea, and would like to convert to WGS84 to use with ggmap. Eventually, I would like to get plot google map of individual regions of the shapefile, and ...
-2
votes
0answers
14 views

instead of using mahalanobis distance can I use euclidean at MRF and MCMC functions definition module? [closed]

rm(list=ls(all=TRUE)) #mean of the training samples have to be generated before starting the process. require(rgdal) require(mvtnorm) require(rgl) StartPath <- getwd() # Set path to directories ...
1
vote
0answers
10 views

weighting scheme of gstat for fitting models to variograms

I use R and the gstat package to construct variograms of temperature, and I would like to ask If anyone knows what weighting scheme does the gstat package use to fit a model to the sample variogram?
0
votes
0answers
15 views

Why does R(gdal) mangle data when converting to geojson?

I've encountered issues with projections in .geojson files created by rgdal, but I never thought it would destroy my data, until I tried this (reproducible example): ...
0
votes
1answer
29 views

Add Points shp attributes to Polygon shp by Point location (as Spatial Join in ArcGIS)

I have a set of points in .shp (ESRI, available here: http://ulozto.cz/xGqRVFrR/voronoi-zip). I would like to calculate Voronoi tesselation from the points, thus create polygons. So far, so good. ...
1
vote
0answers
25 views

rgdal with multiple Feature Datasets in R

I am trying to read shapefiles contained within a geodatabase file (.gdb) into R. The .gdb contains two Feature Datasets with multiple Feature Classes within each. The problem is only one of the two ...
9
votes
2answers
2k views

How to get the second nearest neighbor between two point patterns in R?

Is there a way to get the distances for the second nearest neighbor between two point patterns in R? The spatstat package has a function called nncross but it only applies to the nearest neighbors ...
14
votes
2answers
3k views

Using R with ArcGIS Desktop

In response to comments below, a re-phrasing of the question. I've used the integration of R with QGIS, and found it a very uesful tool. Having taken a look at the R toolbox extension for 9 and the ...
14
votes
3answers
636 views

How to determine if trees within forest gaps are clustered?

The attached dataset shows approximately 6000 saplings in approximately 50 variable sized forest gaps. I am interested in learning how these saplings are growing within their respective gaps (i.e. ...
3
votes
1answer
74 views

R - How to “smooth” a raster map

I am trying to create a map from raster data. The file came from a crop model, with resolution of 0.5 degree. Even when I disaggregate it (i.e. increase spatial resolution), the map looks really ...
-1
votes
0answers
23 views

Krige function in gstat cannot see explanatory variables [on hold]

I have a SpatialPointsDataFrame in R which I wish to interpolate using the krige command in gstat. When I use ordinary kriging (krige(Var~1)) the code runs fine. When I want to use universal kriging ...
1
vote
1answer
102 views

unsupervised random forest classification in R

I want to compute an unsupervised random forest classification out of a raster stack in R. The raster stack represents the same extent in different spectral bands and as a result I want to obtain an ...
12
votes
1answer
3k views

How to perform Random Forest land classification?

This is a follow-up to a previous post: Machine Learning Algorithms for Land Classification. It seems that the Random Forest (RF) classification method is gaining much momentum in the remote ...
1
vote
1answer
190 views

How to do supervised image classification in saga with the help of R script or Python script

I am using Ubuntu 12.04 and want to do image classification in SAGA. SAGA has numerous classification algorithms which is not present in GRASS and QGIS. I am new to SAGA, but more accustomed to work ...
1
vote
3answers
30 views

Creating a new raster layer based on mean of other raster layers, ignoring NA values in R

I am trying to create a new raster layer that is made up of the mean values from 7 other raster layers. I get results using overlay function mean: mean <- overlay(2000, 2001, 2002, 2003, 2004, ...
1
vote
0answers
20 views

Problem with regression kriging using the krige command in r

I want to perform regression kriging in R using gstat. I have a SpatialPointsDataFrame which is of this form: After I have run my glm model, in order to see which variables are statistically ...
1
vote
2answers
899 views

Calculate area covered by a particular raster layer within polygons in QGIS

I am trying to extract information on vegetation cover within a set radius of point locations (my sites). I have succeeded in creating a new vector layer of circles with a 5 km radius around my sites. ...
0
votes
0answers
20 views

plot rasters with the same line diagram

I have 6 raster files with continuous values for an area with the same extent. I have created a raster stack and I want to plot one line for each cell in the raster stack of my six rasters (like the ...
0
votes
1answer
42 views

Cross validation in thiessen polygons interpolation

I apply Thiessen Polygons interpolation using the krige command in the gstat R package. Using krige without a variogram model sets automatically krige function to perform IDW, and when nmax parameter ...
11
votes
2answers
133 views

How does spatial polygon %over% polygon work to when aggregating values in r?

I'm working on an environmental epidemiology project where I have point exposures (~ 2,000 industrial hog operations - IHOs). These IHOs spray on nearby fields, but the feces water droplets and smell ...
0
votes
0answers
24 views

Using R to find attributes of spatial neighbors, especially with big spatial polygon data frames

If it's not too much, I have a specific question that leads to a more general one: I'd love thoughts on both if it's possible. First, the specific: I have an analysis involving census blocks and ...
0
votes
1answer
43 views

in R : get a SpatialPolygonDataFrame from gIntersection{rgeos] with sub-area as attribute?

I am using gIntersection (package rgeos) to intersect a polygon shapefile containing 20 buffers zones, with another polygon shapefile containing "ground occupation mode (GOM)" (an area divided in ...
5
votes
5answers
2k views

Create a ground overlay kml from georeferenced raster

I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file. Using ...
4
votes
2answers
165 views

Calculating Shannon's diversity using moving window in R

I have a raster where each pixel is a particular vegetation type. I'm interested in the diversity of vegetation types around each pixel. I'd like to assign a Shannon's diversity index value (see ...
6
votes
3answers
3k views

Converting osm file to shapefile (or data frame) in R

I was looking for a road shapefile for Australia today. I ended up going to Geofabrik. Open Street Map has data in .osm format. But they do not have one in .shp for Australia. If possible, I want to ...
3
votes
2answers
41 views

writeOGR with a spatialpolygon simplified by gSimplify

I'm using gSimplify (rgeos package) to simplify the geometries of a shapefile. The funcion works good, but now I can't write the output in a new shapefile. I tried some ways: writeOGR(simplyshape, ...
0
votes
2answers
25 views

How to produce a finer resolution spatial grid from coarser grid in R?

I have a spatial grid of an image. Now I want to use this grid and make a finer resolution grid out of it. For example an image structure in R is given below: str(c) Formal class ...
0
votes
1answer
145 views

Package getcartr Installation Problems

I want to build a cartogram by following this tutorial. The first thing I did, I spent the R-R-3.1.1 version 3.1.2 then I did the following: library(devtools); ...
0
votes
0answers
12 views

Dynamic polygons grid with specified area based on raster

I'm interested if anyone have idea how to automatically create (maybe in R?) dynamic grid of polygons with specified approx. area (for example around 20000 m2) based raster data or points with values ...
5
votes
3answers
3k views

Reading File Geodatabase using R?

File geodatabase (fgdb) includes numerous file geodatabase tables. As far as I know they exist as dbf files, but are within a Database.gdb. In ArcCatalog, the file pathway resembles ...
2
votes
0answers
22 views

Spatial weight matrix with boundary effects in R?

I need some help to finalize code for a spatial weight matrix that uses a nearest neighbor definition within regions, but does not allow neighbors from across a political border. For example, ...
6
votes
1answer
490 views

Stats on individual grid points nearest neighbours

I have shp of points where each point is the centroid of the individual cells of a 1*1km grid (~ 500 000 points). For each of these points, I have their coordinates and elevation. What I want: for ...
3
votes
3answers
46 views

Lines on reprojected sp objects with Mollweide projection

I'm having an odd problem such that when I reproject maps to a Mollweide projection in R using sp, I get additional lines stretching across the globe. What is going on here, and do you have any ...
0
votes
1answer
38 views

How to choose a shapefile interactively in R

I am writing a function in R where i want the user to choose a Esri shapefile from its destination folder. Since a shapefile is made of several files how can i select them. For a point feature class i ...
-2
votes
1answer
30 views

I need to create a function in R that processes rasters in esri grid format [duplicate]

I have loads of data (6500 files that I need to process and find yearly winter sums/averages/variance for. the format for my naming system is Syyyymmdd_rp. Each file is in the same file folder. I ...
3
votes
1answer
74 views

Processing large amounts of Rasters in R

I have 6500 processed and clipped rasters that indicate snow levels on a daily basis in the northern hemisphere. I need to create a raster that represents a sum of the snow for the season. The winter ...
1
vote
2answers
42 views

Getting attribute table from WFS data source

I am attempting to get some WFS 2.0 INSPIRE data from the Finnish meteorological institute into a table format of some kind. Is there any software which can easily grab the attribute data for the WFS ...
2
votes
1answer
602 views

R - Dealing with missing data in SpatialPolygonDataFrames for Moran.test

I'm trying to use Moran.test on a SpatialPolygonDataFrame consisting of 7194 elements in R. I know that there is around 150 polygons with NA values. First I generate a spatial weights matrix: ...
1
vote
1answer
26 views

How to read feature class in file geodatabase using R?

I have a feature contained in a geodatabase that is larger than 2GB as an exported shapefile. I need to run an extract function in R to attribute the polygons with data from a raster file. Exporting ...
0
votes
0answers
16 views

Thin Plate Spline interpolation

I am completely new to spline interpolation, and I want to apply Thin Plate Spline using the fields package in R, and after I have applied Tps then do leave-one-out cross validation. This is how my ...