extract polygon working