Statistical computing language and software environment.

learn more… | top users | synonyms

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 ...
8
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
216 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 ...
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 ...
3
votes
1answer
552 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 ...
2
votes
1answer
354 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?
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 ...
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, ...
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
613 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
259 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 ...
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 ...
2
votes
1answer
279 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 ...
2
votes
2answers
428 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
771 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 ...
14
votes
1answer
772 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 ...
2
votes
2answers
190 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 <- ...
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) ...
1
vote
2answers
519 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 ...
9
votes
1answer
281 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
435 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 ...
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 ...
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 ...
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 ...
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 ...
0
votes
1answer
1k views

dependency ‘stringr’ is not available for package ‘rgeos’

Attempting to install rgeos package fails. Detailed error logs as follows:- > install.packages("rgeos", repos="http://R-Forge.R-project.org") Installing package(s) into ...
7
votes
1answer
5k views

Converting a polygon into a raster using R

I'm trying to convert a shapefile into a raster within R. My approach is to read in the raster as follows: library(rgdal) # Loads SP package by default demo <- readOGR('F:/data/', 'shapefile') # ...
15
votes
5answers
1k views

Speed of various raster data formats

I'm having trouble locating any discussion or comparative benchmarking of different raster file formats (e.g., for use in data analysis in R). Does anybody have any insight into why particular formats ...
4
votes
1answer
1k views

Superimpose grid on points, then aggregate points within each grid cell

I have a vector of presence/absence values (1,0) and a matrix of x,y coordinate data (projected) specifying the spatial position of each value (about 25,000 in total). I'd like to aggregate the point ...
10
votes
1answer
4k views

Raster legend in R: how to colour specific values?

I have an elevation model plotted in R r <- raster("example.dem") plot(r, col = topo.colors(20)) Some of the values are below sea level (0), and I'd like to have those display in red. How can ...
11
votes
1answer
1k views

Random sampling of raster using R

Is there a straightforward way of randomly sampling a raster so that the output of the process is a raster? I'm using an example that I found on the r-sig-geo list and I have also tried the ...
4
votes
1answer
651 views

Simulation envelopes and significance levels

Many spatial analysis packages provide Monte Carlo techniques to simulate upper and lower “envelopes” for a summary statistic as a function of distance (e.g. K-function, nearest neighbor, etc…). ...
2
votes
4answers
930 views

relationship between sp package in R; mapwindow; ArcGIS/Quantum GIS

I am using ArcGIS at office for some visualization work, but I feel it kinda dump to performing the same tasks several times for visualizing some data on different maps. I am think of automating it ...
10
votes
4answers
1k views

Problems with NA values when reading .DEM file with R 'raster' package in Windows

I am trying to read a raster file in a .DEM format on windows using the 'raster' package in R. I get problems with NA values, when loading the data into R in Windows 7, but I do not have the problem ...
4
votes
0answers
153 views

What open source solution would work best for auto extracting features from satellite images? [duplicate]

Possible Duplicate: Feature Extraction - Land cover I have been looking for an open source solution which would allow me to define a region (or collection of images) and extract features ...
7
votes
3answers
1k views

How to cluster points based on a kernel density?

I have a large dataset with 36k points representing commercial land uses, each with a field containing the square footage. I have run a kernel density analysis on this dataset, producing a raster ...
2
votes
1answer
1k views

How to read multiple .gpx files in R [closed]

Suppose I have a number of .gpx files (these contain GPX waypoint data from a Garmin eTrex). I want to load them into R with different names and manipulate them. I can read one file thus: ...
8
votes
1answer
612 views

Kriging on GRASS+R

I'm trying to do a groundwater elevation map with an Ordinary Kriging on R, but always resulting on the lack of memory cannot allocate vector of size 146.5 Mb allocation (windows xp 32bit). ...
10
votes
4answers
580 views

Does Google Maps API provide statistical tools or even raster to vector conversion?

I am working with a web developer who is working with Google maps API, trying to determine what pre-processing steps I should perform (e.g. in R and GRASS), and what can be done within the google maps ...
3
votes
1answer
503 views

spgrass6 and GIS_LOCK

I would like to thank's everyone first, i learn a lot here (gis.stackexchange) about GIS. I have one question about the use of GRASS within R session, i'm able to do some basic task, but i have one ...
4
votes
2answers
687 views

Altitude Above channel in GRASS 6.4

i'm fairly new to the GIS world and GRASS (come from econometric background), i would like to do some species distribution modeling using R and GRASS. So i started to read the book of Tomislav Hengl ...
8
votes
3answers
2k views

R: Download a large DEM, change projection, and adjust to smaller scale

This is a process that takes just a few seconds in GIS software. My attempt to do it in R uses a large amount of memory then fails. Is there something wrong in my code, or is this just something R ...
4
votes
2answers
2k views

R: overlay a line on a raster stack/brick, and get profile of cell values along the line

I've combed through R's raster functions and vignettes and can't seem to get this working. I want to specify a line/vector across a raster stack (a DEM and possibly related variables), and get a ...
7
votes
1answer
13k views

find the centroid of a cluster of points

While searching the web, solutions for finding centroids of polygons come up rather often. What I'm interested in is finding a centroid of a cluster of points. A weighted mean of sorts. I would ...