- Handle(HYDROData_Object) aGeomObj =
- Handle(HYDROData_Object)::DownCast( theObjectList.Value( anIndex ) );
- if( aGeomObj.IsNull() )
- continue;
+ Handle(HYDROData_Entity) anObj = theObjectList.Value( anIndex );
+ TopoDS_Shape aShape;
+
+ Handle(HYDROData_Object) aGeomObj = Handle(HYDROData_Object)::DownCast( anObj );
+ if( !aGeomObj.IsNull() ) {
+ aShape = aGeomObj->GetTopShape();
+ } else {
+ Handle(HYDROData_LandCover) aLandCoverObj = Handle(HYDROData_LandCover)::DownCast( anObj );
+ if ( !aLandCoverObj.IsNull() ) {
+ aShape = aLandCoverObj->GetShape();
+ }
+ }