Sort and/or renumber KML
NEW: The resulting KML from this app can now be imported/converted into a PurplePen file for more detailed course setting etc -
See the 'Course file to PPEN' app.
Instruction:
This utility is focussed on cleaning up KML files obtained through the GPXtoKML utility, but is not limited to this scenario.
It is not designed to fully diagnose issues or fully clean up KML so please make sure you validate the file before using it with MapRun.
Note that running this will,
regardless of settings, clean out any extra tags such as style, colour etc. The resulting file will be a simplified basic KML for MapRun.
This tool is offered as is with no guarantees so use at your own risk.
The ' Sort ' radio buttons allow the following options:
- Do not sort. This will NOT try to find possible Start or Finish controls
- Sort only the S1 and/or F1 to the start and end of the file (as required by MapRun).
This WILL attempt to aggressively set codes like f,F,f1,STA,s,FIN to the correct format (SX1,F1) so check the results carefully.
NOTE 1: Be careful
using the sort function on an ALL KML file as it will overwrite any multiple Starts or Finishes.
However, this is well suited to handling this situation for the individual KML course files when converted from an IOFXML file that does contain multiple
starts or finish controls such as S1,S2,STA3.
- Sort all controls based on the alphanumeric value. This will move the S1 and F1 to the start and end.
The ' Description ' radio buttons allow the following options:
- Keep any Description tags with the Control Codes if present (and add the empty tag to controls that do not have one). These do not impact MapRun and can be left if desired.
- Remove all Description tags
The ' Course Name ' radio buttons allow the following options:
- Keep the current KML internal name (this will show when the KML is opened in Google Earth).
- Change the name tag to something else. Default is Course1.
The ' Renumber ' radio buttons allow the following options:
- Do not renumber the contols
- Renumber all controls (less S1 and F1) starting from 1.
- Renumber all controls (less S1 and F1) starting from 31.
Note Again: Make sure you triple check your final KML before using it.
Status Report Example:
- Input file: TestFile.kml
- Placemarks Found: 10
- Original Controls: 31b,112,s,31a,F1,32,34,33,36,35
- Parameters: Only Sort S1 F1, Remove Description Tags, NOT Renumbered
- After Sort Controls: S1,31b,112,31a,32,34,33,36,35,F1
- Final Controls: S1,31b,112,31a,32,34,33,36,35,F1
- Output file: TestFile_Converted.kml
- Warnings:
- 2 code(s) includes characters. Sort order and MapRun may fail.