Statistical computing language and software environment.

learn more… | top users | synonyms

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 ...
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
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 ...
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 ...
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
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
0answers
44 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
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
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 ...
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. ...
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 ...
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 ...
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
135 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 ...
3
votes
1answer
56 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 ...
0
votes
1answer
62 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 ...
0
votes
0answers
21 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) ...
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 ...
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
34 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
42 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
1answer
39 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
9 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
0answers
32 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
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
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
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 ...
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
27 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
79 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
59 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
0answers
40 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 ...
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)),...
0
votes
2answers
40 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 ...
0
votes
1answer
119 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
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,...
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
0answers
21 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
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
53 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 ...
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 ...
0
votes
1answer
42 views

Writeogr to PostgreSQL/PostGIS database with R

I'm producing some Spatialpolygondataframes with R that I would like to upload to my PostGIS Database. I've found out that the way to do this is via the writeOGR() function using the PostgreSQL driver....
1
vote
1answer
39 views

Spatial correlograms for binary raster?

I have binary raster data (deforestation hotspot or not) that I would like to plot spatial correlograms for in R, to look at spatial autocorrelation over different spatial lags. I came across this ...
2
votes
1answer
54 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 ...