Global Mapper v24.0

Scientific notation on numeric attributes - float export format

Is there are way to disable the "e+00" notation on decimal values when exporting data? I don't understand why the software can't just export a decimal value as-is.. I have to manually modify every attribute format or change it to a string field.

This seems like the dumbest "feature" that still persists in the software after 23 versions.. I just want decimal values to stay the same when I convert data.

Thanks.


Best Answer

Answers

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    It's not Global Mapper that's formatting the values that way, they are actually stored in whatever data you are loading in scientific notation. Global Mapper is just showing whatever string is stored in the data file unless you explicitly force different formatting.

    Typically software creating Shapefiles does this a lot in the DBF file containing the attributes. They will store every number in the DBF as a string in scientific notation (like '2.34e+02') rather than just storing the string '234'. Global Mapper just reads the value as-is assuming whoever wrote the file had things formatted how they wanted.

    If you assign an attribute as a label attribute (see Label tab of Options dialog for layer), number are formatted by default in a way that makes sense for most cases. There are options to control whether you want that formatting to take place and, if so, how many decimal places to use or if you want to use scientific notation yourself (disabled by default). This is just for a label display (often from attributes) though and not for displaying the raw attributes values themselves.

    Thanks,

    Mike

    Global Mapper Guru

  • If I import that this shapefile into ArcMap the attribute value reads "671.285505472"

    If I import that this shapefile into Civil3d the attribute value reads "671.285" (units setting)

    If I import that this shapefile into QGIS the attribute value reads "671.285505472"

    But you're telling me Global Mapper is reading the value "as is"?

    Really?

    😁

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    If you look at the DBF file in a hex editor you can likely find the exact text string that Global Mapper is showing. The other software must be auto-formatting the value (hence the different value in Civil3D vs the others). DBF files store every attribute value as a string with a type indicator specifying if the field should be interpreted as a String, Integer, or Float.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    I went to create a todo item to allow users to automatically reformat scientific notation attribute values and found that it already exists!

    If you open the Configuration dialog and go to General | Vector Formats tab, under Shapefile/DBF, then check the "Reformat Numeric Attribute Values Using Scientific Notation" option, the scientific notation values should be automatically reformatted to remove the scientific notation.

Sign In or Register to comment.