views:

90

answers:

2

Hi,

I use polygones in kml files for displaying a rocket's flightpath from ground into orbit in google earth kml files.

the problem is, that google earth can't handle longitued greater than 180deg, so when a rocket will circle more than ones around the globe the longitued values has to be recalculated. Is there a way in using longitudes like 720deg and google can translate this by itself? I would prefer this, because I don'thave to change my programme and you can directly see the revolutions of the rocket around earth by its coordinates.

thank you in advance, Andreas

+2  A: 

The KML definition indeed only allows arguments

  • between -180 and 180 for longitude
  • between -90 and 90 for latitude

see KML Reference - element "coordinates"

So I am afraid you will need to normalize your lon by introducing an angle function.

MikeD
hi,okay, it's their specification, but it's strange to have this limitation on a globe.never the less, thank you! :) (+1)
Andreas Hornig
I wonder if you came up with a transformation of longitudes outside [-180,180]. Somehow tricky ... I played around with it a bit and created this one (Excel - argument is in B3 - no angle funcs needed) ... =IF(MOD(INT(B3/180);2)=0;MOD(B3;180);MOD(B3;360)-360)
MikeD
+1  A: 

As mentioned by MikeD you will need to normalize to fit in the specs. Here is a site from Chris Veness with spherical formulas for doing lots of calculations that otherwise boggle the mind.

Adam