Statistical computing language and software environment.

learn more… | top users | synonyms

4
votes
1answer
72 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
0answers
45 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
69 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
116 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
58 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
77 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
40 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
40 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
66 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
85 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
88 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
31 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
70 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
34 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
56 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
73 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
75 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
27 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
110 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
30 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
48 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
55 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
49 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
134 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
80 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
85 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
126 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 ...
1
vote
1answer
111 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
80 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
44 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
67 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
35 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 ...
2
votes
1answer
56 views

How to batch generate thumbnails of raster layers with R?

I have been using R to maintain a rather large stack of raster layers (over 700 layers of data for sub-Saharan Africa). Each layer looks as follows ...
0
votes
0answers
20 views

Spatio-temporal Overlay

I have a SpatialPointsDataFrame that lists satellite-detected fires (firesutm), including location and date. I also have a SpatialPolygonsDataFrame with county boundaries (countyutm). I would like ...
1
vote
1answer
81 views

Automating Intersect between two polygon layers

I have a spreadsheet that has county-level occurrences of around 1000 species within the US in the column headings (Species State County). Thus, for some counties there may be multiple species. I ...
4
votes
1answer
95 views

Specifying Bayesian Spatially lagged dependent (SAR) variable regression in winBUGS or Stan

I have been looking for code example on how to specify a SAR spatially lagged dependent variable regression in winBUGS (geoBUGS) or, if possible, in Stan. I mean, something of the format: Y = beta_0 ...
2
votes
0answers
75 views

Ecoregions shapefiles: subsetting, extracting and summarizing data from raster

I am attempting to subset and project an ecoregions shapefile from : EPA ECOREGIONS my data set is found here: SHAPEFILES and RASTER When I run this code, two major problems occur: 1) I cannot get the ...
0
votes
1answer
54 views

Want to get an SHP file for my coutry Algeria

H everyone , i'm running a clustering test on my country with R, but the problem the clustering doen't look good because of the map i have, i hant to get a bigger map of my country 'ALGERIA' in an SHP ...
1
vote
1answer
137 views

Creating grid polygons from coordinates using R or Python

I have locational data with north-south and east-west coordinates, with a resolution of 100 meters squares. Each data point's location is somewhere within the 100 meters square which centre is given ...
0
votes
0answers
27 views

R equivalent of GRASS r.grow?

What is a good R equivalent of the GRASS function r.grow? The closest I've been able to find is the script suggested by whuber in response to Creating randomly shaped clumps of cells in a raster from ...
0
votes
0answers
51 views

how to compare multiple time series of raster files

I am looking for the best way to compare the spatial patterns of multiple time series composed of many raster files, in R. The cell values of each raster is continuous, and I am comparing time series ...
0
votes
2answers
781 views

Return column number of min value in dataframe [closed]

So as a result of a bunch of preceding calculations I end up with a dataframe of varying numbers of rows and columns. I want to find the minimum value of the df and return the row and column index. ...
0
votes
0answers
26 views

Performing Mutiple Correspondence Analysis (MCA) using R?

I want to apply MCA (multiple correspondence analysis) to a data table containing regions as individuals, and INFESTED AREA as variable and degree infested also and the type of trees infested , and I ...
1
vote
0answers
67 views

Performing Moran Test using R? [closed]

I’m very new to R so please Bear with me: I have a set of data containing AREA Infested for each region ! and I want to know if there are any spatial autocorrelation between the regions! Here a sample ...
0
votes
0answers
30 views

Applying Spatial Clustering test using R? [duplicate]

I’m very new to R so please bear with me: I have a set of area infested by a disease (AIS) annually data and I want to apply some cluster methodology to detect regions with similar (AIS) patterns. I ...
0
votes
0answers
31 views

glm with raster data: species decline~ ndvitrend

I have species decline data (number of population per year, over a period of 23 years) out of ndvi data for these 23 years I calculated the trend, and mapped it. now i'd like to relate the negative ...
1
vote
0answers
22 views

Finding the best way to prepare raster image for a function in R

I'd like to ask what is the best way to prepare big raster images in R to run a function on whole images. I have 30 tiff images with the size of ncol=12648, nrow=4144. I read them in R separately. ...