Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
1answer
18 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
37 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 ...
5
votes
2answers
161 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
52 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
33 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
53 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
0answers
21 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
0answers
26 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 ...
0
votes
2answers
27 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
47 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
85 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
74 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
18 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
43 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
32 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
27 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 ...
2
votes
1answer
57 views

Geographic Heatmaps with Concentric Circles by Distance

I'm looking to generate a geographic heatmap (using 'ggmap') that overlays some dimension (to start, housing prices) over the lat/lon near a city center. Then I want to create circles of equi-distant ...
1
vote
0answers
42 views

Is it better to work with non-contiguous or contiguous polygons?

I would like to find width-height of a non-contiguous polygon in order to draw paths within it. My question: Is it better to use a bounding box (contiguous polygon) and then clip keeping my real area ...
1
vote
1answer
48 views

Checking if points within shapefile

Zillow has a set of shapefiles for different neighborhoods of major US cities. I wanted to check if certain buildings were present in certain neighborhoods using R: library(rgeos) library(sp) ...
1
vote
2answers
63 views

rasterize produces a raster full of NA values

I am having trouble converting a polygon to a raster. The desired raster is created, however all its values are equal to NA. require(rgdal) require(raster) #download a shapefile with 2010 census ...
0
votes
0answers
54 views

Simulation of random flight paths for helicopters

I am trying to simulate 130 (random) flight paths for helicopter (just for practice) and I use R. So far I didn't find a package for simulation of random paths. I only found Random Walk but is not ...
2
votes
1answer
47 views

How to do a Kernel Density with “population field” in r?

In ArcGIS, I can generate a kernel density map and weigh it by population field. For example, I can use city's population as weighting factor, so that more populated city has higher influence to the ...
2
votes
1answer
39 views

How to handle duplicate id's when using the as_sp function in the R osmar package

Sometimes when I want to convert a subset of ways from an osm file loaded with the osmar package, I run into an error complaining about duplicate row names. The following code run on this file in ...
3
votes
1answer
38 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
12 views

Converting adf rasters to asc? [duplicate]

I have a number of adf raster files, and I need to use their data in asc format. I have QGIS, but prefer to do the conversion using R so that it can be batched and coded with the rest of my project.
0
votes
1answer
41 views

Plotting an eia shapefile in google maps with R?

I'm trying to plot a eia shapefile onto google maps. I have a code working with the map funciton but can't get it to work with the ggmap function. Where am I going wrong? Working code: ...
1
vote
1answer
19 views

How to add lables/etc with eia shapefiles in R?

I'm trying to create a map of US Shale basins and I'm very new to creating maps. I have downloaded the shapefiles form the eia. I have also, been able to created a basic map with the bases plotted ...
2
votes
1answer
48 views

Construction of a square grid from a given centre (lat,lon) and direction of the sides

Let us consider a point (longitude, latitude) on Earth (location). How to construct a square grid around this point (taking this point as the centre of the square or intercept of the two diagonals) ...
2
votes
1answer
61 views

How to read *.adf files into R?

I want to load .adf files into R. The data is from this page: http://www.fao.org/geonetwork/srv/en/metadata.show?id=14057 I tried the following code that I found after some research in the internet. ...
0
votes
0answers
26 views

Can't run sgolayfilt () on RasterStackTS in R

I'm quite new in R and remote sensing at all. Had followed the following step to filter my MODIS/NDVI data. library(sp) library(raster) library(rgdal) library(rts) library(signal) getwd() ...
2
votes
1answer
44 views

Distance to nearest point for every point same SpatialPointsDataFrame in R

I have a SpatialPointsDataFrame that I'm working with in R. I want to add a new vector to the dataframe that contains, for every point, the distance to the nearest other point in the ...
2
votes
0answers
48 views

Computing Shannon-Weiner biodiversity index using QGis

I wonder if anybody has some experience in calculating biodiversity index (such as Shannon-Weiner) using QGis. I am also interested for similar experiences using R scripts within QGis. The analysis ...
3
votes
1answer
87 views

Change countries boundaries color in a shapefile with R

I am working with R to create a map with a shapefile. I would like to change the color of the countries boundaries but I don't know how to do that. Is it possible to change the color? Here is my ...
0
votes
1answer
82 views

Finding correlation between point location and raster value

I have what i thought was a very simple problem but i think i may have overthought it.... I have a population density raster and a point feature layer showing the locations of X (about 70 points). ...
1
vote
3answers
81 views

Difference between raster subsets as defined by another raster

I wish to determine whether there is a relationship between slope and the Corine land cover class pastures. i.e. whether areas defined as pasture have a different slope to non-pasture areas. I've ...
3
votes
1answer
31 views

Add a point shapefile layer to a polygon shapefile window in R

I'm new to Spatstat for R and I'm trying to add a point layer to a window I've created from a polygon. I see questions like this have been asked before but I still can't get what I need from the ...
3
votes
1answer
63 views

Join spatial polygons by code in R

I am in the process of creating a spatial polygon map for the Valencia region in Spain. I asked the question in StackOverflow (http://stackoverflow.com/q/19791210/709777) and could produce the map. ...
-3
votes
1answer
34 views

How to locate pixels and bands of image in R [closed]

the format is tiff I have read a tiff image and plot it how to locate pixels and bands of this image now
1
vote
1answer
61 views

Querying Postgis data in R using dplyr package

Does anyone have a workflow for querying postgis data in R using the dplyr package? R doesn't like the spatial columns in postgis data so can't read them in like a postgres table. I get the error ...
2
votes
0answers
36 views

R Spatial: Trouble with disjointed polygon that has self-intersections

I have a shapefile which represents the areas of a city which have higher risks of flooding than others. This is a spatial polygon object however the polygon is disjoint and not connected. I also have ...
1
vote
1answer
34 views

How to build a function that extracts information from a set of polygons at multiple points in R

I am new to R, and trying to build a simple function that calculates an average (mean) of Sum_MVKT extracted from a set of predefined point locations. For this, I have two shapefiles named ...
0
votes
2answers
68 views

How to read and write tiff image and locate pixels and bands of images in R

I'm new in R I want to know how to read and write tiff format image in R and how to use R to locate pixels and bands of images My environment is in Windows when I try to read tiff image it shows ...
0
votes
1answer
96 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); ...
3
votes
2answers
123 views

buffer and union in R without reducing to a multi-polygon

I would like to perform a spatial overlay to identify the polygon within which a set of points fall. However I first want to buffer and dissolve the polygons, such that points falling anywhere within ...
0
votes
3answers
73 views

Save rasters created by loop operation to different directory?

I have a set of rasters. I crop them all using FOR loop. Then, I want to save new-created rasters in new directory, not in my actual directory. For one raster it is easy: writeRaster(raster1, ...
2
votes
2answers
64 views

Remove clumps of pixels in R

I would like to remove isolated pixels (or clumps of pixels <9) from my raster image. library(raster) # create some raster data r <- raster(ncols=12, nrows=12) set.seed(0) r[] <- ...
2
votes
0answers
25 views

How to measure similarity of approximately congruent polylines

My initial question was posted here. The answer of whuber provides a nice solution for the case when polylines are congruent. However, the problem is that my polylines are approximately congruent ...
6
votes
3answers
180 views

How to measure similarity of SpatialLines objects

I created two SpatialLines objects in R: . These objects were created this way: library(sp) xy <- cbind(x,y) xy.sp = sp::SpatialPoints(xy) spl1 <- sp::SpatialLines(list(Lines(Line(xy.sp), ...
3
votes
1answer
57 views

Add a single column to multiple SHP

I was looking for a way to add a new column to several shp (simple polygons) at the same time. I don't know much about batch command. This new attribute is also a little bit tricky : I need to ...
1
vote
2answers
31 views

Getting raster values on grid nodes

I have my raster layers of Digital Elevation Model, aspect, slope and curvature for a certain region. In this region I want to apply a grid with a certain spacing in its nodes, and then get the ...