Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
9 views

Variogram using R

I am trying to calculate a variogram for a raster dataset (.h5) using R. I have imported all the required libraries but trying to import the data itself keeps giving me a "not found" error. Anyone ...
0
votes
2answers
123 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
60 views
+50

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
254 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
12 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
884 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
57 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
21 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
25 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
16 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
22 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
21 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
51 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
14 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
23 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 ...
3
votes
2answers
184 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. ...
1
vote
1answer
185 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
23 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 ...
0
votes
0answers
52 views

List of Files rename using R? [closed]

I'm trying to rename list of raster files using R, I used the following script which worked just fine: "D:\\Modis_EVI\\Original\\EVI_Smoothed\\" setwd("D:\\Modis_EVI\\Original\\EVI_Smoothed\\") ...
1
vote
0answers
94 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
10 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
20 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. ...
0
votes
1answer
40 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 ...
0
votes
0answers
20 views

How to use osmar behind a proxy?

I've been trying to use osmar behind a proxy without success. Here is the test code : require(osmar) api <- osmsource_api() box <- corner_bbox(11.579341, 48.15102, 11.582852, 48.1530) ...
0
votes
0answers
7 views

Loop Quality layers of Modis in R

I want to parse quality layers of Modis MOD13Q1 in R. I´m using a code from another question here! and it works fine, but i want to loop it for 300 files. I grouped them in stack of rasters and tried ...
3
votes
1answer
116 views

Extract river polygons from DEM

I would like to use DEM to extract a river network but I don't want to use the polylines. Is it possible for me to extract polygon (or raster) rivers from DEM? I'm using both ArcGIS 10 and R. If ...
0
votes
1answer
48 views

Don't understand error : Error in if (nchar(projargs) == 0) projargs <- as.character(NA) :

When I run two different scripts from examples (which seem to work where I took them from) I get an error in both cases. Something seems to be wrong in my general set up or something. But I have no ...
3
votes
1answer
46 views

Random Forest out of the bag and confusion matrix

I have implemented Random Forest classifier to classify remote sensing data in R. The original code comes from here: How to perform Random Forest land classification? Everything works fine, but what ...
1
vote
1answer
35 views

R and osmar : the doc's example does not work for me, “Opening and ending tag mismatch”

I can't make osmar work anymore. I tried to reproduce the documentation's example, and even that produces a very long error code. I could not find the same error anywhere. Any idea ? The code is : ...
1
vote
0answers
39 views

Overlapping polygons in the same table/ layer [duplicate]

I have catchment areas as polygons in a GIS layer. They were derived from two different sources (coded as "ws" and "dr" in a separate column named "use"). It's good to have these two sources as they ...
2
votes
1answer
26 views

R, given a set of center points how to define the cell area? [duplicate]

I have the coordinates for the police stations in a city, they are grouped close together at the center and sparse towards the suburbs. Since I do not have the shape file for the jurisdiction of each ...
9
votes
1answer
340 views

Identifying overlapping time intervals with two more criteria in R?

I have to check birds observations made over a longer period for duplicate/overlapping entries. Observers from different points (A,B,C) made observations and marked them on paper maps. Those lines ...
1
vote
0answers
28 views

How to remove the Na values from a stack of rasters?

In R I have a stack (nsw.stack) which contains 6 variables. I have clipped the extent. However, When I look at the summary it appears that there is a lot of NA values (see below). I think this is ...
1
vote
1answer
22 views

Merge external table with GIS SpatialLinesDataFrame file in R for attribute table

I have a SpatialLinesDataFrame file named "Sldf" which lacks attributes for each line (see table of sample data below). I have a separate data.frame (from a .csv) named "fsub" with attributes that I ...
1
vote
0answers
31 views

Find and filter points within a variable radius

I have a set of projected spatial points (x,y,id,dist,value) that needs to be filtered. For each point I have to find the other ones falling within a variable distance. For each selection, I need only ...
1
vote
1answer
28 views

How to extract values from a raster stack within overlapping buffers?

In R, I have a raster stack with 6 variables. I would like to extract the mean and maximum value of each variable at 300 coordinates within a 500m buffer radius and a 1km buffer radius. In ArcGIS 10....
0
votes
0answers
6 views

When plotting a density map using predict what is the scale bar based on?

I am using the predict function in R to map species density. The resulting map using the plot function has a scale bar. Would I be right in saying that this is the abundance of a species per pixel? ...
3
votes
1answer
41 views

Chaotic geo image in R

I am working with qmap (R package ggmap) and when I enter the following code: qmap("Rotterdam", maptype = "terrain", zoom = 13) + geom_polygon(aes(x = long, y = lat, group = group, fill = ...
1
vote
1answer
74 views

Cutting a shapefile

I want to plot a figure with my data combined to an shapefile. However, at the moment I am not able to receive output yet since the data from the shapefile covers a larger area than my dataset. My ...
1
vote
2answers
49 views

Rpy2: how do I use the function 'as' (r library methods) in python?

I want to coerce an object of class Raster Layer to class SpatialPixelsDataFrame since that is required as input for the function autoKrige from the r library automap. However, when I try to use as ...
1
vote
2answers
71 views

Create a raster with ranges from another raster

I have a raster that contains values ranging from 1-180. I am looking for a way to create a new raster where if the values of a cell in the original raster is between 1-10 the new raster cell gets the ...
1
vote
0answers
13 views

max sum within a 200mt radius

I have a SpatialPointData Frame in R. Each point represents lat long and InsuredValue amount. I would like to find the maximum sum of insured value in a radius of 200 mt. How I can do in R
0
votes
1answer
31 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
0answers
21 views

Sub setting shape file to plot a region and addressing mismatch in ggplot & data

I am plotting India's district map with data (cases). First I read data for each district and district shape file. Later I merge the two on district. Using fortify data I get ggplot. I get a ...
-1
votes
0answers
27 views

Merge village level shapefiles by sub_district_ID to get a new shapefile using R

I am new to using R for manipulating shapefiles and need help with merging the areas inside the shapefile to a superset based on the sub_district_IDs and get a new shapefile.
0
votes
1answer
229 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 ...
2
votes
2answers
485 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
23 views

R - `rasterize` of polygon fails to properly take account of internal hole

I'm trying to use R to mask out a DEM raster using a polygon (loaded from a GML shape file) using the following code, where dem_modern is the raster and modern_land_shape is the vector polygon : # ...
1
vote
2answers
47 views

DBSCAN spatial clustering in R

I have file with coordinates X, Y of point objects in EPSG3301 coordinate system (that means it is in meters). I want to spatially cluster points. Here is my R code (dbscan package): db2 <-dbscan(...
2
votes
1answer
48 views

How a draw a circle (on the surface of earth) on a mercator projection?

I would like to use R and leaflet to draw a circle (a real circle on the surface of the earth) on a mercator projection. In the following code, I have the center of the circle (with lng=0 and lat=60),...