-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geo location metadata #961
Conversation
from today's TD call:
|
index.template.html
Outdated
"@context": [ | ||
"https://www.w3.org/2019/wot/td/v1", | ||
{ | ||
"wgs84": "http://www.w3.org/2003/01/geo/wgs84_pos#" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the usual prefix for WGS84 is geo
(see prefix.cc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it might be confusing for readers to use two different vocabularies (WGS84 and schema.org) for the same kind of information (long/lat). WGS84 is very small and entirely included in schema.org (semantically). It might be better to use schema.org only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change this to geo.
It might be better to use schema.org only.
Thats right. The intention was to show different examples that uses different ontologies.
index.template.html
Outdated
], | ||
... | ||
"properties": { | ||
"status": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the example intends to show how e.g. to interpret
{
"long": 40.75,
"lat": 73.98,
"height": 15
}
as
{
"@context": "http://schema.org/",
"schema:longitude": 40.75,
"schema:latitude": 73.98,
"schema:elevation": 15
}
.
I provide an example for this in the JSON Schema in RDF vocabulary, which simply consists in linking to a JSON-LD context from the TD, as follows
{
"properties": {
"position": {
"jsonld:context": {
"schema": "http://schema.org/"
"long": "schema:longitude",
"lat": "schema:latitude",
"height": "schema:elevation"
},
"type": "object",
"properties": {
"long": { "type": "number" },
"lat": { "type": "number" },
"height": { "type": "number" }
}
}
}
}
The value for jsonld:context
is an inline JSON-LD context that provides a mapping for long
, lat
and height
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be also possible to use this example?
{
"properties": {
"position": {
"type": "object",
"properties": {
"@type" : "schema:GeoCoordinates",
"longitude": { "type": "number" },
"latitude": { "type": "number" },
"elevation": { "type": "number" }
}
}
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a further example, yes. I would keep the one with jsonld:context
, though, because it corresponds to another requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets keep both approaches to show the different kind of options how semantic based annotations can be applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be:
{
"properties": {
"position": {
"type": "object",
"@type" : "schema:GeoCoordinates",
"properties": {
"longitude": { "type": "number" },
"latitude": { "type": "number" },
"elevation": { "type": "number" }
}
}
}
}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, my bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the hint. I updated the example.
I updated the samples based on @vcharpenay feedback. |
merge this PR and apply the new render script as next |
request from #941