AKSW/building-navigator

Alternative data source to RDF

k00ni opened this issue · 5 comments

k00ni commented

@simeonackermann: I was thinking about the advantages of using RDF and SPARQL here. Currently we are tied to Virtuoso and as you mentioned at #11, we already have problems, e.g. slow queries (3-7 seconds).

What do you think about the following, more unorthodox approach?

The data source is located e.g. on Github or BVL's webspace. It provides the following files:

  • /building-coordinates.json: 1 file provides a list of building IDs and their coordinates (long, lat)
  • a folder like /buildings/{building-id}.json, which provides a JSON file for each building:
    • e.g. buildings/neues-rathaus.json, which contains all the building related information

Basic procedure: You first load the building-coordinates.json. Now you know, which building is where. Now you can load the nearest 10 ones, for instance. After you need more, you can check the next 10 and load them later on. You only load what is necessary and you already receive JSON-objects, without the need for transformation.

This setup can be provided using GIT + some scripts and needs no database. As alternative, we could also use a relational database or NoSQL one, but that would require a running backend, which currently not an option, because of unclear future plans.

k00ni commented

building-coordinates.json: (major index)

{
   "100_neues_rathaus_martin_luther_ring_4-6_04109_leipzig": {
      "lat" : 50.1, 
      "long" : 39.13
   },
   ...
}

100_neues_rathaus_martin_luther_ring_4-6_04109_leipzig.json: (data file for each building)

{
   "id" : "...",
   "street": "...",
   "elevator_door_width_in_cm" : 100.40
   ...
}
k00ni commented

I've added the following repository containing ready to use files:

https://github.com/AKSW/transform-bvl-csv-to-json-files

Folder result contains generated JSON files. Hope you can work with that for now.

Great, looks good!

First tests are successful. Ordering all places by distance and getting information for the first ten is very fast (just a moment) 😄

k00ni commented

👍 nice to hear!