-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
r.mapcalc: add data types info to manual #3579
r.mapcalc: add data types info to manual #3579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since r.mapcalc has functions to convert data into int, float and double, I agree this is a good place to add such details. I still wonder however if such details should also be in the rasterintro manual instead of the wiki.
Suggestions by @veroandreo Co-authored-by: Veronica Andreo <[email protected]>
I do agree that it should be added there, too. The wiki information is a well-hidden gem. Do you think we should open a new PR for that one for clarity and cleanness or shall we just stick it to this one (and rename it then)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to provide better explanation where these values come from. I didn't had time to go over all code, but for me it seems that these numbers are incorrect.
Raster types are defined in gis.h file lines 625–257 as int, float and double. Thus int is a standard C int, that shall be at least -32767 +32767 (see Annex E of ISO/IEC 9899:2017). Ditto for floats and doubles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is a tricky one. The Wikipaedia lists the following lengths for these data types:
- int: minimum 16-bit
- float: unspecified
- double: unspecified
The question then is: can GRASS compile on systems where these types have different meanings from those stated? When I started playing with computers most architectures where 16-bit, and by then GRASS was already old. If this is the case, then some reference must be added like "on most systems", or "on 32-bit and 64-bit architectures".
Another thing: would also be important to describe the change in data type length on the int()
function itself.
Hat tip @marisn
Yes it can. |
No description provided.