First draft. Works as long as the coordinates are in a correct sequence
in the source KML file, but still have some bugs with complicated shapes
from multiple coordinate lists which are not in the order.