Points of Interest are a major part of the available Open Data in the areas of tourism and transportation.
This is an example of the JSON file used in the citadel mobile application templates. Data for the example has been taken by the publicly available dataset of parking lots of the city of Ghent.
The first elements, id, updated, created, lang, author, license, link and updatefrequency, provide the available metadata of the dataset and then an array, poi, with the POIs follows. Every element of this array includes an id, title, description, category, location and a set of attributes. The attributes are inside the attribute array and they contain information that is only available for parking lots. The ‘tplIdentifier’ values denote these parking-specific attributes and will be later used by the templates in order to provide an UI that is specific for parking lots. It should be also noted that two elements have been mapped to the JSON format using different names that the classes in the data model. These are ‘pois’ and ‘Point’ which have been mapped as ‘dataset’ and ‘pos’ respectively.
{
"dataset": {
"id": "http://data.gent.be/datasets/parkeergarages",
"updated": "20091018T00:00:00-5:00",
"created": "20040122T09:38:21-5:00",
"lang": "nl-NL",
"author": {
"id": "http://www.parkeerbedrijf.gent.be",
"value": "IVA Mobiliteitsbedrijf Stad Gent"
},
"license": {
"href": "http://www.creativecommons.org/CC-A/3.0/license/xml",
"term": "CC BY 3.0"
},
"link": {
"href": "http://www.parkeerbedrijf.gent.be",
"term": "source"
},
"updatefrequency":"semester",
"poi": [
{
"id": "/datasets/parkeergarages/1",
"title": "P01 Vrijdagmarkt",
"description": "24/24 open.",
"category": [
"Parking",
"City building"
],
"location": {
"point": {
"term": "centroid",
"pos": {
"srsName": "http://www.opengis.net/def/crs/EPSG/0/4326",
"posList": "51.057071972308215 3.725840449333191"
}
},
"address":{
"value":"Vrijdagmarkt 1",
"postal":"9000",
"city":"Gent"
}
},
"attribute": [
{
"term": "telephone",
"type": "tel",
"text": "09/2662900",
"tplIdentifier" : "#Citadel_telephone"
},
{
"term": "capacity",
"type": "string",
"text": "629",
"tplIdentifier" : "#Citadel_parkCapacity"
},
{
"term": "Floors",
"type": "string",
"text": "3",
"tplIdentifier" : "#Citadel_parkFloors"
},
{
"term": "parkingType",
"type": "string",
"text": "underground",
"tplIdentifier" : "#Citadel_parkType"
},
{
"term": "parkingemail",
"type": "email",
"text": "",
"tplIdentifier" : "#Citadel_email"
},
{
"term": "website",
"type": "url",
"text": "www.testparking.be",
"tplIdentifier" : "#Citadel_website"
}
]
}
]
}
}
Data for parking lots that will be created following the current schema should have a value in all fields that are marked with green color.
Fields marked with orange color are optional fields that could be used for a more complete presentation of the Parking. They should be left blank if not available.
Elements inside the ‘attribute’ array have been marked with blue color. These are the elements that will be different for every category of POIs. Moreover, if an Open Data provider possesses other pieces of information for a particular type of data, in this example parking lots, these could easily be added using the POIAttribute entity. For example, adding the nearest bus stop to a specific parking lot would require the addition of the following element in the ‘attribute’ array:
"attribute": [
{
"term": "nearest Bus stop",
"type": "string",
"text": "213 Omonoia",
"tplIdentifier" : ""
},…
]
The ‘tplIdentifier’ field would remain empty in this case so the nearest bus stops would be displayed in a list under the rest of the details for a parking lot.
The schema of this JSON file has been based on the Editor’s draft of the Points of Interest Core of W3C.