Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
1answer
17 views

R giving error when attempting map algebra

I'm trying to manipulate some downloaded rasters using R, and keep getting the same error when I try to do any type of map algebra. The example below uses a raster file downloaded from ...
1
vote
0answers
18 views

How to calculate average raster values around a set of points (ArcGIS or R) [duplicate]

I have a 30-m elevation raster as well as a set of points that overlay the raster. For each point, I want to calculate the average elevation within a 5-km radius of the point. One way I was ...
3
votes
1answer
44 views

How to create randomly points within polygons for each row of a dataframe matching a Polygon ID with R

My question is similar to this post, but because there are no "perfect" answer and above all no reproducible example I open this question. I have a "SpatialPolygonsDataFrame" and a data frame. Both ...
2
votes
1answer
32 views

Projection mismatch when plotting precipitation with ggplot

I'm trying to plot accumulated precipitation in Brazil for a given period, see code below: Load packages library(raincpc) library(SDMTools) library(raster) library(ggplot2) library(rgdal) ...
0
votes
0answers
39 views

NAs not allowed error message in attempt to plot raster object in R

I have imported a clipped raster (performed in ArcGIS 10.1) from the National Landcover Dataset into R, but when I try to plot I get the following error message. Error in .readCellsGDAL(x, ...
2
votes
0answers
55 views

Doubts with Ripley's K function Interpretation

I'm a self-taught person, I'm studying the K Ripley's function and I would need some person who give me some advices. First, I have written a little script of R in QGIS processor: ##Point pattern ...
0
votes
1answer
53 views

Reproject MODIS level 3 chlorophyll data using gdal

I am trying to reproject MODIS Level 3 chlorophyll data (for instance, this file) using gdal in R. I used gdal_translate and gdalwarp functions. There was no crs information associated with ...
1
vote
1answer
19 views

R SP library: identicalCRS and parameters in different order

The following returns FALSE: library(sp) points <- matrix(rnorm(30, 50, 10), ncol=2) proj1 <- CRS("+proj=utm +zone=10 +datum=WGS84 +ellps=WGS84 +units=m +no_defs +towgs84=0,0,0") proj2 <- ...
3
votes
0answers
25 views

Spatial interpolation with breaklines in R

I have a dataset consisting of irregularly-spaced points (x,y,value) that represent an area of ocean that contains some land. I need to interpolate these to a regular grid, ensuring that the ...
0
votes
0answers
21 views

Cannot properly import MODIS MOD07_L2 .hdf files into R using rgdal

I've been trying to accurately import and process some .hdf files from the MODIS Atmospheric Profile product (MOD07_L2) in R for several days now. Still, there's something going wrong during data ...
1
vote
0answers
11 views

R{raster} getValues(): error accessing values of large raster

I am getting the following, while extracting all values with: rs<-getValues(rster) Error in getRasterData(con, offset = offs, region.dim = reg, band = object at data@band): long vectors not ...
2
votes
0answers
32 views

R: Can raster predict function pass to predict.rfsrc (a prediction function in a parallel verion of RandomForest)?

It seems that raster predict function can pass to predict.randomForest by setting the "type='response'". I am using a parallel version of randomForest package called the "randomForestSRC" and I am ...
0
votes
2answers
24 views

How to find variable names for SF1 Census files

I'm trying to to read the 2010 Census data so that I can link some of my research data to geographic information. Ideally I would like to use census tract data and other covariates. I've downloaded ...
2
votes
2answers
51 views

How to determine in which grid cell where each coordinate of an x,y series is located?

I have a circular arena which I have divided into a number of equal-sized 'cells' using a grid-like arrangement of concentric circles and line segments (in grey below) and also a series of x,y ...
2
votes
1answer
47 views

Display two-dimensional color gradient for two different quantities

I have two overlapping raster layers. One contains quantity A from 0 to 100, and the other contains quantity B from 0 to 100. I'd like to create a map displaying both sets of data at once based on a ...
3
votes
1answer
55 views

How to mosaic rasters in R?

I am trying to mosaic several rasters into single big raster in R. Using script that posted in http://stackoverflow.com/questions/15287807/how-can-i-create-raster-mosaic-using-list-of-rasters But, I ...
0
votes
0answers
34 views

How do I convert a .bil (and associated .clr, .blw, .hdr, and .stx) files into georeferenced rasters in R? OR to geotiffs using gdal_translate?

The title says it all. I've got a bunch of .bil files, which I can open in R using the raster command pointed to the path to the .bil file. But I don't know how to efficiently incorporate the ...
0
votes
1answer
52 views

projection conversion from mercator to google maps format

Is this spTransform(Finland3, CRS("+proj=longlat +ellps=WGS84 +no_defs+ellps=WGS84 +towgs84=0,0,0 ")) the right way to project a shapefile with this projection coord. ref. : +proj=merc +lon_0=0 ...
2
votes
1answer
107 views

Wrong projection high quality shapefile for the coastline of Helsinki region (Finland)

I did some spatial interpolations in R and I need a support for those. Looking for shapefiles online the best I could find was and it looks really horrible, the same area in ggplot looks like . I ...
3
votes
1answer
46 views

Map accuracy assessment by moving window in R

I would like to make an accuracy assessment using a confusion matrix between classified Landsat image and reference dataset. Maps have the same resolution and extent. I would like to evaluate the ...
0
votes
0answers
13 views

plot shp files like pnm? (Statistical Data Analysis Explained example) [duplicate]

Weird subject? well I'm confused so in advance: sorry for this wavy question: I'm trying to do what the authors of Statistical Data Analysis Explained (ISBN: 978-0-470-98581-6) have done in figure ...
1
vote
2answers
67 views

2 shape files plots together in a GIS, but not in R

I tried plotting these two files and a set of points (dropbox folder) in QGIS and MapInfo. They align pretty good (not perfect though). But in R, only the data from www.naturalearthdata.com can plot ...
0
votes
0answers
35 views

MapInfo “shape” file vs. naturalearthdata.com shape file

When i load this map shape file (exported from MapInfo as a shape file) shp.WashingtonLand<-readOGR("C:\\...\\Maps","WLmap2_polyline") R replies: OGR data source with driver: ESRI Shapefile ...
0
votes
0answers
38 views

Calculating tortuosity

I have the geographic locations of a species of fish over a period of time but want to assess how complex its movement path was. How do you calculate fractal tortuosity, or tortuosity via other ...
6
votes
1answer
55 views

Simplest way to limit the memory that the raster package uses in R

What's the easiest way to limit the memory the raster package uses in R to 5GB of RAM? Ideally I want any raster that exceeds this size to be written to the hard drive and analysed from a temporary ...
1
vote
1answer
53 views

Step-by-step: How do I extract Raster values from Polygon overlay with Q-GIS or R?

I am writing my master thesis at the moment and am having the exact same problem as user Curley in this question: I first need to overlay a Corine 2006 raster with a polygon layer (2638 polygons). ...
1
vote
1answer
71 views

plotting a map of north greenland in R

My knowledge in GIS and R is again tested when I want to map a small part of northern Greenland (called Washington Land) in R (and plot analysis data on top later). I've managed to plot it with ...
1
vote
1answer
27 views

Remove points within x distance

I have these spatial points: long <- c(-1.769717, -1.767766, -1.769170, -1.768462, -1.768389) lat <- c(54.92214, 54.92207, 54.92113, 54.92167, 54.92165) points <- data.frame(long, lat) ...
0
votes
0answers
62 views

R plot raster with real colors

I'have a raster image from Scran25 IGN. In Qgis, it opens perfectly but in R (with rgdal or raster packages), I do not know how to keep the original colors like this exemple? I have tried ...
0
votes
0answers
26 views

Chloropeth Map in R, Data on map not represented as in listed in the file

Below is the code for creating the Chloropeth Maps, once created, the actual problem is that the heat intensity indicated by the map is not according to the dataset column called value mentioned in ...
0
votes
1answer
38 views

How to do supervised image classification in saga with the help of R script or Python script

I am using Ubuntu 12.04 and want to do image classification in SAGA. SAGA has numerous classification algorithms which is not present in GRASS and QGIS. I am new to SAGA, but more accustomed to work ...
0
votes
2answers
64 views

Error in which.max() : not yet implemented for large objects in R

I am going to create raster by Julian day that observed maximum value of NDVI within a single year. Actually, I want to know which julian day (or raster) has max value in each cells and get result by ...
0
votes
2answers
68 views

How to create raster map by day that observed maximum NDVI from multiple raster data in R?

I have 11 NDVI raster data, representing single summer. I want to create raster by day (Julian day or name of raster) that observed maximum value. In other words, I want to know which day (which ...
0
votes
1answer
21 views

Overlaid raster gets shifted around when printing to pdf or when resizing graphics device with mouse

I've spent the past couple of days learning how to use the maps, raster, and rgdal packages to create nice images, but I'm running into trouble when trying to make pdf's for actually presenting. I'm ...
1
vote
1answer
87 views

Color region polygons according to cluster label

I want to present data on a map of our country. I have used R for showing the clusters on a country! Here the steps I took: setwd('D:/r/cluster2') channel <- odbcConnectExcel('cluster.xls') data ...
0
votes
1answer
26 views

Creating a loop for Lines data (spatial data)

I am trying to build a lines shapefile with the contour lines from the 20 meters isobath from along the East African coast. This contour line of 20 meters has different segments and I have this ...
1
vote
1answer
41 views

Alternatives to bilinear interpolation for raster extraction in R

I have a set of coordinates for which I want to extract temperature values from a raster. I am using the extract function from the raster library in R. Looking at the interpolation methods, there are ...
0
votes
2answers
48 views

Is it permissible to redefine raster resolution (not resample!) in order that it be included in a SDM?

I'm fitting a SDM using R. A requirement is that all environmental predictor layers have the same extent, origin and resolution. I have high resolution bathymetry data (25m) that I will resample to ...
1
vote
1answer
45 views

Bounding geo points

I am kinda new to geo data processing. For my sample project I am trying to solve next problem. I have array of geo points. If we place it on plot we can visually see that there are areas where ...
0
votes
0answers
20 views

Overlay Shapefile and Raster layer in R [duplicate]

I have a raster layer with climate data from the north of Mexico, part of Canada and the US mainland. I am trying to restrict the climate data to only the zone of the US mainland. To do this I thought ...
3
votes
2answers
102 views

How to automatically draw lines with a given angle from one single point in qgis 1.8?

I'm new to qgis so please be patient. I need to draw a bundle of lines all originating from the same point and with a 10° angle between each line (e.g. lines bearing at 0,10,20 ..90..110..220..350). I ...
2
votes
0answers
54 views

Three-dimensional interpolation of temperature profiles using gstat in R?

I'm working on a problem in which I'd like to interpolate a set of oceanographic temperature profiles over a three-dimensional matrix of unsampled x, y, & z locations. The data to interpolate is ...
6
votes
0answers
68 views

Competing approaches to line & polygon simplification

There seems to be a few theoretical options around at the moment for geometric simplification. Douglas–Peucker seems the most established, followed by Visvalingam's approach (used by d3.js). Now ...
1
vote
1answer
81 views

NDVI time series in R — how do I create a time series object from a data frame?

I am doing a time series analysis of NDVI using the bfast package in R. Bfast requires a time series (TS) object. I have successfully created a data frame with the NDVI at various point locations ...
0
votes
1answer
85 views

Interpreting Moran's I results

I have a sample of data taken from regions of a country! i want to test if there are any spatial autocorrelation on my data using Moran Indice test. the null hypothesis: is that there is no spatial ...
0
votes
1answer
58 views

How can I take a large netcdf and convert it to interpolated values in a different set of coordinates?

I've got a large netcdf (a small portion of the data is here) with the data in an even grid associated with an Albers Equal Area Conic projection. I've got the corresponding latitudes and longitudes ...
1
vote
1answer
38 views

assigning census block demographics to postal data (zip/zip+4)

Using Python and R, what would be the best strategy to tie Census Block-level data to zip/zip + 4? I understand we're not matching polygon boundaries (zip codes are not geographies), but somehow ...
0
votes
0answers
14 views

Plotting two shapefiles using R? [duplicate]

I'm not familiar with using R for GIS. I was wondering if you can help me figure out how to plot different shapefiles at the same time. I'm using the "map" function to generate a map in order to get ...
1
vote
1answer
52 views

Is there a way to write single bands raster from multi-band layer faster in r?

I have 1000 multi-layer rasters and have to export each separate layer to a tif. Some friends recommended R to do the job. I used the following code: library(raster) namesVector<- c("layer1", ...
2
votes
1answer
34 views

R - Occasional error when using alphahull package areaahull() function

I've recently started using the fantastic alphahull R package, which works beautifully most of the time but occasionally I am getting the following error when running the areaahull() function: Error ...