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

SAMPLE_STEPS warp option has illegal value with SAMPLE_STEPS=ALL #8604

Closed
arjouz opened this issue Oct 24, 2023 · 2 comments
Closed

SAMPLE_STEPS warp option has illegal value with SAMPLE_STEPS=ALL #8604

arjouz opened this issue Oct 24, 2023 · 2 comments

Comments

@arjouz
Copy link

arjouz commented Oct 24, 2023

Expected behavior and actual behavior.

SAMPLE_STEPS=ALL doesn't work with rasterio reproject whereas it should.
rasterio._err.CPLE_IllegalArgError: GDALWarpOptions.Validate(): SAMPLE_STEPS warp option has illegal value.

Steps to reproduce the problem.

warper_options = {"RPC_DEM": dem_file,
"RPC_DEM_MISSING_VALUE": 0,
"OSR_USE_ETMERC": "YES",
"BIGTIFF": "IF_NEEDED",
"SAMPLE_GRID": "YES",
"SAMPLE_STEPS": "ALL"}

                    arr, transform = reproject(
                                                source=rio.band(src, src.indexes),
                                                rpcs=src.rpcs,
                                                src_crs="EPSG:4326",
                                                src_nodata=src.nodata,
                                                dst_crs=dst_crs,
                                                dst_nodata=src.nodata,
                                                resampling=Resampling.cubic,
                                                num_threads=num_threads,
                                                **warper_options
                        )

Operating system

4.18.0-372.32.1.el8_6.x86_64 #1 SMP Fri Oct 7 12:35:10 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

GDAL version and provenance

GDAL 3.2.2

@jratike80
Copy link
Collaborator

GDAL 3.2.2 is not a supported version. Supported version is 3.7.
Read also https://gdal.org/doxygen/structGDALWarpOptions.html

Starting with GDAL 3.7, this can be set to ALL to mean to sample along all edge points of the destination region (if SAMPLE_GRID=NO or not specified), or all points of the destination region if SAMPLE_GRID=YES.

@arjouz
Copy link
Author

arjouz commented Oct 24, 2023

Thank you for your answer. I suppose this issue can be closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants