Import Controls/Courses from KML, GPX or IOFXML V3/V2.0.2 files into PurplePen

This is a Beta (26 Jan 2024). Added more flexibility on what Special-Objects to keep when using a PPEN template.
Use at your own risk (although not much can go wrong other than it doesn't work)!

Known issues: I have some issues with dealing with special characters (such as ampersands in course names) but I think I have it fixed. If you run into an issue either reported through this interface or when you try to open a resulting PPEN file, please let me know. In most cases it can be patched by editing either to control list file or the resulting PPEN file using a good text editor (remove/replace special characters).

Depending on the scale of the underlying map and the (unknown to the app) scale of the course, you may see some courses have very large or small circles etc. Just go to the Course properties menu and select the correct scale for the course.

Select KML, IOFXML (V3 or 2.03), GPX Controls File:



Options With IOFXML V3 and V2.0.3 files

Use embedded Map X,Y
Convert LonLat to X,Y (V3 only)  





Import 'All Controls; and Courses 
Do NOT import Courses  





Optional PPEN Template


Special-Objects in Template PPEN. Import/keep ...

Marked for All Courses or only the All Controls 'course' 
Marked for All Courses Only
Marked for All and any individual Courses 
None 
All (may cause issues) 













Note: KML output from the other apps (that produce KMLs) can be used with this app to produce a draft PPEN file!

If you are using this app I'd love some feedback on how it works, issues, requests etc. contact email is on the main index page. Thanks!

Instructions:

Select the file that contains the list of controls (KML, IOFXML V3 or 2.03, GPX file such as from PPEN). If using an IOFXML V3 or V2.0.3 file, generally leave the default 'Use Embedded X,Y' as Use (note that this is the forced setting for IOF/XML V2.03 files as they may use UTM coordinates and I have not played with handling these).
Select Course options - whether or not to also import any courses contained in the XML. Applicable only to IOFXML files. In general the app should be able to tell if it is a Pt to Pt or Score course and set it accordingly. if it is incorrect, just edit the course type in PPEN.

Optional - select a current PPEN file as a template (the original WILL NOT be overwritten). This uses this selected PPEN file as a template and imports the Controls (and courses if applicable), stripping out the original controls and courses but retaining the Event Map selection and any special items (depending on option selected). Note - this DOES NOT overwrite the original!

PPEN Special-Objects are added items such as text, images, out-of-bound areas etc. Within PPEN these can be applied against all courses (including the 'All Controls' window), only the 'All Controls' window, or specific individual courses. Normally the default will be fine but if a PPEN event had a large number of Special-Objects issues to specific courses, it could be messy importing them all, especially as the final courses may be different than the original template contained.

Special-Objects Options:
Hit 'Upload and Prepare' and wait for the 'Download' page to appear. This will show the basic settings, display the list of controls and show the Download Button.
Select Download to download the new PPEN file. The file name for the download will be the same as the original file name you uploaded with '_Temp.ppen' added. This should open in PPEN as per normal. The new controls will be shown in the PPEN window ready to be aligned to the map using the new PPEN built in function.

If you did not use a template, add a map file (image, OCAD etc) as per normal. Default location of the controls within the window will place the first control in the list at 0,0 (bottom left of the map coordinates). be offset a bit from the map image - if so scroll out a bit.

Use Move/Scale/Rotate function if needed (under the Event menu) to adjust the controls to the corresponding map correctly. Likely you will need to use the Move/scale option (which needs you to know the location of two controls) although I generally just select to do all three (still need two controls). In some cases, if you use the same map file (OOM, OCAD) as the original controls came from (using a IOFXML file), the controls will end up properly placed!
If you don't have a separate map of control locations to assist with the re-alignment, one trick is to use the 'Convert IOFXML to KML' app on the main page. This will produce a KML that can be loaded into Google Earth that can be used to select two easily located controls.

Backgound:

With the latest Purple Pen 3.5.0 Course setting application (PP), there is a function, allowing you to Move, Scale and Rotate all the controls. This app will import a set of controls from a KML, IOFXML or GPX file and use the contained Map coordinates (lon, lat or mapY, MapY) to build a starting PPEN file where the imported controls are correctly spaced and can easily be moved, scaled and/or rotated to fit a underlying map file. Examples:

Limitations:

The app will read a list of controls from a number 0f formats and file types that are commonly used for control lists, but I cannot test for everything.

This tool is offered as is with no guarantees so use at your own risk.