Statistical computing language and software environment.

learn more… | top users | synonyms

5
votes
1answer
243 views

Export spatial overlay from R package PBSmapping

After realising that the GEOS-library in Grass and the R package rgeos is incredibly slow, i found the packe "PBSmapping" to do the same thing, a Union of two Polygons and to cut the parts with no ...
1
vote
1answer
141 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 ...
2
votes
5answers
882 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 ...
0
votes
0answers
105 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. dir2 <- list.files("D:\\2010+2011", "*.bin", full.names = TRUE) ...
1
vote
1answer
67 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
123 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 ...
3
votes
2answers
313 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
282 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
279 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 ...
1
vote
0answers
50 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. ...
1
vote
1answer
407 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 = ...
2
votes
1answer
455 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) ...
7
votes
1answer
933 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
217 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 ...
5
votes
1answer
150 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 ...
4
votes
2answers
203 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 ...
4
votes
2answers
253 views

Draw two separate lines from A to B and B to A

I have an Origin-Destination table like this Origin Destination Value A B 10 B A 100 A C 120 ... For all the locations A, B, C... I have another table indicating their location (Lat and Lon) Is ...
4
votes
1answer
1k 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 ...
8
votes
2answers
958 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 ...
3
votes
1answer
248 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 ...
2
votes
1answer
237 views

Tearing in ggmap (R) after using spTransform and random point generation using splancs

I am using R and the package ggmap to try and generate some random points within the city limits of Chapel Hill, NC. I have downloaded the shapefile for the town of Chapel Hill from the Orange County ...
6
votes
1answer
107 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
643 views

Interpolating Maps - Statistical Learning Techniques vs Spatial Statistics Techniques

I have recently begun experimenting with the inteprolation of variales over a whole country. I have good sized training set where I have several dependant variables (continuous and categorical) ...
10
votes
5answers
4k views

How best to fix a non-noded intersection problem in PostGIS?

I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
3
votes
1answer
166 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
157 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
1k 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 ...
6
votes
3answers
591 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
572 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
2answers
678 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 ...
0
votes
2answers
83 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
207 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 ...
2
votes
1answer
344 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 ...
26
votes
5answers
7k 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 ...
2
votes
1answer
151 views

MODIS Level 1B batch process

I am a new MODIS Level 1B user. I have been using the MODIS Swath tool to process my images. However, I have over 1000 images to process. I was wondering if there a script available in IDL or R (very ...
5
votes
2answers
391 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
391 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
409 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 ...
4
votes
1answer
987 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 ...
9
votes
2answers
1k 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
592 views

Mosaic large dataset with R

I need to merge together 20 32 bit tiff. For that I tried ArcGis but it keeps crashing (the individual tiff are about 1GB). I need a finale Tiff in order to run some analysis and I figured that having ...
1
vote
1answer
115 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
41 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 ...
3
votes
0answers
543 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 ...
1
vote
1answer
135 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 ...
4
votes
1answer
1k views

Clip Spatial object to bounding box in R

Given a Spatial object in R, how do I clip all of its elements to lie within a bounding box? There are two things I'd like to do (ideally I'd know how to do both, but either is an acceptable solution ...
4
votes
0answers
50 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 ...
23
votes
6answers
6k 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 ...
1
vote
1answer
571 views

Produce raster map using universal kriging as interpolation method

I want to do kriging with external drift(universal kriging) in R. The covariate I use is in WGS84 refrence system. Because of nature of kriging which calculates distance in planar surface I have to do ...
4
votes
1answer
139 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 ...