title: Why is Google Earth changing KML polygon coordinates?
body: <p>My goal is to be able to draw a shaded polygon over a defined area in google earth using a KML file. I have created a KML document with one placemark and a polygon with the desired coordinates and am able to import the file into Google My maps and display the polygon. However, when I open the same file with google earth the coordinates seem to be parsed differently and the polygon is not correct ( see image). Is there something I have missed in my KML file that is causing google earth to do this? </p>
  
  <p>These are the original file coordinates.</p>
  
  <pre><code>&lt;coordinates&gt;
      149.02126, -36.489864, 100
      149.3816, -36.31477, 100
      149.25783, -36.134285, 100
      148.9647, -36.4074, 100
      149.02126, -36.489864, 100
  &lt;/coordinates&gt;
  </code></pre>
  
  <p>If I copy the polygon from google earth and paste it to a text file as KML I get the following coordinates</p>
  
  <pre><code>&lt;coordinates&gt;
      149.02126,-36.489864,100 
      149.3816,0,0 
      -36.31477,100,0 
      149.25783,-36.134285,100 
      148.9647,-36.4074,100 
      149.02126,-36.489864,100 
  &lt;/coordinates&gt;
  </code></pre>
  
  <p>Complete Original KML File:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;kml xmlns="http://www.opengis.net/kml/2.2"&gt;
     &lt;Document&gt;
        &lt;Style id="examplePolyStyle"&gt;
           &lt;PolyStyle&gt;
              &lt;color&gt;7f0000ff&lt;/color&gt;
              &lt;colorMode&gt;random&lt;/colorMode&gt;
              &lt;fill&gt;1&lt;/fill&gt;
              &lt;outline&gt;1&lt;/outline&gt;
           &lt;/PolyStyle&gt;
        &lt;/Style&gt;
        &lt;Placemark&gt;
           &lt;name&gt;ID: AU201502070705001Issued: 2015-02-07T07:53:00.000Z&lt;/name&gt;
           &lt;description&gt;Begins: 2015-02-07T07:53:00.000ZEnds: 2015-02-07T08:38:00.000Z&lt;/description&gt;
           &lt;styleUrl&gt;#examplePolyStyle&lt;/styleUrl&gt;
           &lt;Polygon&gt;
              &lt;outerBoundaryIs&gt;
                 &lt;LinearRing&gt;
                    &lt;coordinates&gt;149.02126, -36.489864, 100 149.3816, -36.31477, 100 149.25783, -36.134285, 100 148.9647, -36.4074, 100 149.02126, -36.489864, 100&lt;/coordinates&gt;
                 &lt;/LinearRing&gt;
              &lt;/outerBoundaryIs&gt;
           &lt;/Polygon&gt;
        &lt;/Placemark&gt;
     &lt;/Document&gt;
  &lt;/kml&gt;    
  </code></pre>
  
  <p>Complete KML file copied from Google Earth</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"&gt;
  &lt;Document&gt;
      &lt;name&gt;Latest_Single_noCommaNoSpaces.kml&lt;/name&gt;
      &lt;Style id="examplePolyStyle"&gt;
          &lt;PolyStyle&gt;
              &lt;color&gt;7f0000ff&lt;/color&gt;
              &lt;colorMode&gt;random&lt;/colorMode&gt;
          &lt;/PolyStyle&gt;
      &lt;/Style&gt;
      &lt;Placemark&gt;
          &lt;name&gt;ID: AU201502070705001Issued: 2015-02-07T07:53:00.000Z&lt;/name&gt;
          &lt;description&gt;Begins: 2015-02-07T07:53:00.000ZEnds: 2015-02-07T08:38:00.000Z&lt;/description&gt;
          &lt;styleUrl&gt;#examplePolyStyle&lt;/styleUrl&gt;
          &lt;gx:balloonVisibility&gt;1&lt;/gx:balloonVisibility&gt;
          &lt;Polygon&gt;
              &lt;outerBoundaryIs&gt;
                  &lt;LinearRing&gt;
  &lt;coordinates&gt;
      149.02126,-36.489864,100 
      149.3816,0,0 
      -36.31477,100,0 
      149.25783,-36.134285,100 
      148.9647,-36.4074,100 
      149.02126,-36.489864,100 
  &lt;/coordinates&gt;
                  &lt;/LinearRing&gt;
              &lt;/outerBoundaryIs&gt;
          &lt;/Polygon&gt;
      &lt;/Placemark&gt;
  &lt;/Document&gt;
  &lt;/kml&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/c0Uff.jpg" alt="Screenshot of polygon in Google Maps"></p>
  
  <p><img src="https://i.stack.imgur.com/cjvE1.jpg" alt="Screenshot of same polygon in Google Earth"></p>