Add STPerimeter function to PostgreSql