wiki:NetCDF_ProjectionTestingStatus

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

Coordinate system keywords (starting with CF-1.7)

CFOGC WKTPROJ.4Note
projected_coordinate_system_namePROJCSN/A
geographic_coordinate_system_nameGEOGCSN/A
horizontal_datum_nameGEOGCS|DATUM+datum
reference_ellipsoid_nameGEOGCS|DATUM|SPHEROID+ellps
towgs84GEOGCS|DATUM|TOWGS84+towgs84
prime_meridian_nameGEOGCS|PRIMEM+pm

Mapping from CF Grid Mapping Attributes to CRS WKT Elements

Adapted from https://cf-pcmdi.llnl.gov/trac/wiki/Cf2CrsWkt

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>]
projected_coordinate_system_name PROJCS["<projected_coordinate_system_name>", ...]
geographic_coordinate_system_name GEOGCS["<geographic_coordinate_system_name>", ...]
horizontal_datum_name GEOGCS["<name>", DATUM["<horizontal_datum_name>", ...] ]
reference_ellipsoid_name GEOGCS["<name>", DATUM["<name>", SPHEROID["<reference_ellipsoid_name>", ...] ] ]
towgs84 GEOGCS["<name>", DATUM["<name>", TOWGS84[<7 params>] ]
prime_meridian_name GEOGCS["<name>",PRIMEM["<prime_meridian_name>",<value>]

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)

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

Notes:

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

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 '

Status of NetCDF CF-1.5 projection handling capability in work-in-progress NetCDF driver upgrade

This page was created to list/track progress as a supplement to work in October 2011 on wiki:NetCDF_Improvements, specifically wiki:NetCDF_exportUpdateChanges.

The list of supported CF-1.5 projections is shown at http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/apf.html .

The table below shows tested ability to export projections from a GDAL raster - originally in GeoTIFF - to NetCDF CF-1.5 in each supported projection.

The shorthand projection names listed below correspond to their names in the source files and hopefully are fairly self-explanatory - they've been listed in the same order as that shown on the CF-1.5 appendix page.

Note: the current import capability has been tested to be the inverse of the export capability. We would appreciate any help in obtaining valid test files for each of these projections. If and when we are able to test capability to import NetCDF CF-1.5 variants that don't have a direct OGC WKT equivalent, we should add a supplementary table.

ProjectionNameCF ExportCF ImportNetCDF JavaUpdatedNote
AEAAlbers Equal AreaYesYesYes18/10/11Tested regular 2SP version - see AEA note below.
AEAzimuthal equidistantYesYesNo18/10/11See (1) below
LAEALambert azimuthal equal areaYesYesYes18/10/11
LCC1SPLambert conformal?Yes*?18/10/11See note below.
LCC2SPLambert conformalYesYesYes18/10/11
CEALambert Cylindrical Equal AreaYesPartialNo18/10/11Tested regular OGC WKT with std_parallel version (CF-1 has alternative scale_factor_at_projection_origin version, see notes below). See (1) below re NetCDF-Java loading.
M-1SPMercatorYesYesNo18/10/11See (1) below
M-2SPMercatorYesYesYes*18/10/11Parameters appear correct, loads in NetCDF Java and IDV, but appears translated slightly (a few arc-minutes) from expected position
OrthoOrthographicYesYesYes18/10/11
PSPolar stereographicYes*YesNo*21/12/11Believe we can translate parameters correctly, but see comments below. Translated file opens in NetCDF-Java IDV, but doesn't display as correctly georeferenced.
Rot PoleRotated poleNoNoNo18/10/11See projection comments below
StStereographicYesYesYes18/10/11
TMTransverse MercatorYesYesYes18/10/11

General notes:

(1) For projections that won't load correctly as referenced grids in NetCDF Java, we've contacted the developers to ask for clarification/testing support. In most cases, the CF-1 attributes seem appropriate.

Issues with CF-1 implementation of specific projections:

  • AEA : The OGC WKT version has 2 Std parallels - whereas the CF-1.5 version says it can have either 1 or 2 std parallels. How should the CF 1SP version be converted to OGC WKT, and vice-versa?
    • Currently the driver, on import and finding an AEA with only 1 std parallel, will set the 2nd std parallel in the WKT as identical to the first.
  • LCC : The OGC WKT 'Lambert_Conformal_Conic_2SP' maps clearly to LCC in CF-1 with 2 std parallels. The CF-1 spec claims that a 1SP version can be used, but it doesn't include a 'scale_factor' as does the OGC WKT 'Lambert_Conformal_Conic_1SP'.
    • For import: Given discussion and example on #3324, and also support from NARCCAP project: it seems the CF-1 LCC 1SP projection is a 'degenerate' LCC-2SP with both SP's at the same location. Thus seems we can read with both 'std_parallel' (1 value) and 'latitude_of_projection_origin' mapping to latitude_of_origin (WKT) and setting scale_factor=1? This is the code's current behaviour (though perhaps could do more error-checking).
    • For export: given the LCC-1SP can specifically include a scale_factor to control the projection (see http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html), it seems this can't be directly exported to NetCDF without throwing away the scale factor.
      • Perhaps the reasonable thing for now is to export the scale_factor to NetCDF, so it can at least be read back in. Otherwise, we'd have to try to translate the LCC-1SP to a LCC-2SP on the fly.
  • CEA : The CF-1 conventions claim this can be encoded with a 'scale_factor_at_projection_origin' alternative to standard parallel - how would this conversion be done from/to OGC WKT (which requires central_meridian and standard_parallel_1)?
  • PS : This projection's parameters in CF-1 are significantly different from http://www.remotesensing.org/geotiff/proj_list/polar_stereographic.html. In particular the CF-1 equivalent for 'latitude of natural origin' seems to be 'standard_parallel'. CF-1 defines either standard_parallel or scale_factor_at_projection_origin, which is incompatible with OGC WKT (and OGR) that requires both. Snyder's eq. 22-7 allows to relate standard_parallel and scale_factor_at_projection_origin, given that the standard_parallel is defined as the latitude where scale_factor=1. Implementation as of Dec. 21:
    • WKT scale_factor maps to CF scale_factor_at_projection_origin
    • WKT central_meridian maps to CF straight_vertical_longitude_from_pole
    • WKT latitude_of_origin maps to WKT standard_parallel
    • WKT to CF: if WKT latitude_of_origin is positive then CF latitude_of_projection_origin is +90, else it is -90 (North vs. South Pole), scale factor is not exported
    • CF to WKT: is standard_parallel is not defined, compute it from scale_factor using Snyder 22-7
  • Rot pole : Not able yet to test: as seems GDAL needs support of advanced proj4 strings that can handle rotated coord systems (see bug #4285).
Last modified 6 years ago Last modified on Jan 31, 2012 9:26:45 AM

Attachments (5)

Download all attachments as: .zip