Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
1answer
21 views

R: create OUTSIDE_ONLY buffer around polygon?

I would like to create buffers in polygons, surrounding my original polygon. However, I want to keep only the "outside polygon", not include also original polygon. In Buffer in ArcGIS I can just set ...
0
votes
1answer
11 views

Rescale raster in R

What's the best way to rescale a raster with range 0, 200 to range -1 to 1 in R? I'm currently using gdal_translate, but this requires that I write out a new file with the updated range. If possible ...
0
votes
0answers
10 views

R Levelplot overlaying two SpatialPolygonsDataFrame on a RasterLayer

I'm having some trouble plotting a RasterLayer and a SpatialPolygonsDataFrame in a level plot in R. Something is wrong with the projection, but I don't manage to understand what. Thanks for your help. ...
4
votes
0answers
46 views

Is it possible to use a raster::click event within an interactive leaflet map?

Data Download: https://www.dropbox.com/s/f849ra8l6umo9d8/crops.tif?dl=0 I have various raster images of the world that I would ultimately like to plot within an interactive leaflet map; an example is ...
0
votes
1answer
15 views

Get value from list class (vector) in R [on hold]

I have a simple question about corce(?) list class data into vector. I extract a tif file from polygon to achieve a list. Maybe the class of list is leaded by extract function. I check the list length ...
3
votes
2answers
90 views
+50

R: speed up raster to polygon conversion in R?

I've decided to process my Landsat data in R instead or ArcGIS - due to my missing knowledge of python and and because of (assumed) high computation capacities of R. I want to : import r1 raster to ...
1
vote
0answers
27 views

Creating a polyline with a specified slope

I would like to create a road (polyline) starting from a point, with a specified slope, until reaching the top of a hill (or going out of the DTM Raster). The dowstream slope of the DTM must always ...
0
votes
1answer
44 views

How to read MODIS hdf file into R [on hold]

I am having some problems with the processing MODIS HDF in R. I want to import MOD13A3 NDVI hdf file. Purpose is to read image cells value as a matrix. I have install MRT in my PC, I had planned to ...
1
vote
1answer
20 views

rgdal / ggmap : rotate map data and clip map

I'm trying to plot a map of Toronto with ward boundaries and geocoded data on events over years. But the layout is such that I end up with mostly wasted space in the map. To increase resolution for ...
2
votes
1answer
24 views

Extract rasterlayer from extent class

I used extract() function to get remote sensing image cell value.The same code to process tif file produce error message. Code as follows: r1 <- raster("2000_2605_1.1_km_monthly_NDVI.tif") ...
0
votes
1answer
67 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 ...
10
votes
1answer
602 views

Multispectral image segmentation for natural-resources applications using R

R has the capacity for image segmentation, although all of the examples I have come across utilize a single band for the segmentation (example). I am interested in combining R's capacity for random ...
0
votes
1answer
204 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 ...
4
votes
2answers
141 views

Changing raster calculation values - shorten this script?

i'm doing something quite straightforward regarding raster algebra but am struggling either to find the correct function or make a function work correctly; Basically I have 2 rasters, representing ...
3
votes
1answer
80 views

Put points on a projected world map

With the help from this post Lines on reprojected sp objects with Mollweide projection, I draw a world map using Mollweide projection. I also have some points with latitudes and longitudes, and I ...
2
votes
2answers
31 views

Reducing number of attributes (classes of marks) in marked point pattern using R?

I have a marked spatial point pattern loaded in R (from Shapefile). This dataset has 4 different "classes" of marks: class A, class B, class C and class D. Each class of marks is categorical. One can ...
3
votes
1answer
3k 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 ...
1
vote
0answers
16 views

R: how to export my Kriging result to raster? [duplicate]

I want to export results of my Kriging calculation to raster or some other format. My aim is to take this converted file and intersect it with another SpatialPointDataFrame (location of the point ...
4
votes
1answer
215 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
8 views

MODISTool R Error: Can't call method “prepare”

I have already used Modistool in R a few times, but lately I am facing the following error while using the function GetProducts(), GetBands(Product = "MOD13Q1") MODISTools::GetProducts() Error in ...
0
votes
1answer
206 views

How to download the MODIS data from R using MODISTools library

I want to download MODIS product MOD13Q1 to use the Scientific Data Sets (SDS) layers of "250m_16_days_EVI", "250m_16_days_pixel_reliability". MODISTools library in R software provides the capability ...
1
vote
1answer
26 views

Splitting polygon into multiple fixed-width polygons along edge in R?

I have a polygon and would like to spit into grid with fixed width along with one edge. The result will look like the figure below. Are there algorithm to achieve my target? My language is R, but ...
1
vote
1answer
22 views

Convert/display grayscale image as RGB

i want to display raster images using a color palette in a leaflet map. The images are tiled (gdal2tiles) from a single .tif to multiple .png files with values from 0 to 100. I add the image using ...
2
votes
1answer
11 views

Dealing with spatio-temporal data: sp::over function in R

I have a dataset called carcass, which contains occurrences of livestock carcasses in Norway in the last 5 years (each raw corresponds to a single carcass, which has an ID number, along with ...
1
vote
1answer
36 views

How to apply functions iteratively to SpatialLines in R?

Looking for a way to apply the 'rgeos::gIntersection' and 'rgeos::gDifference' function iteratively to SpatialLines, I created 3 SpatialLines as an example: #from the sp vignette: l1 = ...
1
vote
0answers
21 views

How to download GPM rainfall data automatically?

How to download GPM rainfall data automatically? I tried to use DownloadGPM.R Function, but I think I had problem with Axel download accelerator. I guess I need to declare Axel as environment ...
4
votes
2answers
2k views

How to convert a spatialpolygon to a SpatialPolygonsDataFrame and add a column to the atrribute table

coast<-readShapeSpatial("coastline.shp") landc<-readShapeSpatial("landcover.shp) ro<-readShapeSpatial("roads.shp") bc<-gBuffer(ro,width=100) landc$ratings=1 ...
0
votes
1answer
40 views

smoothing raster layer stack using R

I'm trying to do smoothing for .tif stack layer of 331 bands. I used this code in R : setwd("D:\\") raster_dir <- "D:\\Modis VI quality\\" VI <- ...
0
votes
0answers
16 views

What is the approach for comparison two spatial point sets on the global scale?

I have to point sets, both of them dispersed over my study area, which counts several districts. Now I want to find a way how to compare them between each other using spatial statistics on a global ...
0
votes
1answer
99 views

Warning: implicit list embedding of S4 objects is deprecated

From this code: na_cells <- as.data.frame(extract(r_temp, poly_contour, cellnumbers = TRUE)) Why do I get this warning? Warning in `[<-`(`*tmp*`, cnt, value = p@polygons[[i]]@Polygons[[j]]) ...
1
vote
2answers
32 views

How to overlay a polyshape to faceted maps in r with ggplot?

So i am quite new to the use of r and ggplot to produce high quality output maps for publications. I have managed to create a faceted map from my data following the approach proposed here ...
-1
votes
0answers
13 views

writeOGR R and add an symbol [duplicate]

Sorry this question was closed while I was out of the office because it was unclear. I have added some information to hopefully clarify what I am asking. I wondering if there is a way to add an ...
1
vote
0answers
22 views

writeOGR R and add an icon symbol [closed]

I am wondering if there is a way to add an icon symbol to the R code I am using to export data in GPX format. In the navigation program I import the GPX file into all of the of coordinates are ...
0
votes
0answers
26 views

Smooth raster stack

How can I smooth a raster stack of 300 bands using R/Arcgis/Envi? I used this code: setwd("D:\\") raster_dir <- "D:\\Modis VI quality\\" x <- brick(paste(raster_dir, ...
0
votes
0answers
19 views

R error: Not Add Repository [closed]

I'm trying add repository but when I do the command: sudo apt-get update. Err:8 http://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages Writing more data than expected (109750 > 107506) Baixados ...
2
votes
0answers
20 views

Path Matching for Journeys Using XY Coordinates [closed]

I am trying to find some suggestions on ways or algorithms to determine path similarity. An illustration of 3 paths using made up data is given below. The title should be finding similar paths instead ...
44
votes
11answers
7k 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 ...
1
vote
1answer
16 views

Swapped axes in R raster brick plot from netcdf

I am using the R raster package to import a tiny sample netcdf file, available here: https://www.dropbox.com/s/fht4g52p948vxva/persiann.ncml.nc?dl=0. The main data website is: ...
6
votes
2answers
167 views

Transforming geostationary satellite image to lon/lat

The ICARE Data and Services Center distributes the SEV_AERUS-AEROSOL-D3 product in HDF5 format (http://www.icare.univ-lille1.fr/archive/?dir=GEO/MSG+0000/SEV_AERUS-AEROSOL-D3.v1.03/). The main ...
2
votes
0answers
20 views

Kernel Density with vector output and/or possible automation?

I'm currently working on a project that will have me calculate the kernel density of a number of shapefiles with varying parameters. My current workflow goes like this: Import shapefiles in QGIS ...
0
votes
1answer
19 views

Raster Mosaic fault using R

I'm trying to mosaic two raster images using R. I used this script: setwd("D:\\Modis EVI\\") raster_dir <- "D:\\Modis EVI\\" r1 <- brick(paste(raster_dir,"evi8_stack.tif", sep="")) r2 <- ...
1
vote
1answer
23 views

Remove raster pixel in R

This is the 32 year trend NDVI (raster data) I would like to remove the green grids data by using R (the green pixel value is larger than 0.03) and this one is R code that i use but i cannot ...
0
votes
0answers
19 views

How to define the Northern Lambert Conformal Conic CRS?

The dataset I got my hands on uses the the Northern Lambert Conformal Conic CRS? I was not able to find a ESPG number using http://prj2epsg.org/search so I decided to define a custom CRS in R but I ...
0
votes
1answer
49 views

Is there a R package that does spatial regularization?

By spatial regularization I mean the method described in Aitkinson and Curran (1995) "Defining an Optimal Size of Support for Remote Sensing Investigations", or Section 4.8 of Webster and Oliver ...
4
votes
2answers
606 views

LSA-SAF data reprojection with GDAL and R

The Land Surface Analysis Satellite Applications Facility (LSA SAF) distributes several products derived from the EUMETSAT satellites data. I am working with R to read and process the data (the file ...
-1
votes
0answers
18 views

How to convert .HDF to .Tiff and keep the number of the output files exactly as the input?

I have 332 .HDF files that I have processed in R to convert them to .Tiff. It has worked fine, however, the number of output files are not the same as the number of the input files! Input is 332, ...
1
vote
1answer
22 views

Error in rasterToPolygon trying to get several coverage layers

I have a very strange problem: I am trying to get a raster with coverage from 0 to 1 in each cell for types of vegetation, I started with a raster of vegetation type, but I needed a raster with 12 ...
1
vote
0answers
26 views

R script for find the minimum distance [closed]

I need an R code to select which polygon in a shapefile has got the minimum distance from a given point.
0
votes
1answer
29 views

how to create raster stack using R

I have 300 .tiff files, that i need to create raster stack of them. Can you please help me with R code for that? I can do in Arcgis, Envi, R. I have tried: setwd("F:\\MODIS\\Modis EVI\\HDF8 EVI") ...
1
vote
1answer
218 views

way in R or Python to add image/video in map plot marker click popup/infowindow

I have many different (lat,long data) points of world associated with unique place names and corresponding each point specific image or video data. Now I want to create an html file where if user ...