# DO.COM.05 GooglePlusCode

### DO.COM.05 GooglePlusCode

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](https://maps.google.com/pluscodes/), which can be embedded into the existing [do.com.04-geolocation](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/data-objects/do.com.04-geolocation "mention") object.

For a more detailed reference, please look at the official [Google Documentation for Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) here.

**Reference**: [Google Plus Codes](https://maps.google.com/pluscodes/), [Google Documentation for Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API)

### Hint

{% hint style="info" %}
The DCI [naming-conventions](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/naming-conventions "mention") 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](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/data-objects/do.com.04-geolocation "mention") object (compliant with the FHIR standard [Location - HL7 FHIR v5.0.0](https://www.hl7.org/fhir/location.html)) 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](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/data-objects/do.com.04-geolocation "mention").
{% endhint %}

### GooglePlusCode

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

<table><thead><tr><th width="163">Property Key</th><th>Data Type (and Restrictions)</th><th width="118">Cardinality</th><th>Description</th></tr></thead><tbody><tr><td>plus_code</td><td><a data-mention href="#plus_code">#plus_code</a></td><td>0...1</td><td>Plus code information for the location</td></tr></tbody></table>

### Plus\_code

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

<table><thead><tr><th width="151">Property Key</th><th width="222">Data Type (and Restrictions)</th><th width="114">Cardinality</th><th>Description</th></tr></thead><tbody><tr><td>global_code</td><td><a data-mention href="../data-types-and-formats/dt.com.02-string">dt.com.02-string</a></td><td>0...1</td><td>Global code for latitude/longitude</td></tr><tr><td>geometry</td><td><a data-mention href="#geometry">#geometry</a></td><td>0...1</td><td>Geometry object</td></tr></tbody></table>

### 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       | [#bounds](#bounds "mention")     | 0...1       | Bounding box of the code, with the north east and south west coordinates |
| location     | [#location](#location "mention") | 0...1       | Centre of the bounding box                                               |

### Location

{% hint style="info" %}
This representation of location is an exception and only used for this[#googlepluscode](#googlepluscode "mention")data object, as explained in the [#hint](#hint "mention")&#x20;

The standard representation of a location within DCI is [do.com.04-geolocation](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/data-objects/do.com.04-geolocation "mention")(compliant with the FHIR standard [Location - HL7 FHIR v5.0.0](https://www.hl7.org/fhir/location.html)).
{% endhint %}

| Property Key | Data Type (and Restrictions)                                                                                                                                                                                  | Cardinality | Description             |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ----------------------- |
| lat          | [dt.com.04-decimal](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/data-types-and-formats/dt.com.04-decimal "mention") | 0...1       | Latitude of a location  |
| lng          | [dt.com.04-decimal](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/data-types-and-formats/dt.com.04-decimal "mention") | 0...1       | Longitude of a location |

### Bounds

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

### Example

<pre class="language-json"><code class="lang-json">{
  "@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",
<strong>      "@type": "google-plus:geometry",
</strong>      "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
      }
    }
  }
}
</code></pre>
