Statistical computing language and software environment.

learn more… | top users | synonyms

3
votes
1answer
81 views

Processing large amounts of Rasters in R

I have 6500 processed and clipped rasters that indicate snow levels on a daily basis in the northern hemisphere. I need to create a raster that represents a sum of the snow for the season. The winter ...
1
vote
2answers
62 views

Getting attribute table from WFS data source

I am attempting to get some WFS 2.0 INSPIRE data from the Finnish meteorological institute into a table format of some kind. Is there any software which can easily grab the attribute data for the WFS ...
2
votes
1answer
714 views

R - Dealing with missing data in SpatialPolygonDataFrames for Moran.test

I'm trying to use Moran.test on a SpatialPolygonDataFrame consisting of 7194 elements in R. I know that there is around 150 polygons with NA values. First I generate a spatial weights matrix: ...
1
vote
1answer
98 views

How to read feature class in file geodatabase using R?

I have a feature contained in a geodatabase that is larger than 2GB as an exported shapefile. I need to run an extract function in R to attribute the polygons with data from a raster file. Exporting ...
0
votes
0answers
32 views

Thin Plate Spline interpolation

I am completely new to spline interpolation, and I want to apply Thin Plate Spline using the fields package in R, and after I have applied Tps then do leave-one-out cross validation. This is how my ...
0
votes
0answers
39 views

How to reference to user input in SQL string in R?

I am building a R Shiny interface that queries the user input in Postgresql and generate the respective map layer. However, I am unsure of the syntax to include the query in the SQL string. my codes ...
1
vote
0answers
37 views

No output when rendering GeoJSON using Leaflet() package in RShiny

I am creating a Rshiny interface on that can take in the user input when a user click on a point on the map, query the user's selection from postgresql and return another map layer. The package I am ...
0
votes
0answers
56 views

How to convert a geojson from Postgresql to geojson format readable in rCharts in R?

I am creating a Rshiny interface on that can take in user input and SELECT the respectively map layer from Postgresql database based on the input. The package I am using to plot the map is rCharts. ...
2
votes
5answers
2k views

Counting road intersections and blocks

I have a shp file that consists of the road system of Mexico City. I would like to count the number of road intersections (crossings) and blocks (which I would define as a segment starting from one ...
0
votes
1answer
31 views

Compare two rasters in R with the cell value from one replacing the cell value from another

I am trying to create a single raster from two rasters. The first raster is made up of all 0 values and the second is made up of the current date value (formatted in days from 001 to 365). The problem ...
0
votes
1answer
19 views

Calculate mean for a each object of SpatialPointsDataFrame

I have a list with several SpatialPointsDataFrame objects, and each object has certain slots. How can I calculate the meann value of a certain slot for every object in the list, and then save that ...
0
votes
1answer
106 views

IDW in R with cross validation

I want to perform IDW interpolation using R, and more specifically, using the idw command from the gstat package. Also, I want to use the optimal number of neighbors (point locations) and distance ...
0
votes
1answer
42 views

GlobCover 2009 dataset - importing legend and colormap values into R

Does anyone know how to import a legend for a raster layer (loaded as a .tif) into R such that it can be attached to the raster file itself and used in plotting? In this case, I am using the GLC2009 ...
0
votes
1answer
70 views

Compare two rasters with raster overlay and replace cell value with variable

I want to compare 2 rasters and when there is a change from 2 to 1 create a new raster that replaces the cell where the change has been detected with the change variable. ## Finds Cells that have ...
6
votes
2answers
2k views

How to implement bivariate Ripley's K function in ArcGIS 10?

The attached image shows a forest gap with red pine represented as circles and white pine represented as crosses. I am interested in determining if there is a positive or negative association between ...
5
votes
3answers
2k views

Reproduce raster with same extent, and same number of columns and rows?

I have two raster A and B. A and B have the same grid size but different extent. How can I make A have the same number of columns and rows, as well as the spatial extent of B?
3
votes
0answers
35 views

Why does @data@values slot for RasterLayer only contain logical(0) and not the actual values?

Trying to get to the bottom of why, when I read in a raster of NDVI, the @data@values slot does not contain the actual values until I set them manually. For example: NDVI <- ...
1
vote
1answer
40 views

Trying to limit my shapemap to state boundary lines in R

I have a feeling I'm either trying to do this incorrectly, or I'm just not searching for the correct terms, but I cannot figure out how to do what I want to do. I am trying to plot the ranges of fish ...
2
votes
1answer
209 views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: ...
2
votes
2answers
87 views

Use GRASS through R

I want to use GRASS GIS 7 through R 3.1.3 in kubuntu operational system. Could someone help me connect GRASS with R, and use GRASS commands through R (not the other way round!).
1
vote
2answers
53 views

Aggregate SpatialPoint to form SpatialPolygon

Is it possible to convert SpatialPointDataFrame to SpatialPolygonDataFrame by some kind of generalization or aggregation function in R. how can i form polygons from points of similar color/classified ...
4
votes
1answer
174 views

How to stack rasters for ecological analysis?

The attached image shows two different forest openings. Each opening has the following layers associated with it: Point shapefile 1 = A red X which represent a large "legacy" tree in the gap Point ...
1
vote
1answer
27 views

Workflow for updating raster using polygons of different attributes

I require a specific output but it is proving difficult for me to work out a workflow. I have: 1) polygons of new housing developments (356, non overlapping) 2) a 25m raster of land cover I want ...
0
votes
2answers
84 views

How to get average values per coordinates in ArcMap/R?

I have a point shapefile. It has multiple points at different spatial locations. Within each point there are multiple values that I want to get the average of. In this case the new file would have one ...
2
votes
1answer
30 views

Last SEXTANTE (Processing) update results in missing RScripts examples

I have installed today the new version of the Processing plugin on QGIS 2.8 (on Windows 7 x64) and I cannot anymore find the RScripts example that were available (and functioning) before the udpate. ...
2
votes
1answer
24 views

Mosaic rasterstacks based on minimum of certain layer?

I am trying to mosaic 42 remote sensing rasterstacks (with 250 bands) based on the criterion that in overlapping areas, the pixel should be taken that has the most nadir viewing angle Beside my ...
0
votes
0answers
13 views

Using errorsalm() from spdep with multilevel data?

I have a dataset that has multiple observations per county, and I am interested in estimating the effect of a county-level variable on individual-level outcomes. I would like to account for adjacency ...
0
votes
2answers
191 views

R Spatial Kernel Density Estimation

I am new on spatial kernel density estimation with r and need some suggestions. Saying, I like to estimate the density for some event occurring at a location, for example, the probability of ...
0
votes
1answer
63 views

Switch an R script from “MODIS Reprojection Tool” to “ModisSwathTool”

This R script works with MRT (MODIS Reprojection Tool), and its performance is unbelievable for land data. The only problem is when you use Atmospheric data from Modis, like "MOD05_L2". The problem ...
1
vote
1answer
31 views

How to create a Planer Point Pattern in R using a Shapefile of point features

I have just started to learn spatial analysis of point pattern with R. On page 20 of this book, the "Swedishpines" dataset has been used for inspection purposes. However, I want to use my own dataset ...
3
votes
1answer
72 views

Obtaining sink morphometry from local minima points

I am working on LiDAR data from GIS and R and I want to extract landforms from the DEM. I have found a method to obtain local minima points of my LiDAR data. However, I would like to obtain the ...
12
votes
3answers
3k views

Proper way to rbind SpatialPolygonsDataFrames with identical polygon IDs?

What's the proper R idiom for rbinding SPDFs together when the IDs overlap? Note that here (as is often the case) the IDs are basically meaningless so it's pretty annoying that I can't just make ...
8
votes
2answers
615 views

How to create a solar intensity map for a garden plot?

I'm interested in creating a raster surface that depicts the average solar intensity per unit area for a small garden plot. I imagine the inputs into the model would be the following: Plot ...
0
votes
0answers
36 views

Total area of polygons over latitudes

I'd like to calculate the total area of several polygons along a north-south axis. A bit like this http://www.closr.it/canvas/1307/#/spot There is a similar question with R : Spatial graphing, ...
1
vote
0answers
57 views

Simulate water runoff to get water height over each pixel of DEM

Here is my problem that I am trying to deal with. I have given a height map of around 512X512 resolution(It is Geo-referenced and I have the meta-data for this). And I have given that this area ...
0
votes
1answer
133 views

Convert Eps to geographic distance using DBSCAN

I am using the dbscan cluster (package fpc) in R to find clusters on a set of latitudes/longitudes coordinates. I want to find an eps distance that corresponds to a meaningful geographic distance ...
0
votes
0answers
24 views

how to assign the same centroid to polygons grouped by ID , R

I have a SpatialPolygonDataFrame object from a shapefile of different zip codes in New York state, many zip codes are represented by several polygons( for different reasons) so I want to assign the ...
14
votes
5answers
5k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...
0
votes
0answers
61 views

A faster polygon intersection tool than rgeos gIntersection in R?

I'm looking for a R function able to retrieve the polygon intersecting between two SpatialPolygonsDataFrame. I need to use R and the rgeos::gIntersection() is too slow in comparison with ArcGis...
0
votes
0answers
69 views

How to reference a number variable in r.mapcalc within QGIS graphical modeler

I need to run the following formula in r.mapcalc: (xor(abs(A-B),abs(A-C))>120)*A I would like to however use a user defined number input variable instead of the 120. I already have this variable ...
1
vote
2answers
99 views

Reversing “combine” function on raster using R?

I have a raster that I think was "combined" using an ArcGIS function. I am wondering if there is a way to extract just one raster layer from the combined dataset in order to use it separately, using ...
2
votes
1answer
598 views

Inverse distance weighted interpolation for categorical and/or binary datasets

I want to perform an Inverse distance weighted (IDW) interpolation to a series of points. However my data set can be categorical or binary and just like the IDW I want to interpolate the new values ...
1
vote
2answers
361 views

How to resample a raster to higher resolution in QGIS?

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
0answers
18 views

Creating Concentric circles using the ggmap function from GGMAP package R [duplicate]

I would like to create two concentric circles using the ggmap package and ggmap function, one being 1/4 mile and the other 1 mile radius around the 16 metro rail stations in Los Angeles California. It ...
1
vote
0answers
52 views

Effects of heterogeneous vegetation in mapping canopy cover using randomForest in R

I have a 5.8 m resolution satellite image (LISS IV by IRS-P6, in bands 4, 3 and 2) of a densely forested region in the Eastern Himalayas. My objective is to predict regions of canopy cover. Regions of ...
1
vote
1answer
66 views

The stability of randomForest models after increasing predictor variables

With reference to the posts: Incorporating terrain data to predict canopy cover using randomForest in R and Random-Forest Classification of 10cm Imagery for species-distribution in R (no point-shapes) ...
2
votes
1answer
79 views

Incorporating terrain data to predict canopy cover using randomForest in R

This is a subjective question. Thank you bearing with me. I have a 5.8 m resolution satellite image (LISS IV by IRS-P6, in bands 4, 3 and 2) of a densely forested region in the Eastern Himalayas. My ...
1
vote
1answer
81 views

gDistance to determine closest point to polygon: does changing projection change results qualitatively?

I'm using gDistance from the rgeos package for R to find the nearest point to a polygon. The projection of both points and the polygon is +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 ...
0
votes
1answer
96 views

Extracting point data for each lat and long from raster file into a dataframe

I have gridded data files ( see sample -each file consist of monthly precip and is label pYYYYMM) https://www.dropbox.com/sh/63z166tjxyu12s5/AAAs3Ccn1zdVoBYMj8Y1o303a?dl=0. I am trying to extract ...
1
vote
0answers
26 views

Assign Z value to new coordinates based on interpolated response surface in R

I've created a response surface of sorts based on interpolated z values (bottom of post). I'm looking for the most efficient way to assign the respective z value to a new point (actually, a dataset ...