Importing KML files
kartoone76
Global Mapper UserTrusted User
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>
<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
-
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 -
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.
-
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 -
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".
Categories
- 12.9K All Categories
- 5.8K Features Discussion
- 349 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 651 GM Script Language
- 55 User Scripts
- 115 GPS Features
- 420 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 181 Announcement and News
- 936 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 578 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 109 Global Mapper Forum Website
