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

[gdal_rasterize] Also accept doubles for -ts #11830

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

elpaso
Copy link
Collaborator

@elpaso elpaso commented Feb 10, 2025

But warn if it has a decimal part.

Fixes #11829

But warn if it has a decimal part.

Fixes OSGeo#11829
@elpaso elpaso added bug funded through GSP Work funded through the GDAL Sponsorship Program labels Feb 10, 2025
@jratike80
Copy link
Collaborator

Out of curiosity, what will be the output size when the input is -ts 100.4 200.6?

@elpaso
Copy link
Collaborator Author

elpaso commented Feb 10, 2025

Out of curiosity, what will be the output size when the input is -ts 100.4 200.6?

The same as -ts 100 200 internally casted to int (but you'll get a warning the precision was lost).

@jratike80
Copy link
Collaborator

If the price of one beer is 8.2€ but you have only 8, would you ask the bartender
"Is it OK if the conversion to int looses precision for the price parameter"?

How about "Warning: The value of the -ts parameter gets truncated into [lower] integer"?

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 70.055% (-0.008%) from 70.063%
when pulling 5be98e8 on elpaso:bugfix-gh_11829-gdal_rasterize-be-good-accept-double
into 6332083 on OSGeo:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug funded through GSP Work funded through the GDAL Sponsorship Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gdal_rasterize -ts does not accept double anymore
4 participants