Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
2answers
185 views

Go from multiple rasters to R compatible table

I have a set of geocoded, pixel-aligned rasters which I would like to use in a model in R. I would like to produce a table of data that can be imported to R, in which there are as many columns as ...
14
votes
3answers
623 views

Ecological geospatial conundrum

I am looking for a different, more elegant solution to a spatial statistics problem. Raw data consists of an x-y coordinate for each individual tree (i.e. converted to a point .shp file). Although ...
7
votes
4answers
14k 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?
8
votes
4answers
2k views

R spplot tutorials

I'm in need of some tutorials/books/other training materials which cover how to use the spplot function in the sp package in R properly. As with many of these functions, it seems very powerful, but ...
2
votes
1answer
408 views

Recreating A Lat/Long Grid Using a Specified Formula

I'm trying to recreate the Gridded Mercury emissions 2000 (0.5 x 0.5 degree grid) designed by the Arctic Monitoring and Assessment Programme. The file is in ASCII format, but without any coordinates. ...
3
votes
2answers
774 views

Clip depth contour with spatial polygon

I need to somehow combine my Spatialpolygons with my depth contour, but not sure how do to so. Maybe create a SpatialPolygonsDataframe? This is what I've done so far: > class(subarea0) #This is ...
5
votes
1answer
1k views

How to rasterize SpatialPolygons in R?

I'm trying to extract the bathymetry values of my area of interest from a world bathymetry raster layer using the 'rasterize' function in the {sp} package. *Edits: I found the 'extract' function ...
7
votes
1answer
2k views

How to convert point data into a gridded dataframe for histogram analysis?

I am very new at using GIS data and only modestly experienced with R. I've been reading about how to analyze spatial data using the spatial-analyst.net PDF book, so I'm not completely lost, but I ...
5
votes
1answer
212 views

Spatial graphing, distribution of polygon area over latitudes

Given a polygon in a PostGIS database, what is the best way to create a graph of its distribution over a range of latitudes? I'm picturing a graph of a curve, where the proportion of the total area ...
16
votes
1answer
1k views

Robust alternatives to Moran's I

Moran’s I, a measure of spatial autocorrelation, is not a particularly robust statistic (it can be sensitive to skewed distributions of the spatial data attributes). What are some more robust ...
3
votes
1answer
534 views

Where can I download a xyz bathymetry file of the Northwest Atlantic?

I'm looking to download the bathymetry of the Northwest Atlantic ocean as a txt file or any other file format that I can easily upload and use in R. I once used the Global topography - Scripps ...
4
votes
2answers
664 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 ...
5
votes
1answer
2k views

How to intersect lines and polygons in R?

Following on from an answer about intersecting polygons with lines to chop up a polygon into smaller polygon units (in QGIS), I wanted to try the same thing in R. However, I cannot seem to find a ...
7
votes
2answers
2k views

Create a raster with georeferenced information in R

Referring to my previous question, how do I "geocode"/convert - using R - a generated raster image to a format that can be shown as a layer on a map? In short, I'm aiming to recreate the results of ...
7
votes
4answers
3k views

How to split a vector in equal smaller parts in QGIS or similar?

i want to divide a shapefile with many tiles into a lot of smaller tiles. I am searching for a smart solution, because manual edits are out of questions Anyone can help or know a nice function?
11
votes
5answers
3k 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 ...
2
votes
1answer
346 views

Get raster field names in R

Does anyone know how I can extract the raster field names (VALUE, COUNT and other existing field names on a categorical raster file) in R? I am using the raster package to load the raster files.
1
vote
0answers
321 views

How to extract polygon means from raster data and match the mean to the original attributes from the shapefile? [closed]

My polygons (p) was read from a shapefile (shp). I know that I can extract the polygon means by: means <- extract (r, p, fun="mean") My question is how I can match each mean with the ...
1
vote
2answers
132 views

Looking for R-compatible geospatial datasets

I try to work with geospatial data of North America. Is there any high-resolution map material available for/in R?
5
votes
2answers
1k views

How to draw a point at an exact location with spplot?

I imported a Shapefile holding a quite detailed world map from: http://www.diva-gis.org library(sp) library(rgdal) world = readOGR('./countries_shp/', 'countries') Using R with the sp-Packages, ...
3
votes
3answers
1k views

How to extract the US from a North America Shapefile?

I have a north america shapefile, downloaded from ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level2.zip How can I get a new shapefile from this showing only us? Is there a way doing this in ...
2
votes
1answer
2k views

How to convert decimal degrees units to km in R?

I am trying to figure out how I can transform my unit of length from decimal degree to km when I import the following simple ArcGIS polygon shape. Ultimately, I would like to have this information ...
5
votes
0answers
606 views

How to get rpy2 for QGIS on OSX?

I am a new QGIS user, have installed QGIS on a Mac running Snow Leopard OSX 10.6.8 following all the instructions. QGIS seems to work well for everything other than when I boot up I get the message ...
2
votes
0answers
256 views

How to load big ASCII rasters in Revolution R?

Is there anyone in this site using Revolution R with big spatial data ? I am trying to load raster files (ascii format) into revolution r using the xdf format, with no luck. Did anyone tried this ...
5
votes
4answers
1k views

Create a ground overlay kml from georeferenced raster

I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file. Using ...
0
votes
0answers
132 views

Making a Bridge Classification tool in GRASS GIS

I'm working on a tool for classifying bridges with GRASS. I have been using examples online but I've come to a standstill as how to actually make this tool in GRASS. I have my raster of my area and ...
4
votes
1answer
626 views

How do I implement 'weighted' kriging in R?

I'm trying to interpolate the values of an attribute (called "disease_rate") that i've sampled at a set of spatial points and i'd like to add 'weights' to the resulting kriging estimates. Basically, ...
2
votes
2answers
421 views

ArcGIS Desktop 10 ModelBuilder iterations

Hi all I have some home range estimates for fish that I made using the adehabitat pkg in R. However, a lot of them overlap land, so I need to subtract the area where they overlap with land ...
6
votes
1answer
3k views

GIS, R and shapefiles

I have some data that encodes locations in certain countries, such as the US and China, that I would like to map. The data includes location name in Latin, extended Latin and other scripts (Japanese, ...
2
votes
1answer
756 views

Conversion of raster features to polylines: skeletonization?

I would like to identify linear features, such as roads and rivers, on raster maps and convert them to a linear vector features (i.e. polylines). I typically use R as my primary GIS, and have posed ...
2
votes
1answer
2k views

merging 2 polygon adjacent to each other using R

I have several shp files which are the components (or tiles) of a map, I have joint all these tiles together to have a large shp file. Then I realized some of the polygon is now splitted into 2 ...
2
votes
2answers
187 views

Color a layer of the map based on the location of dots on another layer

Thanks for helping me in GIS 101 Problem #2, now I have followup questions: I created a map as below: The map is created using the following script: ct <- ...
4
votes
1answer
3k views

How to plot points on maps using ggplot2 and R?

Thanks for help me in GIS 101 Problem #1, now I have geocoded a few hospital in Connecticut using google map, I have able to visualize them in QGIS, now I am trying to do it in R. ct <- ...
9
votes
1answer
280 views

How to find the most spread out locations?

Probably a very simple question. I have a list of about a thousand potential geographical locations (lat lon), and of those I need to select the 200 locations that are "most spread out". I think that ...
3
votes
1answer
427 views

Spatial Interpolation Methods like PRISM

I am looking for some kind of software (free software) that allows me to make an interpolation like PRISM software. The interpolation used in PRISM is a local regression and accounts for ...
8
votes
3answers
639 views

Identification of consecutive points within a specified buffer

I have a point file, hourly relocations of an animal, and I want to be able to place a buffer around each point and calculate the number of subsequent points which are within the buffer zone. I am ...
2
votes
1answer
1k views

How to select a Subset of PolySet data in R?

I am using the PBSmapping package in R to model data from diva-gis. I can read in the shapefiles and plot them with no issue. library(PBSmapping) df = importShapefile("/path/df.shp") plotPolys(df) ...
3
votes
2answers
2k views

Converting NZMG (or NZTM) to latitude / longitude for use with R map library

I am a statistician with no background in GIS so apologies for the newbie question. We routinely use R for a range of statistical and graphic analysis and are interested in using its map library to ...
2
votes
1answer
274 views

Generic comparison for kriging in geoR and ArcGIS

I am going to do a project based on kriging. The targeted area would be as big as United States and my grid would be 10km*10km. I am wondering the differences of efficiencies for the methods ...
6
votes
2answers
1k views

creating a raster of the residuals of a regression between two rasters

I am trying to create a raster of the residuals of a regression between two rasters. i.e. I would like to carry out a regression of one raster against another of the same extent and plot the residual ...
3
votes
2answers
3k views

How to overlay map layers (shp and csv) in R?

This is a crosspost from stackoverflow. I know very little about GIS software and am doing all my mapping in R. Apologies in advance if this is too basic question. Let's say I have two shapefiles from ...
17
votes
2answers
5k views

How can I convert data in the form of lat, lon, value into a raster file using R?

I have a data set of values over a km grid in the continental U.S. The columns are "latitude", "longitude", and "observation", e.g.: "lat" "lon" "yield" 25.567 -120.347 3.6 25.832 ...
1
vote
2answers
510 views

NA values in dbf when exporting shapefile from R with writeOGR?

I´m writing an esri shapefile from R (2.14.1) on windows, using writeOGR in the rgdal package, in the resulting dbf file, NA values in the spatialpointdataframe (in numeric columns) are not translated ...
1
vote
1answer
490 views

Administrative level and coordinates from Yahoo GeoPlanet WOEID

The Yahoo GeoPlanet data can be freely downloaded from: http://developer.yahoo.com/geo/geoplanet/data/. If I understand it correctly, each WOEID corresponds to a unique location on earth, with ...
3
votes
1answer
95 views

How to determine if feature A and B are located in the same room?

I have created a map using MapWindows like the following: A little explanation here, the is a map of an elderly home. The yellow boxes are room and the white rectangles inside the yellow boxes are ...
9
votes
2answers
1k 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 ...
14
votes
1answer
761 views

Monte Carlo simulation using QGIS and pgRouting on optimal sidewalk construction

I am new to spatial analysis and would appreciate some general direction on a project I am attempting, outlined below (I am starting from scratch). GOAL: To find the best locations to install 2000 ...
15
votes
4answers
14k 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 ...
4
votes
3answers
1k views

How can I find out how to convert this point to lat lon?

I have received a shapefile with measurement points to be analyzed, but no matter how I try, I can't find how to convert to lat lon. I suppose it would be good to know the projection but when I look ...
6
votes
1answer
2k views

Spatial distance join between polygon and points using R?

I'm figuring out how to do a Intersection (Spatial Join) between point and polygons from shapefiles. My idea is to get the closest points and those points that match completely inside the polygons. In ...