Re: Geo data in JSON-LD

Hi, James.

For points, an alternative may be to use URI/IRIs - e.g., those with
the geo: URI scheme [1],  GeoHash [2], and Ian Davis's HTTP URIs for
geo points [3].

So, your example could be rewritten, e.g., as follows:


{
 "@context": [
   "http://asjsonld.mybluemix.net"
  ],
  "@type": "as:Activity",
  "verb": "post",
  "actor": {
    "@type": "urn:example:types:Person",
    "@id": "urn:example:people:joe",
    "displayName": "James M Snell",
    "location": "http://vocab.org/placetime/geopoint/wgs84/X3.45Y1.23"
  },
  ...
}


BTW, examples exist of HTTP URI/IRIs for more complex geometries, like
those used by Ordnance Survey - see, e.g.:

http://data.ordnancesurvey.co.uk/doc/geometry/37256-10


Cheers,

Andrea


PS: About other geo vocabularies, I don't know whether you're aware of
the Core Location vocabulary (LOCN) [4], which is under the
responsibility of the W3C Locations and Address Community Group
(LOCADD) [5].


----
[1]http://tools.ietf.org/html/rfc5870
[2]http://geohash.org/
[3]http://vocab.org/placetime/geopoint/wgs84/
[4]http://www.w3.org/ns/locn#
[5]http://www.w3.org/community/locadd/


On Thu, Oct 9, 2014 at 7:02 PM, James M Snell <jasnell@gmail.com> wrote:
> (fyi... cross posted to public-vocabs and public-socialwb, sorry to
> those who receive this twice)
>
> I'm working on use cases for expressing geo data in Activity Streams
> 2.0. The original thought was to leverage GeoJSON but since JSON-LD
> does not support GeoJSON's lists-of-lists model for coordinates, I'm
> looking at using the W3C Basic Geo Vocabulary
> (http://www.w3.org/2003/01/geo/) for simple cases and the OpenGIS
> GeoSparql vocabulary (WKT) for more complex cases. I noticed that I'm
> not the only one considering this [see:
> https://github.com/rvguha/schemaorg/issues/113] so I figured a quick
> sanity check discussion here would be worthwhile.
>
> First, the simple case:
>
> {
>  "@context": [
>    "http://asjsonld.mybluemix.net"
>   ],
>   "@type": "as:Activity",
>   "verb": "post",
>   "actor": {
>     "@type": "urn:example:types:Person",
>     "@id": "urn:example:people:joe",
>     "displayName": "James M Snell",
>     "location": {
>       "@type": "geo:Point",
>       "geo:lat": 1.23,
>       "geo:long": 3.45
>     }
>   },
>   ...
> }
>
> This case ought to be fairly straightforward. The one thing I will
> note, however, is that the W3C Geolocation API
> [http://www.w3.org/TR/geolocation-API/#position_interface] provides
> significantly more detail than what the Basic Geo Vocabulary is
> currently able to capture. I'm curious as to whether or not it would
> make sense to update the Basic Geo Vocabulary to include these
> additional data points. Specifically adding:
>
>   geo:altitude
>   geo:accuracy
>   geo:altitudeAccuracy
>   geo:heading
>   geo:speed
>
> For the more complex cases, using the WKT specification seems to make
> the most sense:
>
> {
>  "@context": [
>    "http://asjsonld.mybluemix.net"
>   ],
>   "@type": "as:Activity",
>   "verb": "post",
>   "actor": {
>     "@type": "urn:example:types:Person",
>     "@id": "urn:example:people:joe",
>     "displayName": "James M Snell",
>     "location": {
>       "@type": "geos:Geometry",
>       "geos:asWKT": "Polygon((-83.6 34.1, -83.2 34.1, -83.2 34.5,
> -83.6 34.5, -83.6 34.1))"
>     }
>   },
>   ...
> }
>
> Seem like a sane approach to folks?
>
> - James
>



-- 
Andrea Perego, Ph.D.
European Commission DG JRC
Institute for Environment & Sustainability
Unit H06 - Digital Earth & Reference Data
Via E. Fermi, 2749 - TP 262
21027 Ispra VA, Italy

https://ec.europa.eu/jrc/

----
The views expressed are purely those of the writer and may
not in any circumstances be regarded as stating an official
position of the European Commission.

Received on Thursday, 9 October 2014 23:19:16 UTC