polygon extraction