[GRASS-user] Integer division with r.mapcalc
Luís Moreira de Sousa
luis.de.sousa at protonmail.ch
Thu Apr 11 00:25:43 PDT 2024
Dear all,
I am working with a raster with very large integers. That are stored as 64 bit floats (imported from a GTiff). I wish to extract part of these values with an integer division. The first approach was:
r.mapcalc 'short_ints = int(long_ints)/1000000'
However, this results in something that is not an integer division. In fact I have no idea what the result is. Eventually, I succeeded with the following formulation:
r.mapcalc 'psu_ids = int(ssu_ids/1000000)'
I have been going through the manual back and forth and can't understand why these two expressions produce different results. Any insights?
Thank you.
--
Luís
Sent with [Proton Mail](https://proton.me/) secure email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20240411/05600f90/attachment.htm>
More information about the grass-user
mailing list