wiki:Cf2CrsWkt

CF-1.6 <--> WKT/PROJ.4 translation

Mapping from CF Grid Mapping Attributes to CRS WKT Elements

These provisional mappings have been compiled to support, among other things, CF proposals 69 and 80; which have been incorporated in the CF Conventions document version 1.7. If you spot any errors or omissions, please email the authors (Phil Bentley and Etienne Tourigny) or the CF mailing list, or else update this wiki page.

In Tables 1 and 2 the names of WKT PARAMETER elements follow the names of coordinate operation parameters defined in the EPSG geodetic parameter registry.

The following tables list translations of projection parameter names between CF and various other representations (such as OGC WKT, EPSG and PROJ.4). The information was obtained from various sources, including http://www.remotesensing.org/geotiff/proj_list/ .

The various representations listed are:

The following files are provided to list the various possible Datum, Ellipsoid and Prime Meridian names (in support of CF proposal 80)

  • horiz_datum.csv - horizontal datum parameters for use as reference for CF-1.7 (source: GDAL/OGR, modified by Etienne Tourigny)
  • ellipsoid.csv - Ellipsoid parameters from the EPSG database (source: GDAL/OGR)
  • prime_meridian.csv - Prime Meridian parameters from the EPSG database (source: GDAL/OGR)

Table 1 - Existing (CF-1.6) CF Grid Mapping Attributes

CF Grid Mapping Attribute Corresponding WKT Syntax (1)
earth_radius SPHEROID["<reference_ellipsoid_name>", <semi_major_axis>, 0.0, ...]
false_easting PARAMETER["False easting", <value>]
false_northing PARAMETER["False northing", <value>]
grid_mapping_name no known equivalent
grid_north_pole_latitude no known equivalent
grid_north_pole_longitude no known equivalent
inverse_flattening SPHEROID["<reference_ellipsoid_name>", <semi_major_axis>, <inverse_flattening>, ...]
latitude_of_projection_origin PARAMETER["Latitude of natural origin", <value>]
longitude_of_central_meridian PARAMETER["Longitude of natural origin", <value>]
longitude_of_prime_meridian PRIMEM["<prime_meridian_name>", <longitude_of_prime_meridian>, ...]
longitude_of_projection_origin PARAMETER["Longitude of natural origin", <value>]
north_pole_grid_longitude no known equivalent
perspective_point_height PARAMETER["Viewpoint height", <value>]
scale_factor_at_central_meridian PARAMETER["Scale factor at natural origin", <value>]
scale_factor_at_projection_origin PARAMETER["Scale factor at natural origin", <value>]
semi_major_axis SPHEROID["<reference_ellipsoid_name>", <semi_major_axis>, <inverse_flattening>, ...]
semi_minor_axis no direct equivalent, the SPHEROID element is used to define ellipsoid geometry
standard_parallel (one parallel) PARAMETER["Latitude of standard parallel", <value>]
standard_parallel (two parallels) PARAMETER["Latitude of 1st standard parallel", <value>], PARAMETER["Latitude of 2nd standard parallel", <value>]
straight_vertical_longitude_from_pole PARAMETER["Longitude of origin", <value>]

Table 2 - Future (CF-1.7) CF Grid Mapping Attributes

CF Grid Mapping Attribute Corresponding WKT Syntax (1) PROJ.4 Syntax
projected_crs_name PROJCS["<projected_coordinate_system_name>", ...] N/A
geographic_crs_name GEOGCS["<geographic_coordinate_system_name>", ...] N/A
horizontal_datum_name GEOGCS["<name>", DATUM["<horizontal_datum_name>", ...] ] +datum
reference_ellipsoid_name GEOGCS["<name>", DATUM["<name>", SPHEROID["<reference_ellipsoid_name>", ...] ] ] +ellps
towgs84 GEOGCS["<name>", DATUM["<name>", TOWGS84[<7 params>] ] +towgs84
prime_meridian_name GEOGCS["<name>",PRIMEM["<prime_meridian_name>",<value>] + pm

Table 3 - Common projection parameter names

CFOGC WKTPROJ.4EPSG nameNote
false_eastingfalse_easting+x_0False easting / Easting at false origin(2)
false_northingfalse_northing+y_0False northing / Northing at false origin(2)
scale_factor_at_projection_originscale_factor+k_0Scale factor at natural origin(1)
scale_factor_at_central_meridianscale_factor+k_0Scale factor at natural origin(1)
standard_parallel![1]standard_parallel_1+lat_1Latitude of 1st standard parallel
standard_parallel![2]standard_parallel_2+lat_2Latitude of 2nd standard parallel
longitude_of_central_meridianlongitude_of_center / central_meridian+lon_0(1)(1)
longitude_of_projection_originlongitude_of_center / central_meridian+lon_0(1)(1)
latitude_of_projection_originlatitude_of_origin / latitude_of_center+lat_0(1)(1)
straight_vertical_longitude_from_polecentral_meridian+lon_0(1)(1)

Table 4 - Specific projection parameter names

ProjectionNameCFOGC WKTPROJ.4EPSG nameEPSG codeGeoTIFF IDNote
AEAAlbers Equal Areaalbers_conical_equal_areaAlbers_Conic_Equal_Area+proj=aeaAlbers Equal Area9822CT_AlbersEqualArea
standard_parallel![1]standard_parallel_1+lat_1Latitude of 1st standard parallel8823!StdParallel1
standard_parallel![2]standard_parallel_2+lat_2Latitude of 2nd standard parallel8824!StdParallel2
longitude_of_central_meridianlongitude_of_center+lon_0Longitude of false origin8822NatOriginLong
latitude_of_projection_originlatitude_of_center+lat_0Latitude of false origin8821NatOriginLat
false_eastingfalse_easting+x_0Easting at false origin8826FalseEasting
false_northingfalse_northing+y_0Northing at false origin8827FalseNorthing
AEAzimuthal equidistantazimuthal_equidistantAzimuthal_Equidistant+proj=aeqdN/ACT_AzimuthalEquidistant EPSG:9832 is 'Modified Azimuthal Equidistant'
longitude_of_projection_originlongitude_of_center+lon_0 ProjCenterLong
latitude_of_projection_originlatitude_of_center+lat_0 ProjCenterLat
false_eastingfalse_easting+x_0FalseEasting
false_northingfalse_northing+y_0FalseNorthing
LAEALambert azimuthal equal arealambert_azimuthal_equal_areaLambert_Azimuthal_Equal_Area+proj=laeaLambert Azimuthal Equal Area9820CT_LambertAzimEqualArea 
longitude_of_projection_originlongitude_of_center+lon_0Longitude of natural origin8802ProjCenterLong
latitude_of_projection_originlatitude_of_center+lat_0Latitude of natural origin8801ProjCenterLat
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
LCC-1SPLambert conformallambert_conformal_conicLambert_Conformal_Conic_1SP+proj=lccLambert Conic Conformal (1SP)9801CT_LambertConfConic_1SP(3) link
standard_parallellatitude_of_origin+lat_1Latitude of natural origin8801NatOriginLatstandard_parallel=latitude_of_projection_origin
longitude_of_central_meridiancentral_meridian+lon_0Longitude of natural origin8802NatOriginLong
latitude_of_projection_originlatitude_of_origin+lat_0Latitude of natural origin8801NatOriginLat
N/Ascale_factor+k_0Scale factor at natural origin8805ScaleAtNatOrigin(3) always 1
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
LCC-2SPLambert conformallambert_conformal_conicLambert_Conformal_Conic_2SP+proj=lccLambert Conic Conformal (2SP)9802CT_LambertConfConic_2SP (3) link
standard_parallel![1]standard_parallel_1+lat_1Latitude of 1st standard parallel8823!StdParallel1
standard_parallel![2]standard_parallel_2+lat_2Latitude of 2nd standard parallel8824!StdParallel2
longitude_of_central_meridiancentral_meridian+lon_0Longitude of false origin8822FalseOriginLong
latitude_of_projection_originlatitude_of_origin+lat_0Latitude of false origin8821FalseOriginLat
false_eastingfalse_easting+x_0Easting at false origin8826FalseEasting
false_northingfalse_northing+y_0Northing at false origin8827FalseNorthing
CEALambert cylindrical equal arealambert_cylindrical_equal_areaCylindrical_Equal_Area+proj=ceaN/ACT_CylindricalEqualArea (3) CF says EPSG 9834/9835 ?
longitude_of_central_meridiancentral_meridian+lon_0 NatOriginLong
standard_parallel![1]standard_parallel_1+lat_ts!StdParallel1default to 0
false_eastingfalse_easting+x_0FalseEasting
false_northingfalse_northing+y_0FalseNorthing
M-1SPMercator (1SP)mercatorMercator_1SP+proj=mercMercator (variant A)9804Mercator_1SP(3)
longitude_of_projection_origincentral_meridian+lon_0Longitude of natural origin8801NatOriginLong
scale_factor_at_projection_originscale_factor+k_0Scale factor at natural origin8805ScaleAtNatOrigin
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
M-2SPMercator (2SP)mercatorMercator_2SP+proj=mercMercator (variant B)9805N/A(3)
longitude_of_projection_origincentral_meridian+lon_0Longitude of natural origin8801
standard_parallel![1]standard_parallel_1+lat_tsLatitude of 1st standard parallel8823
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
OrthoOrthographicorthographicOrthographic+proj=orthoOrthographic9840CT_Orthographic
longitude_of_projection_origincentral_meridian+lon_0Longitude of natural origin8802ProjCenterLong
latitude_of_projection_originlatitude_of_origin+lat_0Latitude of natural origin8801ProjCenterLat
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
PS-APolar stereographicpolar_stereographicPolar_Stereographic+proj=sterePolar Stereographic (variant A)9810CT_PolarStereographic (3)
straight_vertical_longitude_from_pole central_meridian+lon_0Longitude of natural origin8802StraightVertPoleLong
latitude_of_projection_originN/A+lat_0Latitude of natural origin8801NatOriginLat+90/-90
scale_factor_at_projection_originscale_factor+k_0Scale factor at natural origin8805ScaleAtNatOrigin
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
PS-BPolar stereographicpolar_stereographicPolar_Stereographic+proj=sterePolar Stereographic (variant B)9829N/A(3)
straight_vertical_longitude_from_pole central_meridian+lon_0Longitude of natural origin8802
latitude_of_projection_originN/A+lat_0Longitude of origin8801+90/-90
standard_parallellatitude_of_origin+lat_tsLatitude of standard parallel8832
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing
StStereographicstereographicStereographic+proj=stereN/ACT_StereographicEPSG 9809 is “Oblique Stereographic” or “Double Stereographic”
longitude_of_projection_origincentral_meridian+lon_0 ProjCenterLong
latitude_of_projection_originlatitude_of_origin+lat_0 ProjCenterLat
scale_factor_at_projection_originscale_factor+k_0 ScaleAtNatOrigin
false_eastingfalse_easting+x_0FalseEasting
false_northingfalse_northing+y_0FalseNorthing
TMTransverse Mercatortransverse_mercatorTransverse_Mercator+proj=tmercTransverse Mercator9807CT_TransverseMercator(3)
scale_factor_at_central_meridianscale_factor+k_0Scale factor at natural origin8805ScaleAtNatOrigin
longitude_of_central_meridiancentral_meridian+lon_0Longitude of natural origin8802NatOriginLong
latitude_of_projection_originlatitude_of_origin+lat_0Latitude of natural origin8801NatOriginLat
false_eastingfalse_easting+x_0False easting8806FalseEasting
false_northingfalse_northing+y_0False northing8807FalseNorthing

Table Notes:

  1. Multiple CF/WKT translations, see projection-specific translations.
  2. Parameter used in every projection.
  3. See projection-specific notes.

Units Information

Translation of units depends on if the crs is geographic or projected

For a geographic crs (grid_mapping_name = "latitude_longitude"), units are angular. GEOGCS contains a UNIT node which gives the conversion to radians. When the crs is in degrees the following node is used: UNIT["degree",0.0174532925199433]. For a more complete description, see CT 1.0 section "7.3.19 UNIT" CF requires all value to be in degrees, which is specified in the dimension's units attribute ( lon:units = "degrees_east" / lat:units = "degrees_north" ), the udunits packages allows to transform from radians.

For a projected crs, units are linear. PROJCS must contains a UNIT node which gives the conversion into meters. For example, if the units are in kilometers the following node is used: UNIT["kilometre",1000]]. In CF, units are given in the dimension's units attribute (xc:units = "m").

Projection-specific notes

EPSG codes below correspond to "EPSG dataset coordinate operation method" codes.

Lambert conformal 1SP / 2SP

The 1SP variant corresponds to EPSG code 9801 - Lambert Conic Conformal (1SP), with CF latitude_of_projection_origin=standard_parallel and WKT scale_factor=1. A scale factor less than 1 means that there are 2 standard parallels (see http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html), but it cannot be translated to the CF 1SP variant, therefore the 2SP variant should be used instead. The 2SP variant corresponds to EPSG code 9802 - Lambert Conic Conformal (2SP).

Lambert cylindrical equal area

The scale_factor_at_projection_origin variant is not recommended as it does not translate to and from WKT/PROJ.4. Snyder formulas 10-2b and 10-2 can be used to relate scale_factor_at_projection_origin, standard_parallel1 and latitude_of_projection_origin but the latter is not part of this projection's parameters. It has been proposed to deprecate or remove this variant from the CF spec (see CF trac ticket #75).

Mercator 1SP / 2SP

The scale_factor_at_projection_origin variant corresponds to EPSG code 9804 - Mercator (1SP) or Mercator (variant A), and the standard_parallel variant corresponds to EPSG code 9805 - Mercator (2SP) or Mercator (variant B).

Polar stereographic

The standard_parallel variant corresponds to EPSG code 9829 - Polar Stereographic (Variant B), while the scale_factor_at_projection_origin variant corresponds to EPSG code 9810 - Polar Stereographic (Variant A). As WKT/PROJ.4 require the standard parallel, [Snyder] formula 21-7 can be used to compute it from scale_factor_at_projection_origin if that variant is used.

Transverse Mercator

Transverse Mercator can be translated to PROJ.4 using either +proj=tmerc (Transverse Mercator) or +proj=utm (Universal Transverse Mercator) by computing zone number from longitude_of_central_meridian. For example, a TM projection with longitude_of_central_meridian=-117 would have the corresponding PROJ.4 string: '+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs '

Mapping from CF Grid Mapping Attributes to CRS WKT Elements (previous table by Phil Bentley, Oct 2011)

These provisional mappings have been compiled to support, among other things, CF proposal 69. If you spot any errors or omissions, please email the author or the CF mailing list, or else update this wiki page.

Mappings are only listed for the current set of CF grid mapping attributes -- there are a number of WKT elements, and many CRS PARAMETERs, for which there are no corresponding CF attributes.

The order of attributes follows Table F.1 in the CF conventions document.

The names of WKT PARAMETER elements follow the names of coordinate operation parameters defined in the EPSG geodetic parameter registry.

CF Grid Mapping Attribute Corresponding WKT Element
earth_radius SPHEROID["<name>", <semi-major-axis>, 0.0, ...]
false_easting PARAMETER["False easting", <value>]
false_northing PARAMETER["False northing", <value>]
grid_mapping_name no known equivalent
grid_north_pole_latitude no known equivalent
grid_north_pole_longitude no known equivalent
inverse_flattening SPHEROID["<name>", <semi-major-axis>, <inverse-flattening>, ...]
latitude_of_projection_origin PARAMETER["Latitude of natural origin", <value>]
longitude_of_central_meridian PARAMETER["Longitude of natural origin", <value>]
longitude_of_prime_meridian PRIMEM["<name>", <longitude>, ...]
longitude_of_projection_origin PARAMETER["Longitude of natural origin", <value>]
north_pole_grid_longitude no known equivalent
perspective_point_height PARAMETER["Viewpoint height", <value>]
scale_factor_at_central_meridian PARAMETER["Scale factor at natural origin", <value>]
scale_factor_at_projection_origin PARAMETER["Scale factor at natural origin", <value>]
semi_major_axis SPHEROID["<name>", <semi-major-axis>, <inverse-flattening>, ...]
semi_minor_axis no direct equivalent, the SPHEROID element is used to define ellipsoid geometry
standard_parallel (one parallel) PARAMETER["Latitude of standard parallel", <value>]
standard_parallel (two parallels) PARAMETER["Latitude of 1st standard parallel", <value>], PARAMETER["Latitude of 2nd standard parallel", <value>]
straight_vertical_longitude_from_pole PARAMETER["Longitude of origin", <value>]
Last modified 3 years ago Last modified on 11/20/13 15:20:49

Attachments (3)

Download all attachments as: .zip