Best Practices OGC URNs
Best Practices about the use of OGC Uniform Resource Names (URN)s
Introduction
A URN or Unique Resource Identifier is a scheme that serves as unique string identifiers for concepts (units, phenomena) or real word objects (documents). OGC has defined a URN scheme to help identify better terminology used in request and responses of there services.
General and Recommended Form
The general form of a URN is
urn:$organization:string_unique_to_organization
The $organization code is a code formally requested from IANA; until registered, the prefix 'x-' is prepended to the desired code.
The recommended form of a URN for specifying terms in OGC is given by OGC 05-010, an easy to read and readily available document. Its form is:
urn:ogc:def:objectType:authority:version:code
Considerations
Terms could have more than one representation (like EPSG codes)
If there is no version then the version string is null and a colon may appear after another colon. For example: urn:ogc:def:crs:EPSG::4326. OGC URN Policy and 07-092r1 are not very clear. We assume that in the case of OGC definitions: "urn:ogc:def" ":" objectType ":" authority ":" [ version ] ":" code, there must be at least six ":", where:
- Between the 5th and 6th colon it is encounter the version string
- After the 6th colon it is encounter the version number, and it could contain colons.
Concatenating URNs
Commonly use terms
| URN | definition | used in |
|---|---|---|
| urn:ogc:def:crs:EPSG:6.5:4326 urn:ogc:def:crs:EPSG:6.15:4326 urn:ogc:def:crs:EPSG::4326 |
2D Coordinate Reference System (WGS84 Ellipsoidal). Then lower corner is minLon,minLat and upperCorner is maxLon, maxLat |
getCapabilitiesResponse //gml:Envelope/@srsName getObservationResponse //gml:Envelope/@srsName |
Making your definitions officially an OGC URN
If an organization wants its definitions to have the OGC namespace, then they must submit a OGC URN {ResourceSpecificString} proposal to the OGC naming authority. More information is available in the OGC URN Policy Governance section.
OGC URN Scheme in EBNF
This section presents the OGC URN scheme in Extended Backus–Naur (EBNF) form, that is assumed by OOSTethys. The following documents were used as source:
- URN Scheme RFC 2141 http://www.rfc-editor.org/rfc/rfc2141.txt
- OGC URN Policy: http://www.opengeospatial.org/ogcUrnPolicy
- OGC #07-092r1: http://portal.opengeospatial.org/files/?artifact_id=24045
Note: There is no a complete BNF (Backus-Naur Form) or EBNF currently defined in any OGC official document. The URN syntax representation presented here is for OOSTethys summary purposes and to help developers code appropriately.
URN ::= "urn:ogc:" OGCResourceType
OGCResourceType ::= OGCDefintionType | OGCSpecificationType | OGCServiceType
OGCDefintionType ::= "def:" objectType ":" authority ":" (version)? ":" code
OGCSpecificationType ::= To be defined
OGCServiceType ::= To be defined
objectType ::= "axis" | "axisDirection" | "coordinateOperation" | "crs" | "cs" | "datum" | "dataType" | "derivedCRSType" | "documentType" | "ellipsoid" | "featureType" | "group" | "meaning" | "meridian" | "method" | "nil" | "parameter" | "phenomenon" | "pixelInCell" | "rangeMeaning" | "referenceSystem" | "uom" | "verticalDatumType"
authority ::= "ECSD" | "EPSG" | "OGC" | "SI" | "UCUM"
version ::= (URNChars) +
code ::= (URNChars | ":") +
URNChars ::= trans | "%"
hex ::= number | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f"
trans ::= letter | number | other | reserved
letter ::= upper | lower
upper ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" |
"I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" |
"Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" |
"Y" | "Z"
lower ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
"i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
"q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
"y" | "z"
number ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
other ::= "(" | ")" | "+" | "," | "-" | "." |
":" | "=" | "@" | ";" | "$" |
"_" | "!" | "*" | "'"
reserved ::= "%" | "/" | "?" | "#"
Revision History
| Date | Editor | Primary Sections modified | Description |
| 2008-07-01 | Luis Bermudez | Initial Draft |
TODOs
| Task |
|---|
| Complete EBNF for OGCSpecificationType |
| Complete EBNF for OGCServiceType |
| Add more examples in commonly use terms |
| Complete part of concatenating URns |

