added side='midpoint' feature for getNearestFeature()