Statistical computing language and software environment.

learn more… | top users | synonyms

3
votes
0answers
62 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 ...
6
votes
2answers
463 views

Resources on using R in QGIS for R users?

This is a very basic question, but I'm having a heck of a time figuring it out because so much of the QGIS documentation is oriented toward use of the GUI. I want to be able to run R scripts in QGIS, ...
2
votes
1answer
33 views

Matching two point clouds without loss (nearest neighbor, but more complicated)

I have two point clouds, one with demographic and one with electoral data. Points in both clouds represent the same empirical entity (say, a village, or an urban neighbourhood), but are not in the ...
0
votes
0answers
33 views

Resources for mapping and displaying spatial data in R

I'd like this to be a repository for all resources available specifically for mapping and displaying spatial data in R. I've seen (and contributed) to this post, but would like this post to focus ...
23
votes
6answers
4k views

Tutorials to handle spatial data in R

Does anyone know some good tutorials to handle spatial data in R? I know that there are some packages like rgdal and maptools but I haven't actually found usefull tutorials to get in touch with the ...
0
votes
1answer
71 views

R - Dealing with missing data in SpatialPolygonDataFrames for Moran.test

I'm trying to use Moran.test on a SpatialPolygonDataFrame consisting of 7194 elements in R. I know that there is around 150 polygons with NA values. First I generate a spatial weights matrix: ...
1
vote
1answer
162 views

How to process MODIS ndvi data using QGIS/GRASS/R?

I have MODIS ndvi data (MODIS_Grid_16 days NDVI) from the iberian peninsula (3 tiles), from February of 2000 to August of 2012 (really big data). I want to know how to deal with this kind of files. My ...
2
votes
0answers
154 views

Mapping Geocoded addresses onto Census shapefiles in R

I have a list of addresses that I have geocoded to get the corresponding longitude and latitude. > AddressDetail <- geocode(match_address) > coordinates(AddressDetail) <- c("lon", "lat") ...
1
vote
1answer
220 views

r.surf.contour in QGIS 2.0

I have a problem with r.surf.contour. I create a DTM with v.to.rast.attribute and then use the r.surf.contour and it works fine in QGIS 1.9 but with QGIS 2.0 doesn't work. I have a contour shapefile ...
0
votes
0answers
67 views

Defining the boundary of a catchment area

I digitized contour lines from topographic maps and created a DEM. With the DEM, I estimated the boundary of a catchment area. Estimated positional accuracy of topographic maps is RMSE = 65 m, with a ...
2
votes
2answers
254 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from ...
5
votes
1answer
1k views

R : convert a spatial polygon objet to spatial polygon data frame

My goal is to modify an existing shapefile by merging certain polygons. After importing the shapefile and using the UnionSpatialPolygons command, I get the polygon outline that I want. However, this ...
6
votes
3answers
220 views

Overlay a spatial polygon with a grid and check in which grid element specific coordinates are located

How can one use R to split a shape file in 200 meter squares/sub-polygons, plot this grid (incl. ID numbers for each square) over the original map below, and evaluate in which square specific ...
8
votes
3answers
169 views

R, rasterVis and RGL: how to prevent reflective surfaces?

I have been experimenting with digital terrain model files in ESRI ASCII grid raster format. Despite zero experience with this type of data I found it very easy to load into R, as per code below. The ...
2
votes
2answers
363 views

R Raster package: write NetCDF with time dimension

I am writing a rasterbrick with multiple layers to a netcdf file using the raster package in R: writeRaster(gridfile, "Data", "CDF", overwrite=TRUE, ...
2
votes
0answers
88 views

Per-pixel calculations on a raster stack using GDAL

In R, it's relatively trivial to perform per pixel calculations based on a raster stack (e.g., get std.dev for each pixel on a 12 layer GeoTIFF). Unfortunately, the speed is less than desirable when ...
2
votes
1answer
60 views

Conversion of Latitude/Longitude to different map projection

I have two m*n matrices coming from a WRF-ARW simulation: one exclusively with longitude values and one with only latitude values. For both matrices I know the originatin projection (lambert conic ...
-1
votes
1answer
101 views

How to create a loop in R to average ndvi raster time series?

I have monthly ndvi raster geotiffs for multiple years. I need to run a loop to get the average of each of these ndvi grids/rasters. Each of my ndvi rasters contains 143 pixels. I would like the ...
2
votes
1answer
390 views

Is it possible to create and run custom R scripts in QGIS 2.0?

I am new to QGIS and most of the tutorials I have found are for 1.x and the overhaul has me confused. I would like to create R scripts and run them in QGIS. I have read here that it's possible using ...
3
votes
0answers
58 views

Performing cluster analysis in R with Point Datasets

I am a R-Beginner, but I want to use it for some spatial statistics. I want to check the relation between the occurrence of ill persons and the existence of water in a area of interest. To give you a ...
5
votes
0answers
78 views

Calling external files in Python Geoprocessing Service

I have created a Python script which calls an R script and then reads the output back into Python. I can run this tool in ArcGIS Desktop (10.2.1) and it works fine. When I publish as a geoprocessing ...
2
votes
2answers
89 views

SpatialPointsDataFrame properties and operators in R

I have created an object of type SpatialPointsDataFrame using the sp package in R. However, I am confused about the @, $, . and [] operators and when to use them to access the different properties of ...
2
votes
3answers
77 views

How to reclassify only a part of a raster but keep the rest unchanged (ArcGIS or R)

I'm trying to reclassify only a certain part of a raster...not the entire raster. Here's the problem. I have a LULC raster of the entire US. There are some issues with the raster that I want to ...
10
votes
1answer
1k views

How to perform Random Forest land classification?

This is a follow-up to a previous post: Machine Learning Algorithms for Land Classification. It seems that the Random Forest (RF) classification method is gaining much momentum in the remote ...
6
votes
1answer
168 views

Help choosing most suitable bivariate choropleth mapping coloring scheme

I am trying to overlay a nominal variable (2 categories - rainfed vs irrigated) in a choropleth map over a numeric variable. In order to highlight the difference in pattern among the two ...
0
votes
1answer
38 views

Error in performing transect in ambur R?

I'm trying to filter a transect, window size is 5 and filter individual baselines is set to 0. I select the transect shapefile, then the inner baseline shapefile and it gives me this error. Error in ...
1
vote
1answer
87 views

Convert from eastings and northings to latitude and longitude without ArcGIS

I am not a GIS user, but I was given some shapefiles to work with. I do not have ArcGIS or any other GIS tool, but I do have Matlab with the mapping toolbox and R. From what I can tell, the data is ...
0
votes
4answers
140 views

Buffer in QGIS/R is 650-670 m wide instead of 500 m

I am trying to make a 500 m buffer for my polyline layer. Unexpectedly, I receive buffer varying from 650 to 670 m, depending on location. As many resources recommend to use UTM before making a ...
3
votes
2answers
122 views

How can I create a choropleth from the 2010 census ZCTA shapefile using R and ggplot2?

I have created state and county choropleths in R using ggplot2. The method I have used for this came from Winston Chang's "R Graphics Cookbook". For those choropleths the map was already represented ...
0
votes
1answer
234 views

r openproj to plot in open street map in a different projection

I am very new to geographic data, so I am sorry for the stupidity of the question. I need to plot some data that are in this projection EUREF_FIN_TM35FIN Projection: Transverse_Mercator ...
2
votes
3answers
60 views

Relative areas projection independent?

I need to calculate how much (in percent) each of thousands of spatial polygons shrink after some events. I use R and the very useful sp-library. Example: Projection: "+proj=longlat +datum=WGS84 ...
0
votes
1answer
71 views

Processing HDF4 data in R

I am trying to process MODIS files in R, which are in HDF4 format (link to data). I have experience reading in HDF5 and netCDF files in R, but HDF4 seems to be a common problem in R. I am using a MAC ...
0
votes
1answer
36 views

linked maps not working in R

I am trying use the micromap package in R, but something is not working. This is the code: library(micromap) library(rgdal) library(ggplot2) setwd ('C:/Users/Jesus/Dropbox/linked maps/Chapter4') ...
2
votes
2answers
80 views

What is the latest version of R that supported gpclib?

Does anyone know what the latest version of R that supported the gpclib package? I was using the latest version but when I tried to install gpclib, it said that it was unable due to my version of R. ...
10
votes
3answers
2k views

How to find and merge duplicate points?

I have two point shapefiles: Red and Blue. Each point shapefile has a z value which represents a radius (i.e. represented as buffers in the example). A duplicate point is defined as a point that ...
2
votes
1answer
48 views

R generated files getting scrambled on import in ArcGIS

I want to put this out there just in case someone somewhere has experienced similar issues. I have a .csv file that I have generated in R 3.0 using this code: ...
2
votes
1answer
54 views

Null values coerced to zero (0) when exporting to csv or txt

I extracted values from several rasters, and in some cases, the value is null. However, when I export the attribute table to a csv or a txt file (from ArcMap), the null values are converted to 0. Is ...
0
votes
0answers
36 views

Dates are off when opening netcdf file in R

I have a netcdf file with the time dimension that goes from 12/2007 until 12/2010 with monthly time steps. I can see the correct dates in both arcgis and panoply. Panoply tells me this file is a ...
0
votes
1answer
61 views

How to load Georeferenced Scanned Maps in R

I have a geo-referenced scanned Map in GeoTiff format, which I would like to load into R. My intention is to plot some vector data (points and polygons) over this map using maptools package. Is ...
4
votes
1answer
354 views

How to split a polygon using R

I have an irregular polygon which is a spatial object. I want to divide it into multiple polygons (say, n=25) with equal height. To show how I want to divide it, I've plotted grids on the ...
13
votes
4answers
4k views

How to cluster spatial data in R?

I am very new to R, so please bear with me : > I have bunch of data points with latitude and longitude. I want to use R to cluster them based on their distance. I have already taken a look at this ...
2
votes
1answer
83 views

how to extract a variable at specific time and depth from netcdf in r

I have the following netcdf file containing 7 variables and 4 dimensions. [1] "file data.nc has 4 dimensions:" [1] "depth Size: 12" [1] "time Size: 37" [1] "x Size: 305" [1] "y Size: 432" ...
2
votes
1answer
57 views

shape file for linked micromap not working

I am trying to replicate the example provided in the micromap R package of a linked map with the poverty rate for the 50 US states. I am trying to achieve the same results with a Shapefile from ...
2
votes
0answers
44 views

python equivalent of spatstat's spatial point process functions

Is there a free python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if ...
3
votes
2answers
90 views

Exporting Maps as PDFs in R

In R, trying to export choropleth maps with density and frequency histograms as legends; have had success exporting as an image but not as a pdf. Exporting as an image (.png) works well; the map, ...
1
vote
1answer
53 views

R: distance from one point to many polygons

OK so I have a spatial polygons data frame, and I have a point of interest. I want to add a row to the SPDF that contains the distance from the centroid of each polygon to this given point. How do I ...
2
votes
2answers
43 views

How to extract values of one point dataset to second point dataset based on proximity using R?

I have to point shapefiles and would like to extract values from one point shapefile to another one based on some measure of proximity, i.e. for any given point in dataset x, extract the mean value ...
0
votes
1answer
39 views

Units of gBuffer from rgeos package

I have this polygon: library(maptools); library(sp) setwd(system.file("shapes", package="maptools")) columbus <- readShapeSpatial("columbus.shp") proj4string(columbus) <- CRS("+proj=longlat ...
1
vote
1answer
84 views

Apply r.neighbours or Neighbourhood analysis (LecoS plugin for QGIS) to 3000 rasters

I need to apply r.neighbours or Neighbourhood analysis (QGIS plugin LecoS (or equivalent) to 3000 rasters and define a neighbourhood of 5 x 5 and calculate the mean. I suppose I need to create a ...
3
votes
1answer
50 views

plotting a SpatialPolygons object using lines() without lines connecting separate polygons

This is almost an extension of a question asked on stackoverflow (http://stackoverflow.com/questions/12196440/extract-feature-coordinates-from-spatialpolygons-and-other-sp-classes), so I'll use the ...