X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_ShapeFile.h;h=d74e63d5fa8ccd971d490f8f1912e3f64dd5826f;hb=89c7928d864f9be4f35aaa7409896c264849f273;hp=157ea9a438ef36159f598043b1e19ef4a654c768;hpb=6125fb8b6cbed45b172a104b5ae3c0b3cd909e5c;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_ShapeFile.h b/src/HYDROData/HYDROData_ShapeFile.h index 157ea9a4..d74e63d5 100644 --- a/src/HYDROData/HYDROData_ShapeFile.h +++ b/src/HYDROData/HYDROData_ShapeFile.h @@ -81,23 +81,28 @@ public: virtual HYDRODATA_EXPORT ~HYDROData_ShapeFile(); //Export operation - HYDRODATA_EXPORT void Export(const QString& aFileName, + HYDRODATA_EXPORT void Export(Handle(HYDROData_Document) theDocument, + const QString& aFileName, NCollection_Sequence aPolyXYSeq, NCollection_Sequence aPoly3DSeq, QStringList& aNonExpList); - HYDRODATA_EXPORT void Export(const QString& aFileName, + HYDRODATA_EXPORT void Export(Handle(HYDROData_Document) theDocument, + const QString& aFileName, const Handle_HYDROData_LandCoverMap& aLCM, QStringList& aNonExpList, bool bCheckLinear = true, bool bUseDiscr = false, double theDefl = 0.1); - int WriteObjectPolyXY(SHPHandle theShpHandle, Handle_HYDROData_PolylineXY thePoly ); + int WriteObjectPolyXY(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, + Handle_HYDROData_PolylineXY thePoly ); - int WriteObjectPoly3D(SHPHandle theShpHandle, Handle_HYDROData_Polyline3D thePoly ); + int WriteObjectPoly3D(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, + Handle_HYDROData_Polyline3D thePoly ); - int WriteObjectPolygon(SHPHandle theShpHandle, const TopoDS_Shape& theInputShape, bool bUseDiscr, double theDefl ); + int WriteObjectPolygon(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, + const TopoDS_Shape& theInputShape, bool bUseDiscr, double theDefl ); //Import bool Parse(SHPHandle theHandle, ShapeType theType, int& theShapeTypeOfFile); //Import Landcover @@ -113,7 +118,7 @@ public: //Import Polyline void ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities); + int theInd, NCollection_Sequence& theEntities, bool bReadAsPolyline = false); void ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, int theInd, NCollection_Sequence& theEntities); @@ -136,13 +141,17 @@ public: private: - void ProcessFace(const TopoDS_Face& theFace, SHPHandle theShpHandle, + void ProcessFace(Handle(HYDROData_Document) theDocument, + const TopoDS_Face& theFace, SHPHandle theShpHandle, bool bUseDiscr, double theDefl); bool CheckLinear(const TopoDS_Shape& theInpShape); int TryOpenShapeFile(QString theFileName); + void GetFreeIndices(std::vector& theAllowedIndexes, QString strName, size_t theObjsSize, + QStringList theExistingNames, QString theBaseFileName); + private: std::vector mySHPObjects; SHPHandle myHSHP;