+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+
+ ObjectKind anAltitudeObjectType = getAltitudeObjectType();
+ //DEBTRACE("HYDROData_Object::checkAndSetAltitudeObject anAltitudeObjectType="<< anAltitudeObjectType);
+ if ( anAltitudeObjectType == KIND_UNKNOWN )
+ return; // No need to create altitude object
+
+ TDF_Label aLabel = myLab.FindChild( DataTag_ChildAltitudeObject, false );
+ if ( !aLabel.IsNull() )
+ return;
+
+ TDF_Label aChildLabel = myLab.FindChild( DataTag_ChildAltitudeObject ).FindChild( 0 );
+
+ Handle(HYDROData_IAltitudeObject) anAltitudeObject =
+ Handle(HYDROData_IAltitudeObject)::DownCast(
+ HYDROData_Iterator::CreateObject( aChildLabel, anAltitudeObjectType ) );
+
+ QString anAltitudePref = GetName() + "_Altitude";
+ //DEBTRACE("anAltitudePref " << anAltitudePref.toStdString());
+ QString anAltitudeName = HYDROData_Tool::GenerateObjectName( aDocument, anAltitudePref );
+ anAltitudeObject->SetName( anAltitudeName );
+
+ SetAltitudeObject( anAltitudeObject );