Added optimized in-polygon detection to boundary class and boundary class test cases