Skip to content

Commit

Permalink
Merge pull request #91 from catenda/spaces-pr
Browse files Browse the repository at this point in the history
CityGML 3.0: Add support for missing elements
  • Loading branch information
jklimke authored Jul 8, 2024
2 parents 0d52e3a + 68a5644 commit 146756f
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 6 deletions.
15 changes: 15 additions & 0 deletions sources/include/citygml/cityobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ namespace citygml {
// ADD Buildding model
COT_IntBuildingInstallation = 1ll<< 34,

COT_GenericOccupiedSpace = 1ll<< 40,
COT_GenericUnoccupiedSpace = 1ll<< 41,
COT_GenericLogicalSpace = 1ll<< 42,
COT_GenericThematicSurface = 1ll<< 43,
COT_TrafficSpace = 1ll<< 44,
COT_AuxiliaryTrafficSpace = 1ll<< 45,
COT_Intersection = 1ll<< 46,
COT_Section = 1ll<< 47,
COT_Waterway = 1ll<< 48,
COT_BuildingConstructiveElement = 1ll<< 49,
COT_BuildingRoom = 1ll<< 50,
COT_FillingSurface = 1ll<< 51,
COT_WindowSurface = 1ll<< 52,
COT_DoorSurface = 1ll<< 53,

COT_All = 0xFFFFFFFFFFFFFFFFll
};

Expand Down
31 changes: 31 additions & 0 deletions sources/include/parser/nodetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ namespace citygml {
NODETYPE( CORE, MimeType)
NODETYPE( CORE, LibraryObject)

NODETYPE( CORE, Boundary )
NODETYPE( CORE, RelativeGeometry )

// GRP
NODETYPE( GRP, CityObjectGroup )
NODETYPE( GRP, GroupMember )
Expand Down Expand Up @@ -99,6 +102,22 @@ namespace citygml {
NODETYPE( GEN, Lod3ImplicitRepresentation )
NODETYPE( GEN, Lod4ImplicitRepresentation )

NODETYPE( GEN, GenericOccupiedSpace )
NODETYPE( GEN, GenericUnoccupiedSpace )
NODETYPE( GEN, GenericLogicalSpace )
NODETYPE( GEN, GenericThematicSurface )

NODETYPE( GEN, Lod0MultiCurve )
NODETYPE( GEN, Lod2MultiCurve )
NODETYPE( GEN, Lod3MultiCurve )
NODETYPE( GEN, Lod0MultiSurface )
NODETYPE( GEN, Lod2MultiSurface )
NODETYPE( GEN, Lod3MultiSurface )

NODETYPE( GEN, Area )
NODETYPE( GEN, SpaceType )
NODETYPE( GEN, Volume )

// TEX
// NODETYPE( GML, TexturedSurface ) // Deprecated

Expand Down Expand Up @@ -203,6 +222,10 @@ namespace citygml {
NODETYPE( BLDG, Lod4TerrainIntersection )
NODETYPE( BLDG, ConsistsOfBuildingPart )

NODETYPE( CON, FillingSurface )
NODETYPE( CON, WindowSurface )
NODETYPE( CON, DoorSurface )

// BoundarySurfaceType
NODETYPE( BLDG, WallSurface )
NODETYPE( BLDG, RoofSurface )
Expand All @@ -215,6 +238,8 @@ namespace citygml {
NODETYPE( BLDG, OuterFloorSurface )
NODETYPE( BLDG, BuildingFurniture )
NODETYPE( BLDG, IntBuildingInstallation)
NODETYPE( BLDG, BuildingConstructiveElement)
NODETYPE( BLDG, BuildingRoom)

NODETYPE( BLDG, CityFurniture )
NODETYPE( BLDG, Address)
Expand Down Expand Up @@ -299,14 +324,20 @@ namespace citygml {
NODETYPE( TRANS, TransportationComplex )
NODETYPE( TRANS, TrafficArea )
NODETYPE( TRANS, AuxiliaryTrafficArea )
NODETYPE( TRANS, TrafficSpace )
NODETYPE( TRANS, AuxiliaryTrafficSpace )
NODETYPE( TRANS, Track )
NODETYPE( TRANS, Road )
NODETYPE( TRANS, Railway )
NODETYPE( TRANS, Square )
NODETYPE( TRANS, Intersection )
NODETYPE( TRANS, Section )
NODETYPE( TRANS, Waterway )

NODETYPE( TRANS, Usage )
NODETYPE( TRANS, Function )
NODETYPE( TRANS, SurfaceMaterial )
NODETYPE( TRANS, Granularity )

NODETYPE( TRANS, Lod0Network )
NODETYPE( TRANS, Lod1MultiSurface )
Expand Down
28 changes: 26 additions & 2 deletions sources/src/citygml/cityobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ namespace citygml {
return "BuildingInstallation";
case CityObject::CityObjectsType::COT_BuildingFurniture:
return "BuildingFurniture";
case CityObject::CityObjectsType::COT_BuildingConstructiveElement:
return "BuildingConstructiveElement";
case CityObject::CityObjectsType::COT_BuildingRoom:
return "BuildingRoom";
case CityObject::CityObjectsType::COT_Door:
return "Door";
case CityObject::CityObjectsType::COT_Window:
Expand All @@ -183,6 +187,12 @@ namespace citygml {
return "Railway";
case CityObject::CityObjectsType::COT_Square:
return "Square";
case CityObject::CityObjectsType::COT_Intersection:
return "Intersection";
case CityObject::CityObjectsType::COT_Section:
return "Section";
case CityObject::CityObjectsType::COT_Waterway:
return "Waterway";
case CityObject::CityObjectsType::COT_PlantCover:
return "PlantCover";
case CityObject::CityObjectsType::COT_SolitaryVegetationObject:
Expand Down Expand Up @@ -226,7 +236,13 @@ namespace citygml {
case CityObject::CityObjectsType::COT_TransportationObject:
return "TransportationObject";
case CityObject::CityObjectsType::COT_IntBuildingInstallation:
return "IntBuildingInstallation";
return "IntBuildingInstallation";
case CityObject::CityObjectsType::COT_GenericOccupiedSpace:
return "GenericOccupiedSpace";
case CityObject::CityObjectsType::COT_GenericUnoccupiedSpace:
return "GenericUnoccupiedSpace";
case CityObject::CityObjectsType::COT_GenericLogicalSpace:
return "GenericLogicalSpace";
default:
return "Unknown";
}
Expand All @@ -244,13 +260,18 @@ namespace citygml {
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Room), CityObject::CityObjectsType::COT_Room},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_BuildingInstallation), CityObject::CityObjectsType::COT_BuildingInstallation},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_BuildingFurniture), CityObject::CityObjectsType::COT_BuildingFurniture},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_BuildingConstructiveElement), CityObject::CityObjectsType::COT_BuildingConstructiveElement},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_BuildingRoom), CityObject::CityObjectsType::COT_BuildingRoom},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Door), CityObject::CityObjectsType::COT_Door},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Window), CityObject::CityObjectsType::COT_Window},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_CityFurniture), CityObject::CityObjectsType::COT_CityFurniture},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Track), CityObject::CityObjectsType::COT_Track},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Road), CityObject::CityObjectsType::COT_Road},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Railway), CityObject::CityObjectsType::COT_Railway},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Square), CityObject::CityObjectsType::COT_Square},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Intersection), CityObject::CityObjectsType::COT_Intersection},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Section), CityObject::CityObjectsType::COT_Section},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_Waterway), CityObject::CityObjectsType::COT_Waterway},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_PlantCover), CityObject::CityObjectsType::COT_PlantCover},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_SolitaryVegetationObject), CityObject::CityObjectsType::COT_SolitaryVegetationObject},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_WaterBody), CityObject::CityObjectsType::COT_WaterBody},
Expand All @@ -272,7 +293,10 @@ namespace citygml {
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_OuterCeilingSurface), CityObject::CityObjectsType::COT_OuterCeilingSurface},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_OuterFloorSurface), CityObject::CityObjectsType::COT_OuterFloorSurface},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_TransportationObject), CityObject::CityObjectsType::COT_TransportationObject},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_IntBuildingInstallation), CityObject::CityObjectsType::COT_IntBuildingInstallation}
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_IntBuildingInstallation), CityObject::CityObjectsType::COT_IntBuildingInstallation},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_GenericOccupiedSpace), CityObject::CityObjectsType::COT_GenericOccupiedSpace},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_GenericUnoccupiedSpace), CityObject::CityObjectsType::COT_GenericUnoccupiedSpace},
{cityObjectsTypeToLowerString(CityObject::CityObjectsType::COT_GenericLogicalSpace), CityObject::CityObjectsType::COT_GenericLogicalSpace}
};

CityObject::CityObjectsType cityObjectsTypeFromString(const std::string& s, bool& valid)
Expand Down
Loading

0 comments on commit 146756f

Please sign in to comment.