Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
12 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 ...
1
vote
1answer
166 views

How to do supervised image classification in saga with the help of R script or Python script

I am using Ubuntu 12.04 and want to do image classification in SAGA. SAGA has numerous classification algorithms which is not present in GRASS and QGIS. I am new to SAGA, but more accustomed to work ...
0
votes
1answer
27 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 ...
0
votes
1answer
136 views

Package getcartr Installation Problems

I want to build a cartogram by following this tutorial. The first thing I did, I spent the R-R-3.1.1 version 3.1.2 then I did the following: library(devtools); ...
1
vote
2answers
794 views

Calculate area covered by a particular raster layer within polygons in QGIS

I am trying to extract information on vegetation cover within a set radius of point locations (my sites). I have succeeded in creating a new vector layer of circles with a 5 km radius around my sites. ...
16
votes
2answers
3k views

Performing Raster Noise Reduction and Edge Smoothing?

I have a raster image like this I want to delete the isolated noise point and smooth the edge (say the white single points, and I want the edges of the entity look smooth). How can I do this in ...
0
votes
0answers
19 views

Raster data in R to merge to a time series

I have gridded data files about 2000 ( see sample -each file consist of monthly rainfall and is label pYYYYMM) https://www.dropbox.com/sh/63z166tjxyu12s5/AAAs3Ccn1zdVoBYMj8Y1o303a?dl=0 ...
1
vote
0answers
19 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 ...
-1
votes
1answer
22 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 ...
0
votes
3answers
28 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
61 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 ...
0
votes
1answer
412 views

Summarize values from a raster brick by latitude bands in R

I would like to sumarize (sum and/or mean) values from layers on a raster brick based on latitude bands (been using raster package). Been looking at the package documentation and didn't find a way to ...
3
votes
1answer
311 views

Extract pixel value for corresponding gps location in R

I have animal gps data with several locations for each day and regular gaps of several days when no location of the animal was recorded. Additionally, I have satellite data in intervals of 16 days. I ...
2
votes
1answer
185 views

Extract number of vertices in each polygon in R

Simple question: how to extract the number of vertices in each polygon in R? I've found one way that works, but this is very slow (when x is a SpatialPolygonsDataFrame): y <- fortify(x) n.verts ...
1
vote
1answer
29 views

RasterStack extract() for duplicated dates

I have a a Large RasterStack of temperatures and a 10570 points in a Large SpatialPointsDataFrame and I'm using extract() to assign the temperatures to each point in R. ...
2
votes
0answers
154 views

Ecoregions shapefiles: subsetting, extracting and summarizing data from raster

I am attempting to subset and project an ecoregions shapefile from : EPA ECOREGIONS my data set is found here: SHAPEFILES and RASTER When I run this code, two major problems occur: 1) I cannot get the ...
1
vote
1answer
149 views

Determining Pixel-by-pixel Catchments in ArcHydro

I used ArcHYDRO to prepare HydroDEM (5m) without sinks, Flow direction (FDR) raster, flow accumulation raster (FAC). As I understand FAC, value of pixel shows number of pixels that contribute to this ...
0
votes
2answers
220 views

projection conversion from mercator to google maps format

Is this spTransform(Finland3, CRS("+proj=longlat +ellps=WGS84 +no_defs+ellps=WGS84 +towgs84=0,0,0 ")) the right way to project a shapefile with this projection coord. ref. : +proj=merc +lon_0=0 ...
1
vote
1answer
126 views

Find all census tracts N miles from a lat, lon point

Using R, I'd like to find all census tracts within a given distance of a point (lon,lat). i.e. All census tracts within 20 miles of 34.0522, 118.2428 I have used the sp library and over command to ...
1
vote
3answers
136 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 ...
0
votes
1answer
29 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
1answer
549 views

Can't plot polygons with R and ggplot2

I am new to shapefiles so I maybe ask some stupid questions, sorry. I want to plot a map of my region, with colour filled polygons using R. I have downloaded municipal (lines) and province (polygons) ...
1
vote
3answers
79 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) ...
0
votes
1answer
65 views

Can't import libraries to rsaga

I get this error when I'm trying to import a raster to RSAGA: > rsaga.import.gdal(paste(rast_name, ".tif", sep=""),"RASTER", env= my_env) Module 'GDAL: Import Raster' not found in SAGA library ...
0
votes
0answers
30 views

Comparing point pattern distributions using Geostatistics with R?

I have a data set consisting of about 1,500 points of an unknown distribution. About 60 of the points represent special conditions like infekted people. How can I determine if the 1,500 points and ...
0
votes
0answers
24 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 ...
6
votes
3answers
787 views

Spatio-temporal block kriging with R package gstat?

In the documentation of sp I saw that the coords argument of the SpatialPolygons function only accepts 2 columns. Is it not possible to create 3-dimensional polygons? I am doing spatio-temporal ...
2
votes
1answer
50 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
0answers
35 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 ...
2
votes
5answers
2k views

Counting road intersections and blocks

I have a shp file that consists of the road system of Mexico City. I would like to count the number of road intersections (crossings) and blocks (which I would define as a segment starting from one ...
1
vote
1answer
143 views

Clump and eliminate classes in a raster in ArcMap or R

after interpolation of sediment classes, I obtained a raster which looks like the image below (sample of the river). I would like to clump and eliminate areas within the raster that are below a ...
0
votes
1answer
17 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 ...
3
votes
1answer
43 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
36 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. ...
1
vote
1answer
36 views

Choosing R package for discrete choice model?

I am at a loss as to which R package and approach to use for my modeling. The background is: I have a transportation survey dataset combined with many other GIS datasets. I am attempting to ...
2
votes
1answer
29 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 ...
2
votes
1answer
78 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 ...
1
vote
2answers
54 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
1answer
29 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 ...
4
votes
1answer
376 views

R Raster package loop over pixels

I want to perform a trend analysis for each pixel over it's time dimension. Therefore I wrote a loop over each pixel doing the calculation but this is extremely slow. I am sure there must be a faster ...
0
votes
2answers
37 views

PostGIS raster write support in R

I want to push/write some generated raster layers to my postgres database directly in R. In theory this could be supported by the rgdal package, but sadly it isn't. In the latest version only copy, ...
1
vote
0answers
40 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 ...
2
votes
1answer
41 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 ...
2
votes
1answer
75 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) ...
1
vote
2answers
41 views

How to read ArcGIS files in R?

I am new to using spatial data in R. So far the tutorials I have seen consist of using maptools, map, ggplot2 and rgdal to open ".shp" files along with ".csv" files to plot the polygons/ points using ...
0
votes
0answers
46 views

How to get time-zones from latitude and longitude in raster?

I have a raster with longitudes and latitudes for the US with meteorological data (for about 100k grid points). I would like to get the time zone for each point in order to transform the time to local ...
2
votes
2answers
152 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
61 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 ? ...
0
votes
0answers
26 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 ...
12
votes
4answers
5k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...