perimeter function

compute perimeter from polygons or other geometries