Skip to content

Commit

Permalink
bug fixed: specify nodata to -9999. when outputing raster geotiff
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyzlj committed Dec 3, 2024
1 parent 81b859c commit 37b0bab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions seims/src/seims_main/base/data/PrintInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,18 @@ void PrintInfoItem::Flush(const string& projectPath, MongoGridFs* gfs, IntRaster

if (Suffix == GTiffExtension || Suffix == ASCIIExtension) {
FloatRaster* rs_data = nullptr;
STRDBL_MAP tmpheader;
#ifdef HAS_VARIADIC_TEMPLATES
tmpheader.emplace(HEADER_RS_NODATA, CVT_DBL(NODATA_VALUE));
#else
tmpheader.insert(make_pair(HEADER_RS_NODATA, CVT_DBL(NODATA_VALUE)));
#endif
if (is1d) { // Single-layered and cell-based raster data
rs_data = new FloatRaster(templateRaster, m_1DData, m_nRows);
} else { // Multi-layered and cell-based raster data
rs_data = new FloatRaster(templateRaster, m_2DData, m_nRows, m_nLayers);
}
rs_data->SetHeader(tmpheader);
if (outToMongoDB) {
gfs->RemoveFile(gfs_name);
int try_times = 1;
Expand Down

0 comments on commit 37b0bab

Please sign in to comment.