Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
27 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
38 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
48 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
56 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
190 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
106 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
1answer
24 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
0answers
23 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
11 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
136 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
63 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
60 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
45 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
41 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
27 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 ...
10
votes
1answer
399 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
35 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
33 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
40 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
10 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
45 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
78 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
50 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
73 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
1
vote
0answers
29 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 ...
0
votes
0answers
32 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
84 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
63 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),...
0
votes
2answers
42 views

R - Easy way to reproject an extent object

I have an extent object that I would like to re-project to lat and lon. >outer_extent outer_extent class : Extent xmin : -5559753 xmax : -4447753 ymin ...
1
vote
2answers
514 views

How to open and plot Globcolour chlorophyll image in R?

Level 3 globcolour chlorophyll images (download from hermes) are in netCDF format. Those files can be imported via ncdf package to R 3.1. ch.nc = open.ncdf("E:/Data/globclour/L3b_20140101-...
0
votes
0answers
71 views

R-Studio0.99, How to compute correlation between two rasters and serial correlation

I am using R.Studio0.99 version installed on my HP Laptop 4th generation (8GB RAM) windows 8 operating system and I know how to use R studio and some of the library to incorporate spatial data (raster,...
0
votes
1answer
125 views

Clustering of Spatial Data in R or Python [closed]

I am new to GIS. Problem Domain :- I have a stoppage data of different vehicle i.e. the point where vehicle stopped.There are some specific vehicle which stops at some particular point. So, I am ...
0
votes
0answers
41 views

What's the relationship between NetCDF dataset and ncdf4 class in R

I want to process ERA reanalysis data in R so I install RNetCDF package and ncdf4 package.When I open my reanalysis file using open.nc() and nc_open() functions separately in two packages, I found my ...
5
votes
1answer
120 views

Weighted zonal statistics in Python and/or R

I have raster files with precipitation data (4x4 km), monthly, for about 100 years. I have a shapefile for a watershed (which includes several polygons as sub-basins). I need the average precipitation ...
2
votes
1answer
815 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 ...
0
votes
0answers
12 views

Using errorsarlm with two different listw objects

i am trying to estimate some spatial error models with "errorsarlm" from the spdep package. In my first regression everything is fine: sreg <- errorsarlm(map@data$avginc ~ I(as.factor(map@data$a)),...
1
vote
1answer
39 views

“Hole” argument ignored in call to Polygon function

I am working with a dataset consisting of a list of coordinates for a set of polygons. Some of these polygons are holes. However, the dataset does not follow the convention of listing the coordinates ...
3
votes
1answer
56 views

Plot a world heat map with mollweide projection in R

I have a data set with global observations with lat/lon information. There are 288 longitudes from -179.375 to 179.375 with spacing 1.25, 180 latitudes from -89.5 to 89.5 with spacing 1. There is one ...
0
votes
0answers
22 views

Identify adjacent and no-adjacent polygons between multiple shapefiles using R?

My spatial data are recorded multiple years, providing one polygon for a year. (Polygon is derived from raster data, so I can use rasters instead if it will be easier to run my calculations). I ...
1
vote
0answers
21 views

raster::intersect not producing expected results

I am having trouble with R's raster::intersect method. I give intersect a SpatialPolygonsDataFrame and SpatialPoints as documented in the raster reference manual (p. 111). The result acts like it ...
2
votes
1answer
429 views

Unable to access R from QGIS 2.4

I have been unable to run R from within QGIS on my computer. I have R version 3.03 installed and QGIS 2.4 on Windows 7. R is located at C:\Program Files\R\R-3.0.3\bin\and this is the path e specified ...
5
votes
4answers
201 views

How to speed up raster to polygon conversion in R?

I've decided to process my Landsat data in R instead or ArcGIS - due to my missing knowledge of python and and because of (assumed) high computation capacities of R. I want to : import r1 raster to ...
2
votes
1answer
56 views

Getting long-lat coordinates from NARR LCC-gridded data using raster and rgdal in r

I am studying migration ecology of sea ducks on the Atlantic coast of North America. In my analysis, I require substantial environmental data over a large geographic range for the past 15 years and ...
0
votes
0answers
14 views

MODISTool R Error: Can't call method “prepare”

I have already used Modistool in R a few times, but lately I am facing the following error while using the function GetProducts(), GetBands(Product = "MOD13Q1") MODISTools::GetProducts() Error in ...
0
votes
0answers
53 views

R Levelplot overlaying two SpatialPolygonsDataFrame on a RasterLayer

I'm having some trouble plotting a RasterLayer and a SpatialPolygonsDataFrame in a level plot in R. Something is wrong with the projection, but I don't manage to understand what. Here you can find my ...