Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
1answer
32 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
12 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
15 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 ...
2
votes
2answers
880 views

Variogram model fit compatability among geoR, gstat, and nlme packages in R

I'm trying to specify the covariance structure parameters in a linear mixed model (using the correlation structure facilities in nlme). The parameters are estimated from a gstat or geoR variogram ...
5
votes
2answers
2k views

Reading File Geodatabase using R?

File geodatabase (fgdb) includes numerous file geodatabase tables. As far as I know they exist as dbf files, but are within a Database.gdb. In ArcCatalog, the file pathway resembles ...
0
votes
0answers
13 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
25 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 ...
11
votes
2answers
58 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 ...
1
vote
1answer
285 views

Spplot labels in R how to change

Can anyone tell me how to change the labels in a legend created by spplot in R? It is a typical vertical ribbon legend automatically generated by spplot. Based on color, it is labelled 1-7 but I ...
0
votes
0answers
16 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 ...
0
votes
1answer
138 views

Why Stacking rasters return all values as NAs?

I have several rasters that I want to do some calculations ,basically calculating the moving average. saf class : RasterStack dimensions : 720, 1440, 1036800, 601 (nrow, ncol, ...
5
votes
2answers
1k views

How to extract values from a raster according to Lat and long of the values?

having 12 files with 12 hdrs for one year: these files are raster (projected WGS84,lat long): samples = 1440 lines = 720 bands = 1 header offset = 0 ...
4
votes
1answer
1k views

How to re-project ease( Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree? [duplicate]

I have nc (NetCDF) files . From the metadata, the projection is cylindrical and the resolution is 25 km (it is based on authalic sphere based on International 1924 ellipsoid). I want to re-project ...
-2
votes
0answers
30 views

Problem during rasterization [on hold]

coastline<-readShapeSpatial(".shp") road<-readShapeSpatial(".shp") railway<-readShapeSpatial("") boik<-gBuffer(railway,width=50,byid=T) bodik<-gBuffer(road,width=50,byid=T) ...
1
vote
0answers
54 views

Python vs R for analzing spatial data [on hold]

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 ...
0
votes
0answers
9 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 ...
2
votes
2answers
127 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 ...
2
votes
0answers
26 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?
0
votes
0answers
14 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
168 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
35 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
137 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
810 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 ...
1
vote
0answers
24 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
24 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
34 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
70 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
420 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
312 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
186 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
156 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
221 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
127 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
142 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
554 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
80 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
69 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
34 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
25 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
789 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
54 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
37 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
1k 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
146 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
51 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) ...