moving polygons

7,463 views
Skip to first unread message

stephane valbourg

unread,
Nov 19, 2010, 12:39:35 PM11/19/10
to google-earth-...@googlegroups.com
Hi,

Is there any piece of software to move polygons?
That would be a very useful feature.

thanx

Brendan Kenny

unread,
Nov 19, 2010, 3:28:54 PM11/19/10
to KML Developer Support - Google Earth Plug-in
Hi Stephane,

Can you give a specific example of what you'd like to do?

Thanks,
Brendan

stephane valbourg

unread,
Nov 19, 2010, 4:15:33 PM11/19/10
to KML Developer Support - Google Earth Plug-in


On Nov 19, 9:28 pm, Brendan Kenny wrote:
> Hi Stephane,
>
> Can you give a specific example of what you'd like to do?


Sure. I would like to shift and rotate a polygon drawn using Google
Earth. For example, after drawing a polygon matching the coastline of
Africa, I would like to move it to fit along the atlantic coast of
south america. This would be a wonderful pedagogic tool to illustrate
plate tectonics.

I can probably do it by extracting the lat/lon data from a KML file,
and calculate new coordinates of the vertices using quaternions, but
that would be very painful compared to drag/rotate with the mouse.

Thanx for any help.

arnott_cs

unread,
Jan 6, 2011, 7:37:14 AM1/6/11
to KML Developer Support - Google Earth Plug-in
I have a similar problem, an ex-colleague has provided me the outline
of the project we are working on as a .kml but i need to show the
scale of the site by overlaying it on other ports around the world.

Can anyone help out with this? FYI im pretty new to GE!!

Cheers

Chris

Josh L

unread,
Jan 6, 2011, 6:14:42 PM1/6/11
to KML Developer Support - Google Earth Plug-in
Hi there,

If you want to play this as an animation in a Tour, then I recommend
using gx:AnimatedUpdate. With this you can simply draw both of your
polygons, and it should smoothly animate from one to the other.

Cheers,

-Josh

stephane valbourg

unread,
Jan 7, 2011, 2:27:38 AM1/7/11
to KML Developer Support - Google Earth Plug-in
On Jan 7, 12:14 am, Josh L wrote:

> If you want to play this as an animation in a Tour, then I recommend
> using gx:AnimatedUpdate.  With this you can simply draw both of your
> polygons, and it should smoothly animate from one to the other.

Hi Josh,

Interesting feature, but one must draw as much polygons as locations.
That is overly complicated compared to simply moving a unique
polygon.
I'm truly surprised that such a basic and essential feature as "moving
polygons" has not been implemented yet!

Josh L

unread,
Jan 7, 2011, 12:38:57 PM1/7/11
to KML Developer Support - Google Earth Plug-in
Hi Stephane,

Ah I misunderstood your question, and assumed you wanted to animate
one shape into another shape (so the coastlines would match exactly,
for example). For just moving polygons, you may be interested in
checking out http://paulrademacher.com/oilspill/ and http://howbigreally.com/
for some inspiration on how various developers have approached this
idea. And please feel free to file a feature request for a generic
"move polygon" function at http://code.google.com/p/earth-api-utility-library/issues/list

Cheers,

-Josh

stephane valbourg

unread,
Jan 7, 2011, 1:29:35 PM1/7/11
to KML Developer Support - Google Earth Plug-in

Thank you the links. In these links, the polygons are apparently
translated, by adding/subtracting the appropriate values to the
coordinate of vertices. It is a bit more complicated for rotation or
combinations of rotation/translation, because quaternions are the only
satisfactory tool to make the calculation of the new coordinates.
And thank you for the tip. I posted a "new feature" request. Crossing
finger!

Jamie Gairns

unread,
Aug 14, 2012, 5:52:16 PM8/14/12
to google-earth-...@googlegroups.com
Hi All,

There appears to be an interest in an interactive tool that would allow you to click on a polygon and move a shape (like moving a placemark or vertex, but in this case the entire shape).
I could use that right now because for some reason a number of the polygons I just digitized are shifted. The shape is correct, but I need to move the shape back into position.
Exporting the data and editing the vertices is the workaround, but an interactive tool would be ideal.

Cheers,

Jamie
Reply all
Reply to author
Forward
0 new messages