Bug report: KML import for dive sites

Problems ? Get help here!
Post Reply
xan
Posts: 1
Joined: Tue Feb 27, 2024 8:11 am
Dive Computer: Shearwater Perdix AI

Bug report: KML import for dive sites

Post by xan »

Hi there, I was trying to import the Curaçao dive site map:
  1. select "Download KML" from the three-dot menu
  2. from the dropdown, pick the "Curacao Scuba Diving & Snorkeling Guide" layer
  3. check the "export as KML" option

Trying to import the resulting file into MacDive macOS 2.16.2 by dragging it on the app, only a small number of sites had coordinates set correctly, and only ever the latitude. Thanks to another forum member's post, I was able to eventually get the data "rinsed" through Google Earth. The import still lacked Country/Location information, though that information seems to be missing from the KML file itself, and is not part of this bug report.

In looking at a diff between the two KML files (the one from Maps, and the one from Earth) the main difference I see is that in Earth (and MacDive's own KML exports), the <coordinates> XML element is a single line, but Maps outputs this as:

Code: Select all

<coordinates>
  64.255236,-21.116935,0
</coordinates>
Both are valid/equivalent in terms of XML/KML, but it seems MacDive's parser expects one line only.


Here's a minimal test/reproduction KML file that will show the issue: the Silfra-MultiLine site will only have a latitude assigned:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>MacDive Minimal</name>
    <Folder>
      <name>Silfra IS</name>
      <Placemark>
        <name>Silfra-MultiLine</name>
        <description>multiline</description>
        <Point>
          <coordinates>
            64.255236,-21.116935,0
          </coordinates>
        </Point>
      </Placemark>
      <Placemark>
        <name>Silfra-SingleLine</name>
        <description>single line</description>
        <Point>
          <coordinates>64.255236,-21.116935,0</coordinates>
        </Point>
      </Placemark>
    </Folder>
  </Document>
</kml>
Hope this helps with a fix, let me know if I can offer up any additional information. Thanks!
Post Reply