Skip to content

Geometry

Hyemi Jeong edited this page Oct 24, 2018 · 14 revisions

Simple Feature Model

IndoorGML follows the model of ISO19107. But for easy development, InFactory uses Simple Feature Model(SFM) for representing the geometry of CellSpace, CellSpaceBoundary, State, and Transition.

But SFM doesn't support three dimensional geometry such as Solid. SFM is extended to support this kinds of geometry using the multipolygon of SFM. Refer the below picture.

the Simple Feature Model

Well-Known Text

In the JSON format used in InFactory, the geometry of indoor space is represented by Well-Known Text(WKT)(http://www.opengeospatial.org/standards/wkt-crs).

Attention WKT doesn't support Solid and 3D coordinates, so we extended this model for expressing Solid using MultiPolygon of WKT and JTS library. This is the example of CellSpace which geometry is expressed using extended WKT.

Solid

the example of Solid

Original WKT doesn't support Solid. This is extended format for Solid. Solid is used for describing three dimensional geometry of CellSpace in three dementional space.

SOLID ((((0.0 0.0 0.0, 2.0 0.0 0.0, 2.0 -2.0 0.0, 0.0 -2.0 0.0, 0.0 0.0 0.0)),
((2.0 -2.0 0.0, 2.0 0.0 0.0, 2.0 0.0 2.0, 2.0 -2.0 2.0, 2.0 -2.0 0.0)),
((0.0 0.0 2.0, 0.0 -2.0 2.0, 2.0 -2.0 2.0, 2.0 0.0 2.0, 0.0 0.0 2.0)),
((0.0 -2.0 2.0, 0.0 0.0 2.0, 0.0 0.0 0.0, 0.0 -2.0 0.0, 0.0 -2.0 2.0)),
((0.0 -2.0 0.0, 2.0 -2.0 0.0, 2.0 -2.0 2.0, 0.0 -2.0 2.0, 0.0 -2.0 0.0)),
((0.0 0.0 0.0, 0.0 0.0 2.0, 2.0 0.0 2.0, 2.0 0.0 0.0, 0.0 0.0 0.0))))

Surface

the example of Surface

Surface is matched to Polygon in WKT. This is used for representing the two dimensional geometry of CellSpace or three dimensional geometry of CellSpaceBoundary.

POLYGON ((30 10 10, 40 40 10, 20 40 10, 10 20 10, 30 10 10))

Surface with hole or multiSurface

the example of Surface with hole

In IndoorGML, there are some cases which need to use Surface with holes. Holes are represented in several Polygon in same way of single Surface.

POLYGON ((35 10 10, 45 45 10, 15 40 10, 10 20 10, 35 10 10),
(20 30 10, 35 35 10, 30 20 10, 20 30 10))

LineString

the example of LineString

LineString in IndoorGML is matched to LineString in WKT. This is used for representing two dimensional geometry of CellSpaceBoundary or the geometry of Transition.

LINESTRING (30 10 10, 10 30 10, 40 40 5)

Point

the example of Point

DirectPosition in IndoorGML is matched to Point in WKT. This is used for representing the geometry of State.

POINT (30 10 10)

Example of the geometry in IndoorGML

Note:
  • In one IndoorGML document, the dimension of the geometry is needed to be consistent as three dimension or two dimension.

CellSpace

CellSpace has three dimensional or two dimensional geometry optionally.

geometry3D

{
	"docId":"doc1",
	"parentId":"psf1",
	"id":"c1",
	"geometry": {
		"type" : "Solid",
		"coordinates" : "SOLID (( ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 0 1 0, 0 1 1, 0 0 1, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 1, 1 0 1, 0 0 1, 0 1 1, 1 1 1)), ((1 1 1, 1 0 1, 1 0 0, 1 1 0, 1 1 1)), ((1 1 1, 1 1 0, 0 1 0, 0 1 1, 1 1 1)) ))",
		"properties" : {
			"id" : "c1g",
			"type" : "wkt"
		}
  },
	"properties" : {
		"duality":"s1",
		"partialboundedBy" : ["B1"]
	}
}

geometry2D

{
	"docId": "doc1",
	"id": "c3",
	"parentId": "psf1",
	"type": "CellSpace",
	"duality": "s1",
	"geometry": {
			"type" : "Surface",
			"coordinates" :
			"POLYGON ((72.91597221207489 43.26827584086601 0, 79.90026563212191 43.26827584086601 0, 79.90026563212191 43.26827584086601 15, 72.91597221207489 43.26827584086601 15, 72.91597221207489 43.26827584086601 0))",
			"properties" : {
				"id" : "s1g1"
			}
		}
}

CellSpaceBoundary

CellSpaceBoundary has three dimensional or two dimensional geometry optionally.

geometry3D

{
	"id": "B1",
	"parentId": "psf1",
	"docId": "doc1",
	"type": "CellSpaceBoundary",
	"duality" : "t1",
	"geometry": {
		"type" : "Surface",
		"coordinates" : "POLYGON ((72.91597221207489 43.26827584086601 0, 79.90026563212191 43.26827584086601 0, 79.90026563212191 43.26827584086601 15, 72.91597221207489 43.26827584086601 15, 72.91597221207489 43.26827584086601 0))",
		"properties" : {
			"id" : "b1g"
		}
	}
}

geometry2D

{
	"id": "B2",
	"parentId": "psf1",
	"docId": "doc1",
	"type": "CellSpaceBoundary",
	"duality": "t1",
	"geometry": {
		"type" : "LineString",
		"coordinates" : "LINESTRING (30 10 10, 10 30 10, 40 40 5)",
		"properties" : {
			"id" : "cbg1"
		}
	}
}

State

State uses Point geometry regardless of the dimension.

{
	"docId":"doc1",
	"parentId":"ns1",
	"id":"s1",
	"geometry": {
		"coordinates" : "POINT(0.5 0.5 0.5)",
		"properties" : {
			"id" : "s1g"
		}
	},
	"properties" : {
		"connects" : ["t1"],
		"duality" : "c1"
	}
}

Transition

Transition uses LineString geometry regardless of the dimension.

{
	"docId":"doc1",
	"parentId":"es1",
	"id":"t1",
	"geometry":{
		"coordinates" : "LINESTRING(0.5 0.5 0.5, 1.5 1.5 1.5)",
		"properties" : {
			"id" : "t1g"
		}
	},
	"properties" : {
	"connects":["s1", "s2"]
	}
}