This Use Case creates Google Maps / Google Earth-compatible Keyhole Markup Language (KML) files from R Spatial objects containing data from vector ESRI Shape Files and raster GeoTiff files. The case demonstrates three techniques for writing R Spatial objects into KML files, and one technique for reading KML files into R Spatial objects. Also revealed: reading polygon KML files into R Spatial objects.
This case also introduces the functionality of the recently released RGoogleMaps package. We demonstrate use of this package to download a static GoogleMaps map image and use it as the background for R spatial object plots. Click here to step directly to this section of the Use Case.
This example demonstrates use of the ArcMap GIS software and Digital Elevation Model data distributed by the USGS to constuct Elevation Zone Threshold maps for large (e.g., 10**4 km **2 area) study area sites.
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.
Use the GDAL/OGR utilities ogr2ogr or gdalwarp to reproject vector data (points, lines, and polygons) or raster data, respectively.
Use the GDAL/OGR utilities ogrinfo and gdalinfo to get information about a spatial dataset, including spatial reference information (e.g., the projection), a summary of any attribute data for points, lines, and polygons, and/or a summary of grid cell values for rasters.
This example demonstrates the use of the R geospatial classes to assign remotely-sensed temperature measurements to georeferenced points, (e.g., study area point locations) on the Earth surface. Also demonstrated: methods for reading, creating, writing, displaying, and aligning the spatial projections of geospatial data files.
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.