Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
2answers
138 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
28 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
263 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
1answer
84 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
74 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
127 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
165 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
41 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
63 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
281 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
38 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
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 ...
1
vote
0answers
53 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
288 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
192 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
230 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
85 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
86 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 ...
1
vote
1answer
70 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
86 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
164 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
134 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
205 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
63 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
47 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 ...
-1
votes
1answer
54 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
62 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
235 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
45 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
123 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
112 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 ...
2
votes
1answer
117 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
70 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
2answers
73 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
93 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
27 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
63 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
309 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
45 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
120 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
101 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
184 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
204 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
119 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
56 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
145 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
45 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
2
votes
1answer
154 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
85 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 ...