Used JTS Densifier and BBOX check instead of custom logic