Hi,

I believe it would not be extremely hard to compute the other size parameter so 
that the result would have square pixels. As a workaround, if you can guess an 
about suitable pixel size you can define the resolution with equal x and y size:
gdal vector rasterize --resolution [pixelsize,pixelsize]

The behavior is not new. The traditional gdal_rasterize 
https://gdal.org/en/stable/programs/gdal_rasterize.html requires also both 
width and height.

-Jukka Rahkonen-

________________________________________
Lähettäjä: gdal-dev <[email protected]> käyttäjän Scott via 
gdal-dev <[email protected]> puolesta
Lähetetty: Lauantai 15. marraskuuta 2025 21.45
Vastaanottaja: [email protected] <[email protected]>
Aihe: [gdal-dev] gdal rasterize vs resize


Greetings,

When using gdal raster resize I can use --size 0,800 and it will compute
the width.

However, when using gdal vector rasterize --size 0,800 it throws the error:

ERROR 1: Wrong value for -ts parameter.

Having it compute the missing value is highly desirable!

GDAL v3.12.0

Thanks!
Scott

--
http://www.postholer.com/

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to