Statistical computing language and software environment.

learn more… | top users | synonyms

3
votes
1answer
56 views

Plot a world heat map with mollweide projection in R

I have a data set with global observations with lat/lon information. There are 288 longitudes from -179.375 to 179.375 with spacing 1.25, 180 latitudes from -89.5 to 89.5 with spacing 1. There is one ...
1
vote
0answers
21 views

raster::intersect not producing expected results

I am having trouble with R's raster::intersect method. I give intersect a SpatialPolygonsDataFrame and SpatialPoints as documented in the raster reference manual (p. 111). The result acts like it ...
0
votes
1answer
44 views

Writeogr to PostgreSQL/PostGIS database with R

I'm producing some Spatialpolygondataframes with R that I would like to upload to my PostGIS Database. I've found out that the way to do this is via the writeOGR() function using the PostgreSQL driver....
1
vote
1answer
39 views

Spatial correlograms for binary raster?

I have binary raster data (deforestation hotspot or not) that I would like to plot spatial correlograms for in R, to look at spatial autocorrelation over different spatial lags. I came across this ...
2
votes
1answer
56 views

Getting long-lat coordinates from NARR LCC-gridded data using raster and rgdal in r

I am studying migration ecology of sea ducks on the Atlantic coast of North America. In my analysis, I require substantial environmental data over a large geographic range for the past 15 years and ...
2
votes
1answer
26 views

Read multiple layers of KML file using R

I have a KML that 3970 layers. I am trying to read it into R using the following script: library(rgdal) lyr <- ogrListLayers("file.KML") mykml <- readOGR("file.KML","Layer1") This works but ...
4
votes
2answers
164 views

Clustering geographical data based on point location and associated point values

Given data points with longitude, latitude, and a third property value of this point. How can I cluster points into groups (geographical sub-regions) based on the property value? I searched by google ...
3
votes
2answers
44 views

Error to obtain coordinate reference system argument from a raster image in R

I got an error when i wanted to obtain the CRS from stacklayer. I don´t know what could it be. I need some advice or help to obtain it. This is my code. #LOAD RASTER LIBRARY >library(rgdal) >...
3
votes
2answers
173 views

Creating OUTSIDE_ONLY buffer around polygon using R?

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
0answers
53 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. Here you can find my ...
0
votes
1answer
53 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
1answer
26 views

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

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 ...
1
vote
1answer
61 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 ...
3
votes
1answer
41 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") ...
3
votes
1answer
96 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 ...
0
votes
0answers
13 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 ...
2
votes
2answers
39 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 ...
1
vote
1answer
52 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
2answers
57 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
23 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 longitude,...
1
vote
0answers
30 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 ...
0
votes
1answer
60 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 <- brick(paste(raster_dir,"...
0
votes
0answers
25 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 ...
1
vote
1answer
43 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 = cbind(c(1,2,3,...
1
vote
1answer
399 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]]) :...
0
votes
0answers
27 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, "laikipia_VI_quality....
2
votes
0answers
36 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 2....
0
votes
1answer
28 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
26 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: https://www.ncdc.noaa....
1
vote
1answer
37 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 ...
1
vote
0answers
17 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 ...
0
votes
0answers
50 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, ...
0
votes
0answers
29 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 ...
1
vote
0answers
34 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
45 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") ...
0
votes
1answer
68 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 (...
1
vote
0answers
17 views

R Freezes when Plotting Spatial Data Frames

I have run into a problem where anytime I try and plot a Spatial DataFrame in R, the console freezes, regardless of the size of the file. I imagined this must be due to an issue with the path to one ...
1
vote
1answer
25 views

How to work with Baccini et al.'s biomass map from ArcGIS?

Baccini et al. (2012) has produced one of the best biomass maps available for the world. One can find the map from one of ArcGIS repositories here. I downloaded the .pkinfo file for that map but I ...
1
vote
1answer
23 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
21 views

Group location points that have a cumulative value 2000

I have a set of 400 locations (points) joined to a table having population attributes. I want to form groups of nearby locations such that the cumulative population is 2000, group can have maximum 15 ...
0
votes
0answers
22 views

locate sample geo trace data

I'm working on a project where I need to form clusters of GPS coordinates that are separate from noisy geo-data points. I am using DBSCAN/OPTICS XI algorithms in R on randomly generated test data, but ...
5
votes
4answers
200 views

How to 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 ...
0
votes
1answer
36 views

Goodness of fit of variogram model using geoR

How can I find a measure of goodness of fit (let's say an R2) of a model fitted to a variogram by the function variofit using the geoR package? The only value I have is the "minimised weighted sum of ...
6
votes
2answers
234 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 ...
1
vote
0answers
29 views

Polygons created with R are corrupted when imported into ArcMAP

I created some polygons using R and to get a better visualization and some other stuff I need to import those into ArcMap. However, when I imported the polygons I realized there are some holes in some ...
0
votes
0answers
21 views

How can I create a NetCDF from precipitation rasters data in R? [duplicate]

I have a lot of precipitation raster data (more 5000 files GeoTIF), created by kriging interpolation. All grid cells have the same size and the maps the same spacial extent I want merge all data in ...
0
votes
0answers
56 views

Call gdal_proximity() from R

I have a raster including eight land cover types (pixel values ranged from 1 to 8): > r class : RasterLayer dimensions : 9887, 30532, 301869884 (nrow, ncol, ncell) resolution : 10, 10 (...
2
votes
1answer
130 views

Error in In predict.gstat in R

I am trying to do kriging by gstat pcakge through R. Here is my Code: krg<-krige(var ~ 1,data,grid,model=vgm,nmax=30) But each time I recive this warning: 1: In predict.gstat(g, newdata = ...
1
vote
1answer
35 views

R: Krovak projection in R - identical in ArcGIS, different in R?

I have two files: shapefile and raster, both in the same coordinate system in ArcGIS: EPSG 5514. Check information on projection in ArcGIS for raster: S-JTSK_Krovak_East_North WKID: 5514 Authority: ...
1
vote
0answers
40 views

Spatial AND temporal join between two point data sets

I was hoping I could get some pointers in how to approach this issue, which is tricky version of a spatial join. I have been searching and I can't find a particular solution to what I need. I have ...