Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdalwarper.cpp: more details about OPTIMIZE_SIZE #10817

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion alg/gdalwarper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,20 @@ CPLErr GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
* will be selected, not just those whose center point falls within the
* polygon.</li>
*
* <li>XSCALE: Ratio expressing the resampling factor (number of destination
* pixels per source pixel) along the target horizontal axis.
* The scale is used to determine the number of source pixels along the x-axis
* that are considered by the resampling algorithm.
* Equals to one for no resampling, below one for downsampling
* and above one for upsampling. This is automatically computed, for each
rouault marked this conversation as resolved.
Show resolved Hide resolved
* processing chunk, and may thus vary among them, depending on the
* shape of output regions vs input regions. Such variations can be undesired
* in some situations. If the resampling factor can be considered as constant
* over the warped area, setting a constant value can lead to more reproducible
* pixel output.</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Describe XSCALE=FROM_GRID_SAMPLING ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it as undocumented for now / implementation detail... (partly because I'm never satisfied with those settings, and also because this is tricky to describe accurately and in a understandable way)

*
* <li>YSCALE: Same as XSCALE, but along the horizontal axis.</li>
*
* <li>OPTIMIZE_SIZE: This defaults to FALSE, but may be set to TRUE
* typically when writing to a compressed dataset (GeoTIFF with
* COMPRESS creation option set for example) for achieving a smaller
Expand All @@ -1176,7 +1190,11 @@ CPLErr GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
* of the file. However sticking to target block size may cause major
* processing slowdown for some particular reprojections. Starting
* with GDAL 3.8, OPTIMIZE_SIZE mode is automatically enabled when it is safe
* to do so.</li>
* to do so.
* As this parameter influences the shape of warping chunk, and by default the
* XSCALE and YSCALE parameters are computed per warping chunk, this parameter may
* influence the pixel output.
* </li>
*
* <li>NUM_THREADS: (GDAL >= 1.10) Can be set to a numeric value or ALL_CPUS to
* set the number of threads to use to parallelize the computation part of the
Expand Down
1 change: 1 addition & 0 deletions doc/source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3360,6 +3360,7 @@ UpdateFeature
updateTime
UpperLeftX
UpperLeftY
upsampling
upsert
uri
url
Expand Down
Loading