Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
25 views

Spatial join between polygons and polygons using R [duplicate]

I'm trying to make a spatial join in R between two SpatialPolygonsDataFrame's. In more detail, I have zip code and electoral precinct shapefiles, and would like to know how they overlap, i.e., for ...
3
votes
1answer
217 views

R - Programmatically convert raster stack in data frame based on polygon extraction

Sorry for cross-posting. I also posted this question at the R-SIG-GEO discussion list, but since I wanted to get as much feedback as possible I decided to post it here too. I am trying to extract ...
1
vote
0answers
109 views

Divide polyline shapefile using R

I am very new to GIS in R. I have a question that may seem simple but so far I have had no luck. I am trying to split every line in a polyline shapefile into segments of three. My original file has ...
0
votes
0answers
27 views

Raster of masked area to polygon shapefile in R

I have masked() two rasters (Landsat scenes), so that I have a new raster that covers the overlapping area of both. Now, I would like to transform the overlapping area into a polygon shapefile. Do ...
4
votes
1answer
88 views

Where are the “band names” of an ENVI file once it is imported in R?

I have a .dat file (ENVI format) with specific band names, as you can see in the snapshot. I've imported this file in R, but I cannot find the band names in the R object. The command names(...
6
votes
4answers
855 views

Create interactive maps in R

I am a R user and quite new in GIS. From Adding Attribute data to shapefile? I know how to add/edit attribute data (say population) to shapefile using R. Now, I have some shapefiles with attribute ...
0
votes
1answer
193 views

Preprocessing landsat 8 images in R [closed]

I'm preprocessing landsat 8 images in R using the packages 'satellite' and 'landsat'. I tried to work with a "satellite object" derived from a stack of all my bands, but when applying the correction ...
1
vote
1answer
87 views

Creating boxplots from two rasters using the Raster package in R, using only a subset of classes from one

In R using the raster package, you can create box plots from two rasters (x and y) like so: boxplot(x,y) where: x = Raster* object y = If x is a RasterLayer object, y can be an additional ...
0
votes
0answers
15 views

compile the R arcgisbinding package against 10.2 [duplicate]

I have been searching for the way to compile R arcgisbinding against 10.2, since I don't have 10.3.1 version which is compatible for the arcgisbinding package. Is there any solution?
1
vote
0answers
61 views

What is the usefulness of the angle and direction of the sun parameters in hillshade? [closed]

These parameters refer to the angle as of elevation and direction of the sun hypothetically to the hillshade but why does that must have any importance?
2
votes
1answer
194 views

Export a QGIS print composer file (.qpt) as PDF from the command line

I have a workflow where my R script produces csv's and shapefiles. Those csv's and shapefiles then serve as layers in a QGIS project. Every time the R script is run, it overwrites the previous data, ...
0
votes
2answers
116 views

Error when reading in shp file using R

I'm trying to read in a shapefile in R, but keep getting this error: nul character not allowed (line 1). I have tried various shapefiles, all which work fine in QGIS and I have even tried open-...
6
votes
2answers
421 views

Clipping vs Intersecting

I was curious why clipping shapefiles was just so difficult and whether it was different to intersecting shapefiles? You will see from one my questions that I gave up trying to clip a polyline with a ...
1
vote
2answers
89 views

Improves performance on R working with raster files

I´m trying this code to look for NA and negative pixel values and replace it for 0. But it´s too slow. Any tip for improve the performance of it? "all.files" is a list of address of the images. "r1" ...
3
votes
2answers
192 views

Reclass raster stack based on condition and other layers

I want to reclassify raster r1 in the following form: all the values that are larger than r2 to be 1 all the values that are less than r3 to be 0 all the rest of the values to be equal to r4 I ...
0
votes
1answer
479 views

Different origin problem while merging rasters

I have two dem files downloaded via the getData function in the raster package. Here you can see the code: I tried to make the example reproducible so there you have it. library(raster) dem_n1<-...
5
votes
2answers
208 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
61 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
243 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 ...
1
vote
0answers
15 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
190 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
97 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 ...
-2
votes
1answer
66 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") coordinates(gc)<-...
4
votes
2answers
331 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. a<-readOGR(dsn=".",layer="...
8
votes
3answers
621 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 ...
10
votes
1answer
354 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
57 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 ...
0
votes
0answers
26 views

Putting shapefile into spplot graph?

I have a spplot with a kriging but I need to put a shapefile into this spplot? How can I do that? I could obtain this with a intersection but I just need the shapefile over this.
1
vote
1answer
47 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
250 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
295 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
98 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
2answers
119 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
90 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
34 views

Clear QGIS plot results window

How do you 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
120 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) "...
0
votes
2answers
340 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
26 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 ...
2
votes
1answer
64 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 1:...
6
votes
1answer
105 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
580 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
124 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
222 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
138 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
43 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
454 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
427 views

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

Is there any function to calculate statistical NDVI in landsat8 package
2
votes
0answers
50 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: ogrInfo(...
0
votes
0answers
87 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
19 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 ...