Global Mapper v25.0

Importing KML files

kartoone76
kartoone76 Global Mapper UserTrusted User
edited May 2009 in Vector Data
Is there a way to specify what symbol to use for each of the point features in a KML file? For example, consider this snippet of a KML file ... I'd like for the "point" Placemarks to use the corresponding custom defined point types when loaded instead of the default "dot" corresponding to "Unknown Point Feature". I believe when importing a GPX file, Global Mapper will automatically look for a point type with the same name as the point being imported. That does not appear to work when importing KML files. Please help. Thanks!

<Placemark>
<name>Mile 1</name>
<Point>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>-86.77388634143101,33.41526685264218</coordinates>
</Point>
</Placemark>

<Placemark>
<name>Mile 2</name>
<Point>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>-86.77691196027678,33.42451341884285</coordinates>
</Point>
</Placemark>

<Placemark>
<name>Mile 3</name>
<Point>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>-86.78160874964398,33.42492234102962</coordinates>
</Point>
</Placemark>

<Placemark>
<name>Mile 4</name>
<Point>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>-86.78329987197726,33.434611351352046</coordinates>
</Point>
</Placemark>

Comments

  • global_mapper
    global_mapper Administrator
    edited May 2009
    There is not currently any way to have types automatically assigned when loading KML files into Global Mapper. What would the types be assigned on from a KML file? It looks like you are wanting to assign based on the display label in the <name> entity?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • kartoone76
    kartoone76 Global Mapper User Trusted User
    edited May 2009
    Yes - that would be one way to do it ... based on the <name> entity which would work perfectly for me. Another more complex way would be to implement the KML <icon> entity which allows you to specify a URL to use to retrieve the icon... but if there was a way to add support for symbol lookup via the <name> entity, I would be happy with that.
  • global_mapper
    global_mapper Administrator
    edited May 2009
    I have updated the KML importer to do type assignment based on the feature name if type assignment based on folder name (which was already being done), didn't result in a match. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the change for you to try. Simply download that file and extract the contents into your existing v10.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • kartoone76
    kartoone76 Global Mapper User Trusted User
    edited May 2009
    Worked perfectly ... incidentally I imported 400 custom symbols mapped to new Point Styles (Mile 1, Mile 2, ... Mile 200, RMile 1, RMile 2, ...) in two different colors. Global Mapper picks up each point and correctly maps it to the right custom symbol. I was concerned that having that many custom styles would be a performance problem, but there wasn't any. Also, as a tip for anyone following this thread and might be working with a lot of custom symbols... it was easier to uncheck the "Display label" by right-clicking and saving the entire list of styles to a text file, then opening the text file in a text editor and changing the appropriate "1" to a "0" as shown below:

    With the "Display label" checked...
    POINT,"Mile 1","1",1,255,"~0~534799372~0.000~0~0"

    With the "Display label" unchecked...
    POINT,"Mile 1","1",0,255,"~0~534799372~0.000~0~0"

    Then finally, reload the list of styles by right-clicking and selecting "load styles from file".