+HYDROData_SequenceOfObjects HYDROData_DTM::GetProfiles() const
+{
+ return GetReferenceObjects( DataTag_Profiles );
+}
+
+void HYDROData_DTM::SetProfiles( const HYDROData_SequenceOfObjects& theProfiles )
+{
+ SetReferenceObjects( theProfiles, DataTag_Profiles );
+}
+
+double HYDROData_DTM::GetDDZ() const
+{
+ return GetDouble( DataTag_DDZ );
+}
+
+void HYDROData_DTM::SetDDZ( double theDDZ )
+{
+ SetDouble( DataTag_DDZ, theDDZ );
+}
+
+double HYDROData_DTM::GetSpatialStep() const
+{
+ return GetDouble( DataTag_SpatialStep );
+}
+
+void HYDROData_DTM::SetSpatialStep( double theSpatialStep )
+{
+ SetDouble( DataTag_SpatialStep, theSpatialStep );
+}
+
+void HYDROData_DTM::Update()
+{
+ HYDROData_SequenceOfObjects objs = GetProfiles();
+ int aLower = objs.Lower(), anUpper = objs.Upper();
+ size_t n = anUpper-aLower+1;
+
+ std::vector<Handle_HYDROData_Profile> profiles;
+ profiles.reserve( n );
+ for( int i=aLower; i<=anUpper; i++ )
+ {
+ Handle(HYDROData_Profile) aProfile = Handle(HYDROData_Profile)::DownCast( objs.Value( i ) );
+ if( !aProfile.IsNull() )
+ profiles.push_back( aProfile );
+ }
+
+ double ddz = GetDDZ();
+ double step = GetSpatialStep();
+ const double EPS = 1E-3;
+ AltitudePoints points;
+ if( ddz>EPS && step>EPS )
+ points = Interpolate( profiles, ddz, step );
+ SetAltitudePoints( points );
+}
+