Add operations on polygon : Duplicate, exportCsv, exportPol and simplify

SimplfyPolygon applies an operation on polygon to reduce the number of points in a way that the shape of the polygon is conserved.
This commit is contained in:
Magne Sjaastad
2024-03-04 07:28:04 +01:00
parent 5217ab5c8b
commit 3689cccae7
19 changed files with 621 additions and 19 deletions

View File

@@ -118,7 +118,7 @@ void RifCsvDataTableFormatter::tableCompleted()
//--------------------------------------------------------------------------------------------------
void RifCsvDataTableFormatter::outputBuffer()
{
if ( !m_columnHeaders.empty() )
if ( isAnyTextInHeader() )
{
for ( size_t i = 0; i < m_columnHeaders.size(); i++ )
{
@@ -152,3 +152,21 @@ void RifCsvDataTableFormatter::outputBuffer()
m_columnHeaders.clear();
m_buffer.clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifCsvDataTableFormatter::isAnyTextInHeader() const
{
for ( auto& header : m_columnHeaders )
{
for ( const auto& titleRow : header.titles )
{
if ( !titleRow.trimmed().isEmpty() )
{
return true;
}
}
}
return false;
}