mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
update MDAL to 1.3.1
This commit is contained in:
parent
f38d190f56
commit
626efeafe6
2
external/mdal/frmts/mdal_2dm.cpp
vendored
2
external/mdal/frmts/mdal_2dm.cpp
vendored
@ -402,7 +402,7 @@ void MDAL::Driver2dm::save( const std::string &fileName, const std::string &, MD
|
||||
for ( size_t j = 0; j < 2; ++j )
|
||||
{
|
||||
line.append( " " );
|
||||
line.append( MDAL::doubleToString( vertex[j], 8, true ) );
|
||||
line.append( MDAL::doubleToString( vertex[j], 16 ) );
|
||||
}
|
||||
line.append( " " );
|
||||
line.append( MDAL::doubleToString( vertex[2] ) );
|
||||
|
2
external/mdal/frmts/mdal_hec2d.cpp
vendored
2
external/mdal/frmts/mdal_hec2d.cpp
vendored
@ -122,7 +122,7 @@ static MDAL::DateTime convertToDateTime( const std::string strDateTime )
|
||||
{
|
||||
//HECRAS format date is 01JAN2000
|
||||
|
||||
auto data = MDAL::split( strDateTime, " " );
|
||||
auto data = MDAL::split( strDateTime, ' ' );
|
||||
if ( data.size() < 2 )
|
||||
return MDAL::DateTime();
|
||||
|
||||
|
13
external/mdal/frmts/mdal_mike21.cpp
vendored
13
external/mdal/frmts/mdal_mike21.cpp
vendored
@ -23,13 +23,6 @@
|
||||
|
||||
#define DRIVER_NAME "Mike21"
|
||||
|
||||
// function to split using regex, by default split on whitespace characters
|
||||
std::vector<std::string> regex_split( const std::string &input, const std::regex &split_regex = std::regex{"\\s+"} )
|
||||
{
|
||||
std::sregex_token_iterator iter( input.begin(), input.end(), split_regex, -1 );
|
||||
std::sregex_token_iterator end;
|
||||
return {iter, end};
|
||||
}
|
||||
|
||||
static bool parse_vertex_id_gaps( std::map<size_t, size_t> &vertexIDtoIndex, size_t vertexIndex, size_t vertexID )
|
||||
{
|
||||
@ -246,7 +239,8 @@ std::unique_ptr<MDAL::Mesh> MDAL::DriverMike21::load( const std::string &meshFil
|
||||
{
|
||||
if ( 0 < lineNumber && lineNumber < mVertexCount + 1 )
|
||||
{
|
||||
chunks = regex_split( MDAL::trim( line ) );
|
||||
std::replace( line.begin(), line.end(), '\t', ' ' );
|
||||
chunks = MDAL::split( MDAL::trim( line ), ' ' );
|
||||
if ( chunks.size() != 5 )
|
||||
{
|
||||
MDAL::Log::error( MDAL_Status::Err_InvalidData, name(), "vertex line in invalid format." );
|
||||
@ -283,7 +277,8 @@ std::unique_ptr<MDAL::Mesh> MDAL::DriverMike21::load( const std::string &meshFil
|
||||
|
||||
if ( mVertexCount + 1 < lineNumber )
|
||||
{
|
||||
chunks = regex_split( MDAL::trim( line ) );
|
||||
std::replace( line.begin(), line.end(), '\t', ' ' );
|
||||
chunks = MDAL::split( MDAL::trim( line ), ' ' );
|
||||
assert( faceIndex < faceCount );
|
||||
|
||||
size_t faceVertexCount = chunks.size() - 1;
|
||||
|
4
external/mdal/frmts/mdal_ugrid.cpp
vendored
4
external/mdal/frmts/mdal_ugrid.cpp
vendored
@ -461,7 +461,7 @@ void MDAL::DriverUgrid::ignore1DMeshVariables( const std::string &mesh, std::set
|
||||
for ( const std::string &coordinateIt : coordinateVarsToIgnore )
|
||||
{
|
||||
std::string coordinatesVar = mNcFile->getAttrStr( mesh, coordinateIt );
|
||||
std::vector<std::string> allCoords = MDAL::split( coordinatesVar, " " );
|
||||
std::vector<std::string> allCoords = MDAL::split( coordinatesVar, ' ' );
|
||||
|
||||
for ( const std::string &var : allCoords )
|
||||
{
|
||||
@ -1041,7 +1041,7 @@ void MDAL::DriverUgrid::writeVariables( MDAL::Mesh *mesh, const std::string &mes
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> words = MDAL::split( mesh->crs(), ":" );
|
||||
std::vector<std::string> words = MDAL::split( mesh->crs(), ':' );
|
||||
|
||||
if ( words[0] == "EPSG" && words.size() > 1 )
|
||||
{
|
||||
|
2
external/mdal/frmts/mdal_xdmf.cpp
vendored
2
external/mdal/frmts/mdal_xdmf.cpp
vendored
@ -359,7 +359,7 @@ void MDAL::DriverXdmf::hdf5NamePath( const std::string &dataItemPath, std::strin
|
||||
path.erase( 0, startpos );
|
||||
}
|
||||
|
||||
std::vector<std::string> chunks = MDAL::split( path, ":" );
|
||||
std::vector<std::string> chunks = MDAL::split( path, ':' );
|
||||
if ( chunks.size() != 2 )
|
||||
{
|
||||
throw MDAL::Error( MDAL_Status::Err_UnknownFormat, "must be in format fileName:hdfPath" );
|
||||
|
2
external/mdal/mdal.cpp
vendored
2
external/mdal/mdal.cpp
vendored
@ -21,7 +21,7 @@ static const char *EMPTY_STR = "";
|
||||
|
||||
const char *MDAL_Version()
|
||||
{
|
||||
return "1.3.0";
|
||||
return "1.3.1";
|
||||
}
|
||||
|
||||
MDAL_Status MDAL_LastStatus()
|
||||
|
2
external/mdal/mdal_utils.cpp
vendored
2
external/mdal/mdal_utils.cpp
vendored
@ -964,7 +964,7 @@ MDAL::DateTime MDAL::parseCFReferenceTime( const std::string &timeInformation, c
|
||||
if ( strings.size() > 3 )
|
||||
{
|
||||
std::string timeString = strings[3];
|
||||
auto timeStringsValue = MDAL::split( timeString, ":" );
|
||||
auto timeStringsValue = MDAL::split( timeString, ':' );
|
||||
if ( timeStringsValue.size() == 3 )
|
||||
{
|
||||
hours = MDAL::toInt( timeStringsValue[0] );
|
||||
|
Loading…
x
Reference in New Issue
Block a user