lundi 2 mars 2015

Metric maps vs topological maps for path finding and UI rendering of indoor floor layouts


I'm building a software to map indoor floor plans of large facilities (like malls). I read through some of the questions on this forum, but my constraints are a little different than the ones addressed before.


I need to model an interior layout of a building, that is very large, but does not have a lot of rooms or closed spaces. Instead, it has a large hallway which has areas segregated and pathways as floor markings (which are not always permanent). Thus, this information is NOT captured in the BluePrints of the building or the Evacuation Maps (as the markings can change as they are not physical structures). Think of it as a mall which has a certain layout of how stuff is arranged, but that might be changed every once in a while.


I need a map of this area for two very different purposes:



  1. On one hand, I want a map for planning of shortest distances between two marked areas. Different clients of my software would be interested in different views of the same floor plan. Eg. one client may be interested in the actual walking distance between two areas, another one might just want the aerial distance between them.

  2. On the other hand, I also want a easy to use representation for inputting and viewing this floor plan on some sort of a web based UI (as someone needs to update this as and when required).


For the first kind of application, I believe topological maps (nodes and edges graph) is the most appropriate data structure, which can then be stored in a graph DB like Neo4j for path computation. I'd be storing different edge types for different clients (like 'aerial edge' vs 'path edges') and then retrieving only the relevant graph for the appropriate client.


For the second kind of application, I believe it is more beneficial to store it as a metric map, probably as a GeoJSON or KML or ShapeFile etc. Such flat files can be easily rendered on the UI using open source libraries, but may not be the best to store and query from DB.


I'm not at all familiar with GIS DataBases like PostGreSQL or others. But I believe it might be beneficial to store the data (the map) as a topological graph, with each node annotated with the coordinate information too. (x,y relative to an origin of the graph).


Then, I could convert this topological graph to a GeoJSON file for rendering on the UI.


Now, my questions are as follows:



  1. Am I on the right track in storing data as a Topological graph and then converting it on the fly to a GeoJSON format, or should I do the reverse?

  2. What are the DB's you would suggest for storing such data?

  3. Is there any open source library that would help me convert between these two formats of the same data?

  4. Do I have an option of performing path queries on GeoJSON like formats too? How computationally expensive it is for potentially a file with 1000s of shapes?


Thanks for any insights that you guys could provide. Looking forward for any help as I'm very new to this field.





Aucun commentaire:

Enregistrer un commentaire