Statistical computing language and software environment.
1
vote
1answer
203 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
152 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] ...
1
vote
3answers
328 views
How to produce spatial grid from raster?
I need a Spatial Grid as a master grid for diverse thematic maps. How do I produce a Spatial Grid from a raster discarding all NA pixels?
9
votes
5answers
2k views
Get Raster Values from a Polygon Overlay in Opensource GIS Solutions
I have two layers. A polygon-shape-layer with many tiles and a raster-layer containing CORINE 2006 land cover with many categories in a colourmap.
I want to obtain for each polygon in the shapelayer a ...
3
votes
2answers
249 views
How to transform coordinates to location in x-y grid in R?
I have a polygon with a 40m diameter and several points that lay inside it. Now I want to reformat the point locations (projected in DHDN/GK-3, but could vary) to x-y coordinates ranging from zero to ...
5
votes
2answers
334 views
Proper way to rbind SpatialPolygonsDataFrames with identical polygon IDs?
What's the proper R idiom for rbinding SPDFs together when the IDs overlap? Note that here (as is often the case) the IDs are basically meaningless so it's pretty annoying that I can't just make ...
-1
votes
1answer
133 views
Exporting Grid from R to use it in ArcGIS
i want to export a grid from R into format readable by ArcGIS. how can i do so?
jones
3
votes
0answers
99 views
How do I access layer attributes from within QGIS' manageR plugin?
This is probably a fairly basic question, but searches for manageR come up with a lot of noise, and there's no manageR tag. What I'd like to do is load the attributes from a particular field of a ...
2
votes
1answer
166 views
How to analyze temporal point data in R?
I have XY coordinate data of water depth (n = 30) where each coordinate has water depth attribute data for multiple dates from 2000 to 2007. I have imported the data in r for statistical analysis. I ...
3
votes
2answers
65 views
Where can I get public transportation route information for USA?
I'm trying to find a list of public transit route information, mainly location of bus and train stops for the US. I've looked around at some of the Google products and openstreetmap but can't find ...
5
votes
4answers
5k views
How to convert zip codes to latitude and longitude?
I have a data set that includes a list of zip codes. Is there a way in R to convert these zip codes to latitude and longitude coordinates?
1
vote
1answer
76 views
Function that applies another function to nearest neighbors of a specified location?
I'm sure this is quite basic, but I just couldn't find anything appropriate: I am looking for a function that applies another function to variables of a SpatialPointsDataFrame, but only for locations ...
12
votes
3answers
276 views
How to determine if trees within forest gaps are clustered?
The attached dataset shows approximately 6000 saplings in approximately 50 variable sized forest gaps. I am interested in learning how these saplings are growing within their respective gaps (i.e. ...
5
votes
2answers
363 views
rpy2 installation on Mac OSX. A still unresolved problem on StackExchange and rpy-list [closed]
following lgautier's advice on rpy2 installation on Mac OSX, I posted my request on rpy-list and got in touch with Yair Benita who said he could only install rpy2 through his default Mac OS X python ...
10
votes
2answers
785 views
Using R to calculate the area of multiple polygons on a map that intersect with another overlaid polygon
I have a shapefile downloaded from the Ordnance Survey that gives electoral ward (division) boundaries for a county of the United Kingdom. I have successfully used R to load the shapefile and plotted ...
9
votes
2answers
803 views
How to get the second nearest neighbor between two point patterns in R?
Is there a way to get the distances for the second nearest neighbor between two point patterns in R? The spatstat package has a function called nncross but it only applies to the nearest neighbors ...
5
votes
1answer
164 views
Stats on individual grid points nearest neighbours
First, thank you for this extremely useful and easy-to-access forum!
I have shp of points where each point is the centroid of the individual cells of a 1*1km grid (~ 500 000 points). For each of ...
12
votes
2answers
499 views
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 ...
2
votes
2answers
438 views
How to create a map with states by attribute value?
I'm using Qgis, but I am quite familiar with R and python. So I could use any of these.
I want a map of mexico but want to color the stats according to a certain variable. It goes from 0 to 100. So ...
4
votes
3answers
227 views
How to create an intensive map of Russia using QGIS or any other software?
I am trying to create an intensive (heat) map of Russia. I have an excel sheet of 36 Russian regions and their corresponding values.
I know that there were similar questions:
How to create a map ...
4
votes
1answer
305 views
book/tutorial on using rpy2 in python for kriging?
I am proficient in Python, but have no knowledge of R. Can you suggest a good tutorial in using rpy2 or any other R library to perform Block/Cokriging "Kriging"
13
votes
4answers
4k views
How to open a Shapefile in R?
I need to open a shape file from ArcMap in R to use it for further geostatical analysis. I've converted it into ASCII text file, but in R it is recognized as data.frame. Coordinates function doesn't ...
3
votes
1answer
150 views
How to reproject a raster to Winkel Tripel projection?
I'm trying to project a raster map (in ASCII grid format) from longlat to the Winkel Tripel projection. But I'm running into errors, for instance gdalwarp won't accept the proj-string.
$ gdalwarp ...
1
vote
2answers
173 views
Rename a SpatialPolygon class object in R
I am completely new to GIS but am quite familar with R. I was able to dissolve some zip codes into a larger sales territory.
For reference, my previous question is located here.
However, because ...
1
vote
3answers
229 views
Merge Zip Codes to Create new sales Markets
Let me preface this question by saying I am very novice with respect to GIS. With this in mind, I am looking to merge zip codes into sales territories. Instead of plotting data by zip code, I want to ...
3
votes
2answers
158 views
What is the cause of 'tearing' of polygons (artifacts) using R, ggplot and geom_polygon?
Thanks to the answer given in this question I have been able to subset and draw a map of electoral divisions in part of the UK, in this case Pembrokeshire. The resulting data frame is large and ...
5
votes
1answer
211 views
How can I use fortify() to create a filtered R data frame from a shape file?
I am in the process of building a ggplot choropleth map of population in administrative areas in Wales. I have downloaded the Boundary-Line data from the Ordnance Survey and extracted what seems to be ...
4
votes
1answer
1k views
How do I change the polygon fill color and border color for SpatialPolygons objects?
I have SpatialPolygons or SpatialPolygonsDataFrames which I'd like to plot. How do I change the color using the three plotting systems in R (base graphics, lattice graphics, and ggplot2)?
Example ...
2
votes
2answers
209 views
How to single out country data from a world data map?
Say that i have two "data sources";
A global map of average wind speeds,
A shape file (or similar information) of all country borders in the world.
How do i combine these two sources and extract ...
4
votes
2answers
152 views
R- alphahull - duplicate points error help
I came across R function -alphahull- and believe it is the best option to turn gps points into a polygon (3 or 4 days worth of gps points across residence/neighborhood for each of 300 subjects).
...
4
votes
1answer
203 views
Iterate features on SpatialPolygonsDataFrame in R
I have a SpatialPolygonsDataFrame object. Is there way to use apply on this object rather than using a for loop to iterate features in this object?
3
votes
1answer
136 views
How to stop writeOGR from abbreviating Field Names when using “ESRI Shapefile” driver
I'm currently using the following script to add some attribute data from a table to lots of individual shapefiles:
library(rgdal)
specieslist <- read.csv("SpeciesList1.txt", header=F)
attdata ...
5
votes
3answers
172 views
Create Zonal Grid in R
Suppose I have a n*n raster, and I want to create k square blocks (k can be divided exactly by n*n ) for zonal analysis:
for example, when n = 4 and k = 4
a 4*4 raster is create with value
1 1 2 2
...
2
votes
2answers
266 views
[R]Function to calculate mean for missing or NA values in a dataframe
I am trying to develop a function that will calculate a mean lat/long for my missing or zeros location (lat/long) data in my dataset.
I have locations for many SETS within the same TRIP, which tends ...
1
vote
0answers
293 views
Raster grid for zonal statistics in R
I have two raster layer, the first one r is my zonal mask as a raster grid, and I created as:
ext <-extent(Yraster)
r <- raster(nrows=32,ncols=32,ext)
r[] <-(1:ncell(r))
and project it ...
0
votes
2answers
145 views
Detect whether there is a spatial polygon in a spatial extent
Given a spatial extent (for example cbind(c(0,0),c(10,10)),I want to see whether there is a part of a SpatialPolygons falls in this extent? How can I do this? Thank you very much!
3
votes
1answer
127 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
352 views
Defining datum for Lambert Azimuthal Equal Area and converting to geographic coordinates
I posted this question to a specialised mailing list for spatial data analysis using R here but didn't recieve a response.
I am working with shapefiles and rasters in R, and I am unsure if I am ...
1
vote
1answer
70 views
Mapping reefs in Madagascar using R
I need to project a number of reef sites onto the coastline of southwest Madagascar. I was hoping to use R for this as I find ArcGIS too big and clunky. I need to create a basemap for both the reefs ...
2
votes
1answer
299 views
Opening .lyr file via rgdal/OGR
According to this answer I can read in a .lyr file via OGR as long as it was made with ArcGIS version 10.
I have such a file (from the ArcGIS Maps & Data page) but I can't quite make R's readOGR ...
12
votes
2answers
350 views
Need a spatial database that can be used by QGIS and R
I'm quite new to QGIS and I'm searching for a simple way to create a Database that allows me to use the tables in QGIS and R. I have a lot of data stored in Excel spreadsheets wich will be used for ...
2
votes
0answers
80 views
Moving point on OpenStreetMap route
Basically I generate random numbers in R language which are indeed times between bus arrivals.
I need to simulate a moving point(a bus) in OpenStreetMap by using this generated numbers.
I have read ...
10
votes
2answers
165 views
Count raster value in a bounding box (spatial extent)
I have simple question: given a bounding box, how can I count the number of specific values (say, I am interested in the number of value == 1 ) in a raster in 1) arcpy, or 2) raster package in R?
5
votes
3answers
386 views
Kriging points in a raster in R
I wonder if there is a way to interpolate xyz points in a raster within certain bounds using R?.
In arcgis this is call interpolation with barrier. i wonder if there is something similar in r?. I ...
5
votes
2answers
234 views
Using rpy2 in ArcGIS
I have a 3rd party python geoprocessing script that requires rpy2, and thus also r. What is the best way to get these working together?
Using R with ArcGIS Desktop says the most useful option for ...
4
votes
2answers
180 views
No intersection found between polygons I know intersect!
I'm using two geographies: one is made up of small areas (about 2200), the other large areas (about 70). Both cover all of Australia, and the small areas are not necessarily nested inside large areas. ...
10
votes
5answers
605 views
How to implement value-by-alpha map in GIS?
I've been doing some background reading about cartograms recently and stumbled upon interesting alternative - value-by-alpha maps.
Concept is described in more details here and full paper is ...
7
votes
2answers
663 views
Is it possible to run an R script on a layer in QGIS?
I'd like to run an R script on a layer loaded in QGIS (to rotate a set of points created there using the Vector:Research Tools:Regular Points tool). I thought ManageR might work but cannot get it ...
10
votes
3answers
507 views
How can I generate irregular grid containing minimum n points?
Given a large (~ 1 million) sample of unevenly distributed points - is it possible to generate irregular grid (in size, but could also be irregular in shape if that is possible?) that will contain ...
10
votes
1answer
642 views
Projecting sp objects in R
I have a number of shapefiles in different CRSs (mostly WGS84 lat/lon) that I'd like to transform into a common projectly (likely Albers Equal Area Conic, but I may ask for help on choosing in another ...

