Length of the Estonian coastline

est=SortBy[CountryData["Estonia","Shape"][[1,3,1]],Length];

Manipulate[
Module[{esti,le},
esti=Part[Last[est],Range[1,Length[Last[est]],46-i]];
le=6028/0.972713 Total[Map[Norm[First[#]-Last[#]]&,Partition[esti,2,1,1]]];
Show[Graphics[MapIndexed[{ColorData[7,#2[[1]]],Polygon[#1]}&,est],ImageSize->{620,450}],Graphics[{Thick,Line[esti],Text[Style["Resulting length = "<>ToString[Round[le]]<>" km",Bold,19],{-0.008,0.014}]}]]],
{{i,1,"refine step"},1,45,1,ImageSize->Large,Appearance->"Labeled"},
SynchronousUpdating->False, SaveDefinitions-> True]

Creation of this notebook was supported by IT Academy program of Information Technology Foundation for Education (HITSA).