Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
1answer
1k views

Image classification random forest [duplicate]

I am a newbie in R. I want to classify images using random forest in R. I am trying to learn the codes. But in the mean time, is there a push button (like a gui) in R that can be used for ...
9
votes
1answer
302 views

How to find the buildings (polygons) a user can see from a given location (point) and orientation (angle range)?

I would like to retrieve the set of buildings I can see from a given location (point -lat,lng) and orientation (interval of angles) + certainly with a given depth (e.g. 100 meters). Ideally I would ...
1
vote
2answers
1k views

Merging many rasters using Python

I have a list of many many rasters. I want to have a simple and easy to understand script that takes this and merges it into one big mosaic. I found a similar question but the accepted answer adivises ...
1
vote
1answer
156 views

plot path of points

I have a sample of the address histories of households. ID ZIP1 ZIP2 ZIP3 01 XXXXX XXXXX XXXXX 02 XXXXX XXXXX XXXXX 03 XXXXX XXXXX XXXXX 04 XXXXX XXXXX XXXXX ... It's easy enough ...
1
vote
1answer
73 views

BIOMOD Error message: argument of length 0

I’m using the package BIOMOD in R to modelling habitat in rodent species. The data formatting works but I'm getting this error message when I run Modelling: ## Conputing the models ## ...
1
vote
1answer
132 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 ...
2
votes
1answer
329 views

Remove intersect of one polygon from another in R

I am trying to remove the intersect from Poly2 onto Poly1. Below are the coords of the 2 polygons. > coords1 [,1] [,2] [1,] 992.0161 7462.531 [2,] 950.1962 7413.532 [3,] 902.3632 ...
3
votes
2answers
404 views

How to cut a SHP based on another SHP using R

I have a Shapefile of points with certain information. I have another Shapefile with polygons corresponding to the states of the country I am working with (in this case Mexico). Since I only want to ...
2
votes
1answer
327 views

R: How can I create a polygon from several polygons and a line?

I have some spatial objects that I want to combine, namely three polygons and a line. The ultimate goal is to create a polygon that I can overlay on an area of a map of administrative divisions of the ...
1
vote
1answer
287 views

Rpy2 Unable to Load in Fresh QGIS Install

after installing qgis the a message given below is shown Unable to load the plugin: Unable to load required package rpy2. Please ensure that both R, and the corresponding version of Rpy2 are ...
4
votes
2answers
243 views

How to do a looping to Interpolate a huge Rainfall Time-series in GRASS GIS or R

In GRASS GIS I have access to a table in PostgreSQL Database with this structure: Table Name: rainfall_time_series Columns: id | year | month | day | value_mm | x | y | gauge_code Setting g.region ...
1
vote
1answer
629 views

How to replace values in rasters in directory 1 based on condition on other rasters in another directory?

Having 10 raster files in one directory and another 10 rasters in another directory and both have the same dimensions. directory 1: files1 <- list.files("C:\\2010", "*.envi", full.names = ...
1
vote
0answers
51 views

How to remove polygons in shapefile based on attributes in R [duplicate]

I have a shapefile where some attribute data is blank. I can delete those rows attribute table using na.omit. However, the polygons remain when I map the shapefile. I'm using R to make these changes. ...
7
votes
1answer
1k views

Removing rows in shapefile in R

I've imported a shapefile into R, and joined it to a table. My shapefile contains all the census ids, while my table only contains selected census ids. I'm now trying delete all the rows didn't get a ...
2
votes
1answer
542 views

R - Crop a pixel image produced by spatstat with a boundary shape

i am using the very good spatial statistic package spatstat to produce probability maps of spatial point patterns. Here is a simple working result from the examples to try out. require(spatstat) ...
3
votes
1answer
333 views

Find which grid cells contain a point

I have a dataframe with x,y coordinates. I've sampled 10 x,y coordinates from my dataframe: y <-c(24.637032,21.569813,21.687,19.677183,24.72438,21.433136,24.637032,22.21065,21.443762,25.273882) x ...
5
votes
1answer
190 views

Having trouble finding out what coordinate system a map is using, and how to convert it

I'm using Small Area shapefiles in Ireland from the Central Statistics Office (CSO) website. The link to these is here http://census.cso.ie/censusasp/saps/boundaries/ED_SA%20Disclaimer1.htm (Look for ...
6
votes
3answers
689 views

Classifying point coordinates to countries or continents?

I have about 50 000 points (latitude and longitude), and I would like to find out in which country each of the points is located. It does not need to be super precise, though. (Or actually I only ...
4
votes
1answer
2k views

Calculate distance between X/Y coordinates by individual in R

In R, I'd like to calculate the straight-line distance between each capture of an animal in my dataset - no need to take into account the curvature of the earth. I have a dataset that looks like ...
9
votes
2answers
1k views

Choropleth in R: custom breaks and plotting

I have a question with regard to plotting a choropleth map. What is recommended with regard to plotting a map with custom breaks? And make it look a bit attractive. In my script I have used the ...
4
votes
2answers
680 views

QGIS affine - form of equation

I am at the mercy of a govt authority who have provided utility information in a cad format with a 0,0 origin and a nonsense grid. About a dozen files, the grid and origin are entirely arbitrary. To ...
30
votes
5answers
9k views

How to make beautiful maps in R?

There are quite some nice possibilities to analyse spatial data in R and in the context of my current project I would like to use R more frequently to do that. Until now I plot my maps with ggplot2 ...
6
votes
1answer
114 views

What does shading indicate in home range plot?

I've simulated a home range in R using the clusthr function from the adehabitatHR package. The home range is made from 50 x,y coordinates. The output is attached. I'm trying to get clear on what ...
3
votes
1answer
195 views

Difference between gdal versions in reading raster on two machines?

I am using raster data from Afripop.org and using the R package raster (raster_2.0-41) to do all my computation. Everything has been working out just fine until I tried sending some jobs to a remote ...
6
votes
1answer
190 views

weighted mean across rasters in R

I have 2 rasters. One raster (bio1) contains temperature information across a continent. The other (sp) contains, for each cell, a probability of occurrence for a species. I would like to calculate ...
4
votes
2answers
934 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):https://echange-fichiers.inra.fr/get?k=rLSyoavrnifGyH5XrlO samples = 1440 lines ...
4
votes
2answers
2k views

How do I read a 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 ...
5
votes
2answers
1k views

How to implement bivariate Ripley's K function in ArcGIS 10?

The attached image shows a forest gap with red pine represented as circles and white pine represented as crosses. I am interested in determining if there is a positive or negative association between ...
6
votes
2answers
975 views

Convert several SpatialPointsDataFrames to raster

There are 100 SpatialPointsDataFrames in my Workspace. I loaded them on this way: filenames <- list.files(path="", pattern="XYhectareTravelTimes_ez+.*shp") for(i in ...
0
votes
2answers
91 views

Reversing a “combine” function on a raster

I have a raster that I think was "combined" using an arcmap function. I am wondering if there is a way to extract just one raster layer from the combined dataset in order to use it separately, either ...
4
votes
1answer
228 views

Use csv file as raster file and stitch them together

I'm having an issue trying to stitch together 100 32bit Tiff files (coming from thermal imagery video and extracted as 32bit Tiff). I used Hugin to mosaic the pictures extracted from the video which ...
4
votes
1answer
699 views

Self organizing maps and spatially Constrained Clustering in R

There are a few algorithms to perform spatial clustering in R but most of them focus on point pattern analysis (for example here). I would like to perform spatial constrained clustering for polygon ...
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 for global soil moisture. From the metadata, the projection is cylindrical and the resolution is 25 km (it is based on authalic sphere based on International 1924 ...
2
votes
1answer
437 views

Inverse distance weighted interpolation for categorical and/or binary datasets

I want to perform an Inverse distance weighted (IDW) interpolation to a series of points. However my data set can be categorical or binary and just like the IDW I want to interpolate the new values ...
5
votes
2answers
507 views

Spatial Analysis with Factors/Classifications

When doing analysis on spatial data with associated information that is numeric, it is possible to use techniques such as Kriging or Interpolation or Cluster Analysis to find out interesting ...
7
votes
2answers
454 views

How to create a solar intensity map for a garden plot?

I'm interested in creating a raster surface that depicts the average solar intensity per unit area for a small garden plot. I imagine the inputs into the model would be the following: Plot ...
1
vote
0answers
501 views

How to clip the contour map with the polygon using R software?

Hi I am wondering how can I create the contour lines from the discrete x, y and z dataset and then add the shapefile to cut the contour lines by polygon. I want to clip the contour map by the shape ...
10
votes
2answers
2k views

Aggregating points to grid using R

I have a question with regard to spatial aggregation in R. What I am trying to do is aggregate a point dataset to a grid. I am unsure however how to do this as I have little experience with this sort ...
1
vote
1answer
121 views

Set certain amount of pixels to 1 inside of a polygon (GRASS)

I have a rather coarse vector map with polygons and want to calculate a (sufficiently) finer raster map defined by spatial extension and resolution. Every polygon of the vector map has a value ...
2
votes
0answers
42 views

Spatial indexing of a point pattern in R [duplicate]

I have a point pattern and a tessellation (grid) in R. Is there a way to spatially index each of my points? In other words, my tessellation grid has n quadrats, I would like to know for each of my ...
1
vote
1answer
149 views

Interpolated map using pca axes

I have done between group pca in R. I want to make an interpolated map using the eigen values of the first three pc axes. I want to produce a map using each of the three pc axes and finally combine ...
3
votes
0answers
748 views

How to Export a Shapefile as KML Using R

All, I have exported an ESRI shapefile (polygon) to KML using R, but the resulting layer shows only the outer extent of the polygon. How can I fill in the area with a color? Any help is greatly ...
5
votes
2answers
708 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 ...
4
votes
0answers
51 views

ArcGis Raster Resampling Question [duplicate]

Possible Duplicate: How do you decide what interpolation method to use for resampling raster data? I want to interpolate a certiain target variable over a large territory. I trained a ...
4
votes
1answer
148 views

How to stack rasters for ecological analysis?

The attached image shows two different forest openings. Each opening has the following layers associated with it: Point shapefile 1 = A red X which represent a large "legacy" tree in the gap Point ...
2
votes
1answer
2k views

Converting geographic coordinate system in R

I have points in geographic coordinate system and I wanted to convert them to swiss grid (CH1903+). Sample data: id lon lat 2 7.173500 45.86880 3 7.172540 45.86887 4 7.171636 ...
4
votes
1answer
217 views

How to create cohesive Spatial Pixels from Spatial Points Dataset

I have a Spatial Point DF spo (covering an irregular shaped area of interest). The data are not on a regular grid due to crs transformation. My goal is a raster with predefined resolution and extent ...
6
votes
1answer
614 views

How to convert an Erdas training set to .csv?

I am working with Erdas Imagine's Signature Editor to perform maximum likelihood classification. I need to use the same training set created in Erdas for other classification using R. Is there a way ...
1
vote
1answer
560 views

Intersection between two SpatialPolygonsDataFrame using gIntersection function in R

I want to select a subset of my map (a SpatialPolygonsDataFrame) to create a new vector map = part of the initial map included inside a given polygon (eventually, inside several polygons). I have a ...
2
votes
1answer
922 views

Convert a SpatialPolygonsDataFrame to raster using rasterize function

I'm trying to convert my map (a SpatialPolygonsDataFrame) into a raster, using rasterize function, here is a bug that I don't understand... > class(parcel) # this is my map [1] ...