MDAL
mdal_3di.hpp
1 /*
2  MDAL - Mesh Data Abstraction Library (MIT License)
3  Copyright (C) 2018 Peter Petrik (zilolv at gmail dot com)
4 */
5 
6 #ifndef MDAL_3DI_HPP
7 #define MDAL_3DI_HPP
8 
9 #include <map>
10 #include <string>
11 #include <stddef.h>
12 
13 #include "mdal_config.hpp"
14 #include "mdal_cf.hpp"
15 #include "mdal_driver.hpp"
16 
17 namespace MDAL
18 {
19 
40  class Driver3Di: public DriverCF
41  {
42  public:
43  Driver3Di();
44  ~Driver3Di() override = default;
45  Driver3Di *create() override;
46  std::string buildUri( const std::string &meshFile ) override;
47  private:
48  CFDimensions populateDimensions( ) override;
49  void populate2DMeshDimensions( MDAL::CFDimensions &dims );
50  void populateElements( Vertices &vertices, Edges &edges, Faces &faces ) override;
51  void populateMesh2DElements( Vertices &vertices, Faces &faces );
52  void addBedElevation( MemoryMesh *mesh ) override;
53  std::string getCoordinateSystemVariableName() override;
54  std::string getTimeVariableName() const override;
55  std::set<std::string> ignoreNetCDFVariables() override;
56  void parseNetCDFVariableMetadata( int varid,
57  std::string &variableName,
58  std::string &name,
59  bool *is_vector,
60  bool *isPolar,
61  bool *invertedDirection,
62  bool *is_x ) override;
63  std::vector<std::pair<double, double>> parseClassification( int varid ) const override;
64 
66  size_t parse2DMesh();
67 
68  void addBedElevationDatasetOnFaces();
69 
70  void populate1DMeshDimensions( MDAL::CFDimensions &dims );
71  void populateMesh1DElements( Vertices &vertices, Edges &edges );
72  bool check1DConnection( std::string fileName );
73  void parse1DConnection( const std::vector<int> &nodesId, const std::vector<int> &edgesId, Edges &edges );
74  };
75 
76 } // namespace MDAL
77 
78 #endif // MDAL_3DI_HPP
Definition: mdal_cf.hpp:24
Driver of 3Di file format.
Definition: mdal_3di.hpp:41
NetCDF Climate and Forecast (CF) Metadata Conventions http://cfconventions.org and http://ugrid-conve...
Definition: mdal_cf.hpp:116
Definition: mdal_memory_data_model.hpp:291