Get Polygon information directly from Google Earth

  1. Right click on the polygon area–Copy

Screen Shot 2017-11-10 at 4.25.23 PM

2. Open an editor–Paste

(I am using Textwrangler)

 <?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<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">
<Document>
<name>KmlFile</name>
<Style id="116">
<LineStyle> <color>ffff00ff</color> <width>5</width> </LineStyle>
<PolyStyle> <color>8c26fd24</color> <colorMode>random</colorMode> </PolyStyle> </Style> <Style id="18"> <LineStyle>
<color>ffff00ff</color>
<width>5</width>
</LineStyle>
<PolyStyle> <color>8c26fd24</color> <colorMode>random</colorMode>
</PolyStyle>
</Style>
<StyleMap id="144">
<Pair> <key>normal</key> <styleUrl>#18</styleUrl> </Pair>
<Pair> <key>highlight</key>
<styleUrl>#116</styleUrl>
</Pair>
</StyleMap>
<Placemark> <name>保温瓶公司社区居委会</name>
<styleUrl>#144</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<outerBoundaryIs> <LinearRing>
<coordinates>
115.928610985373,40.13185394005462,0
115.9647375289388,40.08127869041853,0
116.0352155889859,40.08701188367191,0
116.0621807077155,40.11734802900593,0
116.1398095523518,40.14078271456965,0
116.1869392364515,40.15192617142016,0
116.2388057890629,40.13075735361625,0
116.2934385972375,40.06936154137676,0
116.3915015994834,40.03708512054956,0
116.4553123485148,40.08678434002908,0
116.6044627080764,40.0319692972004,0
116.7877028482566,40.03067364812757,0
117.0053898341364,40.03820632814646,0
117.0688314154845,40.06540963049715,0
117.1498459903058,40.06424352865166,0
117.3743569564382,40.17365953822348,0
117.3764111711714,40.22393538151257,0
117.209598612376,40.38115442571983,0
117.0153887252159,40.33257457154627,0
116.997153312723,40.29639330598833,0
116.9269306977894,40.23009399794454,0
116.83980406151,40.28829796607024,0
116.7394631575083,40.28021590744405,0
116.6606575915193,40.23383959133992,0
116.6535861394453,40.26181953346727,0
116.6187170875896,40.25733776738804,0
116.5450977623824,40.27705019265526,0
116.4883200891367,40.2450971673258,0
116.3624524802065,40.25203870927795,0
116.3532904740126,40.23923279998057,0
116.3134147099754,40.23301800022436,0
116.2646478516512,40.24795249255924,0
116.2455044523085,40.23182091788395,0
116.2270774513608,40.23796268819876,0
116.1980794170168,40.22426193193461,0
116.1556919994141,40.23003810990576,0
115.928610985373,40.13185394005462,0
</coordinates> </LinearRing> </outerBoundaryIs>
</Polygon> </Placemark></Document></kml> <code>

 

Published by

Yijiao Liu

Applied Economist, Ph.D. candidate at Economics Department, Stony Brook

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s