Tagged Questions

Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
1answer
43 views

(R)SAGA: saga_cmd 2.1.0 error? inconsistency?

frequently I am using (R)SAGA, but after SAGA became >2.1.0 the R package is no longer working. The last update for RSAGA was 07/2013. Thus I downgraded SAGA to 2.1.0 (first try was skipping the ppa ...
2
votes
1answer
28 views

How to read ASTER metadata in IDL?

I'm trying to read many ASTER images (1B mainly) in IDL (I can try in R also). I'm used to work with Landsat, but the aster metadata is complicated. I write a code with a lots of conditional that can ...
2
votes
1answer
71 views

Are there examples of high-level interfaces to NetCDF

The R raster package and GDAL both have independent wrappers around NetCDF-4* that treat an array variable as a "complete" dataset, i.e. they provide objects or interfaces that seamlessly give access ...
4
votes
0answers
48 views

Classical or robust variogram for incorporation into generalized linear model

I'm modeling counts of organisms over time at eleven locations. I'd like to account for temporal autocorrelation in the counts, assuming it's present. As the data are not equally spaced in time, ...
1
vote
0answers
81 views

What's the difference in these two shp files?

I'm trying to plot points on these maps in R, with points from "Coordinates" in the same folder. The WL.shp plots fine with the data, but the NG.shp (which should only be larger and of the same area ...
0
votes
0answers
32 views

Neighbours list extracted out of polygon regions

I've got a SQL database which contains some coded polygon structures. Those can be extracted as follows poly <- data.frame(sqldf("SELECT ST_astext(geometry) FROM table")) The data.frame 'poly' ...
1
vote
1answer
93 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
27 views

Calculating average raster values around set of points using ArcGIS for Desktop (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
75 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 ...
3
votes
1answer
86 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) ...
1
vote
0answers
127 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
112 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
110 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
26 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
36 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
1answer
74 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
39 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
49 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
47 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
96 views

How to determine in which grid cell 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 ...
3
votes
2answers
101 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 ...
4
votes
1answer
110 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 ...
1
vote
1answer
74 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
2answers
111 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
2answers
134 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
80 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
90 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
46 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
44 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
82 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
154 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
114 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
37 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
138 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
48 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
78 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
98 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
94 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
28 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
137 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
36 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
62 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
68 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
60 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
21 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
193 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
118 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
1answer
105 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 ...
2
votes
1answer
180 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 ...