Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
13 views

DEM and r2stl() distorted models?

If I import a dem file into R and then call as.matrix() on it, I can access z values. I want to create a 3D model, but I'm getting strange results. Most of my dems are spiky and if they are smooth I ...
0
votes
2answers
56 views

Re-sample raster to acre grid using ArcGIS Desktop or R?

I have a 1m classified landcover raster layer that consists of values 1-4 representing various land covers. I need to resample this layer to an acre grid. Each acre in the resultant grid should ...
9
votes
1answer
657 views

Kriging on GRASS+R - cannot allocate vector of size 146.5 Mb

I'm trying to do a groundwater elevation map with an Ordinary Kriging on R, but always resulting on the lack of memory cannot allocate vector of size 146.5 Mb allocation (windows xp 32bit). ...
7
votes
1answer
244 views

Interpolating points observed with different time duration

I am doing spatial interpolation with a group of points. Some points have complete observation of events: for a period of 24 hours we have observed N events in each point. These points have N ...
1
vote
1answer
107 views

Is there any issue using R scripts with sextante processing framework?

I want to use R scripts from the module Sextante treatment QGIS , but I have many difficulties to configure the module in Sextante . Following the procedure described in the official documentation of ...
1
vote
2answers
82 views

How to convert a spatialpolygon to a SaptialPolygonsDataFrame and add a column to the atrribute table

coast<-readShapeSpatial("coastline.shp") landc<-readShapeSpatial("landcover.shp) ro<-readShapeSpatial("roads.shp") bc<-gBuffer(ro,width=100) landc$ratings=1 ...
0
votes
1answer
54 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 ...
2
votes
1answer
90 views

Monthly weather averages using NCEP/NCAR Reanalysis data

I'm a political science grad student and I've recently (and probably foolishly) committed to dipping my feet into GIS. Right now I need to build a table that has monthly precipitation and temperature ...
1
vote
1answer
61 views

How to create a US map in R with separation between states and clear labels?

I was trying to figure out how to create a map like down below in R on the Stack Exchange but maybe that's the wrong community and the GIS side is a better spot. Currently, I'm able to add the ...
5
votes
3answers
1k views

Kriging with barriers in R?

I wonder if there is a way to interpolate xyz points in a raster within certain bounds using R? In ArcGIS this is called interpolation with barriers. I wonder if there is something similar in R? I ...
2
votes
2answers
72 views

A raster map without a legend?

I simply download a map from here http://neo.sci.gsfc.nasa.gov/view.php?datasetId=MCD12C1_T1. this map is a tiff file. mapd <- raster("C:\\MCD12C1_T1_2011-01-01_rgb_1440x720.TIFF") plot(mapd) ...
0
votes
1answer
39 views

DEM files and r2stl()

In R The Volcano dataset has elevation values, but is not a DEM file. How can I convert my DEM files (from earthexplorer.usgs.gov) so that the I can access all the elevation values in a matrix (what ...
2
votes
1answer
174 views

Kriging inside a PostGIS database?

I use a PostGIS database with temperature data. I want to use a spatial interpolation method but not the supported IDW method. I need to use kriging, but it is not part of the supported interpolation ...
1
vote
1answer
23 views

Iterative Mean of Means Infinite Loop for calculating H-t Index

I'm trying to create a function that will calculate an Ht-Index for Quantifying the Fractal or Scaling Structure of Geographic Features (but am new to R) which basically just finds nested means of ...
0
votes
0answers
49 views

Error of memory for vector allocation while kriging [duplicate]

When I run the krige.conv function from the geoR package in R: kc <- krige.conv(as.geo,loc=prd.loc,krige=krige.control(cov.pars=c(0.29,0.79))) it throws me the following error: Error: cannot ...
1
vote
0answers
87 views

Performing Maximum Likelihood Classification in R

I'm trying to perform maximum likelihood classification of landsat imagery using R, I have been searching for a package that implements it but so far I haven't found it. What is the easiest way to ...
1
vote
1answer
37 views

Mapping Disease Incidence in the Northeast in R

I am trying to map disease incidence by county in states in northeastern states in the US. I have the shapefiles for the entire US but I am having a difficult time deleting the states that I do not ...
16
votes
5answers
8k views

How to cluster spatial data in R?

I am very new to R, so please bear with me : > I have bunch of data points with latitude and longitude. I want to use R to cluster them based on their distance. I have already taken a look at this ...
1
vote
1answer
42 views

legend colour with specific value

i have model plotted in R base<- raster("example.tif") plot(base) image i'd like to change value (0,5,10,15,20,25) breakpoints<-c("0,5,10,15,20,25") plot(base,break=breakpoints) Error in ...
2
votes
3answers
116 views

Plotting Netcdf data. How to get right projection?

Maybe it's very easy for someone to fix, but I'a a new one in R, so I really need help. I/m trying to plot data containing lat, lon and variable (nmf2). The grid isn't a regular one, so there are some ...
0
votes
0answers
34 views

ArcGIS implementation of an R-script for estimating spatial autocorrelation

How do I implement the following in ArcGIS? rho.from.data <- function(ras){ require(spdep) require(maptools) #-- Generate Spatial Pixels data frame from raster file --# r2r <- as(ras, ...
2
votes
1answer
46 views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: ...
3
votes
3answers
205 views

Assigning RGB values from Geotiff image to LiDAR data, using R

I have given a Geotiff image and its corresponding Lidar data (x,y,z) in UTM coordinates. I need to merge the Lidar data with the RGB values from the image. That means, at the end, I need to plot ...
1
vote
2answers
161 views

Calculate distance between a set of points: lat and long in QGIS or R

I have shapefiles containing the location of several individuals along several months. Positions were documented with a 30 minutes interval. Tables contain the following data fields: collar (ID), ...
0
votes
1answer
39 views

Sampling one shapefile with polygons of another using R?

I have two shapefiles that partially overlap. One (the bigger one) consists of several polygons which represent fields I am interested in. The second, is a rectangular shape that overlaps about 30% of ...
0
votes
1answer
47 views

chi-squared for two rasters in R

I am kind of new with statistics. I have two raster with categorical values and I want to get chi-square. How can I do this using R? Rasters have the same region and same resolution. Is chi-square ...
3
votes
1answer
49 views

CRS not embedded by maptools in R

I'm using the maptools package in R to merge some data to a shapefile. When I open the original input shapefile in QGIS, QGIS automatically picks up on the CRS. When I open the output shapefile from ...
2
votes
2answers
102 views

What is the “best” way to automate the GIS slope and aspect algorithm?

I am currently obtaining slope and aspect of roofs using ArcGIS as follows: Mosaic several Lidar .asc files to new raster Extract by mask using Mastermap building outlines to get hold of just the ...
0
votes
1answer
33 views

ggplot2 plots polygons with wrong topologies

I'm trying to plot polygons in R using ggplot2. In GRASS, QGIS and normal R the map renders fine, but ggplot2 seems to have some kind of topological difficultes I can't explain. With normal R it looks ...
4
votes
1answer
146 views

Working with MODIS in R

I am new to using MODIS data and was hoping to get some help starting out. I have been able to download the hdf file but viewing it in R has been a problem for me. What I have found so far, and ...
0
votes
1answer
57 views

Intersection of two Raster objects

I have two raster objects r1 (in grey and green) and r2 (in pink) that I want to intersect with R. I tried with the R function intersect from the raster package but it only intersect the extent of the ...
2
votes
1answer
120 views

Overlaying lines and aggregating their values for overlapping segments

I have a number of routes (5 in this example data) stored in a SpatialLinesDataFrame called r. These have different origins but all converge on the same destination (Manchester Airport): Each ...
5
votes
1answer
151 views

Calculating road density in R using kernel density

I have a large (~70MB) shapefile of roads and want to convert this to a raster with road density in each cell. Ideally I'd like to do this in R along with GDAL command line tools if necessary. My ...
3
votes
4answers
267 views

Convert line shapefile to raster, value=total length of lines within cell

I have a line shapefile representing a road network. I wish to rasterize this data, with the resulting values in the raster showing the total length of the lines that fall within the raster cell. The ...
1
vote
1answer
54 views

Conditional statement, apply different equation based on raster value R

I am trying to find the best way to apply a set of equations to a raster conditional on values in a separate raster. For example, suppose r1 has the values of interest and raster 2 (r2) is a raster ...
0
votes
0answers
61 views

polygon shapefile R extract issues

I'm trying to do simple RF classification in R based on https://gis.stackexchange.com/a/39103/48810. The code I am using is as follows: require(sp) require(rgdal) require(raster) ...
0
votes
2answers
31 views

How to compute climatology of 3 days moving averages for rasters pixel by pixel?

I have one year of datasets that I want to compute the climatology of 3-day moving averages and then I subtract this climatology from the original values for each pixel. example: # Set up the ...
3
votes
2answers
131 views

How to load projection along with raster in R?

Why the operation myraster = raster("test.asc") does not load the associated projection file test.prj located in the same directory as test.asc? Does raster() need a specific argument? It seems ...
1
vote
0answers
48 views

Optimal distance and power exponent in IDW

I want to apply IDW interpolation for my region of interest, and through leave-one-out cross validation I want to find the optimal values for the distance parameter and the power exponent. I know that ...
2
votes
2answers
124 views

How calculate pixel by pixel the mode (statistic) of multiple rasters (geotiff)?

I have 12 land cover maps, and I would like to calculate the mode to each pixel of the 12 maps (they have the same resolution and dimension). I mean, the final map would be the mode for each pixel of ...
29
votes
7answers
10k 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 ...
1
vote
0answers
27 views

How to export multiple class training data from ArcGis into R?

I want to perform some machine learning classification of images using R. I'm having issues finding out how to export my training data from ArcGis into R and I'm looking for some help. Currently I do ...
6
votes
1answer
116 views

How to perform a non-linear regression pixel by pixel?

Using nlsLM from Package ‘minpack.lm’ is straightforward for a simple example like this: MODEL:y=(exp(a*x+b*z+c)+d)^f x=c(0.5,0.3,0.2,0.4) z=c(0.1,0.6,1,0.9) y=c(0.2,0.3,0.9,0.9) ...
0
votes
0answers
26 views

How to avoid a problem of one pixel when doing non-linear regression?

I am ruining a non-linear regression using nlsLM from package:minpack.lm for multiple rasters (pixel by pixel). My initial values may be appropriate for some pixels but not for others.When I run the ...
3
votes
2answers
198 views

Spatial Classification

I am not sure what to call my problem. From this image, I have a set of classified polygons (colored). I would like a way to classify the white polygons in the image. I don’t have any attributes to ...
1
vote
1answer
62 views

Extract area of polygons inside larger polygon and sum their values to a new column

I have two landcover classifications (as shapefiles) created using eCognition. "Level0 (FID)" consist of larger polygons and "Level1 (FID, ClassName, Area_Pxl)" of smaller polygons within these. I ...
1
vote
1answer
125 views

What's the difference in these two shp files?

I'm trying to plot points on these maps in R, with points from "Coordinates" in the same folder. The WL.shp plots fine with the data, but the NG.shp (which should only be larger and of the same area ...
3
votes
2answers
63 views

How to compare a classified raster dataset to another polygon dataset?

I am going to perform an unsupervised classification on my dataset and will get a map as a result. The objective is to rebuild an already existing map (of different soil types) with my new dataset. ...
0
votes
0answers
37 views

crop shp file leads to different results for same extent

I cropped a shapefile to a smaller extent (my AOI - area of interest) - to work with a reduced working directory. During my workflow I rasterize the shapefile. Here is my problem: I saved both of my ...
0
votes
1answer
75 views

using raster.predict for Cubist model, factor levels list

I would like to thank in advance any help or advice. Let me know if I need to provide more reproducible data/code. I am working on a Cubist prediction model for soil texture, using continuous and ...