Skip to content

GEO datastream of a map object

rasta edited this page Aug 25, 2016 · 2 revisions

The geolocation metadata are respresented in a json format containing the OGC-KML structure. Currently only point and bounding-box are supported.

Example: point

{
  "metadata": {
    "geo": {
      "kml": {
        "document": {
          "placemark": [
            {
              "point": {
                "coordinates": {
                  "longitude": "44.8112504748688",
                  "latitude": "41.6902784095934"
                }
              },
              "name": "Tiflis, Metechi-Kirche",
              "description": "Tiflis, Georgien Tbilisi, Georgia"
            }
          ]
        }
      }
    }
  }
}

Example: bounding box

{
  "metadata": {
    "geo": {
      "kml": {
        "document": {
          "placemark": [
            {
              "polygon": {
                "outerboundaryis": {
                  "linearring": {
                    "coordinates": [
                      {
                        "longitude": "32.2166666666667",
                        "latitude": "34.4333333333333"
                      },
                      {
                        "longitude": "34.6166666666667",
                        "latitude": "34.4333333333333"
                      },
                      {
                        "longitude": "34.6166666666667",
                        "latitude": "35.7833333333333"
                      },
                      {
                        "longitude": "32.2166666666667",
                        "latitude": "35.7833333333333"
                      }
                    ]
                  }
                }
              }
            }
          ]
        }
      }
    }
  }
}

Internally, the GEO datastream is saved as OGC-KML XML.

Example: point

<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2">
  <kml:Document>
    <kml:Placemark>
      <kml:name>Tiflis, Metechi-Kirche</kml:name>
      <kml:description>Tiflis, Georgien
Tbilisi, Georgia</kml:description>
      <kml:Point>
        <kml:coordinates>44.8112504748688,41.6902784095934,0</kml:coordinates>
      </kml:Point>
    </kml:Placemark>
  </kml:Document>
</kml:kml>

Example: bounding box

<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2">
  <kml:Document>
    <kml:Placemark>
      <kml:Polygon>
        <kml:outerBoundaryIs>
          <kml:LinearRing>
            <kml:coordinates>12.2963888888889,45.4202777777778,0 12.3780555555556,45.4202777777778,0 12.3780555555556,45.4533333333333,0 12.2963888888889,45.4533333333333,0
</kml:coordinates>
          </kml:LinearRing>
        </kml:outerBoundaryIs>
      </kml:Polygon>
    </kml:Placemark>
  </kml:Document>
</kml:kml>