Mesh* Crayfish::loadMesh(const QString& meshFile, LoadStatus* status) { if (meshFile.endsWith(".sww")) return loadSWW(meshFile, status); if (meshFile.endsWith(".grb") || meshFile.endsWith(".bin") || meshFile.endsWith(".grib") || meshFile.endsWith(".grib1") || meshFile.endsWith(".grib2")) return loadGRIB(meshFile, status); if (meshFile.endsWith((".hdf"))) return loadHec2D(meshFile, status); // This may be either single filename or // subdataset name in form NETCDF:filename:variable if (meshFile.endsWith(".nc") || meshFile.startsWith("NETCDF:")) return loadNetCDF(meshFile, status); if (meshFile.endsWith((".slf"))) return loadSerafin(meshFile, status); return loadMesh2DM(meshFile, status); }
bool NetworkObject::load(QString flnm) { if (StaticFunctions::checkExtension(flnm, "network")) return loadTextNetwork(flnm); else if (StaticFunctions::checkExtension(flnm, "graphml")) return loadGraphML(flnm); else return loadNetCDF(flnm); return false; }