Skip to content

Geometry

Hyemi Jeong edited this page Jul 13, 2018 · 14 revisions

Simple Feature Model

IndoorGML follows the model of ISO19107. But for easy development, InFactory uses Simple Feature Model(SFM)(http://www.opengeospatial.org/standards/sfa) for representing the geometry of CellSpace, CellSpaceBoundary, State, and Transition.

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

Well-Known Text

In the JSON format, 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

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

We match Surface in IndoorGML 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

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

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

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 data

CellSpace

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

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

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

Transition

{
	"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"]
	}
}
Clone this wiki locally