fit to polygon bounds