#ifndef HYDRODATA_SHAPEFILE_H
#define HYDRODATA_SHAPEFILE_H
-#include <vector>
+#include "HYDROData.h"
+
#include <NCollection_Sequence.hxx>
+
+#include <TopTools_SequenceOfShape.hxx>
+
#include <QStringList>
-#include "HYDROData.h"
+
+#include <vector>
+
//extern "C" {
#include <shapefil.h>
//};
class gp_XYZ;
-class Handle_HYDROData_PolylineXY;
-class Handle_HYDROData_Polyline3D;
-class Handle(HYDROData_Document);
-class TopTools_SequenceOfShape;
+class HYDROData_PolylineXY;
+class HYDROData_Polyline3D;
+class HYDROData_Document;
class TopoDS_Face;
class TopoDS_Shape;
-class Handle_HYDROData_Entity;
-class Handle_HYDROData_LandCoverMap;
+class HYDROData_Entity;
+class HYDROData_LandCoverMap;
class HYDROData_ShapeFile
{
//Export operation
HYDRODATA_EXPORT void Export(Handle(HYDROData_Document) theDocument,
const QString& aFileName,
- NCollection_Sequence<Handle_HYDROData_PolylineXY> aPolyXYSeq,
- NCollection_Sequence<Handle_HYDROData_Polyline3D> aPoly3DSeq,
+ NCollection_Sequence<Handle(HYDROData_PolylineXY)> aPolyXYSeq,
+ NCollection_Sequence<Handle(HYDROData_Polyline3D)> aPoly3DSeq,
QStringList& aNonExpList);
HYDRODATA_EXPORT void Export(Handle(HYDROData_Document) theDocument,
const QString& aFileName,
- const Handle_HYDROData_LandCoverMap& aLCM,
+ const Handle(HYDROData_LandCoverMap)& aLCM,
QStringList& aNonExpList,
bool bCheckLinear = true,
bool bUseDiscr = false,
double theDefl = 0.1);
int WriteObjectPolyXY(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle,
- Handle_HYDROData_PolylineXY thePoly );
+ Handle(HYDROData_PolylineXY) thePoly );
int WriteObjectPoly3D(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle,
- Handle_HYDROData_Polyline3D thePoly );
+ Handle(HYDROData_Polyline3D) thePoly );
int WriteObjectPolygon(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle,
const TopoDS_Shape& theInputShape, bool bUseDiscr, double theDefl );
//Import Polyline
void ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName,
- int theInd, NCollection_Sequence<Handle_HYDROData_Entity>& theEntities);
+ int theInd, NCollection_Sequence<Handle(HYDROData_Entity)>& theEntities,
+ bool bReadAsPolylin = false);
void ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName,
- int theInd, NCollection_Sequence<Handle_HYDROData_Entity>& theEntities);
+ int theInd, NCollection_Sequence<Handle(HYDROData_Entity)>& theEntities);
HYDRODATA_EXPORT int ImportPolylines(Handle(HYDROData_Document) theDocument, const QString& theFileName,
- NCollection_Sequence<Handle_HYDROData_Entity>& theEntities, int& theShapeTypeOfFile);
+ NCollection_Sequence<Handle(HYDROData_Entity)>& theEntities, int& theShapeTypeOfFile);
HYDRODATA_EXPORT QString GetShapeTypeName(int theType);
int TryOpenShapeFile(QString theFileName);
+ void GetFreeIndices(std::vector<int>& theAllowedIndexes, QString strName, size_t theObjsSize,
+ QStringList theExistingNames, QString theBaseFileName);
+
private:
std::vector<SHPObject*> mySHPObjects;
SHPHandle myHSHP;