Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
1answer
126 views

Interpolation with netcdf4 file

I have a netcdf4 data set that contains array and information about latitude and longitude which can be accessed with the following R command: ncvar_get(dataname, 'lon'); ncvar_get(dataname, 'lat'); ...
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
1answer
26 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 ...
0
votes
2answers
54 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 ...
3
votes
1answer
100 views

Spatial Classification

I am not sure what to call my problem. From this image, I have a set of classified polygons (colored). I would like a way to classify the white polygons in the image. I don’t have any attributes to ...
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 ...
2
votes
3answers
107 views

How to analyze and combine overlaping elevation maps into one?

I have 30 overlapping maps that contain tree density heights (measures between 1-100%) of a large area, and I need to get the highest point by pixel and create a new map with all these highest points ...
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 ...
4
votes
2answers
121 views

join grid or polygon layers in R

I have two grids. Cells in each grid have an attribute. Size of grid cells differs between the two grids and the two grids do not overlay each other perfectly. I would like to create a new layer, ...
1
vote
1answer
46 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 ...
1
vote
0answers
50 views

Display followers count on Google maps using R

How can I plot the count of followers, locations wise on google maps - Im using R language my data is as below: for(i in 1:25){print(friends_obj[[i]]$location)} [1] "London & Glasgow/Edinburgh, ...
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 ...
2
votes
0answers
79 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 ...
0
votes
1answer
78 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
110 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
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 ...
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 ...
11
votes
2answers
2k views

How to efficiently read a kml file into R

Hi I'm working with huge .kml files (up to 10 Gb) and need an efficient way to read them into R. Until now I've been converting them to shapefiles via QGIS and then back into R with readShapePoly and ...
4
votes
1answer
94 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
1answer
53 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 ...
10
votes
5answers
4k views

How best to fix a non-noded intersection problem in PostGIS?

I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
0
votes
1answer
96 views

Conducting geographically weighted regression on a raster

I have a relatively big raster file on which I want to conduct geographically weighted regression. Size of raster ~ 2 GB and number of rows is around 100,000 One way might be to convert from raster ...
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 ...
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
53 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
134 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
50 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
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 ...
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
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 ...
0
votes
2answers
717 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. ...
39
votes
10answers
5k views

What is the most useful spatial R trick?

R is becoming pretty strong tool for handling and analyzing spatial data. I learned some useful things through questions like these at SO and thought it might be useful to have something simmilar, but ...
2
votes
0answers
75 views

python equivalent of spatstat's spatial point process functions

Is there a free python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if ...
14
votes
2answers
2k views

Performing Raster Noise Reduction and Edge Smoothing?

I have a raster image like this I want to delete the isolated noise point and smooth the edge (say the white single points, and I want the edges of the entity look smooth). How can I do this in ...
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
1answer
45 views

How to compare multiple spatial point patterns over a polygon

I have multiple point pattern distributions over the same region/polygon. Each point pattern distribution has different number of points. Here is an example of two spatial point patterns for the ...
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. ...
2
votes
1answer
129 views

Running Random Forest Classification on WorldViev-2 image in R - problem

I have a problem with performing RF in R for a WorldView-2 Scene. I've never ever before used R for remote sensing classification, so I simply followed what is written here. I've loaded scene (8-band ...
2
votes
1answer
41 views

changing attributes or names of shapefiles

I am trying to join a subset of two similar shapefiles, one with states from the US and the second with provinces from Canada. The datasets are available here: shapefiles from Geocommons I noticed ...
2
votes
0answers
27 views

In R, set NA cells in one raster where another raster has values

I have two rasters in R. I want to set values to NA in the first raster where the second raster has values. I think this should be simple, using the raster package, with two RasterLayer objects ...
2
votes
0answers
71 views

R - how to create a pre-determined number of identical square polygons to use for a choropleth map?

I am trying to plot crime data density (again!) over a city map, say of NY. As a well known problem there are plenty of examples on this ...
1
vote
1answer
129 views

Apply r.neighbours or Neighbourhood analysis (LecoS plugin for QGIS) to 3000 rasters

I need to apply r.neighbours or Neighbourhood analysis (QGIS plugin LecoS (or equivalent) to 3000 rasters and define a neighbourhood of 5 x 5 and calculate the mean. I suppose I need to create a ...
0
votes
2answers
51 views

Transform coordinates from NOAA

I use data from NOAA for some analysis in R and I want to transform coordinates to EPSG:54004 or something useful. There is something what they write about their coordinates. ... POS: 29-34 ...
0
votes
0answers
35 views

How to crop an image into more than 80 small sections automatically in R

I'd like to crop an image into 15 sections in R. The image projection is Geog lat/long, extending 87 to 120 degree in East and 45 to 55 degree in North. I want to separate it by every 2 degree. So I ...
1
vote
0answers
36 views

Error with “lowess” function in R

I have a problem with lowess function to smooth NDVI as a time in R. Here is the scripts I run: #Create a time vector to act as x time<-sort(sample(97:297, nlayers(ndvi2000crop1))) ...
0
votes
0answers
34 views

Sextante and qgis for hotspot analysis

I want to analyze time series data for hotspot analyis. May i know whether sextante and qgis are able to generate any spatial statistics similar to Getis-O-ord in ARCGIS.Or R is required for hotspot ...
2
votes
0answers
85 views

Decision tree classification of satellite image in R

I want to classify satellite image in R using RWeka classifier, J48. I have a CSV file with the classes required, and raster data loaded in R. I am able to make the tree, however, I am not able to use ...
1
vote
0answers
49 views

Is there any issue using R scripts with sextante processing framework?

I want to use R scripts from the module Sextante treatment QGIS , but I have many difficulties to configure the module in Sextante . Following the procedure described in the official documentation of ...
1
vote
0answers
30 views

Lagrange Multiplier in lm.LMtests (spdep package for R)

Are the Lagrange values comparable in lm.LMtests? If both RLMerr and RLMlag are significant, would the test with the largest Lagrange value be considered 'better' at explaining the spatial ...