Skip to content

Commit

Permalink
Reduce excessive precision %.18g to %.17g
Browse files Browse the repository at this point in the history
17 significant digits is the documented value sufficient to round-trip
from any Float64 IEEE754 value to decimal back to the original Float64
IEEE754 value.
  • Loading branch information
rouault committed Aug 15, 2024
1 parent 3527c3f commit f0eec8e
Show file tree
Hide file tree
Showing 66 changed files with 293 additions and 293 deletions.
8 changes: 4 additions & 4 deletions alg/gdal_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ static void *GDALCreateSimilarRPCTransformer(void *hTransformArg,

char **papszOptions = nullptr;
papszOptions = CSLSetNameValue(papszOptions, "RPC_HEIGHT",
CPLSPrintf("%.18g", psInfo->dfHeightOffset));
CPLSPrintf("%.17g", psInfo->dfHeightOffset));
papszOptions = CSLSetNameValue(papszOptions, "RPC_HEIGHT_SCALE",
CPLSPrintf("%.18g", psInfo->dfHeightScale));
CPLSPrintf("%.17g", psInfo->dfHeightScale));
if (psInfo->pszDEMPath != nullptr)
{
papszOptions =
Expand All @@ -529,7 +529,7 @@ static void *GDALCreateSimilarRPCTransformer(void *hTransformArg,
if (psInfo->bHasDEMMissingValue)
papszOptions =
CSLSetNameValue(papszOptions, "RPC_DEM_MISSING_VALUE",
CPLSPrintf("%.18g", psInfo->dfDEMMissingValue));
CPLSPrintf("%.17g", psInfo->dfDEMMissingValue));
papszOptions =
CSLSetNameValue(papszOptions, "RPC_DEM_APPLY_VDATUM_SHIFT",
(psInfo->bApplyDEMVDatumShift) ? "TRUE" : "FALSE");
Expand Down Expand Up @@ -2032,7 +2032,7 @@ CPLXMLNode *GDALSerializeRPCTransformer(void *pTransformArg)
{
CPLCreateXMLElementAndValue(
psTree, "DEMMissingValue",
CPLSPrintf("%.18g", psInfo->dfDEMMissingValue));
CPLSPrintf("%.17g", psInfo->dfDEMMissingValue));
}

CPLCreateXMLElementAndValue(psTree, "DEMApplyVDatumShift",
Expand Down
8 changes: 4 additions & 4 deletions alg/gdalgeoloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,9 @@ static void GDALGeoLocRescale(char **&papszMD, const char *pszItem,
{
const double dfVal =
dfRatio * CPLAtofM(CSLFetchNameValueDef(
papszMD, pszItem, CPLSPrintf("%.18g", dfDefaultVal)));
papszMD, pszItem, CPLSPrintf("%.17g", dfDefaultVal)));

papszMD = CSLSetNameValue(papszMD, pszItem, CPLSPrintf("%.18g", dfVal));
papszMD = CSLSetNameValue(papszMD, pszItem, CPLSPrintf("%.17g", dfVal));
}

/************************************************************************/
Expand Down Expand Up @@ -1718,15 +1718,15 @@ CPLStringList GDALCreateGeolocationMetadata(GDALDatasetH hBaseDS,
if (aosMD.FetchNameValue("PIXEL_STEP") == nullptr)
{
aosMD.SetNameValue(
"PIXEL_STEP", CPLSPrintf("%.18g", static_cast<double>(
"PIXEL_STEP", CPLSPrintf("%.17g", static_cast<double>(
GDALGetRasterXSize(hBaseDS)) /
nGeoLocXSize));
}

if (aosMD.FetchNameValue("LINE_STEP") == nullptr)
{
aosMD.SetNameValue(
"LINE_STEP", CPLSPrintf("%.18g", static_cast<double>(
"LINE_STEP", CPLSPrintf("%.17g", static_cast<double>(
GDALGetRasterYSize(hBaseDS)) /
nGeoLocYSize));
}
Expand Down
8 changes: 4 additions & 4 deletions alg/gdaltransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3091,14 +3091,14 @@ static CPLXMLNode *GDALSerializeGenImgProjTransformer(void *pTransformArg)
else
{
CPLsnprintf(
szWork, sizeof(szWork), "%.18g,%.18g,%.18g,%.18g,%.18g,%.18g",
szWork, sizeof(szWork), "%.17g,%.17g,%.17g,%.17g,%.17g,%.17g",
psInfo->adfSrcGeoTransform[0], psInfo->adfSrcGeoTransform[1],
psInfo->adfSrcGeoTransform[2], psInfo->adfSrcGeoTransform[3],
psInfo->adfSrcGeoTransform[4], psInfo->adfSrcGeoTransform[5]);
CPLCreateXMLElementAndValue(psTree, "SrcGeoTransform", szWork);

CPLsnprintf(
szWork, sizeof(szWork), "%.18g,%.18g,%.18g,%.18g,%.18g,%.18g",
szWork, sizeof(szWork), "%.17g,%.17g,%.17g,%.17g,%.17g,%.17g",
psInfo->adfSrcInvGeoTransform[0], psInfo->adfSrcInvGeoTransform[1],
psInfo->adfSrcInvGeoTransform[2], psInfo->adfSrcInvGeoTransform[3],
psInfo->adfSrcInvGeoTransform[4], psInfo->adfSrcInvGeoTransform[5]);
Expand Down Expand Up @@ -3128,14 +3128,14 @@ static CPLXMLNode *GDALSerializeGenImgProjTransformer(void *pTransformArg)
else
{
CPLsnprintf(
szWork, sizeof(szWork), "%.18g,%.18g,%.18g,%.18g,%.18g,%.18g",
szWork, sizeof(szWork), "%.17g,%.17g,%.17g,%.17g,%.17g,%.17g",
psInfo->adfDstGeoTransform[0], psInfo->adfDstGeoTransform[1],
psInfo->adfDstGeoTransform[2], psInfo->adfDstGeoTransform[3],
psInfo->adfDstGeoTransform[4], psInfo->adfDstGeoTransform[5]);
CPLCreateXMLElementAndValue(psTree, "DstGeoTransform", szWork);

CPLsnprintf(
szWork, sizeof(szWork), "%.18g,%.18g,%.18g,%.18g,%.18g,%.18g",
szWork, sizeof(szWork), "%.17g,%.17g,%.17g,%.17g,%.17g,%.17g",
psInfo->adfDstInvGeoTransform[0], psInfo->adfDstInvGeoTransform[1],
psInfo->adfDstInvGeoTransform[2], psInfo->adfDstInvGeoTransform[3],
psInfo->adfDstInvGeoTransform[4], psInfo->adfDstInvGeoTransform[5]);
Expand Down
4 changes: 2 additions & 2 deletions alg/gdalwarpoperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ CPLErr GDALWarpOperation::CollectChunkListInternal(int nDstXOff, int nDstYOff,
// in case the heuristics would cause issues.
#if DEBUG_VERBOSE
CPLDebug("WARP",
"dst=(%d,%d,%d,%d) src=(%d,%d,%d,%d) srcfillratio=%.18g, "
"dst=(%d,%d,%d,%d) src=(%d,%d,%d,%d) srcfillratio=%.17g, "
"dfTotalMemoryUse=%.1f MB",
nDstXOff, nDstYOff, nDstXSize, nDstYSize, nSrcXOff, nSrcYOff,
nSrcXSize, nSrcYSize, dfSrcFillRatio,
Expand Down Expand Up @@ -3165,7 +3165,7 @@ CPLErr GDALWarpOperation::ComputeSourceWindow(
#if DEBUG_VERBOSE
CPLDebug("WARP",
"dst=(%d,%d,%d,%d) raw "
"src=(minx=%.18g,miny=%.18g,maxx=%.18g,maxy=%.18g)",
"src=(minx=%.17g,miny=%.17g,maxx=%.17g,maxy=%.17g)",
nDstXOff, nDstYOff, nDstXSize, nDstYSize, dfMinXOut, dfMinYOut,
dfMaxXOut, dfMaxYOut);
#endif
Expand Down
6 changes: 3 additions & 3 deletions autotest/gcore/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ def test_cog_byte_to_web_mercator_manual():
options=[
"BLOCKSIZE=256",
"TARGET_SRS=EPSG:3857",
"RES=%.18g" % res,
"EXTENT=%.18g,%.18g,%.18g,%.18g" % (minx, miny, maxx, maxy),
"RES=%.17g" % res,
"EXTENT=%.17g,%.17g,%.17g,%.17g" % (minx, miny, maxx, maxy),
],
)
assert ds
Expand Down Expand Up @@ -674,7 +674,7 @@ def test_cog_byte_to_web_mercator_manual():
gdal.Translate(
filename2,
filename,
options="-of COG -co TILING_SCHEME=GoogleMapsCompatible -a_ullr %.18g %.18g %.18g %.18g"
options="-of COG -co TILING_SCHEME=GoogleMapsCompatible -a_ullr %.17g %.17g %.17g %.17g"
% (minx - eps, maxy + eps, maxx + eps, miny - eps),
)
ds = gdal.Open(filename2)
Expand Down
6 changes: 3 additions & 3 deletions autotest/gcore/gdal_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_stats_approx_nodata():
os.remove("tmp/minfloat.tif")

if nodata != -3.4028234663852886e38:
print("%.18g" % nodata)
print("%.17g" % nodata)
pytest.fail("did not get expected nodata")

assert stats == [-3.0, 5.0, 1.0, 4.0], "did not get expected stats"
Expand Down Expand Up @@ -411,7 +411,7 @@ def test_stats_flt_min():
os.remove("tmp/flt_min.tif")

if nodata != 1.17549435082228751e-38:
print("%.18g" % nodata)
print("%.17g" % nodata)
pytest.fail("did not get expected nodata")

assert stats == [0.0, 1.0, 0.33333333333333337, 0.47140452079103168] or stats == [
Expand Down Expand Up @@ -450,7 +450,7 @@ def test_stats_dbl_min():
os.remove("tmp/dbl_min.tif")

if nodata != 2.22507385850720138e-308:
print("%.18g" % nodata)
print("%.17g" % nodata)
pytest.fail("did not get expected nodata")

assert stats == [0.0, 1.0, 0.33333333333333337, 0.47140452079103168] or stats == [
Expand Down
2 changes: 1 addition & 1 deletion autotest/gcore/vrt_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ def test_vrt_float32_with_nodata_slightly_below_float_min():
), "did not get expected nodata in rewritten VRT"

if nodata != -3.4028234663852886e38:
print("%.18g" % nodata)
print("%.17g" % nodata)
pytest.fail("did not get expected nodata")

assert stats == [-3.0, 5.0, 1.0, 4.0], "did not get expected stats"
Expand Down
2 changes: 1 addition & 1 deletion autotest/gcore/vrtmisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ def test_vrtmisc_nodata_float32():

# Check that this is still the case after above serialization to .vrt
# and re-opening. That is check that we serialize the rounded value with
# full double precision (%.18g)
# full double precision (%.17g)
ds = gdal.Open(vrt_filename)
nodata_vrt = ds.GetRasterBand(1).GetNoDataValue()
assert nodata_vrt == struct.unpack("f", struct.pack("f", nodata))[0]
Expand Down
24 changes: 12 additions & 12 deletions autotest/gdrivers/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ def test_fits_vector():
"1.25 + 2.25j",
["1.25 + 2.25j", "2.25 + 1.25j"],
["1.25 + 2.25j", "2.25 + 1.25j"],
"1.25340000000000007 + 2.25j",
["1.25340000000000007 + 2.25j", "2.25 + 1.25j"],
["1.25340000000000007 + 2.25j", "2.25 + 1.25j"],
"1.2534000000000001 + 2.25j",
["1.2534000000000001 + 2.25j", "2.25 + 1.25j"],
["1.2534000000000001 + 2.25j", "2.25 + 1.25j"],
]

f = lyr.GetNextFeature()
Expand Down Expand Up @@ -817,9 +817,9 @@ def test_fits_vector_write_with_source_fits_metadata():
"1.25 + 2.25j",
# ['1.25 + 2.25j', '2.25 + 1.25j'],
# ['1.25 + 2.25j', '2.25 + 1.25j'],
"1.25340000000000007 + 2.25j",
# ['1.25340000000000007 + 2.25j', '2.25 + 1.25j'],
# ['1.25340000000000007 + 2.25j', '2.25 + 1.25j']
"1.2534000000000001 + 2.25j",
# ['1.2534000000000001 + 2.25j', '2.25 + 1.25j'],
# ['1.2534000000000001 + 2.25j', '2.25 + 1.25j']
]

f = lyr.GetNextFeature()
Expand Down Expand Up @@ -935,9 +935,9 @@ def test_fits_vector_write_without_source_fits_metadata():
"1.25 + 2.25j",
# ['1.25 + 2.25j', '2.25 + 1.25j'],
# ['1.25 + 2.25j', '2.25 + 1.25j'],
"1.25340000000000007 + 2.25j",
# ['1.25340000000000007 + 2.25j', '2.25 + 1.25j'],
# ['1.25340000000000007 + 2.25j', '2.25 + 1.25j']
"1.2534000000000001 + 2.25j",
# ['1.2534000000000001 + 2.25j', '2.25 + 1.25j'],
# ['1.2534000000000001 + 2.25j', '2.25 + 1.25j']
]

f = lyr.GetNextFeature()
Expand Down Expand Up @@ -1056,9 +1056,9 @@ def test_fits_vector_write_without_source_fits_metadata_compute_repeat():
"1.25 + 2.25j",
# ['1.25 + 2.25j', '2.25 + 1.25j'],
# ['1.25 + 2.25j', '2.25 + 1.25j'],
"1.25340000000000007 + 2.25j",
# ['1.25340000000000007 + 2.25j', '2.25 + 1.25j'],
# ['1.25340000000000007 + 2.25j', '2.25 + 1.25j']
"1.2534000000000001 + 2.25j",
# ['1.2534000000000001 + 2.25j', '2.25 + 1.25j'],
# ['1.2534000000000001 + 2.25j', '2.25 + 1.25j']
]

f = lyr.GetNextFeature()
Expand Down
2 changes: 1 addition & 1 deletion autotest/ogr/ogr_geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -4107,7 +4107,7 @@ def test_ogr_geojson_write_rfc7946_from_3D_crs(tmp_vsimem):
ds = ogr.GetDriverByName("GeoJSON").CreateDataSource(filename)
lyr = ds.CreateLayer("out", srs=srs_4326_5773, options=["RFC7946=YES"])
f = ogr.Feature(lyr.GetLayerDefn())
f.SetGeometry(ogr.CreateGeometryFromWkt("POINT(%.18g %.18g %.18g)" % (lon, lat, z)))
f.SetGeometry(ogr.CreateGeometryFromWkt("POINT(%.17g %.17g %.17g)" % (lon, lat, z)))
lyr.CreateFeature(f)
ds = None

Expand Down
8 changes: 4 additions & 4 deletions autotest/ogr/ogr_geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,11 +874,11 @@ def test_ogr_geom_segmentize():
for i in range(g1.GetPointCount()):
if g1.GetPoint(i) != g2.GetPoint(g1.GetPointCount() - 1 - i):
print(
"%.18g"
"%.17g"
% (g1.GetPoint(i)[0] - g2.GetPoint(g1.GetPointCount() - 1 - i)[0])
)
pytest.fail(
"%.18g"
"%.17g"
% (g1.GetPoint(i)[1] - g2.GetPoint(g1.GetPointCount() - 1 - i)[1])
)

Expand Down Expand Up @@ -1622,11 +1622,11 @@ def test_ogr_geom_circularstring():
for i in range(g1.GetPointCount()):
if g1.GetPoint(i) != g2.GetPoint(g1.GetPointCount() - 1 - i):
print(
"%.18g"
"%.17g"
% (g1.GetPoint(i)[0] - g2.GetPoint(g1.GetPointCount() - 1 - i)[0])
)
pytest.fail(
"%.18g"
"%.17g"
% (g1.GetPoint(i)[1] - g2.GetPoint(g1.GetPointCount() - 1 - i)[1])
)

Expand Down
4 changes: 2 additions & 2 deletions frmts/daas/daasdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ void GDALDAASDataset::ReadRPCs(const CPLJSONObject &oProperties)
continue;
}
aoRPC.SetNameValue(asRPCSingleValues[i].pszGDALName,
CPLSPrintf("%.18g", dfRPCVal));
CPLSPrintf("%.17g", dfRPCVal));
}

const struct
Expand All @@ -1110,7 +1110,7 @@ void GDALDAASDataset::ReadRPCs(const CPLJSONObject &oProperties)
{
if (j > 0)
osVal += " ";
osVal += CPLSPrintf("%.18g", oRPCArray[j].ToDouble());
osVal += CPLSPrintf("%.17g", oRPCArray[j].ToDouble());
}
aoRPC.SetNameValue(asRPCArrayValues[i].pszGDALName,
osVal.c_str());
Expand Down
4 changes: 2 additions & 2 deletions frmts/eeda/eedadataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ CPLString GDALEEDALayer::BuildFilter(swq_expr_node *poNode, bool bIsAndTopLevel)
else if (poNode->papoSubExpr[1]->field_type == SWQ_FLOAT)
{
osFilter +=
CPLSPrintf("%.18g", poNode->papoSubExpr[1]->float_value);
CPLSPrintf("%.17g", poNode->papoSubExpr[1]->float_value);
}
else
{
Expand Down Expand Up @@ -890,7 +890,7 @@ CPLString GDALEEDALayer::BuildFilter(swq_expr_node *poNode, bool bIsAndTopLevel)
else if (poNode->papoSubExpr[i]->field_type == SWQ_FLOAT)
{
osFilter +=
CPLSPrintf("%.18g", poNode->papoSubExpr[i]->float_value);
CPLSPrintf("%.17g", poNode->papoSubExpr[i]->float_value);
}
else
{
Expand Down
16 changes: 8 additions & 8 deletions frmts/esric/esric_dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,10 @@ GDALDataset *ECDataset::Open(GDALOpenInfo *poOpenInfo,
return nullptr;
}
aosOptions.AddString("-projwin");
aosOptions.AddString(CPLSPrintf("%.18g", ds->m_sFullExtent.MinX));
aosOptions.AddString(CPLSPrintf("%.18g", ds->m_sFullExtent.MaxY));
aosOptions.AddString(CPLSPrintf("%.18g", ds->m_sFullExtent.MaxX));
aosOptions.AddString(CPLSPrintf("%.18g", ds->m_sFullExtent.MinY));
aosOptions.AddString(CPLSPrintf("%.17g", ds->m_sFullExtent.MinX));
aosOptions.AddString(CPLSPrintf("%.17g", ds->m_sFullExtent.MaxY));
aosOptions.AddString(CPLSPrintf("%.17g", ds->m_sFullExtent.MaxX));
aosOptions.AddString(CPLSPrintf("%.17g", ds->m_sFullExtent.MinY));
}
else if (pszExtentSource && EQUAL(pszExtentSource, "INITIAL_EXTENT"))
{
Expand All @@ -741,13 +741,13 @@ GDALDataset *ECDataset::Open(GDALOpenInfo *poOpenInfo,
}
aosOptions.AddString("-projwin");
aosOptions.AddString(
CPLSPrintf("%.18g", ds->m_sInitialExtent.MinX));
CPLSPrintf("%.17g", ds->m_sInitialExtent.MinX));
aosOptions.AddString(
CPLSPrintf("%.18g", ds->m_sInitialExtent.MaxY));
CPLSPrintf("%.17g", ds->m_sInitialExtent.MaxY));
aosOptions.AddString(
CPLSPrintf("%.18g", ds->m_sInitialExtent.MaxX));
CPLSPrintf("%.17g", ds->m_sInitialExtent.MaxX));
aosOptions.AddString(
CPLSPrintf("%.18g", ds->m_sInitialExtent.MinY));
CPLSPrintf("%.17g", ds->m_sInitialExtent.MinY));
}

if (!aosOptions.empty())
Expand Down
4 changes: 2 additions & 2 deletions frmts/fits/fitsdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ OGRFeature *FITSLayer::GetFeature(GIntBig nFID)
CPLStringList aosList;
for (int i = 0; i < nRepeat; ++i)
aosList.AddString(
CPLSPrintf("%.18g + %.18gj", x[2 * i + 0], x[2 * i + 1]));
CPLSPrintf("%.17g + %.17gj", x[2 * i + 0], x[2 * i + 1]));
if (nRepeat == 1)
poFeature->SetField(iField, aosList[0]);
else
Expand All @@ -844,7 +844,7 @@ OGRFeature *FITSLayer::GetFeature(GIntBig nFID)
for (int i = 0; i < nRepeat; ++i)
{
aosList.AddString(
CPLSPrintf("%.18g + %.18gj", x[2 * i + 0], x[2 * i + 1]));
CPLSPrintf("%.17g + %.17gj", x[2 * i + 0], x[2 * i + 1]));
}
if (nRepeat == 1)
poFeature->SetField(iField, aosList[0]);
Expand Down
20 changes: 10 additions & 10 deletions frmts/gtiff/cogdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ static bool COGGetWarpingCharacteristics(
aosOptions.AddString("VRT");
aosOptions.AddString("-projwin");
aosOptions.AddString(
CPLSPrintf("%.18g", adfSrcGeoTransform[0]));
aosOptions.AddString(CPLSPrintf("%.18g", maxLat));
CPLSPrintf("%.17g", adfSrcGeoTransform[0]));
aosOptions.AddString(CPLSPrintf("%.17g", maxLat));
aosOptions.AddString(
CPLSPrintf("%.18g", adfSrcGeoTransform[0] +
CPLSPrintf("%.17g", adfSrcGeoTransform[0] +
poSrcDS->GetRasterXSize() *
adfSrcGeoTransform[1]));
aosOptions.AddString(CPLSPrintf("%.18g", minLat));
aosOptions.AddString(CPLSPrintf("%.17g", minLat));
auto psOptions =
GDALTranslateOptionsNew(aosOptions.List(), nullptr);
poTmpDS.reset(GDALDataset::FromHandle(GDALTranslate(
Expand Down Expand Up @@ -615,10 +615,10 @@ static std::unique_ptr<GDALDataset> CreateReprojectedDS(
papszArg = CSLAddString(papszArg, "-t_srs");
papszArg = CSLAddString(papszArg, osTargetSRS);
papszArg = CSLAddString(papszArg, "-te");
papszArg = CSLAddString(papszArg, CPLSPrintf("%.18g", dfMinX));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.18g", dfMinY));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.18g", dfMaxX));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.18g", dfMaxY));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.17g", dfMinX));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.17g", dfMinY));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.17g", dfMaxX));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.17g", dfMaxY));
papszArg = CSLAddString(papszArg, "-ts");
papszArg = CSLAddString(papszArg, CPLSPrintf("%d", nXSize));
papszArg = CSLAddString(papszArg, CPLSPrintf("%d", nYSize));
Expand All @@ -632,8 +632,8 @@ static std::unique_ptr<GDALDataset> CreateReprojectedDS(
{
// Try to produce exactly square pixels
papszArg = CSLAddString(papszArg, "-tr");
papszArg = CSLAddString(papszArg, CPLSPrintf("%.18g", dfRes));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.18g", dfRes));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.17g", dfRes));
papszArg = CSLAddString(papszArg, CPLSPrintf("%.17g", dfRes));
}
else
{
Expand Down
Loading

0 comments on commit f0eec8e

Please sign in to comment.