DO.COM.04 GeoLocation

The spdci:GeoLocation object represents a GooglePlus Code

Conversion of latitude and longitude to a plus code (including the bounding box and the centre); and Conversion of a plus code to the bounding box and centre.

Reference: OpenID Location Code

The following two requests show how to convert a latitude and longitude to a code, or how to get the geometry of a global code:

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

Geo Location

Property KeyData Type (and Restrictions)CardinalityDescription

plus_code

0...1

contains the plus code information for the location.

Plus Code

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

Property KeyData Type (and Restrictions)CardinalityDescription

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 KeyData Type (and Restrictions)CardinalityDescription

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.

Bounds

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

Property KeyData Type (and Restrictions)CardinalityDescription

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/",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "schema": "http://schema.org/",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@id": "spdci:GeoLocation_1",
  "@type": "spdci:GeoLocation",
  "plus_code": {
    "global_code": "8FW4V900+",
    "geometry": {
      "@id": "geometry",
      "@type": "GeoLocation",
      "bounds": {
        "@id": "bounds",
        "@type": "geometry",
        "northeast": {
          "@id": "northeast",
          "@type": "GeoCoordinates",
          "latitude": 48.900000000000006,
          "longitude": 2.4000000000000057
        },
        "southwest": {
          "@id": "southwest",
          "@type": "GeoCoordinates",
          "latitude": 48.849999999999994,
          "longitude": 2.3499999999999943
        }
      },
      "location": {
        "@id": "location",
        "@type": "GeoCoordinates",
        "latitude": 48.875,
        "longitude": 2.375
      }
    }
  }
}

JSON-LD File on GitHub

Last updated