Geospatial analysis
From NCEAS Knowledge Base
Contents |
Tips & Tricks
Reference systems & projections
Display all available PROJ.4 projections
- Use proj tool directly, at the commandline
$ proj -lp # projections $ proj -le # ellipsoids $ proj -ld # datums
# R code:
library(rgdal)
projInfo("proj") # projections
projInfo("ellps") # ellipsoids
projInfo("datum") # datums
Search for (or by) EPSG codes
The EPSG code can be a convenient way to specify a projection in QGIS, ogr2ogr, proj etc. The saves the hassle of inputting the full PROJ.4 definition string, which can be an error prone step. However, be aware that not all projections are associated with an EPSG code.
- Use the web: Online spatial reference search
# R code:
library(rgdal)
EPSG <- make_EPSG()
# As an example, search for Hawaii state projections
EPSG[grep("hawaii", EPSG$note, ignore.case=TRUE), 1:2]
# Get PROJ.4 information for a particular EPSG code
subset(EPSG, code==2784)
Other projection resources
- PROJ.4 wiki page documenting the general PROJ.4 parameters available for defining (most) coordinate systems.
- Flex Projector is a free, cross-platform Java application that provides a graphical interface for manipulating map projections. Designed primarily to enable users to create arbitrary new projections for custom map visualizations, this tool can be quite educational for those who simply want to get a sense of how and why projections differ.
