Create Raster Image Mosaic

When working with raster data such as satellite imagery, it is sometimes necessary to combine multiple adjacent, possibly overlapping smaller rasters into a single large raster that covers the entire area of interest. This example demonstrates one way to use R to create a raster image mosaic while also applying a resampling algorithm to align the inputs.


Create Maps With R Geospatial Classes and Graphics Tools

R includes a rich set of plotting functions that can be applied to spatial data. This example demonstrates how to generate publication-quality maps using these functions, which in many cases can eliminate the need to use dedicated GIS software.


Read and write ESRI Shapefiles with R

The ESRI Shapefile is a widely used file format for storing vector-based geopatial data (i.e., points, lines, and polygons). This example demonstrates use of several different R packages that provide functions for reading and/or writing shapefiles.


Look up map projections in various standard formats

Geospatial data are usually only useful when associated with a spatial reference system (SRS). In a nutshell, this is the information needed to relate spatial coordinates in the dataset to actual positions on our planet, and by extension to relate spatial datasets to one another. When using programmatic tools to convert spatial data into a different SRS (e.g., when performing map projection), and even just to specify the SRS when this information is missing from the data source itself, you will sometimes need to express it in a standard format that the program can understand. There are several common ways to do this.


Polygon Overlay Analysis

Download data and R Code for this example


Perform point-in-polygon operations

Given a set of point locations (e.g., field sightings of some organism) and polygons circumscribing areas of interest (e.g., U. S. National Parks), you might find yourself asking whether each point does or does not lie within any polygons. And for each point that does, you might then want to know which polygon it lies within. These kinds of containment questions fall in the domain of what are often referred to as point-in-polygon operations.


Subscribe to RSS - R