Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
0answers
19 views

Creating an ArcGIS toolbox with an R script

I posted this over on another website but since I think it might be an issue with ArcGIS, I decided to post it here also. So I have the following script in R. in_params[[1]] represents the input CSV ...
1
vote
0answers
14 views

Road network per grid cell with weighting

Im trying to calculate road network per grid cell. I did it with the help of these topics 1 & 2 but I'M also trying to weighting these roads by type. For example if road is main its impact should ...
2
votes
0answers
38 views
+50

Krovak projection EPSG 5514: Correct data transfer between R and ArcGIS?

I have a problem which many ArcGIS, QGIS and R users from Czech Republic and Slovakia may encounter. In ArcGIS, I am working EPSG: 5514, Projected Coordinate System, defined as: ...
0
votes
1answer
14 views

How to extract single band from multi-band radiometry raster using R?

I am having trouble extracting single band from multiple multi-band raster. I have no problem doing it on single raster file. Is there a way to loop through all the raster images to extract a single ...
2
votes
0answers
11 views

Failed to create a raster-brick from a netCDF file (.nc)

I am trying to build a raster-brick from a netCDF file (network Common Data Form) leave this link for more information () but to make a brick (which is part of the package raster) throws me the ...
1
vote
0answers
11 views

writeOGR R and add an icon symbol [on hold]

I am wondering if there is a way to add an icon symbol to the R code I am using to export data in GPX format. Here is some example data: dput(head(location_information)) structure(list(Stratum = ...
2
votes
1answer
24 views

What is a UK boundary shapefile available for download via persistent URL (for cURL) with parish-level detail?

I'm in the process of generating a series of choropleth maps for a journal article and am writing this up in R as an .Rmd. My aim is to set this up as reproducible research, that is in a form which ...
0
votes
2answers
47 views

R: creating an error matrix from two rasters

I have two land use rasters (6 classes each) and I'd like to create an error matrix (errors of omission and commission) from them both. The premise is that I have a very fine 'base' raster and have ...
0
votes
2answers
22 views

mapping with spplot

This question should be easy! I am using spplot for visualizing a map with suitable results. However, I would like to know how to set the limits of z, because the values are not being discriminated. ...
0
votes
1answer
30 views

Use of Leaflet plugins in 'Leaflet for R' to connect with ArcGIS online

I was wondering if it is possible to use the plugins for the normal (non-R) version of Leaflet, and if, how I can do that. reason I need to do that is, that some of the data I need to show are hosted ...
1
vote
1answer
20 views

Proximity filter

this is gonna be tricky to explain I fear. So the aim of what I'm currently messing around: Creating a distance buffer around points in a SpatialPointsDataFrame If the value a this point is > 0, ...
2
votes
0answers
17 views

Creating a reference raster in R

I need to create global reference raster (100km grid, Eckert IV). Later, I will project other various rasters (with different resolutions and projections) into the resolution/projection of the ...
1
vote
2answers
183 views

projection differences in R

I am trying to reproject some climate data that I downloaded from http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#Welcomein The BCSD-CMIP5 data is found under the tab ...
8
votes
2answers
4k views

Clip Spatial object to bounding box in R

Given a Spatial object in R, how do I clip all of its elements to lie within a bounding box? There are two things I'd like to do (ideally I'd know how to do both, but either is an acceptable solution ...
2
votes
2answers
433 views

Clump and eliminate classes in a raster in ArcMap or R

after interpolation of sediment classes, I obtained a raster which looks like the image below (sample of the river). I would like to clump and eliminate areas within the raster that are below a ...
0
votes
0answers
19 views

Why ArcGIS crashes when I load raster file created in R? (HFA format)

I was processing my raster operation in R, as I think it's easier then in ArcGIS: - read shp + raster1 - crop them - classify raster1 by location - create classified raster2 - export the ...
0
votes
1answer
25 views

rasterVis plot3D in R: obtain consistent x-y axes with extent() / projection() shown in RasterLayer object

I have a RasterLayer object z: class : RasterLayer dimensions : 100, 100, 10000 (nrow, ncol, ncell) resolution : 0.06534037, 0.03165736 (x, y) extent : -96.63908, -90.10505, ...
0
votes
1answer
11 views

Finding neighbors for non adjacent polygons in R [closed]

I'm looking for a method or function in r-project that create a neighborhood matrix from a group of polygons that don't touch each other, like polygons of set of blocks separated by streets in a town. ...
0
votes
1answer
31 views

Creating SpatialPolygons in R

I am trying to do kriging with my data. But there is a problem here. I want to use krige command in gstat package. But I do not have "Spatial object with prediction/simulation locations". How I can ...
2
votes
1answer
7 views

Retain “region” elements for when using fortify() on a SpatialLinesDataFrame

I'm layering multiple plots using ggplot2 to create a map of Alaska that combines school location and the major road network. I've learned that despite being labeled "major roads" there is wide ...
-1
votes
0answers
28 views

How to give shape to grid in R

I tried to make a grid from my SpatialPointsDataFrame through this code: library(gstat) library(sp) library(raster) coordinates(gc_data_geostat_w) <- ~ ...
11
votes
2answers
4k views

Aggregating points to grid using R

I have a question with regard to spatial aggregation in R. What I am trying to do is aggregate a point dataset to a grid. I am unsure however how to do this as I have little experience with this sort ...
0
votes
3answers
59 views

Converting position data created in R to GPX format?

Does anyone know if there is a way to convert position data (latitude and longitude) created in R to GPX format to use with navigation software? I have been searching and havent found an answer. ...
0
votes
1answer
202 views

plot 3D graph based on raster pixel values

I am new to raster data. I have a raster tif file with population density value in each grid cell. I am interested in plotting a 3D graph based on raster values in ArcGIS or R. The similar graph is ...
-1
votes
0answers
16 views

Assigning points to grid using R [closed]

I'm essentially trying to do the same thing explained at this link: Aggregating points to grid using R I have a household csv survey file with gps points associated with the surveys, and I have ...
3
votes
0answers
163 views

Using R to map matching GPS data? [closed]

I have many vehicles GPS data points, which consist of "timestamp, longitude, latitude, fuel consumption and distance" and the data is OSM(open street map) based. I want to match the data points to ...
0
votes
0answers
20 views

Problems to export raster files in R software

I'm working with R software with raster and netcdf4 packages adn netcdf files to get information from SST. I got the information and now I'd like to convert in ascii or geotiff files to work in ArcMap ...
1
vote
0answers
21 views

Polygon to Raster: Cells with multiple values

I'm trying to use R to rasterize a number of shapefiles and I'm having trouble dealing with cells on the edge of shapes, in other words the if a cell is partially covered by an NA value and partially ...
2
votes
0answers
24 views

Mapdist() and buying Google Distance Matrix API

I have recently decided to buy some Google API information (as seen on image below), and I have entered my bank details (pay-as-you go). I obtain an API key but that's all. However R doesn't seem ...
0
votes
0answers
43 views

north arrow outside map

I am plotting 5 maps using spplot having a 2*3 layout. The space not used for maps should contain cartographic features such as a north arrow. Could someone guid me in the right direction? I know how ...
2
votes
1answer
50 views

Create GPX track in R. writeOGR function

I have a gpx file where someone exported two different activities in two separate locations to a single track. I need to split them and avoid getting the erroneous line in the track layer that ...
7
votes
1answer
65 views

How to decrease the distance between legend's items in R?

I'm trying to create correct choropleth() map in R using GISTools package. I use choro.legend() to display my legend. However I can't create either correct legend placement, AND/OR I don't understand ...
1
vote
1answer
36 views

csv points into raster using R

I have got the forest cover data of a region in africa (raster layer) and some data collected inside this region by a survey (.csv). In the .csv file I have got x,y coordinates and 3 other columns ...
0
votes
0answers
12 views

Why the krige.cv gstat function does not ask for a semivariogram model for every training set?

I'm performing kriging leave-one-out-Cross-validation with the krige.cv gstat function: Is it possible to specify the semivariogram model for every training set? or is there a reason why the model has ...
-3
votes
1answer
48 views

How to colour a SpatialLinesDataFrame with Rainbow

how to color a SpatialLinesDataFrame according to some given value (Rainbow) FRA=readShapePoly("FRA_adm0.shp") grid <- raster(extent(FRA)) # Choose its resolution. I will use 2 degrees of latitude ...
0
votes
1answer
21 views

R: Voronoi tesselation from long/lat data?

I want to create a SpatialPointDataFrame and Voronoi Tesselation from my .csv data downloaded from EPA, available here: http://uloz.to/xboQc7cu/no2-calif-csv I convert my data in SPDF format in 2 ...
0
votes
0answers
17 views

R: how to correctly set number n for sample grid for IDW?

I'm trying to make IDW in R. In my tutorial, I found this approach which is easily understandable, expect of one point - why they used n = 6000 ??? how did they established the value to create a grid ...
0
votes
1answer
49 views

Adding shapes and/or icons to legend using Leaflet within R?

Is it possible, using Leaflet within R, to make a legend in such way that includes a set of icons or shapes and their corresponding value?
1
vote
0answers
21 views

Filtering Small Areas of Shapefiles Using R

I'm trying to use the method proposed by the @ialm in the Question "How to speed up the plotting of polygons in R?" There, he loads the maps using getData from the raster package, I tested and it ...
0
votes
1answer
227 views

How to convert list of stack images to time series files in R

I am using bfast package for time series analysis. But it requires the files to be read as time series. How to convert list of stacked images from 2000 to 2013 into a time series and given as input ...
0
votes
0answers
11 views

Use SVM to make prediction based on two Raster input in R

Right Now I have two raster images, one is elevation another one is slope. And I already generate a SVM model in R. Right now I want to use this SVM model to make a classification prediction using the ...
1
vote
1answer
58 views

dynamic visualization of spatiotemporal data on a grid

I am handling spatiotemporal data and it is a quite new area for me. Basically I have data related to the position of cars at a given time in Montreal. I would like to dynamically visualize the ...
0
votes
1answer
191 views

Switch an R script from “MODIS Reprojection Tool” to “ModisSwathTool”

This R script works with MRT (MODIS Reprojection Tool), and its performance is unbelievable for land data. The only problem is when you use Atmospheric data from Modis, like "MOD05_L2". The problem ...
1
vote
0answers
20 views

Specifying the “idp” and the “nmax” in the krige.cv function

I'm performing IDW interpolation using the idw R function from the gstat package. For the purpose of determining what combination of "idp" and "nmax" produces the lowest RMSE in leave-one-out-cross ...
18
votes
6answers
7k views

Working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining. I have a PostGIS database with (obviously) GIS data. If I want to make statistical spatial analysis and plot ...
1
vote
1answer
18 views

How to deal with two dimensional lat and lon variables in a NetCDF file in R?

I'm trying to convert a NetCDF file to a dataframe in R using the RNetCDF package. The NetCDF file is very different from what I have experience with, in that the lat and lon values each have two ...
1
vote
0answers
16 views

Splitting polygon into multiple fixed-width polygons along edge in R?

I have a polygon and would like to spit into grid with fixed width along with one edge. The result will look like the figure below. Are there algorithm to achieve my target? My language is R, but ...
43
votes
9answers
17k views

Tutorials to handle spatial data in R?

Does anyone know some good tutorials to handle spatial data in R? I know that there are some packages like rgdal and maptools but I haven't actually found usefull tutorials to get in touch with the ...
3
votes
2answers
112 views

Plot tilted map in R

I would like to plot a tilted map, similar to the image below. I would prefer to do this using ggplot2 but I'm glad if there is a solution using base R. Any ideas on how to do this? Here is a dataset ...
8
votes
6answers
9k views

how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?

I have a SpatialPointsDataFrame with some additional data. I would like to extract those points inside a polygon and at the same time, preserve SPDF object and its corresponding data. So far I've ...