X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_ShapeFile.h;h=ec7b0ff3602caf610bfc6fbb30c7f696ec31e864;hb=7f56fcbfed23a9fd09b7ab87edd7ec742e2725e6;hp=bd33a735c8eebe7b7c2417bdaef80fd03c062ea9;hpb=bfb47f35b807312281b69a52494b9147c22759dd;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_ShapeFile.h b/src/HYDROData/HYDROData_ShapeFile.h index bd33a735..ec7b0ff3 100644 --- a/src/HYDROData/HYDROData_ShapeFile.h +++ b/src/HYDROData/HYDROData_ShapeFile.h @@ -84,40 +84,57 @@ public: HYDRODATA_EXPORT void Export(const QString& aFileName, NCollection_Sequence aPolyXYSeq, NCollection_Sequence aPoly3DSeq, + QStringList& aNonExpList); + + HYDRODATA_EXPORT void Export(const QString& aFileName, const Handle_HYDROData_LandCoverMap& aLCM, QStringList& aNonExpList); + int WriteObjectPolyXY(SHPHandle theShpHandle, Handle_HYDROData_PolylineXY thePoly ); + int WriteObjectPoly3D(SHPHandle theShpHandle, Handle_HYDROData_Polyline3D thePoly ); + int WriteObjectPolygon(SHPHandle theShpHandle, const TopoDS_Shape& theInputShape ); //Import bool Parse(SHPHandle theHandle, ShapeType theType, int& theShapeTypeOfFile); //Import Landcover void ReadSHPPolygon(SHPObject* anObj, int i, TopoDS_Face& F); - HYDRODATA_EXPORT int ImportLandCovers(const QString theFileName, QStringList& thePolygonsList, TopTools_SequenceOfShape& theFaces, int& theShapeTypeOfFile); + + HYDRODATA_EXPORT int ImportPolygons(const QString theFileName, + QStringList& thePolygonsList, + TopTools_SequenceOfShape& theFaces, + int& theShapeTypeOfFile); + HYDRODATA_EXPORT void Free(); + //Import Polyline void ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities); + int theInd, NCollection_Sequence& theEntities); + void ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities); + int theInd, NCollection_Sequence& theEntities); + HYDRODATA_EXPORT int ImportPolylines(Handle(HYDROData_Document) theDocument, const QString& theFileName, - NCollection_Sequence& theEntities, int& theShapeTypeOfFile); + NCollection_Sequence& theEntities, int& theShapeTypeOfFile); + HYDRODATA_EXPORT QString GetShapeTypeName(int theType); //DBF I/O Methods - bool CheckDBFFileExisting(const QString& theSHPFilePath, QString& thePathToDBFFile); - bool DBF_OpenDBF(const QString& thePathToDBFFile); - int DBF_GetNbFields(); - QStringList DBF_GetFieldList(); - void DBF_GetFieldTypeList(std::vector& FTVect); - int DBF_GetNbRecords(); - void DBF_CloseDBF(); - void DBF_GetAttributeList(int theIndexOfField, std::vector& theAttrV); - bool DBF_WriteFieldAndValues(const QString& theFileName, const QString& theFieldName, DBF_FieldType theType, const std::vector& theAttrV, bool bUseStrValue); + HYDRODATA_EXPORT bool CheckDBFFileExisting(const QString& theSHPFilePath, QString& thePathToDBFFile); + HYDRODATA_EXPORT bool DBF_OpenDBF(const QString& thePathToDBFFile); + HYDRODATA_EXPORT int DBF_GetNbFields(); + HYDRODATA_EXPORT QStringList DBF_GetFieldList(); + HYDRODATA_EXPORT void DBF_GetFieldTypeList(std::vector& FTVect); + HYDRODATA_EXPORT int DBF_GetNbRecords(); + HYDRODATA_EXPORT void DBF_CloseDBF(); + HYDRODATA_EXPORT void DBF_GetAttributeList(int theIndexOfField, std::vector& theAttrV); + HYDRODATA_EXPORT bool DBF_WriteFieldAndValues(const QString& theFileName, const QString& theFieldName, DBF_FieldType theType, const std::vector& theAttrV, bool bUseStrValue); private: void ProcessFace(TopoDS_Face theFace, SHPHandle theShpHandle); + int TryOpenShapeFile(QString theFileName); + private: std::vector mySHPObjects; SHPHandle myHSHP;