HYDROData_Stream.h
HYDROData_StreamAltitude.h
HYDROData_StricklerTable.h
- HYDROData_LandCover.h
HYDROData_Tool.h
HYDROData_TopoCurve.h
HYDROData_Transform.h
HYDROData_Stream.cxx
HYDROData_StreamAltitude.cxx
HYDROData_StricklerTable.cxx
- HYDROData_LandCover.cxx
HYDROData_Tool.cxx
HYDROData_TopoCurve.cxx
HYDROData_Transform.cxx
#include "HYDROData_NaturalObject.h"
#include "HYDROData_PolylineXY.h"
#include "HYDROData_StricklerTable.h"
-#include "HYDROData_LandCover.h"
#include "HYDROData_SplittedShapesGroup.h"
#include "HYDROData_Region.h"
#include "HYDROData_Tool.h"
#endif
#define CALCULATION_REGIONS_PREF GetName() + "_Reg"
#define CALCULATION_ZONES_PREF GetName() + "_Zone"
-#define CALCULATION_LANDCOVER_ZONES_PREF GetName() + "_LandCoverZone"
#define CALCULATION_GROUPS_PREF GetName() + "_"
//#define DEB_CLASS2D 1
#ifdef DEB_CLASS2D
if ( anOldCaseName != theName )
{
// Update names of regions and its zones
- UpdateRegionsNames( GetRegions( false ), anOldCaseName, theName );
- // Update names of land cover regions and its zones
- UpdateRegionsNames( GetRegions( true ), anOldCaseName, theName );
+ UpdateRegionsNames( GetRegions(), anOldCaseName, theName );
HYDROData_SequenceOfObjects aGroups = GetSplittedGroups();
QString aModeStr = aMode==MANUAL ? "HYDROData_CalculationCase.MANUAL" : "HYDROData_CalculationCase.AUTOMATIC";
aResList << QString( "%0.SetAssignmentMode( %1 )" ).arg( aCalculName ).arg( aModeStr );
- AssignmentMode aModeLC = GetAssignmentLandCoverMode();
- QString aModeLCStr = aModeLC==MANUAL ? "HYDROData_CalculationCase.MANUAL" : "HYDROData_CalculationCase.AUTOMATIC";
- aResList << QString( "%0.SetAssignmentLandCoverMode( %1 )" ).arg( aCalculName ).arg( aModeLCStr );
-
HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
HYDROData_SequenceOfObjects::Iterator anIter( aGeomObjects );
for ( ; anIter.More(); anIter.Next() )
if( aMode==AUTOMATIC )
DumpRulesToPython( aCalculName, aResList );
- if( aModeLC==AUTOMATIC )
- DumpLandCoverRulesToPython( aCalculName, aResList );
aResList << QString( "" );
aResList << "# Start the algorithm of the partition and assignment";
{
// Now we restore the
// - regions and zones order
- DumpRegionsToPython( aResList, theTreatedObjects, GetRegions( false ) );
- }
-
- if( aModeLC==MANUAL )
- {
- // Now we restore the
- // - land cover regions and zones order
- DumpRegionsToPython( aResList, theTreatedObjects, GetRegions( true ) );
+ DumpRegionsToPython( aResList, theTreatedObjects, GetRegions() );
}
// Export calculation case
aResSeq.Append( aBoundaryPolyline );
// Regions
- HYDROData_SequenceOfObjects aSeqOfRegions = GetRegions( false );
+ HYDROData_SequenceOfObjects aSeqOfRegions = GetRegions();
aResSeq.Append( aSeqOfRegions );
- // Land cover regions
- HYDROData_SequenceOfObjects aSeqOfLandCoverRegions = GetRegions( true );
- aResSeq.Append( aSeqOfLandCoverRegions );
-
return aResSeq;
}
SetWarning();
// At first we remove previously created objects
- RemoveRegions( false );
- RemoveRegions( true );
+ RemoveRegions();
RemoveSplittedGroups();
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
}
}
- // Split to land cover zones
- HYDROData_SplitToZonesTool::SplitDataList aLandCoverZonesList;
-
- HYDROData_SequenceOfObjects aLandCovers = GetLandCovers();
- if ( !aLandCovers.IsEmpty() ) {
- HYDROData_SplitToZonesTool::SplitDataList aSplitLandCoverObjects =
- HYDROData_SplitToZonesTool::Split( aLandCovers );
- if ( !aSplitLandCoverObjects.isEmpty() ) {
- HYDROData_SplitToZonesTool::SplitDataListIterator anIter( aSplitLandCoverObjects );
- while( anIter.hasNext() ) {
- const HYDROData_SplitToZonesTool::SplitData& aSplitData = anIter.next();
- if ( aSplitData.Type == HYDROData_SplitToZonesTool::SplitData::Data_Zone )
- aLandCoverZonesList.append( aSplitData );
- }
- }
- }
-
switch( GetAssignmentMode() )
{
case MANUAL:
- CreateRegionsDef( aDocument, aZonesList, false );
+ CreateRegionsDef( aDocument, aZonesList );
break;
case AUTOMATIC:
- CreateRegionsAuto( aDocument, aZonesList, false );
- break;
- }
-
- switch( GetAssignmentLandCoverMode() )
- {
- case MANUAL:
- CreateRegionsDef( aDocument, aLandCoverZonesList, true );
- break;
- case AUTOMATIC:
- CreateRegionsAuto( aDocument, aLandCoverZonesList, true );
+ CreateRegionsAuto( aDocument, aZonesList );
break;
}
}
void HYDROData_CalculationCase::CreateRegionsDef( const Handle(HYDROData_Document)& theDoc,
- const HYDROData_SplitToZonesTool::SplitDataList& theZones,
- const bool theLandCover )
+ const HYDROData_SplitToZonesTool::SplitDataList& theZones )
{
// Create result regions for case, by default one zone for one region
QString aRegsPref = CALCULATION_REGIONS_PREF;
- QString aZonesPref = theLandCover ? CALCULATION_LANDCOVER_ZONES_PREF : CALCULATION_ZONES_PREF;
+ QString aZonesPref = CALCULATION_ZONES_PREF;
HYDROData_SplitToZonesTool::SplitDataListIterator anIter( theZones );
while( anIter.hasNext() )
{
const HYDROData_SplitToZonesTool::SplitData& aSplitData = anIter.next();
// Create new region
- Handle(HYDROData_Region) aRegion = addNewRegion( theDoc, aRegsPref, theLandCover );
+ Handle(HYDROData_Region) aRegion = addNewRegion( theDoc, aRegsPref );
// Add the zone for region
Handle(HYDROData_Zone) aRegionZone = aRegion->addNewZone( theDoc, aZonesPref, aSplitData.Face(), aSplitData.ObjectNames );
}
void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Document)& theDoc,
- const HYDROData_SplitToZonesTool::SplitDataList& theZones,
- const bool theLandCover )
+ const HYDROData_SplitToZonesTool::SplitDataList& theZones )
{
QMap<QString, Handle(HYDROData_Region)> aRegionsMap; //object name to region
QMap<QString, QString> aRegionNameToObjNameMap;
- QString aZonesPref = theLandCover ? CALCULATION_LANDCOVER_ZONES_PREF : CALCULATION_ZONES_PREF;
- HYDROData_PriorityQueue aPr( this, theLandCover ? DataTag_CustomLandCoverRules : DataTag_CustomRules );
+ QString aZonesPref = CALCULATION_ZONES_PREF;
+ HYDROData_PriorityQueue aPr( this, DataTag_CustomRules );
// 1. First we create a default region for each object included into the calculation case
- HYDROData_SequenceOfObjects anObjects = theLandCover ? GetLandCovers() : GetGeometryObjects();
+ HYDROData_SequenceOfObjects anObjects = GetGeometryObjects();
for( int i = anObjects.Lower(), n = anObjects.Upper(); i<=n; i++ )
{
Handle(HYDROData_Entity) anObj = anObjects.Value( i );
continue;
QString anObjName = anObj->GetName();
QString aRegName = anObjName + "_reg";
- Handle(HYDROData_Region) aRegion = addNewRegion( theDoc, aRegName, theLandCover, false );
+ Handle(HYDROData_Region) aRegion = addNewRegion( theDoc, aRegName, false );
aRegionsMap.insert( anObjName, aRegion );
aRegionNameToObjNameMap.insert( aRegName, anObjName );
}
}
Handle(HYDROData_Entity) aMergeEntity = aRegObj;
- if ( !theLandCover ) {
- Handle(HYDROData_Object) aMergeObject = Handle(HYDROData_Object)::DownCast( aMergeEntity );
- if ( !aMergeObject.IsNull() ) {
- aMergeEntity = aMergeObject->GetAltitudeObject();
- }
+ Handle(HYDROData_Object) aMergeObject = Handle(HYDROData_Object)::DownCast( aMergeEntity );
+ if ( !aMergeObject.IsNull() ) {
+ aMergeEntity = aMergeObject->GetAltitudeObject();
}
switch( aMergeType )
SetToUpdate( !aPrevStricklerTable.IsNull() || IsMustBeUpdated() );
}
-bool HYDROData_CalculationCase::AddLandCover( const Handle(HYDROData_LandCover)& theLandCover )
-{
- if ( HasReference( theLandCover, DataTag_LandCover ) )
- return false; // Land cover is already in reference list
-
- AddReferenceObject( theLandCover, DataTag_LandCover );
-
- // Indicate model of the need to update land covers partition
- SetToUpdate( true );
-
- return true;
-}
-
-HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetLandCovers() const
-{
- return GetReferenceObjects( DataTag_LandCover );
-}
-
-void HYDROData_CalculationCase::RemoveLandCover( const Handle(HYDROData_LandCover)& theLandCover )
-{
- if ( theLandCover.IsNull() )
- return;
-
- RemoveReferenceObject( theLandCover->Label(), DataTag_LandCover );
-
- // Indicate model of the need to update land cover partition
- SetToUpdate( true );
-}
-
-void HYDROData_CalculationCase::RemoveLandCovers()
-{
- ClearReferenceObjects( DataTag_LandCover );
-
- // Indicate model of the need to update land cover partition
- SetToUpdate( true );
-}
-
-Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone,
- const bool theLandCover )
+Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone )
{
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF, theLandCover );
+ Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF );
if ( aNewRegion.IsNull() )
return aNewRegion;
return aNewRegion;
}
-bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRegion,
- const bool theLandCover )
+bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRegion )
{
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
if ( theRegion.IsNull() )
return false;
- HYDROData_CalculationCase::DataTag aDataTag =
- theLandCover ? DataTag_LandCoverRegion : DataTag_Region;
+ HYDROData_CalculationCase::DataTag aDataTag = DataTag_Region;
if ( HasReference( theRegion, aDataTag ) )
return false; // Object is already in reference list
Handle(HYDROData_CalculationCase)::DownCast( theRegion->GetFatherObject() );
if ( !aFatherCalc.IsNull() && aFatherCalc->Label() != myLab )
{
- Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF, theLandCover );
+ Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF );
theRegion->CopyTo( aNewRegion, true );
- aFatherCalc->RemoveRegion( theRegion, theLandCover );
+ aFatherCalc->RemoveRegion( theRegion );
theRegion->SetLabel( aNewRegion->Label() );
}
return true;
}
-HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetRegions( const bool theLandCover ) const
+HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetRegions() const
{
- return GetReferenceObjects( theLandCover ? DataTag_LandCoverRegion : DataTag_Region );
+ return GetReferenceObjects( DataTag_Region );
}
void HYDROData_CalculationCase::UpdateRegionsOrder()
if ( aDocument.IsNull() )
return;
- HYDROData_SequenceOfObjects aRegions = GetRegions( false );
- HYDROData_SequenceOfObjects aRegionsLC = GetRegions( true );
- aRegions.Append( aRegionsLC );
-
+ HYDROData_SequenceOfObjects aRegions = GetRegions();
HYDROData_SequenceOfObjects::Iterator anIter( aRegions );
for ( ; anIter.More(); anIter.Next() )
{
}
}
-void HYDROData_CalculationCase::RemoveRegion( const Handle(HYDROData_Region)& theRegion,
- const bool theLandCover )
+void HYDROData_CalculationCase::RemoveRegion( const Handle(HYDROData_Region)& theRegion )
{
if ( theRegion.IsNull() )
return;
- HYDROData_CalculationCase::DataTag aDataTag =
- theLandCover ? DataTag_LandCoverRegion : DataTag_Region;
+ HYDROData_CalculationCase::DataTag aDataTag = DataTag_Region;
RemoveReferenceObject( theRegion->Label(), aDataTag );
// Remove region from data model
theRegion->Remove();
}
-void HYDROData_CalculationCase::RemoveRegions( const bool theLandCover )
+void HYDROData_CalculationCase::RemoveRegions()
{
- myLab.FindChild( theLandCover ? DataTag_ChildLandCoverRegion : DataTag_ChildRegion ).ForgetAllAttributes();
+ myLab.FindChild( DataTag_ChildRegion ).ForgetAllAttributes();
}
HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetSplittedGroups() const
double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& thePoint ) const
{
- Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint, false );
+ Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint );
return GetAltitudeForPoint( thePoint, aZone );
}
{
double aResAltitude = HYDROData_IAltitudeObject::GetInvalidAltitude();
- Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint, false );
+ Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint );
if ( !aZone.IsNull() )
{
Handle(HYDROData_Region) aRefRegion = Handle(HYDROData_Region)::DownCast( aZone->GetFatherObject() );
double HYDROData_CalculationCase::GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const
{
- double aCoeff = 0;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( !aDocument.IsNull() )
- aCoeff = aDocument->GetDefaultStricklerCoefficient();
-
- Handle(HYDROData_LandCover) aLandCover;
- Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint, Standard_True );
- if ( !aZone.IsNull() )
- {
- HYDROData_SequenceOfObjects anObjList = aZone->GetObjects();
- if ( anObjList.Length() == 1 )
- aLandCover = Handle(HYDROData_LandCover)::DownCast( anObjList.First() );
- else
- aLandCover = Handle(HYDROData_LandCover)::DownCast( aZone->GetMergeObject() );
- }
-
- if ( !aLandCover.IsNull() )
- {
- QString aType = aLandCover->GetStricklerType();
- Handle(HYDROData_StricklerTable) aTable = GetStricklerTable();
- if ( !aTable.IsNull() )
- {
- if ( aTable->GetTypes().contains( aType ) )
- aCoeff = aTable->Get( aType, aCoeff );
- }
- }
-
- return aCoeff;
+ //TODO: #652
+ return 0.0;
}
-Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint,
- const bool theLandCover ) const
+Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint ) const
{
Handle(HYDROData_Region) aResRegion;
- Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint, theLandCover );
+ Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint );
if ( !aZone.IsNull() )
aResRegion = Handle(HYDROData_Region)::DownCast( aZone->GetFatherObject() );
return aResRegion;
}
-Handle(HYDROData_Zone) HYDROData_CalculationCase::GetZoneFromPoint( const gp_XY& thePoint,
- const bool theLandCover ) const
+Handle(HYDROData_Zone) HYDROData_CalculationCase::GetZoneFromPoint( const gp_XY& thePoint ) const
{
Handle(HYDROData_Zone) aResZone;
- HYDROData_SequenceOfObjects aRegions = GetRegions( theLandCover );
+ HYDROData_SequenceOfObjects aRegions = GetRegions();
HYDROData_SequenceOfObjects::Iterator anIter( aRegions );
for ( ; anIter.More() && aResZone.IsNull(); anIter.Next() )
Handle(HYDROData_Region) HYDROData_CalculationCase::addNewRegion( const Handle(HYDROData_Document)& theDoc,
const QString& thePrefixOrName,
- const bool theLandCover,
bool isPrefix )
{
- TDF_Label aNewLab = myLab.FindChild( theLandCover ? DataTag_ChildLandCoverRegion : DataTag_ChildRegion ).NewChild();
+ TDF_Label aNewLab = myLab.FindChild( DataTag_ChildRegion ).NewChild();
int aTag = aNewLab.Tag();
Handle(HYDROData_Region) aNewRegion =
Handle(HYDROData_Region)::DownCast( HYDROData_Iterator::CreateObject( aNewLab, KIND_REGION ) );
- AddRegion( aNewRegion, theLandCover );
+ AddRegion( aNewRegion );
QString aRegionName = isPrefix ? HYDROData_Tool::GenerateObjectName( theDoc, thePrefixOrName ) : thePrefixOrName;
aNewRegion->SetName( aRegionName );
// Get faces
bool isAllNotSubmersible = true;
TopTools_ListOfShape aFaces;
- HYDROData_SequenceOfObjects aCaseRegions = GetRegions( false );
+ HYDROData_SequenceOfObjects aCaseRegions = GetRegions();
HYDROData_SequenceOfObjects::Iterator aRegionIter( aCaseRegions );
for ( ; aRegionIter.More(); aRegionIter.Next() )
{
return HYDROData_PriorityQueue::DumpRules( aRulesLab );
}
-QString HYDROData_CalculationCase::DumpLandCoverRules() const
-{
- TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomLandCoverRules );
- return HYDROData_PriorityQueue::DumpRules( aRulesLab );
-}
-
void HYDROData_CalculationCase::SetAssignmentMode( AssignmentMode theMode )
{
TDF_Label aModeLab = myLab.FindChild( DataTag_AssignmentMode );
HYDROData_PriorityQueue::DumpRulesToPython( aRulesLab, theCalcCaseName, theScript );
}
-void HYDROData_CalculationCase::DumpLandCoverRulesToPython( const QString& theCalcCaseName,
- QStringList& theScript ) const
-{
- TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomLandCoverRules );
- HYDROData_PriorityQueue::DumpRulesToPython( aRulesLab, theCalcCaseName, theScript );
-}
-
HYDROData_Warning HYDROData_CalculationCase::GetLastWarning() const
{
return myLastWarning;
return HYDROData_PriorityQueue::GetRule( aRulesLab, theIndex,
theObject1, thePriority, theObject2, theMergeType );
}
-
-void HYDROData_CalculationCase::SetAssignmentLandCoverMode( AssignmentMode theMode )
-{
- TDF_Label aModeLab = myLab.FindChild( DataTag_AssignmentLandCoverMode );
- TDataStd_Integer::Set( aModeLab, ( int ) theMode );
-
- // Indicate model of the need to update land covers partition
- SetToUpdate( true );
-}
-
-HYDROData_CalculationCase::AssignmentMode HYDROData_CalculationCase::GetAssignmentLandCoverMode() const
-{
- Handle(TDataStd_Integer) aModeAttr;
- bool isOK = myLab.FindChild( DataTag_AssignmentLandCoverMode ).FindAttribute( TDataStd_Integer::GetID(), aModeAttr );
- if( isOK )
- return ( AssignmentMode ) aModeAttr->Get();
- else
- return MANUAL;
-}
class Handle(HYDROData_SplittedShapesGroup);
class Handle(HYDROData_Document);
class Handle(HYDROData_StricklerTable);
-class Handle(HYDROData_LandCover);
DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
DataTag_CustomRules, ///< custom rules
DataTag_AssignmentMode, ///< assignment mode
DataTag_StricklerTable, ///< reference Strickler table
- DataTag_LandCover, ///< reference land covers
- DataTag_CustomLandCoverRules, ///< custom rules for land covers priority
- DataTag_AssignmentLandCoverMode, ///< assignment mode of land covers priority
- DataTag_ChildLandCoverRegion, ///< child land cover regions
- DataTag_LandCoverRegion ///< reference land cover regions
+
+ DataTag_LandCover_Obsolete, ///< reference land covers
+ DataTag_CustomLandCoverRules_Obsolete, ///< custom rules for land covers priority
+ DataTag_AssignmentLandCoverMode_Obsolete, ///< assignment mode of land covers priority
+ DataTag_ChildLandCoverRegion_Obsolete, ///< child land cover regions
+ DataTag_LandCoverRegion_Obsolete ///< reference land cover regions
+
};
public:
*/
HYDRODATA_EXPORT virtual void RemoveStricklerTable();
-
- /**
- * Add new one reference Land Cover for calculation case.
- * \param theLandCover the Land Cover to add
- * \return true in case of success
- */
- HYDRODATA_EXPORT virtual bool AddLandCover( const Handle(HYDROData_LandCover)& theLandCover );
-
- /**
- * Returns all reference Land Covers of calculation case.
- * \return the list of referenced Land Covers
- */
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetLandCovers() const;
-
- /**
- * Removes reference Land Cover from calculation case.
- * \param theLandCover the Land Cover to remove
- */
- HYDRODATA_EXPORT virtual void RemoveLandCover( const Handle(HYDROData_LandCover)& theLandCover );
-
- /**
- * Removes all reference Land Covers from calculation case.
- */
- HYDRODATA_EXPORT virtual void RemoveLandCovers();
-
-
/**
* Add new one child region for calculation case.
* The new region is added into the list of reference regions.
* The label of theZone is changed during this operation
* because of new region becomes the new parent for this zone.
- * \param theLandCover if true - Land Cover region will be added
* \return the created region
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone,
- const bool theLandCover );
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
/**
* Add new one reference region for calculation case.
* The label of theRegion is changed in case if old parent is not this calculation.
- * \param theLandCover if true - Land Cover region will bw created
* \return true in case of success
*/
- HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion,
- const bool theLandCover );
+ HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
/**
* Returns all reference regions of calculation case.
- * \param theLandCover if true - Land Cover regions will be returned
* \return the list of reference regions
*/
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions( const bool theLandCover ) const;
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
/**
* Updates names of regions to correct order.
/**
* Removes reference region from calculation case.
* \param theRegion the region to remove
- * \param theLandCover if true - it means that Land Cover region to be removed
*/
- HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion,
- const bool theLandCover );
+ HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
/**
* Removes all reference regions from calculation case.
- * \param theLandCover if true - it means that Land Cover regions to be removed
*/
- HYDRODATA_EXPORT virtual void RemoveRegions( const bool theLandCover );
+ HYDRODATA_EXPORT virtual void RemoveRegions();
/**
* Returns all reference geometry groups of calculation case.
/**
* Returns region to which the point is belongs.
* \param thePoint the point to examine
- * \param theLandCover the flag indicating,
* if it is needed to search Land Cover region
* \return result region
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegionFromPoint( const gp_XY& thePoint,
- const bool theLandCover ) const;
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegionFromPoint( const gp_XY& thePoint ) const;
/**
* Returns zone to which the point is belongs.
* \param thePoint the point to examine
- * \param theLandCover the flag indicating,
* if it is needed to search Land Cover zone
* \return result zone
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetZoneFromPoint( const gp_XY& thePoint,
- const bool theLandCover ) const;
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetZoneFromPoint( const gp_XY& thePoint ) const;
/**
* Returns classification of point for given zone.
HYDROData_Zone::MergeType& theMergeType,
HYDROData_CalculationCase::DataTag& theDataTag ) const;
- HYDRODATA_EXPORT void SetAssignmentLandCoverMode( AssignmentMode theMode );
- HYDRODATA_EXPORT AssignmentMode GetAssignmentLandCoverMode() const;
-
HYDRODATA_EXPORT QString DumpRules() const;
- HYDRODATA_EXPORT QString DumpLandCoverRules() const;
HYDRODATA_EXPORT HYDROData_Warning GetLastWarning() const;
*/
Handle(HYDROData_Region) addNewRegion( const Handle(HYDROData_Document)& theDoc,
const QString& thePrefixOrName,
- const bool theLandCover,
bool isPrefix = true );
/**
#endif
void CreateRegionsDef( const Handle(HYDROData_Document)& theDoc,
- const HYDROData_SplitToZonesTool::SplitDataList& theZones,
- const bool theLandCover );
+ const HYDROData_SplitToZonesTool::SplitDataList& theZones );
void CreateRegionsAuto( const Handle(HYDROData_Document)& theDoc,
- const HYDROData_SplitToZonesTool::SplitDataList& theZones,
- const bool theLandCover );
+ const HYDROData_SplitToZonesTool::SplitDataList& theZones );
void CreateEdgeGroupsDef( const Handle(HYDROData_Document)& theDoc,
const HYDROData_SplitToZonesTool::SplitDataList& theEdges );
void DumpRulesToPython( const QString& theCalcCaseName, QStringList& theScript ) const;
- void DumpLandCoverRulesToPython( const QString& theCalcCaseName, QStringList& theScript ) const;
void SetWarning( HYDROData_WarningType theType = WARN_OK, const QString& theData = "" );
case KIND_STREAM_ALTITUDE: return "KIND_STREAM_ALTITUDE";
case KIND_OBSTACLE_ALTITUDE: return "KIND_OBSTACLE_ALTITUDE";
case KIND_STRICKLER_TABLE: return "KIND_STRICKLER_TABLE";
- case KIND_LAND_COVER: return "KIND_LAND_COVER";
+ case KIND_LAND_COVER_OBSOLETE: return "";
case KIND_LAND_COVER_MAP: return "KIND_LAND_COVER_MAP";
default: return "KIND_UNKNOWN"; ///! Unrecognized object
}
///! Kind of an object in a document
typedef int ObjectKind;
-const ObjectKind KIND_UNKNOWN = 0; ///! Unrecognized object
-const ObjectKind KIND_IMAGE = 1;
-const ObjectKind KIND_POLYLINE = 2;
-const ObjectKind KIND_BATHYMETRY = 3;
-const ObjectKind KIND_ALTITUDE = 4;
-const ObjectKind KIND_IMMERSIBLE_ZONE = 5;
-const ObjectKind KIND_RIVER = 6;
-const ObjectKind KIND_STREAM = 7;
-const ObjectKind KIND_CONFLUENCE = 8;
-const ObjectKind KIND_CHANNEL = 9;
-const ObjectKind KIND_OBSTACLE = 10;
-const ObjectKind KIND_DIGUE = 11;
-const ObjectKind KIND_PROFILE = 12;
-const ObjectKind KIND_PROFILEUZ = 13;
-const ObjectKind KIND_POLYLINEXY = 14;
-const ObjectKind KIND_CALCULATION = 15;
-const ObjectKind KIND_ZONE = 16;
-const ObjectKind KIND_REGION = 17;
-const ObjectKind KIND_VISUAL_STATE = 18;
-const ObjectKind KIND_ARTIFICIAL_OBJECT = 19;
-const ObjectKind KIND_NATURAL_OBJECT = 20;
-const ObjectKind KIND_DUMMY_3D = 21;
-const ObjectKind KIND_SHAPES_GROUP = 22;
-const ObjectKind KIND_SPLITTED_GROUP = 23;
-const ObjectKind KIND_STREAM_ALTITUDE = 24;
-const ObjectKind KIND_OBSTACLE_ALTITUDE = 25;
-const ObjectKind KIND_STRICKLER_TABLE = 26;
-const ObjectKind KIND_LAND_COVER = 27;
-const ObjectKind KIND_LAND_COVER_MAP = 28;
-const ObjectKind KIND_LAST = KIND_LAND_COVER;
+const ObjectKind KIND_UNKNOWN = 0; ///! Unrecognized object
+const ObjectKind KIND_IMAGE = 1;
+const ObjectKind KIND_POLYLINE = 2;
+const ObjectKind KIND_BATHYMETRY = 3;
+const ObjectKind KIND_ALTITUDE = 4;
+const ObjectKind KIND_IMMERSIBLE_ZONE = 5;
+const ObjectKind KIND_RIVER = 6;
+const ObjectKind KIND_STREAM = 7;
+const ObjectKind KIND_CONFLUENCE = 8;
+const ObjectKind KIND_CHANNEL = 9;
+const ObjectKind KIND_OBSTACLE = 10;
+const ObjectKind KIND_DIGUE = 11;
+const ObjectKind KIND_PROFILE = 12;
+const ObjectKind KIND_PROFILEUZ = 13;
+const ObjectKind KIND_POLYLINEXY = 14;
+const ObjectKind KIND_CALCULATION = 15;
+const ObjectKind KIND_ZONE = 16;
+const ObjectKind KIND_REGION = 17;
+const ObjectKind KIND_VISUAL_STATE = 18;
+const ObjectKind KIND_ARTIFICIAL_OBJECT = 19;
+const ObjectKind KIND_NATURAL_OBJECT = 20;
+const ObjectKind KIND_DUMMY_3D = 21;
+const ObjectKind KIND_SHAPES_GROUP = 22;
+const ObjectKind KIND_SPLITTED_GROUP = 23;
+const ObjectKind KIND_STREAM_ALTITUDE = 24;
+const ObjectKind KIND_OBSTACLE_ALTITUDE = 25;
+const ObjectKind KIND_STRICKLER_TABLE = 26;
+const ObjectKind KIND_LAND_COVER_OBSOLETE = 27;
+const ObjectKind KIND_LAND_COVER_MAP = 28;
+const ObjectKind KIND_LAST = KIND_LAND_COVER_MAP;
DEFINE_STANDARD_HANDLE(HYDROData_Entity, MMgt_TShared)
#include "HYDROData_StreamAltitude.h"
#include "HYDROData_Zone.h"
#include "HYDROData_StricklerTable.h"
-#include "HYDROData_LandCover.h"
#include "HYDROData_LandCoverMap.h"
#include <TDataStd_Name.hxx>
case KIND_STREAM_ALTITUDE: aResult = new HYDROData_StreamAltitude(); break;
case KIND_OBSTACLE_ALTITUDE: aResult = new HYDROData_ObstacleAltitude(); break;
case KIND_STRICKLER_TABLE: aResult = new HYDROData_StricklerTable(); break;
- case KIND_LAND_COVER: aResult = new HYDROData_LandCover(); break;
- case KIND_LAND_COVER_MAP: aResult = new HYDROData_LandCoverMap(); break;
- default: break;
+ case KIND_LAND_COVER_MAP: aResult = new HYDROData_LandCoverMap(); break;
+
+ case KIND_LAND_COVER_OBSOLETE: break;
+ default: break;
}
if ( !aResult.IsNull() )
+++ /dev/null
-// Copyright (C) 2014-2015 EDF-R&D
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "HYDROData_LandCover.h"
-
-#include "HYDROData_PolylineXY.h"
-
-#include <BRep_Builder.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepBuilderAPI_MakeWire.hxx>
-#include <TDataStd_AsciiString.hxx>
-#include <TNaming_Builder.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <NCollection_IncAllocator.hxx>
-#include <BOPAlgo_BOP.hxx>
-#include <ShapeAnalysis_Wire.hxx>
-#include <Precision.hxx>
-#include <TopTools_SequenceOfShape.hxx>
-
-#include <QColor>
-#include <QStringList>
-
-IMPLEMENT_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity )
-IMPLEMENT_STANDARD_RTTIEXT( HYDROData_LandCover, HYDROData_Entity )
-
-HYDROData_LandCover::HYDROData_LandCover()
-{
-}
-
-HYDROData_LandCover::~HYDROData_LandCover()
-{
-}
-
-const ObjectKind HYDROData_LandCover::GetKind() const
-{
- return KIND_LAND_COVER;
-}
-
-QStringList HYDROData_LandCover::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
-{
- QStringList aResList = dumpObjectCreation( theTreatedObjects );
- QString aName = GetObjPyName();
-
- // Set Strickler type
- QString aType = GetStricklerType();
- if ( !aType.isEmpty() ) {
- aResList << QString( "" );
- ///< \TODO to be implemented:
- // aResList << QString( "%1.SetStricklerType( \"%2\" );" ).arg( aName ).arg( aType );
- aResList << QString( "" );
- }
-
- // Set polylines
- ///< \TODO to be implemented:
-
- aResList << QString( "" );
- aResList << QString( "%1.Update();" ).arg( aName );
- aResList << QString( "" );
-
- return aResList;
-}
-
-HYDROData_SequenceOfObjects HYDROData_LandCover::GetAllReferenceObjects() const
-{
- HYDROData_SequenceOfObjects aResSeq = HYDROData_Entity::GetAllReferenceObjects();
-
- HYDROData_SequenceOfObjects aSeqOfPolylines = GetPolylines();
- aResSeq.Append( aSeqOfPolylines );
-
- return aResSeq;
-}
-
-bool HYDROData_LandCover::IsHas2dPrs() const
-{
- return true;
-}
-
-void HYDROData_LandCover::SetStricklerType( const QString& theType )
-{
- TCollection_AsciiString anAsciiStr( theType.toStdString().c_str() );
- TDataStd_AsciiString::Set( myLab.FindChild( DataTag_StricklerType ), anAsciiStr );
-}
-
-QString HYDROData_LandCover::GetStricklerType() const
-{
- QString aType;
-
- TDF_Label aLabel = myLab.FindChild( DataTag_StricklerType, false );
- if ( !aLabel.IsNull() ) {
- Handle(TDataStd_AsciiString) anAsciiStr;
- if ( aLabel.FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) ) {
- aType = QString( anAsciiStr->Get().ToCString() );
- }
- }
-
- return aType;
-}
-
-void HYDROData_LandCover::Update()
-{
- HYDROData_Entity::Update();
-
- removeShape();
-
- TCollection_AsciiString anErrorMsg;
- TopoDS_Shape aResShape = buildShape( GetPolylines(), anErrorMsg );
-
- setShape( aResShape );
-}
-
-void HYDROData_LandCover::SetPolylines( const HYDROData_SequenceOfObjects& thePolylines )
-{
- SetReferenceObjects( thePolylines, DataTag_Polylines );
- SetToUpdate( true );
-}
-
-HYDROData_SequenceOfObjects HYDROData_LandCover::GetPolylines() const
-{
- return GetReferenceObjects( DataTag_Polylines );
-}
-
-TopoDS_Shape HYDROData_LandCover::GetShape() const
-{
- TopoDS_Shape aShape;
-
- TDF_Label aLabel = myLab.FindChild( DataTag_Shape, false );
- if ( !aLabel.IsNull() )
- {
- Handle(TNaming_NamedShape) aNamedShape;
- if( aLabel.FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) ) {
- aShape = aNamedShape->Get();
- }
- }
-
- return aShape;
-}
-
-void HYDROData_LandCover::SetFillingColor( const QColor& theColor )
-{
- SetColor( theColor, DataTag_FillingColor );
-}
-
-QColor HYDROData_LandCover::GetFillingColor() const
-{
- return GetColor( DefaultFillingColor(), DataTag_FillingColor );
-}
-
-void HYDROData_LandCover::SetBorderColor( const QColor& theColor )
-{
- SetColor( theColor, DataTag_BorderColor );
-}
-
-QColor HYDROData_LandCover::GetBorderColor() const
-{
- return GetColor( DefaultBorderColor(), DataTag_BorderColor );
-}
-
-QColor HYDROData_LandCover::DefaultFillingColor()
-{
- return QColor( Qt::magenta );
-}
-
-QColor HYDROData_LandCover::DefaultBorderColor()
-{
- return QColor( Qt::transparent );
-}
-
-void HYDROData_LandCover::setShape( const TopoDS_Shape& theShape )
-{
- TNaming_Builder aBuilder( myLab.FindChild( DataTag_Shape ) );
- aBuilder.Generated( theShape );
-}
-
-void HYDROData_LandCover::removeShape()
-{
- TDF_Label aLabel = myLab.FindChild( DataTag_Shape, false );
- if ( !aLabel.IsNull() ) {
- aLabel.ForgetAllAttributes();
- }
-}
-
-TopoDS_Shape HYDROData_LandCover::buildShape( const HYDROData_SequenceOfObjects& thePolylines,
- TCollection_AsciiString& theErrorMsg )
-{
- theErrorMsg.Clear();
- TopoDS_Shape aResShape;
-
- BRepBuilderAPI_MakeWire aMakeWire;
-
- TopTools_ListOfShape aClosedWires;
-
- int aNbPolylines = thePolylines.Length();
- for ( int i = 1; i <= aNbPolylines; ++i ) {
- Handle(HYDROData_PolylineXY) aPolyline =
- Handle(HYDROData_PolylineXY)::DownCast( thePolylines.Value( i ) );
-
- if ( aPolyline.IsNull() ) {
- continue;
- }
-
- TopoDS_Shape aPolyShape = aPolyline->GetShape();
- if ( aPolyShape.IsNull() ) {
- continue;
- }
-
- // Extract polyline wire(s)
- TopTools_ListOfShape aPolylineWires;
-
- if ( aPolyShape.ShapeType() == TopAbs_WIRE ) {
- const TopoDS_Wire& aPolylineWire = TopoDS::Wire( aPolyShape );
- if ( !aPolylineWire.IsNull() ) {
- aPolylineWires.Append( aPolylineWire );
- }
- } else if ( aPolyShape.ShapeType() == TopAbs_COMPOUND ) {
- TopExp_Explorer anExp( aPolyShape, TopAbs_WIRE );
- for (; anExp.More(); anExp.Next() ) {
- if(!anExp.Current().IsNull()) {
- const TopoDS_Wire& aWire = TopoDS::Wire( anExp.Current() );
- aPolylineWires.Append( aWire );
- }
- }
- }
-
- TopTools_ListIteratorOfListOfShape anIt( aPolylineWires );
- for ( ; anIt.More(); anIt.Next() ) {
- TopoDS_Wire& aWire = TopoDS::Wire( anIt.Value() );
-
- if ( aWire.Closed() ) {
- aClosedWires.Append( aWire );
- } else {
- aMakeWire.Add( aWire );
- aMakeWire.Build();
- if ( aMakeWire.IsDone() ) {
- if ( aMakeWire.Wire().Closed() ) {
- aClosedWires.Append( aMakeWire.Wire() );
- aMakeWire = BRepBuilderAPI_MakeWire();
- }
- }
- }
- }
- }
-
- if ( aClosedWires.Extent() == 1 ) {
- // make face
- TopoDS_Wire aW = TopoDS::Wire( aClosedWires.First());
- BRepBuilderAPI_MakeFace aMakeFace( aW );
- aMakeFace.Build();
- if( aMakeFace.IsDone() )
- {
- Handle(ShapeAnalysis_Wire) aSAW = new ShapeAnalysis_Wire(aW, aMakeFace.Face(), Precision::Confusion());
- if (!aSAW->CheckSelfIntersection())
- aResShape = aMakeFace.Face();
- else
- theErrorMsg = "Can't create landcover on the given polyline\nSelf-intersection of wire have been detected";
- }
- } else if ( aClosedWires.Extent() > 1 ) {
- // make compound
- BRep_Builder aBuilder;
- TopoDS_Compound aCompound;
- aBuilder.MakeCompound( aCompound );
- TopTools_SequenceOfShape aSeq;
- TopTools_ListIteratorOfListOfShape aWiresIter( aClosedWires );
- bool anErrStat = false;
- for ( ; aWiresIter.More() && !anErrStat; aWiresIter.Next() )
- {
- TopoDS_Wire aW = TopoDS::Wire( aWiresIter.Value() );
- BRepBuilderAPI_MakeFace aMakeFace( aW );
- aMakeFace.Build();
- if( aMakeFace.IsDone() )
- {
- Handle(ShapeAnalysis_Wire) aSAW = new ShapeAnalysis_Wire(aW, aMakeFace.Face(), Precision::Confusion());
- if (!aSAW->CheckSelfIntersection())
- aSeq.Append( aMakeFace.Face() );
- else
- {
- anErrStat = true;
- theErrorMsg = "Can't create landcover on the given polyline\nSelf-intersection of wire(s) have been detected";
- }
- }
- }
- if (!anErrStat)
- {
- for (int i = 1; i <= aSeq.Length(); i++)
- aBuilder.Add( aCompound, aSeq(i) );
- aResShape = aCompound;
- }
- else
- aResShape = TopoDS_Shape();
- } else if ( aNbPolylines > 0 ) {
- TCollection_AsciiString aSourceName = aNbPolylines > 1 ? "polylines" : "polyline";
- theErrorMsg = "Can't build closed contour on the given ";
- theErrorMsg += aSourceName;
- }
-
- ///< \TODO to be reimplemented
- /*
- TopoDS_Shape anArgShape;
- TopTools_ListOfShape aToolShapes;
-
- HYDROData_SequenceOfObjects aRefPolylines = GetPolylines();
- for ( int i = 1, n = aRefPolylines.Length(); i <= n; ++i ) {
- Handle(HYDROData_PolylineXY) aPolyline =
- Handle(HYDROData_PolylineXY)::DownCast( aRefPolylines.Value( i ) );
-
- if ( aPolyline.IsNull() ) {
- continue;
- }
-
- if ( !aPolyline->IsClosed() ) {
- continue;
- }
-
- TopoDS_Shape aPolyShape = aPolyline->GetShape();
- if ( aPolyShape.IsNull() || aPolyShape.ShapeType() != TopAbs_WIRE ) {
- continue;
- }
-
- const TopoDS_Wire& aPolylineWire = TopoDS::Wire( aPolyShape );
- if ( aPolylineWire.IsNull() ) {
- continue;
- }
-
- TopoDS_Face aResultFace = TopoDS_Face();
- BRepBuilderAPI_MakeFace aMakeFace( aPolylineWire, Standard_True );
- aMakeFace.Build();
- if( aMakeFace.IsDone() ) {
- aResultFace = aMakeFace.Face();
- }
-
- if( aResultFace.IsNull() ) {
- continue;
- }
-
- if ( anArgShape.IsNull() ) {
- anArgShape = aResultFace;
- } else {
- aToolShapes.Append( aResultFace );
- }
- }
-
- aResShape = anArgShape;
-
- if ( !anArgShape.IsNull() && aToolShapes.Extent() > 0 ) {
- Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
- BOPAlgo_BOP aBOP(aAL);
-
- aBOP.AddArgument( anArgShape );
-
- TopTools_ListIteratorOfListOfShape anIt(aToolShapes);
- for( ; anIt.More(); anIt.Next() ) {
- aBOP.AddTool( anIt.Value() );
- }
-
- aBOP.SetOperation( BOPAlgo_CUT );
- aBOP.Perform();
-
- if ( !aBOP.Shape().IsNull() ) {
- aResShape = aBOP.Shape();
- }
- }
- */
-
- return aResShape;
-}
\ No newline at end of file
+++ /dev/null
-// Copyright (C) 2014-2015 EDF-R&D
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef HYDROData_LANDCOVER_HeaderFile
-#define HYDROData_LANDCOVER_HeaderFile
-
-#include <HYDROData_Entity.h>
-
-DEFINE_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity )
-
-class TopoDS_Shape;
-
-class HYDROData_LandCover : public HYDROData_Entity
-{
-protected:
- friend class HYDROData_Iterator;
-
- enum DataTag
- {
- DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
- DataTag_Shape, ///< the shape presentation of the land cover
- DataTag_StricklerType, ///< the type corresponding to types in the Strickler tables
- DataTag_Polylines, ///< the set of reference polylines
- DataTag_FillingColor, ///< filling color of the land cover presentation
- DataTag_BorderColor ///< border color of the land cover presentation
- };
-
- HYDRODATA_EXPORT HYDROData_LandCover();
- HYDRODATA_EXPORT ~HYDROData_LandCover();
-
-public:
- DEFINE_STANDARD_RTTI( HYDROData_LandCover );
-
- /**
- */
- HYDRODATA_EXPORT virtual const ObjectKind GetKind() const;
-
- /**
- * Dump object to Python script representation.
- */
- HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
-
- /**
- * Returns the list of all reference objects of this object.
- */
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
-
- /**
- * Update the shape presentation of the land cover.
- * Call this method whenever you made changes for land cover polylines.
- */
- HYDRODATA_EXPORT virtual void Update();
-
- /**
- * Checks that object has 2D presentation. Reimlemented to return true.
- */
- HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
-
- /**
- * Set Strickler type for the land cover.
- */
- HYDRODATA_EXPORT virtual void SetStricklerType( const QString& theType );
-
- /**
- * Returns Strickler type for the land cover.
- */
- HYDRODATA_EXPORT virtual QString GetStricklerType() const;
-
- /**
- * Set reference polyline objects for the land cover.
- */
- HYDRODATA_EXPORT virtual void SetPolylines( const HYDROData_SequenceOfObjects& thePolylines );
-
- /**
- * Returns all reference polyline objects of the land cover.
- */
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetPolylines() const;
-
- /**
- * Returns the shape presentation of the land cover.
- */
- HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
-
- /**
- * Sets filling color for land cover.
- */
- HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
-
- /**
- * Returns filling color of land cover.
- */
- HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
-
- /**
- * Sets border color for land cover.
- */
- HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
-
- /**
- * Returns border color of land cover.
- */
- HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
-
- /**
- * Returns default filling color for new land cover.
- */
- HYDRODATA_EXPORT static QColor DefaultFillingColor();
-
- /**
- * Returns default border color for new land cover.
- */
- HYDRODATA_EXPORT static QColor DefaultBorderColor();
-
- /**
- * Build the shape presentation of the land cover.
- */
- HYDRODATA_EXPORT static TopoDS_Shape buildShape( const HYDROData_SequenceOfObjects& thePolylines,
- TCollection_AsciiString& theErrorMsg );
-
- /**
- * Sets the shape presentation of the land cover.
- */
- HYDRODATA_EXPORT virtual void setShape( const TopoDS_Shape& theShape );
-
-protected:
-
- /**
- * Removes the shape from data label of the land cover object.
- */
- HYDRODATA_EXPORT virtual void removeShape();
-};
-
-#endif
#include <HYDROData_PriorityQueue.h>
#include <HYDROData_CalculationCase.h>
#include <HYDROData_Iterator.h>
-#include <HYDROData_LandCover.h>
#include <TDataStd_ReferenceList.hxx>
#include <TDataStd_Integer.hxx>
#include <TDF_ChildIterator.hxx>
HYDROData_PriorityQueue::HYDROData_PriorityQueue( HYDROData_CalculationCase* theCalcCase,
Standard_Integer aTag )
{
- bool isLandCover = aTag == HYDROData_CalculationCase::DataTag_CustomLandCoverRules;
- myObjects = isLandCover ? theCalcCase->GetLandCovers() : theCalcCase->GetGeometryObjects();
+ myObjects = theCalcCase->GetGeometryObjects();
for( int i=myObjects.Lower(), n=myObjects.Upper(); i<=n; i++ )
{
Handle(HYDROData_Entity) anObj = myObjects.Value( i );
QString HYDROData_PriorityQueue::DumpRules( const TDF_Label& theRulesLab )
{
- bool isLandCover = theRulesLab.Tag() == HYDROData_CalculationCase::DataTag_CustomLandCoverRules;
- QString aDump = isLandCover ? "Land Cover rules:\n" : "Rules:\n";
+ QString aDump = "Rules:\n";
HYDROData_ListOfRules aRules = GetRules( theRulesLab );
HYDROData_ListOfRules::const_iterator anIt = aRules.begin(), aLast = aRules.end();
QString aMergeType;
HYDROData_CalculationCase::DataTag aDataTag = HYDROData_CalculationCase::DataTag_CustomRules;
- Handle(HYDROData_LandCover) aLandCover1 = Handle(HYDROData_LandCover)::DownCast( anIt->Object1 );
- Handle(HYDROData_LandCover) aLandCover2 = Handle(HYDROData_LandCover)::DownCast( anIt->Object2 );
- if ( !aLandCover1.IsNull() && !aLandCover2.IsNull() )
- aDataTag = HYDROData_CalculationCase::DataTag_CustomLandCoverRules;
switch( anIt->MergeType )
{
#include <HYDROData_PolylineXY.h>
#include <HYDROData_Polyline3D.h>
#include <HYDROData_Bathymetry.h>
-#include <HYDROData_LandCover.h>
#include <HYDROData_Profile.h>
#include <HYDROData_Iterator.h>
void HYDROData_ShapeFile::Export(const QString& aFileName,
NCollection_Sequence<Handle_HYDROData_PolylineXY> aPolyXYSeq,
NCollection_Sequence<Handle_HYDROData_Polyline3D> aPoly3DSeq,
- NCollection_Sequence<Handle_HYDROData_LandCover> aLCSeq,
+ const Handle_HYDROData_LandCoverMap& aLCSeq,
QStringList& aNonExpList)
{
+ /*TODO
SHPHandle hSHPHandle;
if (!aPolyXYSeq.IsEmpty() && aPoly3DSeq.IsEmpty())
{
QString aFN = aFileName.simplified();
remove (aFN.toStdString().c_str());
remove (aFN.replace( ".shp", ".shx", Qt::CaseInsensitive).toStdString().c_str());
- }
+ }*/
}
int HYDROData_ShapeFile::WriteObjectPolyXY(SHPHandle theShpHandle, Handle_HYDROData_PolylineXY thePoly )
return 1;
}
-int HYDROData_ShapeFile::WriteObjectLC(SHPHandle theShpHandle, Handle_HYDROData_LandCover theLC )
+/*TODO:int HYDROData_ShapeFile::WriteObjectLC(SHPHandle theShpHandle, Handle_HYDROData_LandCover theLC )
{
TopoDS_Shape aSh = theLC->GetShape();
if (aSh.IsNull())
return 1;
}
-
+*/
void HYDROData_ShapeFile::ProcessFace(TopoDS_Face theFace, SHPHandle theShpHandle)
{
SHPObject *aSHPObj;
class gp_XYZ;
class Handle_HYDROData_PolylineXY;
class Handle_HYDROData_Polyline3D;
-class Handle_HYDROData_LandCover;
class Handle(HYDROData_Document);
class TopTools_SequenceOfShape;
class TopoDS_Face;
class Handle_HYDROData_Entity;
+class Handle_HYDROData_LandCoverMap;
class HYDROData_ShapeFile
{
HYDRODATA_EXPORT void Export(const QString& aFileName,
NCollection_Sequence<Handle_HYDROData_PolylineXY> aPolyXYSeq,
NCollection_Sequence<Handle_HYDROData_Polyline3D> aPoly3DSeq,
- NCollection_Sequence<Handle_HYDROData_LandCover> aLCSeq,
+ const Handle_HYDROData_LandCoverMap& aLCSeq,
QStringList& aNonExpList);
int WriteObjectPolyXY(SHPHandle theShpHandle, Handle_HYDROData_PolylineXY thePoly );
int WriteObjectPoly3D(SHPHandle theShpHandle, Handle_HYDROData_Polyline3D thePoly );
- int WriteObjectLC(SHPHandle theShpHandle, Handle_HYDROData_LandCover theLC );
+ //TODO:int WriteObjectLC(SHPHandle theShpHandle, Handle_HYDROData_LandCover theLC );
//Import
bool Parse(SHPHandle theHandle, ShapeType theType, int& theShapeTypeOfFile);
//Import Landcover
#include "HYDROData_SplitToZonesTool.h"
#include "HYDROData_PolylineXY.h"
-#include "HYDROData_LandCover.h"
#include "HYDROData_ShapesGroup.h"
#include <HYDROData_Transform.h>
#include <BRepAlgoAPI_Cut.hxx>
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();
- }
}
if ( aShape.IsNull() )
#include "HYDROData_IAltitudeObject.h"
#include "HYDROData_Document.h"
#include "HYDROData_NaturalObject.h"
-#include "HYDROData_LandCover.h"
#include <TNaming_Builder.hxx>
#include <TNaming_NamedShape.hxx>
return true;
}
- // Zones based on land cover objects (compare Strickler types)
- QString aRefStricklerType;
-
- anObjsIter.Init( anObjects );
- for ( ; anObjsIter.More(); anObjsIter.Next() )
- {
- Handle(HYDROData_LandCover) aRefLandCoverObj =
- Handle(HYDROData_LandCover)::DownCast( anObjsIter.Value() );
- if ( aRefLandCoverObj.IsNull() )
- continue;
-
- QString aStricklerType = aRefLandCoverObj->GetStricklerType();
-
- if ( aRefStricklerType.isNull() )
- {
- aRefStricklerType = aStricklerType;
- continue;
- }
-
- if ( aRefStricklerType != aStricklerType )
- return true;
- }
-
-
return false;
}
return false;
if ( !theObject->IsKind( STANDARD_TYPE(HYDROData_ArtificialObject) ) &&
- !theObject->IsKind( STANDARD_TYPE(HYDROData_NaturalObject) ) &&
- !theObject->IsKind( STANDARD_TYPE(HYDROData_LandCover) ) )
+ !theObject->IsKind( STANDARD_TYPE(HYDROData_NaturalObject) ) )
return false; // Wrong type of object
if ( HasReference( theObject, DataTag_Object ) )
#include <HYDROData_River.h>
#include <HYDROData_Stream.h>
#include <HYDROData_StricklerTable.h>
-#include <HYDROData_LandCover.h>
+#include <HYDROData_LandCoverMap.h>
#include <CAM_Module.h>
#include <CAM_Study.h>
// STRICKLER TABLES
LightApp_DataObject* aStricklerTablesRootObj = createObject( aNewRootObj, tr( partitionName( KIND_STRICKLER_TABLE ).toAscii() ) );
- // LAND COVERS
- LightApp_DataObject* aLandCoversRootObj = createObject( aNewRootObj, tr( partitionName( KIND_LAND_COVER ).toAscii() ) );
+ // LAND COVER MAPS
+ LightApp_DataObject* aLandCoversRootObj = createObject( aNewRootObj, tr( partitionName( KIND_LAND_COVER_MAP ).toAscii() ) );
// CALCULATION CASES
LightApp_DataObject* aCalculRootObj = createObject( aNewRootObj, tr( partitionName( KIND_CALCULATION ).toAscii() ) );
break;
}
- case KIND_LAND_COVER:
+ case KIND_LAND_COVER_MAP:
{
- Handle(HYDROData_LandCover) aLandCoverObj =
- Handle(HYDROData_LandCover)::DownCast( anObj );
- if( !aLandCoverObj.IsNull() ) {
- obj = createObject( aLandCoversRootObj, aLandCoverObj );
+ Handle(HYDROData_LandCoverMap) aLandCoverMapObj =
+ Handle(HYDROData_LandCoverMap)::DownCast( anObj );
+ if( !aLandCoverMapObj.IsNull() ) {
+ obj = createObject( aLandCoversRootObj, aLandCoverMapObj );
}
break;
case KIND_ARTIFICIAL_OBJECT: return "ARTIFICIAL_OBJECTS";
case KIND_NATURAL_OBJECT: return "NATURAL_OBJECTS";
case KIND_STRICKLER_TABLE: return "STRICKLER_TABLES";
- case KIND_LAND_COVER: return "LAND_COVERS";
+ case KIND_LAND_COVER_MAP: return "LAND_COVER_MAPS";
default: break;
}
return QString();
aKind == KIND_SHAPES_GROUP || aKind == KIND_SPLITTED_GROUP || aKind == KIND_ZONE ||
aKind == KIND_IMMERSIBLE_ZONE || aKind == KIND_REGION || aKind == KIND_BATHYMETRY ||
aKind == KIND_OBSTACLE || aKind == KIND_STREAM || aKind == KIND_CHANNEL ||
- aKind == KIND_DIGUE || aKind == KIND_DUMMY_3D || aKind == KIND_LAND_COVER;
+ aKind == KIND_DIGUE || aKind == KIND_DUMMY_3D || aKind == KIND_LAND_COVER_MAP;
if ( !visibility )
{
Handle(HYDROData_Profile) aProfObj = Handle(HYDROData_Profile)::DownCast( theModelObject );
LightApp_DataObject* aCaseRegionsSect =
createObject( aGuiObj, tr( "CASE_REGIONS" ), aGuiObj->entry() );
- HYDROData_SequenceOfObjects aCaseRegions = aCaseObj->GetRegions( false );
+ HYDROData_SequenceOfObjects aCaseRegions = aCaseObj->GetRegions();
HYDROData_SequenceOfObjects::Iterator anIter( aCaseRegions );
for ( ; anIter.More(); anIter.Next() )
{
if( !aCaseRegion.IsNull() && !aCaseRegion->IsRemoved() )
createRegion( aCaseRegionsSect, aCaseRegion, "", true, theIsInOperation );
}
-
- LightApp_DataObject* aCaseLandCoverRegionsSect =
- createObject( aGuiObj, tr( "CASE_LAND_COVER_REGIONS" ), aGuiObj->entry() );
-
- HYDROData_SequenceOfObjects aCaseLandCoverRegions = aCaseObj->GetRegions( true );
- anIter.Init( aCaseLandCoverRegions );
- for ( ; anIter.More(); anIter.Next() )
- {
- Handle(HYDROData_Region) aCaseLCRegion =
- Handle(HYDROData_Region)::DownCast( anIter.Value() );
- if( !aCaseLCRegion.IsNull() && !aCaseLCRegion->IsRemoved() )
- createRegion( aCaseLandCoverRegionsSect, aCaseLCRegion, "", true, theIsInOperation );
- }
-
+
#ifdef DEB_GROUPS
HYDROData_SequenceOfObjects aCalcGroups = aCaseObj->GetGeometryGroups();
buildObjectPartition( aGuiObj, aCalcGroups, tr( "OBJECT_GROUPS" ), false );
createObject( aGuiObj, aBottomPolyline, aGuiObj->entry(), false );
}
}
- else if ( anObjectKind == KIND_LAND_COVER )
+ else if ( anObjectKind == KIND_LAND_COVER_MAP )
{
- Handle(HYDROData_LandCover) aLandCoverObj =
- Handle(HYDROData_LandCover)::DownCast( aDataObj );
+ Handle(HYDROData_LandCoverMap) aLandCoverMapObj =
+ Handle(HYDROData_LandCoverMap)::DownCast( aDataObj );
- HYDROData_SequenceOfObjects aPolylines = aLandCoverObj->GetPolylines();
- buildObjectPartition( aGuiObj, aPolylines, tr( "LAND_COVER_POLYLINES" ), true );
+ /*TODO: reference objects of the land cover map
+ HYDROData_SequenceOfObjects aPolylines = aLandCoverMapObj->GetPolylines();
+ buildObjectPartition( aGuiObj, aPolylines, tr( "LAND_COVER_POLYLINES" ), true );*/
}
}
-void HYDROGUI_DataModel::buildCaseTree( SUIT_DataObject* theParent, Handle(HYDROData_CalculationCase) theCase,
- const bool theLandCover )
+void HYDROGUI_DataModel::buildCaseTree( SUIT_DataObject* theParent, Handle(HYDROData_CalculationCase) theCase )
{
if ( !theCase.IsNull() )
{
new HYDROGUI_DropTargetObject( theParent, tr( "NEW_REGION" ), "", true );
- HYDROData_SequenceOfObjects aCaseRegions = theCase->GetRegions( theLandCover );
+ HYDROData_SequenceOfObjects aCaseRegions = theCase->GetRegions();
HYDROData_SequenceOfObjects::Iterator anIter( aCaseRegions );
for ( ; anIter.More(); anIter.Next() )
{
}
bool HYDROGUI_DataModel::createNewRegion( Handle(HYDROData_CalculationCase) theCase,
- const QList<HYDROGUI_Zone*>& theZonesList,
- const bool theLandCover )
+ const QList<HYDROGUI_Zone*>& theZonesList )
{
bool isOk = !theCase.IsNull();
if ( isOk )
{
if ( aRegion.IsNull() )
{
- aRegion = theCase->AddNewRegion( aZone, theLandCover );
+ aRegion = theCase->AddNewRegion( aZone );
isOk = !aRegion.IsNull();
}
else
* Create a new region in the given calculation case containing given zones.
*/
bool createNewRegion( Handle(HYDROData_CalculationCase) theCase,
- const QList<HYDROGUI_Zone*>& theZonesList,
- const bool theLandCover );
+ const QList<HYDROGUI_Zone*>& theZonesList );
/**
* Correct an internal model object according to the current document mode
* \param theLandCover if true - land cover regions will be represented in the tree
*/
void buildCaseTree( SUIT_DataObject* theParent,
- Handle(HYDROData_CalculationCase) theCase,
- const bool theLandCover );
+ Handle(HYDROData_CalculationCase) theCase );
/**
* Updates the object subtree.
class gp_XYZ;
class Handle_HYDROData_PolylineXY;
class Handle_HYDROData_Polyline3D;
-class Handle_HYDROData_LandCover;
class TopoDS_Face;
class HYDROGUI_ExportFileOp : public HYDROGUI_Operation
#include <HYDROGUI_Shape.h>
-class Handle_HYDROData_LandCover;
class HYDROGUI_OCCDisplayer;
class HYDROGUI_ShapeLandCover : public HYDROGUI_Shape
#include <HYDROData_ImmersibleZone.h>
#include <HYDROData_Tool.h>
#include <HYDROData_Profile.h>
-#include <HYDROData_LandCover.h>
#include <GeometryGUI.h>
#include <GEOMBase.h>
anObjectKind == KIND_DIGUE ||
anObjectKind == KIND_DUMMY_3D ||
anObjectKind == KIND_BATHYMETRY ||
- anObjectKind == KIND_LAND_COVER
+ anObjectKind == KIND_LAND_COVER_MAP
#ifdef DEB_GROUPS
|| anObjectKind == KIND_SHAPES_GROUP ||
anObjectKind == KIND_SPLITTED_GROUP
return aResSeq;
}
-HYDROData_SequenceOfObjects HYDROGUI_Tool::GetLandCovers( HYDROGUI_Module* theModule )
-{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
-
- HYDROData_SequenceOfObjects aResSeq;
-
- HYDROData_Iterator anIter( aDocument );
- for ( ; anIter.More(); anIter.Next() )
- {
- Handle(HYDROData_Entity) anObj = anIter.Current();
- if ( !anObj.IsNull() && anObj->IsKind( STANDARD_TYPE(HYDROData_LandCover) ))
- aResSeq.Append( anObj );
- }
-
- return aResSeq;
-}
-
ObjectKind HYDROGUI_Tool::GetSelectedPartition( HYDROGUI_Module* theModule )
{
HYDROGUI_DataModel* aModel = theModule->getDataModel();
*/
static HYDROData_SequenceOfObjects GetGeometryObjects( HYDROGUI_Module* theModule );
- /**
- * \brief Get the land covers from document.
- * \param theModule module
- * \return sequence of land covers
- */
- static HYDROData_SequenceOfObjects GetLandCovers( HYDROGUI_Module* theModule );
-
/**
* \brief Get kind of objects the selected partition contains.
* \param theModule module
DataTag_CustomRules, ///< custom rules
DataTag_AssignmentMode, ///< assignment mode
DataTag_StricklerTable, ///< reference Strickler table
- DataTag_LandCover, ///< reference land covers
- DataTag_CustomLandCoverRules, ///< custom rules for land covers priority
- DataTag_AssignmentLandCoverMode, ///< assignment mode of land covers priority
- DataTag_ChildLandCoverRegion, ///< child land cover regions
- DataTag_LandCoverRegion ///< reference land cover regions
+ DataTag_LandCover_Obsolete, ///< reference land covers
+ DataTag_CustomLandCoverRules_Obsolete, ///< custom rules for land covers priority
+ DataTag_AssignmentLandCoverMode_Obsolete, ///< assignment mode of land covers priority
+ DataTag_ChildLandCoverRegion_Obsolete, ///< child land cover regions
+ DataTag_LandCoverRegion_Obsolete ///< reference land cover regions
};
public:
* The label of theZone is changed during this operation
* because of new region becomes the new parent for this zone.
*/
- HYDROData_Region AddNewRegion( HYDROData_Zone theZone, const bool theLandCover ) [Handle_HYDROData_Region ( const Handle_HYDROData_Zone&, const bool )];
+ HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [Handle_HYDROData_Region ( const Handle_HYDROData_Zone& )];
%MethodCode
Handle(HYDROData_Zone) aRef =
Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
if ( !aRef.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddNewRegion( aRef, a1 ) :
- sipCpp->AddNewRegion( aRef, a1 );
+ aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddNewRegion( aRef ) :
+ sipCpp->AddNewRegion( aRef );
Py_END_ALLOW_THREADS
}
* Add new one reference region for calculation case.
* The label of theRegion is changed in case if old parent is not this calculation.
*/
- bool AddRegion( HYDROData_Region theRegion, const bool theLandCover ) [bool ( const Handle_HYDROData_Region&, const bool )];
+ bool AddRegion( HYDROData_Region theRegion ) [bool ( const Handle_HYDROData_Region& )];
%MethodCode
Handle(HYDROData_Region) aRef =
Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
if ( !aRef.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRegion( aRef, a1 ):
- sipCpp->AddRegion( aRef, a1 );
+ sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRegion( aRef ):
+ sipCpp->AddRegion( aRef );
Py_END_ALLOW_THREADS
}
%End
/**
* Returns all reference regions of calculation case.
*/
- HYDROData_SequenceOfObjects GetRegions( const bool theLandCover ) const;
+ HYDROData_SequenceOfObjects GetRegions() const;
/**
* Updates names of regions to correct order.
/**
* Removes reference region from calculation case.
*/
- void RemoveRegion( HYDROData_Region theRegion, const bool theLandCover ) [void ( const Handle_HYDROData_Region&, const bool )];
+ void RemoveRegion( HYDROData_Region theRegion ) [void ( const Handle_HYDROData_Region& )];
%MethodCode
Handle(HYDROData_Region) aRef =
Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
{
Py_BEGIN_ALLOW_THREADS
if ( sipSelfWasArg ) {
- sipCpp->HYDROData_CalculationCase::RemoveRegion( aRef, a1 );
+ sipCpp->HYDROData_CalculationCase::RemoveRegion( aRef );
} else {
- sipCpp->RemoveRegion( aRef, a1 );
+ sipCpp->RemoveRegion( aRef );
}
Py_END_ALLOW_THREADS
}
/**
* Removes all reference regions from calculation case.
*/
- void RemoveRegions( const bool theLandCover );
+ void RemoveRegions();
/**
* \return result region
*/
HYDROData_Region GetRegionFromPoint( const double theCoordX,
- const double theCoordY,
- const bool theLandCover ) const
- [Handle_HYDROData_Region ( const gp_XY&, const bool )];
+ const double theCoordY ) const
+ [Handle_HYDROData_Region ( const gp_XY& )];
%MethodCode
Handle(HYDROData_Region) aRes;
gp_XY aPnt( a0, a1 );
Py_BEGIN_ALLOW_THREADS
- aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetRegionFromPoint( aPnt, a2 ) :
- sipCpp->GetRegionFromPoint( aPnt, a2 );
+ aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetRegionFromPoint( aPnt ) :
+ sipCpp->GetRegionFromPoint( aPnt );
Py_END_ALLOW_THREADS
sipRes = (HYDROData_Region*)createPointer( aRes );
* \return result zone
*/
HYDROData_Zone GetZoneFromPoint( const double theCoordX,
- const double theCoordY,
- const bool theLandCover ) const
- [Handle_HYDROData_Zone ( const gp_XY&, const bool )];
+ const double theCoordY ) const
+ [Handle_HYDROData_Zone ( const gp_XY& )];
%MethodCode
Handle(HYDROData_Zone) aRes;
gp_XY aPnt( a0, a1 );
Py_BEGIN_ALLOW_THREADS
- aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetZoneFromPoint( aPnt, a2 ) :
- sipCpp->GetZoneFromPoint( aPnt, a2 );
+ aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetZoneFromPoint( aPnt ) :
+ sipCpp->GetZoneFromPoint( aPnt );
Py_END_ALLOW_THREADS
sipRes = (HYDROData_Zone*)createPointer( aRes );
%End
QString DumpRules();
- QString DumpLandCoverRules();
void SetAssignmentMode( AssignmentMode theMode );
AssignmentMode GetAssignmentMode() const;
- void SetAssignmentLandCoverMode( AssignmentMode theMode );
- AssignmentMode GetAssignmentLandCoverMode() const;
-
protected:
/**
../HYDROData/HYDROData_Stream.cxx
../HYDROData/HYDROData_StreamAltitude.cxx
../HYDROData/HYDROData_StricklerTable.cxx
- ../HYDROData/HYDROData_LandCover.cxx
../HYDROData/HYDROData_Tool.cxx
../HYDROData/HYDROData_TopoCurve.cxx
../HYDROData/HYDROData_Transform.cxx