Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
9 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 ...
1
vote
1answer
11 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 ...
1
vote
0answers
18 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 ...
0
votes
0answers
10 views

Choosing R package for discrete choice model?

I am at a loss as to which R package and approach to use for my modeling. The background is: I have a transportation survey dataset combined with many other GIS datasets. I am attempting to ...
1
vote
1answer
28 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 ...
0
votes
0answers
39 views

Error of memory for vector allocation while kriging

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
1answer
28 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 ...
0
votes
0answers
26 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
3answers
67 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 ...
2
votes
1answer
30 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: ...
1
vote
2answers
83 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
25 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
35 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
42 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 ...
0
votes
1answer
22 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 ...
2
votes
2answers
62 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 ...
2
votes
1answer
85 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 ...
1
vote
1answer
38 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
2answers
24 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 ...
0
votes
0answers
41 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) ...
1
vote
0answers
24 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 ...
5
votes
1answer
89 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 ...
1
vote
0answers
23 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 ...
2
votes
2answers
99 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 ...
0
votes
0answers
23 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
3answers
134 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 ...
0
votes
0answers
34 views

Can't import libraries to rsaga

I get this error when I'm trying to import a raster to RSAGA: > rsaga.import.gdal(paste(rast_name, ".tif", sep=""),"RASTER", env= my_env) Module 'GDAL: Import Raster' not found in SAGA library ...
1
vote
1answer
49 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 ...
6
votes
1answer
98 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) ...
3
votes
2answers
83 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 ...
0
votes
0answers
33 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 ...
-1
votes
1answer
56 views

Single point in R

My question might be very simple. I want to create a single point (with xy coordinates) in a specific region, in a specific position. I don't want to do that with qgis I want to do that in R. Is there ...
0
votes
2answers
51 views

Join spatial point data to polygons in R

I am trying to perform a spatial join between point data and polygon data. I have data that indicate the spatial coordinates of an event in my csv file A and have another file, shapefile B, that ...
1
vote
1answer
28 views

Add information from polygon to raster in R

I would like to add information from a spatial polygon to a new raster. r <- raster(nrow=10, ncol=10) r[] <- runif(ncell(r)) * 10 xym = matrix(c(0,0,0,45,45,45,45,0),4,2,byrow=T) ## create ...
1
vote
1answer
50 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 ...
1
vote
0answers
47 views

Problem between files with same coordinate reference system

I have 2 shape-files. The first created with Qgis and the other with R studio(driver=ESRI). When I import them in qgis i see they doesn't "fit". Both have EPSG:4326 - WGS 84. The only difference I ...
6
votes
2answers
221 views

How to make a bivariate colour ramp with QGIS, R or similar?

Many recent maps I have seen have these neat two-way color gradients that can be used to color correlations between continuous estimates. Here is an example taken from a recent publication (Source: ...
2
votes
1answer
74 views

R function for Thiessen Polygons

For a point data set with temperature data I have, I want to create their Thiessen Polygons in R. So far, the only algorithm I have found is that of Carson Farmer ...
1
vote
2answers
56 views

How to import several GeoTiff files into R?

I think that must be a "simple" way to import several Geotiff files into R instead of copy and paste n times Rfd<-readGDAL() and then save them as individual objects. I found the following code in ...
1
vote
1answer
59 views

resize map and add points to it using R

I am working with spatial data UK. The map is plotted here. I want to resize the map and make it bigger and clear! here is my code LA <- readOGR(dsn =".", "infuse_dist_lyr_2011_clipped") ...
0
votes
1answer
52 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 ...
0
votes
1answer
40 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 ...
1
vote
2answers
46 views

Export GRASS raster as GeoTiff : nodata values exported as -nan (what happens in R?)

I am using the package raster to work with GeoTiff raster files which I expoerted from GRASS using r.out.gdal. GRASS assigned the value -nan to some raster files (type FLOAT32) for missing values. ...
0
votes
0answers
73 views

Couldn't load plugin processing in QGIS: Access is denied for R

Couldn't load processing plugin due to flowing error. Any help? thanks. Couldn't load plugin processing due an error when calling its initGui() method Traceback (most recent call last): File ...
0
votes
1answer
98 views

export list as shp in R

I have a list of coordinates with which i can create a path and I want to export this list as shp. I have "shapefiles" package but I didn't find the way to do this. Is there a way to do this with this ...
3
votes
1answer
89 views

Dissolve Polygons using R / join specific polygons

I have data in shapefile format :: UK_boundaries I am new to R and Spatial data as well, I am trying to join some areas to be as one area no line(s) between them. Based on my search I understand ...
1
vote
0answers
34 views

R geographically weighted regression with negative binomial distribution

I'm trying to find a R package that allows me to do geographically weighted negative binomial regression. I'm aware there's 'spgwr' and 'glm.nb' package. But is there a package that combines the two? ...
1
vote
1answer
44 views

Is there any statistical measure/tool that compares two different sets of location configurations in R or ArcGIS/QGIS?

Here is what I'd intend to do; I have a given set of facility locations as shown below; And based on a predefined one optimization criterion, I obtained the following configuration (and there are ...
0
votes
1answer
37 views

R code for SDM using randomForest

I wonder if someone can provide me with R code for running Species Distribution model using randomForest where I can't find any tutorials or demos for this.
0
votes
1answer
40 views

Raster import from GRASS to R - handling nan/NA

I have several doubts, so I will try to be as clear as possible... thanks for your understanding. I am generating a regression model using several environmental covariates. Before importing the GIS ...