<div> </div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);">Dear all,</div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"> </div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);">I have a kml file with a huge set of lines, which actually depict a grid of many rectangles. I want to unite these lines into polygons (i.e., each rectangle must be a separate spatial polygon), but I failed to find a function which does it directly.</div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"> </div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);">I found several solutions on how to convert to polygons a set of isolated closed lines. But with my file, these methods can produce nothing more than a set of "polygons" with only one line each. The only way I can imagine is to convert these lines into a raster and then polygonize it, but this method probably would lack accuracy.</div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);">If anyone knows how to deal with such tasks, please help me. Thank you in advance!</div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"><u style="text-decoration:underline;">                                                                                  </u></div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"><strong>Best regards,</strong></div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"><strong>Anton A. Morkovin</strong></div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"> </div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"><span style="font-size:12px;">Zoological Museum of M.V. Lomonosov Moscow State University</span></div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"><span style="font-size:12px;">Russia, 125009 Moscow, Bolshaya Nikitskaya Str. 2.</span></div><div style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-transform:none;white-space:normal;background-color:rgb(255,255,255);"><ul><li><em style="font-size:x-small;">Personal page:</em><span style="font-size:x-small;"> </span><a target="_blank" style="color:rgb(153,0,153);font-size:x-small;" href="http://istina.msu.ru/profile/Anton_Morkovin/">http://istina.msu.ru/profile/Anton_Morkovin/</a></li><li><em style="font-size:x-small;"><a target="_blank" style="color:rgb(153,0,153);" href="https://www.zotero.org/groups/birds_of_russia/items">Bibliography of scientific works</a></em><span style="font-size:x-small;"> on birds of Russia</span></li><li><a target="_blank" style="color:rgb(153,0,153);font-size:x-small;" href="http://eng.birdsmoscow.net.ru/">The Birdwatchers union "Birds of Moscow and the Moscow region"</a><span style="font-size:x-small;"> || </span><a target="_blank" style="color:rgb(153,0,153);font-size:x-small;" href="https://www.facebook.com/birdsmoscow/"><em>Facebook</em></a><span style="font-size:x-small;"> || </span><a target="_blank" style="color:rgb(153,0,153);font-size:x-small;" href="https://www.vk.com/birdsmoscow/"><em>VK</em></a><span style="font-size:x-small;"> || </span><a target="_blank" style="color:rgb(153,0,153);font-size:x-small;" href="https://twitter.com/moscow_birds"><em>Twitter</em></a></li></ul></div><div> </div><div> </div>