IndoorJSON specification and validator
This document specifies a GeoJSON variant used by indoor.io toolset to define indoor maps. This format is called IndoorJSON.
IndoorJSON may consist of any number of Features and/or FeatureCollections. All Features are interpreted similarly regardless of their grouping into nested FeatureCollections.
IndoorJSON supports all GeoJSON geometry types.
Point and geometry types are interpreted as general Points of Interest.
MultiPoint geometry type equals multiple similar
MultiLineString are interpreted as walls, doorways and level connectors.
MultiPolygon are interpreted as open areas, e.g. rooms, halls, corridors. Typically,
Polygon boundaries match respective
LineString geometries, but it is equally possible for a single polygon to cover a larger area.
GeometryCollection geometries are interpreted similarly as if included geometries had been specified outside of the collection.
Please note that even if
MultiPolygon geometries typically designate rooms, there MAY be multiple such geometries overlapping each other.
Please not that if
LineString geometries intersect each other on a given level, they are interpreted as if there had been multiple similar
LineStrings joining at the intersection point. Therefore it is recommended that IndoorJSON files do not contain intersecting
LineStrings residing on the same level.
Each IndoorJSON Feature MAY have the following properties:
level: an integer designating the floor number of the Feature. Typically it is assumed that
0 means ground level. If not present, defaults to
geomType: an object containing additional information for the visualization of the geometry. This could be for instance specifying whether the geometry is a pillar (for
Point geometries), a wall, doorway, window or railing (for
LineString geometries), or a regular floor, blocked area or hole (for
Polygon geometries), or a elevator, stairway or escalator (for
LineString geometries with
MultiLineString geometry type may have the following properties:
accessible: a boolean value indicating whether the point or line is accessible e.g. if it can be walked through. If not present, defaults to
LineString geometry type may have the following properties:
connector: a boolean value indicating whether this line designates a connecting line between floors.
direction: an integer designating the direction that this connector may be used for.
0 means both ways,
1 means only up,
2 means only down.
connector features, the
level property is interpreted as the level of the level above. The level below is interpreted to be
level - 1. If a
connector feature has a
level property that equals the lowest level in the file, that connector is not accessible.
Of course, typically IndoorJSON features also have other properties, like store names, descriptions, phone numbers, etc.
All valid GeoJSON files are also valid IndoorJSON files.
This project includes a simple validator that can be used within a Node.js program like this:
var jsonobj = type: 'Point' geometry: 10 20 ;var validateIndoorJSON = require'indoor-json';if validateIndoorJSONjsonobj// validated
Because all GeoJSON files are also valid IndoorJSON files, this can be used as a generic GeoJSON validator as well.