diff --git a/src/BuildTiles/Main/tgconstruct_shared.cxx b/src/BuildTiles/Main/tgconstruct_shared.cxx index a9c00b43..e7973195 100644 --- a/src/BuildTiles/Main/tgconstruct_shared.cxx +++ b/src/BuildTiles/Main/tgconstruct_shared.cxx @@ -77,8 +77,6 @@ void TGConstruct::CreateMatchedEdgeFiles( std::vector& bucketList ) return; } - sgClearWriteError(); - // north nCount = north.size(); SG_LOG( SG_GENERAL, SG_DEBUG, "write " << north.size() << " northern nodes to file " << filepath.c_str() ); @@ -200,8 +198,6 @@ void TGConstruct::SaveSharedEdgeData( int stage ) return; } - sgClearWriteError(); - // north nCount = north.size(); sgWriteInt( fp, nCount ); @@ -273,7 +269,6 @@ void TGConstruct::SaveSharedEdgeData( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_north.c_str() << " for writing!" ); return; } - sgClearWriteError(); nCount = north.size(); sgWriteInt( fp, nCount ); @@ -289,7 +284,6 @@ void TGConstruct::SaveSharedEdgeData( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_south.c_str() << " for writing!" ); return; } - sgClearWriteError(); nCount = south.size(); sgWriteInt( fp, nCount ); @@ -304,7 +298,6 @@ void TGConstruct::SaveSharedEdgeData( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_east.c_str() << " for writing!" ); return; } - sgClearWriteError(); nCount = east.size(); sgWriteInt( fp, nCount ); @@ -319,7 +312,6 @@ void TGConstruct::SaveSharedEdgeData( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_west.c_str() << " for writing!" ); return; } - sgClearWriteError(); nCount = west.size(); sgWriteInt( fp, nCount ); @@ -388,7 +380,6 @@ void TGConstruct::LoadSharedEdgeData( int stage ) file = dir + "/" + b.gen_index_str() + "_south_edge"; fp = gzopen( file.c_str(), "rb" ); if (fp) { - sgClearReadError(); ReadNeighborFaces( fp ); gzclose( fp ); } @@ -399,7 +390,6 @@ void TGConstruct::LoadSharedEdgeData( int stage ) file = dir + "/" + b.gen_index_str() + "_north_edge"; fp = gzopen( file.c_str(), "rb" ); if (fp) { - sgClearReadError(); ReadNeighborFaces( fp ); gzclose( fp ); } @@ -410,7 +400,6 @@ void TGConstruct::LoadSharedEdgeData( int stage ) file = dir + "/" + b.gen_index_str() + "_west_edge"; fp = gzopen( file.c_str(), "rb" ); if (fp) { - sgClearReadError(); ReadNeighborFaces( fp ); gzclose( fp ); } @@ -421,7 +410,6 @@ void TGConstruct::LoadSharedEdgeData( int stage ) file = dir + "/" + b.gen_index_str() + "_east_edge"; fp = gzopen( file.c_str(), "rb" ); if (fp) { - sgClearReadError(); ReadNeighborFaces( fp ); gzclose( fp ); } @@ -561,7 +549,7 @@ void TGConstruct::SaveToIntermediateFiles( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_clipped.c_str() << " for writing!" ); return; } - sgClearWriteError(); + polys_clipped.SaveToGzFile( fp ); gzclose( fp ); @@ -569,7 +557,7 @@ void TGConstruct::SaveToIntermediateFiles( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_nodes.c_str() << " for writing!" ); return; } - sgClearWriteError(); + nodes.SaveToGzFile( fp ); gzclose( fp ); @@ -596,7 +584,7 @@ void TGConstruct::SaveToIntermediateFiles( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_clipped.c_str() << " for writing!" ); return; } - sgClearWriteError(); + polys_clipped.SaveToGzFile( fp ); gzclose( fp ); @@ -604,7 +592,7 @@ void TGConstruct::SaveToIntermediateFiles( int stage ) SG_LOG( SG_GENERAL, SG_INFO,"ERROR: opening " << file_nodes.c_str() << " for writing!" ); return; } - sgClearWriteError(); + nodes.SaveToGzFile( fp ); gzclose( fp );