Skip to content

Wrong format of sub-catchment ID number in function extract_ids #106

@JaimeRi

Description

@JaimeRi

Some sub-catchment ids look like this: 509000000

When the user wants to generate all the subcatchment ids of an area, the function uses the terra package terra::unique(). Using the default settings in R, the output transform the id to 5.09e+08. If not corrected, and then using this list of IDs for other function, for example get_predict_table(), that particular ID is not recognized and the information of that sub-catchment is lost

using this additional line:
printf "%.0f\n" $(cat subc_ids.txt) > subc_ids_corr.txt
will solve the issue.

but maybe configuring the R settings can also help.
I think is something related to scipen, for example:
options("scipen"=100, "digits"=4)

but we need to test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions