Get EPSG codes or PROJ.4 codes for projections from the State Plane Coordinate System.

state_plane(state, plane_id = NULL, type = c("epsg", "proj4"))

Arguments

state

The postal code for the state.

plane_id

The state plane geographic zone identifier. A NULL value will return a projection for the entire state.

type

The type of output to return: either an EPSG code or PROJ4 string.

Value

Either a PROJ4 string as a character vector or an EPSG code as an integer.

See also

For documentation of the underlying State Plane Coordinate System projection data frame, see state_proj.

Examples

state_plane(state = "MA", type = "epsg")
#> [1] 26986
state_plane(state = "MA", type = "proj4")
#> [1] "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
state_plane(state = "MA", plane_id = "island", type = "epsg")
#> [1] 26987
state_plane(state = "MA", plane_id = "island", type = "proj4")
#> [1] "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"