idnits 2.17.00 (12 Aug 2021) /tmp/idnits58081/draft-ietf-netmod-geo-location-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 228 has weird spacing: '...ngitude deg...' == Line 915 has weird spacing: '...ngitude deg...' -- The document date (April 29, 2019) is 1117 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'EGM08' -- Possible downref: Non-RFC (?) normative reference: ref. 'EGM96' -- Possible downref: Non-RFC (?) normative reference: ref. 'WGS84' Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Hopps 3 Internet-Draft LabN Consulting, L.L.C. 4 Intended status: Standards Track April 29, 2019 5 Expires: October 31, 2019 7 YANG Geo Location 8 draft-ietf-netmod-geo-location-01 10 Abstract 12 This document defines a generic geographical location object YANG 13 grouping. The geographical location grouping is intended to be used 14 in YANG models for specifying a location on or in reference to the 15 Earth or any other astronomical object. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on October 31, 2019. 34 Copyright Notice 36 Copyright (c) 2019 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 53 2. The Geo Location Object . . . . . . . . . . . . . . . . . . . 3 54 2.1. Frame of Reference . . . . . . . . . . . . . . . . . . . 3 55 2.2. Location . . . . . . . . . . . . . . . . . . . . . . . . 4 56 2.3. Motion . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 2.4. Nested Locations . . . . . . . . . . . . . . . . . . . . 5 58 2.5. Non-location Attributes . . . . . . . . . . . . . . . . . 5 59 2.6. Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 6 61 4. ISO 6709:2008 Conformance . . . . . . . . . . . . . . . . . . 11 62 5. Usability . . . . . . . . . . . . . . . . . . . . . . . . . . 12 63 5.1. Portability . . . . . . . . . . . . . . . . . . . . . . . 13 64 5.1.1. IETF URI Value . . . . . . . . . . . . . . . . . . . 13 65 5.1.2. W3C . . . . . . . . . . . . . . . . . . . . . . . . . 13 66 5.1.3. Geography Markup Language (GML) . . . . . . . . . . . 15 67 5.1.4. KML . . . . . . . . . . . . . . . . . . . . . . . . . 15 68 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 69 6.1. Geodetic System Value Registry . . . . . . . . . . . . . 16 70 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17 71 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 72 8.1. Normative References . . . . . . . . . . . . . . . . . . 18 73 8.2. Informative References . . . . . . . . . . . . . . . . . 19 74 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 19 75 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 23 76 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 23 78 1. Introduction 80 In many applications we would like to specify the location of 81 something geographically. Some examples of locations in networking 82 might be the location of data center, a rack in an internet exchange 83 point, a router, a firewall, a port on some device, or it could be 84 the endpoints of a fiber, or perhaps the failure point along a fiber. 86 Additionally, while this location is typically relative to The Earth, 87 it does not need to be. Indeed it is easy to imagine a network or 88 device located on The Moon, on Mars, on Enceladus (the moon of 89 Saturn) or even a comet (e.g., 67p/churyumov-gerasimenko). 91 Finally, one can imagine defining locations using different frames of 92 reference or even alternate systems (e.g., simulations or virtual 93 realities). 95 This document defines a "geo-location" YANG grouping that allows for 96 all of the above data to be captured. 98 This specification conforms to [ISO.6709.2008]. 100 The YANG data model described in this document conforms to the 101 Network Management Datastore Architecture defined in [RFC8342]. 103 1.1. Terminology 105 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 106 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 107 "OPTIONAL" in this document are to be interpreted as described in 108 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, 109 as shown here. 111 2. The Geo Location Object 113 2.1. Frame of Reference 115 The frame of reference ("reference-frame") defines what the location 116 values refer to and their meaning. The referred to object can be any 117 astronomical body. It could be a planet such as The Earth or Mars, a 118 moon such as Enceladus, an asteroid such as Ceres, or even a comet 119 such as 1P/Halley. This value is specified in "astronomical-body" 120 and is defined by the International Astronomical Union 121 (), The default "astronomical-body" value is 122 "earth". 124 In addition to identifying the astronomical body we also need to 125 define the meaning of the coordinates (e.g., latitude and longitude) 126 and the definition of 0-height. This is done with a "geodetic-datum" 127 value. The default value for "geodetic-datum" is "wgs-84" (i.e., the 128 World Geodetic System, [WGS84]), which is used by the Global 129 Positioning System (GPS) among many others. We define an IANA 130 registry for specifying standard values for the "geodetic-datum". 132 In addition to the "geodetic-datum" value we allow refining the 133 coordinate and height accuracy using "coord-accuracy" and "height- 134 accuracy" respectively. When specified these values override the 135 defaults implied by the "geodetic-datum" value. 137 Finally, we define an optional feature which allows for changing the 138 system for which the above values are defined. This optional feature 139 adds an "alternate-system" value to the reference frame. This value 140 is normally not present which implies the natural universe is the 141 system. The use of this value is intended to allow for creating 142 virtual realities or perhaps alternate coordinate systems. The 143 definition of alternate systems is outside the scope of this 144 document. 146 2.2. Location 148 This is the location on or relative to the astronomical object. It 149 is specified using 2 or 3 coordinates values. These values are given 150 either as "latitude", "longitude", and an optional "height", or as 151 Cartesian coordinates of "x", "y" and an optional "z". For the 152 standard location choice "latitude" and "longitude" are specified as 153 fractions of decimal degrees, and the "height" value is in fractions 154 of meters. For the Cartesian choice "x", "y" and "z" are in 155 fractions of meters. In both choices the exact meanings of all of 156 the values are defined by the "geodetic-datum" value in the 157 Section 2.1. 159 2.3. Motion 161 Support is added for objects in relatively stable motion. For 162 objects in relatively stable motion the grouping provides a 163 3-dimensional vector value. The components of the vector are 164 "v-north", "v-east" and "v-up" which are all given in fractional 165 meters per second. The values "v-north" and "v-east" are relative to 166 true-north as defined by the reference frame for the astronomical 167 body, "v-up" is perpendicular to the plane defined by "v-north" and 168 "v-east", and is pointed away from the center of mass. 170 To derive the 2-dimensional heading and speed one would use the 171 following formulas: 173 ,------------------------------ 174 speed = V v_{north}^{2} + v_{east}^{2} 176 heading = arctan(v_{east} / v_{north}) 178 For some applications that demand high accuracy, and where the data 179 is infrequently updated this velocity vector can track very slow 180 movement such as continental drift. 182 Tracking more complex forms of motion is outside the scope of this 183 work. The intent of the grouping being defined here is to identify 184 where something is located, and generally this is expected to be 185 somewhere on or relative to the Earth (or another astronomical body). 186 At least two options are available to YANG models that wish to use 187 this grouping with objects that are changing location frequently in 188 non-simple ways, they can add additional motion data to their model 189 directly, or if the application allows it can require more frequent 190 queries to keep the location data current. 192 2.4. Nested Locations 194 When locations are nested (e.g., a building may have a location which 195 houses routers that also have locations) the module using this 196 grouping is free to indicate in its definition that the "reference- 197 frame" is inherited from the containing object so that the 198 "reference-frame" need not be repeated in every instance of location 199 data. 201 2.5. Non-location Attributes 203 During the development of this module, the question of whether it 204 would support data such as orientation arose. These types of 205 attributes are outside the scope of this grouping because they do not 206 deal with a location but rather describe something more about the 207 object that is at the location. Module authors are free to add these 208 non-location attributes along with their use of this location 209 grouping. 211 2.6. Tree 213 The following is the YANG tree diagram [RFC8340] for the geo-location 214 grouping. 216 module: ietf-geo-location 217 +-- geo-location 218 +-- reference-frame 219 | +-- alternate-system? string {alternate-systems}? 220 | +-- astronomical-body? string 221 | +-- geodetic-system 222 | +-- geodetic-datum? string 223 | +-- coord-accuracy? decimal64 224 | +-- height-accuracy? decimal64 225 +-- (location) 226 | +--:(ellipsoid) 227 | | +-- latitude degrees 228 | | +-- longitude degrees 229 | | +-- height? decimal64 230 | +--:(cartesian) 231 | +-- x decimal64 232 | +-- y decimal64 233 | +-- z? decimal64 234 +-- velocity 235 | +-- v-north? decimal64 236 | +-- v-east? decimal64 237 | +-- v-up? decimal64 238 +-- timestamp? types:date-and-time 240 Figure 1: Geo Location YANG tree diagram. 242 3. YANG Module 244 file "ietf-geo-location@2019-02-17.yang" 245 module ietf-geo-location { 246 namespace "urn:ietf:params:xml:ns:yang:ietf-geo-location"; 247 prefix geo; 248 import ietf-yang-types { prefix types; } 250 organization 251 "IETF NETMOD Working Group (NETMOD)"; 252 contact 253 "Christian Hopps "; 255 // RFC Ed.: replace XXXX with actual RFC number and 256 // remove this note. 258 description 259 "This module defines a grouping of a container object for 260 specifying a location on or around an astronomical object (e.g., 261 The Earth). 263 Copyright (c) 2018 IETF Trust and the persons identified as 264 authors of the code. All rights reserved. 266 Redistribution and use in source and binary forms, with or 267 without modification, is permitted pursuant to, and subject to 268 the license terms contained in, the Simplified BSD License set 269 forth in Section 4.c of the IETF Trust's Legal Provisions 270 Relating to IETF Documents 271 (https://trustee.ietf.org/license-info). 273 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 274 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 275 'MAY', and 'OPTIONAL' in this document are to be interpreted as 276 described in BCP 14 [RFC2119] [RFC8174] when, and only when, 277 they appear in all capitals, as shown here. 279 This version of this YANG module is part of RFC XXXX 280 (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for 281 full legal notices."; 283 // RFC Ed.: replace XXXX with actual RFC number and 284 // remove this note. 286 revision 2019-02-17 { 287 description "Initial Revision"; 288 reference "RFC XXXX: YANG Geo Location"; 289 } 291 typedef degrees { 292 type decimal64 { 293 fraction-digits 16; 294 } 295 units "decimal degrees"; 296 description "Coordinate value."; 297 } 299 feature alternate-systems { 300 description 301 "This feature means the device supports specifying locations 302 using alternate systems for reference frames."; 303 } 305 grouping geo-location { 306 description 307 "Grouping to identify a location on an astronomical object."; 309 container geo-location { 310 description 311 "A location on an astronomical body (e.g., The Earth) 312 somewhere in a universe."; 314 container reference-frame { 315 description 316 "The Frame of Reference for the location values."; 318 leaf alternate-system { 319 if-feature alternate-systems; 320 type string; 321 description 322 "The system in which the astronomical body and 323 geodetic-datum is defined. Normally, this value is not 324 present and the system is the natural universe; however, 325 when present this value allows for specifying alternate 326 systems (e.g., virtual realities). An alternate-system 327 modifies the definition (but not the type) of the other 328 values in the reference frame."; 329 } 330 leaf astronomical-body { 331 type string { 332 pattern '[ -@\[-\^_-~]*'; 333 } 334 default "earth"; 335 description 336 "An astronomical body as named by the International 337 Astronomical Union (IAU) or according to the alternate 338 system if specified. Examples include 'sun' (our star), 339 'earth' (our planet), 'moon' (our moon), 'enceladus' (a 340 moon of Saturn), 'ceres' (an asteroid), 341 '67p/churyumov-gerasimenko (a comet). The value should 342 be comprised of all lower case ASCII characters not 343 including control characters (i.e., values 32..64, and 344 91..126). Any preceding 'the' in the name should not 345 be included."; 346 } 347 container geodetic-system { 348 description 349 "The geodetic system of the location data."; 350 leaf geodetic-datum { 351 type string { 352 pattern '[ -@\[-\^_-~]*'; 353 } 354 default "wgs-84"; 355 description 356 "A geodetic-datum defining the meaning of latitude, 357 longitude and height. The default is 'wgs-84' which is 358 used by the Global Positioning System (GPS). The value 359 SHOULD be comprised of all lower case ASCII characters 360 not including control characters (i.e., values 32..64, 361 and 91..126). The IANA registry further restricts the 362 value by converting all spaces (' ') to dashes ('-')"; 363 } 364 leaf coord-accuracy { 365 type decimal64 { 366 fraction-digits 6; 367 } 368 description 369 "The accuracy of the latitude longitude pair. When 370 coord-accuracy is specified it overrides the 371 geodetic-datum implied accuracy. If Cartesian 372 coordinates are in use this accuracy corresponds to 373 the X and Y components"; 374 } 375 leaf height-accuracy { 376 type decimal64 { 377 fraction-digits 6; 378 } 379 units "meters"; 380 description 381 "The accuracy of height value. When specified it 382 overrides the geodetic-datum implied default. If 383 Cartesian coordinates ar in use this accuracy 384 corresponds to the Z component."; 385 } 386 // May wish to allow for height to be relative. 387 // If so need to decide if we have a boolean (to ground) 388 // or an enumeration (e.g., local ground, sea-floor, 389 // ground floor, containing object, ...) or even allow 390 // for a string for most generic but least portable 391 // comparable 392 // leaf height-relative { 393 // } 394 } 395 } 396 choice location { 397 mandatory true; 398 description 399 "The location data either in lat/long or Cartesian values"; 400 case ellipsoid { 401 leaf latitude { 402 type degrees; 403 mandatory true; 404 description 405 "The latitude value on the astronomical body. The 406 definition and precision of this measurement is 407 indicated by the reference-frame value."; 409 } 410 leaf longitude { 411 type degrees; 412 mandatory true; 413 description 414 "The longitude value on the astronomical body. The 415 definition and precision of this measurement is 416 indicated by the reference-frame."; 417 } 418 leaf height { 419 type decimal64 { 420 fraction-digits 6; 421 } 422 units "meters"; 423 description 424 "Height from a reference 0 value. The precision and '0' 425 value is defined by the reference-frame."; 426 } 427 } 428 case cartesian { 429 leaf x { 430 type decimal64 { 431 fraction-digits 6; 432 } 433 mandatory true; 434 description 435 "The X value as defined by the reference-frame."; 436 } 437 leaf y { 438 type decimal64 { 439 fraction-digits 6; 440 } 441 mandatory true; 442 description 443 "The Y value as defined by the reference-frame."; 444 } 445 leaf z { 446 type decimal64 { 447 fraction-digits 6; 448 } 449 units "meters"; 450 description 451 "The Z value as defined by the reference-frame."; 452 } 453 } 454 } 455 container velocity { 456 description 457 "If the object is in motion the velocity vector describes 458 this motion at the the time given by the timestamp."; 460 leaf v-north { 461 type decimal64 { 462 fraction-digits 12; 463 } 464 units "meters per second"; 465 description 466 "v-north is the rate of change (i.e., speed) towards 467 truth north as defined by the ~geodetic-system~."; 468 } 470 leaf v-east { 471 type decimal64 { 472 fraction-digits 12; 473 } 474 units "meters per second"; 475 description 476 "v-east is the rate of change (i.e., speed) perpendicular 477 to truth-north as defined by the ~geodetic-system~."; 478 } 480 leaf v-up { 481 type decimal64 { 482 fraction-digits 12; 483 } 484 units "meters per second"; 485 description 486 "v-up is the rate of change (i.e., speed) away from the 487 center of mass."; 488 } 489 } 490 leaf timestamp { 491 type types:date-and-time; 492 description "Reference time when location was recorded."; 493 } 494 } 495 } 496 } 497 499 4. ISO 6709:2008 Conformance 501 [ISO.6709.2008] provides an appendix with a set of tests for 502 conformance to the standard. The tests and results are given in the 503 following table along with an explanation of non-applicable tests. 505 +---------+-----------------------------------+---------------------+ 506 | Test | Description | Pass Explanation | 507 +---------+-----------------------------------+---------------------+ 508 | A.1.2.1 | elements reqd. for a geo. point | CRS is always | 509 | | location | indicated | 510 | | | | 511 | A.1.2.2 | Description of a CRS from a | CRS register is | 512 | | register | defined | 513 | | | | 514 | A.1.2.3 | definition of CRS | N/A - Don't define | 515 | | | CRS | 516 | | | | 517 | A.1.2.4 | representation of horizontal | lat/long values | 518 | | position | conform | 519 | | | | 520 | A.1.2.5 | representation of vertical | height value | 521 | | position | conforms | 522 | | | | 523 | A.1.2.6 | text string representation | N/A - No string | 524 | | | format | 525 +---------+-----------------------------------+---------------------+ 527 Conformance Test Results 529 For test "A.1.2.1" the YANG geo location object either includes a CRS 530 ("reference-frame") or has a default defined ([WGS84]). 532 For "A.1.2.3" we do not define our own CRS, and doing so is not 533 required for conformance. 535 For "A.1.2.6" we do not define a text string representation, which is 536 also not required for conformance. 538 5. Usability 540 The geo-location object defined in this document and YANG module have 541 been designed to be usable in a very broad set of applications. This 542 includes the ability to locate things on astronomical bodies other 543 than The Earth, and to utilize entirely different coordinate systems 544 and realities. 546 Many systems make use of geo-location data, and so it's important to 547 be able describe this data using this geo-location object defined in 548 this document. 550 5.1. Portability 552 In order to verify portability while developing this module the 553 following standards and standard APIs and were considered. 555 5.1.1. IETF URI Value 557 [RFC5870] defines a standard URI value for geographic location data. 558 It includes the ability to specify the "geodetic-value" (it calls 559 this "crs") with the default being "wgs-84" [WGS84]. For the 560 location data it allows 2 to 3 coordinates defined by the "crs" 561 value. For accuracy it has a single "u" parameter for specifying 562 uncertainty. The "u" value is in fractions of meters and applies to 563 all the location values. As the URI is a string, all values are 564 specifies as strings and so are capable of as much precision as 565 required. 567 URI values can be mapped to and from the YANG grouping, with the 568 caveat that some loss of precision (in the extremes) may occur due to 569 the YANG grouping using decimal64 values rather than strings. 571 5.1.2. W3C 573 See . 575 W3C Defines a geo-location API in [W3CGEO]. We show a snippet of 576 code below which defines the geo-location data for this API. This is 577 used by many application (e.g., Google Maps API). 579 interface GeolocationPosition { 580 readonly attribute GeolocationCoordinates coords; 581 readonly attribute DOMTimeStamp timestamp; 582 }; 584 interface GeolocationCoordinates { 585 readonly attribute double latitude; 586 readonly attribute double longitude; 587 readonly attribute double? altitude; 588 readonly attribute double accuracy; 589 readonly attribute double? altitudeAccuracy; 591 readonly attribute double? speed; 592 }; 594 Figure 2: Snippet Showing Geo-Location Definition 596 5.1.2.1. Compare with YANG Model 598 +------------------+--------------+-----------------+-------------+ 599 | Field | Type | YANG | Type | 600 +------------------+--------------+-----------------+-------------+ 601 | accuracy | double | coord-accuracy | dec64 fr 6 | 602 | | | | | 603 | altitude | double | height | dec64 fr 6 | 604 | | | | | 605 | altitudeAccuracy | double | height-accuracy | dec64 fr 6 | 606 | | | | | 607 | heading | double | heading | dec64 fr 16 | 608 | | | | | 609 | latitude | double | latitude | dec64 fr 16 | 610 | | | | | 611 | longitude | double | longitude | dec64 fr 16 | 612 | | | | | 613 | speed | double | speed | dec64 fr 12 | 614 | | | | | 615 | timestamp | DOMTimeStamp | timestamp | string | 616 +------------------+--------------+-----------------+-------------+ 618 accuracy (double): 619 Accuracy of "latitude" and "longitude" values in meters. 621 altitude (double): 622 Optional height in meters above the [WGS84] ellipsoid. 624 altitudeAccuracy (double): 625 Optional accuracy of "altitude" value in meters. 627 heading (double): 628 Optional Direction in decimal deg from true north increasing 629 clock-wise. 631 latitude, longitude (double): 632 Standard lat/long values in decimal degrees. 634 speed (double): 635 Speed along heading in meters per second. 637 timestamp (DOMTimeStamp): 638 Specifies milliseconds since the Unix EPOCH in 64 bit unsigned 639 integer. The YANG model defines the timestamp with arbitrarily 640 large precision by using a string which encompasses all 641 representable values of this timestamp value. 643 W3C API values can be mapped to the YANG grouping, with the caveat 644 that some loss of precision (in the extremes) may occur due to the 645 YANG grouping using decimal64 values rather than doubles. 647 Conversely, only YANG values for The Earth using the default "wgs-84" 648 [WGS84] as the "geodetic-datum", can be directly mapped to the W3C 649 values, as W3C does not provide the extra features necessary to map 650 the broader set of values supported by the YANG grouping. 652 5.1.3. Geography Markup Language (GML) 654 ISO adopted the Geography Markup Language (GML) defined by OGC 07-036 655 as [ISO.19136.2007]. GML defines, among many other things, a 656 position type "gml:pos" which is a sequence of "double" values. This 657 sequence of values represent coordinates in a given CRS. The CRS is 658 either inherited from containing elements or directly specified as 659 attributes "srsName" and optionally "srsDimension" on the "gml:pos". 661 GML defines an Abstract CRS type which Concrete CRS types derive 662 from. This allows for many types of CRS definitions. We are 663 concerned with the Geodetic CRS type which can have either 664 ellipsoidal or Cartesian coordinates. We believe that other non- 665 Earth based CRS as well as virtual CRS should also be representable 666 by the GML CRS types as well. 668 Thus GML "gml:pos" values can be mapped directly to the YANG 669 grouping, with the caveat that some loss of precision (in the 670 extremes) may occur due to the YANG grouping using decimal64 values 671 rather than doubles. 673 Conversely, YANG grouping values can be mapped to GML as directly as 674 the GML CRS available definitions allow with a minimum of Earth-based 675 geodetic systems fully supported. 677 GML also defines an observation value in "gml:Observation" which 678 includes a timestamp value "gml:validTime" in addition to other 679 components such as "gml:using" "gml:target" and "gml:resultOf". Only 680 the timestamp is mappable to and from the YANG grouping. Furthermore 681 "gml:validTime" can either be an Instantaneous measure 682 ("gml:TimeInstant") or a time period ("gml:TimePeriod"). Only the 683 instantaneous "gml:TimeInstant" is mappable to and from the YANG 684 grouping. 686 5.1.4. KML 688 KML 2.2 [KML22] (formerly Keyhole Markup Language) was submitted by 689 Google to Open Geospatial Consortium (OGC) 690 and was adopted. The latest 691 version as of this writing is KML 2.3 [KML23]. This schema includes 692 geographic location data in some of it's objects (e.g., objects). This data is provided in string format and 694 corresponds to the [W3CGEO] values. The timestamp value is also 695 specified as a string as in our YANG grouping. 697 KML has some special handling for the height value useful for 698 visualization software, "kml:altitudeMode". These values for 699 "kml:altitudeMode" include indicating the height is ignored 700 ("clampToGround"), in relation to the locations ground level 701 ("relativeToGround"), or in relation to the geodetic datum 702 ("absolute"). The YANG grouping can directly map the ignored and 703 absolute cases, but not the relative to ground case. 705 In addition to the "kml:altitudeMode" KML also defines two seafloor 706 height values using "kml:seaFloorAltitudeMode". One value is to 707 ignore the height value ("clampToSeaFloor") and the other is relative 708 ("relativeToSeaFloor"). As with the "kml:altitudeMode" value, the 709 YANG grouping supports the ignore case but not the relative case. 711 The KML location values use a geodetic datum defined in Annex A by 712 the GML Coordinate Reference System (CRS) [ISO.19136.2007] with 713 identifier "LonLat84_5773". The altitude value for KML absolute 714 height mode is measured from the vertical datum specified by [WGS84]. 716 Thus the YANG grouping and KML values can be directly mapped in both 717 directions (when using a supported altitude mode) with the caveat 718 that some loss of precision (in the extremes) may occur due to the 719 YANG grouping using decimal64 values rather than strings. For the 720 relative height cases the application doing the transformation is 721 expected to have the data available to transform the relative height 722 into an absolute height which can then be expressed using the YANG 723 grouping. 725 6. IANA Considerations 727 6.1. Geodetic System Value Registry 729 This registry allocates names for standard geodetic systems. Often 730 these values are referred to using multiple names (e.g., full names 731 or multiple acronyms values). The intent of this registry is to 732 provide a single standard value for any given geodetic system. 734 The values SHOULD use an acronym when available, they MUST be 735 converted to lower case, and spaces MUST be changed to dashes "-". 737 Each entry should be sufficient to define the 3 coordinate values (2 738 if height is not required). So for example the "wgs-84" is defined 739 as WGS-84 with the geoid updated by at least [EGM96] for height 740 values. Specific entries for [EGM96] and [EGM08] are present if a 741 more precise definition of the data is required. 743 It should be noted that [RFC5870] also creates a registry for 744 Geodetic Systems (it calls CRS); however, this registry has a very 745 strict modification policy. The authors of [RFC5870] have the stated 746 goal of making CRS registration hard to avoid proliferation of CRS 747 values. As our module defines alternate systems and has a broader 748 (beyond earth) scope, the registry defined below is meant to be more 749 easily modified. 751 TODO: Open question, should we create a new registry here or attempt 752 to modify the one created by [RFC5870]. It's worth noting that we 753 include the ability to specify any geodetic system including ones 754 designed for astronomical bodies other than the earth, as well as 755 ones based on alternate systems. These requirements may be too broad 756 for adapting the existing [RFC5870] registry. 758 TODO: Open question, is FCFS too easy, perhaps expert review would 759 strike a good balance. If expert review is acceptable, would it also 760 be acceptable to update the policy on [RFC5870] and use it instead? 762 The allocation policy for this registry is First Come First Served, 763 [RFC8126] as the intent is simply to avoid duplicate values. 765 The initial values for this registry are as follows. 767 +------------+------------------------------------------------------+ 768 | Name | Description | 769 +------------+------------------------------------------------------+ 770 | me | Mean Earth/Polar Axis (Moon) | 771 | | | 772 | mola-vik-1 | MOLA Height, IAU Viking-1 PM (Mars) | 773 | | | 774 | wgs-84-96 | World Geodetic System 1984 [WGS84] w/ EGM96 | 775 | | | 776 | wgs-84-08 | World Geodetic System 1984 [WGS84] w/ [EGM08] | 777 | | | 778 | wgs-84 | World Geodetic System 1984 [WGS84] (EGM96 or better) | 779 +------------+------------------------------------------------------+ 781 7. Security Considerations 783 This document defines a common geo location grouping using the YANG 784 data modeling language. The grouping itself has no security or 785 privacy impact on the Internet, but the usage of the grouping in 786 concrete YANG modules might have. The security considerations 787 spelled out in the YANG 1.1 specification [RFC7950] apply for this 788 document as well. 790 8. References 792 8.1. Normative References 794 [EGM08] Pavlis, N., Holmes, S., Kenyon, S., and J. Factor, "An 795 Earth Gravitational Model to Degree 2160: EGM08.", 2008, 796 . 799 [EGM96] Lemoine, F., Kenyon, S., Factor, J., Trimmer, R., Pavlis, 800 N., Chinn, D., Cox, C., Klosko, S., Luthcke, S., Torrence, 801 M., Wang, Y., Williamson, R., Pavlis, E., Rapp, R., and T. 802 Olson, "The Development of the Joint NASA GSFC and the 803 National Imagery and Mapping Agency (NIMA) Geopotential 804 Model EGM96.", 1998, 805 . 807 [ISO.6709.2008] 808 International Organization for Standardization, "ISO 809 6709:2008 Standard representation of geographic point 810 location by coordinates.", 2008. 812 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 813 Requirement Levels", BCP 14, RFC 2119, 814 DOI 10.17487/RFC2119, March 1997, 815 . 817 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 818 Writing an IANA Considerations Section in RFCs", BCP 26, 819 RFC 8126, DOI 10.17487/RFC8126, June 2017, 820 . 822 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 823 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 824 May 2017, . 826 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 827 and R. Wilton, "Network Management Datastore Architecture 828 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 829 . 831 [WGS84] National Imagery and Mapping Agency., "National Imagery 832 and Mapping Agency Technical Report 8350.2, Third 833 Edition.", 1 2000, . 836 8.2. Informative References 838 [ISO.19136.2007] 839 International Organization for Standardization, "ISO 840 19136:2007 Geographic information -- Geography Markup 841 Language (GML)". 843 [KML22] Wilson, T., Ed., "OGC KML (Version 2.2)", 4 2008, 844 . 847 [KML23] Burggraf, D., Ed., "OGC KML 2.3", 8 2015, 848 . 851 [RFC5870] Mayrhofer, A. and C. Spanring, "A Uniform Resource 852 Identifier for Geographic Locations ('geo' URI)", 853 RFC 5870, DOI 10.17487/RFC5870, June 2010, 854 . 856 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 857 RFC 7950, DOI 10.17487/RFC7950, August 2016, 858 . 860 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 861 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 862 . 864 [W3CGEO] Popescu, A., "Geolocation API Specification", 11 2016, 865 . 868 Appendix A. Examples 870 Below is a fictitious module that uses the geo-location grouping. 872 module example-uses-geo-location { 873 namespace 874 "urn:example:example-uses-geo-location"; 875 prefix ugeo; 876 import ietf-geo-location { prefix geo; } 877 organization "Empty Org"; 878 contact "Example Author "; 879 description "Example use of geo-location"; 880 revision 2019-02-02 { reference "None"; } 881 container locatable-items { 882 description "container of locatable items"; 883 list locatable-item { 884 key name; 885 description "A of locatable item"; 886 leaf name { 887 type string; 888 description "name of locatable item"; 889 } 890 uses geo:geo-location; 891 } 892 } 893 } 895 Figure 3: Example YANG module using geo location. 897 Below is a the YANG tree for the fictitious module that uses the geo- 898 location grouping. 900 module: example-uses-geo-location 901 +--rw locatable-items 902 +--rw locatable-item* [name] 903 +--rw name string 904 +--rw geo-location 905 +--rw reference-frame 906 | +--rw alternate-system? string {alternate-systems}? 907 | +--rw astronomical-body? string 908 | +--rw geodetic-system 909 | +--rw geodetic-datum? string 910 | +--rw coord-accuracy? decimal64 911 | +--rw height-accuracy? decimal64 912 +--rw (location) 913 | +--:(ellipsoid) 914 | | +--rw latitude degrees 915 | | +--rw longitude degrees 916 | | +--rw height? decimal64 917 | +--:(cartesian) 918 | +--rw x decimal64 919 | +--rw y decimal64 920 | +--rw z? decimal64 921 +--rw velocity 922 | +--rw v-north? decimal64 923 | +--rw v-east? decimal64 924 | +--rw v-up? decimal64 925 +--rw timestamp? types:date-and-time 927 Below is some example YANG XML data for the fictitious module that 928 uses the geo-location grouping. 930 931 932 933 Gaetana's 934 935 40.73297 936 -74.007696 937 938 939 940 Pont des Arts 941 942 2012-03-31T16:00:00Z 943 48.8583424 944 2.3375084 945 35 946 947 948 949 Saint Louis Cathedral 950 951 2013-10-12T15:00:00-06:00 952 29.9579735 953 -90.0637281 954 955 956 957 Apollo 11 Landing Site 958 959 1969-07-21T02:56:15Z 960 961 moon 962 963 me 964 965 966 0.67409 967 23.47298 968 969 970 971 973 Figure 4: Example XML data of geo location use. 975 Appendix B. Acknowledgements 977 We would like to thank Peter Lothberg for the motivation as well as 978 help in defining a more broadly useful geographic location object. 980 We would also like to thank Acee Lindem and Qin Wu for their work on 981 a geographic location object that led to this documents creation. 983 Author's Address 985 Christian Hopps 986 LabN Consulting, L.L.C. 988 Email: chopps@chopps.org