DO.COM.05 GooglePlusCode

The spdci:GooglePlusCode object represents a GooglePlus Code.

As GooglePlusCodes are frequently used to describe locations, this data object 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 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 data object, which would usually be CamelCase, are neglected here, as 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. 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

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

Global code for latitude/longitude

geometry

0...1

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

Bounding box of the code, with the north east and south west coordinates

location

0...1

Centre of the bounding box

Location

This representation of location is an exception and only used for thisGooglePlusCodedata object, 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

Latitude of a location

lng

0...1

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

Centre of the bounding box

southwest

0...1

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

Was this helpful?