Artefacts using WebMercatorQuad TMS #315
-
|
I'm trying to create COG of french LIDAR HD DEM. While cog_trranslate produces good looking COG (see screen 1), the Here is the script i use: def export_to_cog(
src_path: Path | str,
dst_path: Path | str,
profile: COGProfile = COGProfile.DEFLATE,
profile_options: Optional[dict] = None,
**options,
) -> None:
"""
Export a raster to COG.
Args:
src_path: The source raster path.
dst_path: The target COG path.
profile: The compression profile.
profile_options: The compression options.
**options: Additional rio-cogeo options (see cog_translate).
"""
output_profile = cog_profiles.get(profile.value)
output_profile.update(dict(BIGTIFF="IF_SAFER"))
if profile_options:
output_profile.update(profile_options)
config = dict(
GDAL_NUM_THREADS="ALL_CPUS",
GDAL_TIFF_INTERNAL_MASK=True,
GDAL_TIFF_OVR_BLOCKSIZE="128",
)
cog_translate(
src_path,
dst_path,
output_profile,
config=config,
in_memory=False,
**options,
)I call this method like this: export_to_cog(
f"{VRT_FOLDER}/raw_datas.vrt",
f"{WORKING_SANCY}/cog_raw_tms.tif",
profile=COGProfile.LERC_ZSTD,
# profile_options={"MAX_Z_ERROR": 0.01},
tms=morecantile.tms.get("WebMercatorQuad"),
) |
Beta Was this translation helpful? Give feedback.
Answered by
vincentsarago
Jan 5, 2026
Replies: 1 comment 1 reply
-
|
Hi @vprint Can you try using other resampling method than export_to_cog(
f"{VRT_FOLDER}/raw_datas.vrt",
f"{WORKING_SANCY}/cog_raw_tms.tif",
profile=COGProfile.LERC_ZSTD,
# profile_options={"MAX_Z_ERROR": 0.01},
tms=morecantile.tms.get("WebMercatorQuad"),
resampling="bilinear",
overview_resampling="bilinear",
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
vprint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Hi @vprint
Can you try using other resampling method than
nearest?