]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
SHP Poly 1
authorisn <isn@opencascade.com>
Mon, 22 Jun 2015 12:32:59 +0000 (15:32 +0300)
committerisn <isn@opencascade.com>
Mon, 22 Jun 2015 13:13:06 +0000 (16:13 +0300)
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.h [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_ImportLandcoverOp.h [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h
src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 4be75c780915e058d19f38132062ab040ff9013c..f67ce656fae9cc7b5d4c588a808f920f44c81764 100644 (file)
@@ -37,6 +37,8 @@ set(PROJECT_HEADERS
     HYDROGUI_ImportImageDlg.h
     HYDROGUI_ImportImageOp.h
     HYDROGUI_ImportPolylineOp.h
+    HYDROGUI_ImportLandCoverOp.h
+    HYDROGUI_ImportLandCoverDlg.h
     HYDROGUI_ImportSinusXOp.h
     HYDROGUI_ExportSinusXOp.h
     HYDROGUI_ExportSinusXDlg.h
@@ -170,6 +172,8 @@ set(PROJECT_SOURCES
     HYDROGUI_ImportImageOp.cxx
     HYDROGUI_ImportPolylineOp.cxx
     HYDROGUI_ImportSinusXOp.cxx
+    HYDROGUI_ImportLandCoverOp.cxx
+    HYDROGUI_ImportLandCoverDlg.cxx
     HYDROGUI_ExportSinusXOp.cxx
     HYDROGUI_ExportSinusXDlg.cxx
     HYDROGUI_InputPanel.cxx
diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx
new file mode 100644 (file)
index 0000000..447cddf
--- /dev/null
@@ -0,0 +1,79 @@
+// 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 "HYDROGUI_ImportLandCoverDlg.h"
+
+#include <SUIT_MessageBox.h>
+
+#include <QTextEdit>
+#include <QListWidget>
+#include <QVBoxLayout>
+#include <QLabel>
+#include <QPushButton>
+
+HYDROGUI_ImportLandCoverDlg::HYDROGUI_ImportLandCoverDlg( std::vector<SHPObject*> theSHPObjects, std::map<QListWidgetItem*, SHPObject*>& theWItemToSObjectMap, QWidget* theParent )
+: QtxDialog( theParent, false, true, QtxDialog::YesNo )
+{
+  setWindowTitle( tr( "IMPORT_LANDCOVER_OBJECTS" ) );
+  setButtonPosition( Left, Yes );
+  setButtonPosition( Right, No );
+
+  QLabel* anIconLabelLabel = new QLabel( mainFrame() );
+  anIconLabelLabel->setPixmap( SUIT_MessageBox::standardIcon( QMessageBox::Question ) );
+  anIconLabelLabel->setScaledContents( false );
+  anIconLabelLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+
+  myObjectsLabel = new QLabel( tr( "CONFIRM_SELECTION" ), mainFrame() );
+
+  myListW = new QListWidget(mainFrame());
+  for (int i = 1 ; i <= theSHPObjects.size(); i++)
+  {
+    myListW->addItem("Polygon_" + QString::number(i));
+  }
+  myListW->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  
+  QGridLayout* aLayout = new QGridLayout( mainFrame() );
+  aLayout->setMargin( 5 );
+  aLayout->setSpacing( 5 );
+  aLayout->addWidget( anIconLabelLabel, 0, 0 );
+  aLayout->addWidget( myObjectsLabel, 0, 1 );
+
+  aLayout->addWidget( myListW, 1, 0, 1, 2 );
+
+  if ( QPushButton* aYesBtn = ::qobject_cast<QPushButton*>( button( Yes ) ) )
+  {
+    setFocusProxy( aYesBtn );
+    aYesBtn->setAutoDefault( true );
+    aYesBtn->setDefault( true );
+  }
+  if ( QPushButton* aNoBtn = ::qobject_cast<QPushButton*>( button( No ) ) )
+  {
+    aNoBtn->setAutoDefault( true );
+  }
+
+  setMinimumSize( 350, 450 );
+}
+
+HYDROGUI_ImportLandCoverDlg::~HYDROGUI_ImportLandCoverDlg()
+{
+}
+
+QList<QListWidgetItem*> HYDROGUI_ImportLandCoverDlg::GetSelectedItems()
+{
+  return myListW->selectedItems();
+}
diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.h b/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.h
new file mode 100644 (file)
index 0000000..db99f74
--- /dev/null
@@ -0,0 +1,53 @@
+// 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 HYDROGUI_ImportLandCoverDlg_H
+#define HYDROGUI_ImportLandCoverDlg_H
+
+#include <QtxDialog.h>
+
+class QLabel;
+class QTextEdit;
+class QListWidget;
+class QListWidgetItem;
+
+#include <shapelib/shapefil.h> 
+
+class HYDROGUI_ImportLandCoverDlg : public QtxDialog
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_ImportLandCoverDlg( std::vector<SHPObject*> theSHPObjects, 
+    std::map<QListWidgetItem*, SHPObject*>& theWItemToSObjectMap, QWidget* = 0 );
+  virtual ~HYDROGUI_ImportLandCoverDlg();
+
+public:
+   QList<QListWidgetItem*> GetSelectedItems();
+
+private:
+  QLabel* myObjectsLabel;
+  QListWidget* myListW;
+
+public:
+
+  int GetSeleItemsSize();
+};
+
+#endif
diff --git a/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx b/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx
new file mode 100644 (file)
index 0000000..8dc04c4
--- /dev/null
@@ -0,0 +1,206 @@
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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 "HYDROGUI_ImportLandCoverOp.h"
+
+#include "HYDROGUI_DataModel.h"
+#include "HYDROGUI_Module.h"
+#include "HYDROGUI_UpdateFlags.h"
+#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_ImportLandCoverDlg.h"
+
+#include <HYDROGUI_DataObject.h>
+#include <HYDROData_Bathymetry.h>
+#include <HYDROData_Iterator.h>
+
+#include <HYDROData_Profile.h>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_FileDlg.h>
+#include <LightApp_Application.h>
+
+#include <QApplication>
+#include <QFile>
+#include <QFileInfo>
+#include <SUIT_MessageBox.h>
+
+#include <BRep_Builder.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Wire.hxx>
+#include <BRepBuilderAPI_MakeEdge2d.hxx>
+#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <gp_Pnt2d.hxx>
+#include <BRepTools.hxx>
+#include <gp_Pln.hxx>
+
+
+HYDROGUI_ImportLandCoverOp::HYDROGUI_ImportLandCoverOp( HYDROGUI_Module* theModule )
+: HYDROGUI_Operation( theModule )
+{
+  setName( tr( "IMPORT_LANDCOVER" ) );
+}
+
+HYDROGUI_ImportLandCoverOp::~HYDROGUI_ImportLandCoverOp()
+{
+}
+
+void HYDROGUI_ImportLandCoverOp::startOperation()
+{
+  HYDROGUI_Operation::startOperation();
+
+  myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
+  myFileDlg->setWindowTitle( getName() );
+  myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
+  myFileDlg->setFilter( tr("LANDCOVER_FILTER") );
+
+  connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
+  connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
+
+  myFileDlg->exec();
+}
+
+void HYDROGUI_ImportLandCoverOp::onApply()
+{
+  if ( !myFileDlg )
+  {
+    abort();
+    return;
+  }
+
+  QString aFileName = myFileDlg->selectedFile();
+  if ( aFileName.isEmpty() )
+  {
+    abort();
+    return;
+  }
+
+  QString anExt = aFileName.split('.', QString::SplitBehavior::SkipEmptyParts).back();
+
+  if (anExt == "shp")
+  {
+    SHPHandle aHSHP;
+    aHSHP = SHPOpen( aFileName.toAscii().data(), "rb" );
+    Parse(aHSHP);
+    std::map<QListWidgetItem*, SHPObject*> aWItemToSObjectMap;
+    HYDROGUI_ImportLandCoverDlg anImportLandCoverDlg( mySHPObjects, aWItemToSObjectMap, module()->getApp()->desktop() );
+    if ( anImportLandCoverDlg.exec() == HYDROGUI_ImportLandCoverDlg::Accepted )
+    {
+      QApplication::setOverrideCursor( Qt::WaitCursor );
+      
+      startDocOperation();
+
+      int T = anImportLandCoverDlg.GetSelectedItems().size();
+      TopoDS_Compound cmp;
+      BRep_Builder BB;
+      BB.MakeCompound(cmp);
+      TopoDS_Face F;
+      if (aHSHP->nShapeType == 5)
+      {
+        for (int i = 0; i < this->mySHPObjects.size(); i++) {
+           ProcessSHP(mySHPObjects[i], i, F);
+           BB.Add(cmp, F);
+        }
+        ///to hydro_landcover
+        // BRepTools::Write(cmp, "d:/h1.brep");
+      }
+      else
+        SUIT_MessageBox::warning( module()->getApp()->desktop(), "Import Land cover", "Cannot land cover;\nThe shape type is not polygon" );
+      commitDocOperation();
+      commit();
+    }
+    
+    for (size_t i = 0; i < mySHPObjects.size(); i++ )
+      free (mySHPObjects[i]);
+
+    mySHPObjects.clear();
+    SHPClose(aHSHP);
+  }
+
+  module()->update( UF_Model | UF_VTKViewer | UF_VTK_Forced | UF_VTK_Init );
+  
+  QApplication::restoreOverrideCursor();
+}
+
+
+
+void HYDROGUI_ImportLandCoverOp::Parse(SHPHandle theHandle)
+{
+  int aShapeType;
+  mySHPObjects.clear();
+  SHPGetInfo( theHandle, NULL, &aShapeType, NULL, NULL );
+  if (aShapeType == 5) 
+  {
+    for (int i = 0; i < theHandle->nRecords; i++) 
+      mySHPObjects.push_back(SHPReadObject(theHandle, i));
+  }
+}
+
+void HYDROGUI_ImportLandCoverOp::ProcessSHP(SHPObject* anObj, int i, TopoDS_Face& F)
+{
+  TopoDS_Wire W;
+  TopoDS_Edge E; 
+  int nParts = anObj->nParts;
+  gp_Pln pln(gp_Pnt(0,0,0), gp_Dir(0,0,1));
+  BRepBuilderAPI_MakeFace aFBuilder(pln);
+  for ( int i = 0 ; i < nParts ; i++ )
+  { 
+    BRepBuilderAPI_MakeWire aBuilder;
+    int StartIndex = anObj->panPartStart[i];
+    int EndIndex;
+    if (i != nParts - 1)
+      EndIndex = anObj->panPartStart[i + 1];
+    else
+      EndIndex = anObj->nVertices;
+
+    for ( int k = StartIndex; k < EndIndex - 1  ; k++ )
+    {
+      gp_Pnt2d P1 (anObj->padfX[k], anObj->padfY[k]);
+      gp_Pnt2d P2 (anObj->padfX[k+1], anObj->padfY[k+1]);
+      BRepBuilderAPI_MakeEdge2d aMakeEdge(P1, P2);
+      aBuilder.Add(TopoDS::Edge(aMakeEdge.Shape()));
+    }
+    aBuilder.Build();
+    W = TopoDS::Wire(aBuilder.Shape());
+    aFBuilder.Add(W);
+  }
+
+  aFBuilder.Build();
+  F = aFBuilder.Face();
+
+  //TODO build curve 3d
+
+  /*aPolylineXY->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() );
+  aPolylineXY->SetName( theFileName + "_PolyXY_" + QString::number(theInd) );
+  
+  aPolylineXY->Update();
+  
+  size_t anActiveViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
+  if ( anActiveViewId == 0 )
+    anActiveViewId = HYDROGUI_Tool::GetActiveOCCViewId( module() );
+  
+  module()->setObjectVisible( anActiveViewId, aPolylineXY, true );
+  
+  module()->setIsToUpdate( aPolylineXY );*/
+}
\ No newline at end of file
diff --git a/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.h b/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.h
new file mode 100644 (file)
index 0000000..b81e621
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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 HYDROGUI_IMPORTLANDCOVER_H
+#define HYDROGUI_IMPORTLANDCOVER_H
+
+#include "HYDROGUI_Operation.h"
+#include <vector>
+
+//extern "C" {
+#include <shapelib/shapefil.h> 
+//};
+
+class SUIT_FileDlg;
+class TopoDS_Face;
+
+class HYDROGUI_ImportLandCoverOp : public HYDROGUI_Operation
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_ImportLandCoverOp( HYDROGUI_Module* theModule );
+  virtual ~HYDROGUI_ImportLandCoverOp();
+
+protected:
+  virtual void startOperation();
+  virtual void onApply();
+  void Parse(SHPHandle theHandle);
+  void ProcessSHP(SHPObject* anObj, int i, TopoDS_Face& F);
+
+private:
+  SUIT_FileDlg* myFileDlg;
+  std::vector<SHPObject*> mySHPObjects;
+};
+
+#endif
index 57d8f8185ad5e591ea4f3730ed11ae7c133a3bcc..62707523e5f94e25ba8f0cf9ee0c199eca1fb4d6 100644 (file)
@@ -66,6 +66,7 @@
 #include "HYDROGUI_ExportSinusXOp.h"
 #include "HYDROGUI_MergePolylinesOp.h"
 #include "HYDROGUI_SplitPolylinesOp.h"
+#include "HYDROGUI_ImportLandCoverOp.h"
 
 #include <HYDROData_Document.h>
 #include <HYDROData_Obstacle.h>
@@ -130,6 +131,7 @@ void HYDROGUI_Module::createActions()
   createAction( ImportPolylineId, "IMPORT_POLYLINE", "IMPORT_POLYLINE_ICO" );
   createAction( ImportSinusXId, "IMPORT_SINUSX", "IMPORT_SINUSX_ICO" );
   createAction( ExportSinusXId, "EXPORT_SINUSX", "EXPORT_SINUSX_ICO" );
+  createAction( ImportLandcoverId, "IMPORT_LANDCOVER", "IMPORT_LANDCOVER_ICO" );
 
   createAction( CreatePolylineId, "CREATE_POLYLINE", "CREATE_POLYLINE_ICO" );
   createAction( EditPolylineId, "EDIT_POLYLINE", "EDIT_POLYLINE_ICO" ); 
@@ -235,6 +237,7 @@ void HYDROGUI_Module::createMenus()
   createMenu( ImportPolylineId, aHydroId, -1, -1 );
   createMenu( ImportSinusXId, aHydroId, -1, -1 );
   createMenu( ExportSinusXId, aHydroId, -1, -1 );
+  createMenu( ImportLandcoverId, aHydroId, -1, -1 );
   
   createMenu( ImportBathymetryId, aHydroId, -1, -1 );
   createMenu( ImportStricklerTableFromFileId, aHydroId, -1, -1 );
@@ -287,6 +290,7 @@ void HYDROGUI_Module::createToolbars()
   createTool( ImportPolylineId, aToolBar );
   createTool( ImportSinusXId, aToolBar );
   createTool( ExportSinusXId, aToolBar );
+  createTool( ImportLandcoverId, aToolBar );
 
   createTool( ImportBathymetryId, aToolBar );
   createTool( CreatePolylineId, aToolBar );
@@ -468,6 +472,9 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case ExportPolylineId:
     anOp = new HYDROGUI_ExportFileOp( aModule );
     break;
+  case ImportLandcoverId:
+    anOp = new HYDROGUI_ImportLandCoverOp( aModule );
+    break;
   case RemoveImageRefsId:
     anOp = new HYDROGUI_RemoveImageRefsOp( aModule );
     break;
index b03423b96c42d3aee1d74f5509a402bfe5306557..9b8c09ebd2aec09a59e64eba1322c8516ab7e369 100644 (file)
@@ -112,9 +112,9 @@ enum OperationId
   ImportPolylineId,
   ImportSinusXId,
   ExportSinusXId,
-
     
   ExportPolylineId,
+  ImportLandcoverId,
 
   ImportStricklerTableFromFileId,
   ExportStricklerTableFromFileId,
index 5b948492903d2dc07586918d1808e1d4461c25db..860d361ec8a84373dcf167638ebbfa4c887368d8 100644 (file)
@@ -467,9 +467,9 @@ void HYDROGUI_RecognizeContoursOp::onViewerSelectionChanged()
     return;
   }
 
-  Handle(AIS_InteractiveContext) aCtx = NULL;
 
   OCCViewer_ViewManager* aViewManager = getPreviewManager();
+  Handle(AIS_InteractiveContext) aCtx = NULL;
   if ( aViewManager ) {
     if ( OCCViewer_Viewer* aViewer = aViewManager->getOCCViewer() ) {
       aCtx = aViewer->getAISContext();
index 6c1803c9db11450db26ab94889fe3735008e4db6..8a74c2ecb5053640fc3323447a48f0aef20992d0 100644 (file)
@@ -926,6 +926,10 @@ Would you like to remove all references from the image?</translation>
       <source>DSK_IMPORT_POLYLINE</source>
       <translation>Import polyline from file(s)</translation>
     </message>
+    <message>
+      <source>DSK_IMPORT_LANDCOVER</source>
+      <translation>Import land cover from file(s)</translation>
+    </message>
     <message>
       <source>DSK_IMPORT_SINUSX</source>
       <translation>Import from SinusX</translation>
@@ -1230,6 +1234,10 @@ Would you like to remove all references from the image?</translation>
       <source>MEN_IMPORT_POLYLINE</source>
       <translation>Import polyline</translation>
     </message>
+    <message>
+      <source>MEN_IMPORT_LANDCOVER</source>
+      <translation>Import land cover from file(s)</translation>
+    </message>
     <message>
       <source>MEN_IMPORT_SINUSX</source>
       <translation>Import from SinusX</translation>
@@ -1511,6 +1519,10 @@ Would you like to remove all references from the image?</translation>
       <source>STB_IMPORT_POLYLINE</source>
       <translation>Import polyline</translation>
     </message>
+    <message>
+      <source>STB_IMPORT_LANDCOVER</source>
+      <translation>Import land cover from file(s)</translation>
+    </message>
     <message>
       <source>STB_IMPORT_SINUSX</source>
       <translation>Import from SinusX</translation>
@@ -2174,6 +2186,27 @@ file cannot be correctly imported for an Obstacle definition.</translation>
 
   </context>
 
+ <context>
+    <name>HYDROGUI_ImportLandcoverOp</name>
+    <message>
+      <source>IMPORT_LANDCOVER</source>
+      <translation>Import Land cover</translation>
+    </message>
+    <message>
+      <source>LANDCOVER_FILTER</source>
+      <translation>Shape files (*.shp)</translation>
+    </message>
+    <message>
+      <source>BAD_IMPORTED_LANDCOVER_FILES</source>
+      <translation>Land cover import error</translation>
+    </message>
+    <message>
+      <source>NO_ONE_LANDCOVER_IMPORTED</source>
+      <translation>Land cover cannot be read from seleted file</translation>
+    </message>
+  </context>
+
+
   <context>
     <name>HYDROGUI_ImportSinusXOp</name>
     <message>