Reputation: 95
I am having some trouble figuring out how to define the @id
or @type
for properties whose types have not yet been defined by resources like schema.org.
For example, I'd like to create a location that consists of a WGS84 point (lat/lon/alt) and an error bound around that point (in this case an error cylinder, but I'd be fine with any sort of error at this point).
What I have so far is:
{
"@context": {
"latitude": {
"@id":"http://www.w3.org/2003/01/geo/wgs84_pos#lat",
"@type":"http://www.w3.org/2001/XMLSchema#float",
},
"longitude": {
"@id":"http://www.w3.org/2003/01/geo/wgs84_pos#long",
"@type":"http://www.w3.org/2001/XMLSchema#float",
},
"altitude": {
"@id":"http://www.w3.org/2003/01/geo/wgs84_pos#alt",
"@type":"http://www.w3.org/2001/XMLSchema#float",
},
"errorRadius":???,
"errorHalfHeight":???,
}
}
I can't seem to find anything that (a) describes shapes generically, particularly circles and (b) describes the concept of an error bound. I want to be able to say that the location of whatever I'm describing is within a 5 meter radius of the point, and within a 10 meter height of the point.
In addition to this specific question, I'm curious if there's a good way in general to define new concepts that have not yet been defined by things like popolo, schema.org, foaf, w3, etc.
Upvotes: 0
Views: 395
Reputation: 4924
The challenge to find terms describing aspects of a domain that can't be found in a vocabulary at hand (schema.org in your case) can be formalized like this:
For example, I have reached 2. with the description of legal forms, so I created the legal forms vocab.
If you do not want to put so much effort in it, you also can just coin the term in your context like this:
"errorRadius":{
"@id":"http://yourdomain.com/schema/vocab#errorRadius",
"@type":"http://www.w3.org/2001/XMLSchema#integer",
},
"errorHalfHeight":{
"@id":"http://yourdomain.com/schema/vocab#errorHalfHeight",
"@type":"http://www.w3.org/2001/XMLSchema#integer",
}
In this example, I coined http://yourdomain.com/schema/vocab
as the base namespace for the domain I want to model.
Side note: I don't think that 'error' is the best term here, wouldn't be something like 'tolerance' or 'inaccuracy' be better?
Second side note: You are not required to define the type of simple XSD types when you use JSON-LD because they can be derived from the way you can express decimals, integers and booleans in JSON.
Upvotes: 1