Arquisoft / Arquisoft/viadeSpec
Proposal for a route format standard
- Dominant language
- XSLT
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
# Proposal for a route format
The use of a subset of the existing "Trip" scheme from schema.org is proposed to structure the route data
I have tried to reduce the number of properties to the minimum possible, but always with the future in mind in order to extend it in the future if changes arise that would make us require more information
Next, the schemes used that will make up the route are broken down. At the end of the document you can see two examples of routes
## Already existing schemas and fields in use
As the web Schema.org says:
> Schema.org is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond. Schema.org vocabulary can be used with many different encodings, including RDFa, Microdata and JSON-LD.
> Founded by Google, Microsoft, Yahoo and Yandex, Schema.org vocabularies are developed by an open community process, using the public-schemaorg@w3.org mailing list and through GitHub.
To define the route, existing schema.org schemes have been used. This allows us to create a format that is compatible with existing structured data.
***A property name in bold means that it is mandatory to define the route***
### Trip
Complete schema: [Trip](https://schema.org/Trip)
| Property | Expected type | Description
|--|--|--|
| **name** |Text | The name of the route
| **description** | Text| A brief description of the route
| **itinerary** | ItemList |Destinations that make the trip. ItemList ensures the order of the elements
### GeoCoordinates
Complete schema: [GeoCoordinates](https://schema.org/GeoCoordinates)
| Property | Expected type | Description
|--|--|--|
| name |Text | The name of the place
| address | Text | Physical address of the item
| addressCountry | Text | The country, You can also provide the two-letter [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1)
| elevation | Number | The elevation. Assumed in meters
| **latitude** | Number | The latitude of a location
| **longitude** | Number | The longitude of a location
| description| Text| A brief description of the place
| postalCode | Text or Number | The postal code
| image | ImageObject or URL | An image of the place
### ImageObject
Complete schema: [ImageObject](https://schema.org/ImageObject)
| Property | Expected type | Description
|--|--|--|
| **contentURL**| URL| Actual bytes of the media object, for example the image file or video file.
### ItemList
Complete schema: [ItemList](https://schema.org/ItemList)
| Property | Expected type | Description
|--|--|--|
| **itemListElement**| GeoCoordinate | Element that represent a waypoint in the route
| **itemListOrder** | itemListOrderType | Type of ordering (e.g. Ascending, Descending, Unordered)
| **numberOfItems** | Integer | Number of items in the list.
---
### Example of a complete route
```json
{
"@context": "http://schema.org",
"@type": "Trip",
"name": "A route 1",
"description": "The test route with all the properties",
"itinerary": {
"@type": "ItemList",
"numberOfItems": 1,
"itemListOrder": "http://schema.org/ItemListOrderDescending",
"itemListElement": [
{
"@type": "GeoCoordinates",
"name": "Waypoint 1",
"address": "Calle Cardenal Cienfuegos",
"addressCountry": "ES",
"elevation": 266,
"latitude": 43.3551061,
"longitude": -5.8512792,
"postalCode": 33007,
"media": {
"@type": "ItemList",
"numberOfItems": 2,
"itemListOrder": "http://schema.org/ItemListOrderDescending",
"itemListElement": [
{
"@type": "VideoObject",
"author": "John Doe",
"contentUrl": "mexico-beach.avi",
"datePublished": "2013-11-28"
},
{
"@type": "ImageObject",
"author": "Jane Doe",
"contentUrl": "mexico-beach.jpg",
"datePublished": "2008-01-25"
}
]
}
}
],
"comments": {
"@type": "ItemList",
"numberOfItems": 2,
"itemListOrder": "http://schema.org/ItemListOrderDescending",
"itemListElement": [
{
"@type": "UserComments",
"commentText": "hello there!",
"commentTime": "2020-02-17T15:58:42",
"creator": "Ben kenobi."
},
{
"@type": "UserComments",
"commentText": "general kenobi!",
"commentTime": "2020-02-17T16:58:42",
"creator": "The angry cyborg"
}
]
}
}
}
```
### Example of a minimum route
```json
{
"@context": "http://schema.org",
"@type": "Trip",
"name": "A route 1",
"description": "The test route with the least number of possible properties",
"itinerary": {
"@type": "ItemList",
"numberOfItems": 6,
"itemListOrder": "http://schema.org/ItemListOrderDescending",
"itemListElement": [
{
"@type": "GeoCoordinates",
"latitude": 43.3551061,
"longitude": -5.8512792
},
{
"@type": "GeoCoordinates",
"latitude": 43.3547082,
"longitude": -5.8507937
},
{
"@type": "GeoCoordinates",
"latitude": 43.3545444,
"longitude": -5.8494473
},
{
"@type": "GeoCoordinates",
"latitude": 43.3546653,
"longitude": -5.8490288
},
{
"@type": "GeoCoordinates",
"latitude": 43.354872,
"longitude": -5.8487445
},
{
"@type": "GeoCoordinates",
"latitude": 43.3552699,
"longitude": -5.8485675
}
]
}
}
```
### An example of a route in RDF Triples
```rdf
/* triples as < subject, predicate, object > */
<@type, type, ItemList>
````
### The minimum route from the examples in n-triples
```ntriples
_:genid1 .
_:genid1 "The test route with the least number of possible properties"^^ .
_:genid1 _:genid2 .
_:genid1 "A route 1"^^ .
_:genid2 .
_:genid2 _:genid3 .
_:genid2 _:genid4 .
_:genid2 _:genid5 .
_:genid2 _:genid6 .
_:genid2 _:genid7 .
_:genid2 _:genid8 .
_:genid2 "http://schema.org/ItemListOrderDescending"^^ .
_:genid2 "6"^^ .
_:genid3 .
_:genid3 "4.33551061E1"^^ .
_:genid3 "-5.8512792E0"^^ .
_:genid4 .
_:genid4 "4.33547082E1"^^ .
_:genid4 "-5.8507937E0"^^ .
_:genid5 .
_:genid5 "4.33545444E1"^^ .
_:genid5 "-5.8494473E0"^^ .
_:genid6 .
_:genid6 "4.33546653E1"^^ .
_:genid6 "-5.8490288E0"^^ .
_:genid7 .
_:genid7 "4.3354872E1"^^ .
_:genid7 "-5.8487445E0"^^ .
_:genid8 .
_:genid8 "4.33552699E1"^^ .
_:genid8 "-5.8485675E0"^^ .
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the proposed Trip, GeoCoordinates, ImageObject, and ItemList schemas and compare the complete and minimum JSON and RDF examples for consistency. Done means the project has a decided, documented route-format standard; this issue names no repository files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100