Global Mapper Pro

SHP to KML number fields

MrKyle
MrKyle Global Mapper User
edited April 2012 in Vector Data
Hello.

I create many SHP files from Excel spreadsheets, using linear referencing based on the County, Route and Post Mile, and use GM to convert those SHP to KML.

I use the "Custom HTML Text" option in the KML/KMZ Export Options.

A weird thing happens in the description bubble for number fields.
It doesn't display the text as is, but rather gives a long scientific notation value for the text.

For example, the following County / Route / Beginning Post Mile / Ending Post Mile

ALA / 24 / 5.4 / 5.5

displays in the KML info bubble like this

ALA / 2.40000000000e+001 / 5.40000000000e+000 /5.50000000000e+000

Is there a way to display the contents of the number fields as is without this occurring?
The linear referencing requires the Post Mile values to be numbers, so it is tedious to always create new text fields for these number values just they display correctly in the info bubble.

Thanks.

Comments

  • global_mapper
    global_mapper Administrator
    edited April 2012
    The issue is that the DBF file that comes with the SHP actually stores the number field text as the long scientific notation string that you are seeing. Global Mapper just shows exactly what is in the DBF file with no formatting applied. While there isn't currently a way to override how the text is actually stored in the DBF file with some other formatting applied, what you can do is right-click on the SHP layer in the Control Center and try doing a CALC ATTR operation and put it in the same field (or a new one if that is easier) and either multiply by 1.0 or add 0.0. This should result in the same value but apply some default numeric formatting to the resulting value rather than using the very verbose representation from the DBF file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • MrKyle
    MrKyle Global Mapper User
    edited April 2012
    Thank you for the quick response. I tried to find the command you mentioned, but didn't see it.
    When I right-click the SHP in the Control Center, I only see these options (attached). I am using Global Mapper v11.
    Thanks.
    2012-04-26_085918.jpg
  • global_mapper
    global_mapper Administrator
    edited April 2012
    That option wasn't added until v13, so you would have to upgrade in order to have that functionality available.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
Sign In or Register to comment.