• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Google Earth Blog

The amazing things about Google Earth

  • Home
  • About
  • Basics
  • Links
  • Tips
  • 3D Models
  • Sightseeing
  • Videos

Crossing the antimeridian Google Earth

August 27, 2015

When creating the heatmap for yesterdays post we discovered some things that we think are worth sharing.

Every point on Earth’s surface can be located with a latitude and longitude. In decimal format these range from -90° to 90° latitude and -180° to 180° longitude. We needed to draw a polygon that goes across the antimeridian (the line at -180° / 180° longitude). We did think ahead and included in our code appropriate conversion to ensure that the coordinates stayed within the correct range. We were surprised to discover that Google Earth drew the polygons wrapped all the way around the globe.


Left: What we wanted. Right: What we got.

After some experimentation in Google Earth, saving what we drew to KML and inspecting the contents we found that Google Earth does handle coordinates less than -180° or greater than 180° longitude. If you want your rectangle to go over the antimeridian rather than all the way around the world, then simply keep the longitudes all positive or all negative and use numbers larger than 180 for some of the points. So, if for example, your rectangle goes from 170° to 190°, then Google Earth will draw it across the antimeridian.

We also found that if you draw a large filled polygon that does wrap around the globe, it is not allowed to cross all lines of longitude.


Achieving this effect with a single filled polygon is not possible. The above screen shot is actually two separate polygons.

It is also impossible to draw a filled polygon that includes the North Pole in its enclosed area. This is actually a direct consequence of how Google Earth draws ‘straight lines’, which we previously discussed in this post. As we noted in that post, unfilled polygons behave quite differently and can wrap around the globe as well as encircle the North Pole. They, however, have a different restriction: the line between any two points always takes the shortest section of a great circle, so to wrap around the globe you need at least one point on the far side of the globe.


The rules for unfilled polygons are different.


There is a ridge in the ocean floor data along the antimeridian.

About Timothy Whitehead

Timothy has been using Google Earth since 2004 when it was still called Keyhole before it was renamed Google Earth in 2005 and has been a huge fan ever since. He is a programmer working for Red Wing Aerobatx and lives in Cape Town, South Africa.

  • More Posts(754)

Filed Under: Site News Tagged With: antimeridian, KML






PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.



PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.

Primary Sidebar

RSS
Follow by Email
Facebook
Twitter




Categories

  • 3D Models (792)
  • Applications (708)
  • Business (288)
  • Environment (353)
  • Flying (208)
  • GE Plugin (282)
  • Google Earth News (1,764)
  • Google Earth Tips (592)
  • GPS (136)
  • Navigation (227)
  • Network Links (214)
  • Sailing (121)
  • Science (499)
  • Sightseeing (1,903)
  • Site News (587)
  • Sky (67)
  • Sports (154)
  • Street View (50)
  • Tours (117)
  • Video (421)
  • Weather (180)

Get new posts by email

Get new posts by email:

Google Earth Satellites

Copyright 2005-© 2023 Frank Taylor. All Rights Reserved.

This blog and its author are not an official source of information from Google that produces and owns Google Earth Google and Google Earth are trademarks of Google Inc.. All image screenshots from Google Earth are Copyright Google. All other trademarks appearing here are the trademarks of their respective owners.

Go to mobile version