Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
0answers
11 views

How can I use a DBF layer in an R script in QGIS?

How can I use a DBF layer in an R script in QGIS? For example, I can input a vector by using ##Layer=vector, and a CSV table with ##Table=table, but it will fail if the table is based on a DBF file. ...
0
votes
0answers
18 views

Error with gwr.mixed function in GWmodel r package

I applied the gwr.basic and gwr.mixed on the same SDF file using the codes below. I got an error message on gwr.mixed: Error in SpatialPolygonsDataFrame(Sr = polygons, data = mgwr.df) : row.names ...
2
votes
0answers
29 views

Change number of cells in raster

i have 5 raster files and i want to merge them to one file with exact 50x50 cells because i have an R script to process it later. I used the arcgis function "mosaic to raster" but it delivers a ...
0
votes
0answers
22 views

reproject satellite orbit values from irregular grid to regular grid

I have a ncdf file containing measurements covering a satellite orbit. The ncdf contains the corresponding latitude / longitude fields but they ar irregularly spaced. I tried rasterizing the values ...
0
votes
0answers
20 views

Zooming into State using R Leaflet

I am using R LeaftLet package to create a interactive choropleth of the US Map. There are several tutorials online and I am able to create interactive state level map with pop up and zoom. Also I ...
0
votes
0answers
28 views

How to effectively read and analyze multiple dbf tables?

I have multiple standalone dbf tables in a geodatabase (when saying standalone, I mean they don't have spatial components). I found this post Reading File Geodatabase using R indicated R is a ...
3
votes
2answers
46 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 ...
1
vote
0answers
11 views

Viewshed with RpyGeo “rpygeo.Viewshed.sa”

This function is not working: rpygeo.Viewshed.sa(mnt, pt,out.raster="viewshed") *Error in as.character.default(<S4 object of class "RasterLayer">) : no method for coercing this S4 class to ...
0
votes
0answers
15 views

Reclassifiy raster in R [duplicate]

I have a raster file which has been classified from 1 to 255. I have to reclassify into binary form where 1 to 11 must be classified as 1 and the rest must be 0.How would I be able to do it in R. My ...
2
votes
1answer
44 views

Proj4 for EPSG3857

I am using leaflet and the R library sp. The CRS from my leaflet map is EPSG3857 - WGS84 Web Mercator. I am retrieving the coordinates of my current map view with getBounds(). For further calculations ...
0
votes
0answers
6 views

How to convert raster files from R to arff format (for Weka software)?

I'm trying to convert some raster file to .arff format for Weka software. I used the following code to convert my files, but I got an error. Does anyone know whats the problem?
0
votes
0answers
20 views

Subset moving window when using focal on raster in R

I have a classified Landsat image, and I'd like to pass a filter over it converting certain cells to 0. For some categories, I'd like to set cells to 0 unless an entire 7x7 window contains only that ...
2
votes
1answer
39 views

Variogram for data along linear routes

I have a dataset of some measurements along a bus route (image below). The purpose of my study is to be able to detect the values at any location along the route using Kriging interpolation. I have ...
3
votes
1answer
51 views

integrate elevation and Euclidean distance

I have a number sequential GPS locations from marked animals - usually 4 to 5 locations per day for 1.5 years - and am trying to delineate seasons based on elevation and distance. From low ...
0
votes
1answer
29 views

How to convert shapefile of India into a system with longitude and latitude system?

I have two shapefiles of India. One is without PoK and other is with Pok. I want to convert the shapefile of India with PoK into a co-ordinate system with longitude and latitude (same as without PoK). ...
0
votes
0answers
23 views

Gstat: Modelled semivariogram values not matching plotted model using the variogramLine function

I am trying to extract the semivariance values associated with a given semivariogram model developed in gstat, the end goal being to compare modelled semivariance with observed semivariance at defined ...
1
vote
2answers
42 views

Create a raster with ranges from another raster

I have a raster that contains values ranging from 1-180. I am looking for a way to create a new raster where if the values of a cell in the original raster is between 1-10 the new raster cell gets the ...
1
vote
1answer
24 views

osmar returning objects with no features- mapping with R

> src <- osmsource_api() > bb <- center_bbox(51.3528, -0.4468, 7000, 7000) > wb <- get_osm(bb, source = src) > wb osmar object 0 nodes, 0 ways, 0 relations Trying to pull data ...
0
votes
1answer
32 views

Extract raster values to points (1 per cell) for R using ArcMap?

I have created several raster layers within ArcMap that I wish to extract values from in order to analyse within R. However, I'm keen to avoid pseudo replication of my species presence data and ...
0
votes
0answers
8 views

mapply in the idw command

I would like to find what are the optimal power parameters and number of neighbors for idw interpolation using the mapply command and the gstat package in R. The optimal parameters are determined ...
0
votes
0answers
11 views

R: Topology Exception Error

I'm trying to do the gDifference between two polygons, but I was getting an error: Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, "rgeos_intersection") : TopologyException: ...
1
vote
1answer
34 views

Dissolve overlapping polygons in R

Is there an analogue of ArcGIS Dissolve function in R? I need to dissolve the overlapping polygons and create a single part object. I was trying to use gUnionCascaded, but it creates a multipart ...
2
votes
0answers
21 views

Raster memory usage in R

I am working with raster/brick data in R and running into memory issues. I am basically trying to use raster objects to perform some simple agent-based modeling, but the objects keep increasing in ...
1
vote
1answer
46 views

Batch geocoding in R

I need to find a package in R or source code in R that performs batch geocoding using Bing, Yahoo, OpenStreetmap. Do you have any suggestions?
3
votes
2answers
45 views

Snapping raster grids in R

I am trying to align two raster grids in R. Once aligned I would like to be able to add them together. I have tried to check whether making a stack would work: grid_snap <- stack(habi_sdw, ...
11
votes
2answers
102 views

How to anonymise a gps file?

Imagine you have a GPS trace that you want to make anonymous, in the legal sense. How would you do this? Is snapping to the nearest x distance and stripping out the time enough? Are there ...
1
vote
1answer
31 views

Save raster to file when using stack() in R

I'm working on a function for raster package. In the end of the function I have to use stack() to create a RasterStack. When I do this the data source is in memory. I want to have the data source on ...
1
vote
0answers
42 views

Plotting a weighted map like a heatmap in R

I want to plot a map weighted by prices. I got a data frame of latitudes, longitudes and prices: > str(data) 'data.frame': 1253 obs. of 3 variables: $ lon : num 11.2 11.1 11 11 11.3 ... $ ...
1
vote
0answers
13 views

Matching vertices in igraph (R)

This is my first question so apologies if it's poorly explained... I'm currently using a combination of ArcMap 10.2 and igraph in R to analyse a network with associated data. I have an igraph ...
1
vote
1answer
14 views

How to get geodetic area? rgeos::gArea doesn't seem to work. Or area-preserving projection

I need to get an area of different polygons at continental scale (like third of Africa etc.). Usual functions like rgeos::gArea work only in the projection units. Is there any function which works ...
1
vote
1answer
43 views

Simple way to plot netCDF variables on Mollweide projection in R

After spending hours Googling I'm still no closer. I'm very keen to find out if there is a very simple way to plot up variables from a netCDF file that are stored in a regular lat-lon grid (-90to90˚N, ...
0
votes
0answers
5 views

Problem with automated data storing during raster::crop (‘legend’ is not a slot in class “RasterStack”)

I am working with a set of raster layers containing CHIRPS monthly rainfall amounts over Africa. For purposes of reproducing the below code, I staged the decompressed tif files on Dropbox. Now, ...
0
votes
1answer
47 views

Is there any packages to download landsat image by shapefile boundary in R or python? [on hold]

I want to find a package which can automatically download images within a predefined administration boundary (shapefile format). Does anyone know a package can conduct or simplify the process?
1
vote
0answers
29 views

Can't properly map Lat/Long data on a googlemap

At the very beginning I should mention that I am a novice in spatial data handling. I am in it because I am recently doing a project where certain mining information needed to be embedded on a global ...
3
votes
1answer
68 views

Clip raster by raster with data extraction and resolution change

I need to stack multiple maps (tif) together and clip them all according to extent of one small raster map (second raster at the top of picture below). However, the size of pixels in each map is ...
3
votes
1answer
28 views

Saving results in automap R package for time series data

I'm planning to interpolate monthly rainfall data from 1980 and 2010. I'm using following code: require(gstat) require(sp) require(automap) require(rgdal) require(raster) for(i in ...
0
votes
1answer
31 views

How to remove zonal anisotropy from directional variogram using gstat in R?

I have a dataframe named seoul315 contains the 107 data of PM10 concentration at 1 march,2012,5.00 am. please, download. I have tried to plot semi-variogram for kriging bt the following code: ...
1
vote
1answer
37 views

Difference between intersect {raster} and gIntersection {rgeos} in polygons - R?

I am interested in knowing the difference between tools: intersect {raster} and gIntersection {rgeos}** tools in R. I have several overlapping polygons and I am interested in their overlap, but mostly ...
1
vote
1answer
27 views

Phantom artifacts after converting to Robinson projection

I'm using ggplot to create a map using the Robinson projection. Ultimately, I'll be plotting individual countries, but I need to provide continent boundaries as a background layer (since some ...
0
votes
0answers
19 views

unionSpatialPolygons Hardware recommendations

I am following the unionSpatialPolygons code outlined here to combine the zipcodes of the US into states with two states combined. I have successfully done this on a smaller scale, but to do this for ...
3
votes
2answers
73 views

What percentage of polygon x is in raster pixel y, efficiently

I feel this is a competition worthy problem, due to its size. I would like to weight a set of raster pixels to the attributes of a set of polygons. To do this I need to know the proportion of each ...
0
votes
2answers
64 views

Exporting Matrix from ArcGIS (so readable in R)

I would like to eventually create a shape file in ArcGIS and then extract it as a matrix to be read by a spatial package I use in R. By matrix I actually mean a Raster file. My first step is to ...
0
votes
2answers
54 views

Really slow extraction from raster even after using crop?

I have a large raster file (245295396) cells and stacks of rasters having 4 layers each which lie in the extent of this large raster. To start with I am trying to get value from one stack (3 channels) ...
1
vote
1answer
42 views

Loop to check multiple polygons overlap in r

I have a set of polygons (available here: http://ulozto.cz/x39ELbFt/polygons-zip) created in QGis and processed in R. I would like to know if they are overlapping or not, and if yes, where is the ...
2
votes
2answers
62 views

Is there a way to get undistorted maps in R (when using the OpenStreetMap package)?

When I download a large map within R (using the OpenStreetMap package) and I reproject the map (ideally to +proj=longlat), the map will always turn out distorted, making country labels etc. near the ...
2
votes
0answers
15 views

Efficiently calculate distance between raster patch edges

I have a binary raster which I've classified into patches using raster::clump. I now want to efficiently calculate the edge-to-edge, i.e. minimum, pairwise distance between patches. I am currently ...
1
vote
0answers
27 views

unsupervised classification in qgis (Orfeo toolbox)

I want to run an unsupervised classification of two landsat images in qgis. Therefor I want to compute a kMeans and a SOM (self organizing maps classification). Unfortunately it doesnt work. I tried ...
0
votes
0answers
13 views

how to define threshold value in r.stream.extract

I want to generate streams using r.stream.extract. on what basis we have to define the threshold value. I am using aster dem with 30m posting.Also i want to know the minimum stream length to be ...
1
vote
1answer
72 views

How do I convert WGS84 to Lat, Long to Google Maps in R?

I have this coordinate which I believe it's in WGS84 format x=1005740.867110, y=243957.356623 I want to plot that in Google Maps which I need to convert that to Lon, Lat. I've found this script ...
1
vote
1answer
34 views

R filter shapefiles with dplyr

How to filter shapefiles data in R with dplyr and then put it in a leaflet map? not reproducible example sorry: library(dplyr) library(leaflet) library(sp) library(maptools) library(rgdal) ...