-
Notifications
You must be signed in to change notification settings - Fork 12
Geometry
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.
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.
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 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))
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 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)
DirectPosition in IndoorGML is matched to Point in WKT. This is used for representing the geometry of State.
POINT (30 10 10)
- In one IndoorGML document, the dimension of the geometry is needed to be consistent as three dimension or two dimension.
CellSpace has three dimensional or two dimensional geometry optionally.
{
"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"]
}
}
{
"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 has three dimensional or two dimensional geometry optionally.
{
"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"
}
}
}
{
"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 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 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"]
}
}