I want to trace administrative borders as a layer in Google Earth. The problem is that although I know how to draw and save a polygon,I don't know how to draw contiguous shapes using the polygon tool. Whenever I add points after having finished one polygon, it just draws lines through the finished shape.

Are there any tutorials out there I can follow?


goto: http://www.gadm.org/country Select Malaysia and download a) as kmz-files : two files level1 and level2 , level2 unfortunately gave me an error when loading in Google Earth b) as a shapefile. load into qgis and save the different levels as kml files(rightclick in left panel on layer-name and save as) this works well for me in Google Earth

  • It's because QGIS does not like the '&' in the name field. Replace that with & and it will open fine. – sean May 10 '14 at 17:45

It sounds like you want to maintain topology in your tracing. Unfortunately, Google Earth does not allow you to constrain geometry like that. I'm not sure about the Enterprise version of Google Earth though - it's probably too expensive anyway.

It is possible that the administrative boundaries you are tracing are already available for download. Many governments allow you to download shapefiles of the administrative boundaries. I live in Australia, and I can freely download all boundaries from Country level all the way down to Suburbs and Post Codes. Often, it is the free sources which populate the Google Earth datasets.

What areas are you trying to trace?

  • I'm tracing mukim boundaries in Malaysia (something like a county boundary). Digital shape files exist but are only available for purchase from the state mapping agency. However, they will let me have coordinates for free, so I'm trying to draw the boundaries with the coordinates as a guide. – Christian M. Jul 10 '12 at 6:07
  • 2
    In what kind of format are your coordinates: csv,....? – Kurt Jul 10 '12 at 6:23

i dont know whether it works for u or not but i have a little bit hard way.

1.Enter this site and draw sth as following with polygon drawing.


2.Then open your firebug on firefox and write this code to console.

var feat = map.layers[1].features;
var format =  new OpenLayers.Format.KML({
     maxDepth: 1,   
     extractStyles: true,
     extractAttributes: true,
     'internalProjection': map.projection,
     'externalProjection': map.projection


3.Run the entered command and get your kml content file. and dont forget the remove "" quotes from your code...(the head and the final quotes) and save it in a file then name it with .kml extension. I have also added red style to my kml...

<kml xmlns="http://earth.google.com/kml/2.0">
<Folder><name>OpenLayers export</name>
  <description>Exported on Tue Jul 10 2012 09:12:36 GMT+0300 (GTB Yaz Saati)</description>
  <description>No description available</description>
<coordinates>11.591796875,48.76708984375 5.8349609375,43.88916015625 10.185546875,36.37451171875 18.0078125,35.89111328125 20.7763671875,39.93408203125 23.720703125,44.98779296875 22.314453125,47.71240234375 22.2265625,47.75634765625 11.591796875,48.76708984375</coordinates>

4.The last thing is that double click your kml file.. That's all.


i hope it helps you...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.