Salome HOME
debug of DTM presentation
[modules/hydro.git] / src / HYDROData / HYDROData_LandCoverMap.cxx
index 2a5904b19dc77daef961ee883ca9de6662887149..7afb3132cdb25b1224543faf1a4c08cd5adc8872 100644 (file)
@@ -61,6 +61,7 @@
 #include <Geom_TrimmedCurve.hxx>
 #include <TopTools_DataMapOfShapeListOfShape.hxx>
 #include <NCollection_DoubleMap.hxx>
+#include <HYDROData_LCM_FaceClassifier.h>
 
 #include <stdexcept>
 
@@ -972,7 +973,7 @@ void HYDROData_LandCoverMap::StoreLandCovers( const HYDROData_MapOfFaceToStrickl
     catch (...)
     {
       DEBTRACE("TODO: bug to fix. Observed on an incomplete split of a face");
-      continue;
+      //continue; // No, keep aLS empty and propagate the type of the original face
     }
     if (aLS.IsEmpty())
     {
@@ -1218,7 +1219,7 @@ bool HYDROData_LandCoverMap::ExportSHP( const QString& theSHPFileName, bool bUse
 {
   HYDROData_ShapeFile anExporter;
   QStringList aList;
-  anExporter.Export(theSHPFileName, this, aList, bUseDiscr, theDefl );
+  anExporter.Export(HYDROData_Document::Document(1), theSHPFileName, this, aList, bUseDiscr, theDefl );
   if (aList.empty())
     return true;
   else 
@@ -1257,3 +1258,9 @@ void HYDROData_LandCoverMap::UpdateLocalCS( double theDx, double theDy )
   TopoDS_Shape aLocatedShape = HYDROData_ShapesTool::Translated( aShape, theDx, theDy, 0 );
   SetShape( aLocatedShape );
 }
+
+void HYDROData_LandCoverMap::ClassifyPoints( const std::vector<gp_Pnt2d>& thePoints, std::vector<std::set <QString> >& theTypes ) const
+{
+  HYDROData_LCM_FaceClassifier FC(this);
+  FC.Classify(thePoints, theTypes, NULL);
+}