Statistical computing language and software environment.

learn more… | top users | synonyms

5
votes
2answers
141 views

Map algebra in QGIS

How do you calculate standard deviation for each raster if you have set of rasters (100)? I was searching in raster calculator, but I didnt find it. Also google redirect me to using R or python. But I ...
1
vote
1answer
37 views

R: Change RasterBrick dimensions from TXY to XYT

I am having difficulties in R getting climate data from a netCDF file into the right format for further analysis. I am working with gridded global data on Standardized Precipitation Index (downloaded ...
5
votes
2answers
117 views

Is it possible to clip a shapefile to an image() in R?

I am working on mapping some netcdf data in R and have been having a tough time trying to perform a clip with an imported country shapefile that I'm using. Here is my question from yesterday. If you ...
0
votes
0answers
14 views

Is there a replacement for ggmap::geocode? [duplicate]

I've found ggmap's geocode() function really useful over the years as it's got a 'fuzzy' search implemented by Google. However, I'm wondering if there are alternatives, because geocode() seems ...
1
vote
1answer
91 views

Example of simple kriging with varying local means in R

I'm looking for an example of how to use simple kriging with varying local means in R. I've tried google, a few books (for example Aplied Spatial Data Analysis with R) and I've found almost nothing. ...
1
vote
1answer
64 views

How to clip a spatial polygon to a large matrix (that is plotted as a large trellis, originated as a netcdf) in R?

I would first like to issue a disclaimer that I am a novice at GIS, and I have only just begun learning R. So if I use the wrong terminology for something or my question is confusing, please help ...
-1
votes
1answer
62 views

Points don't show up on an overlaying shapefile?

library(ggmap) library(rgdal) cities<-c("city A","city B") country<-readOGR(dsn=".",layer="country") gc<-geocode(cities,source="google") gc$names<-c("city A","city B") ...
4
votes
2answers
129 views

Alternatives of spTransform?

Let's say that we have a shapefile with a certain projection. s<-readOGR(dsn=".",layer="Spain") We also have the airports of Spain as points in another projection. ...
8
votes
3answers
370 views

Fastest way to convert big raster to polyline using R or Python?

I have a big raster file (129600 by 64800 pixel) with global water bodies (1 bit values 0 and 1) and try to extract ocean and inland water shorelines. I've tried with ArcGIS and QGIS to convert from ...
9
votes
0answers
144 views

Identifying overlapping time intervals with two more criteria in R?

I have to check birds observations made over a longer period for duplicate/overlapping entries. Observers from different points (A,B,C) made observations and marked them on paper maps. Those lines ...
0
votes
1answer
50 views

Split by attributes with 2 fields

I am using SplitLayerByAttributes toolbox. It’s a very useful tool for me to process certain activities. As you know, I can split the feature class as per 1 field. What if I want to split the features ...
1
vote
1answer
40 views

Adjusting sampling points to closest land surface QGIS

I have many sampling points in mangroves of Southeast Asia and am trying to extract climatic data for each using the WorldClim dataset. However, many of the points fall on areas classified as "water" ...
1
vote
0answers
67 views

Converting UNIX time to datetime in R [closed]

I am trying to convert a 13 character UNIX timestamp to datetime and I am getting a year that is in the 44000's. I'm not sure what I am doing wrong, hopefully someone can help. library(maptools) GMT ...
5
votes
1answer
103 views

R fortify causing polygons to tear

I'm am having some trouble plotting my spatial data using ggplot2. The map looks fine when plotted using spplot, so I'm assuming that the tearing occurs at the fortify stage. The code is as follows: ...
0
votes
1answer
70 views

Plotting distribution of two different species in R?

I have data for species distribution modelling of two different species. I need to plot the predicted distributions of the two species in the same raster plot to be able to find the areas where they ...
1
vote
0answers
62 views

Pan sharpening with surface reflectance data

The surface reflectance data for landsat 8 is only available for bands 1-7 (via EPSA bulk download). I want to pan sharpen surface reflectance data. But I don't have a surface reflectance band 8 (pan ...
0
votes
1answer
46 views

variogramST in R

I've been following the tutorial in this site to compute the spatio-temporal variogram in R. The result from variogramST is the object called var, and it contains several NAs for np, dist, and gamma, ...
1
vote
0answers
30 views

Clear QGIS plot results window

How do you simply clear old plots from the plots result window in QGIS? Is there a line of R code that you'd need to run to do so, or is there a means of doing so through the GUI?
1
vote
1answer
68 views

Pan sharpening using R

I want to pan sharpen my Landsat8 scene (according to FIHS algorithm, see here). According to the paper the following equation should do the pansharpening: MS_high <- MS_low + (pan - I) ...
-1
votes
2answers
138 views

how to remove cloud values of Landsat image from R [closed]

How can I remove cloud value of the Landsat8? How can I estimate cloud values for eg: modis cloud values are from 700 to 800. By using R how can I estimate>
1
vote
0answers
22 views

Batch Geocoding in R over daily limit with pay as you go? [duplicate]

I have found the the geocode function in ggmap to be very helpful in the past. Now I am trying to geocode about 60,000 addresses. The google maps API daily limit is 2500. Google offers a "pay as you ...
1
vote
1answer
54 views

How to separate out bands from hyperspectral data using R

I'm having one hyperspctral data with 426 bands, with dim 250*250*426. I want to seperate each bands. I tried like this img <- stack("name.tif") rr <- array(, dim= c(250,250,426)) for(i in ...
6
votes
1answer
75 views

How to make a wedge shapefile in R?

I'm quite okay at R programming, but fairly new in GIS (especially in R). I have a set of coordinates and I'd like to create a custom shape around them. What I want to do step-by-step: Create a ...
7
votes
2answers
298 views

How to download MOD16 (Modis Evapotranspiration) image?

I use a 'R' script for downloading MODIS imageries. However, it doesn't give MOD16 product. I could neither find the MOD16 product in earthexplorer website. Though the desired product is available at ...
5
votes
0answers
59 views

Interpreting semivariogram high nugget

I made a semivariogram in R using package gstat, variogram() function. I want to see if there is spatial autocorrelation in the residuals of my model (species abundance as a function of habitat, ...
6
votes
2answers
186 views

Create large amount of random points in binary raster

I want to create a point vector dataset of 10000 points (or larger) within a binary raster, where the points should be constrained to areas where the raster value is 1. I tried the following steps. ...
-1
votes
1answer
80 views

How to read metadata file from R [closed]

How to read metadata file parameters( like sun elevation,REFLECTANCE_MULT_BAND etc ) from the user interface or from R How can end user validate the parameter of metadat file(.mtl) How can I pass ...
0
votes
1answer
26 views

Exporting “pennLC” object stored in R as a shapefile

I need to export the pennLC object from package:SpatialEpi as a shapefile. pennLC contains different components of lung cancer dataset for Pennsylvania state such as: $geo, a data frame $data, a ...
-2
votes
1answer
133 views

How can open a shapefile using R maptools package? [closed]

library(maptools) mn.map.shp = readShapeSpatial("minnesota.shp") Results this error at second line: Error in getinfo.shape(fn) : Error opening SHP file
-2
votes
1answer
135 views

How to calculate statistical NDVI in R (for Landsat8) [duplicate]

Is there any function to calculate statistical NDVI in landsat8 package
1
vote
0answers
40 views

About shp for ggmap in the R

I am a new in R and GIS, so I kindly ask you on advice. I had a shp which I want to plot on google map. The shpfile is here: http://www.filedropper.com/exercisestanddata First I do this: ...
0
votes
0answers
48 views

Variogram to assess spatial auto-correlation in grouped surveys in R

I have a large dataset with coordinates of survey locations, and results for presence or absence of a species. These surveys are spatially clustered, with four in a line separated by 1km each, and the ...
1
vote
0answers
18 views

How can I quantify whether locations of one 'type' are closer to one another compared to a second 'type'?

This might have an obvious answer but I'm new to GIS and can't seem to find the right technique... I've got GPS points for a bunch of households and have calculated the distance (in km) between each ...
3
votes
2answers
98 views

How to remove bounding box extents based on reflectance values of the image of Landsat8 by using R programming

I have taken the reflectance image from Landsat8 bands. Now the extents of bounding box showing negative values , to proceed to my next level of the process i need to remove this negative values and ...
-1
votes
2answers
141 views

unable to find an inherited method for function ‘writeRaster’ for signature ‘“SpatialGridDataFrame”, “character”’

Error in (function (classes, fdef, mtable) library(rgdal) x<-readGDAL("LC81360442014322LGN00_B5.TIF") z<-reflconv(x,2.0000E-05,-0.100000) ...
0
votes
1answer
46 views

R: Convert Extent Object to Shapefile

I want to convert R 'library:raster' 'extent' object to a shapefile. I have the CRS available too. e= c(4304916, 4305325, 365216, 365439)#xmin, xmax, ymin, ymax proj4string(e) = CRS("+proj=utm ...
6
votes
1answer
93 views

Segmentation of a big raster

I'm actually trying to convert one raster into a SpatialPolygons. I've got a big raster (12 millions pixels) with a lot of zeros, and some negative values (representing some depression in a DEM). I ...
6
votes
4answers
251 views

Estimating river Channel Width using Python/ArcGIS/MATLAB/R?

I am trying to estimate the river channel width from digitized polygon or poly-lines shapefiles. To do so, I converted poly-line shape files to points.shp at regular intervals (at 1 cm). Later, I ...
0
votes
1answer
41 views

Debugging spplot() and reflconv() on R Cannot allocate vector of size …?

I am trying to perform LANSAT data of Digital Numbers (DN) to reflectance in R(coding) using reflconv(). When I apply that function to example it shows below error: >library(rgdal) x <- ...
3
votes
1answer
72 views

Define cellsize from spsample in meters

I use a shape file to create a regular grid using spsample, from sp package. Two problems here: (1) I would like to define the size of my grid cells in meters, but I've checked the documentation of ...
0
votes
0answers
44 views

Union overlapping shapefiles (poylgons) and merge the attributes where overlap occurs in R

I have 30 shapefiles of overlapping polygons and would like to union them into one shapefile. The attribute table of the 30 layers is exactly the same (two columns, Type and Origin). A new polygon ...
0
votes
1answer
138 views

Using Loop for calculating NDVI

I am using MOD09Q1 now and I would like to calculating NDVI whole year data. One year, I have 46 band 1 images and 46 band 2 images. list.files I creating list of band 1 and list of band 2. ...
1
vote
0answers
52 views

R raster stack 4 dimensions

I am trying to create a raster stack / brick from a list of ncdf files with the dimensions 160x160x24x1). r = stack(files) This gives me a raster stack but without the 4th dimensions which is ...
1
vote
1answer
352 views

R solution for 'TopologyException: Input geom 1 is invalid' self-intersection error?

The 'TopologyException: Input geom 1 is invalid' self-intersection error which arises from invalid polygon geometries has been widely discussed. However, I haven't found a convenient solution on the ...
1
vote
0answers
102 views

Can you check if a gps coordinate is inside a gps polygon in R?

I'm trying to determine if a specific gps coordinate is within a gps spatial polygon. My gps coordinate is being outputted from the geocode function from the ggmap library and the spatial polygons ...
1
vote
2answers
275 views

How do you geocode addresses in R? [duplicate]

I'm wondering how to geocode addresses in R Studio ? Is there a link to Google Developers API ?
3
votes
1answer
74 views

Find which latitude and longitude values are falling in which raster cells

I am an absolute beginner in analyzing geographic data with R. I have a database with longitude and latitude of around a million buildings in a country. I would like to find the average density of ...
4
votes
2answers
279 views

Randomly sampling points in R with minimum distance constraint

I'm trying to randomly select a number of points within my data frame (example data below) with a constraint that the minimum distance between the selected point must be greater than a certain ...
3
votes
1answer
82 views

How do I create a SpatialLinesDataFrame from a dataframe?

I have created a data.frame in R . I want to get SpatialLinesDataFrame as a result so I understand that I have to convert the data.frame into lines, the lines into SpatialLines and the SpatialLines ...
0
votes
1answer
66 views

How to extracting values of 40 plots from different bands of raster image in R?

I have 40 plots(samples) and I want to extract corresponding values from different bands of RapidEye image. So at the end I want to have totally 200 values of 5 bands in the format of txt. Till now I ...