Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
0answers
18 views

Creating Concentric circles using the ggmap function from GGMAP package R [duplicate]

I would like to create two concentric circles using the ggmap package and ggmap function, one being 1/4 mile and the other 1 mile radius around the 16 metro rail stations in Los Angeles California. It ...
1
vote
0answers
52 views

Effects of heterogeneous vegetation in mapping canopy cover using randomForest in R

I have a 5.8 m resolution satellite image (LISS IV by IRS-P6, in bands 4, 3 and 2) of a densely forested region in the Eastern Himalayas. My objective is to predict regions of canopy cover. Regions of ...
1
vote
1answer
66 views

The stability of randomForest models after increasing predictor variables

With reference to the posts: Incorporating terrain data to predict canopy cover using randomForest in R and Random-Forest Classification of 10cm Imagery for species-distribution in R (no point-shapes) ...
2
votes
1answer
79 views

Incorporating terrain data to predict canopy cover using randomForest in R

This is a subjective question. Thank you bearing with me. I have a 5.8 m resolution satellite image (LISS IV by IRS-P6, in bands 4, 3 and 2) of a densely forested region in the Eastern Himalayas. My ...
1
vote
0answers
26 views

Assign Z value to new coordinates based on interpolated response surface in R

I've created a response surface of sorts based on interpolated z values (bottom of post). I'm looking for the most efficient way to assign the respective z value to a new point (actually, a dataset ...
1
vote
1answer
81 views

gDistance to determine closest point to polygon: does changing projection change results qualitatively?

I'm using gDistance from the rgeos package for R to find the nearest point to a polygon. The projection of both points and the polygon is +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 ...
0
votes
0answers
29 views

Creating a for.loop to randomly extract data from a raster stack within shapefile extents

I'm currently comparing a MODIS time series of about 15 years to determine the effects of pasture management practices on the "greeness" of pastures in a water catchment. So far I've been able to ...
2
votes
2answers
48 views

R apply function in turn to each subset of a spatialPolygonsDataFrame

I'm trying to get the area of all the polygons in a SpatialPolygonsDataFrame: parcProj. library("rgeos") gArea(parcProj[2,]) works fine but: apply(parcProj,1,gArea) or ...
1
vote
0answers
13 views

weighting scheme of gstat for fitting models to variograms

I use R and the gstat package to construct variograms of temperature, and I would like to ask If anyone knows what weighting scheme does the gstat package use to fit a model to the sample variogram?
0
votes
0answers
12 views

fit polynomial function on spectral data

I want to fit a polynomial function (max. 3rd order) on each raster cell over all my spectral bands (Landsat 1-7) creating a new raster(stack) representing the coefficients. I got my data (including ...
1
vote
0answers
117 views

Python vs R for analzing spatial data [closed]

I am relatively new to both the python and R programming languages, having a small amount of exposure to both. Which language has the edge when working with spatial data and when would you use R over ...
2
votes
0answers
51 views

How to clip or erase a csv file with a non-rectangular shapefile?

I can clip a csv file with a ogr2ogr having 4 extents of a rectangular polygon. Is it possible to clip a csv file with a non rectangular shapefile?
2
votes
2answers
189 views

How to make a movie from a ascii grid files?

Lets say I have several ascii grid files for each time step for a particular location. I would like to spit out the image for each of these ascii grid files and legend on the side bar. I also would ...
0
votes
0answers
35 views

Merging two regions of several into one, to get output SpatialPolygonsDataFrame file

I've been using the large SpatialPolygonsDataFrame file with outdated border of regions. I want to correct boundaries, but also hope to get in the end Polygons with Data Frame again. I used the ...
11
votes
2answers
221 views

How does spatial polygon %over% polygon work to when aggregating values in r?

I'm working on an environmental epidemiology project where I have point exposures (~ 2,000 industrial hog operations - IHOs). These IHOs spray on nearby fields, but the feces water droplets and smell ...
0
votes
0answers
17 views

R to ArcMap, erroneous change of spatial reference

I have SPOT5 imagery from Northern Sweden / Finland. Data is downloaded from SACCESS service and is provided in Sweref99 TM projection. When opened in ArcMap the data is shown in Sweref99 TM as ...
0
votes
1answer
96 views

Extracting point data for each lat and long from raster file into a dataframe

I have gridded data files ( see sample -each file consist of monthly precip and is label pYYYYMM) https://www.dropbox.com/sh/63z166tjxyu12s5/AAAs3Ccn1zdVoBYMj8Y1o303a?dl=0. I am trying to extract ...
1
vote
0answers
67 views

moving window regression on raster stack in R

I want to perform a moving window regression on every pixel of two raster stacks representing Band3 and Band4 of Landsat data. The result should be two additional stacks, one representing the ...
0
votes
0answers
51 views

How can I convert a geojson file to topojson in R?

I have tried the geojsonio package but it does not allow me to convert my geojson to topojson format. I know there are web applications available online to convert from geojson to topojson, but my ...
1
vote
1answer
71 views

Function to merge geojson and csv data in R

I have been using merge() to merge my geojson file with csv data in R. My codes are as follows: map@data <- merge(map@data, csvdata, by.x="ID", by.y="ID") However, after exporting the geojson ...
2
votes
3answers
207 views

Unable to read raster into R: 'TIFFReadDirectory:Failed to read directory at offset'

I'm getting a weird error when trying to read a raster into R. >r <- raster('myraster.tif') Error in .local(.Object, ...) : TIFFReadDirectory:Failed to read directory at offset 2606110 ...
3
votes
1answer
173 views

Strange spatial interpolation results from ordinary kriging

I'm using Ordinary Kriging to interpolate a set of spatial data. I'm working on different sets which represent different days of measurement. I get good results, apart from one specific set. Will post ...
11
votes
2answers
220 views

Point overplotting on maps in R (e.g. with ggplot2) - how to push points to the side, mark original positions, combine close-by points …?

I've got a database containing languages, their longitudes and latitudes and a feature value (either category 1, category 2 or both - in the plot these are marked red, blue and green respectively). ...
0
votes
1answer
79 views

How can I export a GeoJSON file from R?

The write. function allows one to export a JSON file, but it does not seem to work for a GeoJSON file. This is the code i ran: write(map,"Map Layer2.GeoJSON") and this was the error produced: ...
1
vote
3answers
297 views

How to calculate mean aspect in circular statistics?

Measurements of angles (e.g. compass bearings, aspect) are circular in nature (e.g. 0 and 360 degrees coincide) and therefore cannot be meaningfully described by ordinary arithmetic means. I have a ...
1
vote
3answers
120 views

Spatial distribution of an invasive specie across a landscape : what analysis?

I'm studying the spatial distribution of an invasive specie introduced in a natural area. This plant, that thrives in sunlight, grows in thickets (patches). The population of my study site (10x10 km) ...
3
votes
1answer
144 views

How do I set up the R Script folder in QGIS 2.8.1 Processing Toolbox (Advanced Interface)?

I am currently lacking the R Script folder in my processing toolbox under the advanced interface tab. I suspect this could be a result of the firewall in my company's wifi. I already have R ...
0
votes
1answer
133 views

Convert Eps to geographic distance using DBSCAN

I am using the dbscan cluster (package fpc) in R to find clusters on a set of latitudes/longitudes coordinates. I want to find an eps distance that corresponds to a meaningful geographic distance ...
0
votes
0answers
34 views

weight a raster by another for a model ( R/ arcgis/maxent)

I have an idea in mind for my project but I can't figure out how to do it in R and Arcgis. Basically I would like to do a weight a raster by another for my maximum entropy model. -I got a raster ...
0
votes
1answer
34 views

TopologyException error during fortify SpatialPolygonsDataFrame

I tried to reproduce a recent question on spatial data visualization using ggplot2 and received the following error message during fortify(world, region = "ISO3"): Error: TopologyException: Input ...
2
votes
1answer
67 views

Perform affine transformation on shapefile with OGR, GDAL, or other command line tools?

Transformations with WKT or EPSG code are made easy with ogr2ogr, but are there tools for me to define my own affine transformation to apply to the coordinates of a shapefile? Or, in general, is ...
0
votes
1answer
57 views

Add Polygons to SpatialPolygons via loop / iteration using R?

Just out of interest: I'm creating a SpatialPolygon (R with package "sp") with a number of Polygons within. Is there a way to loop this task? I'm doing it manually as follows. The Polygons consist of ...
2
votes
1answer
70 views

Extracting point information from raster in R

I'd like to work with climate data available from here and extract values of certain locations (for which I have lat and lon). This is what I've done so far: library(SDMTools) library(raster) test ...
1
vote
2answers
77 views

How can I loop through a list to create rasters and write them to .tif files?

I received 3 .mat files that each contain several daily maps. I need to take them and get them into ArcMap (10.2 if that matters) as a .tif with spatial information. I have already used the R.matlab ...
0
votes
0answers
38 views

Rasterize and union problem

i've done the union first and then rasterized it. But now i want instead of that, to rasterize each one and then merge it as one. How do i do that? I mean without the union first off. ...
2
votes
1answer
142 views

How can I parse modis MOD13Q1 quality layers in R?

I'd like to parse MOD13Q1 VI quality layers in R. My original code must have been incorrect, because it gave lots of "deep ocean" flags in the middle of Brazil. After the changes suggested by ...
2
votes
2answers
211 views

Classifying DEM according to elevation in R?

r<-raster("DEM.tif") How to do the classification based on every ten meters for example and have different colors too?
0
votes
0answers
112 views

Error in downloading MODIS image using R script

I am trying to download "MOD13A3" MODIS image using R script (http://r-gis.net/?q=ModisDownload) but each time it's ending in error. How to make it work ? ...
5
votes
1answer
170 views

Plotting data without geographical coordinates besides the main map in ggplot2

I am trying to plot some data as a bubble chart on the world map using ggplot2 package in R. I am able to proceed as follows. # Load necessay packages library(ggplot2) library(rworldmap) ...
0
votes
0answers
67 views

Location allocation optimization using R?

I need to allocated zip codes to offices. Each zip code has certain demand from 0 to 120 clients and each office has certain capacity from 500 to 2500. How do I do this so that: All the zip codes ...
3
votes
1answer
168 views

Difference between raster() and readGDAL()?

I am new in working with rasters and after having trouble working with them i'd like to know the difference between those two import functions. for example i did this library(raster) ...
3
votes
1answer
154 views

Reading and plotting shapefiles with a custom function in R?

I have this piece of code that want to turn into a function r<-readShapeSpatial("roads") b<-readShapeSpatial("buildings") lc<-readShapeSpatial("landcover.shp") here is the preparation ...
1
vote
1answer
65 views

error of randomforest classification with Landsat data

I want perform randomforest classification on Landsat data. Here is some code I found from a paper. But when I run into the "classification" part, there is an error said "Error in eval(expr, ...
1
vote
0answers
49 views

Matching (joining) two slightly incompatible polygon shapefiles

I have two shapefiles that represent two slightly different zonings of the same area (municipality zoning and transport zones), about 3000 polygons each. Several smaller municipalities may form a ...
1
vote
2answers
36 views

Include non-raster object in overlay function in R

I have two raster objects and I would like to calculate values of the first conditional on values in the second. I am currently using the overlay function, but unfortunately I can't seem to pass non ...
2
votes
1answer
84 views

Defining projection using readOGR if the shapefile doesn't have it?

I think that by using readOGR to import a shapefile renders worthless to put proj4string to the script since if any coords are available in the shapefile, it will be transported through the readOGR. ...
2
votes
1answer
86 views

encoding error between maptools and arcgis

I am having a trouble of encoding at writing shape file by maptools (0.8-34) of R by MacOSX and reading that by ArcMAP 10.2.1 in windows 8.1 through parallels desktop. Using an original shape file, I ...
1
vote
0answers
83 views

What is the most user friendly OSM route planning API?

I ran a workshop last week on GIS for Transport Applications. In Nick Bearman's tutorial (available from the previous link) we used Google's routing API (via ggmap) and CycleStreets.net routing ...
0
votes
0answers
82 views

How to set raster projection in R

I am new to R and grib files. library(raster) I have a "grd" file in and I am trying to set the coordinates to polar stereographic projection r <- raster("p190001.grd") # class : ...
2
votes
0answers
64 views

How to create geometric shapes in R? [closed]

I want to plot some geometrical shapes but I dont know what values to put in a vector so they can be plotted. How do you know what numbers should be inserted in a vector so they can create certain ...