DO.COM.05 GooglePlusCode

The spdci:GooglePlusCode object represents a GooglePlus Code

Since GooglePlusCodes are frequently used to describe locations, this Data Objects provides the representation of a location in the format of a Google Plus Code, which can be embedded into the existing DO.COM.04 GeoLocation object.

For a more detailed reference, please have a look at the official Google Documentation for Plus Codes here.

Reference: Google Plus Codes, Google Documentation for Plus Codes

Hint

The DCI Naming Conventions for the Data Objects used within this DO which would usually be CamelCase are neglected here since it is a Google-specific format and conversion is intended to be made as easy as possible for the users. This means that e.g. e.g. plus_code is snake_case (Google) instead of CamelCase (DCI). Also, longitude and latitude which are represented as a full word in the DCI DO.COM.04 GeoLocation object (compliant with the FHIR standard Location - HL7 FHIR v5.0.0) are shortened to lng and lat here to comply with the Google spec for the same reason as above.

This is an exception for user convenience. The standard representation for a location within DCI is DO.COM.04 GeoLocation.

GooglePlusCode

The GooglePlusCode object represents a structured entity encompassing the details and various components of a specific location.

Property Key
Data Type (and Restrictions)
Cardinality
Description

plus_code

0...1

contains the plus code information for the location.

plus_code

The plus_code object represents a structured entity encompassing the details and various components of a specific location.

Property Key
Data Type (and Restrictions)
Cardinality
Description

global_code

0...1

provides the global code for the latitude/longitude

geometry

0...1

Contains the Geometry Object.

geometry

The geometry object represents a structured entity encompassing the details and various components of a specific location

Property Key
Data Type (and Restrictions)
Cardinality
Description

bounds

0...1

provides the bounding box of the code, with the north east and south west coordinates.

location

0...1

provides the centre of the bounding box.

location

This representation of location is an exception and only used for thisGooglePlusCodeDO as explained in the Hint

The standard representation of a location within DCI is DO.COM.04 GeoLocation(compliant with the FHIR standard Location - HL7 FHIR v5.0.0)

Property Key
Data Type (and Restrictions)
Cardinality
Description

lat

0...1

The latitude of a location

lng

0...1

The longitude of a location

bounds

The bounds object represents a structured entity encompassing the details and various components of a specific location

Property Key
Data Type (and Restrictions)
Cardinality
Description

northeast

0...1

provides the centre of the bounding box.

southwest

0...1

provides the centre of the bounding box.

Example of Use

Example

{
  "@context": {
   "spdci": "https://schema.spdci.org/common/v1/",
   "google-plus" : "https://github.com/google/open-location-code/wiki/Plus-codes-API",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "schema": "http://schema.org/",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@id": "spdci:GooglePlusCode1",
  "@type": "spdci:GooglePlusCode",
  "plus_code": {
    "@id": "plus_code1",
    "@type": "google-plus:plus_code",
    "global_code": "8FW4V900+",
    "geometry": {
      "@id": "geometry1",
      "@type": "google-plus:geometry",
      "bounds": {
        "@id": "bounds1",
        "@type": "google-plus:bounds",
        "northeast": {
          "@id": "northeast1",
          "@type": "google-plus:location",
          "lat": 48.900000000000006,
          "lng": 2.4000000000000057
        },
        "southwest": {
          "@id": "southwest1",
          "@type": "google-plus:location",
          "lat": 48.849999999999994,
          "lng": 2.3499999999999943
        }
      },
      "location": {
        "@id": "location1",
        "@type": "google-plus:location",
        "lat": 14.917312500000008,
        "lng": -23.511312500000017
      }
    }
  }
}

Last updated