Skip to content

Commit

Permalink
Merge pull request #122 from marqh/wktdetails
Browse files Browse the repository at this point in the history
In a moment I'll issue another pull request to improve indentation in Example 5.12.
  • Loading branch information
painter1 authored Aug 10, 2017
2 parents 71ffb55 + 101c7b1 commit f6c9c24
Showing 1 changed file with 39 additions and 33 deletions.
72 changes: 39 additions & 33 deletions ch05.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ variables:
crs:inverse_flattening = 298.257223563 ;
----
// crs:crs_wkt = "GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\",6378137,298.257223563]], PRIMEM[\"Greenwich\",0], UNIT[\"degree\",0.0174532925199433]]"
// crs:crs_wkt = "GEODCRS[\"WGS 84\", DATUM[\"World Geodetic System 1984\", ELLIPSOID[\"WGS 84\",6378137,298.257223563, LENGTHUNIT[\"metre\",1.0]]], PRIMEM[\"Greenwich\",0], CS[ellipsoidal,3], AXIS[\"(lat)\",north,ANGLEUNIT[\"degree\",0.0174532925199433]], AXIS[\"(lon)\",east,ANGLEUNIT[\"degree\",0.0174532925199433]], AXIS[\"ellipsoidal height (h)\",up,LENGTHUNIT[\"metre\",1.0]]]"
====


Expand Down Expand Up @@ -485,8 +485,7 @@ considered to represent the definitive authority as regards CRS property names a
Examples 5.11 illustrates how the coordinate system properties specified via the crs grid mapping
variable in Example 5.9 might be expressed using a **`crs_wkt`** attribute. Example 5.12 also
illustrates the addition of the **`crs_wkt`** attribute, but here the attribute is added to the
**`crs`** variable of a simplified variant of Example 5.10 (5.12 also represents a slightly modified
version of the WKT example shown in section 7.4 of <<OGC_WKT-CRS>>). For brevity in Example 5.11, only
**`crs`** variable of a simplified variant of Example 5.10. For brevity in Example 5.11, only
the grid mapping variable and its grid_mapping_name and crs_wkt attributes are included; all other
elements are as per the Example 5.9. Names of projection PARAMETERs follow the spellings used in
the EPSG geodetic parameter registry.
Expand All @@ -513,12 +512,15 @@ specify CRS properties not covered by existing CF grid mapping attributes, inclu
crs:grid_mapping_name = "latitude_longitude";
...
crs:crs_wkt =
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563]
],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]]
GEODCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1.0]]],
PRIMEM["Greenwich",0],
CS[ellipsoidal,3],
AXIS["(lat)",north,ANGLEUNIT["degree",0.0174532925199433]],
AXIS["(lon)",east,ANGLEUNIT["degree",0.0174532925199433]],
AXIS["ellipsoidal height (h)",up,LENGTHUNIT["metre",1.0]]]
...
----
====
Expand Down Expand Up @@ -564,45 +566,49 @@ variables:
crs:reference_ellipsoid_name = "Airy 1830" ;
crs:prime_meridian_name = "Greenwich" ;
crs:towgs84 = 375., -111., 431., 0., 0., 0., 0. ;
crs:crs_wkt = "COMPD_CS ["OSGB 1936 / British National Grid + ODN",
PROJCS ["OSGB 1936 / British National Grid",
GEOGCS ["OSGB 1936",
crs:crs_wkt = "COMPOUNDCRS ["OSGB 1936 / British National Grid + ODN",
PROJCRS ["OSGB 1936 / British National Grid",
GEODCRS ["OSGB 1936",
DATUM ["OSGB 1936",
SPHEROID ["Airy 1830", 6377563.396, 299.3249646],
ELLIPSOID ["Airy 1830", 6377563.396, 299.3249646,
LENGTHUNIT[“metre”,1.0]],
TOWGS84[375, -111, 431, 0, 0, 0, 0]
],
PRIMEM ["Greenwich", 0],
UNIT ["degree", 0.0174532925199433]
],
PROJECTION ["Transverse Mercator"],
PARAMETER ["False easting", 400000],
PARAMETER ["False northing", -100000],
PARAMETER ["Longitude of natural origin", -2.0],
PARAMETER ["Latitude of natural origin", 49.0],
PARAMETER ["Longitude of false origin", -7.556],
PARAMETER ["Latitude of false origin", 49.766],
PARAMETER ["Scale factor at natural origin", 0.9996012717],
UNIT ["metre", 1.0],
AUTHORITY ["EPSG", "27700"]
CONVERSION["OSGB",
METHOD["Transverse Mercator",
PARAMETER["False easting", 400000, LENGTHUNIT[“metre”,1.0]],
PARAMETER["False northing", -100000, LENGTHUNIT[“metre”,1.0]],
PARAMETER["Longitude of natural origin", -2.0, ANGLEUNIT[“degree”,0.0174532925199433]],
PARAMETER["Latitude of natural origin", 49.0, ANGLEUNIT[“degree”,0.0174532925199433]],
PARAMETER["Longitude of false origin", -7.556, ANGLEUNIT[“degree”,0.0174532925199433]],
PARAMETER["Latitude of false origin", 49.766, ANGLEUNIT[“degree”,0.0174532925199433]],
PARAMETER["Scale factor at natural origin", 0.9996012717, SCALEUNIT[“Unity”,1.0]],
AUTHORITY["EPSG", "27700"]]
CS[Cartesian,2],
AXIS["easting (X)",east],
AXIS["northing (Y)",north],
LENGTHUNIT[“metre”, 1.0],
],
VERT_CS ["Newlyn",
VERT_DATUM ["Ordnance Datum Newlyn", 2005],
UNIT ["metre", 1.0]",
AXIS ["Gravity-related height", UP],
VERTCRS ["Newlyn",
VDATUM ["Ordnance Datum Newlyn", 2005],
AUTHORITY ["EPSG", "5701"]
]]" ;
CS[vertical,1],
AXIS["gravity-related height (H)",up],
LENGTHUNIT[“metre”,1.0]
]
]" ;
...
----
// From an earlier draft of this example:
// crs:crs_wkt = "PROJCS[\"OSGB 1936 / British National Grid\", GEOGCS[\"OSGB 1936\", DATUM[\"OSGB_1936\", SPHEROID[\"Airy 1830\",6377563.396,299.3249646000044], TOWGS84[375,-111,431,0,0,0,0]], PRIMEM[\"Greenwich\",0], UNIT[\"degree\",0.0174532925199433]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\",49], PARAMETER[\"central_meridian\",-2], PARAMETER[\"scale_factor\",0.9996012717], PARAMETER[\"false_easting\",400000], PARAMETER[\"false_northing\",-100000], UNIT[\"metre\",1]]"
====

Note: To enhance readability the WKT value has been split across multiple lines and embedded
quotation marks (") left unescaped - in real netCDF files such characters would need to be
escaped. Also for clarity, we have dropped the quotation marks which would delimit the entire crs_wkt
string. The WKT specification in <<OGC_WKT-CRS>> appears to silent be as regards which character(s) may
be used to delimit text-valued properties; however, since all the examples in that specification use
quotation marks, the use of that particular delimiting character is mandated by the CF convention.
string.



Expand Down

0 comments on commit f6c9c24

Please sign in to comment.