Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
13 views

List overlapping Polygons in a shape file using R

I have a KML file that has about 20,000 polygons. Each polygon has a name and ID. I need the list of Polygons that overlap with any other polygon. Or a list of Polygons that DO NOT overlap with any ...
1
vote
0answers
47 views

Extracting data of two overlapping rasters

I am trying extract the data of two overlapping set of rasters (one, a stack of 35 rasters, all from the same source and the second an elevation raster) to get a data.frame of the values (mean of the ...
0
votes
1answer
24 views

Set projection (netCDF) with R-ncdf4-Package

I want to create a netCDF-file that has a defined projection ("WGS 84 / UTM zone 32N") with the netcdf4 package in R. The input float array has the size of x=880 and y=760. So i define the two ...
1
vote
1answer
30 views

PC and Mac treating raster brick input differently in R

All - this is likely an idiotic question, but, I've been working on developing some GIS code in R that interacts with an online source. So, sprinkled in various places, I have myBrick <- brick("...
0
votes
1answer
241 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
0answers
19 views

MODIS Leaf Area Index data 2001

I am trying to convert MODIS Leaf Area Index data from .hdf to GeoTiff from 2001. I can successfully convert it using R for the more recent datasets using the following code (package gdalUtils): sds &...
1
vote
2answers
34 views

Integrating R in QGIS with Mac OS El Captain: missing dependencies

I have a Mac OS (El Captain) and I'm trying to run R scripts within QGIS 2.14. When I open a script (like one from the online list) I receive the error message: This algorithm cannot be run :-( ...
0
votes
1answer
23 views

What is the easiest way to create map using HDF-5 data subset?

I need to visualize some area using values provided in HDF-EOS version 5 file and create map using those values and other GIS layers. Unfortunately, my QGIS do not recognize the HDF5 file. Do I ...
2
votes
2answers
518 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
28 views

making pacific center of map in ggmap

I am trying to produce a travel route map using the ggmap package of R, but I found that GMT being at the centre of the map cuts off the travel route from New Zealand to America. I have surfed the net ...
2
votes
1answer
38 views

Gstat krige() error: Covariance matrix singular at location [917300,3.6109e+06,0]: skipping

Recently, I am facing a strange problem when using krige() in gstat library. This error was not there a few months ago because I am using the same code with the same data that I successfully used ...
0
votes
1answer
271 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 ...
2
votes
1answer
285 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 ...
0
votes
2answers
197 views

How to produce a finer resolution spatial grid from coarser grid in R?

I have a spatial grid of an image. Now I want to use this grid and make a finer resolution grid out of it. For example an image structure in R is given below: str(c) Formal class '...
3
votes
1answer
29 views

raster::rasterize set wrong values with enclosed polygons

Similarly to this post rasterize (R package raster) fail to rasterize island polygons? the rasterize function in the raster package is giving me problems with enclosed polygons. In my case, some ...
1
vote
1answer
47 views

Comparing point pattern and raster data?

I have a simulated data set showing distribution of a certain habitat type as a point pattern. Then I have a empirical data set but there the format is raster. The two datasets are covering the ...
0
votes
1answer
229 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
vote
1answer
24 views

Exponential function variogram sill values

I am using gstat package for deriving a variogram using exponential model. My R code goes like this: g <- gstat(id= "HV",formula=HV~X+Y,data=vari) vari.var <- variogram(g) vari.var plot(vari....
-1
votes
1answer
33 views

Select polygons (A) that contain polygons (B) by using R code

I am wondering how to select polygons (A) that contain polygons (B) by using R code. B<-readOGR(dsn="H:/AP", layer="WWTP") A<-readOGR(dsn="H:/AP", layer="catchment")
0
votes
2answers
37 views

Calculate mean value for each raster and convert output array to data frame

How do I calculate mean value for each raster and convert output array to data frame? r <- as.data.frame(cellStats(x,mean))
-1
votes
1answer
55 views

Calculate area for each polygon in R

I am working with a shapefile that has many polygons. How do I add one more field named "area_sqkm" and calculate area for each polygon in the shapefile?
2
votes
1answer
52 views

very basic question on extracting data from .tif raster layer in R- projection not in lat/long

I have data on N deposition in the US, which can be found in a .tif file from a zipped directory, which can be accessed here: nadp.sws.uiuc.edu/maplib/grids/2006/TotalN_dep_2006.zip. I loaded the ...
0
votes
0answers
39 views

Crop raster files when importing with readGDAL from DB

I have quite a lot of raster files stored in a PostgreSQL DB. Each of them has around 200MB and is representing EU-wide data. However I only need the the rasters to cover the area of Germany. I'm ...
0
votes
2answers
44 views

Add information from a raster nc-file to a polygon shapefile

DATA Download from this website the following ZIP file: NUTS_2006_60M_SH.zip and save all the NUTS_RG_60M_2006 files. In what follows I refer to this as "NUTS3 regions". Download from this website ...
1
vote
1answer
233 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 ...
0
votes
2answers
49 views

hdf files in GDAL throwing an error in R gdalinfo

I am having issues using some modis hdf files in R. Working on Windows 10. I had a previous question where gdal wasn't working but I think I have resolved that. I tested with existing tifs and they ...
0
votes
1answer
47 views

Is there a spatial gradient in my data

I already posted the question here, but I thought that maybe it is a question for GIS as well. I have a grid with densities of one animal and would like to find out if there is a spatial gradient in ...
3
votes
1answer
225 views

Loop to check multiple polygons overlap in r

I have a set of polygons (available here: http://ulozto.cz/x39ELbFt/polygons-zip) created in QGis and processed in R. I would like to know if they are overlapping or not, and if yes, where is the ...
4
votes
5answers
4k views

Reproduce raster with same extent, and same number of columns and rows?

I have two raster A and B. A and B have the same grid size but different extent. How can I make A have the same number of columns and rows, as well as the spatial extent of B?
11
votes
4answers
3k views

Increasing speed of crop, mask, & extract raster by many polygons in R?

I'm extracting the area and percent cover of different land use types from a raster based on several thousand polygon boundaries. I've found that the extract function works much faster if I iterate ...
0
votes
2answers
449 views

Really slow extraction from raster even after using crop?

I have a large raster file (245295396) cells and stacks of rasters having 4 layers each which lie in the extent of this large raster. To start with I am trying to get value from one stack (3 channels) ...
26
votes
2answers
17k views

How can I convert data in the form of lat, lon, value into a raster file using R?

I have a data set of values over a km grid in the continental U.S. The columns are "latitude", "longitude", and "observation", e.g.: "lat" "lon" "yield" 25.567 -120.347 3.6 25.832 -120....
0
votes
2answers
144 views

Extracting a large layer from NetCDF using R

i am trying to extract specific data from an .nc file my nc file has the following variables hur-relative humidity lat-latitudes lon-longitudes time-time plev-pressure levels so i ...
2
votes
3answers
112 views

GDAL error in R path.expand(path): invalid 'path' argument

Using windows 10. I would like to stick to using R since that's where a lot of my pre-processing and analysis will take place for a bigger project. I have downloaded a number of MODIS files for the ...
0
votes
1answer
279 views

How to download the MODIS data from R using MODISTools library

I want to download MODIS product MOD13Q1 to use the Scientific Data Sets (SDS) layers of "250m_16_days_EVI", "250m_16_days_pixel_reliability". MODISTools library in R software provides the capability ...
0
votes
1answer
32 views

Plot in rstudio a NetCDF File - latbox by lonbox

I have two NetCDF-Files. One of them holds information about the temperature in 2m (t2m) , the other one about outgoing long wave radiation (olr). I want to make a scatter plot. The first part of this ...
2
votes
3answers
918 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from accumulation;")...
0
votes
2answers
62 views

Copy resolution extent CRS metadata from one raster file to another using raster R

I have two geotiff raster files, one has all the metadata information and in the other the information was lost. I know that all the metadata information was exactly the same so I want to copy it from ...
0
votes
1answer
31 views

Raster time series smoothing package using R

Does somebody knows if exist a package in R specifically for raster time series smoothing? I´m using aproachs like this one (using the equation suggested by Hamunyella et al., 2013) for (i in 2:(...
0
votes
0answers
24 views

Pixel based 10 year NDVI time series

I would to do pixel based 10 year NDVI time series analysis using MODIS data. I’ve 3 seasons in a year. Should I average all values in the study area per season?
1
vote
1answer
35 views

Running QGIS Python code from the R rPython package

The following script works fine from python or ipython at the command line: from qgis.core import * from qgis.gui import * import sys sys.path.append("/usr/share/qgis/python/plugins") from PyQt4....
1
vote
0answers
45 views

Resample raster to lower resolution

I am trying to resample a forest cover raster with high resolution (25 meters) and categorical data (1 to 13) to a new RasterLayer with a lower resolution (~ 1 km). My idea is to combine the forest ...
1
vote
2answers
55 views

Can I extract circular buffers from polygon layers?

I have been working in QGIS with a large and detailed shapefile where remaining forest fragments are represented as polygons. I would like to extract circlular buffers, of various radii, from this ...
1
vote
1answer
15 views

How do you write classify that you are using a time varaible in R?

I am using R. I am including time as a co-variate in my model. 10:30, 11:56, 12:00 etc Is there a way to tell R that my values are time measurements?
0
votes
0answers
26 views

Checkbox using PlotGoogle Maps in R

I want to introduce checkbox in my map when I plot it using PlotGoogleMaps Package of R. My data set (LatLng) consists of points classified on the basis of vehicleID. I want a checkbox such that ...
1
vote
1answer
188 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: library(maps)...
0
votes
2answers
25 views

R: Overlay using functions containing if/else statements

I have two rasters, x and y, and I'd like to do calculations with them using the overlay function. For example, MyFun <- function(x, y) x * y res <- overlay(x, y, fun = MyFun) This seems to ...
1
vote
0answers
103 views

Matching vertices in igraph (R)

I'm currently using a combination of ArcMap 10.2 and igraph in R to analyse a network with associated data. I have an igraph network object based on the OS ITN network with associated TOIDs for each ...
0
votes
0answers
14 views

How to perform an anisotropic Elliptical Inverse Distance Weighting (EIDW) interpolation in R?

River bathymetry is generally more variable in the transverse than the streamwise direction, so I need to use anisotropic interpolation technique like Elliptical Inverse Distance Weighting (EIDW) (see ...
0
votes
1answer
23 views

Subset of lines that are within polygon in R

I have a large SpatialLinesDataFrame (~23000 features) and a SpatialPolygonsDataFrame (8 features). I want to make 8 new variables, each with the lines that are on the same locations as the polygons. ...