10#include <tclap/CmdLine.h>
21int main(
int argc,
char* argv[])
24 "Converts 2D mesh file into shapfile such that each element is "
25 "represented by a polygon. Cell attributes are transferred onto shape "
26 "polygons while point attributes are ignored.\n\n"
27 "OpenGeoSys-6 software, version " +
30 "Copyright (c) 2012-2024, OpenGeoSys Community "
31 "(http://www.opengeosys.org)",
34 TCLAP::ValueArg<std::string> output_arg(
"o",
"output-file",
35 "Esri Shapefile (*.shp)",
true,
"",
39 TCLAP::ValueArg<std::string> input_arg(
"i",
"input-file",
40 "OGS mesh file (*.vtu, *.msh)",
true,
41 "",
"input_file.vtu");
44 cmd.parse(argc, argv);
47 MPI_Init(&argc, &argv);
50 std::string
const file_name(input_arg.getValue());
51 std::unique_ptr<MeshLib::Mesh>
const mesh(
int main(int argc, char *argv[])
Definition of the Mesh class.
Implementation of the SHPInterface class.
static bool write2dMeshToSHP(const std::string &file_name, const MeshLib::Mesh &mesh)
GITINFOLIB_EXPORT const std::string ogs_version
MeshLib::Mesh * readMeshFromFile(const std::string &file_name, bool const compute_element_neighbors)
Definition of readMeshFromFile function.