wiki:NetCDF_ProjectionTestingStatus

Version 21 (modified by etourigny, 12 years ago) ( diff )

--

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

Parameter Table

ProjectionNameCFOGC WKTPROJ.4EPSGNote
GENGeneric----
scale_factor_at_projection_originscale_factork_0 (1)
scale_factor_at_central_meridianscale_factork_0 (1)
standard_parallel[1]standard_parallel_1lat_1
standard_parallel[2]standard_parallel_2lat_2
longitude_of_central_meridianlongitude_of_centerlon_0 (1)
longitude_of_central_meridiancentral_meridianlon_0 (1)
longitude_of_projection_originlongitude_of_centerlon_0 (1)
longitude_of_projection_origincentral_meridianlon_0 (1)
latitude_of_projection_originlatitude_of_originlat_0 (1)
latitude_of_projection_originlatitude_of_centerlat_0 (1)
straight_vertical_longitude_from_polecentral_meridianlon_0 (1)
false_eastingfalse_eastingx_0(2)
false_northingfalse_northingy_0(2)
AEAAlbers Equal Areaalbers_conical_equal_areaAlbers_Conic_Equal_Areaaea9822
standard_parallel[1]standard_parallel_1lat_1
standard_parallel[2]standard_parallel_2lat_2
longitude_of_central_meridianlongitude_of_centerlon_0
latitude_of_projection_originlatitude_of_centerlat_0
AEAzimuthal equidistantazimuthal_equidistantAzimuthal_Equidistantaeqd9832
longitude_of_projection_originlongitude_of_centerlon_0
latitude_of_projection_originlatitude_of_centerlat_0
LAEALambert azimuthal equal arealambert_azimuthal_equal_areaLambert_Azimuthal_Equal_Arealaea9820
longitude_of_projection_originlongitude_of_centerlon_0
latitude_of_projection_originlatitude_of_centerlat_0
LCC-1SPLambert conformallambert_conformal_conicLambert_Conformal_Conic_1SPlcc9801(3) link
standard_parallelstandard_parallel_1lat_1
longitude_of_central_meridiancentral_meridianlon_0
latitude_of_projection_originlatitude_of_originlat_0
N/Ascale_factork_0 always 1 (3)
LCC-2SPLambert conformallambert_conformal_conicLambert_Conformal_Conic_2SPlcc9802(3) link
standard_parallel[1]standard_parallel_1lat_1
standard_parallel[2]standard_parallel_2lat_2
longitude_of_central_meridiancentral_meridianlon_0
latitude_of_projection_originlatitude_of_originlat_0
CEALambert cylindrical equal arealambert_cylindrical_equal_areaCylindrical_Equal_Areacea9834/9835(3)
longitude_of_central_meridiancentral_meridianlon_0
standard_parallel[1]standard_parallel_1lat_ts
M-1SPMercator (1SP)mercatorMercator_1SPmerc9804(3)
longitude_of_projection_origincentral_meridianlon_0
scale_factor_at_projection_originscale_factork_0
M-2SPMercator (2SP)mercatorMercator_2SPmerc9805(3)
longitude_of_projection_origincentral_meridianlon_0
standard_parallel[1]standard_parallel_1lat_1
OrthoOrthographicorthographicOrthographicortho9840
longitude_of_projection_origincentral_meridianlon_0
latitude_of_projection_originlatitude_of_originlat_0
PSPolar stereographicpolar_stereographicPolar_Stereographicstere9010/9829(3)
standard_parallel[1]latitude_of_originlat_0
straight_vertical_longitude_from_pole central_meridianlon_0
StStereographicstereographicStereographicstere9809
longitude_of_projection_origincentral_meridianlon_0
latitude_of_projection_originlatitude_of_originlat_0
scale_factor_at_projection_originscale_factork_0
TMTransverse Mercatortransverse_mercatorTransverse_Mercatortm/utm9807(3)
scale_factor_at_central_meridianscale_factork_0
longitude_of_central_meridiancentral_meridianlon_0
latitude_of_projection_originlatitude_of_originlat_0

Notes:

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

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=merc (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).

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.