summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/geometry
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/geometry')
-rw-r--r--src/boost/libs/geometry/Jamfile21
-rw-r--r--src/boost/libs/geometry/README.md29
-rw-r--r--src/boost/libs/geometry/example/01_point_example.cpp138
-rw-r--r--src/boost/libs/geometry/example/02_linestring_example.cpp232
-rw-r--r--src/boost/libs/geometry/example/03_polygon_example.cpp141
-rw-r--r--src/boost/libs/geometry/example/04_boost_example.cpp94
-rw-r--r--src/boost/libs/geometry/example/05_a_overlay_polygon_example.cpp89
-rw-r--r--src/boost/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp100
-rw-r--r--src/boost/libs/geometry/example/06_a_transformation_example.cpp56
-rw-r--r--src/boost/libs/geometry/example/06_b_transformation_example.cpp167
-rw-r--r--src/boost/libs/geometry/example/07_a_graph_route_example.cpp387
-rw-r--r--src/boost/libs/geometry/example/07_b_graph_route_example.cpp373
-rw-r--r--src/boost/libs/geometry/example/Jamfile38
-rw-r--r--src/boost/libs/geometry/example/c01_custom_point_example.cpp160
-rw-r--r--src/boost/libs/geometry/example/c02_custom_box_example.cpp78
-rw-r--r--src/boost/libs/geometry/example/c03_custom_linestring_example.cpp85
-rw-r--r--src/boost/libs/geometry/example/c04_a_custom_triangle_example.cpp83
-rw-r--r--src/boost/libs/geometry/example/c04_b_custom_triangle_example.cpp72
-rw-r--r--src/boost/libs/geometry/example/c05_custom_point_pointer_example.cpp120
-rw-r--r--src/boost/libs/geometry/example/c06_custom_polygon_example.cpp141
-rw-r--r--src/boost/libs/geometry/example/c07_custom_ring_pointer_example.cpp146
-rw-r--r--src/boost/libs/geometry/example/c08_custom_non_std_example.cpp323
-rw-r--r--src/boost/libs/geometry/example/c09_custom_fusion_example.cpp62
-rw-r--r--src/boost/libs/geometry/example/c10_custom_cs_example.cpp102
-rw-r--r--src/boost/libs/geometry/example/c11_custom_cs_transform_example.cpp132
-rw-r--r--src/boost/libs/geometry/example/data/cities.sql21
-rw-r--r--src/boost/libs/geometry/example/data/cities.wkt10
-rw-r--r--src/boost/libs/geometry/example/data/roads.wkt1331
-rw-r--r--src/boost/libs/geometry/example/data/world.wkt203
-rw-r--r--src/boost/libs/geometry/example/ml01_multipolygon_simplify.cpp67
-rw-r--r--src/boost/libs/geometry/example/ml02_distance_strategy.cpp36
-rw-r--r--src/boost/libs/geometry/example/ml03_distance_formula.cpp37
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt20
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/contrib/shapelib-1.3.0b2/boost_geometry_readme.txt24
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/boost_geometry_readme.txt18
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x01_qt_example.cpp81
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x02_gd_example.cpp144
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp78
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x03_b_soci_example.cpp100
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x03_c_soci_example.cpp118
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp84
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp393
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper_readme.txt23
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp118
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp162
-rw-r--r--src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper_readme.txt23
-rw-r--r--src/boost/libs/geometry/index.html16
-rw-r--r--src/boost/libs/geometry/index/Jamfile18
-rw-r--r--src/boost/libs/geometry/index/example/3d_benchmark.cpp161
-rw-r--r--src/boost/libs/geometry/index/example/Jamfile55
-rw-r--r--src/boost/libs/geometry/index/example/benchmark.cpp158
-rw-r--r--src/boost/libs/geometry/index/example/benchmark2.cpp86
-rw-r--r--src/boost/libs/geometry/index/example/benchmark3.cpp99
-rw-r--r--src/boost/libs/geometry/index/example/benchmark_experimental.cpp482
-rw-r--r--src/boost/libs/geometry/index/example/benchmark_insert.cpp196
-rw-r--r--src/boost/libs/geometry/index/example/glut_vis.cpp1094
-rw-r--r--src/boost/libs/geometry/index/example/random_test.cpp185
-rw-r--r--src/boost/libs/geometry/index/example/serialize.cpp168
-rw-r--r--src/boost/libs/geometry/index/index.html15
-rw-r--r--src/boost/libs/geometry/index/meta/libraries.json26
-rw-r--r--src/boost/libs/geometry/index/test/Jamfile31
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/Jamfile20
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/content.cpp71
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/intersection_content.cpp70
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/is_valid.cpp110
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/margin.cpp66
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/minmaxdist.cpp101
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/path_intersection.cpp133
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/segment_intersection.cpp129
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/test_content.hpp49
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/test_intersection_content.hpp47
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/test_margin.hpp48
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/test_union_content.hpp47
-rw-r--r--src/boost/libs/geometry/index/test/algorithms/union_content.cpp70
-rw-r--r--src/boost/libs/geometry/index/test/geometry_index_test_common.hpp28
-rw-r--r--src/boost/libs/geometry/index/test/movable.hpp92
-rw-r--r--src/boost/libs/geometry/index/test/rtree/Jamfile23
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/Jamfile27
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_lin.cpp20
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_qua.cpp20
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_rst.cpp20
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp209
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp167
-rw-r--r--src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing_node.hpp322
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/Jamfile13
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/Jamfile28
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_add_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_mod_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_que_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_add_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_mod_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_que_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_add_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_mod_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_que_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_add_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_mod_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_que_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_add_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_mod_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_que_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_add_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_mod_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_que_b2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/Jamfile28
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_add_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_mod_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_que_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_add_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_mod_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_que_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_add_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_mod_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_que_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_add_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_mod_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_que_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_add_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_mod_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_que_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_add_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_mod_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_que_b3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/Jamfile28
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_add_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_mod_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_que_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_add_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_mod_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_que_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_add_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_mod_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_que_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_add_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_mod_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_que_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_add_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_mod_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_que_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_add_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_mod_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_que_p2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/Jamfile28
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_add_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_mod_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_que_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_add_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_mod_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_que_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_add_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_mod_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_que_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_add_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_mod_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_que_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_add_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_mod_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_que_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_add_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_mod_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_que_p3d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/Jamfile28
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_add_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_mod_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_que_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_add_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_mod_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_que_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_add_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_mod_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_que_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_add_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_mod_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_que_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_add_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_mod_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_que_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_add_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_mod_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_que_s2d.cpp17
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/Jamfile34
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear.cpp19
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear_dyn.cpp19
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp19
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp19
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp19
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp19
-rw-r--r--src/boost/libs/geometry/index/test/rtree/interprocess/test_interprocess.hpp101
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_contains_point.cpp45
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_epsilon.cpp95
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_insert_remove.cpp82
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_intersects_geom.cpp55
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_move_pack.cpp134
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_non_cartesian.cpp128
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_test_generator.cpp111
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_values.cpp146
-rw-r--r--src/boost/libs/geometry/index/test/rtree/rtree_values_invalid.cpp31
-rw-r--r--src/boost/libs/geometry/index/test/rtree/test_rtree.hpp2024
-rw-r--r--src/boost/libs/geometry/index/test/varray.cpp781
-rw-r--r--src/boost/libs/geometry/index/test/varray_old.cpp490
-rw-r--r--src/boost/libs/geometry/index/test/varray_test.hpp97
-rw-r--r--src/boost/libs/geometry/meta/libraries.json25
-rw-r--r--src/boost/libs/geometry/sublibs2
-rw-r--r--src/boost/libs/geometry/test/Jamfile57
-rw-r--r--src/boost/libs/geometry/test/algorithms/Jamfile85
-rw-r--r--src/boost/libs/geometry/test/algorithms/append.cpp175
-rw-r--r--src/boost/libs/geometry/test/algorithms/area/Jamfile18
-rw-r--r--src/boost/libs/geometry/test/algorithms/area/area.cpp242
-rw-r--r--src/boost/libs/geometry/test/algorithms/area/area_geo.cpp203
-rw-r--r--src/boost/libs/geometry/test/algorithms/area/area_multi.cpp55
-rw-r--r--src/boost/libs/geometry/test/algorithms/area/area_sph_geo.cpp413
-rw-r--r--src/boost/libs/geometry/test/algorithms/area/test_area.hpp81
-rw-r--r--src/boost/libs/geometry/test/algorithms/assign.cpp326
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/Jamfile31
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer.cpp73
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_countries.cpp248
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring.cpp414
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring_aimes.cpp489
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_linestring.cpp226
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_point.cpp224
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_polygon.cpp529
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_point.cpp41
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_point_geo.cpp47
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_polygon.cpp865
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_ring.cpp50
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/buffer_with_strategies.cpp141
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/data/gr.wkt69
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/data/it.wkt22
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/data/nl.wkt8
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/data/no.wkt95
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/data/uk.wkt48
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/test_buffer.hpp550
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/test_buffer_geo.hpp83
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg.hpp480
-rw-r--r--src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg_per_turn.hpp164
-rw-r--r--src/boost/libs/geometry/test/algorithms/centroid.cpp276
-rw-r--r--src/boost/libs/geometry/test/algorithms/centroid_multi.cpp197
-rw-r--r--src/boost/libs/geometry/test/algorithms/check_validity.hpp79
-rw-r--r--src/boost/libs/geometry/test/algorithms/clear_multi.cpp63
-rw-r--r--src/boost/libs/geometry/test/algorithms/comparable_distance.cpp523
-rw-r--r--src/boost/libs/geometry/test/algorithms/convert.cpp338
-rw-r--r--src/boost/libs/geometry/test/algorithms/convert_multi.cpp98
-rw-r--r--src/boost/libs/geometry/test/algorithms/convex_hull.cpp89
-rw-r--r--src/boost/libs/geometry/test/algorithms/convex_hull_multi.cpp91
-rw-r--r--src/boost/libs/geometry/test/algorithms/correct.cpp183
-rw-r--r--src/boost/libs/geometry/test/algorithms/correct_closure.cpp114
-rw-r--r--src/boost/libs/geometry/test/algorithms/correct_multi.cpp60
-rw-r--r--src/boost/libs/geometry/test/algorithms/covered_by/Jamfile23
-rw-r--r--src/boost/libs/geometry/test/algorithms/covered_by/covered_by.cpp197
-rw-r--r--src/boost/libs/geometry/test/algorithms/covered_by/covered_by_multi.cpp56
-rw-r--r--src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph.cpp320
-rw-r--r--src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph_geo.cpp132
-rw-r--r--src/boost/libs/geometry/test/algorithms/covered_by/test_covered_by.hpp184
-rw-r--r--src/boost/libs/geometry/test/algorithms/crosses/Jamfile21
-rw-r--r--src/boost/libs/geometry/test/algorithms/crosses/crosses.cpp107
-rw-r--r--src/boost/libs/geometry/test/algorithms/crosses/crosses_sph.cpp119
-rw-r--r--src/boost/libs/geometry/test/algorithms/crosses/test_crosses.hpp110
-rw-r--r--src/boost/libs/geometry/test/algorithms/densify.cpp227
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/Jamfile24
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/as_range.cpp79
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/calculate_point_order.cpp148
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/partition.cpp675
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/sections/Jamfile20
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/sections/range_by_section.cpp105
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/sections/sectionalize.cpp363
-rw-r--r--src/boost/libs/geometry/test/algorithms/detail/tupled_output.cpp116
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/Jamfile30
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint.cpp165
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_a_a.cpp387
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_a.cpp538
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_l.cpp379
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_a.cpp292
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_l.cpp391
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_p.cpp187
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_multi.cpp129
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_point_box_geometry.cpp128
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_seg_box.cpp301
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/disjoint_sph.cpp327
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint.hpp112
-rw-r--r--src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint_seg_box.hpp62
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/Jamfile35
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance.cpp536
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_all.cpp20
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_brute_force.hpp1356
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_ca_ar_ar.cpp437
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_ar.cpp972
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_l.cpp321
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_ar.cpp671
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_l.cpp318
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_pl.cpp123
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_geo_linear_box.cpp567
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_geo_pl_l.cpp728
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_ar_ar.cpp943
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_ar.cpp651
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_l.cpp286
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_ar.cpp687
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_pl.cpp122
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_l.cpp556
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_pl.cpp299
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/test_distance.hpp138
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/test_distance_common.hpp611
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/test_distance_geo_common.hpp577
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/test_distance_se_common.hpp381
-rw-r--r--src/boost/libs/geometry/test/algorithms/distance/test_empty_geometry.hpp213
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/Jamfile24
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/envelope.cpp235
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_multi.cpp63
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_on_spheroid.cpp2709
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/expand.cpp164
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/expand_on_spheroid.cpp1126
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope.hpp98
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope_expand_on_spheroid.hpp360
-rw-r--r--src/boost/libs/geometry/test/algorithms/envelope_expand/test_expand.hpp71
-rw-r--r--src/boost/libs/geometry/test/algorithms/equals/Jamfile22
-rw-r--r--src/boost/libs/geometry/test/algorithms/equals/equals.cpp318
-rw-r--r--src/boost/libs/geometry/test/algorithms/equals/equals_multi.cpp52
-rw-r--r--src/boost/libs/geometry/test/algorithms/equals/equals_on_spheroid.cpp255
-rw-r--r--src/boost/libs/geometry/test/algorithms/equals/equals_sph.cpp155
-rw-r--r--src/boost/libs/geometry/test/algorithms/equals/test_equals.hpp115
-rw-r--r--src/boost/libs/geometry/test/algorithms/for_each.cpp130
-rw-r--r--src/boost/libs/geometry/test/algorithms/for_each_multi.cpp97
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/Jamfile26
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/intersects.cpp227
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/intersects_box_geometry.cpp172
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/intersects_multi.cpp63
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/intersects_self.cpp133
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/intersects_sph.cpp269
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/intersects_sph_geo.cpp86
-rw-r--r--src/boost/libs/geometry/test/algorithms/intersects/test_intersects.hpp115
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_convex.cpp61
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_empty.cpp335
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_simple.cpp314
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_simple_geo.cpp128
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_valid.cpp1416
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_valid_failure.cpp982
-rw-r--r--src/boost/libs/geometry/test/algorithms/is_valid_geo.cpp76
-rw-r--r--src/boost/libs/geometry/test/algorithms/length/Jamfile17
-rw-r--r--src/boost/libs/geometry/test/algorithms/length/length.cpp55
-rw-r--r--src/boost/libs/geometry/test/algorithms/length/length_geo.cpp121
-rw-r--r--src/boost/libs/geometry/test/algorithms/length/length_multi.cpp38
-rw-r--r--src/boost/libs/geometry/test/algorithms/length/length_sph.cpp87
-rw-r--r--src/boost/libs/geometry/test/algorithms/length/linestring_cases.hpp28
-rw-r--r--src/boost/libs/geometry/test/algorithms/line_interpolate.cpp370
-rw-r--r--src/boost/libs/geometry/test/algorithms/make.cpp137
-rw-r--r--src/boost/libs/geometry/test/algorithms/maximum_gap.cpp139
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_geometries.cpp151
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_geometries_multi.cpp57
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_interior_rings.cpp153
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_interior_rings_multi.cpp50
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_points.cpp94
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_points_multi.cpp70
-rw-r--r--src/boost/libs/geometry/test/algorithms/num_segments.cpp291
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlaps/Jamfile24
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlaps/overlaps.cpp63
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlaps/overlaps_areal.cpp73
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlaps/overlaps_box.cpp65
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlaps/overlaps_sph.cpp153
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlaps/test_overlaps.hpp94
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/Jamfile38
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/assemble.cpp196
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/debug_sort_by_side_svg.hpp123
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/dissolver.cpp217
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/enrich_intersection_points.cpp187
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.cpp901
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.xlsbin0 -> 133120 bytes
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns.cpp404
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal.cpp62
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal_sph.cpp84
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal.cpp234
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal_sph.cpp241
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear.cpp687
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_geo.cpp50
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_sph.cpp442
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_cases.hpp1549
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_common.hpp40
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/overlay.cpp524
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/overlay_cases.hpp1394
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/overlay_common.hpp464
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/relative_order.cpp220
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/select_rings.cpp118
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp279
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/sort_by_side.cpp268
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/sort_by_side_basic.cpp348
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/split_rings.cpp155
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/test_get_turns.hpp328
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/traverse.cpp1040
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/traverse_ccw.cpp365
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/traverse_gmp.cpp208
-rw-r--r--src/boost/libs/geometry/test/algorithms/overlay/traverse_multi.cpp462
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter.cpp63
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter/Jamfile16
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter/perimeter.cpp66
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter/perimeter_geo.cpp124
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter/perimeter_polygon_cases.hpp37
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter/perimeter_sph.cpp88
-rw-r--r--src/boost/libs/geometry/test/algorithms/perimeter_multi.cpp37
-rw-r--r--src/boost/libs/geometry/test/algorithms/point_on_surface.cpp365
-rw-r--r--src/boost/libs/geometry/test/algorithms/predef_relop.hpp33
-rw-r--r--src/boost/libs/geometry/test/algorithms/pretty_print_geometry.hpp69
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/Jamfile26
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/nan_cases.hpp130
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal.cpp434
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal_sph.cpp115
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal.cpp536
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal_sph.cpp419
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear.cpp446
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear_sph.cpp451
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/relate_pointlike_geometry.cpp254
-rw-r--r--src/boost/libs/geometry/test/algorithms/relate/test_relate.hpp232
-rw-r--r--src/boost/libs/geometry/test/algorithms/remove_spikes.cpp186
-rw-r--r--src/boost/libs/geometry/test/algorithms/reverse.cpp75
-rw-r--r--src/boost/libs/geometry/test/algorithms/reverse_multi.cpp51
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/Jamfile20
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/check_turn_less.hpp115
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/Jamfile32
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference.cpp663
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_areal_linear.cpp260
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_l_a_sph.cpp36
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_linear_linear.cpp1542
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi.cpp531
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp83
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_spike.cpp121
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_a.cpp212
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_l.cpp674
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_pl.cpp244
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference.hpp478
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference_linear_linear.hpp186
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/Jamfile29
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection.cpp974
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_aa_sph.cpp39
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_areal_areal_linear.cpp391
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_linear_linear.cpp1617
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_multi.cpp515
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_a.cpp190
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_l.cpp702
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_pl.cpp201
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_segment.cpp134
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_tupled.cpp365
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp390
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection_linear_linear.hpp260
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/set_ops_ll.cpp17
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/set_ops_pp.cpp16
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/setop_output_type.hpp43
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/Jamfile21
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_areal_areal.cpp140
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_linear_linear.cpp989
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/test_sym_difference_linear_linear.hpp196
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/test_get_turns_ll_invariance.hpp189
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_linear_linear.hpp381
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_pointlike.hpp352
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/Jamfile27
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/test_union.hpp282
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/test_union_linear_linear.hpp203
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/union.cpp644
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_geo.cpp135
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_sph.cpp106
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/union_linear_linear.cpp1075
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/union_multi.cpp499
-rw-r--r--src/boost/libs/geometry/test/algorithms/set_operations/union/union_pl_pl.cpp202
-rw-r--r--src/boost/libs/geometry/test/algorithms/similarity/Jamfile15
-rw-r--r--src/boost/libs/geometry/test/algorithms/similarity/discrete_frechet_distance.cpp95
-rw-r--r--src/boost/libs/geometry/test/algorithms/similarity/discrete_hausdorff_distance.cpp118
-rw-r--r--src/boost/libs/geometry/test/algorithms/similarity/test_frechet_distance.hpp144
-rw-r--r--src/boost/libs/geometry/test/algorithms/similarity/test_hausdorff_distance.hpp138
-rw-r--r--src/boost/libs/geometry/test/algorithms/simplify.cpp311
-rw-r--r--src/boost/libs/geometry/test/algorithms/simplify_countries.cpp188
-rw-r--r--src/boost/libs/geometry/test/algorithms/simplify_multi.cpp65
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_centroid.hpp146
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_convert.hpp77
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_convex_hull.hpp191
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_correct.hpp54
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_for_each.hpp277
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_is_simple.hpp121
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_is_valid.hpp508
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_length.hpp99
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_overlay.hpp161
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_perimeter.hpp103
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_reverse.hpp46
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_simplify.hpp241
-rw-r--r--src/boost/libs/geometry/test/algorithms/test_unique.hpp39
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/Jamfile24
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/test_touches.hpp142
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/touches.cpp226
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/touches_box.cpp66
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/touches_multi.cpp80
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/touches_self.cpp43
-rw-r--r--src/boost/libs/geometry/test/algorithms/touches/touches_sph.cpp239
-rw-r--r--src/boost/libs/geometry/test/algorithms/transform.cpp165
-rw-r--r--src/boost/libs/geometry/test/algorithms/transform_multi.cpp91
-rw-r--r--src/boost/libs/geometry/test/algorithms/unique.cpp60
-rw-r--r--src/boost/libs/geometry/test/algorithms/unique_multi.cpp52
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/Jamfile27
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/test_within.hpp163
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within.cpp152
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_areal_areal.cpp105
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_linear_areal.cpp127
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_linear_linear.cpp108
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_multi.cpp54
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_pointlike_geometry.cpp462
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_sph.cpp273
-rw-r--r--src/boost/libs/geometry/test/algorithms/within/within_sph_geo.cpp129
-rw-r--r--src/boost/libs/geometry/test/arithmetic/Jamfile19
-rw-r--r--src/boost/libs/geometry/test/arithmetic/cross_product.cpp87
-rw-r--r--src/boost/libs/geometry/test/arithmetic/dot_product.cpp53
-rw-r--r--src/boost/libs/geometry/test/arithmetic/general.cpp142
-rwxr-xr-xsrc/boost/libs/geometry/test/arithmetic/infinite_line_functions.cpp205
-rw-r--r--src/boost/libs/geometry/test/concepts/Jamfile30
-rw-r--r--src/boost/libs/geometry/test/concepts/function_asserting_a_point.hpp30
-rw-r--r--src/boost/libs/geometry/test/concepts/function_requiring_a_point.hpp29
-rw-r--r--src/boost/libs/geometry/test/concepts/linestring_concept.cpp77
-rw-r--r--src/boost/libs/geometry/test/concepts/point_array.cpp29
-rw-r--r--src/boost/libs/geometry/test/concepts/point_concept_checker.cpp76
-rw-r--r--src/boost/libs/geometry/test/concepts/point_geographic_custom_with_wrong_units.cpp29
-rw-r--r--src/boost/libs/geometry/test/concepts/point_geographic_with_wrong_units.cpp29
-rw-r--r--src/boost/libs/geometry/test/concepts/point_spherical_custom_with_wrong_units.cpp28
-rw-r--r--src/boost/libs/geometry/test/concepts/point_spherical_with_wrong_units.cpp26
-rw-r--r--src/boost/libs/geometry/test/concepts/point_well_formed.cpp34
-rw-r--r--src/boost/libs/geometry/test/concepts/point_well_formed_non_cartesian.cpp64
-rw-r--r--src/boost/libs/geometry/test/concepts/point_well_formed_traits.cpp88
-rw-r--r--src/boost/libs/geometry/test/concepts/point_with_incorrect_dimension.cpp59
-rw-r--r--src/boost/libs/geometry/test/concepts/point_without_coordinate_type.cpp54
-rw-r--r--src/boost/libs/geometry/test/concepts/point_without_dimension.cpp56
-rw-r--r--src/boost/libs/geometry/test/concepts/point_without_getter.cpp52
-rw-r--r--src/boost/libs/geometry/test/concepts/point_without_setter.cpp52
-rw-r--r--src/boost/libs/geometry/test/core/Jamfile29
-rw-r--r--src/boost/libs/geometry/test/core/access.cpp133
-rw-r--r--src/boost/libs/geometry/test/core/assert.cpp65
-rw-r--r--src/boost/libs/geometry/test/core/coordinate_dimension.cpp74
-rw-r--r--src/boost/libs/geometry/test/core/coordinate_system.cpp101
-rw-r--r--src/boost/libs/geometry/test/core/coordinate_type.cpp78
-rw-r--r--src/boost/libs/geometry/test/core/geometry_id.cpp73
-rw-r--r--src/boost/libs/geometry/test/core/point_type.cpp96
-rw-r--r--src/boost/libs/geometry/test/core/radian_access.cpp110
-rw-r--r--src/boost/libs/geometry/test/core/radius.cpp64
-rw-r--r--src/boost/libs/geometry/test/core/reverse_dispatch.cpp65
-rw-r--r--src/boost/libs/geometry/test/core/ring.cpp99
-rw-r--r--src/boost/libs/geometry/test/core/tag.cpp89
-rw-r--r--src/boost/libs/geometry/test/core/topological_dimension.cpp73
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/Jamfile21
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/common.hpp69
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/distance.cpp113
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/envelope_expand.cpp53
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/index.cpp101
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/is.cpp44
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/measure.cpp51
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/other.cpp40
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/relops1.cpp50
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/relops2.cpp48
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/setops.cpp281
-rw-r--r--src/boost/libs/geometry/test/cs_undefined/test_relops.hpp164
-rw-r--r--src/boost/libs/geometry/test/formulas/Jamfile21
-rw-r--r--src/boost/libs/geometry/test/formulas/direct.cpp176
-rw-r--r--src/boost/libs/geometry/test/formulas/direct_accuracy.cpp97
-rw-r--r--src/boost/libs/geometry/test/formulas/direct_cases.hpp700
-rw-r--r--src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp343
-rw-r--r--src/boost/libs/geometry/test/formulas/direct_meridian.cpp115
-rw-r--r--src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp57
-rw-r--r--src/boost/libs/geometry/test/formulas/intersection.cpp198
-rw-r--r--src/boost/libs/geometry/test/formulas/intersection_cases.hpp335
-rw-r--r--src/boost/libs/geometry/test/formulas/inverse.cpp93
-rw-r--r--src/boost/libs/geometry/test/formulas/inverse_cases.hpp626
-rw-r--r--src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp342
-rw-r--r--src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp106
-rw-r--r--src/boost/libs/geometry/test/formulas/inverse_karney.cpp104
-rw-r--r--src/boost/libs/geometry/test/formulas/test_formula.hpp97
-rw-r--r--src/boost/libs/geometry/test/formulas/vertex_longitude.cpp154
-rw-r--r--src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp457
-rw-r--r--src/boost/libs/geometry/test/from_wkt.hpp28
-rw-r--r--src/boost/libs/geometry/test/geometries/Jamfile40
-rw-r--r--src/boost/libs/geometry/test/geometries/adapted.cpp112
-rw-r--r--src/boost/libs/geometry/test/geometries/boost_array_as_point.cpp50
-rw-r--r--src/boost/libs/geometry/test/geometries/boost_fusion.cpp71
-rw-r--r--src/boost/libs/geometry/test/geometries/boost_polygon.cpp174
-rw-r--r--src/boost/libs/geometry/test/geometries/boost_polygon_overlay.cpp122
-rw-r--r--src/boost/libs/geometry/test/geometries/boost_range.cpp123
-rw-r--r--src/boost/libs/geometry/test/geometries/boost_tuple.cpp39
-rw-r--r--src/boost/libs/geometry/test/geometries/box.cpp105
-rw-r--r--src/boost/libs/geometry/test/geometries/concepts/check.cpp76
-rw-r--r--src/boost/libs/geometry/test/geometries/custom_linestring.cpp128
-rwxr-xr-xsrc/boost/libs/geometry/test/geometries/infinite_line.cpp90
-rw-r--r--src/boost/libs/geometry/test/geometries/initialization.cpp252
-rw-r--r--src/boost/libs/geometry/test/geometries/linestring.cpp136
-rw-r--r--src/boost/libs/geometry/test/geometries/multi_linestring.cpp159
-rw-r--r--src/boost/libs/geometry/test/geometries/multi_point.cpp135
-rw-r--r--src/boost/libs/geometry/test/geometries/multi_polygon.cpp166
-rw-r--r--src/boost/libs/geometry/test/geometries/point.cpp101
-rw-r--r--src/boost/libs/geometry/test/geometries/point_xy.cpp75
-rw-r--r--src/boost/libs/geometry/test/geometries/point_xyz.cpp79
-rw-r--r--src/boost/libs/geometry/test/geometries/polygon.cpp152
-rw-r--r--src/boost/libs/geometry/test/geometries/ring.cpp155
-rw-r--r--src/boost/libs/geometry/test/geometries/segment.cpp104
-rw-r--r--src/boost/libs/geometry/test/geometry_test_common.hpp202
-rw-r--r--src/boost/libs/geometry/test/headers/Jamfile61
-rw-r--r--src/boost/libs/geometry/test/headers/main.cpp19
-rw-r--r--src/boost/libs/geometry/test/io/Jamfile17
-rw-r--r--src/boost/libs/geometry/test/io/dsv/Jamfile16
-rw-r--r--src/boost/libs/geometry/test/io/dsv/dsv_multi.cpp99
-rw-r--r--src/boost/libs/geometry/test/io/svg/Jamfile15
-rw-r--r--src/boost/libs/geometry/test/io/svg/svg.cpp157
-rw-r--r--src/boost/libs/geometry/test/io/wkt/Jamfile17
-rw-r--r--src/boost/libs/geometry/test/io/wkt/wkt.cpp299
-rw-r--r--src/boost/libs/geometry/test/io/wkt/wkt_multi.cpp126
-rw-r--r--src/boost/libs/geometry/test/iterators/Jamfile25
-rw-r--r--src/boost/libs/geometry/test/iterators/closing_iterator.cpp174
-rw-r--r--src/boost/libs/geometry/test/iterators/concatenate_iterator.cpp259
-rw-r--r--src/boost/libs/geometry/test/iterators/ever_circling_iterator.cpp143
-rw-r--r--src/boost/libs/geometry/test/iterators/flatten_iterator.cpp368
-rw-r--r--src/boost/libs/geometry/test/iterators/point_iterator.cpp881
-rw-r--r--src/boost/libs/geometry/test/iterators/segment_iterator.cpp752
-rw-r--r--src/boost/libs/geometry/test/iterators/test_iterator_common.hpp206
-rw-r--r--src/boost/libs/geometry/test/minimal.cpp83
-rw-r--r--src/boost/libs/geometry/test/policies/Jamfile16
-rw-r--r--src/boost/libs/geometry/test/policies/compare.cpp256
-rw-r--r--src/boost/libs/geometry/test/policies/rescale_policy.cpp133
-rw-r--r--src/boost/libs/geometry/test/robustness/common/common_settings.hpp32
-rw-r--r--src/boost/libs/geometry/test/robustness/common/make_square_polygon.hpp46
-rw-r--r--src/boost/libs/geometry/test/robustness/convex_hull/Jamfile18
-rw-r--r--src/boost/libs/geometry/test/robustness/convex_hull/random_multi_points.cpp224
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/Jamfile28
-rwxr-xr-xsrc/boost/libs/geometry/test/robustness/overlay/areal_areal/general_intersection_precision.cpp224
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/interior_triangles.cpp162
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_pies.cpp300
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_stars.cpp182
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersects.cpp173
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/random_ellipses_stars.cpp251
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/recursive_polygons.cpp218
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.cpp144
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.hpp130
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/test_overlay_p_q.hpp293
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/areal_areal/ticket_9081.cpp239
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/buffer/Jamfile19
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/buffer/many_ring_buffer.cpp301
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/buffer/multi_point_growth.cpp139
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp362
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/linear_areal/Jamfile19
-rw-r--r--src/boost/libs/geometry/test/robustness/overlay/linear_areal/recursive_polygons_linear_areal.cpp500
-rw-r--r--src/boost/libs/geometry/test/srs/Jamfile31
-rw-r--r--src/boost/libs/geometry/test/srs/check_geometry.hpp162
-rw-r--r--src/boost/libs/geometry/test/srs/proj4.hpp330
-rw-r--r--src/boost/libs/geometry/test/srs/projection.cpp95
-rw-r--r--src/boost/libs/geometry/test/srs/projection_epsg.cpp93
-rw-r--r--src/boost/libs/geometry/test/srs/projection_interface_d.cpp67
-rw-r--r--src/boost/libs/geometry/test/srs/projection_interface_p4.cpp124
-rw-r--r--src/boost/libs/geometry/test/srs/projection_interface_s.cpp96
-rw-r--r--src/boost/libs/geometry/test/srs/projection_selftest.cpp115
-rw-r--r--src/boost/libs/geometry/test/srs/projection_selftest_cases.hpp3935
-rw-r--r--src/boost/libs/geometry/test/srs/projections.cpp370
-rw-r--r--src/boost/libs/geometry/test/srs/projections_combined.cpp169
-rw-r--r--src/boost/libs/geometry/test/srs/projections_static.cpp290
-rw-r--r--src/boost/libs/geometry/test/srs/spar.cpp63
-rw-r--r--src/boost/libs/geometry/test/srs/srs_transformer.cpp108
-rw-r--r--src/boost/libs/geometry/test/srs/transformation_epsg.cpp57
-rw-r--r--src/boost/libs/geometry/test/srs/transformation_interface.cpp204
-rw-r--r--src/boost/libs/geometry/test/strategies/Jamfile46
-rw-r--r--src/boost/libs/geometry/test/strategies/andoyer.cpp346
-rw-r--r--src/boost/libs/geometry/test/strategies/cross_track.cpp181
-rw-r--r--src/boost/libs/geometry/test/strategies/crossings_multiply.cpp87
-rw-r--r--src/boost/libs/geometry/test/strategies/distance.cpp117
-rw-r--r--src/boost/libs/geometry/test/strategies/distance_cross_track.cpp116
-rw-r--r--src/boost/libs/geometry/test/strategies/distance_cross_track_cases.hpp518
-rw-r--r--src/boost/libs/geometry/test/strategies/distance_default_result.cpp270
-rw-r--r--src/boost/libs/geometry/test/strategies/douglas_peucker.cpp422
-rw-r--r--src/boost/libs/geometry/test/strategies/envelope_segment.cpp134
-rw-r--r--src/boost/libs/geometry/test/strategies/franklin.cpp86
-rw-r--r--src/boost/libs/geometry/test/strategies/haversine.cpp266
-rw-r--r--src/boost/libs/geometry/test/strategies/matrix_transformer.cpp103
-rw-r--r--src/boost/libs/geometry/test/strategies/point_in_box.cpp81
-rw-r--r--src/boost/libs/geometry/test/strategies/projected_point.cpp75
-rw-r--r--src/boost/libs/geometry/test/strategies/projected_point_ax.cpp87
-rw-r--r--src/boost/libs/geometry/test/strategies/pythagoras.cpp363
-rw-r--r--src/boost/libs/geometry/test/strategies/pythagoras_point_box.cpp505
-rw-r--r--src/boost/libs/geometry/test/strategies/segment_intersection.cpp218
-rw-r--r--src/boost/libs/geometry/test/strategies/segment_intersection_collinear.cpp527
-rw-r--r--src/boost/libs/geometry/test/strategies/segment_intersection_geo.cpp430
-rw-r--r--src/boost/libs/geometry/test/strategies/segment_intersection_geo.hpp270
-rw-r--r--src/boost/libs/geometry/test/strategies/segment_intersection_sph.cpp299
-rw-r--r--src/boost/libs/geometry/test/strategies/segment_intersection_sph.hpp221
-rw-r--r--src/boost/libs/geometry/test/strategies/side_of_intersection.cpp108
-rw-r--r--src/boost/libs/geometry/test/strategies/spherical_side.cpp173
-rw-r--r--src/boost/libs/geometry/test/strategies/test_projected_point.hpp185
-rw-r--r--src/boost/libs/geometry/test/strategies/test_within.hpp106
-rw-r--r--src/boost/libs/geometry/test/strategies/thomas.cpp153
-rw-r--r--src/boost/libs/geometry/test/strategies/transform_cs.cpp149
-rw-r--r--src/boost/libs/geometry/test/strategies/transformer.cpp119
-rw-r--r--src/boost/libs/geometry/test/strategies/vincenty.cpp330
-rw-r--r--src/boost/libs/geometry/test/strategies/winding.cpp218
-rw-r--r--src/boost/libs/geometry/test/string_from_type.hpp100
-rw-r--r--src/boost/libs/geometry/test/test_common/test_point.hpp111
-rw-r--r--src/boost/libs/geometry/test/test_common/with_pointer.hpp87
-rw-r--r--src/boost/libs/geometry/test/test_geometries/all_custom_container.hpp137
-rw-r--r--src/boost/libs/geometry/test/test_geometries/all_custom_linestring.hpp137
-rw-r--r--src/boost/libs/geometry/test/test_geometries/all_custom_polygon.hpp130
-rw-r--r--src/boost/libs/geometry/test/test_geometries/all_custom_ring.hpp142
-rw-r--r--src/boost/libs/geometry/test/test_geometries/copy_on_dereference_geometries.hpp177
-rw-r--r--src/boost/libs/geometry/test/test_geometries/custom_lon_lat_point.hpp133
-rw-r--r--src/boost/libs/geometry/test/test_geometries/custom_segment.hpp58
-rw-r--r--src/boost/libs/geometry/test/test_geometries/wrapped_boost_array.hpp151
-rw-r--r--src/boost/libs/geometry/test/to_svg.hpp412
-rw-r--r--src/boost/libs/geometry/test/util/Jamfile30
-rw-r--r--src/boost/libs/geometry/test/util/calculation_type.cpp208
-rw-r--r--src/boost/libs/geometry/test/util/compress_variant.cpp77
-rw-r--r--src/boost/libs/geometry/test/util/for_each_coordinate.cpp84
-rw-r--r--src/boost/libs/geometry/test/util/is_implemented.cpp88
-rw-r--r--src/boost/libs/geometry/test/util/math_abs.cpp102
-rw-r--r--src/boost/libs/geometry/test/util/math_equals.cpp79
-rw-r--r--src/boost/libs/geometry/test/util/math_sqrt.cpp153
-rw-r--r--src/boost/libs/geometry/test/util/number_types.hpp187
-rw-r--r--src/boost/libs/geometry/test/util/promote_integral.cpp547
-rw-r--r--src/boost/libs/geometry/test/util/range.cpp244
-rw-r--r--src/boost/libs/geometry/test/util/rational.cpp61
-rw-r--r--src/boost/libs/geometry/test/util/select_most_precise.cpp78
-rw-r--r--src/boost/libs/geometry/test/util/transform_variant.cpp68
-rw-r--r--src/boost/libs/geometry/test/util/tuples.cpp141
-rw-r--r--src/boost/libs/geometry/test/util/write_dsv.cpp73
-rw-r--r--src/boost/libs/geometry/test/views/Jamfile19
-rw-r--r--src/boost/libs/geometry/test/views/box_view.cpp81
-rw-r--r--src/boost/libs/geometry/test/views/closeable_view.cpp134
-rw-r--r--src/boost/libs/geometry/test/views/reversible_closeable.cpp165
-rw-r--r--src/boost/libs/geometry/test/views/reversible_view.cpp81
-rw-r--r--src/boost/libs/geometry/test/views/segment_view.cpp86
720 files changed, 131768 insertions, 0 deletions
diff --git a/src/boost/libs/geometry/Jamfile b/src/boost/libs/geometry/Jamfile
new file mode 100644
index 000000000..fe4b9b883
--- /dev/null
+++ b/src/boost/libs/geometry/Jamfile
@@ -0,0 +1,21 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+project boost-geometry
+ :
+ requirements
+ <include>../../boost/geometry/extensions/contrib/ttmath
+ <toolset>msvc:<asynch-exceptions>on
+ ;
+
+build-project test ;
+build-project example ;
+build-project doc/src/examples ;
+build-project index ;
diff --git a/src/boost/libs/geometry/README.md b/src/boost/libs/geometry/README.md
new file mode 100644
index 000000000..3470ac8c4
--- /dev/null
+++ b/src/boost/libs/geometry/README.md
@@ -0,0 +1,29 @@
+# ![Boost.Geometry](doc/other/logo/logo_bkg.png)
+
+Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), defines concepts, primitives and algorithms for solving geometry problems.
+
+[![Licence](https://img.shields.io/badge/license-boost-4480cc.png)](http://www.boost.org/LICENSE_1_0.txt)
+[![Documentation](https://img.shields.io/badge/-documentation-4480cc.png)](http://boost.org/libs/geometry)
+[![Wiki](https://img.shields.io/badge/-wiki-4480cc.png)](https://github.com/boostorg/geometry/wiki)
+[![Mailing List](https://img.shields.io/badge/-mailing%20list-4eb899.png)](http://lists.boost.org/geometry/)
+[![Chat](https://badges.gitter.im/boostorg/geometry.png)](https://gitter.im/boostorg/geometry?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+| :warning: **CAUTION**: Boost.Geometry in Boost 1.73 deprecates support for the C++03 and will require C++14 from Boost 1.75 onwards (see issue [#590](https://github.com/boostorg/geometry/issues/590)). |
+| --- |
+
+### Test results
+
+ Branch | Build | Coverage | Regression | Documentation
+------------|---------------|----------------|------------|--------------
+**develop** | [![status](https://circleci.com/gh/boostorg/geometry/tree/develop.svg?style=shield)](https://circleci.com/gh/boostorg/geometry/tree/develop) <br> [![status](https://github.com/boostorg/geometry/workflows/clang-test-minimal/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:clang-test-minimal) <br> [![status](https://github.com/boostorg/geometry/workflows/gcc-test-minimal/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:gcc-test-minimal) <br> [![status](https://github.com/boostorg/geometry/workflows/msvc-test-minimal/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:msvc-test-minimal) | [![status](https://coveralls.io/repos/github/boostorg/geometry/badge.svg?branch=develop)](https://coveralls.io/github/boostorg/geometry?branch=develop) | [![geometry](https://img.shields.io/badge/-geometry-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry.html) [![index](https://img.shields.io/badge/-index-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [![extensions](https://img.shields.io/badge/-extensions-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [![](https://github.com/boostorg/geometry/workflows/documentation/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
+**master** | [![status](https://circleci.com/gh/boostorg/geometry/tree/master.svg?style=shield)](https://circleci.com/gh/boostorg/geometry/tree/master) <br> [![status](https://github.com/boostorg/geometry/workflows/clang-test-minimal/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:clang-test-minimal) <br> [![status](https://github.com/boostorg/geometry/workflows/gcc-test-minimal/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:gcc-test-minimal) <br> [![status](https://github.com/boostorg/geometry/workflows/msvc-test-minimal/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:msvc-test-minimal) | [![status](https://coveralls.io/repos/github/boostorg/geometry/badge.svg?branch=master)](https://coveralls.io/github/boostorg/geometry?branch=master) | [![geometry](https://img.shields.io/badge/-geometry-4480cc.png)](http://www.boost.org/development/tests/master/developer/geometry.html) [![index](https://img.shields.io/badge/-index-4480cc.png)](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [![](https://github.com/boostorg/geometry/workflows/documentation/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
+
+### Directories
+
+* **doc** - QuickBook documentation sources
+* **example** - Boost.Geometry examples
+* **_extensions_** - examples and tests for the extensions - _develop branch_
+* **include** - the sourcecode of Boost.Geometry
+* **index** - examples and tests for the Spatial Index
+* **meta** - library metadata
+* **test** - Boost.Geometry unit tests
diff --git a/src/boost/libs/geometry/example/01_point_example.cpp b/src/boost/libs/geometry/example/01_point_example.cpp
new file mode 100644
index 000000000..d1a70e74f
--- /dev/null
+++ b/src/boost/libs/geometry/example/01_point_example.cpp
@@ -0,0 +1,138 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Point Example - showing different type of points
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+int main()
+{
+ using namespace boost::geometry;
+
+ // Boost.Geometry contains several point types:
+ // 1: its own generic type
+ model::point<double, 2, cs::cartesian> pt1;
+
+ // 2: its own type targetted to Cartesian (x,y) coordinates
+ model::d2::point_xy<double> pt2;
+
+ // 3: it supports Boost tuple's
+ boost::tuple<double, double> pt3;
+
+ // 4: it supports normal arrays
+ double pt4[2];
+
+ // 5: it supports arrays-as-points from Boost.Array
+ boost::array<double, 2> pt5;
+
+ // 6: it supports points from Boost.Polygon
+ boost::polygon::point_data<double> pt6;
+
+ // 7: in the past there was a typedef point_2d
+ // But users are now supposted to do that themselves:
+ typedef model::d2::point_xy<double> point_2d;
+ point_2d pt7;
+
+
+ // 7: there are more variants, and you can create your own.
+ // (see therefore the custom_point example)
+
+ // All these types are handled the same way. We show here
+ // assigning them and calculating distances.
+ assign_values(pt1, 1, 1);
+ assign_values(pt2, 2, 2);
+ assign_values(pt3, 3, 3);
+ assign_values(pt4, 4, 4);
+ assign_values(pt5, 5, 5);
+ assign_values(pt6, 6, 6);
+ assign_values(pt7, 7, 7);
+
+
+ double d1 = distance(pt1, pt2);
+ double d2 = distance(pt3, pt4);
+ double d3 = distance(pt5, pt6);
+ std::cout << "Distances: "
+ << d1 << " and " << d2 << " and " << d3 << std::endl;
+
+ // (in case you didn't note, distances can be calculated
+ // from points with different point-types)
+
+
+ // Several ways of construction and setting point values
+ // 1: default, empty constructor, causing no initialization at all
+ model::d2::point_xy<double> p1;
+
+ // 2: as shown above, assign_values
+ model::d2::point_xy<double> p2;
+ assign_values(p2, 1, 1);
+
+ // 3: using "set" function
+ // set uses the concepts behind, such that it can be applied for
+ // every point-type (like assign_values)
+ model::d2::point_xy<double> p3;
+ set<0>(p3, 1);
+ set<1>(p3, 1);
+ // set<2>(p3, 1); //will result in compile-error
+
+
+ // 3: for any point type, and other geometry objects:
+ // there is the "make" object generator
+ // (this one requires to specify the point-type).
+ model::d2::point_xy<double> p4 = make<model::d2::point_xy<double> >(1,1);
+
+
+ // 5: for the d2::point_xy<...> type only: constructor with two values
+ model::d2::point_xy<double> p5(1,1);
+
+ // 6: for boost tuples you can of course use make_tuple
+
+
+ // Some ways of getting point values
+
+ // 1: using the "get" function following the concepts behind
+ std::cout << get<0>(p2) << "," << get<1>(p2) << std::endl;
+
+ // 2: for point_xy only
+ std::cout << p2.x() << "," << p2.y() << std::endl;
+
+ // 3: using boost-tuples you of course can boost-tuple-methods
+ std::cout << pt3.get<0>() << "," << pt3.get<1>() << std::endl;
+
+ // 4: Boost.Geometry supports various output formats, e.g. DSV
+ // (delimiter separated values)
+ std::cout << dsv(pt3) << std::endl;
+
+ // 5. or wkt
+ std::cout << wkt(p4) << (equals(p4, p5) ? " equals " : " don't equals ") << wkt(p5) << std::endl;
+
+ // There are 3-dimensional points too
+ model::point<double, 3, cs::cartesian> d3a, d3b;
+ assign_values(d3a, 1, 2, 3);
+ assign_values(d3b, 4, 5, 6);
+ d3 = distance(d3a, d3b);
+
+
+
+ // Other examples show other types of points, geometries and more algorithms
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/02_linestring_example.cpp b/src/boost/libs/geometry/example/02_linestring_example.cpp
new file mode 100644
index 000000000..94a2809fe
--- /dev/null
+++ b/src/boost/libs/geometry/example/02_linestring_example.cpp
@@ -0,0 +1,232 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Linestring Example
+
+#include <algorithm> // for reverse, unique
+#include <iostream>
+#include <iterator>
+#include <utility>
+#include <vector>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+// Optional includes and defines to handle c-arrays as points, std::vectors as linestrings
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template<typename P>
+inline void translate_function(P& p)
+{
+ p.x(p.x() + 100.0);
+}
+
+template<typename P>
+struct scale_functor
+{
+ inline void operator()(P& p)
+ {
+ p.x(p.x() * 1000.0);
+ p.y(p.y() * 1000.0);
+ }
+};
+
+
+template<typename Point>
+struct round_coordinates
+{
+ typedef typename boost::geometry::coordinate_type<Point>::type coordinate_type;
+ coordinate_type m_factor;
+
+ inline round_coordinates(coordinate_type const& factor)
+ : m_factor(factor)
+ {}
+
+ template <int Dimension>
+ inline void round(Point& p)
+ {
+ coordinate_type c = boost::geometry::get<Dimension>(p) / m_factor;
+ int rounded = c;
+ boost::geometry::set<Dimension>(p, coordinate_type(rounded) * m_factor);
+ }
+
+ inline void operator()(Point& p)
+ {
+ round<0>(p);
+ round<1>(p);
+ }
+};
+
+
+int main(void)
+{
+ using namespace boost::geometry;
+
+ // Define a linestring, which is a vector of points, and add some points
+ // (we add them deliberately in different ways)
+ typedef model::d2::point_xy<double> point_2d;
+ typedef model::linestring<point_2d> linestring_2d;
+ linestring_2d ls;
+
+ // points can be created using "make" and added to a linestring using the std:: "push_back"
+ ls.push_back(make<point_2d>(1.1, 1.1));
+
+ // points can also be assigned using "assign_values" and added to a linestring using "append"
+ point_2d lp;
+ assign_values(lp, 2.5, 2.1);
+ append(ls, lp);
+
+ // Lines can be streamed using DSV (delimiter separated values)
+ std::cout << dsv(ls) << std::endl;
+
+ // The bounding box of linestrings can be calculated
+ typedef model::box<point_2d> box_2d;
+ box_2d b;
+ envelope(ls, b);
+ std::cout << dsv(b) << std::endl;
+
+ // The length of the line can be calulated
+ std::cout << "length: " << length(ls) << std::endl;
+
+ // All things from std::vector can be called, because a linestring is a vector
+ std::cout << "number of points 1: " << ls.size() << std::endl;
+
+ // All things from boost ranges can be called because a linestring is considered as a range
+ std::cout << "number of points 2: " << boost::size(ls) << std::endl;
+
+ // Generic function from geometry/OGC delivers the same value
+ std::cout << "number of points 3: " << num_points(ls) << std::endl;
+
+ // The distance from a point to a linestring can be calculated
+ point_2d p(1.9, 1.2);
+ std::cout << "distance of " << dsv(p)
+ << " to line: " << distance(p, ls) << std::endl;
+
+ // A linestring is a vector. However, some algorithms consider "segments",
+ // which are the line pieces between two points of a linestring.
+ double d = distance(p, model::segment<point_2d >(ls.front(), ls.back()));
+ std::cout << "distance: " << d << std::endl;
+
+ // Add some three points more, let's do it using a classic array.
+ // (See documentation for picture of this linestring)
+ const double c[][2] = { {3.1, 3.1}, {4.9, 1.1}, {3.1, 1.9} };
+ append(ls, c);
+ std::cout << "appended: " << dsv(ls) << std::endl;
+
+ // Output as iterator-pair on a vector
+ {
+ std::vector<point_2d> v;
+ std::copy(ls.begin(), ls.end(), std::back_inserter(v));
+
+ std::cout
+ << "as vector: "
+ << dsv(v)
+ << std::endl;
+ }
+
+ // All algorithms from std can be used: a linestring is a vector
+ std::reverse(ls.begin(), ls.end());
+ std::cout << "reversed: " << dsv(ls) << std::endl;
+ std::reverse(boost::begin(ls), boost::end(ls));
+
+ // The other way, using a vector instead of a linestring, is also possible
+ std::vector<point_2d> pv(ls.begin(), ls.end());
+ std::cout << "length: " << length(pv) << std::endl;
+
+ // If there are double points in the line, you can use unique to remove them
+ // So we add the last point, print, make a unique copy and print
+ {
+ // (sidenote, we have to make copies, because
+ // ls.push_back(ls.back()) often succeeds but
+ // IS dangerous and erroneous!
+ point_2d last = ls.back(), first = ls.front();
+ ls.push_back(last);
+ ls.insert(ls.begin(), first);
+ }
+ std::cout << "extra duplicate points: " << dsv(ls) << std::endl;
+
+ {
+ linestring_2d ls_copy;
+ std::unique_copy(ls.begin(), ls.end(), std::back_inserter(ls_copy),
+ boost::geometry::equal_to<point_2d>());
+ ls = ls_copy;
+ std::cout << "uniquecopy: " << dsv(ls) << std::endl;
+ }
+
+ // Lines can be simplified. This removes points, but preserves the shape
+ linestring_2d ls_simplified;
+ simplify(ls, ls_simplified, 0.5);
+ std::cout << "simplified: " << dsv(ls_simplified) << std::endl;
+
+
+ // for_each:
+ // 1) Lines can be visited with std::for_each
+ // 2) for_each_point is also defined for all geometries
+ // 3) for_each_segment is defined for all geometries to all segments
+ // 4) loop is defined for geometries to visit segments
+ // with state apart, and to be able to break out (not shown here)
+ {
+ linestring_2d lscopy = ls;
+ std::for_each(lscopy.begin(), lscopy.end(), translate_function<point_2d>);
+ for_each_point(lscopy, scale_functor<point_2d>());
+ for_each_point(lscopy, translate_function<point_2d>);
+ std::cout << "modified line: " << dsv(lscopy) << std::endl;
+ }
+
+ // Lines can be clipped using a clipping box. Clipped lines are added to the output iterator
+ box_2d cb(point_2d(1.5, 1.5), point_2d(4.5, 2.5));
+
+ std::vector<linestring_2d> clipped;
+ intersection(cb, ls, clipped);
+
+ // Also possible: clip-output to a vector of vectors
+ std::vector<std::vector<point_2d> > vector_out;
+ intersection(cb, ls, vector_out);
+
+ std::cout << "clipped output as vector:" << std::endl;
+ for (std::vector<std::vector<point_2d> >::const_iterator it
+ = vector_out.begin(); it != vector_out.end(); ++it)
+ {
+ std::cout << dsv(*it) << std::endl;
+ }
+
+ // Calculate the convex hull of the linestring
+ model::polygon<point_2d> hull;
+ convex_hull(ls, hull);
+ std::cout << "Convex hull:" << dsv(hull) << std::endl;
+
+ // All the above assumed 2D Cartesian linestrings. 3D is possible as well
+ // Let's define a 3D point ourselves, this time using 'float'
+ typedef model::point<float, 3, cs::cartesian> point_3d;
+ model::linestring<point_3d> line3;
+ line3.push_back(make<point_3d>(1,2,3));
+ line3.push_back(make<point_3d>(4,5,6));
+ line3.push_back(make<point_3d>(7,8,9));
+
+ // Not all algorithms work on 3d lines. For example convex hull does NOT.
+ // But, for example, length, distance, simplify, envelope and stream do.
+ std::cout << "3D: length: " << length(line3) << " line: " << dsv(line3) << std::endl;
+
+ // With DSV you can also use other delimiters, e.g. JSON style
+ std::cout << "JSON: "
+ << dsv(ls, ", ", "[", "]", ", ", "[ ", " ]")
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/03_polygon_example.cpp b/src/boost/libs/geometry/example/03_polygon_example.cpp
new file mode 100644
index 000000000..4dcb3aaae
--- /dev/null
+++ b/src/boost/libs/geometry/example/03_polygon_example.cpp
@@ -0,0 +1,141 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Polygon Example
+
+#include <algorithm> // for reverse, unique
+#include <iostream>
+#include <string>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+
+
+std::string boolstr(bool v)
+{
+ return v ? "true" : "false";
+}
+
+int main(void)
+{
+ using namespace boost::geometry;
+
+ typedef model::d2::point_xy<double> point_2d;
+ typedef model::polygon<point_2d> polygon_2d;
+ typedef model::box<point_2d> box_2d;
+
+ // Define a polygon and fill the outer ring.
+ // In most cases you will read it from a file or database
+ polygon_2d poly;
+ {
+ const double coor[][2] = {
+ {2.0, 1.3}, {2.4, 1.7}, {2.8, 1.8}, {3.4, 1.2}, {3.7, 1.6},
+ {3.4, 2.0}, {4.1, 3.0}, {5.3, 2.6}, {5.4, 1.2}, {4.9, 0.8}, {2.9, 0.7},
+ {2.0, 1.3} // closing point is opening point
+ };
+ assign_points(poly, coor);
+ }
+
+ // Polygons should be closed, and directed clockwise. If you're not sure if that is the case,
+ // call the correct algorithm
+ correct(poly);
+
+ // Polygons can be streamed as text
+ // (or more precisely: as DSV (delimiter separated values))
+ std::cout << dsv(poly) << std::endl;
+
+ // As with lines, bounding box of polygons can be calculated
+ box_2d b;
+ envelope(poly, b);
+ std::cout << dsv(b) << std::endl;
+
+ // The area of the polygon can be calulated
+ std::cout << "area: " << area(poly) << std::endl;
+
+ // And the centroid, which is the center of gravity
+ point_2d cent;
+ centroid(poly, cent);
+ std::cout << "centroid: " << dsv(cent) << std::endl;
+
+
+ // The number of points can be requested per ring (using .size())
+ // or per polygon (using num_points)
+ std::cout << "number of points in outer ring: " << poly.outer().size() << std::endl;
+
+ // Polygons can have one or more inner rings, also called holes, islands, interior rings.
+ // Let's add one
+ {
+ poly.inners().resize(1);
+ model::ring<point_2d>& inner = poly.inners().back();
+
+ const double coor[][2] = { {4.0, 2.0}, {4.2, 1.4}, {4.8, 1.9}, {4.4, 2.2}, {4.0, 2.0} };
+ assign_points(inner, coor);
+ }
+
+ correct(poly);
+
+ std::cout << "with inner ring:" << dsv(poly) << std::endl;
+ // The area of the polygon is changed of course
+ std::cout << "new area of polygon: " << area(poly) << std::endl;
+ centroid(poly, cent);
+ std::cout << "new centroid: " << dsv(cent) << std::endl;
+
+ // You can test whether points are within a polygon
+ std::cout << "point in polygon:"
+ << " p1: " << boolstr(within(make<point_2d>(3.0, 2.0), poly))
+ << " p2: " << boolstr(within(make<point_2d>(3.7, 2.0), poly))
+ << " p3: " << boolstr(within(make<point_2d>(4.4, 2.0), poly))
+ << std::endl;
+
+ // As with linestrings and points, you can derive from polygon to add, for example,
+ // fill color and stroke color. Or SRID (spatial reference ID). Or Z-value. Or a property map.
+ // We don't show this here.
+
+ // Clip the polygon using a box
+ box_2d cb(make<point_2d>(1.5, 1.5), make<point_2d>(4.5, 2.5));
+ typedef std::vector<polygon_2d> polygon_list;
+ polygon_list v;
+
+ intersection(cb, poly, v);
+ std::cout << "Clipped output polygons" << std::endl;
+ for (polygon_list::const_iterator it = v.begin(); it != v.end(); ++it)
+ {
+ std::cout << dsv(*it) << std::endl;
+ }
+
+ typedef model::multi_polygon<polygon_2d> polygon_set;
+ polygon_set ps;
+ union_(cb, poly, ps);
+
+ polygon_2d hull;
+ convex_hull(poly, hull);
+ std::cout << "Convex hull:" << dsv(hull) << std::endl;
+
+ // If you really want:
+ // You don't have to use a vector, you can define a polygon with a deque
+ // You can specify the container for the points and for the inner rings independantly
+
+ typedef model::polygon<point_2d, true, true, std::deque, std::deque> deque_polygon;
+ deque_polygon poly2;
+ ring_type<deque_polygon>::type& ring = exterior_ring(poly2);
+ append(ring, make<point_2d>(2.8, 1.9));
+ append(ring, make<point_2d>(2.9, 2.4));
+ append(ring, make<point_2d>(3.3, 2.2));
+ append(ring, make<point_2d>(3.2, 1.8));
+ append(ring, make<point_2d>(2.8, 1.9));
+ std::cout << dsv(poly2) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/04_boost_example.cpp b/src/boost/libs/geometry/example/04_boost_example.cpp
new file mode 100644
index 000000000..1f2c29b14
--- /dev/null
+++ b/src/boost/libs/geometry/example/04_boost_example.cpp
@@ -0,0 +1,94 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Example combining Boost.Geometry with Boost.Assign and Boost.Range and Boost.Tuple
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/assign.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
+
+
+int main(void)
+{
+ using namespace boost::geometry;
+ using namespace boost::assign;
+
+ {
+ typedef model::d2::point_xy<double> point;
+ typedef model::polygon<point> polygon;
+ typedef model::linestring<point> linestring;
+
+ // Boost.Assign automatically works for linestring, rings, multi-geometries
+ // It works because these are std:: containers
+
+ // Using Boost.Assign operator +=
+ linestring ls1;
+ ls1 += point(1,2);
+ ls1 += point(3,4), point(5,6), point(7,8);
+ std::cout << dsv(ls1) << std::endl;
+
+ // Using Boost.Assign operator()
+ linestring ls2;
+ push_back(ls2)(point(1, 2))(point(3, 4));
+ std::cout << dsv(ls2) << std::endl;
+
+ // Using Boost.Assign list_of
+ linestring ls3 = list_of(point(1,2))(point(3,4));
+ std::cout << dsv(ls3) << std::endl;
+
+ // Using Boost.Assign + Boost.Range
+ linestring ls4;
+ push_back(ls4)(point(0, 0)).range(ls2).range(ls3);
+ std::cout << dsv(ls4) << std::endl;
+
+ // For a ring, it is similar to a linestring.
+ // For a multi-point or multi-linestring, it is also similar
+ // For a polygon, take the exterior ring or one of the interiors
+ polygon p;
+ push_back(exterior_ring(p))
+ (point(0, 0))
+ (point(0, 2))
+ (point(2, 2))
+ (point(2, 0))
+ (point(0, 0))
+ ;
+
+ std::cout << dsv(p) << std::endl;
+ }
+
+ {
+ // It is convenient to combine Boost.Assign on a geometry (e.g. polygon) with tuples.
+ typedef model::polygon<boost::tuple<double,double> > polygon;
+
+ polygon p;
+ exterior_ring(p) = tuple_list_of(0, 0)(0, 5)(5, 5)(5, 0)(0, 0);
+
+ std::cout << dsv(p) << std::endl;
+
+ // And let it work on the interior_rings as well
+ push_back(interior_rings(p))
+ (tuple_list_of(1, 1)(2, 1)(2, 2)(1, 2)(1, 1))
+ (tuple_list_of(3, 3)(4, 3)(4, 4)(3, 4)(3, 3))
+ ;
+
+ std::cout << "Area of " << dsv(p) << " is " << area(p) << std::endl;
+ }
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/05_a_overlay_polygon_example.cpp b/src/boost/libs/geometry/example/05_a_overlay_polygon_example.cpp
new file mode 100644
index 000000000..26fdd1e1e
--- /dev/null
+++ b/src/boost/libs/geometry/example/05_a_overlay_polygon_example.cpp
@@ -0,0 +1,89 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Polygon Overlay Example
+
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <boost/foreach.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+
+#if defined(HAVE_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+
+
+int main(void)
+{
+ namespace bg = boost::geometry;
+
+ typedef bg::model::d2::point_xy<double> point_2d;
+ typedef bg::model::polygon<point_2d> polygon_2d;
+
+
+#if defined(HAVE_SVG)
+ std::ofstream stream("05_a_intersection_polygon_example.svg");
+ bg::svg_mapper<point_2d> svg(stream, 500, 500);
+#endif
+
+ // Define a polygons and fill the outer rings.
+ polygon_2d a;
+ {
+ const double c[][2] = {
+ {160, 330}, {60, 260}, {20, 150}, {60, 40}, {190, 20}, {270, 130}, {260, 250}, {160, 330}
+ };
+ bg::assign_points(a, c);
+ }
+ bg::correct(a);
+ std::cout << "A: " << bg::dsv(a) << std::endl;
+
+ polygon_2d b;
+ {
+ const double c[][2] = {
+ {300, 330}, {190, 270}, {150, 170}, {150, 110}, {250, 30}, {380, 50}, {380, 250}, {300, 330}
+ };
+ bg::assign_points(b, c);
+ }
+ bg::correct(b);
+ std::cout << "B: " << bg::dsv(b) << std::endl;
+#if defined(HAVE_SVG)
+ svg.add(a);
+ svg.add(b);
+
+ svg.map(a, "opacity:0.6;fill:rgb(0,255,0);");
+ svg.map(b, "opacity:0.6;fill:rgb(0,0,255);");
+#endif
+
+
+ // Calculate interesection(s)
+ std::vector<polygon_2d> intersection;
+ bg::intersection(a, b, intersection);
+
+ std::cout << "Intersection of polygons A and B" << std::endl;
+ BOOST_FOREACH(polygon_2d const& polygon, intersection)
+ {
+ std::cout << bg::dsv(polygon) << std::endl;
+#if defined(HAVE_SVG)
+ svg.map(polygon, "opacity:0.5;fill:none;stroke:rgb(255,0,0);stroke-width:6");
+#endif
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp b/src/boost/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp
new file mode 100644
index 000000000..38349decb
--- /dev/null
+++ b/src/boost/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp
@@ -0,0 +1,100 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Linestring Polygon Overlay Example
+
+// NOTE: this example is obsolete. Boost.Geometry can now
+// overlay linestrings/polygons.
+// This sample will be removed in next version.
+
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <boost/foreach.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+
+#if defined(HAVE_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian);
+
+
+int main(void)
+{
+ namespace bg = boost::geometry;
+
+ typedef bg::model::d2::point_xy<double> point_2d;
+
+ bg::model::linestring<point_2d> ls;
+ {
+ const double c[][2] = { {0, 1}, {2, 5}, {5, 3} };
+ bg::assign_points(ls, c);
+ }
+
+ bg::model::polygon<point_2d> p;
+ {
+ const double c[][2] = { {3, 0}, {0, 3}, {4, 5}, {3, 0} };
+ bg::assign_points(p, c);
+ }
+ bg::correct(p);
+
+#if defined(HAVE_SVG)
+ // Create SVG-mapper
+ std::ofstream stream("05_b_overlay_linestring_polygon_example.svg");
+ bg::svg_mapper<point_2d> svg(stream, 500, 500);
+ // Determine extend by adding geometries
+ svg.add(p);
+ svg.add(ls);
+ // Map geometries
+ svg.map(ls, "opacity:0.6;stroke:rgb(255,0,0);stroke-width:2;");
+ svg.map(p, "opacity:0.6;fill:rgb(0,0,255);");
+#endif
+
+ // Calculate intersection points (turn points)
+ typedef bg::segment_ratio_type<point_2d, bg::detail::no_rescale_policy>::type segment_ratio;
+ typedef bg::detail::overlay::turn_info<point_2d, segment_ratio> turn_info;
+ std::vector<turn_info> turns;
+ bg::detail::get_turns::no_interrupt_policy policy;
+ bg::detail::no_rescale_policy rescale_policy;
+ bg::get_turns<false, false, bg::detail::overlay::assign_null_policy>(ls, p, rescale_policy, turns, policy);
+
+ std::cout << "Intersection of linestring/polygon" << std::endl;
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ std::string action = "intersecting";
+ if (turn.operations[0].operation
+ == bg::detail::overlay::operation_intersection)
+ {
+ action = "entering";
+ }
+ else if (turn.operations[0].operation
+ == bg::detail::overlay::operation_union)
+ {
+ action = "leaving";
+
+ }
+ std::cout << action << " polygon at " << bg::dsv(turn.point) << std::endl;
+#if defined(HAVE_SVG)
+ svg.map(turn.point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1");
+ svg.text(turn.point, action, "fill:rgb(0,0,0);font-family:Arial;font-size:10px");
+#endif
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/06_a_transformation_example.cpp b/src/boost/libs/geometry/example/06_a_transformation_example.cpp
new file mode 100644
index 000000000..01a560173
--- /dev/null
+++ b/src/boost/libs/geometry/example/06_a_transformation_example.cpp
@@ -0,0 +1,56 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Transformation Example
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+
+
+int main()
+{
+ using namespace boost::geometry;
+
+ typedef model::d2::point_xy<double> point_2d;
+ point_2d p(1, 1);
+ point_2d p2;
+
+ // Example: translate a point over (5,5)
+ strategy::transform::translate_transformer<double, 2, 2> translate(5, 5);
+
+ transform(p, p2, translate);
+ std::cout << "transformed point " << boost::geometry::dsv(p2) << std::endl;
+
+ // Transform a polygon
+ model::polygon<point_2d> poly, poly2;
+ const double coor[][2] = { {0, 0}, {0, 7}, {2, 2}, {2, 0}, {0, 0} };
+ // note that for this syntax you have to include the two
+ // include files above (c_array.hpp)
+ assign_points(poly, coor);
+ //read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
+ transform(poly, poly2, translate);
+
+ std::cout << "source polygon " << boost::geometry::dsv(poly) << std::endl;
+ std::cout << "transformed polygon " << boost::geometry::dsv(poly2) << std::endl;
+
+ // Many more transformations are possible:
+ // - from Cartesian to Spherical coordinate systems and back
+ // - from Cartesian to Cartesian (mapping, affine transformations) and back (inverse)
+ // - Map Projections
+ // - from Degree to Radian and back in spherical_equatorial or geographic coordinate systems
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/06_b_transformation_example.cpp b/src/boost/libs/geometry/example/06_b_transformation_example.cpp
new file mode 100644
index 000000000..ad7f75b33
--- /dev/null
+++ b/src/boost/libs/geometry/example/06_b_transformation_example.cpp
@@ -0,0 +1,167 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Example: Affine Transformation (translate, scale, rotate)
+//
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <ctime> // for std::time
+#include <algorithm>
+#include <fstream>
+#include <iostream>
+#include <limits>
+#include <sstream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/algorithms/centroid.hpp>
+#include <boost/geometry/strategies/transform.hpp>
+#include <boost/geometry/strategies/transform/matrix_transformers.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+#if defined(HAVE_SVG)
+# include <boost/geometry/io/svg/write.hpp>
+#endif
+
+#include <boost/random.hpp>
+#include <boost/range.hpp>
+#include <boost/shared_ptr.hpp>
+
+using namespace boost::geometry;
+
+struct random_style
+{
+ random_style()
+ : rng(static_cast<int>(std::time(0))), dist(0, 255), colour(rng, dist)
+ {}
+
+ std::string fill(double opacity = 1)
+ {
+ std::ostringstream oss;
+ oss << "fill:rgba(" << colour() << "," << colour() << "," << colour() << "," << opacity << ");";
+ return oss.str();
+ }
+
+ std::string stroke(int width, double opacity = 1)
+ {
+ std::ostringstream oss;
+ oss << "stroke:rgba(" << colour() << "," << colour() << "," << colour() << "," << opacity << ");";
+ oss << "stroke-width:" << width << ";";
+ return oss.str();
+ }
+
+ template <typename T>
+ std::string text(T x, T y, std::string const& text)
+ {
+ std::ostringstream oss;
+ oss << "<text x=\"" << static_cast<int>(x) - 90 << "\" y=\"" << static_cast<int>(y) << "\" font-family=\"Verdana\">" << text << "</text>";
+ return oss.str();
+ }
+
+ boost::mt19937 rng;
+ boost::uniform_int<> dist;
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > colour;
+};
+
+template <typename OutputStream>
+struct svg_output
+{
+ svg_output(OutputStream& os, double opacity = 1) : os(os), opacity(opacity)
+ {
+ os << "<?xml version=\"1.0\" standalone=\"no\"?>\n"
+ << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n"
+ << "\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"
+ << "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n"
+ << "xmlns=\"http://www.w3.org/2000/svg\">" << std::endl;
+ }
+
+ ~svg_output()
+ {
+ os << "</svg>" << std::endl;
+ }
+
+ template <typename G>
+ void put(G const& g, std::string const& label)
+ {
+ std::string style_str(style.fill(opacity) + style.stroke(5, opacity));
+#if defined(HAVE_SVG)
+ os << boost::geometry::svg(g, style_str) << std::endl;
+#endif
+ if (!label.empty())
+ {
+ typename point_type<G>::type c;
+ centroid(g, c);
+ os << style.text(static_cast<int>(get<0>(c)), static_cast<int>(get<1>(c)), label);
+ }
+ }
+
+private:
+
+ OutputStream& os;
+ double opacity;
+ random_style style;
+};
+
+
+int main()
+{
+ using namespace boost::geometry::strategy::transform;
+
+ typedef boost::geometry::model::d2::point_xy<double> point_2d;
+
+ try
+ {
+ std::string file("06_b_transformation_example.svg");
+ std::ofstream ofs(file.c_str());
+ svg_output<std::ofstream> svg(ofs, 0.5);
+
+ // G1 - create subject for affine transformations
+ model::polygon<point_2d> g1;
+ read_wkt("POLYGON((50 250, 400 250, 150 50, 50 250))", g1);
+ std::clog << "source box:\t" << boost::geometry::dsv(g1) << std::endl;
+ svg.put(g1, "g1");
+
+ // G1 - Translate -> G2
+ translate_transformer<double, 2, 2> translate(0, 250);
+ model::polygon<point_2d> g2;
+ transform(g1, g2, translate);
+ std::clog << "translated:\t" << boost::geometry::dsv(g2) << std::endl;
+ svg.put(g2, "g2=g1.translate(0,250)");
+
+ // G2 - Scale -> G3
+ scale_transformer<double, 2, 2> scale(0.5, 0.5);
+ model::polygon<point_2d> g3;
+ transform(g2, g3, scale);
+ std::clog << "scaled:\t" << boost::geometry::dsv(g3) << std::endl;
+ svg.put(g3, "g3=g2.scale(0.5,0.5)");
+
+ // G3 - Combine rotate and translate -> G4
+ rotate_transformer<degree, double, 2, 2> rotate(45);
+
+ // Compose matrix for the two transformation
+ // Create transformer attached to the transformation matrix
+ matrix_transformer<double, 2, 2> combined(rotate.matrix() * translate.matrix());
+
+ // Apply transformation to subject geometry point-by-point
+ model::polygon<point_2d> g4;
+ transform(g3, g4, combined);
+
+ std::clog << "rotated & translated:\t" << boost::geometry::dsv(g4) << std::endl;
+ svg.put(g4, "g4 = g3.(rotate(45) * translate(0,250))");
+
+ std::clog << "Saved SVG file:\t" << file << std::endl;
+ }
+ catch (std::exception const& e)
+ {
+ std::cerr << e.what() << std::endl;
+ }
+ catch (...)
+ {
+ std::cerr << "unknown error" << std::endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/07_a_graph_route_example.cpp b/src/boost/libs/geometry/example/07_a_graph_route_example.cpp
new file mode 100644
index 000000000..1b6786771
--- /dev/null
+++ b/src/boost/libs/geometry/example/07_a_graph_route_example.cpp
@@ -0,0 +1,387 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Example showing Boost.Geometry combined with Boost.Graph, calculating shortest routes
+// input: two WKT's, provided in subfolder data
+// output: text, + an SVG, displayable in e.g. Firefox)
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <limits>
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/foreach.hpp>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+// For output:
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+
+// For distance-calculations over the Earth:
+//#include <boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp>
+
+// Read an ASCII file containing WKT's, fill a vector of tuples
+// The tuples consist of at least <0> a geometry and <1> an identifying string
+template <typename Geometry, typename Tuple, typename Box>
+void read_wkt(std::string const& filename, std::vector<Tuple>& tuples, Box& box)
+{
+ std::ifstream cpp_file(filename.c_str());
+ if (cpp_file.is_open())
+ {
+ while (! cpp_file.eof() )
+ {
+ std::string line;
+ std::getline(cpp_file, line);
+ Geometry geometry;
+ boost::trim(line);
+ if (! line.empty() && ! boost::starts_with(line, "#"))
+ {
+ std::string name;
+
+ // Split at ';', if any
+ std::string::size_type pos = line.find(";");
+ if (pos != std::string::npos)
+ {
+ name = line.substr(pos + 1);
+ line.erase(pos);
+
+ boost::trim(line);
+ boost::trim(name);
+ }
+
+ Geometry geometry;
+ boost::geometry::read_wkt(line, geometry);
+
+ Tuple tuple(geometry, name);
+
+ tuples.push_back(tuple);
+ boost::geometry::expand(box, boost::geometry::return_envelope<Box>(geometry));
+ }
+ }
+ }
+}
+
+
+
+// Code to define properties for Boost Graph's
+enum vertex_bg_property_t { vertex_bg_property };
+enum edge_bg_property_t { edge_bg_property };
+namespace boost
+{
+ BOOST_INSTALL_PROPERTY(vertex, bg_property);
+ BOOST_INSTALL_PROPERTY(edge, bg_property);
+}
+
+// To calculate distance, declare and construct a strategy with average earth radius
+boost::geometry::strategy::distance::haversine<double> const haversine(6372795.0);
+
+// Define properties for vertex
+template <typename Point>
+struct bg_vertex_property
+{
+ bg_vertex_property()
+ {
+ boost::geometry::assign_zero(location);
+ }
+ bg_vertex_property(Point const& loc)
+ : location(loc)
+ {
+ }
+
+ Point location;
+};
+
+// Define properties for edge
+template <typename Linestring>
+struct bg_edge_property
+{
+ bg_edge_property(Linestring const& line)
+ : m_length(boost::geometry::length(line, haversine))
+ , m_line(line)
+ {
+ }
+
+ inline operator double() const
+ {
+ return m_length;
+ }
+
+ inline Linestring const& line() const
+ {
+ return m_line;
+ }
+
+private :
+ double m_length;
+ Linestring m_line;
+};
+
+// Utility function to add a vertex to a graph. It might exist already. Then do not insert,
+// but return vertex descriptor back. It might not exist. Then add it (and return).
+// To efficiently handle this, a std::map is used.
+template <typename M, typename K, typename G>
+inline typename boost::graph_traits<G>::vertex_descriptor find_or_insert(M& map, K const& key, G& graph)
+{
+ typename M::const_iterator it = map.find(key);
+ if (it == map.end())
+ {
+ // Add a vertex to the graph
+ typename boost::graph_traits<G>::vertex_descriptor new_vertex
+ = boost::add_vertex(graph);
+
+ // Set the property (= location)
+ boost::put(boost::get(vertex_bg_property, graph), new_vertex,
+ bg_vertex_property<typename M::key_type>(key));
+
+ // Add to the map, using POINT as key
+ map[key] = new_vertex;
+ return new_vertex;
+ }
+ return it->second;
+}
+
+template
+<
+ typename Graph,
+ typename RoadTupleVector,
+ typename CityTupleVector
+>
+void add_roads_and_connect_cities(Graph& graph,
+ RoadTupleVector const& roads,
+ CityTupleVector& cities)
+{
+ typedef typename boost::range_value<RoadTupleVector>::type road_type;
+ typedef typename boost::tuples::element<0, road_type>::type line_type;
+ typedef typename boost::geometry::point_type<line_type>::type point_type;
+
+ typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_type;
+
+ // Define a map to be used during graph filling
+ // Maps from point to vertex-id's
+ typedef std::map<point_type, vertex_type, boost::geometry::less<point_type> > map_type;
+ map_type map;
+
+
+ // Fill the graph
+ BOOST_FOREACH(road_type const& road, roads)
+ {
+ line_type const& line = road.template get<0>();
+ // Find or add begin/end point of these line
+ vertex_type from = find_or_insert(map, line.front(), graph);
+ vertex_type to = find_or_insert(map, line.back(), graph);
+ boost::add_edge(from, to, bg_edge_property<line_type>(line), graph);
+ }
+
+ // Find nearest graph vertex for each city, using the map
+ typedef typename boost::range_value<CityTupleVector>::type city_type;
+ BOOST_FOREACH(city_type& city, cities)
+ {
+ double min_distance = 1e300;
+ for(typename map_type::const_iterator it = map.begin(); it != map.end(); ++it)
+ {
+ double dist = boost::geometry::distance(it->first, city.template get<0>());
+ if (dist < min_distance)
+ {
+ min_distance = dist;
+ // Set the vertex
+ city.template get<2>() = it->second;
+ }
+ }
+ }
+}
+
+template <typename Graph, typename Route>
+inline void add_edge_to_route(Graph const& graph,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex1,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex2,
+ Route& route)
+{
+ std::pair
+ <
+ typename boost::graph_traits<Graph>::edge_descriptor,
+ bool
+ > opt_edge = boost::edge(vertex1, vertex2, graph);
+ if (opt_edge.second)
+ {
+ // Get properties of edge and of vertex
+ bg_edge_property<Route> const& edge_prop =
+ boost::get(boost::get(edge_bg_property, graph), opt_edge.first);
+
+ bg_vertex_property<typename boost::geometry::point_type<Route>::type> const& vertex_prop =
+ boost::get(boost::get(vertex_bg_property, graph), vertex2);
+
+ // Depending on how edge connects to vertex, copy it forward or backward
+ if (boost::geometry::equals(edge_prop.line().front(), vertex_prop.location))
+ {
+ std::copy(edge_prop.line().begin(), edge_prop.line().end(),
+ std::back_inserter(route));
+ }
+ else
+ {
+ std::reverse_copy(edge_prop.line().begin(), edge_prop.line().end(),
+ std::back_inserter(route));
+ }
+ }
+}
+
+
+template <typename Graph, typename Route>
+inline void build_route(Graph const& graph,
+ std::vector<typename boost::graph_traits<Graph>::vertex_descriptor> const& predecessors,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex1,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex2,
+ Route& route)
+{
+ typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_type;
+ vertex_type pred = predecessors[vertex2];
+
+ add_edge_to_route(graph, vertex2, pred, route);
+ while (pred != vertex1)
+ {
+ add_edge_to_route(graph, predecessors[pred], pred, route);
+ pred = predecessors[pred];
+ }
+}
+
+
+int main()
+{
+ // Define a point in the Geographic coordinate system (currently Spherical)
+ // (geographic calculations are in an extension; for sample it makes no difference)
+ typedef boost::geometry::model::point
+ <
+ double, 2, boost::geometry::cs::spherical_equatorial<boost::geometry::degree>
+ > point_type;
+
+ typedef boost::geometry::model::linestring<point_type> line_type;
+
+ // Define the graph, lateron containing the road network
+ typedef boost::adjacency_list
+ <
+ boost::vecS, boost::vecS, boost::undirectedS
+ , boost::property<vertex_bg_property_t, bg_vertex_property<point_type> >
+ , boost::property<edge_bg_property_t, bg_edge_property<line_type> >
+ > graph_type;
+
+ typedef boost::graph_traits<graph_type>::vertex_descriptor vertex_type;
+
+
+ // Init a bounding box, lateron used to define SVG map
+ boost::geometry::model::box<point_type> box;
+ boost::geometry::assign_inverse(box);
+
+ // Read the cities
+ typedef boost::tuple<point_type, std::string, vertex_type> city_type;
+ std::vector<city_type> cities;
+ read_wkt<point_type>("data/cities.wkt", cities, box);
+
+ // Read the road network
+ typedef boost::tuple<line_type, std::string> road_type;
+ std::vector<road_type> roads;
+ read_wkt<line_type>("data/roads.wkt", roads, box);
+
+
+ graph_type graph;
+
+ // Add roads and connect cities
+ add_roads_and_connect_cities(graph, roads, cities);
+
+ double const km = 1000.0;
+ std::cout << "distances, all in KM" << std::endl
+ << std::fixed << std::setprecision(0);
+
+ // Main functionality: calculate shortest routes from/to all cities
+
+
+ // For the first one, the complete route is stored as a linestring
+ bool first = true;
+ line_type route;
+
+ int const n = boost::num_vertices(graph);
+ BOOST_FOREACH(city_type const& city1, cities)
+ {
+ std::vector<vertex_type> predecessors(n);
+ std::vector<double> costs(n);
+
+ // Call Dijkstra (without named-parameter to be compatible with all VC)
+ boost::dijkstra_shortest_paths(graph, city1.get<2>(),
+ &predecessors[0], &costs[0],
+ boost::get(edge_bg_property, graph),
+ boost::get(boost::vertex_index, graph),
+ std::less<double>(), std::plus<double>(),
+ (std::numeric_limits<double>::max)(), double(),
+ boost::dijkstra_visitor<boost::null_visitor>());
+
+ BOOST_FOREACH(city_type const& city2, cities)
+ {
+ if (! boost::equals(city1.get<1>(), city2.get<1>()))
+ {
+ double distance = costs[city2.get<2>()] / km;
+ double acof = boost::geometry::distance(city1.get<0>(), city2.get<0>(), haversine) / km;
+
+ std::cout
+ << std::setiosflags (std::ios_base::left) << std::setw(15)
+ << city1.get<1>() << " - "
+ << std::setiosflags (std::ios_base::left) << std::setw(15)
+ << city2.get<1>()
+ << " -> through the air: " << std::setw(4) << acof
+ << " , over the road: " << std::setw(4) << distance
+ << std::endl;
+
+ if (first)
+ {
+ build_route(graph, predecessors,
+ city1.get<2>(), city2.get<2>(),
+ route);
+ first = false;
+ }
+ }
+ }
+ }
+
+#if defined(HAVE_SVG)
+ // Create the SVG
+ std::ofstream stream("routes.svg");
+ boost::geometry::svg_mapper<point_type> mapper(stream, 600, 600);
+
+ // Map roads
+ BOOST_FOREACH(road_type const& road, roads)
+ {
+ mapper.add(road.get<0>());
+ }
+
+ BOOST_FOREACH(road_type const& road, roads)
+ {
+ mapper.map(road.get<0>(),
+ "stroke:rgb(128,128,128);stroke-width:1");
+ }
+
+ mapper.map(route,
+ "stroke:rgb(0, 255, 0);stroke-width:6;opacity:0.5");
+
+ // Map cities
+ BOOST_FOREACH(city_type const& city, cities)
+ {
+ mapper.map(city.get<0>(),
+ "fill:rgb(255,255,0);stroke:rgb(0,0,0);stroke-width:1");
+ mapper.text(city.get<0>(), city.get<1>(),
+ "fill:rgb(0,0,0);font-family:Arial;font-size:10px", 5, 5);
+ }
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/07_b_graph_route_example.cpp b/src/boost/libs/geometry/example/07_b_graph_route_example.cpp
new file mode 100644
index 000000000..ca39839e7
--- /dev/null
+++ b/src/boost/libs/geometry/example/07_b_graph_route_example.cpp
@@ -0,0 +1,373 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Example showing Boost.Geometry combined with Boost.Graph, calculating shortest routes
+// input: two WKT's, provided in subfolder data
+// output: text, + an SVG, displayable in e.g. Firefox)
+
+
+// Second variant, with bundled properties
+
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <limits>
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/foreach.hpp>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+// For output:
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+
+// For distance-calculations over the Earth:
+//#include <boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp>
+
+
+
+// Read an ASCII file containing WKT's, fill a vector of tuples
+// The tuples consist of at least <0> a geometry and <1> an identifying string
+template <typename Geometry, typename Tuple, typename Box>
+void read_wkt(std::string const& filename, std::vector<Tuple>& tuples, Box& box)
+{
+ std::ifstream cpp_file(filename.c_str());
+ if (cpp_file.is_open())
+ {
+ while (! cpp_file.eof() )
+ {
+ std::string line;
+ std::getline(cpp_file, line);
+ Geometry geometry;
+ boost::trim(line);
+ if (! line.empty() && ! boost::starts_with(line, "#"))
+ {
+ std::string name;
+
+ // Split at ';', if any
+ std::string::size_type pos = line.find(";");
+ if (pos != std::string::npos)
+ {
+ name = line.substr(pos + 1);
+ line.erase(pos);
+
+ boost::trim(line);
+ boost::trim(name);
+ }
+
+ Geometry geometry;
+ boost::geometry::read_wkt(line, geometry);
+
+ Tuple tuple(geometry, name);
+
+ tuples.push_back(tuple);
+ boost::geometry::expand(box, boost::geometry::return_envelope<Box>(geometry));
+ }
+ }
+ }
+}
+
+// To calculate distance, declare and construct a strategy with average earth radius
+boost::geometry::strategy::distance::haversine<double> const haversine(6372795.0);
+
+// Define properties for vertex
+template <typename Point>
+struct bg_vertex_property
+{
+ bg_vertex_property()
+ {
+ boost::geometry::assign_zero(location);
+ }
+ bg_vertex_property(Point const& loc)
+ : location(loc)
+ {
+ }
+
+ Point location;
+};
+
+// Define properties for edge
+template <typename Linestring>
+struct bg_edge_property
+{
+ bg_edge_property(Linestring const& line)
+ : length(boost::geometry::length(line, haversine))
+ , m_line(line)
+ {
+ }
+
+ inline Linestring const& line() const
+ {
+ return m_line;
+ }
+
+ double length;
+private :
+ Linestring m_line;
+};
+
+// Utility function to add a vertex to a graph. It might exist already. Then do not insert,
+// but return vertex descriptor back. It might not exist. Then add it (and return).
+// To efficiently handle this, a std::map is used.
+template <typename M, typename K, typename G>
+inline typename boost::graph_traits<G>::vertex_descriptor find_or_insert(M& map, K const& key, G& graph)
+{
+ typename M::const_iterator it = map.find(key);
+ if (it == map.end())
+ {
+ // Add a vertex to the graph
+ typename boost::graph_traits<G>::vertex_descriptor new_vertex
+ = boost::add_vertex(bg_vertex_property<typename M::key_type>(key), graph);
+
+ // Add to the map, using POINT as key
+ map[key] = new_vertex;
+ return new_vertex;
+ }
+ return it->second;
+}
+
+template
+<
+ typename Graph,
+ typename RoadTupleVector,
+ typename CityTupleVector
+>
+void add_roads_and_connect_cities(Graph& graph,
+ RoadTupleVector const& roads,
+ CityTupleVector& cities)
+{
+ typedef typename boost::range_value<RoadTupleVector>::type road_type;
+ typedef typename boost::tuples::element<0, road_type>::type line_type;
+ typedef typename boost::geometry::point_type<line_type>::type point_type;
+
+ typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_type;
+
+ // Define a map to be used during graph filling
+ // Maps from point to vertex-id's
+ typedef std::map<point_type, vertex_type, boost::geometry::less<point_type> > map_type;
+ map_type map;
+
+
+ // Fill the graph
+ BOOST_FOREACH(road_type const& road, roads)
+ {
+ line_type const& line = road.template get<0>();
+ // Find or add begin/end point of these line
+ vertex_type from = find_or_insert(map, line.front(), graph);
+ vertex_type to = find_or_insert(map, line.back(), graph);
+ boost::add_edge(from, to, bg_edge_property<line_type>(line), graph);
+ }
+
+ // Find nearest graph vertex for each city, using the map
+ typedef typename boost::range_value<CityTupleVector>::type city_type;
+ BOOST_FOREACH(city_type& city, cities)
+ {
+ double min_distance = 1e300;
+ for(typename map_type::const_iterator it = map.begin(); it != map.end(); ++it)
+ {
+ double dist = boost::geometry::distance(it->first, city.template get<0>());
+ if (dist < min_distance)
+ {
+ min_distance = dist;
+ // Set the vertex
+ city.template get<2>() = it->second;
+ }
+ }
+ }
+}
+
+template <typename Graph, typename Route>
+inline void add_edge_to_route(Graph const& graph,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex1,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex2,
+ Route& route)
+{
+ std::pair
+ <
+ typename boost::graph_traits<Graph>::edge_descriptor,
+ bool
+ > opt_edge = boost::edge(vertex1, vertex2, graph);
+ if (opt_edge.second)
+ {
+ // Get properties of edge and of vertex
+ bg_edge_property<Route> const& edge_prop = graph[opt_edge.first];
+ bg_vertex_property
+ <
+ typename boost::geometry::point_type<Route>::type
+ > const& vertex_prop = graph[vertex2];
+
+ // Depending on how edge connects to vertex, copy it forward or backward
+ if (boost::geometry::equals(edge_prop.line().front(), vertex_prop.location))
+ {
+ std::copy(edge_prop.line().begin(), edge_prop.line().end(),
+ std::back_inserter(route));
+ }
+ else
+ {
+ std::reverse_copy(edge_prop.line().begin(), edge_prop.line().end(),
+ std::back_inserter(route));
+ }
+ }
+}
+
+
+template <typename Graph, typename Route>
+inline void build_route(Graph const& graph,
+ std::vector<typename boost::graph_traits<Graph>::vertex_descriptor> const& predecessors,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex1,
+ typename boost::graph_traits<Graph>::vertex_descriptor vertex2,
+ Route& route)
+{
+ typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_type;
+ vertex_type pred = predecessors[vertex2];
+
+ add_edge_to_route(graph, vertex2, pred, route);
+ while (pred != vertex1)
+ {
+ add_edge_to_route(graph, predecessors[pred], pred, route);
+ pred = predecessors[pred];
+ }
+}
+
+
+int main()
+{
+ // Define a point in the Geographic coordinate system (currently spherical-equatorial)
+ // (geographic calculations are in an extension; for sample it makes no difference)
+ typedef boost::geometry::model::point
+ <
+ double, 2, boost::geometry::cs::spherical_equatorial<boost::geometry::degree>
+ > point_type;
+
+ typedef boost::geometry::model::linestring<point_type> line_type;
+
+ // Define the graph, lateron containing the road network
+ // With this, specify bundled properties for vertex and edge,
+ // as in http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/bundles.html
+ typedef boost::adjacency_list
+ <
+ boost::vecS, boost::vecS, boost::undirectedS
+ , bg_vertex_property<point_type> // bundled
+ , bg_edge_property<line_type>
+ > graph_type;
+
+ typedef boost::graph_traits<graph_type>::vertex_descriptor vertex_type;
+
+
+ // Init a bounding box, lateron used to define SVG map
+ boost::geometry::model::box<point_type> box;
+ boost::geometry::assign_inverse(box);
+
+ graph_type graph;
+
+ // Read the cities
+ typedef boost::tuple<point_type, std::string, vertex_type> city_type;
+ std::vector<city_type> cities;
+ read_wkt<point_type>("data/cities.wkt", cities, box);
+
+ // Read the road network
+ typedef boost::tuple<line_type, std::string> road_type;
+ std::vector<road_type> roads;
+ read_wkt<line_type>("data/roads.wkt", roads, box);
+
+
+ // Add roads and connect cities
+ add_roads_and_connect_cities(graph, roads, cities);
+
+ double const km = 1000.0;
+ std::cout << "distances, all in KM" << std::endl
+ << std::fixed << std::setprecision(0);
+
+ // Main functionality: calculate shortest routes from/to all cities
+
+ // For the first one, the complete route is stored as a linestring
+ bool first = true;
+ line_type route;
+
+ int const n = boost::num_vertices(graph);
+ BOOST_FOREACH(city_type const& city1, cities)
+ {
+ std::vector<vertex_type> predecessors(n);
+ std::vector<double> costs(n);
+
+ // Call Dijkstra (without named-parameter to be compatible with all VC)
+ boost::dijkstra_shortest_paths(graph, city1.get<2>(),
+ &predecessors[0], &costs[0],
+ boost::get(&bg_edge_property<line_type>::length, graph),
+ boost::get(boost::vertex_index, graph),
+ std::less<double>(), std::plus<double>(),
+ (std::numeric_limits<double>::max)(), double(),
+ boost::dijkstra_visitor<boost::null_visitor>());
+
+ BOOST_FOREACH(city_type const& city2, cities)
+ {
+ if (! boost::equals(city1.get<1>(), city2.get<1>()))
+ {
+ double distance = costs[city2.get<2>()] / km;
+ double acof = boost::geometry::distance(city1.get<0>(), city2.get<0>(), haversine) / km;
+
+ std::cout
+ << std::setiosflags (std::ios_base::left) << std::setw(15)
+ << city1.get<1>() << " - "
+ << std::setiosflags (std::ios_base::left) << std::setw(15)
+ << city2.get<1>()
+ << " -> through the air: " << std::setw(4) << acof
+ << " , over the road: " << std::setw(4) << distance
+ << std::endl;
+
+ if (first)
+ {
+ build_route(graph, predecessors,
+ city1.get<2>(), city2.get<2>(),
+ route);
+ first = false;
+ }
+ }
+ }
+ }
+
+#if defined(HAVE_SVG)
+ // Create the SVG
+ std::ofstream stream("routes.svg");
+ boost::geometry::svg_mapper<point_type> mapper(stream, 600, 600);
+
+ // Map roads
+ BOOST_FOREACH(road_type const& road, roads)
+ {
+ mapper.add(road.get<0>());
+ }
+
+ BOOST_FOREACH(road_type const& road, roads)
+ {
+ mapper.map(road.get<0>(),
+ "stroke:rgb(128,128,128);stroke-width:1");
+ }
+
+ mapper.map(route,
+ "stroke:rgb(0, 255, 0);stroke-width:6;opacity:0.5");
+
+ // Map cities
+ BOOST_FOREACH(city_type const& city, cities)
+ {
+ mapper.map(city.get<0>(),
+ "fill:rgb(255,255,0);stroke:rgb(0,0,0);stroke-width:1");
+ mapper.text(city.get<0>(), city.get<1>(),
+ "fill:rgb(0,0,0);font-family:Arial;font-size:10px", 5, 5);
+ }
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/Jamfile b/src/boost/libs/geometry/example/Jamfile
new file mode 100644
index 000000000..17fae5000
--- /dev/null
+++ b/src/boost/libs/geometry/example/Jamfile
@@ -0,0 +1,38 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+# Controls building of Boost.Geometry examples
+#
+# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost-geometry-example
+ : # requirements
+ ;
+
+exe 01_point_example : 01_point_example.cpp ;
+exe 02_linestring_example : 02_linestring_example.cpp ;
+exe 03_polygon_example : 03_polygon_example.cpp ;
+exe 05_a_overlay_polygon_example : 05_a_overlay_polygon_example.cpp ;
+exe 05_b_overlay_linestring_polygon_example : 05_b_overlay_linestring_polygon_example.cpp ;
+exe 06_a_transformation_example : 06_a_transformation_example.cpp ;
+exe 06_b_transformation_example : 06_b_transformation_example.cpp ;
+exe 07_a_graph_route_example : 07_a_graph_route_example.cpp ;
+exe 07_b_graph_route_example : 07_b_graph_route_example.cpp ;
+
+exe c01_custom_point_example : c01_custom_point_example.cpp ;
+exe c02_custom_box_example : c02_custom_box_example.cpp ;
+exe c03_custom_linestring_example : c03_custom_linestring_example.cpp ;
+exe c04_a_custom_triangle_example : c04_a_custom_triangle_example.cpp ;
+exe c04_b_custom_triangle_example : c04_b_custom_triangle_example.cpp ;
+exe c05_custom_point_pointer_example : c05_custom_point_pointer_example.cpp ;
+exe c06_custom_polygon_example : c06_custom_polygon_example.cpp ;
+exe c07_custom_ring_pointer_example : c07_custom_ring_pointer_example.cpp ;
+exe c08_custom_non_std_example : c08_custom_non_std_example.cpp ;
+exe c09_custom_fusion_example : c09_custom_fusion_example.cpp ;
+exe c10_custom_cs_example : c10_custom_cs_example.cpp ;
+exe c11_custom_cs_transform_example : c11_custom_cs_transform_example.cpp ;
diff --git a/src/boost/libs/geometry/example/c01_custom_point_example.cpp b/src/boost/libs/geometry/example/c01_custom_point_example.cpp
new file mode 100644
index 000000000..6fa5957e3
--- /dev/null
+++ b/src/boost/libs/geometry/example/c01_custom_point_example.cpp
@@ -0,0 +1,160 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom point Example
+
+#include <iostream>
+
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+// Sample point, defining three color values
+struct my_color_point
+{
+ double red, green, blue;
+};
+
+// Sample point, having an int array defined
+struct my_array_point
+{
+ int c[3];
+};
+
+// Sample point, having x/y
+struct my_2d
+{
+ float x,y;
+};
+
+// Sample class, protected and construction-time-only x/y,
+// Can (of course) only used in algorithms which take const& points
+class my_class_ro
+{
+public:
+ my_class_ro(double x, double y) : m_x(x), m_y(y) {}
+ double x() const { return m_x; }
+ double y() const { return m_y; }
+private:
+ double m_x, m_y;
+};
+
+// Sample class using references for read/write
+class my_class_rw
+{
+public:
+ const double& x() const { return m_x; }
+ const double& y() const { return m_y; }
+ double& x() { return m_x; }
+ double& y() { return m_y; }
+private:
+ double m_x, m_y;
+};
+
+// Sample class using getters / setters
+class my_class_gs
+{
+public:
+ const double get_x() const { return m_x; }
+ const double get_y() const { return m_y; }
+ void set_x(double v) { m_x = v; }
+ void set_y(double v) { m_y = v; }
+private:
+ double m_x, m_y;
+};
+
+// Sample point within a namespace
+namespace my
+{
+ struct my_namespaced_point
+ {
+ double x, y;
+ };
+}
+
+
+
+BOOST_GEOMETRY_REGISTER_POINT_3D(my_color_point, double, cs::cartesian, red, green, blue)
+BOOST_GEOMETRY_REGISTER_POINT_3D(my_array_point, int, cs::cartesian, c[0], c[1], c[2])
+BOOST_GEOMETRY_REGISTER_POINT_2D(my_2d, float, cs::cartesian, x, y)
+BOOST_GEOMETRY_REGISTER_POINT_2D_CONST(my_class_ro, double, cs::cartesian, x(), y())
+BOOST_GEOMETRY_REGISTER_POINT_2D(my_class_rw, double, cs::cartesian, x(), y())
+BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(my_class_gs, double, cs::cartesian, get_x, get_y, set_x, set_y)
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(my::my_namespaced_point, double, cs::cartesian, x, y)
+
+
+int main()
+{
+ // Create 2 instances of our custom color point
+ my_color_point c1 = boost::geometry::make<my_color_point>(255, 3, 233);
+ my_color_point c2 = boost::geometry::make<my_color_point>(0, 50, 200);
+
+ // The distance between them can be calculated using the cartesian method (=pythagoras)
+ // provided with the library, configured by the coordinate_system type of the point
+ std::cout << "color distance "
+ << boost::geometry::dsv(c1) << " to "
+ << boost::geometry::dsv(c2) << " is "
+ << boost::geometry::distance(c1,c2) << std::endl;
+
+ my_array_point a1 = {{0}};
+ my_array_point a2 = {{0}};
+ boost::geometry::assign_values(a1, 1, 2, 3);
+ boost::geometry::assign_values(a2, 3, 2, 1);
+
+ std::cout << "color distance "
+ << boost::geometry::dsv(a1) << " to "
+ << boost::geometry::dsv(a2) << " is "
+ << boost::geometry::distance(a1,a2) << std::endl;
+
+ my_2d p1 = {1, 5};
+ my_2d p2 = {3, 4};
+ std::cout << "float distance "
+ << boost::geometry::dsv(p1) << " to "
+ << boost::geometry::dsv(p2) << " is "
+ << boost::geometry::distance(p1,p2) << std::endl;
+
+ my_class_ro cro1(1, 2);
+ my_class_ro cro2(3, 4);
+ std::cout << "class ro distance "
+ << boost::geometry::dsv(cro1) << " to "
+ << boost::geometry::dsv(cro2) << " is "
+ << boost::geometry::distance(cro1,cro2) << std::endl;
+
+ my_class_rw crw1;
+ my_class_rw crw2;
+ boost::geometry::assign_values(crw1, 1, 2);
+ boost::geometry::assign_values(crw2, 3, 4);
+ std::cout << "class r/w distance "
+ << boost::geometry::dsv(crw1) << " to "
+ << boost::geometry::dsv(crw2) << " is "
+ << boost::geometry::distance(crw1,crw2) << std::endl;
+
+ my_class_gs cgs1;
+ my_class_gs cgs2;
+ boost::geometry::assign_values(cgs1, 1, 2);
+ boost::geometry::assign_values(cgs2, 3, 4);
+ std::cout << "class g/s distance "
+ << boost::geometry::dsv(crw1) << " to "
+ << boost::geometry::dsv(crw2) << " is "
+ << boost::geometry::distance(cgs1,cgs2) << std::endl;
+
+ my::my_namespaced_point nsp1 = boost::geometry::make<my::my_namespaced_point>(1, 2);
+ my::my_namespaced_point nsp2 = boost::geometry::make<my::my_namespaced_point>(3, 4);
+ std::cout << "namespaced distance "
+ << boost::geometry::dsv(nsp1) << " to "
+ << boost::geometry::dsv(nsp2) << " is "
+ << boost::geometry::distance(nsp1,nsp2) << std::endl;
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c02_custom_box_example.cpp b/src/boost/libs/geometry/example/c02_custom_box_example.cpp
new file mode 100644
index 000000000..ef6438d1a
--- /dev/null
+++ b/src/boost/libs/geometry/example/c02_custom_box_example.cpp
@@ -0,0 +1,78 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom Box Example
+
+#include <iostream>
+
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/box.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+struct my_point
+{
+ double x, y;
+};
+
+struct my_int_point
+{
+ int x, y;
+};
+
+struct my_box
+{
+ my_point ll, ur;
+};
+
+struct my_box_ltrb
+{
+ int left, top, right, bottom;
+};
+
+struct my_box_4
+{
+ double coors[4];
+};
+
+template <typename P>
+struct my_box_t
+{
+ P ll, ur;
+};
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(my_point, double, cs::cartesian, x, y)
+BOOST_GEOMETRY_REGISTER_POINT_2D(my_int_point, int, cs::cartesian, x, y)
+BOOST_GEOMETRY_REGISTER_BOX(my_box, my_point, ll, ur)
+BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED(my_box_t, ll, ur)
+BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES(my_box_ltrb, my_int_point, left, top, right, bottom)
+BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES(my_box_4, my_point, coors[0], coors[1], coors[2], coors[3])
+
+int main()
+{
+ my_point p = boost::geometry::make<my_point>(3.5, 3.5);
+ my_box b = boost::geometry::make<my_box>(0, 0, 2, 2);
+ my_box_ltrb b1 = boost::geometry::make<my_box_ltrb>(0, 0, 3, 3);
+ my_box_4 b4 = boost::geometry::make<my_box_4>(0, 0, 4, 4);
+ my_box_t<my_point> bt = boost::geometry::make<my_box_t<my_point> >(0, 0, 5, 5);
+
+ std::cout << boost::geometry::dsv(p) << " IN " << boost::geometry::dsv(b)
+ << " : " << int(boost::geometry::within(p, b)) << std::endl;
+ std::cout << boost::geometry::dsv(p) << " IN " << boost::geometry::dsv(b1)
+ << " : " << int(boost::geometry::within(p, b1)) << std::endl;
+ std::cout << boost::geometry::dsv(p) << " IN " << boost::geometry::dsv(b4)
+ << " : " << int(boost::geometry::within(p, b4)) << std::endl;
+ std::cout << boost::geometry::dsv(p) << " IN " << boost::geometry::dsv(bt)
+ << " : " << int(boost::geometry::within(p, bt)) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c03_custom_linestring_example.cpp b/src/boost/libs/geometry/example/c03_custom_linestring_example.cpp
new file mode 100644
index 000000000..587695749
--- /dev/null
+++ b/src/boost/libs/geometry/example/c03_custom_linestring_example.cpp
@@ -0,0 +1,85 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom Linestring Example
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <boost/geometry/extensions/algorithms/parse.hpp>
+
+// Define a GPS point with coordinates in latitude/longitude and some additional values
+struct gps_point
+{
+ double latitude, longitude, height;
+ double speed;
+ // Date/time, heading, etc could be added
+
+ // The default constructor is required if being used in a vector
+ gps_point() {}
+
+ // Define a constructor to create the point in one line. Order of latitude/longitude
+ // does not matter as long as "E", "N", etc are included
+ gps_point(std::string const& c1, std::string const& c2, double h, double s)
+ : height(h)
+ , speed(s)
+ {
+ boost::geometry::parse(*this, c1, c2);
+ }
+};
+
+// Declare a custom linestring which will have the GPS points
+struct gps_track : std::vector<gps_point>
+{
+ std::string owner;
+ int route_identifier;
+ // etc
+
+ gps_track(int i, std::string const& o)
+ : owner(o)
+ , route_identifier(i)
+ {}
+};
+
+
+// Register this point as being a recognizable point by Boost.Geometry
+BOOST_GEOMETRY_REGISTER_POINT_2D(gps_point, double, cs::geographic<degree>, longitude, latitude)
+
+// Register the track as well, as being a "linestring"
+BOOST_GEOMETRY_REGISTER_LINESTRING(gps_track)
+
+
+int main()
+{
+ // Declare a "GPS Track" and add some GPS points
+ gps_track track(23, "Mister G");
+ track.push_back(gps_point("52 22 23 N", "4 53 32 E", 50, 180));
+ track.push_back(gps_point("52 10 00 N", "4 59 59 E", 110, 170));
+ track.push_back(gps_point("52 5 20 N", "5 6 56 E", 0, 90));
+
+ std::cout
+ << "track: " << track.route_identifier << std::endl
+ << "from: " << track.owner << std::endl
+ << "as wkt: " << boost::geometry::dsv(track) << std::endl
+ << "length: " << boost::geometry::length(track)/1000.0 << " km" << std::endl;
+
+ // Above gives the idea, shows that custom linestrings can be useful.
+ // We could of course do anything with this track which the library can handle, e.g.:
+ // - simplify it
+ // - calculate distance of point-to-line
+ // - project it to UTM, then transform it to a GIF image (see p03_example)
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c04_a_custom_triangle_example.cpp b/src/boost/libs/geometry/example/c04_a_custom_triangle_example.cpp
new file mode 100644
index 000000000..5b255e421
--- /dev/null
+++ b/src/boost/libs/geometry/example/c04_a_custom_triangle_example.cpp
@@ -0,0 +1,83 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom Triangle Example
+
+#include <iostream>
+
+#include <boost/array.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/centroid.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+
+struct triangle : public boost::array<boost::geometry::model::d2::point_xy<double>, 4>
+{
+ inline void close()
+ {
+ (*this)[3] = (*this)[0];
+ }
+};
+
+
+// Register triangle as a ring
+BOOST_GEOMETRY_REGISTER_RING(triangle)
+
+
+// Specializations of algorithms, where useful. If not specialized the default ones
+// (for linear rings) will be used for triangle. Which is OK as long as the triangle
+// is closed, that means, has 4 points (the last one being the first).
+namespace boost { namespace geometry {
+
+template<>
+inline double area<triangle>(const triangle& t)
+{
+ /* C
+ / \
+ / \
+ A-----B
+
+ ((Bx - Ax) * (Cy - Ay)) - ((Cx - Ax) * (By - Ay))
+ -------------------------------------------------
+ 2
+ */
+
+ return 0.5 * ((t[1].x() - t[0].x()) * (t[2].y() - t[0].y())
+ - (t[2].x() - t[0].x()) * (t[1].y() - t[0].y()));
+}
+
+}} // namespace boost::geometry
+
+int main()
+{
+ triangle t;
+
+ t[0].x(0);
+ t[0].y(0);
+ t[1].x(5);
+ t[1].y(0);
+ t[2].x(2.5);
+ t[2].y(2.5);
+
+ t.close();
+
+ std::cout << "Triangle: " << boost::geometry::dsv(t) << std::endl;
+ std::cout << "Area: " << boost::geometry::area(t) << std::endl;
+
+ boost::geometry::model::d2::point_xy<double> c;
+ boost::geometry::centroid(t, c);
+ std::cout << "Centroid: " << boost::geometry::dsv(c) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c04_b_custom_triangle_example.cpp b/src/boost/libs/geometry/example/c04_b_custom_triangle_example.cpp
new file mode 100644
index 000000000..320dc6ede
--- /dev/null
+++ b/src/boost/libs/geometry/example/c04_b_custom_triangle_example.cpp
@@ -0,0 +1,72 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom triangle template Example
+
+#include <iostream>
+
+#include <boost/array.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/centroid.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+struct triangle : public boost::array<P, 3>
+{
+};
+
+
+// Register triangle<P> as a ring
+BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(triangle)
+
+
+namespace boost { namespace geometry { namespace dispatch {
+
+// Specializations of area dispatch structure, implement algorithm
+template<typename Point>
+struct area<triangle<Point>, ring_tag>
+{
+ template <typename Strategy>
+ static inline double apply(triangle<Point> const& t, Strategy const&)
+ {
+ return 0.5 * ((get<0>(t[1]) - get<0>(t[0])) * (get<1>(t[2]) - get<1>(t[0]))
+ - (get<0>(t[2]) - get<0>(t[0])) * (get<1>(t[1]) - get<1>(t[0])));
+ }
+};
+
+}}} // namespace boost::geometry::dispatch
+
+
+int main()
+{
+ //triangle<boost::geometry::point_xy<double> > t;
+ triangle<boost::tuple<double, double> > t;
+ t[0] = boost::make_tuple(0, 0);
+ t[1] = boost::make_tuple(5, 0);
+ t[2] = boost::make_tuple(2.5, 2.5);
+
+ std::cout << "Triangle: " << boost::geometry::dsv(t) << std::endl;
+ std::cout << "Area: " << boost::geometry::area(t) << std::endl;
+
+ //boost::geometry::point_xy<double> c;
+ boost::tuple<double, double> c;
+ boost::geometry::centroid(t, c);
+ std::cout << "Centroid: " << boost::geometry::dsv(c) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c05_custom_point_pointer_example.cpp b/src/boost/libs/geometry/example/c05_custom_point_pointer_example.cpp
new file mode 100644
index 000000000..d8059fe04
--- /dev/null
+++ b/src/boost/libs/geometry/example/c05_custom_point_pointer_example.cpp
@@ -0,0 +1,120 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom pointer-to-point example
+
+#include <iostream>
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+// Sample point, having x/y
+struct my_point
+{
+ double x,y;
+};
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template<> struct tag<my_point>
+{ typedef point_tag type; };
+
+template<> struct coordinate_type<my_point>
+{ typedef double type; };
+
+template<> struct coordinate_system<my_point>
+{ typedef cs::cartesian type; };
+
+template<> struct dimension<my_point> : boost::mpl::int_<2> {};
+
+template<>
+struct access<my_point, 0>
+{
+ static double get(my_point const& p)
+ {
+ return p.x;
+ }
+
+ static void set(my_point& p, double const& value)
+ {
+ p.x = value;
+ }
+};
+
+template<>
+struct access<my_point, 1>
+{
+ static double get(my_point const& p)
+ {
+ return p.y;
+ }
+
+ static void set(my_point& p, double const& value)
+ {
+ p.y = value;
+ }
+};
+
+}}} // namespace boost::geometry::traits
+
+
+
+int main()
+{
+ typedef std::vector<my_point*> ln;
+ ln myline;
+ for (float i = 0.0; i < 10.0; i++)
+ {
+ my_point* p = new my_point;
+ p->x = i;
+ p->y = i + 1;
+ myline.push_back(p);
+ }
+
+ std::cout << boost::geometry::length(myline) << std::endl;
+
+ typedef boost::geometry::model::d2::point_xy<double> point_2d;
+ typedef boost::geometry::model::box<point_2d> box_2d;
+ box_2d cb(point_2d(1.5, 1.5), point_2d(4.5, 4.5));
+
+ // This will NOT work because would need dynamicly allocating memory for point* in algorithms:
+ // std::vector<ln> clipped;
+ //boost::geometry::intersection(cb, myline, clipped);
+
+ // This works because outputs to a normal struct point, no point*
+ typedef boost::geometry::model::linestring<point_2d> linestring_2d;
+ std::vector<linestring_2d> clipped;
+ boost::geometry::strategy::intersection::liang_barsky<box_2d, point_2d> strategy;
+ boost::geometry::detail::intersection::clip_range_with_box<linestring_2d>(cb,
+ myline, std::back_inserter(clipped), strategy);
+
+
+ std::cout << boost::geometry::length(clipped.front()) << std::endl;
+
+ // free
+ BOOST_FOREACH(my_point* p, myline)
+ {
+ delete p;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c06_custom_polygon_example.cpp b/src/boost/libs/geometry/example/c06_custom_polygon_example.cpp
new file mode 100644
index 000000000..a69a31c67
--- /dev/null
+++ b/src/boost/libs/geometry/example/c06_custom_polygon_example.cpp
@@ -0,0 +1,141 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom Polygon Example
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+
+
+struct my_point
+{
+ my_point(double an_x = 0, double an_y = 0)
+ : x(an_x)
+ , y(an_y)
+ {}
+
+ double x, y;
+};
+
+struct my_ring : std::deque<my_point>
+{};
+
+// Define a struct of a polygon, having always two holes
+// (of course this can be implemented differently, usually
+// with a vector or deque, but it is just an exampe)
+struct my_polygon
+{
+ // required for a polygon: an outer ring...
+ my_ring boundary;
+ // ... and a Boost.Range compatible inner ring collection
+ boost::array<my_ring, 2> holes;
+
+ // just for the sample
+ std::string name;
+
+ my_polygon(std::string const& n = "") : name(n) {}
+};
+
+
+// We can conveniently use macro's to register point and ring
+BOOST_GEOMETRY_REGISTER_POINT_2D(my_point, double, cs::cartesian, x, y)
+BOOST_GEOMETRY_REGISTER_RING(my_ring)
+
+
+
+// There is currently no registration macro for polygons
+// and besides that a boost::array<T,N> in a macro would
+// be very specific, so we show it "by hand":
+namespace boost { namespace geometry { namespace traits
+{
+
+template<> struct tag<my_polygon> { typedef polygon_tag type; };
+template<> struct ring_const_type<my_polygon> { typedef my_ring const& type; };
+template<> struct ring_mutable_type<my_polygon> { typedef my_ring& type; };
+
+template<> struct interior_const_type<my_polygon>
+{
+ typedef boost::array<my_ring, 2> const& type;
+};
+
+template<> struct interior_mutable_type<my_polygon>
+{
+ typedef boost::array<my_ring, 2>& type;
+};
+
+template<> struct exterior_ring<my_polygon>
+{
+ static my_ring& get(my_polygon& p)
+ {
+ return p.boundary;
+ }
+
+ static my_ring const& get(my_polygon const& p)
+ {
+ return p.boundary;
+ }
+};
+
+template<> struct interior_rings<my_polygon>
+{
+ typedef boost::array<my_ring, 2> holes_type;
+
+ static holes_type& get(my_polygon& p)
+ {
+ return p.holes;
+ }
+
+ static holes_type const& get(my_polygon const& p)
+ {
+ return p.holes;
+ }
+};
+
+}}} // namespace boost::geometry::traits
+
+
+
+int main()
+{
+ my_polygon p1("my polygon");
+
+ // Fill it the my-way, triangle
+ p1.boundary.push_back(my_point(2, 0));
+ p1.boundary.push_back(my_point(1, 5));
+ p1.boundary.push_back(my_point(7, 6));
+ p1.boundary.push_back(my_point(2, 0));
+
+ // Triangle
+ p1.holes[0].push_back(my_point(2, 1));
+ p1.holes[0].push_back(my_point(2.4, 2));
+ p1.holes[0].push_back(my_point(1.9, 2));
+ p1.holes[0].push_back(my_point(2, 1));
+
+ // Box
+ p1.holes[1].push_back(my_point(3, 3));
+ p1.holes[1].push_back(my_point(4, 3));
+ p1.holes[1].push_back(my_point(4, 4));
+ p1.holes[1].push_back(my_point(3, 4));
+ p1.holes[1].push_back(my_point(3, 3));
+
+ std::cout << "Representation of " << p1.name << ": "
+ << boost::geometry::dsv(p1) << std::endl;
+ std::cout << "Area of " << p1.name << ": "
+ << boost::geometry::area(p1) << std::endl;
+ std::cout << "Perimeter of " << p1.name << ": "
+ << boost::geometry::perimeter(p1) << std::endl;
+ std::cout << "Centroid of " << p1.name << ": "
+ << boost::geometry::dsv(boost::geometry::return_centroid<my_point>(p1)) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c07_custom_ring_pointer_example.cpp b/src/boost/libs/geometry/example/c07_custom_ring_pointer_example.cpp
new file mode 100644
index 000000000..9126e04bc
--- /dev/null
+++ b/src/boost/libs/geometry/example/c07_custom_ring_pointer_example.cpp
@@ -0,0 +1,146 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom pointer-to-point example
+
+#include <iostream>
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+
+BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(std::vector)
+
+
+// Sample point, having x/y
+struct my_point
+{
+ my_point(double a = 0, double b = 0)
+ : x(a), y(b)
+ {}
+ double x,y;
+};
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template<> struct tag<my_point>
+{ typedef point_tag type; };
+
+template<> struct coordinate_type<my_point>
+{ typedef double type; };
+
+template<> struct coordinate_system<my_point>
+{ typedef cs::cartesian type; };
+
+template<> struct dimension<my_point> : boost::mpl::int_<2> {};
+
+template<>
+struct access<my_point, 0>
+{
+ static double get(my_point const& p)
+ {
+ return p.x;
+ }
+
+ static void set(my_point& p, double const& value)
+ {
+ p.x = value;
+ }
+};
+
+template<>
+struct access<my_point, 1>
+{
+ static double get(my_point const& p)
+ {
+ return p.y;
+ }
+
+ static void set(my_point& p, double const& value)
+ {
+ p.y = value;
+ }
+};
+
+}}} // namespace boost::geometry::traits
+
+
+
+int main()
+{
+ typedef std::vector<my_point*> ring_type;
+
+ ring_type a, b;
+
+ a.push_back(new my_point(0, 1));
+ a.push_back(new my_point(2, 5));
+ a.push_back(new my_point(5, 3));
+ a.push_back(new my_point(0, 1));
+
+ b.push_back(new my_point(3, 0));
+ b.push_back(new my_point(0, 3));
+ b.push_back(new my_point(4, 5));
+ b.push_back(new my_point(3, 0));
+
+ double aa = boost::geometry::area(a);
+ double ab = boost::geometry::area(b);
+
+ std::cout << "a: " << aa << std::endl;
+ std::cout << "b: " << ab << std::endl;
+
+ // This will NOT work because would need dynamicly allocating memory for point* in algorithms:
+ //std::vector<ring_type> unioned;
+ //boost::geometry::union<ring_type>(a, b, unioned);
+
+ // BEGIN TODO
+ // This compiles (and once worked) using pointers, but has to be fixed or deprecated
+ // The problem is now the cart_intersect/side where a temporary point is generated
+ //typedef boost::geometry::model::ring<boost::geometry::model::d2::point_xy<double> > ring_2d;
+ //std::vector<ring_2d> unioned;
+ //std::vector<ring_2d> intersected;
+
+ //boost::geometry::intersection(a, b, intersected);
+ //boost::geometry::union_(a, b, unioned);
+
+ //double ai = 0, au = 0;
+ //BOOST_FOREACH(ring_2d const& ring, intersected)
+ //{
+ // ai += boost::geometry::area(ring);
+ //}
+ //BOOST_FOREACH(ring_2d const& ring, unioned)
+ //{
+ // au += boost::geometry::area(ring);
+ //}
+
+ //std::cout << "a: " << aa << std::endl;
+ //std::cout << "b: " << ab << std::endl;
+ //std::cout << "a & b: " << ai << std::endl;
+ //std::cout << "a | b: " << au << std::endl;
+ //std::cout << "a + b - (a & b): " << (aa + ab - ai) << std::endl;
+ // END TODO
+
+
+ // free
+ BOOST_FOREACH(my_point* p, a)
+ {
+ delete p;
+ }
+
+ BOOST_FOREACH(my_point* p, b)
+ {
+ delete p;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c08_custom_non_std_example.cpp b/src/boost/libs/geometry/example/c08_custom_non_std_example.cpp
new file mode 100644
index 000000000..0a545a3de
--- /dev/null
+++ b/src/boost/libs/geometry/example/c08_custom_non_std_example.cpp
@@ -0,0 +1,323 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom polygon example
+
+#include <iostream>
+
+#include <boost/assert.hpp>
+
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+#include <boost/geometry/util/add_const_if_c.hpp>
+
+// Sample point, having x/y
+struct my_point
+{
+ my_point(double a = 0, double b = 0)
+ : x(a), y(b)
+ {}
+ double x,y;
+};
+
+// Sample polygon, having legacy methods
+// (similar to e.g. COM objects)
+class my_polygon
+{
+ std::vector<my_point> points;
+ public :
+ void add_point(my_point const& p) { points.push_back(p); }
+
+ // Const access
+ my_point const& get_point(std::size_t i) const
+ {
+ BOOST_ASSERT(i < points.size());
+ return points[i];
+ }
+
+ // Mutable access
+ my_point & get_point(std::size_t i)
+ {
+ BOOST_ASSERT(i < points.size());
+ return points[i];
+ }
+
+
+ int point_count() const { return points.size(); }
+ void erase_all() { points.clear(); }
+
+ inline void set_size(int n) { points.resize(n); }
+};
+
+// ----------------------------------------------------------------------------
+// Adaption: implement iterator and range-extension, and register with Boost.Geometry
+
+// 1) implement iterator (const and non-const versions)
+template<typename MyPolygon>
+struct custom_iterator : public boost::iterator_facade
+ <
+ custom_iterator<MyPolygon>,
+ my_point,
+ boost::random_access_traversal_tag,
+ typename boost::mpl::if_
+ <
+ boost::is_const<MyPolygon>,
+ my_point const,
+ my_point
+ >::type&
+ >
+{
+ // Constructor for begin()
+ explicit custom_iterator(MyPolygon& polygon)
+ : m_polygon(&polygon)
+ , m_index(0)
+ {}
+
+ // Constructor for end()
+ explicit custom_iterator(bool, MyPolygon& polygon)
+ : m_polygon(&polygon)
+ , m_index(polygon.point_count())
+ {}
+
+
+ // Default constructor
+ explicit custom_iterator()
+ : m_polygon(NULL)
+ , m_index(-1)
+ {}
+
+ typedef typename boost::mpl::if_
+ <
+ boost::is_const<MyPolygon>,
+ my_point const,
+ my_point
+ >::type my_point_type;
+
+private:
+ friend class boost::iterator_core_access;
+
+
+ typedef boost::iterator_facade
+ <
+ custom_iterator<MyPolygon>,
+ my_point,
+ boost::random_access_traversal_tag,
+ my_point_type&
+ > facade;
+
+ MyPolygon* m_polygon;
+ int m_index;
+
+ bool equal(custom_iterator const& other) const
+ {
+ return this->m_index == other.m_index;
+ }
+ typename facade::difference_type distance_to(custom_iterator const& other) const
+ {
+ return other.m_index - this->m_index;
+ }
+
+ void advance(typename facade::difference_type n)
+ {
+ m_index += n;
+ if(m_polygon != NULL
+ && (m_index >= m_polygon->point_count()
+ || m_index < 0)
+ )
+ {
+ m_index = m_polygon->point_count();
+ }
+ }
+
+ void increment()
+ {
+ advance(1);
+ }
+
+ void decrement()
+ {
+ advance(-1);
+ }
+
+ // const and non-const dereference of this iterator
+ my_point_type& dereference() const
+ {
+ return m_polygon->get_point(m_index);
+ }
+};
+
+
+
+
+// 2) Implement Boost.Range const functionality
+// using method 2, "provide free-standing functions and specialize metafunctions"
+// 2a) meta-functions
+namespace boost
+{
+ template<> struct range_mutable_iterator<my_polygon>
+ {
+ typedef custom_iterator<my_polygon> type;
+ };
+
+ template<> struct range_const_iterator<my_polygon>
+ {
+ typedef custom_iterator<my_polygon const> type;
+ };
+
+ // RangeEx
+ template<> struct range_size<my_polygon>
+ {
+ typedef std::size_t type;
+ };
+
+} // namespace 'boost'
+
+
+// 2b) free-standing function for Boost.Range ADP
+inline custom_iterator<my_polygon> range_begin(my_polygon& polygon)
+{
+ return custom_iterator<my_polygon>(polygon);
+}
+
+inline custom_iterator<my_polygon const> range_begin(my_polygon const& polygon)
+{
+ return custom_iterator<my_polygon const>(polygon);
+}
+
+inline custom_iterator<my_polygon> range_end(my_polygon& polygon)
+{
+ return custom_iterator<my_polygon>(true, polygon);
+}
+
+inline custom_iterator<my_polygon const> range_end(my_polygon const& polygon)
+{
+ return custom_iterator<my_polygon const>(true, polygon);
+}
+
+
+
+// 3) optional, for writable geometries only, implement push_back/resize/clear
+namespace boost { namespace geometry { namespace traits
+{
+
+template<> struct push_back<my_polygon>
+{
+ static inline void apply(my_polygon& polygon, my_point const& point)
+ {
+ polygon.add_point(point);
+ }
+};
+
+template<> struct resize<my_polygon>
+{
+ static inline void apply(my_polygon& polygon, std::size_t new_size)
+ {
+ polygon.set_size(new_size);
+ }
+};
+
+template<> struct clear<my_polygon>
+{
+ static inline void apply(my_polygon& polygon)
+ {
+ polygon.erase_all();
+ }
+};
+
+}}}
+
+
+// 4) register with Boost.Geometry
+BOOST_GEOMETRY_REGISTER_POINT_2D(my_point, double, cs::cartesian, x, y)
+
+BOOST_GEOMETRY_REGISTER_RING(my_polygon)
+
+
+// end adaption
+// ----------------------------------------------------------------------------
+
+
+void walk_using_iterator(my_polygon const& polygon)
+{
+ for (custom_iterator<my_polygon const> it = custom_iterator<my_polygon const>(polygon);
+ it != custom_iterator<my_polygon const>(true, polygon);
+ ++it)
+ {
+ std::cout << boost::geometry::dsv(*it) << std::endl;
+ }
+ std::cout << std::endl;
+}
+
+
+void walk_using_range(my_polygon const& polygon)
+{
+ for (boost::range_iterator<my_polygon const>::type it
+ = boost::begin(polygon);
+ it != boost::end(polygon);
+ ++it)
+ {
+ std::cout << boost::geometry::dsv(*it) << std::endl;
+ }
+ std::cout << std::endl;
+}
+
+
+int main()
+{
+ my_polygon container1;
+
+ // Create (as an example) a regular polygon
+ const int n = 5;
+ const double d = (360 / n) * boost::geometry::math::d2r;
+ double a = 0;
+ for (int i = 0; i < n + 1; i++, a += d)
+ {
+ container1.add_point(my_point(sin(a), cos(a)));
+ }
+
+ std::cout << "Walk using Boost.Iterator derivative" << std::endl;
+ walk_using_iterator(container1);
+
+ std::cout << "Walk using Boost.Range extension" << std::endl << std::endl;
+ walk_using_range(container1);
+
+ std::cout << "Use it by Boost.Geometry" << std::endl;
+ std::cout << "Area: " << boost::geometry::area(container1) << std::endl;
+
+ // Container 2 will be modified by Boost.Geometry. Add all points but the last one.
+ my_polygon container2;
+ for (int i = 0; i < n; i++)
+ {
+ // Use here the Boost.Geometry internal way of inserting (but the my_polygon way of getting)
+ boost::geometry::traits::push_back<my_polygon>::apply(container2, container1.get_point(i));
+ }
+
+ std::cout << "Second container is not closed:" << std::endl;
+ walk_using_range(container2);
+
+ // Correct (= close it)
+ boost::geometry::correct(container2);
+
+ std::cout << "Now it is closed:" << std::endl;
+ walk_using_range(container2);
+ std::cout << "Area: " << boost::geometry::area(container2) << std::endl;
+
+ // Use things from std:: using Boost.Range
+ std::reverse(boost::begin(container2), boost::end(container2));
+ std::cout << "Area reversed: " << boost::geometry::area(container2) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c09_custom_fusion_example.cpp b/src/boost/libs/geometry/example/c09_custom_fusion_example.cpp
new file mode 100644
index 000000000..4b74b0580
--- /dev/null
+++ b/src/boost/libs/geometry/example/c09_custom_fusion_example.cpp
@@ -0,0 +1,62 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2011-2012 Akira Takahashi
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Custom point / Boost.Fusion Example
+
+#include <iostream>
+
+#include <boost/fusion/include/adapt_struct_named.hpp>
+
+#include <boost/geometry/algorithms/distance.hpp>
+
+#include <boost/geometry/geometries/adapted/boost_fusion.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(cs::cartesian);
+
+
+// Sample point, having x/y
+struct my_2d
+{
+ float x,y;
+};
+
+
+BOOST_FUSION_ADAPT_STRUCT(my_2d,
+ (float, x)
+ (float, y))
+
+
+int main()
+{
+ my_2d p1 = {1, 5};
+ my_2d p2 = {3, 4};
+
+ std::cout << "Coordinate using direct access: "
+ << p1.x
+ << std::endl;
+ std::cout << "Coordinate using Boost.Fusion: "
+ << boost::fusion::at_c<0>(p1)
+ << std::endl;
+ std::cout << "Coordinate using Boost.Geometry: "
+ << boost::geometry::get<0>(p1)
+ << std::endl;
+
+ std::cout << "Two points are: "
+ << boost::geometry::dsv(p1) << " "
+ << boost::geometry::dsv(p2) << std::endl;
+
+ std::cout << "Distance: "
+ << boost::geometry::distance(p1, p2)
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c10_custom_cs_example.cpp b/src/boost/libs/geometry/example/c10_custom_cs_example.cpp
new file mode 100644
index 000000000..3a802cc79
--- /dev/null
+++ b/src/boost/libs/geometry/example/c10_custom_cs_example.cpp
@@ -0,0 +1,102 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Example: Custom coordinate system example
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+
+// 1: declare a coordinate system. For example for Mars
+// Like for the Earth, we let the use choose between degrees or radians
+// (Unfortunately, in real life Mars has two coordinate systems:
+// http://planetarynames.wr.usgs.gov/Page/MARS/system)
+template<typename DegreeOrRadian>
+struct martian
+{
+ typedef DegreeOrRadian units;
+};
+
+// 2: give it also a family
+struct martian_tag;
+
+// 3: register to which coordinate system family it belongs to
+// this must be done in namespace boost::geometry::traits
+namespace boost { namespace geometry { namespace traits
+{
+
+template <typename DegreeOrRadian>
+struct cs_tag<martian<DegreeOrRadian> >
+{
+ typedef martian_tag type;
+};
+
+}}} // namespaces
+
+
+// NOTE: if the next steps would not be here,
+// compiling a distance function call with martian coordinates
+// would result in a MPL assertion
+
+// 4: so register a distance strategy as its default strategy
+namespace boost { namespace geometry { namespace strategy { namespace distance { namespace services
+{
+
+template <typename Point1, typename Point2>
+struct default_strategy<point_tag, point_tag, Point1, Point2, martian_tag, martian_tag>
+{
+ typedef haversine<double> type;
+};
+
+}}}}} // namespaces
+
+// 5: not worked out. To implement a specific distance strategy for Mars,
+// e.g. with the Mars radius given by default,
+// you will have to implement (/register) several other metafunctions:
+// tag, return_type, similar_type, comparable_type,
+// and structs:
+// get_similar, get_comparable, result_from_distance
+// See e.g. .../boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp
+
+int main()
+{
+ typedef boost::geometry::model::point
+ <
+ double, 2, martian<boost::geometry::degree>
+ > mars_point;
+
+ // Declare two points
+ // (Source: http://nssdc.gsfc.nasa.gov/planetary/mars_mileage_guide.html)
+ // (Other sources: Wiki and Google give slightly different coordinates, resulting
+ // in other distance, 20 km off)
+ mars_point viking1(-48.23, 22.54); // Viking 1 landing site in Chryse Planitia
+ mars_point pathfinder(-33.55, 19.33); // Pathfinder landing site in Ares Vallis
+
+ double d = boost::geometry::distance(viking1, pathfinder); // Distance in radians on unit-sphere
+
+ // Using the Mars mean radius
+ // (Source: http://nssdc.gsfc.nasa.gov/planetary/factsheet/marsfact.html)
+ std::cout << "Distance between Viking1 and Pathfinder landing sites: "
+ << d * 3389.5 << " km" << std::endl;
+
+ // We would get 832.616 here, same order as the 835 (rounded on 5 km) listed
+ // on the mentioned site
+
+#ifdef OPTIONALLY_ELLIPSOIDAL
+ // Optionally the distance can be calculated more accurate by an Ellipsoidal approach,
+ // giving 834.444 km
+ d = boost::geometry::distance(viking1, pathfinder,
+ boost::geometry::strategy::distance::andoyer<mars_point>
+ (boost::geometry::srs::spheroid<double>(3396.2, 3376.2)));
+ std::cout << "Ellipsoidal distance: " << d << " km" << std::endl;
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/c11_custom_cs_transform_example.cpp b/src/boost/libs/geometry/example/c11_custom_cs_transform_example.cpp
new file mode 100644
index 000000000..b6878b6e7
--- /dev/null
+++ b/src/boost/libs/geometry/example/c11_custom_cs_transform_example.cpp
@@ -0,0 +1,132 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Example: Custom coordinate system example, using transform
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+
+// See also c10_custom_cs_example
+
+// 1: declare, for example two cartesian coordinate systems
+struct cart {};
+struct cart_shifted5 {};
+
+// 2: register to which coordinate system family they belong
+namespace boost { namespace geometry { namespace traits
+{
+
+template<> struct cs_tag<cart> { typedef cartesian_tag type; };
+template<> struct cs_tag<cart_shifted5> { typedef cartesian_tag type; };
+
+}}} // namespaces
+
+
+// 3: sample implementation of a shift
+// to convert coordinate system "cart" to "cart_shirted5"
+struct shift
+{
+ template <typename P1, typename P2>
+ inline bool apply(P1 const& p1, P2& p2) const
+ {
+ namespace bg = boost::geometry;
+ bg::set<0>(p2, bg::get<0>(p1) + 5);
+ bg::set<1>(p2, bg::get<1>(p1));
+ return true;
+ }
+};
+
+
+// 4: register the default strategy to transform any cart point to any cart_shifted5 point
+namespace boost { namespace geometry { namespace strategy { namespace transform { namespace services
+{
+
+template <typename P1, typename P2>
+struct default_strategy<cartesian_tag, cartesian_tag, cart, cart_shifted5, 2, 2, P1, P2>
+{
+ typedef shift type;
+};
+
+}}}}} // namespaces
+
+
+// 5: implement a distance strategy between the two different ones
+struct shift_and_calc_distance
+{
+ template <typename P1, typename P2>
+ inline double apply(P1 const& p1, P2 const& p2) const
+ {
+ P2 p1_shifted;
+ boost::geometry::transform(p1, p1_shifted);
+ return boost::geometry::distance(p1_shifted, p2);
+ }
+};
+
+// 6: Define point types using this explicitly
+typedef boost::geometry::model::point<double, 2, cart> point1;
+typedef boost::geometry::model::point<double, 2, cart_shifted5> point2;
+
+// 7: register the distance strategy
+namespace boost { namespace geometry { namespace strategy { namespace distance { namespace services
+{
+ template <>
+ struct tag<shift_and_calc_distance>
+ {
+ typedef strategy_tag_distance_point_point type;
+ };
+
+ template <typename P1, typename P2>
+ struct return_type<shift_and_calc_distance, P1, P2>
+ {
+ typedef double type;
+ };
+
+ template <>
+ struct default_strategy<point_tag, point_tag, point1, point2, cartesian_tag, cartesian_tag>
+ {
+ typedef shift_and_calc_distance type;
+ };
+
+
+}}}}}
+
+
+
+int main()
+{
+ point1 p1_a(0, 0), p1_b(5, 5);
+ point2 p2_a(2, 2), p2_b(6, 6);
+
+ // Distances run for points on the same coordinate system.
+ // This is possible by default because they are cartesian coordinate systems.
+ double d1 = boost::geometry::distance(p1_a, p1_b);
+ double d2 = boost::geometry::distance(p2_a, p2_b);
+
+ std::cout << d1 << " " << d2 << std::endl;
+
+ // Transform from a to b:
+ boost::geometry::model::point<double, 2, cart_shifted5> p1_shifted;
+ boost::geometry::transform(p1_a, p1_shifted);
+
+
+ // Of course this can be calculated now, same CS
+ double d3 = boost::geometry::distance(p1_shifted, p2_a);
+
+
+ // Calculate distance between them. Note that inside distance the
+ // transformation is called.
+ double d4 = boost::geometry::distance(p1_a, p2_a);
+
+ // The result should be the same.
+ std::cout << d3 << " " << d4 << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/data/cities.sql b/src/boost/libs/geometry/example/data/cities.sql
new file mode 100644
index 000000000..1349eff4a
--- /dev/null
+++ b/src/boost/libs/geometry/example/data/cities.sql
@@ -0,0 +1,21 @@
+-- script to generate cities table for PostGis
+-- used in examples
+
+-- Source: http://www.realestate3d.com/gps/latlong.htm
+
+create user ggl password 'ggl' createdb;
+create database ggl owner=ggl template=postgis;
+
+
+drop table if exists cities;
+create table cities(id serial primary key, name varchar(25));
+
+select addgeometrycolumn('','cities','location','4326','POINT',2);
+insert into cities(location, name) values(GeometryFromText('POINT( -71.03 42.37)', 4326), 'Boston');
+insert into cities(location, name) values(GeometryFromText('POINT( -87.65 41.90)', 4326), 'Chicago');
+insert into cities(location, name) values(GeometryFromText('POINT( -95.35 29.97)', 4326), 'Houston');
+insert into cities(location, name) values(GeometryFromText('POINT(-118.40 33.93)', 4326), 'Los Angeles');
+insert into cities(location, name) values(GeometryFromText('POINT( -80.28 25.82)', 4326), 'Miami');
+insert into cities(location, name) values(GeometryFromText('POINT( -73.98 40.77)', 4326), 'New York');
+insert into cities(location, name) values(GeometryFromText('POINT(-112.02 33.43)', 4326), 'Phoenix');
+insert into cities(location, name) values(GeometryFromText('POINT( -77.04 38.85)', 4326), 'Washington DC');
diff --git a/src/boost/libs/geometry/example/data/cities.wkt b/src/boost/libs/geometry/example/data/cities.wkt
new file mode 100644
index 000000000..6a1feaa13
--- /dev/null
+++ b/src/boost/libs/geometry/example/data/cities.wkt
@@ -0,0 +1,10 @@
+# Source: http://www.realestate3d.com/gps/latlong.htm
+# Note: selected and converted manually
+POINT( -71.03 42.37) ; Boston
+POINT( -87.65 41.90) ; Chicago
+POINT( -95.35 29.97) ; Houston
+POINT(-118.40 33.93) ; Los Angeles
+POINT( -80.28 25.82) ; Miami
+POINT( -73.98 40.77) ; New York
+POINT(-112.02 33.43) ; Phoenix
+POINT( -77.04 38.85) ; Washington DC
diff --git a/src/boost/libs/geometry/example/data/roads.wkt b/src/boost/libs/geometry/example/data/roads.wkt
new file mode 100644
index 000000000..1b45a12c0
--- /dev/null
+++ b/src/boost/libs/geometry/example/data/roads.wkt
@@ -0,0 +1,1331 @@
+LINESTRING(-122.191 47.9758,-122.181 47.9958,-122.177 48.0022,-122.171 48.0081,-122.174 48.0402,-122.178 48.0718,-122.181 48.1036,-122.183 48.1361,-122.189 48.143,-122.206 48.205,-122.231 48.2515,-122.261 48.2977,-122.291 48.3592,-122.297 48.4234,-122.299 48.5183,-122.324 48.6237,-122.41 48.7339,-122.407 48.7538,-122.4 48.7749,-122.399 48.793,-122.423 48.8044,-122.45 48.8124,-122.481 48.8304,-122.517 48.8718,-122.521 48.8813,-122.523 48.901,-122.527 48.9105,-122.543 48.919,-122.551 48.9305,-122.561 48.9411,-122.585 48.9471,-122.612 48.9669,-122.638 48.9849,-122.661 49.0022)
+LINESTRING(-122.191 47.9758,-122.204 47.9372,-122.221 47.9019,-122.242 47.8674,-122.266 47.8312)
+LINESTRING(-122.176 47.5801,-122.182 47.5932,-122.185 47.6067,-122.187 47.6202,-122.187 47.6338,-122.187 47.6691,-122.182 47.7052,-122.181 47.7412,-122.192 47.776,-122.2 47.7864,-122.212 47.7945,-122.223 47.8027,-122.232 47.8132,-122.241 47.8168,-122.25 47.821,-122.259 47.8258,-122.266 47.8312)
+LINESTRING(-122.193 47.5075,-122.192 47.5108,-122.192 47.5147,-122.192 47.5184,-122.192 47.5224,-122.192 47.5265,-122.192 47.5307,-122.192 47.5327,-122.191 47.5348,-122.19 47.5395,-122.189 47.5443,-122.188 47.549,-122.187 47.5538,-122.185 47.5584,-122.183 47.5609,-122.182 47.563,-122.18 47.5667,-122.179 47.5676,-122.178 47.5711,-122.177 47.5726,-122.177 47.5742,-122.177 47.5762,-122.176 47.5781,-122.176 47.5801)
+LINESTRING(-122.193 47.5025,-122.193 47.5075)
+LINESTRING(-122.193 47.5025,-122.195 47.504,-122.193 47.5075)
+LINESTRING(-122.272 47.4615,-122.273 47.4725,-122.273 47.4841,-122.272 47.4874,-122.271 47.4906,-122.27 47.4938,-122.269 47.4971,-122.279 47.5069,-122.287 47.5167,-122.292 47.5272,-122.295 47.5391,-122.303 47.543,-122.309 47.5475,-122.315 47.5523,-122.321 47.5571,-122.321 47.5682,-122.32 47.5794,-122.32 47.5904,-122.324 47.6012,-122.324 47.6105,-122.324 47.6197,-122.324 47.6289,-122.324 47.6381,-122.324 47.6491,-122.324 47.66,-122.323 47.6709,-122.32 47.6818,-122.326 47.6884,-122.33 47.6965,-122.332 47.705,-122.33 47.7125,-122.326 47.716,-122.322 47.7195,-122.322 47.7272,-122.323 47.7352,-122.326 47.7433,-122.329 47.7508,-122.324 47.7628,-122.318 47.7798,-122.312 47.7957,-122.308 47.8044,-122.298 47.8114,-122.287 47.8175,-122.276 47.8237,-122.266 47.8312)
+LINESTRING(-122.272 47.4615,-122.217 47.4637,-122.202 47.4689,-122.201 47.4723,-122.2 47.4757,-122.198 47.4791,-122.197 47.4825,-122.195 47.4866,-122.195 47.4892,-122.194 47.4902,-122.194 47.4941,-122.194 47.498,-122.193 47.4995,-122.193 47.501,-122.193 47.5025)
+LINESTRING(-67.83 46.1421,-67.868 46.1397,-67.9165 46.1393,-67.9648 46.1407,-68.0025 46.1439,-68.0191 46.1465,-68.0342 46.1489,-68.0496 46.1507,-68.0667 46.1512,-68.1027 46.1344,-68.1427 46.1199,-68.1803 46.1063,-68.2092 46.0922,-68.2261 46.0797,-68.243 46.0654,-68.2589 46.0513,-68.2747 46.0371,-68.2875 46.0205,-68.2944 46.0023,-68.3008 45.9838,-68.3122 45.9664,-68.3374 45.9435,-68.3696 45.9156,-68.3975 45.8871,-68.41 45.8621,-68.4104 45.8527,-68.4108 45.8433,-68.4112 45.8339,-68.4116 45.8245,-68.4158 45.8021,-68.4248 45.7858,-68.4367 45.7703,-68.4494 45.7506,-68.4601 45.7285,-68.4695 45.7061,-68.479 45.6836,-68.4899 45.6616,-68.5018 45.6423,-68.5151 45.6234,-68.5282 45.6045,-68.54 45.5854,-68.5603 45.5441,-68.5848 45.4878,-68.607 45.4306,-68.62 45.3866,-68.6368 45.3571,-68.6665 45.3216,-68.6933 45.2801,-68.7015 45.2323)
+LINESTRING(-122.555 47.2721,-122.556 47.2726,-122.562 47.2824,-122.568 47.2906,-122.575 47.3043,-122.586 47.3152,-122.606 47.3388,-122.618 47.3657,-122.613 47.3768,-122.613 47.3929,-122.615 47.3966,-122.622 47.4098,-122.622 47.4162,-122.626 47.481,-122.634 47.4892,-122.648 47.5041,-122.656 47.5114,-122.66 47.5214,-122.671 47.5272,-122.695 47.5223,-122.702 47.5249,-122.697 47.5328,-122.682 47.5404,-122.665 47.5554,-122.67 47.5654,-122.685 47.5693,-122.689 47.5729,-122.699 47.5815,-122.699 47.5894,-122.703 47.5948,-122.711 47.6002,-122.711 47.6067,-122.71 47.615,-122.711 47.6232,-122.709 47.6297,-122.706 47.6371,-122.705 47.6422,-122.706 47.6463,-122.706 47.6537,-122.687 47.6613,-122.683 47.6623,-122.676 47.6735,-122.673 47.6777,-122.671 47.6846,-122.665 47.6898,-122.66 47.6935,-122.66 47.7018,-122.66 47.7147,-122.665 47.7275,-122.652 47.7553)
+LINESTRING(-122.544 47.2628,-122.555 47.2721)
+LINESTRING(-122.46 47.2256,-122.463 47.2276,-122.466 47.2296,-122.469 47.2316,-122.472 47.2337,-122.478 47.2336,-122.484 47.2335,-122.49 47.2334,-122.496 47.2333,-122.508 47.2406,-122.52 47.2479,-122.532 47.2552,-122.544 47.2625,-122.544 47.2628)
+LINESTRING(-122.46 47.2256,-122.405 47.234,-122.364 47.2366,-122.333 47.2501,-122.309 47.2911,-122.298 47.3117,-122.292 47.3402,-122.289 47.3691,-122.289 47.3911,-122.292 47.4016,-122.291 47.4125,-122.286 47.4223,-122.274 47.4294,-122.271 47.4408,-122.272 47.4566,-122.272 47.4615)
+LINESTRING(-122.479 47.1637,-122.468 47.1764,-122.462 47.1929,-122.46 47.2103,-122.46 47.2256)
+LINESTRING(-122.479 47.1637,-122.478 47.1629,-122.476 47.1622,-122.475 47.1614,-122.474 47.1606,-122.433 47.1581,-122.389 47.1573,-122.346 47.1581,-122.306 47.1601,-122.304 47.1611,-122.302 47.162,-122.3 47.163,-122.298 47.1639,-122.298 47.1667,-122.298 47.1694,-122.298 47.1722,-122.299 47.1749,-122.295 47.1782,-122.291 47.181,-122.287 47.1838,-122.284 47.1871,-122.284 47.1897,-122.284 47.1923,-122.284 47.195,-122.284 47.1976,-122.28 47.2011,-122.274 47.2007,-122.265 47.2,-122.257 47.2021,-122.242 47.1954,-122.233 47.1939,-122.224 47.1958,-122.209 47.199,-122.202 47.1955,-122.2 47.1845,-122.18 47.1718)
+LINESTRING(-122.479 47.1637,-122.586 47.1047,-122.726 47.06,-122.853 47.0274,-122.92 47.0048)
+LINESTRING(-123.032 47.0497,-123.013 47.0387,-122.979 47.0249,-122.943 47.0123,-122.92 47.0048)
+LINESTRING(-111.958 49.0001,-111.951 48.9695,-111.938 48.9331,-111.92 48.8985,-111.9 48.8733,-111.891 48.8663,-111.88 48.8578,-111.87 48.849,-111.866 48.8409,-111.864 48.7653,-111.863 48.6898,-111.862 48.6143,-111.863 48.5388,-111.864 48.5314,-111.867 48.5243,-111.872 48.5175,-111.877 48.5109,-111.879 48.5085)
+LINESTRING(-68.7774 44.8296,-68.7576 44.8372,-68.7428 44.8595,-68.7344 44.8858,-68.7339 44.9055,-68.7415 44.9322,-68.745 44.9534,-68.7442 44.9749,-68.7393 45.0023,-68.7377 45.0041,-68.7361 45.0059,-68.7249 45.0394,-68.7164 45.0689,-68.712 45.0984,-68.7128 45.1316,-68.7127 45.1507,-68.7094 45.1683,-68.7049 45.1859,-68.7011 45.2047,-68.7012 45.2111,-68.702 45.2195,-68.7025 45.2274,-68.7015 45.2323)
+LINESTRING(-117.442 47.6383,-117.461 47.6406,-117.47 47.6371)
+LINESTRING(-117.42 47.6351,-117.429 47.6368,-117.442 47.6383)
+LINESTRING(-116.796 47.7226,-116.821 47.7326,-116.856 47.7386,-116.894 47.7385,-116.934 47.734,-116.995 47.7161,-117.041 47.6892,-117.041 47.6892)
+LINESTRING(-117.041 47.6892,-117.088 47.6623,-117.148 47.6443,-117.18 47.6431,-117.209 47.6465,-117.238 47.6499,-117.27 47.6487,-117.289 47.6445,-117.306 47.6393,-117.322 47.6341,-117.342 47.6299,-117.373 47.6284,-117.401 47.6317,-117.42 47.6351)
+LINESTRING(-122.874 46.5507,-122.883 46.5734,-122.903 46.5972,-122.928 46.6195,-122.952 46.6378,-122.953 46.6392,-122.954 46.6404,-122.954 46.6418,-122.954 46.6436,-122.948 46.6851,-122.946 46.7187,-122.948 46.7486,-122.952 46.7786,-122.96 46.7925,-122.973 46.8078,-122.983 46.8235,-122.984 46.8387,-122.969 46.8755,-122.953 46.9164,-122.937 46.9599,-122.92 47.0048)
+LINESTRING(-122.176 47.5801,-122.168 47.5804,-122.158 47.5804,-122.15 47.5798,-122.14 47.5787,-122.13 47.5763,-122.118 47.5721,-122.106 47.5676,-122.097 47.5636,-122.08 47.5557,-122.07 47.5515,-122.06 47.5469,-122.051 47.5429,-122.039 47.5385,-122.025 47.5328,-122.014 47.5289,-122.003 47.526,-121.993 47.5247,-121.983 47.5248,-121.974 47.525,-121.965 47.5242,-121.954 47.5225,-121.945 47.5204,-121.933 47.5158,-121.923 47.5118,-121.913 47.5098,-121.903 47.5089,-121.892 47.5085,-121.883 47.5083,-121.848 47.4895,-121.771 47.4688,-121.737 47.4524,-121.696 47.445,-121.652 47.4405,-121.634 47.4391,-121.613 47.4301,-121.6 47.4249,-121.582 47.4182,-121.571 47.414,-121.467 47.4125,-121.364 47.4119,-121.339 47.3851,-121.301 47.3409,-121.244 47.3038,-121.174 47.2725,-121.113 47.2568,-121.048 47.2281,-121.017 47.2092,-120.982 47.2076,-120.969 47.2077,-120.958 47.208,-120.942 47.2053,-120.93 47.2027,-120.913 47.1944,-120.889 47.1756,-120.87 47.161,-120.853 47.1472,-120.787 47.0988,-120.727 47.0706,-120.705 47.055,-120.666 47.03,-120.647 47.0166,-120.631 47.0012,-120.602 46.9797,-120.574 46.9701,-120.547 46.9704,-120.51 46.9701)
+LINESTRING(-117.47 47.6371,-117.523 47.6166,-117.57 47.5883,-117.613 47.5563,-117.663 47.5213,-117.705 47.4973,-117.745 47.4785,-117.785 47.4597,-117.827 47.4357,-117.853 47.4165,-117.872 47.3981,-117.893 47.3802,-117.92 47.3628,-117.95 47.3503,-117.98 47.342,-118.01 47.3329,-118.037 47.3183,-118.115 47.2558,-118.183 47.1981,-118.261 47.1512,-118.366 47.1211,-118.375 47.1197,-118.384 47.1183,-118.393 47.1169,-118.402 47.1155)
+LINESTRING(-116.796 47.7226,-116.787 47.7188,-116.763 47.7075,-116.742 47.6991,-116.72 47.6912,-116.696 47.6816,-116.681 47.6742,-116.669 47.667,-116.655 47.6607,-116.639 47.6559,-116.604 47.6513,-116.572 47.6503,-116.54 47.6484,-116.506 47.6411,-116.464 47.6245,-116.431 47.6067,-116.397 47.5883,-116.357 47.5702,-116.273 47.5522,-116.191 47.5512,-116.111 47.5486,-116.032 47.5259,-115.985 47.5034,-115.941 47.4858,-115.894 47.4729,-115.838 47.4646,-115.812 47.4644,-115.789 47.4671,-115.766 47.4695,-115.74 47.4683,-115.672 47.455,-115.667 47.4536)
+LINESTRING(-118.402 47.1155,-118.432 47.1112,-118.461 47.1081,-118.492 47.1062,-118.527 47.1057,-118.532 47.1048,-118.539 47.1032,-118.544 47.1032,-118.549 47.1036,-118.556 47.1031,-118.604 47.0963,-118.647 47.0921,-118.692 47.09,-118.741 47.0895,-118.805 47.0876,-118.86 47.0828,-118.916 47.0777,-118.98 47.075,-119.035 47.0732,-119.099 47.0704,-119.165 47.0682,-119.228 47.0685,-119.331 47.0789,-119.427 47.0962,-119.515 47.1114,-119.59 47.1154,-119.642 47.1125,-119.684 47.1106,-119.725 47.1073,-119.776 47.1001,-119.848 47.0877,-119.891 47.0697,-119.912 47.0397,-119.925 47.0031,-119.945 46.9655,-119.952 46.9539,-119.958 46.9429,-119.967 46.934,-119.982 46.9285,-120.029 46.9265,-120.071 46.9333,-120.114 46.9416,-120.163 46.9438,-120.201 46.9434,-120.248 46.9495,-120.299 46.9588,-120.347 46.9683,-120.389 46.9751,-120.427 46.9778,-120.465 46.9763,-120.51 46.9701,-120.499 46.9403,-120.49 46.9282,-120.475 46.9202,-120.458 46.9131,-120.441 46.904,-120.409 46.8811,-120.384 46.8591,-120.364 46.835,-120.35 46.8057,-120.346 46.7755,-120.354 46.7435,-120.371 46.7125,-120.395 46.6854,-120.424 46.6624,-120.458 46.6449,-120.496 46.6319,-120.538 46.6222,-120.54 46.6219,-120.542 46.6215,-120.545 46.6209)
+LINESTRING(-120.545 46.6209,-120.573 46.621,-120.592 46.6307,-120.609 46.6462,-120.629 46.6639,-120.646 46.6797,-120.658 46.6941,-120.671 46.7075,-120.691 46.722)
+LINESTRING(-69.8176 44.2194,-69.8106 44.2468,-69.8134 44.2765,-69.817 44.3065,-69.8126 44.3347,-69.8001 44.3513,-69.7792 44.3705,-69.7563 44.3898,-69.738 44.4068,-69.7105 44.4489,-69.6945 44.4934,-69.6815 44.5342,-69.6628 44.5649,-69.6537 44.5726,-69.6429 44.5801,-69.6318 44.5875,-69.6214 44.5948,-69.6179 44.5976,-69.6139 44.6007,-69.6093 44.6033,-69.6042 44.6044,-69.573 44.6206,-69.53 44.6458,-69.4896 44.672,-69.4663 44.6912,-69.4392 44.7349,-69.4193 44.7695,-69.386 44.7982,-69.3186 44.8244,-69.2836 44.8242,-69.2395 44.8132,-69.1946 44.799,-69.1576 44.7891,-69.1303 44.7857,-69.1024 44.7838,-69.0744 44.7826,-69.0466 44.7807,-68.9958 44.7735,-68.9431 44.7661,-68.8913 44.7663,-68.8432 44.7818,-68.8321 44.7921,-68.827 44.8037,-68.8217 44.8155,-68.8096 44.826,-68.8017 44.8273,-68.7936 44.8282,-68.7855 44.8289,-68.7774 44.8296)
+LINESTRING(-120.294 46.4397,-120.33 46.464,-120.363 46.4857,-120.374 46.4926,-120.392 46.5017,-120.411 46.5106,-120.423 46.5172,-120.437 46.5251,-120.449 46.5316,-120.461 46.5384,-120.474 46.547,-120.486 46.5566,-120.497 46.5652,-120.507 46.5743,-120.517 46.5852,-120.529 46.5988,-120.537 46.6091,-120.545 46.6209)
+LINESTRING(-111.879 48.5085,-111.881 48.5059,-111.881 48.5012,-111.881 48.4965,-111.88 48.4915,-111.897 48.4171,-111.918 48.3851,-111.933 48.3423,-111.932 48.2354,-111.929 48.2038,-111.925 48.1774,-111.915 48.1511,-111.897 48.12,-111.88 48.0949,-111.862 48.0692,-111.844 48.0439,-111.824 48.0198,-111.797 47.9946,-111.766 47.9711,-111.737 47.9465,-111.715 47.9181,-111.71 47.9025,-111.709 47.8861,-111.708 47.8695,-111.704 47.8532,-111.697 47.8438,-111.686 47.835,-111.674 47.8264,-111.667 47.8172,-111.665 47.8022,-111.666 47.7864,-111.668 47.7707,-111.669 47.7555,-111.662 47.7205,-111.643 47.6926,-111.617 47.6665,-111.588 47.637,-111.573 47.6174,-111.562 47.5977,-111.548 47.5783,-111.529 47.5592)
+LINESTRING(-111.529 47.5592,-111.491 47.5583,-111.454 47.5526,-111.419 47.5434,-111.383 47.5322,-111.366 47.527,-111.335 47.5178)
+LINESTRING(-97.0955 47.9343,-97.0945 47.9494,-97.0936 47.9654,-97.0936 47.9813,-97.0956 47.9961,-97.1145 48.012,-97.1412 48.0417,-97.1641 48.0716,-97.1713 48.0883,-97.1758 48.0926,-97.1808 48.0967,-97.1863 48.1005,-97.1921 48.104,-97.1958 48.2072,-97.1962 48.3109,-97.1945 48.4144,-97.192 48.5171,-97.1877 48.5218,-97.1834 48.5265,-97.179 48.5313,-97.1747 48.536,-97.1751 48.5391,-97.1754 48.5421,-97.1758 48.5451,-97.1761 48.5481,-97.1791 48.5497,-97.1821 48.5512,-97.1851 48.5528,-97.1881 48.5544,-97.1877 48.559,-97.1874 48.5636,-97.1872 48.5682,-97.1871 48.5728,-97.1877 48.6062,-97.1877 48.64,-97.1886 48.6738,-97.1918 48.7069,-97.1997 48.7317,-97.2129 48.756,-97.2271 48.78,-97.2381 48.8042,-97.24 48.8226,-97.2374 48.8422,-97.2347 48.8615,-97.2363 48.8791,-97.2464 48.9003,-97.2576 48.919,-97.2644 48.939,-97.2876 48.9782,-97.2784 48.986,-97.2706 48.9956,-97.2675 49.001)
+LINESTRING(-122.645 45.7164,-122.668 45.7741,-122.719 45.9049,-122.769 46.0453,-122.79 46.1318,-122.804 46.1967,-122.836 46.2833,-122.865 46.3654,-122.867 46.4168,-122.872 46.4494,-122.875 46.4837,-122.876 46.518,-122.874 46.5507)
+LINESTRING(-70.0103 43.9228,-69.9821 43.9414,-69.9641 43.9539,-69.951 43.9698,-69.9374 43.9984,-69.9348 44.0059,-69.9322 44.0134,-69.929 44.0222,-69.9266 44.0273,-69.8988 44.0663,-69.8635 44.122,-69.8324 44.1784,-69.8176 44.2194)
+LINESTRING(-72.0897 45.0036,-72.0897 45.0036,-72.099 44.9925,-72.1189 44.9767,-72.1404 44.9612,-72.1545 44.9508,-72.1731 44.9293,-72.1769 44.9115,-72.1753 44.8948,-72.1781 44.8769,-72.1857 44.8572,-72.1898 44.8473,-72.1944 44.8377,-72.2047 44.8217,-72.2144 44.8073,-72.2201 44.7919,-72.2185 44.7725,-72.2134 44.7652,-72.205 44.7584,-72.1969 44.7527,-72.1928 44.7487,-72.1903 44.7378,-72.1876 44.7267,-72.1822 44.7164,-72.1718 44.7076,-72.162 44.7053,-72.1532 44.7017,-72.1465 44.6966,-72.143 44.6897,-72.1385 44.663,-72.1322 44.6375,-72.1186 44.6147,-72.0922 44.5956,-72.082 44.5913,-72.0681 44.5858,-72.0547 44.5802,-72.0462 44.5754,-72.0403 44.5686,-72.0365 44.5619,-72.0324 44.5553,-72.0252 44.5486,-72.0183 44.5438,-72.0093 44.5375,-72.0014 44.5305,-71.9972 44.5242,-72.0035 44.5158,-72.0167 44.5048,-72.031 44.4942,-72.0405 44.4873,-72.0446 44.4779,-72.046 44.4594,-72.041 44.4364,-72.0282 44.4175)
+LINESTRING(-72.0255 44.4136,-72.0282 44.4175)
+LINESTRING(-122.645 45.7164,-122.651 45.7027,-122.657 45.6899,-122.662 45.677,-122.665 45.6621,-122.665 45.6533,-122.663 45.6453,-122.662 45.6374,-122.663 45.6287,-122.664 45.6223,-122.667 45.6176)
+LINESTRING(-115.667 47.4536,-115.614 47.439,-115.557 47.4221,-115.49 47.4059,-115.443 47.3988,-115.399 47.3951,-115.356 47.3903,-115.31 47.3797,-115.272 47.3637,-115.243 47.3449,-115.215 47.3255,-115.179 47.3079,-115.15 47.3012,-115.122 47.3,-115.094 47.2997,-115.063 47.2959,-115.016 47.2791,-114.978 47.263,-114.941 47.2473,-114.896 47.2316,-114.838 47.2115,-114.79 47.1875,-114.754 47.157,-114.734 47.1173,-114.731 47.1091,-114.726 47.0954,-114.724 47.0872,-114.719 47.0765,-114.711 47.0679,-114.701 47.0596,-114.691 47.0501,-114.684 47.0421,-114.678 47.0351,-114.671 47.0285,-114.663 47.0215,-114.65 47.012,-114.639 47.0033,-114.629 46.9946,-114.615 46.9853,-114.604 46.9774,-114.592 46.9708,-114.579 46.9668,-114.564 46.9666,-114.53 46.9708,-114.52 46.9732,-114.512 46.9772,-114.505 46.982,-114.476 46.9999,-114.459 47.0131,-114.443 47.0267,-114.424 47.0412,-114.413 47.0497,-114.403 47.0565,-114.392 47.0616,-114.376 47.0652,-114.361 47.0679,-114.346 47.0707,-114.332 47.0733,-114.316 47.0756,-114.264 47.0743,-114.216 47.0592,-114.176 47.0334,-114.143 47.0003,-114.134 46.9899,-114.127 46.9853)
+LINESTRING(-119.016 46.4527,-119.033 46.4282,-119.048 46.4069,-119.063 46.3857,-119.079 46.3612,-119.086 46.3444,-119.089 46.3202,-119.084 46.2883,-119.061 46.2476)
+LINESTRING(-119.061 46.2476,-119.135 46.2834,-119.204 46.2996,-119.273 46.2992,-119.348 46.2825,-119.403 46.2648,-119.456 46.2485,-119.509 46.234,-119.568 46.2219,-119.587 46.2188,-119.605 46.2156,-119.624 46.2124,-119.642 46.2092,-119.68 46.2068,-119.713 46.2113,-119.746 46.2193,-119.784 46.2275,-119.842 46.2388,-119.893 46.2521,-119.94 46.27,-119.988 46.2955,-120.014 46.3101,-120.042 46.3226,-120.071 46.3333,-120.101 46.3427,-120.15 46.3599,-120.199 46.3835,-120.247 46.4109,-120.294 46.4397)
+LINESTRING(-71.8992 44.3365,-71.8999 44.3409,-71.9027 44.3565,-71.9087 44.368,-71.9155 44.3791,-71.9208 44.3898,-71.9234 44.4002,-71.9247 44.408,-71.9287 44.4153,-71.9397 44.4241,-71.9504 44.4231,-71.9616 44.4186,-71.9726 44.4138,-71.9826 44.4122,-71.9934 44.4126,-72.0041 44.4129,-72.0148 44.4133,-72.0255 44.4136)
+LINESTRING(-122.645 45.7164,-122.622 45.6988,-122.585 45.6698,-122.572 45.6508,-122.559 45.6107,-122.557 45.591)
+LINESTRING(-114.127 46.9853,-114.123 46.9823,-114.112 46.9766,-114.098 46.9714,-114.058 46.9552,-114.023 46.9416,-113.992 46.9303,-113.986 46.9284,-113.982 46.9263)
+LINESTRING(-122.667 45.6176,-122.667 45.6166,-122.67 45.611,-122.671 45.6047,-122.673 45.5928,-122.672 45.582,-122.671 45.5713,-122.67 45.5594,-122.669 45.5493,-122.67 45.5405,-122.672 45.5317,-122.675 45.5218,-122.676 45.5164)
+LINESTRING(-123.067 45.6154,-123.013 45.5954,-122.987 45.5858,-122.953 45.5728,-122.939 45.5666,-122.883 45.5461,-122.846 45.533,-122.786 45.5094,-122.764 45.506,-122.751 45.5097,-122.746 45.5108,-122.73 45.5127,-122.7 45.5125,-122.683 45.5143,-122.676 45.5164)
+LINESTRING(-122.557 45.591,-122.556 45.5744,-122.557 45.5356)
+LINESTRING(-122.557 45.5356,-122.557 45.5306)
+LINESTRING(-122.676 45.5164,-122.669 45.5183,-122.657 45.523,-122.644 45.5277,-122.63 45.5316,-122.62 45.533,-122.611 45.533,-122.602 45.5319,-122.593 45.5299,-122.588 45.5284,-122.584 45.5267,-122.579 45.5256,-122.574 45.5258,-122.569 45.5271,-122.565 45.5285,-122.561 45.5298,-122.557 45.5306)
+LINESTRING(-122.676 45.5164,-122.677 45.5108,-122.679 45.5009,-122.682 45.4913,-122.688 45.4812,-122.706 45.4661,-122.728 45.4546,-122.746 45.4424,-122.75 45.429,-122.745 45.4127,-122.744 45.398,-122.745 45.3831,-122.746 45.3733)
+LINESTRING(-73.1873 44.454,-73.1586 44.4943,-73.1614 44.5402,-73.1552 44.5512,-73.1659 44.6078,-73.1411 44.6371,-73.0859 44.7081,-73.0415 44.8398,-73.0665 44.9029,-73.0887 44.9437,-73.0588 45.0157)
+LINESTRING(-118.865 46.0558,-118.871 46.0683,-118.896 46.0979,-118.925 46.1261,-118.954 46.1526,-118.981 46.1775,-119.006 46.1996,-119.032 46.2206,-119.061 46.2476)
+LINESTRING(-122.557 45.5306,-122.558 45.4962,-122.558 45.4714,-122.557 45.4494,-122.559 45.4276,-122.564 45.4031,-122.567 45.3931,-122.571 45.3843,-122.577 45.3757,-122.584 45.3664,-122.589 45.3595,-122.594 45.3532,-122.601 45.3481,-122.611 45.3447,-122.618 45.3446,-122.625 45.3469,-122.631 45.3502,-122.638 45.3535,-122.65 45.3579,-122.662 45.3614,-122.674 45.364,-122.688 45.3659,-122.705 45.3675,-122.721 45.3689,-122.737 45.3711,-122.746 45.3733)
+LINESTRING(-118.859 46.0042,-118.856 46.0073,-118.855 46.0376,-118.865 46.0558)
+LINESTRING(-119.061 46.2476,-119.09 46.2258,-119.114 46.2197,-119.138 46.2117,-119.159 46.2007,-119.176 46.189,-119.189 46.1754,-119.2 46.1587,-119.208 46.1443,-119.215 46.1311,-119.221 46.1175,-119.223 46.102,-119.221 46.0804,-119.217 46.0606,-119.218 46.0418,-119.228 46.0233,-119.242 46.0125,-119.258 46.0045,-119.275 45.9975,-119.293 45.9898,-119.319 45.9762,-119.339 45.9606,-119.35 45.9426,-119.349 45.922,-119.349 45.9188)
+LINESTRING(-119.349 45.9188,-119.346 45.9181)
+LINESTRING(-119.349 45.9188,-119.348 45.9177)
+LINESTRING(-69.8176 44.2194,-69.9019 44.1546,-69.9658 44.1316,-70.0139 44.1275,-70.0508 44.1198,-70.0758 44.1054,-70.1015 44.0901,-70.1284 44.0765,-70.1575 44.0669,-70.1647 44.0682,-70.1718 44.0696,-70.179 44.0709,-70.1862 44.0722,-70.1968 44.0704,-70.2089 44.0641,-70.2208 44.0564,-70.231 44.0506,-70.2433 44.0464,-70.2582 44.0423,-70.2723 44.0381,-70.2822 44.0339,-70.31 44.0075,-70.3259 43.9745,-70.3338 43.9394,-70.3374 43.9066,-70.3384 43.9022,-70.3401 43.8962,-70.3417 43.8904,-70.3423 43.8866,-70.34 43.8774,-70.3366 43.868,-70.3328 43.8585,-70.3297 43.8492,-70.3177 43.8012,-70.3112 43.7544,-70.3143 43.7083,-70.3309 43.6618,-70.3347 43.6546,-70.3385 43.6473,-70.3423 43.6401,-70.3462 43.6329)
+LINESTRING(-70.3462 43.6329,-70.3414 43.6314,-70.3366 43.6298,-70.3318 43.6283,-70.3271 43.6268,-70.3244 43.6295,-70.3218 43.6323,-70.3192 43.635,-70.3165 43.6378,-70.312 43.6381,-70.3074 43.6383,-70.3028 43.6386,-70.2982 43.6389,-70.2756 43.6597,-70.2622 43.6787,-70.2551 43.6989,-70.2512 43.7236,-70.2113 43.7785,-70.156 43.8325,-70.1017 43.8749,-70.0651 43.8955,-70.0566 43.9066,-70.0437 43.9143,-70.0277 43.9195,-70.0103 43.9228)
+LINESTRING(-121.123 45.5856,-121.131 45.5844,-121.139 45.5831,-121.147 45.5818,-121.155 45.5805,-121.16 45.5797,-121.164 45.579,-121.172 45.5828,-121.18 45.5865,-121.188 45.5903,-121.197 45.5941,-121.2 45.6005,-121.203 45.6069,-121.206 45.6133,-121.209 45.6197,-121.214 45.6257,-121.218 45.6317,-121.223 45.6377,-121.228 45.6437,-121.233 45.6464,-121.239 45.6491,-121.245 45.6517,-121.25 45.6543,-121.259 45.6572,-121.268 45.6601,-121.277 45.6631,-121.286 45.666,-121.291 45.6672,-121.297 45.6684,-121.302 45.6696,-121.307 45.6708,-121.312 45.671,-121.318 45.6713,-121.323 45.6716,-121.329 45.6718,-121.339 45.6719,-121.349 45.6719,-121.359 45.6719,-121.369 45.6719,-121.379 45.6712,-121.389 45.6705,-121.399 45.6698,-121.409 45.6691,-121.418 45.6699,-121.428 45.6708,-121.438 45.6716,-121.448 45.6724,-121.458 45.6749,-121.467 45.6773,-121.476 45.6798,-121.486 45.6823,-121.494 45.6856,-121.503 45.689,-121.512 45.6924,-121.52 45.6957,-121.525 45.6968,-121.53 45.6978,-121.536 45.696,-121.543 45.6941,-121.55 45.6923,-121.556 45.6904,-121.561 45.6892,-121.565 45.6881,-121.569 45.6869,-121.573 45.6857,-121.579 45.6857,-121.585 45.6857,-121.591 45.6857,-121.597 45.6857,-121.607 45.6839,-121.616 45.6821,-121.625 45.6803,-121.635 45.6785,-121.644 45.6771,-121.654 45.6756,-121.663 45.6742,-121.673 45.6728,-121.683 45.6716,-121.693 45.6704,-121.704 45.6692,-121.714 45.668,-121.724 45.6688,-121.734 45.6696,-121.743 45.6704,-121.753 45.6712,-121.763 45.672,-121.773 45.6728,-121.783 45.6736,-121.793 45.6744,-121.802 45.6726,-121.812 45.6708,-121.821 45.669,-121.83 45.6672,-121.835 45.6612,-121.84 45.6553,-121.845 45.6493,-121.85 45.6433,-121.857 45.6385,-121.864 45.6337,-121.871 45.6288,-121.878 45.624,-121.887 45.6218,-121.897 45.6196,-121.906 45.6175,-121.915 45.6153,-121.925 45.613,-121.935 45.6107,-121.944 45.6085,-121.954 45.6062,-121.964 45.6039,-121.974 45.6016,-121.983 45.5993,-121.993 45.597,-122.002 45.5949,-122.012 45.5927,-122.021 45.5905,-122.03 45.5883,-122.04 45.586,-122.05 45.5837,-122.059 45.5814,-122.069 45.5791,-122.078 45.5762,-122.087 45.5733,-122.096 45.5704,-122.105 45.5675,-122.114 45.5646,-122.123 45.5617,-122.132 45.5588,-122.141 45.5559,-122.149 45.5519,-122.157 45.5479,-122.166 45.5439,-122.174 45.54,-122.184 45.5385,-122.193 45.537,-122.203 45.5355,-122.212 45.534,-122.222 45.5336,-122.232 45.5332,-122.242 45.5328,-122.252 45.5324,-122.262 45.5327,-122.273 45.533,-122.283 45.5332,-122.293 45.5335,-122.303 45.5339,-122.313 45.5343,-122.322 45.5347,-122.332 45.5351,-122.342 45.5366,-122.352 45.538,-122.363 45.5395,-122.373 45.541,-122.38 45.5428,-122.384 45.5421,-122.388 45.5411,-122.393 45.5401,-122.398 45.5387,-122.406 45.5374,-122.414 45.5362,-122.422 45.5349,-122.43 45.5337,-122.434 45.5341,-122.438 45.5345,-122.444 45.5346,-122.449 45.5348,-122.453 45.5347,-122.458 45.5346,-122.462 45.5346,-122.466 45.5345,-122.47 45.5348,-122.474 45.5351,-122.478 45.5354,-122.482 45.5357,-122.486 45.5359,-122.49 45.5362,-122.494 45.5365,-122.497 45.5368,-122.504 45.5372,-122.511 45.5375,-122.515 45.5378,-122.518 45.5381,-122.522 45.5384,-122.526 45.5387,-122.532 45.5402,-122.539 45.5417,-122.544 45.5414,-122.548 45.5411,-122.551 45.5397,-122.554 45.5382,-122.557 45.5356)
+LINESTRING(-121.123 45.5856,-121.117 45.5903,-121.111 45.5949,-121.105 45.5994,-121.099 45.604,-121.096 45.6063,-121.093 45.6086,-121.091 45.6109,-121.088 45.6132,-121.083 45.616,-121.078 45.6188,-121.073 45.6216,-121.068 45.6244,-121.059 45.6257,-121.051 45.627,-121.042 45.6284,-121.034 45.6297,-121.032 45.63,-121.03 45.6303,-121.02 45.6302,-121.01 45.6301,-121 45.6299,-120.99 45.6298,-120.981 45.6293,-120.973 45.6288,-120.965 45.6283,-120.957 45.6278,-120.956 45.6277,-120.954 45.6276,-120.952 45.6274,-120.95 45.6273,-120.943 45.6266,-120.935 45.6259,-120.927 45.6251,-120.92 45.6244,-120.918 45.6235,-120.917 45.6227,-120.915 45.6218,-120.914 45.6209,-120.911 45.6199,-120.908 45.6189,-120.905 45.6179,-120.902 45.6168,-120.899 45.6171,-120.896 45.6173,-120.893 45.6176,-120.89 45.6178,-120.889 45.6184,-120.887 45.6189,-120.885 45.6195,-120.883 45.6201,-120.879 45.6225,-120.875 45.6249,-120.871 45.6273,-120.867 45.6297,-120.866 45.631,-120.864 45.6323,-120.863 45.6335,-120.862 45.6348,-120.861 45.6356,-120.86 45.6364,-120.858 45.6372,-120.857 45.638,-120.855 45.6394,-120.853 45.6408,-120.852 45.6421,-120.85 45.6435,-120.848 45.6441,-120.847 45.6447,-120.846 45.6452,-120.845 45.6458,-120.843 45.6464,-120.841 45.647,-120.84 45.6475,-120.838 45.6481,-120.835 45.6483,-120.833 45.6485,-120.831 45.6486,-120.828 45.6488,-120.824 45.6496,-120.82 45.6504,-120.816 45.6512,-120.812 45.6521)
+LINESTRING(-119.346 45.9181,-119.327 45.9129,-119.306 45.9083,-119.286 45.9038,-119.265 45.898,-119.225 45.8846,-119.185 45.8718,-119.145 45.864,-119.103 45.8653,-119.056 45.8765,-119.018 45.8922,-118.984 45.9122,-118.948 45.9363,-118.911 45.9595,-118.877 45.9822,-118.859 46.0042)
+LINESTRING(-119.348 45.9177,-119.346 45.8878,-119.356 45.8575,-119.372 45.8271,-119.386 45.7925)
+LINESTRING(-120.812 45.6521,-120.806 45.6525,-120.8 45.653,-120.794 45.6535,-120.788 45.654,-120.782 45.6557,-120.776 45.6574,-120.769 45.6591,-120.763 45.6608,-120.755 45.6634,-120.747 45.666,-120.739 45.6686,-120.731 45.6712,-120.724 45.673,-120.717 45.6747,-120.709 45.6765,-120.702 45.6782,-120.7 45.6792,-120.697 45.6801,-120.695 45.681,-120.692 45.6819,-120.688 45.6832,-120.683 45.6845,-120.679 45.6858,-120.674 45.6871,-120.67 45.6894,-120.666 45.6918,-120.661 45.6941,-120.657 45.6964,-120.653 45.699,-120.649 45.7016,-120.645 45.7042,-120.642 45.7068,-120.639 45.7086,-120.636 45.7104,-120.633 45.7122,-120.63 45.7139,-120.628 45.7146,-120.622 45.7156,-120.617 45.7165,-120.612 45.7175,-120.606 45.7185,-120.603 45.7191,-120.599 45.7181,-120.596 45.7171,-120.592 45.7161,-120.589 45.7151,-120.586 45.7141,-120.583 45.713,-120.581 45.712,-120.578 45.711,-120.574 45.7094,-120.57 45.7078,-120.566 45.7061,-120.562 45.7045,-120.558 45.703,-120.555 45.7015,-120.547 45.6975,-120.539 45.6934,-120.531 45.6894,-120.523 45.6854,-120.514 45.6826,-120.505 45.6799,-120.496 45.6771,-120.487 45.6743,-120.483 45.6728,-120.476 45.6713,-120.468 45.6698,-120.461 45.6683,-120.453 45.6668,-120.45 45.6675,-120.448 45.6681,-120.445 45.6687,-120.442 45.6694,-120.43 45.669,-120.418 45.6686,-120.406 45.6681,-120.394 45.6677,-120.381 45.6707,-120.368 45.6737,-120.355 45.6767,-120.342 45.6797,-120.336 45.681,-120.329 45.6823,-120.323 45.6836,-120.316 45.6849,-120.311 45.6848,-120.305 45.6847,-120.3 45.6846,-120.294 45.6845,-120.291 45.6862,-120.287 45.6879,-120.284 45.6896,-120.281 45.6913,-120.278 45.6923,-120.275 45.6933,-120.272 45.6934,-120.268 45.6934,-120.265 45.6935,-120.262 45.6935,-120.259 45.6927,-120.256 45.692,-120.252 45.6912,-120.249 45.6905,-120.241 45.692,-120.232 45.6935,-120.223 45.695,-120.215 45.6965,-120.21 45.6973,-120.206 45.6981,-120.202 45.6989,-120.197 45.6997,-120.192 45.7011,-120.186 45.7026,-120.181 45.7041,-120.175 45.7055,-120.172 45.7092,-120.169 45.7128,-120.166 45.7165,-120.162 45.7201,-120.16 45.7222,-120.158 45.7242,-120.155 45.7262,-120.153 45.7283,-120.149 45.7308,-120.146 45.7333,-120.142 45.7359,-120.138 45.7384,-120.136 45.7398,-120.133 45.7413,-120.131 45.7427,-120.129 45.7441,-120.125 45.7448,-120.121 45.7454,-120.117 45.7461,-120.113 45.7467,-120.109 45.7474,-120.106 45.7481,-120.102 45.7488,-120.099 45.7495,-120.095 45.7503,-120.091 45.7511,-120.087 45.7519,-120.083 45.7527,-120.081 45.7531,-120.078 45.7535,-120.076 45.7539,-120.074 45.7543,-120.07 45.7548,-120.066 45.7553,-120.062 45.7559,-120.058 45.7564,-120.049 45.7595,-120.04 45.7626,-120.031 45.7658,-120.022 45.7689,-120.017 45.771,-120.012 45.7732,-120.007 45.7754,-120.002 45.7775,-119.997 45.7798,-119.992 45.7822,-119.986 45.7845,-119.981 45.7868,-119.969 45.7888,-119.958 45.7909,-119.947 45.7929,-119.935 45.795,-119.922 45.7971,-119.908 45.7993,-119.894 45.8014,-119.881 45.8036,-119.85 45.8068,-119.819 45.8101,-119.788 45.8134,-119.757 45.8166,-119.749 45.817,-119.742 45.8175,-119.735 45.8179,-119.728 45.8184,-119.723 45.8195,-119.717 45.8205,-119.711 45.8216,-119.705 45.8227,-119.701 45.8234,-119.696 45.8242,-119.692 45.8249,-119.687 45.8257,-119.684 45.8256,-119.68 45.8256,-119.677 45.8256,-119.674 45.8256,-119.671 45.8251,-119.668 45.8246,-119.665 45.8241,-119.663 45.8237,-119.657 45.8239,-119.651 45.8241,-119.645 45.8243,-119.639 45.8244,-119.619 45.8242,-119.599 45.824,-119.578 45.8238,-119.558 45.8236,-119.53 45.8187,-119.502 45.8138,-119.474 45.8089,-119.446 45.804,-119.431 45.8011,-119.416 45.7983,-119.401 45.7954,-119.386 45.7925)
+LINESTRING(-84.3438 46.5045,-84.3427 46.4867,-84.3562 46.457,-84.3677 46.4241,-84.3773 46.3909,-84.385 46.3603)
+LINESTRING(-112.71 46.5344,-112.721 46.5396,-112.728 46.5429,-112.767 46.5596,-112.805 46.58,-112.836 46.6003,-112.869 46.6185,-112.911 46.6325,-112.937 46.6382,-112.959 46.6429,-112.98 46.6481,-113.005 46.6557,-113.018 46.6626,-113.052 46.6795,-113.102 46.7006,-113.163 46.72,-113.232 46.7342,-113.294 46.7418,-113.357 46.747,-113.429 46.7538,-113.486 46.7583,-113.538 46.7615,-113.587 46.7682,-113.638 46.7831,-113.653 46.7905,-113.665 46.7992,-113.677 46.8074,-113.693 46.8136,-113.741 46.8302,-113.774 46.8515,-113.804 46.8767,-113.842 46.9048,-113.851 46.9129,-113.863 46.9188,-113.876 46.9219,-113.891 46.9218,-113.902 46.9188,-113.91 46.914,-113.918 46.9092,-113.929 46.9062,-113.944 46.9069,-113.957 46.9118,-113.969 46.9189,-113.982 46.9263)
+LINESTRING(-111.997 46.5914,-112.005 46.6226,-112.018 46.6873,-112.029 46.7535,-112.03 46.7892,-112.009 46.8006,-112.004 46.8185,-112.01 46.8382,-112.023 46.8549,-112.042 46.861,-112.066 46.8647,-112.09 46.8681,-112.111 46.8732,-112.119 46.8858,-112.131 46.9028,-112.142 46.9183,-112.147 46.926,-112.142 46.9399,-112.13 46.9491,-112.114 46.9572,-112.102 46.9679,-112.097 46.9784,-112.094 46.9897,-112.09 47.0008,-112.082 47.0103,-112.057 47.0247,-112.029 47.0374,-112 47.0521,-111.973 47.0726,-111.935 47.1038,-111.905 47.1135,-111.869 47.1146,-111.811 47.1199,-111.806 47.1268,-111.798 47.1319,-111.791 47.1364,-111.75 47.2145,-111.728 47.2648,-111.716 47.2935,-111.71 47.3021,-111.627 47.3706,-111.56 47.4122,-111.483 47.4404,-111.365 47.4688,-111.352 47.4754,-111.344 47.4858,-111.342 47.4977,-111.335 47.5178)
+LINESTRING(-119.386 45.7925,-119.233 45.7694,-119.087 45.7403,-118.945 45.7048,-118.805 45.663)
+LINESTRING(-104.801 47.1034,-104.799 47.1074,-104.79 47.1159,-104.776 47.123,-104.764 47.1263,-104.754 47.1299,-104.743 47.1329,-104.731 47.1344,-104.705 47.1355,-104.679 47.1338,-104.658 47.1281,-104.637 47.1205,-104.581 47.1072,-104.562 47.1032,-104.505 47.085,-104.447 47.0674,-104.39 47.0488,-104.336 47.0272,-104.327 47.0219,-104.317 47.0153,-104.308 47.0094,-104.297 47.006,-104.264 47.0023,-104.232 46.9998,-104.198 46.997,-104.165 46.9921,-104.141 46.9842,-104.123 46.9729,-104.105 46.9607,-104.086 46.9502,-104.076 46.9479,-104.064 46.9469,-104.053 46.9462,-104.045 46.9445,-104.045 46.9445)
+LINESTRING(-72.3907 43.6448,-72.4119 43.6698,-72.4168 43.6838,-72.4136 43.6983,-72.4102 43.7249,-72.4143 43.737,-72.424 43.7584,-72.4346 43.7801,-72.4418 43.7928,-72.4483 43.7955,-72.4559 43.7972,-72.4639 43.7979,-72.4752 43.7943,-72.4824 43.787,-72.4975 43.7871,-72.5106 43.7996,-72.5225 43.813,-72.5305 43.8192,-72.5377 43.815,-72.5504 43.8104,-72.5622 43.8124,-72.5689 43.8184,-72.5679 43.8249,-72.5816 43.8342,-72.5907 43.8387,-72.6011 43.8518,-72.607 43.8614,-72.6124 43.8711,-72.6162 43.8802,-72.6162 43.8868,-72.6151 43.8983,-72.6139 43.9108,-72.6137 43.9203,-72.617 43.9283,-72.6207 43.9358,-72.6243 43.96,-72.6253 43.9835,-72.6237 44.0069,-72.6196 44.031,-72.6141 44.0396,-72.6084 44.0462,-72.6052 44.0544,-72.6048 44.0641,-72.6046 44.0821,-72.605 44.1012,-72.6044 44.1201,-72.6013 44.138,-72.5961 44.1495,-72.5889 44.1599,-72.5822 44.1704,-72.5784 44.1823,-72.5784 44.1982,-72.5808 44.2144,-72.5842 44.2305,-72.5868 44.2465,-72.603 44.2579,-72.6343 44.2763,-72.6687 44.2967,-72.6942 44.3139,-72.709 44.3175,-72.718 44.3186,-72.7255 44.3211,-72.7377 44.3302,-72.7479 44.3401,-72.7588 44.3496,-72.7729 44.3575,-72.7807 44.3602,-72.7891 44.3623,-72.7977 44.3639,-72.8062 44.3652,-72.8157 44.3621,-72.8253 44.3606,-72.8481 44.3655,-72.8659 44.3721,-72.8826 44.3794,-72.902 44.3863,-72.9305 44.3911,-72.9618 44.395,-72.9878 44.4032,-73.0002 44.4211,-73.0339 44.4308,-73.0903 44.4345,-73.1485 44.4397,-73.1873 44.454)
+LINESTRING(-92.1598 46.8139,-92.1933 46.7818,-92.2085 46.768,-92.2276 46.7518)
+LINESTRING(-72.3311 43.626,-72.3351 43.6255,-72.3636 43.6279)
+LINESTRING(-72.3636 43.6279,-72.363 43.6302,-72.3623 43.6325,-72.3614 43.6345,-72.3603 43.6357,-72.3589 43.6393,-72.3575 43.6429,-72.3562 43.6466,-72.3552 43.6502,-72.3344 43.7103,-72.3075 43.7449,-72.2815 43.7662,-72.2633 43.7867,-72.254 43.8122,-72.2485 43.8388,-72.2429 43.8655,-72.2337 43.8914,-72.2245 43.9052,-72.2132 43.9166,-72.2016 43.9275,-72.1916 43.9396,-72.1829 43.954,-72.1745 43.9695,-72.1668 43.9852,-72.1602 44.0001,-72.1483 44.0345,-72.1397 44.0697,-72.1324 44.1053,-72.1242 44.1403,-72.1216 44.1608,-72.1217 44.1857,-72.1228 44.2107,-72.123 44.2316,-72.1119 44.2862,-72.0903 44.3261,-72.0682 44.352,-72.0555 44.3643,-72.0431 44.378,-72.0326 44.3898,-72.0257 44.4021,-72.0255 44.4136)
+LINESTRING(-72.3907 43.6448,-72.3839 43.6406,-72.3772 43.6363,-72.3704 43.6321,-72.3636 43.6279)
+LINESTRING(-92.1598 46.8139,-92.1636 46.7991,-92.1559 46.7779,-92.1438 46.7556,-92.1348 46.7374)
+LINESTRING(-92.1348 46.7374,-92.1347 46.7374,-92.1257 46.7205)
+LINESTRING(-123.06 44.6288,-123.059 44.6457,-123.056 44.6623,-123.051 44.6787,-123.046 44.6953,-123.052 44.7271,-123.043 44.7674,-123.025 44.8072,-123.006 44.8375,-123.001 44.8691,-122.997 44.9286,-122.994 44.9889,-122.991 45.0232,-122.964 45.0658,-122.906 45.1307,-122.843 45.1976,-122.799 45.2463,-122.777 45.2841,-122.773 45.3129,-122.773 45.3389,-122.746 45.3733)
+LINESTRING(-96.8473 46.8983,-96.8501 46.9115,-96.8658 46.9442,-96.8909 46.9676,-96.8969 46.9858,-96.9108 47.0094,-96.9282 47.0318,-96.9445 47.0466,-96.9553 47.0896,-96.9833 47.1706,-97.0147 47.2545,-97.0353 47.3063,-97.0397 47.3143,-97.0453 47.3222,-97.0507 47.3301,-97.055 47.3381,-97.0571 47.3471,-97.0576 47.3568,-97.0583 47.3667,-97.061 47.3764,-97.0651 47.3836,-97.0702 47.3911,-97.075 47.3986,-97.0782 47.4058,-97.0807 47.4239,-97.0805 47.4432,-97.0803 47.4628,-97.0829 47.4819,-97.0851 47.4858,-97.0888 47.4907,-97.0924 47.4955,-97.0941 47.4991,-97.0932 47.5175,-97.0896 47.5361,-97.0857 47.5545,-97.0842 47.5725,-97.0864 47.6461,-97.0885 47.7197,-97.0896 47.7933,-97.0889 47.8669,-97.0905 47.8716,-97.0941 47.8767,-97.0977 47.8818,-97.0994 47.8865,-97.0988 47.8983,-97.0978 47.9104,-97.0966 47.9224,-97.0955 47.9343)
+LINESTRING(-104.045 46.9445,-104.035 46.9399,-104.028 46.9367,-104.021 46.9349,-104.008 46.9344,-103.947 46.937,-103.887 46.9421,-103.827 46.9467,-103.767 46.9477,-103.759 46.9488,-103.749 46.9517,-103.739 46.9551,-103.732 46.9577,-103.704 46.9539,-103.675 46.951,-103.646 46.9491,-103.617 46.9484,-103.588 46.932,-103.575 46.931,-103.56 46.931,-103.546 46.9319,-103.532 46.9337,-103.498 46.9203,-103.456 46.9098,-103.42 46.901,-103.398 46.8926,-103.387 46.8928,-103.376 46.8923,-103.364 46.8909,-103.354 46.8884,-103.315 46.8953,-103.274 46.8976,-103.232 46.8975,-103.191 46.8972)
+LINESTRING(-92.2276 46.7518,-92.2444 46.7376,-92.2629 46.7248,-92.2837 46.7142,-92.3079 46.7069,-92.332 46.7046,-92.354 46.7063,-92.3762 46.7088,-92.4007 46.709,-92.4236 46.7046,-92.4419 46.6955,-92.457 46.683,-92.4707 46.6685)
+LINESTRING(-70.7622 43.0946,-70.7446 43.1066,-70.7183 43.1232,-70.6931 43.1397,-70.6783 43.1513,-70.6645 43.1725,-70.6457 43.2068,-70.6288 43.2416,-70.6207 43.2644,-70.6209 43.2742,-70.6224 43.2845,-70.6229 43.2948,-70.6204 43.3044,-70.617 43.3092,-70.6125 43.3138,-70.608 43.3185,-70.6045 43.3233,-70.5953 43.3411,-70.587 43.3592,-70.5788 43.3773,-70.5696 43.3951,-70.5528 43.417,-70.519 43.4588,-70.4831 43.5014,-70.4602 43.5261,-70.43 43.5506,-70.3981 43.5769,-70.3687 43.6045,-70.3462 43.6329)
+LINESTRING(-96.8424 46.8469,-96.8427 46.8767,-96.8473 46.8983)
+LINESTRING(-96.8424 46.8469,-96.8244 46.846,-96.8062 46.8456,-96.7881 46.8455,-96.77 46.8454,-96.7596 46.8454)
+LINESTRING(-98.7127 46.8835,-98.7028 46.887,-98.693 46.8896,-98.6829 46.8912,-98.672 46.8917,-98.5927 46.8915,-98.5133 46.8913,-98.434 46.8911,-98.3547 46.8908,-98.3366 46.8926,-98.3234 46.8967,-98.3111 46.9008,-98.2959 46.9027,-98.2447 46.9013,-98.1861 46.8996,-98.1295 46.9019,-98.0843 46.9124,-98.0677 46.9129,-98.0513 46.9116,-98.035 46.9098,-98.0187 46.909,-97.9987 46.9108,-97.9769 46.9148,-97.9548 46.9189,-97.9339 46.9212,-97.8709 46.9225,-97.8074 46.9225,-97.7439 46.9219,-97.6808 46.9213,-97.6637 46.9105,-97.6438 46.8951,-97.6248 46.8812,-97.6104 46.8753,-97.4461 46.877,-97.2816 46.8785,-97.1172 46.879,-96.9529 46.8778,-96.9297 46.8585,-96.9066 46.8499,-96.879 46.8475,-96.8424 46.8469)
+LINESTRING(-92.1257 46.7205,-92.1245 46.7181,-92.1094 46.7013,-92.0909 46.6854,-92.0701 46.6692,-92.039 46.6513,-92.0003 46.6363,-91.9598 46.6229,-91.9031 46.6023)
+LINESTRING(-84.385 46.3603,-84.4033 46.3269,-84.4225 46.2997,-84.4482 46.2766,-84.4859 46.2552,-84.4979 46.2503,-84.5108 46.2457,-84.5234 46.2409,-84.5345 46.2353,-84.5391 46.2313,-84.5421 46.2269,-84.5448 46.2224,-84.5488 46.2181,-84.549 46.2104,-84.5534 46.2046,-84.5588 46.1989,-84.5619 46.1912,-84.5732 46.1552,-84.5962 46.1434,-84.6297 46.1357,-84.6728 46.112,-84.7022 46.0829,-84.7367 46.0419,-84.7669 46.0001,-84.7834 45.9692,-84.782 45.9391,-84.7655 45.9127,-84.7454 45.8881,-84.7385 45.8745)
+LINESTRING(-84.7385 45.8745,-84.7329 45.8635,-84.7334 45.846)
+LINESTRING(-100.289 46.8362,-100.283 46.8366,-100.277 46.8369,-100.271 46.8372,-100.265 46.8376,-100.175 46.8653,-100.057 46.8658,-99.9458 46.8608,-99.879 46.8721,-99.8652 46.873,-99.8514 46.8731,-99.8377 46.873,-99.8239 46.8733,-99.7404 46.877,-99.657 46.8806,-99.5735 46.8841,-99.4899 46.8873,-99.47 46.8857,-99.4538 46.8813,-99.4391 46.8765,-99.4237 46.8739,-99.3542 46.8748,-99.2838 46.8797,-99.2132 46.885,-99.1434 46.887,-99.1368 46.8863,-99.1299 46.8846,-99.1229 46.883,-99.1163 46.8822,-99.1016 46.8835,-99.0861 46.8868,-99.0705 46.8903,-99.0557 46.8926,-99.0368 46.8934,-99.0167 46.8934,-98.9965 46.893,-98.9773 46.8927,-98.9184 46.8923,-98.8595 46.892,-98.8006 46.8916,-98.7417 46.8912,-98.7348 46.8879,-98.728 46.8857,-98.7208 46.8843,-98.7127 46.8835)
+LINESTRING(-100.773 46.8311,-100.754 46.8309,-100.737 46.8326,-100.72 46.8351,-100.703 46.8376,-100.68 46.8391,-100.655 46.8389,-100.629 46.8379,-100.605 46.8373,-100.528 46.8375,-100.447 46.8384,-100.366 46.8385,-100.289 46.8362)
+LINESTRING(-75.9866 44.3056,-75.982 44.2993)
+LINESTRING(-100.773 46.8311,-100.792 46.8307,-100.807 46.8296,-100.822 46.8265,-100.838 46.8202,-100.856 46.827,-100.894 46.8417,-100.922 46.8524,-100.949 46.8632,-100.996 46.8621,-101.043 46.8628,-101.09 46.8638,-101.136 46.8638,-101.32 46.8614,-101.503 46.8607,-101.686 46.8607,-101.869 46.8603,-101.872 46.8602,-101.875 46.8601,-101.877 46.8602,-101.88 46.8602,-101.897 46.8624,-101.916 46.8649,-101.935 46.867,-101.953 46.8677,-101.967 46.8669,-101.982 46.8654,-101.997 46.8639,-102.011 46.8629,-102.05 46.8631,-102.091 46.8645,-102.132 46.8652,-102.169 46.8634,-102.179 46.8612,-102.19 46.8576,-102.201 46.854,-102.213 46.8519,-102.244 46.8535,-102.275 46.8603,-102.305 46.8684,-102.336 46.8738,-102.39 46.8756,-102.444 46.8735,-102.496 46.8711,-102.543 46.8717,-102.588 46.8762,-102.633 46.8811,-102.679 46.8842,-102.726 46.8831,-102.754 46.8926,-102.787 46.8936,-102.82 46.8906,-102.845 46.8884,-102.916 46.8883,-103.022 46.8891,-103.126 46.8917,-103.191 46.8972)
+LINESTRING(-84.7334 45.846,-84.7334 45.8433,-84.734 45.8232,-84.7345 45.8031,-84.7349 45.7867)
+LINESTRING(-71.5367 43.1704,-71.5365 43.1762,-71.5341 43.1817,-71.5246 43.1931,-71.5157 43.2097,-71.5096 43.2264,-71.5086 43.2379,-71.5243 43.2661,-71.5485 43.2971,-71.5721 43.3256,-71.5854 43.3462,-71.5906 43.382,-71.5851 43.4124,-71.5762 43.4352,-71.5714 43.448,-71.5823 43.4636,-71.6013 43.4757,-71.6225 43.4869,-71.6401 43.4997,-71.6426 43.5073,-71.6411 43.5173,-71.6382 43.5275,-71.6364 43.5357,-71.6381 43.5497,-71.6425 43.5623,-71.6456 43.5755,-71.6438 43.5908,-71.6559 43.6002,-71.6624 43.6059,-71.6727 43.6339,-71.6744 43.6587,-71.6757 43.6835,-71.6808 43.7068,-71.6925 43.7303,-71.7059 43.7534,-71.7155 43.7773,-71.716 43.8028,-71.7109 43.8128,-71.7015 43.8242,-71.6913 43.8356,-71.6838 43.8457,-71.686 43.8536,-71.6957 43.8597,-71.7066 43.8648,-71.7311 43.9108,-71.7284 43.936,-71.7147 43.96,-71.7062 44.0024,-71.7056 44.0209,-71.7048 44.0399,-71.7042 44.0585,-71.7043 44.0759,-71.7016 44.0914,-71.6956 44.1207,-71.691 44.1417,-71.6864 44.1627,-71.6903 44.1783,-71.6918 44.1887,-71.6971 44.1965,-71.7058 44.1977,-71.7145 44.1988,-71.724 44.2003,-71.7316 44.2019,-71.7405 44.212,-71.7545 44.2247,-71.7675 44.2357,-71.7732 44.2403,-71.7655 44.2518,-71.7567 44.2652,-71.7508 44.2786,-71.752 44.2906,-71.7589 44.2933,-71.7664 44.2948,-71.7788 44.3005,-71.7872 44.3015,-71.7954 44.3031,-71.8015 44.3165,-71.8055 44.3235,-71.8166 44.3278,-71.8323 44.3239,-71.8388 44.3192,-71.8445 44.3129,-71.8553 44.3123,-71.8662 44.3118,-71.8781 44.3189,-71.8873 44.3238,-71.8985 44.3318,-71.8992 44.3365)
+LINESTRING(-84.7349 45.7867,-84.735 45.783,-84.7345 45.7726,-84.7343 45.7625,-84.7336 45.7525,-84.7315 45.7422)
+LINESTRING(-71.5367 43.1704,-71.546 43.1693,-71.5551 43.1743,-71.5673 43.1797,-71.5802 43.184,-71.5914 43.1855,-71.5973 43.1833,-71.6031 43.1811,-71.609 43.1789,-71.6148 43.1767,-71.6335 43.179,-71.652 43.1806,-71.6705 43.1808,-71.6891 43.1787,-71.7042 43.1959,-71.7213 43.2116,-71.7382 43.2269,-71.7528 43.2427,-71.7563 43.2483,-71.7593 43.2544,-71.7624 43.2604,-71.7663 43.2657,-71.7718 43.2696,-71.7805 43.2738,-71.7899 43.2772,-71.7978 43.2788,-71.8074 43.2764,-71.817 43.274,-71.8274 43.2764,-71.8403 43.2809,-71.8529 43.2861,-71.8623 43.2903,-71.8656 43.2967,-71.8663 43.3029,-71.8666 43.3089,-71.8688 43.3149,-71.8796 43.3176,-71.8914 43.3195,-71.9023 43.3223,-71.9106 43.3277,-71.9123 43.3334,-71.914 43.3391,-71.9157 43.3448,-71.9174 43.3505,-71.9335 43.3695,-71.9615 43.3822,-71.9904 43.3913,-72.0095 43.3991,-72.0201 43.4083,-72.0293 43.4181,-72.0381 43.4279,-72.0477 43.4371,-72.0558 43.4411,-72.0658 43.4427,-72.0764 43.4437,-72.0861 43.4456,-72.0966 43.4593,-72.1013 43.4719,-72.104 43.4828,-72.1086 43.4911,-72.1222 43.4953,-72.1341 43.5042,-72.1429 43.5151,-72.1468 43.5253,-72.1429 43.5322,-72.1396 43.5393,-72.1368 43.5466,-72.1345 43.5538,-72.1378 43.5601,-72.1434 43.5658,-72.1499 43.5712,-72.1556 43.5766,-72.1597 43.5828,-72.1627 43.5898,-72.166 43.5967,-72.1706 43.6024,-72.1835 43.613,-72.1964 43.623,-72.2086 43.6335,-72.2194 43.6454,-72.2298 43.6488,-72.2388 43.6506,-72.2478 43.6511,-72.2583 43.6508,-72.2809 43.6379,-72.307 43.6291,-72.3311 43.626)
+LINESTRING(-112.65 46.0082,-112.726 46.0286,-112.795 46.0514,-112.847 46.0829,-112.875 46.1298,-112.872 46.2123,-112.839 46.2802,-112.8 46.3264,-112.79 46.3365,-112.771 46.3455,-112.735 46.3572,-112.701 46.3703,-112.672 46.3918,-112.659 46.4134,-112.651 46.4341,-112.648 46.4554,-112.651 46.4787,-112.666 46.5064,-112.693 46.5265,-112.71 46.5344)
+LINESTRING(-70.8935 42.8831,-70.8815 42.9071,-70.8668 42.9334,-70.8583 42.9591)
+LINESTRING(-111.997 46.5914,-111.979 46.58,-111.962 46.5668,-111.948 46.5528,-111.934 46.5385,-111.951 46.4912,-111.989 46.4419,-112.026 46.3926,-112.045 46.3457,-112.064 46.3214,-112.096 46.2849,-112.131 46.2508,-112.156 46.234,-112.161 46.2405,-112.168 46.248,-112.177 46.2547,-112.186 46.2588,-112.196 46.2595,-112.214 46.2639,-112.239 46.2691,-112.264 46.272,-112.283 46.2723,-112.302 46.2717,-112.32 46.27,-112.338 46.2669,-112.347 46.2572,-112.345 46.2502,-112.339 46.2445,-112.339 46.2333,-112.344 46.2238,-112.336 46.212,-112.34 46.2023,-112.337 46.1961,-112.335 46.1894,-112.335 46.1825,-112.337 46.1762,-112.357 46.1555,-112.382 46.1354,-112.408 46.1041,-112.433 46.0499,-112.443 46.044,-112.453 46.0382,-112.459 46.0231,-112.468 46.0081,-112.476 45.9939,-112.481 45.9814)
+LINESTRING(-112.65 46.0082,-112.646 46.0086,-112.643 46.0085,-112.636 46.0082,-112.628 46.0079,-112.621 46.0074,-112.614 46.0064,-112.606 46.0047,-112.594 46.0021,-112.583 45.9993,-112.579 45.9984,-112.575 45.9977,-112.567 45.9963,-112.556 45.9935,-112.547 45.9908,-112.537 45.9883,-112.526 45.986,-112.516 45.9841,-112.505 45.9823,-112.499 45.9816,-112.493 45.9812,-112.487 45.9811,-112.481 45.9814)
+LINESTRING(-70.8961 42.8601,-70.8941 42.882,-70.8935 42.8831)
+LINESTRING(-70.8583 42.9591,-70.8744 42.9648,-70.8897 42.9695,-70.9045 42.9751,-70.9194 42.9832,-70.9262 42.9888,-70.9347 42.9962,-70.9439 43.003,-70.9527 43.0066,-70.9623 43.008,-70.9719 43.0093,-70.9816 43.0103,-70.9913 43.0105,-70.994 43.0094,-70.9966 43.0084,-71.0074 43.0108,-71.0183 43.0135,-71.0292 43.0159,-71.0401 43.0175,-71.0778 43.0369,-71.1074 43.0405,-71.1361 43.0381,-71.1711 43.0394,-71.1736 43.0413,-71.1761 43.0432,-71.1802 43.0436,-71.1847 43.0433,-71.189 43.0425,-71.1926 43.041,-71.1949 43.0413,-71.1971 43.0415,-71.1994 43.0418,-71.2016 43.0421,-71.2079 43.0466,-71.2142 43.0512,-71.2208 43.0567,-71.2242 43.0611,-71.2303 43.0618,-71.2365 43.0626,-71.2427 43.0632,-71.2488 43.0637,-71.2511 43.0623,-71.2533 43.061,-71.2555 43.0596,-71.2577 43.0583,-71.2659 43.0582,-71.2739 43.059,-71.2819 43.0598,-71.29 43.0595,-71.2946 43.0556,-71.2992 43.0516,-71.3038 43.0477,-71.3084 43.0438,-71.3348 43.0391,-71.3615 43.0277,-71.3874 43.0142,-71.4114 43.0032,-71.4144 42.9984,-71.4175 42.9935,-71.4206 42.9887,-71.4236 42.9839)
+LINESTRING(-71.4236 42.9839,-71.4347 43.0016,-71.4464 43.0189,-71.4605 43.035,-71.4787 43.0492,-71.4768 43.0576,-71.4766 43.066,-71.4777 43.0746,-71.4791 43.083,-71.4933 43.1249,-71.5121 43.1495,-71.5289 43.1628,-71.5367 43.1704)
+LINESTRING(-104.801 47.1034,-104.804 47.0976,-104.808 47.0863,-104.813 47.0731,-104.817 47.0615,-104.823 47.0503,-104.832 47.0383,-104.841 47.0292,-104.85 47.0215,-104.859 47.014,-104.869 47.0052,-104.874 46.9996,-104.886 46.9904,-104.894 46.986,-104.903 46.9799,-104.91 46.974,-104.919 46.9686,-104.93 46.9643,-104.967 46.938,-105.004 46.9179,-105.044 46.901,-105.091 46.8846,-105.112 46.8697,-105.12 46.8479,-105.126 46.8245,-105.142 46.8049,-105.156 46.7931,-105.166 46.781,-105.177 46.7695,-105.193 46.7589,-105.218 46.7479,-105.243 46.7405,-105.269 46.7337,-105.297 46.7245,-105.328 46.7089,-105.35 46.6913,-105.37 46.6714,-105.391 46.6487,-105.399 46.6395,-105.404 46.6307,-105.41 46.6218,-105.416 46.6118,-105.436 46.5843,-105.457 46.5608,-105.48 46.5383,-105.507 46.5141,-105.521 46.5022,-105.535 46.4918,-105.55 46.4828,-105.57 46.4754,-105.601 46.469,-105.63 46.4662,-105.658 46.4621,-105.686 46.4519,-105.698 46.4427,-105.705 46.432)
+LINESTRING(-70.8961 42.8601,-70.9156 42.8644,-70.9329 42.8611,-70.9503 42.8556,-70.9698 42.8512,-70.9894 42.8501,-71.0076 42.8501,-71.0244 42.8481,-71.0396 42.8409,-71.0462 42.8339,-71.0502 42.8265,-71.0546 42.8196,-71.0622 42.8137,-71.0633 42.8133)
+LINESTRING(-71.0633 42.8133,-71.0766 42.8085)
+LINESTRING(-71.2314 42.746,-71.2354 42.7525,-71.2388 42.7564,-71.2424 42.7602,-71.2457 42.764,-71.2481 42.7682,-71.2495 42.7719,-71.2509 42.7755,-71.2523 42.7792,-71.2537 42.7829,-71.2574 42.784,-71.2611 42.785,-71.2648 42.7861,-71.2684 42.7871,-71.2724 42.7909,-71.2733 42.8017,-71.2759 42.8101,-71.2823 42.8165,-71.2946 42.8218,-71.2999 42.8345,-71.3115 42.8458,-71.326 42.8558,-71.3397 42.8644,-71.3515 42.8837,-71.363 42.9046,-71.3749 42.925,-71.3878 42.9426,-71.3938 42.9477,-71.4011 42.9528,-71.408 42.9579,-71.4128 42.9634,-71.4155 42.9686,-71.4182 42.9737,-71.4209 42.9788,-71.4236 42.9839)
+LINESTRING(-73.4559 45.0081,-73.4559 45.008,-73.4644 44.9844,-73.4542 44.9363,-73.46 44.8944,-73.4472 44.8485,-73.4522 44.813,-73.4476 44.7429,-73.531 44.691,-73.5231 44.6293,-73.5416 44.5666,-73.5437 44.4946,-73.5381 44.4001,-73.5713 44.3554,-73.5717 44.277,-73.5628 44.1889,-73.583 44.1741,-73.5864 44.1445,-73.6928 44.0424,-73.7668 43.9128,-73.7793 43.6689,-73.7329 43.604,-73.7446 43.4685,-73.7076 43.3638)
+LINESTRING(-71.0766 42.8085,-71.0911 42.8032,-71.119 42.7952,-71.1428 42.7848,-71.1591 42.7671,-71.1613 42.7438,-71.1407 42.7008,-71.1429 42.6776,-71.1501 42.6705,-71.1612 42.6672,-71.1744 42.667,-71.194 42.667)
+LINESTRING(-71.194 42.667,-71.205 42.6885,-71.2135 42.7102,-71.2225 42.7317,-71.2314 42.746)
+LINESTRING(-70.9999 42.5128,-70.9943 42.5144,-70.9887 42.5159,-70.9831 42.5175,-70.9775 42.5191,-70.9787 42.5248,-70.9799 42.5304,-70.9811 42.5361,-70.9823 42.5418,-70.9615 42.5782,-70.9646 42.6004,-70.9755 42.6243,-70.9776 42.6659,-70.9646 42.7079,-70.9432 42.7483,-70.9226 42.7861,-70.9121 42.8202,-70.9105 42.8312,-70.9075 42.8409,-70.9028 42.8502,-70.8961 42.8601)
+LINESTRING(-71.1169 42.5018,-71.101 42.5031,-71.0932 42.5083,-71.0875 42.5158,-71.0782 42.524,-71.0648 42.5229,-71.0462 42.5179,-71.0241 42.5132,-70.9999 42.5128)
+LINESTRING(-71.1169 42.5018,-71.1182 42.5042,-71.1194 42.5065,-71.1206 42.5089,-71.1219 42.5112,-71.1268 42.5187,-71.133 42.5259,-71.1391 42.533,-71.1441 42.5405,-71.1489 42.5516,-71.1527 42.5631,-71.1568 42.5745,-71.1626 42.5856,-71.167 42.59,-71.1728 42.5937,-71.1784 42.5975,-71.1824 42.602,-71.1864 42.6156,-71.1883 42.6327,-71.1902 42.6507,-71.194 42.667)
+LINESTRING(-71.194 42.667,-71.2314 42.6476,-71.2649 42.63,-71.3016 42.616,-71.3487 42.6077,-71.3949 42.5947,-71.4425 42.5718,-71.4848 42.5435,-71.5156 42.5142)
+LINESTRING(-105.705 46.432,-105.708 46.4287,-105.71 46.4253,-105.713 46.4219,-105.717 46.4186,-105.736 46.4024,-105.754 46.3862,-105.771 46.3699,-105.791 46.3534,-105.804 46.3438,-105.818 46.329,-105.832 46.3142,-105.845 46.3046,-105.871 46.2915,-105.898 46.2777,-105.924 46.2642,-105.951 46.2518,-106.001 46.2355,-106.088 46.2121,-106.179 46.1924,-106.244 46.187,-106.26 46.1903,-106.28 46.1953,-106.299 46.1998,-106.315 46.2016,-106.391 46.2004,-106.466 46.1997,-106.541 46.1995,-106.617 46.2,-106.626 46.2,-106.634 46.2,-106.646 46.1952,-106.662 46.1897,-106.679 46.1851,-106.692 46.1833,-106.704 46.184,-106.716 46.1854,-106.729 46.1869,-106.741 46.1879,-106.772 46.1899,-106.808 46.1933,-106.846 46.1976,-106.883 46.2023,-106.897 46.2032,-106.91 46.2027,-106.923 46.2017,-106.938 46.2011,-106.983 46.2038,-107.069 46.2091,-107.155 46.2124,-107.2 46.2091,-107.208 46.1844,-107.222 46.1578,-107.245 46.1352,-107.278 46.1227,-107.293 46.1198,-107.31 46.1161,-107.326 46.1121,-107.342 46.1087,-107.353 46.1064,-107.364 46.1041,-107.375 46.1018,-107.385 46.1,-107.399 46.0967,-107.413 46.0922,-107.427 46.0878,-107.441 46.0852,-107.463 46.0838,-107.482 46.0829,-107.501 46.0807,-107.524 46.0751,-107.539 46.069,-107.551 46.0613,-107.563 46.0532,-107.576 46.046,-107.586 46.0425,-107.598 46.0399,-107.61 46.0371,-107.621 46.0328,-107.628 46.0284,-107.635 46.0236,-107.643 46.0188,-107.65 46.0146,-107.685 46.0009,-107.727 45.987,-107.764 45.9763,-107.779 45.972,-107.831 45.9555,-107.868 45.9456,-107.904 45.9393,-107.958 45.9338,-108.063 45.9133,-108.192 45.8958,-108.312 45.8714,-108.39 45.8303)
+LINESTRING(-112.481 45.9814,-112.475 45.9667,-112.468 45.9512,-112.459 45.9368,-112.445 45.9252,-112.36 45.9117,-112.275 45.9003,-112.189 45.8895,-112.102 45.878,-112.062 45.8769,-111.984 45.8762,-111.907 45.8758,-111.87 45.8759,-111.843 45.8838,-111.818 45.8954,-111.794 45.907,-111.77 45.9149,-111.725 45.9185,-111.653 45.9201,-111.582 45.9174,-111.543 45.9081,-111.536 45.9009,-111.527 45.8945,-111.447 45.8792,-111.341 45.8487,-111.246 45.8096,-111.199 45.7685,-111.159 45.7567,-111.123 45.7402,-111.092 45.7205,-111.063 45.6987,-111.053 45.6983,-111.043 45.6965,-111.033 45.6937,-111.025 45.6902,-111.012 45.6733,-110.987 45.6631,-110.958 45.6536,-110.934 45.6388,-110.908 45.6457,-110.873 45.6553,-110.84 45.6641,-110.816 45.6689,-110.807 45.6658,-110.798 45.6623,-110.789 45.6584,-110.78 45.6543,-110.756 45.6552,-110.73 45.6573,-110.705 45.6598,-110.679 45.6623,-110.67 45.6617,-110.661 45.6611,-110.652 45.6606,-110.643 45.66,-110.628 45.6549,-110.608 45.6484,-110.588 45.6434,-110.572 45.6427,-110.56 45.6391,-110.549 45.6354,-110.538 45.6318,-110.527 45.6281)
+LINESTRING(-108.479 45.7969,-108.462 45.8024,-108.432 45.8139,-108.411 45.8221,-108.39 45.8303)
+LINESTRING(-71.5156 42.5142,-71.5329 42.517,-71.5512 42.5183,-71.5683 42.52,-71.5822 42.5242,-71.6076 42.5198,-71.6429 42.519,-71.6803 42.519,-71.7122 42.5168)
+LINESTRING(-72.3636 43.6279,-72.3681 43.6255,-72.3726 43.6243,-72.3767 43.6226,-72.3799 43.6188,-72.3845 43.6151,-72.3917 43.6137,-72.3999 43.6131,-72.4073 43.6112,-72.4236 43.6017,-72.435 43.591,-72.4435 43.5787,-72.451 43.5643,-72.4549 43.552,-72.4555 43.5404,-72.4554 43.5288,-72.457 43.5162,-72.4595 43.5079,-72.4622 43.5003,-72.464 43.4928,-72.4636 43.4847,-72.4588 43.475,-72.4515 43.4672,-72.4443 43.4593,-72.4395 43.4496,-72.437 43.4222,-72.4412 43.3976,-72.4478 43.3729,-72.4524 43.3453,-72.4509 43.3318,-72.4471 43.3197,-72.4447 43.3078,-72.4476 43.2949,-72.4522 43.2855,-72.4568 43.276,-72.4614 43.2666,-72.466 43.2571,-72.4755 43.2431,-72.4871 43.2317,-72.4987 43.2203,-72.5082 43.2063,-72.5131 43.1909,-72.514 43.1767,-72.5141 43.1624,-72.5168 43.1464,-72.5243 43.1238,-72.5309 43.1039,-72.5357 43.0838,-72.5377 43.0607,-72.54 43.0549,-72.5422 43.0492,-72.5448 43.0435,-72.5473 43.0378,-72.5623 43.0218,-72.5833 43.0116,-72.6044 43.0014,-72.6193 42.9854,-72.6239 42.976,-72.6284 42.9665,-72.6329 42.9571,-72.6374 42.9476,-72.6435 42.9295,-72.6453 42.9116,-72.6447 42.8934,-72.6436 42.8747,-72.6428 42.854,-72.6415 42.8378,-72.6383 42.8217,-72.632 42.8014,-72.6196 42.784,-72.6004 42.7687,-72.5828 42.7579,-72.5751 42.7538,-72.5595 42.7364,-72.558 42.7299)
+LINESTRING(-71.2699 42.3314,-71.2727 42.3358,-71.2749 42.3408,-71.2763 42.346,-71.2766 42.3509,-71.2728 42.3687,-71.2656 42.3871,-71.2585 42.4057,-71.2553 42.424,-71.2559 42.4353,-71.2565 42.4468,-71.2552 42.4582,-71.2502 42.469,-71.2448 42.4719,-71.2355 42.4743,-71.2254 42.4763,-71.2178 42.478,-71.1907 42.4883,-71.1708 42.4944,-71.1492 42.4983,-71.1169 42.5018)
+LINESTRING(-108.812 45.6861,-108.777 45.691,-108.745 45.698,-108.714 45.7055,-108.682 45.712,-108.654 45.7219,-108.63 45.7294,-108.605 45.7365,-108.578 45.745,-108.551 45.7551,-108.525 45.7669,-108.501 45.7807,-108.479 45.7969)
+LINESTRING(-110.527 45.6281,-110.505 45.6341,-110.487 45.6444,-110.47 45.6546,-110.448 45.6606,-110.43 45.6595,-110.414 45.6541,-110.399 45.6466,-110.381 45.6394,-110.353 45.6321,-110.327 45.6285,-110.299 45.6281,-110.269 45.63,-110.225 45.6404,-110.191 45.6596,-110.158 45.6828,-110.122 45.7054,-110.1 45.7134,-110.076 45.7189,-110.053 45.7244,-110.031 45.7327,-110.007 45.7466,-109.986 45.759,-109.964 45.7687,-109.935 45.7742,-109.921 45.7724,-109.906 45.7663,-109.892 45.7586,-109.88 45.7516,-109.87 45.7435,-109.862 45.7343,-109.854 45.7248,-109.846 45.7156,-109.817 45.6945,-109.782 45.6796,-109.743 45.6701,-109.703 45.6655,-109.663 45.6607,-109.627 45.659,-109.591 45.6598,-109.55 45.6627,-109.519 45.6663,-109.492 45.6709,-109.465 45.6755,-109.434 45.6791,-109.406 45.6812,-109.381 45.6829,-109.357 45.6846,-109.329 45.6867,-109.312 45.6888,-109.297 45.6915,-109.281 45.6942,-109.264 45.6963,-109.217 45.6908,-109.178 45.6737,-109.139 45.6566,-109.093 45.6511,-109.055 45.6551,-109.019 45.6603,-108.984 45.6662,-108.946 45.6723,-108.937 45.6741,-108.927 45.676,-108.918 45.6775,-108.908 45.6787,-108.884 45.6805,-108.86 45.6824,-108.836 45.6842,-108.812 45.6861)
+LINESTRING(-70.9999 42.5128,-71.0202 42.4814,-71.0191 42.4449,-71.0248 42.4035,-71.0656 42.3576,-71.0528 42.334,-71.0462 42.2992,-71.0379 42.2612,-71.0199 42.228)
+LINESTRING(-72.558 42.7299,-72.5551 42.7169,-72.5587 42.6964,-72.5671 42.6758,-72.5735 42.6634,-72.58 42.6518,-72.5866 42.6402,-72.593 42.6278)
+LINESTRING(-71.7122 42.5168,-71.7304 42.5246,-71.7454 42.5358,-71.7584 42.5461,-71.7708 42.5507,-71.7955 42.5507,-71.8216 42.5493,-71.8473 42.5466,-71.871 42.5428,-71.8741 42.5428,-71.9049 42.5448,-71.9373 42.5496,-71.9695 42.5552,-71.9999 42.5596,-72.0094 42.5593,-72.019 42.5576,-72.0294 42.5562,-72.0416 42.5567,-72.0519 42.5587,-72.0621 42.5612,-72.0721 42.5639,-72.0821 42.5665,-72.1005 42.5691,-72.1137 42.5687,-72.1273 42.5711,-72.147 42.5817,-72.1847 42.5786,-72.2245 42.566,-72.2621 42.555,-72.2931 42.5568,-72.302 42.5619,-72.3097 42.5677,-72.317 42.5737,-72.3251 42.5793,-72.3331 42.5835,-72.3414 42.5874,-72.3495 42.5916,-72.3564 42.5968,-72.36 42.6012,-72.3627 42.6059,-72.3654 42.6106,-72.3691 42.6149,-72.4003 42.6215,-72.4252 42.6165,-72.4472 42.6057,-72.4698 42.5947,-72.4727 42.5949,-72.4757 42.5952,-72.4789 42.5952,-72.4816 42.5946,-72.499 42.6062,-72.5304 42.6149,-72.5653 42.6218,-72.593 42.6278)
+LINESTRING(-96.8424 46.8469,-96.8423 46.8224,-96.8429 46.7977,-96.8432 46.773,-96.8419 46.7486,-96.8402 46.7414,-96.8374 46.734,-96.8346 46.7267,-96.833 46.7195,-96.8329 46.6969,-96.8348 46.6739,-96.8362 46.651,-96.8347 46.6286,-96.832 46.6167,-96.829 46.6058,-96.8264 46.5943,-96.8252 46.5807,-96.8266 46.5578,-96.8299 46.5358,-96.8332 46.5138,-96.8344 46.491,-96.8331 46.3812,-96.8339 46.2715,-96.8358 46.1618,-96.8377 46.052,-96.8372 46.0204,-96.8366 45.9867,-96.8389 45.9534,-96.8434 45.936)
+LINESTRING(-71.1303 42.202,-71.1129 42.2035,-71.0943 42.2032,-71.0759 42.2032,-71.0591 42.2059,-71.0482 42.2109,-71.039 42.2174,-71.0301 42.2236,-71.0199 42.228)
+LINESTRING(-71.1303 42.202,-71.1914 42.2171,-71.2108 42.233,-71.2128 42.2535,-71.2217 42.2822,-71.2319 42.2945,-71.2452 42.306,-71.2587 42.3179,-71.2699 42.3314)
+LINESTRING(-71.2699 42.3314,-71.2938 42.3293,-71.3159 42.323,-71.3373 42.3157,-71.3593 42.3106,-71.3777 42.3094,-71.397 42.3097,-71.4162 42.3098,-71.4343 42.3084,-71.4473 42.3049,-71.4584 42.2995,-71.4685 42.2931,-71.4784 42.2866,-71.4964 42.2785,-71.518 42.2726,-71.5403 42.2668,-71.5608 42.2593)
+LINESTRING(-71.5156 42.5142,-71.5453 42.4872,-71.5783 42.4498,-71.6028 42.4103,-71.6068 42.3774,-71.6005 42.3644,-71.5925 42.352,-71.5847 42.3395,-71.5788 42.3265,-71.5744 42.3097,-71.5708 42.2928,-71.5668 42.2759,-71.5608 42.2593)
+LINESTRING(-96.7596 46.8454,-96.7446 46.8455,-96.7192 46.8456,-96.6938 46.8456,-96.6684 46.8455,-96.6284 46.8409,-96.6166 46.8298,-96.6138 46.8136,-96.601 46.7938,-96.5789 46.7759,-96.5549 46.7585,-96.5304 46.7414,-96.5067 46.7244,-96.4772 46.7063,-96.444 46.6896,-96.4137 46.6741,-96.3928 46.6593,-96.3271 46.5796,-96.2703 46.4977,-96.2093 46.4177,-96.1307 46.3436,-96.1241 46.3302,-96.1227 46.3107,-96.1229 46.2925,-96.1211 46.2828,-96.0682 46.2439,-96.015 46.2056,-95.9631 46.1666,-95.914 46.1254,-95.9041 46.1148,-95.898 46.1056,-95.893 46.0964,-95.8864 46.086,-95.8796 46.0792,-95.871 46.0727,-95.8621 46.0664,-95.8546 46.06,-95.8498 46.0541,-95.8455 46.0479,-95.8406 46.0418,-95.8341 46.0361,-95.8149 46.0254,-95.7943 46.0182,-95.7725 46.0126,-95.7499 46.0073,-95.7354 46.0021,-95.7212 45.9949,-95.7074 45.9873,-95.694 45.9807,-95.6518 45.9638,-95.6174 45.9499,-95.5844 45.9339,-95.546 45.9104,-95.5349 45.9031,-95.5215 45.895,-95.5075 45.8874,-95.4946 45.8818,-95.4836 45.8791,-95.4717 45.8775,-95.46 45.876,-95.4492 45.8737,-95.4282 45.865,-95.4044 45.8532,-95.3804 45.8422,-95.3586 45.8361,-95.3063 45.8339,-95.2513 45.836,-95.1966 45.8373,-95.1455 45.8329,-95.104 45.8029,-95.0558 45.7712,-95.0042 45.7429,-94.9524 45.7235)
+LINESTRING(-107.436 45.5783,-107.46 45.6401,-107.492 45.6747,-107.533 45.7027,-107.584 45.7449,-107.635 45.749,-107.711 45.7464,-107.79 45.7442,-107.849 45.7494,-107.917 45.7788,-108.028 45.7878,-108.145 45.7881,-108.232 45.7916,-108.238 45.7937,-108.244 45.7958,-108.25 45.7978,-108.256 45.7999,-108.289 45.8095,-108.323 45.8162,-108.357 45.8224,-108.39 45.8303)
+LINESTRING(-73.8409 42.6969,-73.7669 42.7619,-73.7827 42.8808,-73.8124 42.9185,-73.8053 43.0066,-73.7491 43.07,-73.7578 43.101,-73.7117 43.185,-73.6791 43.2979,-73.7076 43.3638)
+LINESTRING(-73.8409 42.6969,-73.8424 42.6978,-73.844 42.6986,-73.8455 42.6994,-73.8471 42.7002,-73.8671 42.7142,-73.889 42.729,-73.9117 42.7431,-73.9344 42.7549,-73.9549 42.763,-73.9759 42.7701,-73.9965 42.7776,-74.0161 42.7872,-74.0164 42.7885,-74.0167 42.7898,-74.017 42.791,-74.0173 42.7923)
+LINESTRING(-71.5608 42.2593,-71.6 42.2393,-71.6313 42.2275,-71.6658 42.2215,-71.7144 42.2186,-71.7206 42.2186,-71.7274 42.2188,-71.734 42.2187,-71.7398 42.2178,-71.766 42.2095,-71.7932 42.2007,-71.8208 42.1928,-71.848 42.1871)
+LINESTRING(-71.7122 42.5168,-71.7157 42.5062,-71.7164 42.4949,-71.7176 42.4829,-71.7226 42.4704,-71.7342 42.4596,-71.7501 42.4516,-71.7674 42.4443,-71.7828 42.4353,-71.8107 42.4,-71.8143 42.3634,-71.8025 42.3263,-71.7847 42.2894,-71.788 42.2794,-71.7886 42.2696,-71.7896 42.2597,-71.7944 42.2494,-71.8099 42.2363,-71.8272 42.2267,-71.8415 42.2128,-71.848 42.1871)
+LINESTRING(-71.2839 42.0211,-71.2758 42.027,-71.2686 42.0331,-71.2617 42.0394,-71.2547 42.0456,-71.2346 42.0695,-71.2255 42.0921,-71.2169 42.1148,-71.1981 42.1391,-71.1778 42.1541,-71.1585 42.1656,-71.142 42.1797,-71.1303 42.202)
+LINESTRING(-71.5608 42.2593,-71.5523 42.2362,-71.5442 42.2145,-71.5352 42.1932,-71.5236 42.1712,-71.5133 42.1663,-71.5013 42.1603,-71.4905 42.1534,-71.484 42.1458,-71.481 42.1384,-71.4781 42.131,-71.4746 42.1236,-71.4704 42.1167,-71.4636 42.1099,-71.4547 42.1036,-71.4452 42.0976,-71.437 42.0912,-71.4312 42.0845,-71.4266 42.0774,-71.4217 42.0703,-71.4148 42.0635,-71.4035 42.0555,-71.3902 42.0472,-71.3761 42.0397,-71.3623 42.034,-71.3439 42.0297,-71.3239 42.0274,-71.3035 42.0252,-71.2839 42.0211)
+LINESTRING(-94.9524 45.7235,-94.9185 45.7034,-94.8716 45.6838,-94.8217 45.6684,-94.7784 45.6606,-94.7602 45.6603,-94.7414 45.6611,-94.7229 45.6612,-94.7054 45.6591,-94.6808 45.6515,-94.6574 45.6417,-94.6337 45.6319,-94.6084 45.6243,-94.5825 45.6198,-94.5558 45.6166,-94.529 45.6138,-94.5026 45.6105,-94.4806 45.6051,-94.4684 45.6004,-94.4509 45.5997,-94.4127 45.6061,-94.3817 45.5976,-94.345 45.5711,-94.3111 45.5403,-94.2887 45.5191)
+LINESTRING(-71.2839 42.0211,-71.2599 42.0164,-71.2366 42.01,-71.2144 42.002,-71.1939 41.9921,-71.1721 41.9799,-71.1497 41.968,-71.1258 41.9584,-71.0996 41.9529,-71.0885 41.9518,-71.0774 41.9505,-71.0664 41.9487,-71.0558 41.9461,-71.0396 41.9388,-71.0114 41.9248,-70.9881 41.913,-70.9648 41.9012,-70.9621 41.8996,-70.9593 41.898,-70.9565 41.8964,-70.9538 41.8948,-70.9471 41.8895,-70.9414 41.8836,-70.9354 41.8778,-70.9281 41.8729,-70.9106 41.866,-70.8913 41.8605,-70.8718 41.8548,-70.8537 41.8476,-70.8447 41.8425,-70.8362 41.8369,-70.8276 41.8313,-70.8188 41.8261,-70.7962 41.8154,-70.7739 41.806,-70.752 41.796,-70.7306 41.7833)
+LINESTRING(-70.5858 41.7429,-70.6007 41.7714,-70.625 41.7761,-70.6518 41.7701,-70.6741 41.7662,-70.6887 41.7689,-70.7026 41.7736,-70.7164 41.7789,-70.7306 41.7833)
+LINESTRING(-69.9924 41.7832,-70.0022 41.7634,-70.0154 41.7453,-70.03 41.7278,-70.0444 41.7098,-70.0598 41.7041,-70.0861 41.7033,-70.1135 41.7048,-70.1318 41.7062,-70.1642 41.7034,-70.1933 41.694,-70.2213 41.6828,-70.2505 41.6741,-70.2683 41.6729,-70.29 41.6737,-70.3126 41.6749,-70.3329 41.6749,-70.3394 41.6741,-70.3486 41.6727,-70.3573 41.6714,-70.3624 41.6711,-70.3826 41.6807,-70.4017 41.6975,-70.4214 41.715,-70.4433 41.7264,-70.4576 41.7303,-70.4751 41.735,-70.4927 41.7389,-70.5071 41.7405,-70.5175 41.7477,-70.5264 41.7553,-70.5346 41.7633,-70.543 41.7716,-70.5779 41.8094,-70.597 41.8414,-70.6059 41.8666,-70.6099 41.8834,-70.6174 41.903,-70.6285 41.9142,-70.6464 41.9206,-70.6745 41.9261,-70.6834 41.9318,-70.6986 41.9438,-70.7141 41.9566,-70.724 41.9646,-70.7326 41.9791,-70.7376 42.0016,-70.7394 42.0244,-70.7386 42.0397,-70.7447 42.075,-70.7719 42.1057,-70.8097 42.1316,-70.8478 42.1523,-70.8573 42.1561,-70.868 42.1589,-70.879 42.1615,-70.8892 42.1643,-70.914 42.1744,-70.9355 42.1851,-70.9584 42.1954,-70.9879 42.2042,-70.9943 42.2096,-70.9977 42.2182,-71.0042 42.2258,-71.0199 42.228)
+LINESTRING(-72.0711 42.1322,-72.0295 42.1359,-71.9612 42.154,-71.892 42.175,-71.848 42.1871)
+LINESTRING(-74.0173 42.7923,-74.0225 42.7988,-74.0276 42.7982,-74.0278 42.8046,-74.0631 42.8357,-74.1067 42.8562,-74.1557 42.871,-74.2068 42.8851,-74.2186 42.889,-74.2315 42.8933,-74.2445 42.8972,-74.2566 42.8997,-74.2727 42.9,-74.2899 42.8983,-74.3068 42.8966,-74.3223 42.8971,-74.3322 42.8994,-74.3417 42.9027,-74.3513 42.9061,-74.3609 42.9088,-74.3653 42.9095,-74.3699 42.91,-74.3743 42.9107,-74.3784 42.9122,-74.4146 42.9012,-74.4437 42.8786,-74.478 42.8594,-74.5299 42.8588,-74.5375 42.8609,-74.5451 42.8636,-74.5527 42.8663,-74.5604 42.8686,-74.5767 42.871,-74.5934 42.872,-74.61 42.8737,-74.6259 42.8781,-74.639 42.8959,-74.6547 42.918,-74.6725 42.9383,-74.692 42.9504,-74.7061 42.9511,-74.7201 42.9518,-74.7342 42.9522,-74.7483 42.9525,-74.7808 42.968,-74.8066 42.9771,-74.8348 42.9796,-74.8746 42.9755,-74.8816 42.9737,-74.887 42.9715,-74.8939 42.9701,-74.9053 42.9702,-74.9357 42.9731,-74.9721 42.9773,-75.0089 42.9823,-75.0404 42.9875,-75.0442 42.991,-75.0472 42.9946,-75.05 42.9981,-75.0529 43.0017,-75.0648 43.0129,-75.0773 43.0219,-75.0904 43.0302,-75.104 43.0396,-75.1126 43.041,-75.1222 43.044,-75.1317 43.0476,-75.1397 43.0511,-75.1775 43.0657,-75.2152 43.0778,-75.2528 43.0894,-75.2906 43.1023,-75.2989 43.0997,-75.3076 43.0962,-75.3161 43.0931,-75.3239 43.0914,-75.3323 43.092,-75.3386 43.0941,-75.3448 43.0965,-75.3533 43.0979,-75.3656 43.0967,-75.3778 43.0937,-75.3902 43.0913,-75.403 43.0917,-75.4276 43.0975,-75.4506 43.103,-75.4742 43.1072,-75.5008 43.109,-75.5629 43.1056,-75.6265 43.0971,-75.6898 43.0876,-75.7507 43.0811,-75.781 43.0816,-75.8101 43.0852,-75.8391 43.0897,-75.8692 43.0927,-75.9426 43.0943,-76.0161 43.0937,-76.0896 43.0932,-76.1631 43.095)
+LINESTRING(-75.982 44.2993,-75.9737 44.2878,-75.8757 44.1568,-75.9131 44.0852,-75.9158 44.0059,-75.9449 43.989,-75.965 43.9425,-76.0191 43.8808,-76.0471 43.8035,-76.0767 43.7376,-76.075 43.6565,-76.1242 43.5056,-76.1155 43.3769,-76.1326 43.2557,-76.109 43.1399,-76.1631 43.095)
+LINESTRING(-84.7315 45.7422,-84.7205 45.7113,-84.6962 45.6916,-84.6678 45.6768,-84.6444 45.6605,-84.6369 45.6459,-84.6308 45.6246,-84.6264 45.6033,-84.6236 45.5889,-84.6178 45.5585,-84.6144 45.533,-84.6123 45.5074,-84.6104 45.4769,-84.6067 45.4661,-84.5985 45.4464,-84.5897 45.4251,-84.5839 45.4096,-84.5831 45.3927,-84.5882 45.3762,-84.595 45.3597,-84.5994 45.3431,-84.598 45.3279,-84.5923 45.3123,-84.5853 45.2967,-84.5798 45.2816,-84.6022 45.2505,-84.6213 45.2256,-84.6423 45.2024,-84.6701 45.1768,-84.6729 45.1596,-84.6775 45.1431,-84.6832 45.1266,-84.6894 45.1095,-84.6911 45.1062,-84.6935 45.1029,-84.6959 45.0996,-84.6975 45.0964,-84.7 45.0774,-84.7009 45.0447,-84.6969 45.0131,-84.6847 44.9971,-84.6718 44.9774,-84.6733 44.9557,-84.6815 44.9336,-84.6882 44.9122,-84.6879 44.9006,-84.6851 44.8885,-84.6826 44.8762,-84.6831 44.8642,-84.6896 44.8534,-84.6995 44.8445,-84.7091 44.8315,-84.7148 44.8081,-84.7148 44.7906,-84.7127 44.7729,-84.7096 44.7552,-84.7064 44.7378,-84.7008 44.7141,-84.6953 44.6906,-84.6955 44.6674,-84.707 44.6446,-84.706 44.6295,-84.7064 44.6143,-84.7071 44.5991,-84.7073 44.5839)
+LINESTRING(-73.821 42.53,-73.8229 42.551,-73.8265 42.5678,-73.8282 42.5838,-73.8241 42.6018,-73.8223 42.6091,-73.8231 42.6159,-73.8254 42.6227,-73.8286 42.6304,-73.8271 42.6353,-73.8262 42.6475,-73.8315 42.6627,-73.8482 42.677,-73.8478 42.6819,-73.8459 42.6872,-73.8434 42.6925,-73.8409 42.6969)
+LINESTRING(-71.8681 42.025,-71.8695 42.0303,-71.868 42.0481,-71.8632 42.0657,-71.858 42.0834,-71.8556 42.1012,-71.8574 42.116,-71.8607 42.1314,-71.863 42.1467,-71.8615 42.1612,-71.8581 42.1676,-71.8548 42.1741,-71.8514 42.1806,-71.848 42.1871)
+LINESTRING(-71.3774 41.8922,-71.3712 41.8967,-71.3576 41.9034,-71.3422 41.9117,-71.3304 41.9213,-71.3173 41.9443,-71.3061 41.9727,-71.2954 42.0004,-71.2839 42.0211)
+LINESTRING(-123.365 43.1586,-123.371 43.1635,-123.377 43.1684,-123.384 43.1733,-123.39 43.1782,-123.392 43.1986,-123.39 43.2317,-123.387 43.2656,-123.383 43.2884,-123.379 43.304,-123.372 43.3194,-123.365 43.3346,-123.36 43.3497,-123.357 43.363,-123.356 43.3763,-123.355 43.3898,-123.35 43.4032,-123.345 43.4131,-123.339 43.4228,-123.333 43.4327,-123.327 43.4426,-123.331 43.4487,-123.327 43.4562,-123.321 43.4639,-123.317 43.4705,-123.326 43.4876,-123.321 43.5053,-123.308 43.522,-123.293 43.5361,-123.284 43.5605,-123.266 43.5769,-123.243 43.5917,-123.221 43.611,-123.22 43.6187,-123.22 43.6272,-123.221 43.6355,-123.219 43.6429,-123.212 43.6563,-123.206 43.6672,-123.202 43.6789,-123.201 43.6947,-123.202 43.7001,-123.2 43.7159,-123.191 43.7309,-123.179 43.7443,-123.164 43.7533,-123.149 43.7532,-123.133 43.749,-123.114 43.7468,-123.092 43.7525,-123.045 43.7979,-123.017 43.8675,-123.004 43.9406,-123.005 43.996,-123.013 44.0005,-123.023 44.0177,-123.035 44.0269,-123.045 44.0401,-123.047 44.0695,-123.045 44.0854,-123.043 44.1011,-123.043 44.1169,-123.046 44.1329,-123.05 44.1426,-123.056 44.1533,-123.061 44.1638,-123.063 44.1732,-123.061 44.2871,-123.06 44.401,-123.059 44.515,-123.06 44.6288)
+LINESTRING(-73.821 42.53,-73.7878 42.522,-73.7431 42.5067,-73.7018 42.4924,-73.6786 42.487,-73.6769 42.486,-73.6753 42.4849,-73.6736 42.4839,-73.6719 42.4828,-73.6442 42.4838,-73.6107 42.4735,-73.5786 42.4578,-73.5555 42.443,-73.5544 42.4379,-73.5533 42.4328,-73.5518 42.4278,-73.5498 42.4229)
+LINESTRING(-72.0711 42.1322,-72.0734 42.129,-72.0753 42.1237,-72.079 42.1097,-72.0835 42.0971,-72.0893 42.085,-72.096 42.0753,-72.1115 42.0599,-72.1285 42.0442,-72.1423 42.0307)
+LINESTRING(-72.0711 42.1322,-72.0744 42.1338,-72.0779 42.1352,-72.0816 42.1363,-72.0854 42.1372,-72.1279 42.1372,-72.1581 42.1516,-72.1827 42.1697,-72.2089 42.1806,-72.2319 42.18,-72.2506 42.1743,-72.2651 42.1678,-72.2756 42.1648,-72.2868 42.1658,-72.298 42.1676,-72.3093 42.1694,-72.3209 42.17,-72.3325 42.1708,-72.3419 42.1734,-72.3509 42.1768,-72.3616 42.1796,-72.3998 42.1866,-72.4306 42.1895,-72.4678 42.1878,-72.5251 42.1807,-72.5452 42.1823,-72.5593 42.1881,-72.5735 42.1894,-72.5938 42.1774,-72.6019 42.1718,-72.6168 42.1622,-72.6326 42.1535,-72.643 42.1503)
+LINESTRING(-72.643 42.1503,-72.6424 42.1626,-72.6441 42.1879,-72.6459 42.2153,-72.6457 42.2338,-72.6433 42.2466,-72.641 42.2594,-72.6377 42.2739,-72.6347 42.2825,-72.6266 42.2901,-72.6173 42.2961,-72.6096 42.3025,-72.606 42.3119,-72.6073 42.3137,-72.609 42.3153,-72.6108 42.3169,-72.6123 42.3186,-72.6464 42.344,-72.6489 42.3803,-72.6375 42.4207,-72.6301 42.4584,-72.635 42.5111,-72.639 42.5491,-72.6293 42.5842,-72.593 42.6278)
+LINESTRING(-71.3736 41.8166,-71.3567 41.8123,-71.3427 41.8074)
+LINESTRING(-73.4183 42.3379,-73.469 42.3677,-73.5224 42.4002,-73.5498 42.4229)
+LINESTRING(-71.4151 41.816,-71.4081 41.8176)
+LINESTRING(-71.4151 41.816,-71.4177 41.8191,-71.4193 41.8215,-71.4196 41.8241,-71.4188 41.8278,-71.4142 41.8388,-71.4097 41.8497,-71.4038 41.8632,-71.4008 41.8695,-71.396 41.8719,-71.3901 41.8725,-71.3841 41.8728,-71.3792 41.8745,-71.3788 41.879,-71.3783 41.8834,-71.3778 41.8878,-71.3774 41.8922,-71.3774 41.8922)
+LINESTRING(-73.291 42.3121,-73.3052 42.3129,-73.3194 42.3137,-73.3335 42.3144,-73.3477 42.3152,-73.3553 42.3158,-73.3689 42.3158,-73.3824 42.3161,-73.3891 42.3177,-73.4158 42.3364,-73.4183 42.3379)
+LINESTRING(-92.4707 46.6685,-92.4929 46.6526,-92.5167 46.638,-92.5371 46.6218,-92.5491 46.6012,-92.5534 46.5997,-92.5981 46.5678,-92.6453 46.5305,-92.6906 46.4923,-92.7279 46.4584,-92.7379 46.4466,-92.7462 46.4335,-92.754 46.4201,-92.7621 46.4077,-92.7739 46.3944,-92.7874 46.3814,-92.8007 46.368,-92.8114 46.3539,-92.8244 46.3107,-92.8246 46.2663,-92.8288 46.2222,-92.8539 46.18,-92.8607 46.1741,-92.868 46.1685,-92.8753 46.1626,-92.8824 46.1559,-92.8882 46.1438,-92.8897 46.1284,-92.8897 46.1128,-92.8908 46.0996,-92.892 46.0967,-92.8932 46.0937,-92.8945 46.0907,-92.8957 46.0877,-92.905 46.0689,-92.9156 46.0498,-92.9249 46.0305,-92.9302 46.011,-92.9308 46.0065,-92.9316 46.002,-92.9331 45.9975,-92.9356 45.9932,-92.9392 45.9896,-92.9449 45.985,-92.9511 45.9808,-92.9561 45.9781,-92.967 45.9251,-92.9764 45.873,-92.9831 45.8206,-92.9858 45.7669,-92.9878 45.6465,-92.9915 45.5263,-92.9962 45.4061,-93.0012 45.286)
+LINESTRING(-72.643 42.1503,-72.6543 42.15,-72.6656 42.1491,-72.6767 42.1482,-72.6876 42.148,-72.6972 42.149,-72.7073 42.1507,-72.7175 42.1524,-72.7273 42.1536,-72.7498 42.1541,-72.7741 42.154,-72.7981 42.1542,-72.8195 42.1558,-72.84 42.1599,-72.8631 42.166,-72.8866 42.1725,-72.9085 42.1776,-72.9297 42.1886,-72.9493 42.2072,-72.9694 42.2253,-72.9927 42.2348,-73.0666 42.2478,-73.1088 42.2653,-73.1385 42.283,-73.1751 42.2967,-73.2022 42.3024,-73.2321 42.3077,-73.2625 42.3113,-73.291 42.3121)
+LINESTRING(-71.3427 41.8074,-71.3412 41.8068,-71.3276 41.8005,-71.3142 41.7935,-71.3008 41.7867,-71.2871 41.7809,-71.2726 41.7767,-71.2601 41.7738,-71.2479 41.7699,-71.2348 41.7627,-71.2065 41.7396,-71.1877 41.7226)
+LINESTRING(-71.1877 41.7226,-71.1738 41.7101,-71.1643 41.7023)
+LINESTRING(-72.643 42.1503,-72.6285 42.1427,-72.6126 42.136,-72.5965 42.13,-72.5781 42.123,-72.5677 42.1202,-72.5545 42.1173,-72.5416 42.1141,-72.5323 42.11,-72.5233 42.1013,-72.5187 42.092,-72.517 42.0818,-72.5168 42.0706,-72.5167 42.0626,-72.5164 42.055,-72.516 42.0475,-72.516 42.0395,-72.5161 42.0348)
+LINESTRING(-89.6954 45.1986,-89.711 45.1825,-89.7182 45.1669,-89.7194 45.1504,-89.7168 45.1315,-89.7035 45.1303,-89.6903 45.1291,-89.677 45.1279,-89.6637 45.1267,-89.6651 45.119,-89.6666 45.1113,-89.668 45.1035,-89.6694 45.0958,-89.672 45.0916,-89.6767 45.0886,-89.682 45.0857,-89.6861 45.0819,-89.6891 45.0762,-89.6909 45.0708,-89.692 45.0652,-89.6931 45.0591,-89.6953 45.047,-89.6975 45.035,-89.6996 45.023,-89.7018 45.011,-89.7035 45.0016,-89.7043 44.9929,-89.7034 44.9845,-89.7002 44.9758,-89.6941 44.9633,-89.6909 44.9554)
+LINESTRING(-96.8434 45.936,-96.8468 45.9227,-96.8501 45.9162,-96.8542 45.9096,-96.8581 45.9029,-96.8606 45.8965,-96.8635 45.8751,-96.8639 45.8529,-96.8649 45.8309,-96.8693 45.8097,-96.8821 45.7869,-96.9038 45.7572,-96.9273 45.728,-96.9454 45.7069,-96.9566 45.6961,-96.9694 45.6853,-96.9814 45.6742,-96.9901 45.6623,-96.9909 45.6541,-96.9908 45.6391,-96.9904 45.6269,-96.99 45.6147,-96.9901 45.6124,-96.9881 45.5733,-96.9854 45.5276,-96.9853 45.4824,-96.9912 45.4446,-97.0001 45.4326,-97.0192 45.4101,-97.04 45.3867,-97.054 45.3721,-97.0532 45.3591,-97.0524 45.346,-97.0517 45.333,-97.0509 45.3202)
+LINESTRING(-89.6064 44.827,-89.5999 44.8343,-89.5935 44.8417,-89.5853 44.8515,-89.5761 44.8632,-89.5685 44.8709,-89.564 44.8789,-89.5595 44.8869,-89.5519 44.8949,-89.5442 44.8991,-89.5355 44.9009,-89.526 44.901,-89.5157 44.9002,-89.5115 44.8998,-89.5073 44.8995,-89.5031 44.8991,-89.4989 44.8987,-89.4946 44.8985,-89.4908 44.8986,-89.487 44.8986,-89.4828 44.8984,-89.4727 44.8975,-89.4626 44.8966,-89.4526 44.8956,-89.4434 44.8948)
+LINESTRING(-89.6909 44.9554,-89.6899 44.9529,-89.6856 44.9425,-89.6796 44.93,-89.6643 44.901,-89.6499 44.8754,-89.632 44.8514,-89.6064 44.827)
+LINESTRING(-118.805 45.663,-118.789 45.6592,-118.767 45.6627,-118.751 45.6634,-118.734 45.6621,-118.712 45.6595,-118.688 45.644,-118.664 45.6224,-118.64 45.6033,-118.617 45.5951,-118.602 45.5875,-118.591 45.5819,-118.555 45.5843,-118.515 45.5937,-118.476 45.5959,-118.453 45.58,-118.453 45.5709,-118.457 45.5623,-118.461 45.5537,-118.461 45.5444,-118.445 45.5285,-118.416 45.4976,-118.389 45.4672,-118.377 45.453,-118.378 45.4462,-118.367 45.4356,-118.357 45.4246,-118.347 45.4136,-118.337 45.403,-118.325 45.3935,-118.313 45.3843,-118.301 45.375,-118.29 45.3648,-118.262 45.3665,-118.23 45.3746,-118.2 45.3839,-118.176 45.3889,-118.167 45.3884,-118.145 45.3866,-118.118 45.3831,-118.093 45.3776,-118.057 45.3561,-118.039 45.3255,-118.029 45.2901,-118.017 45.2545,-118.016 45.2463,-118.017 45.2346,-118.02 45.2231,-118.024 45.2158,-118.023 45.2094,-118.019 45.2027,-118.014 45.1969,-118 45.1909,-117.986 45.1848,-117.973 45.1773,-117.964 45.1708,-117.961 45.1602,-117.962 45.1488,-117.964 45.1387,-117.965 45.132,-117.945 45.0591,-117.922 45.0149,-117.884 44.9748,-117.816 44.914,-117.812 44.8865,-117.81 44.8492,-117.81 44.8106,-117.809 44.7792,-117.809 44.7734,-117.81 44.7677,-117.81 44.7618,-117.809 44.7563,-117.804 44.7501,-117.793 44.7399,-117.782 44.7298,-117.775 44.7242,-117.764 44.7186,-117.752 44.7141,-117.723 44.7027,-117.692 44.6898,-117.661 44.6777,-117.631 44.6687,-117.609 44.6639,-117.575 44.6566,-117.542 44.649,-117.523 44.6435,-117.502 44.6286,-117.47 44.6027,-117.439 44.5765,-117.422 44.5609,-117.418 44.5546,-117.415 44.5484,-117.411 44.5422,-117.405 44.5363,-117.397 44.5309,-117.387 44.5266,-117.378 44.5227,-117.367 44.5119,-117.364 44.5044,-117.362 44.4967,-117.358 44.4896,-117.346 44.4852,-117.332 44.4658,-117.322 44.4487,-117.309 44.4261,-117.304 44.4148,-117.298 44.3779,-117.29 44.3464,-117.269 44.3193,-117.224 44.2957,-117.219 44.2862,-117.206 44.2738,-117.19 44.2624,-117.178 44.2562,-117.178 44.242,-117.172 44.2322,-117.162 44.2237,-117.15 44.2136,-117.142 44.2001,-117.137 44.1849,-117.129 44.1673,-117.112 44.1465,-117.102 44.1386,-117.091 44.1315,-117.079 44.1247,-117.068 44.1175,-117.039 44.0956,-117.007 44.0711,-116.977 44.046,-116.952 44.0249)
+LINESTRING(-116.952 44.0249,-116.955 44.0225)
+LINESTRING(-87.6632 45.1145,-87.6726 45.1072,-87.6849 45.0913,-87.6987 45.0742,-87.7132 45.0633,-87.7438 45.0576,-87.7774 45.0561,-87.808 45.0521,-87.8294 45.0387,-87.8324 45.0315,-87.8356 45.0242,-87.8469 45.0074,-87.8547 44.9917,-87.8592 44.9802,-87.8638 44.9709,-87.8667 44.9602,-87.8691 44.9475,-87.8706 44.937,-87.8785 44.9076,-87.8919 44.879,-87.9075 44.851,-87.9217 44.823,-87.9586 44.811,-87.9956 44.8049,-88.0281 44.7991,-88.0518 44.788,-88.0527 44.7551,-88.0518 44.7212,-88.0505 44.6872,-88.0505 44.6542)
+LINESTRING(-77.648 43.0482,-77.6247 43.0529,-77.5993 43.0542,-77.5742 43.0539,-77.5463 43.05,-77.5103 43.0401,-77.4499 43.0165,-77.4139 43.0066,-77.1672 42.9558,-77.1157 42.9446,-77.0915 42.9399,-77.0634 42.9355,-77.0365 42.9329,-77.007 42.9316,-76.9775 42.9319,-76.9507 42.9341,-76.8965 42.9402,-76.8521 42.9451,-76.8085 42.9521,-76.7568 42.9647,-76.7253 42.9742,-76.6989 42.9831,-76.672 42.9911,-76.6394 42.9984,-76.6267 43.0006,-76.6146 43.0032,-76.6028 43.0064,-76.5909 43.0105,-76.571 43.0152,-76.5488 43.0174,-76.5255 43.0199,-76.5022 43.026,-76.4756 43.0403,-76.4485 43.049,-76.4193 43.055,-76.3863 43.0613,-76.3717 43.0673,-76.3606 43.076,-76.3497 43.0845,-76.3356 43.0903,-76.2961 43.0996,-76.2604 43.107,-76.2242 43.1106,-76.1631 43.095)
+LINESTRING(-116.955 44.0225,-116.944 44.0107,-116.942 44.0081)
+LINESTRING(-91.7307 45.4148,-91.7149 45.3894,-91.6902 45.3664,-91.6645 45.3446,-91.6453 45.3225,-91.6299 45.2974,-91.6101 45.2669,-91.5926 45.2404,-91.5751 45.214,-91.573 45.2092,-91.5721 45.2047,-91.5704 45.2,-91.5654 45.1945,-91.5523 45.1852,-91.5397 45.1773,-91.5292 45.1681,-91.5221 45.1549,-91.5219 45.1452,-91.5239 45.1334,-91.5248 45.1216,-91.5215 45.112,-91.5144 45.1052,-91.5058 45.099,-91.4968 45.093,-91.4884 45.0869,-91.4763 45.0742,-91.4715 45.0636,-91.4687 45.0534,-91.4626 45.0421,-91.4582 45.0377,-91.4529 45.0333,-91.4481 45.0287,-91.4453 45.0236,-91.4435 45.013,-91.4431 45.0016,-91.4432 44.9905,-91.4433 44.9794,-91.4316 44.9669,-91.4283 44.9539,-91.4294 44.9404,-91.4308 44.9261)
+LINESTRING(-116.942 44.0081,-116.934 43.9989,-116.923 43.9871,-116.912 43.9754)
+LINESTRING(-107.436 45.5783,-107.424 45.5539,-107.407 45.5318,-107.391 45.5096,-107.38 45.4846,-107.358 45.3708,-107.343 45.2657,-107.325 45.1611,-107.294 45.0486,-107.267 45.0099,-107.251 45.0008)
+LINESTRING(-112.65 46.0082,-112.664 45.9713,-112.674 45.9381,-112.683 45.905,-112.696 45.8681,-112.704 45.8406,-112.706 45.8166,-112.703 45.7924,-112.697 45.7645,-112.688 45.747,-112.673 45.7322,-112.659 45.7174,-112.649 45.6999,-112.63 45.6687,-112.614 45.6392,-112.606 45.6127,-112.609 45.5903,-112.626 45.5629,-112.673 45.5377,-112.722 45.5194,-112.744 45.5122,-112.752 45.4934,-112.754 45.4736,-112.753 45.4545,-112.755 45.438,-112.762 45.419,-112.771 45.4017,-112.776 45.382,-112.773 45.3559,-112.76 45.3279,-112.736 45.2981,-112.713 45.2682,-112.699 45.2402,-112.705 45.2011,-112.732 45.1678,-112.772 45.1378,-112.811 45.1084,-112.819 45.1041,-112.834 45.0924,-112.848 45.075,-112.852 45.0538,-112.837 45.0283,-112.812 44.998,-112.79 44.968,-112.787 44.943,-112.809 44.9061,-112.828 44.8795,-112.838 44.8515,-112.835 44.8105,-112.832 44.7966,-112.828 44.7842,-112.824 44.7726,-112.82 44.7612,-112.807 44.7345,-112.789 44.7071,-112.766 44.6809,-112.734 44.6568,-112.676 44.6338,-112.614 44.624,-112.549 44.6173,-112.484 44.6035,-112.363 44.5552,-112.34 44.5396)
+LINESTRING(-93.0012 45.286,-93.0018 45.2764,-93.0066 45.2692,-93.0139 45.2627,-93.0221 45.2551,-93.0229 45.2317,-93.0253 45.1981,-93.0286 45.1657,-93.032 45.1459,-93.0361 45.1392,-93.0422 45.1331,-93.0481 45.127,-93.0515 45.12,-93.0522 45.112,-93.0516 45.1038,-93.0508 45.0956,-93.0505 45.0875,-93.0519 45.0747,-93.0548 45.0621,-93.0581 45.0496,-93.0611 45.0369,-93.0672 45.0374,-93.0735 45.0375,-93.0798 45.0371,-93.0857 45.0361,-93.0852 45.0156,-93.0866 44.9952,-93.0878 44.9747,-93.0862 44.9539,-93.0806 44.9565,-93.0755 44.9597,-93.0706 44.9631,-93.0661 44.9666,-93.061 44.9628,-93.0558 44.959,-93.0507 44.9553,-93.0456 44.9515,-92.9966 44.9522,-92.9468 44.9509,-92.897 44.9489,-92.8477 44.9475,-92.8244 44.9497,-92.8027 44.9552,-92.7816 44.9612,-92.7599 44.9648,-92.7527 44.9653)
+LINESTRING(-88.0505 44.6542,-88.0536 44.6394,-88.0567 44.6246,-88.0597 44.6099,-88.0628 44.5951,-88.0658 44.5852,-88.0707 44.5767,-88.0776 44.5691,-88.0868 44.5619,-88.0919 44.5568,-88.0986 44.5481,-88.1057 44.5375,-88.1124 44.5264)
+LINESTRING(-72.5161 42.0348,-72.5164 42.0194,-72.5176 42.0021,-72.5211 41.985,-72.5285 41.9659,-72.5358 41.9555,-72.5469 41.9469,-72.5604 41.9404,-72.5753 41.9365,-72.5924 41.9328,-72.6069 41.9277,-72.6202 41.9209,-72.6338 41.9124,-72.6421 41.9052,-72.6471 41.8976,-72.6509 41.8894,-72.6555 41.8802,-72.6616 41.8707,-72.6671 41.8624,-72.6722 41.854,-72.6772 41.8442,-72.678 41.8273,-72.6694 41.8118,-72.6609 41.7962,-72.6617 41.7793,-72.6622 41.7744,-72.6618 41.768,-72.6621 41.7623,-72.6647 41.7591)
+LINESTRING(-84.7073 44.5839,-84.6977 44.5514,-84.6715 44.52,-84.6378 44.4912,-84.6061 44.4662,-84.5998 44.4607,-84.5979 44.442,-84.5964 44.422,-84.5938 44.4021,-84.5885 44.3839,-84.53 44.3327,-84.4358 44.3156,-84.329 44.299,-84.233 44.2497,-84.2099 44.2244,-84.1917 44.1983,-84.1748 44.1717,-84.1556 44.1449,-84.1371 44.1219,-84.1187 44.0989,-84.1002 44.0759,-84.0818 44.0529,-84.0755 44.0498,-84.0693 44.0467,-84.0637 44.0242,-84.0569 44.0127,-84.0447 44.0035,-84.0231 43.988)
+LINESTRING(-93.2984 44.8918,-93.2785 44.8959,-93.2516 44.8981,-93.2245 44.8988,-93.2037 44.8981,-93.1998 44.896,-93.1959 44.894,-93.1918 44.8921,-93.0862 44.9539)
+LINESTRING(-94.2887 45.5191,-94.2763 45.5089,-94.2689 45.5031,-94.2399 45.4953,-94.2142 45.4871,-94.1901 45.4776,-94.1708 45.4686,-94.1576 45.4529,-94.1465 45.4368,-94.1341 45.421,-94.117 45.4063,-94.0972 45.3945,-94.0613 45.3738,-94.036 45.3594,-94.0107 45.345,-93.9776 45.3347,-93.9435 45.326,-93.9095 45.3169,-93.8769 45.3053,-93.8632 45.2984,-93.8502 45.2908,-93.8374 45.283,-93.8243 45.2757,-93.8093 45.2702,-93.7921 45.2665,-93.7744 45.2631,-93.7579 45.2588,-93.74 45.2513,-93.7233 45.2424,-93.7071 45.2329,-93.6907 45.2239,-93.673 45.2167,-93.6546 45.2113,-93.6365 45.2062,-93.6195 45.1998,-93.5967 45.1906,-93.5723 45.1825,-93.5481 45.174,-93.5257 45.164,-93.5135 45.1399,-93.4962 45.1237,-93.4742 45.1099,-93.4477 45.0928,-93.4312 45.0896,-93.4154 45.0858,-93.3997 45.082,-93.3838 45.0787,-93.3707 45.077,-93.3607 45.0769,-93.351 45.0769,-93.3385 45.0755,-93.3304 45.0624,-93.3203 45.0326,-93.3067 44.9961,-93.2882 44.9632,-93.2841 44.9484,-93.2849 44.9328,-93.2899 44.9145,-93.2984 44.8918)
+LINESTRING(-92.7527 44.9653,-92.736 44.9663,-92.7095 44.9675,-92.6831 44.968,-92.6595 44.9672,-92.636 44.9658,-92.6092 44.9641,-92.5829 44.9615,-92.561 44.9571,-92.5509 44.9535,-92.5403 44.9492,-92.5294 44.9454,-92.5185 44.9435,-92.5037 44.9434,-92.4886 44.9441,-92.4734 44.945,-92.4586 44.9453,-92.4472 44.9443,-92.4359 44.9424,-92.4248 44.9404,-92.4138 44.939,-92.3548 44.9362,-92.2955 44.9355,-92.2361 44.9355,-92.177 44.9348,-92.1523 44.9322,-92.1288 44.9271,-92.1061 44.9219,-92.0835 44.9188,-92.071 44.9193,-92.0521 44.9209,-92.0343 44.9225,-92.025 44.9231,-92.0039 44.9185,-91.9849 44.9129,-91.9654 44.9088,-91.9426 44.9086,-91.9383 44.9087,-91.9339 44.9082,-91.9295 44.9075,-91.9252 44.9071,-91.89 44.9071,-91.8529 44.9075,-91.816 44.9069,-91.7814 44.9042,-91.7745 44.9025,-91.7669 44.8998,-91.7598 44.8968,-91.7527 44.8939,-91.7356 44.8866,-91.719 44.8788,-91.7024 44.871,-91.6853 44.8638,-91.6585 44.855,-91.6318 44.8477,-91.6056 44.8396,-91.5806 44.8285,-91.564 44.8151,-91.5525 44.7998,-91.5396 44.7845,-91.519 44.7715,-91.4973 44.7665,-91.4711 44.7657,-91.4441 44.7666,-91.4199 44.767)
+LINESTRING(-72.1099 41.547,-72.0762 41.5767,-72.0376 41.5845,-71.998 41.5872,-71.9616 41.6018,-71.9483 41.6239,-71.9324 41.6471,-71.9179 41.669,-71.9093 41.6869,-71.9048 41.6998,-71.8981 41.7151,-71.8897 41.7301,-71.8805 41.7417,-71.8804 41.7543,-71.8753 41.7661,-71.8725 41.7785,-71.8788 41.793,-71.8737 41.8053,-71.8749 41.82,-71.8795 41.8349,-71.8845 41.8476,-71.8899 41.8605,-71.8951 41.8738,-71.8992 41.8873,-71.9007 41.9008,-71.9003 41.9026,-71.8959 41.9151,-71.8899 41.9267,-71.8843 41.9386,-71.8805 41.9518,-71.88 41.9544,-71.8795 41.957,-71.8786 41.9595,-71.8773 41.9619,-71.8717 41.9697,-71.8657 41.9771,-71.8606 41.9848,-71.8579 41.9936,-71.8591 42.0027,-71.8629 42.0121,-71.8671 42.0214,-71.8681 42.025)
+LINESTRING(-71.7967 41.4462,-71.7293 41.4881,-71.6948 41.5105,-71.6878 41.5187,-71.6821 41.527,-71.6774 41.5357,-71.6737 41.5449,-71.6658 41.5714,-71.6548 41.6037,-71.6374 41.6332,-71.6106 41.6512,-71.6038 41.6515,-71.5971 41.6505,-71.5905 41.6497,-71.5837 41.6503,-71.5623 41.657,-71.5427 41.664,-71.5227 41.6694,-71.4999 41.6713,-71.4907 41.6781,-71.4865 41.6895,-71.4843 41.7021,-71.4811 41.7126,-71.4775 41.7182,-71.4733 41.7235,-71.4651 41.7319,-71.4467 41.7482,-71.4385 41.7567,-71.4339 41.7637,-71.4266 41.7786,-71.4219 41.7856,-71.4189 41.7925,-71.4168 41.8028,-71.4151 41.816)
+LINESTRING(-72.1423 42.0307,-72.1449 42.0281,-72.1585 42.0116,-72.1668 41.9991,-72.1751 41.9865,-72.1841 41.9743,-72.1946 41.9626,-72.211 41.9506,-72.2424 41.9291,-72.2742 41.9079,-72.2917 41.897,-72.3148 41.8866,-72.3379 41.8763,-72.3609 41.8659,-72.3836 41.8549,-72.3972 41.8545,-72.4108 41.8541,-72.4264 41.853,-72.436 41.8508,-72.4704 41.835,-72.511 41.8193,-72.5478 41.8016,-72.5708 41.78,-72.5872 41.7737,-72.6107 41.7688,-72.6353 41.766,-72.6551 41.7658,-72.6533 41.7649,-72.6349 41.7424,-72.6099 41.7249,-72.5817 41.7097,-72.5535 41.6946,-72.5442 41.6879,-72.5366 41.6805,-72.5295 41.6729,-72.5216 41.6656,-72.5077 41.6568,-72.4908 41.6488,-72.4733 41.6409,-72.4577 41.6325,-72.4442 41.6229,-72.4333 41.6134,-72.4232 41.6033,-72.4123 41.592,-72.3994 41.5888,-72.3862 41.5864,-72.373 41.584,-72.3601 41.5811,-72.3515 41.5772,-72.3404 41.571,-72.3292 41.5655,-72.3203 41.5633,-72.3137 41.5653,-72.3065 41.567,-72.2996 41.5687,-72.2938 41.571,-72.2506 41.5675,-72.2184 41.5691,-72.1909 41.5687,-72.1619 41.5594,-72.1559 41.5596,-72.1497 41.5604,-72.1437 41.5616,-72.138 41.563,-72.1357 41.5625,-72.1334 41.562,-72.1311 41.5616,-72.1288 41.5611,-72.1257 41.5568,-72.121 41.5529,-72.1155 41.5495,-72.1099 41.547)
+LINESTRING(-72.6647 41.7591,-72.6751 41.7412,-72.6809 41.7324,-72.6847 41.7236,-72.6845 41.7137,-72.6806 41.7069,-72.6748 41.7009,-72.6705 41.6948,-72.6706 41.6879,-72.6776 41.6699,-72.6841 41.6431,-72.6904 41.6249)
+LINESTRING(-93.538 44.8112,-93.5185 44.8391,-93.4951 44.8455,-93.4715 44.8437,-93.4514 44.8471,-93.4471 44.8481,-93.4358 44.8532,-93.4203 44.8649,-93.4033 44.8861,-93.3866 44.8948,-93.359 44.8954,-93.3274 44.8927,-93.2984 44.8918)
+LINESTRING(-88.1124 44.5264,-88.1214 44.5051,-88.1343 44.4822,-88.149 44.4599,-88.1632 44.4402,-88.1789 44.4213,-88.208 44.3899,-88.2406 44.3593,-88.2673 44.3431)
+LINESTRING(-97.0484 44.8899,-97.0469 44.9978,-97.0453 45.1054,-97.0458 45.2127,-97.0509 45.3202)
+LINESTRING(-77.648 43.0482,-77.6786 43.0474,-77.7104 43.0481,-77.7422 43.0487,-77.7734 43.0479,-77.7991 43.0444,-77.8243 43.0387,-77.8494 43.0329,-77.8749 43.0292,-77.9088 43.0289,-77.9442 43.0311,-77.9795 43.0331,-78.0129 43.0321,-78.0313 43.0309,-78.0503 43.0308,-78.0692 43.031,-78.0875 43.0308,-78.1079 43.0316,-78.1273 43.034,-78.1468 43.0361,-78.1673 43.036,-78.2246 43.0329,-78.2827 43.0321,-78.3407 43.0303,-78.3976 43.0247,-78.4119 43.0206,-78.4247 43.0142,-78.4373 43.0073,-78.4514 43.002,-78.504 42.9888,-78.5788 42.9715,-78.6535 42.9566,-78.7058 42.951,-78.7441 42.9458,-78.7824 42.9405,-78.8207 42.9352,-78.8589 42.9299)
+LINESTRING(-79.011 43.2536,-79.0119 43.2433,-79.0098 43.2342,-79.0064 43.2251,-79.0033 43.2149,-79.0026 43.2052,-79.0041 43.1967,-79.0063 43.1882,-79.0077 43.1785,-79.0076 43.1675,-79.0069 43.1577,-79.007 43.1481,-79.0095 43.1374,-79.0192 43.1105,-79.0194 43.1029,-79.0152 43.0963,-79.0079 43.0905,-78.999 43.0853,-78.9875 43.078,-78.9789 43.0702,-78.972 43.0614,-78.9659 43.051,-78.9626 43.0429,-78.9608 43.0355,-78.9589 43.0281,-78.9552 43.0201,-78.9503 43.0178,-78.9467 43.0152,-78.9434 43.0123,-78.9396 43.0094,-78.9264 43.0016,-78.9134 42.9954,-78.9011 42.9887,-78.8899 42.9796,-78.8788 42.9669,-78.8702 42.9546,-78.8638 42.9423,-78.8589 42.9299)
+LINESTRING(-78.8589 42.9299,-78.9102 42.9187)
+LINESTRING(-123.282 42.4642,-123.301 42.4725,-123.317 42.484,-123.334 42.4972,-123.356 42.5106,-123.38 42.5284,-123.388 42.546,-123.391 42.5654,-123.392 42.5867,-123.394 42.6015,-123.395 42.6149,-123.393 42.6277,-123.385 42.6409,-123.379 42.6468,-123.368 42.6623,-123.364 42.6745,-123.363 42.6872,-123.363 42.7014,-123.365 42.7117,-123.369 42.7207,-123.372 42.7296,-123.372 42.7399,-123.352 42.7605,-123.315 42.7683,-123.274 42.7765,-123.245 42.7981,-123.247 42.8099,-123.245 42.8243,-123.244 42.8403,-123.246 42.8572,-123.246 42.8654,-123.245 42.883,-123.244 42.8953,-123.245 42.9069,-123.248 42.9196,-123.257 42.9351,-123.269 42.9473,-123.284 42.9586,-123.3 42.9714,-123.307 42.9773,-123.314 42.9831,-123.32 42.9884,-123.328 42.9942,-123.336 43.0005,-123.343 43.0062,-123.35 43.0123,-123.357 43.0194,-123.363 43.0241,-123.367 43.0395,-123.363 43.0511,-123.357 43.0627,-123.351 43.0758,-123.348 43.0854,-123.346 43.0939,-123.345 43.1026,-123.343 43.1124,-123.339 43.1231,-123.34 43.1337,-123.345 43.1408,-123.352 43.1463,-123.359 43.1517,-123.365 43.1586)
+LINESTRING(-84.7073 44.5839,-84.7317 44.5648,-84.7696 44.5494,-84.8064 44.5341,-84.8277 44.5152,-84.8288 44.5015,-84.8283 44.4777,-84.8276 44.4529,-84.828 44.4358,-84.8329 44.4195,-84.841 44.4038,-84.8489 44.3884,-84.8532 44.3727,-84.8499 44.3523,-84.8401 44.3313,-84.8293 44.3103,-84.8227 44.2901,-84.8188 44.2727,-84.813 44.2543,-84.8076 44.2358,-84.8049 44.2181,-84.7954 44.0899,-84.792 44.0799,-84.785 44.069,-84.7781 44.0571,-84.7749 44.0446,-84.7745 44.0306,-84.7736 44.0171,-84.7712 43.9898,-84.7726 43.9796,-84.7767 43.9691,-84.7814 43.9587,-84.7844 43.9486,-84.7848 43.9278,-84.7826 43.9066,-84.7808 43.8854,-84.7851 43.8652)
+LINESTRING(-72.194 41.3761,-72.1696 41.3718,-72.1438 41.3706,-72.1202 41.3692,-72.1023 41.364,-72.0911 41.364,-72.0803 41.364,-72.0462 41.3657,-71.9979 41.368,-71.9508 41.3708,-71.9205 41.3742,-71.8789 41.3965,-71.803 41.4423,-71.7967 41.4462)
+LINESTRING(-72.194 41.3761,-72.1565 41.4054,-72.1333 41.419,-72.1207 41.4391,-72.1151 41.488,-72.1149 41.5032,-72.1149 41.5173,-72.1137 41.5314,-72.1099 41.547)
+LINESTRING(-84.9046 43.8648,-84.8954 43.8644,-84.8849 43.8649,-84.8666 43.8662,-84.8455 43.8674,-84.8263 43.8673,-84.8071 43.8665,-84.7851 43.8652)
+LINESTRING(-88.2673 44.3431,-88.3089 44.3389,-88.3514 44.3388,-88.3938 44.3343,-88.4356 44.3165,-88.443 44.3022,-88.4522 44.2905,-88.4625 44.2792,-88.4685 44.2723)
+LINESTRING(-84.7851 43.8652,-84.7719 43.8556,-84.7624 43.8457,-84.7531 43.8357,-84.7417 43.8271)
+LINESTRING(-78.8589 42.9299,-78.8559 42.9199,-78.8532 42.9093,-78.8506 42.8977,-78.8479 42.8862,-78.8414 42.8662,-78.8324 42.8491,-78.8214 42.8324,-78.8094 42.8135)
+LINESTRING(-85.418 44.2077,-85.4502 44.1648,-85.4678 44.1292,-85.4784 44.0906,-85.4894 44.0392,-85.4961 44.0207,-85.508 43.9956,-85.521 43.9707,-85.5313 43.9529,-85.5478 43.8901)
+LINESTRING(-72.194 41.3761,-72.2086 41.3709,-72.2225 41.3674,-72.2356 41.363,-72.2489 41.3561,-72.2651 41.3506,-72.2902 41.3458,-72.3166 41.3418,-72.3365 41.3387,-72.3479 41.3376,-72.3585 41.3383,-72.3691 41.3397,-72.3792 41.3416)
+LINESTRING(-72.6904 41.6249,-72.6906 41.607,-72.6871 41.5986,-72.6832 41.5901,-72.6801 41.5804,-72.6638 41.5441,-72.6354 41.5185,-72.5995 41.494,-72.5605 41.4613,-72.5168 41.4253,-72.4602 41.3877,-72.4084 41.3569,-72.3792 41.3416)
+LINESTRING(-88.1124 44.5264,-88.0941 44.5162,-88.0698 44.503,-88.0451 44.4894,-88.0255 44.4781,-88.0138 44.4717,-87.9998 44.4651,-87.9857 44.4587,-87.9738 44.4532,-87.9395 44.432,-87.9088 44.4059,-87.8816 44.3776,-87.8579 44.3501,-87.8542 44.3455,-87.8393 44.3285,-87.8245 44.3115,-87.8099 44.2941,-87.7965 44.2769,-87.787 44.2478,-87.7821 44.2049,-87.779 44.1625,-87.7752 44.1353)
+LINESTRING(-116.34 43.6015,-116.376 43.6021,-116.452 43.6056,-116.531 43.6099,-116.576 43.6132,-116.595 43.6257,-116.613 43.6397,-116.631 43.6543,-116.648 43.6689,-116.66 43.678,-116.678 43.6983,-116.696 43.7222,-116.708 43.742,-116.719 43.7584,-116.732 43.7747,-116.746 43.7907,-116.756 43.8064,-116.762 43.8245,-116.768 43.8424,-116.775 43.86,-116.786 43.8774,-116.815 43.9048,-116.852 43.9277,-116.887 43.9499,-116.912 43.9754)
+LINESTRING(-75.9032 42.1347,-75.885 42.1387,-75.8543 42.1472,-75.8335 42.1534,-75.8126 42.1596,-75.7789 42.1647,-75.764 42.17,-75.7536 42.1756,-75.7335 42.1816,-75.7201 42.1841,-75.7068 42.1864,-75.6937 42.189,-75.6813 42.1926,-75.6757 42.1929,-75.6645 42.1981,-75.6405 42.1927,-75.6166 42.1873,-75.5926 42.1818,-75.5687 42.1764,-75.5496 42.1742,-75.5323 42.176,-75.5158 42.181,-75.499 42.1884,-75.4879 42.1927,-75.4774 42.1962,-75.4677 42.2005,-75.4593 42.2071,-75.4515 42.2178,-75.4474 42.2282,-75.4439 42.239,-75.4379 42.2508,-75.4299 42.2625,-75.4211 42.2725,-75.4099 42.2803,-75.3947 42.2855,-75.3853 42.2862,-75.3766 42.285,-75.3676 42.2831,-75.3578 42.2817,-75.3346 42.281,-75.3137 42.2829,-75.2945 42.2882,-75.2765 42.2978,-75.2701 42.3035,-75.2658 42.3095,-75.2613 42.3153,-75.2542 42.3205,-75.2313 42.3335,-75.2126 42.347,-75.1964 42.3621,-75.1809 42.3801,-75.1685 42.3987,-75.159 42.4162,-75.1484 42.4331,-75.1321 42.4499,-75.11 42.4639,-75.0863 42.4731,-75.0611 42.4807,-75.0344 42.4905,-75.0256 42.4928,-75.0194 42.4978,-75.0128 42.5052,-75.0065 42.5122,-74.9913 42.5185,-74.98 42.5203,-74.9689 42.5222,-74.9588 42.5249,-74.95 42.5302,-74.9407 42.5357,-74.9092 42.5485,-74.8779 42.5628,-74.8474 42.5779,-74.8181 42.5933,-74.7723 42.6131,-74.7318 42.6247,-74.6913 42.6377,-74.6459 42.6614,-74.625 42.6609,-74.6027 42.6616,-74.5805 42.6616,-74.5599 42.659,-74.5206 42.6689,-74.479 42.6801,-74.4373 42.691,-74.3974 42.7002,-74.3886 42.7011,-74.3787 42.7011,-74.3691 42.7013,-74.3359 42.7106,-74.3122 42.7171,-74.2876 42.7225,-74.2594 42.7272,-74.2045 42.7358,-74.177 42.7421,-74.1543 42.7504,-74.1134 42.7651,-74.0898 42.7728,-74.066 42.7799,-74.0419 42.7864,-74.0173 42.7923)
+LINESTRING(-75.9032 42.1347,-75.9008 42.1607,-75.901 42.1902,-75.9065 42.2189,-75.9202 42.2424,-75.9197 42.2493,-75.9206 42.2578,-75.9234 42.2659,-75.9284 42.2719,-75.9275 42.277,-75.9269 42.2835,-75.9273 42.2901,-75.9439 42.3041,-75.9636 42.3154,-75.9788 42.3275,-75.9803 42.339,-75.9871 42.3643,-75.9925 42.392,-75.9999 42.419,-76.0127 42.442,-76.0234 42.4528,-76.0356 42.4633,-76.0478 42.4739,-76.0584 42.485,-76.0663 42.4995,-76.0702 42.5151,-76.0741 42.5307,-76.0819 42.5453,-76.0925 42.5562,-76.1047 42.5667,-76.1175 42.5782,-76.1297 42.5923,-76.1418 42.5972,-76.1527 42.6006,-76.1625 42.6054,-76.1716 42.6144,-76.175 42.6221,-76.1764 42.6317,-76.1766 42.6414,-76.1763 42.6498,-76.1687 42.6686,-76.1611 42.6874,-76.1535 42.7062,-76.1459 42.725,-76.1399 42.7427,-76.1343 42.7615,-76.1293 42.7804,-76.1253 42.7983,-76.124 42.8099,-76.1238 42.8216,-76.1234 42.8333,-76.1211 42.8454,-76.1179 42.8547,-76.1129 42.8687,-76.1091 42.8825,-76.1093 42.8911,-76.1167 42.9008,-76.1248 42.9111,-76.132 42.9215,-76.1372 42.9319,-76.1385 42.9375,-76.1385 42.9428,-76.1376 42.9481,-76.1361 42.9536,-76.1326 42.9784,-76.1344 43.0028,-76.1381 43.0271,-76.1401 43.0519,-76.1509 43.0569,-76.1564 43.0633,-76.1618 43.0691,-76.1677 43.0745,-76.1749 43.08,-76.1697 43.0876,-76.1631 43.095)
+LINESTRING(-75.9032 42.1347,-75.8799 42.13,-75.8452 42.1247,-75.8074 42.1163,-75.7752 42.1033)
+LINESTRING(-84.0231 43.988,-84.0201 43.9583,-84.0229 43.8993,-84.0277 43.8397,-84.0309 43.8077,-84.0289 43.8062,-84.0269 43.8047,-84.0249 43.8032,-84.0228 43.8017,-84.0218 43.7704,-84.0199 43.7392,-84.0184 43.7079,-84.0185 43.6768,-84.0052 43.662,-83.9884 43.6467,-83.9703 43.632,-83.9529 43.6191,-83.9533 43.6126,-83.9522 43.6059,-83.9503 43.5994,-83.9482 43.593)
+LINESTRING(-84.7417 43.8271,-84.7058 43.8127,-84.6695 43.7965,-84.6328 43.781,-84.5963 43.7679,-84.5919 43.7673,-84.5858 43.7672,-84.5796 43.7671,-84.5748 43.7667,-84.5603 43.7622,-84.548 43.7563,-84.5364 43.7499,-84.5241 43.7436,-84.5151 43.7408,-84.5007 43.737,-84.487 43.7331,-84.4795 43.7302,-84.4717 43.7261,-84.4587 43.7213,-84.4455 43.7166,-84.4372 43.713,-84.415 43.7046,-84.3928 43.7042,-84.37 43.7049,-84.3462 43.7001,-84.3322 43.6935,-84.32 43.6871,-84.3067 43.6818,-84.2893 43.6782,-84.2675 43.6739,-84.2467 43.6667,-84.2265 43.658,-84.2062 43.6487,-84.1842 43.6377,-84.1616 43.6243,-84.1399 43.6099,-84.1208 43.596,-84.076 43.5957,-84.0345 43.5951,-83.993 43.5943,-83.9482 43.593)
+LINESTRING(-77.648 43.0482,-77.6548 43.033,-77.6632 43.0196,-77.6723 43.0068,-77.6813 42.9935,-77.6847 42.9836,-77.6907 42.9634,-77.6968 42.942,-77.6999 42.9286,-77.6994 42.9229,-77.6973 42.9175,-77.6952 42.9121,-77.6949 42.9064,-77.7001 42.8903,-77.708 42.8792,-77.7169 42.8695,-77.7252 42.8577,-77.7336 42.8385,-77.7404 42.82,-77.7492 42.8022,-77.7635 42.7847,-77.7759 42.778,-77.793 42.7739,-77.8118 42.7703,-77.829 42.7654,-77.8339 42.7503,-77.8366 42.7347,-77.8356 42.719,-77.8294 42.704,-77.821 42.7,-77.8129 42.6959,-77.8058 42.6912,-77.8001 42.6849,-77.8018 42.681,-77.8046 42.6774,-77.8082 42.6741,-77.8121 42.6711,-77.7961 42.6421,-77.7561 42.5988,-77.7101 42.5579,-77.6763 42.5361,-77.6501 42.5388,-77.642 42.5413,-77.6343 42.5429,-77.6264 42.5434,-77.6177 42.5423,-77.5968 42.5365,-77.5797 42.5286,-77.5654 42.518,-77.553 42.5045,-77.5436 42.4916,-77.5345 42.4799,-77.5229 42.4704,-77.5062 42.4643,-77.4905 42.4617,-77.4763 42.4606,-77.4458 42.4599,-77.4189 42.4535,-77.3927 42.4464,-77.3739 42.4367,-77.3652 42.4228,-77.3326 42.3837)
+LINESTRING(-123.282 42.4642,-123.274 42.4603,-123.252 42.4531,-123.23 42.4461,-123.219 42.4428,-123.21 42.4422,-123.2 42.4415,-123.192 42.4415,-123.184 42.4424,-123.177 42.4415,-123.169 42.4373,-123.156 42.4304,-123.15 42.4202,-123.144 42.4095,-123.133 42.4011,-123.112 42.397,-123.09 42.3968,-123.073 42.3984,-123.065 42.3994,-123.035 42.4047,-122.997 42.408,-122.962 42.4071,-122.937 42.4,-122.924 42.3906,-122.911 42.3812,-122.897 42.3719,-122.884 42.3629,-122.88 42.3536,-122.876 42.3429,-122.871 42.3325,-122.865 42.3241)
+LINESTRING(-75.7752 42.1033,-75.7705 42.0978,-75.7593 42.0817,-75.7507 42.067,-75.7437 42.0521,-75.7368 42.0349,-75.7294 42.0203,-75.721 42.0076,-75.7163 41.9989)
+LINESTRING(-72.3792 41.3416,-72.4014 41.3397,-72.4224 41.3381,-72.4433 41.3369,-72.4654 41.3361,-72.4893 41.3337,-72.5106 41.3293,-72.532 41.3247,-72.5559 41.3214,-72.5777 41.3202,-72.5969 41.3207,-72.6151 41.3229,-72.634 41.3271,-72.6545 41.3292,-72.6724 41.3332,-72.6903 41.3371,-72.711 41.3386,-72.7396 41.3369,-72.7646 41.3334,-72.7897 41.3296,-72.8183 41.3269,-72.8359 41.3279,-72.8513 41.3311,-72.8666 41.335,-72.8843 41.3376,-72.9103 41.3373,-72.9332 41.3323,-72.9543 41.3234,-72.9753 41.3113,-72.9855 41.3057,-72.9954 41.3012,-73.0054 41.2966,-73.0157 41.2907,-73.0253 41.2843,-73.0348 41.278,-73.0436 41.2723,-73.0524 41.2671)
+LINESTRING(-72.6904 41.6249,-72.7036 41.6054,-72.7167 41.5854,-72.7306 41.5659,-72.7462 41.5478,-72.7695 41.5315,-72.7955 41.5202,-72.8192 41.5079,-72.8357 41.4887,-72.8529 41.4508,-72.8599 41.4413,-72.8694 41.4342,-72.8798 41.4276,-72.8898 41.4195,-72.8954 41.4121,-72.8995 41.4051,-72.9039 41.3983,-72.9108 41.3918,-72.9168 41.3892,-72.9234 41.3884,-72.93 41.3879,-72.9361 41.3859,-72.968 41.3701,-72.9956 41.3549,-73.018 41.3368,-73.0343 41.3124,-73.0524 41.2671)
+LINESTRING(-107.251 45.0008,-107.225 44.986,-107.183 44.9736,-107.153 44.9697,-107.088 44.9595,-107.041 44.9341,-107.006 44.8942,-106.977 44.8404,-106.968 44.836,-106.96 44.8316,-106.951 44.8272,-106.943 44.8228,-106.938 44.8061,-106.931 44.7713,-106.923 44.7335,-106.915 44.708,-106.909 44.6977,-106.901 44.6894,-106.893 44.6814,-106.884 44.6722,-106.874 44.6584,-106.864 44.6425,-106.855 44.6264,-106.848 44.6121,-106.848 44.6056,-106.847 44.5993,-106.84 44.5892,-106.832 44.5797,-106.824 44.5699,-106.818 44.5589,-106.814 44.543,-106.812 44.5256,-106.81 44.5087,-106.806 44.4941,-106.786 44.4693,-106.753 44.4351,-106.718 44.4011,-106.694 44.3767,-106.687 44.3721)
+LINESTRING(-72.6647 41.7591,-72.6878 41.7586,-72.7085 41.7565,-72.7234 41.7543,-72.7351 41.7511,-72.7507 41.7449,-72.7968 41.7296,-72.8074 41.7168,-72.8095 41.6983,-72.8239 41.6679,-72.8359 41.6613,-72.8592 41.6452,-72.8837 41.6269,-72.8992 41.6132,-72.9019 41.6034,-72.9016 41.5946,-72.9008 41.5865,-72.9021 41.5787,-72.9062 41.5721,-72.9128 41.5648,-72.9204 41.5581,-72.9275 41.5534,-72.9594 41.5393,-72.9742 41.5392,-72.9885 41.5424,-73.019 41.5379,-73.0322 41.5458,-73.0485 41.5514,-73.066 41.5534,-73.0829 41.5508,-73.0909 41.5295,-73.099 41.5213,-73.1124 41.5174,-73.1365 41.5088,-73.1485 41.5027,-73.1598 41.4961,-73.1712 41.4896,-73.1835 41.484,-73.1925 41.4813,-73.2017 41.479,-73.2105 41.4762,-73.2183 41.472,-73.2317 41.46,-73.242 41.4469,-73.2513 41.4333,-73.2621 41.4199,-73.2691 41.4148,-73.2836 41.4144,-73.2936 41.4192,-73.3031 41.4243,-73.3128 41.4265,-73.3413 41.4237,-73.3699 41.4188,-73.3983 41.4157,-73.426 41.4181,-73.4411 41.4125,-73.4533 41.4069,-73.4644 41.4006,-73.4765 41.3927,-73.4765 41.3863,-73.4834 41.3815,-73.5014 41.3821,-73.5125 41.3851,-73.5231 41.3877,-73.5328 41.3891,-73.5439 41.3882)
+LINESTRING(-104.055 44.5426,-104.032 44.5438,-104.002 44.5441,-103.975 44.541,-103.954 44.5324,-103.933 44.5204,-103.906 44.5087,-103.862 44.501)
+LINESTRING(-73.7719 41.5394,-73.8018 41.5336,-73.8353 41.5284,-73.8692 41.5249,-73.9004 41.5248,-73.9116 41.5267,-73.9231 41.5298,-73.9346 41.5317,-73.9457 41.5303,-73.949 41.5275,-73.9536 41.5244,-73.9585 41.5216,-73.9631 41.5201,-73.983 41.5181,-74.0168 41.5158,-74.0515 41.514,-74.0736 41.5136)
+LINESTRING(-74.0736 41.5136,-74.0821 41.5819,-74.0842 41.6158,-74.0819 41.6504,-74.0727 41.6913,-74.0607 41.7336,-74.0522 41.7758,-74.0533 41.8162,-74.0593 41.8555,-74.0578 41.8795,-74.052 41.9008,-74.0447 41.9324,-74.0335 41.943,-74.0252 41.9519,-74.0186 41.9616,-74.0124 41.9743,-74.0034 41.9985,-73.9964 42.0229,-73.9892 42.0473,-73.98 42.0715,-73.9742 42.0821,-73.9676 42.0922,-73.9612 42.1025,-73.9562 42.1135,-73.9532 42.1246,-73.9509 42.1358,-73.9482 42.1469,-73.9441 42.1579,-73.9385 42.1675,-73.9317 42.1771,-73.9252 42.1867,-73.9203 42.1962,-73.918 42.2035,-73.9161 42.211,-73.9138 42.2184,-73.9104 42.2256,-73.9033 42.234,-73.8942 42.2422,-73.8859 42.25,-73.8811 42.2575,-73.878 42.2746,-73.8762 42.2919,-73.8739 42.3092,-73.869 42.3264,-73.8617 42.3491,-73.8571 42.3703,-73.8524 42.3912,-73.8448 42.413,-73.8392 42.4325,-73.8373 42.4528,-73.8356 42.4733,-73.831 42.4937,-73.8285 42.5013,-73.8254 42.5118,-73.8227 42.5224,-73.821 42.53)
+LINESTRING(-77.3326 42.3837,-77.3193 42.3783,-77.3099 42.3684,-77.3006 42.3585,-77.2878 42.3495,-77.2668 42.3418,-77.2459 42.3377,-77.226 42.3327,-77.208 42.3225,-77.1962 42.3068,-77.1925 42.2904,-77.1902 42.2734,-77.1827 42.256,-77.1697 42.2393,-77.1553 42.2255,-77.1379 42.2137,-77.1158 42.2031,-77.1136 42.2022)
+LINESTRING(-73.5439 41.3882,-73.5486 41.3879,-73.562 41.3845,-73.5768 41.3833,-73.5968 41.3881)
+LINESTRING(-73.5968 41.3881,-73.6008 41.3926,-73.6041 41.3972,-73.6067 41.4021,-73.6085 41.4073,-73.6144 41.4106,-73.6209 41.4143,-73.6266 41.4185,-73.6302 41.423,-73.6335 41.4335,-73.636 41.444,-73.6394 41.4542,-73.6456 41.4641,-73.6526 41.4712,-73.661 41.4788,-73.6687 41.4865,-73.6737 41.494,-73.6766 41.5087,-73.6782 41.5226,-73.6855 41.5345,-73.7055 41.5435,-73.7243 41.5454,-73.7406 41.5431,-73.7559 41.54,-73.7719 41.5394)
+LINESTRING(-103.862 44.501,-103.846 44.4963,-103.833 44.4881,-103.821 44.4801,-103.809 44.4763,-103.79 44.4756,-103.772 44.4749,-103.753 44.4742,-103.734 44.4736)
+LINESTRING(-88.4685 44.2723,-88.4711 44.2694,-88.4733 44.2632,-88.4792 44.2561,-88.4858 44.2491,-88.4915 44.2404,-88.4962 44.2331,-88.5015 44.2265,-88.5062 44.2196,-88.5085 44.2114,-88.5108 44.2012,-88.5154 44.1903,-88.5209 44.1795,-88.5263 44.17,-88.5392 44.1464,-88.5516 44.1207,-88.5627 44.0921,-88.5718 44.0599,-88.5764 44.0309,-88.5789 44.0025,-88.5822 43.9746,-88.5892 43.947)
+LINESTRING(-76.4444 41.9996,-76.4422 42.0018,-76.4367 42.0063,-76.4301 42.0093,-76.4218 42.0106,-76.4115 42.0101,-76.4025 42.0082,-76.3934 42.0059,-76.383 42.0042,-76.3745 42.0039,-76.367 42.0047,-76.3597 42.0061,-76.3517 42.0077,-76.3418 42.0096,-76.3331 42.0118,-76.3253 42.015,-76.3183 42.02,-76.3093 42.0274,-76.3007 42.0334,-76.2918 42.0392,-76.2822 42.0463,-76.2742 42.053,-76.2669 42.0589,-76.2586 42.0639,-76.2479 42.0678,-76.2352 42.07,-76.2234 42.0698,-76.2114 42.068,-76.1983 42.0651,-76.1841 42.061,-76.1722 42.0562,-76.1602 42.0515,-76.1461 42.0474,-76.1281 42.0453,-76.1117 42.0471,-76.096 42.0518,-76.0798 42.0586,-76.0646 42.0647,-76.0506 42.0696,-76.037 42.0749,-76.0231 42.0823,-76.008 42.0926,-75.9951 42.1023,-75.9817 42.1114,-75.9649 42.1202,-75.9493 42.1264,-75.9345 42.1307,-75.9195 42.1333,-75.9032 42.1347)
+LINESTRING(-112.34 44.5396,-112.278 44.498,-112.222 44.4253,-112.189 44.3307,-112.196 44.2822,-112.223 44.2252,-112.25 44.1677,-112.256 44.1175,-112.252 44.0713,-112.252 44.0155,-112.252 43.9597,-112.247 43.9135,-112.24 43.8703,-112.235 43.8383)
+LINESTRING(-111.578 43.997,-111.604 43.9847,-111.626 43.9774,-111.651 43.9739,-111.68 43.9733,-111.688 43.9594,-111.705 43.935,-111.724 43.9104,-111.735 43.896,-111.744 43.8921,-111.753 43.8859,-111.761 43.879,-111.768 43.8733,-111.798 43.8524)
+LINESTRING(-77.1136 42.2022,-77.1107 42.2011,-77.091 42.1942,-77.0724 42.189,-77.0535 42.1838,-77.0329 42.1774,-77.0162 42.1707,-77.0019 42.1635,-76.9873 42.1569,-76.9696 42.1517,-76.9493 42.1502,-76.9311 42.1536,-76.9132 42.1597,-76.8937 42.1661,-76.8734 42.1702,-76.8546 42.1713,-76.8352 42.171,-76.8133 42.1709,-76.8043 42.1638,-76.7983 42.1562,-76.7935 42.1479,-76.7884 42.1387,-76.7828 42.1294,-76.7786 42.1209,-76.7764 42.1121,-76.7769 42.1021,-76.78 42.0877,-76.7831 42.075,-76.7854 42.0624,-76.7865 42.048,-76.7829 42.0295,-76.772 42.0138,-76.7554 42.0022)
+LINESTRING(-76.7554 42.0022,-76.7546 42.0016,-76.7314 41.9937,-76.7186 41.9911,-76.7072 41.9892,-76.6957 41.9876,-76.6824 41.9862,-76.6754 41.9862,-76.6692 41.9869,-76.6631 41.9877,-76.6562 41.9878,-76.6382 41.9862,-76.6224 41.9837,-76.6068 41.9808,-76.589 41.9774,-76.5481 41.9716,-76.5094 41.9706,-76.475 41.9778,-76.4473 41.9965,-76.4444 41.9996)
+LINESTRING(-74.0736 41.5136,-74.0811 41.514,-74.0902 41.516,-74.1005 41.5179,-74.111 41.5181,-74.1718 41.5122,-74.2147 41.5075,-74.2572 41.4968,-74.3166 41.473,-74.3308 41.4669,-74.3444 41.461,-74.3573 41.4543,-74.3691 41.4458)
+LINESTRING(-75.7752 42.1033,-75.7252 42.0971,-75.6729 42.0857,-75.6234 42.0749,-75.5816 42.0705,-75.5689 42.0621,-75.5554 42.053,-75.5412 42.0487,-75.5266 42.0546,-75.5159 42.057,-75.4947 42.0578,-75.4707 42.0545,-75.4512 42.045,-75.4394 42.0435,-75.4269 42.0422,-75.4146 42.0421,-75.403 42.0441,-75.3742 42.0363,-75.3391 42.0309,-75.3095 42.023,-75.2971 42.0076,-75.2616 41.9895,-75.2219 41.986,-75.1816 41.9897,-75.1438 41.9932,-75.098 41.9895,-75.0527 41.9783,-75.0085 41.9641,-74.9657 41.9513,-74.9586 41.9517,-74.9516 41.9526,-74.9446 41.9538,-74.9379 41.9553,-74.9254 41.9504,-74.9148 41.943,-74.9045 41.935,-74.8931 41.9283,-74.782 41.8932,-74.742 41.8233,-74.7365 41.7452,-74.7286 41.6854,-74.7201 41.6772,-74.7062 41.6701,-74.6908 41.6647,-74.6778 41.661,-74.6479 41.6406,-74.6028 41.6234,-74.5539 41.6077,-74.5129 41.5922,-74.5033 41.5834,-74.5022 41.5736,-74.5019 41.5643,-74.495 41.5571,-74.4789 41.554,-74.4665 41.5577,-74.4555 41.5631,-74.4433 41.5649,-74.4349 41.5624,-74.4272 41.5576,-74.423 41.5515,-74.4252 41.5452,-74.4117 41.5196,-74.3973 41.4951,-74.3828 41.4707,-74.3691 41.4458)
+LINESTRING(-91.4199 44.767,-91.4115 44.7676,-91.3713 44.7408,-91.3416 44.7094,-91.3187 44.6747,-91.2987 44.6382,-91.2797 44.628,-91.2599 44.621,-91.2403 44.6134,-91.2221 44.6013,-91.1965 44.5775,-91.1718 44.5531,-91.1482 44.5282,-91.126 44.5026,-91.112 44.4838,-91.0985 44.4642,-91.0839 44.4452,-91.0667 44.4281,-91.0542 44.4205,-91.0382 44.4126,-91.024 44.4042,-91.0167 44.3954,-90.9674 44.373,-90.9196 44.3498,-90.873 44.3254,-90.8275 44.2998,-90.7812 44.2726,-90.7343 44.2451,-90.6868 44.2183,-90.6386 44.1931,-90.6164 44.1834,-90.5926 44.1739,-90.5697 44.1638,-90.55 44.1519,-90.5414 44.1445,-90.5351 44.1361,-90.5251 44.1081,-90.5201 44.0789,-90.5146 44.0495,-90.5034 44.021,-90.4891 44.0079,-90.4685 43.9982,-90.4499 43.9916,-90.4413 43.9878)
+LINESTRING(-96.7888 44.327,-96.7854 44.3896,-96.7801 44.465,-96.7747 44.5392,-96.7708 44.598,-96.7873 44.6235,-96.8103 44.6551,-96.8343 44.6865,-96.8538 44.7112,-96.8953 44.7566,-96.9418 44.7976,-96.993 44.8359,-97.0486 44.873,-97.0486 44.8772,-97.0485 44.8815,-97.0485 44.8857,-97.0484 44.8899)
+LINESTRING(-77.1136 42.2022,-77.1311 42.1864,-77.1465 42.1718,-77.1593 42.1562,-77.1693 42.1369,-77.1759 42.1109,-77.175 42.087,-77.1664 42.0636,-77.1504 42.0391,-77.131 42.0167,-77.1159 42.0007)
+LINESTRING(-74.0736 41.5136,-74.0739 41.4993,-74.0719 41.4845,-74.068 41.47,-74.0619 41.4563,-74.0649 41.4452,-74.0674 41.4339,-74.0702 41.4227,-74.0745 41.412,-74.0817 41.4,-74.09 41.3879,-74.0975 41.3755,-74.1024 41.3628,-74.1041 41.3477,-74.1058 41.3322,-74.1122 41.3183,-74.128 41.3077)
+LINESTRING(-74.128 41.3077,-74.1285 41.3088,-74.1291 41.31,-74.1297 41.3111,-74.1303 41.3123,-74.1523 41.3202,-74.1739 41.3314,-74.191 41.3415,-74.1994 41.3461,-74.2193 41.3469,-74.2461 41.3471,-74.2712 41.349,-74.2861 41.3551,-74.2925 41.3667,-74.3103 41.381,-74.3314 41.3941,-74.3478 41.4024,-74.35 41.4132,-74.3539 41.4254,-74.3601 41.437,-74.3691 41.4458)
+LINESTRING(-82.4117 42.9802,-82.4874 42.9738)
+LINESTRING(-106.687 44.3721,-106.648 44.3512,-106.619 44.3237,-106.596 44.2986,-106.578 44.2848,-106.517 44.2699,-106.459 44.2582,-106.404 44.2426,-106.35 44.2161,-106.341 44.2171,-106.333 44.2182,-106.325 44.2192,-106.317 44.2202,-106.304 44.2156,-106.291 44.2101,-106.278 44.204,-106.266 44.1977,-106.262 44.1978,-106.257 44.1978,-106.253 44.1979,-106.249 44.1979,-106.239 44.2029,-106.224 44.2101,-106.209 44.2167,-106.2 44.2201,-106.169 44.2224,-106.127 44.2229,-106.087 44.221,-106.058 44.2163,-106.049 44.2192,-106.04 44.2222,-106.031 44.2251,-106.023 44.228,-106.015 44.224,-106.007 44.2199,-105.994 44.2148,-105.98 44.2109,-105.966 44.2071,-105.954 44.2019,-105.947 44.1971,-105.941 44.1918,-105.935 44.1867,-105.927 44.1819,-105.92 44.1816,-105.914 44.1813,-105.907 44.1809,-105.901 44.1806,-105.882 44.1873,-105.867 44.1959,-105.852 44.2048,-105.836 44.2124,-105.825 44.2149,-105.816 44.2156,-105.807 44.2156,-105.797 44.2163,-105.759 44.2258,-105.741 44.2358,-105.716 44.2422,-105.655 44.2412,-105.636 44.2501,-105.621 44.2594,-105.608 44.2693,-105.591 44.2801,-105.564 44.2811,-105.543 44.2822,-105.524 44.2819,-105.502 44.2785,-105.487 44.2774,-105.479 44.2805,-105.473 44.2859,-105.466 44.2916,-105.429 44.2925,-105.393 44.2942,-105.357 44.2962,-105.32 44.2983,-105.295 44.2985,-105.274 44.297,-105.252 44.2946,-105.228 44.2923,-105.215 44.2921,-105.201 44.2931,-105.187 44.2942,-105.174 44.2948,-105.13 44.2937,-105.079 44.2911,-105.027 44.2875,-104.982 44.2833,-104.978 44.2804,-104.973 44.2777,-104.968 44.2751,-104.963 44.2728,-104.957 44.2731,-104.952 44.2712,-104.947 44.2697,-104.941 44.2659,-104.886 44.2707,-104.83 44.2747,-104.775 44.2784,-104.719 44.2821,-104.697 44.2847,-104.674 44.2885,-104.651 44.2923,-104.627 44.2948,-104.613 44.3074,-104.589 44.3205,-104.562 44.3299,-104.539 44.3313,-104.533 44.3274,-104.528 44.3224,-104.497 44.3293,-104.473 44.3457,-104.452 44.3649,-104.43 44.3805,-104.423 44.3835,-104.414 44.3863,-104.405 44.3889,-104.396 44.3914,-104.381 44.3968,-104.367 44.4026,-104.354 44.4093,-104.34 44.4159,-104.327 44.4219,-104.313 44.4281,-104.299 44.4346,-104.287 44.4413,-104.281 44.4457,-104.276 44.4509,-104.271 44.4563,-104.265 44.4613,-104.243 44.4756,-104.229 44.4874,-104.22 44.5012,-104.213 44.5214,-104.189 44.5296,-104.153 44.5364,-104.117 44.5407,-104.09 44.5419,-104.062 44.5423,-104.055 44.5426)
+LINESTRING(-122.865 42.3241,-122.844 42.3061,-122.807 42.2775,-122.769 42.2498,-122.746 42.2344,-122.728 42.2259,-122.706 42.2159,-122.685 42.2052,-122.669 42.1944,-122.66 42.182,-122.653 42.1681,-122.647 42.1537,-122.64 42.1403,-122.625 42.1177,-122.616 42.1065,-122.605 42.0993,-122.582 42.0886,-122.575 42.0754,-122.57 42.0622,-122.567 42.0494,-122.57 42.0377,-122.575 42.0315,-122.584 42.022,-122.593 42.0125,-122.598 42.006)
+LINESTRING(-84.7417 43.8271,-84.7467 43.8189,-84.7531 43.8092,-84.7582 43.7995,-84.7598 43.7902,-84.7583 43.7491,-84.7593 43.7085,-84.7611 43.668,-84.7621 43.6272,-84.7566 43.6227,-84.7507 43.6186,-84.7448 43.6144,-84.7391 43.61,-84.7394 43.5986,-84.7382 43.5872,-84.7366 43.5759,-84.7359 43.5645,-84.7213 43.5589,-84.7068 43.5534,-84.6922 43.5478,-84.6777 43.5423,-84.6747 43.5106,-84.6767 43.4783,-84.6786 43.4463,-84.6754 43.4152,-84.6571 43.4067,-84.6367 43.3966,-84.6175 43.3854,-84.6028 43.3737,-84.6029 43.3594,-84.603 43.345,-84.603 43.3307,-84.6031 43.3164,-84.601 43.3132,-84.5962 43.3084,-84.5911 43.3031,-84.5879 43.2984,-84.5868 43.2933,-84.5863 43.2878,-84.5856 43.2824,-84.5834 43.2774,-84.5735 43.2713,-84.5689 43.264,-84.5677 43.2558,-84.5679 43.2467)
+LINESTRING(-93.2461 44.0978,-93.2524 44.1379,-93.2716 44.1921,-93.2935 44.2474,-93.3079 44.2912,-93.3077 44.3076,-93.3024 44.3225,-93.2961 44.3372,-93.293 44.3531,-93.2941 44.3827,-93.2967 44.4123,-93.2992 44.4418,-93.3003 44.4712,-93.2994 44.482,-93.2975 44.4928,-93.2961 44.5037,-93.2964 44.5146,-93.3014 44.5492,-93.3055 44.5839,-93.308 44.6187,-93.3081 44.6537,-93.304 44.6752,-93.2957 44.6959,-93.2874 44.7169,-93.2828 44.7394,-93.2824 44.7575,-93.2822 44.786,-93.2826 44.8134,-93.2838 44.8284,-93.2912 44.8442,-93.2968 44.8532,-93.2995 44.8657,-93.2984 44.8918)
+LINESTRING(-74.6909 41.3553,-74.6808 41.3555,-74.6618 41.3563,-74.6367 41.3641,-74.608 41.3751,-74.5808 41.3858,-74.5597 41.3924,-74.5429 41.3956,-74.5264 41.3986,-74.51 41.4021,-74.4934 41.4069,-74.4872 41.4057,-74.4809 41.4045,-74.4747 41.4033,-74.4684 41.4021,-74.4405 41.4086,-74.4144 41.4185,-74.3905 41.4312,-74.3691 41.4458)
+LINESTRING(-74.6991 41.355,-74.6909 41.3553)
+LINESTRING(-73.7085 41.1108,-73.6972 41.1377,-73.6828 41.2301,-73.6592 41.3178,-73.6008 41.3772,-73.5998 41.3799,-73.5988 41.3826,-73.5978 41.3853,-73.5968 41.3881)
+LINESTRING(-93.2461 44.0978,-93.2474 44.088,-93.2487 44.0783,-93.25 44.0685,-93.2513 44.0587)
+LINESTRING(-115.628 43.1686,-115.658 43.1924,-115.71 43.2236,-115.766 43.2526,-115.827 43.2848,-115.889 43.3212,-115.942 43.3559,-115.989 43.3942,-116.036 43.4411,-116.061 43.4741,-116.082 43.504,-116.105 43.5326,-116.138 43.5615,-116.183 43.5859,-116.229 43.5971,-116.28 43.6005,-116.34 43.6015)
+LINESTRING(-73.7185 41.0868,-73.7085 41.1108)
+LINESTRING(-73.6909 41.0536,-73.6826 41.0607,-73.6722 41.0685,-73.6569 41.0749,-73.6382 41.0791,-73.6186 41.0827,-73.6008 41.087,-73.5809 41.0921,-73.5613 41.0963,-73.5433 41.1026,-73.528 41.1135,-73.5192 41.1156,-73.5102 41.117,-73.5012 41.1181,-73.4921 41.1196,-73.4704 41.1347,-73.453 41.147,-73.4339 41.1583,-73.4074 41.1702,-73.389 41.175,-73.371 41.1763,-73.3529 41.1765,-73.3342 41.1779,-73.3066 41.1871,-73.2842 41.2004,-73.2607 41.2116,-73.2296 41.214,-73.225 41.2161,-73.2207 41.2198,-73.2172 41.224,-73.2151 41.2277,-73.1925 41.2246,-73.1625 41.2362,-73.1294 41.2444,-73.0922 41.2524,-73.0805 41.2554,-73.0702 41.2589,-73.061 41.2628,-73.0524 41.2671)
+LINESTRING(-83.6783 43.0108,-83.6459 43.0136,-83.5963 43.014,-83.5446 43.0133,-83.5065 43.0129,-83.4617 43.0152,-83.4095 43.0212,-83.3588 43.0306,-83.3189 43.0431,-83.3144 43.0425,-83.3098 43.0419,-83.3053 43.0414,-83.3008 43.0408,-83.2664 43.0244,-83.2303 43.0197,-83.1913 43.021,-83.148 43.0224,-83.1221 43.0087,-83.0895 43.0038,-83.055 43.0031,-83.023 43.0019,-83.0103 42.9999,-82.9975 42.9974,-82.9848 42.9949,-82.9721 42.9932,-82.9313 42.9912,-82.9011 42.9891,-82.8727 42.98,-82.8373 42.9572,-82.7771 42.9649,-82.7173 42.9744,-82.6577 42.9848,-82.5983 42.9953,-82.5718 42.9954,-82.5407 42.9899,-82.5107 42.9817,-82.4874 42.9738)
+LINESTRING(-83.9482 43.593,-83.9501 43.5646,-83.9488 43.5359,-83.9419 43.5078,-83.9265 43.4815,-83.9184 43.4781,-83.9102 43.4763,-83.9021 43.4749,-83.894 43.4727,-83.8871 43.4577,-83.8867 43.4353,-83.8883 43.4118,-83.8876 43.3938,-83.8761 43.3827,-83.8685 43.3658,-83.8643 43.3479,-83.8628 43.3336,-83.8389 43.3153,-83.8157 43.2925,-83.793 43.2686,-83.7705 43.2471,-83.7678 43.2097,-83.7651 43.1724,-83.7626 43.135,-83.7607 43.0976,-83.7437 43.0982,-83.7261 43.0994,-83.7088 43.1003,-83.6922 43.0998,-83.6862 43.0924,-83.6835 43.0835,-83.6831 43.0741,-83.6836 43.0655,-83.6816 43.0573,-83.681 43.0416,-83.6805 43.0241,-83.6783 43.0108)
+LINESTRING(-91.3047 43.8547,-91.2825 43.8598,-91.2434 43.8688,-91.2151 43.8734,-91.2052 43.8735,-91.1949 43.8731,-91.1848 43.8728,-91.1752 43.8735,-91.1505 43.867,-91.1228 43.8699,-91.0954 43.8775,-91.0714 43.8848,-91.0675 43.8835,-91.0542 43.8836,-91.0292 43.881,-91.0016 43.8783,-90.9804 43.8781,-90.9289 43.8886,-90.8685 43.9058,-90.8088 43.925,-90.7595 43.9419,-90.7122 43.9476,-90.6513 43.9447,-90.5864 43.9418,-90.5271 43.9475,-90.5052 43.9548,-90.4827 43.9651,-90.4609 43.9767,-90.4413 43.9878)
+LINESTRING(-73.8191 41.3331,-73.8253 41.323,-73.825 41.3081,-73.8219 41.2925,-73.8192 41.2804,-73.8082 41.2517,-73.8072 41.2033,-73.8076 41.1513,-73.8012 41.1118,-73.8056 41.1006,-73.8132 41.0917,-73.8201 41.0804,-73.8225 41.0622)
+LINESTRING(-73.9923 41.1029,-73.9996 41.1205,-74.0126 41.1364,-74.0264 41.152,-74.0361 41.1683,-74.0386 41.1939,-74.038 41.2352,-74.035 41.308)
+LINESTRING(-73.8225 41.0622,-73.8253 41.0619,-73.8281 41.0613,-73.8307 41.0603,-73.833 41.0591)
+LINESTRING(-92.356 43.9501,-92.349 43.9533,-92.3409 43.9553,-92.3324 43.9565,-92.3242 43.9571,-92.2675 43.9588,-92.2016 43.9581,-92.1358 43.9552,-92.0797 43.9506,-92.0678 43.9487,-92.0563 43.9461,-92.045 43.9434,-92.0335 43.9415,-91.9941 43.9374,-91.9517 43.9345,-91.9093 43.9328,-91.8699 43.9327,-91.8456 43.9341,-91.8007 43.937,-91.7551 43.9405,-91.7292 43.9432,-91.7142 43.947,-91.7005 43.9508,-91.6865 43.9537,-91.6705 43.9547,-91.6425 43.9479,-91.6378 43.9341,-91.62 43.9215,-91.5531 43.918,-91.5298 43.9172,-91.5132 43.9149,-91.4971 43.9145,-91.4753 43.9191,-91.4487 43.9139,-91.4283 43.8992,-91.4118 43.8808,-91.397 43.8646,-91.3871 43.8585,-91.3731 43.8524,-91.3596 43.8478,-91.351 43.8461,-91.3218 43.8508,-91.3047 43.8547)
+LINESTRING(-73.9923 41.1029,-73.9643 41.1027,-73.9443 41.0992,-73.9285 41.09,-73.9131 41.0724,-73.8914 41.0715,-73.8682 41.0663,-73.8474 41.0609,-73.833 41.0591)
+LINESTRING(-73.7215 41.0234,-73.7125 41.034,-73.6977 41.0478,-73.6909 41.0536)
+LINESTRING(-73.7215 41.0234,-73.7233 41.0316,-73.7251 41.0399,-73.7273 41.0534,-73.728 41.0641,-73.7185 41.0868)
+LINESTRING(-73.7215 41.0234,-73.7402 41.0298,-73.7738 41.0424,-73.8066 41.0552,-73.8225 41.0622)
+LINESTRING(-73.9923 41.1029,-74.0044 41.1037,-74.0162 41.1034,-74.0278 41.1019,-74.0393 41.0989)
+LINESTRING(-83.6783 43.0108,-83.7301 42.986)
+LINESTRING(-74.0393 41.0989,-74.0673 41.1007,-74.0979 41.1084,-74.1296 41.1172,-74.1608 41.122)
+LINESTRING(-74.1608 41.122,-74.1611 41.1241,-74.1614 41.1263,-74.1616 41.1285,-74.1619 41.1306,-74.1661 41.1343,-74.1711 41.1376,-74.1758 41.1409,-74.1793 41.1449,-74.1761 41.1998,-74.1678 41.2313,-74.1524 41.2603,-74.128 41.3077)
+LINESTRING(-74.1608 41.122,-74.1613 41.12,-74.1622 41.1179,-74.1636 41.116,-74.1652 41.1144)
+LINESTRING(-103.734 44.4736,-103.711 44.4809,-103.683 44.4805,-103.658 44.4731,-103.639 44.4599,-103.632 44.4592,-103.625 44.4586,-103.618 44.458,-103.611 44.4573,-103.59 44.4403,-103.57 44.4293,-103.547 44.4214,-103.519 44.4138,-103.49 44.3861,-103.459 44.3605,-103.436 44.3319,-103.435 44.2953,-103.426 44.284,-103.421 44.2723,-103.418 44.2606,-103.412 44.2493,-103.383 44.2185,-103.348 44.193,-103.317 44.173,-103.297 44.1587,-103.288 44.1473,-103.28 44.1354,-103.271 44.1235,-103.261 44.1121,-103.253 44.1087,-103.243 44.107,-103.232 44.1067,-103.223 44.1074)
+LINESTRING(-111.798 43.8524,-111.813 43.8369,-111.817 43.8188,-111.817 43.7902,-111.825 43.7812,-111.834 43.7726,-111.843 43.7643,-111.851 43.7563,-111.868 43.7345,-111.884 43.7128,-111.901 43.691,-111.918 43.6692,-111.945 43.6309,-111.989 43.5714,-112.037 43.5149,-112.057 43.4994)
+LINESTRING(-83.7301 42.986,-83.7183 42.9525)
+LINESTRING(-74.0393 41.0989,-74.0526 41.0641)
+LINESTRING(-112.057 43.4994,-112.075 43.4853)
+LINESTRING(-112.235 43.8383,-112.234 43.8343,-112.227 43.7987,-112.212 43.7564,-112.199 43.7289,-112.187 43.7034,-112.176 43.6791,-112.166 43.6555,-112.147 43.6188,-112.124 43.579,-112.099 43.5348,-112.075 43.4853)
+LINESTRING(-75.7163 41.9989,-75.7141 41.9948,-75.7112 41.98,-75.7125 41.9624,-75.7153 41.9468,-75.7171 41.9311,-75.7145 41.8989,-75.714 41.8855,-75.7106 41.8729,-75.7004 41.8609,-75.6934 41.8572,-75.6857 41.8549,-75.6782 41.8524,-75.6717 41.8483,-75.6675 41.8407,-75.6678 41.8327,-75.67 41.8243,-75.671 41.8153,-75.6708 41.8007,-75.6713 41.7873,-75.6731 41.774,-75.6768 41.7593,-75.6746 41.7363,-75.6727 41.7296,-75.6713 41.7228,-75.6705 41.716,-75.6705 41.7091,-75.6734 41.7026,-75.6792 41.6964,-75.6849 41.6906,-75.6877 41.6853,-75.6846 41.6792,-75.681 41.6731,-75.6769 41.6671,-75.6724 41.6615,-75.6663 41.6591,-75.6634 41.6548,-75.6624 41.6504,-75.6618 41.6461,-75.66 41.6418,-75.6557 41.6366,-75.6509 41.6316,-75.647 41.6263,-75.6452 41.6202,-75.6469 41.6015,-75.6521 41.5816,-75.6579 41.5614,-75.6612 41.5415,-75.6613 41.5353,-75.6616 41.5318,-75.6688 41.5154,-75.6749 41.5044,-75.6787 41.4926,-75.6784 41.4768,-75.6745 41.4736,-75.6696 41.4715,-75.6643 41.4675,-75.6592 41.4588,-75.652 41.455,-75.6477 41.4537,-75.6406 41.4511,-75.6349 41.4469,-75.6306 41.4414,-75.6277 41.4345,-75.6225 41.429,-75.6181 41.4278,-75.6135 41.4266,-75.6093 41.425)
+LINESTRING(-77.3326 42.3837,-77.3834 42.3879,-77.4276 42.386,-77.4676 42.3819,-77.5056 42.3793,-77.5173 42.38,-77.5289 42.3817,-77.5405 42.3831,-77.5523 42.3831,-77.5664 42.3811,-77.5803 42.3783,-77.5944 42.3758,-77.6092 42.375,-77.6199 42.376,-77.631 42.3779,-77.6417 42.3796,-77.6515 42.3802,-77.6754 42.3737,-77.7025 42.359,-77.7251 42.341,-77.7355 42.3242,-77.7715 42.3182,-77.7993 42.3171,-77.8251 42.3175,-77.8549 42.3158,-77.8707 42.3128,-77.8874 42.3084,-77.904 42.3036,-77.9195 42.2996,-77.9394 42.2964,-77.9594 42.2948,-77.9796 42.2936,-77.9997 42.2917,-78.0112 42.2896,-78.022 42.2863,-78.0555 42.2654,-78.0845 42.2414,-78.1157 42.2188,-78.1559 42.2022,-78.1806 42.2038,-78.2144 42.2129,-78.2531 42.2216,-78.2923 42.2216,-78.3117 42.2128,-78.3277 42.1982,-78.3429 42.1839,-78.3599 42.1761,-78.3716 42.1744,-78.3828 42.1722,-78.3932 42.1687,-78.4027 42.1633,-78.4062 42.1557,-78.4087 42.1488,-78.4141 42.1385,-78.4203 42.1296,-78.4288 42.1223,-78.4411 42.117,-78.4641 42.1118,-78.4852 42.1082,-78.5051 42.1033,-78.5246 42.094,-78.5366 42.0869,-78.5482 42.0812,-78.5608 42.0769,-78.5756 42.0735,-78.5947 42.0698,-78.612 42.0667,-78.6293 42.0655)
+LINESTRING(-78.6293 42.0655,-78.6485 42.0675,-78.6702 42.0788,-78.6824 42.0965,-78.6947 42.1142,-78.7163 42.1254)
+LINESTRING(-73.006 40.782,-72.8925 40.807,-72.7405 40.8444,-72.5934 40.8781,-72.495 40.8921)
+LINESTRING(-77.1159 42.0007,-77.1127 41.9972,-77.0977 41.9771,-77.0882 41.9525,-77.0872 41.9398,-77.0885 41.9282,-77.09 41.9166,-77.0899 41.9039,-77.0859 41.8911,-77.0785 41.8805,-77.0699 41.8699,-77.0628 41.8573,-77.0567 41.8379,-77.0549 41.8201,-77.0571 41.8024,-77.0631 41.7829,-77.0686 41.7703,-77.0752 41.7596,-77.084 41.7497,-77.0962 41.74,-77.104 41.7351,-77.1117 41.7311,-77.1187 41.727,-77.1243 41.7218)
+LINESTRING(-75.6093 41.425,-75.5912 41.4055,-75.5832 41.3929,-75.5796 41.3844,-75.5751 41.3772,-75.5579 41.3862,-75.5407 41.3948,-75.5229 41.4026,-75.5038 41.4093,-75.4739 41.3966,-75.4444 41.3717,-75.4127 41.3532,-75.3766 41.3596,-75.3577 41.3577,-75.3419 41.3507,-75.3274 41.3433,-75.3124 41.3399,-75.292 41.3417,-75.2725 41.3457,-75.2531 41.3506,-75.2336 41.3549,-75.208 41.3585,-75.1806 41.361,-75.1532 41.3627,-75.1274 41.3638,-75.0952 41.3624,-75.0628 41.3578,-75.0303 41.3527,-74.9981 41.35,-74.9866 41.3507,-74.9755 41.3524,-74.9642 41.3535,-74.9521 41.3527,-74.9277 41.3481,-74.9006 41.3428,-74.8737 41.338,-74.85 41.3352,-74.8375 41.3367,-74.8231 41.341,-74.8085 41.346,-74.7956 41.3495,-74.7631 41.3527,-74.7198 41.3545,-74.6991 41.355)
+LINESTRING(-78.8094 42.8135,-78.8058 42.8048,-78.8043 42.7965,-78.8031 42.7882,-78.8002 42.7791,-78.7947 42.7669,-78.7905 42.7557,-78.7889 42.7444,-78.7913 42.732,-78.8021 42.7125,-78.8179 42.6975,-78.8376 42.6844,-78.8606 42.6706,-78.8814 42.6572,-78.8986 42.6446,-78.9142 42.6309,-78.9301 42.6142,-78.9377 42.6084,-78.9477 42.6014,-78.9567 42.5951,-78.9657 42.5889,-78.9839 42.5767,-79.0031 42.5648,-79.0226 42.5534,-79.0421 42.542,-79.0661 42.5274,-79.0909 42.5124,-79.1166 42.4984,-79.1434 42.4867,-79.1541 42.4843,-79.1661 42.4833,-79.1785 42.4824,-79.1902 42.4804,-79.217 42.4715,-79.2438 42.4601,-79.2695 42.4473,-79.2931 42.4346,-79.3071 42.4376,-79.3149 42.438,-79.3486 42.4348,-79.3631 42.4237,-79.3739 42.4089,-79.3901 42.3945,-79.4289 42.384,-79.4824 42.3628,-79.5363 42.3389,-79.5768 42.3205,-79.6155 42.3025,-79.6706 42.2756,-79.7229 42.2486,-79.7529 42.2304,-79.7632 42.2237)
+LINESTRING(-74.1652 41.1144,-74.1653 41.1144,-74.1647 41.1105,-74.1641 41.1066,-74.1635 41.1027,-74.1629 41.0987,-74.1686 41.0979,-74.1744 41.0961,-74.1796 41.0937,-74.1837 41.0906,-74.1874 41.0753,-74.1917 41.0544,-74.1959 41.0357,-74.1992 41.0267,-74.2042 41.025,-74.2093 41.0233,-74.2143 41.0216,-74.2193 41.0199)
+LINESTRING(-74.0526 41.0641,-74.0593 41.0466,-74.0705 40.9916,-74.0779 40.9461,-74.0865 40.922)
+LINESTRING(-74.2193 41.0199,-74.1826 40.9931,-74.156 40.9667,-74.1279 40.9425,-74.0865 40.922)
+LINESTRING(-79.7632 42.2237,-79.7665 42.2215,-79.774 42.2166,-79.7791 42.2121,-79.7997 42.1956,-79.8325 42.1775,-79.8672 42.1611,-79.8904 42.1509)
+LINESTRING(-78.7163 42.1254,-78.7335 42.1253,-78.7476 42.119,-78.7592 42.1086,-78.7686 42.0962,-78.7745 42.0908,-78.7925 42.0874,-78.8031 42.0877,-78.8165 42.0868,-78.8301 42.0853,-78.8447 42.0857,-78.8576 42.0877,-78.8706 42.0902,-78.8853 42.0922,-78.894 42.0935,-78.9022 42.0951,-78.9099 42.0965,-78.9172 42.097,-78.9267 42.0981,-78.936 42.0994,-78.9576 42.1088,-78.9721 42.123,-78.9867 42.1372,-79.0083 42.1465,-79.0321 42.1486,-79.0535 42.1458,-79.0743 42.1393,-79.096 42.1303,-79.1083 42.1294,-79.1159 42.1296,-79.1306 42.1319,-79.1492 42.1373,-79.1599 42.1433,-79.1705 42.1492,-79.1891 42.1546,-79.2046 42.1563,-79.219 42.1556,-79.2332 42.153,-79.2479 42.1491,-79.2629 42.148,-79.2795 42.1512,-79.2964 42.156,-79.3121 42.1601,-79.3255 42.1642,-79.3363 42.1698,-79.347 42.1753,-79.3604 42.1794,-79.3757 42.1807,-79.3917 42.1795,-79.4077 42.1773,-79.4232 42.1751,-79.444 42.1709,-79.468 42.1641,-79.4879 42.1578,-79.5202 42.1544,-79.5444 42.1534,-79.5686 42.1522,-79.5924 42.1512,-79.6055 42.1499,-79.6195 42.1475,-79.6334 42.1448,-79.6462 42.1425,-79.7181 42.1307,-79.7633 42.1268)
+LINESTRING(-75.6093 41.425,-75.6452 41.3948,-75.681 41.3646,-75.7169 41.3344,-75.7526 41.3041,-75.7607 41.3009)
+LINESTRING(-79.7633 42.1268,-79.7641 42.1268,-79.8123 42.1329,-79.8904 42.1509)
+LINESTRING(-89.4906 43.4584,-89.4791 43.4773,-89.4822 43.507,-89.4905 43.5376,-89.4944 43.5594,-89.4891 43.5721,-89.479 43.5828,-89.4683 43.5933,-89.4615 43.6054,-89.4611 43.6089,-89.4615 43.6128,-89.4622 43.6165,-89.463 43.6201,-89.4652 43.6388,-89.464 43.6534,-89.4617 43.6671,-89.4608 43.6828,-89.465 43.7,-89.4732 43.7167,-89.4813 43.7336,-89.4849 43.7516,-89.4841 43.7744,-89.4829 43.7974,-89.4821 43.8204,-89.4823 43.8431,-89.4823 43.9025,-89.4815 43.9375,-89.4896 43.9703,-89.5166 44.023,-89.516 44.0276,-89.5325 44.0513,-89.5408 44.0818,-89.5381 44.1124,-89.5217 44.1364,-89.526 44.1876,-89.5264 44.2773,-89.525 44.3695,-89.5244 44.4282,-89.5191 44.4608,-89.5125 44.5028,-89.5196 44.5377,-89.5555 44.5488,-89.574 44.575,-89.5817 44.6134,-89.5865 44.6514,-89.5967 44.6769,-89.5952 44.6826,-89.5942 44.6885,-89.5938 44.6944,-89.5941 44.7002,-89.6044 44.71,-89.6147 44.7198,-89.625 44.7296,-89.6353 44.7394,-89.631 44.7779,-89.6267 44.7991,-89.6196 44.8123,-89.6064 44.827)
+LINESTRING(-90.4413 43.9878,-90.3743 43.9638,-90.278 43.932,-90.1851 43.8987,-90.1282 43.8703,-90.1085 43.852,-90.0896 43.8326,-90.0704 43.8136,-90.0502 43.7964,-90.0256 43.7821,-89.9979 43.7711,-89.9694 43.761,-89.9421 43.7494,-89.9097 43.7264,-89.8816 43.6955,-89.8582 43.6621,-89.8396 43.6316,-89.8393 43.6113,-89.8379 43.5905,-89.8365 43.5698,-89.836 43.5496,-89.8301 43.5455,-89.8232 43.5416,-89.8161 43.5378,-89.8094 43.5338,-89.7981 43.5325,-89.7855 43.5294,-89.7726 43.526,-89.7608 43.5234,-89.6981 43.5167,-89.6091 43.5058,-89.5285 43.4875,-89.4906 43.4584)
+LINESTRING(-85.5478 43.8901,-85.5456 43.8391,-85.5488 43.7879,-85.552 43.7367,-85.5501 43.6857,-85.5345 43.62,-85.5126 43.557,-85.4955 43.4934,-85.4946 43.4259,-85.4981 43.4242,-85.5016 43.4225,-85.5051 43.4208,-85.5086 43.4192,-85.5143 43.3572,-85.5356 43.3202,-85.5625 43.2883,-85.5854 43.2413,-85.5907 43.207,-85.5916 43.1716,-85.5942 43.1364,-85.6041 43.1032,-85.6162 43.0875,-85.6325 43.0747,-85.6498 43.0624,-85.665 43.0481,-85.6668 43.0405,-85.6715 43.0319,-85.6766 43.0229,-85.6792 43.0145)
+LINESTRING(-86.413 43.9542,-86.4124 43.9454,-86.4118 43.9366,-86.4112 43.9279,-86.4105 43.9191,-86.4064 43.9159,-86.4023 43.9127,-86.4006 43.8934,-86.3989 43.8738,-86.3984 43.8541,-86.4005 43.8348,-86.3975 43.827,-86.3971 43.8227,-86.3967 43.8184,-86.3907 43.8143,-86.3847 43.8102,-86.3898 43.7493,-86.3925 43.6517,-86.3866 43.554,-86.3657 43.4929,-86.3436 43.4809,-86.3379 43.474,-86.3381 43.4654,-86.3336 43.4483,-86.3287 43.4403,-86.3215 43.4317,-86.3137 43.4231,-86.3072 43.4155,-86.2743 43.3816,-86.2365 43.3488,-86.2046 43.3144,-86.1893 43.2758,-86.1867 43.2499,-86.184 43.2213,-86.1834 43.1928,-86.1868 43.1673,-86.174 43.1536,-86.1611 43.1399,-86.1483 43.1262,-86.1355 43.1126,-86.1248 43.1026,-86.1135 43.0911,-86.1011 43.0806,-86.0874 43.0738,-86.0659 43.0699,-86.0427 43.0687,-86.0192 43.068,-85.9972 43.0657,-85.9841 43.0622,-85.9711 43.0573,-85.9577 43.0526,-85.9434 43.0496,-85.9113 43.0463,-85.88 43.0429,-85.8488 43.0385,-85.8173 43.0323,-85.8044 43.0283,-85.7923 43.0236,-85.7798 43.0195,-85.7657 43.0173,-85.7437 43.0171,-85.7224 43.0177,-85.701 43.0174,-85.6792 43.0145)
+LINESTRING(-73.833 41.0591,-73.8357 41.0258,-73.8408 40.9938,-73.8475 40.9627,-73.8554 40.9319,-73.8634 40.9104,-73.8768 40.8889,-73.8975 40.8672,-73.9273 40.8448,-73.9457 40.8325,-73.9642 40.8202,-73.9692 40.8168)
+LINESTRING(-112.075 43.4853,-112.083 43.4738,-112.101 43.4547,-112.122 43.4352,-112.136 43.4224,-112.196 43.372,-112.263 43.3206,-112.333 43.2713,-112.4 43.2271,-112.401 43.2217)
+LINESTRING(-88.5892 43.947,-88.5852 43.8728,-88.57 43.8421,-88.5431 43.826,-88.5041 43.7953,-88.498 43.7852,-88.4955 43.7741,-88.4934 43.7629,-88.4884 43.7526,-88.4794 43.7473,-88.4675 43.7458,-88.455 43.7438,-88.4445 43.7369,-88.4093 43.6699,-88.401 43.6134,-88.3887 43.5657,-88.3415 43.5256,-88.3384 43.517,-88.3342 43.5087,-88.3306 43.5002,-88.3288 43.4909,-88.3292 43.4858,-88.3298 43.4806,-88.3295 43.4754,-88.3273 43.4704,-88.3095 43.4434,-88.2886 43.4093,-88.2678 43.3772,-88.2504 43.3562,-88.2324 43.3378,-88.218 43.3183,-88.204 43.2984,-88.1873 43.2789)
+LINESTRING(-92.9376 43.6742,-92.8982 43.6717,-92.8393 43.6707,-92.7819 43.672,-92.7466 43.6765,-92.7335 43.6829,-92.7215 43.6912,-92.7103 43.7004,-92.7 43.709,-92.6974 43.7126,-92.6656 43.7394,-92.6337 43.7662,-92.6022 43.7932,-92.5713 43.8205,-92.5563 43.8345,-92.5411 43.8495,-92.5255 43.8642,-92.5096 43.8775,-92.4905 43.8857,-92.4578 43.8964,-92.4234 43.9071,-92.3998 43.9154,-92.3869 43.9229,-92.3764 43.9318,-92.3667 43.9411,-92.356 43.9501)
+LINESTRING(-85.6792 43.0145,-85.6802 43.006,-85.6826 42.9982,-85.6833 42.991,-85.6823 42.9846,-85.6804 42.9782,-85.6785 42.9709)
+LINESTRING(-84.5448 42.8168,-84.5248 42.816)
+LINESTRING(-100.3 43.9101,-100.378 43.9093,-100.457 43.9085,-100.535 43.9075,-100.614 43.9066,-100.634 43.8977,-100.659 43.8904,-100.685 43.8851,-100.709 43.8823)
+LINESTRING(-93.2513 44.0587,-93.2522 44.0376,-93.2529 44.0167,-93.2543 43.9958,-93.2573 43.9749,-93.2616 43.9602,-93.2674 43.9454,-93.2726 43.9306,-93.2753 43.9161,-93.2749 43.9035,-93.2737 43.89,-93.2733 43.8766,-93.2755 43.8642,-93.2806 43.853,-93.2862 43.8427,-93.29 43.8321,-93.2896 43.8201,-93.3066 43.7927,-93.3147 43.7554,-93.3175 43.7164,-93.3191 43.6844)
+LINESTRING(-84.5248 42.816,-84.4864 42.8068,-84.4598 42.7967,-84.438 42.7864,-84.4216 42.7832,-84.3835 42.7933,-84.3473 42.8059,-84.3117 42.8195,-84.2757 42.8327,-84.2568 42.8373,-84.2382 42.8396,-84.2196 42.8413,-84.2009 42.8445,-84.1863 42.8491,-84.1635 42.8571,-84.1412 42.8654,-84.1281 42.871,-84.122 42.8752,-84.116 42.8801,-84.1101 42.8849,-84.1037 42.8887,-84.0823 42.8974,-84.0592 42.9049,-84.0362 42.9126,-84.015 42.9216,-83.9948 42.9364,-83.9787 42.9523,-83.9597 42.9651,-83.9305 42.9701,-83.8713 42.9683,-83.8247 42.9675,-83.7808 42.972,-83.7301 42.986)
+LINESTRING(-93.3191 43.6844,-93.2704 43.6718,-93.2174 43.6651,-93.1636 43.6623,-93.1123 43.6617,-93.0964 43.6612,-93.0715 43.6603,-93.0472 43.6598,-93.0333 43.6605,-93.016 43.668,-93.0035 43.6764,-92.9888 43.6826,-92.9648 43.6834,-92.9571 43.6817,-92.9511 43.6789,-92.9451 43.676,-92.9376 43.6742)
+LINESTRING(-74.2193 41.0199,-74.224 41.0234,-74.2296 41.0265,-74.2357 41.029,-74.2418 41.0309,-74.2575 41.0292,-74.2742 41.0264,-74.2886 41.0209,-74.2973 41.011,-74.3399 40.9405,-74.3851 40.9051,-74.4169 40.886,-74.4192 40.8642)
+LINESTRING(-100.709 43.8823,-100.745 43.8827,-100.795 43.8837,-100.842 43.8852,-100.873 43.887,-100.881 43.8894,-100.892 43.8939,-100.904 43.8985,-100.912 43.901,-100.948 43.905,-100.988 43.9079,-101.027 43.9095,-101.064 43.9095,-101.121 43.8986,-101.173 43.8763,-101.226 43.854,-101.285 43.8433,-101.306 43.8449,-101.325 43.8491,-101.343 43.8536,-101.362 43.856,-101.4 43.8573,-101.447 43.8572,-101.493 43.8528,-101.527 43.8412,-101.666 43.8467,-101.755 43.8469,-101.809 43.8453,-101.845 43.8452,-101.879 43.8493,-101.925 43.86,-101.996 43.8799,-102.108 43.9114,-102.146 43.9246,-102.175 43.9413,-102.196 43.9637,-102.207 43.9936,-102.256 43.9991,-102.299 44.0137,-102.335 44.0368,-102.364 44.0676,-102.394 44.0714,-102.421 44.0687,-102.448 44.0676,-102.475 44.0764,-102.49 44.0844,-102.504 44.0924,-102.518 44.1004,-102.532 44.1084,-102.622 44.107,-102.713 44.1055,-102.803 44.104,-102.894 44.1023,-102.899 44.1045,-102.904 44.1067,-102.909 44.1089,-102.914 44.1111,-102.969 44.113,-103.024 44.1148,-103.09 44.1165,-103.124 44.1162,-103.13 44.1125,-103.136 44.1087,-103.157 44.109,-103.179 44.1084,-103.201 44.1076,-103.223 44.1074)
+LINESTRING(-72.739 40.904,-72.7749 40.8829,-72.815 40.8659,-72.8575 40.8519,-72.9006 40.8402,-73.005 40.8244,-73.1224 40.8182,-73.2342 40.8135,-73.3216 40.8028,-73.3754 40.7893,-73.4042 40.7842,-73.4324 40.7877,-73.4845 40.7995,-73.4957 40.7984,-73.5088 40.793,-73.5219 40.7867,-73.5329 40.7831,-73.559 40.7818,-73.5869 40.7831,-73.615 40.785,-73.6415 40.7856,-73.6826 40.7786,-73.7229 40.7643,-73.7643 40.7495,-73.8087 40.7411,-73.8161 40.7407,-73.8236 40.7407,-73.8309 40.7415,-73.8379 40.7434,-73.8663 40.7315,-73.9027 40.7318,-73.9401 40.7381,-73.948 40.7396)
+LINESTRING(-73.948 40.7396,-73.9714 40.7442)
+LINESTRING(-85.6785 42.9709,-85.6601 42.9759,-85.632 42.9807,-85.603 42.9844,-85.5824 42.9861,-85.5643 42.9741,-85.5499 42.9555,-85.53 42.9338,-85.4952 42.9125,-85.4835 42.9088,-85.4708 42.9058,-85.4589 42.9018,-85.4498 42.8949,-85.4184 42.8921,-85.3894 42.8854,-85.3605 42.8785,-85.3294 42.8754,-85.2661 42.876,-85.2029 42.8775,-85.1397 42.8799,-85.0766 42.8829,-85.0555 42.8834,-85.0318 42.8828,-85.0083 42.8814,-84.9879 42.8792,-84.9823 42.8776,-84.9744 42.8744,-84.9662 42.8711,-84.96 42.8689,-84.9389 42.8657,-84.9149 42.8642,-84.8912 42.8619,-84.8715 42.8564,-84.8573 42.8483,-84.8442 42.8388,-84.8309 42.8293,-84.8161 42.8212,-84.7809 42.8114,-84.7451 42.8088,-84.7086 42.808,-84.6717 42.8033,-84.6479 42.8072,-84.5995 42.8125,-84.5504 42.8171,-84.5448 42.8168)
+LINESTRING(-79.8904 42.1509,-79.8934 42.1496,-79.9047 42.1385,-79.9182 42.1311,-79.9331 42.1249,-79.9486 42.1172,-79.9589 42.1104,-79.9675 42.1039,-79.9765 42.0977,-79.9875 42.0919,-80.0134 42.081,-80.0367 42.0715,-80.0597 42.0615,-80.0849 42.049,-80.0955 42.0438,-80.1051 42.0394,-80.1142 42.0353,-80.1234 42.0311)
+LINESTRING(-73.9982 40.7168,-74.0015 40.7203,-74.0085 40.7227)
+LINESTRING(-84.5248 42.816,-84.5211 42.7939,-84.5189 42.7837,-84.5153 42.7725,-84.5103 42.7605,-84.5063 42.7504,-84.5037 42.7401,-84.5032 42.7277)
+LINESTRING(-73.9692 40.8168,-73.984 40.8071,-74.0042 40.7946,-74.0158 40.7892,-74.0305 40.7845,-74.0452 40.7812,-74.057 40.7799,-74.0968 40.7731,-74.1378 40.7599,-74.1771 40.7508,-74.2119 40.7563)
+LINESTRING(-74.0865 40.922,-74.0934 40.9137,-74.1027 40.907,-74.1129 40.9008,-74.1226 40.894,-74.1567 40.8783,-74.1836 40.8382,-74.2022 40.7916,-74.2119 40.7563)
+LINESTRING(-74.4192 40.8642,-74.3982 40.8592,-74.3769 40.8542,-74.3568 40.8478,-74.3391 40.8387,-74.3243 40.8221,-74.3027 40.8089,-74.2777 40.7989,-74.2524 40.7918,-74.2491 40.7801,-74.2392 40.7703,-74.2258 40.7624,-74.2119 40.7563)
+LINESTRING(-73.1759 40.7462,-73.1912 40.756,-73.221 40.7554,-73.2536 40.7504,-73.2772 40.7471,-73.2811 40.7415,-73.2849 40.7359,-73.3131 40.7303,-73.3433 40.7275,-73.3744 40.7243,-73.4049 40.7179,-73.4078 40.7139,-73.4106 40.7099,-73.4304 40.7074,-73.4703 40.7036,-73.5096 40.7003,-73.5279 40.699,-73.5412 40.6951,-73.5565 40.6915,-73.5721 40.69,-73.5857 40.6922,-73.6096 40.6899,-73.6542 40.6881,-73.6996 40.6871,-73.7259 40.6874,-73.7268 40.6812,-73.7307 40.6755,-73.736 40.6701,-73.741 40.665,-73.7812 40.6654,-73.8202 40.6672,-73.8545 40.6608,-73.8723 40.6441)
+LINESTRING(-75.0847 40.9297,-75.0766 40.9255,-75.0588 40.9276,-75.0412 40.9316,-75.0238 40.9346,-75.0067 40.9335,-74.9575 40.9278,-74.8693 40.9207,-74.7818 40.9148,-74.7348 40.913,-74.7238 40.9066,-74.7174 40.8989,-74.7098 40.892,-74.6958 40.8881,-74.6596 40.8986,-74.6015 40.9063,-74.5425 40.9095,-74.5037 40.9068,-74.4886 40.8992,-74.4769 40.8887,-74.4575 40.8766,-74.4192 40.8642)
+LINESTRING(-75.6944 41.0667,-75.622 41.0751,-75.5059 41.0764,-75.3914 41.0709,-75.3241 41.0587,-75.3153 41.047,-75.3095 41.03,-75.2931 41.011,-75.2528 40.9936,-75.2067 40.9885,-75.1716 40.9932,-75.1477 40.9948,-75.1352 40.9809,-75.1176 40.9676,-75.1032 40.949,-75.0901 40.9326,-75.0847 40.9297)
+LINESTRING(-75.7607 41.3009,-75.7638 41.2949,-75.7663 41.283,-75.7679 41.2711,-75.7714 41.2588,-75.775 41.2517,-75.7794 41.2447,-75.784 41.2382,-75.7886 41.2317,-75.7914 41.2267,-75.7934 41.2215,-75.796 41.2167,-75.8007 41.2124,-75.8031 41.2068,-75.8035 41.2044,-75.8009 41.2028,-75.7942 41.1997,-75.7934 41.1903,-75.7891 41.1823,-75.7834 41.1747,-75.7786 41.1664,-75.7773 41.158,-75.7784 41.1486,-75.7798 41.1387,-75.7795 41.1292,-75.7668 41.118,-75.7553 41.1063,-75.7439 41.0946,-75.7318 41.0836,-75.7231 41.0789,-75.7128 41.0758,-75.7027 41.0724,-75.6944 41.0667)
+LINESTRING(-84.5032 42.7277,-84.4986 42.7172,-84.4964 42.7037,-84.4948 42.6897,-84.4921 42.6775)
+LINESTRING(-95.0011 43.6403,-94.9891 43.6415,-94.9692 43.6455,-94.9495 43.6499,-94.93 43.6531,-94.8817 43.6573,-94.8329 43.6603,-94.784 43.6629,-94.7355 43.666,-94.731 43.6665,-94.6735 43.6736,-94.6194 43.6773,-94.5653 43.6782,-94.5079 43.677,-94.4927 43.6773,-94.477 43.6785,-94.4613 43.6794,-94.4459 43.6789,-94.4363 43.6771,-94.4268 43.6745,-94.4173 43.6718,-94.4078 43.67,-94.3847 43.6688,-94.36 43.6696,-94.3351 43.671,-94.3117 43.672,-94.2579 43.6717,-94.2037 43.6699,-94.1496 43.6671,-94.0959 43.6641,-94.0185 43.661,-93.9375 43.6598,-93.8564 43.6604,-93.779 43.6628,-93.7475 43.6646,-93.7054 43.6671,-93.6633 43.6689,-93.6323 43.669,-93.6153 43.6678,-93.598 43.6664,-93.5806 43.6652,-93.5633 43.6645,-93.5463 43.6662,-93.5295 43.6706,-93.5126 43.6755,-93.4956 43.6786,-93.4772 43.6798,-93.4521 43.6815,-93.4277 43.6848,-93.4115 43.6904,-93.3883 43.6901,-93.3652 43.6884,-93.3421 43.6863,-93.3191 43.6844)
+LINESTRING(-73.8723 40.6441,-73.8804 40.6364,-73.8849 40.6296,-73.8874 40.6257)
+LINESTRING(-74.2119 40.7563,-74.2175 40.7433,-74.2266 40.7307,-74.2375 40.7189,-74.2484 40.7079)
+LINESTRING(-74.0085 40.7227,-74.0179 40.7259,-74.0365 40.7292,-74.0512 40.7304,-74.0697 40.7309,-74.0853 40.7304,-74.1004 40.7286,-74.1172 40.7251,-74.1292 40.7214,-74.1391 40.717,-74.1491 40.7127,-74.1611 40.709,-74.188 40.7049,-74.2157 40.7035,-74.238 40.7046,-74.2484 40.7079)
+LINESTRING(-95.5792 43.6386,-95.4369 43.6367,-95.294 43.6362,-95.1511 43.6371,-95.0088 43.6395,-95.0011 43.6403)
+LINESTRING(-122.598 42.006,-122.598 42.0059,-122.602 41.9736,-122.59 41.9422,-122.572 41.9112,-122.556 41.8801,-122.561 41.8716,-122.567 41.8618,-122.572 41.8532,-122.574 41.8483,-122.571 41.839,-122.569 41.8302,-122.568 41.8216,-122.571 41.8125,-122.572 41.8061,-122.573 41.7964,-122.575 41.7868,-122.577 41.7805,-122.6 41.7588,-122.627 41.7394,-122.641 41.7138,-122.625 41.6736,-122.599 41.6653,-122.573 41.6593,-122.548 41.652,-122.525 41.6396,-122.52 41.6233,-122.515 41.6071,-122.509 41.5909,-122.504 41.5747,-122.497 41.5611,-122.489 41.5477,-122.48 41.5344,-122.474 41.5209,-122.473 41.5169,-122.473 41.5123,-122.474 41.5076,-122.473 41.5037,-122.464 41.4852,-122.454 41.4661,-122.442 41.447,-122.431 41.4288,-122.42 41.4263)
+LINESTRING(-83.7183 42.9525,-83.721 42.9427,-83.7226 42.9329,-83.724 42.9232,-83.7261 42.9136,-83.7297 42.9041,-83.7346 42.895,-83.7394 42.8855,-83.7431 42.8753,-83.7437 42.8728,-83.7443 42.8703,-83.7449 42.8678,-83.7455 42.8653,-83.7434 42.8485,-83.7392 42.833,-83.7363 42.8174,-83.7381 42.8001,-83.7485 42.7782,-83.76 42.764,-83.7683 42.7472,-83.7689 42.7171,-83.7668 42.6988,-83.7647 42.6806,-83.7627 42.6624,-83.7606 42.6441,-83.7569 42.6306,-83.75 42.611,-83.7436 42.5926,-83.7412 42.5828,-83.7449 42.5683,-83.7487 42.5538,-83.7526 42.5394,-83.7565 42.5249)
+LINESTRING(-84.4921 42.6775,-84.4513 42.676,-84.411 42.6733,-84.3708 42.6702,-84.3303 42.6672,-84.301 42.6661,-84.2712 42.6659,-84.2415 42.6651,-84.2126 42.6624,-84.1936 42.6588,-84.1761 42.6544,-84.1581 42.6504,-84.1376 42.6479,-84.1167 42.6474,-84.0903 42.6471,-84.0647 42.6462,-84.0461 42.6435,-84.0176 42.6318,-83.9909 42.617,-83.9644 42.6021,-83.9365 42.59,-83.9056 42.5828,-83.8903 42.5834,-83.8683 42.5794,-83.8171 42.5579,-83.8013 42.5507,-83.785 42.5432,-83.7696 42.5347,-83.7565 42.5249)
+LINESTRING(-100.3 43.9101,-100.271 43.9102,-100.24 43.9106,-100.209 43.9104,-100.18 43.9085,-100.172 43.9059,-100.161 43.9008,-100.149 43.8956,-100.141 43.8929,-100.098 43.8899,-100.053 43.8895,-100.006 43.8899,-99.9625 43.8896,-99.9578 43.8896,-99.953 43.8896,-99.9482 43.8898,-99.9435 43.89,-99.923 43.8909,-99.9014 43.8921,-99.8799 43.8928,-99.8597 43.8923,-99.8209 43.8871,-99.7818 43.8784,-99.7427 43.8694,-99.7039 43.8628,-99.6796 43.8619,-99.6542 43.863,-99.6286 43.8637,-99.6043 43.8617,-99.5938 43.8588,-99.5831 43.8546,-99.5725 43.8505,-99.562 43.8477,-99.5494 43.8469,-99.5361 43.8472,-99.5227 43.8476,-99.51 43.8469,-99.4779 43.8379,-99.4482 43.8237,-99.4188 43.8097,-99.3877 43.8008,-99.3813 43.8024,-99.375 43.8039,-99.3686 43.8055,-99.3623 43.807,-99.3347 43.7979,-99.3033 43.781,-99.2728 43.7625,-99.248 43.7481,-99.1945 43.748,-99.1407 43.7483,-99.087 43.748,-99.0339 43.7459,-99.0189 43.7435,-99.0039 43.7395,-98.9885 43.7357,-98.9721 43.7343,-98.9199 43.736,-98.8653 43.7374,-98.811 43.7365,-98.7594 43.7312,-98.7374 43.7259,-98.715 43.7185,-98.6927 43.7114,-98.6708 43.7068,-98.6139 43.7043,-98.5566 43.7063,-98.4992 43.7066,-98.4418 43.6989)
+LINESTRING(-74.0268 40.6161,-74.0312 40.6111)
+LINESTRING(-93.3493 43.5035,-93.3509 43.5228,-93.3532 43.5418,-93.3541 43.561,-93.3516 43.5807,-93.3441 43.5994,-93.3337 43.6175,-93.324 43.6355,-93.319 43.6539,-93.3187 43.6575,-93.319 43.6611,-93.3202 43.6645,-93.3229 43.6676,-93.322 43.6718,-93.321 43.676,-93.32 43.6802,-93.3191 43.6844)
+LINESTRING(-74.021 40.6058,-74.0312 40.6111)
+LINESTRING(-74.047 40.6089,-74.0312 40.6111)
+LINESTRING(-96.8027 43.6348,-96.8095 43.6868,-96.8152 43.7407,-96.817 43.7946,-96.8122 43.8469,-96.8077 43.8596,-96.801 43.871,-96.7949 43.883,-96.7923 43.8978,-96.7918 44.007,-96.7905 44.1124,-96.7893 44.2179,-96.7888 44.327)
+LINESTRING(-95.5792 43.6386,-95.6824 43.6405,-95.9 43.6419,-96.1226 43.6412,-96.2408 43.6379,-96.2991 43.6284,-96.3368 43.6243,-96.3784 43.6235,-96.4485 43.6241,-96.4536 43.6241)
+LINESTRING(-96.4536 43.6241,-96.5335 43.6241,-96.6266 43.6242,-96.7192 43.627,-96.8027 43.6348)
+LINESTRING(-75.6944 41.0667,-75.7249 41.0605,-75.7734 41.0561,-75.8224 41.0541,-75.855 41.0548,-75.87 41.0575,-75.8822 41.0604,-75.8952 41.062,-75.9127 41.061,-75.9367 41.0576,-75.9607 41.0541,-75.9847 41.0506,-76.0087 41.0472,-76.0115 41.0462,-76.0142 41.045)
+LINESTRING(-75.7607 41.3009,-75.782 41.2933,-75.8051 41.2827,-75.8218 41.2712,-75.8249 41.2666,-75.8271 41.2617,-75.8298 41.2569,-75.8344 41.2528,-75.8454 41.2477,-75.8583 41.2431,-75.8707 41.2385,-75.8801 41.2334,-75.9005 41.2183,-75.9257 41.2003,-75.9487 41.1835,-75.9626 41.1723,-75.9679 41.154,-75.9659 41.1274,-75.9626 41.1006,-75.9641 41.082,-75.9727 41.0763,-75.9893 41.0678,-76.0057 41.0571,-76.0142 41.045)
+LINESTRING(-98.4418 43.6989,-98.2966 43.6976,-98.1514 43.6961,-98.0062 43.6945,-97.8609 43.6926,-97.8466 43.688,-97.8257 43.6781,-97.8035 43.6682,-97.7855 43.6638,-97.6208 43.6652,-97.456 43.6654,-97.2912 43.6656,-97.1265 43.6668,-97.0663 43.6345,-96.9797 43.6271,-96.8857 43.6315,-96.8027 43.6348)
+LINESTRING(-88.1873 43.2789,-88.1684 43.2396,-88.1487 43.2177,-88.1192 43.2003,-88.0712 43.1749,-88.0662 43.1714,-88.0615 43.1676,-88.0563 43.1641,-88.0501 43.1619,-88.0456 43.1393,-88.0415 43.0949,-88.0395 43.0506,-88.0417 43.0281)
+LINESTRING(-82.4874 42.9738,-82.4887 42.9688,-82.4901 42.9639,-82.4915 42.9589,-82.4929 42.9539,-82.5006 42.9501,-82.5084 42.9462,-82.5078 42.9351,-82.5072 42.9241,-82.5072 42.909,-82.5091 42.9007,-82.5572 42.861,-82.6052 42.8211,-82.6556 42.7832,-82.7109 42.7493,-82.7586 42.7291,-82.8097 42.7094,-82.8536 42.6834,-82.8794 42.6448,-82.8806 42.6343,-82.8796 42.6235,-82.8786 42.6129,-82.8797 42.6034,-82.8842 42.5997,-82.8908 42.5961,-82.8932 42.5928,-82.8848 42.5903,-82.9107 42.5603,-82.9261 42.5228,-82.9324 42.4831,-82.9311 42.4464,-82.9446 42.4235,-82.981 42.4023,-83.0246 42.3837,-83.0596 42.3688)
+LINESTRING(-83.7183 42.9525,-83.6929 42.9342,-83.6792 42.9219,-83.6615 42.9094,-83.6244 42.8904,-83.6011 42.8727,-83.5888 42.8509,-83.5788 42.8277,-83.5623 42.8058,-83.5442 42.7885,-83.5246 42.7699,-83.5027 42.7531,-83.4776 42.7411,-83.461 42.7443,-83.441 42.7471,-83.421 42.7484,-83.4043 42.7471,-83.3824 42.7384,-83.3616 42.7249,-83.3409 42.7115,-83.3195 42.7032,-83.3016 42.7024,-83.2864 42.7041,-83.2707 42.703,-83.2513 42.6938,-83.2408 42.6577,-83.2401 42.6306,-83.2251 42.612,-83.1715 42.6013,-83.1611 42.5891,-83.159 42.5803,-83.1588 42.5718,-83.1542 42.5604,-83.1472 42.5584,-83.14 42.5575,-83.1325 42.5571,-83.1251 42.5565,-83.1173 42.5423,-83.1171 42.5159,-83.1134 42.4828,-83.0955 42.4484,-83.0901 42.4316,-83.0803 42.4089,-83.0691 42.3861,-83.0596 42.3688)
+LINESTRING(-83.7565 42.5249,-83.7427 42.5245,-83.7289 42.5241,-83.7151 42.5237,-83.7012 42.5233,-83.6909 42.5218,-83.6801 42.5189,-83.6696 42.5162,-83.6599 42.5151,-83.6501 42.5194,-83.6404 42.5215,-83.6302 42.5216,-83.6192 42.5197,-83.5868 42.5116,-83.5541 42.5032,-83.5214 42.4952,-83.4886 42.4881,-83.4529 42.4836,-83.4302 42.4857,-83.4101 42.4909,-83.3825 42.4956,-83.3584 42.4955,-83.3198 42.4933,-83.2824 42.4896,-83.2617 42.4849,-83.251 42.4774,-83.2403 42.4698,-83.2296 42.4623,-83.2189 42.4547,-83.2075 42.4453,-83.197 42.4349,-83.1865 42.4246,-83.1748 42.4154,-83.1466 42.3983,-83.126 42.3893,-83.101 42.3818,-83.0596 42.3688)
+LINESTRING(-82.9946 42.3364,-83.0596 42.3688)
+LINESTRING(-80.1234 42.0311,-80.141 42.0234,-80.1612 42.0171,-80.1816 42.0117,-80.1998 42.0066,-80.2443 41.9897,-80.283 41.9716,-80.3209 41.9542,-80.3628 41.9395,-80.3838 41.9341,-80.4046 41.9301,-80.4257 41.9277,-80.4475 41.9269,-80.4588 41.9272,-80.4712 41.9277,-80.4836 41.9277,-80.4944 41.9267,-80.5191 41.9124)
+LINESTRING(-87.7752 44.1353,-87.7756 44.1105,-87.7738 44.0844,-87.7696 44.062,-87.7627 44.0481,-87.7702 44.0209,-87.7869 43.9874,-87.8055 43.9531,-87.8185 43.9235,-87.8221 43.9079,-87.8259 43.8848,-87.8284 43.862,-87.828 43.8471,-87.8253 43.8399,-87.8216 43.8327,-87.8178 43.8255,-87.8148 43.8183,-87.8126 43.796,-87.8118 43.7582,-87.8121 43.7203,-87.8133 43.698,-87.8293 43.6411,-87.8528 43.5851,-87.8743 43.5293,-87.8844 43.4729,-87.8864 43.4615,-87.8921 43.4485,-87.9021 43.4375,-87.9169 43.4321,-87.9323 43.431,-87.9476 43.4302,-87.963 43.429,-87.9782 43.4273,-87.9768 43.4123,-87.9743 43.3972,-87.9721 43.3821,-87.9713 43.3672,-87.972 43.3354,-87.9727 43.3037,-87.9734 43.272,-87.9741 43.2402,-87.9697 43.2155,-87.9592 43.1898,-87.9488 43.1636,-87.9444 43.1377,-87.9436 43.1137,-87.9411 43.0895,-87.938 43.0649,-87.9355 43.0401,-87.935 43.0363,-87.9343 43.033,-87.9337 43.0297,-87.9334 43.026,-87.9338 43.0148,-87.9347 43.0051,-87.9354 42.9954,-87.9348 42.9844,-87.9338 42.9794,-87.9323 42.9751,-87.9311 42.9708,-87.9307 42.9659)
+LINESTRING(-89.2847 43.0992,-89.2458 43.1061,-89.1835 43.1092,-89.1194 43.1103,-89.0753 43.1106,-89.0438 43.1115,-89.0108 43.1125,-88.978 43.1116,-88.9473 43.1069,-88.93 43.1016,-88.9123 43.0952,-88.8945 43.0894,-88.8772 43.0857,-88.8229 43.0835,-88.7623 43.086,-88.7005 43.0894,-88.6426 43.0898,-88.6119 43.0851,-88.5876 43.0766,-88.5638 43.0676,-88.5344 43.0618,-88.5159 43.0616,-88.4972 43.0632,-88.4785 43.0649,-88.4602 43.0647,-88.4519 43.0631,-88.4449 43.0605,-88.4383 43.0576,-88.4311 43.0551,-88.4084 43.0507,-88.3817 43.048,-88.3546 43.0466,-88.3309 43.046,-88.3039 43.047,-88.2755 43.0495,-88.2475 43.0515,-88.2217 43.0509,-88.1794 43.0415,-88.1422 43.0291,-88.0998 43.0219,-88.0417 43.0281)
+LINESTRING(-89.4906 43.4584,-89.4837 43.4436,-89.4761 43.429,-89.469 43.4143,-89.4635 43.3992,-89.4605 43.3819,-89.4589 43.3618,-89.4571 43.3424,-89.4535 43.3273,-89.4423 43.3117,-89.4241 43.2938,-89.4044 43.276,-89.3887 43.2609,-89.379 43.248,-89.3707 43.2341,-89.3629 43.2198,-89.3543 43.2063,-89.3447 43.1947,-89.3338 43.1834,-89.3228 43.1719,-89.3129 43.1598,-89.3042 43.1452,-89.2976 43.13,-89.2917 43.1147,-89.2847 43.0992)
+LINESTRING(-88.0378 42.972,-88.0367 42.9797,-88.0368 42.9862,-88.0379 42.9926,-88.0397 43.0003,-88.0398 43.0021,-88.0392 43.0054,-88.0394 43.0071,-88.0405 43.0096,-88.0418 43.0119,-88.0427 43.0142,-88.0427 43.0168,-88.0427 43.0195,-88.0441 43.0233,-88.0417 43.0281)
+LINESTRING(-87.9307 42.9659,-87.9472 42.9657,-87.9612 42.9651,-87.9752 42.9651,-87.9914 42.9662,-88.0016 42.9678,-88.0105 42.9698,-88.0194 42.9718,-88.0297 42.9734,-88.0319 42.9734,-88.0339 42.973,-88.0358 42.9725,-88.0378 42.972)
+LINESTRING(-112.401 43.2217,-112.41 43.183,-112.422 43.1449,-112.43 43.1074,-112.428 43.0646,-112.427 43.0498,-112.429 43.0302,-112.43 43.0132,-112.431 43.0059,-112.432 42.9819,-112.432 42.9579,-112.433 42.9339,-112.434 42.9099)
+LINESTRING(-114.442 42.6609,-114.473 42.6804,-114.509 42.7039,-114.547 42.7243,-114.591 42.7387,-114.661 42.7573,-114.721 42.7798,-114.77 42.8081,-114.812 42.8437,-114.845 42.8839,-114.874 42.919,-114.912 42.9452,-114.973 42.9585,-115.054 42.9592,-115.131 42.9536,-115.209 42.9484,-115.29 42.9504,-115.337 42.958,-115.382 42.9706,-115.424 42.9875,-115.463 43.0078,-115.508 43.0395,-115.538 43.0733,-115.567 43.1107,-115.608 43.1533,-115.628 43.1686)
+LINESTRING(-74.6491 40.6414,-74.6315 40.6408,-74.6125 40.6425,-74.5935 40.6449,-74.5758 40.6464,-74.5462 40.6467,-74.5161 40.6467,-74.4862 40.6479,-74.457 40.6519,-74.4054 40.6713,-74.3601 40.6963,-74.3111 40.7131,-74.2484 40.7079)
+LINESTRING(-74.4192 40.8642,-74.4484 40.8139,-74.4814 40.7821,-74.5097 40.7634,-74.5249 40.7521,-74.5333 40.7398,-74.547 40.7209,-74.5608 40.7028,-74.5698 40.6932,-74.586 40.6853,-74.6041 40.679,-74.6217 40.6728,-74.6362 40.6653,-74.6419 40.6604,-74.6465 40.6546,-74.6492 40.6481,-74.6491 40.6414)
+LINESTRING(-124.094 40.9198,-124.092 40.9291,-124.089 40.9384,-124.087 40.9477,-124.085 40.957,-124.084 40.9643,-124.082 40.9716,-124.081 40.9789,-124.08 40.9863,-124.077 40.9942,-124.075 41.0021,-124.072 41.01,-124.069 41.018,-124.07 41.0256,-124.072 41.0332,-124.073 41.0408,-124.074 41.0485,-124.077 41.0534,-124.08 41.0584,-124.083 41.0634,-124.085 41.0684,-124.089 41.0711,-124.093 41.0737,-124.097 41.0764,-124.101 41.0791,-124.104 41.0812,-124.108 41.0834,-124.111 41.0855,-124.114 41.0877,-124.116 41.0911,-124.117 41.0946,-124.118 41.098,-124.12 41.1015,-124.119 41.1056,-124.119 41.1097,-124.118 41.1138,-124.117 41.1179,-124.113 41.1218,-124.108 41.1257,-124.104 41.1296,-124.1 41.1335,-124.094 41.1373,-124.088 41.141,-124.083 41.1448,-124.077 41.1486,-124.078 41.154,-124.079 41.1595,-124.079 41.1649,-124.08 41.1704,-124.081 41.1767,-124.081 41.1831,-124.082 41.1894,-124.082 41.1958,-124.079 41.2005,-124.076 41.2053,-124.072 41.2101,-124.069 41.2149)
+LINESTRING(-83.0596 42.3688,-83.0729 42.3649,-83.083 42.3596,-83.0863 42.3495,-83.0979 42.3434,-83.1104 42.3388,-83.1219 42.3351,-83.1324 42.3307,-83.1419 42.324,-83.1495 42.3151,-83.155 42.3061,-83.161 42.2976,-83.1706 42.2901)
+LINESTRING(-74.3047 40.5207,-74.2844 40.5221,-74.2641 40.5236,-74.2488 40.5247)
+LINESTRING(-74.3047 40.5207,-74.3256 40.5656,-74.3297 40.5853,-74.3178 40.6039,-74.2905 40.6454,-74.2818 40.6649,-74.2774 40.6789,-74.269 40.6918,-74.2484 40.7079)
+LINESTRING(-74.3452 40.5271,-74.3351 40.5255,-74.325 40.5239,-74.3149 40.5223,-74.3047 40.5207)
+LINESTRING(-74.3047 40.5207,-74.3039 40.513,-74.3049 40.5062,-74.3054 40.504)
+LINESTRING(-89.2847 43.0992,-89.2893 43.0988,-89.303 43.0989,-89.3163 43.0972,-89.329 43.0922,-89.3379 43.0813,-89.338 43.0684,-89.3372 43.0549,-89.3436 43.0423,-89.3682 43.0318,-89.3984 43.0319,-89.4287 43.0345,-89.4508 43.0316)
+LINESTRING(-74.3452 40.5271,-74.3675 40.5306,-74.4 40.5403,-74.4367 40.5509,-74.4716 40.5571,-74.4846 40.5536,-74.4981 40.5457,-74.5138 40.5397,-74.5333 40.5421,-74.5549 40.5612,-74.558 40.5716,-74.5681 40.5786,-74.6108 40.587,-74.6225 40.5965,-74.6345 40.6119,-74.6443 40.6284,-74.6491 40.6414)
+LINESTRING(-80.5191 41.9124,-80.5359 41.9028,-80.568 41.8905,-80.5971 41.8812,-80.6299 41.866,-80.6578 41.8508,-80.6868 41.8382,-80.7193 41.8289,-80.7581 41.8236)
+LINESTRING(-74.3054 40.504,-74.3065 40.4996,-74.3078 40.4926,-74.3041 40.4752,-74.2919 40.4649,-74.2918 40.4648)
+LINESTRING(-77.0787 41.298,-77.0674 41.2774,-77.0605 41.2697,-77.0497 41.2651,-77.0341 41.264,-77.0201 41.2667,-77.0061 41.271,-76.9906 41.2748,-76.9641 41.2795,-76.9397 41.2827,-76.9153 41.2831,-76.8884 41.2794,-76.8281 41.2663,-76.7978 41.2547,-76.7764 41.2361,-76.7659 41.213,-76.7683 41.1881,-76.7782 41.1717,-76.8043 41.1455,-76.8141 41.1291,-76.822 41.109,-76.829 41.0913,-76.8354 41.0735,-76.8409 41.051)
+LINESTRING(-75.2104 40.6668,-75.1983 40.6721,-75.1867 40.6723,-75.1788 40.6686,-75.1718 40.6643,-75.1629 40.6629,-75.1561 40.6653,-75.1497 40.6673,-75.1429 40.6687,-75.1351 40.6694,-75.1202 40.6605,-75.0972 40.6582,-75.073 40.6597,-75.0544 40.662,-75.0404 40.6582,-75.0143 40.6487,-74.9875 40.6387,-74.9712 40.6329,-74.954 40.6339,-74.9376 40.633,-74.9217 40.632,-74.9058 40.6327,-74.8702 40.6401,-74.8509 40.647,-74.822 40.651,-74.7575 40.6498,-74.7304 40.6477,-74.7036 40.6447,-74.6766 40.6423,-74.6491 40.6414)
+LINESTRING(-83.7565 42.5249,-83.7575 42.5218,-83.7585 42.5186,-83.7594 42.5155,-83.7604 42.5123,-83.7613 42.5091,-83.7623 42.5059,-83.762 42.5026,-83.7617 42.4993,-83.7601 42.4863,-83.7579 42.4732,-83.756 42.46,-83.7553 42.4472,-83.7567 42.4352,-83.7596 42.4239,-83.7622 42.4123,-83.7627 42.4001,-83.7582 42.3787,-83.7507 42.3573,-83.7438 42.3358,-83.7413 42.3142,-83.7413 42.3098,-83.7419 42.3058,-83.7441 42.3025,-83.7493 42.2998,-83.7567 42.3016,-83.764 42.3037,-83.7711 42.306,-83.7781 42.3086,-83.7798 42.3084,-83.7815 42.3082,-83.7833 42.308,-83.785 42.3078,-83.7912 42.3031,-83.7967 42.2983,-83.8019 42.2933,-83.8068 42.2878)
+LINESTRING(-76.0142 41.045,-76.0489 41.0373,-76.0843 41.0266,-76.1177 41.0162,-76.1465 41.0092,-76.1569 41.0097,-76.1696 41.0126,-76.183 41.0159,-76.1957 41.0175,-76.21 41.016,-76.2213 41.0123,-76.2313 41.0083,-76.2422 41.0057,-76.2628 41.0078,-76.2897 41.0152,-76.316 41.0248,-76.3343 41.0338,-76.3537 41.0385,-76.3776 41.0357,-76.4023 41.03,-76.4239 41.026,-76.4288 41.0264,-76.451 41.0268,-76.4657 41.0241,-76.4789 41.0199,-76.4966 41.0157,-76.5151 41.0132,-76.5337 41.0118,-76.5524 41.0107,-76.5709 41.0094,-76.5876 41.0072,-76.6045 41.0039,-76.6214 41.0003,-76.638 40.9972,-76.6846 40.9906,-76.7198 40.99,-76.7517 40.9986,-76.7882 41.0194,-76.7993 41.0295,-76.8081 41.0394,-76.8201 41.0472,-76.8409 41.051)
+LINESTRING(-83.6852 42.227,-83.6769 42.2267,-83.6688 42.226,-83.6606 42.2253,-83.6525 42.2245,-83.6372 42.2254,-83.6215 42.2285,-83.6059 42.2318,-83.5908 42.2331,-83.5842 42.2325,-83.5777 42.2312,-83.5714 42.2296,-83.5649 42.2285,-83.5213 42.2248,-83.4721 42.2244,-83.4231 42.2272,-83.38 42.2337,-83.3549 42.2409,-83.3308 42.25,-83.3069 42.2588,-83.2824 42.2654,-83.2651 42.2667,-83.2468 42.2661,-83.229 42.2665,-83.2134 42.2705,-83.2018 42.2749,-83.19 42.2786,-83.1791 42.2832,-83.1706 42.2901)
+LINESTRING(-83.8068 42.2878,-83.8041 42.2784,-83.8013 42.269,-83.7985 42.2596,-83.7958 42.2502,-83.7876 42.246,-83.7739 42.2422,-83.7597 42.2389,-83.75 42.2357,-83.7343 42.2352,-83.7163 42.2343,-83.699 42.2319,-83.6852 42.227)
+LINESTRING(-84.4342 42.277,-84.4068 42.2771,-84.3793 42.2771,-84.3519 42.2771,-84.3245 42.2771,-84.3041 42.2793,-84.2831 42.284,-84.2618 42.2892,-84.2402 42.2924,-84.2306 42.2924,-84.2212 42.2915,-84.212 42.2906,-84.2031 42.2904,-84.1795 42.2929,-84.1556 42.2962,-84.1317 42.2986,-84.1079 42.2983,-84.0996 42.297,-84.0909 42.2954,-84.0823 42.2939,-84.074 42.2931,-84.0624 42.2934,-84.0505 42.2946,-84.0384 42.2961,-84.0267 42.2972,-83.9913 42.2985,-83.9422 42.2997,-83.8945 42.3003,-83.8635 42.2999,-83.8524 42.298,-83.8371 42.2944,-83.8208 42.2905,-83.8068 42.2878)
+LINESTRING(-84.4921 42.6775,-84.4895 42.6754,-84.4869 42.6733,-84.4844 42.6712,-84.4818 42.6691,-84.4788 42.6555,-84.4779 42.6419,-84.4773 42.6282,-84.4753 42.6145,-84.4698 42.5987,-84.4625 42.5834,-84.455 42.5683,-84.4491 42.5527,-84.4452 42.5258,-84.4449 42.4921,-84.4467 42.4585,-84.4489 42.4318,-84.4457 42.4297,-84.4425 42.4276,-84.4393 42.4255,-84.4361 42.4234,-84.4303 42.3962,-84.4306 42.3533,-84.4333 42.3089,-84.4342 42.277)
+LINESTRING(-112.434 42.9099,-112.457 42.9131,-112.475 42.9127,-112.492 42.9119,-112.509 42.9109,-112.564 42.8995,-112.61 42.8882,-112.659 42.867,-112.724 42.8258,-112.729 42.8212,-112.74 42.8153,-112.751 42.8094,-112.756 42.8047,-112.763 42.799,-112.772 42.7939,-112.781 42.789,-112.789 42.7838,-112.807 42.7701,-112.826 42.7554,-112.861 42.7261,-112.899 42.695,-112.944 42.659,-112.992 42.6256,-113.038 42.6023,-113.125 42.585,-113.265 42.5669,-113.405 42.5518,-113.492 42.5377)
+LINESTRING(-113.492 42.5377,-113.555 42.5452,-113.654 42.562,-113.751 42.5795,-113.805 42.5892,-113.816 42.5895,-113.836 42.5896,-113.851 42.5896,-113.866 42.5896,-113.918 42.5878,-113.967 42.5838,-114.016 42.5797,-114.069 42.5775,-114.122 42.581,-114.172 42.5896,-114.222 42.5992,-114.275 42.6055,-114.316 42.6218,-114.349 42.6325,-114.385 42.6425,-114.436 42.6568,-114.442 42.6609)
+LINESTRING(-84.5032 42.7277,-84.544 42.7298,-84.5861 42.7284,-84.6283 42.7259,-84.6692 42.7251,-84.6693 42.7178,-84.6693 42.7105,-84.6693 42.7033,-84.6694 42.696,-84.6711 42.6862,-84.6752 42.6798,-84.6805 42.6741,-84.6858 42.6662,-84.7069 42.6353,-84.7363 42.6107,-84.7733 42.5917,-84.817 42.578,-84.8208 42.5753,-84.8197 42.5439,-84.8237 42.5257,-84.8371 42.5111,-84.8647 42.4904,-84.8732 42.4837,-84.8821 42.4764,-84.8913 42.4694,-84.9006 42.4636,-84.9125 42.4611,-84.9208 42.4644,-84.9288 42.4659,-84.9398 42.4581,-84.9474 42.4459,-84.9473 42.4365,-84.9441 42.4277,-84.9426 42.4177,-84.9456 42.4077,-84.9514 42.3977,-84.9576 42.3878,-84.9615 42.3779,-84.9641 42.3621,-84.966 42.3462,-84.9678 42.3303,-84.9704 42.3144)
+LINESTRING(-75.6944 41.0667,-75.6846 41.0583,-75.6748 41.0499,-75.6649 41.0415,-75.6551 41.033,-75.6385 41.013,-75.631 40.9909,-75.6307 40.9679,-75.6361 40.9452,-75.6394 40.9382,-75.644 40.9313,-75.6483 40.9244,-75.6512 40.9177,-75.6517 40.9095,-75.6506 40.9018,-75.6502 40.8943,-75.6528 40.8869,-75.6608 40.8737,-75.6632 40.8652,-75.6628 40.8564,-75.6619 40.8421,-75.677 40.8216,-75.6768 40.8033,-75.6661 40.7845,-75.65 40.7625,-75.6437 40.7521,-75.6389 40.7417,-75.6345 40.7313,-75.6292 40.7209,-75.6221 40.712,-75.6134 40.7041,-75.6049 40.6957,-75.598 40.6855,-75.5877 40.6607,-75.5773 40.6325,-75.5671 40.6044,-75.5573 40.5797)
+LINESTRING(-84.9704 42.3144,-84.9449 42.3108,-84.9235 42.305,-84.9019 42.2997,-84.876 42.2974,-84.8588 42.2972,-84.8406 42.2963,-84.8226 42.2951,-84.8057 42.2938,-84.7835 42.2881,-84.766 42.2789,-84.7434 42.2707,-84.7061 42.2679,-84.648 42.2697,-84.59 42.2715,-84.532 42.2732,-84.474 42.2749,-84.4639 42.275,-84.454 42.275,-84.4442 42.2755,-84.4342 42.277)
+LINESTRING(-75.5573 40.5797,-75.555 40.5765)
+LINESTRING(-75.5573 40.5797,-75.5517 40.5775,-75.5455 40.5739,-75.5389 40.5702,-75.5316 40.5675,-75.5094 40.5641,-75.4858 40.5625,-75.4617 40.561,-75.4381 40.5578,-75.4273 40.5585,-75.415 40.5626,-75.4025 40.5677,-75.3911 40.5711,-75.3758 40.5842,-75.3556 40.5911,-75.3342 40.596,-75.3156 40.603,-75.2908 40.619,-75.2571 40.6408,-75.2234 40.661,-75.2104 40.6668)
+LINESTRING(-112.201 42.6298,-112.209 42.6546,-112.217 42.6874,-112.225 42.7202,-112.229 42.7453,-112.23 42.7623,-112.229 42.7735,-112.232 42.784,-112.246 42.7988,-112.288 42.8047,-112.339 42.8068,-112.385 42.8157,-112.412 42.842,-112.418 42.8591,-112.423 42.8761,-112.429 42.893,-112.434 42.9099)
+LINESTRING(-74.2918 40.4648,-74.2769 40.4554,-74.2651 40.4403,-74.204 40.4073,-74.1419 40.3671,-74.0952 40.3193,-74.0801 40.2634,-74.0863 40.2407,-74.0959 40.2196,-74.103 40.1971,-74.1017 40.1701)
+LINESTRING(-76.8409 41.051,-76.851 41.052,-76.8612 41.0526,-76.8715 41.053,-76.8817 41.0535,-76.8911 41.0592,-76.9005 41.0649,-76.9099 41.0706,-76.9193 41.0764,-76.9468 41.0804,-76.9908 41.0777,-77.0365 41.0721,-77.0686 41.0674,-77.0809 41.0615,-77.1003 41.0507,-77.1214 41.0423,-77.1388 41.0436,-77.1545 41.0509,-77.181 41.0577,-77.2079 41.0625,-77.2246 41.0638,-77.2438 41.0615,-77.263 41.0593,-77.2822 41.0571,-77.3014 41.0548,-77.3097 41.0541,-77.3181 41.0535,-77.3266 41.0529,-77.335 41.0522,-77.3418 41.0526,-77.3485 41.0547,-77.3548 41.0577,-77.3605 41.0604,-77.3674 41.0615,-77.3763 41.0612,-77.3855 41.0606,-77.3934 41.0608,-77.3985 41.0626,-77.4025 41.0653,-77.4064 41.0683,-77.4111 41.0707,-77.4219 41.0698,-77.4336 41.0631,-77.4448 41.0543,-77.4538 41.0473,-77.4811 41.0385,-77.5133 41.0325,-77.546 41.0262,-77.575 41.0169,-77.5928 41.0063,-77.6095 40.9931,-77.6258 40.9795,-77.6424 40.9673,-77.6611 40.9638,-77.6786 40.9578,-77.6958 40.9509,-77.7136 40.945,-77.7289 40.9483,-77.7435 40.9519,-77.7582 40.9546,-77.7738 40.9549)
+LINESTRING(-85.6376 42.2366,-85.6218 42.237,-85.606 42.2375,-85.5902 42.238,-85.5743 42.2384,-85.5313 42.2409,-85.5022 42.2422,-85.4737 42.244,-85.4322 42.2483,-85.4119 42.2525,-85.3939 42.2584,-85.3755 42.2631,-85.3546 42.264,-85.3173 42.2623,-85.2795 42.2628,-85.2415 42.2645,-85.2033 42.2666,-85.1748 42.2715,-85.1461 42.2809,-85.117 42.2905,-85.0874 42.2963,-85.0584 42.3001,-85.0201 42.3064,-84.9862 42.3121,-84.9704 42.3144)
+LINESTRING(-85.6785 42.9709,-85.6785 42.9584,-85.6809 42.9471,-85.6838 42.9359,-85.6853 42.9241,-85.6854 42.9068,-85.6852 42.8888,-85.6844 42.8709,-85.683 42.8536,-85.6797 42.836,-85.6751 42.8173,-85.6715 42.7987,-85.6714 42.7812,-85.674 42.7688,-85.6772 42.7559,-85.6792 42.7429,-85.6782 42.7304,-85.6762 42.7256,-85.6731 42.7208,-85.67 42.716,-85.6678 42.7112,-85.6624 42.6735,-85.6614 42.6283,-85.6625 42.5821,-85.663 42.5416,-85.6627 42.5394,-85.6625 42.5371,-85.6575 42.4983,-85.6596 42.4732,-85.6636 42.4514,-85.6645 42.4226,-85.6628 42.4111,-85.6602 42.3996,-85.6576 42.388,-85.6563 42.3766,-85.6584 42.3562,-85.6633 42.3362,-85.6671 42.316,-85.666 42.2954,-85.6607 42.2798,-85.6534 42.2654,-85.6453 42.2513,-85.6376 42.2366)
+LINESTRING(-74.3452 40.5271,-74.4324 40.4431,-74.4661 40.3633,-74.5045 40.2817,-74.6054 40.1925)
+LINESTRING(-74.1017 40.1701,-74.1494 40.1709,-74.2354 40.1637,-74.3298 40.1571,-74.4026 40.1598,-74.4059 40.1589,-74.4092 40.158,-74.4125 40.1571,-74.4158 40.1562,-74.4383 40.1624,-74.4648 40.1729,-74.4967 40.1797,-74.5356 40.1744,-74.5532 40.1774,-74.5714 40.1813,-74.5892 40.1863,-74.6054 40.1925)
+LINESTRING(-78.4271 41.0497,-78.4144 41.0435,-78.4025 41.0406,-78.3899 41.0385,-78.3788 41.0349,-78.3716 41.0271,-78.3467 41.0196,-78.319 41.0191,-78.2917 41.0148,-78.2677 40.9964,-78.2597 40.9933,-78.2468 40.9936,-78.2325 40.995,-78.2208 40.9949,-78.2133 40.993,-78.2061 40.9906,-78.1988 40.9881,-78.1915 40.986,-78.1763 40.9838,-78.1607 40.9833,-78.1445 40.9825,-78.1275 40.9795,-78.1217 40.976,-78.1167 40.9707,-78.1116 40.9654,-78.1055 40.9624,-78.0998 40.9628,-78.0925 40.9649,-78.0853 40.9676,-78.08 40.9697,-78.0652 40.9735,-78.0529 40.9752,-78.0416 40.9788,-78.0302 40.9881,-78.0063 40.9936,-77.9903 40.9978,-77.9776 41.005,-77.9635 41.0192,-77.9584 41.0214,-77.9015 41.0201,-77.8729 41.0109,-77.858 41.0003,-77.844 40.9942,-77.8191 40.9899,-77.8008 40.9827,-77.7866 40.9714,-77.7738 40.9549)
+LINESTRING(-87.9435 42.497,-87.9525 42.5393,-87.9561 42.6065,-87.9551 42.6745,-87.9524 42.7306,-87.9525 42.7562,-87.9538 42.7824,-87.9543 42.8086,-87.952 42.8338,-87.9486 42.8421,-87.9429 42.8504,-87.9373 42.8587,-87.9344 42.8672,-87.9332 42.8921,-87.9335 42.9166,-87.9333 42.9412,-87.9307 42.9659)
+LINESTRING(-88.0378 42.972,-88.053 42.9662,-88.0671 42.9646,-88.0827 42.9647,-88.1025 42.9637,-88.1536 42.9357,-88.2102 42.9116,-88.2668 42.8872,-88.3185 42.8581,-88.3333 42.8472,-88.3491 42.8344,-88.3638 42.8209,-88.3755 42.8081,-88.3827 42.7923,-88.385 42.7792,-88.3945 42.7685,-88.4232 42.7599,-88.444 42.7365,-88.4681 42.7137,-88.4932 42.6913,-88.5168 42.6688,-88.5411 42.6525,-88.5778 42.6361,-88.6167 42.6233,-88.6478 42.6179,-88.6602 42.6186,-88.6738 42.6204,-88.6872 42.6216,-88.6988 42.621,-88.7087 42.6174,-88.7174 42.6122,-88.726 42.6067,-88.7358 42.6025,-88.7747 42.5937,-88.8143 42.5869,-88.853 42.5795,-88.8893 42.5684,-88.9099 42.56,-88.9306 42.5517,-88.9512 42.5434,-88.9718 42.5351)
+LINESTRING(-89.2847 43.0992,-89.2578 43.0262,-89.2081 42.999,-89.1551 42.9933,-89.118 42.9843,-89.1065 42.9719,-89.0981 42.9576,-89.0916 42.9427,-89.0858 42.9283,-89.0765 42.9094,-89.0666 42.8938,-89.0556 42.8788,-89.043 42.8617,-89.0284 42.8363,-89.0172 42.8081,-89.0088 42.7795,-89.0026 42.7529,-88.9963 42.7351,-88.9891 42.724,-88.983 42.7096,-88.98 42.6824,-88.9816 42.647,-88.9844 42.6078,-88.9829 42.569,-88.9718 42.5351)
+LINESTRING(-85.6376 42.2366,-85.6401 42.2147,-85.6429 42.1927,-85.6463 42.1708,-85.6504 42.1493)
+LINESTRING(-88.9718 42.5351,-88.9862 42.4991,-88.9862 42.4988)
+LINESTRING(-74.7333 40.0957,-74.702 40.121,-74.673 40.1465,-74.6423 40.1708,-74.6054 40.1925)
+LINESTRING(-74.8261 40.1154,-74.8122 40.1108,-74.789 40.103,-74.7647 40.0976,-74.7333 40.0957)
+LINESTRING(-106.336 42.8475,-106.337 42.8514,-106.339 42.8568,-106.341 42.8622,-106.342 42.8661,-106.34 42.902,-106.336 42.9381,-106.332 42.9742,-106.332 43.0103,-106.337 43.0679,-106.338 43.116,-106.332 43.1638,-106.313 43.2202,-106.313 43.2234,-106.314 43.2266,-106.314 43.2297,-106.314 43.2329,-106.34 43.2848,-106.364 43.3401,-106.381 43.3965,-106.387 43.4518,-106.39 43.4528,-106.394 43.4537,-106.403 43.4677,-106.414 43.4747,-106.427 43.4794,-106.442 43.4866,-106.451 43.4986,-106.465 43.5217,-106.48 43.5466,-106.494 43.5641,-106.506 43.5754,-106.52 43.586,-106.533 43.5964,-106.546 43.6071,-106.55 43.6107,-106.554 43.6158,-106.559 43.6207,-106.562 43.6236,-106.584 43.6345,-106.606 43.644,-106.626 43.6548,-106.644 43.67,-106.645 43.6796,-106.646 43.6946,-106.644 43.7087,-106.64 43.716,-106.633 43.7406,-106.626 43.7653,-106.62 43.7899,-106.613 43.8145,-106.618 43.8467,-106.629 43.882,-106.641 43.9198,-106.649 43.9593,-106.648 44.0011,-106.642 44.0425,-106.636 44.084,-106.636 44.1259,-106.643 44.1498,-106.657 44.177,-106.672 44.205,-106.682 44.2317,-106.683 44.2559,-106.684 44.2948,-106.685 44.3372,-106.687 44.3721)
+LINESTRING(-86.3219 42.1628,-86.3157 42.1694,-86.3057 42.1762,-86.2915 42.1771,-86.277 42.1773,-86.2624 42.1777,-86.2481 42.1792,-86.2085 42.1859,-86.1695 42.1914,-86.1302 42.1954,-86.0895 42.1975,-86.065 42.1965,-86.0414 42.1935,-86.0183 42.1904,-85.9954 42.1889,-85.9885 42.1901,-85.9817 42.1927,-85.9752 42.1956,-85.9687 42.1975,-85.9475 42.1999,-85.9268 42.2014,-85.9061 42.2033,-85.8848 42.2067,-85.8786 42.2085,-85.8729 42.2107,-85.8673 42.213,-85.8615 42.2152,-85.8376 42.219,-85.8003 42.2225,-85.7633 42.2252,-85.7399 42.2268,-85.7362 42.2289,-85.7324 42.231,-85.7287 42.2332,-85.725 42.2353,-85.7031 42.2353,-85.6812 42.2354,-85.6594 42.2357,-85.6376 42.2366)
+LINESTRING(-85.6785 42.9709,-85.6862 42.9712,-85.6951 42.9696,-85.7035 42.9668,-85.7099 42.9638,-85.7087 42.9594,-85.7078 42.9535,-85.7079 42.9478,-85.7095 42.9438,-85.7277 42.9342,-85.746 42.9246,-85.7639 42.9146,-85.7819 42.9046,-85.7812 42.9001,-85.7806 42.8956,-85.7804 42.891,-85.7802 42.8864,-85.8433 42.856,-85.9141 42.8325,-85.9857 42.8071,-86.0511 42.7713,-86.0499 42.7674,-86.0487 42.7635,-86.0609 42.7444,-86.0796 42.7321,-86.102 42.7252,-86.1252 42.7227,-86.1375 42.7115,-86.1448 42.6949,-86.1463 42.6763,-86.1413 42.659,-86.144 42.6532,-86.1483 42.6453,-86.1525 42.6373,-86.1544 42.6315,-86.1583 42.6242,-86.1593 42.6156,-86.1599 42.6067,-86.1622 42.5988,-86.1631 42.5685,-86.1655 42.53,-86.1695 42.4938,-86.1751 42.4702,-86.1818 42.4573,-86.1897 42.4444,-86.1979 42.4315,-86.2057 42.4189,-86.2062 42.4177,-86.2063 42.4162,-86.2063 42.4148,-86.2064 42.4135,-86.2076 42.4019,-86.2093 42.3906,-86.2117 42.3793,-86.2153 42.368,-86.2214 42.3577,-86.2297 42.3489,-86.2385 42.3405,-86.2458 42.3313,-86.2486 42.3253,-86.2506 42.3191,-86.2523 42.3129,-86.2546 42.3068,-86.2565 42.2964,-86.2552 42.286,-86.2539 42.2757,-86.2562 42.2655,-86.259 42.2595,-86.2619 42.2535,-86.2653 42.2465,-86.2674 42.2427,-86.2745 42.236,-86.2817 42.2303,-86.2884 42.2242,-86.2942 42.2164,-86.311 42.187,-86.3198 42.1699,-86.3219 42.1628)
+LINESTRING(-80.1591 41.1998,-80.1411 41.1973,-80.1227 41.1977,-80.1044 41.1997,-80.0865 41.2022,-80.0451 41.2017,-80.0037 41.2013,-79.9624 41.2009,-79.921 41.2004,-79.9099 41.1964,-79.8994 41.1907,-79.8877 41.1856,-79.8734 41.1836,-79.8641 41.1862,-79.8535 41.1911,-79.8402 41.1949,-79.8224 41.1941,-79.7999 41.1882,-79.7663 41.1789,-79.7342 41.1705,-79.7166 41.1674,-79.7101 41.1695,-79.7048 41.1728,-79.6997 41.1764,-79.6937 41.1791,-79.6802 41.1826,-79.6666 41.1859,-79.6529 41.1892,-79.6392 41.1932,-79.6343 41.1929,-79.6273 41.1909,-79.6203 41.1884,-79.6152 41.1868,-79.6064 41.1865,-79.5965 41.1882,-79.5868 41.19,-79.5787 41.1901,-79.5714 41.1882,-79.5639 41.1858,-79.5562 41.1836,-79.5485 41.1824,-79.5256 41.1854,-79.5056 41.1929,-79.4743 41.1966,-79.4174 41.1882,-79.4129 41.1876,-79.4067 41.1872,-79.4008 41.1867,-79.3972 41.1861,-79.3925 41.184,-79.3877 41.1819,-79.3829 41.1799,-79.3781 41.1778,-79.3495 41.1785,-79.3249 41.1752,-79.3031 41.1711,-79.2827 41.1696,-79.2677 41.1728,-79.2517 41.179,-79.2374 41.1851,-79.2276 41.1881,-79.2219 41.1878,-79.2164 41.1867,-79.211 41.1853,-79.2055 41.1843,-79.1936 41.1836,-79.1814 41.1839,-79.1693 41.184,-79.1579 41.1826,-79.1437 41.179,-79.1287 41.175,-79.1138 41.1714,-79.0995 41.1688,-79.0789 41.1672,-79.0594 41.1665,-79.0397 41.1651,-79.0188 41.1612,-79.0133 41.1547,-79.0061 41.1474,-78.998 41.1408,-78.9896 41.1366,-78.98 41.1366,-78.9674 41.1356,-78.9547 41.1338,-78.945 41.1317,-78.925 41.1365,-78.8835 41.1428,-78.8402 41.1483,-78.8154 41.1503,-78.7987 41.149,-78.7819 41.1477,-78.7624 41.1459,-78.7512 41.1446,-78.733 41.1394,-78.7157 41.1328,-78.6982 41.1263,-78.6795 41.1212,-78.641 41.1197,-78.6015 41.1232,-78.5641 41.1218,-78.5323 41.1057,-78.5216 41.0965,-78.5104 41.0881,-78.4985 41.0801,-78.4861 41.0721,-78.4824 41.0709,-78.4767 41.07,-78.4707 41.0693,-78.4665 41.0686,-78.4521 41.0634,-78.4393 41.0567,-78.4271 41.0497)
+LINESTRING(-80.1234 42.0311,-80.1295 42.0197,-80.1398 42.0109,-80.1521 42.003,-80.1641 41.9948,-80.1659 41.9831,-80.1709 41.9627,-80.1755 41.9454,-80.18 41.9282,-80.1871 41.9018,-80.194 41.8754,-80.1997 41.8485,-80.2033 41.821,-80.2091 41.797,-80.2193 41.7734,-80.2297 41.7503,-80.2357 41.7281,-80.2365 41.714,-80.2365 41.6992,-80.2362 41.6846,-80.2359 41.6699,-80.2278 41.6418,-80.2128 41.6275,-80.2046 41.6106,-80.2168 41.575,-80.2168 41.5659,-80.2167 41.5568,-80.2167 41.5477,-80.2166 41.5386,-80.2129 41.5346,-80.2098 41.5308,-80.2074 41.5268,-80.2062 41.5221,-80.2016 41.4976,-80.1958 41.4748,-80.1927 41.4521,-80.1964 41.4278,-80.1971 41.422,-80.196 41.416,-80.1942 41.41,-80.1925 41.4043,-80.1839 41.3556,-80.1778 41.3027,-80.1706 41.2495,-80.1591 41.1998)
+LINESTRING(-80.7581 41.8236,-80.7762 41.8184,-80.7918 41.8111,-80.8067 41.8027,-80.8229 41.7945,-80.8664 41.7777,-80.9189 41.7627,-80.973 41.7528,-81.0215 41.7512,-81.057 41.7356,-81.0922 41.7195,-81.1267 41.7027,-81.16 41.6846,-81.1764 41.6748,-81.1932 41.665,-81.2106 41.6558,-81.2289 41.648,-81.2646 41.641,-81.3046 41.6392,-81.341 41.6378,-81.3656 41.6321,-81.3823 41.6221,-81.3988 41.612,-81.4148 41.6015,-81.4301 41.5904,-81.4318 41.5708,-81.4334 41.5512,-81.4348 41.5315,-81.4356 41.5119,-81.4433 41.5037,-81.4542 41.4971,-81.4649 41.4913,-81.4721 41.4854,-81.4815 41.4705,-81.4916 41.4521,-81.5011 41.433,-81.5086 41.4162)
+LINESTRING(-86.3527 42.1306,-86.3429 42.14,-86.3293 42.1551,-86.3219 42.1628)
+LINESTRING(-83.1706 42.2901,-83.2553 42.1924,-83.2459 42.1265,-83.3644 42.0053,-83.3767 41.9346,-83.4959 41.797,-83.5111 41.7667,-83.5093 41.7321)
+LINESTRING(-75.555 40.5765,-75.5707 40.5743,-75.5885 40.576,-75.6067 40.5783,-75.6239 40.578,-75.6504 40.5755,-75.6771 40.5764,-75.7037 40.5787,-75.7304 40.5809,-75.7486 40.5805,-75.7659 40.5784,-75.7829 40.5762,-75.8001 40.5755,-75.8122 40.5766,-75.8239 40.5787,-75.8354 40.5808,-75.8472 40.582,-75.8698 40.5822,-75.8926 40.5815,-75.9153 40.5805,-75.938 40.5795,-75.947 40.5781,-75.9565 40.575,-75.9656 40.5714,-75.9738 40.568,-76.0247 40.549,-76.0762 40.5318,-76.1282 40.5156,-76.181 40.4997,-76.2082 40.4927,-76.2369 40.487,-76.2658 40.4819,-76.2938 40.4768,-76.3149 40.4719,-76.3355 40.466,-76.3558 40.4596,-76.3764 40.4535,-76.4122 40.4502,-76.4414 40.4454,-76.4692 40.4385,-76.5006 40.4292,-76.5094 40.4267,-76.5181 40.4243)
+LINESTRING(-76.0142 41.045,-76.014 41.0351,-76.0118 41.0253,-76.0083 41.0157,-76.0041 41.0063,-76.008 41.0019,-76.0156 40.9971,-76.0239 40.9928,-76.03 40.9898,-76.0327 40.9757,-76.0277 40.9581,-76.0193 40.9404,-76.0119 40.9261,-76.0144 40.9204,-76.0202 40.913,-76.0257 40.9069,-76.0312 40.9009,-76.0306 40.8966,-76.0284 40.8927,-76.0243 40.8906,-76.0203 40.8885,-76.0162 40.8864,-76.0121 40.8843,-76.0437 40.8593,-76.0731 40.8326,-76.1048 40.808,-76.1434 40.7892,-76.1781 40.7815,-76.2178 40.7761,-76.2554 40.7696,-76.2836 40.7584,-76.2911 40.7523,-76.2982 40.7458,-76.3055 40.7393,-76.3137 40.7337,-76.324 40.7287,-76.3349 40.724,-76.3456 40.7191,-76.3551 40.7134,-76.3592 40.7104,-76.3633 40.7074,-76.3843 40.6798,-76.3886 40.6673,-76.3999 40.6575,-76.4419 40.6378,-76.4439 40.6356,-76.4449 40.632,-76.4453 40.6282,-76.4451 40.6256,-76.4394 40.6193,-76.4318 40.6126,-76.425 40.6061,-76.4219 40.6004,-76.4143 40.5955,-76.4089 40.5876,-76.4073 40.5791,-76.4108 40.5722,-76.4265 40.5618,-76.4302 40.5495,-76.4312 40.5357,-76.4382 40.5207,-76.4493 40.5166,-76.4702 40.5114,-76.4945 40.5012,-76.5161 40.4819,-76.5227 40.4666,-76.5219 40.4528,-76.5187 40.4392,-76.5181 40.4243)
+LINESTRING(-83.6835 41.7259,-83.6847 41.7341,-83.69 41.7583,-83.6915 41.7811,-83.6884 41.8038,-83.6797 41.8276,-83.6747 41.8358,-83.6682 41.8452,-83.6626 41.8547,-83.6604 41.8635,-83.6619 41.8836,-83.6638 41.9045,-83.665 41.9252,-83.6639 41.9453,-83.6706 41.9528,-83.6756 41.9606,-83.6788 41.9689,-83.6798 41.9779,-83.6786 42.0046,-83.6766 42.0311,-83.6753 42.0575,-83.6762 42.0842,-83.6806 42.1187,-83.6859 42.1559,-83.6886 42.193,-83.6852 42.227)
+LINESTRING(-75.2771 40.111,-75.2662 40.1159,-75.2553 40.1203,-75.244 40.1242,-75.2321 40.1275,-75.1864 40.1429,-75.1451 40.1598,-75.1022 40.1705,-75.0515 40.1672,-75.0297 40.1601,-75.0115 40.1511,-74.9941 40.1415,-74.975 40.133,-74.9511 40.1296,-74.9171 40.1289,-74.8786 40.1271,-74.8407 40.1203,-74.8261 40.1154)
+LINESTRING(-75.555 40.5765,-75.5431 40.5597,-75.5273 40.5374,-75.5102 40.5158,-75.4918 40.4979,-75.4667 40.4879,-75.4495 40.4725,-75.4365 40.4538,-75.4241 40.4338,-75.4196 40.4235,-75.4175 40.4127,-75.4157 40.4018,-75.4121 40.3914,-75.3902 40.3477,-75.3706 40.3037,-75.3519 40.2594,-75.3329 40.215,-75.3187 40.189,-75.3021 40.1636,-75.287 40.1379,-75.2771 40.111)
+LINESTRING(-80.5185 41.1786,-80.4787 41.1797,-80.4385 41.1833,-80.3983 41.1875,-80.3585 41.1905,-80.3453 41.1898,-80.3326 41.1877,-80.3197 41.1857,-80.3063 41.1853,-80.289 41.1872,-80.2723 41.1901,-80.2558 41.1932,-80.239 41.1958,-80.2191 41.197,-80.1989 41.1972,-80.1787 41.1976,-80.1591 41.1998)
+LINESTRING(-122.275 40.6294,-122.297 40.6243,-122.319 40.6193,-122.34 40.6143,-122.362 40.6093)
+LINESTRING(-122.362 40.6093,-122.363 40.6162,-122.364 40.6231,-122.365 40.63,-122.367 40.6369,-122.363 40.6439,-122.36 40.6508,-122.357 40.6578,-122.354 40.6648,-122.351 40.6714,-122.348 40.678,-122.345 40.6846,-122.342 40.6912,-122.343 40.6964,-122.342 40.7045,-122.341 40.7127,-122.339 40.7208,-122.338 40.729,-122.336 40.738,-122.335 40.7469,-122.334 40.7559,-122.332 40.7648,-122.332 40.7713,-122.331 40.7777,-122.331 40.7841,-122.33 40.7905,-122.328 40.7957,-122.325 40.801,-122.323 40.8062,-122.321 40.8114,-122.318 40.8177,-122.315 40.8241,-122.313 40.8304,-122.31 40.8368,-122.308 40.84,-122.307 40.8432,-122.305 40.8465,-122.303 40.8497,-122.303 40.8551,-122.302 40.8605,-122.302 40.8658,-122.301 40.8712,-122.304 40.8778,-122.308 40.8845,-122.311 40.8911,-122.315 40.8977,-122.32 40.9019,-122.325 40.9061,-122.33 40.9103,-122.335 40.9145,-122.339 40.9149,-122.344 40.9153,-122.348 40.9157,-122.353 40.9161,-122.357 40.9158,-122.361 40.9154,-122.365 40.9151,-122.369 40.9147,-122.378 40.9131,-122.387 40.9115,-122.396 40.9098,-122.405 40.9082,-122.409 40.9074,-122.416 40.9091,-122.423 40.9108,-122.427 40.911,-122.432 40.9111,-122.436 40.9117,-122.441 40.9124,-122.445 40.914,-122.45 40.9156,-122.454 40.9185,-122.458 40.9213,-122.461 40.9238,-122.464 40.9263,-122.465 40.9296,-122.466 40.9328,-122.467 40.9361,-122.467 40.9393,-122.465 40.9428,-122.462 40.9462,-122.459 40.9497,-122.457 40.9531,-122.452 40.9558,-122.448 40.9585,-122.443 40.9611,-122.439 40.9638,-122.435 40.9664,-122.43 40.969,-122.426 40.9716,-122.422 40.9741,-122.407 40.9817,-122.392 40.9892,-122.378 40.9968,-122.363 41.0043,-122.345 41.0185,-122.328 41.0327,-122.31 41.0469,-122.293 41.061,-122.28 41.0805,-122.268 41.0999,-122.255 41.1193,-122.242 41.1387,-122.235 41.152,-122.227 41.1652,-122.219 41.1784,-122.212 41.1917,-122.211 41.2026,-122.21 41.2136,-122.209 41.2246,-122.208 41.2356,-122.211 41.2457,-122.214 41.2559,-122.217 41.266,-122.221 41.2762,-122.227 41.2812,-122.234 41.2863,-122.241 41.2913,-122.248 41.2964,-122.257 41.2987,-122.266 41.301,-122.275 41.3034,-122.284 41.3057,-122.293 41.3072,-122.303 41.3087,-122.312 41.3102,-122.322 41.3117,-122.324 41.3165,-122.326 41.3213,-122.328 41.3247,-122.33 41.328,-122.331 41.3314,-122.333 41.3348,-122.336 41.3376,-122.339 41.3403,-122.342 41.3431,-122.345 41.3459,-122.348 41.3493,-122.352 41.3527,-122.356 41.3562,-122.36 41.3596,-122.367 41.3631,-122.37 41.3664,-122.373 41.3698,-122.376 41.3731,-122.379 41.3764,-122.379 41.3819,-122.379 41.3873,-122.383 41.392,-122.386 41.3967,-122.387 41.4019,-122.387 41.4071,-122.388 41.4119,-122.389 41.4166,-122.399 41.4185,-122.409 41.4223,-122.42 41.4263)
+LINESTRING(-83.5093 41.7321,-83.5082 41.7124,-83.574 41.6847,-83.577 41.6788)
+LINESTRING(-83.577 41.6788,-83.6062 41.6833,-83.6354 41.6866,-83.6648 41.689,-83.6946 41.6904,-83.6904 41.7021,-83.6851 41.7085,-83.6821 41.7169,-83.6835 41.7259)
+LINESTRING(-80.6763 41.1547,-80.6639 41.1576,-80.6509 41.1595,-80.6382 41.1615,-80.6266 41.1644,-80.5949 41.1742,-80.574 41.1779,-80.5525 41.1783,-80.5186 41.1786,-80.5185 41.1786)
+LINESTRING(-80.7581 41.8236,-80.7566 41.8178,-80.7562 41.812,-80.7558 41.8063,-80.7543 41.8008,-80.7477 41.7918,-80.7378 41.7839,-80.7271 41.7763,-80.7182 41.7681,-80.7026 41.7328,-80.7001 41.6904,-80.7046 41.6474,-80.71 41.61,-80.7103 41.5895,-80.7083 41.5688,-80.706 41.5482,-80.7059 41.5277,-80.7104 41.4837,-80.7128 41.4335,-80.706 41.3847,-80.683 41.3449,-80.6862 41.3151,-80.6963 41.287,-80.7077 41.2593,-80.7147 41.231,-80.7101 41.2105,-80.6971 41.1924,-80.6833 41.1745,-80.6763 41.1547)
+LINESTRING(-81.8083 41.3323,-81.811 41.3531,-81.8136 41.379,-81.8131 41.4034,-81.8063 41.4196,-81.786 41.4258,-81.7525 41.4278,-81.7181 41.4271,-81.6951 41.4254,-81.6816 41.422,-81.6687 41.4167,-81.6551 41.4118,-81.6397 41.4094,-81.6084 41.4125,-81.5779 41.4193,-81.5456 41.4229,-81.5086 41.4162)
+LINESTRING(-81.5086 41.4162,-81.5107 41.3993,-81.5114 41.3821,-81.5101 41.3645,-81.506 41.3467,-81.502 41.325,-81.5009 41.3027,-81.4995 41.2804,-81.4943 41.2586)
+LINESTRING(-81.8083 41.3323,-81.7888 41.3257,-81.7692 41.3181,-81.7497 41.3107,-81.7303 41.3047,-81.7221 41.3034,-81.7133 41.303,-81.7043 41.3024,-81.6955 41.3008,-81.6669 41.2919,-81.6404 41.2821,-81.6147 41.2713,-81.5884 41.2593,-81.5863 41.2585,-81.5841 41.2576,-81.582 41.2568,-81.5799 41.256,-81.5586 41.2572,-81.5372 41.2581,-81.5157 41.2586,-81.4943 41.2586)
+LINESTRING(-88.9862 42.4988,-88.9925 42.4736,-88.9905 42.4472,-88.98 42.4084,-88.9762 42.3995,-88.9712 42.3898,-88.9667 42.3802,-88.9643 42.3717,-88.9635 42.3495,-88.963 42.3134,-88.9631 42.2769,-88.964 42.254,-88.9629 42.2531,-88.9618 42.2522,-88.9607 42.2513,-88.9597 42.2503)
+LINESTRING(-83.5818 41.5705,-83.5787 41.5693)
+LINESTRING(-80.6763 41.1547,-80.685 41.1546,-80.6938 41.1542,-80.7026 41.1535,-80.7112 41.1524,-80.738 41.1355,-80.768 41.1256,-80.8008 41.1193,-80.836 41.1133)
+LINESTRING(-81.4943 41.2586,-81.4731 41.2581,-81.4517 41.2567,-81.4303 41.2551,-81.4088 41.2542,-81.3919 41.2549,-81.376 41.2563,-81.3599 41.2575,-81.3428 41.2573,-81.2845 41.2535,-81.1665 41.2456,-81.0472 41.2367,-80.9847 41.2299,-80.9595 41.2124,-80.9121 41.1756,-80.8638 41.1367,-80.836 41.1133)
+LINESTRING(-83.5787 41.5693,-83.5692 41.5666,-83.5589 41.5615)
+LINESTRING(-83.5787 41.5693,-83.5692 41.5655,-83.5589 41.5615)
+LINESTRING(-83.577 41.6788,-83.5763 41.6771,-83.5751 41.6756,-83.5594 41.6606,-83.5414 41.6431,-83.5244 41.625,-83.5121 41.6086,-83.5151 41.5971,-83.5285 41.5821,-83.5443 41.5682,-83.5543 41.5597)
+LINESTRING(-83.5589 41.5615,-83.5543 41.5597)
+LINESTRING(-84.9704 42.3144,-84.9702 42.2741,-84.975 42.2281,-84.982 42.1822,-84.9888 42.1419,-84.9929 42.1292,-84.999 42.1164,-85.0043 42.1035,-85.006 42.0903,-84.9993 42.0746,-84.986 42.0602,-84.9722 42.0448,-84.9642 42.0262,-84.9609 42.0041,-84.958 41.98,-84.9568 41.956,-84.9588 41.934,-84.9637 41.9234,-84.972 41.9134,-84.9798 41.9037,-84.9837 41.8939,-84.9863 41.8734,-84.9898 41.8518,-84.9927 41.8303,-84.9929 41.8104,-84.9891 41.788,-84.9852 41.7696,-84.9852 41.7606)
+LINESTRING(-105.203 42.6576,-105.213 42.6658,-105.222 42.6739,-105.231 42.6821,-105.241 42.6902,-105.258 42.7004,-105.283 42.7092,-105.308 42.7169,-105.329 42.7235,-105.347 42.7329,-105.377 42.7483,-105.41 42.7626,-105.44 42.7684,-105.446 42.771,-105.456 42.773,-105.466 42.7751,-105.472 42.7779,-105.496 42.7774,-105.518 42.7763,-105.539 42.7779,-105.559 42.7858,-105.582 42.7859,-105.601 42.7872,-105.62 42.7897,-105.642 42.7938,-105.659 42.7957,-105.68 42.7967,-105.701 42.7975,-105.719 42.7986,-105.731 42.7992,-105.738 42.7991,-105.746 42.799,-105.757 42.8003,-105.783 42.8048,-105.809 42.8098,-105.835 42.8145,-105.861 42.818,-105.893 42.8195,-105.923 42.8189,-105.953 42.8178,-105.983 42.8176,-105.994 42.8186,-106.005 42.8205,-106.016 42.8225,-106.026 42.8237,-106.07 42.8247,-106.113 42.8238,-106.156 42.8232,-106.2 42.8249,-106.218 42.8276,-106.238 42.8317,-106.257 42.8349,-106.272 42.835,-106.284 42.8389,-106.303 42.8427,-106.322 42.8457,-106.336 42.8475)
+LINESTRING(-89.0156 42.2219,-89.0097 42.2223,-89.0039 42.2226,-88.998 42.2229,-88.9921 42.2232,-88.9825 42.2282,-88.9729 42.2351,-88.9648 42.2427,-88.9597 42.2503)
+LINESTRING(-75.2771 40.111,-75.2984 40.0953,-75.3196 40.0816,-75.3379 40.0668,-75.3505 40.0474,-75.3501 40.0353,-75.3408 40.0254,-75.3264 40.0167,-75.3105 40.0083,-75.298 40.001,-75.287 39.9944,-75.2758 39.988,-75.2626 39.9812,-75.2465 39.9745,-75.2318 39.9689,-75.2186 39.9623,-75.2073 39.9524,-75.1992 39.9397,-75.1931 39.9272,-75.185 39.9166,-75.1708 39.9098,-75.1403 39.9026,-75.1351 39.9018,-75.1323 39.9015)
+LINESTRING(-84.9852 41.7606,-84.9852 41.7513,-84.9907 41.7363)
+LINESTRING(-89.2018 42.2816,-89.1896 42.2758,-89.1762 42.2716,-89.163 42.2672,-89.1517 42.261,-89.1429 42.2522,-89.1354 42.2422,-89.1281 42.2321,-89.1197 42.2227,-89.1024 42.2206,-89.0711 42.2206,-89.0381 42.2215,-89.0156 42.2219)
+LINESTRING(-85.0008 41.7351,-84.9951 41.736,-84.9907 41.7363)
+LINESTRING(-112.834 41.9996,-112.875 42.0423,-112.917 42.0854,-112.96 42.1282,-113.002 42.1711,-113.014 42.1815,-113.029 42.1924,-113.041 42.2038,-113.048 42.2157,-113.058 42.2234,-113.069 42.2312,-113.079 42.2389,-113.089 42.2466,-113.167 42.2934,-113.267 42.3799,-113.354 42.4634,-113.392 42.5013,-113.414 42.5105,-113.441 42.5192,-113.469 42.528,-113.492 42.5377)
+LINESTRING(-75.1026 39.873,-75.0888 39.8718,-75.0753 39.8715,-75.0621 39.873,-75.0496 39.8771,-75.0262 39.8727,-75.0166 39.8759,-75.0002 39.8924,-74.9798 39.9092,-74.9625 39.9221,-74.9552 39.9273,-74.9113 39.9608,-74.8383 40.0149,-74.7681 40.0672,-74.7333 40.0957)
+LINESTRING(-75.1323 39.9015,-75.1304 39.9014,-75.126 39.9005,-75.1221 39.8983,-75.116 39.892,-75.1116 39.8859,-75.1077 39.8797,-75.1026 39.873)
+LINESTRING(-80.836 41.1133,-80.8151 41.0945,-80.7896 41.0704,-80.7629 41.0486,-80.7391 41.0366)
+LINESTRING(-75.1026 39.873,-75.1007 39.8626,-75.0997 39.8568)
+LINESTRING(-75.0997 39.8568,-75.0991 39.8533,-75.0965 39.8443,-75.0948 39.8365)
+LINESTRING(-91.3448 42.4615,-91.3552 42.4577,-91.3711 42.456,-91.3877 42.4555,-91.4003 42.4551,-91.4334 42.4517,-91.4652 42.4478,-91.4972 42.4445,-91.5312 42.443,-91.588 42.4437,-91.645 42.4449,-91.7021 42.4456,-91.7587 42.4445,-91.7921 42.4415,-91.8261 42.4367,-91.8597 42.4322,-91.892 42.4303,-91.9653 42.4303,-92.0387 42.4302,-92.112 42.4301,-92.1853 42.43,-92.1909 42.43,-92.1965 42.4301,-92.2021 42.4301,-92.2077 42.4302)
+LINESTRING(-92.3202 42.429,-92.292 42.4293,-92.2639 42.4296,-92.2358 42.4299,-92.2077 42.4302)
+LINESTRING(-92.56 42.4782,-92.5075 42.4656,-92.4375 42.4478,-92.3688 42.4328,-92.3202 42.429)
+LINESTRING(-83.5543 41.5597,-83.5422 41.5519,-83.5314 41.5452,-83.5151 41.5391,-83.4936 41.5342,-83.4711 41.5295,-83.4521 41.5239,-83.3928 41.5004,-83.333 41.4779,-83.2732 41.4557,-83.2136 41.433,-83.2079 41.4301,-83.202 41.4267,-83.1961 41.4233,-83.1903 41.4209,-83.1132 41.4007,-83.0279 41.3819,-82.9414 41.3651,-82.861 41.351,-82.8434 41.3489,-82.8253 41.348,-82.8072 41.3473,-82.7894 41.3461,-82.7515 41.3417,-82.7136 41.3364,-82.6759 41.3307,-82.6383 41.3251,-82.5872 41.3219,-82.5296 41.324,-82.4717 41.3285,-82.4199 41.3328,-82.4037 41.3339,-82.3875 41.3349,-82.3692 41.3361,-82.3606 41.3369,-82.347 41.3414,-82.3334 41.3453,-82.3198 41.349,-82.3061 41.3531,-82.2903 41.3597,-82.2769 41.3669,-82.263 41.3734,-82.2461 41.3775,-82.2065 41.3834,-82.1674 41.3891,-82.1281 41.3919,-82.0881 41.3894,-82.0761 41.3865,-82.064 41.3824,-82.0521 41.3783,-82.0404 41.3757,-82.0292 41.3755,-82.0185 41.3769,-82.008 41.3787,-81.9976 41.3796,-81.9689 41.3766,-81.9357 41.3696,-81.9025 41.3612,-81.8741 41.354,-81.8577 41.3495,-81.841 41.3438,-81.8245 41.3379,-81.8083 41.3323)
+LINESTRING(-84.8066 41.6294,-84.7978 41.6285,-84.7685 41.6281,-84.7387 41.6282,-84.7151 41.6279,-84.7004 41.6258,-84.6858 41.6222,-84.6713 41.6187,-84.6571 41.617,-84.6403 41.6173,-84.6234 41.618,-84.6064 41.6185,-84.5895 41.6182,-84.5546 41.6153,-84.52 41.612,-84.4854 41.6092,-84.4504 41.6081,-84.4357 41.6083,-84.4209 41.6085,-84.4041 41.6082,-84.3932 41.6067,-84.3633 41.5956,-84.3462 41.5912,-84.3283 41.591,-84.2958 41.5926,-84.2523 41.5935,-84.2077 41.5935,-84.1628 41.5934,-84.1184 41.5941,-84.0973 41.5953,-84.0757 41.5972,-84.0543 41.5991,-84.0338 41.6001,-83.9799 41.6017,-83.9254 41.6037,-83.871 41.6053,-83.8172 41.6052,-83.7928 41.6029,-83.7709 41.5986,-83.7437 41.5947,-83.7034 41.5936,-83.6866 41.5936,-83.6696 41.5928,-83.6526 41.5919,-83.6358 41.5911,-83.6223 41.5864,-83.596 41.5761,-83.5818 41.5705)
+LINESTRING(-84.9907 41.7363,-84.9882 41.7364,-84.9813 41.7361,-84.9756 41.7348,-84.9532 41.7176,-84.9087 41.6932,-84.8588 41.6635,-84.82 41.6307,-84.8066 41.6294)
+LINESTRING(-112.188 42.0018,-112.192 42.0148,-112.2 42.0291,-112.208 42.0436,-112.214 42.0574,-112.219 42.0772,-112.222 42.0987,-112.223 42.1204,-112.223 42.1407,-112.224 42.1506,-112.224 42.1622,-112.226 42.1735,-112.231 42.1822,-112.23 42.1927,-112.229 42.2033,-112.228 42.2138,-112.228 42.2244,-112.208 42.257,-112.207 42.2851,-112.214 42.3129,-112.217 42.3446,-112.21 42.3665,-112.194 42.3958,-112.178 42.4264,-112.166 42.4519,-112.162 42.4917,-112.171 42.5335,-112.185 42.5748,-112.198 42.6134,-112.199 42.6174,-112.2 42.6215,-112.201 42.6257,-112.201 42.6298)
+LINESTRING(-76.8793 40.2112,-76.8666 40.2099,-76.8507 40.205,-76.8342 40.199,-76.8199 40.1946,-76.814 40.1969,-76.8043 40.2026,-76.7946 40.2089,-76.7884 40.2134,-76.7568 40.2112,-76.7251 40.2081,-76.6938 40.2068,-76.6632 40.2099,-76.6329 40.2111,-76.5995 40.2082,-76.5637 40.2095,-76.5263 40.223,-76.5215 40.2248,-76.4832 40.2274,-76.4518 40.2266,-76.4268 40.2249,-76.4077 40.2248,-76.38 40.228,-76.3518 40.2317,-76.3237 40.235,-76.2961 40.2369,-76.242 40.2414,-76.1958 40.2458,-76.1498 40.2428,-76.0963 40.2253,-76.0735 40.2168,-76.0499 40.21,-76.0263 40.2029,-76.0036 40.1934,-75.9904 40.1777,-75.9694 40.1747,-75.946 40.177,-75.9257 40.1775,-75.9189 40.1748,-75.9062 40.1691,-75.8891 40.1624,-75.869 40.1568,-75.8566 40.1502,-75.8385 40.148,-75.8205 40.1469,-75.8079 40.1433,-75.7589 40.1079,-75.7143 40.0822,-75.6647 40.0662,-75.6002 40.0601,-75.5863 40.0629,-75.5738 40.0697,-75.5615 40.0769,-75.5485 40.0811,-75.53 40.0815,-75.511 40.0799,-75.492 40.0779,-75.4735 40.0776,-75.4552 40.0801,-75.4353 40.0848,-75.4158 40.0904,-75.3984 40.0959,-75.3893 40.0976,-75.3811 40.0972,-75.3729 40.0958,-75.3639 40.0945,-75.3558 40.0946,-75.3496 40.0963,-75.3441 40.0991,-75.3381 40.1026,-75.3263 40.106,-75.3089 40.1082,-75.2908 40.1098,-75.2771 40.111)
+LINESTRING(-85.0008 41.7351,-85.0063 41.7375,-85.0118 41.7398,-85.0173 41.7421,-85.0228 41.7445,-85.0764 41.7453,-85.14 41.7515,-85.2057 41.7562,-85.2657 41.7525,-85.2699 41.7494,-85.2741 41.7464,-85.2783 41.7434,-85.2825 41.7404,-85.3084 41.7403,-85.3424 41.7441,-85.3769 41.7491,-85.4041 41.7528,-85.4412 41.7535,-85.4742 41.7499,-85.504 41.7457,-85.5316 41.7447,-85.5403 41.7461,-85.5491 41.7484,-85.5579 41.7507,-85.5666 41.7523,-85.595 41.7537,-85.6248 41.7527,-85.6544 41.75,-85.6824 41.7462,-85.6927 41.7458,-85.703 41.7453,-85.7133 41.745,-85.7177 41.7449)
+LINESTRING(-87.8649 41.9977,-87.8654 42.0311,-87.8628 42.0661,-87.8661 42.0994,-87.8841 42.1278,-87.8844 42.1332,-87.8847 42.1386,-87.8842 42.1435,-87.8824 42.1492,-87.8783 42.1509,-87.8743 42.1527,-87.8738 42.1711,-87.8798 42.1908,-87.8905 42.2097,-87.9042 42.2257,-87.9039 42.2288,-87.9037 42.2319,-87.9035 42.2349,-87.9033 42.238,-87.9042 42.2509,-87.9069 42.2651,-87.9089 42.2737,-87.9109 42.2822,-87.9092 42.2923,-87.9074 42.3012,-87.9063 42.3104,-87.9065 42.3213,-87.9068 42.3242,-87.907 42.327,-87.9075 42.3298,-87.9079 42.3326,-87.9134 42.343,-87.9223 42.3518,-87.9318 42.3604,-87.9393 42.3702,-87.9439 42.387,-87.9508 42.4186,-87.957 42.4503,-87.9595 42.4672,-87.957 42.472,-87.9516 42.4764,-87.9456 42.4808,-87.9411 42.4857,-87.9435 42.497)
+LINESTRING(-87.8649 41.9977,-87.8834 42.0044,-87.9019 42.0094,-87.9204 42.0138,-87.9392 42.019,-87.9445 42.0215,-87.9491 42.0245,-87.9535 42.0276,-87.9581 42.0302,-88.0391 42.0575,-88.1117 42.0682,-88.1887 42.0695,-88.283 42.0686,-88.2928 42.0688,-88.3002 42.0696,-88.3073 42.0714,-88.3163 42.0748,-88.3459 42.0869,-88.3753 42.0992,-88.4045 42.1117,-88.4336 42.1244,-88.4588 42.1335,-88.4868 42.1411,-88.5152 42.148,-88.5416 42.1553,-88.5945 42.1723,-88.6471 42.1895,-88.6998 42.2067,-88.753 42.2234,-88.7911 42.2334,-88.8202 42.2367,-88.8513 42.2362,-88.8953 42.2346,-88.9067 42.237,-88.9182 42.2425,-88.9344 42.248,-88.9597 42.2503)
+LINESTRING(-80.7391 41.0366,-80.7339 41.0344,-80.7288 41.0322,-80.7237 41.03,-80.7186 41.0277,-80.7109 41.0166,-80.7015 41.0044,-80.6911 40.9927,-80.6807 40.9832,-80.6689 40.9766,-80.6452 40.9642,-80.6213 40.9521,-80.6087 40.9463,-80.5978 40.9449,-80.5871 40.9438,-80.5767 40.9422,-80.5665 40.939,-80.5505 40.9308,-80.5357 40.9214,-80.5213 40.9119,-80.5182 40.9103)
+LINESTRING(-76.5181 40.4243,-76.576 40.415,-76.6265 40.3966,-76.6742 40.3739,-76.7237 40.3514,-76.7381 40.345,-76.7541 40.3374,-76.7702 40.3305,-76.7849 40.3259,-76.8049 40.3192,-76.8222 40.3104,-76.8392 40.3021,-76.8587 40.2968,-76.8819 40.3015,-76.9091 40.312,-76.9404 40.3142,-76.9762 40.2937,-76.979 40.2901,-76.9807 40.2861,-76.9824 40.2821,-76.9848 40.2783,-76.9953 40.2766,-77.012 40.2761,-77.0297 40.2755,-77.0433 40.2731,-77.059 40.266,-77.0866 40.2528,-77.1134 40.2395,-77.1273 40.2321,-77.13 40.2283,-77.1339 40.2244)
+LINESTRING(-93.5746 42.4448,-93.5003 42.4425,-93.4284 42.4417,-93.3566 42.443,-92.56 42.4782)
+LINESTRING(-93.5746 42.4448,-93.5767 42.4565,-93.5777 42.4681,-93.5781 42.4798,-93.5784 42.4916,-93.5736 42.5438,-93.5542 42.574,-93.5221 42.6008,-93.4789 42.6429,-93.4582 42.6693,-93.4395 42.6967,-93.4214 42.7244,-93.4027 42.7515,-93.3912 42.7665,-93.3778 42.7848,-93.3666 42.8036,-93.362 42.8201,-93.3627 42.9018,-93.3638 42.9836,-93.3643 43.0654,-93.3632 43.1471,-93.3609 43.1816,-93.3569 43.2162,-93.3526 43.2508,-93.3497 43.2854,-93.3485 43.3227,-93.3484 43.3602,-93.3487 43.3977,-93.3488 43.4351,-93.3487 43.4521,-93.3487 43.4692,-93.349 43.4863,-93.3493 43.5035,-93.3493 43.5035)
+LINESTRING(-80.836 41.1133,-80.9104 41.1061,-80.982 41.1071,-81.0534 41.1112,-81.1274 41.1136,-81.1515 41.1132,-81.1754 41.1125,-81.1995 41.112,-81.2238 41.1123,-81.2501 41.1132,-81.2761 41.1137,-81.302 41.1132,-81.3281 41.111,-81.3797 41.0993,-81.4001 41.0859,-81.428 41.074,-81.5019 41.0667)
+LINESTRING(-81.4943 41.2586,-81.4937 41.2487,-81.4916 41.2383,-81.4899 41.2281,-81.4906 41.2191,-81.4945 41.2114,-81.5008 41.2015,-81.5067 41.1925,-81.5094 41.1874,-81.5072 41.1572,-81.5025 41.1258,-81.4994 41.0951,-81.5019 41.0667)
+LINESTRING(-77.1339 40.2244,-77.1321 40.2244,-77.1303 40.2243,-77.1285 40.2241,-77.1267 40.224,-77.0747 40.2088,-77.0382 40.1978,-77.0014 40.1933,-76.9481 40.1975,-76.9404 40.1975,-76.9322 40.1964,-76.9239 40.1952,-76.9156 40.195,-76.9067 40.1993,-76.8975 40.2031,-76.8882 40.2069,-76.8793 40.2112)
+LINESTRING(-93.9071 42.4451,-93.824 42.4449,-93.7409 42.4451,-93.6577 42.4453,-93.5746 42.4448)
+LINESTRING(-78.432 40.4387,-78.4268 40.4499,-78.4238 40.4585,-78.4178 40.4652,-78.4034 40.4707,-78.3991 40.4765,-78.3942 40.482,-78.3893 40.4875,-78.385 40.4931,-78.3682 40.5192,-78.3513 40.5461,-78.3337 40.5727,-78.3148 40.5978,-78.2865 40.627,-78.2529 40.6552,-78.2182 40.683,-78.1864 40.7111,-78.1861 40.7131,-78.1858 40.7152,-78.1855 40.7172,-78.1853 40.7193)
+LINESTRING(-85.7177 41.7449,-85.7236 41.7447,-85.7474 41.7342,-85.7725 41.7332,-85.7987 41.7365,-85.8258 41.7389,-85.8447 41.7381,-85.8642 41.7363,-85.8838 41.7344,-85.9034 41.7334,-85.9459 41.7328,-85.9887 41.732,-86.0314 41.7316,-86.0738 41.7318,-86.0852 41.7326,-86.0961 41.734,-86.1072 41.7351,-86.1193 41.7351,-86.1446 41.7305,-86.1606 41.7233,-86.1811 41.717,-86.2198 41.7148,-86.2271 41.7156,-86.235 41.7175,-86.2425 41.7203,-86.2485 41.7236,-86.2706 41.7219,-86.2932 41.7248,-86.316 41.7289,-86.3389 41.731)
+LINESTRING(-86.3219 42.1628,-86.3246 42.154,-86.3294 42.1282,-86.3411 42.12,-86.3529 42.1118,-86.3675 42.1011,-86.3753 42.0946,-86.3841 42.078,-86.3918 42.0585,-86.4022 42.041,-86.4189 42.0301,-86.4274 42.0281,-86.4357 42.0265,-86.4439 42.0247,-86.4523 42.022,-86.4639 42.0164,-86.4752 42.0098,-86.4863 42.0029,-86.4974 41.9966,-86.4995 41.9679,-86.499 41.9346,-86.4965 41.9036,-86.4928 41.8822,-86.504 41.8724,-86.521 41.865,-86.5387 41.8578,-86.5519 41.849,-86.5795 41.8301,-86.6081 41.8129,-86.6361 41.795,-86.662 41.774,-86.6768 41.7605)
+LINESTRING(-96.4485 42.4938,-96.4789 42.4947,-96.4882 42.5018,-96.4937 42.5112,-96.4953 42.5215,-96.493 42.5311,-96.5318 42.5726,-96.5794 42.6101,-96.6311 42.6447,-96.6824 42.6778,-96.7009 42.694,-96.736 42.7262,-96.7751 42.7614,-96.8051 42.7864,-96.8113 42.9388,-96.8236 43.1851,-96.8281 43.433,-96.8109 43.5899,-96.8023 43.5956,-96.8024 43.6054,-96.8025 43.6152,-96.8026 43.625,-96.8027 43.6348)
+LINESTRING(-87.8649 41.9977,-87.8428 41.9875,-87.8092 41.9811,-87.774 41.9726,-87.7474 41.9557,-87.7395 41.9516,-87.7315 41.9475,-87.7236 41.9435,-87.7157 41.9394,-87.6966 41.9284,-87.6804 41.9219,-87.6672 41.9129,-87.657 41.8945,-87.6451 41.8847,-87.6424 41.8732,-87.6427 41.8606,-87.6398 41.8475)
+LINESTRING(-87.9461 41.8447,-87.9302 41.8561,-87.9215 41.8668,-87.9179 41.8763,-87.9175 41.8843,-87.9194 41.8981,-87.9221 41.9137,-87.9231 41.9276,-87.9201 41.9361,-87.9128 41.9385,-87.9024 41.9391,-87.8917 41.9401,-87.8834 41.9434,-87.8771 41.9576,-87.8718 41.9701,-87.8677 41.9828,-87.8649 41.9977)
+LINESTRING(-96.3758 42.4416,-96.3835 42.4812,-96.402 42.4936,-96.4332 42.4933,-96.4485 42.4938)
+LINESTRING(-86.3389 41.731,-86.3385 41.7158,-86.3397 41.7006,-86.341 41.6855,-86.3409 41.6707,-86.3298 41.6555,-86.3052 41.6406,-86.2762 41.6289,-86.2519 41.6233)
+LINESTRING(-80.1591 41.1998,-80.1623 41.1735,-80.153 41.1372,-80.1385 41.1004,-80.1263 41.0729,-80.1241 41.0592,-80.1219 41.0455,-80.1198 41.0318,-80.1176 41.0181,-80.1214 41.0053,-80.1275 40.9906,-80.1326 40.9762,-80.1334 40.964,-80.1344 40.9623,-80.1353 40.9607,-80.1363 40.959,-80.1372 40.9574,-80.1347 40.9347,-80.1238 40.9074,-80.1118 40.8799,-80.1062 40.8568,-80.1092 40.8366,-80.1156 40.8127,-80.1213 40.7896,-80.1219 40.7721,-80.1166 40.7582,-80.1094 40.7447,-80.1019 40.7314,-80.0962 40.7182,-80.0937 40.7049,-80.093 40.6906,-80.093 40.6761,-80.0924 40.6624)
+LINESTRING(-80.5182 40.9103,-80.5063 40.9038,-80.4816 40.895,-80.4589 40.8893,-80.4365 40.8823,-80.4124 40.8697,-80.3814 40.8385,-80.3304 40.8159,-80.2787 40.799,-80.2456 40.7849,-80.2186 40.7565,-80.1773 40.7384,-80.1364 40.7193,-80.1103 40.6879,-80.1077 40.6818,-80.1033 40.674,-80.098 40.6669,-80.0924 40.6624)
+LINESTRING(-122.362 40.6093,-122.36 40.5871,-122.363 40.555,-122.364 40.523,-122.363 40.5009,-122.353 40.484,-122.338 40.4656,-122.324 40.4484,-122.316 40.4351,-122.313 40.4292,-122.307 40.4204,-122.302 40.411,-122.3 40.4034,-122.299 40.3729,-122.291 40.3452,-122.283 40.3175,-122.279 40.2872,-122.275 40.2838,-122.272 40.2798,-122.27 40.2756,-122.268 40.2715,-122.257 40.2435,-122.247 40.2241,-122.237 40.206,-122.223 40.1818)
+LINESTRING(-75.5082 39.6788,-75.4784 39.6841,-75.4449 39.6879,-75.4114 39.6924,-75.3776 39.7007,-75.3223 39.7246,-75.27 39.755,-75.2185 39.787,-75.1659 39.8153,-75.1579 39.8186,-75.1495 39.8218,-75.1413 39.8253,-75.1343 39.8295,-75.1262 39.8363,-75.1184 39.8433,-75.1102 39.85,-75.0997 39.8568)
+LINESTRING(-75.5359 39.6877,-75.5297 39.6853,-75.5116 39.6782,-75.5082 39.6788)
+LINESTRING(-89.0156 42.2219,-89.0158 42.2168,-89.0177 42.2118,-89.0211 42.2073,-89.0257 42.2034,-89.0267 42.1506,-89.0246 42.0507,-89.0205 41.9525,-89.016 41.9049)
+LINESTRING(-87.9461 41.8447,-87.9405 41.8442,-87.9348 41.843,-87.9294 41.8413,-87.9247 41.839,-87.9192 41.8287,-87.9131 41.8164,-87.9076 41.804,-87.9042 41.7933,-87.9032 41.7902,-87.9008 41.789,-87.8985 41.7853)
+LINESTRING(-75.6464 39.6877,-75.6347 39.6923,-75.6205 39.697,-75.6071 39.7018,-75.5975 39.7066,-75.5941 39.7051,-75.5906 39.7039,-75.5832 39.7021,-75.563 39.6974,-75.546 39.6917,-75.5359 39.6877)
+LINESTRING(-87.8566 41.756,-87.8482 41.7649,-87.8354 41.7781,-87.8221 41.7905,-87.8123 41.7972,-87.8094 41.7967,-87.8065 41.7962,-87.8036 41.7957,-87.8007 41.7952,-87.7689 41.8041,-87.7192 41.8189,-87.67 41.8348,-87.6398 41.8475)
+LINESTRING(-87.8566 41.756,-87.8681 41.7635,-87.8794 41.7712,-87.8898 41.7786,-87.8985 41.7853)
+LINESTRING(-74.5536 39.4109,-74.5533 39.4125,-74.553 39.4141,-74.5358 39.4488,-74.5267 39.4872,-74.51 39.5211,-74.4702 39.5424,-74.4518 39.5794,-74.4346 39.601,-74.4096 39.6182,-74.3674 39.6416,-74.3575 39.6466,-74.3469 39.6516,-74.3365 39.6568,-74.3274 39.6624,-74.2799 39.7109,-74.2448 39.773,-74.2225 39.8391,-74.2135 39.8993,-74.2115 39.9202,-74.209 39.9411,-74.2092 39.9618,-74.215 39.9822,-74.2141 39.9851,-74.2132 39.9879,-74.2122 39.9907,-74.2113 39.9936,-74.1913 40.0219,-74.1539 40.0818,-74.1178 40.1417,-74.1017 40.1701)
+LINESTRING(-75.0948 39.8365,-75.0846 39.8258,-75.0699 39.8187,-75.0556 39.8012,-75.0469 39.7597,-75.0305 39.7474,-75.0129 39.7333,-74.9946 39.7197,-74.9766 39.7092,-74.964 39.7051,-74.9486 39.7015,-74.934 39.698,-74.9239 39.694,-74.9099 39.6822,-74.8976 39.6686,-74.8856 39.6548,-74.8722 39.6429,-74.8194 39.6083,-74.7482 39.5629,-74.6808 39.5175,-74.6395 39.4829,-74.637 39.4775,-74.6329 39.4675,-74.6296 39.4591,-74.6263 39.4507,-74.6077 39.4431,-74.5893 39.4326,-74.5713 39.4213,-74.5536 39.4109)
+LINESTRING(-89.016 41.9049,-88.9548 41.9025,-88.8936 41.9016,-88.8324 41.9017,-88.7712 41.902,-88.7425 41.9028,-88.7074 41.9037,-88.6729 41.9023,-88.6461 41.8962,-88.6332 41.889,-88.6214 41.8811,-88.6086 41.874,-88.5922 41.869,-88.5743 41.8664,-88.557 41.864,-88.5399 41.8606,-88.5227 41.8549,-88.5116 41.848,-88.504 41.8399,-88.4972 41.8322,-88.4886 41.8265,-88.4414 41.8084,-88.4042 41.7987,-88.3647 41.7957,-88.3105 41.7977,-88.2422 41.8007,-88.1726 41.8028,-88.1033 41.8062,-88.0361 41.8131,-88.0223 41.8236,-88.0096 41.8324,-87.9945 41.8391,-87.9733 41.8437,-87.9666 41.844,-87.9598 41.8438,-87.953 41.8438,-87.9461 41.8447)
+LINESTRING(-74.5536 39.4109,-74.5302 39.404,-74.5227 39.4014,-74.501 39.3912,-74.4812 39.3797,-74.4607 39.3684,-74.437 39.3592)
+LINESTRING(-112.202 41.7096,-112.174 41.7669,-112.17 41.8541,-112.179 41.9421,-112.188 42.0016,-112.188 42.0018)
+LINESTRING(-112.202 41.7096,-112.242 41.7339,-112.264 41.7684,-112.293 41.8008,-112.357 41.8187,-112.37 41.8188,-112.384 41.8179,-112.398 41.8167,-112.412 41.8163,-112.44 41.8383,-112.453 41.8579,-112.472 41.8753,-112.518 41.8905,-112.531 41.893,-112.543 41.8947,-112.556 41.895,-112.569 41.8933,-112.575 41.9015,-112.615 41.917,-112.648 41.9366,-112.678 41.9538,-112.71 41.9621,-112.755 41.9638,-112.785 41.9669,-112.808 41.9769,-112.833 41.9992,-112.834 41.9996)
+LINESTRING(-81.5019 41.0667,-81.4966 41.0091,-81.4878 40.9879,-81.467 40.9701,-81.4255 40.9227,-81.4267 40.9141,-81.4312 40.903,-81.4359 40.891,-81.4377 40.8792,-81.4316 40.8689,-81.4183 40.8521,-81.4046 40.8301,-81.3969 40.804,-81.3957 40.8007,-81.393 40.796,-81.3901 40.7909,-81.3881 40.7867)
+LINESTRING(-75.6464 39.6877,-75.6558 39.6835,-75.664 39.6784,-75.6718 39.6731,-75.6799 39.668,-75.703 39.6579,-75.7312 39.6494,-75.7607 39.643,-75.7875 39.6393)
+LINESTRING(-87.6398 41.8475,-87.6373 41.8435,-87.6348 41.8394,-87.6323 41.8354,-87.6298 41.8314,-87.6326 41.8164,-87.638 41.8018,-87.6415 41.7879,-87.6385 41.7747,-87.6159 41.754,-87.5921 41.7309,-87.569 41.7088,-87.5484 41.6911,-87.5352 41.6696,-87.5243 41.6482)
+LINESTRING(-105.022 42.2308,-105.043 42.2716,-105.055 42.2995,-105.059 42.328,-105.06 42.3708,-105.06 42.385,-105.062 42.3965,-105.064 42.408,-105.063 42.4225,-105.063 42.4318,-105.065 42.4412,-105.067 42.4506,-105.067 42.4599,-105.067 42.4672,-105.065 42.4746,-105.063 42.4819,-105.062 42.4893,-105.071 42.5185,-105.094 42.5479,-105.123 42.575,-105.151 42.5973,-105.166 42.611,-105.18 42.6264,-105.192 42.6423,-105.203 42.6576)
+LINESTRING(-87.1864 41.5694,-87.1579 41.5703,-87.1294 41.5711,-87.1008 41.572,-87.0723 41.5728,-87.0109 41.5743,-86.9621 41.5759,-86.9139 41.5804,-86.8541 41.5908,-86.8087 41.6037,-86.7618 41.623,-86.7148 41.6463,-86.6691 41.6711,-86.5596 41.7236,-86.482 41.7428,-86.4155 41.7411,-86.3389 41.731)
+LINESTRING(-86.6768 41.7605,-86.6829 41.7549,-86.7044 41.7374,-86.7275 41.7212,-86.7535 41.7057,-86.7728 41.6952,-86.7995 41.6813,-86.8298 41.666,-86.8602 41.6515,-86.8933 41.6391,-86.9336 41.6266,-86.9706 41.6157,-86.994 41.608,-87.0106 41.6032,-87.0351 41.5981,-87.0594 41.5934,-87.0755 41.5899,-87.1026 41.5841,-87.1305 41.5802,-87.1586 41.5761,-87.1864 41.5694)
+LINESTRING(-87.1864 41.5694,-87.2157 41.5684,-87.2449 41.5673,-87.2741 41.5663,-87.3034 41.5652)
+LINESTRING(-87.5243 41.6482,-87.5216 41.6428,-87.504 41.6197,-87.4789 41.6089,-87.4569 41.6077,-87.4349 41.6065,-87.4129 41.6051,-87.391 41.6032,-87.3729 41.6006,-87.3508 41.595,-87.3314 41.5886,-87.321 41.584,-87.3166 41.5793,-87.3122 41.5746,-87.3078 41.5699,-87.3034 41.5652)
+LINESTRING(-74.6442 39.3058,-74.6411 39.3184,-74.6408 39.3222,-74.6398 39.3283,-74.6382 39.3344,-74.6364 39.3383,-74.6206 39.3523,-74.5929 39.3753,-74.5662 39.398,-74.5536 39.4109)
+LINESTRING(-74.6515 39.2871,-74.6476 39.2924,-74.6442 39.3058)
+LINESTRING(-83.6685 41.0503,-83.6683 41.0789,-83.6683 41.1075,-83.6669 41.136,-83.6643 41.1468,-83.6596 41.1569,-83.6546 41.1668,-83.6511 41.177,-83.6509 41.1919,-83.6544 41.206,-83.6584 41.2193,-83.6593 41.2323,-83.6556 41.2419,-83.6485 41.2534,-83.6409 41.2661,-83.6357 41.2793,-83.6269 41.317,-83.619 41.356,-83.6139 41.3951,-83.6136 41.4333,-83.615 41.4372,-83.6176 41.4413,-83.6201 41.4455,-83.6213 41.4496,-83.6214 41.4702,-83.6216 41.4909,-83.6218 41.5115,-83.622 41.5322,-83.6136 41.5411,-83.6024 41.5525,-83.5911 41.5632,-83.5818 41.5705)
+LINESTRING(-87.4701 41.5423,-87.4295 41.5431,-87.3874 41.5506,-87.3451 41.5596,-87.3034 41.5652)
+LINESTRING(-87.5254 41.5517,-87.513 41.549,-87.4701 41.5423)
+LINESTRING(-87.7429 41.5683,-87.7318 41.5723,-87.7202 41.5767,-87.7084 41.5804,-87.6965 41.5822,-87.6902 41.5806,-87.6839 41.5791,-87.6777 41.5773,-87.6715 41.5755,-87.6356 41.5741,-87.5754 41.5624,-87.5254 41.5517)
+LINESTRING(-87.7429 41.5683,-87.7323 41.5778,-87.7217 41.5874,-87.7032 41.6034,-87.6864 41.617,-87.6925 41.6227,-87.6964 41.6274,-87.7019 41.631,-87.713 41.6337,-87.7178 41.639,-87.7219 41.646,-87.726 41.6532,-87.7308 41.6594,-87.7443 41.6685,-87.757 41.6734,-87.7726 41.6834,-87.7948 41.7079,-87.8012 41.7149,-87.8119 41.7255,-87.8231 41.7358,-87.8309 41.7416,-87.8366 41.7444,-87.8428 41.7478,-87.8497 41.7519,-87.8566 41.756)
+LINESTRING(-76.6622 39.7213,-76.6673 39.736,-76.6701 39.7729,-76.6758 39.797,-76.6833 39.8198,-76.6913 39.8421,-76.6984 39.8647,-76.6985 39.8709,-76.6968 39.8774,-76.6949 39.8832,-76.6968 39.895,-76.7 39.9042,-76.7026 39.9132,-76.7031 39.92,-76.6926 39.9321,-76.683 39.9407,-76.6808 39.9527,-76.6923 39.9748,-76.7012 39.9777,-76.7088 39.9785,-76.7164 39.9787,-76.7253 39.98,-76.7446 40.0147,-76.7612 40.0437,-76.7805 40.0736,-76.8081 40.1109,-76.8231 40.131,-76.8334 40.1461,-76.8425 40.16,-76.8539 40.1766,-76.8603 40.1852,-76.8666 40.1939,-76.873 40.2025,-76.8793 40.2112)
+LINESTRING(-87.3243 41.4688,-87.3201 41.4803,-87.3179 41.4939,-87.3185 41.5076,-87.3225 41.5192,-87.3199 41.5222,-87.3173 41.5252,-87.3147 41.5281,-87.3122 41.5311,-87.3122 41.5396,-87.3105 41.5486,-87.3075 41.5573,-87.3034 41.5652)
+LINESTRING(-78.432 40.4387,-78.4334 40.4257,-78.4347 40.4126,-78.4361 40.3996,-78.438 40.3865,-78.4433 40.3544,-78.4486 40.3223,-78.4539 40.2902,-78.4592 40.258,-78.4639 40.2348,-78.471 40.2115,-78.4809 40.1889,-78.4941 40.168,-78.5105 40.1452,-78.5254 40.1194,-78.5329 40.0933,-78.5279 40.0712)
+LINESTRING(-81.8083 41.3323,-81.8064 41.2907,-81.7977 41.2424,-81.791 41.1964,-81.795 41.1616,-81.8051 41.1475,-81.8195 41.1341,-81.8346 41.121,-81.8471 41.1077,-81.8534 41.0983,-81.8591 41.0892,-81.8658 41.0804,-81.8749 41.072,-81.8909 41.0622,-81.9207 41.0455,-81.9511 41.0295,-81.9691 41.022,-81.988 41.0219,-82.0099 41.0224,-82.0312 41.0209,-82.0483 41.0146,-82.053 41.0088,-82.0571 41.0003,-82.0616 40.9912,-82.0674 40.9838,-82.0927 40.9628,-82.1192 40.9422,-82.1462 40.9223,-82.1731 40.9031,-82.1793 40.8991,-82.1855 40.895,-82.193 40.8904,-82.1988 40.8872,-82.21 40.8818,-82.2213 40.8763,-82.2318 40.8711,-82.243 40.8653,-82.2508 40.8605,-82.2581 40.8553,-82.2656 40.8501,-82.2735 40.8454,-82.3031 40.8325,-82.3345 40.8219,-82.3656 40.8108,-82.3944 40.797,-82.4011 40.7932,-82.4071 40.7895,-82.4121 40.7852,-82.4157 40.7793)
+LINESTRING(-78.2437 39.9874,-78.2367 39.9881,-78.1882 40.0217,-78.1669 40.0272,-78.1501 40.0227,-78.118 40.0253,-78.0884 40.04,-78.0531 40.0396,-78.0133 40.0372,-77.9704 40.0463,-77.9499 40.0548,-77.9281 40.0625,-77.9057 40.0693,-77.8834 40.0747,-77.8685 40.0858,-77.8536 40.0878,-77.8252 40.0894,-77.7965 40.1075,-77.7667 40.1226,-77.7371 40.138,-77.7094 40.1572,-77.6957 40.1611,-77.6783 40.158,-77.6615 40.1517,-77.6498 40.1464,-77.6432 40.1469,-77.6297 40.1527,-77.6161 40.1585,-77.6022 40.1638,-77.5879 40.1683,-77.5729 40.1713,-77.5579 40.1729,-77.5428 40.1739,-77.5277 40.1751,-77.5094 40.1778,-77.4908 40.1816,-77.4723 40.1858,-77.4543 40.1896,-77.4104 40.1965,-77.3616 40.2021,-77.3126 40.2059,-77.2683 40.2075,-77.247 40.2087,-77.2249 40.2116,-77.2031 40.2156,-77.1827 40.22,-77.166 40.2231,-77.1549 40.2238,-77.1456 40.2236,-77.1339 40.2244)
+LINESTRING(-82.4157 40.7793,-82.4606 40.7765,-82.5057 40.7772,-82.5502 40.7768,-82.5935 40.7707,-82.6146 40.7764,-82.6382 40.7797,-82.6624 40.7822,-82.6852 40.7855)
+LINESTRING(-80.0924 40.6624,-80.0828 40.6622,-80.0684 40.6597,-80.0537 40.6566,-80.0436 40.6543,-80.0412 40.6524,-80.0389 40.6504,-80.0366 40.6484,-80.0342 40.6464,-80.0098 40.6417,-79.9982 40.6416,-79.9912 40.6365,-79.9805 40.617,-79.978 40.6157,-79.9684 40.6154,-79.959 40.614,-79.9507 40.6108,-79.9443 40.6055,-79.9179 40.5963,-79.9019 40.5924,-79.8929 40.5915,-79.8876 40.5913,-79.8824 40.5893,-79.874 40.583,-79.8585 40.5698,-79.8322 40.5473,-79.8304 40.546,-79.8286 40.5447,-79.8267 40.5436,-79.8248 40.5424,-79.8233 40.5389,-79.8218 40.5354,-79.8204 40.5319,-79.8189 40.5284,-79.7954 40.5145,-79.7749 40.4906,-79.7592 40.4638,-79.7502 40.4412,-79.7501 40.4385,-79.7506 40.4358,-79.7426 40.4295,-79.7358 40.4217,-79.73 40.4146,-79.7251 40.4104,-79.6833 40.3866,-79.678 40.3702,-79.6872 40.3508,-79.689 40.3176,-79.6837 40.2955,-79.6784 40.285,-79.6697 40.2772,-79.6542 40.2633,-79.6498 40.2574,-79.6465 40.2511,-79.6428 40.2448,-79.6372 40.2391,-79.6293 40.2343,-79.6213 40.2307,-79.6134 40.2265,-79.6059 40.2201)
+LINESTRING(-78.2437 39.9874,-78.2603 39.9838,-78.276 39.9778,-78.2918 39.9718,-78.3083 39.9681,-78.353 39.9698,-78.4004 39.9816,-78.4433 40.0011,-78.4741 40.0259,-78.4841 40.0395,-78.4943 40.0529,-78.5073 40.0642,-78.5253 40.0712,-78.5279 40.0712)
+LINESTRING(-85.0008 41.7351,-85.0016 41.7185,-85.0024 41.7,-85.0045 41.6818,-85.0091 41.6662,-85.0197 41.6643,-85.0288 41.6598,-85.0365 41.6537,-85.0427 41.6471,-85.0416 41.6356,-85.0422 41.6239,-85.0436 41.6123,-85.0449 41.6008,-85.0469 41.5994,-85.0489 41.5981,-85.0509 41.5968,-85.0529 41.5954,-85.055 41.5544,-85.0534 41.5004,-85.0518 41.4513,-85.0534 41.4248,-85.063 41.4069,-85.0746 41.3865,-85.0847 41.3658,-85.0898 41.3475,-85.0894 41.324,-85.0862 41.2998,-85.0833 41.2758,-85.0838 41.2526,-85.0875 41.2463,-85.0954 41.2348,-85.1037 41.2227,-85.1084 41.2148,-85.1119 41.1909,-85.1151 41.1612,-85.1274 41.1364,-85.1583 41.1268)
+LINESTRING(-87.7429 41.5683,-87.7525 41.5633,-87.7678 41.5567,-87.7839 41.5512,-87.7956 41.549,-87.8234 41.5509,-87.854 41.5528,-87.8846 41.5534,-87.9121 41.551,-87.9188 41.5492,-87.9256 41.5465,-87.9324 41.5438,-87.9393 41.5418,-87.9679 41.534,-87.982 41.5267,-87.9897 41.5205,-87.9994 41.5162,-88.0228 41.514,-88.0602 41.5132,-88.0984 41.5133,-88.1245 41.5139,-88.1264 41.514,-88.1459 41.508,-88.163 41.4989,-88.1794 41.4906,-88.1968 41.487)
+LINESTRING(-88.1968 41.487,-88.197 41.4928,-88.1972 41.4986,-88.1974 41.5044,-88.1976 41.5102,-88.1814 41.5308,-88.1797 41.5478,-88.1823 41.5628,-88.1791 41.5776,-88.1749 41.5823,-88.1694 41.5868,-88.1647 41.5916,-88.1628 41.597,-88.1632 41.6072,-88.1637 41.6174,-88.1641 41.6276,-88.1645 41.6378,-88.1076 41.6864,-88.0277 41.7314,-87.9496 41.7664,-87.8985 41.7853)
+LINESTRING(-78.5279 40.0712,-78.5583 40.0708,-78.5826 40.0599,-78.6016 40.048,-78.619 40.0443,-78.6266 40.0443,-78.6355 40.0427,-78.6444 40.0411,-78.652 40.0411,-78.661 40.0409,-78.6721 40.0381,-78.6829 40.0338,-78.6908 40.0292,-78.6993 40.0266,-78.7112 40.0258,-78.7226 40.0249,-78.7297 40.0217,-78.7408 40.0115,-78.7531 40.0087,-78.7664 40.0102,-78.7805 40.0133,-78.8119 40.0129,-78.8374 40.0027,-78.8629 39.9906,-78.8945 39.9846,-78.9323 39.9861,-78.9701 39.9904,-79.0077 39.9966,-79.043 40.0034)
+LINESTRING(-79.043 40.0034,-79.0449 40.0137,-79.0511 40.0298,-79.0584 40.046,-79.0639 40.057,-79.0483 40.0842,-79.0156 40.1306,-78.9827 40.1781,-78.9667 40.2087,-78.9446 40.2165,-78.9252 40.2308,-78.9072 40.2475,-78.8895 40.2622,-78.8808 40.2663,-78.8708 40.2692,-78.8609 40.272,-78.8524 40.2758,-78.8483 40.2796,-78.845 40.2846,-78.8428 40.2901,-78.8419 40.2949,-78.8196 40.3121,-78.8131 40.3196,-78.811 40.325,-78.8022 40.3357,-78.7924 40.3398,-78.7868 40.341,-78.7709 40.3697,-78.7615 40.3985,-78.7591 40.4278,-78.7694 40.4558,-78.7562 40.4671,-78.7429 40.4733,-78.7272 40.477,-78.707 40.4809,-78.6877 40.473,-78.6679 40.4654,-78.6481 40.458,-78.6285 40.4503,-78.6186 40.4473,-78.6083 40.4454,-78.598 40.4434,-78.5879 40.4402,-78.5765 40.4434,-78.5662 40.4513,-78.5551 40.4605,-78.5412 40.4674,-78.5178 40.4675,-78.4894 40.46,-78.4615 40.4497,-78.4399 40.441,-78.432 40.4387)
+LINESTRING(-79.6059 40.2201,-79.5702 40.2052,-79.5371 40.1878,-79.5041 40.1699,-79.4692 40.1538,-79.4656 40.154,-79.462 40.1542,-79.4584 40.1543,-79.4548 40.1545,-79.453 40.1557,-79.4512 40.1568,-79.4481 40.1574,-79.4446 40.1578,-79.4411 40.1577,-79.438 40.157,-79.4236 40.1418,-79.4147 40.1313,-79.4035 40.1215,-79.382 40.1089,-79.3735 40.1096,-79.3653 40.1119,-79.3579 40.1154,-79.3516 40.1198,-79.3388 40.1222,-79.3254 40.1242,-79.3118 40.1262,-79.2983 40.1287,-79.2443 40.1056,-79.1732 40.0683,-79.1073 40.0339,-79.0691 40.0198,-79.0631 40.0148,-79.058 40.0095,-79.052 40.0053,-79.043 40.0034)
+LINESTRING(-75.0948 39.8365,-75.1029 39.8243,-75.1081 39.8082,-75.1122 39.7915,-75.117 39.7775,-75.1229 39.7674,-75.1294 39.7573,-75.1358 39.7472,-75.1412 39.737,-75.1416 39.6808,-75.11 39.6291,-75.0739 39.5859,-75.0603 39.5547,-75.0698 39.5205,-75.0746 39.4917,-75.0716 39.4633,-75.0575 39.4305,-75.05 39.4255,-75.0363 39.4196,-75.0224 39.4129,-75.0139 39.4058,-75.0118 39.3999,-75.0111 39.3936,-75.0113 39.3813,-75.0081 39.3656,-75.0009 39.3517,-74.9932 39.3369,-74.9883 39.3184,-74.9819 39.3129,-74.9764 39.3058,-74.9721 39.2983,-74.9696 39.2913,-74.9377 39.2466,-74.8746 39.183,-74.8561 39.1352,-74.8388 39.0792)
+LINESTRING(-77.1339 40.2244,-77.1452 40.2159,-77.1531 40.205,-77.1603 40.1944,-77.1696 40.1869,-77.184 40.1863,-77.199 40.1864,-77.2138 40.1863,-77.2274 40.1852,-77.2377 40.1819,-77.2521 40.1755,-77.2663 40.1686,-77.2758 40.1637,-77.3181 40.1437,-77.3799 40.1153,-77.4392 40.0874,-77.4736 40.0685,-77.4864 40.0568,-77.4975 40.0444,-77.5093 40.0322,-77.5241 40.0208,-77.5313 40.0169,-77.5379 40.0132,-77.5517 39.9978,-77.5634 39.9816,-77.5748 39.9655,-77.5876 39.9502,-77.5978 39.9476,-77.6093 39.9454,-77.62 39.9426,-77.6278 39.9383,-77.6603 39.8964,-77.696 39.8343,-77.7231 39.7724,-77.7297 39.7315,-77.7342 39.7262,-77.7398 39.7221)
+LINESTRING(-91.6305 41.6854,-91.6379 41.7056,-91.6409 41.7345,-91.6418 41.7645,-91.6432 41.7878,-91.6469 41.8032,-91.6523 41.8193,-91.6574 41.8354,-91.66 41.8512,-91.66 41.8734,-91.6588 41.8956,-91.6572 41.9179,-91.6565 41.9401,-91.6587 41.9516,-91.6637 41.9627,-91.6687 41.9733,-91.6707 41.9835,-91.6702 41.9904,-91.6693 41.998,-91.6689 42.0055,-91.6694 42.0121,-91.6832 42.0425,-91.7125 42.1002,-91.7437 42.1585,-91.7635 42.1911,-91.7889 42.2138,-91.8238 42.2372,-91.8618 42.2582,-91.897 42.274,-91.9151 42.2798,-91.9337 42.2841,-91.9523 42.2882,-91.9703 42.2936,-92.0224 42.3131,-92.0872 42.342,-92.1529 42.3808,-92.2077 42.4302)
+LINESTRING(-90.5632 41.5933,-90.5313 41.5946,-90.4698 41.5966,-90.4061 41.5959,-90.3674 41.5896,-90.3636 41.5813,-90.363 41.5808)
+LINESTRING(-90.5632 41.5933,-90.5649 41.6622,-90.5669 41.7312,-90.5683 41.8002,-90.5683 41.8691)
+LINESTRING(-91.6305 41.6854,-91.5683 41.6833,-91.5256 41.6798,-91.4825 41.6722,-91.4193 41.6577,-91.3859 41.6526,-91.35 41.6511,-91.3141 41.6518,-91.2805 41.6531,-91.2414 41.6523,-91.2053 41.6482,-91.1697 41.643,-91.1316 41.6386,-91.0761 41.6361,-91.0204 41.6359,-90.9649 41.6356,-90.91 41.633,-90.8843 41.6299,-90.8585 41.6254,-90.8328 41.6205,-90.8074 41.6159,-90.7467 41.6067,-90.686 41.5994,-90.625 41.5947,-90.5632 41.5933)
+LINESTRING(-80.0924 40.6624,-80.0933 40.6579,-80.0927 40.6534,-80.0915 40.6488,-80.0905 40.6443,-80.0905 40.6283,-80.0937 40.6145,-80.0975 40.6017,-80.0994 40.5888,-80.1033 40.5875,-80.1071 40.5861,-80.111 40.5848,-80.1149 40.5835,-80.1169 40.5802,-80.118 40.5768,-80.1185 40.5733,-80.1186 40.5698,-80.1205 40.5533,-80.1245 40.5374,-80.1305 40.5219,-80.1381 40.5063,-80.1359 40.5019,-80.1326 40.5003,-80.1292 40.4996,-80.1269 40.4979,-80.127 40.4959,-80.1286 40.4942,-80.13 40.4926,-80.1297 40.4906,-80.1169 40.4704,-80.1131 40.4551,-80.1115 40.4406,-80.1054 40.4231,-80.1041 40.4176,-80.1047 40.4117,-80.1055 40.4057,-80.1052 40.3999,-80.1033 40.395,-80.1011 40.3903,-80.0997 40.3855,-80.1002 40.3801,-80.1032 40.3769,-80.1073 40.3743,-80.112 40.3722,-80.1168 40.3707,-80.1184 40.3658,-80.1182 40.3593,-80.1178 40.3526,-80.1189 40.3475,-80.1305 40.3354,-80.1432 40.3274,-80.1556 40.3155,-80.1658 40.2921,-80.1631 40.2865,-80.1605 40.2809,-80.158 40.2753,-80.1559 40.2696,-80.1564 40.2681,-80.157 40.2666,-80.1575 40.2651,-80.1581 40.2636,-80.164 40.2595,-80.1704 40.2563,-80.1771 40.2537,-80.1841 40.2508,-80.2083 40.2347,-80.228 40.2137,-80.2413 40.1956,-80.2462 40.1878)
+LINESTRING(-84.0046 40.8108,-83.9991 40.814,-83.9935 40.8173,-83.988 40.8205,-83.9824 40.8238,-83.9784 40.8254,-83.9739 40.8266,-83.9694 40.8278,-83.965 40.8299,-83.9607 40.8336,-83.9574 40.8378,-83.9542 40.8419,-83.9501 40.8455,-83.9363 40.854,-83.9225 40.8626,-83.9087 40.8711,-83.8949 40.8796,-83.8813 40.8864,-83.8637 40.8935,-83.8454 40.9003,-83.8303 40.9062,-83.7909 40.9268,-83.739 40.9591,-83.6927 40.9938,-83.6705 41.0216,-83.6685 41.0503)
+LINESTRING(-80.2462 40.1878,-80.2447 40.1881,-80.2432 40.1883,-80.2296 40.1818,-80.2179 40.1734,-80.2065 40.1653,-80.1939 40.1599)
+LINESTRING(-79.6059 40.2201,-79.6305 40.214,-79.6472 40.2132,-79.6603 40.2133,-79.6737 40.2099,-79.6768 40.208,-79.6796 40.2055,-79.6819 40.2028,-79.6842 40.2002,-79.6928 40.1942,-79.7107 40.1825,-79.7291 40.1708,-79.7391 40.1647,-79.7526 40.1607,-79.7679 40.159,-79.7835 40.1582,-79.7978 40.1564,-79.814 40.1519,-79.8357 40.1446,-79.8574 40.1364,-79.8734 40.1296,-79.8809 40.1241,-79.8897 40.116,-79.8986 40.1086,-79.9062 40.105,-79.9094 40.1054,-79.9126 40.1063,-79.9157 40.1075,-79.9184 40.1088,-79.934 40.1085,-79.9443 40.114,-79.9519 40.122,-79.9594 40.1289,-79.9688 40.1328,-79.9775 40.1332,-79.9865 40.1325,-79.9968 40.1331,-80.0247 40.1427,-80.0603 40.1564,-80.0974 40.1637,-80.1299 40.154,-80.1501 40.1537,-80.1601 40.1569,-80.1664 40.1616,-80.1755 40.1657,-80.1795 40.1655,-80.1847 40.1637,-80.1893 40.1618,-80.1939 40.1599)
+LINESTRING(-90.3343 41.5354,-90.2985 41.5357,-90.2733 41.5402,-90.2518 41.5508,-90.2267 41.5693,-90.2185 41.5757,-90.2102 41.582,-90.2028 41.5886,-90.1963 41.5961,-90.1935 41.6036,-90.1924 41.6128,-90.1908 41.6216,-90.1867 41.6275,-90.1687 41.6409,-90.1508 41.656,-90.1326 41.6704,-90.1135 41.6819,-90.0599 41.7007,-90.0031 41.7136,-89.9463 41.7263,-89.8926 41.7445,-89.8413 41.7654,-89.8106 41.7679,-89.7859 41.7611,-89.7523 41.7539,-89.7005 41.7528,-89.6416 41.7584,-89.5851 41.7707,-89.5407 41.7896,-89.4723 41.82,-89.4126 41.826,-89.3514 41.8245,-89.2783 41.8321,-89.2487 41.8409,-89.2214 41.8525,-89.1946 41.8646,-89.1666 41.875,-89.1492 41.8795,-89.1309 41.8833,-89.1123 41.8869,-89.0944 41.8907,-89.0743 41.8958,-89.0612 41.8994,-89.045 41.9022,-89.016 41.9049)
+LINESTRING(-90.363 41.5808,-90.3551 41.5755,-90.3444 41.5709,-90.3341 41.5663,-90.3341 41.5585,-90.3342 41.5508,-90.3342 41.5431,-90.3343 41.5354)
+LINESTRING(-75.502 39.1638,-75.5085 39.1843,-75.5256 39.2015,-75.5459 39.2174,-75.5621 39.2337,-75.565 39.2424,-75.5703 39.2603,-75.5745 39.2748,-75.5787 39.2893,-75.5865 39.3077,-75.5967 39.3187,-75.6113 39.3264,-75.6316 39.3348)
+LINESTRING(-107.183 41.7887,-107.192 41.7851,-107.2 41.7814,-107.209 41.7777,-107.218 41.774,-107.227 41.775,-107.236 41.7763,-107.245 41.7777,-107.254 41.7792,-107.271 41.7801,-107.287 41.779,-107.303 41.7773,-107.321 41.7768,-107.337 41.779,-107.354 41.7835,-107.37 41.7884,-107.386 41.7921,-107.39 41.7922,-107.394 41.7922,-107.397 41.792,-107.401 41.7918,-107.444 41.7803,-107.493 41.7669,-107.542 41.7553,-107.586 41.7493,-107.616 41.7477,-107.645 41.7455,-107.674 41.7424,-107.704 41.7379,-107.737 41.7296,-107.771 41.7191,-107.806 41.7096,-107.84 41.7041,-107.86 41.7038,-107.88 41.7047,-107.9 41.7047,-107.921 41.7019,-107.94 41.6953,-107.958 41.6866,-107.975 41.6784,-107.995 41.6733,-108.03 41.6685,-108.065 41.6637,-108.101 41.659,-108.136 41.6542,-108.189 41.6467,-108.243 41.6396,-108.296 41.6342,-108.35 41.632,-108.423 41.634,-108.496 41.6391,-108.569 41.6446,-108.642 41.6481,-108.658 41.6481,-108.674 41.6479,-108.69 41.648,-108.706 41.6491,-108.751 41.6727,-108.799 41.687,-108.85 41.6937,-108.906 41.6942,-108.913 41.6907,-108.92 41.6856,-108.927 41.6798,-108.931 41.674,-108.966 41.6673,-108.987 41.6592,-109.007 41.6496,-109.036 41.6387,-109.045 41.6368,-109.055 41.6358,-109.064 41.6347,-109.073 41.633,-109.104 41.6234,-109.134 41.6133,-109.165 41.6032,-109.196 41.5937,-109.199 41.5958,-109.201 41.598,-109.203 41.6002,-109.205 41.6023,-109.222 41.6081,-109.238 41.6023,-109.249 41.5901,-109.256 41.5768,-109.279 41.5682,-109.295 41.5618,-109.311 41.556,-109.334 41.5495,-109.351 41.5468,-109.37 41.5452,-109.389 41.5433,-109.403 41.5397,-109.423 41.5468,-109.445 41.56,-109.475 41.5721,-109.514 41.5761,-109.536 41.5707,-109.572 41.5596,-109.607 41.5486,-109.625 41.5436,-109.686 41.5436,-109.746 41.5436,-109.807 41.5436,-109.868 41.5435,-109.879 41.544,-109.889 41.5452,-109.9 41.5464,-109.911 41.547)
+LINESTRING(-78.0977 39.7238,-78.1136 39.7254,-78.1345 39.7237)
+LINESTRING(-78.2437 39.9874,-78.2443 39.9861,-78.2397 39.9725,-78.2304 39.9645,-78.2226 39.9568,-78.2223 39.944,-78.2379 39.9166,-78.2633 39.8707,-78.278 39.8247,-78.2615 39.7969,-78.2509 39.795,-78.2399 39.7947,-78.2288 39.7944,-78.2183 39.7922,-78.2135 39.7865,-78.2111 39.7789,-78.2097 39.7709,-78.2079 39.7637,-78.2014 39.7593,-78.1956 39.7544,-78.1905 39.7491,-78.1862 39.7434,-78.1866 39.7354,-78.1865 39.7256,-78.1863 39.7236)
+LINESTRING(-75.7875 39.6393,-75.7876 39.6393,-75.8008 39.6397,-75.8154 39.642,-75.8303 39.6446,-75.8441 39.6457,-75.8569 39.6445,-75.8719 39.6418,-75.8878 39.6445,-75.8978 39.642,-75.9075 39.6417,-75.9172 39.6432,-75.9271 39.6463,-75.9739 39.6281,-76.0226 39.6117,-76.0717 39.5961,-76.1196 39.5797,-76.15 39.5638,-76.1742 39.5434,-76.196 39.5212,-76.2189 39.5001,-76.2263 39.4961,-76.2355 39.4932,-76.2451 39.4906,-76.2537 39.4877,-76.2692 39.4791,-76.2839 39.4691,-76.2987 39.4594,-76.3145 39.452,-76.3346 39.4469,-76.3543 39.4434,-76.3737 39.4391,-76.3928 39.4315,-76.4198 39.4131,-76.4439 39.3918,-76.4681 39.3715,-76.5017 39.3535)
+LINESTRING(-76.5017 39.3535,-76.5126 39.3651,-76.5287 39.3781,-76.5466 39.3895,-76.5631 39.3961,-76.5727 39.4072,-76.5788 39.4126,-76.5848 39.4158,-76.5931 39.4158,-76.6014 39.4157,-76.6096 39.4152,-76.6176 39.4138,-76.6245 39.4152,-76.6312 39.4171,-76.6379 39.4193,-76.6443 39.4216,-76.645 39.4312,-76.6435 39.4407,-76.6534 39.4531,-76.6601 39.4568,-76.6642 39.4645,-76.6662 39.4889,-76.6695 39.5247,-76.6749 39.5601,-76.6788 39.5955,-76.6777 39.6309,-76.6718 39.6426,-76.6617 39.6498,-76.6519 39.6606,-76.6466 39.6832,-76.6503 39.6959,-76.6589 39.7119,-76.6622 39.7213)
+LINESTRING(-78.1345 39.7237,-78.1405 39.7232,-78.1658 39.7165,-78.1828 39.7079)
+LINESTRING(-78.1863 39.7236,-78.1853 39.7158,-78.1828 39.7079)
+LINESTRING(-88.1968 41.487,-88.203 41.4875,-88.2094 41.4875,-88.2158 41.4871,-88.2219 41.4863,-88.2288 41.4809,-88.2356 41.4754,-88.2425 41.4699,-88.2493 41.4644,-88.2607 41.4629,-88.276 41.4622,-88.2914 41.462,-88.3033 41.4622,-88.3377 41.4422,-88.3832 41.4148,-88.4259 41.3905,-88.4516 41.3799,-88.5327 41.3788,-88.6138 41.3774,-88.6949 41.3764,-88.776 41.3763,-88.8002 41.3759,-88.8168 41.3745,-88.8321 41.3721,-88.8526 41.3685,-88.8932 41.366,-88.9505 41.3661,-89.0103 41.3667,-89.0582 41.3662)
+LINESTRING(-89.016 41.9049,-89.0079 41.8755,-89.0055 41.8224,-89.0057 41.7655,-89.0055 41.7246,-89.0183 41.7113,-89.0354 41.6935,-89.0505 41.675,-89.057 41.6599,-89.0575 41.6333,-89.058 41.6068,-89.0584 41.5802,-89.0583 41.5537,-89.057 41.5444,-89.0544 41.5348,-89.0517 41.5255,-89.0505 41.5169,-89.0505 41.5052,-89.0504 41.4935,-89.0503 41.4818,-89.0502 41.4701,-89.0511 41.463,-89.0533 41.4563,-89.0554 41.4497,-89.0565 41.4429,-89.057 41.4238,-89.0574 41.4046,-89.0578 41.3854,-89.0582 41.3662)
+LINESTRING(-77.7398 39.7221,-77.7398 39.7221,-77.7401 39.7172,-77.7412 39.7128,-77.7425 39.7086,-77.7434 39.704,-77.7429 39.6981,-77.7408 39.6922,-77.7386 39.6862,-77.7373 39.6805,-77.7417 39.6673,-77.7532 39.6563,-77.7672 39.6465,-77.779 39.6369,-77.7836 39.6304,-77.7873 39.6233,-77.7908 39.616,-77.795 39.6092)
+LINESTRING(-77.795 39.6092,-77.8028 39.6253,-77.814 39.6372,-77.8288 39.6463,-77.8477 39.6523,-77.8854 39.6563,-77.9497 39.6523,-77.9874 39.6562,-78.0176 39.6697,-78.0574 39.7093,-78.0876 39.7228,-78.0977 39.7238)
+LINESTRING(-77.795 39.6092,-77.7975 39.6072,-77.8001 39.6053,-77.8026 39.6034,-77.8051 39.6014,-77.8226 39.5974,-77.8368 39.5936)
+LINESTRING(-114.955 41.1003,-115.002 41.0899,-115.051 41.0787,-115.102 41.07,-115.154 41.0668,-115.191 41.0726,-115.226 41.084,-115.262 41.0939,-115.298 41.0953,-115.349 41.0853,-115.391 41.0712,-115.431 41.0529,-115.475 41.0304,-115.491 41.0208,-115.505 41.0118,-115.521 41.0042,-115.54 40.9994,-115.565 40.998,-115.609 41.0016,-115.634 41.0002,-115.679 40.9864,-115.712 40.9633,-115.741 40.935,-115.776 40.9056,-115.809 40.8846,-115.842 40.8685,-115.874 40.8529,-115.91 40.8335,-115.922 40.8231,-115.932 40.8121,-115.943 40.8028,-115.959 40.7972,-116.066 40.7814,-116.079 40.7758,-116.145 40.7553,-116.249 40.6934,-116.315 40.6728,-116.346 40.6692,-116.374 40.6685,-116.402 40.6715,-116.431 40.6787,-116.449 40.6846,-116.465 40.6897,-116.482 40.6925,-116.501 40.6916,-116.542 40.6801,-116.61 40.6473,-116.652 40.6357,-116.664 40.6344,-116.687 40.6334,-116.699 40.632,-116.729 40.621,-116.772 40.5859,-116.801 40.5749,-116.806 40.5743,-116.81 40.574,-116.813 40.5726,-116.845 40.5709,-116.873 40.5757,-116.9 40.5858,-116.927 40.6002,-116.979 40.6315,-117.003 40.646,-117.031 40.6621,-117.083 40.6944,-117.125 40.7263,-117.165 40.7595,-117.212 40.7962,-117.262 40.8283,-117.312 40.8508,-117.367 40.8678,-117.43 40.883,-117.49 40.9081,-117.539 40.9414,-117.589 40.9679,-117.65 40.9722,-117.679 40.966,-117.704 40.9569,-117.725 40.944,-117.743 40.9262)
+LINESTRING(-90.335 41.4423,-90.3356 41.4655,-90.3352 41.4888,-90.3345 41.5122,-90.3343 41.5354)
+LINESTRING(-89.0582 41.3662,-89.0637 41.366,-89.0688 41.3669,-89.0733 41.3688,-89.0772 41.3717,-89.0824 41.3724,-89.0878 41.3728,-89.0932 41.3727,-89.0986 41.3727,-89.1091 41.3682,-89.1247 41.366,-89.141 41.3653,-89.1537 41.3652,-89.1916 41.3655,-89.222 41.3685,-89.251 41.3754,-89.2846 41.3877,-89.2915 41.3908,-89.2988 41.3944,-89.3063 41.3977,-89.3133 41.4,-89.3397 41.4023,-89.3692 41.4007,-89.3986 41.3974,-89.4247 41.3947,-89.4402 41.3948,-89.4563 41.3965,-89.4729 41.3979,-89.4896 41.3974,-89.5021 41.3952,-89.5145 41.3921,-89.5268 41.3891,-89.5392 41.387,-89.5448 41.3874,-89.5497 41.3895,-89.5544 41.3919,-89.5594 41.3938,-89.5731 41.3954,-89.5883 41.3955,-89.6036 41.395,-89.6176 41.3946,-89.6443 41.3929,-89.6705 41.3893,-89.6969 41.3857,-89.7241 41.384,-89.7482 41.3838,-89.7769 41.3837,-89.805 41.3845,-89.8275 41.387,-89.8543 41.3937,-89.8866 41.4029,-89.9188 41.4114,-89.9452 41.4161,-89.957 41.4149,-89.9663 41.4107,-89.979 41.4065,-90.0009 41.405,-90.0047 41.4073,-90.0086 41.4096,-90.0124 41.4118,-90.0163 41.4141,-90.0437 41.4132,-90.0747 41.4121,-90.1055 41.412,-90.1326 41.414,-90.1495 41.4197,-90.1617 41.4281,-90.1806 41.4358,-90.218 41.4399,-90.2473 41.4405,-90.2765 41.4411,-90.3058 41.4417,-90.335 41.4423)
+LINESTRING(-80.5194 40.0915,-80.5116 40.0957,-80.4943 40.1028,-80.4753 40.1059,-80.456 40.1056,-80.4366 40.1043,-80.4174 40.1041,-80.4128 40.1049,-80.4086 40.1063,-80.4008 40.11,-80.3783 40.1194,-80.3545 40.1277,-80.3302 40.1354,-80.3064 40.1429,-80.295 40.1503,-80.2823 40.1625,-80.2674 40.176,-80.2462 40.1878)
+LINESTRING(-112.202 41.7096,-112.192 41.7023,-112.178 41.696,-112.164 41.6905,-112.152 41.6855,-112.14 41.6784,-112.13 41.6712,-112.12 41.6638,-112.109 41.656,-112.086 41.6411,-112.067 41.6262,-112.054 41.6092,-112.049 41.5957,-112.048 41.5938,-112.047 41.5911,-112.047 41.5899,-112.047 41.5879,-112.043 41.5681,-112.037 41.5402,-112.032 41.5124,-112.027 41.4846,-112.024 41.4385,-112.021 41.3924,-112.018 41.3462,-112.015 41.3001,-112.013 41.2924,-112.012 41.2848,-112.01 41.2771,-112.009 41.2694,-112.006 41.244,-112.006 41.2214,-112.009 41.1987,-112.013 41.1791)
+LINESTRING(-76.5017 39.3535,-76.529 39.3361,-76.5422 39.3206,-76.5478 39.3027,-76.5521 39.2777)
+LINESTRING(-93.5762 41.6436,-93.545 41.6462,-93.5155 41.654,-93.4868 41.6636,-93.4576 41.6718,-93.4185 41.681,-93.3783 41.6914,-93.3387 41.7012,-93.3012 41.7088,-93.2761 41.7143,-93.2474 41.7212,-93.2187 41.7269,-93.1934 41.7285,-93.1718 41.7243,-93.1535 41.7167,-93.14 41.7082,-93.1329 41.702,-93.0751 41.6935,-93.02 41.6886,-92.9647 41.6863,-92.9061 41.6858,-92.8825 41.6863,-92.8597 41.6873,-92.8366 41.6886,-92.8121 41.6895,-92.6992 41.6899,-92.5859 41.6877,-92.4726 41.6855,-92.3597 41.6862,-92.3079 41.6891,-92.2556 41.6934,-92.2033 41.6973,-92.1517 41.6988,-92.1201 41.6969,-92.0864 41.6929,-92.0527 41.688,-92.021 41.6837,-91.9431 41.6808,-91.8381 41.6827,-91.7269 41.6855,-91.6305 41.6854)
+LINESTRING(-93.5762 41.6436,-93.5717 41.7133,-93.5704 41.7835,-93.5713 41.8538,-93.5732 41.9236,-93.5753 41.9441,-93.5789 41.9651,-93.582 41.9858,-93.5828 42.0059,-93.5791 42.0748,-93.5754 42.1438,-93.5721 42.2127,-93.5695 42.2817,-93.5686 42.3226,-93.5689 42.3631,-93.5708 42.4037,-93.5746 42.4448)
+LINESTRING(-76.5521 39.2777,-76.5621 39.2702)
+LINESTRING(-109.911 41.547,-109.936 41.5357,-109.961 41.5244,-109.986 41.5131,-110.011 41.5018,-110.016 41.4973,-110.026 41.4883,-110.036 41.4787,-110.045 41.4723,-110.073 41.4551,-110.114 41.4311,-110.154 41.4078,-110.183 41.3928,-110.193 41.3905,-110.2 41.3894,-110.229 41.3823,-110.249 41.3782,-110.27 41.375,-110.294 41.3713,-110.306 41.3684,-110.317 41.3642,-110.328 41.3599,-110.339 41.3569,-110.365 41.3533,-110.383 41.3513,-110.4 41.3456,-110.428 41.3307,-110.456 41.3297,-110.489 41.3224,-110.521 41.3126,-110.547 41.3044,-110.589 41.2984,-110.644 41.2974,-110.696 41.3022,-110.728 41.3134)
+LINESTRING(-110.728 41.3134,-110.737 41.3124,-110.749 41.3103,-110.76 41.3071,-110.768 41.3029,-110.786 41.2925,-110.8 41.2808,-110.822 41.2727,-110.861 41.2732,-110.889 41.2682,-110.912 41.2681,-110.932 41.269,-110.949 41.2667,-110.974 41.2619,-110.994 41.2556,-111.009 41.2495,-111.023 41.2454,-111.037 41.2441,-111.045 41.2438)
+LINESTRING(-93.5909 41.5982,-93.5835 41.6086,-93.5793 41.62,-93.5773 41.6318,-93.5762 41.6436)
+LINESTRING(-80.754 40.062,-80.7336 40.0632,-80.723 40.0635)
+LINESTRING(-80.7391 41.0366,-80.736 41.0224,-80.7309 41.009,-80.7252 40.9959,-80.7209 40.9824,-80.7175 40.9548,-80.7178 40.9262,-80.721 40.8977,-80.7262 40.8704,-80.7288 40.867,-80.7312 40.8632,-80.7329 40.8456,-80.7346 40.8281,-80.7366 40.8066,-80.7371 40.7961,-80.7196 40.7549,-80.6997 40.7277,-80.6675 40.7096,-80.6128 40.6955,-80.6092 40.6927,-80.6012 40.6854,-80.5928 40.6755,-80.588 40.6649,-80.5972 40.6485,-80.6245 40.6419,-80.658 40.6383,-80.6857 40.6307,-80.7064 40.613,-80.7178 40.5912,-80.7202 40.5691,-80.7137 40.5501,-80.7067 40.5459,-80.6995 40.542,-80.6927 40.5378,-80.687 40.5325,-80.6656 40.4946,-80.653 40.4519,-80.645 40.4128,-80.6374 40.3855,-80.6346 40.3838,-80.6318 40.3821,-80.6289 40.3803,-80.6261 40.3786,-80.6293 40.3739,-80.631 40.3713,-80.632 40.3691,-80.6349 40.3573,-80.638 40.3361,-80.6408 40.3243,-80.6547 40.3001,-80.6944 40.2644,-80.7083 40.2402,-80.71 40.2324,-80.7116 40.2186,-80.7133 40.2109,-80.723 40.1937,-80.7511 40.1667,-80.7608 40.1495,-80.7621 40.1417,-80.7618 40.1347,-80.761 40.1276,-80.7609 40.1196,-80.762 40.1045,-80.7618 40.0912,-80.7593 40.0782,-80.754 40.062)
+LINESTRING(-76.5912 39.234,-76.5925 39.2342,-76.5972 39.2348,-76.602 39.2354,-76.6067 39.236,-76.6107 39.234,-76.6148 39.232,-76.6188 39.2299,-76.6228 39.2279)
+LINESTRING(-80.723 40.0635,-80.7209 40.0636,-80.7132 40.0629,-80.7018 40.0582,-80.6863 40.0518,-80.6704 40.0461,-80.6578 40.0433,-80.6417 40.0462,-80.6111 40.0533,-80.5801 40.0611,-80.5631 40.0664,-80.5471 40.0755,-80.5296 40.0859,-80.5194 40.0915)
+LINESTRING(-76.5521 39.2777,-76.5935 39.2842,-76.6349 39.2906,-76.6763 39.297,-76.7177 39.3034,-76.7664 39.3055,-76.8082 39.2997,-76.8483 39.2927,-76.8919 39.2912,-76.9304 39.2975,-76.9689 39.3087,-77.0068 39.3216,-77.0439 39.3326,-77.081 39.3405,-77.119 39.3468,-77.1572 39.3529,-77.1948 39.3603,-77.2269 39.3685,-77.2586 39.3774,-77.2905 39.3856,-77.3233 39.3918,-77.3516 39.3944,-77.3798 39.3954,-77.408 39.3964,-77.4364 39.3992)
+LINESTRING(-77.795 39.6092,-77.7897 39.6055,-77.7838 39.6021,-77.7777 39.5991,-77.7717 39.5961,-77.7448 39.5965,-77.7183 39.5981,-77.6918 39.5995,-77.6648 39.599,-77.6429 39.5856,-77.6218 39.5699,-77.6045 39.552,-77.5937 39.5324,-77.5926 39.5274,-77.5919 39.5222,-77.5909 39.517,-77.5889 39.512,-77.5865 39.5095,-77.5687 39.4944,-77.548 39.4805,-77.5283 39.4665,-77.5138 39.4513,-77.5066 39.4402,-77.4981 39.428,-77.4881 39.4167,-77.4762 39.4083,-77.468 39.4052,-77.4569 39.4024,-77.4455 39.4002,-77.4364 39.3992)
+LINESTRING(-93.7842 41.5811,-93.735 41.5803,-93.6874 41.5817,-93.6405 41.5864,-93.5934 41.5955,-93.5921 41.5968,-93.5909 41.5982)
+LINESTRING(-114.955 41.1003,-114.932 41.0995,-114.893 41.1038,-114.851 41.1093,-114.822 41.1121,-114.771 41.1084,-114.73 41.0981,-114.691 41.0849,-114.647 41.0724,-114.634 41.0708,-114.605 41.0701,-114.59 41.0684,-114.58 41.0759,-114.571 41.0773,-114.562 41.0762,-114.551 41.0757,-114.534 41.0652,-114.519 41.053,-114.504 41.0404,-114.488 41.0288,-114.447 41.0024,-114.407 40.9751,-114.368 40.9472,-114.33 40.9192,-114.312 40.9102,-114.287 40.9016,-114.26 40.8928,-114.237 40.8833,-114.216 40.8621,-114.173 40.8213,-114.153 40.8008,-114.129 40.7755,-114.108 40.7566,-114.081 40.745,-114.041 40.741,-114.04 40.7412)
+LINESTRING(-96.3758 42.4416,-96.3767 42.4375,-96.3777 42.4333,-96.3787 42.4285,-96.361 42.3833,-96.3356 42.3447,-96.3074 42.3071,-96.2812 42.2678,-96.269 42.2418,-96.2587 42.2138,-96.2476 42.1863,-96.233 42.1615,-96.208 42.1311,-96.1819 42.1003,-96.1583 42.0685,-96.1409 42.0353,-96.1313 42.0202,-96.1171 42.0032,-96.104 41.9862,-96.0978 41.9712,-96.0978 41.9279,-96.0984 41.8977,-96.0905 41.8698,-96.0649 41.8333,-96.0593 41.8264,-96.0535 41.8197,-96.0468 41.8134,-96.0387 41.8079,-96.0304 41.7756,-96.0325 41.7425,-96.0356 41.7105,-96.0305 41.6814,-96.005 41.6497,-95.9754 41.6277,-95.9543 41.5996,-95.9544 41.5497,-95.9551 41.545,-95.9563 41.5386)
+LINESTRING(-76.1576 38.9808,-76.1996 38.9641,-76.2008 38.9643)
+LINESTRING(-94.9612 41.4913,-94.899 41.4907,-94.7703 41.4898,-94.7527 41.4905,-94.7332 41.4917,-94.7139 41.4924,-94.6967 41.4914,-94.6856 41.4886,-94.6752 41.4843,-94.665 41.4802,-94.6548 41.4778,-94.636 41.4788,-94.6168 41.4836,-94.5974 41.4888,-94.5778 41.4911,-94.4976 41.4901,-94.4174 41.489,-94.3373 41.4876,-94.2571 41.4862,-94.2396 41.489,-94.2235 41.4965,-94.2094 41.5064,-94.1979 41.5165,-94.1715 41.5178,-94.1449 41.5179,-94.1183 41.5173,-94.0918 41.5165,-94.0831 41.518,-94.0711 41.5215,-94.0611 41.5249,-94.051 41.5282,-93.9935 41.5409,-93.9414 41.5465,-93.8938 41.5502,-93.8498 41.5574,-93.8338 41.5633,-93.8175 41.5712,-93.8009 41.5781,-93.7842 41.5811)
+LINESTRING(-76.2008 38.9643,-76.2332 38.9684,-76.2488 38.9724)
+LINESTRING(-78.1828 39.7079,-78.2058 39.6993,-78.2307 39.6966,-78.2535 39.6951,-78.2705 39.6901,-78.2827 39.6922,-78.2886 39.6945,-78.2998 39.6994,-78.3118 39.6974,-78.3209 39.6956,-78.3305 39.6974,-78.3459 39.6978,-78.356 39.698,-78.3661 39.6983,-78.3768 39.6977,-78.3798 39.6916,-78.384 39.686,-78.3893 39.6811,-78.3959 39.677,-78.4537 39.6642,-78.5015 39.6776,-78.5438 39.699,-78.5852 39.7095,-78.5957 39.7087,-78.6055 39.7043,-78.6126 39.7007,-78.6264 39.6945,-78.6433 39.6868,-78.6603 39.6799,-78.675 39.6761,-78.6869 39.6759,-78.6989 39.6759,-78.7144 39.6727,-78.7287 39.6676,-78.7431 39.6626,-78.7596 39.6599,-78.763 39.6526,-78.7708 39.6491,-78.7797 39.6466,-78.7888 39.644,-78.7974 39.64,-78.8265 39.6449,-78.8543 39.6454,-78.8823 39.6444,-78.9122 39.6451,-78.9326 39.6493,-78.9578 39.6575,-78.9829 39.667,-79.0031 39.6753,-79.02 39.6732,-79.0372 39.6713,-79.0546 39.6699,-79.0717 39.669,-79.0882 39.6707,-79.107 39.675,-79.1261 39.6799,-79.1437 39.6831,-79.1658 39.6848,-79.1875 39.6856,-79.2091 39.6854,-79.231 39.6842,-79.2573 39.6849,-79.2757 39.6882,-79.2963 39.6879,-79.3295 39.6781,-79.34 39.674,-79.3502 39.6695,-79.3595 39.6641,-79.3672 39.6573,-79.3804 39.6546,-79.3941 39.6513,-79.4079 39.6484,-79.4213 39.6469,-79.4351 39.6472,-79.4488 39.6481,-79.4626 39.6489,-79.4769 39.6488,-79.4779 39.6488)
+LINESTRING(-76.3452 38.9788,-76.3703 38.9847,-76.3958 38.9979,-76.4016 39.0064)
+LINESTRING(-76.2488 38.9724,-76.2663 38.977,-76.3069 38.9733,-76.3389 38.9773,-76.3452 38.9788)
+LINESTRING(-95.5802 41.492,-95.5372 41.4922,-95.4941 41.4924,-95.451 41.4926,-95.408 41.4928,-95.3955 41.4922,-95.3832 41.4906,-95.371 41.4889,-95.3588 41.4876,-95.3407 41.4878,-95.3222 41.4894,-95.3037 41.4913,-95.2853 41.4923,-95.1566 41.4927,-95.0278 41.4919,-94.9612 41.4913)
+LINESTRING(-81.5444 39.9966,-81.524 40.0019,-81.5079 40.0057,-81.4919 40.0102,-81.4721 40.0173,-81.4676 40.0191,-81.463 40.0204,-81.45 40.0218,-81.4365 40.0219,-81.4231 40.0221,-81.4101 40.0236,-81.381 40.0302,-81.3534 40.0364,-81.3255 40.0419,-81.295 40.0461,-81.2683 40.0472,-81.242 40.0463,-81.2157 40.0456,-81.1893 40.0474,-81.1788 40.0501,-81.1666 40.0542,-81.155 40.0579,-81.1464 40.0591,-81.1333 40.0563,-81.1206 40.0519,-81.1081 40.0474,-81.095 40.0445,-81.0669 40.0462,-81.0251 40.0529,-80.9845 40.0615,-80.9599 40.0688,-80.9593 40.072,-80.9553 40.0733,-80.9398 40.0705,-80.9283 40.0671,-80.9172 40.0632,-80.9049 40.059,-80.8958 40.0585,-80.8824 40.0598,-80.8685 40.0615,-80.8579 40.0625,-80.8348 40.0599,-80.8088 40.055,-80.7834 40.0536,-80.7618 40.0617,-80.7579 40.0619,-80.754 40.062)
+LINESTRING(-81.3881 40.7867,-81.3869 40.7826,-81.3868 40.7792,-81.3874 40.7757,-81.3883 40.7717,-81.3912 40.77,-81.3948 40.7674,-81.3981 40.7647,-81.4 40.7623,-81.4122 40.7318,-81.4243 40.7003,-81.438 40.6693,-81.4552 40.6403,-81.4692 40.6242,-81.4855 40.6088,-81.5011 40.5932,-81.513 40.5768,-81.5073 40.5591,-81.4934 40.526,-81.4782 40.4906,-81.4686 40.4663,-81.4761 40.4517,-81.4888 40.4375,-81.5034 40.424,-81.5165 40.4118,-81.5236 40.3968,-81.5306 40.3719,-81.5364 40.3464,-81.54 40.3294,-81.5431 40.3047,-81.54 40.2928,-81.5338 40.2826,-81.5276 40.2631,-81.5276 40.248,-81.5316 40.2338,-81.537 40.2198,-81.541 40.2052,-81.5425 40.1826,-81.5422 40.1608,-81.544 40.1391,-81.5522 40.1165,-81.5529 40.1153,-81.5535 40.1141,-81.5542 40.1129,-81.5549 40.1117,-81.5491 40.0885,-81.5435 40.0701,-81.5442 40.0492,-81.5573 40.0189,-81.5551 40.0131,-81.5525 40.0072,-81.549 40.0016,-81.5444 39.9966)
+LINESTRING(-111.045 41.2438,-111.052 41.2436,-111.066 41.2413,-111.078 41.2349,-111.09 41.222,-111.098 41.2107,-111.11 41.1995,-111.13 41.1867,-111.134 41.1788,-111.137 41.1709,-111.14 41.163,-111.143 41.155,-111.163 41.1407,-111.182 41.1247,-111.2 41.1092,-111.22 41.0961,-111.274 41.0647,-111.331 41.0301,-111.389 40.9967,-111.443 40.9693)
+LINESTRING(-111.443 40.9693,-111.467 40.9947,-111.492 41.0195,-111.519 41.0432,-111.547 41.0655,-111.565 41.0635,-111.585 41.0592,-111.602 41.0548,-111.611 41.053,-111.618 41.0538,-111.625 41.0547,-111.632 41.0549,-111.639 41.0535,-111.645 41.0515,-111.651 41.0492,-111.656 41.047,-111.663 41.0454,-111.705 41.069,-111.735 41.095,-111.764 41.1202,-111.801 41.1414,-111.823 41.14,-111.844 41.137,-111.864 41.1337,-111.885 41.1315,-111.902 41.1319,-111.918 41.1338,-111.934 41.1361,-111.951 41.1375,-111.968 41.1472,-111.986 41.1569,-112.002 41.1678,-112.013 41.1791)
+LINESTRING(-80.1939 40.1599,-80.1962 40.1568,-80.1992 40.1538,-80.2026 40.1511,-80.2062 40.1442,-80.207 40.1398,-80.2079 40.1354,-80.2085 40.131,-80.2053 40.1108,-80.1964 40.0895,-80.1865 40.0682,-80.1801 40.0477,-80.1792 40.0279,-80.1812 40.0156,-80.1799 39.9989,-80.1693 39.9658,-80.1691 39.9627,-80.1666 39.9293,-80.1592 39.9141,-80.1478 39.9028,-80.1337 39.8809,-80.1248 39.8616,-80.1161 39.843,-80.1067 39.8246,-80.0956 39.8059,-80.0914 39.7955,-80.0899 39.7847,-80.0884 39.7738,-80.0839 39.7631,-80.0784 39.7555,-80.0729 39.7484,-80.068 39.7411,-80.0643 39.7327,-80.0632 39.7273,-80.0621 39.7219)
+LINESTRING(-117.743 40.9262,-117.754 40.9243,-117.766 40.9224,-117.778 40.9204,-117.79 40.9185,-117.8 40.917,-117.811 40.9155,-117.818 40.9145,-117.825 40.9136,-117.839 40.9063,-117.856 40.8992,-117.869 40.8938,-117.923 40.862,-117.937 40.8324,-117.938 40.7995,-117.941 40.7605,-117.944 40.744,-117.945 40.7304,-117.946 40.7169,-117.951 40.7004,-117.959 40.6793,-117.97 40.6618,-117.986 40.6487,-118.011 40.6407,-118.038 40.6344,-118.063 40.626,-118.089 40.6177,-118.115 40.6113,-118.15 40.6028,-118.179 40.5889,-118.201 40.568,-118.214 40.5382,-118.223 40.5178,-118.236 40.4971,-118.249 40.476,-118.256 40.4547,-118.261 40.426,-118.266 40.3967,-118.273 40.3675,-118.28 40.3392,-118.29 40.3226,-118.309 40.2991,-118.329 40.275,-118.343 40.2569,-118.358 40.2432,-118.368 40.2333,-118.377 40.2263,-118.391 40.2174,-118.405 40.2097,-118.421 40.2023,-118.436 40.1943,-118.455 40.182,-118.473 40.1686,-118.491 40.155,-118.509 40.1419,-118.542 40.1245,-118.58 40.1076,-118.616 40.0904,-118.644 40.0723,-118.666 40.0416,-118.678 40.0054,-118.688 39.9728,-118.703 39.9529,-118.713 39.949,-118.723 39.9456,-118.734 39.9424,-118.744 39.9394)
+LINESTRING(-95.9342 41.4886,-95.9013 41.4912,-95.8813 41.4912,-95.8613 41.4905,-95.8414 41.4902,-95.8276 41.4908,-95.8138 41.492,-95.8001 41.4934,-95.7864 41.4944,-95.74 41.4953,-95.6932 41.4946,-95.6463 41.4933,-95.5999 41.4921,-95.5802 41.492)
+LINESTRING(-95.9563 41.5386,-95.9583 41.5301,-95.9602 41.5215,-95.9618 41.5138,-95.9626 41.508,-95.9521 41.4961,-95.9342 41.4886)
+LINESTRING(-77.8368 39.5936,-77.855 39.5887,-77.8864 39.5798,-77.9011 39.5754,-77.9355 39.5434,-77.9655 39.4995,-77.9919 39.4531,-78.0159 39.4136,-78.0258 39.4012,-78.0366 39.3893,-78.0473 39.3773,-78.0566 39.3648,-78.0643 39.3508,-78.0708 39.3361,-78.0766 39.3214,-78.0825 39.3067,-78.0856 39.2989)
+LINESTRING(-76.4016 39.0064,-76.4104 39.0196,-76.4349 39.0273,-76.4621 39.0258,-76.4884 39.0182,-76.51 39.0072,-76.5218 38.9991,-76.5352 38.99,-76.5495 38.9821,-76.5643 38.9778,-76.5733 38.9772,-76.5825 38.9774,-76.5918 38.9775,-76.601 38.9767)
+LINESTRING(-76.601 38.9767,-76.6043 38.9857,-76.6108 38.9954,-76.6193 39.004,-76.629 39.01,-76.6284 39.0151,-76.6277 39.0201,-76.6271 39.0252,-76.6264 39.0303,-76.6323 39.0371,-76.6383 39.0439,-76.644 39.0508,-76.6498 39.0577,-76.6474 39.0615,-76.6417 39.0692,-76.6357 39.0776,-76.6323 39.0834,-76.6304 39.1009,-76.6349 39.1182,-76.643 39.135,-76.6522 39.1511,-76.6523 39.1678,-76.6426 39.1889,-76.6303 39.2104,-76.6228 39.2279)
+LINESTRING(-120.038 39.7739,-120.039 39.7596,-120.039 39.7448,-120.037 39.73,-120.034 39.7159,-120.026 39.7048,-120.009 39.6844,-120.002 39.6757)
+LINESTRING(-82.4157 40.7793,-82.4251 40.767,-82.4336 40.7543,-82.4425 40.7418,-82.4533 40.7303,-82.4744 40.7153,-82.4974 40.7025,-82.52 40.6891,-82.54 40.6727,-82.5573 40.6509,-82.5714 40.6278,-82.5851 40.6047,-82.6011 40.5829,-82.6135 40.5743,-82.631 40.567,-82.6491 40.56,-82.6634 40.5524,-82.6773 40.5397,-82.6904 40.5246,-82.7029 40.509,-82.7152 40.4948,-82.7335 40.4806,-82.761 40.4637,-82.7899 40.4476,-82.8123 40.4356,-82.8159 40.432,-82.8195 40.4168,-82.8234 40.3959,-82.8281 40.3761,-82.8337 40.3643,-82.8544 40.3507,-82.8841 40.3335,-82.9111 40.316,-82.9238 40.3015,-82.9274 40.2728,-82.9298 40.2442,-82.9314 40.2156,-82.9328 40.1867,-82.9387 40.1776,-82.9513 40.1687,-82.9644 40.159,-82.9717 40.1476,-82.9734 40.138,-82.9751 40.1283,-82.9769 40.1187,-82.9786 40.109)
+LINESTRING(-77.4364 39.3992,-77.4233 39.3823,-77.393 39.3543,-77.3602 39.325,-77.3395 39.3044,-77.3344 39.2943,-77.3314 39.2833,-77.3285 39.2724,-77.3236 39.2626,-77.3136 39.2522,-77.3012 39.2425,-77.2884 39.233,-77.2774 39.2231,-77.2715 39.2159,-77.2665 39.2081,-77.2615 39.2002,-77.2561 39.1927,-77.2269 39.1575,-77.2002 39.1229,-77.177 39.087,-77.1584 39.0476,-77.1526 39.0379,-77.1484 39.0326,-77.0975 39.0016,-77.0609 38.9801)
+LINESTRING(-79.4779 39.6488,-79.5171 39.6481,-79.5784 39.6491,-79.638 39.6522,-79.6732 39.6578,-79.713 39.6465,-79.7692 39.6483,-79.8276 39.6526,-79.874 39.6491,-79.8937 39.6273,-79.9248 39.6103,-79.9552 39.5925,-79.9732 39.5685)
+LINESTRING(-80.0621 39.7219,-80.0621 39.7219,-80.0604 39.7177,-80.0576 39.7137,-80.0542 39.71,-80.0509 39.7063,-80.0326 39.6823,-80.0174 39.658,-80.0027 39.6335,-79.9863 39.6089,-79.9822 39.5994,-79.9806 39.5891,-79.9786 39.5786,-79.9732 39.5685)
+LINESTRING(-112.013 41.1791,-112.014 41.173,-112.013 41.1613,-112.015 41.1508,-112.015 41.1403,-112.013 41.1286,-112.005 41.107,-111.991 41.0896,-111.973 41.0737,-111.952 41.0564,-111.925 41.0319,-111.903 41.0089,-111.886 40.9839,-111.876 40.9536,-111.872 40.9222,-111.874 40.8941,-111.88 40.8664,-111.892 40.836,-111.9 40.8231,-111.908 40.8119,-111.913 40.8006,-111.914 40.7873,-111.912 40.7818,-111.908 40.7723,-111.906 40.7668)
+LINESTRING(-90.3327 40.9849,-90.3346 41.0523,-90.3364 41.1227,-90.3349 41.1927,-90.3268 41.259,-90.3264 41.2683,-90.3276 41.2787,-90.3294 41.2893,-90.3303 41.2989,-90.3303 41.329,-90.3297 41.3589,-90.3283 41.3887,-90.3262 41.4188,-90.3261 41.4228,-90.3264 41.4268,-90.327 41.4307,-90.3276 41.4347,-90.3295 41.4366,-90.3313 41.4385,-90.3332 41.4404,-90.335 41.4423)
+LINESTRING(-76.601 38.9767,-76.618 38.9736,-76.6329 38.9674,-76.6473 38.9605,-76.6628 38.9549,-76.6671 38.9541,-76.6716 38.9537,-76.6761 38.9535,-76.6806 38.9533,-76.6954 38.9533,-76.7102 38.9537,-76.725 38.954,-76.7397 38.9536,-76.7549 38.9519,-76.7699 38.9494,-76.785 38.9472,-76.8002 38.9462,-76.8178 38.9471,-76.8344 38.9494,-76.8507 38.9523,-76.8675 38.9547,-76.8734 38.9533,-76.8793 38.9517,-76.8849 38.9497,-76.8901 38.9471,-76.8974 38.9359,-76.9041 38.9269,-76.914 38.9205,-76.9311 38.917)
+LINESTRING(-76.6228 39.2279,-76.6277 39.2287,-76.6326 39.2294,-76.6375 39.2301,-76.6424 39.2308,-76.652 39.2181,-76.6684 39.2054,-76.6866 39.1934,-76.7017 39.1827,-76.7512 39.1388,-76.7905 39.0956,-76.8238 39.0492,-76.8553 38.9959,-76.8622 38.9895,-76.8724 38.9849,-76.8834 38.9807,-76.8928 38.9753,-76.9045 38.9623,-76.9137 38.9473,-76.9221 38.9317,-76.9311 38.917)
+LINESTRING(-120.002 39.6757,-119.992 39.6645,-119.982 39.6549,-119.976 39.6528,-119.969 39.6512,-119.963 39.6497,-119.956 39.6477,-119.95 39.6448,-119.944 39.6413,-119.938 39.6379,-119.932 39.6352,-119.894 39.628,-119.86 39.6181,-119.832 39.603,-119.812 39.58)
+LINESTRING(-76.9311 38.917,-76.9374 38.9173,-76.9424 38.9176)
+LINESTRING(-76.9424 38.9176,-76.9436 38.9177,-76.9498 38.9181,-76.956 38.9184)
+LINESTRING(-77.0609 38.9801,-77.0503 38.9739,-77.0031 38.9462,-76.956 38.9184)
+LINESTRING(-76.956 38.9184,-76.9683 38.9161,-76.9806 38.9138,-76.9928 38.9115,-77.0051 38.9091)
+LINESTRING(-114.04 40.7412,-114.033 40.7424,-114.023 40.7494,-114.012 40.7505,-113.996 40.7463,-113.988 40.7454,-113.98 40.7451,-113.695 40.7382,-113.411 40.7313,-113.336 40.7287,-113.233 40.7264,-113.13 40.7295,-113.056 40.743,-113.018 40.7606,-112.981 40.7806,-112.944 40.8018,-112.909 40.823,-112.898 40.8235,-112.875 40.8107,-112.838 40.7906,-112.804 40.772,-112.786 40.7635,-112.745 40.7402,-112.704 40.7151,-112.643 40.6981,-112.57 40.6852,-112.5 40.6827,-112.47 40.6773,-112.433 40.6737,-112.395 40.6723,-112.359 40.6732,-112.346 40.6742,-112.33 40.676,-112.315 40.6785,-112.303 40.6819,-112.285 40.6888,-112.27 40.6928,-112.255 40.6972,-112.24 40.7057,-112.215 40.7189,-112.169 40.7395,-112.121 40.7599,-112.092 40.7724,-112.069 40.7743,-112.042 40.7777,-112.014 40.7789,-111.985 40.7744,-111.971 40.7718,-111.948 40.7681,-111.925 40.7648,-111.906 40.7668)
+LINESTRING(-111.906 40.7668,-111.896 40.7564,-111.881 40.748,-111.867 40.7392,-111.859 40.7281,-111.859 40.7181)
+LINESTRING(-120.002 39.4965,-119.982 39.5062,-119.961 39.516,-119.936 39.5275,-119.927 39.5378,-119.919 39.5488,-119.911 39.5584,-119.898 39.564,-119.877 39.568,-119.855 39.572,-119.834 39.576,-119.812 39.58)
+LINESTRING(-77.0569 38.8945,-77.0512 38.8957,-77.0399 38.8979,-77.0279 38.9015,-77.0161 38.9055,-77.0051 38.9091)
+LINESTRING(-95.5802 41.492,-95.6174 41.4231,-95.678 41.3586,-95.7511 41.3062,-95.826 41.2735)
+LINESTRING(-95.9342 41.4886,-95.928 41.4859,-95.9038 41.4758,-95.8933 41.4639,-95.8947 41.4478,-95.8961 41.4317,-95.8975 41.4157,-95.8988 41.3996,-95.898 41.3894,-95.8943 41.3796,-95.8883 41.3704,-95.8805 41.362,-95.8573 41.344,-95.8369 41.3296,-95.8229 41.3137,-95.8187 41.2911,-95.8194 41.2867,-95.8209 41.2823,-95.8231 41.2779,-95.826 41.2735)
+LINESTRING(-111.443 40.9693,-111.44 40.9663,-111.437 40.9634,-111.435 40.9604,-111.432 40.9575,-111.429 40.9565,-111.426 40.9556,-111.423 40.9503,-111.419 40.9449,-111.416 40.9397,-111.411 40.9347,-111.412 40.9323,-111.413 40.9299,-111.414 40.9276,-111.415 40.9252,-111.402 40.9094,-111.397 40.891,-111.395 40.8716,-111.393 40.8529,-111.391 40.8515,-111.388 40.85,-111.386 40.8485,-111.383 40.847,-111.386 40.8355,-111.39 40.826,-111.396 40.8173,-111.406 40.8081,-111.43 40.8048,-111.442 40.7975,-111.451 40.7874,-111.465 40.7752,-111.468 40.768,-111.469 40.7606,-111.471 40.7532,-111.471 40.7458,-111.478 40.7423,-111.484 40.7388,-111.491 40.7353,-111.498 40.7318)
+LINESTRING(-77.0051 38.9091,-77.008 38.9032,-77.0111 38.8962,-77.0133 38.8891,-77.0136 38.8829,-77.018 38.8829,-77.0224 38.8829,-77.0269 38.8829,-77.0313 38.8829,-77.0346 38.8806,-77.0379 38.8783,-77.0414 38.8757,-77.0435 38.8735,-77.0465 38.8705)
+LINESTRING(-111.498 40.7318,-111.503 40.7297,-111.507 40.7276,-111.512 40.7254,-111.517 40.7233,-111.533 40.7256,-111.551 40.7311,-111.566 40.7396,-111.575 40.7507,-111.58 40.7517,-111.585 40.7528,-111.59 40.7538,-111.595 40.7549,-111.605 40.75,-111.615 40.7452,-111.625 40.7403,-111.635 40.7355,-111.642 40.736,-111.651 40.7364,-111.661 40.7364,-111.668 40.7356,-111.679 40.7394,-111.691 40.7441,-111.702 40.7495,-111.712 40.7552,-111.728 40.7466,-111.756 40.7317,-111.783 40.7176,-111.796 40.7113,-111.82 40.7162,-111.849 40.7181,-111.859 40.7181)
+LINESTRING(-104.837 41.2175,-104.84 41.2545,-104.849 41.2915,-104.86 41.3284,-104.869 41.3654,-104.871 41.3849,-104.872 41.4063,-104.874 41.4274,-104.878 41.4456,-104.885 41.4616,-104.895 41.4809,-104.902 41.5008,-104.901 41.5183,-104.884 41.5589,-104.862 41.6084,-104.842 41.6583,-104.829 41.6996,-104.828 41.7127,-104.828 41.7273,-104.829 41.7419,-104.829 41.7555,-104.824 41.7585,-104.821 41.7602,-104.818 41.7614,-104.814 41.7628,-104.807 41.7689,-104.8 41.775,-104.795 41.782,-104.796 41.7906,-104.822 41.8268,-104.858 41.8611,-104.899 41.8923,-104.942 41.919,-104.945 41.9302,-104.948 41.9414,-104.949 41.9526,-104.952 41.9638,-104.957 41.9937,-104.961 42.0294,-104.964 42.0605,-104.966 42.0768,-104.97 42.0825,-104.976 42.088,-104.982 42.0935,-104.986 42.0991,-104.99 42.1087,-104.993 42.1177,-104.996 42.1268,-105.001 42.1363,-104.997 42.1614,-105 42.1843,-105.009 42.2069,-105.022 42.2308)
+LINESTRING(-119.242 39.6027,-119.217 39.6119,-119.181 39.637,-119.13 39.674,-119.08 39.7109,-119.052 39.7355,-119.022 39.7746,-119.005 39.8004,-118.982 39.8218,-118.934 39.8471,-118.914 39.8556,-118.894 39.8641,-118.875 39.8729,-118.856 39.882,-118.835 39.8942,-118.802 39.9136,-118.768 39.9315,-118.744 39.9394)
+LINESTRING(-119.812 39.58,-119.791 39.584,-119.774 39.5862,-119.758 39.5863,-119.743 39.5845,-119.726 39.5812,-119.71 39.5771,-119.695 39.5732,-119.681 39.5711,-119.664 39.5722,-119.635 39.5822,-119.59 39.6109,-119.561 39.6209,-119.548 39.6226,-119.537 39.6231,-119.526 39.6233,-119.513 39.6237,-119.456 39.6338,-119.444 39.6352,-119.425 39.6366,-119.406 39.6374,-119.392 39.6375,-119.377 39.6364,-119.364 39.6348,-119.352 39.6329,-119.338 39.6308,-119.311 39.6256,-119.289 39.6188,-119.268 39.6109,-119.242 39.6027)
+LINESTRING(-95.826 41.2735,-95.8446 41.2567,-95.8709 41.2441,-95.874 41.2436)
+LINESTRING(-95.9049 41.2391,-95.9015 41.2386,-95.874 41.2436)
+LINESTRING(-82.9786 40.109,-82.9894 40.0867,-82.9906 40.0646,-82.9875 40.042,-82.9852 40.0179,-82.9858 40.0018,-82.9869 39.9848,-82.9867 39.9678,-82.9836 39.9517)
+LINESTRING(-82.927 39.9274,-82.8957 39.9345,-82.8591 39.9363,-82.8223 39.9352,-82.7903 39.9337,-82.7784 39.9354,-82.7675 39.9398,-82.7568 39.9442,-82.7454 39.946,-82.6927 39.9447,-82.6398 39.9431,-82.5869 39.942,-82.5342 39.9417,-82.5096 39.9426,-82.4848 39.9441,-82.4599 39.9453,-82.4353 39.9453,-82.3944 39.9429,-82.3539 39.9396,-82.3133 39.9367,-82.2721 39.9356,-82.2676 39.9359,-82.2631 39.9361,-82.2007 39.9403,-82.1381 39.9429,-82.0754 39.9452,-82.013 39.9485,-81.9767 39.9543,-81.9404 39.9641,-81.9045 39.9742,-81.8693 39.9805,-81.8566 39.9789,-81.8415 39.9739,-81.8265 39.968,-81.8137 39.9639,-81.8037 39.964,-81.7908 39.9664,-81.7777 39.9695,-81.7674 39.9718,-81.7468 39.9736,-81.7256 39.9736,-81.7045 39.9736,-81.6839 39.9754,-81.6732 39.979,-81.6629 39.9854,-81.6539 39.9931,-81.647 40.0005,-81.6287 40.0009,-81.5981 39.9997,-81.5713 39.9981,-81.5444 39.9966)
+LINESTRING(-82.927 39.9274,-82.9412 39.9335,-82.9553 39.9396,-82.9694 39.9456,-82.9836 39.9517)
+LINESTRING(-104.852 41.1153,-104.852 41.1214,-104.849 41.1268,-104.844 41.1322,-104.841 41.1377,-104.837 41.1559,-104.836 41.1765,-104.836 41.1973,-104.837 41.2157,-104.837 41.2175)
+LINESTRING(-82.9836 39.9517,-82.9872 39.939,-82.9947 39.9147,-82.9983 39.902,-83.0004 39.8975,-83.0038 39.894,-83.0079 39.8909,-83.0135 39.8865)
+LINESTRING(-107.183 41.7887,-107.169 41.7885,-107.155 41.7883,-107.142 41.7881,-107.128 41.7879,-107.117 41.7829,-107.109 41.7835,-107.102 41.7841,-107.068 41.7728,-107.01 41.76,-106.949 41.7494,-106.907 41.7445,-106.873 41.7441,-106.837 41.7446,-106.801 41.7446,-106.769 41.7428,-106.755 41.7401,-106.741 41.736,-106.728 41.7318,-106.714 41.7291,-106.704 41.7288,-106.694 41.7293,-106.671 41.7305,-106.648 41.7327,-106.625 41.7347,-106.602 41.735,-106.594 41.7344,-106.572 41.7382,-106.552 41.7437,-106.533 41.7494,-106.514 41.7542,-106.484 41.7338,-106.448 41.7201,-106.412 41.7077,-106.382 41.6913,-106.377 41.679,-106.373 41.6718,-106.346 41.6552,-106.309 41.6406,-106.271 41.6276,-106.244 41.6204,-106.238 41.6145,-106.232 41.6085,-106.227 41.6025,-106.221 41.5965,-106.21 41.5977,-106.192 41.589,-106.174 41.5787,-106.155 41.5691,-106.136 41.5622,-106.126 41.5608,-106.116 41.5605,-106.107 41.5588,-106.096 41.553,-106.087 41.5457,-106.078 41.5385,-106.069 41.5307,-106.061 41.5234,-106.05 41.5086,-106.047 41.4993,-106.038 41.4906,-106.01 41.4777,-106.009 41.4722,-106.008 41.4667,-105.985 41.4516,-105.949 41.4399,-105.911 41.4321,-105.881 41.4288,-105.806 41.3786,-105.771 41.3591,-105.728 41.3534,-105.627 41.3445,-105.618 41.3375,-105.618 41.3294,-105.616 41.319,-105.613 41.3089,-105.607 41.3019,-105.587 41.2974,-105.567 41.292,-105.547 41.2876,-105.525 41.2863,-105.511 41.2772,-105.491 41.2705,-105.469 41.2641,-105.45 41.2562,-105.447 41.2295,-105.436 41.2022,-105.419 41.1765,-105.399 41.1544,-105.388 41.1491,-105.366 41.1413,-105.343 41.133,-105.327 41.1261,-105.293 41.1241,-105.257 41.1139,-105.22 41.1016,-105.186 41.0931,-105.163 41.0923,-105.141 41.0947,-105.119 41.098,-105.098 41.1002,-105.082 41.1002,-105.067 41.0998,-105.052 41.1004,-105.036 41.1034,-105.025 41.1011,-105.015 41.0988,-105.008 41.1,-105 41.1023,-104.992 41.1055,-104.962 41.1117,-104.922 41.1145,-104.881 41.1163,-104.852 41.1153)
+LINESTRING(-104.052 41.1386,-104.047 41.1411,-104.026 41.152,-104.004 41.1606,-103.981 41.1665,-103.956 41.1692,-103.911 41.1698,-103.837 41.1682,-103.792 41.1688,-103.753 41.1735,-103.72 41.1832,-103.689 41.1954,-103.658 41.2077)
+LINESTRING(-78.0856 39.2989,-78.0889 39.2906,-78.0959 39.2745,-78.1048 39.259,-78.1171 39.2451,-78.1236 39.2406,-78.1313 39.2363,-78.138 39.2314,-78.1418 39.2254,-78.1399 39.2151,-78.1337 39.2035,-78.1284 39.1921,-78.1295 39.1827,-78.1444 39.1648,-78.1606 39.1473,-78.1764 39.1297,-78.1902 39.1117,-78.1945 39.1031,-78.1972 39.0943,-78.1995 39.0856,-78.2027 39.0769,-78.2045 39.0746,-78.2074 39.0718,-78.2101 39.0694,-78.2129 39.0671,-78.2267 39.0553,-78.2406 39.0435,-78.2544 39.0318,-78.2682 39.02,-78.2748 39.0171,-78.2831 39.0149,-78.2917 39.0132,-78.2991 39.0122)
+LINESTRING(-104.852 41.1153,-104.831 41.1165,-104.825 41.1156,-104.819 41.1148,-104.812 41.1147,-104.762 41.1169,-104.723 41.1243,-104.691 41.1383,-104.659 41.1529,-104.62 41.1617,-104.503 41.1521,-104.428 41.1552,-104.388 41.1523,-104.355 41.1421,-104.323 41.1281,-104.288 41.1134,-104.264 41.1092,-104.231 41.1071,-104.197 41.1066,-104.172 41.1071,-104.137 41.1098,-104.106 41.1158,-104.077 41.1259,-104.052 41.1386)
+LINESTRING(-78.2991 39.0122,-78.2902 39.0043,-78.2796 38.9962,-78.2684 38.9887,-78.2576 38.9828,-78.236 38.9739,-78.2134 38.9664,-78.1907 38.9588,-78.1688 38.9501,-78.1531 38.9422,-78.1379 38.9338,-78.1227 38.9254,-78.1069 38.9176,-78.0594 38.9164,-78.0109 38.9124,-77.9636 38.904,-77.9198 38.8896,-77.8992 38.8794,-77.8813 38.8698,-77.8621 38.8616,-77.8378 38.8559,-77.8083 38.8638,-77.7742 38.8577,-77.7404 38.8453,-77.7119 38.8342,-77.6969 38.83,-77.6829 38.8274,-77.6688 38.8257,-77.6537 38.8243,-77.6426 38.8216,-77.6325 38.8168)
+LINESTRING(-77.6325 38.8168,-77.6229 38.8114,-77.6133 38.8069,-77.6097 38.8062,-77.6061 38.8054,-77.6025 38.8047,-77.5988 38.804,-77.5943 38.8032,-77.5898 38.8024,-77.5853 38.8016,-77.5808 38.8008,-77.5754 38.8,-77.57 38.7991,-77.5646 38.7983,-77.5593 38.7974,-77.5125 38.8021,-77.4756 38.8179,-77.4484 38.8356,-77.4309 38.8457,-77.4028 38.8517,-77.3729 38.8565,-77.3428 38.861,-77.3139 38.8659,-77.2914 38.8701,-77.2687 38.8741,-77.2461 38.8781,-77.2235 38.8824,-77.2136 38.8859,-77.2042 38.8911,-77.1944 38.8957,-77.1834 38.898,-77.1725 38.8964,-77.1633 38.8922,-77.1541 38.8875,-77.1431 38.8845,-77.1132 38.8835,-77.0903 38.8868,-77.0709 38.8917,-77.0569 38.8945)
+LINESTRING(-89.4855 40.6202,-89.5381 40.6355,-89.5715 40.6502,-89.5915 40.6623,-89.6042 40.6696,-89.6065 40.676,-89.6125 40.6907,-89.6212 40.7071,-89.6315 40.7184,-89.6447 40.7238,-89.6646 40.7297,-89.6854 40.7356,-89.7011 40.7407,-89.726 40.7527,-89.7481 40.7651,-89.7704 40.7772,-89.7956 40.7882,-89.8287 40.8031,-89.8602 40.8206,-89.8924 40.8369,-89.9277 40.8486,-89.9409 40.8502,-89.9543 40.8503,-89.9678 40.8499,-89.9812 40.8502,-90.0021 40.8533,-90.0276 40.859,-90.0534 40.8654,-90.0749 40.8707,-90.0875 40.8748,-90.0993 40.8801,-90.1111 40.8855,-90.1237 40.8898,-90.1722 40.8983,-90.2214 40.9038,-90.2699 40.9121,-90.3162 40.9292,-90.3297 40.941,-90.3339 40.9548,-90.3333 40.9698,-90.3327 40.9849)
+LINESTRING(-104.907 40.9995,-104.905 41.0071,-104.903 41.0148,-104.901 41.0226,-104.899 41.0302,-104.896 41.0324,-104.891 41.0478,-104.876 41.0675,-104.861 41.0903,-104.852 41.1153)
+LINESTRING(-80.2693 39.2822,-80.2611 39.294,-80.2483 39.3037,-80.2353 39.314,-80.226 39.3272,-80.2201 39.3526,-80.2172 39.3791,-80.2118 39.4052,-80.1984 39.4292,-80.1927 39.434,-80.1861 39.4374,-80.1789 39.4402,-80.1714 39.4434,-80.1394 39.461,-80.109 39.4802,-80.0795 39.5001,-80.0501 39.52,-80.0386 39.523,-80.0253 39.5218,-80.0113 39.5213,-79.9977 39.5264,-79.988 39.5364,-79.9829 39.5471,-79.9792 39.558,-79.9732 39.5685)
+LINESTRING(-80.2693 39.2822,-80.2914 39.2811,-80.319 39.2804,-80.3453 39.2817,-80.3638 39.2865)
+LINESTRING(-100.771 41.1021,-100.784 41.102,-100.797 41.1019,-100.81 41.1018,-100.822 41.1017,-100.884 41.1067,-100.939 41.1119,-100.993 41.1158,-101.056 41.1169,-101.074 41.1172,-101.091 41.1173,-101.106 41.1155,-101.122 41.11,-101.141 41.0992,-101.157 41.0884,-101.173 41.0784,-101.194 41.07,-101.232 41.0621,-101.267 41.0608,-101.303 41.0625,-101.343 41.0636,-101.387 41.0633,-101.425 41.0637,-101.464 41.0642,-101.507 41.0646,-101.564 41.0679,-101.614 41.0715,-101.663 41.0743,-101.717 41.0754)
+LINESTRING(-103.658 41.2077,-103.641 41.2134,-103.623 41.2182,-103.604 41.2215,-103.583 41.2232,-103.551 41.2214,-103.524 41.2157,-103.497 41.2091,-103.465 41.2044,-103.423 41.2022,-103.348 41.2012,-103.306 41.199,-103.271 41.1934,-103.243 41.1837,-103.215 41.1718,-103.134 41.14,-103.092 41.1224,-103.049 41.1101,-102.996 41.1063,-102.902 41.1062,-102.83 41.1075,-102.818 41.1037,-102.629 41.1084,-102.622 41.109,-102.608 41.1114,-102.601 41.112,-102.553 41.1083,-102.513 41.0973,-102.473 41.0827,-102.427 41.0684,-102.348 41.0499,-102.277 41.0358,-102.207 41.0196,-102.155 41.0023)
+LINESTRING(-102.101 41.0021,-102.084 41.0083,-102.038 41.0195,-101.991 41.0276,-101.936 41.0358,-101.911 41.0388,-101.888 41.0404,-101.866 41.0429,-101.841 41.0485,-101.814 41.0575,-101.79 41.066,-101.766 41.0724,-101.737 41.0753,-101.727 41.0754,-101.717 41.0754)
+LINESTRING(-102.127 40.993,-102.101 41.0021)
+LINESTRING(-102.155 41.0023,-102.127 40.993)
+LINESTRING(-84.2117 39.8586,-84.2157 39.8817,-84.2178 39.9054,-84.22 39.9292,-84.2242 39.9528,-84.233 39.9693,-84.2465 39.9839,-84.2592 39.9985,-84.2653 40.0152,-84.2656 40.031,-84.2659 40.0468,-84.266 40.0676,-84.2657 40.0778,-84.2438 40.1091,-84.2218 40.1295,-84.2072 40.1499,-84.2076 40.1815,-84.2018 40.2007,-84.2023 40.2224,-84.205 40.2444,-84.2059 40.2647,-84.1934 40.2914,-84.1688 40.3118,-84.1446 40.3304,-84.1334 40.3519,-84.136 40.3768,-84.1426 40.3959,-84.1498 40.4145,-84.1541 40.4379,-84.1591 40.4672,-84.1641 40.4965,-84.1691 40.5258,-84.1741 40.5551,-84.1697 40.5741,-84.158 40.5978,-84.1439 40.6211,-84.1325 40.6391,-84.1287 40.6533,-84.1278 40.6703,-84.1234 40.6867,-84.1096 40.6988,-84.0998 40.6989,-84.0902 40.6993,-84.0819 40.7015,-84.0758 40.707,-84.0775 40.7474,-84.0744 40.7659,-84.0543 40.781,-84.0046 40.8108)
+LINESTRING(-81.4454 39.3964,-81.4415 39.4061,-81.4381 39.4105,-81.4335 39.4144,-81.4288 39.4182,-81.4251 39.4226,-81.4327 39.4382,-81.4366 39.4469,-81.4369 39.4548,-81.434 39.468,-81.436 39.4758,-81.4427 39.4851,-81.4497 39.4952,-81.4525 39.5058,-81.4527 39.523,-81.4548 39.539,-81.4578 39.5548,-81.4605 39.5716,-81.4583 39.612,-81.4541 39.6457,-81.4682 39.6724,-81.521 39.6922,-81.5337 39.7154,-81.5505 39.7381,-81.5661 39.7604,-81.5754 39.7824,-81.5735 39.7855,-81.5717 39.7887,-81.5647 39.7922,-81.5571 39.7974,-81.5504 39.8031,-81.5463 39.8085,-81.5374 39.8383,-81.5258 39.8876,-81.5165 39.9358,-81.5143 39.9619,-81.519 39.9683,-81.5285 39.9795,-81.5385 39.9905,-81.5444 39.9966)
+LINESTRING(-89.4855 40.6202,-89.4597 40.6225,-89.4124 40.6228,-89.3615 40.622,-89.3251 40.621,-89.3135 40.6212,-89.2993 40.6219,-89.2859 40.6224,-89.2766 40.6218,-89.2641 40.6187,-89.2517 40.615,-89.2392 40.6115,-89.2264 40.609,-89.2167 40.6081,-89.2069 40.6077,-89.1972 40.6071,-89.1875 40.6058,-89.1837 40.6051,-89.18 40.6044,-89.1763 40.6037,-89.1725 40.603,-89.1526 40.5894,-89.1298 40.5683,-89.0934 40.5487,-89.0331 40.54,-89.0316 40.539,-89.0301 40.5379,-89.0286 40.5369,-89.0271 40.5359,-89.0298 40.5149,-89.0318 40.4888,-89.0301 40.4629,-89.0217 40.4429)
+LINESTRING(-82.9836 39.9517,-83.0331 39.9744,-83.1153 39.982,-83.1958 39.9816,-83.2406 39.9804,-83.2633 39.9791,-83.2802 39.9742,-83.2961 39.9676,-83.316 39.9613,-83.3428 39.9558,-83.3736 39.9505,-83.4038 39.9455,-83.434 39.9405,-83.4853 39.9365,-83.551 39.9356,-83.6161 39.9342,-83.6659 39.9286,-83.6833 39.9226,-83.6973 39.9146,-83.7098 39.9051,-83.7229 39.895,-83.7332 39.8933,-83.7445 39.8927,-83.7558 39.8925,-83.7666 39.8918,-83.7822 39.8898,-83.7978 39.8875,-83.8135 39.8858,-83.8294 39.8853,-83.853 39.887,-83.8752 39.8898,-83.8981 39.8917,-83.9236 39.8911,-83.9566 39.8836,-83.9769 39.8731,-84.0025 39.8645,-84.0513 39.8628,-84.0659 39.8229,-84.0914 39.8044,-84.118 39.7939,-84.1362 39.7781)
+LINESTRING(-84.2117 39.8586,-84.1928 39.8385,-84.1739 39.8184,-84.1551 39.7982,-84.1362 39.7781)
+LINESTRING(-84.2117 39.8586,-84.2293 39.8613,-84.244 39.8628,-84.2579 39.8636,-84.2705 39.8625,-84.2782 39.8586,-84.2859 39.855,-84.3072 39.8531,-84.3298 39.8525,-84.3524 39.8529,-84.3739 39.8538,-84.4061 39.8508,-84.4297 39.8453,-84.4508 39.8397,-84.4759 39.8363,-84.5306 39.8351,-84.586 39.8358,-84.6414 39.8372,-84.6964 39.8381,-84.7135 39.8369,-84.7306 39.8342,-84.7477 39.8314,-84.7651 39.8301,-84.7806 39.8314,-84.7962 39.8344,-84.8114 39.8372,-84.8139 39.8374)
+LINESTRING(-121.26 38.7535,-121.233 38.7761,-121.191 38.8116,-121.15 38.8458,-121.131 38.865,-121.133 38.8731,-121.127 38.8809,-121.112 38.8849,-121.098 38.8897,-121.084 38.8952,-121.071 38.9011,-121.065 38.9104,-121.058 38.9226,-121.052 38.9349,-121.05 38.9444,-121.021 38.9713,-120.995 39.0042,-120.977 39.0321,-120.97 39.0438,-120.967 39.0525,-120.966 39.0656,-120.968 39.0829,-120.975 39.1043,-120.972 39.1202,-120.951 39.1323,-120.924 39.1424,-120.898 39.1524,-120.882 39.1604,-120.866 39.1685,-120.85 39.1758,-120.832 39.1837,-120.812 39.1925,-120.795 39.2016,-120.78 39.2127,-120.769 39.2276,-120.751 39.2455,-120.734 39.2627,-120.716 39.2782,-120.696 39.2911,-120.682 39.296,-120.664 39.2994,-120.645 39.3023,-120.629 39.3057,-120.615 39.3102,-120.601 39.316,-120.587 39.3224,-120.574 39.3284,-120.563 39.3272,-120.557 39.3218,-120.547 39.315,-120.537 39.3089,-120.529 39.3057,-120.507 39.3088,-120.484 39.3106,-120.462 39.3129,-120.441 39.3177,-120.431 39.3229,-120.42 39.3278,-120.411 39.3291,-120.398 39.3297,-120.385 39.3298,-120.376 39.3295,-120.36 39.3349,-120.348 39.3406,-120.335 39.346,-120.32 39.3502,-120.306 39.3506,-120.294 39.3473,-120.281 39.3426,-120.268 39.3386,-120.252 39.3368,-120.238 39.3372,-120.224 39.3393,-120.208 39.3423,-120.2 39.3451,-120.19 39.3546,-120.184 39.3596,-120.175 39.3644,-120.167 39.368,-120.158 39.3715,-120.149 39.3761,-120.138 39.3838,-120.128 39.3911,-120.117 39.3973,-120.103 39.4016,-120.096 39.4022,-120.083 39.4012,-120.076 39.4018,-120.068 39.4051,-120.062 39.4175,-120.059 39.4247,-120.052 39.4417,-120.048 39.4576,-120.041 39.4718,-120.026 39.4838,-120.003 39.4961,-120.002 39.4965)
+LINESTRING(-81.4994 39.2676,-81.4816 39.3012,-81.4679 39.3362,-81.4555 39.3715,-81.4454 39.3964)
+LINESTRING(-97.0441 40.822,-97.0038 40.8226,-96.9536 40.8277,-96.9031 40.8343,-96.8622 40.8392,-96.854 40.8406,-96.8455 40.8427,-96.8369 40.8444,-96.8285 40.8447,-96.8123 40.8412,-96.7965 40.8354,-96.7804 40.8303,-96.7637 40.8289,-96.7518 40.8346,-96.7419 40.8412,-96.7308 40.8439,-96.6994 40.8799,-96.6671 40.8941,-96.6266 40.8963,-96.5708 40.8959,-96.5631 40.8926,-96.5554 40.8892,-96.5039 40.8995,-96.454 40.9263,-96.4078 40.9583,-96.3674 40.9843,-96.3535 40.9907,-96.3387 40.9966,-96.3237 41.0021,-96.3089 41.0076,-96.3039 41.0152,-96.3002 41.0232,-96.2926 41.028,-96.2923 41.0334,-96.293 41.0423,-96.2943 41.0512,-96.296 41.0567,-96.2617 41.0888,-96.2156 41.116,-96.1656 41.1421,-96.1196 41.1709,-96.1083 41.192,-96.105 41.2201,-96.0987 41.2453,-96.0787 41.2578,-96.0356 41.2591,-95.9957 41.256,-95.9609 41.2501,-95.9329 41.2432,-95.9049 41.2391)
+LINESTRING(-81.5684 39.2813,-81.5687 39.2785,-81.5691 39.2752,-81.5694 39.2719,-81.5676 39.2708,-81.5659 39.2698,-81.5641 39.2687,-81.5624 39.2677,-81.5594 39.2682,-81.5454 39.2638,-81.5302 39.265,-81.5146 39.2676,-81.4994 39.2676)
+LINESTRING(-97.5945 40.8214,-97.4831 40.8206,-97.3715 40.8209,-97.26 40.8215,-97.1486 40.8217,-97.1231 40.8222,-97.0957 40.8232,-97.0686 40.8235,-97.0441 40.822)
+LINESTRING(-87.5327 40.116,-87.4657 40.1213,-87.3934 40.1249,-87.3209 40.1266,-87.2487 40.1261)
+LINESTRING(-98.3858 40.8062,-98.3811 40.807,-98.2678 40.8105,-98.0346 40.8157,-97.778 40.8199,-97.5945 40.8214)
+LINESTRING(-86.0541 39.8926,-86.0464 39.9034,-86.0387 39.9141,-86.031 39.9249,-86.0232 39.9356,-86.0198 39.9411,-86.0165 39.947,-86.0129 39.9528,-86.0087 39.9578,-85.9935 39.9647,-85.9622 39.9765,-85.928 39.9878,-85.904 39.9931,-85.8784 39.9937,-85.8393 39.9947,-85.8014 39.9963,-85.7797 39.9988,-85.772 40.006,-85.7671 40.0144,-85.7616 40.0226,-85.7518 40.0295,-85.7156 40.0418,-85.678 40.0496,-85.6394 40.0551,-85.6006 40.0602,-85.5872 40.0715,-85.5783 40.0878,-85.5735 40.1055,-85.5722 40.1208,-85.5728 40.1313,-85.5736 40.1422,-85.574 40.1531,-85.5735 40.1634,-85.569 40.1733,-85.5661 40.1788,-85.565 40.235,-85.5646 40.3044,-85.5594 40.375,-85.5452 40.4308,-85.551 40.4576,-85.5525 40.5032,-85.5524 40.5512,-85.5535 40.5855,-85.5333 40.6123,-85.5131 40.6394,-85.4924 40.6663,-85.4708 40.6924,-85.456 40.7069,-85.4361 40.7245,-85.4147 40.7435,-85.3958 40.7625,-85.388 40.7753,-85.3836 40.789,-85.3786 40.8024,-85.3694 40.814,-85.3619 40.8191,-85.3537 40.8242,-85.3469 40.8302,-85.3436 40.8378,-85.3429 40.8497,-85.3433 40.862,-85.344 40.8744,-85.3446 40.8863,-85.3228 40.9151,-85.2985 40.9507,-85.2744 40.9844,-85.2531 41.008,-85.2529 41.0201,-85.2528 41.0323,-85.2521 41.0444,-85.251 41.0565,-85.2422 41.0642,-85.2307 41.0695,-85.2267 41.0744,-85.2241 41.0807,-85.2231 41.0873,-85.2236 41.093,-85.2072 41.1015,-85.1909 41.1099,-85.1746 41.1184,-85.1583 41.1268)
+LINESTRING(-86.1564 39.9356,-86.1286 39.9276,-86.1025 39.918,-86.0778 39.9064,-86.0541 39.8926)
+LINESTRING(-88.2843 40.1464,-88.2704 40.1599,-88.2565 40.1735,-88.2426 40.1871,-88.2286 40.2007,-88.2004 40.2404,-88.1895 40.2781,-88.1856 40.3097,-88.1781 40.3312,-88.1503 40.3682,-88.1334 40.4003,-88.1221 40.4328,-88.1108 40.4711,-88.1038 40.4865,-88.095 40.5007,-88.0869 40.5155,-88.0824 40.5329,-88.0665 40.5565,-88.0639 40.5797,-88.0611 40.6009,-88.0449 40.6182,-88.0411 40.636,-88.0357 40.6688,-88.0308 40.7029,-88.0288 40.7246,-88.022 40.7301,-88.0154 40.7339,-88.0105 40.7396,-88.0089 40.7507,-88.0092 40.7586,-88.0094 40.7664,-88.0097 40.7742,-88.01 40.782,-88.0066 40.7852,-88.0032 40.7883,-88.0034 40.7989,-88.0037 40.8094,-88.0039 40.82,-88.0042 40.8305,-88.0011 40.8334,-87.9979 40.8363,-87.9893 40.8605,-87.9806 40.8752,-87.9692 40.8904,-87.9525 40.9161,-87.9488 40.9188,-87.9446 40.9194,-87.9404 40.9199,-87.9363 40.921,-87.9329 40.9227,-87.9235 40.9534,-87.906 41.0024,-87.8876 41.0497,-87.8752 41.0758,-87.8667 41.0787,-87.8573 41.0806,-87.8476 41.0825,-87.8384 41.0857,-87.8357 41.0978,-87.8353 41.1191,-87.836 41.1411,-87.8368 41.1551,-87.8426 41.1609,-87.8502 41.1657,-87.858 41.1711,-87.8643 41.1782,-87.8674 41.2159,-87.8495 41.2617,-87.8268 41.3101,-87.8155 41.3555,-87.783 41.3813,-87.7668 41.4012,-87.7605 41.4236,-87.7573 41.4573,-87.7556 41.4647,-87.7526 41.472,-87.7492 41.4794,-87.7468 41.4866,-87.7437 41.5067,-87.7427 41.5274,-87.7427 41.5481,-87.7429 41.5683)
+LINESTRING(-89.0217 40.4429,-89.0181 40.4383,-89.0145 40.4338,-89.0037 40.4318,-88.9907 40.4323,-88.9769 40.4328,-88.9632 40.4309,-88.9582 40.4284,-88.9525 40.4245,-88.9468 40.4203,-88.9421 40.4172,-88.899 40.396,-88.8539 40.3765,-88.8086 40.3575,-88.7644 40.3374,-88.7409 40.3226,-88.7193 40.3048,-88.6979 40.2866,-88.6751 40.2706,-88.6656 40.266,-88.6588 40.2644,-88.6524 40.2639,-88.6445 40.2622,-88.6364 40.2587,-88.6287 40.2541,-88.6212 40.2492,-88.6134 40.2452,-88.562 40.2304,-88.5066 40.2207,-88.4504 40.2117,-88.3966 40.1986,-88.3589 40.1877,-88.3343 40.1804,-88.3127 40.1692,-88.2843 40.1464)
+LINESTRING(-88.2843 40.1464,-88.2636 40.1361,-88.2439 40.1342,-88.2236 40.1356,-88.2009 40.1351,-88.1939 40.133,-88.1866 40.1293,-88.1793 40.1255,-88.1723 40.123,-88.1597 40.1226,-88.1346 40.1224,-88.1144 40.1223,-88.0941 40.1222,-88.0012 40.1228,-87.9085 40.1247,-87.8157 40.1271,-87.7229 40.1297,-87.7038 40.1176,-87.6825 40.1088,-87.6593 40.1042,-87.6351 40.1049,-87.6164 40.1132,-87.5903 40.1155,-87.5621 40.1152,-87.5374 40.1156,-87.5327 40.116)
+LINESTRING(-82.0659 39.3263,-82.0563 39.3319,-82.0453 39.3366,-82.0338 39.3406,-82.0224 39.3438,-82.0206 39.3433,-82.0188 39.3429,-82.0149 39.3427,-82.011 39.3426,-82.0069 39.3424,-82.0034 39.3419,-81.9962 39.3391,-81.9909 39.3349,-81.9864 39.3302,-81.9815 39.326,-81.973 39.3223,-81.9609 39.3189,-81.9479 39.3153,-81.9364 39.3108,-81.9339 39.3095,-81.9316 39.3081,-81.9267 39.3008,-81.9239 39.2927,-81.9213 39.2846,-81.917 39.2772,-81.9034 39.2637,-81.8876 39.2511,-81.8721 39.2388,-81.8592 39.2261,-81.8498 39.2243,-81.8399 39.2222,-81.83 39.2206,-81.8207 39.2205,-81.7966 39.2325,-81.7709 39.2403,-81.7455 39.2479,-81.7223 39.2593,-81.7092 39.2695,-81.6944 39.281,-81.6779 39.2901,-81.6601 39.2929,-81.6371 39.291,-81.6141 39.289,-81.5911 39.287,-81.5681 39.285,-81.5684 39.2817,-81.5684 39.2813)
+LINESTRING(-93.9253 40.5752,-93.9089 40.5978,-93.8713 40.624,-93.8417 40.657,-93.8338 40.7212,-93.8313 40.7497,-93.8223 40.7793,-93.811 40.8086,-93.802 40.8361,-93.8009 40.8499,-93.8024 40.8644,-93.8045 40.8789,-93.8053 40.8927,-93.8056 40.9258,-93.8075 40.9601,-93.8078 40.9942,-93.8033 41.027,-93.7987 41.0373,-93.7919 41.0462,-93.7856 41.0555,-93.7822 41.0665,-93.7817 41.0819,-93.7827 41.1005,-93.7854 41.1191,-93.7898 41.1345,-93.7869 41.1962,-93.7855 41.3323,-93.7848 41.4813,-93.7842 41.5811)
+LINESTRING(-111.859 40.7181,-111.858 40.6863,-111.866 40.6491,-111.873 40.612,-111.872 40.5701,-111.864 40.5531,-111.853 40.5375,-111.846 40.523,-111.852 40.5091,-111.876 40.4938,-111.903 40.4812,-111.924 40.4674,-111.93 40.4483,-111.927 40.4449,-111.923 40.4418,-111.89 40.4309,-111.859 40.4221,-111.828 40.4148,-111.794 40.4085,-111.762 40.4024,-111.739 40.3942,-111.724 40.3808,-111.714 40.3594,-111.71 40.3331,-111.706 40.3047,-111.699 40.2774,-111.684 40.2547,-111.663 40.2367,-111.642 40.2213,-111.626 40.2048,-111.616 40.1831,-111.618 40.1622,-111.631 40.1456,-111.649 40.1301,-111.67 40.1129)
+LINESTRING(-121.506 38.568,-121.504 38.5826,-121.501 38.5891,-121.503 38.5993,-121.515 38.6245,-121.521 38.6344,-121.527 38.6443,-121.533 38.6567,-121.537 38.6645,-121.568 38.6712,-121.628 38.6725,-121.691 38.6716,-121.734 38.6715,-121.744 38.6773,-121.749 38.6824,-121.752 38.689,-121.757 38.6992,-121.765 38.7002,-121.772 38.7012,-121.779 38.7022,-121.786 38.7032,-121.834 38.7474,-121.883 38.791,-121.93 38.8354,-121.974 38.8823,-122.008 38.9279,-122.057 39.0004,-122.104 39.0739,-122.133 39.1225,-122.135 39.1296,-122.134 39.1363,-122.133 39.1426,-122.134 39.1488,-122.147 39.1708,-122.161 39.1921,-122.174 39.214,-122.178 39.2381,-122.169 39.2454,-122.162 39.252,-122.156 39.2578,-122.154 39.2629,-122.16 39.2721,-122.173 39.28,-122.186 39.2879,-122.196 39.2971,-122.199 39.3647,-122.205 39.4394,-122.212 39.4999,-122.216 39.5248,-122.215 39.5475,-122.212 39.5701,-122.209 39.5926,-122.206 39.6152,-122.205 39.6451,-122.205 39.6757,-122.207 39.7063,-122.207 39.7363,-122.206 39.7751,-122.205 39.814,-122.203 39.853,-122.202 39.892,-122.201 39.9119,-122.2 39.9318,-122.2 39.9518,-122.2 39.9718,-122.205 40.014,-122.212 40.0561,-122.219 40.0984,-122.222 40.141,-122.221 40.15,-122.22 40.1618,-122.22 40.1734,-122.223 40.1818)
+LINESTRING(-87.3243 41.4688,-87.3256 41.4491,-87.321 41.4252,-87.3193 41.4021,-87.3295 41.3844,-87.3229 41.3691,-87.3154 41.3536,-87.3083 41.3381,-87.303 41.3228,-87.2991 41.293,-87.299 41.2625,-87.2989 41.2316,-87.2943 41.2008,-87.2893 41.1893,-87.2804 41.1723,-87.2681 41.1501,-87.269 41.114,-87.2711 41.0781,-87.2733 41.0421,-87.2745 41.0058,-87.2675 41.0013,-87.2475 40.9732,-87.2301 40.9467,-87.2134 40.92,-87.1979 40.8928,-87.1889 40.8748,-87.1804 40.8565,-87.1717 40.8383,-87.1619 40.8205,-87.1494 40.8027,-87.1348 40.7855,-87.1197 40.7685,-87.1055 40.7513,-87.0918 40.7322,-87.0695 40.7019,-87.0464 40.6739,-87.0302 40.6614,-86.9928 40.6133,-86.9609 40.579,-86.9237 40.5453,-86.87 40.4991,-86.8597 40.4937,-86.8538 40.4798,-86.8507 40.465,-86.8487 40.4499,-86.8461 40.4353,-86.8331 40.4241,-86.8193 40.4138,-86.8059 40.4032,-86.794 40.3914,-86.7822 40.374,-86.7704 40.353,-86.7576 40.3333,-86.7431 40.3199,-86.6933 40.2932,-86.6687 40.2786,-86.6483 40.2633,-86.6157 40.2319,-86.5848 40.1986,-86.5547 40.1649,-86.5241 40.1319,-86.5235 40.1256,-86.5125 40.1054,-86.5043 40.0866,-86.4973 40.0677,-86.4898 40.0471,-86.4763 40.0375,-86.4613 40.0323,-86.4474 40.0288,-86.4376 40.0245,-86.4116 40.004,-86.3839 39.9828,-86.3574 39.9611,-86.3351 39.9391,-86.3201 39.9189,-86.3074 39.8977,-86.2942 39.8763,-86.2754 39.8547)
+LINESTRING(-121.26 38.7535,-121.283 38.7272,-121.327 38.6859,-121.377 38.6458,-121.418 38.6229,-121.423 38.6164,-121.432 38.6052,-121.443 38.5934,-121.451 38.5852,-121.46 38.581,-121.466 38.5742,-121.47 38.5659,-121.473 38.5572)
+LINESTRING(-84.8139 39.8374,-84.8258 39.8381,-84.8292 39.843,-84.834 39.8473,-84.8395 39.8513,-84.8446 39.8553,-84.877 39.8736,-84.9075 39.8737,-84.9396 39.8655,-84.977 39.8586,-85.007 39.858,-85.0371 39.8574,-85.0672 39.8567,-85.0973 39.8561,-85.1481 39.8555,-85.1983 39.8557,-85.2483 39.8565,-85.2987 39.8576,-85.3294 39.8574,-85.3602 39.856,-85.391 39.8543,-85.4216 39.8533,-85.443 39.8535,-85.4656 39.8542,-85.4882 39.8543,-85.5091 39.8526,-85.5214 39.8496,-85.5342 39.8443,-85.5456 39.8375,-85.5537 39.8298,-85.5774 39.8289,-85.6009 39.8282,-85.6244 39.8275,-85.6478 39.8269,-85.7053 39.8259,-85.7886 39.825,-85.8692 39.8231,-85.9186 39.8194,-85.956 39.81,-85.9766 39.8036,-86.0008 39.8008,-86.0463 39.8006)
+LINESTRING(-86.0541 39.8926,-86.053 39.8698,-86.0507 39.8468,-86.0481 39.8237,-86.0463 39.8006)
+LINESTRING(-87.2487 40.1261,-87.1648 40.1215,-87.0544 40.1086,-86.9439 40.0906,-86.86 40.0711,-86.8346 40.0606,-86.8151 40.048,-86.7972 40.0341,-86.7763 40.0196,-86.7582 40.0111,-86.7397 40.0053,-86.7211 39.9999,-86.7027 39.9927,-86.6579 39.9694,-86.5922 39.9351,-86.5268 39.9032,-86.4833 39.8871,-86.4719 39.8861,-86.4599 39.886,-86.4477 39.8859,-86.4359 39.8853,-86.4149 39.8715,-86.392 39.8577,-86.3682 39.845,-86.3443 39.8344,-86.3235 39.8337,-86.3009 39.8411,-86.2828 39.8502,-86.2754 39.8547)
+LINESTRING(-89.4122 40.1798,-89.3897 40.1799,-89.3673 40.1803,-89.3449 40.1809,-89.3225 40.1816,-89.3093 40.1911,-89.2974 40.2017,-89.286 40.2126,-89.2742 40.2232,-89.2616 40.2322,-89.2485 40.2393,-89.2353 40.2458,-89.2223 40.253,-89.2135 40.2608,-89.2098 40.2682,-89.2075 40.2754,-89.2029 40.2825,-89.1938 40.2908,-89.1852 40.297,-89.1763 40.3025,-89.166 40.3087,-89.155 40.3173,-89.1442 40.3282,-89.1338 40.3396,-89.1242 40.3494,-89.1211 40.3522,-89.1177 40.3549,-89.1137 40.3571,-89.1091 40.3584,-89.0965 40.3711,-89.0694 40.3971,-89.0402 40.4249,-89.0217 40.4429)
+LINESTRING(-89.4855 40.6202,-89.4776 40.6018,-89.4784 40.5764,-89.4794 40.55,-89.4716 40.5291,-89.475 40.5051,-89.475 40.4752,-89.4698 40.4456,-89.4572 40.4225,-89.4572 40.4207,-89.4569 40.3787,-89.4583 40.3352,-89.4574 40.2921,-89.4506 40.2511,-89.4478 40.2418,-89.445 40.2325,-89.4416 40.2227,-89.438 40.2143,-89.4321 40.2065,-89.4246 40.1998,-89.4174 40.1917,-89.4122 40.1798)
+LINESTRING(-86.0463 39.8006,-86.0674 39.8019,-86.0981 39.804,-86.1278 39.8056,-86.1456 39.8054)
+LINESTRING(-86.2754 39.8547,-86.2547 39.8395,-86.2176 39.8243,-86.177 39.812,-86.1456 39.8054)
+LINESTRING(-100.771 41.1021,-100.725 41.1007,-100.684 41.0982,-100.643 41.0967,-100.601 41.0963,-100.561 41.0865,-100.472 41.0424,-100.433 41.0325,-100.407 41.0305,-100.377 41.0255,-100.347 41.019,-100.321 41.0129,-100.262 40.9925,-100.205 40.965,-100.149 40.9354,-100.094 40.9084,-100.052 40.8919,-100.01 40.8768,-99.9684 40.8617,-99.9272 40.8454,-99.9085 40.8377,-99.8897 40.8301,-99.871 40.8224,-99.8526 40.8143,-99.8398 40.8075,-99.8275 40.8002,-99.8151 40.7929,-99.8021 40.7865,-99.7802 40.7786,-99.7574 40.7723,-99.7343 40.7664,-99.7118 40.7596,-99.6934 40.7543,-99.6744 40.7499,-99.6558 40.7453,-99.6382 40.7391,-99.6089 40.7356,-99.5826 40.7281,-99.5566 40.7203,-99.5279 40.7157,-99.4973 40.7151,-99.4667 40.7161,-99.4361 40.7173,-99.4055 40.7175,-99.3764 40.7155,-99.3477 40.7117,-99.3191 40.7072,-99.2904 40.703,-99.1848 40.6923,-99.0754 40.688,-98.9661 40.6909,-98.8606 40.7018,-98.8357 40.7029,-98.8111 40.7007,-98.7864 40.6981,-98.7616 40.6979,-98.7243 40.7007,-98.6873 40.7039,-98.6508 40.7089,-98.6148 40.717,-98.5576 40.74,-98.4977 40.7702,-98.438 40.7964,-98.3858 40.8062)
+LINESTRING(-95.874 41.2436,-95.8349 41.2259,-95.8164 41.2118,-95.8049 41.1945,-95.8018 41.1738,-95.8055 41.161,-95.8196 41.1396,-95.8233 41.1268,-95.8251 41.0985,-95.8271 41.0861,-95.8338 41.0646,-95.8358 41.0522,-95.8333 41.0315,-95.8247 41.014,-95.8128 40.9968,-95.8008 40.9772,-95.7901 40.9531,-95.784 40.9311,-95.7817 40.9086,-95.7823 40.8832,-95.7869 40.8576,-95.8024 40.8132,-95.8069 40.7876,-95.801 40.7447,-95.7804 40.7089,-95.7498 40.6751,-95.7142 40.6384,-95.6993 40.624,-95.6819 40.604,-95.6635 40.5854,-95.6629 40.5851)
+LINESTRING(-103.141 40.6184,-103.137 40.624,-103.058 40.6854,-102.962 40.7326,-102.849 40.7738,-102.767 40.8009,-102.693 40.8236,-102.617 40.8443,-102.531 40.8651,-102.503 40.8739,-102.481 40.8843,-102.457 40.8931,-102.429 40.8972,-102.4 40.8978,-102.371 40.8985,-102.342 40.8991,-102.312 40.8997,-102.257 40.9079,-102.212 40.9278,-102.173 40.9564,-102.134 40.9907,-102.127 40.993)
+LINESTRING(-111.774 39.978,-111.77 39.981,-111.767 39.9843,-111.763 39.9879,-111.761 39.9916,-111.761 40.0004,-111.76 40.0116,-111.759 40.0225,-111.757 40.0306,-111.743 40.0466,-111.715 40.0729,-111.687 40.0987,-111.67 40.1129)
+LINESTRING(-104.991 40.4074,-104.994 40.4322,-104.994 40.4577,-104.994 40.4832,-104.994 40.5082,-104.995 40.5268,-104.998 40.5453,-105 40.5638,-105.001 40.5826,-105.002 40.6236,-105.002 40.6653,-105 40.7069,-104.995 40.7477,-104.992 40.7586,-104.987 40.7697,-104.982 40.7809,-104.978 40.792,-104.973 40.8163,-104.968 40.8407,-104.962 40.8648,-104.952 40.8884,-104.948 40.8937,-104.944 40.899,-104.939 40.9042,-104.935 40.9096,-104.927 40.9311,-104.921 40.954,-104.915 40.9772,-104.907 40.9995,-104.907 40.9995)
+LINESTRING(-122.556 38.0876,-122.56 38.0929,-122.566 38.0998,-122.571 38.1066,-122.569 38.1179,-122.568 38.1293,-122.568 38.1408,-122.569 38.1521,-122.588 38.1758,-122.599 38.1999,-122.609 38.2231,-122.627 38.244,-122.651 38.2599,-122.675 38.2749,-122.697 38.291,-122.716 38.3102,-122.714 38.4249,-122.733 38.4747,-122.774 38.5128,-122.842 38.5921,-122.857 38.5964,-122.872 38.6008,-122.889 38.6184,-122.906 38.6359,-122.923 38.6535,-122.94 38.6711,-122.956 38.6831,-122.978 38.703,-123.004 38.7267,-123.034 38.7501,-123.032 38.7786,-123.009 38.8038,-122.98 38.8277,-122.958 38.8525,-122.968 38.8623,-122.979 38.8767,-122.988 38.8897,-122.993 38.8955,-122.994 38.9045,-122.995 38.9133,-122.997 38.9219,-122.999 38.9307,-123.015 38.9479,-123.049 38.952,-123.087 38.953,-123.115 38.9609,-123.126 38.9676,-123.146 38.9785,-123.165 38.99,-123.175 38.9982,-123.188 39.0213,-123.207 39.0459,-123.227 39.0705,-123.243 39.0937,-123.25 39.1267,-123.251 39.1694,-123.251 39.209,-123.256 39.233,-123.265 39.249,-123.274 39.2651,-123.284 39.2811,-123.293 39.2971,-123.304 39.3074,-123.31 39.3211,-123.314 39.3356,-123.322 39.3484,-123.317 39.3556,-123.313 39.3627,-123.314 39.3746,-123.327 39.3851,-123.342 39.3956,-123.353 39.4073,-123.357 39.4302,-123.35 39.4497,-123.346 39.4693,-123.359 39.492,-123.379 39.5082,-123.388 39.5231,-123.4 39.5352,-123.427 39.5425,-123.445 39.5934,-123.482 39.6919,-123.535 39.7874,-123.603 39.8295,-123.635 39.8219,-123.663 39.8227,-123.684 39.8309,-123.694 39.8455,-123.699 39.8505,-123.705 39.8554,-123.71 39.8603,-123.715 39.8652,-123.728 39.8792,-123.756 39.9105,-123.785 39.947,-123.799 39.9763,-123.795 40.0103,-123.785 40.0523,-123.784 40.0968,-123.807 40.1381,-123.776 40.1599,-123.776 40.181,-123.788 40.2004,-123.796 40.2174,-123.807 40.2159,-123.819 40.2144,-123.83 40.2241,-123.833 40.2314,-123.833 40.2393,-123.83 40.2508,-123.84 40.2545,-123.849 40.2583,-123.855 40.2658,-123.865 40.2688,-123.876 40.2719,-123.882 40.2788,-123.888 40.2853,-123.892 40.2923,-123.891 40.3008,-123.926 40.325,-123.937 40.3452,-123.944 40.3676,-123.965 40.398,-123.979 40.3985,-123.994 40.3991,-123.999 40.4064,-124.004 40.4137,-124.008 40.421,-124.013 40.4283,-124.024 40.4277,-124.035 40.4272,-124.046 40.4266,-124.057 40.4261,-124.067 40.4299,-124.076 40.4336,-124.086 40.4374,-124.095 40.4412,-124.097 40.4486,-124.099 40.4559,-124.101 40.4633,-124.104 40.4707,-124.118 40.4739,-124.133 40.48,-124.145 40.4879,-124.156 40.4962,-124.155 40.5434,-124.144 40.5679,-124.13 40.5856,-124.12 40.6124,-124.132 40.6176,-124.144 40.6251,-124.154 40.6341,-124.161 40.644,-124.156 40.6622,-124.153 40.6814,-124.154 40.7007,-124.158 40.7189,-124.152 40.728,-124.146 40.7419,-124.138 40.7568,-124.123 40.769,-124.102 40.7715,-124.08 40.7788,-124.06 40.7891,-124.045 40.8005,-124.044 40.8311,-124.053 40.8643,-124.07 40.8954,-124.094 40.9198)
+LINESTRING(-121.506 38.568,-121.51 38.5703,-121.515 38.5727,-121.519 38.5755,-121.522 38.5781,-121.532 38.5741,-121.542 38.5735,-121.552 38.5743,-121.562 38.5748,-121.595 38.5697,-121.651 38.5587,-121.709 38.5462,-121.747 38.5366,-121.783 38.5078,-121.856 38.4462,-121.941 38.3807,-122.013 38.3406,-122.022 38.33,-122.03 38.3174,-122.034 38.3042,-122.032 38.2917,-122.042 38.2816,-122.051 38.2711,-122.059 38.2604,-122.068 38.2497,-122.107 38.2311,-122.156 38.2036,-122.198 38.1724,-122.218 38.1426,-122.22 38.138)
+LINESTRING(-122.22 38.138,-122.229 38.1209,-122.231 38.0988,-122.228 38.0763,-122.227 38.0677)
+LINESTRING(-122.227 38.0677,-122.225 38.0601)
+LINESTRING(-86.0463 39.8006,-86.0457 39.7885,-86.0435 39.7755,-86.0394 39.7629,-86.0334 39.7516,-86.032 39.7469,-86.0305 39.7423,-86.029 39.7376,-86.0276 39.733,-86.0136 39.722,-86.0027 39.7098,-85.993 39.6969,-85.9825 39.6843,-85.9743 39.6774,-85.9639 39.6707,-85.953 39.6642,-85.9432 39.6583,-85.8634 39.6085,-85.7291 39.5234,-85.5957 39.4328,-85.5182 39.3669,-85.4792 39.3648,-85.4404 39.3517,-85.4026 39.3352,-85.3666 39.323,-85.3378 39.3188,-85.3052 39.3166,-85.2723 39.3152,-85.2424 39.3136,-85.2262 39.3109,-85.2102 39.306,-85.1946 39.3001,-85.1797 39.2944,-85.1382 39.2876,-85.0815 39.2864,-85.0242 39.2883,-84.9806 39.2908,-84.975 39.2884,-84.9696 39.2855,-84.9644 39.2824,-84.9356 39.2766,-84.9102 39.2749,-84.8847 39.2749,-84.8609 39.2775,-84.8572 39.2833,-84.8295 39.2723,-84.8235 39.269)
+LINESTRING(-89.5928 39.8013,-89.5938 39.8254,-89.5946 39.8621,-89.5947 39.8961,-89.5936 39.9123,-89.5849 39.9216,-89.5759 39.9304,-89.5681 39.9397,-89.563 39.9504,-89.5513 39.9602,-89.5327 39.9773,-89.515 39.9945,-89.5061 40.0044,-89.5047 40.0092,-89.5038 40.0147,-89.5021 40.02,-89.4982 40.0239,-89.4793 40.0358,-89.4528 40.0635,-89.4282 40.0931,-89.4147 40.1105,-89.4163 40.1264,-89.4178 40.1429,-89.4182 40.1595,-89.4164 40.1753,-89.4153 40.1765,-89.4143 40.1776,-89.4132 40.1787,-89.4122 40.1798)
+LINESTRING(-84.8235 39.269,-84.7907 39.2511,-84.7485 39.2275,-84.7108 39.2095)
+LINESTRING(-83.0135 39.8865,-83.0528 39.8426,-83.0838 39.8275,-83.1157 39.8237,-83.1579 39.8137,-83.1726 39.8071,-83.1863 39.7996,-83.1999 39.7917,-83.2139 39.7844,-83.2281 39.7784,-83.2428 39.7731,-83.2575 39.7678,-83.2717 39.7618,-83.3483 39.7252,-83.4249 39.6885,-83.5013 39.6518,-83.5777 39.615,-83.6098 39.5978,-83.6425 39.5788,-83.6755 39.5608,-83.7085 39.5467,-83.7352 39.5381,-83.7615 39.5304,-83.7879 39.523,-83.8147 39.5152,-83.8412 39.5077,-83.8687 39.5002,-83.8959 39.4922,-83.9214 39.4832,-83.9349 39.4762,-83.9471 39.4677,-83.9598 39.4595,-83.975 39.4532,-84.0045 39.444,-84.0336 39.4342,-84.0627 39.4245,-84.0922 39.4159,-84.107 39.415,-84.1149 39.4151,-84.1225 39.4146,-84.1525 39.406,-84.189 39.3901,-84.2233 39.3708,-84.2461 39.3522,-84.2549 39.3397,-84.2639 39.3246,-84.2725 39.3105,-84.2799 39.3009,-84.2935 39.2904,-84.3085 39.2806,-84.323 39.2707,-84.3354 39.2598,-84.3407 39.2478,-84.3428 39.231,-84.3439 39.2135,-84.3457 39.1998,-84.3576 39.189,-84.3821 39.1728,-84.4077 39.1575,-84.4228 39.1497,-84.4374 39.1468,-84.4448 39.1461,-84.4524 39.1456,-84.4599 39.1437,-84.4704 39.1393)
+LINESTRING(-84.1362 39.7781,-84.1401 39.751,-84.156 39.7225,-84.178 39.6958,-84.2001 39.6738,-84.2058 39.6606,-84.2143 39.6478,-84.2229 39.6349,-84.2289 39.6215,-84.2425 39.5942,-84.2633 39.5731,-84.287 39.5537,-84.3096 39.5315,-84.3228 39.5095,-84.3269 39.4896,-84.3278 39.47,-84.3314 39.4487,-84.337 39.4409,-84.3467 39.4331,-84.3567 39.4255,-84.3634 39.4178,-84.3678 39.4019,-84.3685 39.3844,-84.3689 39.3667,-84.3724 39.3501,-84.3826 39.3375,-84.3972 39.3303,-84.4118 39.3253,-84.4215 39.3195,-84.4344 39.299,-84.4424 39.2779,-84.448 39.2562,-84.4537 39.2337,-84.4616 39.219,-84.4768 39.1956,-84.4927 39.1737,-84.5029 39.1631,-84.5136 39.1598,-84.5243 39.1564,-84.5351 39.1531,-84.5458 39.1497)
+LINESTRING(-84.7108 39.2095,-84.702 39.2101,-84.6932 39.2111,-84.6846 39.2124,-84.6759 39.2137,-84.6691 39.2061,-84.6624 39.1986,-84.6516 39.196,-84.6443 39.1903,-84.6175 39.1889,-84.6018 39.1867,-84.5897 39.1794,-84.5735 39.1629,-84.5645 39.1628,-84.5579 39.1609,-84.5458 39.1497)
+LINESTRING(-89.6454 39.7396,-89.63 39.7462,-89.6183 39.7519,-89.6076 39.7581,-89.5946 39.7659,-89.5927 39.7747,-89.5922 39.7835,-89.5924 39.7924,-89.5928 39.8013)
+LINESTRING(-122.483 37.8245,-122.486 37.8341,-122.488 37.8407,-122.489 37.8437,-122.491 37.8469,-122.497 37.8536,-122.503 37.8597,-122.51 37.8679,-122.519 37.8809,-122.524 37.8849,-122.528 37.8895,-122.53 37.8947,-122.532 37.9004,-122.533 37.9145,-122.527 37.9402,-122.528 37.9543,-122.533 37.963,-122.546 37.9767,-122.551 37.9855,-122.558 38.0049,-122.557 38.0203,-122.542 38.0477,-122.541 38.063,-122.549 38.0791,-122.556 38.0876)
+LINESTRING(-84.4704 39.1393,-84.4873 39.1248,-84.5093 39.0996,-84.5176 39.089)
+LINESTRING(-84.5458 39.1497,-84.5393 39.0876)
+LINESTRING(-122.472 37.8019,-122.473 37.8023,-122.479 37.8108,-122.483 37.8245)
+LINESTRING(-79.0473 38.1166,-79.0216 38.1538,-78.9911 38.1897,-78.9625 38.223,-78.9427 38.2521,-78.9346 38.283,-78.934 38.3153,-78.9328 38.3468,-78.923 38.3753,-78.9012 38.3993,-78.8723 38.4212,-78.8418 38.4424,-78.8154 38.464,-78.7793 38.5102,-78.7506 38.5605,-78.7176 38.6128,-78.6683 38.6649,-78.6671 38.6813,-78.6661 38.6979,-78.6643 38.7144,-78.6607 38.7305,-78.6536 38.7441,-78.6429 38.7566,-78.6307 38.7684,-78.6194 38.7801,-78.6152 38.7861,-78.6123 38.7926,-78.6098 38.7991,-78.6067 38.8054,-78.5995 38.8133,-78.5885 38.8224,-78.5767 38.8315,-78.5672 38.8394,-78.5242 38.8826,-78.4794 38.9285,-78.4316 38.9723,-78.3797 39.0093,-78.3655 39.0119,-78.3418 39.0125,-78.3169 39.0122,-78.2991 39.0122)
+LINESTRING(-122.225 38.0601,-122.224 38.0536,-122.239 38.0177,-122.253 37.9949,-122.268 37.9805,-122.283 37.9695,-122.299 37.9553,-122.306 37.9423,-122.303 37.93,-122.292 37.9177,-122.283 37.9018,-122.277 37.8784,-122.276 37.8542,-122.283 37.8358,-122.294 37.8314)
+LINESTRING(-84.5176 39.089,-84.5283 39.0751,-84.5366 39.0625)
+LINESTRING(-84.5393 39.0876,-84.5366 39.0625)
+LINESTRING(-87.4137 39.4313,-87.358 39.4309,-87.3305 39.4309,-87.3029 39.4312,-87.2881 39.4426,-87.2709 39.4453,-87.253 39.4457,-87.2349 39.4452,-87.2173 39.4453,-87.2092 39.4468,-87.2016 39.4498,-87.1943 39.453,-87.187 39.4554,-87.1734 39.4565,-87.1567 39.4557,-87.1395 39.4544,-87.1244 39.454,-87.0963 39.4597,-87.0702 39.4612,-87.0465 39.4622,-87.0256 39.4667,-87.0122 39.4729,-86.9997 39.4802,-86.9876 39.4878,-86.9751 39.495,-86.9469 39.5083,-86.9169 39.5205,-86.8863 39.5318,-86.8562 39.5425,-86.7673 39.5425,-86.6485 39.5666,-86.5292 39.6019,-86.4391 39.6359,-86.4252 39.6428,-86.3981 39.658,-86.3841 39.6649,-86.3708 39.6697,-86.3566 39.6737,-86.3425 39.6779,-86.3297 39.6834,-86.2897 39.7063,-86.2686 39.7169,-86.2465 39.725,-86.2297 39.7476,-86.2136 39.7519,-86.189 39.7532,-86.1633 39.7525,-86.1441 39.751)
+LINESTRING(-87.4137 39.4313,-87.4268 39.433,-87.4425 39.4493,-87.4634 39.4487,-87.4958 39.4445,-87.5275 39.4381,-87.5307 39.4369)
+LINESTRING(-122.389 37.7857,-122.389 37.7857,-122.375 37.7971,-122.36 37.8073,-122.334 37.8203,-122.333 37.8205)
+LINESTRING(-78.5764 38.0235,-78.5768 38.0236,-78.5976 38.0272,-78.6131 38.0299,-78.6476 38.032,-78.6721 38.0284,-78.6985 38.0284,-78.7386 38.0416,-78.7415 38.043,-78.771 38.0486,-78.7895 38.0494,-78.8071 38.0472,-78.8339 38.044,-78.8917 38.0471,-78.9476 38.0638,-79 38.0887,-79.0473 38.1166)
+LINESTRING(-122.408 37.7686,-122.389 37.7857)
+LINESTRING(-122.408 37.7686,-122.412 37.7817,-122.416 37.7861,-122.421 37.7892,-122.429 37.7913,-122.437 37.7927,-122.45 37.7946,-122.463 37.7974,-122.472 37.8019)
+LINESTRING(-91.3066 40.0064,-91.3079 39.9896,-91.3154 39.9566,-91.3217 39.9196,-91.3193 39.891,-91.3223 39.8859,-91.3278 39.8808,-91.3331 39.8755,-91.3355 39.8699,-91.3257 39.8534,-91.3126 39.8396,-91.301 39.8231,-91.2954 39.7984,-91.2985 39.7956,-91.3015 39.7927,-91.3046 39.7898,-91.3077 39.7869,-91.3087 39.7818,-91.3097 39.7748,-91.3098 39.7678,-91.3083 39.7629,-91.3069 39.762,-91.3055 39.7611,-91.3042 39.7602,-91.3028 39.7593,-91.278 39.7448,-91.2518 39.7327,-91.2237 39.7237,-91.1935 39.7182,-91.1902 39.7194,-91.187 39.7206,-91.1833 39.7218,-91.1805 39.7225,-91.0656 39.7291,-91.0266 39.718,-91.0062 39.6999,-90.9477 39.685,-90.9063 39.6805,-90.8644 39.676,-90.8224 39.6733,-90.7807 39.6737,-90.7767 39.6745,-90.7727 39.6759,-90.7687 39.6773,-90.7646 39.678,-90.7154 39.6797,-90.6661 39.6815,-90.6167 39.6831,-90.5675 39.6839,-90.4928 39.6822,-90.4167 39.6788,-90.3406 39.677,-90.2662 39.6802,-90.2531 39.6816,-90.2401 39.6831,-90.2242 39.6851,-90.2149 39.6868,-90.1959 39.699,-90.1808 39.7151,-90.1625 39.7294,-90.134 39.7358,-90.0568 39.7371,-89.9798 39.739,-89.9027 39.7408,-89.8254 39.7419,-89.8204 39.7435,-89.8105 39.7471,-89.7998 39.7509,-89.792 39.7532,-89.7661 39.755,-89.7383 39.7526,-89.7109 39.7477,-89.6861 39.7422,-89.677 39.7409,-89.6661 39.7403,-89.6551 39.74,-89.6454 39.7396)
+LINESTRING(-95.6629 40.5851,-95.6456 40.5751,-95.6363 40.5576,-95.6251 40.5407,-95.6127 40.5243,-95.5997 40.5082,-95.598 40.4799,-95.5874 40.4516,-95.5717 40.4241,-95.555 40.3986,-95.5436 40.3828,-95.5315 40.368,-95.5193 40.3533,-95.5078 40.338,-95.5005 40.3244,-95.4949 40.3102,-95.4886 40.2963,-95.479 40.2833,-95.4523 40.2593,-95.4232 40.2366,-95.3632 40.193,-95.3477 40.1857,-95.3169 40.1722,-95.267 40.1507,-95.2471 40.1355,-95.2306 40.1137,-95.2171 40.0924,-95.2059 40.0786,-95.1889 40.0671,-95.1693 40.0559,-95.1492 40.0451,-95.1304 40.0348,-95.0972 40.0144,-95.0618 39.9935,-95.0237 39.9772,-94.9827 39.9707,-94.9519 39.9503,-94.8953 39.9103)
+LINESTRING(-77.0465 38.8705,-77.0566 38.86,-77.072 38.8528,-77.0891 38.8473,-77.1073 38.839,-77.113 38.8341,-77.118 38.8279,-77.123 38.8218,-77.1287 38.8167,-77.1397 38.8109,-77.152 38.8053,-77.1637 38.799,-77.1727 38.7908,-77.1801 38.7772,-77.1852 38.7626,-77.1904 38.7481,-77.1981 38.7346,-77.2039 38.7288,-77.2111 38.7235,-77.2186 38.7185,-77.2253 38.7133,-77.2322 38.7049,-77.2374 38.6953,-77.2424 38.6858,-77.2488 38.6775,-77.2573 38.6709,-77.2668 38.6653,-77.2764 38.6595,-77.2849 38.6523,-77.3028 38.629,-77.317 38.6038,-77.3295 38.578,-77.3421 38.5527,-77.3557 38.5333,-77.3731 38.5152,-77.3913 38.4973,-77.4074 38.4787,-77.4171 38.4601,-77.4233 38.4405,-77.4296 38.4215,-77.4398 38.4047,-77.4606 38.3825,-77.4873 38.3524,-77.5105 38.3202,-77.5204 38.2918,-77.5181 38.2763,-77.5125 38.2609,-77.5056 38.2457,-77.4998 38.2307,-77.4965 38.1972,-77.503 38.165,-77.5112 38.1327,-77.5133 38.099,-77.5089 38.064,-77.5024 38.0278,-77.4931 37.9919,-77.4803 37.958,-77.4672 37.9283,-77.4571 37.9007,-77.4508 37.8726,-77.4491 37.8409,-77.4526 37.7881,-77.4571 37.7307,-77.4581 37.6737,-77.4511 37.622,-77.4558 37.6136,-77.4616 37.6059,-77.4673 37.5985,-77.4717 37.591)
+LINESTRING(-77.4717 37.591,-77.4792 37.5919,-77.4858 37.5936,-77.492 37.5957,-77.4989 37.5974,-77.5083 37.5985,-77.5186 37.5992,-77.5288 37.6001,-77.5383 37.6016,-77.5604 37.6116,-77.5773 37.6265,-77.5923 37.6425,-77.6089 37.6558,-77.6591 37.6764,-77.7163 37.6909,-77.7734 37.7055,-77.8236 37.7265,-77.8633 37.7532,-77.9162 37.7922,-77.9672 37.8316,-78.0013 37.8598,-78.0251 37.8839,-78.0478 37.9084,-78.0731 37.9309,-78.1046 37.949,-78.1305 37.9578,-78.1805 37.9741,-78.2302 37.9899,-78.2549 37.9973,-78.2643 37.9979,-78.2732 37.9976,-78.2819 37.997,-78.2912 37.9963,-78.3201 37.9977,-78.3447 38.0038,-78.368 38.0133,-78.3929 38.0245,-78.4021 38.0278,-78.4128 38.0302,-78.4235 38.0307,-78.4326 38.028,-78.4501 38.0182,-78.4701 38.0089,-78.4917 38.0023,-78.5136 38.0006,-78.5224 38.0023,-78.5303 38.0059,-78.5376 38.0103,-78.5444 38.0149,-78.5569 38.0194,-78.5764 38.0235)
+LINESTRING(-84.5366 39.0625,-84.5841 39.042,-84.6163 39.0253,-84.6326 39.0013,-84.6326 38.9592,-84.63 38.939,-84.6277 38.9188,-84.625 38.8987,-84.6211 38.8784)
+LINESTRING(-121.926 37.6995,-121.934 37.6995,-121.944 37.698,-121.954 37.6959,-121.965 37.6941,-121.975 37.6946,-121.985 37.6972,-121.995 37.7001,-122.005 37.7015,-122.025 37.6986,-122.039 37.6932,-122.053 37.6896,-122.072 37.6924,-122.084 37.7049,-122.095 37.7176,-122.106 37.7305,-122.118 37.7432,-122.122 37.7495,-122.124 37.7566,-122.126 37.7635,-122.129 37.7697,-122.147 37.7848,-122.169 37.7984,-122.191 37.8129,-122.206 37.8305,-122.212 37.8312,-122.218 37.831,-122.224 37.8304,-122.23 37.8295,-122.238 37.8277,-122.249 37.8282,-122.259 37.8284,-122.265 37.8255,-122.273 37.8271,-122.28 37.8286,-122.288 37.8301,-122.294 37.8314)
+LINESTRING(-81.6049 38.3774,-81.5808 38.4059,-81.5334 38.4407,-81.4816 38.4719,-81.4429 38.4913,-81.4225 38.4984,-81.4011 38.5046,-81.38 38.5106,-81.3605 38.5176,-81.3412 38.5297,-81.3231 38.5455,-81.3043 38.5603,-81.2832 38.5697,-81.2549 38.5716,-81.2128 38.5716,-81.1727 38.5716,-81.1502 38.5737,-81.1392 38.5792,-81.1272 38.5857,-81.1151 38.5919,-81.104 38.5963,-81.0927 38.5977,-81.0805 38.5988,-81.0648 38.5998,-81.049 38.6003,-81.0332 38.6009,-81.0176 38.602,-80.9967 38.6055,-80.9764 38.6101,-80.9558 38.614,-80.9341 38.6154,-80.8978 38.6144,-80.8765 38.6141,-80.8556 38.6154,-80.8205 38.6194,-80.7981 38.6203,-80.7796 38.6207,-80.7637 38.6258,-80.7489 38.6407,-80.7419 38.654,-80.7367 38.6685,-80.7311 38.6826,-80.7229 38.6952,-80.7129 38.703,-80.7031 38.7075,-80.6935 38.7142,-80.6843 38.7285,-80.6754 38.7559,-80.6696 38.7844,-80.6622 38.8123,-80.6487 38.838,-80.6223 38.8677,-80.5926 38.896,-80.5633 38.9243,-80.5379 38.9545,-80.5195 38.9633,-80.5067 38.9731,-80.4979 38.9857,-80.4915 39.0023,-80.467 39.0085,-80.4571 39.014,-80.4508 39.0202,-80.4372 39.0283,-80.4252 39.0324,-80.4125 39.0352,-80.3998 39.0378,-80.3881 39.0416,-80.3831 39.0461,-80.38 39.0623,-80.3839 39.0766,-80.3887 39.091,-80.3902 39.1046,-80.3869 39.1175,-80.3812 39.1307,-80.3745 39.1436,-80.3683 39.1556,-80.3515 39.1819,-80.3309 39.2065,-80.3111 39.2314,-80.2965 39.2581,-80.287 39.2629,-80.2776 39.2677,-80.2734 39.2749,-80.2693 39.2822)
+LINESTRING(-81.6062 38.3759,-81.6049 38.3774)
+LINESTRING(-81.4994 39.2676,-81.5017 39.2591,-81.5041 39.2507,-81.5067 39.2423,-81.5094 39.2339,-81.5215 39.2253,-81.5274 39.2138,-81.5293 39.201,-81.5298 39.1883,-81.5319 39.1848,-81.5365 39.1789,-81.5413 39.1716,-81.5441 39.1641,-81.5438 39.1421,-81.5404 39.121,-81.5402 39.0999,-81.5494 39.0779,-81.5598 39.0694,-81.5814 39.0532,-81.5998 39.0395,-81.6182 39.0258,-81.6526 38.9969,-81.6933 38.9571,-81.7277 38.9146,-81.7432 38.8777,-81.7429 38.8603,-81.7408 38.8428,-81.7382 38.8252,-81.736 38.8078,-81.7296 38.7868,-81.7153 38.7671,-81.6944 38.7514,-81.6685 38.7423,-81.6549 38.7228,-81.6509 38.6968,-81.6509 38.6695,-81.6492 38.646,-81.6471 38.6387,-81.6443 38.6314,-81.6415 38.6241,-81.6398 38.6167,-81.6409 38.6035,-81.6457 38.587,-81.6512 38.57,-81.6549 38.5553,-81.6542 38.5226,-81.6476 38.4772,-81.6379 38.4318,-81.6278 38.3992,-81.6245 38.3953,-81.6176 38.3878,-81.6119 38.3819,-81.6062 38.3759)
+LINESTRING(-77.4717 37.591,-77.459 37.5804,-77.4462 37.5698,-77.4334 37.5591,-77.4206 37.5485,-77.4093 37.5451,-77.3985 37.5385,-77.3875 37.5315,-77.3759 37.5271,-77.3626 37.5255,-77.3463 37.5247,-77.3157 37.524,-77.2664 37.5217)
+LINESTRING(-121.565 37.7428,-121.581 37.741,-121.596 37.7381,-121.612 37.7353,-121.627 37.7336,-121.645 37.7223,-121.667 37.7184,-121.69 37.7173,-121.712 37.714,-121.718 37.7111,-121.726 37.7072,-121.733 37.7037,-121.74 37.7016,-121.778 37.6992,-121.821 37.6992,-121.865 37.7001,-121.904 37.7003,-121.909 37.7001,-121.914 37.6999,-121.918 37.6997,-121.923 37.6995,-121.926 37.6995)
+LINESTRING(-104.982 39.82,-104.965 39.8309,-104.939 39.8484,-104.912 39.8658,-104.885 39.8833,-104.818 39.9135,-104.741 39.9837,-104.663 40.0601,-104.594 40.1089,-104.578 40.1118,-104.558 40.1116,-104.538 40.1104,-104.52 40.1103,-104.486 40.1387,-104.456 40.1569,-104.421 40.1667,-104.372 40.17,-104.36 40.1699,-104.348 40.1699,-104.335 40.1702,-104.324 40.1713,-104.288 40.1826,-104.242 40.2012,-104.198 40.2193,-104.164 40.2294,-104.142 40.2328,-104.116 40.2369,-104.091 40.2406,-104.068 40.2429,-104.052 40.2516,-104.042 40.2576,-104.034 40.2606,-103.993 40.2621,-103.947 40.2647,-103.906 40.2732,-103.878 40.2928,-103.829 40.2914,-103.779 40.2916,-103.73 40.2927,-103.681 40.2939,-103.655 40.2948,-103.614 40.2967,-103.576 40.2995,-103.553 40.3028,-103.45 40.3513,-103.36 40.4081,-103.279 40.4718,-103.202 40.5407,-103.141 40.6184)
+LINESTRING(-104.987 39.8226,-104.982 39.82)
+LINESTRING(-86.1456 39.8054,-86.1483 39.7923,-86.1497 39.7775,-86.1479 39.7631,-86.1406 39.7512,-86.1196 39.7282,-86.1004 39.7082,-86.0838 39.6873,-86.0703 39.6619,-86.0618 39.6314,-86.0583 39.6037,-86.053 39.5765,-86.0394 39.5476,-86.0282 39.5279,-86.0203 39.5096,-86.0129 39.4911,-86.0033 39.4708,-85.9809 39.4379,-85.9582 39.409,-85.9425 39.3795,-85.9411 39.3448,-85.9451 39.3299,-85.949 39.3196,-85.953 39.3092,-85.9569 39.2943,-85.9554 39.2727,-85.9465 39.2511,-85.9376 39.2294,-85.936 39.2078,-85.941 39.1842,-85.946 39.1606,-85.9509 39.1369,-85.9559 39.1133,-85.9547 39.105,-85.9514 39.0971,-85.9328 39.0756,-85.9169 39.0558,-85.9003 39.0367,-85.8798 39.0175,-85.8674 39.0091,-85.8552 39.0022,-85.8448 38.9945)
+LINESTRING(-104.992 39.8134,-104.982 39.82)
+LINESTRING(-104.992 39.8134,-104.995 39.8378,-104.995 39.8632,-104.993 39.8886,-104.992 39.9132,-104.989 39.9354,-104.986 39.9573,-104.982 39.979,-104.98 40.0006,-104.978 40.0392,-104.977 40.0781,-104.977 40.117,-104.977 40.1557,-104.976 40.2014,-104.974 40.2474,-104.973 40.2933,-104.975 40.3388,-104.984 40.3546,-104.989 40.3719,-104.99 40.3899,-104.991 40.4074)
+LINESTRING(-121.506 38.568,-121.506 38.5541,-121.505 38.5405,-121.503 38.527,-121.5 38.5132,-121.495 38.4898,-121.494 38.474,-121.493 38.4594,-121.491 38.4395,-121.485 38.407,-121.478 38.374,-121.471 38.3411,-121.463 38.3089,-121.455 38.273,-121.448 38.2517,-121.436 38.232,-121.412 38.2009,-121.409 38.196,-121.407 38.191,-121.405 38.1861,-121.403 38.1811,-121.403 38.1682,-121.403 38.1553,-121.402 38.1424,-121.402 38.1294,-121.391 38.1025,-121.367 38.0474,-121.342 37.9906,-121.327 37.9583,-121.317 37.9473,-121.305 37.9298,-121.295 37.9135,-121.29 37.9063,-121.28 37.8858,-121.283 37.8522,-121.292 37.8184,-121.299 37.7973,-121.326 37.7741,-121.366 37.7652,-121.409 37.7635,-121.449 37.7624,-121.46 37.7566,-121.471 37.7507,-121.482 37.7449,-121.493 37.739,-121.51 37.7401,-121.532 37.7409,-121.553 37.7416,-121.565 37.7428)
+LINESTRING(-121.473 38.5572,-121.475 38.5507,-121.475 38.5436,-121.473 38.5365,-121.47 38.5303,-121.458 38.5133,-121.444 38.4995,-121.429 38.4865,-121.416 38.472,-121.407 38.4569,-121.399 38.4405,-121.392 38.4238,-121.385 38.4081,-121.373 38.391,-121.359 38.3755,-121.344 38.3601,-121.331 38.3436,-121.322 38.3311,-121.311 38.3177,-121.301 38.3041,-121.294 38.2909,-121.286 38.275,-121.277 38.261,-121.267 38.2472,-121.257 38.2321,-121.238 38.1755,-121.23 38.1046,-121.229 38.0376,-121.228 37.9926,-121.229 37.99,-121.229 37.9872,-121.228 37.9844,-121.226 37.9819,-121.218 37.9532,-121.216 37.9221,-121.217 37.8907,-121.216 37.8607,-121.216 37.8516,-121.216 37.8423,-121.216 37.833,-121.218 37.8239,-121.21 37.8181,-121.203 37.8115,-121.196 37.8046,-121.189 37.798)
+LINESTRING(-94.2233 39.7521,-94.2224 39.7577,-94.2127 39.7802,-94.1861 39.8365,-94.159 39.8925,-94.1455 39.9196,-94.1356 39.932,-94.1243 39.9442,-94.1133 39.9565,-94.104 39.9691,-94.1006 39.989,-94.1026 40.0178,-94.1049 40.0475,-94.1027 40.0702,-94.09 40.0889,-94.0653 40.1195,-94.0387 40.1514,-94.0201 40.1737,-94.0202 40.185,-94.0197 40.1963,-94.0192 40.2074,-94.0187 40.2186,-94.0117 40.304,-93.9954 40.3879,-93.9711 40.4711,-93.9407 40.5538,-93.9253 40.5752)
+LINESTRING(-94.8953 39.9103,-94.8393 39.8693,-94.8101 39.8461,-94.8082 39.8204,-94.7955 39.7759,-94.7931 39.7488)
+LINESTRING(-105.04 39.7197,-105.035 39.7448,-105.026 39.7688,-105.012 39.7917,-104.992 39.8134)
+LINESTRING(-79.3755 37.8185,-79.3732 37.828,-79.367 37.8372,-79.3573 37.848,-79.3421 37.8608,-79.3169 37.8774,-79.2902 37.8926,-79.2643 37.9085,-79.241 37.9268,-79.221 37.9499,-79.1972 37.981,-79.1742 38.0102,-79.1565 38.0272,-79.1487 38.0306,-79.1399 38.0332,-79.1311 38.0357,-79.1232 38.0389,-79.1027 38.0522,-79.0856 38.0686,-79.071 38.0866,-79.0579 38.1048,-79.0555 38.1079,-79.053 38.1108,-79.0473 38.1166)
+LINESTRING(-105.668 39.7559,-105.628 39.7673,-105.601 39.7692,-105.575 39.7618,-105.538 39.7455,-105.527 39.7424,-105.517 39.7415,-105.508 39.7411,-105.501 39.7394,-105.495 39.7417,-105.489 39.7434,-105.482 39.745,-105.476 39.747,-105.467 39.746,-105.458 39.7456,-105.449 39.746,-105.44 39.7473,-105.421 39.7358,-105.403 39.7265,-105.384 39.7191,-105.36 39.713,-105.352 39.7105,-105.344 39.7071,-105.335 39.7041,-105.327 39.7023,-105.316 39.7037,-105.303 39.7076,-105.286 39.7104,-105.263 39.7088,-105.247 39.7048,-105.233 39.7001,-105.218 39.6961,-105.201 39.6944,-105.197 39.6961,-105.187 39.6993,-105.176 39.7064,-105.166 39.7196,-105.131 39.7202,-105.103 39.7194,-105.075 39.7187,-105.04 39.7197)
+LINESTRING(-82.6478 38.3784,-82.6333 38.3789,-82.6044 38.377,-82.5807 38.3658)
+LINESTRING(-82.5807 38.3658,-82.58 38.3655,-82.5387 38.3586,-82.5016 38.3566,-82.4781 38.3585,-82.4345 38.3608,-82.3849 38.3755,-82.3722 38.383,-82.3469 38.3976,-82.3203 38.4122,-82.3039 38.4197,-82.2932 38.4211,-82.2822 38.4214,-82.2711 38.4217,-82.2605 38.4232,-82.2504 38.4264,-82.2406 38.4302,-82.2306 38.4336,-82.2198 38.4358,-82.2016 38.4369,-82.1745 38.4377,-82.1476 38.4381,-82.1299 38.4378,-82.116 38.4356,-82.102 38.4321,-82.088 38.429,-82.0744 38.4279,-82.0535 38.4317,-82.0354 38.4393,-82.0178 38.4478,-81.9987 38.4541,-81.9732 38.4562,-81.9323 38.4572,-81.8911 38.4566,-81.8647 38.4539,-81.8598 38.4522,-81.8531 38.4496,-81.8464 38.4465,-81.8416 38.4438,-81.8334 38.4365,-81.8272 38.4285,-81.8212 38.4205,-81.8138 38.4134,-81.798 38.4034,-81.779 38.3926,-81.7609 38.3818,-81.748 38.3717,-81.7298 38.3657,-81.7257 38.3659,-81.7221 38.3664,-81.719 38.3664,-81.7161 38.3648,-81.7 38.3639,-81.6837 38.362,-81.6677 38.3589,-81.6527 38.3545,-81.6443 38.359,-81.6299 38.3664,-81.6152 38.3732,-81.6062 38.3759)
+LINESTRING(-87.5307 39.4369,-87.5464 39.4311,-87.5792 39.4295,-87.6106 39.4275,-87.642 39.4263,-87.6748 39.4268,-87.6852 39.4271,-87.6955 39.4261,-87.7073 39.4219,-87.7179 39.4159,-87.7279 39.4101,-87.7376 39.4063,-87.7501 39.4041,-87.7628 39.4026,-87.7756 39.4009,-87.7884 39.3984,-87.8397 39.3827,-87.8989 39.3615,-87.9567 39.3385,-88.0039 39.3177,-88.0125 39.3128,-88.0208 39.307,-88.0292 39.3013,-88.0382 39.2964,-88.0661 39.2856,-88.0953 39.2765,-88.1249 39.2673,-88.1537 39.2564,-88.1604 39.257,-88.1675 39.2569,-88.1745 39.2562,-88.181 39.2549,-88.2172 39.233,-88.2604 39.2153,-88.3057 39.2004,-88.3485 39.1867,-88.3578 39.1816,-88.3677 39.176,-88.4007 39.1669,-88.4381 39.1607,-88.4762 39.1558,-88.5126 39.1509)
+LINESTRING(-89.5928 39.8013,-89.5837 39.8046,-89.5745 39.8079,-89.5656 39.8113,-89.5563 39.8153,-89.5474 39.8225,-89.542 39.8298,-89.5319 39.8354,-89.5084 39.8376,-89.4466 39.8395,-89.387 39.8441,-89.3274 39.8486,-89.2656 39.8503,-89.2129 39.8491,-89.1594 39.8483,-89.1062 39.8505,-89.0542 39.8584,-89.0555 39.8651,-89.0559 39.8716,-89.0355 39.9059,-88.9971 39.9231,-88.9498 39.9294,-88.9026 39.9312,-88.8966 39.9317,-88.8713 39.9395,-88.8515 39.951,-88.8348 39.9654,-88.8187 39.982,-88.8126 39.9868,-88.8059 39.9907,-88.7995 39.9952,-88.7945 40.0013,-88.793 40.0064,-88.7922 40.012,-88.7906 40.0173,-88.7865 40.0217,-88.7417 40.0307,-88.6919 40.0331,-88.6418 40.0335,-88.5955 40.037,-88.5812 40.0425,-88.5724 40.0513,-88.5658 40.0608,-88.5579 40.068,-88.493 40.1043,-88.4564 40.1203,-88.4071 40.1231,-88.304 40.1198,-88.3039 40.0182,-88.3031 39.9676,-88.3008 39.9166,-88.2959 39.9107,-88.2852 39.9026,-88.2738 39.8952,-88.2671 39.8909,-88.267 39.7903,-88.2678 39.7754,-88.2712 39.7655,-88.2785 39.7564,-88.2911 39.7442,-88.289 39.7066,-88.2829 39.6594,-88.2822 39.6147,-88.296 39.5848,-88.2965 39.5588,-88.2933 39.5239,-88.2932 39.4907,-88.3032 39.4697,-88.3446 39.4393,-88.3613 39.4166,-88.3707 39.3868,-88.3903 39.3353,-88.3972 39.322,-88.4124 39.2968,-88.419 39.2837,-88.4242 39.2694,-88.4286 39.2546,-88.4331 39.2399,-88.4389 39.226,-88.4434 39.2199,-88.4494 39.214,-88.455 39.2081,-88.4582 39.2022,-88.4671 39.1896,-88.4834 39.1766,-88.5007 39.1636,-88.5126 39.1509)
+LINESTRING(-88.5126 39.1509,-88.5357 39.1544,-88.5442 39.1555,-88.558 39.1548,-88.5699 39.1501,-88.5787 39.1423,-88.5832 39.1321,-88.5839 39.1224,-88.583 39.1138,-88.5814 39.1051,-88.5806 39.0957)
+LINESTRING(-76.3173 37.0126,-76.3187 37.0162,-76.3199 37.0251,-76.3231 37.0342,-76.33 37.0405,-76.3424 37.0408,-76.3477 37.0367,-76.3548 37.0338,-76.3625 37.032,-76.37 37.0307,-76.3874 37.0381,-76.404 37.0492,-76.4194 37.0615,-76.4332 37.0729,-76.4464 37.0873,-76.4551 37.1035,-76.4628 37.1202,-76.4731 37.1362,-76.4987 37.1673,-76.5209 37.1921,-76.5467 37.2137,-76.5831 37.2356,-76.5887 37.2386,-76.5944 37.2416,-76.6001 37.2445,-76.6057 37.2475,-76.6172 37.2583,-76.6342 37.2669,-76.6518 37.2754,-76.6648 37.286,-76.6959 37.3214,-76.7401 37.3638,-76.7878 37.4043,-76.8296 37.434,-76.8488 37.4459,-76.8706 37.4595,-76.8923 37.4722,-76.9114 37.4816,-76.92 37.4844,-76.9305 37.4872,-76.9411 37.4896,-76.95 37.4914,-76.9715 37.4941,-76.9933 37.4949,-77.0151 37.4952,-77.0368 37.4964,-77.0945 37.5033,-77.1519 37.5114,-77.2092 37.5183,-77.2664 37.5217)
+LINESTRING(-76.3152 37.007,-76.3173 37.0126)
+LINESTRING(-106.456 39.6068,-106.443 39.6148,-106.43 39.6236,-106.416 39.6321,-106.403 39.6396,-106.387 39.6438,-106.364 39.6468,-106.34 39.6481,-106.322 39.6475,-106.314 39.6446,-106.303 39.639,-106.293 39.6328,-106.285 39.6281,-106.283 39.6223,-106.28 39.617,-106.278 39.6114,-106.278 39.6046,-106.276 39.6014,-106.273 39.5982,-106.265 39.5962,-106.257 39.596,-106.25 39.5947,-106.245 39.5892,-106.247 39.5847,-106.249 39.5801,-106.243 39.5706,-106.23 39.5538,-106.217 39.5363,-106.208 39.5245,-106.206 39.5209,-106.205 39.5173,-106.202 39.5137,-106.2 39.5109,-106.194 39.5074,-106.187 39.5043,-106.179 39.5018,-106.172 39.5005,-106.167 39.5017,-106.161 39.5029,-106.156 39.5045,-106.153 39.506,-106.152 39.5106,-106.149 39.5149,-106.145 39.5191,-106.143 39.5232,-106.133 39.5467,-106.122 39.5693,-106.107 39.5911,-106.087 39.6116,-106.082 39.6157,-106.076 39.6194,-106.072 39.6237,-106.069 39.6293,-106.046 39.64,-106.008 39.6556,-105.969 39.6703,-105.945 39.6783,-105.93 39.6801,-105.914 39.6805,-105.899 39.6812,-105.885 39.6837,-105.875 39.6879,-105.865 39.6928,-105.855 39.6972,-105.844 39.6995,-105.814 39.6984,-105.777 39.6948,-105.74 39.6928,-105.713 39.6966,-105.7 39.7076,-105.691 39.7247,-105.681 39.7425,-105.668 39.7559)
+LINESTRING(-76.3114 37.0005,-76.3143 37.0048,-76.3152 37.007)
+LINESTRING(-76.2989 36.9702,-76.3002 36.9818,-76.3068 36.9939,-76.3114 37.0005)
+LINESTRING(-76.2655 36.9521,-76.2687 36.9581,-76.2763 36.9602,-76.284 36.9623,-76.2917 36.9646,-76.2986 36.967,-76.2989 36.9702)
+LINESTRING(-80.2325 37.7861,-80.2307 37.7861,-80.213 37.7934,-80.1989 37.8038,-80.1822 37.8132,-80.1572 37.8174,-80.1039 37.8127,-80.0576 37.8032,-80.0157 37.7969,-79.9757 37.8016,-79.9308 37.8211,-79.8907 37.8391,-79.8482 37.8505,-79.7964 37.8502,-79.7845 37.846,-79.7694 37.8378,-79.7548 37.8285,-79.7442 37.8212,-79.7396 37.8164,-79.7362 37.8106,-79.7325 37.8051,-79.7272 37.8008,-79.6832 37.8099,-79.6469 37.8435,-79.6139 37.8765,-79.5799 37.8839,-79.5411 37.8658,-79.4809 37.8469,-79.4199 37.8293,-79.3755 37.8185)
+LINESTRING(-121.926 37.6995,-121.924 37.694,-121.923 37.6889,-121.921 37.6836,-121.919 37.6783,-121.906 37.6569,-121.887 37.6407,-121.868 37.6246,-121.854 37.6031,-121.856 37.5895,-121.867 37.5789,-121.883 37.5695,-121.9 37.5595,-121.917 37.5466,-121.93 37.5326,-121.937 37.5172,-121.936 37.4998,-121.926 37.4819,-121.911 37.4687,-121.895 37.4561,-121.878 37.4401,-121.872 37.413,-121.869 37.3885,-121.862 37.3653,-121.846 37.3423)
+LINESTRING(-121.942 37.3151,-121.918 37.3219,-121.894 37.3287,-121.87 37.3355,-121.846 37.3423)
+LINESTRING(-121.942 37.3151,-121.977 37.317,-121.991 37.3214,-122 37.3277,-122.024 37.3351,-122.035 37.3359,-122.051 37.3354,-122.067 37.3345,-122.081 37.3344,-122.087 37.3382,-122.093 37.3431,-122.098 37.3485,-122.102 37.3539,-122.115 37.3582,-122.132 37.3696,-122.15 37.3825,-122.162 37.3916,-122.19 37.4076,-122.218 37.4219,-122.247 37.4358,-122.274 37.4508,-122.284 37.4598,-122.29 37.4703,-122.294 37.4813,-122.3 37.4914,-122.31 37.4977,-122.323 37.5031,-122.338 37.508,-122.35 37.5129,-122.358 37.5234,-122.364 37.5344,-122.371 37.5452,-122.379 37.5554,-122.391 37.5678,-122.403 37.5801,-122.416 37.5926,-122.427 37.6055,-122.427 37.6091,-122.426 37.6127,-122.425 37.6164,-122.425 37.62,-122.436 37.6351,-122.448 37.6467,-122.458 37.6572,-122.465 37.6686,-122.467 37.6728,-122.467 37.6762,-122.468 37.6796,-122.469 37.6838,-122.47 37.6925,-122.466 37.7001,-122.458 37.707,-122.449 37.7133,-122.441 37.7167,-122.434 37.7187,-122.427 37.7208,-122.42 37.7248,-122.409 37.7379,-122.406 37.7514,-122.407 37.7659,-122.408 37.7686)
+LINESTRING(-77.3578 37.1524,-77.3502 37.1617,-77.3413 37.1743,-77.3335 37.187,-77.3293 37.1968,-77.3247 37.2177,-77.32 37.2385,-77.3144 37.2642,-77.312 37.2768,-77.316 37.2873,-77.3247 37.3053,-77.3337 37.3239,-77.3386 37.3362,-77.3424 37.362,-77.3442 37.3889,-77.3452 37.4159,-77.3465 37.442,-77.3243 37.4577,-77.3044 37.4749,-77.2858 37.4929,-77.2673 37.5113,-77.2678 37.5139,-77.2677 37.5165,-77.2672 37.5192,-77.2664 37.5217)
+LINESTRING(-77.4267 37.2036,-77.3998 37.2189,-77.3854 37.2091,-77.3707 37.1987,-77.3583 37.187,-77.3508 37.1733,-77.3525 37.1681,-77.3543 37.1629,-77.356 37.1577,-77.3578 37.1524)
+LINESTRING(-75.9856 36.8509,-76.0184 36.8468,-76.0503 36.8398,-76.0819 36.8333,-76.1137 36.8305,-76.1355 36.8338,-76.1576 36.8406,-76.1796 36.8466,-76.201 36.8474)
+LINESTRING(-76.2655 36.9521,-76.2668 36.9481,-76.2676 36.946,-76.269 36.9414,-76.2708 36.9367,-76.2722 36.9324,-76.2728 36.9281,-76.272 36.9234,-76.2666 36.9143,-76.2583 36.9079,-76.2479 36.9027,-76.2363 36.8973,-76.2234 36.8874,-76.2162 36.8755,-76.2105 36.8623,-76.201 36.8474)
+LINESTRING(-108.602 39.1205,-108.616 39.1224,-108.626 39.1288,-108.635 39.1367,-108.645 39.143,-108.679 39.1608,-108.712 39.1777,-108.744 39.195,-108.777 39.2139,-108.8 39.2266,-108.824 39.2386,-108.849 39.2485,-108.873 39.2549,-108.881 39.2543,-108.893 39.2517,-108.905 39.2487,-108.913 39.2465,-108.928 39.2391,-108.943 39.2285,-108.959 39.218,-108.974 39.211,-108.988 39.2073,-109.001 39.2039,-109.015 39.2002,-109.031 39.1954,-109.036 39.1927,-109.042 39.1906,-109.047 39.1903,-109.053 39.1905)
+LINESTRING(-106.456 39.6068,-106.472 39.6135,-106.486 39.6216,-106.5 39.6293,-106.516 39.6351,-106.543 39.6409,-106.579 39.6481,-106.612 39.6562,-106.635 39.6649,-106.654 39.6791,-106.674 39.6939,-106.695 39.7062,-106.721 39.713,-106.733 39.7073,-106.749 39.7006,-106.764 39.6928,-106.772 39.6836,-106.787 39.6804,-106.803 39.6742,-106.817 39.6667,-106.83 39.6592,-106.856 39.656,-106.906 39.6536,-106.954 39.6522,-106.978 39.652,-107.001 39.6614,-107.012 39.6655,-107.024 39.6689,-107.055 39.6708,-107.085 39.6648,-107.117 39.6544,-107.15 39.6427,-107.175 39.6332,-107.195 39.6238,-107.215 39.6142,-107.239 39.6043,-107.278 39.5924,-107.311 39.5873,-107.344 39.5885,-107.382 39.595,-107.398 39.5991,-107.411 39.6036,-107.425 39.6083,-107.44 39.6127,-107.464 39.618,-107.485 39.6212,-107.508 39.6225,-107.533 39.6216,-107.584 39.6151,-107.673 39.5959,-107.724 39.5892,-107.776 39.5855,-107.801 39.5834,-107.822 39.5803,-107.842 39.5747,-107.863 39.5655,-107.87 39.5604,-107.877 39.5548,-107.884 39.5502,-107.894 39.5479,-107.903 39.549,-107.919 39.556,-107.929 39.5572,-107.966 39.5502,-107.997 39.5363,-108.022 39.5166,-108.046 39.4922,-108.053 39.4805,-108.056 39.4683,-108.057 39.455,-108.058 39.4401,-108.066 39.4064,-108.079 39.3756,-108.102 39.3525,-108.138 39.3415,-108.158 39.3437,-108.187 39.3582,-108.208 39.3604,-108.222 39.3566,-108.237 39.3487,-108.249 39.3388,-108.259 39.3288,-108.268 39.2995,-108.278 39.2745,-108.289 39.2498,-108.301 39.2212,-108.326 39.1765,-108.362 39.1451,-108.411 39.1253,-108.474 39.1154,-108.494 39.1136,-108.513 39.1125,-108.531 39.113,-108.551 39.1161,-108.565 39.119,-108.577 39.1207,-108.588 39.1212,-108.602 39.1205)
+LINESTRING(-76.3446 36.7551,-76.3276 36.7546,-76.3105 36.7543,-76.2935 36.7543,-76.2765 36.7542,-76.2748 36.7555,-76.2731 36.7568,-76.2715 36.7581,-76.2698 36.7595,-76.2529 36.7627,-76.241 36.7739,-76.2292 36.7856,-76.2127 36.7901,-76.2049 36.8029,-76.2011 36.8176,-76.2002 36.8329,-76.201 36.8474)
+LINESTRING(-81.2029 37.7333,-81.1872 37.7414,-81.1709 37.7487,-81.1547 37.7562,-81.1394 37.7647,-81.1155 37.766,-81.0896 37.7641,-81.0632 37.7616,-81.038 37.7611,-81.0149 37.7648,-80.9948 37.7714,-80.9758 37.7788,-80.9556 37.7844,-80.9445 37.7846,-80.9338 37.7825,-80.9233 37.7803,-80.9125 37.7802,-80.8951 37.7828,-80.8775 37.7852,-80.86 37.788,-80.843 37.7914,-80.8334 37.7938,-80.8248 37.7976,-80.8171 37.8056,-80.8114 37.8152,-80.8057 37.8245,-80.7978 37.8313,-80.7728 37.8421,-80.7462 37.8513,-80.7192 37.8601,-80.6932 37.8696,-80.6716 37.8832,-80.6493 37.9001,-80.6262 37.9105,-80.6022 37.9048,-80.5944 37.8992,-80.5885 37.8928,-80.5689 37.8588,-80.5426 37.8475,-80.5113 37.8449,-80.4767 37.8371,-80.4625 37.8294,-80.437 37.811,-80.4229 37.8033,-80.4121 37.8001,-80.4008 37.7984,-80.3897 37.7963,-80.3794 37.7919,-80.3739 37.7864,-80.3684 37.7791,-80.3636 37.7716,-80.3604 37.7658,-80.3494 37.7654,-80.34 37.7596,-80.3161 37.7625,-80.3002 37.7718,-80.2869 37.7825,-80.2709 37.7897,-80.2613 37.7897,-80.251 37.7878,-80.2406 37.7859,-80.2325 37.7861)
+LINESTRING(-81.6049 38.3774,-81.5787 38.3664,-81.5618 38.3569,-81.553 38.3463,-81.5484 38.3308,-81.5606 38.3011,-81.5932 38.2748,-81.6208 38.249,-81.6183 38.2209,-81.5948 38.1954,-81.5719 38.177,-81.5458 38.1643,-81.5125 38.1558,-81.4861 38.1523,-81.4352 38.1484,-81.4089 38.1449,-81.4012 38.1427,-81.3946 38.1392,-81.3899 38.1289,-81.3941 38.1207,-81.4066 38.1076,-81.4109 38.0994,-81.4068 38.0869,-81.3903 38.0838,-81.3718 38.0805,-81.3613 38.0675,-81.3577 38.0611,-81.3549 38.0538,-81.3529 38.0464,-81.3517 38.0395,-81.3516 38.0304,-81.3524 38.0199,-81.3522 38.0098,-81.3492 38.0014,-81.3305 37.9919,-81.3091 37.9858,-81.2858 37.9756,-81.2614 37.9539,-81.2618 37.9441,-81.2666 37.9377,-81.2733 37.9323,-81.2795 37.9256,-81.2777 37.9096,-81.2759 37.8876,-81.273 37.8672,-81.2679 37.8564,-81.243 37.8469,-81.2307 37.8421,-81.2186 37.8369,-81.2152 37.8235,-81.2166 37.8077,-81.2206 37.7919,-81.2252 37.7779,-81.2219 37.7675,-81.2166 37.7551,-81.2103 37.743,-81.2029 37.7333)
+LINESTRING(-109.816 38.9404,-109.839 38.9384,-109.843 38.9374,-109.847 38.9358,-109.851 38.9341,-109.855 38.9328,-109.877 38.9286,-109.896 38.9256,-109.915 38.9233,-109.937 38.9211,-109.954 38.9197,-109.969 38.9193,-109.984 38.9204,-110 38.9233,-110.008 38.9257,-110.014 38.929,-110.02 38.9325,-110.027 38.9357,-110.041 38.9413,-110.06 38.9497,-110.096 38.9653,-110.109 38.9701,-110.122 38.9728,-110.135 38.9747,-110.15 38.977,-110.167 38.9817,-110.182 38.9873,-110.197 38.9916,-110.214 38.9923,-110.251 38.9886)
+LINESTRING(-109.053 39.1905,-109.054 39.1906,-109.066 39.1916,-109.076 39.1883,-109.089 39.1884,-109.104 39.1886,-109.116 39.1855,-109.134 39.1691,-109.153 39.1449,-109.172 39.1191,-109.193 39.0984,-109.216 39.0825,-109.24 39.0666,-109.263 39.0504,-109.285 39.0338,-109.298 39.0214,-109.31 39.008,-109.323 38.9946,-109.338 38.9823,-109.352 38.9741,-109.366 38.9665,-109.38 38.9584,-109.392 38.9489,-109.404 38.937,-109.438 38.9347,-109.504 38.9351,-109.572 38.9369,-109.613 38.9394,-109.638 38.9436,-109.664 38.9492,-109.69 38.9553,-109.715 38.9613,-109.72 38.9618,-109.746 38.9581,-109.769 38.9535,-109.793 38.9476,-109.816 38.9404)
+LINESTRING(-104.982 39.82,-104.968 39.8126,-104.936 39.7967,-104.904 39.7829,-104.877 39.7767,-104.829 39.77,-104.801 39.7662,-104.775 39.7582,-104.732 39.7385,-104.703 39.7405,-104.673 39.7388,-104.643 39.7368,-104.614 39.7377,-104.605 39.7385,-104.597 39.7387,-104.589 39.7386,-104.58 39.7383,-104.539 39.7381,-104.497 39.7395,-104.455 39.7399,-104.414 39.7367,-104.405 39.7334,-104.396 39.7302,-104.365 39.7287,-104.336 39.7289,-104.307 39.7279,-104.275 39.7227,-104.264 39.7201,-104.252 39.7178,-104.24 39.7154,-104.228 39.7125,-104.204 39.7071,-104.177 39.7025,-104.15 39.6971,-104.128 39.6888,-104.076 39.651,-104.036 39.6041,-104.003 39.5534,-103.97 39.5045,-103.96 39.4937,-103.948 39.484,-103.936 39.4739,-103.926 39.4616,-103.91 39.4348,-103.895 39.4075,-103.88 39.3802,-103.864 39.3531,-103.855 39.3489,-103.845 39.3433,-103.838 39.3358,-103.835 39.3276,-103.831 39.3196,-103.824 39.3126,-103.806 39.3032,-103.778 39.2911,-103.748 39.2803,-103.727 39.275,-103.717 39.2741,-103.708 39.2733)
+LINESTRING(-76.3446 36.7551,-76.3471 36.7553,-76.3496 36.7556,-76.3522 36.7559,-76.3547 36.7561,-76.3588 36.7629,-76.3646 36.7677,-76.3705 36.7722,-76.3752 36.7779,-76.3779 36.7786,-76.3806 36.7792,-76.3833 36.7799,-76.386 36.7805,-76.3876 36.7824,-76.3892 36.7844,-76.3908 36.7863,-76.3924 36.7882,-76.3952 36.7869,-76.398 36.7856,-76.4252 36.7823,-76.4645 36.7714,-76.5032 36.7587,-76.5288 36.7498,-76.5442 36.7551,-76.5663 36.7612,-76.5886 36.7653,-76.6046 36.7643,-76.6102 36.7536,-76.6158 36.7428,-76.6214 36.7321,-76.627 36.7213)
+LINESTRING(-103.708 39.2733,-103.688 39.2707,-103.657 39.268,-103.627 39.2659,-103.609 39.2651,-103.602 39.2652,-103.595 39.2653,-103.588 39.2655,-103.581 39.2658)
+LINESTRING(-112.615 38.5765,-112.616 38.5923,-112.616 38.6082,-112.616 38.6241,-112.616 38.6399,-112.606 38.6514,-112.595 38.6614,-112.595 38.6748,-112.602 38.6871,-112.601 38.7062,-112.577 38.7398,-112.525 38.7907,-112.471 38.8392,-112.415 38.8871,-112.36 38.9356,-112.353 38.9444,-112.35 38.9526,-112.348 38.9611,-112.344 38.9705,-112.336 38.9814,-112.327 38.9916,-112.318 39.0019,-112.312 39.0132,-112.305 39.0283,-112.299 39.0434,-112.293 39.0585,-112.287 39.0735,-112.28 39.083,-112.271 39.0911,-112.261 39.0989,-112.253 39.1076,-112.247 39.1179,-112.244 39.1286,-112.24 39.1394,-112.235 39.1498,-112.2 39.1873,-112.156 39.2191,-112.114 39.2506,-112.083 39.2873,-112.075 39.3192,-112.075 39.3539,-112.072 39.3885,-112.055 39.4197,-112.036 39.4361,-112.013 39.4515,-111.991 39.4668,-111.974 39.4827,-111.963 39.5014,-111.955 39.5231,-111.948 39.5454,-111.94 39.5657,-111.934 39.5732,-111.924 39.5833,-111.918 39.5899,-111.912 39.5965,-111.909 39.6085,-111.906 39.6205,-111.903 39.6325,-111.9 39.6445,-111.887 39.6593,-111.864 39.6723,-111.839 39.6874,-111.819 39.7088,-111.821 39.7241,-111.828 39.7529,-111.837 39.7843,-111.84 39.8072,-111.834 39.8357,-111.822 39.8809,-111.811 39.9229,-111.806 39.9418,-111.798 39.9509,-111.79 39.9599,-111.782 39.969,-111.774 39.978)
+LINESTRING(-103.581 39.2658,-103.551 39.2677,-103.522 39.2702,-103.493 39.2726,-103.463 39.2744,-103.387 39.2774,-103.31 39.28,-103.233 39.2823,-103.157 39.2846,-103.141 39.2855,-103.124 39.2868,-103.107 39.2878,-103.091 39.2876,-103.07 39.2854,-103.048 39.282,-103.026 39.2782,-103.004 39.2747,-102.978 39.2757,-102.942 39.2819,-102.905 39.2889,-102.874 39.2923,-102.79 39.2929,-102.706 39.2936,-102.623 39.2938,-102.539 39.293,-102.467 39.2913,-102.395 39.2895,-102.323 39.2895,-102.252 39.2929,-102.247 39.2966,-102.242 39.3008,-102.238 39.3053,-102.235 39.31,-102.188 39.3156,-102.141 39.3211,-102.094 39.3263,-102.047 39.3311)
+LINESTRING(-94.563 39.1765,-94.5519 39.1761,-94.5406 39.1771,-94.5296 39.1792,-94.5192 39.1822,-94.5154 39.1858,-94.5138 39.1897,-94.5129 39.1937,-94.5113 39.1977,-94.5044 39.2063,-94.4963 39.2134,-94.4879 39.2202,-94.4801 39.2277,-94.4686 39.2423,-94.4582 39.2573,-94.4474 39.2724,-94.4347 39.2871,-94.4324 39.2893,-94.4301 39.2916,-94.4279 39.2941,-94.4261 39.2966,-94.4109 39.3221,-94.3958 39.3476,-94.3809 39.3733,-94.3663 39.399,-94.344 39.4372,-94.3209 39.4758,-94.2987 39.5146,-94.279 39.5535,-94.2648 39.5932,-94.2448 39.6589,-94.2273 39.7256,-94.2233 39.7521)
+LINESTRING(-94.563 39.1765,-94.5748 39.1878,-94.5954 39.1994,-94.6181 39.211,-94.6362 39.2224,-94.6405 39.2307,-94.6438 39.2387,-94.6469 39.2463,-94.6507 39.2534,-94.6646 39.2727,-94.6774 39.2905,-94.6864 39.3096,-94.6888 39.3326,-94.7095 39.3429,-94.7301 39.3533,-94.7542 39.3655,-94.7656 39.3716,-94.7849 39.4128,-94.7904 39.4698,-94.7889 39.5281,-94.7874 39.5734,-94.7888 39.6173,-94.7901 39.6612,-94.7919 39.705,-94.7931 39.7488)
+LINESTRING(-110.251 38.9886,-110.294 38.9628,-110.331 38.9424,-110.371 38.9279,-110.421 38.9197,-110.435 38.9206,-110.446 38.9245,-110.456 38.9293,-110.467 38.9334,-110.469 38.9393,-110.476 38.9396,-110.484 38.94,-110.494 38.9312,-110.503 38.9224,-110.512 38.9137,-110.521 38.905,-110.526 38.9053,-110.533 38.9048,-110.538 38.9033,-110.543 38.9003,-110.56 38.8999,-110.593 38.8969,-110.627 38.8927,-110.649 38.8893,-110.668 38.8731,-110.692 38.8678,-110.718 38.8685,-110.744 38.8703,-110.756 38.8695,-110.77 38.8671,-110.785 38.8641,-110.797 38.8614,-110.803 38.8636,-110.81 38.866,-110.817 38.8678,-110.823 38.8684,-110.831 38.8653,-110.836 38.8656,-110.841 38.8658,-110.849 38.8709,-110.857 38.8685,-110.863 38.8645,-110.867 38.8591,-110.87 38.853,-110.877 38.8528,-110.883 38.8526,-110.888 38.8477,-110.893 38.8468,-110.899 38.846,-110.904 38.8486,-110.91 38.8513,-110.915 38.8539,-110.921 38.8566,-110.927 38.8564,-110.932 38.8562,-110.939 38.8526,-110.944 38.8477,-110.97 38.8423,-110.983 38.8419,-110.995 38.8446,-111.019 38.8488,-111.04 38.848,-111.062 38.843,-111.084 38.8376,-111.106 38.8354,-111.112 38.8287,-111.118 38.8274,-111.124 38.8265,-111.13 38.826,-111.137 38.8257,-111.141 38.8218,-111.145 38.818,-111.167 38.8125,-111.194 38.81,-111.221 38.8097,-111.245 38.8105,-111.252 38.807,-111.258 38.8031,-111.264 38.7988,-111.27 38.7943,-111.277 38.7941,-111.285 38.7928,-111.292 38.7905,-111.297 38.7872,-111.3 38.7814,-111.311 38.7772,-111.323 38.7747,-111.336 38.7728,-111.347 38.7703,-111.378 38.761,-111.397 38.7562,-111.416 38.7546,-111.45 38.7545,-111.456 38.7575,-111.462 38.7603,-111.468 38.7626,-111.475 38.7641,-111.492 38.7819,-111.506 38.7926,-111.519 38.8,-111.529 38.8078,-111.533 38.8159,-111.534 38.8243,-111.533 38.8329,-111.534 38.8414,-111.537 38.8481,-111.542 38.8559,-111.547 38.8642,-111.551 38.8723,-111.561 38.878,-111.572 38.8806,-111.584 38.8817,-111.596 38.8828,-111.603 38.8852,-111.612 38.8894,-111.621 38.8936,-111.629 38.8979,-111.631 38.9023,-111.635 38.9056,-111.641 38.9025,-111.647 38.8993,-111.676 38.9039,-111.72 38.9135,-111.762 38.9244,-111.783 38.9327,-111.789 38.9335,-111.795 38.9342,-111.801 38.9346,-111.807 38.935,-111.812 38.9312,-111.817 38.9273,-111.826 38.927,-111.837 38.9292,-111.848 38.932,-111.859 38.9333,-111.866 38.9299,-111.876 38.9222,-111.885 38.9137,-111.892 38.9079,-111.89 38.9027,-111.889 38.8975,-111.913 38.8868,-111.944 38.88,-111.976 38.8721,-112.005 38.8577,-112.024 38.8439,-112.054 38.8209,-112.082 38.7986,-112.096 38.7869,-112.098 38.7793,-112.099 38.7715,-112.101 38.7637,-112.103 38.7561,-112.11 38.7448,-112.122 38.7279,-112.134 38.7108,-112.143 38.6994,-112.162 38.6747,-112.178 38.656,-112.189 38.6399,-112.197 38.6231,-112.199 38.6152,-112.201 38.6073,-112.203 38.5994,-112.205 38.5913,-112.211 38.5875,-112.218 38.5852,-112.225 38.5835,-112.231 38.5813,-112.257 38.5734,-112.276 38.5748,-112.297 38.579,-112.329 38.5794,-112.334 38.5785,-112.339 38.5772,-112.343 38.5762,-112.349 38.5762,-112.353 38.5733,-112.357 38.5705,-112.362 38.5676,-112.366 38.5648,-112.365 38.5585,-112.363 38.5521,-112.37 38.5487,-112.378 38.5453,-112.387 38.5509,-112.4 38.5532,-112.414 38.554,-112.426 38.5546,-112.433 38.5598,-112.436 38.5632,-112.437 38.5664,-112.457 38.5716,-112.479 38.5806,-112.498 38.5925,-112.507 38.606,-112.519 38.6065,-112.53 38.607,-112.547 38.6078,-112.557 38.6085,-112.571 38.6025,-112.585 38.5932,-112.6 38.5835,-112.615 38.5765)
+LINESTRING(-79.3755 37.8185,-79.4232 37.7616,-79.4307 37.7473,-79.4437 37.7269,-79.4583 37.7071,-79.4704 37.695,-79.4972 37.6792,-79.5256 37.6639,-79.5543 37.6488,-79.582 37.6333,-79.6059 37.6169,-79.6278 37.5989,-79.6494 37.5807,-79.6725 37.5638,-79.6801 37.5595,-79.6885 37.5557,-79.697 37.5519,-79.705 37.5479,-79.7188 37.5393,-79.7323 37.5297,-79.7458 37.5198,-79.7594 37.5106,-79.7851 37.4956,-79.8114 37.4811,-79.8376 37.4665,-79.8629 37.451,-79.8878 37.4309,-79.9091 37.409,-79.9319 37.3868,-79.9616 37.3659,-79.9831 37.3596)
+LINESTRING(-84.5238 38.1131,-84.5277 38.1296,-84.5313 38.1517,-84.5315 38.173,-84.5252 38.1869,-84.5286 38.2085,-84.5374 38.2288,-84.5474 38.249,-84.5545 38.2701,-84.5556 38.2825,-84.5552 38.2955,-84.555 38.3087,-84.5568 38.3214,-84.5611 38.3359,-84.5653 38.3504,-84.5692 38.3647,-84.5725 38.3799,-84.5762 38.3999,-84.576 38.4113,-84.5736 38.4218,-84.5706 38.4393,-84.571 38.442,-84.5722 38.4464,-84.5734 38.4501,-84.5745 38.4538,-84.5788 38.473,-84.5817 38.4901,-84.5841 38.5067,-84.5872 38.5242,-84.5897 38.5315,-84.5935 38.5389,-84.5971 38.5465,-84.5991 38.5546,-84.5971 38.5702,-84.5908 38.589,-84.5834 38.6079,-84.5782 38.6238,-84.5776 38.627,-84.577 38.6302,-84.5764 38.6333,-84.5757 38.6365,-84.5812 38.6482,-84.5875 38.6599,-84.5933 38.6714,-84.597 38.6829,-84.6014 38.7055,-84.6066 38.7347,-84.6099 38.7637,-84.6087 38.7859,-84.6052 38.7966,-84.6013 38.8069,-84.5981 38.8175,-84.5969 38.8289,-84.5999 38.8342,-84.6049 38.8397,-84.6109 38.8445,-84.6174 38.8476,-84.6176 38.8553,-84.6185 38.8631,-84.6198 38.8707,-84.6211 38.8784)
+LINESTRING(-94.563 39.1765,-94.5747 39.0969)
+LINESTRING(-88.5806 39.0957,-88.6558 39.0725,-88.731 39.0501,-88.8065 39.0279,-88.8819 39.0056,-88.9048 38.9981,-88.9274 38.99,-88.9501 38.9821,-88.9733 38.9752,-89.0024 38.9739,-89.0371 38.9789,-89.0753 38.9835,-89.1153 38.9811,-89.1474 38.9711,-89.1753 38.9576,-89.1995 38.9442,-89.2203 38.9347,-89.2301 38.9299,-89.2368 38.9239,-89.2425 38.9182,-89.2594 38.9117,-89.2709 38.9099,-89.2824 38.9078,-89.2931 38.9045,-89.3068 38.8975,-89.3222 38.8885,-89.3379 38.8802,-89.3529 38.8752,-89.3713 38.871,-89.3881 38.866,-89.4045 38.8605,-89.422 38.8548,-89.4464 38.8502,-89.4711 38.848,-89.4963 38.8433,-89.5225 38.8313,-89.5513 38.827,-89.5773 38.8137,-89.603 38.7987,-89.6311 38.7895,-89.6604 38.7883,-89.6979 38.7875,-89.732 38.7829,-89.7515 38.7703,-89.7655 38.7648,-89.7817 38.7639,-89.7983 38.765,-89.8134 38.7656,-89.8204 38.7643,-89.8276 38.7624,-89.8482 38.7585,-89.8675 38.7567,-89.8866 38.7555,-89.9066 38.7531)
+LINESTRING(-89.6454 39.7396,-89.6443 39.7271,-89.6433 39.7146,-89.6422 39.7022,-89.6411 39.6897,-89.643 39.6875,-89.645 39.6854,-89.6469 39.6832,-89.6489 39.6811,-89.6446 39.5708,-89.6431 39.4602,-89.6431 39.3495,-89.6432 39.2391,-89.6581 39.2106,-89.6921 39.1611,-89.7291 39.1126,-89.7532 39.0871,-89.7545 39.073,-89.7554 39.0583,-89.7553 39.0436,-89.7541 39.0295,-89.7524 39.0275,-89.7506 39.0255,-89.7504 39.0123,-89.7502 38.9992,-89.75 38.986,-89.7498 38.9729,-89.7516 38.9704,-89.7535 38.9679,-89.7556 38.9652,-89.7575 38.9634,-89.7967 38.9311,-89.8353 38.8933,-89.8683 38.8527,-89.8904 38.8116,-89.895 38.7971,-89.8989 38.7825,-89.9025 38.7677,-89.9066 38.7531)
+LINESTRING(-85.8502 38.3143,-85.8406 38.3137,-85.835 38.3137,-85.8253 38.3124,-85.8218 38.3113,-85.8193 38.3094,-85.8171 38.307,-85.8147 38.3045,-85.8092 38.2984,-85.8054 38.2923,-85.8017 38.2862,-85.7966 38.2798,-85.7964 38.2797)
+LINESTRING(-94.6077 39.0938,-94.605 39.094,-94.59 39.0952,-94.5747 39.0969)
+LINESTRING(-85.8448 38.9945,-85.8376 38.9838,-85.8347 38.9685,-85.836 38.9545,-85.8372 38.9404,-85.8343 38.9252,-85.8258 38.9141,-85.8139 38.9054,-85.8039 38.8966,-85.8013 38.8852,-85.8037 38.8725,-85.8057 38.8612,-85.8076 38.8499,-85.8101 38.8372,-85.8132 38.8238,-85.8164 38.8121,-85.8196 38.8004,-85.8227 38.787,-85.8227 38.7629,-85.8143 38.7419,-85.802 38.7211,-85.7901 38.6975,-85.7786 38.6532,-85.7776 38.613,-85.7798 38.5724,-85.7776 38.5265,-85.7721 38.4923,-85.7665 38.4623,-85.7608 38.4323,-85.7553 38.3981,-85.7528 38.3604,-85.7532 38.3214,-85.753 38.2824,-85.7514 38.2679)
+LINESTRING(-84.4553 38.0789,-84.4672 38.089,-84.487 38.1014,-84.508 38.111,-84.5238 38.1131)
+LINESTRING(-94.6075 39.0707,-94.6001 39.0763,-94.5914 39.0831,-94.583 39.09,-94.5747 39.0969)
+LINESTRING(-84.1488 38.0179,-84.1098 38.0248,-84.0848 38.0329,-84.0625 38.0443,-84.0317 38.0615,-84.0241 38.0618,-84.006 38.067,-83.9873 38.0725,-83.9685 38.0777,-83.95 38.0818,-83.9378 38.0829,-83.9247 38.0828,-83.9117 38.0829,-83.8997 38.0843,-83.8798 38.091,-83.8624 38.0988,-83.8424 38.1043,-83.815 38.104,-83.8082 38.1088,-83.8013 38.1136,-83.7945 38.1183,-83.7877 38.1231,-83.7564 38.1252,-83.7298 38.134,-83.7043 38.1446,-83.6764 38.1519,-83.6577 38.1543,-83.6391 38.1568,-83.6204 38.1592,-83.6018 38.1616,-83.5773 38.1681,-83.5608 38.1762,-83.5391 38.182,-83.4988 38.1813,-83.4659 38.1989,-83.4417 38.2277,-83.4227 38.257,-83.4053 38.2759,-83.385 38.2802,-83.3652 38.2816,-83.3461 38.2826,-83.3282 38.2859,-83.2992 38.2964,-83.2724 38.3077,-83.2445 38.3177,-83.2121 38.3241,-83.2026 38.3244,-83.1931 38.324,-83.1755 38.3246,-83.1499 38.3258,-83.1251 38.3269,-83.1099 38.3271,-83.0851 38.3254,-83.0544 38.3236,-83.0242 38.3231,-83.0008 38.325,-82.9924 38.3279,-82.9851 38.3321,-82.9782 38.3365,-82.9632 38.3415,-82.9549 38.3425,-82.9465 38.3435,-82.9385 38.345,-82.9138 38.3524,-82.8888 38.3605,-82.8633 38.3671,-82.8372 38.3696,-82.8084 38.3686,-82.7784 38.367,-82.7485 38.3659,-82.7199 38.3665,-82.6981 38.3696,-82.6768 38.3743,-82.6554 38.3781,-82.6478 38.3784)
+LINESTRING(-85.7488 38.2444,-85.7394 38.2496,-85.7299 38.2547,-85.7205 38.2598,-85.7111 38.265,-85.6946 38.2694,-85.67 38.2752,-85.654 38.2789,-85.6379 38.2825,-85.623 38.2899,-85.6073 38.2965,-85.5913 38.3024,-85.5753 38.3081,-85.5367 38.3227,-85.4988 38.3382,-85.4611 38.354,-85.423 38.3697,-85.4077 38.3749,-85.3916 38.3795,-85.3757 38.3844,-85.3608 38.3904,-85.3512 38.3962,-85.3418 38.4032,-85.3331 38.4109,-85.3255 38.4185,-85.2894 38.4567,-85.2531 38.4961,-85.2179 38.5361,-85.1851 38.5761,-85.1797 38.5857,-85.1759 38.5964,-85.1719 38.6075,-85.1661 38.6178,-85.1568 38.6256,-85.143 38.6331,-85.1282 38.6405,-85.1159 38.6475,-85.0934 38.6513,-85.0736 38.6548,-85.055 38.6586,-85.0357 38.6631,-84.9534 38.6871,-84.8796 38.7156,-84.8102 38.7502,-84.7408 38.7922,-84.7127 38.8135,-84.6827 38.8386,-84.6519 38.862,-84.6211 38.8784)
+LINESTRING(-85.7514 38.2679,-85.7494 38.2501,-85.7488 38.2444)
+LINESTRING(-85.7964 38.2797,-85.7867 38.2714,-85.7745 38.263,-85.7615 38.2542,-85.7513 38.2464,-85.7488 38.2444)
+LINESTRING(-84.4288 38.052,-84.4354 38.0587,-84.442 38.0655,-84.4486 38.0722,-84.4553 38.0789)
+LINESTRING(-84.5238 38.1131,-84.5449 38.1246,-84.5659 38.136,-84.587 38.1475,-84.6081 38.159,-84.6184 38.1589,-84.6286 38.1592,-84.6388 38.1595,-84.649 38.1598,-84.6751 38.1601,-84.7019 38.1608,-84.7286 38.1624,-84.7543 38.165,-84.7685 38.1676,-84.783 38.1707,-84.7976 38.1732,-84.8122 38.1735,-84.8259 38.1713,-84.8386 38.1678,-84.8511 38.164,-84.8638 38.1611,-84.8948 38.1563,-84.9271 38.152,-84.9595 38.1484,-84.9909 38.1458,-85.04 38.1493,-85.1129 38.1601,-85.187 38.1733,-85.2395 38.1837,-85.3204 38.2003,-85.3953 38.2124,-85.4713 38.22,-85.5555 38.2225,-85.5724 38.2232,-85.5905 38.2254,-85.6082 38.2294,-85.6237 38.2356,-85.6366 38.234,-85.6494 38.2344,-85.6622 38.2349,-85.6746 38.2338,-85.6911 38.2354,-85.7126 38.2354,-85.7336 38.2373,-85.7488 38.2444)
+LINESTRING(-102.047 39.3311,-102.046 39.3311,-101.966 39.3293,-101.885 39.3285,-101.805 39.3284,-101.725 39.3286,-101.663 39.329,-101.6 39.3296,-101.538 39.3303,-101.476 39.3307,-101.454 39.3308,-101.432 39.331,-101.405 39.3313,-101.392 39.3317,-101.372 39.3387,-101.353 39.3486,-101.333 39.3587,-101.313 39.3658,-101.263 39.3687,-101.182 39.3687,-101.096 39.3673,-101.034 39.3663,-101.021 39.3578,-101.01 39.3437,-101 39.3289,-100.988 39.3182,-100.985 39.3168,-100.98 39.3149,-100.975 39.3131,-100.973 39.3117,-100.947 39.282,-100.921 39.2522,-100.896 39.2225,-100.87 39.1927)
+LINESTRING(-92.2947 38.961,-92.2637 38.9591,-92.2326 38.9579,-92.2015 38.9569,-92.1705 38.9553,-92.1433 38.953,-92.1163 38.9504,-92.0892 38.948,-92.0617 38.9468,-92.0419 38.947,-92.0216 38.9477,-92.0014 38.9481,-91.9818 38.9474,-91.9681 38.9456,-91.9546 38.943,-91.9411 38.9403,-91.9274 38.9386,-91.9022 38.9377,-91.8628 38.937,-91.8253 38.9363,-91.8056 38.9352,-91.7811 38.9278,-91.7586 38.919,-91.7351 38.9113,-91.7077 38.907,-91.6892 38.9056,-91.671 38.904,-91.6528 38.9022,-91.6345 38.9006,-91.5994 38.9,-91.5636 38.9016,-91.5281 38.9025,-91.4937 38.9,-91.4677 38.8937,-91.4421 38.8847,-91.4166 38.8755,-91.3908 38.8683,-91.3769 38.8671,-91.3628 38.8678,-91.3489 38.8685,-91.3352 38.8673,-91.3214 38.8637,-91.3073 38.8592,-91.2931 38.855,-91.2793 38.8523,-91.273 38.852,-91.2662 38.8523,-91.2595 38.8525,-91.2533 38.852,-91.2352 38.8469,-91.2173 38.8396,-91.1993 38.8323,-91.1811 38.8273,-91.1628 38.8249,-91.1384 38.8228,-91.1144 38.8216,-91.0973 38.8223,-91.0799 38.8271,-91.066 38.8332,-91.0495 38.8375,-91.0244 38.8368,-90.9742 38.8279,-90.9249 38.8168,-90.8753 38.8063,-90.8243 38.7994)
+LINESTRING(-84.1488 38.0179,-84.188 38.0094,-84.2098 38.0119,-84.2305 38.0217,-84.266 38.035,-84.2753 38.0367,-84.2863 38.0377,-84.2976 38.0386,-84.308 38.04,-84.339 38.0492,-84.3672 38.0588,-84.3959 38.062,-84.4288 38.052)
+LINESTRING(-93.2001 38.9651,-93.2657 38.9673,-93.3313 38.9695,-93.3969 38.9719,-93.4624 38.9751,-93.4733 38.9764,-93.4833 38.9787,-93.493 38.9812,-93.5034 38.9834,-93.508 38.9838,-93.5126 38.9842,-93.5173 38.9847,-93.5219 38.9851,-93.5422 38.9873,-93.5697 38.9905,-93.5964 38.9936,-93.6142 38.9952,-93.6204 38.993,-93.6266 38.9909,-93.6339 38.9886,-93.6378 38.9877,-93.6541 38.9888,-93.6705 38.99,-93.6869 38.9913,-93.703 38.993,-93.7118 38.9947,-93.7204 38.9972,-93.7292 38.9995,-93.7387 39.0008,-93.863 39.0076,-93.9875 39.0142,-94.112 39.0198,-94.2366 39.0234,-94.254 39.0257,-94.2701 39.0306,-94.2861 39.0359,-94.3027 39.0397,-94.3615 39.0432,-94.421 39.044,-94.4793 39.0495,-94.5346 39.0669,-94.5445 39.0723,-94.5572 39.0803,-94.5686 39.0891,-94.5747 39.0969)
+LINESTRING(-92.2947 38.961,-92.3007 38.9631,-92.3084 38.965,-92.3162 38.9665,-92.3225 38.9669,-92.3277 38.966,-92.333 38.9639,-92.3383 38.9619,-92.3432 38.9606,-92.385 38.9594,-92.43 38.962,-92.4751 38.9662,-92.5172 38.9698,-92.5366 38.965,-92.5527 38.9525,-92.5687 38.9396,-92.5876 38.9335,-92.6772 38.9322,-92.7668 38.9308,-92.8564 38.9296,-92.946 38.9282,-92.9694 38.9303,-92.9873 38.9355,-93.0034 38.9413,-93.0213 38.9451,-93.0477 38.947,-93.0745 38.9478,-93.1012 38.9487,-93.1278 38.9505,-93.1463 38.9535,-93.1643 38.9576,-93.1821 38.9619,-93.2001 38.9651)
+LINESTRING(-95.7222 39.0265,-95.6975 39.0266,-95.6729 39.0267,-95.6482 39.0268,-95.6236 39.0269)
+LINESTRING(-77.5537 36.7036,-77.539 36.7144,-77.5165 36.724,-77.4927 36.7322,-77.4743 36.7386,-77.4537 36.7513,-77.4471 36.7654,-77.4459 36.7816,-77.4413 36.8008,-77.4297 36.8179,-77.4139 36.8339,-77.3988 36.8494,-77.3895 36.8652,-77.387 36.8916,-77.3846 36.9181,-77.3821 36.9445,-77.3797 36.971,-77.38 36.983,-77.381 36.995,-77.3814 37.007,-77.38 37.019,-77.3778 37.0265,-77.3749 37.0339,-77.372 37.0412,-77.37 37.0483,-77.3669 37.0757,-77.3664 37.0999,-77.3647 37.1244,-77.3578 37.1524)
+LINESTRING(-95.2328 38.9937,-95.2204 38.9939,-95.2081 38.9942,-95.1958 38.9946,-95.1835 38.9955,-95.1803 38.9981,-95.1768 39.0003,-95.1521 39.0125,-95.1272 39.0259,-95.1022 39.0389,-95.0773 39.0498,-95.0251 39.0657,-94.9502 39.0842,-94.8735 39.0995,-94.816 39.1058,-94.783 39.1065,-94.7468 39.1076,-94.7106 39.1074,-94.6778 39.1044,-94.6663 39.1015,-94.6548 39.0976,-94.6431 39.0943,-94.6309 39.0929,-94.6188 39.0932,-94.6077 39.0938)
+LINESTRING(-95.6236 39.0269,-95.6004 39.0326,-95.5753 39.0313,-95.5507 39.0255,-95.5291 39.0174,-95.4909 39.0175,-95.4522 39.0116,-95.4135 39.0035,-95.3754 38.9973,-95.3573 38.9961,-95.3392 38.9959,-95.3211 38.9962,-95.3029 38.9965,-95.2915 38.996,-95.2797 38.9945,-95.2681 38.992,-95.2573 38.9889,-95.2511 38.9901,-95.245 38.9913,-95.2389 38.9925,-95.2328 38.9937)
+LINESTRING(-89.9066 38.7531,-89.9077 38.7451,-89.909 38.7354,-89.9112 38.726,-89.9152 38.7191,-89.9418 38.7125,-89.9689 38.7065,-89.9931 38.6971,-90.0111 38.6802,-90.0135 38.6795,-90.0158 38.6788,-90.052 38.6672,-90.086 38.66,-90.1174 38.6495,-90.1458 38.6284)
+LINESTRING(-90.1809 38.6264,-90.1458 38.6284)
+LINESTRING(-90.1962 38.6256,-90.1809 38.6264)
+LINESTRING(-90.1962 38.6256,-90.195 38.6318,-90.1969 38.6385,-90.2004 38.645,-90.2038 38.6505,-90.2083 38.6583,-90.2136 38.6669,-90.2195 38.6751,-90.2257 38.6819,-90.2413 38.6891,-90.271 38.7001,-90.3012 38.7106,-90.3184 38.7162,-90.3238 38.7171,-90.3295 38.7174,-90.3351 38.718,-90.3401 38.7198,-90.3707 38.7302,-90.392 38.735,-90.4135 38.7376,-90.4451 38.7415,-90.4636 38.7486,-90.4939 38.7627,-90.5265 38.7776,-90.5519 38.7868,-90.6191 38.7959,-90.6878 38.7972,-90.7567 38.7965,-90.8243 38.7994)
+LINESTRING(-90.6984 38.7106,-90.6923 38.7084,-90.6861 38.7063,-90.68 38.7042,-90.6738 38.702,-90.6701 38.6948,-90.6663 38.6876,-90.6629 38.6802,-90.6598 38.6728,-90.656 38.6711,-90.6523 38.6693,-90.6485 38.6676,-90.6447 38.6658,-90.6164 38.6675,-90.5965 38.6628,-90.5791 38.655,-90.5585 38.6477,-90.5135 38.6403,-90.4516 38.6343,-90.39 38.6312,-90.3462 38.6328,-90.3119 38.6338,-90.2774 38.6328,-90.2429 38.6307,-90.2085 38.6281,-90.2054 38.6275,-90.2023 38.6269,-90.1993 38.6262,-90.1962 38.6256)
+LINESTRING(-78.0906 36.7569,-78.0737 36.7692,-78.0479 36.7764,-78.0214 36.782,-78.0024 36.7896,-77.9838 36.8045,-77.9643 36.8194,-77.9433 36.8326,-77.9199 36.8428,-77.9075 36.8424,-77.8951 36.8417,-77.8829 36.8419,-77.871 36.8444,-77.8612 36.8487,-77.8525 36.8542,-77.8368 36.8667,-77.821 36.8802,-77.8049 36.8933,-77.7885 36.9044,-77.7736 36.9118,-77.7575 36.9184,-77.7422 36.9256,-77.7291 36.9349,-77.7151 36.9501,-77.7025 36.9662,-77.6896 36.9821,-77.6746 36.9966,-77.6453 37.0188,-77.6149 37.0405,-77.5862 37.0634,-77.5616 37.0888,-77.5472 37.107,-77.5345 37.1246,-77.523 37.1429,-77.5129 37.1628,-77.5092 37.1714,-77.5068 37.1767,-77.4743 37.2,-77.4499 37.2026,-77.4267 37.2036)
+LINESTRING(-84.1488 38.0179,-84.1207 37.9963,-84.0914 37.9866,-84.0627 37.98,-84.0365 37.9677,-84.0162 37.9522,-83.9908 37.9319,-83.9671 37.9117,-83.9522 37.8964,-83.9466 37.8862,-83.9431 37.8759,-83.9395 37.8656,-83.9338 37.8558,-83.9016 37.838,-83.8565 37.8351,-83.8095 37.8405,-83.7719 37.8477,-83.7689 37.8467,-83.7658 37.8456,-83.7628 37.8445,-83.7598 37.8435,-83.7576 37.8404,-83.7555 37.8373,-83.7534 37.8342,-83.7513 37.8311,-83.7439 37.829,-83.7359 37.8273,-83.7278 37.8262,-83.72 37.8257,-83.7082 37.8173,-83.6901 37.8099,-83.6705 37.8039,-83.6542 37.7998,-83.6505 37.7963,-83.6468 37.7929,-83.6465 37.7907,-83.6463 37.7885,-83.6461 37.7864,-83.6458 37.7842,-83.6233 37.7723,-83.6124 37.7613,-83.5946 37.7514,-83.5514 37.7429,-83.547 37.7444,-83.5426 37.7459,-83.5382 37.7474,-83.5338 37.7489,-83.5211 37.7467,-83.5058 37.7444,-83.4906 37.7439,-83.4785 37.7471,-83.4724 37.7429,-83.4662 37.7387,-83.4601 37.7346,-83.454 37.7304,-83.4362 37.7365,-83.4202 37.7413,-83.4035 37.7434,-83.3832 37.7414,-83.3772 37.7464,-83.3713 37.7514,-83.3653 37.7564,-83.3594 37.7614,-83.3128 37.7583,-83.2687 37.7455,-83.2226 37.7374,-83.1699 37.7484,-83.1569 37.7453,-83.1356 37.7396,-83.1154 37.7337,-83.1053 37.7299,-83.0988 37.7344,-83.0925 37.7397,-83.0869 37.7454,-83.0825 37.7512)
+LINESTRING(-78.0906 36.7569,-78.0978 36.7466,-78.105 36.7362,-78.1119 36.7257,-78.1183 36.715)
+LINESTRING(-81.1102 37.2786,-81.1048 37.2836,-81.0852 37.2985,-81.0716 37.3061,-81.0695 37.308,-81.0673 37.31,-81.0652 37.3119,-81.063 37.3139,-81.062 37.3243,-81.0613 37.3354,-81.0597 37.3462,-81.0561 37.3561,-81.0533 37.3602,-81.0503 37.364,-81.0477 37.368,-81.0465 37.3729,-81.0496 37.3806,-81.0568 37.3947,-81.0644 37.4103,-81.0686 37.4226,-81.0691 37.4345,-81.0682 37.4465,-81.068 37.4584,-81.0705 37.4698,-81.0797 37.4812,-81.0939 37.4905,-81.1084 37.4999,-81.1187 37.5115,-81.1182 37.5174,-81.116 37.5281,-81.1136 37.54,-81.1128 37.5492,-81.1161 37.5621,-81.1216 37.5744,-81.1264 37.587,-81.1281 37.6007,-81.1258 37.6112,-81.1213 37.6215,-81.1169 37.6318,-81.1148 37.6421,-81.1205 37.6634,-81.1353 37.6853,-81.1552 37.7051,-81.1759 37.7199,-81.1794 37.7205,-81.1829 37.721,-81.1864 37.7215,-81.1899 37.7221,-81.1933 37.7248,-81.1966 37.7275,-81.1998 37.7304,-81.2029 37.7333)
+LINESTRING(-77.5802 36.5457,-77.5802 36.5459,-77.5804 36.5493,-77.5815 36.5538,-77.5827 36.5584,-77.5831 36.5621,-77.5806 36.5985,-77.5755 36.634,-77.5669 36.669,-77.5537 36.7036)
+LINESTRING(-81.1308 37.2554,-81.1226 37.2672,-81.1102 37.2786)
+LINESTRING(-105.04 39.7197,-105.029 39.7184,-105.018 39.7172,-105.008 39.7159,-104.997 39.7146,-104.972 39.7042,-104.947 39.6888,-104.925 39.6704,-104.912 39.6508,-104.894 39.6116,-104.884 39.5913,-104.879 39.5672,-104.877 39.5164,-104.877 39.5134,-104.877 39.5103,-104.877 39.5072,-104.877 39.5042,-104.878 39.4882,-104.88 39.4712,-104.881 39.4543,-104.881 39.4385,-104.877 39.4251,-104.869 39.4084,-104.862 39.3905,-104.857 39.3734,-104.864 39.3622,-104.87 39.3464,-104.876 39.3302,-104.88 39.3177,-104.891 39.291,-104.896 39.2795,-104.892 39.2676,-104.878 39.2395,-104.875 39.2326,-104.874 39.2255,-104.872 39.2185,-104.868 39.2117,-104.863 39.2056,-104.858 39.2,-104.855 39.194,-104.853 39.1866,-104.854 39.1623,-104.859 39.1394,-104.862 39.1159,-104.86 39.0902,-104.848 39.0599,-104.831 39.0304,-104.815 39.0011,-104.808 38.9714,-104.81 38.9394,-104.819 38.9168,-104.829 38.8998,-104.835 38.8846,-104.836 38.8707,-104.835 38.8565,-104.834 38.8422,-104.834 38.8279)
+LINESTRING(-87.4455 38.1769,-87.4091 38.1844,-87.3725 38.189,-87.3356 38.1921,-87.2982 38.1947,-87.2863 38.1961,-87.2738 38.1979,-87.2615 38.1996,-87.2502 38.2005,-87.2301 38.2,-87.2098 38.1986,-87.1895 38.197,-87.1694 38.1959,-87.1415 38.1963,-87.1135 38.1981,-87.0857 38.1998,-87.0581 38.2001,-87.0383 38.199,-87.0183 38.1973,-86.9983 38.1957,-86.9785 38.195,-86.9645 38.1959,-86.9379 38.1978,-86.9117 38.2001,-86.8989 38.2016,-86.8945 38.2057,-86.8901 38.2098,-86.8698 38.2122,-86.8555 38.2094,-86.8424 38.2041,-86.8256 38.1991,-86.8143 38.2035,-86.8021 38.205,-86.7897 38.2057,-86.7777 38.2074,-86.7657 38.2112,-86.754 38.2159,-86.7418 38.2206,-86.7285 38.2243,-86.7122 38.2277,-86.6949 38.2311,-86.6775 38.2341,-86.6612 38.2362,-86.6369 38.2373,-86.6118 38.237,-86.5864 38.2366,-86.5616 38.2372,-86.5242 38.2403,-86.4871 38.2439,-86.4498 38.2469,-86.4121 38.248,-86.4042 38.2444,-86.3963 38.2408,-86.3884 38.2371,-86.3805 38.2335,-86.3434 38.2449,-86.3105 38.2517,-86.2771 38.2511,-86.2387 38.2405,-86.2164 38.2468,-86.2019 38.2468,-86.1893 38.2441,-86.1725 38.2422,-86.1407 38.2427,-86.1001 38.2451,-86.0594 38.2491,-86.0277 38.2544,-86.0013 38.2613,-85.9749 38.2681,-85.9433 38.2767,-85.9255 38.2821,-85.9139 38.2864,-85.9001 38.2908,-85.8859 38.2947,-85.8729 38.2975,-85.8672 38.3017,-85.8615 38.3059,-85.8559 38.3101,-85.8502 38.3143)
+LINESTRING(-88.5806 39.0957,-88.5815 39.0831,-88.5836 39.0714,-88.5862 39.0598,-88.5889 39.0478,-88.5897 39.0313,-88.589 39.0158,-88.5918 39.0014,-88.6032 38.988,-88.6084 38.9848,-88.6139 38.9818,-88.6193 38.9787,-88.6241 38.975,-88.6616 38.9418,-88.7 38.9102,-88.7391 38.8793,-88.7787 38.8478,-88.7937 38.8347,-88.8082 38.8212,-88.8231 38.8078,-88.8394 38.7951,-88.8518 38.7875,-88.865 38.7808,-88.878 38.7738,-88.8898 38.7654,-88.8942 38.7607,-88.8981 38.7551,-88.9019 38.7493,-88.9059 38.7442,-88.9141 38.7286,-88.9156 38.7123,-88.9174 38.6962,-88.9268 38.6814,-88.9292 38.6787,-88.9316 38.676,-88.9311 38.596,-88.9203 38.4944,-88.9115 38.398,-88.9173 38.3338)
+LINESTRING(-90.1458 38.6284,-90.1278 38.6267,-90.1066 38.6243,-90.0848 38.6214,-90.0654 38.6183,-90.0524 38.6144,-90.0387 38.6084,-90.0262 38.6028,-90.0164 38.6,-89.9914 38.5986,-89.9673 38.5968,-89.9456 38.5911,-89.9274 38.5776,-89.9016 38.572,-89.8786 38.568,-89.8537 38.5631,-89.8219 38.5548,-89.8144 38.5526,-89.8104 38.5516,-89.8066 38.5508,-89.7902 38.5492,-89.7725 38.5482,-89.7551 38.5465,-89.7395 38.5428,-89.7331 38.5392,-89.7265 38.5338,-89.72 38.5282,-89.7136 38.5238,-89.6984 38.5178,-89.6868 38.5166,-89.6755 38.5167,-89.6612 38.5148,-89.6483 38.5102,-89.6364 38.5039,-89.6261 38.498,-89.6182 38.4945,-89.6045 38.4909,-89.5976 38.4893,-89.5906 38.4881,-89.5862 38.4819,-89.5792 38.4726,-89.572 38.4639,-89.567 38.4592,-89.5536 38.4518,-89.5397 38.4438,-89.5251 38.4368,-89.51 38.4324,-89.5004 38.4316,-89.4806 38.4315,-89.4713 38.4306,-89.463 38.4284,-89.4553 38.425,-89.448 38.4212,-89.4407 38.4175,-89.4123 38.4055,-89.3851 38.3976,-89.3565 38.3933,-89.3239 38.3924,-89.3184 38.3919,-89.3124 38.3906,-89.306 38.3894,-89.2998 38.3892,-89.2963 38.39,-89.2925 38.3913,-89.2887 38.3927,-89.2851 38.3937,-89.2547 38.3952,-89.2104 38.3937,-89.1639 38.391,-89.1266 38.3893,-89.0917 38.3694,-89.067 38.3639,-89.041 38.3636,-89.0018 38.3589,-88.9844 38.3539,-88.9598 38.3457,-88.9351 38.3378,-88.9173 38.3338)
+LINESTRING(-97.6418 38.8778,-97.6053 38.8835,-97.5786 38.8977,-97.5537 38.9141,-97.5232 38.9266,-97.5001 38.9298,-97.4743 38.9303,-97.4482 38.9297,-97.4244 38.9294,-97.4136 38.9323,-97.4009 38.9387,-97.3882 38.9462,-97.3779 38.9521,-97.353 38.9514,-97.3271 38.9506,-97.3013 38.9504,-97.2767 38.9516,-97.2542 38.9559,-97.2022 38.9706,-97.1808 38.9746,-97.1694 38.9744,-97.1531 38.9735,-97.1371 38.9729,-97.1264 38.9736,-97.0969 38.9836,-97.0684 38.9955,-97.0395 39.0073,-97.0088 39.0166,-96.9766 39.0171,-96.9355 39.0106,-96.8936 39.0032,-96.8588 39.0009,-96.8481 39.0031,-96.8375 39.0075,-96.8278 39.0131,-96.8199 39.0189,-96.8038 39.0241,-96.7791 39.0265,-96.7542 39.029,-96.7376 39.0345,-96.7279 39.041,-96.7115 39.0484,-96.6882 39.0541,-96.6575 39.0559,-96.1772 39.0412,-95.8742 39.0312,-95.7222 39.0265)
+LINESTRING(-97.6692 39.1186,-97.6647 39.1154,-97.6601 39.1122,-97.6555 39.109,-97.651 39.1058,-97.6506 39.0924,-97.6507 39.079,-97.6509 39.0657,-97.6504 39.0523,-97.6487 39.0435,-97.6455 39.0346,-97.6422 39.0257,-97.6402 39.0169,-97.639 39.0023,-97.6385 38.9875,-97.6382 38.9727,-97.6379 38.958,-97.6385 38.9384,-97.6407 38.9207,-97.6425 38.9016,-97.6418 38.8778)
+LINESTRING(-87.5497 38.1706,-87.528 38.1666,-87.4992 38.1692,-87.4696 38.1741,-87.4455 38.1769)
+LINESTRING(-87.9829 38.223,-87.9771 38.2191,-87.962 38.2074,-87.9465 38.1992,-87.92 38.1948,-87.8919 38.1945,-87.8638 38.1945,-87.8369 38.1909,-87.8213 38.1854,-87.8085 38.1798,-87.7941 38.1766,-87.774 38.1785,-87.7497 38.165,-87.7186 38.1626,-87.686 38.1656,-87.6573 38.1687,-87.6306 38.1698,-87.6035 38.1702,-87.5765 38.1703,-87.5497 38.1706)
+LINESTRING(-121.942 37.3151,-121.942 37.3061,-121.941 37.2971,-121.939 37.2881,-121.939 37.2788,-121.953 37.2631,-121.965 37.2458,-121.977 37.2281,-121.988 37.2112,-121.994 37.19,-121.99 37.1656,-121.982 37.1414,-121.973 37.1208,-121.974 37.1141,-121.976 37.1012,-121.977 37.0794,-121.993 37.0667,-122.007 37.0526,-122.018 37.0372,-122.027 37.0208,-122.022 37.0105,-122.018 37.0027,-122.017 36.9947,-122.018 36.9838,-121.981 36.9832,-121.949 36.9859,-121.917 36.9878,-121.881 36.9846,-121.857 36.9757,-121.839 36.9614,-121.825 36.9438,-121.808 36.9249,-121.795 36.9109,-121.784 36.8982,-121.776 36.8845,-121.769 36.8676,-121.768 36.8459,-121.777 36.8075,-121.775 36.7857,-121.771 36.7747,-121.76 36.7563,-121.755 36.7453,-121.752 36.7288,-121.753 36.715,-121.759 36.7014,-121.768 36.6858,-121.777 36.6657,-121.782 36.6472,-121.788 36.6286,-121.798 36.6084,-121.802 36.6034,-121.809 36.5991,-121.817 36.5955,-121.824 36.5927,-121.841 36.586,-121.856 36.5809,-121.871 36.5766,-121.889 36.5725)
+LINESTRING(-100.87 39.1927,-100.852 39.1724,-100.835 39.1521,-100.817 39.1318,-100.8 39.1115,-100.723 39.1109,-100.646 39.1115,-100.57 39.1114,-100.493 39.1086,-100.474 39.1061,-100.454 39.1019,-100.434 39.0979,-100.414 39.0958,-100.395 39.0956,-100.374 39.096,-100.354 39.0965,-100.334 39.097,-100.299 39.0858,-100.245 39.0607,-100.192 39.0354,-100.161 39.0237,-100.102 39.0241,-100.042 39.0255,-99.9818 39.0252,-99.9238 39.0203,-99.8999 39.0157,-99.8759 39.0095,-99.8518 39.003,-99.828 38.9974,-99.7897 38.9909,-99.751 38.9858,-99.7126 38.9807,-99.6749 38.9744,-99.6562 38.9693,-99.6378 38.9622,-99.6196 38.9546,-99.6017 38.9479,-99.5884 38.9468,-99.5671 38.9471,-99.5444 38.9476,-99.5271 38.9472,-99.4911 38.9395,-99.4558 38.9282,-99.4199 38.9196,-99.3818 38.9198,-99.3655 38.9135,-99.3487 38.9073,-99.3322 38.901,-99.3165 38.8944,-99.3049 38.889,-99.2917 38.8831,-99.2779 38.8783,-99.2649 38.8761,-99.2325 38.8766,-99.1989 38.8786,-99.1653 38.8798,-99.1331 38.8778,-99.1137 38.8736,-99.0962 38.8682,-99.0784 38.8635,-99.0579 38.8614,-99.0071 38.8617,-98.9563 38.863,-98.9054 38.8641,-98.8546 38.8639,-98.8335 38.8625)
+LINESTRING(-98.8335 38.8625,-98.8124 38.86,-98.7912 38.8574,-98.7701 38.856,-98.7338 38.8561,-98.6974 38.8574,-98.6611 38.8586,-98.6247 38.8585,-98.5898 38.8566,-98.5557 38.8538,-98.5214 38.8505,-98.487 38.8472,-98.4485 38.8453,-98.4085 38.8458,-98.3685 38.8471,-98.3299 38.848,-98.29 38.8478,-98.2501 38.8471,-98.2103 38.8463,-98.1704 38.8459,-98.1569 38.8481,-98.1345 38.8534,-98.112 38.8599,-98.0982 38.8656,-98.0926 38.8658,-98.087 38.866,-98.0814 38.8662,-98.0757 38.8664,-98.071 38.8691,-98.0662 38.8718,-98.0471 38.8734,-98.0285 38.8757,-98.0098 38.8778,-97.9906 38.8788,-97.9033 38.879,-97.8162 38.8787,-97.729 38.8783,-97.6418 38.8778)
+LINESTRING(-88.8938 38.2657,-88.8757 38.2678,-88.8653 38.2701,-88.8549 38.2724,-88.837 38.2747,-88.799 38.2774,-88.7579 38.2784,-88.7167 38.277,-88.6788 38.2724,-88.6746 38.2712,-88.6696 38.2692,-88.6646 38.2674,-88.6607 38.2664,-88.5668 38.2666,-88.4292 38.2698,-88.2974 38.2662,-88.2214 38.2463,-88.1686 38.2414,-88.1165 38.2385,-88.0642 38.2367,-88.0107 38.2349,-87.9929 38.2298,-87.9829 38.223)
+LINESTRING(-88.8938 38.2657,-88.9028 38.2806,-88.9116 38.2994,-88.9173 38.3183,-88.9173 38.3338)
+LINESTRING(-78.1183 36.715,-78.1289 36.6957,-78.1404 36.677,-78.1508 36.6579,-78.1585 36.6379,-78.1643 36.623,-78.1719 36.6094,-78.1805 36.5961,-78.189 36.5821,-78.2009 36.5608,-78.2104 36.5454)
+LINESTRING(-94.357 38.6127,-94.3586 38.6226,-94.3602 38.6325,-94.3614 38.6423,-94.3627 38.6521,-94.3717 38.6557,-94.3809 38.6587,-94.3901 38.6617,-94.399 38.6651,-94.408 38.6704,-94.4157 38.677,-94.4227 38.6841,-94.4298 38.6909,-94.4398 38.6991,-94.4508 38.7078,-94.4609 38.7169,-94.4685 38.7266,-94.4807 38.754,-94.4898 38.7794,-94.5027 38.8032,-94.5266 38.8254,-94.5318 38.8481,-94.5307 38.8764,-94.5285 38.9059,-94.5308 38.9323,-94.5341 38.9332,-94.5374 38.934,-94.5402 38.9369,-94.5438 38.9396,-94.5478 38.9418,-94.5518 38.9438,-94.5541 38.9539,-94.5593 38.9642,-94.5648 38.9748,-94.5678 38.9857,-94.5672 38.9983,-94.5643 39.0106,-94.561 39.0228,-94.5592 39.0352,-94.5616 39.0501,-94.5675 39.066,-94.5731 39.0819,-94.5747 39.0969)
+LINESTRING(-80.9177 36.948,-80.8673 36.9543,-80.8446 36.9692,-80.8342 36.9848,-80.8206 36.9932,-80.7629 37.0062,-80.7362 37.0262,-80.7187 37.0519,-80.6884 37.0821,-80.6731 37.0854,-80.6428 37.0895,-80.6099 37.0937,-80.5871 37.0971,-80.5407 37.102,-80.4812 37.1053,-80.4229 37.1116,-80.3805 37.1259,-80.3763 37.1315,-80.372 37.1371,-80.3677 37.1427,-80.3634 37.1483,-80.3396 37.1668,-80.314 37.1913,-80.293 37.2182,-80.2825 37.2441,-80.273 37.2506,-80.2628 37.2562,-80.2526 37.2617,-80.2429 37.2676,-80.199 37.2935,-80.1566 37.3125,-80.1121 37.3295,-80.0618 37.3498,-80.0382 37.3553,-80.0103 37.3573,-79.9831 37.3596)
+LINESTRING(-95.2674 38.5751,-95.2476 38.5834,-95.2376 38.5995,-95.2337 38.619,-95.2322 38.6372,-95.2224 38.6393,-95.2131 38.6421,-95.1799 38.6598,-95.1454 38.6764,-95.1099 38.6918,-95.0739 38.7059,-95.0624 38.709,-95.0518 38.7121,-95.0407 38.7193,-95.0301 38.7274,-95.0196 38.7354,-95.0085 38.7426,-94.9944 38.749,-94.9788 38.7545,-94.9629 38.7602,-94.9482 38.7672,-94.9123 38.789,-94.8747 38.8128,-94.838 38.8376,-94.8052 38.8624,-94.7992 38.8689,-94.795 38.876,-94.7913 38.8833,-94.7866 38.8904,-94.7645 38.9168,-94.7418 38.9428,-94.7184 38.9685,-94.6943 38.9937,-94.6913 39.0226,-94.6807 39.0341,-94.6631 39.0391,-94.6386 39.0483,-94.6301 39.0541,-94.6151 39.0651,-94.6075 39.0707)
+LINESTRING(-81.1308 37.2554,-81.1205 37.2444,-81.1143 37.2426,-81.1081 37.2405,-81.1021 37.238,-81.0965 37.2351,-81.0942 37.231,-81.0922 37.2267,-81.0907 37.2222,-81.0902 37.2177,-81.0986 37.2111,-81.1066 37.2041,-81.1222 37.19,-81.1306 37.1767,-81.1311 37.1627,-81.1289 37.1487,-81.1291 37.1355,-81.1325 37.1264,-81.1372 37.1163,-81.141 37.1062,-81.1416 37.0972,-81.1364 37.0844,-81.1285 37.0721,-81.1209 37.0595,-81.1168 37.0459,-81.1171 37.0412,-81.1181 37.0364,-81.1184 37.0317,-81.117 37.0273,-81.1016 37.009,-81.0856 36.995,-81.0713 36.9785,-81.0614 36.9536)
+LINESTRING(-87.5474 37.929,-87.5198 37.9266,-87.4917 37.931,-87.4655 37.9408,-87.4438 37.9544,-87.4391 37.9848,-87.4379 38.0164,-87.4377 38.0481,-87.4361 38.0791,-87.4405 38.0815,-87.4449 38.084,-87.4493 38.0864,-87.4538 38.0889,-87.4544 38.1044,-87.4517 38.1185,-87.4478 38.1321,-87.4446 38.1465,-87.4449 38.1539,-87.4466 38.1617,-87.4475 38.1695,-87.4455 38.1769)
+LINESTRING(-81.0614 36.9536,-81.0609 36.9523,-81.0606 36.9514,-81.0311 36.9399,-80.9923 36.94,-80.952 36.9449,-80.9177 36.948)
+LINESTRING(-84.4553 38.0789,-84.4644 38.0734,-84.4735 38.0678,-84.4803 38.0708,-84.4892 38.0738,-84.4984 38.0758,-84.5062 38.0757,-84.5158 38.0742,-84.5255 38.0727,-84.5337 38.0668,-84.5433 38.0621,-84.5531 38.0577,-84.562 38.0526,-84.565 38.0454,-84.5943 38.044,-84.6226 38.0431,-84.6507 38.0433,-84.6796 38.0453,-84.709 38.0264,-84.7493 38.0091,-84.7908 37.9943,-84.8239 37.9827,-84.8315 37.9859,-84.839 37.9892,-84.8624 37.9846,-84.8812 37.9708,-84.8984 37.9549,-84.9171 37.9438,-84.9325 37.9396,-84.9483 37.9362,-84.9642 37.9327,-84.9796 37.9286,-84.9985 37.9222,-85.0172 37.9149,-85.036 37.9078,-85.055 37.9017,-85.0851 37.8948,-85.1122 37.889,-85.1383 37.8803,-85.1654 37.8645,-85.227 37.8784,-85.2849 37.8733,-85.3397 37.8539,-85.3923 37.8245,-85.4095 37.8123,-85.4262 37.7993,-85.4437 37.7872,-85.4634 37.7774,-85.4943 37.7801,-85.5177 37.7767,-85.5402 37.7703,-85.5682 37.7638,-85.59 37.7611,-85.6107 37.7594,-85.6315 37.757,-85.6537 37.752,-85.6758 37.744,-85.6978 37.7345,-85.7196 37.7254,-85.7415 37.7183,-85.753 37.7163,-85.765 37.7152,-85.777 37.7143,-85.7886 37.7127,-85.8005 37.7101,-85.8124 37.7069,-85.8243 37.7037,-85.8362 37.7008)
+LINESTRING(-85.8362 37.7008,-85.8283 37.7124,-85.815 37.7215,-85.7997 37.7308,-85.7854 37.7424,-85.777 37.7515,-85.7735 37.7558,-85.7708 37.7601,-85.7648 37.768,-85.7589 37.777,-85.7521 37.7851,-85.7431 37.7901,-85.7356 37.8105,-85.71 37.8442,-85.6956 37.8786,-85.6893 37.9129,-85.6874 37.9464,-85.6887 37.9576,-85.6923 37.9701,-85.6967 37.9827,-85.7004 37.9939,-85.7011 37.9958,-85.7015 37.9976,-85.6967 38.0268,-85.6949 38.0648,-85.6972 38.1035,-85.7042 38.1349,-85.7146 38.1601,-85.7241 38.1782,-85.7365 38.1946,-85.7554 38.215,-85.7537 38.228,-85.7488 38.2444)
+LINESTRING(-90.3848 38.1582,-90.4167 38.1715,-90.4392 38.1843,-90.452 38.2127,-90.4587 38.2587,-90.4601 38.3054,-90.4573 38.336,-90.4539 38.345,-90.4488 38.3546,-90.4429 38.3641,-90.4369 38.3724,-90.4342 38.4016,-90.4158 38.4301,-90.39 38.4574,-90.3653 38.4831,-90.3556 38.4925,-90.344 38.5012,-90.3322 38.51,-90.3213 38.5192,-90.3134 38.5286,-90.3059 38.5393,-90.2982 38.5495,-90.2896 38.5575,-90.2662 38.5708,-90.2454 38.5811,-90.2277 38.5941,-90.1962 38.6256)
+LINESTRING(-79.4663 36.5399,-79.464 36.5452,-79.4336 36.5466,-79.4005 36.5542,-79.3697 36.5666,-79.3465 36.5818)
+LINESTRING(-87.575 37.8668,-87.5681 37.855,-87.5631 37.8404,-87.5605 37.8254,-87.5606 37.8122)
+LINESTRING(-96.2369 38.414,-96.228 38.417,-96.2191 38.4211,-96.2109 38.4261,-96.204 38.4315,-96.1822 38.4309,-96.1587 38.4308,-96.1353 38.431,-96.1119 38.4311,-96.0766 38.4288,-96.0413 38.4266,-96.006 38.4243,-95.9706 38.422,-95.9493 38.4234,-95.9292 38.4265,-95.9095 38.4301,-95.8894 38.4328,-95.8494 38.4329,-95.809 38.4289,-95.7689 38.4256,-95.7294 38.4276,-95.6968 38.434,-95.6644 38.4416,-95.6321 38.4492,-95.5995 38.4555,-95.5909 38.4559,-95.5815 38.4554,-95.5722 38.4549,-95.5637 38.4555,-95.5307 38.4654,-95.4968 38.4803,-95.4634 38.4965,-95.4321 38.5099,-95.4244 38.5121,-95.4163 38.5136,-95.4083 38.5151,-95.4006 38.5173,-95.3889 38.5236,-95.3789 38.5321,-95.3694 38.5409,-95.3592 38.5484,-95.3385 38.5568,-95.3144 38.5627,-95.2898 38.5681,-95.2674 38.5751)
+LINESTRING(-96.2369 38.414,-96.2321 38.4194,-96.2278 38.4251,-96.224 38.4311,-96.2209 38.4372,-96.2083 38.4468,-96.1856 38.4676,-96.1622 38.49,-96.1476 38.5048,-96.1412 38.5142,-96.136 38.5246,-96.1309 38.5353,-96.1246 38.5451,-96.1092 38.5621,-96.092 38.5783,-96.0742 38.5942,-96.0571 38.61,-96.048 38.6203,-96.0407 38.6308,-96.034 38.6416,-96.0268 38.6525,-96.0197 38.6596,-96.0107 38.6668,-96.0021 38.6743,-95.9963 38.6822,-95.9921 38.6919,-95.9883 38.6997,-95.9833 38.7071,-95.9756 38.7158,-95.9613 38.73,-95.9459 38.7449,-95.9312 38.7601,-95.9193 38.7754,-95.9139 38.7854,-95.909 38.7969,-95.9037 38.8081,-95.8977 38.8176,-95.8805 38.8346,-95.8609 38.8506,-95.8414 38.8666,-95.8249 38.8841,-95.8158 38.8876,-95.8046 38.8957,-95.7936 38.905,-95.7849 38.9118,-95.7788 38.92,-95.766 38.9288,-95.7525 38.9379,-95.7445 38.9471,-95.7343 38.9505,-95.7308 38.9567,-95.7246 38.9628,-95.717 38.9678,-95.7093 38.9708,-95.707 38.9758,-95.7035 38.981,-95.6992 38.9858,-95.6767 38.9943,-95.6568 39.0048,-95.638 39.017,-95.6236 39.0269)
+LINESTRING(-80.9177 36.948,-80.9136 36.9325,-80.9011 36.9203,-80.8857 36.9094,-80.8729 36.8978,-80.8695 36.8879,-80.8706 36.877,-80.8715 36.8652,-80.8673 36.8525,-80.8442 36.8245,-80.8144 36.7973,-80.7828 36.7708,-80.7542 36.7446,-80.7383 36.7243,-80.728 36.7043,-80.7191 36.6842,-80.7076 36.6639,-80.7084 36.6598,-80.7092 36.6557)
+LINESTRING(-104.834 38.8279,-104.834 38.8256,-104.833 38.8233,-104.833 38.8211,-104.832 38.8188,-104.828 38.8159,-104.825 38.8147,-104.821 38.8146,-104.815 38.8151,-104.797 38.7923,-104.769 38.7628,-104.743 38.7353,-104.729 38.7186,-104.726 38.7121,-104.723 38.7056,-104.719 38.6991,-104.716 38.6926,-104.713 38.6874,-104.709 38.6831,-104.705 38.679,-104.701 38.6743,-104.688 38.6465,-104.667 38.5954,-104.645 38.541,-104.628 38.5032,-104.624 38.4952,-104.619 38.4872,-104.615 38.4783,-104.612 38.4712,-104.611 38.4446,-104.614 38.4162,-104.618 38.3877,-104.62 38.3607,-104.619 38.3474,-104.615 38.3336,-104.613 38.3199,-104.614 38.3075)
+LINESTRING(-97.6207 38.3759,-97.6209 38.457,-97.6212 38.5381,-97.6216 38.6193,-97.6227 38.7004,-97.6224 38.7241,-97.6216 38.7486,-97.6215 38.773,-97.6233 38.7965,-97.6268 38.8079,-97.6332 38.8206,-97.6404 38.8332,-97.6464 38.8443,-97.646 38.8499,-97.6445 38.8609,-97.6432 38.8693,-97.6418 38.8778)
+LINESTRING(-84.4288 38.052,-84.4195 38.0361,-84.4099 38.0205,-84.4012 38.0046,-84.3947 37.9878,-84.3913 37.9703,-84.3888 37.9511,-84.3847 37.9321,-84.3765 37.9155,-84.3615 37.898,-84.3465 37.8818,-84.3325 37.8638,-84.3205 37.8407,-84.3127 37.8076,-84.3155 37.7828,-84.322 37.7608,-84.3251 37.7364,-84.3221 37.7152,-84.3165 37.6936,-84.3109 37.672,-84.3078 37.6506,-84.3146 37.583,-84.3311 37.5195,-84.3437 37.455,-84.3382 37.3843,-84.3309 37.3795,-84.3211 37.3761,-84.3118 37.3716,-84.3061 37.3636,-84.2981 37.334,-84.288 37.307,-84.2707 37.2832,-84.2412 37.2632,-84.2284 37.2403,-84.2177 37.228,-84.2002 37.2197,-84.167 37.2089,-84.1531 37.2016,-84.1454 37.192,-84.1399 37.1809,-84.1324 37.1691,-84.1277 37.1645,-84.1224 37.1603,-84.1171 37.1558,-84.1126 37.1503)
+LINESTRING(-80.7092 36.6557,-80.7 36.6412,-80.6964 36.6161,-80.684 36.5933,-80.6626 36.5781,-80.6564 36.565,-80.653 36.5583)
+LINESTRING(-83.2412 37.2641,-83.243 37.2617,-83.2492 37.2578,-83.2586 37.2573,-83.2648 37.258,-83.271 37.2587,-83.2772 37.2594,-83.2963 37.252,-83.3121 37.2431,-83.3267 37.2332,-83.3425 37.2224,-83.3495 37.2201,-83.3604 37.2182,-83.3717 37.2167,-83.3802 37.2154,-83.3837 37.2118,-83.3871 37.2083,-83.3905 37.2047,-83.3939 37.2011,-83.4019 37.1976,-83.4137 37.1891,-83.4261 37.1796,-83.4358 37.1728,-83.4474 37.1724,-83.4642 37.1686,-83.4826 37.1645,-83.4996 37.163,-83.5143 37.1689,-83.533 37.1692,-83.5526 37.1669,-83.57 37.1651,-83.5873 37.1741,-83.5976 37.1795,-83.6089 37.1825,-83.629 37.1841,-83.6303 37.1783,-83.6317 37.1724,-83.6326 37.1665,-83.6336 37.1606,-83.6403 37.1596,-83.647 37.1586,-83.6505 37.1551,-83.6541 37.1516,-83.6576 37.1482,-83.6612 37.1447,-83.672 37.142,-83.6837 37.1409,-83.6956 37.1405,-83.7071 37.1398,-83.719 37.137,-83.7302 37.1328,-83.7416 37.1293,-83.7539 37.1289,-83.7663 37.1323,-83.7783 37.1371,-83.7909 37.141,-83.805 37.1414,-83.8259 37.1384,-83.8469 37.1351,-83.8676 37.1312,-83.8879 37.1262,-83.9069 37.1192,-83.9216 37.1126,-83.9372 37.1089,-83.9587 37.1102,-83.9958 37.1189,-84.0472 37.1324,-84.0929 37.1448,-84.1126 37.1503)
+LINESTRING(-77.8773 35.9798,-77.8769 35.9865,-77.8766 35.9932,-77.8763 35.9999,-77.8759 36.0066,-77.8674 36.0174,-77.8543 36.0307,-77.8398 36.0465,-77.8271 36.0647,-77.8158 36.0885,-77.8065 36.1132,-77.7973 36.1378,-77.7861 36.1615,-77.7815 36.168,-77.7759 36.1745,-77.7707 36.1811,-77.7671 36.1879,-77.7661 36.1926,-77.7652 36.199,-77.7642 36.2052,-77.763 36.2092,-77.7551 36.221,-77.7458 36.233,-77.736 36.2447,-77.7268 36.2561,-77.723 36.2654,-77.719 36.2806,-77.7154 36.2964,-77.7127 36.3076,-77.7003 36.3328,-77.6817 36.3559,-77.6618 36.3786,-77.6458 36.4025,-77.6431 36.4093,-77.6412 36.4166,-77.6393 36.4239,-77.6369 36.4309,-77.6227 36.4583,-77.6056 36.4876,-77.5899 36.5173,-77.5802 36.5457)
+LINESTRING(-80.7425 36.559,-80.7417 36.5748,-80.7392 36.6009,-80.7351 36.6282,-80.7277 36.6345,-80.7196 36.6408,-80.7128 36.6478,-80.7092 36.6557)
+LINESTRING(-85.8362 37.7008,-85.8425 37.6952,-85.8487 37.6895,-85.8549 37.6838,-85.8611 37.6781,-85.897 37.6562,-85.9327 37.6364,-85.968 37.6174,-86.0025 37.5978,-86.0097 37.5921,-86.0163 37.5851,-86.0227 37.5782,-86.0296 37.5728,-86.0543 37.5619,-86.0829 37.5533,-86.1125 37.5457,-86.1402 37.5378,-86.1488 37.5273,-86.1627 37.513,-86.1777 37.4998,-86.1897 37.4922,-86.2326 37.4791,-86.2764 37.4677,-86.3205 37.4564,-86.3637 37.4435,-86.38 37.4359,-86.3955 37.4263,-86.4113 37.4172,-86.4283 37.4113,-86.4488 37.4089,-86.4746 37.4082,-86.5003 37.4096,-86.5204 37.4133,-86.5315 37.4105,-86.5415 37.4066,-86.551 37.4026,-86.5608 37.3993,-86.5795 37.3953,-86.605 37.3909,-86.6303 37.387,-86.6486 37.3849,-86.6802 37.3856,-86.713 37.3896,-86.7462 37.3937,-86.7791 37.3945,-86.7894 37.3908,-86.8004 37.3866)
+LINESTRING(-87.5606 37.8122,-87.5549 37.8123,-87.5496 37.8119,-87.5199 37.8048,-87.4859 37.7994,-87.4528 37.7934,-87.4254 37.7842,-87.4168 37.7788,-87.409 37.7733,-87.4002 37.7691,-87.3883 37.7676,-87.3618 37.7686,-87.3339 37.7687,-87.3065 37.765,-87.2813 37.7549,-87.2678 37.7554,-87.2468 37.7586,-87.2257 37.7627,-87.2117 37.7659,-87.2026 37.7644,-87.1866 37.7641,-87.1698 37.7645,-87.1581 37.7648,-87.1466 37.7421,-87.1263 37.7317,-87.1011 37.7322,-87.075 37.7424,-87.0664 37.7341,-87.0565 37.7266,-87.0468 37.7194,-87.0388 37.712,-87.034 37.7048,-87.0298 37.6965,-87.0257 37.688,-87.0211 37.6802,-86.9968 37.6458,-86.9722 37.6116,-86.9476 37.5773,-86.9233 37.5429,-86.918 37.5338,-86.9148 37.5253,-86.9127 37.5167,-86.9104 37.5073,-86.9046 37.4962,-86.894 37.4822,-86.8825 37.4686,-86.8736 37.4583,-86.8469 37.4384,-86.8306 37.4234,-86.8174 37.408,-86.8004 37.3866)
+LINESTRING(-88.9958 37.6051,-88.9909 37.6137,-88.9854 37.6222,-88.9804 37.6309,-88.977 37.6399,-88.972 37.6589,-88.9651 37.6842,-88.959 37.7085,-88.9566 37.7246,-88.9541 37.7396,-88.9478 37.7572,-88.9408 37.7745,-88.9359 37.7889,-88.9305 37.8036,-88.9198 37.8312,-88.9094 37.8592,-88.9046 37.8752,-88.904 37.8853,-88.9027 37.8954,-88.9014 37.9058,-88.9006 37.9166,-88.8997 37.9245,-88.8977 37.9312,-88.8952 37.9377,-88.8928 37.9447,-88.8916 37.9606,-88.892 37.9813,-88.8898 38.0013,-88.8811 38.0149,-88.8806 38.0285,-88.8813 38.0451,-88.8818 38.0606,-88.8807 38.0711,-88.8779 38.0761,-88.8743 38.0807,-88.8709 38.0854,-88.8688 38.091,-88.8661 38.0975,-88.8613 38.1134,-88.8583 38.1362,-88.8615 38.1631,-88.8678 38.1918,-88.8715 38.2159,-88.8734 38.233,-88.8745 38.2404,-88.8785 38.2463,-88.8836 38.2527,-88.889 38.2593,-88.8938 38.2657)
+LINESTRING(-81.0614 36.9536,-81.074 36.9626,-81.0835 36.9654,-81.0943 36.964,-81.1115 36.9607,-81.1782 36.95,-81.2419 36.9386,-81.3038 36.9249,-81.365 36.9076,-81.4007 36.8881,-81.4244 36.8635,-81.4453 36.8359,-81.4725 36.8076,-81.5043 36.7862,-81.5388 36.7733,-81.5768 36.7688,-81.6186 36.7725,-81.6333 36.7759,-81.6462 36.7798,-81.6591 36.7837,-81.6738 36.787,-81.7272 36.7909,-81.7743 36.7843,-81.8208 36.7708,-81.8718 36.7542,-81.8858 36.7457,-81.8997 36.7373,-81.9245 36.7221,-81.9477 36.7076,-81.9625 36.7012,-81.9798 36.6974,-81.9979 36.6941,-82.0148 36.6894,-82.0413 36.6769,-82.0669 36.6618,-82.0925 36.6464,-82.1193 36.6329,-82.1287 36.6292,-82.139 36.6273,-82.1487 36.6279,-82.1585 36.6285,-82.1682 36.6287,-82.178 36.6283)
+LINESTRING(-78.2104 36.5454,-78.2145 36.5387,-78.2297 36.5172,-78.2466 36.4979,-78.2656 36.4768,-78.2837 36.4547,-78.3026 36.433,-78.3242 36.4134,-78.3445 36.397,-78.364 36.38,-78.3833 36.3627,-78.4029 36.3455,-78.42 36.3369,-78.4494 36.3269,-78.48 36.321,-78.5004 36.3246,-78.509 36.3242,-78.5181 36.3228,-78.5272 36.3213,-78.5363 36.3198,-78.5451 36.3179,-78.5885 36.2891,-78.6483 36.2327,-78.7053 36.1716,-78.7407 36.1291,-78.7487 36.1163,-78.7565 36.1021,-78.7648 36.0883,-78.774 36.0768,-78.791 36.0607,-78.8169 36.0368,-78.8452 36.0115,-78.8695 35.9911,-78.8797 35.9959,-78.8921 35.9995,-78.9051 36.0027,-78.9171 36.0065,-78.9364 36.0054,-78.9562 36.0094,-78.976 36.0149,-78.9954 36.0181,-79.0072 36.0166,-79.0199 36.0169,-79.0347 36.0217,-79.05 36.0269,-79.0654 36.0317,-79.0805 36.0356,-79.1016 36.0396,-79.1224 36.0435,-79.1435 36.0494,-79.1657 36.0591)
+LINESTRING(-82.178 36.6283,-82.219 36.6151,-82.2571 36.5963)
+LINESTRING(-113.455 37.166,-113.389 37.2216,-113.326 37.284,-113.271 37.3506,-113.23 37.4187,-113.23 37.4268,-113.232 37.4341,-113.229 37.4582,-113.226 37.485,-113.221 37.511,-113.211 37.5327,-113.196 37.5548,-113.182 37.5785,-113.167 37.6018,-113.151 37.6226,-113.089 37.6433,-113.078 37.6762,-113.074 37.7169,-113.033 37.761,-113.013 37.7722,-112.991 37.7825,-112.969 37.7926,-112.948 37.8034,-112.939 37.8092,-112.93 37.8158,-112.922 37.8225,-112.913 37.8286,-112.894 37.8382,-112.872 37.8462,-112.85 37.8539,-112.83 37.8627,-112.805 37.8839,-112.777 37.9182,-112.751 37.9536,-112.733 37.978,-112.718 38.0026,-112.704 38.0284,-112.69 38.0544,-112.675 38.0794,-112.662 38.0966,-112.648 38.1137,-112.634 38.1309,-112.62 38.1482,-112.623 38.1572,-112.632 38.1701,-112.642 38.1831,-112.648 38.1924,-112.65 38.2017,-112.652 38.2122,-112.653 38.2229,-112.654 38.2327,-112.655 38.2677,-112.658 38.303,-112.664 38.338,-112.674 38.3718,-112.675 38.3781,-112.661 38.4056,-112.648 38.4263,-112.634 38.4463,-112.618 38.4718,-112.616 38.479,-112.62 38.4939,-112.62 38.5223,-112.618 38.5535,-112.615 38.5765)
+LINESTRING(-79.1657 36.0591,-79.1888 36.0628,-79.2115 36.0686,-79.2342 36.0737,-79.2573 36.0754,-79.274 36.0735,-79.2906 36.0702,-79.3074 36.0669,-79.3245 36.0649,-79.3404 36.0661,-79.3553 36.0688,-79.3701 36.0696,-79.3854 36.0648,-79.3866 36.0634,-79.3877 36.0621,-79.3927 36.0614,-79.3975 36.0611,-79.4023 36.0612,-79.4071 36.0613,-79.4249 36.0629,-79.4436 36.0657,-79.4619 36.0682,-79.4787 36.0693,-79.5101 36.0675,-79.5423 36.0635,-79.5746 36.0592,-79.6063 36.0562,-79.6446 36.0553,-79.6764 36.0558,-79.7094 36.0546,-79.7514 36.0489,-79.7572 36.048,-79.7629 36.0473,-79.7685 36.0464,-79.7742 36.0448)
+LINESTRING(-79.7742 36.0448,-79.7724 36.0579,-79.7716 36.0717,-79.7703 36.0853,-79.7672 36.0979,-79.7485 36.1298,-79.7131 36.1818,-79.6738 36.2342,-79.6434 36.2677,-79.6421 36.2784,-79.6408 36.2959,-79.6406 36.3131,-79.642 36.323,-79.6208 36.3611,-79.5944 36.3965,-79.5651 36.4309,-79.5355 36.466,-79.5298 36.4668,-79.5257 36.4698,-79.5217 36.4727,-79.5164 36.4726,-79.5102 36.4729,-79.5041 36.4739,-79.4994 36.4758,-79.4898 36.4928,-79.4805 36.5099,-79.4718 36.5274,-79.4663 36.5399)
+LINESTRING(-79.7742 36.0448,-79.7823 36.0396,-79.7915 36.0355,-79.8014 36.0327,-79.8118 36.0313)
+LINESTRING(-85.8362 37.7008,-85.8537 37.6553,-85.8694 37.6042,-85.8804 37.5527,-85.8835 37.5058,-85.8821 37.4778,-85.8805 37.4492,-85.8798 37.4206,-85.8806 37.3929,-85.8834 37.3791,-85.8885 37.3648,-85.894 37.3503,-85.8981 37.3362,-85.8994 37.3261,-85.9001 37.3155,-85.9009 37.305,-85.9027 37.2954,-85.907 37.2846,-85.913 37.2742,-85.9193 37.264,-85.9244 37.2536,-85.9286 37.2416,-85.9322 37.2294,-85.9359 37.2172,-85.9401 37.2052,-85.9415 37.2019,-85.9428 37.1985,-85.9441 37.1952,-85.9455 37.1919,-85.9552 37.1774,-85.9638 37.1648,-85.9709 37.1515,-85.9763 37.1351,-85.9969 37.1211,-86.021 37.1152,-86.0454 37.1063,-86.0665 37.0835,-86.0782 37.0777,-86.0898 37.072,-86.1014 37.0663,-86.1131 37.0606)
+LINESTRING(-80.234 36.0965,-80.2162 36.0977,-80.1997 36.1004,-80.1833 36.1039,-80.1663 36.1075,-80.1255 36.1115,-80.0844 36.1092,-80.0439 36.1022,-80.0046 36.0922,-79.9826 36.0852,-79.9609 36.0771,-79.9392 36.0687,-79.9175 36.0609,-79.8915 36.053,-79.8649 36.0458,-79.8382 36.0388,-79.8118 36.0313)
+LINESTRING(-80.653 36.5583,-80.6464 36.5456,-80.6364 36.5274,-80.6298 36.5178,-80.6279 36.4979,-80.6102 36.4849,-80.5873 36.4752,-80.5699 36.4651,-80.5544 36.4536,-80.5311 36.4346,-80.509 36.4157,-80.4968 36.4046,-80.4918 36.3956,-80.4885 36.3844,-80.4862 36.3744,-80.4846 36.3693,-80.4728 36.3544,-80.4618 36.3378,-80.4501 36.3221,-80.4363 36.3101,-80.4098 36.2933,-80.3871 36.2771,-80.3661 36.2594,-80.3446 36.2382,-80.3327 36.2284,-80.3187 36.2197,-80.3047 36.2109,-80.2925 36.2012,-80.2878 36.1951,-80.2837 36.188,-80.2795 36.1807,-80.2742 36.174,-80.267 36.1678,-80.2588 36.1615,-80.2509 36.1551,-80.245 36.1487,-80.2393 36.1352,-80.238 36.122,-80.2375 36.1091,-80.234 36.0965)
+LINESTRING(-77.8773 35.9798,-77.8951 35.9781,-77.9131 35.9766,-77.9311 35.9754,-77.9491 35.9743,-77.9555 35.978,-77.9619 35.9818,-77.968 35.9821,-77.9742 35.9825,-77.9803 35.9825,-77.9864 35.9822,-78.0152 35.9667,-78.0604 35.9491,-78.1083 35.9317,-78.1455 35.9167,-78.1632 35.9058,-78.1863 35.8897,-78.2084 35.8747,-78.2227 35.8675,-78.2347 35.8659,-78.2467 35.8643,-78.2586 35.8626,-78.2706 35.861,-78.2798 35.854,-78.2895 35.8472,-78.2994 35.8408,-78.3098 35.8348,-78.3427 35.8346,-78.3749 35.8292,-78.4051 35.8187,-78.4319 35.8033,-78.4643 35.804,-78.501 35.7981,-78.5376 35.7938,-78.5698 35.7996,-78.5777 35.7977,-78.5857 35.7957,-78.5972 35.7834,-78.6107 35.777,-78.6267 35.7745,-78.6456 35.7735)
+LINESTRING(-79.1657 36.0591,-79.1492 36.0485,-79.1304 36.0385,-79.1119 36.0283,-79.0963 36.0171,-79.0882 36.0089,-79.082 36.0018,-79.0742 35.9947,-79.0612 35.9865,-79.0535 35.9833,-79.0438 35.9802,-79.034 35.9773,-79.026 35.9743,-79.0123 35.9686,-78.9972 35.9629,-78.9821 35.9573,-78.9683 35.9518,-78.9418 35.941,-78.9145 35.9307,-78.887 35.9206,-78.8599 35.9105,-78.8286 35.8921,-78.7732 35.8423,-78.7409 35.8228,-78.7164 35.8123,-78.6934 35.8011,-78.6713 35.7884,-78.6456 35.7735)
+LINESTRING(-86.8004 37.3866,-86.8306 37.3749,-86.8604 37.3638,-86.8912 37.356,-86.9243 37.3543,-86.9523 37.3404,-86.9746 37.3319,-86.998 37.3257,-87.0295 37.3181,-87.0484 37.3105,-87.0686 37.2986,-87.0885 37.2855,-87.1061 37.2745,-87.1153 37.2745,-87.1244 37.2745,-87.1335 37.2745,-87.1426 37.2745,-87.1616 37.2645,-87.1816 37.2585,-87.2025 37.2543,-87.2242 37.2498,-87.2353 37.2464,-87.2459 37.2424,-87.2568 37.2388,-87.2689 37.2364,-87.3024 37.2364,-87.3396 37.2377,-87.3734 37.2324,-87.3967 37.2127,-87.4081 37.213,-87.4195 37.2133,-87.431 37.2136,-87.4424 37.2138)
+LINESTRING(-87.5606 37.8122,-87.5583 37.8,-87.5537 37.7868,-87.5458 37.7752,-87.5332 37.7678,-87.5249 37.7473,-87.5184 37.7254,-87.514 37.7031,-87.5122 37.682,-87.5129 37.6681,-87.5141 37.655,-87.5144 37.6417,-87.5119 37.6276,-87.5057 37.612,-87.4974 37.5963,-87.4893 37.5807,-87.4835 37.565,-87.4759 37.5223,-87.4716 37.4667,-87.4737 37.4114,-87.4852 37.3696,-87.4732 37.331,-87.4588 37.2917,-87.4469 37.2524,-87.4424 37.2138)
+LINESTRING(-96.8468 37.9042,-96.8266 37.9206,-96.8039 37.9316,-96.7805 37.9421,-96.7583 37.9568,-96.7419 37.9692,-96.7245 37.9801,-96.7074 37.9911,-96.6917 38.004,-96.6695 38.0233,-96.645 38.0413,-96.6196 38.0586,-96.5946 38.0759,-96.5842 38.0862,-96.5766 38.0977,-96.5691 38.1093,-96.559 38.1198,-96.5436 38.1292,-96.5259 38.1374,-96.5095 38.1447,-96.4979 38.151,-96.4856 38.1605,-96.4733 38.1705,-96.4613 38.1805,-96.4493 38.1906,-96.4431 38.1973,-96.4383 38.2049,-96.4338 38.2125,-96.4286 38.2197,-96.4168 38.2271,-96.4101 38.2304,-96.3877 38.2535,-96.3723 38.2731,-96.356 38.2924,-96.3363 38.311,-96.3242 38.3184,-96.3177 38.3219,-96.292 38.3433,-96.2706 38.3676,-96.251 38.3929,-96.2369 38.414)
+LINESTRING(-84.623 37.0988,-84.6353 37.0955,-84.6511 37.0962,-84.667 37.0989,-84.6801 37.1015,-84.6988 37.0978,-84.7256 37.0979,-84.7537 37.0989,-84.7765 37.098,-84.7855 37.0953,-84.7937 37.0915,-84.8029 37.0887,-84.8153 37.0887,-84.8263 37.0912,-84.8379 37.0948,-84.8497 37.0985,-84.8613 37.1012,-84.8666 37.0998,-84.9081 37.0863,-84.9487 37.0803,-84.99 37.0759,-85.0312 37.0685,-85.0596 37.0594,-85.083 37.0512,-85.1091 37.0465,-85.146 37.0475,-85.1804 37.0556,-85.214 37.0685,-85.2477 37.0808,-85.2826 37.0869,-85.2994 37.0847,-85.3155 37.0793,-85.3301 37.0737,-85.3426 37.0711,-85.3567 37.0709,-85.3709 37.0707,-85.385 37.0705,-85.3991 37.0702,-85.4119 37.0632,-85.4245 37.0555,-85.4371 37.0479,-85.4499 37.0413,-85.4604 37.0371,-85.4713 37.0334,-85.4821 37.0296,-85.4926 37.0249,-85.5072 37.0278,-85.5205 37.0272,-85.5333 37.0259,-85.5462 37.0268,-85.5904 37.0051,-85.621 36.996,-85.6566 36.9944,-85.7161 36.9951,-85.7562 36.9952,-85.7962 36.9952,-85.8363 36.9957,-85.8763 36.9972,-85.8916 36.9868,-85.9004 36.9816,-85.9107 36.9785,-85.9303 36.9743,-85.9494 36.9813,-85.9699 36.9882,-85.9883 36.9945,-86.0008 36.9999,-86.0169 37.0105,-86.0332 37.0225,-86.0494 37.0342,-86.0656 37.0436,-86.0775 37.0473,-86.0906 37.05,-86.1031 37.0537,-86.1131 37.0606)
+LINESTRING(-78.6456 35.7735,-78.6251 35.7559,-78.6119 35.7381,-78.6025 35.7188,-78.5932 35.6969)
+LINESTRING(-113.606 37.0015,-113.607 37.0104,-113.605 37.0216,-113.601 37.0288,-113.6 37.0375,-113.6 37.0465,-113.599 37.0551,-113.594 37.0649,-113.584 37.0769,-113.573 37.0886,-113.564 37.0978,-113.555 37.1015,-113.546 37.1062,-113.529 37.1252,-113.501 37.1449,-113.473 37.1602,-113.455 37.166)
+LINESTRING(-84.1126 37.1503,-84.1106 37.1436,-84.1075 37.1315,-84.1051 37.1202,-84.1022 37.109,-84.0974 37.0972,-84.0946 37.0916,-84.0966 37.0463,-84.1093 36.9901,-84.1283 36.934,-84.1496 36.8891,-84.1489 36.8674,-84.1547 36.8527,-84.1638 36.8393,-84.1733 36.8218,-84.1765 36.8064,-84.1753 36.7908,-84.1721 36.7751,-84.1692 36.7596,-84.1719 36.7556,-84.1745 36.7515,-84.1681 36.7259,-84.1562 36.7019,-84.1451 36.6777,-84.1413 36.6514,-84.1306 36.6413,-84.1231 36.6354,-84.1181 36.6322,-84.1123 36.6268,-84.1101 36.621,-84.1072 36.6105,-84.1028 36.5935)
+LINESTRING(-86.4313 36.9139,-86.4142 36.9359,-86.4025 36.9598,-86.3899 36.9837,-86.3702 37.0055,-86.3446 37.0089,-86.3181 37.0099,-86.2917 37.0114,-86.2666 37.0162,-86.2587 37.0203,-86.2499 37.0271,-86.2412 37.0345,-86.2334 37.0404,-86.2064 37.0433,-86.1692 37.0475,-86.134 37.0532,-86.1131 37.0606)
+LINESTRING(-86.8004 37.3866,-86.7956 37.379,-86.7905 37.3707,-86.7862 37.3623,-86.7836 37.3541,-86.7752 37.3487,-86.7661 37.3441,-86.757 37.3395,-86.7485 37.3341,-86.7139 37.2997,-86.7097 37.2768,-86.7179 37.2543,-86.7206 37.221,-86.6939 37.1929,-86.6645 37.1661,-86.6414 37.1362,-86.6333 37.099,-86.617 37.0847,-86.6005 37.0688,-86.5836 37.0533,-86.5661 37.0406,-86.5522 37.0335,-86.5377 37.027,-86.5231 37.0202,-86.5092 37.0121,-86.5039 36.9998,-86.5019 36.9851,-86.5019 36.9702,-86.5027 36.9573,-86.4836 36.9474,-86.465 36.9377,-86.4474 36.9269,-86.4313 36.9139)
+LINESTRING(-87.4424 37.2138,-87.4571 37.2147,-87.4721 37.2133,-87.4869 37.2106,-87.501 37.2078,-87.5212 37.2046,-87.5564 37.1996,-87.5914 37.1948,-87.6105 37.1924,-87.6337 37.1931,-87.6574 37.1959,-87.6837 37.1974,-87.7146 37.1938,-87.7356 37.1782,-87.7713 37.1603,-87.8087 37.1447,-87.8347 37.1362,-87.8447 37.1349,-87.8552 37.1344,-87.8656 37.1339,-87.8756 37.1327,-87.8876 37.1285,-87.8998 37.1225,-87.9121 37.1166,-87.9246 37.1126,-87.9487 37.1095,-87.9824 37.1065,-88.0163 37.1047,-88.0409 37.1051)
+LINESTRING(-114.049 36.8405,-114.006 36.8454,-113.975 36.8497,-113.939 36.8589,-113.877 36.8789,-113.866 36.8881,-113.86 36.8923,-113.846 36.8972,-113.836 36.896,-113.827 36.8949,-113.82 36.8948,-113.812 36.9002,-113.807 36.9078,-113.802 36.9158,-113.796 36.9223,-113.78 36.9296,-113.76 36.9344,-113.742 36.9402,-113.729 36.9501,-113.719 36.9501,-113.708 36.9492,-113.697 36.9482,-113.687 36.9479,-113.671 36.9505,-113.645 36.956,-113.62 36.9622,-113.607 36.9667,-113.604 36.9776,-113.606 36.994,-113.606 37.0015)
+LINESTRING(-78.2672 35.4891,-78.2367 35.503,-78.198 35.5181,-78.1617 35.533,-78.1388 35.5464,-78.1298 35.5595,-78.1186 35.5802,-78.108 35.601,-78.1008 35.6145,-78.078 35.6469,-78.054 35.679,-78.0317 35.7106,-78.0143 35.7417,-78.0042 35.7699,-77.996 35.7993,-77.9862 35.8283,-77.971 35.8549,-77.9462 35.8837,-77.9176 35.9153,-77.8923 35.9479,-77.8773 35.9798)
+LINESTRING(-78.2874 35.4802,-78.2831 35.4831,-78.2785 35.4856,-78.2732 35.4876,-78.2672 35.4891)
+LINESTRING(-88.6859 37.1288,-88.6828 37.1535,-88.6804 37.18,-88.6979 37.2143,-88.7295 37.2687,-88.7625 37.3225,-88.7845 37.3547,-88.8037 37.3717,-88.827 37.3862,-88.8496 37.4006,-88.8667 37.4173,-88.8787 37.4401,-88.8835 37.4592,-88.8866 37.4773,-88.8933 37.4968,-88.9107 37.5225,-88.938 37.5536,-88.9685 37.5834,-88.9958 37.6051)
+LINESTRING(-104.614 38.3075,-104.609 38.2928,-104.605 38.2759,-104.605 38.2597,-104.615 38.2468,-104.614 38.239,-104.615 38.2315,-104.617 38.2244,-104.621 38.2174,-104.625 38.2172,-104.628 38.217,-104.63 38.2073,-104.632 38.1974,-104.632 38.1875,-104.632 38.1777,-104.643 38.1642,-104.654 38.1441,-104.664 38.1232,-104.674 38.1079,-104.685 38.0942,-104.699 38.081,-104.712 38.0677,-104.724 38.054,-104.731 38.0438,-104.736 38.0323,-104.741 38.0208,-104.747 38.0103,-104.766 37.9855,-104.785 37.9625,-104.805 37.9403,-104.827 37.9181,-104.831 37.8793,-104.829 37.8395,-104.828 37.7995,-104.835 37.76,-104.825 37.7391,-104.814 37.7093,-104.804 37.6813,-104.794 37.6658,-104.792 37.6587,-104.786 37.6521,-104.779 37.6462,-104.771 37.6415,-104.77 37.6381,-104.768 37.6337,-104.766 37.6293,-104.763 37.626)
+LINESTRING(-97.3109 37.6793,-97.3127 37.7046,-97.3167 37.7324,-97.3214 37.7594,-97.326 37.7864,-97.3291 37.8185,-97.3292 37.8516,-97.328 37.8848,-97.3271 37.9167,-97.3255 37.9546,-97.3239 37.9926,-97.3221 38.0412,-97.3222 38.0656,-97.3614 38.0996,-97.4472 38.1709,-97.5345 38.2427,-97.5779 38.2781,-97.5889 38.287,-97.6 38.2959,-97.6108 38.3049,-97.6214 38.3142,-97.6212 38.3296,-97.6209 38.3451,-97.6208 38.3605,-97.6207 38.3759)
+LINESTRING(-121.846 37.3423,-121.829 37.3193,-121.814 37.3053,-121.803 37.2899,-121.791 37.2677,-121.78 37.2593,-121.768 37.2495,-121.757 37.2397,-121.745 37.2313,-121.71 37.2068,-121.678 37.1785,-121.649 37.1481,-121.624 37.1171,-121.618 37.1106,-121.611 37.1046,-121.605 37.0984,-121.6 37.0911,-121.579 37.0463,-121.567 37.024,-121.555 37.0021,-121.558 36.9875,-121.555 36.9728,-121.551 36.9579,-121.555 36.9427,-121.545 36.9215,-121.552 36.9055,-121.558 36.8896,-121.566 36.8742,-121.578 36.8598,-121.59 36.857,-121.601 36.8578,-121.613 36.8589,-121.625 36.8571,-121.633 36.8493,-121.631 36.8437,-121.628 36.8379,-121.626 36.832,-121.624 36.8263,-121.632 36.8162,-121.644 36.8092,-121.656 36.8033,-121.665 36.7965,-121.667 36.7795,-121.659 36.7556,-121.639 36.7283,-121.602 36.7009,-121.592 36.6911,-121.579 36.6832,-121.566 36.6758,-121.553 36.6676,-121.542 36.6578,-121.521 36.6382,-121.51 36.6285,-121.482 36.6019,-121.457 36.5739,-121.429 36.5482,-121.393 36.5285,-121.377 36.5052,-121.351 36.4845,-121.322 36.4663,-121.294 36.4502,-121.282 36.4149,-121.265 36.3751,-121.247 36.3371,-121.233 36.3071,-121.212 36.2883,-121.196 36.2695,-121.188 36.2474,-121.19 36.2186,-121.184 36.2096,-121.178 36.2006,-121.171 36.1919,-121.164 36.184,-121.127 36.1779,-121.099 36.1727,-121.081 36.1684,-121.071 36.1512,-121.059 36.1357,-121.047 36.1207,-121.036 36.1045,-121.039 36.0951,-121.042 36.0859,-120.992 36.0444,-120.948 36.0048,-120.912 35.9615,-120.884 35.9086,-120.863 35.8984,-120.859 35.8892,-120.857 35.8799,-120.856 35.8706,-120.853 35.8613,-120.844 35.856,-120.835 35.8514,-120.827 35.8463,-120.82 35.8394,-120.812 35.8341,-120.804 35.8295,-120.793 35.8073,-120.78 35.7866,-120.759 35.7691,-120.727 35.7568,-120.725 35.7504,-120.725 35.7421,-120.726 35.7337,-120.727 35.7268,-120.727 35.7201,-120.726 35.7137,-120.723 35.7077,-120.719 35.702,-120.721 35.6876,-120.726 35.6734,-120.73 35.6593,-120.729 35.6452,-120.678 35.6435)
+LINESTRING(-88.6613 37.0593,-88.668 37.0649,-88.6751 37.0699,-88.686 37.093,-88.6866 37.1227,-88.6859 37.1288)
+LINESTRING(-77.0725 35.1133,-77.0863 35.128,-77.1019 35.1406,-77.1201 35.1499,-77.1418 35.1549,-77.1466 35.1534,-77.1515 35.1518,-77.1563 35.1502,-77.1612 35.1486,-77.2265 35.1654,-77.3215 35.19,-77.4095 35.2115,-77.4536 35.2189)
+LINESTRING(-80.3373 35.7951,-80.3006 35.7935,-80.2585 35.7889,-80.2176 35.7879,-80.1846 35.7971,-80.1727 35.8064,-80.1606 35.8177,-80.1479 35.8286,-80.134 35.8365,-80.1102 35.8439,-80.0863 35.8489,-80.0621 35.8532,-80.0372 35.8581,-80.0087 35.8708,-79.9691 35.8942,-79.9318 35.9187,-79.9103 35.9348,-79.9032 35.9443,-79.8943 35.96,-79.8866 35.9764,-79.8835 35.9878,-79.8669 35.9963,-79.8464 36.0082,-79.8265 36.0208,-79.8118 36.0313)
+LINESTRING(-80.234 36.0965,-80.2348 36.0762,-80.2395 36.0534,-80.245 36.0306,-80.2482 36.0104,-80.2518 35.9936,-80.2573 35.9768,-80.2601 35.9605,-80.2559 35.9451,-80.2503 35.9264,-80.2539 35.9089,-80.2615 35.8936,-80.2682 35.8817,-80.274 35.869,-80.2805 35.8553,-80.2875 35.8418,-80.2946 35.8302,-80.3039 35.8211,-80.3157 35.8134,-80.3276 35.8053,-80.3373 35.7951)
+LINESTRING(-89.1868 37.0976,-89.1795 37.1173,-89.1698 37.1371,-89.1608 37.1568,-89.1558 37.1764,-89.1528 37.2269,-89.1524 37.278,-89.1529 37.3292,-89.1526 37.3799,-89.1529 37.394,-89.1537 37.4087,-89.1537 37.4232,-89.1517 37.437,-89.1255 37.48,-89.0814 37.5166,-89.0345 37.5495,-89 37.5816,-88.9983 37.5863,-88.9972 37.593,-88.9965 37.5991,-88.9958 37.6051)
+LINESTRING(-97.3108 37.6086,-97.3081 37.6143,-97.3048 37.6198,-97.2941 37.6267,-97.2803 37.6391,-97.2639 37.6533,-97.2454 37.6655,-97.2313 37.6705,-97.2167 37.6731,-97.2021 37.6755,-97.1876 37.6798,-97.1601 37.6936,-97.1332 37.7091,-97.106 37.7241,-97.0777 37.7362,-97.0487 37.7448,-97.0186 37.753,-96.9893 37.7626,-96.9629 37.7751,-96.9421 37.7923,-96.9148 37.8195,-96.8895 37.8471,-96.8747 37.8651,-96.8672 37.8759,-96.8596 37.8868,-96.8517 37.8978,-96.8468 37.9042)
+LINESTRING(-97.3109 37.6793,-97.3108 37.6086)
+LINESTRING(-88.3368 36.9912,-88.317 37.0263,-88.2851 37.0513,-88.2433 37.0695,-88.195 37.0847,-88.17 37.0941,-88.1482 37.104,-88.1258 37.111,-88.0995 37.1118,-88.0409 37.1051)
+LINESTRING(-88.6613 37.0593,-88.5885 37.0197,-88.5096 37.0015,-88.4254 36.9951,-88.3368 36.9912)
+LINESTRING(-78.2874 35.4802,-78.2917 35.4768,-78.2958 35.4732,-78.3002 35.4695,-78.3049 35.4657,-78.3141 35.4604,-78.3234 35.4568,-78.3326 35.4531,-78.3411 35.4472,-78.3472 35.4388,-78.3507 35.43,-78.3546 35.4218,-78.3622 35.4147,-78.394 35.4006,-78.4247 35.3915,-78.454 35.3814,-78.4818 35.3644)
+LINESTRING(-78.4818 35.3644,-78.4896 35.3727,-78.497 35.3805,-78.5044 35.3884,-78.5119 35.3963,-78.5125 35.3988,-78.5132 35.4013,-78.5138 35.4038,-78.5145 35.4063,-78.5186 35.4205,-78.5231 35.435,-78.5271 35.4495,-78.5303 35.4637,-78.5306 35.4707,-78.53 35.4781,-78.5293 35.4854,-78.5298 35.4923,-78.5368 35.5108,-78.5475 35.528,-78.5581 35.5452,-78.5646 35.564,-78.5678 35.5991,-78.5697 35.6311,-78.5761 35.6628,-78.5932 35.6969)
+LINESTRING(-87.4424 37.2138,-87.4409 37.2084,-87.4396 37.2028,-87.4389 37.1972,-87.4389 37.1917,-87.4456 37.1834,-87.4515 37.1747,-87.4569 37.1658,-87.4623 37.1568,-87.4568 37.1256,-87.4604 37.1018,-87.4667 37.0802,-87.4694 37.0561,-87.4675 37.0467,-87.4637 37.0368,-87.4596 37.0268,-87.4569 37.0173,-87.4573 37.0067,-87.4605 36.9948,-87.4644 36.9827,-87.4672 36.9717,-87.4693 36.9463,-87.4707 36.9074,-87.4707 36.8703,-87.4686 36.8502,-87.4713 36.8472,-87.4739 36.8442,-87.4766 36.8412,-87.4792 36.8382)
+LINESTRING(-79.8269 35.6171,-79.8292 35.6192,-79.8314 35.6214,-79.8337 35.6235,-79.836 35.6257,-79.841 35.6522,-79.8384 35.6792,-79.8338 35.7064,-79.8329 35.7332,-79.8342 35.7704,-79.8319 35.8071,-79.8288 35.8439,-79.8275 35.8811,-79.8278 35.8958,-79.8282 35.9105,-79.8288 35.9253,-79.8294 35.94,-79.827 35.9615,-79.8207 35.9857,-79.8142 36.0098,-79.8118 36.0313)
+LINESTRING(-80.8435 35.8106,-80.8287 35.8132,-80.8178 35.8166,-80.8075 35.8211,-80.7943 35.8273,-80.78 35.8358,-80.7661 35.8461,-80.7518 35.856,-80.7362 35.8636,-80.7059 35.873,-80.675 35.8822,-80.6449 35.893,-80.6174 35.9069,-80.5928 35.922,-80.5683 35.9371,-80.5438 35.9524,-80.5201 35.9681,-80.5098 35.9761,-80.4999 35.9846,-80.4897 35.9927,-80.4782 35.9996,-80.4697 36.0032,-80.4615 36.0057,-80.4531 36.0078,-80.4442 36.0102,-80.4214 36.0185,-80.3964 36.03,-80.372 36.0426,-80.3511 36.0545,-80.3415 36.0615,-80.3323 36.0697,-80.3231 36.0777,-80.3131 36.0841,-80.2897 36.0924,-80.2706 36.0944,-80.253 36.0944,-80.234 36.0965)
+LINESTRING(-80.8435 35.8106,-80.8406 35.8274,-80.8407 35.8428,-80.842 35.8581,-80.8425 35.8747,-80.8427 35.885,-80.8434 35.8947,-80.8437 35.9043,-80.8427 35.9142,-80.8423 35.9195,-80.8427 35.9248,-80.8431 35.9302,-80.8429 35.9355,-80.8394 35.9588,-80.8358 35.9821,-80.8318 36.0052,-80.8266 36.0281,-80.8227 36.0491,-80.8189 36.0791,-80.8156 36.1096,-80.8135 36.1325,-80.8136 36.1513,-80.8149 36.1731,-80.8143 36.1938,-80.8091 36.2092,-80.8125 36.2268,-80.8181 36.2432,-80.8226 36.2601,-80.8225 36.2794,-80.8189 36.291,-80.813 36.3014,-80.806 36.3114,-80.7989 36.3218,-80.7941 36.3354,-80.794 36.3495,-80.7951 36.3637,-80.7944 36.3776,-80.7906 36.3891,-80.7851 36.4,-80.7797 36.4109,-80.776 36.4222,-80.7681 36.4479,-80.7575 36.4731,-80.7481 36.4974,-80.7438 36.5203,-80.7431 36.5485,-80.7425 36.559)
+LINESTRING(-89.1868 37.0976,-89.1884 37.0907,-89.1897 37.08,-89.1906 37.0691,-89.1909 37.0618,-89.1944 37.0586,-89.1979 37.0554,-89.1999 37.0465,-89.2019 37.0375,-89.2045 37.0273,-89.2064 37.0216,-89.2084 37.0195)
+LINESTRING(-86.4313 36.9139,-86.4425 36.8952,-86.4535 36.8744,-86.4628 36.853,-86.4688 36.8329,-86.4699 36.8238,-86.4703 36.8144,-86.4708 36.8051,-86.4724 36.7961,-86.486 36.7667,-86.5118 36.7238,-86.5416 36.683,-86.567 36.6597,-86.5688 36.6554,-86.571 36.6511,-86.5731 36.6467,-86.5746 36.6427)
+LINESTRING(-121.565 37.7428,-121.539 37.723,-121.488 37.6911,-121.434 37.6587,-121.399 37.6376,-121.353 37.6055,-121.285 37.5561,-121.22 37.5054,-121.181 37.4694,-121.136 37.3906,-121.108 37.3088,-121.085 37.231,-121.055 37.1642,-121.018 37.1139,-120.978 37.0655,-120.935 37.0187,-120.89 36.973,-120.868 36.9532,-120.846 36.9338,-120.825 36.9139,-120.805 36.8928,-120.757 36.8263,-120.706 36.7489,-120.654 36.6741,-120.604 36.6155,-120.572 36.5894,-120.536 36.5651,-120.5 36.5408,-120.467 36.5151,-120.447 36.4957,-120.429 36.4742,-120.411 36.4522,-120.393 36.4313,-120.362 36.3966,-120.33 36.362,-120.299 36.3274,-120.268 36.2925,-120.261 36.2828,-120.255 36.2721,-120.25 36.2611,-120.244 36.2509,-120.214 36.2046,-120.181 36.1591,-120.144 36.1157,-120.103 36.0757,-120.07 36.052,-120.028 36.026,-119.982 35.9967,-119.939 35.963,-119.908 35.9333,-119.877 35.9024,-119.846 35.8711,-119.817 35.84,-119.773 35.786,-119.733 35.7292,-119.694 35.6719,-119.651 35.6166)
+LINESTRING(-93.2406 37.2461,-93.2049 37.2492,-93.1758 37.256,-93.1478 37.2644,-93.1154 37.2721,-93.1001 37.274,-93.0848 37.2746,-93.0695 37.2753,-93.0541 37.2774,-93.0289 37.2945,-93.0082 37.2997,-92.9906 37.3005,-92.9745 37.3045,-92.9631 37.3113,-92.9476 37.3216,-92.9343 37.3308,-92.9209 37.3401,-92.8964 37.3734,-92.8725 37.4282,-92.8495 37.487,-92.8279 37.5326,-92.8006 37.563,-92.7741 37.5738,-92.7455 37.5818,-92.7121 37.6035,-92.6789 37.6358,-92.6472 37.6685,-92.6159 37.7015,-92.5838 37.7347,-92.5558 37.7549,-92.5294 37.7604,-92.5006 37.7597,-92.4657 37.7615,-92.4533 37.764,-92.4413 37.7674,-92.4292 37.7708,-92.4168 37.7732,-92.3928 37.7749,-92.3691 37.775,-92.3454 37.7755,-92.3213 37.7786,-92.309 37.7808,-92.2967 37.7829,-92.2844 37.7853,-92.2723 37.7884,-92.2524 37.7957,-92.2319 37.8043,-92.2114 37.8124,-92.1913 37.8182,-92.1805 37.82,-92.1709 37.824,-92.1548 37.8239,-92.1341 37.825,-92.1135 37.8274,-92.098 37.8311,-92.0477 37.8484,-92.0155 37.8631,-91.9984 37.8733,-91.983 37.8848,-91.9726 37.8925,-91.9622 37.9001,-91.9518 37.9078,-91.9434 37.9128,-91.9349 37.9177,-91.9271 37.9217,-91.9196 37.9244,-91.9048 37.9301,-91.8895 37.9375,-91.8737 37.9437,-91.8575 37.9459,-91.8438 37.9505,-91.8176 37.9645,-91.7902 37.9815,-91.7727 37.9951,-91.7339 37.9964,-91.6964 38.0039,-91.6604 38.0155,-91.6263 38.0295,-91.6181 38.0338,-91.6103 38.0386,-91.6022 38.0431,-91.5928 38.0465,-91.5805 38.0479,-91.5682 38.0495,-91.5608 38.0522,-91.5465 38.0593,-91.5388 38.0619,-91.5237 38.0642,-91.508 38.065,-91.4925 38.066,-91.4779 38.0687,-91.445 38.0832,-91.4007 38.1073,-91.3563 38.1326,-91.3234 38.1502,-91.3133 38.1546,-91.3027 38.1585,-91.2921 38.1625,-91.2822 38.1671,-91.2572 38.1821,-91.2296 38.2016,-91.2029 38.2223,-91.1808 38.2408,-91.1719 38.2509,-91.1646 38.262,-91.1564 38.2724,-91.1449 38.2808,-91.1412 38.2901,-91.1392 38.2997,-91.1299 38.3088,-91.1262 38.3139,-91.123 38.3191,-91.1107 38.3223,-91.0982 38.3241,-91.0858 38.3257,-91.0736 38.328,-91.0616 38.3345,-91.05 38.3446,-91.0352 38.3542,-91.0137 38.3592,-90.9993 38.3719,-90.9794 38.3849,-90.9622 38.3969,-90.9557 38.4068,-90.9478 38.4114,-90.9378 38.4153,-90.9292 38.4196,-90.9257 38.4258,-90.9142 38.4337,-90.8981 38.4406,-90.879 38.4517,-90.8588 38.4725,-90.8646 38.4642,-90.8446 38.486,-90.8194 38.5014,-90.7894 38.5097,-90.7552 38.5105,-90.7453 38.5086,-90.7353 38.5068,-90.7254 38.5049,-90.7154 38.503,-90.6969 38.5048,-90.6812 38.511,-90.6655 38.5172,-90.647 38.519,-90.6262 38.5143,-90.6091 38.5066,-90.5921 38.4989,-90.5713 38.4943,-90.5354 38.4983,-90.505 38.5113,-90.4747 38.5244,-90.4388 38.5283,-90.4314 38.5276,-90.424 38.5269,-90.4166 38.5263,-90.4092 38.5256,-90.4 38.5266,-90.3859 38.5354,-90.3775 38.5397,-90.3573 38.5489,-90.3413 38.5593,-90.3262 38.5707,-90.3089 38.5833,-90.2942 38.5919,-90.2795 38.5981,-90.2647 38.6025,-90.2495 38.6058,-90.2372 38.6095,-90.224 38.6152,-90.2103 38.6212,-90.1962 38.6256)
+LINESTRING(-87.4591 36.707,-87.5252 36.751,-87.5877 36.7948,-87.6496 36.8397,-87.7139 36.887,-87.7444 36.9088,-87.7951 36.9439,-87.8455 36.9763,-87.8749 36.99,-87.906 36.9954,-87.9337 37.0112,-87.9561 37.0297,-87.971 37.0431,-87.9923 37.059,-88.0124 37.0739,-88.0293 37.0888,-88.0409 37.1051)
+LINESTRING(-114.9 36.3922,-114.878 36.4033,-114.851 36.4166,-114.823 36.4327,-114.795 36.4527,-114.777 36.4673,-114.759 36.4816,-114.74 36.4958,-114.723 36.5105,-114.716 36.5195,-114.711 36.5309,-114.706 36.5421,-114.699 36.5503,-114.688 36.5567,-114.677 36.5628,-114.666 36.569,-114.656 36.576,-114.637 36.5934,-114.618 36.6146,-114.598 36.6352,-114.576 36.6508,-114.565 36.6545,-114.547 36.6597,-114.528 36.6643,-114.518 36.6661,-114.512 36.6742,-114.506 36.6823,-114.5 36.6903,-114.494 36.6977,-114.485 36.7022,-114.474 36.712,-114.463 36.7226,-114.454 36.7299,-114.416 36.7461,-114.355 36.7676,-114.294 36.786,-114.252 36.7928,-114.244 36.7877,-114.237 36.7856,-114.229 36.7854,-114.219 36.7858,-114.189 36.788,-114.173 36.7929,-114.159 36.8015,-114.133 36.8144,-114.119 36.8193,-114.107 36.8223,-114.094 36.8249,-114.081 36.8284,-114.075 36.8315,-114.068 36.8349,-114.062 36.8381,-114.054 36.84,-114.049 36.8405)
+LINESTRING(-82.3701 36.3542,-82.3614 36.3388,-82.3565 36.3278,-82.3537 36.3223,-82.3505 36.3172,-82.3428 36.3082,-82.3342 36.2993,-82.3262 36.2902,-82.3203 36.2804,-82.3202 36.2599,-82.3306 36.2365,-82.3437 36.213,-82.352 36.1924,-82.3657 36.1818,-82.3805 36.17,-82.396 36.1593,-82.4121 36.1516,-82.4146 36.1353,-82.4252 36.13,-82.4363 36.1253,-82.4459 36.1196,-82.4516 36.111,-82.4664 36.102,-82.4777 36.0932,-82.4881 36.0837,-82.5001 36.0725,-82.5051 36.072,-82.5102 36.0723,-82.5152 36.0725,-82.5201 36.0717,-82.5224 36.068,-82.5271 36.0622,-82.5358 36.0517,-82.5408 36.0496,-82.5442 36.0465,-82.547 36.0429,-82.5506 36.0394,-82.5512 36.0267,-82.559 36.017,-82.5552 36.0011,-82.5547 35.9864,-82.5562 35.9717,-82.5583 35.9561)
+LINESTRING(-82.5583 35.9561,-82.5583 35.9561)
+LINESTRING(-87.3366 36.6425,-87.3652 36.6647,-87.3918 36.6806,-87.4214 36.6936,-87.4591 36.707)
+LINESTRING(-82.2571 36.5963,-82.2622 36.5938,-82.3028 36.5684,-82.3361 36.5432,-82.3582 36.5405,-82.3821 36.5345,-82.4036 36.5251,-82.4189 36.5121,-82.4458 36.5025,-82.4881 36.4794,-82.5303 36.4538,-82.557 36.4363,-82.5659 36.429,-82.5739 36.4213,-82.5827 36.4139,-82.5938 36.4074,-82.6053 36.4039,-82.6189 36.4022,-82.6327 36.4022,-82.6449 36.4039,-82.6586 36.3946,-82.6708 36.3832,-82.6823 36.3711,-82.6937 36.3598,-82.7099 36.3576,-82.7268 36.3561,-82.7437 36.3556,-82.7602 36.3562,-82.8174 36.3278,-82.8728 36.2993,-82.9295 36.2725,-82.9902 36.2492,-83.015 36.2413,-83.0416 36.2333,-83.0683 36.2257,-83.0932 36.2193,-83.1309 36.2122,-83.1574 36.2089,-83.1825 36.2028,-83.2162 36.1868,-83.2281 36.1798,-83.2406 36.1723,-83.2534 36.1653,-83.2662 36.1598,-83.2806 36.153,-83.2951 36.1437,-83.3094 36.1338,-83.3234 36.1246,-83.3391 36.1128,-83.3542 36.0979,-83.3692 36.0826,-83.3846 36.0693)
+LINESTRING(-89.2084 37.0195,-89.2231 37.0037,-89.2589 36.9667,-89.2972 36.9284,-89.321 36.9068,-89.3823 36.9013,-89.4264 36.9007,-89.4728 36.8944,-89.5406 36.872)
+LINESTRING(-89.5406 36.872,-89.5454 36.9319,-89.5451 37.0274,-89.5427 37.1257,-89.5411 37.194,-89.5455 37.2065,-89.5555 37.2169,-89.5663 37.2272,-89.5729 37.2397,-89.5728 37.2477,-89.5714 37.2592,-89.5698 37.2697,-89.587 37.3122,-89.6074 37.3494,-89.6291 37.3861,-89.6509 37.4225,-89.6603 37.4413,-89.6684 37.4608,-89.677 37.4799,-89.688 37.4978,-89.7082 37.5223,-89.7298 37.5464,-89.7509 37.5708,-89.7697 37.5958,-89.8351 37.631,-89.8842 37.6891,-89.9247 37.7537,-89.9641 37.8086,-90.0019 37.8435,-90.0454 37.8755,-90.0915 37.9055,-90.1372 37.934,-90.1452 37.9387,-90.2151 37.9864,-90.2544 38.0265,-90.286 38.0708,-90.3328 38.1308,-90.3534 38.1445,-90.3848 38.1582)
+LINESTRING(-121.189 37.798,-121.185 37.784,-121.144 37.756,-121.103 37.7297,-121.064 37.7015,-121.028 37.6678,-121.027 37.6515,-121.016 37.6443,-121.006 37.6377,-120.999 37.63,-120.994 37.6192,-120.965 37.6036,-120.931 37.5768,-120.899 37.5471,-120.874 37.5232,-120.874 37.5102,-120.868 37.4963,-120.859 37.4839,-120.847 37.4754,-120.813 37.4568,-120.786 37.4344,-120.761 37.4104,-120.733 37.3869,-120.724 37.3866,-120.716 37.3889,-120.687 37.3778,-120.625 37.3554,-120.556 37.331,-120.509 37.3141,-120.504 37.3028,-120.494 37.299,-120.482 37.2948,-120.469 37.2921,-120.459 37.2928,-120.451 37.2882,-120.444 37.2834,-120.39 37.2427,-120.335 37.2012,-120.281 37.1586,-120.231 37.1148,-120.222 37.1039,-120.218 37.095,-120.216 37.0879,-120.213 37.0828,-120.185 37.0562,-120.154 37.0312,-120.121 37.007,-120.09 36.9823,-120.053 36.9489,-120.017 36.9142,-119.982 36.8797,-119.945 36.8469,-119.918 36.8282,-119.889 36.81,-119.86 36.791,-119.837 36.7702,-119.829 36.7591,-119.822 36.7479,-119.813 36.738,-119.799 36.7308,-119.743 36.6791,-119.7 36.642,-119.657 36.6048,-119.617 36.5665,-119.605 36.554,-119.593 36.5411,-119.581 36.5284,-119.568 36.5162,-119.555 36.5065,-119.541 36.4979,-119.527 36.4894,-119.515 36.4804,-119.487 36.4476,-119.464 36.4085,-119.441 36.3683,-119.417 36.3321,-119.412 36.3309,-119.408 36.3293,-119.398 36.3257,-119.383 36.2997,-119.365 36.2745,-119.347 36.2492,-119.331 36.2231,-119.326 36.2052,-119.327 36.1875,-119.33 36.17,-119.33 36.1528,-119.324 36.112,-119.315 36.0703,-119.305 36.0287,-119.295 35.9881,-119.283 35.9386,-119.271 35.8891,-119.259 35.8396,-119.249 35.7898,-119.263 35.7771,-119.247 35.7345,-119.235 35.6906,-119.226 35.6462,-119.219 35.6018)
+LINESTRING(-88.3368 36.9912,-88.3386 36.9852,-88.3414 36.9791,-88.3441 36.9732,-88.3457 36.9678,-88.3488 36.9469,-88.3519 36.926,-88.3546 36.9051,-88.3563 36.8841,-88.3775 36.8629,-88.4067 36.8488,-88.4379 36.8381,-88.4652 36.8271,-88.4739 36.8215,-88.4821 36.815,-88.4902 36.8085,-88.4987 36.8026,-88.5247 36.7929,-88.5627 36.7837,-88.6019 36.7764,-88.6314 36.772,-88.6345 36.7705,-88.6376 36.7687)
+LINESTRING(-93.2446 37.1218,-93.2449 37.1516,-93.2471 37.185,-93.247 37.2178,-93.2406 37.2461)
+LINESTRING(-114.9 36.3922,-114.933 36.3476,-114.974 36.3129,-115.021 36.2858,-115.071 36.2644,-115.091 36.2516,-115.118 36.229,-115.143 36.2051,-115.158 36.1887,-115.165 36.1739)
+LINESTRING(-115.165 36.1739,-115.172 36.1736,-115.195 36.1735,-115.217 36.1736,-115.24 36.1738,-115.24 36.1931,-115.241 36.2124,-115.241 36.2316,-115.241 36.2509)
+LINESTRING(-79.7798 35.4681,-79.7664 35.4265,-79.7444 35.3517,-79.7268 35.2775,-79.7265 35.2379)
+LINESTRING(-83.3846 36.0693,-83.4065 36.0554,-83.4305 36.0415,-83.4555 36.0291,-83.4802 36.0196,-83.4939 36.0171,-83.5081 36.0162,-83.5221 36.015,-83.5351 36.0112,-83.5598 35.999,-83.5783 35.9908,-83.5989 35.9863,-83.6297 35.985,-83.6326 35.9855,-83.6354 35.986,-83.6474 35.9901,-83.6603 35.9947,-83.6732 35.9988,-83.6855 36.0015,-83.6902 36.0017,-83.6948 36.0019,-83.6995 36.002,-83.7041 36.0022,-83.7206 36.0022,-83.7373 36.0017,-83.7539 36.0014,-83.7703 36.0022,-83.7919 36.0052,-83.8142 36.0087,-83.8366 36.0116,-83.8583 36.0126,-83.8717 36.0055,-83.8867 35.9987,-83.902 35.992,-83.9164 35.9849,-83.9168 35.9812,-83.9178 35.9766,-83.9196 35.9723,-83.9225 35.9696,-83.9259 35.9699,-83.9293 35.9702,-83.9447 35.9668)
+LINESTRING(-84.1028 36.5935,-84.1028 36.5934,-84.1081 36.5883,-84.1123 36.5824,-84.1162 36.5764,-84.1207 36.5708,-84.1473 36.545,-84.1784 36.5156,-84.2099 36.4875,-84.2378 36.4656,-84.2475 36.4587,-84.2579 36.4516,-84.2686 36.445,-84.2796 36.4397,-84.288 36.4365,-84.2947 36.4315,-84.2839 36.416,-84.2702 36.4047,-84.2555 36.3939,-84.2415 36.3799,-84.2341 36.3633,-84.2332 36.3464,-84.2337 36.3297,-84.2305 36.3135,-84.2253 36.3066,-84.22 36.2997,-84.2188 36.2949,-84.2184 36.2895,-84.218 36.284,-84.2171 36.2788,-84.2114 36.2748,-84.2048 36.2715,-84.1978 36.2686,-84.1911 36.2657,-84.1756 36.2481,-84.1454 36.2201,-84.1136 36.1921,-84.093 36.1748,-84.0786 36.1649,-84.0632 36.1559,-84.048 36.1467,-84.0341 36.1362,-84.0331 36.1226,-84.0278 36.1125,-84.0201 36.1036,-84.0119 36.0932,-84.014 36.0873,-84.0162 36.0815,-84.0116 36.0703,-84.0077 36.0487,-84.0064 36.0264,-84.0095 36.0129,-84.0057 36.0056,-83.9946 35.9997,-83.9842 35.9933,-83.9739 35.987,-83.9631 35.9813,-83.9544 35.975,-83.9464 35.9708,-83.9447 35.9668)
+LINESTRING(-93.2406 37.2461,-93.2493 37.2466,-93.258 37.2471,-93.2666 37.2473,-93.2753 37.2472,-93.336 37.2442,-93.356 37.2386,-93.3678 37.2279,-93.4038 37.2096,-93.4278 37.2019,-93.4538 37.1957,-93.4802 37.1902,-93.5052 37.1848,-93.5501 37.1798,-93.5956 37.1804,-93.6405 37.1779,-93.6833 37.1632,-93.7086 37.1486,-93.7512 37.1243,-93.7938 37.1008,-93.8194 37.0888,-93.8386 37.0853,-93.8527 37.0841,-93.8667 37.0815,-93.8855 37.074,-94.0024 37.0754,-94.119 37.0774,-94.2357 37.0797,-94.3524 37.0818,-94.3815 37.076,-94.4139 37.0623,-94.4476 37.0473,-94.4805 37.0376)
+LINESTRING(-83.0379 35.7866,-83.0359 35.7864,-83.0353 35.7863)
+LINESTRING(-83.3846 36.0693,-83.3608 36.0553,-83.3384 36.0431,-83.3233 36.0358,-83.3171 36.0316,-83.3123 36.0257,-83.3081 36.0163,-83.3061 36.0074,-83.3051 35.9982,-83.3034 35.988,-83.3015 35.9802,-83.2987 35.9729,-83.2939 35.9673,-83.286 35.9641,-83.2577 35.9595,-83.2185 35.9488,-83.1868 35.9307,-83.1645 35.9057,-83.1537 35.874,-83.1494 35.856,-83.1412 35.8408,-83.1285 35.8279,-83.1107 35.8166,-83.094 35.8072,-83.079 35.799,-83.0633 35.7922,-83.0443 35.7875,-83.0379 35.7866)
+LINESTRING(-83.0353 35.7863,-83.021 35.7853,-83.0126 35.7842,-82.9968 35.7783,-82.9922 35.7738)
+LINESTRING(-94.4805 37.0376,-94.4879 37.0377,-94.4953 37.0369,-94.5025 37.0357,-94.5098 37.0344,-94.5281 37.0275,-94.5416 37.0171,-94.5555 37.0067,-94.5751 36.9997,-94.5848 36.999,-94.5953 36.9993,-94.6059 36.9997,-94.616 36.9995,-94.6188 36.9975)
+LINESTRING(-97.3108 37.6086,-97.3131 37.605,-97.3158 37.6013,-97.319 37.5979,-97.3227 37.5951,-97.3268 37.5339,-97.3257 37.4707,-97.3214 37.4076,-97.3162 37.3466,-97.3184 37.3416,-97.324 37.3361,-97.3304 37.3308,-97.335 37.3264,-97.3372 37.3172,-97.3378 37.3019,-97.3376 37.2861,-97.3376 37.2756,-97.3385 37.248,-97.3389 37.2206,-97.3388 37.1932,-97.3387 37.1659,-97.3379 37.1286,-97.3369 37.0908)
+LINESTRING(-88.8909 36.5241,-88.8841 36.5235,-88.8762 36.5238,-88.8686 36.5251,-88.8624 36.5276,-88.8593 36.5304,-88.8495 36.5414,-88.8433 36.5524,-88.8383 36.564,-88.8325 36.5765,-88.8153 36.5987,-88.7932 36.6179,-88.7713 36.6368,-88.7546 36.6581,-88.752 36.6645,-88.7483 36.6746,-88.7445 36.6843,-88.7417 36.6897,-88.7293 36.7,-88.7155 36.7098,-88.7013 36.7194,-88.6876 36.7288,-88.6828 36.7294,-88.6779 36.73,-88.6731 36.7306,-88.6682 36.7311,-88.6636 36.7432,-88.6604 36.7529,-88.6534 36.7611,-88.6376 36.7687)
+LINESTRING(-119.219 35.6018,-119.213 35.5923,-119.198 35.5873,-119.193 35.5603,-119.184 35.5355,-119.169 35.5131,-119.148 35.4932,-119.129 35.4776,-119.107 35.4604,-119.084 35.4441,-119.061 35.4316,-119.058 35.4251,-119.055 35.4183,-119.053 35.4118,-119.048 35.4057,-119.046 35.3923,-119.043 35.3786,-119.041 35.365,-119.041 35.3508)
+LINESTRING(-104.763 37.626,-104.761 37.6214,-104.758 37.6159,-104.755 37.6108,-104.752 37.6073,-104.752 37.6046,-104.735 37.5844,-104.721 37.5614,-104.708 37.5384,-104.692 37.5183,-104.656 37.4784,-104.623 37.432,-104.594 37.3836,-104.567 37.3374,-104.563 37.3296,-104.559 37.3219,-104.555 37.3141,-104.55 37.3068,-104.539 37.2959,-104.523 37.2844,-104.509 37.2728,-104.501 37.2613,-104.498 37.2424,-104.498 37.2246,-104.5 37.2069,-104.502 37.188,-104.503 37.1842,-104.503 37.1804,-104.504 37.1764,-104.503 37.1729,-104.501 37.1693,-104.506 37.1608,-104.511 37.1523,-104.516 37.1441,-104.522 37.136,-104.523 37.1114,-104.521 37.0838,-104.515 37.0574,-104.503 37.0364,-104.5 37.0355,-104.497 37.0345,-104.494 37.0313,-104.493 37.0277,-104.486 37.027,-104.481 37.0241,-104.477 37.0216,-104.474 37.018,-104.472 37.0143,-104.475 36.9934)
+LINESTRING(-86.5746 36.6427,-86.5747 36.6424,-86.577 36.6348,-86.5795 36.6276,-86.5825 36.6206,-86.5865 36.6133,-86.5992 36.5952,-86.6139 36.578,-86.6285 36.5606,-86.6409 36.5421,-86.6498 36.5261,-86.6587 36.5101,-86.6678 36.4924,-86.673 36.4793,-86.6741 36.4761,-86.6753 36.4728,-86.6769 36.4689,-86.678 36.4666,-86.6826 36.4627,-86.6883 36.4593,-86.6941 36.4557,-86.6985 36.4515,-86.7054 36.4396,-86.7133 36.4231,-86.7204 36.4065,-86.7248 36.3942,-86.7393 36.3809,-86.7484 36.3701,-86.7539 36.3579,-86.7579 36.3407,-86.7596 36.3259,-86.7598 36.313,-86.76 36.3002,-86.7617 36.2853,-86.7652 36.276,-86.7719 36.2644,-86.7801 36.2541,-86.7875 36.249)
+LINESTRING(-86.7875 36.249,-86.7954 36.2627,-86.8035 36.2768,-86.8117 36.2918,-86.8182 36.3056,-86.8347 36.3112,-86.8517 36.3161,-86.8686 36.321,-86.8846 36.3265,-86.9006 36.3338,-86.9158 36.3423,-86.9306 36.3511,-86.9456 36.3591,-86.9961 36.3855,-87.0418 36.4129,-87.0861 36.4419,-87.1324 36.4727,-87.1511 36.4831,-87.1747 36.4947,-87.1971 36.5061,-87.2127 36.5164,-87.2201 36.5228,-87.2282 36.5297,-87.236 36.5366,-87.2423 36.5433,-87.2451 36.5506,-87.2462 36.5548,-87.2576 36.5724,-87.2689 36.5877,-87.2812 36.6026,-87.2939 36.6153,-87.3042 36.6227,-87.3154 36.6291,-87.3266 36.6354,-87.3366 36.6425,-87.3366 36.6425)
+LINESTRING(-115.165 36.1739,-115.149 36.1743,-115.136 36.1734,-115.122 36.171,-115.108 36.1686,-115.094 36.1673,-115.092 36.1658,-115.089 36.1635,-115.087 36.1608,-115.085 36.1585,-115.085 36.1518,-115.084 36.1451,-115.084 36.1384,-115.084 36.1317,-115.081 36.12,-115.076 36.1052,-115.07 36.0909,-115.065 36.081,-115.061 36.0764,-115.057 36.0727,-115.051 36.0695,-115.045 36.0665,-115.022 36.0507,-115 36.0328,-114.978 36.0149,-114.955 35.9992,-114.951 35.998,-114.946 35.9973,-114.941 35.9971,-114.937 35.997,-114.934 35.9952,-114.932 35.9933)
+LINESTRING(-83.9447 35.9668,-83.954 35.9648,-84.0127 35.9511,-84.0791 35.9352,-84.127 35.9231,-84.1537 35.914,-84.1911 35.8993,-84.2281 35.8835,-84.2539 35.871)
+LINESTRING(-80.3373 35.7951,-80.3754 35.7764,-80.4132 35.7633,-80.4434 35.7461,-80.461 35.7176,-80.4635 35.6964,-80.4629 35.6765,-80.4651 35.6587,-80.4758 35.6436,-80.4789 35.6399,-80.5042 35.6209,-80.5283 35.5995,-80.5493 35.5756,-80.5653 35.5491,-80.5703 35.5344,-80.5702 35.5248,-80.5684 35.5157,-80.5683 35.5024,-80.5723 35.4926,-80.5806 35.4766,-80.5945 35.4514,-80.6034 35.4478,-80.6124 35.4452,-80.6215 35.4428,-80.6305 35.4399,-80.644 35.4379,-80.664 35.428,-80.6841 35.4159,-80.698 35.4073,-80.7119 35.382,-80.7371 35.3437,-80.7638 35.3075,-80.7825 35.2883,-80.7975 35.2824,-80.8158 35.2775,-80.8348 35.2742,-80.8516 35.2733)
+LINESTRING(-80.8516 35.2733,-80.8545 35.2729)
+LINESTRING(-80.8435 35.8106,-80.8441 35.7891,-80.843 35.7698,-80.8401 35.7508,-80.8352 35.73,-80.8276 35.6984,-80.8238 35.6734,-80.8216 35.6484,-80.8191 35.6166,-80.8168 35.5942,-80.815 35.5708,-80.815 35.5474,-80.8184 35.5252,-80.821 35.5154,-80.8235 35.5055,-80.8261 35.4956,-80.8287 35.4857,-80.8316 35.4655,-80.8327 35.4413,-80.8338 35.4171,-80.8367 35.3968,-80.8414 35.3643,-80.8461 35.3319,-80.8507 35.2994,-80.8545 35.2729)
+LINESTRING(-97.3369 37.0908,-97.3371 37.0531,-97.3399 37.0159,-97.3422 36.9999)
+LINESTRING(-89.0027 36.4441,-88.9893 36.4501,-88.9652 36.4625,-88.9458 36.4729,-88.9264 36.4832,-88.9159 36.4928,-88.8976 36.51,-88.8909 36.5241)
+LINESTRING(-82.6087 35.5567,-82.5969 35.5563,-82.5856 35.5578,-82.5745 35.5597,-82.563 35.5604,-82.5507 35.5592,-82.5383 35.5572,-82.5259 35.556,-82.5137 35.5569,-82.4967 35.5625,-82.4799 35.5705,-82.4629 35.5788,-82.4456 35.5851,-82.41 35.5911,-82.3695 35.5959,-82.3313 35.6047,-82.3025 35.6225,-82.2901 35.6247,-82.2751 35.6268,-82.2608 35.6265,-82.2508 35.6215,-82.2418 35.6235,-82.2328 35.6255,-82.2165 35.6273,-82.2007 35.6266,-82.1851 35.6258,-82.169 35.6268,-82.1567 35.6312,-82.1438 35.6355,-82.1282 35.6364,-82.1126 35.6358,-82.097 35.6349,-82.0815 35.6352,-82.0719 35.6374,-82.063 35.6412,-82.0543 35.6448,-82.0451 35.6467,-82.0365 35.6438,-82.0244 35.6368,-82.0125 35.6293,-82.0045 35.625,-81.984 35.63,-81.969 35.639,-81.9571 35.6511,-81.946 35.6651,-81.9276 35.6687,-81.9094 35.6754,-81.8912 35.682,-81.8729 35.6853,-81.8327 35.6818,-81.8163 35.6746,-81.8016 35.6739,-81.7667 35.69,-81.729 35.6885,-81.6976 35.6907,-81.6668 35.6948,-81.6309 35.6987,-81.602 35.7005,-81.5707 35.7028,-81.5404 35.7073,-81.5144 35.7159,-81.4711 35.7008,-81.4415 35.6921,-81.4095 35.6893,-81.3587 35.6922,-81.3492 35.6929,-81.3387 35.6939,-81.3285 35.6957,-81.3198 35.6991,-81.3063 35.6972,-81.2934 35.6937,-81.2803 35.6903,-81.2658 35.6888,-81.2504 35.6906,-81.2376 35.6946,-81.2255 35.6991,-81.2118 35.7024,-81.1844 35.7079,-81.1572 35.7155,-81.1303 35.7239,-81.1033 35.7319,-81.0677 35.7442,-81.0248 35.7619,-80.9804 35.7806,-80.9403 35.7959,-80.9175 35.8011,-80.8917 35.8042,-80.866 35.8069,-80.8435 35.8106)
+LINESTRING(-82.5319 35.7994,-82.5332 35.7955,-82.5354 35.791,-82.5382 35.7867,-82.5416 35.7837,-82.5412 35.7576,-82.5563 35.7283,-82.5748 35.6992,-82.5849 35.6739,-82.5833 35.6591,-82.5785 35.6357,-82.5728 35.6119,-82.5681 35.5957,-82.5705 35.5938,-82.5728 35.592,-82.5752 35.5901,-82.5775 35.5882,-82.5792 35.588,-82.5809 35.5877,-82.5826 35.5874,-82.5843 35.5872,-82.5858 35.5809,-82.5884 35.5737,-82.592 35.5668,-82.5964 35.5615,-82.5996 35.5605,-82.6029 35.5596,-82.6059 35.5583,-82.6087 35.5567)
+LINESTRING(-86.7861 36.1639,-86.786 36.2301,-86.7875 36.2356,-86.7868 36.2396,-86.7862 36.2435,-86.7875 36.249)
+LINESTRING(-80.8516 35.2733,-80.8524 35.2582,-80.8551 35.2444,-80.8592 35.2317,-80.864 35.2201)
+LINESTRING(-86.7278 36.1476,-86.7552 36.1512,-86.7861 36.1639)
+LINESTRING(-84.2539 35.871,-84.2659 35.8693,-84.2791 35.8632,-84.2924 35.8566,-84.3044 35.853,-84.3163 35.8546,-84.3279 35.8594,-84.3394 35.8651,-84.3511 35.8696,-84.3608 35.8671,-84.3777 35.8599,-84.3952 35.8516,-84.4067 35.8458,-84.4312 35.8533,-84.4564 35.8618,-84.4817 35.87,-84.5064 35.8767,-84.5128 35.8823,-84.5193 35.8877,-84.5262 35.8929,-84.5332 35.8979,-84.5409 35.8987,-84.5486 35.8995,-84.5562 35.9003,-84.5639 35.901,-84.5819 35.9055,-84.5892 35.9102,-84.6016 35.9104,-84.6348 35.9014,-84.642 35.8999,-84.6493 35.899,-84.6565 35.898,-84.6633 35.8958,-84.6696 35.893,-84.6759 35.8901,-84.6822 35.8872,-84.6885 35.8843,-84.6957 35.8877,-84.7029 35.8911,-84.7101 35.8944,-84.7173 35.8978,-84.7466 35.8916,-84.762 35.8948,-84.7735 35.9005,-84.791 35.902,-84.7989 35.8988,-84.806 35.8934,-84.8142 35.8893,-84.8253 35.8898,-84.8402 35.8948,-84.8511 35.8982,-84.8624 35.9004,-84.8785 35.9012,-84.897 35.9136,-84.9118 35.9272,-84.9259 35.9411,-84.9425 35.954,-84.9546 35.9594,-84.9678 35.9623,-84.9813 35.9647,-84.994 35.9685,-85.0069 35.9743,-85.0222 35.9818,-85.0375 35.9899,-85.0503 35.9972,-85.0693 36.008,-85.0895 36.018,-85.1101 36.0275,-85.1301 36.0369,-85.1431 36.0382,-85.1558 36.0401,-85.1684 36.0424,-85.1813 36.0445,-85.2025 36.0582,-85.2236 36.0721,-85.2414 36.0874,-85.2529 36.1058,-85.2546 36.1082,-85.2562 36.1106,-85.2578 36.1131,-85.2595 36.1155,-85.2655 36.12,-85.27 36.1258,-85.2745 36.1319,-85.2808 36.1373,-85.2909 36.1389,-85.3013 36.1408,-85.3113 36.1413,-85.3205 36.1387,-85.3237 36.139,-85.327 36.1392,-85.3303 36.1394,-85.3335 36.1401,-85.3378 36.1388,-85.3421 36.1374,-85.3438 36.1351,-85.3468 36.1333,-85.3503 36.132,-85.3536 36.1311,-85.3564 36.1316,-85.3592 36.1321,-85.363 36.1347,-85.3674 36.1372,-85.3716 36.1397,-85.3745 36.1426,-85.3809 36.1439,-85.3873 36.1452,-85.3944 36.1463,-85.3996 36.1464,-85.4448 36.141,-85.4889 36.1392,-85.5333 36.14,-85.5791 36.1426,-85.6099 36.1428,-85.6328 36.1388,-85.6526 36.1309,-85.6743 36.1197,-85.6943 36.1135,-85.7134 36.1114,-85.7331 36.1122,-85.755 36.1148,-85.768 36.1165,-85.7793 36.1177,-85.7907 36.1189,-85.8037 36.1206,-85.8111 36.1216,-85.8186 36.1226,-85.826 36.1236,-85.8334 36.1247,-85.8486 36.1249,-85.862 36.1226,-85.8754 36.1203,-85.8906 36.1205,-85.9034 36.1253,-85.9129 36.1342,-85.9205 36.1453,-85.9275 36.1566,-85.9381 36.1671,-85.9515 36.1733,-85.9673 36.177,-85.9848 36.1795,-86.0002 36.1794,-86.0134 36.176,-86.0268 36.1718,-86.0422 36.1692,-86.0538 36.1699,-86.0639 36.1723,-86.0741 36.1749,-86.0858 36.1761,-86.0925 36.1753,-86.0981 36.1733,-86.1037 36.1711,-86.1104 36.1696,-86.1129 36.1697,-86.1154 36.1699,-86.1181 36.1702,-86.1207 36.1705,-86.1431 36.1761,-86.1622 36.1837,-86.1826 36.1906,-86.2087 36.1944,-86.2302 36.194,-86.2492 36.1913,-86.2676 36.1872,-86.2873 36.1824,-86.3112 36.1808,-86.3437 36.1821,-86.3781 36.184,-86.4076 36.1839,-86.4321 36.1821,-86.4586 36.1797,-86.4852 36.1765,-86.5095 36.1722,-86.517 36.1702,-86.5243 36.1679,-86.5318 36.1659,-86.5397 36.1648,-86.5568 36.1651,-86.5744 36.1665,-86.592 36.1671,-86.609 36.165,-86.6226 36.1611,-86.6346 36.1565,-86.6467 36.1518,-86.6604 36.1472,-86.6847 36.1463,-86.7187 36.1464,-86.7278 36.1476)
+LINESTRING(-104.475 36.9934,-104.475 36.993,-104.476 36.9787,-104.472 36.9636,-104.459 36.9402,-104.452 36.9368,-104.447 36.9317,-104.441 36.9263,-104.435 36.9217,-104.426 36.9186,-104.418 36.917,-104.412 36.9127,-104.408 36.9014,-104.411 36.8969,-104.414 36.892,-104.416 36.887,-104.418 36.8821)
+LINESTRING(-82.6087 35.5567,-82.6595 35.559,-82.7085 35.5544,-82.7572 35.5476,-82.8073 35.5435,-82.8126 35.5462,-82.8179 35.5489,-82.8233 35.5516,-82.8286 35.5544,-82.8519 35.5521,-82.875 35.5485,-82.898 35.5442,-82.9208 35.5399)
+LINESTRING(-82.9922 35.7738,-82.986 35.7678,-82.9806 35.7545,-82.9809 35.7399,-82.9831 35.7317,-82.9889 35.7123,-82.9911 35.7041,-82.9897 35.6974,-82.9829 35.6945,-82.9735 35.6923,-82.9643 35.6876,-82.9579 35.6793,-82.9559 35.6704,-82.9569 35.6608,-82.9592 35.6505,-82.9616 35.6382,-82.9632 35.6324,-82.966 35.6264,-82.9699 35.6212,-82.9723 35.6154,-82.9723 35.6047,-82.9678 35.5956,-82.9602 35.5871,-82.9508 35.5786,-82.9417 35.5691,-82.9345 35.5601,-82.9269 35.5513,-82.9208 35.5399)
+LINESTRING(-104.418 36.8821,-104.415 36.8629,-104.412 36.8433,-104.41 36.8242,-104.41 36.8069)
+LINESTRING(-80.864 35.2201,-80.8671 35.2127,-80.8709 35.2059,-80.8744 35.1998,-80.8773 35.1942,-80.882 35.1833,-80.8865 35.1718,-80.8914 35.1607,-80.8969 35.1508,-80.9127 35.1259,-80.9272 35.1007,-80.9275 35.1003)
+LINESTRING(-80.8545 35.2729,-80.8706 35.2706,-80.8836 35.2652,-80.8957 35.2591,-80.9118 35.2544,-80.9353 35.2544,-80.9604 35.2594,-80.9876 35.2652,-81.0168 35.2676,-81.0285 35.2691,-81.0389 35.2711,-81.0486 35.2733,-81.0585 35.2754,-81.072 35.2757,-81.0861 35.2735,-81.1005 35.2709,-81.1145 35.2704,-81.1209 35.2707,-81.1271 35.2715,-81.134 35.2731,-81.142 35.2745,-81.1492 35.2758,-81.1564 35.277,-81.1889 35.2805,-81.2259 35.279,-81.2615 35.2721,-81.2902 35.2593,-81.2989 35.2512,-81.3064 35.2418,-81.3143 35.2326,-81.3245 35.2253,-81.3524 35.2115,-81.3801 35.1972,-81.4076 35.1827,-81.435 35.1681)
+LINESTRING(-82.3994 35.2855,-82.4207 35.3104,-82.442 35.3395,-82.4622 35.3673,-82.4805 35.3883,-82.4915 35.3958,-82.5044 35.402,-82.5165 35.4081,-82.5248 35.415,-82.537 35.4363,-82.5455 35.4571,-82.5547 35.4778,-82.5688 35.4985,-82.5798 35.5104,-82.5941 35.5266,-82.6058 35.5433,-82.6087 35.5567)
+LINESTRING(-119.041 35.3508,-119.037 35.3199,-119.026 35.2637,-119.016 35.2088,-119.01 35.1822,-118.996 35.1425,-118.981 35.1026,-118.967 35.0625,-118.956 35.0222)
+LINESTRING(-119.651 35.6166,-119.644 35.6072,-119.637 35.5974,-119.63 35.5876,-119.622 35.5785,-119.584 35.5406,-119.543 35.5038,-119.498 35.4689,-119.453 35.4365,-119.402 35.4024,-119.349 35.3674,-119.298 35.3311,-119.251 35.2928,-119.178 35.2246,-119.106 35.1558,-119.032 35.0878,-118.956 35.0222)
+LINESTRING(-115.393 35.6114,-115.384 35.6367,-115.376 35.6629,-115.368 35.6892,-115.362 35.715,-115.36 35.7252,-115.36 35.7356,-115.358 35.7459,-115.355 35.7557,-115.313 35.8106,-115.262 35.8565,-115.213 35.9003,-115.181 35.949,-115.18 35.9743,-115.179 36.0219,-115.179 36.0711,-115.18 36.1014,-115.178 36.1229,-115.174 36.1463,-115.167 36.169,-115.165 36.1739)
+LINESTRING(-82.1709 35.1946,-82.1807 35.2044,-82.187 35.2144,-82.1928 35.2257,-82.1991 35.2366,-82.2067 35.2452,-82.2334 35.2532,-82.2708 35.2519,-82.31 35.2489,-82.342 35.2517,-82.356 35.258,-82.3715 35.2673,-82.3865 35.2772,-82.3994 35.2855)
+LINESTRING(-78.4818 35.3644,-78.5052 35.3522,-78.5134 35.3423,-78.5177 35.331,-78.5286 35.3142,-78.5373 35.3056,-78.5472 35.2979,-78.5571 35.2902,-78.5661 35.2819,-78.5801 35.2645,-78.5929 35.2461,-78.6059 35.228,-78.6206 35.2112,-78.6566 35.1793,-78.6958 35.1473,-78.7337 35.1142,-78.7652 35.0792,-78.7744 35.0631,-78.7881 35.037,-78.8016 35.0114,-78.8103 34.997,-78.841 34.9748,-78.8783 34.9591,-78.9154 34.9437,-78.9455 34.9221,-78.9512 34.9135,-78.9562 34.9025,-78.9602 34.892,-78.9641 34.8816,-78.985 34.82,-78.9942 34.7712,-78.9995 34.7233,-79.0088 34.6646,-79.0223 34.6415,-79.0471 34.6254,-79.0767 34.6132,-79.1045 34.6018)
+LINESTRING(-89.5406 36.872,-89.54 36.8403,-89.5401 36.8086,-89.5402 36.777,-89.5399 36.7454,-89.5391 36.6891,-89.5431 36.6531,-89.5563 36.6189,-89.583 36.5677,-89.5896 36.5537,-89.5964 36.5378,-89.6032 36.5225,-89.6098 36.5103,-89.6314 36.4842,-89.6568 36.4592,-89.6809 36.4334,-89.6985 36.4048,-89.7048 36.3793,-89.7058 36.3527,-89.7054 36.326,-89.7076 36.2998,-89.7133 36.2807,-89.7191 36.2615,-89.7273 36.2355,-89.7321 36.2219,-89.7359 36.2169,-89.7408 36.212,-89.7458 36.2071,-89.75 36.2019)
+LINESTRING(-119.041 35.3508,-119.009 35.351,-118.977 35.3512,-118.946 35.3514,-118.914 35.3516,-118.892 35.3485,-118.858 35.3413,-118.824 35.3328,-118.802 35.326,-118.792 35.3196,-118.784 35.3116,-118.775 35.3036,-118.766 35.2972,-118.744 35.2882,-118.721 35.2807,-118.697 35.2744,-118.673 35.2693,-118.664 35.2674,-118.655 35.2656,-118.63 35.2602,-118.608 35.2534,-118.588 35.2427,-118.571 35.2259,-118.562 35.2226,-118.554 35.2171,-118.548 35.2166,-118.523 35.2,-118.501 35.1933,-118.481 35.1828,-118.462 35.155,-118.453 35.1457,-118.44 35.1406,-118.424 35.1371,-118.41 35.1328,-118.406 35.1275,-118.401 35.1223,-118.379 35.1165,-118.359 35.1126,-118.339 35.1099,-118.316 35.1078,-118.311 35.1032,-118.306 35.0986,-118.284 35.1031,-118.252 35.1116,-118.223 35.1189,-118.205 35.1198,-118.197 35.122,-118.183 35.1125,-118.174 35.0942,-118.169 35.0756)
+LINESTRING(-94.6188 36.9975,-94.6268 36.9918,-94.637 36.9827,-94.6482 36.9731,-94.6593 36.9635,-94.671 36.954,-94.683 36.9453,-94.7194 36.9312,-94.7693 36.918,-94.8166 36.9022,-94.8451 36.8802,-94.8613 36.8476,-94.8765 36.8144,-94.8913 36.781,-94.9065 36.748,-94.9101 36.7419,-94.9153 36.7355,-94.9216 36.7299,-94.9284 36.7261,-94.9551 36.7161,-94.9818 36.7061,-95.0084 36.6961,-95.0351 36.686,-95.0582 36.6771,-95.0817 36.6672,-95.1042 36.656,-95.1246 36.6436,-95.131 36.6387,-95.1371 36.6338,-95.1508 36.6249,-95.1628 36.6209,-95.1742 36.6166,-95.1881 36.6055,-95.2001 36.5914,-95.2103 36.5762,-95.2188 36.5617)
+LINESTRING(-118.169 35.0756,-118.168 35.0737,-118.168 35.0591,-118.163 35.0461)
+LINESTRING(-89.331 36.0905,-89.3094 36.1063,-89.2884 36.1212,-89.2686 36.1372,-89.2507 36.1562,-89.231 36.195,-89.2231 36.2354,-89.2183 36.2721,-89.2078 36.2999,-89.1971 36.3102,-89.1811 36.3225,-89.1643 36.3341,-89.1513 36.3427)
+LINESTRING(-78.4818 35.3644,-78.4632 35.3446,-78.4443 35.3245,-78.4253 35.3043,-78.4064 35.2842,-78.3985 35.2717,-78.3901 35.254,-78.3819 35.2373,-78.3744 35.2275,-78.3635 35.2221,-78.3519 35.2182,-78.34 35.2148,-78.3286 35.2109,-78.3025 35.199,-78.2778 35.1852,-78.2546 35.1697,-78.2331 35.1528,-78.1848 35.1032,-78.145 35.0491,-78.1086 34.9931,-78.0673 34.9351,-78.0599 34.9284,-78.0417 34.9002,-78.0224 34.8709,-78.0042 34.8412,-77.9895 34.8119,-77.9768 34.7726,-77.9671 34.7326,-77.9541 34.6934,-77.9315 34.6569,-77.9324 34.6505,-77.9333 34.6442,-77.9341 34.6378,-77.935 34.6315,-77.9272 34.6193,-77.9202 34.6046,-77.9144 34.5894,-77.9102 34.5761,-77.8899 34.4975,-77.8798 34.4399,-77.8767 34.3808,-77.8776 34.3058,-77.8777 34.2983,-77.8851 34.2887,-77.8889 34.2802,-77.892 34.2696,-77.8998 34.2559,-77.8758 34.2441)
+LINESTRING(-89.75 36.2019,-89.7209 36.1777,-89.6907 36.1549,-89.6594 36.133,-89.6336 36.1159)
+LINESTRING(-89.6336 36.1159,-89.6273 36.1117,-89.6215 36.1081,-89.6157 36.1044,-89.6101 36.1006,-89.6048 36.0961,-89.5616 36.0888,-89.5005 36.0782,-89.4404 36.0699,-89.4002 36.0695,-89.3829 36.0739,-89.3654 36.0793,-89.348 36.085,-89.331 36.0905)
+LINESTRING(-79.1045 34.6018,-79.1209 34.5886,-79.1337 34.583,-79.1481 34.5795,-79.169 34.5727,-79.1825 34.5659,-79.1959 34.5572,-79.2093 34.5483,-79.2229 34.5408,-79.2354 34.5368,-79.2495 34.5339,-79.2637 34.5309,-79.2766 34.5267,-79.2911 34.5193,-79.3063 34.5103,-79.3121 34.5068)
+LINESTRING(-81.435 35.1681,-81.435 35.1681,-81.4463 35.1636,-81.4573 35.1584,-81.4685 35.1602,-81.4935 35.1502,-81.5328 35.1345,-81.5704 35.1187,-81.5902 35.1083,-81.6042 35.1079,-81.6163 35.1052,-81.6282 35.1024,-81.6418 35.1017,-81.6501 35.0976,-81.6594 35.0954,-81.6692 35.0941,-81.6788 35.0928,-81.6898 35.0895,-81.7009 35.0844,-81.7123 35.079,-81.724 35.0749,-81.7363 35.0743,-81.7482 35.0734,-81.7596 35.0714,-81.7702 35.0678,-81.799 35.0544,-81.8215 35.0451,-81.8449 35.0372,-81.8764 35.028,-81.9094 35.0162,-81.9418 35.0013,-81.9735 34.9853,-82.0048 34.9702)
+LINESTRING(-82.0048 34.9702,-82.0193 34.9905,-82.0361 35.0213,-82.0507 35.0531,-82.0584 35.0764,-82.0738 35.0898,-82.0897 35.1134,-82.1053 35.1388,-82.1197 35.1576,-82.1348 35.1693,-82.1512 35.1797,-82.167 35.1908,-82.1709 35.1946)
+LINESTRING(-89.75 36.2019,-89.7521 36.198,-89.7542 36.1942,-89.7512 36.1781,-89.7498 36.1612,-89.7496 36.1443,-89.7504 36.1279,-89.7827 36.1036,-89.8241 36.0689,-89.8596 36.032,-89.8744 36.0014)
+LINESTRING(-97.3172 36.3949,-97.2535 36.3972,-97.1893 36.3956,-97.1252 36.3919,-97.0618 36.3884)
+LINESTRING(-97.3422 36.9999,-97.3432 36.9935,-97.3469 36.971,-97.3496 36.9483,-97.3502 36.9256,-97.3481 36.9114,-97.3442 36.8971,-97.3406 36.8831,-97.3393 36.8696,-97.3417 36.8152,-97.3442 36.7608,-97.3461 36.7064,-97.348 36.6519,-97.3494 36.631,-97.3515 36.608,-97.3524 36.5852,-97.3507 36.5646,-97.345 36.5436,-97.3371 36.5222,-97.3284 36.5008,-97.3205 36.4803,-97.3165 36.4602,-97.316 36.4378,-97.3169 36.4154,-97.3172 36.3949)
+LINESTRING(-116.986 34.9135,-116.978 34.9207,-116.905 34.9228,-116.839 34.9283,-116.773 34.9412,-116.707 34.9597,-116.676 34.9712,-116.646 34.9852,-116.615 34.9997,-116.585 35.0129,-116.558 35.0228,-116.53 35.032,-116.502 35.0413,-116.476 35.0517,-116.466 35.0571,-116.456 35.064,-116.446 35.0711,-116.437 35.0774,-116.406 35.0945,-116.387 35.1013,-116.365 35.1039,-116.33 35.1079,-116.318 35.1111,-116.308 35.1151,-116.297 35.1181,-116.281 35.1183,-116.246 35.1327,-116.212 35.148,-116.181 35.1663,-116.156 35.1898,-116.131 35.1977,-116.121 35.201,-116.114 35.2088,-116.098 35.2352,-116.091 35.2448,-116.088 35.251,-116.045 35.2805,-116.001 35.312,-115.956 35.3423,-115.91 35.3683,-115.845 35.3921,-115.736 35.4273,-115.633 35.4591,-115.586 35.473,-115.557 35.4719,-115.528 35.4689,-115.499 35.4648,-115.47 35.4604,-115.451 35.468,-115.433 35.5007,-115.418 35.5381,-115.405 35.5763,-115.393 35.6114,-115.393 35.6114)
+LINESTRING(-84.2539 35.871,-84.2604 35.8634,-84.2648 35.857,-84.2682 35.8506,-84.2721 35.8427,-84.2842 35.8313,-84.3021 35.8235,-84.3204 35.8158,-84.3336 35.8046,-84.3412 35.8014,-84.3488 35.7983,-84.3566 35.7955,-84.3645 35.7928,-84.3851 35.7666,-84.408 35.7431,-84.4318 35.7204,-84.4549 35.6964,-84.4955 35.6507,-84.5346 35.6074,-84.5743 35.5644,-84.6168 35.5198,-84.6592 35.4775,-84.7004 35.4363,-84.7383 35.393,-84.7705 35.345,-84.7808 35.3421,-84.791 35.3401,-84.8007 35.3372,-84.8096 35.3313,-84.8141 35.3247,-84.8183 35.3153,-84.8223 35.3054,-84.8259 35.2974,-84.8387 35.2725,-84.8529 35.2442,-84.8689 35.217,-84.8871 35.1951)
+LINESTRING(-97.0618 36.3884,-97.0282 36.3749,-97.0118 36.3577,-97.0012 36.3371,-96.9849 36.3136,-96.9697 36.2978,-96.9533 36.2821,-96.9363 36.2668,-96.9192 36.2521)
+LINESTRING(-117.008 34.8862,-117 34.8935,-116.993 34.9037,-116.986 34.9135)
+LINESTRING(-88.8569 35.662,-88.8288 35.6688,-88.8018 35.6732,-88.7745 35.6764,-88.7454 35.6796,-88.7113 35.6897,-88.6572 35.7097,-88.6033 35.7307,-88.5697 35.744,-88.5476 35.7503,-88.5218 35.7551,-88.4955 35.7596,-88.4718 35.7646,-88.4343 35.7753,-88.3971 35.7863,-88.3597 35.7966,-88.3216 35.8053,-88.3065 35.8082,-88.2919 35.8112,-88.2776 35.8149,-88.2631 35.8201,-88.2063 35.8153,-88.1569 35.8195,-88.1104 35.8332,-88.0626 35.8569,-88.0393 35.8668,-88.0151 35.871,-87.9896 35.8714,-87.9625 35.8695,-87.9548 35.8688,-87.9471 35.8681,-87.9394 35.8675,-87.9318 35.8668,-87.8961 35.8664,-87.8773 35.8713,-87.8639 35.8779,-87.8441 35.8827,-87.8103 35.8822,-87.7731 35.8774,-87.7361 35.8726,-87.7025 35.8721,-87.6904 35.8827,-87.6711 35.8894,-87.6506 35.8943,-87.6344 35.8998,-87.615 35.9113,-87.5958 35.9238,-87.5769 35.9366,-87.5582 35.949,-87.5531 35.9566,-87.5493 35.9621,-87.5393 35.9693,-87.5303 35.9714,-87.521 35.973,-87.5127 35.975,-87.4956 35.9832,-87.4783 35.9928,-87.4599 35.9986,-87.4397 35.9958,-87.409 36.0082,-87.3658 36.0182,-87.3206 36.0246,-87.2839 36.0262,-87.2742 36.0249,-87.2645 36.0226,-87.2549 36.0204,-87.2451 36.0193,-87.231 36.0213,-87.2179 36.0252,-87.2043 36.027,-87.1888 36.0231,-87.1554 36.0409,-87.1343 36.0609,-87.1104 36.0784,-87.0686 36.0886,-87.0359 36.0798,-87.0177 36.0759,-87.0006 36.0738,-86.9711 36.0705,-86.962 36.0741,-86.9347 36.089,-86.913 36.1051,-86.8916 36.1215,-86.8698 36.1367,-86.8569 36.1391,-86.8444 36.1428,-86.832 36.1467,-86.8193 36.1498,-86.8029 36.1585,-86.7916 36.1623,-86.7861 36.1639)
+LINESTRING(-95.9755 36.1612,-95.9528 36.163,-95.9299 36.1638,-95.9071 36.164,-95.8842 36.1643,-95.856 36.1644,-95.8169 36.1644,-95.7808 36.1649,-95.7621 36.1665,-95.7463 36.1752,-95.732 36.1862,-95.7185 36.1982,-95.7054 36.2098,-95.6532 36.2542,-95.5989 36.2953,-95.5384 36.3289,-95.4672 36.3505,-95.4396 36.3755,-95.4154 36.4043,-95.3904 36.4327,-95.3603 36.4567,-95.316 36.4844,-95.2836 36.5072,-95.2541 36.5311,-95.2188 36.5617)
+LINESTRING(-95.9246 36.2771,-95.9276 36.2549,-95.9342 36.2335,-95.9401 36.2122,-95.9407 36.1907,-95.9494 36.1833,-95.9581 36.1759,-95.9668 36.1686,-95.9755 36.1612)
+LINESTRING(-95.9864 36.1453,-95.9837 36.1492,-95.9755 36.1612)
+LINESTRING(-95.9755 36.1612,-95.9886 36.1619,-96.0012 36.1621,-96.0138 36.1615,-96.0269 36.1602,-96.0378 36.155,-96.0603 36.1476,-96.0848 36.1409,-96.1018 36.1375,-96.1144 36.1401,-96.1353 36.1465,-96.1556 36.1535,-96.166 36.1581,-96.1766 36.1553,-96.188 36.1532,-96.1996 36.1519,-96.2107 36.1515,-96.2166 36.1557,-96.2225 36.16,-96.2287 36.164,-96.2352 36.1675,-96.2393 36.1669,-96.2433 36.1663,-96.2473 36.1657,-96.2513 36.1651,-96.262 36.1786,-96.2726 36.1921,-96.2832 36.2055,-96.2944 36.2187,-96.3216 36.2197,-96.3487 36.221,-96.3754 36.2222,-96.4021 36.2234,-96.4504 36.2233,-96.4889 36.2202,-96.5265 36.2156,-96.5719 36.2111,-96.6298 36.2097,-96.7235 36.2101,-96.8155 36.2126,-96.8683 36.2181,-96.8808 36.2243,-96.8948 36.2337,-96.9083 36.2438,-96.9192 36.2521)
+LINESTRING(-96.9192 36.2521,-96.95 36.2229,-96.9835 36.194,-97.0209 36.1691,-97.0633 36.152)
+LINESTRING(-96.0082 36.1134,-96 36.1254,-95.9919 36.1373,-95.9864 36.1453)
+LINESTRING(-79.3121 34.5068,-79.3215 34.501,-79.3357 34.4925,-79.3701 34.451,-79.4242 34.4105,-79.4844 34.3738,-79.5371 34.3439,-79.5571 34.3353,-79.5797 34.3285,-79.6023 34.3215,-79.6222 34.3122,-79.6418 34.2995,-79.6571 34.2901,-79.6738 34.2821,-79.698 34.2736,-79.7119 34.2693,-79.7259 34.265,-79.7399 34.2608,-79.7538 34.2565,-79.7824 34.2446,-79.8051 34.2304,-79.8259 34.2142,-79.8481 34.1961)
+LINESTRING(-81.8723 34.5134,-81.8894 34.5369,-81.8929 34.5565,-81.8917 34.5762,-81.8945 34.6,-81.9008 34.6162,-81.9098 34.6327,-81.9197 34.6489,-81.9287 34.6643,-81.9299 34.6667,-81.931 34.6692,-81.9417 34.7023,-81.9474 34.7365,-81.952 34.7709,-81.959 34.8048,-81.9659 34.8226,-81.9752 34.8395,-81.985 34.8561,-81.9934 34.8731,-81.9962 34.8842,-81.9963 34.8959,-81.9952 34.9077,-81.994 34.919,-81.9936 34.9222,-81.9932 34.9253,-81.9932 34.9285,-81.9942 34.9317,-82.0024 34.9391,-82.0057 34.9493,-82.0059 34.9603,-82.0048 34.9702)
+LINESTRING(-82.0048 34.9702,-82.0176 34.9676,-82.0303 34.9656,-82.0428 34.9635,-82.0552 34.9611,-82.1155 34.9126,-82.1651 34.8926,-82.2162 34.8798,-82.2806 34.8531,-82.2834 34.8487,-82.2863 34.8444,-82.2892 34.84,-82.292 34.8357,-82.2957 34.8345,-82.2993 34.8333,-82.3029 34.8322,-82.3065 34.831,-82.3028 34.8289,-82.2992 34.8267,-82.2955 34.8246,-82.2918 34.8225,-82.2863 34.8065,-82.2839 34.7877,-82.2851 34.7689,-82.2906 34.753,-82.2736 34.7362,-82.2561 34.7175,-82.2376 34.7,-82.2174 34.687,-82.1934 34.6746,-82.1746 34.6627,-82.1599 34.6526,-82.1481 34.6455,-82.1406 34.6425,-82.1325 34.64,-82.1243 34.6376,-82.1166 34.6349,-82.0864 34.619,-82.0618 34.6003,-82.0395 34.5795,-82.0162 34.5572,-81.9904 34.5521,-81.9583 34.5412,-81.9269 34.5283,-81.9035 34.5168,-81.8959 34.5172,-81.8877 34.5165,-81.8796 34.5152,-81.8723 34.5134)
+LINESTRING(-96.0119 36.0106,-96.0116 36.0363,-96.0093 36.062,-96.0074 36.0877,-96.0082 36.1134)
+LINESTRING(-114.09 35.2076,-114.049 35.2222,-114.003 35.2196,-113.957 35.2089,-113.914 35.1997,-113.893 35.1981,-113.873 35.1976,-113.852 35.1968,-113.831 35.1942,-113.816 35.1897,-113.802 35.1836,-113.788 35.1775,-113.774 35.1729,-113.754 35.1691,-113.732 35.1658,-113.711 35.163,-113.691 35.1609)
+LINESTRING(-84.8871 35.1951,-84.9016 35.1892,-84.9186 35.1762,-84.9351 35.1616,-84.9479 35.1507,-84.9668 35.1456,-84.9995 35.1358,-85.0307 35.126,-85.045 35.1211,-85.0502 35.1139,-85.0545 35.1049,-85.0587 35.0966,-85.0634 35.0913,-85.0684 35.0892,-85.0738 35.088,-85.0794 35.0871,-85.0848 35.0861,-85.1087 35.0776,-85.1274 35.0665,-85.1442 35.0529,-85.1623 35.0367,-85.1741 35.0264,-85.1836 35.0191,-85.1939 35.0129,-85.2074 35.0049)
+LINESTRING(-85.1976 34.9867,-85.1981 34.9874,-85.2074 35.0049)
+LINESTRING(-86.7278 36.1476,-86.7302 36.1363,-86.7307 36.1297,-86.7303 36.1231,-86.729 36.1157,-86.7178 36.1013,-86.7059 36.0857,-86.6936 36.0705,-86.6812 36.057,-86.6694 36.0479,-86.6558 36.0399,-86.642 36.0319,-86.6297 36.0228,-86.62 36.0126,-86.6102 36.0025,-86.6025 35.9976,-86.5937 35.9941,-86.5852 35.9909,-86.5782 35.9872,-86.5542 35.9663,-86.5247 35.9374,-86.4942 35.9069,-86.4673 35.8816,-86.4411 35.8595,-86.4132 35.8357,-86.3872 35.8108,-86.3663 35.7853,-86.3606 35.7771,-86.3545 35.7688,-86.3487 35.7606,-86.3435 35.7522,-86.3323 35.7395,-86.3115 35.7122,-86.2912 35.684,-86.2814 35.6684,-86.2752 35.6621,-86.2625 35.6483,-86.2499 35.6342,-86.2439 35.6272,-86.2419 35.6213,-86.2402 35.6151,-86.2371 35.6027,-86.2361 35.5971,-86.2357 35.5913,-86.2345 35.5856,-86.1983 35.5564,-86.1522 35.5364,-86.1072 35.518,-86.0774 35.499,-86.0706 35.4913,-86.0345 35.4404,-85.9918 35.3935,-85.947 35.3478,-85.9043 35.3007,-85.8969 35.2907,-85.8905 35.2808,-85.8843 35.2706,-85.8773 35.2602,-85.8753 35.2489,-85.8753 35.2428,-85.8734 35.2371,-85.8582 35.243,-85.8489 35.2404,-85.8409 35.2374,-85.8331 35.2342,-85.8244 35.2311,-85.8212 35.2145,-85.8163 35.1973,-85.8071 35.1824,-85.7908 35.1725,-85.7784 35.1568,-85.7657 35.1406,-85.7537 35.1241,-85.7432 35.1075,-85.7389 35.0907,-85.7411 35.0801,-85.7356 35.0689,-85.708 35.0507)
+LINESTRING(-85.2074 35.0049,-85.2119 35.0012,-85.2182 34.9994,-85.2253 34.999,-85.233 34.9993,-85.31 35.0207,-85.319 35.0206,-85.327 35.0192,-85.335 35.0179,-85.344 35.0181,-85.3485 35.0191,-85.3527 35.0208,-85.3692 35.02,-85.3845 35.0178,-85.3972 35.0125,-85.4063 35.0028,-85.4122 34.9925,-85.4185 34.9844)
+LINESTRING(-118.163 35.0461,-118.16 35.0378,-118.156 35.0245,-118.154 35.0175,-118.156 34.9987,-118.16 34.9611,-118.165 34.9208,-118.168 34.8937,-118.17 34.8406,-118.172 34.788,-118.172 34.7362,-118.17 34.6853,-118.165 34.6815,-118.161 34.6777,-118.157 34.6739,-118.153 34.6701,-118.153 34.6534,-118.152 34.6367,-118.152 34.62,-118.152 34.6033,-118.143 34.5973,-118.134 34.5913,-118.134 34.5657,-118.128 34.5503,-118.119 34.5376,-118.11 34.5201,-118.113 34.512,-118.119 34.5083,-118.123 34.5038,-118.126 34.4988,-118.13 34.4935,-118.141 34.4878,-118.152 34.4878,-118.163 34.4907,-118.174 34.4936,-118.181 34.4938,-118.189 34.4929,-118.196 34.492,-118.203 34.4921,-118.215 34.4959,-118.222 34.5011,-118.231 34.5051,-118.248 34.5053,-118.254 34.5003,-118.261 34.4946,-118.268 34.4928,-118.276 34.4911,-118.286 34.481,-118.302 34.4724,-118.321 34.4664,-118.336 34.464,-118.359 34.4451,-118.381 34.4359,-118.406 34.4317,-118.437 34.4277,-118.445 34.4229,-118.451 34.4138,-118.456 34.4039,-118.463 34.3966,-118.489 34.3811,-118.5 34.3701,-118.504 34.3567,-118.508 34.3338)
+LINESTRING(-118.956 35.0222,-118.943 34.9955,-118.935 34.9588,-118.928 34.9219,-118.918 34.8944,-118.898 34.8822,-118.886 34.8703,-118.875 34.8571,-118.861 34.8405,-118.866 34.8341,-118.871 34.8279,-118.877 34.822,-118.884 34.8166,-118.883 34.8132,-118.883 34.8097,-118.881 34.8076,-118.88 34.8054,-118.878 34.8032,-118.876 34.8011,-118.867 34.7987,-118.857 34.7969,-118.847 34.7952,-118.838 34.7927,-118.8 34.7693,-118.797 34.7424,-118.793 34.7083,-118.755 34.6632,-118.75 34.6491,-118.74 34.641,-118.728 34.6341,-118.716 34.6239,-118.711 34.6149,-118.709 34.6048,-118.708 34.5944,-118.706 34.5843,-118.68 34.5682,-118.651 34.541,-118.627 34.5107,-118.613 34.4855,-118.611 34.4773,-118.611 34.467,-118.611 34.4575,-118.61 34.4519,-118.607 34.4482,-118.604 34.4445,-118.601 34.4438,-118.598 34.4431,-118.594 34.4424,-118.591 34.4417,-118.582 34.4276,-118.57 34.4016,-118.558 34.3729,-118.547 34.3505,-118.537 34.3462,-118.527 34.3422,-118.518 34.3382,-118.508 34.3338)
+LINESTRING(-85.708 35.0507,-85.7035 35.055,-85.6911 35.0644,-85.6724 35.0731,-85.6492 35.0756,-85.6226 35.0656,-85.5833 35.0445,-85.5447 35.0216,-85.5202 35.006,-85.5194 35.0038,-85.5177 34.9988,-85.5142 34.9925,-85.508 34.9864,-85.5015 34.9856,-85.4949 34.9866,-85.4884 34.9885,-85.4821 34.9899,-85.4717 34.9853,-85.4707 34.9847)
+LINESTRING(-85.4185 34.9844,-85.4189 34.9839,-85.4276 34.9769,-85.4418 34.9709)
+LINESTRING(-85.4707 34.9847,-85.462 34.98,-85.4523 34.975,-85.4418 34.9709)
+LINESTRING(-95.9864 36.1453,-95.9222 36.127,-95.871 36.1057,-95.8205 36.0828,-95.7699 36.0623,-95.7578 36.0585,-95.7452 36.055,-95.7328 36.0513,-95.7211 36.0469,-95.6969 36.0344,-95.6716 36.0189,-95.6471 36.0023,-95.6258 35.9866,-95.5997 35.9608,-95.5924 35.9456,-95.5748 35.9296,-95.4918 35.8891,-95.4669 35.8759,-95.4412 35.8642,-95.4132 35.8559)
+LINESTRING(-114.753 34.8797,-114.76 34.8759,-114.794 34.8793,-114.834 34.8701,-114.877 34.8596,-114.923 34.8592,-114.948 34.8506,-114.976 34.8414,-115.004 34.8333,-115.03 34.8279,-115.037 34.8275,-115.044 34.8278,-115.051 34.8282,-115.058 34.828,-115.141 34.8194,-115.224 34.8111,-115.307 34.8031,-115.39 34.7951,-115.428 34.7869,-115.464 34.7722,-115.499 34.7555,-115.535 34.741,-115.588 34.7296,-115.662 34.7204,-115.737 34.7153,-115.791 34.7163,-115.814 34.7201,-115.838 34.7256,-115.861 34.7317,-115.883 34.7378,-115.921 34.7292,-115.966 34.7247,-116.006 34.7204,-116.031 34.7127,-116.044 34.7162,-116.058 34.7219,-116.07 34.7273,-116.078 34.7295,-116.129 34.7277,-116.193 34.727,-116.256 34.7302,-116.306 34.7401,-116.322 34.748,-116.336 34.7571,-116.351 34.7662,-116.366 34.774,-116.417 34.7823,-116.513 34.7941,-116.609 34.8049,-116.659 34.8105,-116.683 34.8129,-116.708 34.8146,-116.733 34.8162,-116.758 34.8183,-116.793 34.8231,-116.833 34.8301,-116.873 34.8382,-116.908 34.8462,-116.933 34.8553,-116.958 34.8674,-116.983 34.8789,-117.008 34.8862)
+LINESTRING(-82.3076 34.8304,-82.3324 34.8175,-82.3598 34.8046,-82.3885 34.7946,-82.4172 34.7906,-82.4293 34.7909,-82.4403 34.7907,-82.4507 34.7885,-82.4607 34.7828,-82.4762 34.7642,-82.4873 34.7403,-82.4965 34.7153,-82.5066 34.6937,-82.5111 34.6884,-82.5235 34.6818,-82.5585 34.6644,-82.5859 34.646,-82.6123 34.6266,-82.6373 34.6088,-82.6768 34.5897,-82.7219 34.5769,-82.768 34.5655,-82.8107 34.5508,-82.82 34.5457,-82.8286 34.5397,-82.837 34.5336,-82.8459 34.528,-82.8723 34.5192,-82.9089 34.5128,-82.9469 34.508,-82.9775 34.5045,-82.9902 34.5021,-83.0005 34.4993)
+LINESTRING(-79.8481 34.1961,-79.8824 34.2018,-79.9394 34.2073,-79.9979 34.2109,-80.0368 34.211,-80.0528 34.2084,-80.0684 34.2045,-80.084 34.2005,-80.0997 34.1974,-80.1131 34.1964,-80.1272 34.1963,-80.1415 34.1963,-80.1553 34.1956,-80.1699 34.1932,-80.1838 34.1898,-80.1975 34.1863,-80.2115 34.1832,-80.2465 34.1908,-80.2962 34.1955,-80.348 34.1995,-80.3894 34.2047,-80.4002 34.2055,-80.4117 34.2044,-80.4231 34.2026,-80.4339 34.2013,-80.4522 34.202,-80.4708 34.2054,-80.4895 34.2088,-80.5082 34.2098,-80.5189 34.2092,-80.5296 34.2085,-80.5403 34.2079,-80.551 34.2072,-80.5672 34.2062,-80.5854 34.2044,-80.6059 34.2013,-80.6286 34.1959,-80.6356 34.193,-80.6422 34.189,-80.6487 34.1849,-80.6553 34.1815,-80.6606 34.1799,-80.6665 34.1789,-80.6725 34.1779,-80.6781 34.1765,-80.6898 34.1698,-80.7091 34.1569,-80.7293 34.1431,-80.7435 34.1336,-80.7727 34.113,-80.8016 34.0943,-80.8428 34.0802,-80.9085 34.0736,-80.9268 34.073,-80.9425 34.0726)
+LINESTRING(-80.9275 35.1003,-80.942 35.0756,-80.9585 35.0508,-80.9608 35.0483,-80.963 35.0458,-80.9713 35.0323,-80.9796 35.0189,-80.9889 35.0029,-80.9928 34.994,-80.9913 34.9883,-80.9891 34.9824,-80.9871 34.9765,-80.986 34.9708,-80.9867 34.9661,-80.9884 34.9614,-80.9899 34.9562,-80.99 34.9504,-80.9879 34.9429,-80.9848 34.9333,-80.9822 34.924,-80.9815 34.9173,-80.9893 34.897,-81.0025 34.8769,-81.0165 34.857,-81.0269 34.8373,-81.0411 34.7793,-81.0424 34.7226,-81.0342 34.666,-81.0196 34.608,-81.0136 34.5891,-81.007 34.5695,-81.0013 34.5499,-80.9978 34.5308,-80.9992 34.4668,-81.0064 34.374,-81.0136 34.2877,-81.0147 34.2434,-81.0086 34.2259,-81.0013 34.2082,-80.9916 34.1918,-80.9784 34.1779,-80.9751 34.1657,-80.9704 34.1508,-80.9664 34.136,-80.9651 34.1238,-80.9616 34.1139,-80.9535 34.0969,-80.9453 34.0798,-80.9425 34.0726)
+LINESTRING(-89.8744 36.0014,-89.8744 36.0013,-89.8741 35.9831,-89.8737 35.9649,-89.8734 35.9467,-89.873 35.9285,-89.8783 35.9141,-89.8916 35.9035,-89.908 35.894,-89.9226 35.8831,-89.9313 35.8728,-89.9392 35.8617,-89.9466 35.8502,-89.9538 35.8392,-90.027 35.7338,-90.0998 35.6289,-90.1705 35.5232,-90.2372 35.4153,-90.2392 35.4119,-90.2481 35.4063,-90.257 35.4008,-90.2649 35.3967,-90.2727 35.3926)
+LINESTRING(-113.691 35.1609,-113.657 35.1609,-113.62 35.1587,-113.585 35.1575,-113.553 35.1605,-113.536 35.1654,-113.52 35.1717,-113.503 35.1784,-113.486 35.1841,-113.464 35.1895,-113.442 35.1941,-113.42 35.1981,-113.398 35.202,-113.377 35.2039,-113.356 35.2042,-113.335 35.2048,-113.315 35.2079,-113.3 35.2136,-113.284 35.221,-113.268 35.2279,-113.253 35.2322,-113.239 35.2337,-113.226 35.2346,-113.212 35.2357,-113.198 35.2378,-113.177 35.244,-113.156 35.2522,-113.136 35.2607,-113.115 35.2677,-113.093 35.2726,-113.07 35.277,-113.048 35.2816,-113.026 35.2875,-113.004 35.2959,-112.984 35.3057,-112.964 35.3148,-112.942 35.3214,-112.919 35.3232,-112.899 35.3211,-112.879 35.3184,-112.859 35.3179,-112.829 35.2981,-112.798 35.2867,-112.764 35.279,-112.729 35.2707,-112.705 35.2628,-112.681 35.254,-112.656 35.2454,-112.632 35.2381,-112.612 35.235,-112.591 35.2319,-112.571 35.2289,-112.551 35.2258,-112.534 35.2245,-112.517 35.2247,-112.5 35.2252,-112.484 35.2247,-112.452 35.2211,-112.419 35.217,-112.385 35.2144,-112.353 35.2152,-112.338 35.2175,-112.328 35.2198,-112.316 35.2214,-112.294 35.2213,-112.282 35.22,-112.268 35.2222,-112.254 35.2249,-112.241 35.225,-112.235 35.2282,-112.23 35.2323,-112.216 35.2405,-112.202 35.2471,-112.187 35.2528,-112.171 35.2583,-112.153 35.2608,-112.127 35.2607,-112.1 35.2599,-112.079 35.2606,-112.071 35.2626,-112.063 35.2649,-112.055 35.2665,-112.046 35.2661,-112.028 35.262,-112.01 35.257,-111.991 35.2523,-111.972 35.2493,-111.968 35.251,-111.962 35.2528,-111.956 35.254,-111.951 35.2543,-111.95 35.2575,-111.95 35.2607,-111.925 35.2561,-111.895 35.2538,-111.864 35.2516,-111.837 35.2469,-111.819 35.2396,-111.801 35.2299,-111.785 35.2192,-111.769 35.2091,-111.746 35.1984,-111.72 35.1897,-111.693 35.1824,-111.668 35.1758,-111.663 35.1739)
+LINESTRING(-120.678 35.6435,-120.677 35.6372,-120.678 35.6278,-120.679 35.6186,-120.688 35.6119,-120.698 35.6007,-120.698 35.5884,-120.698 35.5752,-120.7 35.563,-120.716 35.5431,-120.705 35.5211,-120.682 35.5003,-120.662 35.4844,-120.652 35.472,-120.644 35.4581,-120.639 35.4436,-120.633 35.4297,-120.628 35.4206,-120.624 35.4112,-120.622 35.4016,-120.622 35.3917,-120.634 35.3804,-120.64 35.3747,-120.64 35.3651,-120.639 35.3595,-120.635 35.3537,-120.626 35.3481,-120.622 35.3348,-120.618 35.3249,-120.618 35.3143,-120.624 35.2991,-120.645 35.29,-120.654 35.2899,-120.667 35.2636,-120.671 35.2543,-120.675 35.2452,-120.68 35.236,-120.684 35.2262,-120.683 35.2151,-120.671 35.203,-120.652 35.1898,-120.624 35.1756,-120.614 35.1673,-120.609 35.1621,-120.589 35.1469,-120.577 35.1325,-120.565 35.1176,-120.551 35.1045,-120.533 35.09,-120.516 35.0736,-120.501 35.0565,-120.486 35.0397,-120.463 35.0191,-120.441 35.0016,-120.424 34.9814,-120.417 34.9526,-120.417 34.9386,-120.417 34.9242,-120.417 34.9098,-120.416 34.8959,-120.403 34.8704,-120.378 34.8451,-120.353 34.8212,-120.341 34.8002,-120.323 34.7874,-120.308 34.7731,-120.294 34.7584,-120.278 34.7448,-120.248 34.733,-120.205 34.7202,-120.169 34.7037,-120.155 34.6806,-120.163 34.6703,-120.168 34.6651,-120.173 34.6582,-120.175 34.6477,-120.176 34.6355,-120.177 34.624,-120.18 34.6152,-120.178 34.6036,-120.179 34.5966,-120.18 34.5901,-120.181 34.5802,-120.185 34.5709,-120.189 34.5617,-120.195 34.5549,-120.202 34.549,-120.204 34.5431,-120.203 34.5371,-120.203 34.5298,-120.2 34.5239,-120.191 34.5237,-120.181 34.5236,-120.171 34.523,-120.161 34.5225,-120.152 34.5231,-120.143 34.5238,-120.135 34.524,-120.128 34.5242,-120.12 34.5244,-120.113 34.5246,-120.102 34.5215,-120.092 34.5185,-120.081 34.5136,-120.074 34.5139,-120.066 34.5142,-120.057 34.5145,-120.048 34.5148,-120.04 34.5156,-120.033 34.5164,-120.021 34.5156,-120.01 34.5147,-119.998 34.5127,-119.987 34.5106,-119.979 34.5083,-119.971 34.506,-119.964 34.5037,-119.956 34.5014,-119.943 34.4958,-119.93 34.4901,-119.92 34.488,-119.911 34.4858,-119.902 34.4841,-119.894 34.4825,-119.886 34.4817,-119.874 34.4838,-119.867 34.4847,-119.86 34.4855,-119.853 34.4864,-119.846 34.4873,-119.839 34.4877,-119.832 34.488,-119.826 34.4884,-119.819 34.4888,-119.808 34.4893,-119.796 34.4898,-119.787 34.4902,-119.778 34.4906,-119.769 34.491,-119.76 34.4914,-119.749 34.4893,-119.738 34.4871,-119.731 34.4833,-119.723 34.4795,-119.713 34.4738,-119.7 34.4676,-119.691 34.466,-119.682 34.4677,-119.673 34.4694,-119.663 34.4694,-119.653 34.4695,-119.642 34.4679,-119.631 34.4663,-119.624 34.4663,-119.612 34.4667,-119.604 34.4667,-119.596 34.4667,-119.584 34.4648,-119.571 34.4628,-119.563 34.4616,-119.555 34.4604,-119.545 34.4585,-119.536 34.4567,-119.526 34.4495,-119.515 34.4462,-119.504 34.443,-119.498 34.4382,-119.492 34.4334,-119.481 34.431,-119.469 34.4287,-119.466 34.4214,-119.463 34.4141,-119.459 34.4068,-119.456 34.3995,-119.443 34.3932,-119.43 34.3877,-119.417 34.3821,-119.409 34.3791,-119.401 34.3762,-119.392 34.3686,-119.383 34.3611,-119.375 34.3536,-119.367 34.3462,-119.359 34.3458,-119.352 34.3454,-119.34 34.3384,-119.327 34.3314,-119.316 34.3228,-119.305 34.3151,-119.295 34.3116,-119.287 34.3088,-119.277 34.3049,-119.266 34.3034,-119.259 34.3034,-119.253 34.3034,-119.243 34.2968,-119.233 34.2902,-119.222 34.2907,-119.209 34.2859,-119.195 34.281,-119.188 34.2775,-119.18 34.2741,-119.17 34.2695,-119.161 34.2648,-119.151 34.2571,-119.139 34.2501,-119.13 34.2434,-119.121 34.2367,-119.112 34.2329,-119.103 34.2291,-119.095 34.2253,-119.086 34.2215,-119.079 34.2211,-119.071 34.2207,-119.063 34.2204,-119.055 34.22,-119.049 34.2194,-119.042 34.2188,-119.035 34.2182,-119.028 34.2177,-119.02 34.2176,-119.013 34.2176,-119.005 34.2176,-118.998 34.2175,-118.984 34.2121,-118.97 34.2066,-118.956 34.2012,-118.942 34.1957,-118.919 34.1876,-118.9 34.183,-118.882 34.1798,-118.86 34.1759,-118.844 34.1697,-118.83 34.1602,-118.815 34.1509,-118.8 34.1455,-118.782 34.1433,-118.76 34.1408,-118.739 34.1388,-118.721 34.1377,-118.714 34.1392,-118.706 34.143,-118.699 34.1477,-118.693 34.1521,-118.669 34.1535,-118.66 34.1523,-118.648 34.1554,-118.615 34.1697,-118.594 34.1705,-118.574 34.1731,-118.554 34.1753,-118.534 34.175,-118.516 34.171,-118.501 34.1653,-118.485 34.1606,-118.466 34.1598)
+LINESTRING(-86.7861 36.1639,-86.7779 36.1332,-86.7746 36.1189,-86.7669 36.0905,-86.7695 36.0812,-86.7764 36.0644,-86.7835 36.0467,-86.7868 36.0346,-86.7904 36.0103,-86.7994 35.9862,-86.8102 35.9621,-86.8193 35.9377,-86.8253 35.9083,-86.8314 35.849,-86.8373 35.8201,-86.842 35.8116,-86.849 35.8046,-86.8562 35.7978,-86.8614 35.79,-86.8662 35.7737,-86.8753 35.7411,-86.8842 35.7079,-86.8886 35.6895,-86.8892 35.6751,-86.8892 35.6603,-86.8897 35.6456,-86.8918 35.6314,-86.8968 35.6126,-86.9019 35.5941,-86.9058 35.5753,-86.9074 35.5559,-86.9032 35.534,-86.894 35.4939,-86.8841 35.4521,-86.8781 35.425,-86.8775 35.4105,-86.8795 35.3966,-86.8824 35.3828,-86.8843 35.3684,-86.8856 35.331,-86.8861 35.2951,-86.8871 35.2588,-86.8899 35.2206,-86.8733 35.2012,-86.873 35.1787,-86.8764 35.153,-86.8808 35.1272,-86.8835 35.104,-86.8827 35.0743,-86.8801 35.0513,-86.8797 35.0268,-86.8856 34.9923)
+LINESTRING(-114.753 34.8797,-114.728 34.8836,-114.721 34.8851,-114.709 34.889,-114.702 34.8905,-114.686 34.8903,-114.672 34.8854,-114.662 34.8766,-114.656 34.8645,-114.646 34.8138,-114.631 34.7726)
+LINESTRING(-118.508 34.3338,-118.483 34.3112,-118.457 34.2809,-118.432 34.2518,-118.409 34.2329,-118.401 34.2127,-118.392 34.1929,-118.382 34.1733,-118.375 34.1535)
+LINESTRING(-118.375 34.1535,-118.398 34.1543,-118.421 34.1551,-118.444 34.1567,-118.466 34.1598)
+LINESTRING(-81.1092 34.0368,-81.0697 34.0565,-81.0302 34.0686,-80.9907 34.0733,-80.9693 34.0717,-80.9634 34.0719,-80.9451 34.0725,-80.9425 34.0726)
+LINESTRING(-81.1092 34.0368,-81.1341 34.0599,-81.158 34.0844,-81.1825 34.1081,-81.2093 34.1289,-81.2355 34.1429,-81.2638 34.154,-81.2928 34.1641,-81.321 34.175,-81.3343 34.1816,-81.3471 34.189,-81.3597 34.1965,-81.3728 34.2035,-81.3921 34.2119,-81.412 34.219,-81.432 34.2258,-81.4518 34.2332,-81.4902 34.2546,-81.5593 34.2957,-81.6268 34.3366,-81.6601 34.3576,-81.6732 34.3709,-81.6844 34.3859,-81.6933 34.3988,-81.699 34.406,-81.7166 34.4192,-81.727 34.4242,-81.736 34.4269,-81.7499 34.4329,-81.7639 34.4412,-81.7778 34.4505,-81.7916 34.4602,-81.8049 34.4694,-81.8218 34.4803,-81.8389 34.491,-81.8558 34.5019,-81.8723 34.5134)
+LINESTRING(-109.045 35.36,-109.035 35.3609,-109.026 35.3625,-109.01 35.3654,-108.999 35.3675,-108.988 35.3696,-108.961 35.3962,-108.939 35.4185,-108.914 35.4393,-108.881 35.4617,-108.856 35.4733,-108.835 35.4786,-108.819 35.4805,-108.81 35.482,-108.796 35.488,-108.779 35.4932,-108.761 35.4979,-108.741 35.5018)
+LINESTRING(-114.631 34.7726,-114.602 34.7386,-114.562 34.7173,-114.513 34.714,-114.474 34.7193)
+LINESTRING(-85.554 34.7145,-85.5493 34.7224,-85.5444 34.7343,-85.5406 34.7467,-85.539 34.7558,-85.5407 34.768,-85.5443 34.7803,-85.5475 34.7926,-85.5479 34.8047,-85.5343 34.8488,-85.5086 34.8929,-85.4761 34.9345,-85.4418 34.9709)
+LINESTRING(-114.474 34.7193,-114.457 34.7217,-114.44 34.7237,-114.423 34.726,-114.406 34.728,-114.389 34.7296,-114.358 34.7307,-114.315 34.7323,-114.272 34.7349,-114.243 34.7397,-114.217 34.7524,-114.186 34.7728,-114.16 34.7961,-114.146 34.817,-114.144 34.8431,-114.148 34.8692,-114.153 34.8951,-114.153 34.9204,-114.144 34.9624,-114.134 35.0047,-114.125 35.047,-114.118 35.0891,-114.115 35.1101,-114.11 35.1227,-114.103 35.1336,-114.092 35.1499,-114.1 35.1634,-114.102 35.1787,-114.098 35.194,-114.09 35.2076)
+LINESTRING(-105.923 35.6298,-105.911 35.6108,-105.9 35.5924,-105.889 35.574,-105.877 35.5556)
+LINESTRING(-118.375 34.1535,-118.352 34.1536,-118.326 34.1526,-118.303 34.1516,-118.284 34.1517,-118.276 34.1528,-118.268 34.1542,-118.259 34.1553,-118.25 34.1554,-118.243 34.1542,-118.237 34.1519,-118.232 34.1493,-118.226 34.147,-118.215 34.1454,-118.203 34.1455,-118.192 34.1448,-118.181 34.1406,-118.172 34.1424,-118.155 34.147,-118.137 34.1518,-118.124 34.1545,-118.11 34.154,-118.085 34.1522,-118.059 34.1499,-118.045 34.1481,-118.038 34.1462,-118.032 34.1437,-118.026 34.1412,-118.02 34.1396,-118.007 34.1382,-117.993 34.1376,-117.978 34.1373,-117.964 34.1366,-117.962 34.1344,-117.958 34.1324,-117.955 34.1308,-117.952 34.1291)
+LINESTRING(-94.2245 36.4213,-94.1776 36.3752,-94.1741 36.3547,-94.1851 36.3361,-94.182 36.296,-94.1766 36.2913,-94.1696 36.2878,-94.162 36.2845,-94.1553 36.2806,-94.1531 36.2737,-94.1521 36.2626,-94.1526 36.2513,-94.1548 36.2438,-94.1603 36.242,-94.1656 36.2396,-94.1706 36.2367,-94.175 36.2335,-94.1773 36.2221,-94.1803 36.1983,-94.1829 36.1727,-94.1842 36.1562,-94.1826 36.1533,-94.181 36.1504,-94.1787 36.1457,-94.1775 36.1418,-94.1785 36.1402,-94.1794 36.1386,-94.1804 36.137,-94.1813 36.1354,-94.18 36.1289,-94.1774 36.1224,-94.1736 36.1163,-94.1687 36.1111,-94.1913 36.0981,-94.2003 36.0785,-94.1981 36.0565,-94.187 36.0368,-94.1834 36.0349,-94.1793 36.0324,-94.1752 36.0303,-94.1715 36.0298,-94.1693 36.0168,-94.1688 36.0048,-94.1689 35.9928,-94.1683 35.98,-94.1669 35.9784,-94.1654 35.9768,-94.1683 35.965,-94.1725 35.9548,-94.1767 35.9447,-94.1795 35.9335,-94.1792 35.9292,-94.1777 35.925,-94.1759 35.921,-94.1745 35.9168,-94.1695 35.8982,-94.1609 35.884,-94.1512 35.8709,-94.1403 35.8077,-94.1472 35.7745,-94.1532 35.7254,-94.1612 35.6782,-94.1645 35.636,-94.1687 35.6126,-94.1783 35.5948,-94.1886 35.5796,-94.1963 35.5701,-94.2107 35.5555,-94.2172 35.549,-94.2199 35.5416,-94.2232 35.5244)
+LINESTRING(-88.8569 35.662,-88.8905 35.6516,-88.9239 35.6409,-88.9573 35.6301,-88.9906 35.6192,-88.9996 35.6169,-89.0087 35.6152,-89.018 35.6134,-89.0276 35.6106,-89.0833 35.5902,-89.1407 35.5698,-89.1989 35.5513,-89.2571 35.5368,-89.2641 35.5224,-89.2698 35.5064,-89.2749 35.4901,-89.2799 35.4749,-89.316 35.4512,-89.354 35.4267,-89.3929 35.4033,-89.4317 35.3829,-89.4447 35.379,-89.4579 35.3758,-89.4794 35.3678,-89.5009 35.3587,-89.5219 35.3489,-89.542 35.3388,-89.5621 35.3271,-89.5809 35.3143,-89.5993 35.301,-89.618 35.2879,-89.6615 35.2619,-89.7196 35.231,-89.7785 35.2019,-89.8246 35.181,-89.8409 35.1745,-89.8578 35.1681,-89.8748 35.1616,-89.8914 35.1547,-89.9023 35.1636,-89.9127 35.1739,-89.9218 35.185,-89.929 35.1961,-89.9409 35.1965,-89.953 35.1971,-89.9651 35.1977,-89.9769 35.1977,-89.9891 35.1967,-90.0042 35.1955,-90.0187 35.1957,-90.0292 35.1989)
+LINESTRING(-90.2727 35.3926,-90.2756 35.3914,-90.2776 35.3896,-90.2788 35.3873,-90.2791 35.3846,-90.2725 35.3499,-90.2573 35.3168,-90.2385 35.2843,-90.2207 35.2516,-90.2135 35.2345,-90.2072 35.2167,-90.2012 35.1987,-90.1953 35.1813,-90.1946 35.1791,-90.1938 35.1768,-90.1929 35.1747,-90.1916 35.1726)
+LINESTRING(-96.0082 36.1134,-96.0212 36.1057,-96.0393 36.0927,-96.0568 36.0791,-96.068 36.07,-96.0775 36.0588,-96.0854 36.045,-96.0931 36.0308,-96.1018 36.0182,-96.122 36.0121,-96.1475 36.0052,-96.172 35.9979,-96.1894 35.9903,-96.2281 35.9649,-96.267 35.9383,-96.305 35.9108,-96.341 35.8831,-96.3517 35.8724,-96.357 35.8669,-96.413 35.8428,-96.5066 35.8119,-96.5998 35.7822,-96.649 35.7666,-96.7085 35.752,-96.7869 35.7386,-96.8685 35.7254,-96.938 35.7116,-96.9695 35.7039,-97.0128 35.6931,-97.0565 35.6813,-97.0892 35.6705,-97.1065 35.6606,-97.1178 35.6505,-97.131 35.6419,-97.154 35.6366,-97.2168 35.632,-97.2927 35.6264,-97.3675 35.6167,-97.427 35.5992)
+LINESTRING(-97.3172 36.3949,-97.3217 36.3448,-97.3225 36.293,-97.3219 36.241,-97.3223 36.1904,-97.324 36.1732,-97.3274 36.1594,-97.332 36.1459,-97.3374 36.1294,-97.34 36.1037,-97.3433 36.0542,-97.3458 36.0049,-97.3458 35.9798,-97.3526 35.9713,-97.36 35.9626,-97.3671 35.9538,-97.3732 35.9452,-97.3833 35.9124,-97.3863 35.8724,-97.3935 35.8342,-97.4159 35.8065,-97.416 35.7748,-97.415 35.7418,-97.415 35.7091,-97.418 35.6781,-97.4212 35.6581,-97.4236 35.6388,-97.4255 35.6194,-97.427 35.5992)
+LINESTRING(-94.3249 35.4716,-94.3207 35.4709,-94.3165 35.4704,-94.3028 35.4701,-94.2971 35.4711,-94.2925 35.4731,-94.2885 35.476,-94.2847 35.4797,-94.2817 35.4824,-94.2788 35.4847,-94.2724 35.4892,-94.2587 35.4987,-94.2559 35.5013,-94.254 35.5039,-94.2522 35.5066,-94.2496 35.5093,-94.2418 35.5162,-94.2388 35.5186,-94.235 35.5209,-94.2313 35.5224,-94.2274 35.5236,-94.2232 35.5244)
+LINESTRING(-86.8856 34.9923,-86.8856 34.9923,-86.8915 34.9715,-86.8996 34.9441,-86.9061 34.9183,-86.9075 34.9019,-86.921 34.8753,-86.9257 34.8474,-86.9244 34.8184,-86.9198 34.7883)
+LINESTRING(-94.4445 35.4684,-94.4369 35.4786,-94.4264 35.4872,-94.4135 35.4892,-94.4023 35.4904,-94.3912 35.4902,-94.3788 35.4876,-94.3729 35.4869,-94.3677 35.4857,-94.3627 35.4841,-94.357 35.4825,-94.3523 35.4815,-94.3481 35.4808,-94.3439 35.4801,-94.3394 35.4788,-94.3355 35.477,-94.329 35.4733,-94.3249 35.4716)
+LINESTRING(-90.1916 35.1726,-90.1515 35.1564,-90.1112 35.1442,-90.0728 35.1365)
+LINESTRING(-90.0292 35.1989,-90.0293 35.1821,-90.0295 35.1654,-90.0296 35.1486,-90.0298 35.1319)
+LINESTRING(-90.0728 35.1365,-90.0706 35.136,-90.0298 35.1319)
+LINESTRING(-86.5985 34.7336,-86.5643 34.759)
+LINESTRING(-95.4132 35.8559,-95.3888 35.8399,-95.3674 35.8184,-95.3506 35.7934,-95.3395 35.7669,-95.3312 35.7467,-95.323 35.7335,-95.3167 35.7201,-95.3144 35.6995,-95.3142 35.6887,-95.3136 35.6773,-95.3125 35.666,-95.3108 35.6553,-95.2845 35.6256,-95.2391 35.5699,-95.1959 35.5144,-95.176 35.4857)
+LINESTRING(-97.4649 35.5448,-97.4593 35.5524,-97.4494 35.5682,-97.4378 35.586,-97.427 35.5992)
+LINESTRING(-95.176 35.4857,-95.2196 35.4835,-95.262 35.48,-95.304 35.4739,-95.3461 35.4643,-95.3904 35.4563,-95.4386 35.4536,-95.487 35.4537,-95.5319 35.454)
+LINESTRING(-95.3953 35.7269,-95.4066 35.6975,-95.4331 35.6537,-95.4609 35.6131,-95.4763 35.5931,-95.4872 35.5845,-95.4993 35.5751,-95.5108 35.5651,-95.5199 35.5549,-95.5204 35.5332,-95.5208 35.5116,-95.5209 35.4899,-95.5205 35.4682,-95.5233 35.4646,-95.5262 35.4611,-95.529 35.4575,-95.5319 35.454)
+LINESTRING(-117.952 34.1291,-117.958 34.1147,-117.963 34.1002,-117.968 34.0855,-117.973 34.0708,-117.992 34.0494,-118.023 34.034,-118.056 34.0089,-118.085 33.9582,-118.087 33.9544,-118.09 33.9497,-118.093 33.9454,-118.094 33.9427)
+LINESTRING(-118.375 34.1535,-118.363 34.1436,-118.35 34.1335,-118.339 34.1227,-118.332 34.1104,-118.314 34.1011,-118.301 34.0906,-118.285 34.0805,-118.263 34.0724,-118.254 34.0689,-118.244 34.0633,-118.233 34.0574,-118.224 34.0529,-118.222 34.0484,-118.221 34.0437,-118.221 34.039,-118.221 34.0342,-118.187 34.0259,-118.159 34.0075,-118.136 33.984,-118.117 33.9607,-118.112 33.9562,-118.106 33.9523,-118.099 33.9481,-118.094 33.9427)
+LINESTRING(-104.41 36.8069,-104.408 36.7789,-104.41 36.7582,-104.415 36.7403,-104.423 36.7225,-104.432 36.7025,-104.44 36.6844,-104.45 36.6691,-104.464 36.6567,-104.484 36.6476,-104.495 36.6439,-104.504 36.6403,-104.513 36.6369,-104.524 36.6339,-104.533 36.6323,-104.541 36.631,-104.549 36.6287,-104.556 36.6246,-104.571 36.6069,-104.578 36.5881,-104.58 36.5677,-104.579 36.5452,-104.578 36.5248,-104.58 36.5136,-104.587 36.5045,-104.596 36.4957,-104.604 36.4851,-104.61 36.4715,-104.613 36.4588,-104.613 36.4459,-104.613 36.4313,-104.61 36.4172,-104.609 36.3961,-104.608 36.3782,-104.607 36.3624,-104.608 36.3468,-104.612 36.3295,-104.617 36.3193,-104.621 36.3103,-104.626 36.3013,-104.63 36.2909,-104.635 36.2703,-104.648 36.2233,-104.666 36.1719,-104.682 36.1382,-104.682 36.1162,-104.684 36.0803,-104.688 36.045,-104.691 36.0249,-104.721 35.9932,-104.78 35.9391,-104.839 35.8873,-104.867 35.8625,-104.936 35.8459,-104.963 35.8215,-104.981 35.7898,-105.019 35.7518,-105.053 35.7278,-105.079 35.7107,-105.108 35.697,-105.148 35.6833,-105.17 35.6758,-105.177 35.6696,-105.18 35.6615,-105.185 35.6482,-105.201 35.6174,-105.216 35.5863,-105.23 35.5551,-105.246 35.5238,-105.258 35.4931,-105.274 35.4506,-105.294 35.4128,-105.319 35.3967,-105.359 35.3971,-105.399 35.3978,-105.44 35.3997,-105.48 35.4034,-105.496 35.4073,-105.533 35.4199,-105.55 35.4241,-105.558 35.4247,-105.565 35.4249,-105.573 35.4254,-105.58 35.427,-105.594 35.4322,-105.617 35.4414,-105.64 35.4515,-105.654 35.4593,-105.662 35.4641,-105.67 35.4689,-105.677 35.4743,-105.682 35.4812,-105.69 35.5088,-105.692 35.5255,-105.696 35.5388,-105.709 35.5563,-105.728 35.5592,-105.743 35.5664,-105.756 35.5769,-105.766 35.59,-105.774 35.5922,-105.784 35.5886,-105.787 35.5801,-105.788 35.5714,-105.814 35.5601,-105.819 35.5528,-105.835 35.5484,-105.844 35.5464,-105.852 35.5447,-105.865 35.5501,-105.877 35.5556)
+LINESTRING(-117.008 34.8862,-117.027 34.8856,-117.048 34.8845,-117.067 34.8797,-117.077 34.8676,-117.081 34.8552,-117.085 34.8428,-117.089 34.8304,-117.092 34.818,-117.105 34.8035,-117.13 34.7814,-117.156 34.7599,-117.171 34.7469,-117.198 34.7123,-117.207 34.6858,-117.21 34.6621,-117.223 34.6357,-117.239 34.6153,-117.255 34.5949,-117.272 34.5749,-117.289 34.5556,-117.303 34.5428,-117.312 34.5346,-117.318 34.5246,-117.321 34.5067,-117.341 34.477,-117.375 34.4275,-117.412 34.3803,-117.441 34.3574,-117.448 34.3553,-117.455 34.3532,-117.462 34.3511,-117.469 34.3489,-117.477 34.3464,-117.482 34.3378,-117.482 34.3327,-117.481 34.3268,-117.48 34.321,-117.478 34.3164,-117.465 34.3082,-117.454 34.2908,-117.447 34.2716,-117.449 34.2577,-117.441 34.252,-117.434 34.2456,-117.428 34.2392,-117.421 34.2337,-117.39 34.2116,-117.36 34.1897,-117.333 34.1654,-117.31 34.1365,-117.306 34.1307,-117.301 34.1254,-117.299 34.1095,-117.298 34.0936,-117.296 34.0732,-117.295 34.0635)
+LINESTRING(-117.952 34.1291,-117.925 34.1215,-117.893 34.1174,-117.86 34.1163,-117.832 34.1179,-117.829 34.104,-117.824 34.0904,-117.817 34.0775,-117.807 34.0657,-117.794 34.0687,-117.783 34.0707,-117.772 34.0714,-117.758 34.07,-117.733 34.0781,-117.697 34.084,-117.662 34.0866,-117.636 34.0849,-117.592 34.0701,-117.513 34.0668,-117.431 34.0691,-117.378 34.0709,-117.357 34.0703,-117.336 34.0688,-117.316 34.0665,-117.295 34.0635)
+LINESTRING(-97.938 35.5005,-97.9574 35.5015,-97.9738 35.5096,-97.9886 35.5207,-98.0032 35.5306,-98.0287 35.5298,-98.0551 35.5311,-98.0814 35.533,-98.1071 35.5342,-98.1301 35.5341,-98.1532 35.5336,-98.1762 35.5331,-98.1993 35.5326,-98.216 35.534,-98.234 35.5379,-98.2518 35.5428,-98.2675 35.5471,-98.2838 35.548,-98.2998 35.5445,-98.3155 35.5392,-98.3309 35.5347)
+LINESTRING(-95.176 35.4857,-95.1622 35.4889,-95.1468 35.4932,-95.1309 35.497,-95.1156 35.4988,-95.0897 35.501,-95.0246 35.5092,-94.9962 35.5116,-94.9917 35.5116,-94.9865 35.511,-94.9813 35.5099,-94.9772 35.5083,-94.9179 35.4749,-94.9128 35.4739,-94.9041 35.473,-94.8905 35.4721,-94.8657 35.4658,-94.8414 35.4527,-94.8172 35.4396,-94.7927 35.433,-94.7694 35.4316,-94.7571 35.4307,-94.7494 35.4298,-94.7224 35.4213,-94.6925 35.4082,-94.6636 35.3942,-94.6399 35.3832,-94.6164 35.3804,-94.5853 35.3841,-94.5536 35.3909,-94.5284 35.3975,-94.5144 35.4024,-94.4968 35.4103,-94.4799 35.4191,-94.4679 35.4271,-94.4577 35.4468,-94.4473 35.4645,-94.4445 35.4684)
+LINESTRING(-117.31 34.0432,-117.295 34.0635)
+LINESTRING(-95.5319 35.454,-95.568 35.455,-95.6328 35.4541,-95.7003 35.4516,-95.7445 35.4478,-95.7583 35.4443,-95.7715 35.4397,-95.7845 35.4349,-95.7978 35.4311,-95.8049 35.4304,-95.812 35.4309,-95.819 35.432,-95.8259 35.4327,-95.8394 35.4324,-95.8537 35.4307,-95.868 35.4287,-95.8815 35.4269,-95.9023 35.4263,-95.9247 35.4274,-95.947 35.4292,-95.9677 35.4306)
+LINESTRING(-97.4649 35.5448,-97.464 35.5284,-97.4648 35.508,-97.4679 35.4882,-97.4742 35.4732)
+LINESTRING(-97.4649 35.5448,-97.4903 35.5403,-97.5261 35.5302,-97.5594 35.5175,-97.5775 35.5049,-97.5797 35.4961,-97.5806 35.4833,-97.5807 35.4704,-97.5806 35.4614,-97.6064 35.4602,-97.6351 35.459,-97.6636 35.4587,-97.689 35.4604,-97.7187 35.4683,-97.749 35.4809,-97.7793 35.4934,-97.8087 35.5007,-97.8401 35.5025,-97.8731 35.5023,-97.9063 35.5012,-97.938 35.5005)
+LINESTRING(-90.0298 35.1319,-90.0292 35.1118,-90.0209 35.0833,-90.011 35.0572,-90.0055 35.0441,-90.0043 35.0376,-90.0046 35.0296,-90.0054 35.0223,-90.0062 35.015,-90.0058 34.9964)
+LINESTRING(-86.8899 34.6293,-86.8797 34.63,-86.8477 34.6392,-86.8155 34.6512,-86.7923 34.6611,-86.7643 34.6622,-86.7326 34.6712,-86.7029 34.6839,-86.6812 34.6963,-86.6807 34.6982,-86.6803 34.7001,-86.6799 34.7021,-86.6795 34.704,-86.6599 34.7119,-86.6392 34.7183,-86.6184 34.7249,-86.5985 34.7336)
+LINESTRING(-86.9198 34.7883,-86.9146 34.7503,-86.9045 34.7013,-86.8948 34.6569,-86.8899 34.6293)
+LINESTRING(-118.094 33.9427,-118.077 33.9179,-118.043 33.8939,-118.004 33.8728,-117.973 33.8566)
+LINESTRING(-110.18 34.9319,-110.175 34.9376,-110.17 34.9432,-110.149 34.9648,-110.127 34.982,-110.104 34.9953,-110.078 35.0051,-110.066 35.0087,-110.053 35.0116,-110.04 35.0139,-110.027 35.0157,-110.014 35.0172,-110 35.0184,-109.985 35.0196,-109.97 35.0207,-109.96 35.0214,-109.949 35.0221,-109.938 35.023,-109.927 35.0238,-109.917 35.025,-109.907 35.0264,-109.899 35.028,-109.892 35.03,-109.886 35.0323,-109.88 35.035,-109.874 35.0381,-109.868 35.0416,-109.861 35.046,-109.853 35.0505,-109.846 35.0552,-109.838 35.06,-109.82 35.071,-109.798 35.0821,-109.772 35.0928,-109.741 35.1024,-109.719 35.1113,-109.697 35.1233,-109.675 35.1352,-109.652 35.1439,-109.629 35.1497,-109.607 35.1561,-109.586 35.1633,-109.566 35.1714,-109.553 35.1773,-109.543 35.1827,-109.534 35.1876,-109.527 35.1921,-109.52 35.1969,-109.513 35.2017,-109.507 35.2061,-109.501 35.2105,-109.483 35.2208,-109.46 35.2304,-109.43 35.2399,-109.39 35.2497,-109.368 35.2558,-109.353 35.262,-109.343 35.2681,-109.336 35.2738,-109.328 35.283,-109.319 35.2924,-109.313 35.2986,-109.306 35.3048,-109.297 35.311,-109.287 35.3172,-109.272 35.324,-109.258 35.3278,-109.244 35.3294,-109.232 35.3297,-109.223 35.3293,-109.214 35.3287,-109.204 35.3282,-109.193 35.3286,-109.184 35.3295,-109.174 35.3304,-109.164 35.3312,-109.154 35.3321,-109.134 35.3368,-109.117 35.3446,-109.1 35.3524,-109.079 35.357,-109.068 35.358,-109.057 35.359,-109.046 35.36,-109.045 35.36)
+LINESTRING(-110.18 34.9319,-110.199 34.9253,-110.221 34.9342,-110.243 34.951,-110.263 34.9684,-110.279 34.9779,-110.296 34.9824,-110.314 34.9848,-110.334 34.9877,-110.357 34.9912,-110.377 34.9926,-110.398 34.9932,-110.421 34.9939,-110.445 34.9952,-110.467 34.9971,-110.489 35.0003,-110.514 35.0056,-110.527 35.0085,-110.538 35.0109,-110.549 35.0137,-110.562 35.0175,-110.575 35.0232,-110.585 35.03,-110.594 35.0378,-110.604 35.0466,-110.623 35.0602,-110.643 35.0703,-110.664 35.076,-110.688 35.0763,-110.7 35.0766,-110.729 35.0808,-110.741 35.0811,-111.082 35.1168,-111.101 35.1176,-111.12 35.1179,-111.14 35.1191,-111.159 35.1224,-111.176 35.1275,-111.193 35.1335,-111.209 35.1398,-111.226 35.146,-111.239 35.1497,-111.253 35.1534,-111.267 35.1574,-111.279 35.1622,-111.284 35.1613,-111.295 35.1615,-111.3 35.1605,-111.33 35.1724,-111.359 35.185,-111.39 35.1962,-111.422 35.2034,-111.441 35.2045,-111.459 35.2041,-111.477 35.2039,-111.495 35.2056,-111.515 35.2096,-111.54 35.2145,-111.578 35.2155,-111.663 35.1739)
+LINESTRING(-97.4742 35.4732,-97.4537 35.4663,-97.436 35.4552,-97.4192 35.4434,-97.401 35.4341,-97.3883 35.4306,-97.3751 35.4282,-97.3618 35.4263,-97.3488 35.4239,-97.3224 35.4169,-97.2983 35.4086,-97.275 35.3994,-97.2508 35.3893,-97.2429 35.3871,-97.2349 35.3863,-97.2269 35.3864,-97.2187 35.3866,-97.1633 35.3866,-97.1073 35.387,-97.0514 35.3871,-96.9964 35.3862,-96.9727 35.3856,-96.9487 35.3854,-96.9247 35.3857,-96.9011 35.3868,-96.885 35.3885,-96.869 35.3909,-96.8529 35.393,-96.8365 35.3938,-96.8104 35.3917,-96.7846 35.3875,-96.7587 35.3834,-96.7325 35.3819,-96.6625 35.3819,-96.5717 35.3811,-96.485 35.3814,-96.4278 35.3847,-96.385 35.3941,-96.3463 35.4054,-96.3035 35.4164,-96.2486 35.4247,-96.191 35.4274,-96.0988 35.4296,-96.0112 35.4309,-95.9677 35.4306)
+LINESTRING(-97.4742 35.4732,-97.4772 35.4729,-97.4801 35.4726,-97.4831 35.4723,-97.4861 35.472,-97.4911 35.4532,-97.4933 35.4324,-97.4943 35.4115,-97.4956 35.3922)
+LINESTRING(-94.2232 35.5244,-94.2165 35.5256,-94.2106 35.527,-94.2051 35.5284,-94.1996 35.5297,-94.1933 35.5307,-94.1827 35.5332,-94.1739 35.5344,-94.1651 35.5346,-94.1539 35.5337,-94.1448 35.5375,-94.1372 35.5386,-94.1304 35.539,-94.1236 35.5406,-94.0745 35.5598,-94.0441 35.5681,-94.0102 35.5694,-93.9507 35.5677,-93.9408 35.5688,-93.9267 35.5715,-93.9114 35.5738,-93.8977 35.574,-93.8885 35.5687,-93.872 35.5679,-93.848 35.5666,-93.825 35.5638,-93.8114 35.5585,-93.7852 35.5567,-93.749 35.5508,-93.7117 35.5443,-93.6821 35.5409,-93.6269 35.5402,-93.5991 35.5383,-93.5723 35.5333,-93.5587 35.53,-93.5316 35.5238,-93.5183 35.5204,-93.5013 35.5146,-93.4877 35.5091,-93.4727 35.5055,-93.4517 35.505,-93.4369 35.5041,-93.4199 35.5012,-93.4058 35.4981,-93.3995 35.4966,-93.3486 35.4787,-93.3086 35.4522,-93.2766 35.4263,-93.2497 35.41,-93.2406 35.4074,-93.2306 35.4059,-93.2206 35.4047,-93.2116 35.4031,-93.1899 35.3978,-93.1664 35.3916,-93.143 35.3848,-93.1221 35.3779,-93.0923 35.3597,-93.0577 35.3314,-93.0246 35.3043,-92.9992 35.2901,-92.9813 35.2845,-92.9611 35.2765,-92.9408 35.2698,-92.9227 35.2678,-92.8985 35.2687,-92.8702 35.2673,-92.8439 35.263,-92.8256 35.2552,-92.8035 35.2379,-92.7812 35.2225,-92.7566 35.2097,-92.7276 35.2006,-92.7174 35.1992,-92.6962 35.1981,-92.6861 35.1966,-92.677 35.1936,-92.6693 35.1897,-92.6609 35.1863,-92.6493 35.1843,-92.6261 35.1849,-92.6018 35.1877,-92.5777 35.1894,-92.5549 35.1872,-92.5254 35.1763,-92.505 35.1632,-92.4919 35.1518,-92.4843 35.1462,-92.4669 35.1432,-92.4488 35.1413,-92.4311 35.1384,-92.4093 35.1185)
+LINESTRING(-117.564 33.8778,-117.514 33.8897,-117.465 33.908,-117.42 33.9312,-117.378 33.9577,-117.378 33.9607,-117.378 33.9637,-117.379 33.9666,-117.379 33.9696,-117.36 33.9886,-117.334 34.0157,-117.31 34.0432)
+LINESTRING(-117.973 33.8566,-117.943 33.8544,-117.914 33.8522,-117.886 33.8494,-117.856 33.8455,-117.852 33.8468,-117.848 33.8481,-117.844 33.8494,-117.839 33.8507,-117.836 33.8492,-117.833 33.8475,-117.83 33.8454,-117.827 33.8432,-117.809 33.8507,-117.792 33.8518,-117.775 33.8551,-117.752 33.8694,-117.744 33.8697,-117.735 33.8687,-117.726 33.8667,-117.719 33.8639,-117.714 33.8644,-117.708 33.8656,-117.702 33.8674,-117.697 33.8699,-117.691 33.8683,-117.684 33.8671,-117.676 33.8666,-117.67 33.8672,-117.648 33.8752,-117.619 33.8793,-117.589 33.88,-117.564 33.8778)
+LINESTRING(-118.092 33.7836,-118.092 33.7867,-118.091 33.7899,-118.09 33.7931,-118.089 33.7963,-118.087 33.7985,-118.085 33.8007,-118.082 33.803,-118.08 33.8052,-118.082 33.8281,-118.095 33.8633,-118.104 33.9039,-118.094 33.9427)
+LINESTRING(-118.466 34.1598,-118.467 34.1476,-118.47 34.1347,-118.474 34.1222,-118.48 34.1109,-118.469 34.0804,-118.451 34.0508,-118.429 34.0229,-118.405 33.9975,-118.396 33.9887,-118.385 33.9796,-118.374 33.9702,-118.367 33.9607,-118.366 33.945,-118.365 33.9292,-118.366 33.9133,-118.366 33.8975,-118.359 33.8897,-118.351 33.8808,-118.342 33.8725,-118.333 33.8663,-118.307 33.858,-118.291 33.8578,-118.274 33.852,-118.247 33.8267,-118.231 33.8256,-118.214 33.8255,-118.198 33.823,-118.185 33.8147,-118.163 33.8121,-118.135 33.8056,-118.109 33.7958,-118.092 33.7836)
+LINESTRING(-105.923 35.6298,-105.928 35.6329,-105.935 35.6357,-105.943 35.6371,-105.95 35.6363,-105.99 35.6222,-106.028 35.6062,-106.063 35.5876,-106.098 35.5655,-106.111 35.5561,-106.125 35.5461,-106.139 35.5366,-106.154 35.5288,-106.172 35.5236,-106.193 35.5209,-106.214 35.5175,-106.234 35.5101,-106.243 35.5045,-106.251 35.498,-106.259 35.4915,-106.268 35.4855,-106.371 35.4139,-106.46 35.3269,-106.532 35.2245,-106.588 35.107)
+LINESTRING(-83.0005 34.4993,-83.0062 34.4978,-83.021 34.492,-83.03 34.4854,-83.0488 34.4779,-83.0677 34.4709,-83.0867 34.4638,-83.1054 34.4563,-83.1439 34.4378,-83.181 34.4174,-83.2179 34.3968,-83.2561 34.3779,-83.2831 34.3667,-83.3112 34.3555,-83.3385 34.3433,-83.3628 34.329,-83.3876 34.3113,-83.4123 34.2933,-83.4368 34.275,-83.4608 34.2564,-83.4912 34.2363,-83.5249 34.2191,-83.5598 34.2033,-83.5937 34.1872,-83.6136 34.1752,-83.6323 34.162,-83.6512 34.149,-83.6716 34.1377,-83.6963 34.1301,-83.7226 34.1263,-83.7505 34.1218,-83.7801 34.112,-83.7978 34.105,-83.8162 34.0996,-83.8351 34.0952,-83.8542 34.0915,-83.8992 34.0812,-83.9454 34.0677,-83.9904 34.0516,-84.0315 34.0337)
+LINESTRING(-83.7964 34.2753,-83.8007 34.2557,-83.811 34.241,-83.8243 34.2275,-83.84 34.2128,-83.8566 34.1976,-83.872 34.1849,-83.8879 34.1727,-83.9062 34.159,-83.9258 34.1451,-83.9435 34.1332,-83.9603 34.1206,-83.9771 34.1049,-83.9862 34.0939,-83.9933 34.0835,-84.0002 34.0729,-84.0092 34.0616,-84.0155 34.055,-84.0213 34.0493,-84.0267 34.0433,-84.0315 34.0337)
+LINESTRING(-89.8351 34.9703,-89.8319 34.9678,-89.8291 34.9646,-89.8262 34.9612,-89.8228 34.9582,-89.8147 34.9512,-89.8074 34.9433,-89.8001 34.9357,-89.792 34.9294,-89.7764 34.9203,-89.762 34.9121,-89.7481 34.9029,-89.7338 34.8911,-89.7274 34.8877,-89.7149 34.8823,-89.7018 34.8771,-89.6936 34.8747,-89.6829 34.8757,-89.6713 34.871,-89.6604 34.8645,-89.6522 34.8596,-89.6092 34.8429,-89.5648 34.8285,-89.5205 34.8135,-89.4778 34.7953,-89.4619 34.7724,-89.4453 34.7495,-89.4251 34.7289,-89.3984 34.7132)
+LINESTRING(-108.741 35.5018,-108.698 35.5078,-108.655 35.5111,-108.615 35.5118,-108.582 35.5099,-108.559 35.5048,-108.535 35.4961,-108.511 35.4867,-108.488 35.4792,-108.476 35.4767,-108.464 35.4746,-108.452 35.472,-108.44 35.468,-108.378 35.4417,-108.335 35.4263,-108.289 35.4143,-108.219 35.3983,-108.166 35.3906,-108.099 35.379,-108.038 35.3623,-108.004 35.3409,-107.998 35.3304,-107.994 35.3208,-107.992 35.3106,-107.99 35.2993,-107.991 35.2825,-107.994 35.2676,-107.997 35.2528,-107.997 35.2359,-107.994 35.2223,-107.986 35.2114,-107.975 35.2013,-107.963 35.1906,-107.946 35.1745,-107.929 35.1583,-107.914 35.143,-107.896 35.1254,-107.87 35.1,-107.845 35.0799,-107.815 35.0648,-107.777 35.0543,-107.762 35.046,-107.748 35.0398,-107.732 35.0362,-107.715 35.0358,-107.69 35.045,-107.671 35.0636,-107.653 35.0849,-107.632 35.102,-107.623 35.1051,-107.614 35.1061,-107.604 35.1061,-107.594 35.1064,-107.572 35.1078,-107.551 35.1075,-107.532 35.1037,-107.513 35.0947,-107.5 35.0772,-107.493 35.0538,-107.487 35.0301,-107.474 35.0119,-107.448 34.9993,-107.419 34.9964,-107.386 35.001,-107.35 35.0112,-107.34 35.0022,-107.332 34.997,-107.324 34.9948,-107.311 34.995,-107.285 34.9968,-107.26 34.9986,-107.234 35.0004,-107.209 35.0022,-107.185 34.9999,-107.165 34.9925,-107.145 34.9851,-107.122 34.9827,-107.095 34.9885,-107.073 34.9988,-107.05 35.0097,-107.023 35.0175,-107.011 35.022,-106.999 35.0271,-106.987 35.032,-106.975 35.036,-106.935 35.0439,-106.862 35.0572,-106.811 35.0662,-106.76 35.0753,-106.743 35.087,-106.726 35.0986,-106.708 35.1103,-106.691 35.122,-106.665 35.1235,-106.638 35.1215,-106.612 35.1159,-106.588 35.107)
+LINESTRING(-98.3309 35.5347,-98.3761 35.5298,-98.4278 35.5294,-98.4799 35.531,-98.5265 35.532,-98.5636 35.5341,-98.6046 35.5379,-98.645 35.5397,-98.6802 35.5357,-98.6834 35.5315,-98.6867 35.5274,-98.69 35.5232,-98.6932 35.519,-98.7129 35.519,-98.7306 35.5213,-98.7481 35.5239,-98.7672 35.5251,-98.7927 35.5245,-98.8172 35.5231,-98.8415 35.5208,-98.8667 35.5175,-98.8766 35.5167,-98.8871 35.5166,-98.8976 35.5163,-98.9074 35.5148,-98.9159 35.5118,-98.9242 35.5078,-98.9324 35.5038,-98.9407 35.5008,-98.9513 35.4989,-98.962 35.4982,-98.9727 35.4978,-98.9831 35.4967,-98.9944 35.4935,-99.0057 35.4891,-99.0172 35.4849,-99.0288 35.4822,-99.0539 35.4805,-99.0794 35.4799,-99.1046 35.4782,-99.1286 35.473,-99.1584 35.4546,-99.1897 35.4372,-99.2228 35.4255,-99.2579 35.4242,-99.2625 35.4263,-99.267 35.4283,-99.2715 35.4303,-99.276 35.4324,-99.2857 35.4309,-99.3062 35.4275,-99.3293 35.4239,-99.3471 35.4217,-99.367 35.4151,-99.3847 35.4023,-99.4053 35.3897,-99.4338 35.3838,-99.4513 35.3835,-99.4688 35.3832,-99.4862 35.3829,-99.5037 35.3826,-99.5179 35.3805,-99.5314 35.3754,-99.544 35.3685,-99.5556 35.3612,-99.5664 35.3544,-99.5771 35.3476,-99.5877 35.3406,-99.5975 35.3331,-99.6109 35.3148,-99.618 35.2939,-99.6273 35.274,-99.6471 35.2584,-99.7091 35.254,-99.747 35.2437,-99.7773 35.2333,-99.8168 35.2288,-99.841 35.2289,-99.8651 35.2291,-99.8893 35.2292,-99.9134 35.2293,-99.997 35.2287,-100.001 35.2287)
+LINESTRING(-100.001 35.2287,-100.08 35.2275,-100.164 35.2275,-100.249 35.2309)
+LINESTRING(-103.042 35.1827,-103.026 35.184,-102.994 35.1867,-102.975 35.1899,-102.94 35.2021,-102.905 35.2142,-102.87 35.2263,-102.834 35.2384,-102.812 35.2455,-102.781 35.2553,-102.751 35.264,-102.735 35.2684,-102.689 35.2739,-102.637 35.2752,-102.585 35.2724,-102.537 35.2656,-102.518 35.2619,-102.499 35.2583,-102.48 35.2544,-102.461 35.2499,-102.455 35.2473,-102.448 35.2436,-102.442 35.2398,-102.435 35.2369,-102.423 35.2347,-102.414 35.2355,-102.405 35.237,-102.396 35.2372,-102.373 35.2334,-102.349 35.2282,-102.326 35.2226,-102.303 35.2177,-102.284 35.215,-102.266 35.2129,-102.247 35.2111,-102.229 35.2092,-102.194 35.2064,-102.171 35.2057,-102.145 35.2025,-102.102 35.1924,-102.065 35.1888,-102.001 35.1863,-101.939 35.1849,-101.904 35.1849,-101.888 35.1871,-101.872 35.1902,-101.856 35.1922,-101.839 35.1909)
+LINESTRING(-101.839 35.1909,-101.806 35.1901,-101.772 35.1883,-101.736 35.1872,-101.699 35.1903)
+LINESTRING(-117.973 33.8566,-117.946 33.8407,-117.929 33.8288,-117.914 33.8147,-117.893 33.7923,-117.889 33.791,-117.886 33.7897,-117.882 33.7884,-117.878 33.7871,-117.872 33.78,-117.866 33.7725,-117.861 33.7649,-117.855 33.7572,-117.849 33.7546,-117.843 33.7494,-117.838 33.7436,-117.832 33.7392,-117.819 33.7329,-117.805 33.7264,-117.793 33.7191,-117.781 33.7102,-117.773 33.701,-117.764 33.6895,-117.757 33.6775,-117.751 33.6666,-117.747 33.6608,-117.742 33.6551,-117.738 33.6493,-117.734 33.6436)
+LINESTRING(-118.092 33.7836,-118.091 33.7812,-118.09 33.7788,-118.088 33.7766,-118.086 33.7744,-118.074 33.7742,-118.062 33.7738,-118.05 33.7736,-118.038 33.7738,-118.013 33.7521,-117.979 33.7251,-117.943 33.7009,-117.912 33.6875,-117.902 33.6867,-117.892 33.6868,-117.882 33.6869,-117.873 33.6856,-117.844 33.6778,-117.815 33.6691,-117.787 33.6597,-117.759 33.6499,-117.753 33.6483,-117.746 33.6467,-117.74 33.6451,-117.734 33.6436)
+LINESTRING(-100.249 35.2309,-100.271 35.229,-100.293 35.2272,-100.315 35.2253,-100.337 35.2234,-100.39 35.2226,-100.453 35.2257,-100.518 35.229,-100.576 35.2288,-100.605 35.227,-100.635 35.2249,-100.664 35.2223,-100.693 35.2191,-100.701 35.2177,-100.708 35.2156,-100.716 35.2135,-100.724 35.2121,-100.734 35.2119,-100.746 35.2126,-100.758 35.2137,-100.769 35.2141,-100.779 35.208,-100.797 35.1979,-100.817 35.1885,-100.832 35.1842,-100.922 35.1838,-100.994 35.1884,-101.066 35.1972,-101.157 35.2091,-101.209 35.2114,-101.261 35.2089,-101.314 35.2064,-101.364 35.2087,-101.371 35.2108,-101.378 35.2141,-101.385 35.2172,-101.394 35.2184,-101.412 35.2177,-101.429 35.217,-101.447 35.2165,-101.464 35.2166,-101.49 35.2186,-101.518 35.2219,-101.546 35.2242,-101.572 35.2234,-101.593 35.2192,-101.602 35.2141,-101.608 35.2091,-101.617 35.2051,-101.636 35.2035,-101.661 35.203,-101.685 35.1999,-101.699 35.1903)
+LINESTRING(-80.548 33.3192,-80.5366 33.3432,-80.5252 33.3671,-80.5138 33.3911,-80.5024 33.415,-80.4928 33.4358,-80.4831 33.4566,-80.4715 33.4811,-80.4656 33.4927,-80.4326 33.5221,-80.4029 33.5477,-80.3709 33.5719,-80.3309 33.5966,-80.3221 33.6041,-80.3059 33.6188,-80.2901 33.6339,-80.282 33.6422,-80.2796 33.65,-80.278 33.6563,-80.2602 33.6808,-80.2387 33.7091,-80.2141 33.7344,-80.1872 33.7498,-80.1583 33.8015,-80.1038 33.881,-80.0477 33.9583,-80.0144 34.0035,-79.9883 34.0345,-79.9567 34.0663,-79.9238 34.0982,-79.8941 34.1293,-79.8821 34.1458,-79.8722 34.163,-79.8618 34.1801,-79.8481 34.1961)
+LINESTRING(-80.548 33.3192,-80.5901 33.3569,-80.6365 33.392,-80.6846 33.4257,-80.7316 33.4595,-80.7568 33.4812,-80.78 33.5061,-80.8024 33.5319,-80.8249 33.5565,-80.8403 33.5747,-80.8526 33.5938,-80.8629 33.6138,-80.8727 33.6348,-80.8859 33.6599,-80.9015 33.6847,-80.9178 33.7094,-80.9332 33.7336,-80.9479 33.7516,-80.9616 33.7604,-80.9746 33.7665,-80.9868 33.7763,-81.0036 33.8007,-81.0164 33.8271,-81.027 33.8542,-81.0371 33.8809,-81.0435 33.8924,-81.051 33.9042,-81.0597 33.9146,-81.0698 33.9218,-81.0703 33.9268,-81.085 33.9432,-81.0966 33.9589,-81.1042 33.9759,-81.107 33.9963,-81.1073 34.0039,-81.1071 34.0122,-81.1048 34.02,-81.0987 34.0263,-81.1037 34.0317,-81.1092 34.0368)
+LINESTRING(-106.588 35.107,-106.547 35.0907,-106.504 35.0734,-106.459 35.0637,-106.416 35.0702,-106.413 35.0723,-106.411 35.0745,-106.408 35.0767,-106.406 35.0788,-106.4 35.079,-106.394 35.0791,-106.388 35.0792,-106.382 35.0794,-106.368 35.0887,-106.353 35.0967,-106.338 35.1052,-106.325 35.1163,-106.314 35.115,-106.304 35.111,-106.295 35.1057,-106.286 35.101,-106.23 35.0785,-106.156 35.0483,-106.085 35.0204,-106.037 35.0051,-105.985 35.0037,-105.883 35.0035,-105.798 35.0037,-105.713 35.0038,-105.711 35.0053,-105.708 35.0068,-105.706 35.0082,-105.703 35.0097,-105.693 35.0093,-105.683 35.009,-105.672 35.0086,-105.662 35.0082)
+LINESTRING(-103.701 35.1577,-103.697 35.1596,-103.686 35.1659,-103.675 35.1724,-103.63 35.1734,-103.585 35.176,-103.54 35.1794,-103.495 35.1828,-103.489 35.1776,-103.484 35.1703,-103.475 35.1617,-103.458 35.1529,-103.429 35.1416,-103.399 35.1303,-103.37 35.1189,-103.34 35.1076,-103.334 35.1061,-103.327 35.1059,-103.32 35.1064,-103.313 35.1073,-103.265 35.1172,-103.218 35.1314,-103.171 35.1476,-103.125 35.1637,-103.115 35.1674,-103.104 35.1719,-103.093 35.176,-103.083 35.1787,-103.059 35.1814,-103.042 35.1827)
+LINESTRING(-81.1092 34.0368,-81.1259 34.0286,-81.1518 34.0142,-81.1769 33.9993,-81.1912 33.9898,-81.1958 33.9852,-81.2002 33.9803,-81.2047 33.9756,-81.2391 33.9536,-81.2701 33.9394,-81.3013 33.9258,-81.3315 33.9104,-81.381 33.8755,-81.4262 33.8354,-81.471 33.7946,-81.5186 33.7574,-81.5475 33.7373,-81.5775 33.716,-81.6081 33.6957,-81.639 33.6781,-81.6546 33.6719,-81.6714 33.6666,-81.688 33.6612,-81.7027 33.6541,-81.7116 33.6489,-81.7205 33.6444,-81.73 33.6407,-81.7406 33.638,-81.7498 33.636,-81.759 33.6338,-81.7682 33.6316,-81.7775 33.6295,-81.7849 33.6286,-81.7925 33.6281,-81.8001 33.6277,-81.8073 33.6266,-81.8286 33.6173,-81.8693 33.5978,-81.9112 33.5773,-81.9361 33.5647,-81.9428 33.5577,-81.9491 33.55,-81.9826 33.5395,-82.0103 33.5293,-82.0129 33.5281)
+LINESTRING(-92.2328 34.7808,-92.1875 34.7814,-92.1431 34.7845,-92.0988 34.7884,-92.0538 34.7914,-92.0438 34.7931,-92.0342 34.7962,-92.0247 34.7993,-92.0152 34.801,-91.9811 34.8033,-91.9419 34.8059,-91.9027 34.8072,-91.8685 34.8059,-91.843 34.803,-91.8184 34.8003,-91.7935 34.7985,-91.7672 34.7985,-91.7529 34.7995,-91.7387 34.8008,-91.7246 34.8019,-91.7101 34.8022,-91.703 34.8015,-91.6961 34.802,-91.684 34.8066,-91.6726 34.8119,-91.6608 34.8163,-91.6479 34.8182,-91.6142 34.8184,-91.5806 34.8186,-91.5367 34.8192,-91.5135 34.8204,-91.491 34.8275,-91.4689 34.8354,-91.4462 34.8424,-91.422 34.8468,-91.4109 34.8472,-91.3992 34.8467,-91.3875 34.846,-91.3761 34.8457,-91.3524 34.8487,-91.328 34.8559,-91.3044 34.8649,-91.2829 34.8733,-91.2369 34.8985,-91.2011 34.9088,-91.1652 34.9152,-91.1186 34.9285,-91.1078 34.9296,-91.0967 34.9301,-91.0596 34.9401,-91.0229 34.9523,-90.9863 34.9644,-90.9492 34.9743,-90.9417 34.9754,-90.934 34.976,-90.9263 34.9766,-90.9189 34.9777,-90.8858 34.9862,-90.8536 34.9964,-90.8221 35.0069,-90.7916 35.0162,-90.7711 35.0183,-90.7504 35.0164,-90.7323 35.0136,-90.7198 35.0131,-90.6774 35.0382,-90.645 35.0587,-90.6147 35.0756,-90.5786 35.0896,-90.5608 35.0955,-90.5424 35.1018,-90.5238 35.1077,-90.5057 35.1123,-90.4716 35.1215,-90.4387 35.1324,-90.4099 35.1413,-90.3884 35.1443,-90.3518 35.1438,-90.2998 35.1469,-90.2428 35.1557,-90.1916 35.1726)
+LINESTRING(-92.2328 34.7808,-92.2157 34.8014,-92.2069 34.8116,-92.1977 34.8213,-92.191 34.8263,-92.1836 34.83,-92.1758 34.8332,-92.168 34.8368,-92.1501 34.8488,-92.1259 34.8679,-92.1026 34.8884,-92.0875 34.9045,-92.085 34.9107,-92.0829 34.9198,-92.0802 34.9358,-92.0718 34.944,-92.041 34.9712,-92.0222 34.9836,-92.0047 34.9932,-91.9782 35.0117,-91.9707 35.0195,-91.9644 35.0289,-91.9581 35.0385,-91.9512 35.0466,-91.9355 35.0586,-91.9177 35.0696,-91.8993 35.0803,-91.8821 35.0911,-91.8209 35.1346,-91.7732 35.1724,-91.7303 35.2115,-91.6836 35.2591,-91.6599 35.2833,-91.6428 35.2972,-91.6235 35.3076,-91.5932 35.3211,-91.5695 35.3196,-91.5577 35.3191,-91.5458 35.3191,-91.4921 35.3715,-91.4602 35.4018,-91.4431 35.4171,-91.3766 35.4514,-91.3325 35.4675,-91.2972 35.4898,-91.2569 35.5425,-91.2468 35.5831)
+LINESTRING(-92.4093 35.1185,-92.4051 35.1143,-92.4009 35.108,-92.3976 35.1014,-92.394 35.094,-92.3871 35.0813,-92.3818 35.0696,-92.3789 35.0576,-92.3787 35.044,-92.3797 35.0338,-92.3807 35.0237,-92.3817 35.0136,-92.3827 35.0035,-92.3825 34.9986,-92.3814 34.9943,-92.3802 34.99,-92.38 34.9851,-92.3817 34.968,-92.3834 34.951,-92.3851 34.9339,-92.3868 34.9169,-92.3861 34.905,-92.3824 34.8947,-92.377 34.8846,-92.3713 34.8734,-92.3644 34.8618,-92.3561 34.853,-92.3468 34.8447,-92.3367 34.8347,-92.3172 34.821,-92.2946 34.8147,-92.2703 34.8097,-92.2459 34.7999,-92.2426 34.7951,-92.2394 34.7903,-92.2361 34.7856,-92.2328 34.7808)
+LINESTRING(-101.839 35.1909,-101.848 35.185,-101.856 35.1793,-101.863 35.1731,-101.87 35.1659,-101.876 35.1591,-101.881 35.1521,-101.887 35.1451,-101.891 35.1393,-101.892 35.1385,-101.893 35.1378,-101.91 35.1214,-101.926 35.0997,-101.937 35.0762,-101.94 35.0528)
+LINESTRING(-97.4956 35.3922,-97.514 35.3943,-97.5332 35.3951,-97.5525 35.3959,-97.5716 35.3977,-97.577 35.3787,-97.5891 35.3383,-97.6016 35.2979,-97.6082 35.2788,-97.6291 35.2687,-97.6646 35.2505,-97.6998 35.2319,-97.7196 35.2206,-97.7757 35.1805,-97.8343 35.1344,-97.8852 35.0838,-97.9181 35.0305,-97.9229 35.0287,-97.9277 35.027,-97.9325 35.0252,-97.9373 35.0234)
+LINESTRING(-104.664 34.9362,-104.658 34.9381,-104.652 34.9393,-104.645 34.9401,-104.639 34.9404,-104.615 34.9554,-104.57 34.9771,-104.522 34.9982,-104.491 35.0117,-104.482 35.0107,-104.469 35.0094,-104.456 35.0089,-104.447 35.0103,-104.397 35.0315,-104.345 35.0499,-104.29 35.0633,-104.234 35.0695,-104.214 35.0679,-104.196 35.0642,-104.178 35.062,-104.158 35.0647,-104.109 35.0803,-104.054 35.0979,-103.998 35.1133,-103.947 35.1225,-103.926 35.1223,-103.904 35.1193,-103.882 35.1154,-103.861 35.1128,-103.849 35.117,-103.839 35.1239,-103.829 35.1315,-103.819 35.1379,-103.795 35.1454,-103.771 35.1478,-103.746 35.1478,-103.72 35.1478,-103.709 35.1536,-103.701 35.1577)
+LINESTRING(-105.662 35.0082,-105.634 35.0063,-105.606 35.0044,-105.578 35.0025,-105.551 35.0006,-105.548 35.0024,-105.546 35.0042,-105.544 35.006,-105.542 35.0078,-105.512 35.0098,-105.48 35.0071,-105.448 35.0025,-105.416 34.9991,-105.353 34.9958,-105.29 34.9933,-105.227 34.991,-105.163 34.988,-105.066 34.9828,-104.97 34.9783,-104.873 34.9749,-104.775 34.9733,-104.747 34.9698,-104.727 34.9614,-104.71 34.9507,-104.691 34.9401,-104.684 34.9403,-104.677 34.9395,-104.67 34.9381,-104.664 34.9362)
+LINESTRING(-82.0129 33.5281,-82.0365 33.517,-82.0653 33.5006,-82.1106 33.487,-82.1686 33.4852,-82.2279 33.4898,-82.2773 33.4953,-82.2869 33.4958,-82.2966 33.4957,-82.3063 33.4958,-82.3158 33.4965,-82.3246 33.4984,-82.3338 33.5012,-82.343 33.5039,-82.3515 33.5053,-82.3889 33.5071,-82.4272 33.5088,-82.4654 33.5109,-82.5029 33.5138)
+LINESTRING(-84.3783 33.8074,-84.3676 33.8098,-84.3552 33.8142,-84.3419 33.8194,-84.3286 33.8241,-84.3247 33.8281,-84.3209 33.8322,-84.317 33.8362,-84.3132 33.8403,-84.2964 33.8472,-84.2785 33.8572,-84.2615 33.8681,-84.2474 33.8778,-84.2315 33.8893,-84.2144 33.9017,-84.1967 33.9139,-84.1784 33.9245,-84.1551 33.9373,-84.1318 33.951,-84.1085 33.9644,-84.085 33.9763,-84.0784 33.9933,-84.0656 34.0095,-84.0492 34.0234,-84.0315 34.0337)
+LINESTRING(-84.3783 33.8074,-84.3874 33.8191,-84.4036 33.8376,-84.4206 33.8569,-84.4319 33.8711,-84.4461 33.8904,-84.4611 33.9067,-84.4772 33.9222,-84.4949 33.9389,-84.4996 33.9456,-84.5021 33.9531,-84.5042 33.9605,-84.5076 33.9669,-84.5238 33.9834,-84.5415 33.9985,-84.5591 34.014,-84.5747 34.0312,-84.5847 34.047,-84.5945 34.0632,-84.6071 34.0782,-84.6258 34.09,-84.6495 34.0954,-84.6724 34.0938,-84.6951 34.0895,-84.7184 34.0869,-84.7262 34.0908,-84.7418 34.1087,-84.7525 34.1173,-84.7597 34.1236,-84.765 34.1342,-84.7718 34.1473,-84.7707 34.1687,-84.7658 34.1909,-84.7616 34.2062,-84.7455 34.2116,-84.7379 34.2142,-84.7352 34.2219,-84.7439 34.2354,-84.7631 34.2409,-84.7862 34.2452,-84.8065 34.2545,-84.8204 34.2705,-84.8285 34.2874,-84.8356 34.3043,-84.8465 34.3204,-84.8634 34.3361,-84.8843 34.3542,-84.9036 34.3723,-84.9155 34.3879,-84.9176 34.3953,-84.9184 34.404,-84.9185 34.4128,-84.9185 34.4205,-84.9167 34.45,-84.9129 34.4831,-84.9119 34.5155,-84.9182 34.5428,-84.9421 34.5695,-84.9623 34.6085,-84.9798 34.6466,-84.9957 34.6705,-84.9981 34.7036,-84.9976 34.7364,-84.9972 34.7692,-85.0002 34.8022,-85.0065 34.8061,-85.0128 34.8101,-85.0133 34.8213,-85.0139 34.8324,-85.0152 34.844,-85.0178 34.8536,-85.0434 34.8781,-85.084 34.8952,-85.1229 34.9076,-85.1434 34.9182,-85.1488 34.9279,-85.1541 34.9375,-85.1725 34.9494,-85.1867 34.9673,-85.1976 34.9867)
+LINESTRING(-92.2328 34.7808,-92.2422 34.7631,-92.2515 34.7453,-92.2608 34.7276,-92.2701 34.7099)
+LINESTRING(-86.0739 34.02,-86.0756 34.0241,-86.0772 34.0282,-86.0536 34.0443,-86.0204 34.0669,-85.9925 34.0896,-85.9847 34.1057,-85.9864 34.1141,-85.9882 34.1224,-85.9899 34.1308,-85.9917 34.1392,-85.9763 34.1629,-85.9416 34.2048,-85.9038 34.248,-85.8796 34.2759,-85.8714 34.2869,-85.8638 34.2983,-85.8563 34.3097,-85.8481 34.3207,-85.838 34.3317,-85.8271 34.3423,-85.8162 34.353,-85.8065 34.3641,-85.8003 34.3735,-85.795 34.3837,-85.7898 34.3938,-85.7839 34.4035,-85.7651 34.4257,-85.7433 34.4472,-85.7209 34.4687,-85.7006 34.4906,-85.6942 34.5038,-85.6923 34.5184,-85.6906 34.5331,-85.6849 34.5468,-85.6763 34.5573,-85.6664 34.5675,-85.6561 34.5775,-85.6465 34.5875,-85.6362 34.6031,-85.6284 34.6205,-85.6202 34.6381,-85.6089 34.6544,-85.5952 34.6694,-85.5815 34.6845,-85.5677 34.6995,-85.554 34.7145,-85.554 34.7145)
+LINESTRING(-84.3783 33.8074,-84.3806 33.7984,-84.383 33.7893,-84.3853 33.7803,-84.3877 33.7712)
+LINESTRING(-95.5319 35.454,-95.5429 35.4415,-95.5491 35.4273,-95.5532 35.4123,-95.5581 35.3975,-95.5762 35.361,-95.5903 35.3331,-95.5978 35.3048,-95.596 35.2671,-95.6019 35.2606,-95.6157 35.2514,-95.6298 35.2421,-95.6364 35.2353,-95.6864 35.1809,-95.7212 35.1353,-95.7489 35.0813,-95.7776 35.0019,-95.7807 34.9663,-95.7867 34.9314,-95.7967 34.8974,-95.8118 34.8646)
+LINESTRING(-95.9677 35.4306,-95.9688 35.4261,-95.9698 35.4217,-95.9709 35.4166,-95.9712 35.4134,-95.97 35.4094,-95.9687 35.4055,-95.9675 35.4015,-95.9662 35.3975,-95.9612 35.3758,-95.9579 35.3531,-95.9549 35.3315,-95.9504 35.3134,-95.9432 35.2983,-95.9344 35.2836,-95.9261 35.2687,-95.9207 35.2531,-95.919 35.2366,-95.9191 35.2195,-95.919 35.2024,-95.9166 35.1863,-95.9115 35.173,-95.9046 35.16,-95.8976 35.147,-95.8923 35.1338,-95.8869 35.1093,-95.8843 35.0845,-95.8829 35.0597,-95.8811 35.035,-95.8802 35.0301,-95.8785 35.0249,-95.8768 35.0199,-95.875 35.0148,-95.8624 34.9842,-95.846 34.954,-95.8305 34.9235,-95.8202 34.892,-95.819 34.8849,-95.8178 34.8784,-95.8157 34.8718,-95.8118 34.8646)
+LINESTRING(-84.3877 33.7712,-84.3877 33.7398)
+LINESTRING(-84.4903 33.7636,-84.4715 33.7576,-84.4443 33.7484,-84.4144 33.7409,-84.3877 33.7398)
+LINESTRING(-117.137 33.4823,-117.132 33.5497,-117.149 33.6838,-117.169 33.7753,-117.199 33.857,-117.235 33.9457,-117.31 34.0432)
+LINESTRING(-117.564 33.8778,-117.564 33.872,-117.565 33.8662,-117.566 33.8604,-117.566 33.8546,-117.526 33.8369,-117.509 33.8165,-117.5 33.7963,-117.484 33.7791,-117.484 33.7749,-117.484 33.7707,-117.484 33.7665,-117.483 33.7623,-117.477 33.7626,-117.471 33.7629,-117.465 33.7633,-117.458 33.7636,-117.44 33.7495,-117.417 33.741,-117.394 33.7342,-117.372 33.7252,-117.333 33.6965,-117.3 33.6621,-117.27 33.6255,-117.24 33.5899,-117.227 33.5777,-117.212 33.5664,-117.196 33.5555,-117.181 33.5446,-117.17 33.5322,-117.157 33.5146,-117.146 33.4965,-117.137 33.4823)
+LINESTRING(-89.1189 34.5588,-89.1082 34.549,-89.0894 34.5373,-89.069 34.5266,-89.0536 34.5197,-89.0376 34.4975,-89.0229 34.484,-89.0045 34.4741,-88.9774 34.4627,-88.9587 34.4423,-88.9252 34.4136,-88.8897 34.3868,-88.865 34.3721,-88.8552 34.3595,-88.8345 34.3437,-88.8124 34.3277,-88.798 34.3142,-88.7946 34.3133,-88.7913 34.3123,-88.788 34.3114,-88.7847 34.3104,-88.7796 34.3122,-88.7619 34.3044,-88.7432 34.2976,-88.7244 34.2908,-88.7061 34.2832)
+LINESTRING(-88.7061 34.2832,-88.6631 34.284,-88.5896 34.2831,-88.5143 34.2756,-88.4659 34.2567,-88.3883 34.2502,-88.274 34.2322,-88.1864 34.213)
+LINESTRING(-84.3877 33.7398,-84.3684 33.7357,-84.3446 33.7281,-84.3231 33.7203,-84.3111 33.7153,-84.2978 33.7111,-84.2856 33.7114,-84.2734 33.7138,-84.2603 33.7163,-84.2385 33.716,-84.2155 33.7117,-84.1923 33.7064,-84.1701 33.7031,-84.1563 33.7032,-84.1425 33.7043,-84.1287 33.7055,-84.115 33.706,-84.109 33.7043,-84.0968 33.7005,-84.0868 33.6973,-84.0767 33.6941,-84.0734 33.6896,-84.068 33.6829,-84.0625 33.6767,-84.0588 33.6733,-84.0537 33.6713,-84.0479 33.67,-84.0421 33.6688,-84.0366 33.6676,-84.0207 33.6614,-84.0061 33.6531,-83.9923 33.6439,-83.9788 33.6349,-83.9735 33.6329,-83.9662 33.6316,-83.9588 33.6306,-83.9529 33.6296,-83.9453 33.627,-83.938 33.6236,-83.9308 33.6201,-83.9235 33.6176,-83.9122 33.6148,-83.901 33.612,-83.8896 33.6095,-83.8782 33.6075,-83.845 33.6132,-83.7894 33.6149,-83.7333 33.6142,-83.6991 33.6124,-83.6852 33.6102,-83.6717 33.6072,-83.6583 33.6037,-83.6449 33.6,-83.6101 33.5903,-83.5492 33.5738,-83.4893 33.5581,-83.4578 33.5513,-83.442 33.5516,-83.4261 33.5518,-83.4103 33.5521,-83.3945 33.5524,-83.3606 33.5493,-83.3331 33.5417,-83.3103 33.534,-83.2903 33.5304,-83.2608 33.5323,-83.2274 33.5367,-83.194 33.5416,-83.1647 33.5452,-83.1401 33.5467,-83.0985 33.5486,-83.058 33.5498,-83.0369 33.5494,-83.0179 33.5437,-82.9984 33.5379,-82.9786 33.5331,-82.9587 33.5303,-82.9296 33.5336,-82.8838 33.525,-82.8402 33.5129,-82.8173 33.5056,-82.8037 33.5031,-82.7887 33.5022,-82.7733 33.5015,-82.7584 33.4996,-82.7422 33.4962,-82.7259 33.4927,-82.7097 33.4893,-82.6935 33.4858,-82.6591 33.4873,-82.6048 33.4961,-82.5472 33.5067,-82.5029 33.5138)
+LINESTRING(-88.1864 34.213,-88.1563 34.2064,-88.0682 34.1765,-88.0581 34.1499,-88.0403 34.1281,-88.0161 34.1106,-87.9867 34.0967)
+LINESTRING(-79.9432 32.795,-79.9489 32.7997,-79.9528 32.8121,-79.9583 32.824,-79.9662 32.8354,-79.9742 32.844,-79.9813 32.8452,-79.9884 32.8464,-79.9929 32.8514,-79.9937 32.8573,-79.998 32.8617,-80.0031 32.8663,-80.0085 32.8706,-80.0137 32.8739,-80.0235 32.8971,-80.0357 32.919,-80.0504 32.9399,-80.0673 32.9604,-80.0678 32.9668,-80.0723 32.976,-80.0731 32.9809,-80.0789 32.9878,-80.0853 32.9924,-80.1092 33.0108,-80.1289 33.0274,-80.1484 33.044,-80.1685 33.06,-80.2131 33.0878,-80.2653 33.1143,-80.3145 33.1385,-80.3505 33.1595,-80.3695 33.1756,-80.3883 33.1938,-80.4074 33.2115,-80.4273 33.2259,-80.4345 33.2289,-80.442 33.2312,-80.4495 33.234,-80.4563 33.2383,-80.4642 33.246,-80.4715 33.2544,-80.4787 33.2628,-80.4863 33.2707,-80.5015 33.2831,-80.5173 33.2942,-80.5331 33.3056,-80.548 33.3192)
+LINESTRING(-97.9373 35.0234,-97.9589 35.0026,-97.9942 34.969,-98.0292 34.9367,-98.0498 34.9195,-98.0817 34.9012,-98.1136 34.883,-98.1454 34.8647,-98.1773 34.8464,-98.1932 34.837,-98.2098 34.8271,-98.2268 34.8179,-98.2437 34.8105,-98.2611 34.8062,-98.2694 34.8063,-98.2812 34.802,-98.3089 34.7846,-98.3313 34.7703)
+LINESTRING(-84.4903 33.7636,-84.5251 33.7715,-84.5593 33.7766,-84.5934 33.7773,-84.628 33.7722,-84.6676 33.76,-84.7157 33.7431,-84.7621 33.7275,-84.7964 33.7192,-84.8152 33.7181,-84.8351 33.7181,-84.8552 33.7186,-84.8743 33.7189,-84.9121 33.7195,-84.9493 33.7205,-84.9864 33.72,-85.0244 33.7159,-85.0377 33.7129,-85.0503 33.7088,-85.0628 33.7042,-85.0753 33.6995,-85.1014 33.692,-85.1284 33.6875,-85.1559 33.6851,-85.1836 33.6839,-85.225 33.6836,-85.2678 33.6837,-85.3104 33.6816,-85.3426 33.6759)
+LINESTRING(-117.734 33.6436,-117.718 33.6286,-117.701 33.6161,-117.683 33.604,-117.668 33.5907,-117.666 33.5784,-117.668 33.5623,-117.672 33.5456,-117.671 33.5316,-117.662 33.5194,-117.649 33.5132,-117.639 33.5066,-117.637 33.4929,-117.635 33.4879,-117.633 33.4828,-117.63 33.4778,-117.628 33.4728,-117.612 33.4554,-117.59 33.4347,-117.567 33.4154,-117.548 33.4018,-117.529 33.3908,-117.509 33.3807,-117.49 33.3701,-117.47 33.3577,-117.467 33.3554,-117.463 33.353,-117.46 33.3507,-117.456 33.3484,-117.443 33.3264,-117.416 33.2933,-117.385 33.2601,-117.362 33.2379,-117.361 33.2342,-117.36 33.2306,-117.359 33.2269,-117.359 33.2232,-117.348 33.2167,-117.342 33.2052,-117.337 33.1921,-117.332 33.1807)
+LINESTRING(-117.295 34.0635,-117.271 34.0636,-117.247 34.066,-117.224 34.0681,-117.199 34.0675,-117.179 34.0578,-117.167 34.0491,-117.157 34.0414,-117.147 34.0347,-117.132 34.0291,-117.107 34.0208,-117.083 34.0129,-117.069 34.0089,-117.063 34.0012,-117.058 33.9932,-117.053 33.9852,-117.047 33.9776,-117.036 33.9685,-117.013 33.9531,-116.989 33.9381,-116.976 33.9301,-116.951 33.9313,-116.927 33.9303,-116.903 33.9285,-116.879 33.9275,-116.864 33.9284,-116.849 33.9307,-116.833 33.9334,-116.818 33.9352,-116.81 33.9292,-116.802 33.9225,-116.774 33.9227,-116.747 33.9251,-116.719 33.9276,-116.692 33.9281,-116.669 33.9259,-116.645 33.9218,-116.622 33.9172,-116.6 33.9131,-116.581 33.911,-116.559 33.909,-116.539 33.9053,-116.522 33.8984,-116.515 33.8934,-116.51 33.8878,-116.504 33.8822,-116.498 33.8773,-116.451 33.8477,-116.388 33.8099,-116.323 33.7755,-116.272 33.7561,-116.243 33.7462,-116.226 33.7403,-116.212 33.7324,-116.192 33.7165,-116.168 33.7134,-116.146 33.7068,-116.124 33.6999,-116.102 33.6957,-116.096 33.6965,-116.09 33.6986,-116.083 33.7005,-116.073 33.7003,-116.047 33.6951,-116.02 33.6887,-115.992 33.6822,-115.964 33.677,-115.821 33.6615,-115.699 33.6617,-115.575 33.6765,-115.427 33.7048,-115.336 33.7027,-115.221 33.6769,-115.109 33.6426,-115.024 33.6152,-114.961 33.606,-114.879 33.6047,-114.796 33.607,-114.726 33.6087,-114.681 33.6086,-114.635 33.6083,-114.589 33.6074)
+LINESTRING(-114.589 33.6074,-114.545 33.6055,-114.538 33.6048,-114.537 33.6047)
+LINESTRING(-114.537 33.6047,-114.531 33.6038,-114.525 33.6028,-114.518 33.6025,-114.498 33.607,-114.461 33.6168,-114.424 33.6273,-114.401 33.6337,-114.393 33.6361,-114.386 33.6395,-114.368 33.6455,-114.351 33.6469,-114.335 33.6466,-114.319 33.6472,-114.299 33.6498,-114.28 33.653,-114.261 33.6564,-114.241 33.6594,-114.235 33.6602,-114.229 33.6611,-114.222 33.662,-114.216 33.6629)
+LINESTRING(-114.216 33.6629,-114.187 33.6668,-114.153 33.6732,-114.12 33.6783,-114.095 33.6783,-114.094 33.679,-114.093 33.6797,-114.092 33.6804,-114.091 33.6811,-114.084 33.6807,-114.076 33.6803,-114.068 33.6793,-114.063 33.6775,-114.062 33.6778,-114.06 33.678,-114.051 33.6736,-114.041 33.6695,-114.031 33.6657,-114.02 33.6624)
+LINESTRING(-85.3426 33.6759,-85.3508 33.6745,-85.3717 33.6685,-85.3988 33.6607,-85.4256 33.6538,-85.4456 33.6505,-85.4582 33.6528,-85.4726 33.6583,-85.487 33.6638,-85.4996 33.6657,-85.5232 33.6606,-85.5464 33.6517,-85.5694 33.6427,-85.5926 33.6374,-85.5975 33.6375,-85.6026 33.6383,-85.6077 33.6391,-85.6125 33.6393,-85.6306 33.6362,-85.6468 33.6308,-85.6628 33.6248,-85.6803 33.6202,-85.7171 33.6244,-85.7546 33.6176,-85.7921 33.6085,-85.8292 33.606)
+LINESTRING(-117.137 33.4823,-117.133 33.4568,-117.146 33.4315,-117.163 33.4065,-117.174 33.382,-117.161 33.3625,-117.157 33.3519,-117.157 33.3402,-117.156 33.3175,-117.15 33.3101,-117.147 33.2996,-117.145 33.2885,-117.145 33.2795,-117.149 33.2761,-117.152 33.2716,-117.155 33.2667,-117.156 33.2624,-117.148 33.2422,-117.129 33.2064,-117.107 33.17,-117.092 33.1482,-117.093 33.1432,-117.094 33.1382,-117.092 33.1337,-117.09 33.1292,-117.088 33.1247,-117.085 33.1203)
+LINESTRING(-117.332 33.1807,-117.312 33.1835,-117.291 33.1876,-117.27 33.1918,-117.25 33.1946,-117.23 33.1806,-117.206 33.1556,-117.178 33.1353,-117.145 33.1352,-117.132 33.1317,-117.12 33.1287,-117.108 33.1249,-117.096 33.1191,-117.093 33.1194,-117.091 33.1197,-117.088 33.12,-117.085 33.1203)
+LINESTRING(-97.4956 35.3922,-97.4948 35.3708,-97.4949 35.3493,-97.4948 35.3278,-97.4939 35.3064,-97.489 35.2786,-97.4813 35.252,-97.4754 35.225,-97.4758 35.1959,-97.4773 35.1876,-97.478 35.1807,-97.4771 35.1737,-97.4736 35.1654,-97.4694 35.1507,-97.4596 35.137,-97.4489 35.1256,-97.4422 35.1177,-97.4416 35.0927,-97.4366 35.0832,-97.4254 35.0709,-97.413 35.0583,-97.4043 35.0477,-97.3968 35.0245,-97.395 34.9981,-97.3924 34.9696,-97.3824 34.9402,-97.3 34.7865,-97.2912 34.7634,-97.2874 34.7409,-97.2853 34.7198,-97.2818 34.7008,-97.2661 34.6488,-97.2483 34.5988,-97.2232 34.5512,-97.1862 34.5062)
+LINESTRING(-92.2701 34.7099,-92.2696 34.6988,-92.2678 34.6881,-92.2656 34.6775,-92.2638 34.6667,-92.2641 34.6585,-92.2659 34.6506,-92.2679 34.6427,-92.2687 34.6349,-92.2685 34.6258,-92.2684 34.6167,-92.2682 34.6077,-92.268 34.5986,-92.2616 34.5658,-92.2468 34.5437,-92.228 34.5232,-92.2097 34.4951,-92.2079 34.4736,-92.1992 34.4422,-92.1886 34.4106,-92.181 34.3884,-92.1783 34.3768,-92.1762 34.3646,-92.1738 34.3527,-92.1698 34.3416,-92.1534 34.3169,-92.1336 34.294,-92.1148 34.2717,-92.1012 34.249,-92.0725 34.2203,-92.0272 34.2011,-91.9854 34.1904,-91.967 34.187)
+LINESTRING(-80.883 32.6304,-80.8827 32.6354,-80.8824 32.6404,-80.8821 32.6454,-80.8819 32.6504,-80.8775 32.6803,-80.8675 32.7053,-80.8512 32.7276,-80.8277 32.7496,-80.814 32.7613,-80.7992 32.7731,-80.7832 32.7835,-80.766 32.791,-80.7567 32.8127,-80.7473 32.8344,-80.738 32.8561,-80.7286 32.8779,-80.7196 32.8934,-80.7076 32.9093,-80.6955 32.926,-80.6857 32.9438,-80.6717 32.9871,-80.6623 33.0316,-80.6537 33.0762,-80.6423 33.1198,-80.6281 33.156,-80.6103 33.1925,-80.5912 33.2285,-80.5731 33.2634,-80.5665 33.2772,-80.5603 33.2912,-80.5542 33.3052,-80.548 33.3192)
+LINESTRING(-86.0739 34.02,-86.0815 34.0032,-86.1017 33.9834,-86.1254 33.9657,-86.1435 33.9548,-86.159 33.9484,-86.1761 33.9422,-86.1926 33.9351,-86.2061 33.9263,-86.2361 33.9019,-86.2669 33.8793,-86.2981 33.8573,-86.3292 33.8342,-86.3519 33.8159,-86.3763 33.7975,-86.4032 33.7825,-86.4338 33.7743,-86.4443 33.7733,-86.4553 33.7715,-86.4654 33.7679,-86.473 33.7616,-86.4895 33.7425,-86.5074 33.7251,-86.5245 33.7075,-86.5385 33.6875,-86.5442 33.6794,-86.5519 33.6725,-86.5663 33.6647,-86.5777 33.6618,-86.5873 33.6605,-86.5966 33.6575,-86.6129 33.6459,-86.6285 33.6303,-86.6428 33.6138,-86.6549 33.5992,-86.6671 33.5898,-86.6801 33.5858,-86.6931 33.5838,-86.7056 33.58,-86.7188 33.5724,-86.7292 33.5645,-86.7387 33.5561,-86.749 33.5472)
+LINESTRING(-86.749 33.5472,-86.7383 33.5433,-86.7257 33.5374,-86.7135 33.5323,-86.7038 33.5309,-86.6763 33.5255,-86.6522 33.5286,-86.6297 33.5362,-86.6069 33.5442,-86.5996 33.5458,-86.5929 33.5468,-86.5866 33.5482,-86.5805 33.551,-86.5539 33.5634,-86.5212 33.5736,-86.4872 33.5829,-86.4565 33.5927,-86.4323 33.6007,-86.4112 33.605,-86.3895 33.6063,-86.3633 33.6053,-86.3606 33.6046,-86.3578 33.6039,-86.3326 33.6077,-86.2945 33.6097,-86.2571 33.6098,-86.2344 33.6081,-86.2196 33.6038,-86.2061 33.5994,-86.1923 33.5956,-86.1765 33.5934,-86.1603 33.5927,-86.1439 33.5924,-86.1276 33.5919,-86.1115 33.5904,-86.078 33.5859,-86.0417 33.5818,-86.0055 33.5794,-85.9721 33.5799,-85.9499 33.5807,-85.9253 33.5808,-85.9012 33.5818,-85.8801 33.5849,-85.867 33.5896,-85.8552 33.5957,-85.8431 33.6017,-85.8292 33.606)
+LINESTRING(-86.826 33.522,-86.8068 33.5283,-86.7875 33.5346,-86.7683 33.5409,-86.749 33.5472)
+LINESTRING(-86.826 33.522,-86.8252 33.5309,-86.8249 33.5379,-86.8263 33.5449,-86.8311 33.5538,-86.8308 33.5564,-86.83 33.5588,-86.8245 33.5833,-86.8264 33.6235,-86.8315 33.6663,-86.8356 33.6984,-86.8347 33.708,-86.8313 33.7167,-86.8274 33.7253,-86.8247 33.7343,-86.825 33.742,-86.8272 33.7499,-86.8297 33.7577,-86.8309 33.7652,-86.8294 33.7836,-86.8261 33.803,-86.8236 33.8224,-86.8246 33.8407,-86.8334 33.8627,-86.847 33.8824,-86.8598 33.8989,-86.8664 33.9115,-86.8691 33.9395,-86.867 33.9554,-86.8632 33.9687,-86.8608 33.9888,-86.8625 33.9994,-86.8666 34.0102,-86.8705 34.0204,-86.8719 34.0293,-86.8698 34.0561,-86.8684 34.0818,-86.8685 34.1076,-86.8708 34.1347,-86.8736 34.1541,-86.8766 34.1737,-86.8783 34.1933,-86.8778 34.2127,-86.8773 34.2167,-86.8769 34.2208,-86.8772 34.2248,-86.8784 34.2288,-86.8868 34.2454,-86.8952 34.2621,-86.904 34.2786,-86.9132 34.295,-86.894 34.3347,-86.8859 34.3659,-86.8858 34.3998,-86.8908 34.4476,-86.891 34.4617,-86.8895 34.4761,-86.8881 34.4906,-86.8883 34.5049,-86.8911 34.518,-86.8957 34.5354,-86.8999 34.5527,-86.9015 34.5652,-86.8998 34.5811,-86.8981 34.5949,-86.8982 34.6097,-86.9022 34.6285,-86.8899 34.6293)
+LINESTRING(-86.8491 33.5214,-86.8434 33.5216,-86.8376 33.5217,-86.8318 33.5218,-86.826 33.522)
+LINESTRING(-106.588 35.107,-106.593 35.0908,-106.596 35.0748,-106.599 35.059,-106.606 35.0438,-106.624 35.0287,-106.645 35.0199,-106.669 35.0127,-106.692 35.0023,-106.716 34.9848,-106.731 34.9645,-106.74 34.9412,-106.748 34.9149,-106.754 34.8905,-106.76 34.8661,-106.766 34.8431,-106.773 34.8175,-106.781 34.783,-106.787 34.752,-106.794 34.7213,-106.807 34.6876,-106.814 34.6804,-106.817 34.6733,-106.819 34.6659,-106.817 34.6583,-106.815 34.6517,-106.812 34.6451,-106.811 34.6375,-106.814 34.6155,-106.827 34.5975,-106.841 34.5795,-106.852 34.5578,-106.873 34.4888,-106.89 34.4281,-106.908 34.3678,-106.932 34.2997,-106.944 34.2653,-106.954 34.2343,-106.959 34.2028,-106.959 34.167,-106.956 34.1422,-106.953 34.1209,-106.95 34.0998,-106.947 34.0756,-106.947 34.0562,-106.947 34.0392,-106.947 34.0221,-106.945 34.0037)
+LINESTRING(-111.663 35.1739,-111.671 35.1636,-111.68 35.1511,-111.684 35.1381,-111.681 35.1263,-111.682 35.1191,-111.684 35.1118,-111.688 35.0808,-111.688 35.0402,-111.686 34.9991,-111.683 34.9665,-111.655 34.9444,-111.645 34.923,-111.642 34.8997,-111.633 34.8724,-111.626 34.8673,-111.619 34.8623,-111.61 34.8569,-111.603 34.8499,-111.602 34.8412,-111.607 34.8314,-111.61 34.8177,-111.604 34.8097,-111.597 34.803,-111.589 34.7982,-111.59 34.7891,-111.602 34.7874,-111.61 34.7862,-111.641 34.7715,-111.666 34.7567,-111.69 34.7409,-111.714 34.7241,-111.722 34.7164,-111.731 34.7079,-111.74 34.6997,-111.749 34.6928,-111.756 34.6893,-111.763 34.6863,-111.77 34.6833,-111.778 34.6802,-111.786 34.6726,-111.792 34.6647,-111.804 34.6583,-111.815 34.6521,-111.834 34.6361,-111.852 34.6189,-111.868 34.6011,-111.884 34.5831,-111.896 34.5719,-111.902 34.5666,-111.909 34.5613,-111.91 34.5514,-111.91 34.5413,-111.923 34.5384,-111.935 34.5358,-111.948 34.534,-111.962 34.5335,-111.97 34.5336,-111.979 34.5318,-111.99 34.5199,-112 34.508,-112.011 34.4961,-112.021 34.4841,-112.028 34.4717,-112.033 34.4579,-112.038 34.4441,-112.047 34.4314,-112.055 34.428,-112.063 34.4246,-112.074 34.4054,-112.091 34.3896,-112.107 34.3786,-112.114 34.3737,-112.116 34.3529,-112.12 34.3324,-112.125 34.3116,-112.126 34.2896,-112.111 34.2701,-112.105 34.2512,-112.106 34.231,-112.114 34.2074,-112.121 34.2049,-112.127 34.2024,-112.134 34.1858,-112.139 34.1677,-112.144 34.1493,-112.152 34.1314,-112.149 34.1163,-112.146 34.1009,-112.143 34.0854,-112.139 34.0705,-112.145 34.0582,-112.148 34.0448,-112.148 34.0309,-112.149 34.0173,-112.143 34.0102,-112.141 34.0035,-112.14 33.9967,-112.139 33.9892,-112.133 33.9593,-112.136 33.9441,-112.142 33.93,-112.148 33.9032,-112.148 33.8862,-112.148 33.8625,-112.146 33.8394,-112.144 33.8241,-112.14 33.8175,-112.137 33.811,-112.131 33.7794,-112.125 33.7478,-112.119 33.7162,-112.113 33.6846,-112.113 33.6556,-112.117 33.6221,-112.115 33.591,-112.098 33.5695,-112.098 33.5539,-112.098 33.5383,-112.098 33.5226,-112.099 33.507)
+LINESTRING(-117.332 33.1807,-117.317 33.1582,-117.302 33.1335,-117.288 33.1082,-117.277 33.084,-117.274 33.0745,-117.272 33.0643,-117.27 33.0542,-117.267 33.0452,-117.26 33.0326,-117.251 33.0209,-117.244 33.0088,-117.238 32.995,-117.235 32.9794,-117.23 32.9566,-117.225 32.9353,-117.222 32.9241,-117.212 32.9052,-117.201 32.8847,-117.189 32.8639,-117.176 32.8439,-117.166 32.8261,-117.156 32.8051,-117.144 32.7853,-117.131 32.771)
+LINESTRING(-117.238 32.7545,-117.211 32.7578,-117.184 32.7608,-117.157 32.7648,-117.131 32.771)
+LINESTRING(-112.099 33.507,-112.2 33.5039,-112.3 33.4986,-112.4 33.4934,-112.502 33.4908,-112.524 33.482,-112.553 33.4622,-112.583 33.4411,-112.607 33.4283)
+LINESTRING(-114.02 33.6624,-113.979 33.6544,-113.937 33.6504,-113.895 33.6483,-113.853 33.6456,-113.797 33.6398,-113.741 33.6326,-113.685 33.6248,-113.629 33.6172,-113.56 33.6068,-113.491 33.595,-113.423 33.5824,-113.354 33.5698,-113.246 33.5514,-113.138 33.5336,-113.03 33.5151,-112.923 33.4945,-112.844 33.478,-112.765 33.4615,-112.686 33.4449,-112.607 33.4283)
+LINESTRING(-84.4903 33.7636,-84.4961 33.7446,-84.4974 33.7331,-84.4955 33.7224,-84.4914 33.7058,-84.4905 33.6938,-84.4918 33.6804,-84.4938 33.6669,-84.4954 33.6548,-84.4934 33.6439,-84.4885 33.633,-84.4853 33.6204,-84.4884 33.604,-84.5038 33.5919,-84.52 33.5797,-84.5368 33.5682,-84.5542 33.5581,-84.5693 33.5511,-84.5846 33.5448,-84.5996 33.538,-84.6136 33.5295,-84.6325 33.5122,-84.6492 33.4919,-84.6652 33.4708,-84.6819 33.4512,-84.7126 33.4256,-84.7327 33.4133,-84.7466 33.3961,-84.7584 33.3558,-84.7664 33.3369,-84.7788 33.3188,-84.7917 33.3002,-84.8007 33.2796,-84.8034 33.2638,-84.8052 33.2483,-84.8084 33.2332,-84.8157 33.2184,-84.8267 33.2057,-84.84 33.1938,-84.8542 33.1825,-84.8678 33.1716,-84.8804 33.1532,-84.8935 33.1253,-84.9126 33.0931,-84.943 33.062)
+LINESTRING(-83.6784 32.8492,-83.6885 32.8611,-83.6971 32.8722,-83.7143 32.8962,-83.7228 32.9077,-83.7311 32.9165,-83.7414 32.9233,-83.756 32.9288,-83.7678 32.9323,-83.7768 32.9357,-83.7848 32.9404,-83.7936 32.9475,-83.8021 32.9513,-83.8161 32.9553,-83.8292 32.9585,-83.8728 32.9945,-83.9145 33.0257,-83.9539 33.0565,-83.9852 33.0902,-84.0187 33.1228,-84.0422 33.1544,-84.0672 33.1869,-84.0912 33.2199,-84.1113 33.2531,-84.1216 33.2823,-84.1287 33.3149,-84.1374 33.3467,-84.1526 33.3737,-84.1702 33.393,-84.1883 33.412,-84.2055 33.4315,-84.2208 33.4521,-84.2314 33.4753,-84.2341 33.4906,-84.243 33.5071,-84.2725 33.5339,-84.3008 33.5515,-84.3343 33.5678,-84.3632 33.5804,-84.3778 33.5871,-84.3866 33.5961,-84.3921 33.6063,-84.3962 33.6171,-84.4006 33.6278,-84.396 33.6435,-84.3943 33.6642,-84.3967 33.6841,-84.4046 33.6973,-84.4011 33.7068,-84.3989 33.7165,-84.3911 33.7273,-84.3877 33.7398)
+LINESTRING(-83.6561 32.8119,-83.6554 32.823,-83.6607 32.8316,-83.6691 32.8396,-83.6784 32.8492)
+LINESTRING(-88.2787 33.4915,-88.2929 33.4942,-88.3096 33.493,-88.3262 33.4917,-88.3399 33.4938,-88.3737 33.5076,-88.4007 33.5134,-88.4279 33.5105,-88.4625 33.4977,-88.4651 33.4948,-88.4672 33.4915,-88.4691 33.4881,-88.4705 33.4847,-88.5068 33.4797,-88.5436 33.479,-88.5807 33.4802,-88.6175 33.4811,-88.6201 33.4832,-88.6227 33.4854,-88.6253 33.4876,-88.6278 33.4898,-88.6361 33.4899,-88.6443 33.49,-88.6526 33.4901,-88.6609 33.4902)
+LINESTRING(-98.3313 34.7703,-98.3544 34.7561,-98.3771 34.7415,-98.3978 34.7261,-98.3981 34.7141,-98.3942 34.7019,-98.3887 34.6898,-98.3842 34.6783,-98.3831 34.6645,-98.3854 34.6491,-98.3884 34.6333,-98.3897 34.6184,-98.3835 34.6152,-98.3774 34.6119,-98.3775 34.5965,-98.3897 34.5769,-98.4045 34.5575,-98.4126 34.5426,-98.4132 34.5303,-98.4119 34.5186,-98.4097 34.5072,-98.4074 34.4954,-98.4047 34.4672,-98.4049 34.4376,-98.406 34.408,-98.4066 34.3795,-98.4087 34.351,-98.415 34.3153,-98.4249 34.2804,-98.4376 34.2542,-98.4569 34.2298,-98.477 34.2059,-98.4955 34.1812,-98.5099 34.1541,-98.5121 34.1462,-98.5131 34.1382,-98.5139 34.1302,-98.5156 34.1223,-98.5248 34.1163,-98.5334 34.1097,-98.5384 34.1058)
+LINESTRING(-112.099 33.507,-112.101 33.4398,-112.06 33.4394,-112.018 33.4332,-111.986 33.4229,-111.972 33.4103,-111.971 33.4023,-111.97 33.3915,-111.968 33.3799)
+LINESTRING(-95.8118 34.8646,-95.8077 34.8586,-95.8021 34.8531,-95.7965 34.8477,-95.7926 34.8418,-95.7854 34.8223,-95.779 34.8019,-95.7727 34.7815,-95.7662 34.7615,-95.7631 34.7475,-95.7616 34.7328,-95.7598 34.7183,-95.7557 34.7049,-95.7476 34.6911,-95.7381 34.6779,-95.7299 34.6643,-95.7256 34.6495,-95.7308 34.62,-95.7456 34.5927,-95.7606 34.5701,-95.7659 34.5547,-95.7606 34.5435,-95.752 34.5336,-95.7422 34.5244,-95.7336 34.5147,-95.7325 34.5103,-95.7313 34.5059,-95.7276 34.4929,-95.7233 34.4791,-95.7195 34.4654,-95.7172 34.4525,-95.7174 34.425,-95.72 34.3868,-95.7229 34.3528,-95.7243 34.3381,-95.7114 34.317,-95.6928 34.2976,-95.673 34.2788,-95.6564 34.2593,-95.6404 34.2359,-95.6177 34.2029,-95.5965 34.1711,-95.585 34.1513,-95.583 34.143,-95.5822 34.1341,-95.5812 34.1253,-95.5787 34.117,-95.5681 34.0981,-95.553 34.0734,-95.5388 34.0486,-95.531 34.0296,-95.5306 34.0239,-95.5308 34.0177,-95.5307 34.0116,-95.5293 34.0059,-95.526 34.0012,-95.5206 33.9958,-95.5146 33.9907,-95.5096 33.9871)
+LINESTRING(-88.6609 33.4902,-88.6779 33.4906,-88.7044 33.4911,-88.7307 33.4905,-88.7473 33.488,-88.7516 33.483,-88.7574 33.4776,-88.761 33.4745,-88.7646 33.4714,-88.7735 33.47,-88.7824 33.4686,-88.7915 33.4676,-88.8005 33.4672)
+LINESTRING(-111.491 33.3815,-111.61 33.3811,-111.729 33.3806,-111.848 33.3801,-111.968 33.3799)
+LINESTRING(-90.0058 34.9964,-90.0056 34.9885,-90.0012 34.9648,-89.9953 34.9416,-89.99 34.9164,-89.9886 34.9028,-89.9883 34.8889,-89.9883 34.8751,-89.9877 34.8614,-89.9835 34.8476,-89.9755 34.8331,-89.9673 34.8186,-89.9625 34.8047,-89.9611 34.7735,-89.9626 34.7421,-89.9638 34.7107,-89.9615 34.6798,-89.9502 34.6233,-89.936 34.5671,-89.9194 34.5114,-89.9009 34.4562,-89.898 34.4151,-89.9068 34.3634,-89.9183 34.3104,-89.9239 34.2654,-89.9238 34.2472,-89.9236 34.2291,-89.9235 34.2109,-89.9234 34.1927,-89.9217 34.1779,-89.9176 34.1632,-89.9122 34.1487,-89.9068 34.1345,-89.8977 34.1068,-89.8906 34.079,-89.8849 34.051,-89.8804 34.0227,-89.8798 34.0141,-89.8798 34.005,-89.8796 33.9961,-89.8782 33.9877,-89.875 33.9799,-89.8708 33.9722,-89.867 33.9645,-89.8649 33.9563,-89.8646 33.947,-89.8649 33.9377,-89.8648 33.9284,-89.8634 33.919,-89.8546 33.8938,-89.8446 33.8708,-89.8372 33.8472,-89.8359 33.8199,-89.8367 33.8113,-89.8376 33.8028,-89.8384 33.7943,-89.8393 33.7858,-89.8362 33.7379,-89.8216 33.6898,-89.8014 33.6423,-89.7812 33.5965,-89.7759 33.5751,-89.7706 33.543,-89.766 33.5103,-89.7628 33.4868)
+LINESTRING(-81.1521 32.213,-81.1427 32.2187,-81.1198 32.2349,-81.101 32.2534,-81.0824 32.2716,-81.0602 32.2869,-81.0429 32.3401,-81.0193 32.3876,-80.9939 32.4325,-80.9712 32.4778,-80.9705 32.4827,-80.9707 32.4888,-80.9711 32.4943,-80.9712 32.497,-80.9619 32.5171,-80.9524 32.5379,-80.9423 32.5584,-80.9309 32.5776,-80.92 32.5898,-80.907 32.6007,-80.8941 32.6132,-80.883 32.6304)
+LINESTRING(-117.071 32.5244,-117.079 32.5271,-117.092 32.5296,-117.105 32.5284,-117.107 32.5242,-117.107 32.521)
+LINESTRING(-117.131 32.771,-117.121 32.7459,-117.116 32.7338,-117.116 32.721,-117.122 32.6939,-117.117 32.687,-117.113 32.6801,-117.108 32.6732,-117.104 32.6661,-117.106 32.6566,-117.103 32.6469,-117.099 32.6374,-117.094 32.6286,-117.089 32.6052,-117.087 32.5861,-117.079 32.5696,-117.055 32.5539,-117.047 32.5505,-117.04 32.5471,-117.032 32.5435,-117.02 32.5292)
+LINESTRING(-115.568 32.7732,-115.551 32.7731,-115.534 32.7729,-115.517 32.7727,-115.5 32.7728,-115.465 32.774)
+LINESTRING(-98.5384 34.1058,-98.5419 34.103,-98.5506 34.0965,-98.5575 34.061,-98.5491 34.02,-98.5341 33.9789,-98.5213 33.943)
+LINESTRING(-116.875 32.5426,-116.855 32.5462,-116.83 32.5548,-116.806 32.5642,-116.786 32.5706,-116.783 32.5698,-116.78 32.569,-116.778 32.5683,-116.775 32.5675,-116.767 32.56,-116.749 32.5561,-116.738 32.555)
+LINESTRING(-86.8491 33.5214,-86.8707 33.5148,-86.8842 33.5101,-86.8972 33.504,-86.9167 33.4935,-86.9222 33.4804,-86.934 33.4691,-86.9477 33.4585,-86.9588 33.4473,-86.958 33.4425,-86.9571 33.4376,-86.9563 33.4327,-86.9554 33.4278,-86.9705 33.4132,-86.9815 33.398,-86.9914 33.3823,-87.0029 33.3662,-87.0127 33.3558,-87.0238 33.3461,-87.0353 33.3366,-87.046 33.3269,-87.0833 33.2914,-87.123 33.2588,-87.1671 33.231,-87.2174 33.2099,-87.2282 33.2053,-87.2383 33.1996,-87.2486 33.1942,-87.26 33.1905,-87.2764 33.1886,-87.2921 33.1888,-87.3075 33.1892,-87.3229 33.1881,-87.3446 33.1847,-87.3664 33.1813,-87.3927 33.1773,-87.4052 33.1758,-87.4117 33.1712,-87.4353 33.173,-87.4685 33.1744,-87.5011 33.1742,-87.523 33.1712)
+LINESTRING(-117.085 33.1203,-117.082 33.1142,-117.077 33.107,-117.072 33.1,-117.069 33.0944,-117.068 33.0716,-117.072 33.0386,-117.078 33.0054,-117.084 32.9818,-117.092 32.9641,-117.102 32.948,-117.111 32.931,-117.117 32.9101,-117.118 32.8942,-117.117 32.8762,-117.117 32.8588,-117.121 32.8446,-117.117 32.8329,-117.114 32.8133,-117.113 32.7923,-117.111 32.7765,-117.089 32.7781,-117.066 32.7756,-117.045 32.7728,-117.029 32.7734,-117.021 32.7696,-117.016 32.7713,-117.011 32.773,-117.006 32.7747,-117 32.7764,-116.996 32.782,-116.992 32.7876,-116.987 32.793,-116.983 32.7984,-116.968 32.8017,-116.952 32.8017,-116.936 32.8012,-116.924 32.803,-116.916 32.8091,-116.904 32.821,-116.892 32.8339,-116.882 32.843,-116.877 32.8438,-116.873 32.8446,-116.868 32.8486,-116.864 32.8526,-116.851 32.8539,-116.836 32.8552,-116.821 32.8553,-116.809 32.8532,-116.796 32.8416,-116.77 32.8342,-116.741 32.8306,-116.721 32.8305,-116.693 32.8349,-116.664 32.8377,-116.637 32.8347,-116.612 32.8215,-116.589 32.8203,-116.567 32.8187,-116.545 32.8165,-116.522 32.8137,-116.517 32.8123,-116.512 32.8101,-116.506 32.8081,-116.493 32.7913,-116.484 32.7691,-116.479 32.7462,-116.478 32.7282,-116.474 32.7229,-116.47 32.7175,-116.465 32.717,-116.46 32.7166,-116.455 32.7161,-116.449 32.7156,-116.432 32.7227,-116.41 32.7219,-116.388 32.7151,-116.375 32.704,-116.36 32.7027,-116.346 32.7015,-116.331 32.6995,-116.319 32.697,-116.31 32.6933,-116.303 32.6885,-116.295 32.6836,-116.287 32.6792,-116.266 32.671,-116.247 32.6657,-116.228 32.6619,-116.207 32.6583,-116.184 32.6506,-116.162 32.6405,-116.138 32.6341,-116.11 32.6376,-116.106 32.643,-116.103 32.6477,-116.1 32.6522,-116.098 32.6565,-116.095 32.6604,-116.096 32.6647,-116.099 32.6687,-116.101 32.6727,-116.103 32.6771,-116.098 32.6794,-116.093 32.6818,-116.091 32.686,-116.088 32.6898,-116.082 32.6969,-116.072 32.7007,-116.068 32.707,-116.068 32.7149,-116.067 32.7234,-116.062 32.725,-116.056 32.7267,-116.047 32.726,-116.038 32.7262,-116.029 32.7263,-116.02 32.7256,-115.979 32.7369,-115.902 32.7522,-115.824 32.7659,-115.778 32.7726,-115.758 32.7736,-115.738 32.7737,-115.717 32.7733,-115.697 32.7731,-115.665 32.7732,-115.633 32.7732,-115.601 32.7732,-115.568 32.7732)
+LINESTRING(-83.6784 32.8492,-83.6648 32.8533,-83.6507 32.8548,-83.6366 32.8534,-83.6224 32.8492,-83.6081 32.8349,-83.5879 32.8178,-83.5692 32.8021,-83.5592 32.7922,-83.5542 32.7808,-83.5505 32.769,-83.547 32.7571,-83.542 32.7458,-83.5367 32.7353,-83.5302 32.7223,-83.5237 32.7099,-83.5177 32.7013,-83.4927 32.685,-83.4483 32.662,-83.4014 32.6392,-83.3686 32.6235,-83.3212 32.6027,-83.2728 32.5848,-83.2234 32.5688,-83.173 32.5539,-83.156 32.547,-83.1397 32.5382,-83.1232 32.5294,-83.1055 32.5225,-83.0839 32.5172,-83.0594 32.5121,-83.0345 32.5077,-83.012 32.5043,-82.992 32.5011,-82.9724 32.4972,-82.9529 32.4932,-82.9332 32.4897,-82.9039 32.4861,-82.8742 32.483,-82.8447 32.4793,-82.8158 32.4737,-82.787 32.4654,-82.7588 32.4558,-82.7307 32.4459,-82.7024 32.4365,-82.6916 32.4402,-82.6794 32.4435,-82.6669 32.4461,-82.6557 32.4473,-82.6326 32.4458,-82.6078 32.441,-82.5828 32.4352,-82.5591 32.431,-82.5375 32.4298,-82.5171 32.4303,-82.4968 32.4314,-82.476 32.4316,-82.4532 32.4293,-82.4307 32.425,-82.4083 32.4205,-82.3859 32.4175,-82.3646 32.4159,-82.34 32.4126,-82.317 32.4058,-82.3009 32.3937,-82.2689 32.3868,-82.2337 32.3817,-82.1985 32.3779,-82.1664 32.3746,-82.1195 32.3721,-82.0765 32.3718,-82.034 32.3677,-81.9887 32.354,-81.9656 32.3438,-81.9295 32.3281,-81.8943 32.3135,-81.8738 32.3069)
+LINESTRING(-84.943 33.062,-84.9592 33.0426,-84.972 33.0168,-84.9838 32.9922,-84.9968 32.9766,-85.0143 32.9665,-85.0312 32.9565,-85.0478 32.9456,-85.0645 32.9329,-85.0774 32.9186,-85.0869 32.9029,-85.096 32.8871,-85.1077 32.8724,-85.1576 32.8301)
+LINESTRING(-98.5213 33.943,-98.5159 33.9388,-98.5141 33.931,-98.5115 33.9227,-98.5075 33.9151,-98.4978 33.9013)
+LINESTRING(-96.5001 33.8959,-96.5256 33.8733,-96.5348 33.8406,-96.5371 33.806)
+LINESTRING(-115.465 32.774,-115.464 32.6761,-115.464 32.6729,-115.458 32.6625)
+LINESTRING(-81.2487 32.0747,-81.2356 32.1263,-81.2192 32.1614,-81.1911 32.1892,-81.1521 32.213)
+LINESTRING(-81.2487 32.0747,-81.3064 32.0916,-81.3559 32.1134,-81.4025 32.1406,-81.4512 32.1738,-81.4587 32.1797,-81.466 32.1861,-81.4733 32.1924,-81.481 32.1984,-81.4888 32.2024,-81.4982 32.2057,-81.5081 32.2086,-81.5171 32.2116,-81.5369 32.2192,-81.5583 32.2262,-81.5804 32.2308,-81.6023 32.2314,-81.6111 32.2304,-81.6191 32.2293,-81.6272 32.2288,-81.6365 32.2295,-81.6506 32.2327,-81.6636 32.2372,-81.6763 32.2425,-81.6893 32.2479,-81.713 32.257,-81.7367 32.2655,-81.7605 32.2738,-81.7841 32.2823,-81.796 32.2869,-81.8082 32.2917,-81.8205 32.2963,-81.8327 32.3001,-81.8428 32.3018,-81.8534 32.3026,-81.8639 32.3039,-81.8738 32.3069)
+LINESTRING(-81.2487 32.0747,-81.2152 32.0661,-81.182 32.0602,-81.1464 32.0598,-81.1061 32.0673)
+LINESTRING(-115.465 32.774,-115.453 32.7744,-115.391 32.7768,-115.331 32.7776,-115.286 32.7746,-115.281 32.7724,-115.271 32.7679,-115.261 32.7632,-115.255 32.7602,-115.22 32.7491,-115.184 32.74,-115.148 32.7308,-115.113 32.7198,-115.107 32.7166,-115.101 32.7134,-115.093 32.7096,-115.089 32.7079,-115.06 32.7122,-115.032 32.7164,-115.002 32.7166,-114.973 32.7176,-114.955 32.7186,-114.941 32.7208,-114.927 32.7228,-114.913 32.7251,-114.893 32.7364,-114.864 32.751,-114.836 32.76,-114.817 32.7545,-114.793 32.7517,-114.759 32.7458,-114.726 32.7426,-114.703 32.7479,-114.7 32.7479,-114.698 32.7479,-114.695 32.7479,-114.692 32.7479,-114.678 32.7413,-114.658 32.7386,-114.637 32.7371,-114.62 32.7339,-114.612 32.7274,-114.612 32.7257)
+LINESTRING(-97.1862 34.5062,-97.1761 34.4837,-97.1614 34.4635,-97.1463 34.4437,-97.1352 34.4227,-97.1418 34.4089,-97.1523 34.3968,-97.163 34.3849,-97.1699 34.3714,-97.1722 34.349,-97.1707 34.3243,-97.1681 34.2993,-97.1671 34.2759,-97.1681 34.2255,-97.168 34.1752,-97.1672 34.125,-97.1663 34.0745,-97.1662 34.0548,-97.1663 34.0351,-97.1657 34.0155,-97.1636 33.9958,-97.1612 33.9814,-97.1585 33.9671,-97.1552 33.9528,-97.1513 33.9387,-97.1451 33.915,-97.1414 33.8921,-97.1402 33.87,-97.1413 33.8486,-97.1413 33.8406,-97.14 33.8315,-97.1383 33.8231,-97.1366 33.8147,-97.1405 33.802,-97.1424 33.7851,-97.142 33.7679,-97.1392 33.7543,-97.146 33.7442,-97.1517 33.7368,-97.1521 33.7364)
+LINESTRING(-114.612 32.7257,-114.609 32.7183,-114.608 32.7081,-114.605 32.6987)
+LINESTRING(-96.5371 33.806,-96.5374 33.8017,-96.5381 33.7636,-96.5385 33.7538,-96.5397 33.7454,-96.543 33.738,-96.5495 33.731,-96.5552 33.7275,-96.5613 33.7258,-96.568 33.7256,-96.5757 33.7267,-96.581 33.728,-96.584 33.729,-96.5862 33.7294,-96.5891 33.7288,-96.5929 33.7253,-96.5943 33.7198,-96.5944 33.7149,-96.5942 33.7127,-96.6082 33.6688)
+LINESTRING(-85.1576 32.8301,-85.1761 32.8144,-85.2403 32.7669,-85.2992 32.7151,-85.3521 32.6441)
+LINESTRING(-97.1521 33.7364,-97.1587 33.7301,-97.1695 33.7224,-97.1711 33.7081,-97.1701 33.691,-97.1661 33.6743,-97.1585 33.661,-97.1608 33.6543,-97.1621 33.6474,-97.1629 33.6403,-97.163 33.6392)
+LINESTRING(-84.9608 32.5443,-84.9655 32.5718,-84.9712 32.6081,-84.9756 32.6439,-84.9764 32.6703,-84.9868 32.6784,-84.9946 32.689,-85.0006 32.7006,-85.0056 32.7118,-85.0125 32.7294,-85.0153 32.7433,-85.0156 32.7572,-85.0151 32.7748,-85.0153 32.7841,-85.0158 32.7944,-85.0157 32.8047,-85.0139 32.8135,-85.0014 32.8323,-84.9831 32.8521,-84.9648 32.8801,-84.9522 32.9235,-84.95 32.9579,-84.9507 32.9928,-84.9499 33.0276,-84.943 33.062)
+LINESTRING(-92.2701 34.7099,-92.2822 34.6967,-92.291 34.6882,-92.3003 34.6818,-92.314 34.6747,-92.3239 34.6735,-92.3347 34.6725,-92.3456 34.672,-92.3556 34.6722,-92.3713 34.6666,-92.3864 34.6623,-92.4013 34.6579,-92.4163 34.6522,-92.4506 34.638,-92.4859 34.625,-92.5214 34.6121,-92.5561 34.5985,-92.5692 34.5904,-92.593 34.5745,-92.6167 34.5577,-92.6294 34.5472,-92.6401 34.5445,-92.6494 34.5418,-92.6591 34.5401,-92.6712 34.5402,-92.6805 34.5314,-92.6979 34.5127,-92.7161 34.4928,-92.7279 34.4808,-92.7445 34.4668,-92.7613 34.453,-92.7783 34.4396,-92.7955 34.4263,-92.8015 34.4205,-92.8067 34.414,-92.8122 34.4075,-92.8187 34.402,-92.8284 34.398,-92.8386 34.3937,-92.8462 34.3877,-92.853 34.3804,-92.86 34.3729,-92.8678 34.3662,-92.8811 34.3581,-92.8964 34.3498,-92.9112 34.3412,-92.9231 34.3322,-92.9312 34.3233,-92.9383 34.3139,-92.9451 34.3042,-92.9521 34.2947,-92.9779 34.2649,-93.0073 34.2361,-93.0393 34.2093,-93.0724 34.1855,-93.0784 34.1645,-93.0842 34.1453,-93.0916 34.1263,-93.1024 34.1061,-93.1125 34.0894,-93.1227 34.0727,-93.1329 34.056,-93.143 34.0393,-93.2151 33.9682,-93.3421 33.8693,-93.4753 33.7747,-93.5667 33.7166,-93.5807 33.7078,-93.5945 33.6973,-93.6078 33.6864,-93.6205 33.6762,-93.6469 33.6611,-93.6817 33.647,-93.7183 33.6354,-93.7502 33.628,-93.7591 33.6274,-93.7685 33.6275,-93.7776 33.6264,-93.7859 33.6224,-93.8036 33.6007,-93.8173 33.5765,-93.8352 33.5578,-93.8653 33.5525,-93.9051 33.5435,-93.9383 33.5211,-93.9708 33.4952,-94.0083 33.4759,-94.0175 33.4738,-94.0273 33.4723,-94.0372 33.4709,-94.0445 33.4692)
+LINESTRING(-94.0445 33.4692,-94.0468 33.4687)
+LINESTRING(-114.605 32.6987,-114.603 32.6905,-114.602 32.6791,-114.6 32.6685,-114.596 32.6632,-114.566 32.658,-114.536 32.6529,-114.495 32.6461,-114.475 32.643,-114.458 32.6429,-114.439 32.6417,-114.42 32.6398,-114.404 32.6372,-114.392 32.6356,-114.38 32.6347,-114.368 32.634,-114.356 32.6332,-114.346 32.6349,-114.334 32.6397,-114.323 32.6446,-114.312 32.6468,-114.287 32.6442,-114.263 32.6392,-114.239 32.6348,-114.213 32.6339,-114.197 32.6347,-114.178 32.6355,-114.16 32.6365,-114.144 32.6384,-114.042 32.6582,-113.941 32.6815,-113.84 32.705,-113.738 32.7253,-113.728 32.7327,-113.709 32.7397,-113.689 32.7458,-113.674 32.7505,-113.628 32.7691,-113.581 32.7894,-113.533 32.8084,-113.485 32.8227,-113.413 32.8357,-113.333 32.8454,-113.253 32.8544,-113.178 32.8654,-113.124 32.8771,-113.07 32.8908,-113.016 32.9045,-112.962 32.9162,-112.908 32.9249,-112.853 32.9322,-112.799 32.9389,-112.745 32.946)
+LINESTRING(-94.0682 33.4548,-94.0624 33.4582,-94.0572 33.4617,-94.052 33.4652,-94.0468 33.4687)
+LINESTRING(-101.94 35.0528,-101.929 35.0402,-101.914 35.0231,-101.901 35.0059,-101.892 34.993,-101.866 34.9296,-101.856 34.8633,-101.852 34.7954,-101.846 34.7276,-101.835 34.6838,-101.817 34.6372,-101.797 34.5911,-101.777 34.5487,-101.774 34.5451,-101.772 34.5433,-101.77 34.5416,-101.773 34.5387,-101.775 34.5358,-101.778 34.5329,-101.781 34.53,-101.777 34.482,-101.768 34.4339,-101.756 34.3861,-101.745 34.3388,-101.738 34.3179,-101.729 34.2971,-101.719 34.2764,-101.71 34.2557,-101.71 34.2482,-101.712 34.241,-101.715 34.234,-101.716 34.227,-101.724 34.2207,-101.733 34.2139,-101.741 34.2068,-101.748 34.1993,-101.748 34.1829,-101.746 34.1661,-101.746 34.1495,-101.748 34.1338,-101.767 34.118,-101.787 34.1043,-101.808 34.0921,-101.83 34.0803,-101.836 34.0749,-101.841 34.0667,-101.844 34.0578,-101.845 34.0505,-101.84 33.9679,-101.825 33.8855,-101.809 33.8031,-101.801 33.7207,-101.8 33.7113,-101.797 33.7026,-101.795 33.6941,-101.793 33.6852,-101.794 33.6674,-101.798 33.6482,-101.803 33.6289,-101.806 33.611)
+LINESTRING(-84.9248 32.4051,-84.9294 32.444,-84.9432 32.485,-84.9568 32.5208,-84.9608 32.5443)
+LINESTRING(-111.968 33.3799,-111.969 33.3622,-111.972 33.3412,-111.974 33.3208,-111.972 33.3044,-111.914 33.2132,-111.82 33.0919,-111.732 32.9836,-111.693 32.9317,-111.691 32.904,-111.69 32.8759,-111.689 32.8481,-111.686 32.821)
+LINESTRING(-112.745 32.946,-112.726 32.9419,-112.707 32.938,-112.689 32.934,-112.671 32.9296,-112.649 32.9237,-112.626 32.9177,-112.603 32.9125,-112.58 32.9087,-112.57 32.9082,-112.559 32.9085,-112.549 32.9088,-112.539 32.9085,-112.504 32.8993,-112.458 32.8819,-112.407 32.8639,-112.359 32.8527,-112.209 32.8395,-112.059 32.8332,-111.908 32.8309,-111.757 32.8294,-111.753 32.8294,-111.749 32.8293,-111.745 32.8293,-111.741 32.8293,-111.735 32.833,-111.727 32.8357,-111.718 32.8372,-111.711 32.8375,-111.704 32.8333,-111.698 32.8292,-111.692 32.8251,-111.686 32.821)
+LINESTRING(-81.3826 31.7633,-81.3798 31.7736,-81.3785 31.7842,-81.3776 31.7948,-81.3758 31.8052,-81.3671 31.8296,-81.3542 31.8545,-81.3399 31.8791,-81.3269 31.9025,-81.3258 31.9146,-81.3299 31.9284,-81.3341 31.9422,-81.3334 31.9546,-81.3221 31.9696,-81.3055 31.9826,-81.2883 31.9952,-81.275 32.0089,-81.2669 32.0242,-81.2605 32.0414,-81.2547 32.0587,-81.2487 32.0747)
+LINESTRING(-94.9983 33.171,-94.9799 33.1768,-94.9616 33.1824,-94.9437 33.1886,-94.927 33.1961,-94.8917 33.2178,-94.8576 33.2424,-94.8232 33.2661,-94.7871 33.2851,-94.7592 33.2932,-94.7318 33.2976,-94.7032 33.3038,-94.6716 33.3176,-94.6477 33.3321,-94.6206 33.3501,-94.5953 33.3694,-94.5766 33.3879,-94.5736 33.3926,-94.5711 33.3978,-94.5687 33.403,-94.5658 33.4079,-94.5454 33.423,-94.5073 33.445,-94.4671 33.465,-94.4405 33.4743,-94.4281 33.4742,-94.4151 33.4728,-94.4019 33.4712,-94.389 33.4704,-94.3571 33.4706,-94.3254 33.4709,-94.2938 33.4717,-94.262 33.4733,-94.2193 33.4691,-94.1619 33.4587,-94.106 33.451,-94.0682 33.4548)
+LINESTRING(-85.3521 32.6441,-85.4088 32.6051,-85.5203 32.5689,-85.5947 32.5435,-85.6372 32.5004,-85.696 32.4531,-85.7827 32.4229,-85.8737 32.3899,-85.99 32.3669,-86.1429 32.3555,-86.2402 32.3284)
+LINESTRING(-86.2402 32.3284,-86.2636 32.3276,-86.2876 32.3268,-86.3116 32.3267,-86.3352 32.3281)
+LINESTRING(-86.826 33.522,-86.8199 33.5108,-86.8138 33.4997,-86.8175 33.4944,-86.8214 33.4892,-86.825 33.4839,-86.828 33.4783,-86.8272 33.4726,-86.8252 33.4662,-86.8223 33.4599,-86.8202 33.4498,-86.8218 33.4444,-86.8235 33.4391,-86.8251 33.4337,-86.8154 33.4242,-86.8066 33.4163,-86.7968 33.408,-86.787 33.3997,-86.7832 33.3798,-86.7808 33.3657,-86.78 33.3508,-86.7807 33.3287,-86.7846 33.3224,-86.7911 33.3094,-86.7963 33.2986,-86.8014 33.2877,-86.7981 33.274,-86.7981 33.2598,-86.8016 33.246,-86.8089 33.2336,-86.8032 33.2198,-86.7899 33.1944,-86.7764 33.1695,-86.7697 33.1577,-86.7582 33.148,-86.7515 33.1432,-86.7406 33.1197,-86.7345 33.0881,-86.7281 33.0547,-86.7217 33.0317,-86.6974 32.9892,-86.6685 32.9502,-86.6387 32.9126,-86.612 32.8748,-86.5993 32.8497,-86.5895 32.8235,-86.58 32.7975,-86.5682 32.7724,-86.5605 32.7602,-86.552 32.7482,-86.5434 32.7363,-86.5355 32.7241,-86.5129 32.6841,-86.4924 32.6437,-86.4738 32.6028,-86.4572 32.5609,-86.4506 32.5526,-86.4431 32.5454,-86.4373 32.5335,-86.4342 32.5275,-86.4194 32.5136,-86.4092 32.5068,-86.3994 32.4995,-86.3902 32.4897,-86.3805 32.4751,-86.3713 32.4599,-86.3616 32.4451,-86.3501 32.4313,-86.3413 32.4179,-86.3315 32.3975,-86.3234 32.3777,-86.3198 32.366,-86.3237 32.3566,-86.3275 32.3471,-86.3313 32.3376,-86.3352 32.3281)
+LINESTRING(-97.1574 33.6391,-97.1632 33.6169,-97.1702 33.5992,-97.1802 33.5823,-97.1923 33.5638,-97.1957 33.5559,-97.1965 33.5485,-97.1966 33.5407,-97.1976 33.5319,-97.2006 33.5113,-97.2009 33.495,-97.2023 33.4791,-97.2086 33.4594,-97.2152 33.4356,-97.2164 33.4113,-97.2153 33.3863,-97.2148 33.3601,-97.2144 33.3426,-97.2106 33.311,-97.2093 33.2636,-97.2046 33.2347,-97.1957 33.2058,-97.1823 33.1762)
+LINESTRING(-88.4035 32.4497,-88.3918 32.4551,-88.3618 32.4766,-88.3122 32.5167,-88.2627 32.5587,-88.2332 32.5856,-88.2244 32.5979,-88.217 32.6121,-88.2098 32.6267,-88.2018 32.64,-88.1793 32.6676,-88.1548 32.6922,-88.1283 32.7155,-88.0997 32.7393,-88.0817 32.755,-88.0636 32.771,-88.0452 32.7866,-88.0257 32.8009,-87.998 32.8188,-87.9718 32.836,-87.9468 32.8543,-87.9228 32.8755,-87.9089 32.8871,-87.8952 32.8966,-87.8829 32.9048,-87.8737 32.9126,-87.8652 32.9228,-87.8569 32.9337,-87.8482 32.9443,-87.8383 32.9535,-87.8232 32.9637,-87.8066 32.9734,-87.7902 32.9835,-87.7756 32.9947,-87.7447 33.0234,-87.714 33.0525,-87.6842 33.0822,-87.6559 33.1125,-87.6293 33.1366,-87.5984 33.1543,-87.563 33.1657,-87.523 33.1712)
+LINESTRING(-88.4457 32.4262,-88.4325 32.4355,-88.4196 32.4424,-88.4062 32.4485,-88.4035 32.4497)
+LINESTRING(-88.6344 32.3844,-88.6325 32.3846,-88.6306 32.3848,-88.6066 32.3885,-88.5842 32.3944,-88.5622 32.4012,-88.5395 32.4074,-88.5229 32.4096,-88.5062 32.4096,-88.4896 32.4095,-88.4732 32.4111,-88.4653 32.4133,-88.458 32.4167,-88.4514 32.4211,-88.4457 32.4262)
+LINESTRING(-88.6344 32.3844,-88.6451 32.3818,-88.6525 32.3775,-88.659 32.372,-88.6667 32.3661,-88.6927 32.3512,-88.7058 32.3479,-88.7182 32.3489)
+LINESTRING(-88.7182 32.3489,-88.7419 32.3469,-88.7479 32.3455,-88.7538 32.3437,-88.7598 32.3421,-88.7659 32.3413)
+LINESTRING(-81.3826 31.7633,-81.3866 31.7385,-81.3906 31.7137,-81.3946 31.6889,-81.3986 31.6641,-81.4071 31.6307,-81.4197 31.5976,-81.4335 31.5647,-81.4453 31.5319,-81.4493 31.5073,-81.4482 31.4831,-81.4451 31.4589,-81.4428 31.4342,-81.4448 31.4138,-81.4503 31.3924,-81.4571 31.3709,-81.4627 31.35,-81.4742 31.3232,-81.4833 31.2958,-81.4929 31.2687,-81.5054 31.2424,-81.5131 31.2312,-81.5222 31.2203,-81.5314 31.2092,-81.538 31.2)
+LINESTRING(-94.9983 33.171,-95.0195 33.1637,-95.0353 33.1586,-95.052 33.156,-95.0761 33.1561,-95.1499 33.1601,-95.224 33.1635,-95.2982 33.1648,-95.3721 33.1626,-95.3962 33.1597,-95.4201 33.155,-95.444 33.1504,-95.4684 33.1473,-95.4924 33.1471,-95.5171 33.1483,-95.5416 33.1482,-95.5651 33.1447,-95.5728 33.1383,-95.5792 33.1307,-95.5861 33.1231,-95.5952 33.1167,-95.6348 33.1204,-95.6744 33.1211,-95.7142 33.1215,-95.7544 33.1246,-95.8083 33.1289,-95.8641 33.1294,-95.9201 33.1283,-95.9746 33.128,-95.9987 33.1289,-96.0227 33.1303,-96.0468 33.1317,-96.0709 33.1322,-96.0772 33.1303,-96.0847 33.1257,-96.092 33.1204,-96.0975 33.1163,-96.0985 33.1095,-96.0997 33.1044,-96.1024 33.1,-96.1079 33.0952,-96.1392 33.0712,-96.1705 33.0462,-96.2022 33.0217,-96.2347 32.9993,-96.2575 32.9886,-96.2834 32.9808,-96.3097 32.9735,-96.3337 32.9642,-96.3454 32.9571,-96.3562 32.9485,-96.3667 32.9397,-96.3774 32.9315,-96.3931 32.9236,-96.4113 32.9179,-96.4303 32.9128,-96.4479 32.9068,-96.5051 32.8815,-96.5608 32.8552,-96.6159 32.828,-96.6711 32.8001)
+LINESTRING(-96.7909 32.7935,-96.7834 32.8114,-96.7764 32.8307,-96.7708 32.8503,-96.7676 32.8689,-96.7672 32.8827,-96.7676 32.8964,-96.7676 32.9102,-96.7659 32.924,-96.749 32.9387,-96.7313 32.9633,-96.716 32.9896,-96.7061 33.0088,-96.7076 33.0166,-96.7083 33.0246,-96.708 33.0325,-96.7064 33.0403,-96.7007 33.0593,-96.6941 33.079,-96.6866 33.0984,-96.678 33.1164,-96.669 33.1286,-96.656 33.1429,-96.6441 33.1558,-96.6382 33.1635,-96.6358 33.1824,-96.6352 33.2055,-96.6336 33.2279,-96.6282 33.2447,-96.6173 33.2528,-96.6045 33.2607,-96.5914 33.2684,-96.5796 33.2761,-96.5697 33.2967,-96.5611 33.319,-96.555 33.3418,-96.5521 33.364,-96.5671 33.393,-96.5898 33.4371,-96.6105 33.4803,-96.6197 33.5062,-96.6145 33.5134,-96.6116 33.5219,-96.61 33.5309,-96.6089 33.5393,-96.6066 33.5513,-96.6042 33.5629,-96.6024 33.5745,-96.6019 33.5867,-96.6053 33.6094,-96.6106 33.6271,-96.6132 33.6451,-96.6082 33.6688)
+LINESTRING(-81.5498 31.1797,-81.5562 31.1677,-81.5642 31.1527,-81.5725 31.1378)
+LINESTRING(-96.7909 32.7935,-96.796 32.7823)
+LINESTRING(-97.1823 33.1762,-97.1548 33.1778,-97.1366 33.1747,-97.1194 33.1689,-97.1018 33.1597,-97.083 33.1404,-97.0764 33.1174,-97.0731 33.0919,-97.0643 33.0654,-97.0512 33.0473,-97.0349 33.034,-97.0161 33.0225,-96.995 33.0098,-96.9776 32.9996,-96.9615 32.9914,-96.9456 32.983,-96.9291 32.9724,-96.9031 32.9491,-96.8857 32.9245,-96.8742 32.8969,-96.866 32.865,-96.8614 32.8497,-96.8558 32.8363,-96.8507 32.8229,-96.8479 32.8074,-96.796 32.7823)
+LINESTRING(-96.6711 32.8001,-96.6916 32.7967,-96.7127 32.7927,-96.7339 32.7905,-96.7549 32.7925,-96.7598 32.7897,-96.7644 32.7866,-96.7689 32.7834,-96.7734 32.7803)
+LINESTRING(-96.7734 32.7803,-96.7761 32.7811,-96.7788 32.782,-96.7815 32.7829,-96.7842 32.7838,-96.7861 32.7861,-96.7879 32.7885,-96.7894 32.791,-96.7909 32.7935)
+LINESTRING(-83.53 31.4512,-83.5262 31.4646,-83.5199 31.4766,-83.5138 31.4886,-83.5106 31.5019,-83.5175 31.5281,-83.5358 31.5579,-83.5574 31.5866,-83.5742 31.6097,-83.5753 31.6174,-83.5756 31.6219,-83.5817 31.6328,-83.5881 31.6404,-83.5948 31.6479,-83.6008 31.6552,-83.628 31.6929,-83.6601 31.7408,-83.6903 31.7886,-83.7115 31.8261,-83.7234 31.8534,-83.7353 31.8858,-83.7458 31.9186,-83.7536 31.9471,-83.7552 31.9574,-83.7555 31.9677,-83.7554 31.9779,-83.7556 31.9882,-83.7592 32.0348,-83.7609 32.0716,-83.7594 32.1083,-83.7534 32.1541,-83.7491 32.1756,-83.7442 32.1984,-83.7405 32.2214,-83.7402 32.2435,-83.7618 32.287,-83.767 32.3415,-83.7616 32.3965,-83.7513 32.4417,-83.7413 32.5076,-83.7421 32.5752,-83.743 32.6409,-83.7335 32.701,-83.727 32.7171,-83.7189 32.7326,-83.71 32.7478,-83.7014 32.7632,-83.6999 32.7672,-83.6986 32.771,-83.6934 32.7772,-83.6809 32.7844,-83.6697 32.7918,-83.661 32.8006,-83.6561 32.8119)
+LINESTRING(-92.0503 32.4961,-92.0484 32.4959)
+LINESTRING(-111.686 32.821,-111.607 32.7797,-111.513 32.7295,-111.423 32.6775,-111.358 32.6305,-111.327 32.5979,-111.297 32.563,-111.267 32.5278,-111.235 32.4946,-111.215 32.4769,-111.193 32.4599,-111.171 32.4435,-111.149 32.4277,-111.14 32.4223,-111.13 32.4173,-111.12 32.4121,-111.112 32.4063,-111.077 32.375,-111.039 32.3386,-111.004 32.3014,-110.976 32.2677,-110.961 32.2461,-110.954 32.2301,-110.953 32.2152,-110.958 32.1966)
+LINESTRING(-92.0484 32.4959,-91.9908 32.4917,-91.9272 32.4867,-91.8682 32.4806,-91.8223 32.4728,-91.7597 32.4607,-91.7145 32.4577,-91.6706 32.4582,-91.612 32.4563,-91.5294 32.4486,-91.4467 32.4383,-91.3642 32.4273,-91.2818 32.4174,-91.2613 32.4146,-91.2397 32.4098,-91.219 32.4029,-91.2015 32.3936)
+LINESTRING(-96.796 32.7823,-96.8109 32.7746,-96.8262 32.7673,-96.8419 32.761,-96.8601 32.7551,-96.8732 32.7494,-96.8842 32.7425,-96.8955 32.7368,-96.9094 32.7347,-96.9185 32.735,-96.9276 32.7352,-96.9367 32.7355,-96.9458 32.7358,-96.9586 32.7355,-96.9697 32.7342,-96.9809 32.733,-96.9936 32.7327,-97.0241 32.7381,-97.0497 32.7489,-97.0753 32.7597,-97.1059 32.7651,-97.1226 32.7664,-97.1374 32.7682,-97.1521 32.769,-97.1686 32.7673,-97.2105 32.7592,-97.2481 32.7508,-97.2839 32.7405,-97.3191 32.7269)
+LINESTRING(-97.3191 32.7269,-97.3193 32.7287,-97.3187 32.7475,-97.3199 32.7588,-97.3215 32.7724,-97.3224 32.7857,-97.3214 32.7963,-97.3182 32.8073,-97.3151 32.8178,-97.3129 32.8286,-97.3122 32.8407,-97.3134 32.9017,-97.3093 32.9381,-97.296 32.9722,-97.2693 33.026,-97.2602 33.0463,-97.2516 33.0672,-97.2422 33.0879,-97.2308 33.1075,-97.2184 33.1253,-97.2061 33.1424,-97.1941 33.1592,-97.1823 33.1762)
+LINESTRING(-89.7628 33.4868,-89.7607 33.45,-89.7655 33.4099,-89.7727 33.3695,-89.7779 33.3317,-89.7815 33.3026,-89.7883 33.2718,-89.7992 33.2421,-89.8147 33.2162,-89.8235 33.2067,-89.8332 33.1976,-89.8422 33.1881,-89.8487 33.1771,-89.8519 33.167,-89.856 33.1525,-89.8607 33.1385,-89.8658 33.1298,-89.8717 33.1255,-89.8777 33.1212,-89.8845 33.1162,-89.8883 33.113,-89.8928 33.1035,-89.8942 33.0941,-89.8953 33.0848,-89.8988 33.0753,-89.9079 33.0645,-89.9213 33.052,-89.934 33.0401,-89.9409 33.0311,-89.9426 33.0248,-89.9437 33.0184,-89.9446 33.0119,-89.9459 33.0057,-89.9514 32.9908,-89.9589 32.9753,-89.967 32.9599,-89.9744 32.9451,-89.9875 32.9278,-90.0135 32.8962,-90.0394 32.8646,-90.0525 32.8472,-90.0529 32.8447,-90.0532 32.8405,-90.0535 32.8368,-90.0537 32.8331,-90.0546 32.8182,-90.0549 32.801,-90.056 32.7839,-90.0589 32.7694,-90.0603 32.7665,-90.0623 32.7629,-90.0641 32.7593,-90.0649 32.7566,-90.0635 32.7479,-90.0601 32.7397,-90.0568 32.7318,-90.0556 32.7238,-90.0579 32.6998,-90.061 32.6754,-90.0646 32.6513,-90.0681 32.6273,-90.0708 32.6112,-90.0745 32.5941,-90.0795 32.5773,-90.086 32.5621,-90.0892 32.5578,-90.0935 32.5536,-90.0977 32.5493,-90.1007 32.5448,-90.1023 32.5388,-90.103 32.5324,-90.1039 32.5259,-90.1061 32.5197,-90.1168 32.5037,-90.1294 32.488,-90.141 32.4717,-90.1489 32.4536,-90.1497 32.4463,-90.1491 32.4384,-90.1486 32.4303,-90.1494 32.4226,-90.1511 32.4184,-90.1534 32.4146,-90.1553 32.4103,-90.1559 32.4049,-90.1547 32.3989,-90.1529 32.393,-90.1512 32.387,-90.1504 32.3807,-90.1539 32.3595,-90.1621 32.3291,-90.1714 32.2987,-90.1784 32.2772)
+LINESTRING(-88.7659 32.3413,-88.7884 32.3409,-88.8063 32.3473,-88.8206 32.354,-88.8324 32.3543,-88.8712 32.348,-88.9348 32.3452,-89.0002 32.3444,-89.0441 32.344,-89.0501 32.3448,-89.0562 32.3469,-89.0624 32.3489,-89.0685 32.3496,-89.0831 32.3474,-89.0985 32.3434,-89.1135 32.3396,-89.1272 32.3378,-89.1328 32.3383,-89.1385 32.3396,-89.1442 32.3406,-89.15 32.3407,-89.1562 32.3396,-89.1624 32.3381,-89.1686 32.3369,-89.175 32.3363,-89.2008 32.3376,-89.227 32.34,-89.2532 32.3417,-89.2791 32.3412,-89.286 32.3393,-89.2914 32.3357,-89.296 32.3311,-89.3004 32.3263,-89.3274 32.3231,-89.3535 32.3247,-89.3793 32.327,-89.4051 32.3258,-89.4129 32.3243,-89.4209 32.3228,-89.429 32.322,-89.4371 32.3225,-89.4496 32.3248,-89.4619 32.3276,-89.4741 32.3309,-89.4864 32.3341,-89.4955 32.3364,-89.5076 32.339,-89.5196 32.3405,-89.5286 32.3397,-89.5815 32.3236,-89.6353 32.3112,-89.6899 32.3015,-89.7452 32.2935,-89.762 32.2929,-89.7788 32.2942,-89.7956 32.2954,-89.8119 32.2945,-89.8268 32.2906,-89.8426 32.2848,-89.8573 32.2795,-89.8689 32.2768,-89.8854 32.2766,-89.9005 32.2769,-89.9161 32.2765,-89.9339 32.2742,-89.9368 32.2737,-89.9396 32.2732,-89.9424 32.273,-89.9453 32.2728,-89.9553 32.2739,-89.9647 32.2759,-89.9742 32.2778,-89.9847 32.2784,-89.9897 32.2778,-89.9941 32.2756,-90.0021 32.275,-90.0091 32.2767,-90.0157 32.279,-90.0228 32.2801,-90.0278 32.2793,-90.0325 32.2774,-90.0371 32.2752,-90.042 32.2736,-90.0735 32.2686,-90.1064 32.2674,-90.1412 32.2701,-90.1784 32.2772)
+LINESTRING(-90.2125 32.2749,-90.204 32.2755,-90.1955 32.2761,-90.1869 32.2767,-90.1784 32.2772)
+LINESTRING(-90.2125 32.2749,-90.2226 32.2798,-90.2272 32.2836,-90.2362 32.2877,-90.2592 32.2935,-90.2905 32.3051,-90.3187 32.3223,-90.3462 32.3399,-90.3755 32.3529,-90.4139 32.3649,-90.4632 32.3796,-90.5123 32.39,-90.5496 32.3894,-90.5602 32.3855,-90.5705 32.3808,-90.5808 32.3762,-90.5913 32.3724,-90.6038 32.3747,-90.6294 32.3811,-90.6583 32.388,-90.6806 32.3916,-90.7064 32.3901,-90.7334 32.384,-90.76 32.375,-90.7843 32.3652,-90.7925 32.3616,-90.8011 32.3567,-90.8099 32.3506,-90.8189 32.3433)
+LINESTRING(-90.9379 32.2939,-90.9496 32.2965,-90.9964 32.3096,-91.0431 32.3241,-91.0767 32.3359,-91.0916 32.3426,-91.1061 32.3501,-91.1208 32.3573,-91.1362 32.3635,-91.1529 32.3705,-91.1682 32.3789,-91.1832 32.3879,-91.1989 32.3967)
+LINESTRING(-90.8189 32.3433,-90.823 32.3395,-90.8272 32.3357,-90.8314 32.3315,-90.8356 32.3272,-90.8477 32.3102,-90.8685 32.2973,-90.8929 32.2899,-90.9156 32.289,-90.9379 32.2939)
+LINESTRING(-93.7472 32.4965,-93.7369 32.5014,-93.7218 32.5117,-93.7083 32.5219,-93.7024 32.5266,-93.684 32.5289,-93.6658 32.5327,-93.6476 32.5369,-93.6293 32.5403,-93.5829 32.543,-93.5486 32.5428,-93.5177 32.5505,-93.4817 32.5767,-93.4807 32.5785,-93.4341 32.5822,-93.3831 32.5893,-93.3334 32.5944,-93.2911 32.5921,-93.2607 32.5847,-93.2258 32.5757,-93.191 32.5681,-93.161 32.5649,-93.1275 32.5643,-93.09 32.5629,-93.0532 32.5617,-93.0222 32.5619,-93.0043 32.5634,-92.9863 32.5658,-92.9684 32.5682,-92.9505 32.5696,-92.9206 32.5676,-92.8912 32.5615,-92.8621 32.5547,-92.8332 32.5506,-92.7849 32.5477,-92.7366 32.5449,-92.6883 32.5427,-92.64 32.5413,-92.6068 32.5413,-92.5739 32.5418,-92.541 32.5417,-92.5078 32.5403,-92.4682 32.536,-92.4365 32.531,-92.4037 32.5266,-92.3608 32.5242,-92.345 32.5225,-92.3306 32.5192,-92.3165 32.5153,-92.3014 32.5123,-92.2684 32.5107,-92.2343 32.5121,-92.2004 32.5134,-92.1682 32.5109,-92.1606 32.5084,-92.1528 32.5047,-92.1452 32.5017,-92.1382 32.5012,-92.1334 32.5033,-92.1268 32.5047,-92.1199 32.5057,-92.1143 32.5066,-92.1076 32.5031,-92.1002 32.5015,-92.0923 32.5006,-92.0844 32.4991,-92.0759 32.4983,-92.0674 32.4976,-92.0588 32.4968,-92.0503 32.4961)
+LINESTRING(-108.947 32.2359,-108.91 32.2578,-108.874 32.2789,-108.838 32.301,-108.804 32.3257,-108.779 32.3252,-108.753 32.3251,-108.728 32.3243,-108.704 32.3217)
+LINESTRING(-94.3574 32.4907,-94.2945 32.493,-94.2191 32.4918,-94.1438 32.4858,-94.0815 32.4739,-94.0726 32.4704,-94.0641 32.4657,-94.0559 32.4606,-94.0476 32.456,-94.0443 32.455)
+LINESTRING(-98.1111 32.6113,-98.0842 32.6293,-98.052 32.6521,-98.0198 32.6737,-97.9927 32.6876,-97.9648 32.6975,-97.9369 32.7073,-97.9089 32.7172,-97.881 32.727,-97.8552 32.7316,-97.8269 32.7315,-97.7976 32.7313,-97.769 32.7358,-97.7505 32.7415,-97.732 32.7472,-97.7095 32.7538,-97.698 32.7563,-97.6853 32.7523,-97.673 32.7478,-97.6608 32.7431,-97.6484 32.7388,-97.6173 32.7309,-97.5866 32.7259,-97.5555 32.7227,-97.5235 32.7198,-97.5208 32.7211,-97.518 32.7224,-97.4717 32.7322,-97.437 32.733,-97.4053 32.7309,-97.3677 32.7318,-97.3556 32.7349,-97.3462 32.7399,-97.3373 32.745,-97.3268 32.7481)
+LINESTRING(-94.0443 32.455,-94.0312 32.4508,-94.0154 32.4498,-93.9992 32.4502,-93.9818 32.4489)
+LINESTRING(-93.7472 32.4965,-93.7603 32.499,-93.7655 32.4942,-93.7695 32.4878,-93.7738 32.4816,-93.7798 32.4772,-93.8412 32.4532,-93.881 32.443,-93.9206 32.4427,-93.9818 32.4489)
+LINESTRING(-109.048 32.2212,-109.048 32.2212,-109.021 32.2196,-108.995 32.2218,-108.971 32.2274,-108.947 32.2359)
+LINESTRING(-106.945 34.0037,-106.945 34.0027,-106.94 33.9761,-106.934 33.9532,-106.931 33.9359,-106.93 33.9269,-106.965 33.8538,-107.011 33.7703,-107.066 33.6933,-107.126 33.6396,-107.161 33.5912,-107.213 33.4982,-107.262 33.4008,-107.288 33.3395,-107.289 33.3292,-107.288 33.3192,-107.284 33.3095,-107.281 33.3,-107.272 33.2813,-107.264 33.2655,-107.259 33.2493,-107.256 33.2296,-107.263 33.1794,-107.281 33.1581,-107.306 33.1418,-107.329 33.1064,-107.335 33.088,-107.346 33.0429,-107.356 32.9855,-107.356 32.9304,-107.341 32.9116,-107.31 32.8854,-107.279 32.8564,-107.265 32.8285,-107.264 32.8178,-107.264 32.8064,-107.261 32.7953,-107.256 32.7854,-107.237 32.7605,-107.219 32.7418,-107.199 32.7237,-107.176 32.7006,-107.153 32.6876,-107.122 32.6823,-107.09 32.6813,-107.061 32.6808,-106.984 32.6615,-106.931 32.6198,-106.891 32.5649,-106.854 32.5058,-106.827 32.4675,-106.799 32.4299,-106.771 32.3928,-106.741 32.3562)
+LINESTRING(-96.6711 32.8001,-96.648 32.7957,-96.6274 32.7946,-96.609 32.7942,-96.5923 32.7923,-96.5609 32.7854,-96.5295 32.7785,-96.4982 32.7717,-96.4668 32.7648,-96.4636 32.7621,-96.4604 32.7591,-96.4576 32.7559,-96.4554 32.7526,-96.4319 32.7483,-96.4082 32.7452,-96.3844 32.7429,-96.3604 32.7409,-96.298 32.7099,-96.1953 32.6779,-96.0882 32.6504,-96.0128 32.6331,-95.9887 32.6264,-95.9658 32.618,-95.9434 32.6088,-95.9208 32.5997,-95.9018 32.5932,-95.882 32.5872,-95.862 32.5813,-95.8425 32.575,-95.7966 32.5575,-95.7448 32.5365,-95.6928 32.5168,-95.6466 32.5029,-95.6171 32.4981,-95.5864 32.4955,-95.5554 32.493,-95.525 32.4886,-95.4899 32.4805,-95.4574 32.4732,-95.4243 32.469,-95.3873 32.4703)
+LINESTRING(-94.3574 32.4907,-94.4278 32.4885,-94.5281 32.4793,-94.6281 32.4667,-94.6974 32.4542,-94.7193 32.4474,-94.741 32.4399,-94.7633 32.4338,-94.787 32.4314,-94.7975 32.4319,-94.8079 32.4329,-94.8185 32.4337,-94.8293 32.4338)
+LINESTRING(-94.8293 32.4338,-94.8528 32.433,-94.8781 32.4325,-94.9035 32.4328,-94.9271 32.4342,-94.9489 32.4366,-94.9714 32.4393,-94.994 32.4415,-95.0158 32.4422,-95.0383 32.4411,-95.0608 32.4393,-95.0833 32.4379,-95.1058 32.4379,-95.127 32.4404,-95.1475 32.4444,-95.168 32.4481,-95.1894 32.4497,-95.2398 32.4522,-95.2888 32.4581,-95.3376 32.465,-95.3873 32.4703)
+LINESTRING(-108.704 32.3217,-108.683 32.3193,-108.662 32.317,-108.64 32.3154,-108.619 32.3147,-108.568 32.2847,-108.517 32.2552,-108.466 32.2253,-108.416 32.1943,-108.407 32.1892,-108.394 32.1833,-108.381 32.178,-108.371 32.1747,-108.223 32.197,-108.076 32.219,-107.865 32.2501,-107.751 32.2663)
+LINESTRING(-110.958 32.1966,-110.944 32.1856,-110.928 32.1722,-110.911 32.159,-110.894 32.1486,-110.89 32.1426,-110.886 32.1366,-110.882 32.1307,-110.877 32.1247,-110.832 32.1037,-110.772 32.0632,-110.71 32.0215,-110.657 31.9969,-110.612 31.9956,-110.551 31.9844,-110.489 31.9713,-110.442 31.9641,-110.419 31.9639,-110.396 31.9637,-110.365 31.9637,-110.349 31.9641,-110.34 31.966,-110.332 31.9673,-110.324 31.9689,-110.314 31.9718)
+LINESTRING(-110.314 31.9718,-110.285 31.9785,-110.278 31.9783,-110.274 31.9776,-110.267 31.9683,-110.239 31.9746,-110.191 31.9891,-110.144 32.005,-110.118 32.0157,-110.104 32.0305,-110.086 32.0518,-110.067 32.0719,-110.05 32.0834,-110.038 32.1013,-110.023 32.1185,-110.008 32.1357,-109.996 32.1535,-109.933 32.1859,-109.885 32.2197,-109.843 32.2593,-109.797 32.3089,-109.759 32.3399,-109.721 32.3552,-109.678 32.3611,-109.624 32.3642,-109.619 32.363,-109.614 32.3613,-109.604 32.3497,-109.597 32.3475,-109.59 32.3458,-109.574 32.3431,-109.468 32.3215,-109.291 32.2838,-109.124 32.2451,-109.048 32.2212)
+LINESTRING(-106.741 32.3562,-106.737 32.3295,-106.729 32.3058,-106.718 32.2835,-106.705 32.2613)
+LINESTRING(-107.751 32.2663,-107.712 32.2717,-107.672 32.2776,-107.632 32.2827,-107.593 32.2859,-107.555 32.2792,-107.488 32.2631,-107.42 32.2457,-107.382 32.2354,-107.368 32.2416,-107.354 32.2446,-107.339 32.2454,-107.323 32.2452,-107.286 32.244,-107.248 32.2424,-107.21 32.2414,-107.173 32.2418,-107.13 32.2456,-107.087 32.2523,-107.045 32.26,-107.002 32.2667,-106.968 32.2709,-106.934 32.2745,-106.9 32.278,-106.866 32.2815,-106.825 32.2781,-106.784 32.2662,-106.744 32.2569,-106.705 32.2613)
+LINESTRING(-100.502 32.4468,-100.492 32.4481,-100.483 32.4502,-100.474 32.4521,-100.464 32.4529,-100.431 32.4499,-100.406 32.4482,-100.383 32.4566,-100.36 32.4843,-100.34 32.4869,-100.321 32.4903,-100.301 32.4932,-100.28 32.4945,-100.258 32.494,-100.235 32.4927,-100.212 32.4912,-100.189 32.4902,-100.173 32.491,-100.157 32.4932,-100.141 32.4949,-100.125 32.4943,-100.058 32.4853,-99.9917 32.4765,-99.9253 32.468,-99.8588 32.4597,-99.8373 32.4621,-99.8138 32.4703,-99.7906 32.4791,-99.7702 32.4828)
+LINESTRING(-81.5725 31.1378,-81.5894 31.1176,-81.6079 31.0992,-81.6266 31.0812,-81.6443 31.062,-81.6509 31.0497,-81.6579 31.0312,-81.6641 31.0125,-81.6683 30.9994,-81.6838 30.9309,-81.6821 30.8742,-81.6699 30.8177,-81.6538 30.7504,-81.657 30.7391,-81.6633 30.7293)
+LINESTRING(-99.7702 32.4828,-99.7569 32.4864,-99.7477 32.4887,-99.738 32.4899,-99.7234 32.49,-99.7021 32.4744,-99.6784 32.4582,-99.6537 32.4444,-99.6291 32.4364,-99.5764 32.4285,-99.5235 32.4219,-99.4708 32.4152,-99.4186 32.4073,-99.3706 32.3987,-99.3218 32.39,-99.2727 32.382,-99.224 32.3756,-99.1609 32.3716,-99.0972 32.3718,-99.0333 32.3732,-98.97 32.3731,-98.9365 32.3716,-98.8996 32.3701,-98.8629 32.3706,-98.8299 32.3749,-98.821 32.3806,-98.8089 32.3878,-98.7975 32.3949,-98.791 32.4,-98.7856 32.4,-98.7736 32.4064,-98.7575 32.4117,-98.7408 32.4165,-98.7266 32.4212,-98.7045 32.4316,-98.6825 32.4437,-98.661 32.4564,-98.6405 32.4685,-98.6186 32.4758,-98.5799 32.4858,-98.5408 32.4944,-98.5177 32.4975,-98.493 32.5026,-98.4475 32.5044,-98.3995 32.5073,-98.3673 32.5159,-98.3636 32.5163,-98.3239 32.528,-98.2881 32.54,-98.253 32.5534,-98.2171 32.5688,-98.2053 32.5712,-98.1902 32.5716,-98.1752 32.5725,-98.1637 32.5761,-98.1505 32.5849,-98.1374 32.5937,-98.1243 32.6025,-98.1111 32.6113)
+LINESTRING(-100.502 32.4468,-100.544 32.4307,-100.591 32.4207,-100.639 32.4136,-100.685 32.4067,-100.696 32.4098,-100.707 32.4126,-100.719 32.4143,-100.73 32.4141,-100.754 32.41,-100.777 32.4059,-100.8 32.4017,-100.823 32.3976,-100.848 32.411,-100.869 32.4086,-100.889 32.3991,-100.909 32.391,-100.938 32.3942,-100.968 32.3833,-100.996 32.3673,-101.024 32.3554,-101.053 32.3503,-101.082 32.3479,-101.111 32.3458,-101.14 32.342,-101.155 32.3387,-101.17 32.3349,-101.184 32.3311,-101.199 32.3272,-101.203 32.3263,-101.206 32.3253,-101.209 32.3244,-101.213 32.3234,-101.213 32.32,-101.212 32.3166,-101.212 32.3132,-101.212 32.3098,-101.271 32.2963,-101.331 32.2832,-101.39 32.2705,-101.45 32.2586,-101.454 32.262,-101.458 32.2654,-101.466 32.2665,-101.474 32.2661,-101.482 32.265,-101.49 32.2636)
+LINESTRING(-83.2936 30.8292,-83.304 30.8466,-83.3153 30.863,-83.3261 30.8796,-83.3348 30.8974,-83.3511 30.9295,-83.3717 30.9621,-83.3911 30.995,-83.4035 31.0279,-83.4036 31.0347,-83.4023 31.042,-83.401 31.0493,-83.4015 31.0563,-83.4093 31.0759,-83.4196 31.0955,-83.43 31.1151,-83.4383 31.1351,-83.4578 31.2044,-83.474 31.2742,-83.4892 31.3441,-83.5057 31.4138,-83.5111 31.424,-83.5197 31.4347,-83.5275 31.4443,-83.53 31.4512)
+LINESTRING(-106.705 32.2613,-106.701 32.2552,-106.697 32.2491,-106.693 32.243,-106.689 32.2369,-106.674 32.2134,-106.661 32.1925,-106.647 32.1722,-106.629 32.1505,-106.609 32.1279,-106.594 32.1064,-106.583 32.0832,-106.578 32.0558,-106.577 32.0412,-106.575 32.0285,-106.573 32.0157,-106.572 32.0016)
+LINESTRING(-96.796 32.7823,-96.8005 32.7723,-96.8058 32.7591,-96.8079 32.7507,-96.811 32.749,-96.8141 32.7472,-96.8172 32.7455,-96.8202 32.7438,-96.8225 32.7354,-96.8247 32.727,-96.827 32.7187,-96.8292 32.7103,-96.8272 32.7077,-96.8203 32.6568,-96.819 32.6051,-96.821 32.5532,-96.8249 32.5033,-96.838 32.4748,-96.8602 32.4376,-96.8723 32.3979,-96.855 32.3619,-96.8738 32.2463,-96.9123 32.1713,-96.9822 32.1154,-97.0952 32.0568)
+LINESTRING(-97.0952 32.0568,-97.1068 32.0833,-97.1153 32.1109,-97.1227 32.1389,-97.1307 32.1663,-97.1433 32.2001,-97.157 32.2339,-97.1702 32.2678,-97.1812 32.3016,-97.1855 32.3207,-97.1888 32.3397,-97.1933 32.3586,-97.2008 32.3773,-97.2264 32.4145,-97.2663 32.467,-97.303 32.5185,-97.3187 32.5529,-97.3174 32.5826,-97.3158 32.6124,-97.3144 32.6421,-97.3136 32.6717,-97.3147 32.6907,-97.3173 32.7097,-97.3191 32.7269)
+LINESTRING(-83.1634 30.6244,-83.1765 30.6384,-83.189 30.6546,-83.201 30.6712,-83.2128 30.6863,-83.2362 30.7198,-83.2557 30.7562,-83.2739 30.7935,-83.2936 30.8292)
+LINESTRING(-81.6633 30.7293,-81.666 30.725,-81.6742 30.7094,-81.6749 30.6936,-81.6687 30.6753,-81.6624 30.6569,-81.6562 30.6386,-81.6499 30.6203,-81.646 30.6047,-81.6438 30.5882,-81.6422 30.5713,-81.6401 30.5547,-81.6383 30.5454,-81.6362 30.5354,-81.6345 30.5254,-81.6338 30.5162,-81.6373 30.4986,-81.6452 30.4626,-81.6514 30.4352,-81.6576 30.4078,-81.6592 30.4054,-81.663 30.3995,-81.6671 30.3916,-81.6699 30.3835,-81.6703 30.3762,-81.6693 30.3694,-81.6681 30.363,-81.668 30.3568,-81.668 30.3524,-81.668 30.348,-81.6681 30.3436,-81.6681 30.3392)
+LINESTRING(-81.6734 30.3183,-81.6665 30.318,-81.6468 30.3208)
+LINESTRING(-106.572 32.0016,-106.572 32.0013,-106.57 31.9806,-106.568 31.96,-106.566 31.9394,-106.564 31.9188,-106.56 31.8951,-106.55 31.8754,-106.535 31.8572,-106.517 31.8381,-106.509 31.8287,-106.503 31.82,-106.496 31.812,-106.486 31.8044)
+LINESTRING(-81.4147 30.2575,-81.4113 30.2572,-81.3999 30.2563,-81.3885 30.2571)
+LINESTRING(-90.2125 32.2749,-90.2243 32.2663,-90.2361 32.2577,-90.2533 32.2444,-90.2635 32.2355,-90.2688 32.2278,-90.2742 32.2185,-90.2793 32.2088,-90.2842 32.2002,-90.3001 32.1712,-90.3155 32.1401,-90.3318 32.1098,-90.3503 32.0833,-90.3577 32.0752,-90.3651 32.0675,-90.372 32.0594,-90.3778 32.0504,-90.3938 32.0176,-90.409 31.9841,-90.4238 31.9505,-90.4386 31.9174,-90.4398 31.9074,-90.44 31.89,-90.44 31.8717,-90.4408 31.8589,-90.4458 31.8408,-90.4525 31.8239,-90.4596 31.8075,-90.4654 31.7905,-90.4692 31.7733,-90.4721 31.7556,-90.4747 31.7377,-90.478 31.7202,-90.479 31.7154,-90.48 31.7105,-90.4808 31.7055,-90.4816 31.7006,-90.4831 31.6611,-90.4808 31.6219,-90.4782 31.5826,-90.4786 31.5431)
+LINESTRING(-106.486 31.8044,-106.48 31.7913,-106.469 31.7818,-106.454 31.7764,-106.437 31.7753,-106.43 31.7761,-106.427 31.7768,-106.423 31.7779)
+LINESTRING(-81.5821 30.2497,-81.576 30.2503,-81.5698 30.2507,-81.5626 30.2507,-81.5297 30.2503,-81.4978 30.2512,-81.4662 30.2537,-81.4344 30.2577,-81.4311 30.2579)
+LINESTRING(-81.5821 30.2497,-81.6024 30.2711,-81.6243 30.2926,-81.6495 30.3104,-81.6734 30.3183)
+LINESTRING(-110.958 32.1966,-110.965 32.1854,-110.972 32.1741,-110.979 32.1629,-110.985 32.1516,-110.987 32.1329,-110.989 32.118,-110.992 32.1033,-110.994 32.0851,-110.994 32.0625,-110.995 32.0387,-110.995 32.015,-110.994 31.9927,-110.988 31.9658,-110.978 31.9319,-110.969 31.8979,-110.965 31.8711,-110.968 31.8364,-110.98 31.8029,-110.996 31.7706,-111.013 31.7397,-111.016 31.731,-111.018 31.7198,-111.02 31.7087,-111.022 31.7001,-111.031 31.6606,-111.039 31.6022,-111.046 31.5477,-111.049 31.5201,-111.049 31.5098,-111.047 31.4987,-111.044 31.4875,-111.04 31.4765,-111.031 31.464,-111.017 31.4489,-111.001 31.4351,-110.986 31.4264,-110.978 31.4047,-110.966 31.3763,-110.943 31.3385)
+LINESTRING(-88.7659 32.3413,-88.7668 32.3356,-88.7677 32.3299,-88.7733 32.3236,-88.7807 32.318,-88.7886 32.313,-88.7962 32.3083,-88.7999 32.3002,-88.8005 32.2952,-88.8026 32.2784,-88.8079 32.2671,-88.8148 32.2564,-88.8215 32.2448,-88.8251 32.2356,-88.828 32.226,-88.8314 32.2164,-88.8362 32.2076,-88.8422 32.201,-88.849 32.1951,-88.8556 32.1888,-88.8607 32.1811,-88.8628 32.1767,-88.8648 32.1723,-88.8701 32.1459,-88.8728 32.1323,-88.8772 32.1189,-88.8876 32.0932,-88.889 32.0879,-88.8898 32.0821,-88.8906 32.0764,-88.8922 32.0714,-88.8971 32.0653,-88.9036 32.0598,-88.91 32.0543,-88.9142 32.0483,-88.9162 32.0398,-88.9171 32.0307,-88.9182 32.0216,-88.9211 32.0133,-88.9266 32.0063,-88.9339 31.9999,-88.9419 31.9939,-88.949 31.988,-88.9677 31.9671,-88.9991 31.93,-89.029 31.8933,-89.0433 31.8739,-89.0488 31.8483,-89.0508 31.8213,-89.0528 31.7945,-89.0585 31.7696,-89.0652 31.7592,-89.0751 31.7503,-89.0858 31.742,-89.095 31.733,-89.1039 31.7188,-89.114 31.7021,-89.1262 31.6887,-89.1418 31.6845,-89.1512 31.6797,-89.1597 31.6737,-89.1656 31.6527,-89.1797 31.6357,-89.1978 31.6206,-89.2158 31.6052,-89.2348 31.5857,-89.2517 31.5663,-89.2676 31.5462,-89.2832 31.5244,-89.2918 31.5151,-89.3016 31.5082,-89.3113 31.5017,-89.3199 31.4936,-89.3224 31.4767,-89.3215 31.446,-89.3194 31.4143,-89.3181 31.3941,-89.3217 31.3843,-89.3305 31.3755,-89.3411 31.3674,-89.35 31.3601)
+LINESTRING(-101.49 32.2636,-101.501 32.2605,-101.51 32.2542,-101.518 32.2467,-101.527 32.2399,-101.54 32.233,-101.554 32.2278,-101.569 32.2229,-101.583 32.2172,-101.627 32.197,-101.669 32.1788,-101.713 32.1618,-101.759 32.1453,-101.777 32.1414,-101.79 32.141,-101.804 32.1371,-101.827 32.1229,-101.832 32.1191,-101.87 32.1058,-101.906 32.09,-101.941 32.0725,-101.975 32.0542,-101.981 32.0345,-101.998 32.0145,-102.018 31.9966,-102.037 31.9828,-102.057 31.9741,-102.079 31.969,-102.103 31.965,-102.124 31.9593,-102.157 31.9437,-102.211 31.9154,-102.266 31.8857,-102.301 31.866,-102.314 31.8564,-102.326 31.846,-102.339 31.8363,-102.354 31.8289)
+LINESTRING(-82.7542 30.2665,-82.761 30.2776,-82.7709 30.288,-82.7819 30.2975,-82.7923 30.3062,-82.8205 30.3327,-82.8477 30.3606,-82.8738 30.3892,-82.8987 30.4181,-82.9031 30.4239,-82.9076 30.4297,-82.9129 30.4366,-82.9318 30.4512,-82.9512 30.4629,-82.9711 30.4738,-82.9885 30.4825,-83.0015 30.4871,-83.0148 30.4906,-83.0279 30.495,-83.0402 30.5022,-83.057 30.5188,-83.0702 30.537,-83.0827 30.5557,-83.0972 30.5735,-83.1066 30.5827,-83.1164 30.5917,-83.1263 30.6006,-83.1361 30.6095,-83.1422 30.6135,-83.1496 30.6168,-83.1571 30.6202,-83.1632 30.6242,-83.1634 30.6244)
+LINESTRING(-83.8903 30.4766,-83.8469 30.4745,-83.813 30.4682,-83.781 30.4589,-83.7436 30.448,-83.7268 30.4454,-83.7088 30.4449,-83.6907 30.4453,-83.6736 30.445,-83.6659 30.4438,-83.6585 30.4415,-83.6512 30.4388,-83.644 30.4363,-83.6136 30.4317,-83.5763 30.432,-83.5396 30.4348,-83.5115 30.438,-83.4836 30.4385,-83.4657 30.4331,-83.4517 30.4248,-83.4354 30.4162,-83.4169 30.4099,-83.397 30.4048,-83.3767 30.4005,-83.3571 30.3965,-83.2996 30.3844,-83.2418 30.3713,-83.1844 30.3573,-83.1278 30.3423,-83.0988 30.3411,-83.0678 30.3474,-83.0318 30.3527,-82.988 30.348,-82.975 30.341,-82.9532 30.3271,-82.9297 30.3121,-82.9119 30.302,-82.8811 30.2922,-82.8364 30.282,-82.7901 30.2729,-82.7542 30.2665)
+LINESTRING(-82.7542 30.2665,-82.7341 30.2623,-82.7156 30.2554,-82.6969 30.2487,-82.6763 30.245,-82.65 30.2432,-82.6237 30.2417,-82.5974 30.2412,-82.5712 30.2427,-82.5472 30.2465,-82.5231 30.2515,-82.499 30.2561,-82.4746 30.2588,-82.4703 30.2588,-82.4665 30.2584,-82.4624 30.2579,-82.4583 30.2574,-82.4273 30.2561,-82.3957 30.2565,-82.3643 30.2566,-82.3341 30.2545,-82.3225 30.2502,-82.3092 30.2425,-82.2964 30.2355,-82.2864 30.2332,-82.261 30.2384,-82.2354 30.2448,-82.2097 30.2515,-82.1844 30.2576,-82.1656 30.2597,-82.1475 30.2592,-82.1297 30.2585,-82.1119 30.26,-82.0919 30.2652,-82.0723 30.2717,-82.0512 30.2785,-82.0267 30.2842,-81.9711 30.2931,-81.8918 30.3043,-81.8061 30.3148,-81.731 30.3214,-81.7106 30.3209,-81.6885 30.3189,-81.6734 30.3183)
+LINESTRING(-84.2477 30.5033,-84.2299 30.5025,-84.2119 30.5028,-84.1939 30.5032,-84.1761 30.5029,-84.1655 30.4944,-84.1536 30.488,-84.1404 30.484,-84.1258 30.4828,-84.0853 30.4929,-84.0436 30.5017,-84.0035 30.5049,-83.9673 30.4982,-83.9628 30.4951,-83.9547 30.489,-83.9462 30.4829,-83.9407 30.4798,-83.927 30.478,-83.9109 30.4771,-83.9006 30.4768,-83.8903 30.4766)
+LINESTRING(-85.382 30.7542,-85.3624 30.7565,-85.3428 30.7581,-85.3232 30.7592,-85.3034 30.7597,-85.2948 30.7594,-85.2863 30.7583,-85.278 30.7565,-85.2698 30.7542,-85.2485 30.7462,-85.2289 30.7377,-85.2084 30.7296,-85.1842 30.7226,-85.1804 30.7221,-85.1757 30.7215,-85.171 30.7209,-85.1677 30.7201,-85.1255 30.7007,-85.0824 30.6785,-85.0388 30.6574,-84.995 30.6413,-84.978 30.6394,-84.9554 30.6395,-84.9323 30.6398,-84.9137 30.6388,-84.8956 30.6353,-84.8776 30.6308,-84.8599 30.6261,-84.8423 30.622,-84.8268 30.6209,-84.8112 30.6222,-84.7957 30.6238,-84.7807 30.6234,-84.7589 30.6167,-84.7409 30.606,-84.7242 30.5941,-84.7066 30.5836,-84.6935 30.5787,-84.6796 30.5748,-84.6656 30.5711,-84.6523 30.5666,-84.6382 30.5602,-84.6247 30.5534,-84.611 30.5467,-84.5964 30.5408,-84.5839 30.538,-84.5673 30.5356,-84.5523 30.5337,-84.5449 30.5324,-84.5171 30.5245,-84.4892 30.5142,-84.4637 30.5036,-84.4433 30.4949,-84.4263 30.4914,-84.3935 30.4859,-84.3606 30.4807,-84.343 30.4784,-84.3199 30.481,-84.296 30.4876,-84.2726 30.496,-84.2509 30.5038,-84.2493 30.5035,-84.2477 30.5033)
+LINESTRING(-97.1081 31.6024,-97.1028 31.608,-97.1036 31.6342,-97.1044 31.6603,-97.1052 31.6865,-97.106 31.7126,-97.1069 31.7274,-97.1083 31.7426,-97.1093 31.7577,-97.1093 31.7721,-97.1038 31.7969,-97.0945 31.8236,-97.0869 31.8537,-97.0867 31.889,-97.0928 31.9071,-97.1038 31.9309,-97.1141 31.9526,-97.118 31.9639,-97.1071 31.9905,-97.0994 32.0072,-97.0953 32.0255,-97.0952 32.0568)
+LINESTRING(-93.7472 32.4965,-93.7461 32.4724,-93.7451 32.4483,-93.744 32.4241,-93.7429 32.4,-93.7405 32.367,-93.7381 32.3341,-93.7357 32.3012,-93.7333 32.2682,-93.726 32.2584,-93.7186 32.2486,-93.7113 32.2387,-93.7039 32.2289,-93.6668 32.1881,-93.6297 32.1474,-93.5926 32.1066,-93.5556 32.0657,-93.4529 31.9836,-93.3504 31.9013,-93.2481 31.8189,-93.1459 31.7364,-93.1255 31.7019,-93.1051 31.6674,-93.0847 31.633,-93.0643 31.5985,-93.0388 31.5776,-93.0133 31.5567,-92.9878 31.5359,-92.9623 31.515,-92.9068 31.4824,-92.8514 31.4498,-92.796 31.4171,-92.7407 31.3844,-92.7284 31.3767,-92.716 31.3689,-92.7037 31.3612,-92.6914 31.3535,-92.6269 31.3376,-92.5624 31.3218,-92.498 31.3058,-92.4335 31.2899)
+LINESTRING(-96.7734 32.7803,-96.7713 32.7746,-96.769 32.7677,-96.7674 32.7617,-96.7658 32.7556,-96.7597 32.7356,-96.7507 32.7169,-96.7397 32.6987,-96.7279 32.6805,-96.7202 32.6703,-96.7109 32.6596,-96.7024 32.6495,-96.6968 32.6409,-96.6673 32.5728,-96.6564 32.5352,-96.6556 32.4921,-96.6565 32.4077,-96.6506 32.3954,-96.6373 32.3717,-96.6262 32.3528,-96.6151 32.334,-96.5995 32.317,-96.5788 32.3046,-96.5554 32.2943,-96.5321 32.284,-96.5031 32.2602,-96.484 32.2268,-96.4727 32.1897,-96.4672 32.1552,-96.4621 32.142,-96.4523 32.1272,-96.4429 32.1125,-96.4388 32.0996,-96.4407 32.0912,-96.4412 32.0828,-96.4472 32.0735,-96.4523 32.064,-96.443 32.0405,-96.4338 32.0168,-96.4242 31.9932,-96.4138 31.9701,-96.4164 31.96,-96.4189 31.9499,-96.4211 31.9389,-96.4215 31.9302,-96.4046 31.9177,-96.3833 31.9045,-96.3614 31.8914,-96.3423 31.8793,-96.3215 31.8636,-96.304 31.848,-96.2874 31.8314,-96.2693 31.813,-96.2414 31.7901,-96.2154 31.7719,-96.1926 31.75,-96.1741 31.7157,-96.1657 31.687,-96.1599 31.6572,-96.1554 31.6271,-96.1507 31.5976,-96.1394 31.5675,-96.1173 31.5221,-96.0925 31.4778,-96.0733 31.451)
+LINESTRING(-103.482 31.4018,-103.47 31.4041,-103.459 31.4065,-103.447 31.4088,-103.435 31.4111,-103.405 31.4224,-103.38 31.4399,-103.355 31.4579,-103.327 31.471,-103.265 31.4877,-103.196 31.5055,-103.155 31.5155,-103.115 31.5255,-103.068 31.5373,-103.02 31.5495,-102.972 31.5609,-102.924 31.5699,-102.888 31.5775,-102.873 31.5848,-102.863 31.593,-102.843 31.603,-102.822 31.6107,-102.802 31.6172,-102.783 31.6248,-102.763 31.6356,-102.716 31.6641,-102.669 31.6921,-102.622 31.7196,-102.574 31.7469,-102.54 31.7646,-102.504 31.7813,-102.468 31.7982,-102.433 31.8167,-102.414 31.8133,-102.391 31.8161,-102.37 31.8222,-102.354 31.8289)
+LINESTRING(-90.4786 31.5431,-90.4816 31.5144,-90.4811 31.4852,-90.4794 31.456,-90.4785 31.4271,-90.4791 31.3927,-90.4803 31.3582,-90.4817 31.3237,-90.483 31.2893,-90.4842 31.265,-90.4857 31.2406,-90.4866 31.2163,-90.4863 31.192,-90.4846 31.1808,-90.4817 31.1701,-90.4793 31.1595,-90.479 31.1482,-90.4821 31.1284,-90.4863 31.1087,-90.4906 31.0889,-90.494 31.0691,-90.4953 31.0547,-90.4961 31.0402,-90.4968 31.0256,-90.4979 31.0111,-90.5023 30.996,-90.5074 30.9872)
+LINESTRING(-87.9413 30.6685,-87.9615 30.6706,-87.9972 30.6797,-88.0016 30.684,-88.0092 30.6884,-88.0175 30.6923,-88.024 30.6949,-88.0293 30.6935,-88.0345 30.6919,-88.0361 30.6913)
+LINESTRING(-87.1136 30.5335,-87.1043 30.5357,-87.0847 30.5383,-87.0554 30.5546,-87.0382 30.5678,-87.021 30.5811,-87.0039 30.5944,-86.9867 30.6077,-86.9717 30.6171,-86.9544 30.6244,-86.9365 30.631,-86.9196 30.638,-86.87 30.6604,-86.8153 30.682,-86.7591 30.7005,-86.7049 30.7137,-86.6826 30.7159,-86.6603 30.7156,-86.6385 30.7151,-86.6173 30.7167,-86.6104 30.7185,-86.6036 30.7208,-86.5968 30.7233,-86.5899 30.7252,-86.5682 30.7281,-86.5458 30.7289,-86.5232 30.7288,-86.5012 30.7286,-86.4904 30.7273,-86.4793 30.7243,-86.4682 30.7212,-86.4573 30.7195,-86.4309 30.7216,-86.3899 30.7275,-86.3485 30.7347,-86.3207 30.7407,-86.3014 30.7459,-86.2846 30.7489,-86.2668 30.7495,-86.2448 30.7473,-86.2359 30.744,-86.2265 30.7409,-86.2159 30.7327,-86.21 30.7292,-86.2038 30.7267,-86.1767 30.7154,-86.1578 30.7045,-86.1372 30.6963,-86.105 30.6929,-86.028 30.6945,-85.9725 30.702,-85.9231 30.7195,-85.8645 30.7508,-85.8243 30.759,-85.7581 30.7624,-85.6897 30.7629,-85.6429 30.762,-85.6207 30.7601,-85.5975 30.7563,-85.5741 30.7521,-85.5516 30.7487,-85.5273 30.7467,-85.5027 30.7461,-85.4782 30.746,-85.4537 30.7459,-85.4355 30.747,-85.4176 30.7496,-85.3999 30.7525,-85.382 30.7542)
+LINESTRING(-87.4133 30.5744,-87.4273 30.5781,-87.4523 30.5785,-87.4771 30.5795,-87.5018 30.5812,-87.5267 30.584,-87.5432 30.5961,-87.5627 30.6087,-87.5833 30.6197,-87.6031 30.6272,-87.6068 30.6281,-87.6101 30.6286,-87.6136 30.6291,-87.6172 30.6297,-87.633 30.632,-87.6489 30.6339,-87.6647 30.6358,-87.6803 30.6383,-87.6931 30.6416,-87.706 30.6459,-87.7192 30.65,-87.7326 30.6528,-87.746 30.6536,-87.76 30.6534,-87.7741 30.653,-87.7879 30.6536,-87.803 30.656,-87.8182 30.6595,-87.8334 30.6628,-87.8486 30.6647,-87.8851 30.6656,-87.9235 30.6667,-87.9413 30.6685)
+LINESTRING(-88.0361 30.6913,-88.0395 30.69,-88.0446 30.6882,-88.0569 30.6711,-88.0794 30.6617,-88.1064 30.6571,-88.1233 30.6551)
+LINESTRING(-88.1233 30.6551,-88.1257 30.6774,-88.1254 30.7006,-88.1235 30.7264,-88.1194 30.735,-88.1112 30.7413,-88.1026 30.7478,-88.097 30.7569,-88.0968 30.7701,-88.1002 30.7837,-88.1041 30.7954,-88.1054 30.803,-88.0718 30.8587,-88.0117 30.8977,-87.9397 30.9252,-87.8709 30.9464,-87.8378 30.9541,-87.804 30.9587,-87.7706 30.9632,-87.7385 30.9708,-87.7252 30.9758,-87.7137 30.9814,-87.7031 30.9881,-87.6923 30.9963,-87.6486 31.0274,-87.6013 31.0556,-87.5529 31.0828,-87.5061 31.1108,-87.4981 31.1149,-87.4887 31.1185,-87.4801 31.1218,-87.4637 31.1296,-87.4549 31.1317,-87.448 31.1327,-87.3815 31.1708,-87.3221 31.2083,-87.2638 31.247,-87.2052 31.2874,-87.1501 31.3231,-87.1046 31.3493,-87.0604 31.3774,-87.0198 31.4095,-87.009 31.4182,-86.9696 31.4531,-86.9348 31.4916,-86.9004 31.5301,-86.8622 31.5652,-86.8349 31.5883,-86.8032 31.6184,-86.7734 31.6503,-86.7518 31.6787,-86.7399 31.6998,-86.7285 31.7216,-86.7168 31.7431,-86.7036 31.7636,-86.6982 31.7693,-86.6914 31.7747,-86.6847 31.7802,-86.68 31.786,-86.6753 31.7971,-86.6717 31.8089,-86.6677 31.8206,-86.6623 31.8312,-86.6537 31.8409,-86.6435 31.8494,-86.6331 31.8577,-86.6241 31.8668,-86.6052 31.8889,-86.5777 31.92,-86.5519 31.9493,-86.5384 31.9663,-86.5296 31.9869,-86.5226 32.009,-86.5148 32.0308,-86.5038 32.0507,-86.4894 32.0703,-86.4696 32.0979,-86.4509 32.1253,-86.44 32.1441,-86.4361 32.1551,-86.4327 32.1658,-86.4288 32.1763,-86.4233 32.1868,-86.4042 32.212,-86.3827 32.2354,-86.3618 32.259,-86.3445 32.2849,-86.3403 32.2951,-86.3376 32.3061,-86.3361 32.3173,-86.3352 32.3281)
+LINESTRING(-87.2223 30.5063,-87.2081 30.506,-87.1939 30.5056,-87.1797 30.5057,-87.1655 30.5057,-87.1596 30.5095)
+LINESTRING(-87.2223 30.5063,-87.2964 30.5145,-87.342 30.5392,-87.379 30.5655,-87.4133 30.5744)
+LINESTRING(-104.051 31.0911,-104.039 31.1166,-104.026 31.1277,-104.013 31.1328,-103.999 31.1405,-103.942 31.1899,-103.879 31.2435,-103.813 31.2936,-103.748 31.332,-103.705 31.3502,-103.65 31.3707,-103.594 31.3904,-103.544 31.4067,-103.535 31.4051,-103.521 31.4004,-103.502 31.3977,-103.482 31.4018)
+LINESTRING(-88.1233 30.6551,-88.1325 30.6541,-88.1402 30.6397,-88.149 30.6256,-88.1592 30.6125,-88.1709 30.6009,-88.1842 30.5904,-88.1988 30.58,-88.2139 30.5702,-88.2284 30.5612,-88.2849 30.528,-88.3201 30.5094,-88.3537 30.4952,-88.4022 30.4763)
+LINESTRING(-104.825 31.0363,-104.837 31.034,-104.85 31.0333,-104.863 31.0329,-104.875 31.0319,-104.887 31.0363,-104.898 31.0407,-104.91 31.0456,-104.921 31.0509,-104.998 31.0632,-105.137 31.0953,-105.275 31.1302,-105.353 31.1511,-105.373 31.1563,-105.394 31.1606,-105.414 31.1651,-105.434 31.1705,-105.449 31.1774,-105.463 31.1865,-105.475 31.1952,-105.487 31.2013,-105.512 31.1881,-105.533 31.1794,-105.557 31.1768,-105.588 31.1821,-105.601 31.1782,-105.618 31.1741,-105.634 31.1706,-105.645 31.1688,-105.68 31.1711,-105.714 31.183,-105.745 31.2011,-105.77 31.2223,-105.782 31.2303,-105.794 31.2384,-105.796 31.2507,-105.802 31.2793,-105.813 31.3118,-105.83 31.3356,-105.848 31.3521,-105.872 31.3741,-105.896 31.3955,-105.917 31.4103,-105.929 31.4161,-105.942 31.4213,-105.956 31.4267,-105.968 31.4327,-106 31.451,-106.031 31.4705,-106.062 31.4898,-106.094 31.508,-106.103 31.5116,-106.111 31.5164,-106.137 31.5484,-106.163 31.5832,-106.187 31.6187,-106.211 31.6527,-106.224 31.6688,-106.238 31.6852,-106.253 31.7009,-106.268 31.7153,-106.296 31.7355,-106.339 31.7599,-106.386 31.7777,-106.423 31.7779)
+LINESTRING(-104.051 31.0911,-104.065 31.0842,-104.073 31.0828,-104.083 31.0837,-104.097 31.0834,-104.114 31.0791,-104.129 31.0717,-104.145 31.0639,-104.163 31.0586,-104.215 31.0584,-104.305 31.0628,-104.392 31.0683,-104.441 31.0716,-104.452 31.0707,-104.464 31.068,-104.477 31.0648,-104.488 31.0628,-104.572 31.0555,-104.656 31.0484,-104.741 31.042,-104.825 31.0363)
+LINESTRING(-97.4693 31.0303,-97.4306 31.0388,-97.3943 31.0615,-97.3609 31.093,-97.3311 31.1278,-97.3186 31.1707,-97.3005 31.2132,-97.2794 31.2547,-97.2575 31.2946,-97.249 31.3059,-97.2384 31.3162,-97.2283 31.3269,-97.2212 31.3389,-97.2065 31.3768,-97.1912 31.4118,-97.1745 31.4463,-97.1556 31.4825,-97.1453 31.5017,-97.1353 31.5218,-97.1273 31.5422,-97.1227 31.5624,-97.1168 31.5698,-97.1123 31.5752,-97.1091 31.5804,-97.1083 31.5871,-97.1089 31.595,-97.1081 31.6024)
+LINESTRING(-88.4022 30.4763,-88.4054 30.475,-88.4323 30.4654,-88.4548 30.4622,-88.4733 30.461,-88.4884 30.4579,-88.4993 30.4528,-88.5099 30.4475,-88.5209 30.443,-88.5333 30.4402,-88.5717 30.4367,-88.6188 30.4339,-88.6656 30.4322,-88.703 30.4323,-88.7197 30.4362,-88.7426 30.4443,-88.7656 30.4528,-88.7826 30.4579,-88.8024 30.4585,-88.8292 30.4568,-88.8564 30.4542,-88.8776 30.4525,-88.889 30.4513,-88.9008 30.4494,-88.9126 30.4478,-88.9237 30.4475,-88.9343 30.4503,-88.9445 30.4557,-88.9548 30.4605,-88.9654 30.4616,-88.9978 30.4557,-89.0303 30.4491,-89.063 30.4424,-89.0956 30.4367)
+LINESTRING(-89.35 31.3601,-89.3544 31.3451,-89.3557 31.3203,-89.3554 31.2964,-89.3549 31.2839,-89.3534 31.2803,-89.3499 31.2761,-89.3466 31.2727,-89.3432 31.2692,-89.337 31.2607,-89.3315 31.2515,-89.3266 31.2422,-89.3221 31.233,-89.3232 31.228,-89.3343 31.2016,-89.3446 31.1749,-89.3548 31.1483,-89.3658 31.1223,-89.3703 31.1141,-89.3755 31.1059,-89.3806 31.0978,-89.3847 31.0895,-89.3885 31.0767,-89.391 31.0633,-89.3937 31.0499,-89.3979 31.037,-89.4012 31.0297,-89.4045 31.0225,-89.4077 31.0152,-89.411 31.0079,-89.4335 30.9666,-89.4615 30.9197,-89.4847 30.8725,-89.4926 30.8305,-89.4964 30.8247,-89.5009 30.8192,-89.5056 30.814,-89.5103 30.8087,-89.5177 30.7943,-89.5197 30.7784,-89.5208 30.763,-89.5256 30.7503,-89.5316 30.7436,-89.5385 30.7374,-89.5453 30.7312,-89.5513 30.7243,-89.5625 30.704,-89.5715 30.6815,-89.58 30.6586,-89.59 30.6371,-89.6009 30.6202,-89.6132 30.6038,-89.6257 30.5875,-89.637 30.5706,-89.6448 30.5577,-89.6525 30.5448,-89.6597 30.5316,-89.6659 30.5181,-89.6687 30.5089,-89.6709 30.4991,-89.6736 30.4895,-89.6777 30.4811,-89.6855 30.4696)
+LINESTRING(-81.5821 30.2497,-81.5698 30.2375,-81.5579 30.2275,-81.5464 30.2174,-81.5356 30.2064,-81.5364 30.2005,-81.5377 30.1939,-81.5389 30.1874,-81.5395 30.1816,-81.5334 30.1645,-81.5183 30.1462,-81.4988 30.1259,-81.4796 30.1029,-81.4773 30.087,-81.4831 30.0666,-81.4897 30.0456,-81.4897 30.028,-81.4789 30.006,-81.4659 29.9868,-81.4532 29.9706,-81.4433 29.9576,-81.435 29.9474,-81.4257 29.9376,-81.4168 29.9277,-81.4097 29.917,-81.4049 29.9035,-81.4015 29.8879,-81.3983 29.8721,-81.3942 29.8575,-81.3908 29.8495,-81.3868 29.8417,-81.3826 29.8338,-81.3789 29.826,-81.3652 29.7908,-81.3509 29.7526,-81.3355 29.7148,-81.3184 29.6806,-81.3069 29.6746,-81.295 29.6678,-81.2837 29.6603,-81.2742 29.652,-81.2705 29.6417,-81.2649 29.6316,-81.2515 29.6089,-81.2374 29.5865,-81.2232 29.5643,-81.2096 29.5417,-81.1914 29.5036,-81.167 29.4459,-81.1441 29.3878,-81.1303 29.3485,-81.129 29.3376,-81.1299 29.3261,-81.1311 29.3145,-81.1308 29.3035,-81.1281 29.2925,-81.1242 29.2806,-81.1156 29.2577,-81.1072 29.232,-81.0984 29.206,-81.0879 29.1806,-81.0742 29.1565,-81.0933 29.1473)
+LINESTRING(-102.908 30.902,-102.986 30.8965,-103.129 30.9117,-103.276 30.9332,-103.365 30.9467,-103.398 30.9526,-103.432 30.9607,-103.465 30.9684,-103.498 30.9732,-103.544 30.9773,-103.59 30.9825,-103.637 30.9886,-103.682 30.9956,-103.703 30.9999,-103.723 31.0052,-103.744 31.0098,-103.766 31.012,-103.786 31.0118,-103.807 31.0106,-103.828 31.0088,-103.848 31.0068,-103.869 31.0166,-103.891 31.0271,-103.913 31.037,-103.935 31.0449,-103.944 31.0467,-103.955 31.0475,-103.965 31.0486,-103.974 31.0513,-103.981 31.0559,-103.987 31.0617,-103.993 31.0678,-104 31.0728,-104.012 31.0785,-104.025 31.083,-104.038 31.0869,-104.051 31.0911)
+LINESTRING(-90.5074 30.9872,-90.51 30.9827,-90.5181 30.9697,-90.5237 30.9553,-90.5311 30.9015,-90.534 30.8414,-90.5342 30.7814,-90.5338 30.7278,-90.5336 30.6874,-90.5309 30.6592,-90.5228 30.6309,-90.5063 30.5899,-90.5027 30.5633,-90.5054 30.5336,-90.5046 30.5049,-90.4906 30.4809)
+LINESTRING(-90.4906 30.4809,-90.3345 30.4826,-90.2611 30.4817,-90.2009 30.4676,-90.0838 30.4298)
+LINESTRING(-102.645 30.8779,-102.67 30.8805,-102.694 30.8847,-102.718 30.8889,-102.742 30.8911,-102.764 30.8908,-102.792 30.8899,-102.819 30.89,-102.84 30.8928,-102.859 30.8987,-102.874 30.9037,-102.889 30.9055,-102.908 30.902)
+LINESTRING(-89.6238 30.3079,-89.6103 30.3124,-89.5793 30.323,-89.5587 30.3297,-89.5479 30.3317,-89.5375 30.3323,-89.5273 30.3326,-89.5169 30.3341,-89.4605 30.3502,-89.4048 30.3692,-89.3492 30.3884,-89.293 30.4047,-89.2822 30.4064,-89.2713 30.4069,-89.2604 30.407,-89.2495 30.4076,-89.2392 30.4096,-89.229 30.4128,-89.219 30.4165,-89.2091 30.4197,-89.1958 30.4218,-89.1804 30.4223,-89.1647 30.4224,-89.151 30.4231,-89.1478 30.4234,-89.1446 30.4237,-89.1414 30.4241,-89.1382 30.4244,-89.1344 30.4254,-89.1306 30.4264,-89.1262 30.4277,-89.1218 30.4289,-89.1174 30.4302,-89.1129 30.4315,-89.1085 30.4326,-89.1041 30.4337,-89.0995 30.435,-89.0956 30.4367)
+LINESTRING(-89.6855 30.4696,-89.6953 30.4552,-89.7107 30.4312,-89.7253 30.4063,-89.7405 30.3777,-89.7418 30.3656,-89.7394 30.3492,-89.7381 30.3297,-89.7425 30.3082)
+LINESTRING(-90.0838 30.4298,-90.0661 30.4271,-90.0498 30.4202,-90.0345 30.4112,-90.0196 30.4024,-89.9751 30.3791,-89.9186 30.3515,-89.8623 30.3267,-89.8181 30.3122,-89.7999 30.3104,-89.7809 30.3107,-89.7615 30.3108,-89.7425 30.3082)
+LINESTRING(-89.7425 30.3082,-89.7218 30.3023,-89.6993 30.2989,-89.6765 30.2976,-89.6549 30.2981,-89.6395 30.3026,-89.6238 30.3079)
+LINESTRING(-91.1218 30.3911,-91.1146 30.3989,-91.1041 30.4083,-91.0938 30.4164,-91.0874 30.4203,-91.0778 30.4235,-91.0682 30.4275,-91.0585 30.4315,-91.0486 30.4348,-90.9975 30.4478,-90.9466 30.4585,-90.895 30.4669,-90.8422 30.4731,-90.8356 30.4735,-90.8289 30.4739,-90.8223 30.4743,-90.8157 30.4748,-90.7759 30.4757,-90.7365 30.4759,-90.6972 30.4758,-90.6577 30.4759,-90.6159 30.4773,-90.5742 30.4794,-90.5325 30.481,-90.4906 30.4809)
+LINESTRING(-91.1515 30.4047,-91.1441 30.4013,-91.1367 30.3979,-91.1292 30.3945,-91.1218 30.3911)
+LINESTRING(-91.1515 30.4047,-91.1725 30.4129,-91.1931 30.4204,-91.2106 30.4266,-91.2225 30.431,-91.2439 30.4398,-91.2647 30.4477,-91.2845 30.453,-91.3028 30.4542,-91.3384 30.4485,-91.3764 30.4387,-91.414 30.4275,-91.4487 30.4174,-91.5256 30.3968,-91.6026 30.3763,-91.6795 30.3556,-91.7562 30.3343,-91.7869 30.3269,-91.818 30.3211,-91.8489 30.3152,-91.8794 30.3079,-91.8977 30.302,-91.9152 30.2955,-91.9325 30.2886,-91.9501 30.282,-91.9664 30.2769,-91.983 30.2723,-91.9994 30.2672,-92.0145 30.2609)
+LINESTRING(-92.0145 30.2609,-92.0264 30.2965,-92.0421 30.3426,-92.0533 30.3874,-92.052 30.4197,-92.0676 30.4465,-92.0741 30.4672,-92.0739 30.4896,-92.0697 30.5217,-92.0688 30.5283,-92.0671 30.5357,-92.0636 30.5424,-92.0577 30.5468,-92.054 30.5655,-92.0501 30.5846,-92.0472 30.6038,-92.0465 30.6228,-92.0498 30.6365,-92.0568 30.6474,-92.0652 30.6575,-92.0729 30.6688,-92.0769 30.6779,-92.0802 30.6869,-92.0842 30.6956,-92.0901 30.7039,-92.1214 30.7301,-92.1668 30.764,-92.208 30.7989,-92.2268 30.8283,-92.2277 30.8449,-92.2287 30.8614,-92.2296 30.878,-92.2306 30.8946,-92.2635 30.9348,-92.2916 30.9669,-92.326 30.9919,-92.3778 31.0109,-92.3912 31.0264,-92.4046 31.042,-92.418 31.0575,-92.4314 31.0731,-92.4299 31.0945,-92.4282 31.1189,-92.426 31.1768,-92.427 31.2371,-92.4335 31.2899)
+LINESTRING(-100.643 30.5781,-100.662 30.5842,-100.695 30.5965,-100.728 30.6093,-100.75 30.6172,-100.771 30.6213,-100.791 30.6206,-100.809 30.619,-100.824 30.6199,-100.855 30.6294,-100.888 30.6415,-100.92 30.6544,-100.951 30.6664,-100.977 30.6729,-101.008 30.677,-101.038 30.6801,-101.065 30.6837,-101.091 30.6894,-101.116 30.6964,-101.14 30.7036,-101.165 30.7101,-101.173 30.7073,-101.182 30.7059,-101.192 30.705,-101.2 30.7038,-101.214 30.7001,-101.228 30.6953,-101.242 30.6905,-101.256 30.6867,-101.323 30.679,-101.387 30.6818,-101.451 30.6917,-101.516 30.7049,-101.538 30.7109,-101.56 30.7185,-101.582 30.7256,-101.604 30.7297,-101.621 30.7303,-101.638 30.7295,-101.655 30.7281,-101.671 30.7269,-101.732 30.7266,-101.796 30.7314,-101.859 30.7415,-101.917 30.7572,-101.935 30.7674,-101.951 30.7815,-101.966 30.7966,-101.982 30.8095,-102.024 30.834,-102.073 30.8595,-102.124 30.8817,-102.171 30.896,-102.265 30.9037,-102.362 30.8952,-102.459 30.8799,-102.553 30.8669,-102.576 30.8675,-102.599 30.8719,-102.622 30.8765,-102.645 30.8779)
+LINESTRING(-90.4392 30.0887,-90.4483 30.1046,-90.4537 30.1177,-90.4558 30.1311,-90.4554 30.1442,-90.4535 30.1562,-90.4507 30.1673,-90.4472 30.1782,-90.4436 30.1886,-90.44 30.198,-90.4372 30.2043,-90.434 30.2102,-90.4304 30.2156,-90.4266 30.2205,-90.4195 30.229,-90.4121 30.2372,-90.4046 30.2478,-90.3972 30.2612,-90.3914 30.2739,-90.389 30.282,-90.3905 30.303,-90.3973 30.3324,-90.4101 30.3647,-90.4295 30.3943,-90.4906 30.4809)
+LINESTRING(-91.1218 30.3911,-91.1043 30.3826,-91.0875 30.3736,-91.0727 30.3643,-91.0612 30.3551,-91.0505 30.3441,-91.0347 30.3267,-91.0195 30.3081,-91.0107 30.2937,-91.0013 30.2744,-90.9892 30.257,-90.9758 30.2398,-90.9626 30.2209,-90.927 30.1864,-90.8805 30.1691,-90.8285 30.16,-90.7767 30.1501,-90.7568 30.1442,-90.7367 30.1375,-90.7166 30.1312,-90.6966 30.1262,-90.6518 30.1197,-90.6048 30.1157,-90.5576 30.1129,-90.5121 30.1096,-90.4971 30.1067,-90.4755 30.1009,-90.4541 30.0941,-90.4392 30.0887)
+LINESTRING(-97.6873 30.5201,-97.6923 30.5409,-97.6903 30.5624,-97.686 30.5841,-97.6843 30.6055,-97.6871 30.6168,-97.6907 30.6293,-97.6899 30.6412,-97.6793 30.6502,-97.6765 30.663,-97.668 30.6759,-97.658 30.6889,-97.6508 30.7018,-97.6388 30.7375,-97.625 30.7779,-97.6098 30.8178,-97.5937 30.8519,-97.5821 30.8695,-97.5689 30.8864,-97.5559 30.9032,-97.5447 30.9207,-97.5398 30.932,-97.5358 30.9435,-97.5314 30.955,-97.5252 30.966,-97.5179 30.9747,-97.5092 30.9828,-97.5005 30.9908,-97.4927 30.9991,-97.4869 31.0065,-97.481 31.0139,-97.4736 31.0238,-97.4693 31.0303)
+LINESTRING(-92.9719 30.2671,-92.9155 30.2635,-92.8156 30.2629,-92.7132 30.2638,-92.6493 30.2645,-92.6359 30.2622,-92.6255 30.2568,-92.6153 30.2509,-92.6027 30.2471,-92.5729 30.2428,-92.5432 30.2385,-92.5074 30.2338,-92.4879 30.2323,-92.4497 30.2353,-92.4109 30.2348,-92.3732 30.2342,-92.3384 30.2372,-92.3217 30.2418,-92.3057 30.2478,-92.289 30.2532,-92.2704 30.2555,-92.2062 30.2525,-92.1408 30.2473,-92.0764 30.2476,-92.0145 30.2609)
+LINESTRING(-82.7542 30.2665,-82.7444 30.2485,-82.7323 30.2379,-82.7194 30.2296,-82.7074 30.2183,-82.6834 30.1775,-82.6525 30.1156,-82.6239 30.0542,-82.6067 30.0148,-82.602 30.0077,-82.5953 30.0015,-82.5884 29.9955,-82.5829 29.9893,-82.5707 29.9621,-82.5567 29.9219,-82.5445 29.882,-82.5373 29.8559,-82.5329 29.8457,-82.5257 29.8349,-82.5184 29.8234,-82.5134 29.8116,-82.5127 29.8035,-82.5133 29.7953,-82.5131 29.787,-82.5098 29.7786,-82.5024 29.7686,-82.4946 29.7597,-82.4867 29.7512,-82.4789 29.742,-82.4723 29.7314,-82.4669 29.7198,-82.4615 29.708,-82.455 29.6972,-82.4471 29.6878,-82.4377 29.6786,-82.4282 29.6694,-82.4195 29.66,-82.4027 29.6396,-82.3858 29.6192,-82.3692 29.5986,-82.3529 29.5779,-82.3411 29.5599,-82.3294 29.5467,-82.3197 29.5371,-82.3135 29.5301,-82.3026 29.5134,-82.2911 29.4959,-82.28 29.4784,-82.2709 29.4616,-82.2681 29.454,-82.2662 29.4459,-82.2645 29.4376,-82.2621 29.4298,-82.2543 29.4149,-82.2439 29.4,-82.2336 29.3851,-82.2257 29.3701,-82.2213 29.3574,-82.2176 29.3442,-82.2141 29.331,-82.2106 29.318,-82.1961 29.2682,-82.1882 29.2347,-82.1849 29.201,-82.1844 29.1506,-82.1845 29.1344,-82.1846 29.1183,-82.1847 29.1021,-82.1848 29.0859,-82.1824 29.0762,-82.1766 29.0652,-82.17 29.0544,-82.1648 29.0452,-82.1616 29.0368,-82.159 29.0281,-82.1563 29.0195,-82.1531 29.011,-82.1448 28.9946,-82.1354 28.9785,-82.126 28.9625,-82.1176 28.9462,-82.1109 28.9273,-82.1021 28.8985,-82.0939 28.8712,-82.0889 28.8571)
+LINESTRING(-90.0838 30.4298,-90.0845 30.416,-90.0867 30.4019,-90.0895 30.3878,-90.0922 30.3741,-90.1494 30.0504,-90.1542 30.0245,-90.1559 30.0114,-90.1707 29.907)
+LINESTRING(-89.7425 30.3082,-89.7479 30.2907,-89.7541 30.2718,-89.7612 30.2534,-89.7694 30.2373,-89.7734 30.2329,-89.781 30.2255,-89.7874 30.2194,-89.7939 30.2134,-89.8104 30.1981,-89.8272 30.183,-89.8437 30.1676,-89.8595 30.1518,-89.8785 30.1293,-89.8971 30.1048,-89.9167 30.0814,-89.9387 30.0618,-89.9613 30.0463,-89.9812 30.0333,-89.9998 30.0209,-90.0189 30.0072,-90.0377 29.9961,-90.0539 29.984,-90.0676 29.9697,-90.0793 29.9519,-90.0788 29.9495,-90.0784 29.947,-90.0779 29.9446,-90.0774 29.9421,-90.0746 29.9398,-90.0713 29.9376,-90.0678 29.9359,-90.0643 29.9346,-90.0562 29.9366,-90.0489 29.9361,-90.0421 29.9334,-90.0357 29.9285,-90.036 29.9266,-90.0363 29.9246,-90.0362 29.9226,-90.0358 29.9207,-90.0568 29.9018,-90.0789 29.8886,-90.1035 29.882,-90.1318 29.883)
+LINESTRING(-90.1318 29.883,-90.299 29.9837,-90.3534 30.0151,-90.3725 30.0265,-90.3909 30.0381,-90.4072 30.0494,-90.4198 30.0597,-90.4224 30.063,-90.4274 30.0706,-90.4349 30.0836,-90.4392 30.0887)
+LINESTRING(-93.684 30.1369,-93.6822 30.1377,-93.5905 30.1754,-93.5141 30.1996,-93.4322 30.213,-93.3238 30.2184,-93.315 30.2231,-93.306 30.2271,-93.2968 30.2311,-93.2877 30.2354,-93.2619 30.2369,-93.2343 30.2405,-93.2067 30.2442,-93.1808 30.2459,-93.1746 30.256,-93.1696 30.2612,-93.1535 30.2641,-93.1416 30.263,-93.1298 30.262,-93.1183 30.2618,-93.1119 30.2628,-93.1053 30.2644,-93.0987 30.266,-93.0924 30.2668,-93.0623 30.2669,-93.0322 30.2669,-93.002 30.267,-92.9719 30.2671)
+LINESTRING(-80.8333 28.4483,-80.8341 28.4556,-80.8342 28.4638,-80.8343 28.472,-80.8352 28.4801,-80.8596 28.5126,-80.8746 28.5415,-80.882 28.5724,-80.8838 28.6112,-80.8868 28.6313,-80.8939 28.66,-80.9026 28.6884,-80.91 28.7076,-80.9098 28.7431,-80.9209 28.798,-80.9365 28.8539,-80.9495 28.8925,-80.9612 28.9209,-80.9738 28.9477,-80.9878 28.9739,-81.0039 29.0005,-81.0094 29.0084,-81.016 29.0174,-81.0218 29.0266,-81.0251 29.0346,-81.0303 29.0517,-81.0382 29.0717,-81.0455 29.0899,-81.0488 29.1019,-81.0609 29.1136,-81.0739 29.1233,-81.0859 29.1345,-81.0933 29.1473)
+LINESTRING(-80.7224 28.4068,-80.7173 28.4076,-80.6853 28.4082,-80.664 28.4076)
+LINESTRING(-80.7467 28.403,-80.7224 28.4068)
+LINESTRING(-80.8196 28.4134,-80.8032 28.4111,-80.7814 28.407,-80.7605 28.4034,-80.747 28.403,-80.7467 28.403)
+LINESTRING(-80.8196 28.4134,-80.8236 28.4218,-80.8275 28.4302,-80.8308 28.4386,-80.8333 28.4483)
+LINESTRING(-81.0933 29.1473,-81.1201 29.1344,-81.1664 29.0981,-81.2087 29.0572,-81.2424 29.0213,-81.2677 28.9812,-81.2832 28.9373,-81.3055 28.89,-81.3505 28.8399,-81.3573 28.8149,-81.3739 28.7713,-81.3915 28.7259,-81.4011 28.6951,-81.4005 28.6726,-81.3948 28.6473,-81.388 28.622,-81.3835 28.5992,-81.3753 28.5849,-81.3769 28.5688,-81.3822 28.5521,-81.3901 28.536,-81.3942 28.5351,-81.3986 28.5349,-81.403 28.5351,-81.4072 28.5359,-81.4292 28.5465,-81.467 28.5494,-81.5046 28.5483,-81.5256 28.5471,-81.5379 28.5454,-81.5774 28.5383,-81.6143 28.5303,-81.6475 28.5255,-81.6757 28.5278,-81.6816 28.5333,-81.6888 28.5379,-81.6962 28.5425,-81.7026 28.5481,-81.7303 28.5803,-81.739 28.59,-81.7631 28.6116,-81.7936 28.6343,-81.8249 28.6561,-81.8517 28.6753,-81.8647 28.6864,-81.8774 28.699,-81.8898 28.7119,-81.9019 28.7241,-81.9236 28.7428,-81.9467 28.7603,-81.9702 28.7773,-81.9931 28.7947,-82.002 28.8025,-82.0188 28.8188,-82.0277 28.8266,-82.0425 28.8349,-82.0599 28.8414,-82.0765 28.8482,-82.0889 28.8571)
+LINESTRING(-97.7524 30.2139,-97.7446 30.2302,-97.7403 30.2447,-97.7377 30.2565,-97.7352 30.2644,-97.7274 30.281,-97.7188 30.3021,-97.7104 30.3228,-97.703 30.3378,-97.6956 30.3496,-97.6882 30.3614,-97.6814 30.3735,-97.6752 30.3858,-97.6737 30.3922,-97.674 30.3991,-97.6748 30.4062,-97.6749 30.4128,-97.6727 30.4319,-97.6708 30.4502,-97.6709 30.4686,-97.6749 30.4882,-97.6781 30.496,-97.6818 30.5037,-97.6853 30.5116,-97.6873 30.5201)
+LINESTRING(-80.8333 28.4483,-80.8535 28.453,-80.8884 28.4544,-80.9294 28.4541,-80.9691 28.4539,-81.0404 28.4543,-81.1115 28.4538,-81.1796 28.4529,-81.2421 28.4523,-81.2684 28.4522,-81.2947 28.4522,-81.3213 28.4519,-81.3477 28.4513,-81.3613 28.4496,-81.3797 28.4456,-81.3971 28.44,-81.4078 28.4334)
+LINESTRING(-81.4078 28.4334,-81.4105 28.4303,-81.414 28.4274,-81.4177 28.4249,-81.4215 28.4227,-81.4341 28.422,-81.4469 28.4214,-81.4597 28.4213,-81.4722 28.4221)
+LINESTRING(-81.4722 28.4221,-81.4738 28.4403,-81.4742 28.4495,-81.4737 28.4585,-81.4642 28.4689,-81.452 28.4796,-81.439 28.4902,-81.4274 28.5003,-81.4252 28.5028,-81.423 28.5055,-81.4207 28.5081,-81.4178 28.51,-81.4095 28.5099,-81.4013 28.5107,-81.3935 28.5129,-81.3865 28.5166,-81.3857 28.5267)
+LINESTRING(-95.377 29.8118,-95.3844 29.8284,-95.3937 29.8445,-95.4034 29.8604,-95.4124 29.8765,-95.414 29.8878,-95.4141 29.8936,-95.4142 29.8994,-95.4177 29.9291,-95.4243 29.9584,-95.4313 29.9879,-95.4356 30.0178,-95.4425 30.0875,-95.4516 30.1569,-95.4601 30.2263,-95.4652 30.2957,-95.4705 30.319,-95.482 30.3588,-95.4939 30.3991,-95.5005 30.424,-95.5018 30.4398,-95.5012 30.4561,-95.5003 30.4723,-95.5007 30.4881,-95.5043 30.5702,-95.5075 30.6281,-95.5297 30.6779,-95.5904 30.7357,-95.6104 30.7521,-95.63 30.7689,-95.6494 30.7857,-95.6694 30.802,-95.6858 30.8139,-95.7032 30.8258,-95.7203 30.838,-95.7356 30.8507,-95.7513 30.8671,-95.7664 30.885,-95.781 30.9033,-95.7954 30.9207,-95.8152 30.9329,-95.846 30.9455,-95.8833 30.9683,-95.9232 31.011,-95.9283 31.018,-95.9334 31.025,-95.9385 31.0321,-95.9431 31.0392,-95.9467 31.0468,-95.9502 31.0544,-95.9537 31.0618,-95.9557 31.0687,-95.9586 31.08,-95.961 31.0916,-95.9637 31.1031,-95.9672 31.1141,-95.9758 31.132,-95.9851 31.1481,-95.9938 31.1648,-96.0001 31.1848,-96.001 31.2085,-95.9973 31.2323,-95.9933 31.2558,-95.9938 31.2787,-95.9964 31.2882,-95.9999 31.2979,-96.0035 31.3077,-96.0064 31.3175,-96.0081 31.328,-96.0093 31.3387,-96.0105 31.3492,-96.0124 31.3593,-96.0225 31.384,-96.0382 31.4073,-96.0561 31.4296,-96.0733 31.451)
+LINESTRING(-95.377 29.8118,-95.3751 29.8037,-95.3732 29.7956,-95.3712 29.7875,-95.3693 29.7794)
+LINESTRING(-95.3473 29.7692,-95.3303 29.7701,-95.3143 29.7732,-95.2986 29.7763,-95.2826 29.777,-95.2665 29.7753,-95.2497 29.773,-95.2331 29.7712,-95.2172 29.7709,-95.1979 29.771,-95.176 29.7704,-95.1543 29.7705,-95.1355 29.7728,-95.1149 29.7806,-95.0947 29.7899,-95.074 29.7948,-95.0519 29.7893,-95.0414 29.7908,-95.0334 29.7941,-95.0261 29.7983,-95.0179 29.8028,-95.0072 29.804,-94.9843 29.8061,-94.9648 29.8079,-94.9454 29.8096,-94.8525 29.8264,-94.6765 29.8321,-94.4972 29.8308,-94.3948 29.8272,-94.3308 29.8724,-94.2643 29.9306,-94.201 29.9921,-94.1464 30.0471,-94.1386 30.0586,-94.1361 30.0705,-94.1364 30.0832,-94.137 30.0971,-94.1003 30.0977,-94.0757 30.0985,-94.0503 30.1069,-94.0114 30.1302,-93.9547 30.1312,-93.9091 30.1319,-93.8656 30.1275,-93.8153 30.1138,-93.8057 30.1138,-93.7973 30.1121,-93.789 30.11,-93.7798 30.1085,-93.7522 30.11,-93.7284 30.1168,-93.7058 30.1268,-93.684 30.1369)
+LINESTRING(-95.3473 29.7692,-95.3462 29.7726,-95.3452 29.776,-95.3442 29.7794,-95.3431 29.7829,-95.3349 29.8015,-95.3285 29.8286,-95.3248 29.856,-95.3248 29.8756,-95.3092 29.906,-95.2949 29.9439,-95.2812 29.9832,-95.267 30.018,-95.2546 30.0471,-95.2444 30.0766,-95.2353 30.1066,-95.2264 30.1368,-95.2024 30.1917,-95.1675 30.2473,-95.1283 30.3013,-95.0915 30.3512)
+LINESTRING(-95.3693 29.7794,-95.3638 29.7768,-95.3583 29.7743,-95.3528 29.7718,-95.3473 29.7692)
+LINESTRING(-95.3645 29.7434,-95.3602 29.7498,-95.3559 29.7563,-95.3516 29.7628,-95.3473 29.7692)
+LINESTRING(-95.3693 29.7794,-95.3873 29.7804,-95.4199 29.7809,-95.4469 29.7809,-95.474 29.781,-95.5183 29.7809,-95.5627 29.7806,-95.6071 29.7803,-95.6513 29.7804,-95.6845 29.781,-95.7179 29.7818,-95.7514 29.7819,-95.7845 29.7806,-95.7937 29.7794,-95.8029 29.7776,-95.8123 29.7759,-95.8221 29.7752,-95.8547 29.7761,-95.8879 29.7776,-95.9211 29.7784,-95.9535 29.7769,-95.9755 29.7738,-95.9981 29.7695,-96.0206 29.7657,-96.0425 29.7637,-96.0658 29.7649,-96.0922 29.7682,-96.1206 29.7714,-96.15 29.7726,-96.2093 29.7636,-96.3143 29.7443,-96.4157 29.7247,-96.4643 29.7152,-96.4785 29.712,-96.4924 29.7074,-96.5062 29.7015,-96.5198 29.6946)
+LINESTRING(-81.9698 28.0846,-81.9553 28.0979,-81.9407 28.1121,-81.9256 28.1255,-81.9097 28.1363,-81.8942 28.1414,-81.8667 28.1487,-81.8394 28.1552,-81.8246 28.1581,-81.8136 28.1582,-81.8035 28.1583,-81.7934 28.159,-81.7823 28.1614,-81.7739 28.167,-81.7695 28.1706,-81.7246 28.1919,-81.6834 28.2115,-81.6448 28.2345,-81.6118 28.263,-81.5836 28.2935,-81.5552 28.3238,-81.5269 28.3541,-81.4987 28.3846,-81.4909 28.3927,-81.4819 28.4023,-81.4748 28.4125,-81.4722 28.4221)
+LINESTRING(-96.5198 29.6946,-96.5266 29.691,-96.5361 29.684,-96.5459 29.6771,-96.5535 29.6737,-96.5645 29.6728,-96.5756 29.6719,-96.5867 29.671,-96.5977 29.6701,-96.6501 29.6659,-96.7039 29.6633,-96.7564 29.6652,-96.8047 29.6742,-96.8164 29.6784,-96.8312 29.6841,-96.8456 29.6896,-96.8561 29.6929,-96.8678 29.6949,-96.8788 29.6959,-96.8899 29.6962,-96.9018 29.6962)
+LINESTRING(-81.9698 28.0846,-81.9784 28.0796,-81.9873 28.0754,-81.996 28.0711,-82.0044 28.0658,-82.0135 28.0588,-82.0226 28.0518,-82.0329 28.0447,-82.0406 28.0412,-82.0595 28.0408,-82.0797 28.0424,-82.0998 28.0436,-82.1183 28.0421,-82.1263 28.04,-82.1341 28.0374,-82.1417 28.0346,-82.1494 28.0321,-82.1641 28.03,-82.1836 28.0293,-82.2034 28.0291,-82.2193 28.0283,-82.2467 28.0234,-82.2734 28.0159,-82.3002 28.0081,-82.3279 28.002)
+LINESTRING(-82.0889 28.8571,-82.0872 28.8367,-82.0906 28.8142,-82.095 28.7935,-82.0967 28.7784,-82.1029 28.7702,-82.1092 28.7613,-82.1148 28.7521,-82.1188 28.743,-82.1266 28.7166,-82.1345 28.6904,-82.1451 28.6654,-82.1608 28.6425,-82.1695 28.6343,-82.182 28.6236,-82.1935 28.6138,-82.1993 28.6082,-82.2072 28.5953,-82.2156 28.5845,-82.2253 28.5746,-82.237 28.5647,-82.2385 28.5393,-82.2407 28.5218,-82.2441 28.5051,-82.2496 28.4822,-82.2564 28.4776,-82.2632 28.473,-82.27 28.4684,-82.2769 28.4638,-82.2775 28.4542,-82.2788 28.4446,-82.2805 28.4349,-82.2823 28.4253,-82.2914 28.4188,-82.3004 28.4118,-82.3092 28.4048,-82.318 28.3978,-82.3208 28.3673,-82.3232 28.3371,-82.3249 28.3068,-82.3256 28.2761,-82.3339 28.264,-82.3528 28.2368,-82.3737 28.2061,-82.3878 28.1838,-82.391 28.1779,-82.3942 28.1721,-82.3974 28.1663,-82.4006 28.1605,-82.3704 28.1142,-82.3506 28.0811,-82.3377 28.048,-82.3279 28.002)
+LINESTRING(-95.8534 29.5166,-95.8398 29.5179,-95.8208 29.5219,-95.802 29.5267,-95.7888 29.5304,-95.7388 29.5444,-95.7022 29.5548,-95.6751 29.5638,-95.6539 29.5735,-95.6366 29.5848,-95.6182 29.6,-95.5961 29.6209,-95.5673 29.6491,-95.5476 29.6681,-95.5278 29.6872,-95.5084 29.7066,-95.4901 29.7266,-95.46 29.7294,-95.4299 29.7323,-95.3998 29.735,-95.3696 29.7372,-95.3672 29.7404,-95.3645 29.7434)
+LINESTRING(-82.5399 27.9627,-82.5332 27.9648,-82.5226 27.9675,-82.5165 27.9689,-82.5104 27.9703,-82.4974 27.9754,-82.4777 27.9812,-82.4597 27.986,-82.4519 27.988,-82.4288 27.9904,-82.4061 27.992,-82.3844 27.9933,-82.3641 27.9952,-82.3545 27.9956,-82.3453 27.9962,-82.3364 27.998,-82.3279 28.002)
+LINESTRING(-97.7524 30.2139,-97.7609 30.2025,-97.769 30.1907,-97.7767 30.1786,-97.7838 30.1665,-97.7943 30.1447,-97.8028 30.1217,-97.8113 30.0987,-97.8216 30.0771,-97.8342 30.0563,-97.8475 30.0346,-97.8599 30.0126,-97.8697 29.991,-97.8726 29.9822,-97.8743 29.9729,-97.8746 29.9635,-97.8728 29.9545,-97.8804 29.9418,-97.8877 29.9283,-97.8954 29.9151,-97.9041 29.9033,-97.9487 29.8583,-98.0058 29.8028,-98.0585 29.7471,-98.0899 29.701,-98.1035 29.6944,-98.1179 29.69,-98.1321 29.686,-98.1455 29.6805,-98.1629 29.671,-98.1803 29.6616,-98.1976 29.652,-98.2146 29.6422,-98.2323 29.6322,-98.2505 29.6225,-98.2684 29.6127,-98.2858 29.6026,-98.3118 29.5853,-98.3316 29.5706,-98.3519 29.5568,-98.3793 29.5421,-98.3915 29.5293,-98.3936 29.5122,-98.3997 29.4917,-98.4243 29.4684,-98.4382 29.4607,-98.4522 29.453,-98.4649 29.446,-98.4776 29.439)
+LINESTRING(-82.6435 27.8995,-82.643 27.9001,-82.6088 27.927,-82.5715 27.9488,-82.5425 27.9619,-82.5399 27.9627)
+LINESTRING(-94.9131 29.3093,-94.9243 29.3173,-94.9322 29.3285,-94.9635 29.3493,-94.9944 29.3708,-95.0234 29.3939,-95.0493 29.4198,-95.0791 29.4573,-95.1109 29.5002,-95.1426 29.5416,-95.1723 29.5749,-95.1914 29.5922,-95.2117 29.6095,-95.2314 29.6271,-95.2491 29.6453,-95.2649 29.664,-95.2811 29.6827,-95.2986 29.7005,-95.3182 29.7162,-95.3296 29.7227,-95.3426 29.729,-95.3549 29.7357,-95.3645 29.7434)
+LINESTRING(-98.4776 29.439,-98.4826 29.4357,-98.4876 29.4323,-98.4925 29.4289,-98.4975 29.4256)
+LINESTRING(-100.643 30.5781,-100.619 30.5738,-100.594 30.5723,-100.569 30.5719,-100.544 30.5709,-100.512 30.5636,-100.478 30.5493,-100.446 30.5321,-100.417 30.5161,-100.382 30.4981,-100.347 30.4816,-100.31 30.4655,-100.268 30.4488,-100.242 30.4378,-100.23 30.4335,-100.221 30.4309,-100.146 30.4218,-100.085 30.4233,-100.026 30.4344,-99.9569 30.4543,-99.9276 30.4649,-99.9 30.4758,-99.8694 30.4842,-99.8314 30.4875,-99.7974 30.4811,-99.7659 30.4659,-99.7363 30.4481,-99.7081 30.4337,-99.6878 30.4255,-99.6625 30.4163,-99.6367 30.405,-99.615 30.3909,-99.598 30.3716,-99.5836 30.3496,-99.5694 30.328,-99.5525 30.3097,-99.5208 30.2887,-99.4708 30.259,-99.42 30.2299,-99.3855 30.211,-99.3599 30.2012,-99.3313 30.1944,-99.3032 30.1875,-99.2785 30.1778,-99.2632 30.1672,-99.2491 30.1546,-99.2354 30.1419,-99.2209 30.1312,-99.1936 30.1157,-99.1661 30.1018,-99.1375 30.0894,-99.1069 30.0782,-99.0944 30.0754,-99.0807 30.074,-99.0666 30.0725,-99.0532 30.0695,-99.0221 30.0555,-98.9743 30.031,-98.9279 30.0054,-98.9013 29.9884,-98.8911 29.9764,-98.8818 29.9613,-98.8726 29.9458,-98.8625 29.9322,-98.8492 29.9189,-98.8345 29.906,-98.8198 29.8931,-98.8059 29.8798,-98.8003 29.8727,-98.7957 29.8648,-98.7911 29.8569,-98.7858 29.8498,-98.7786 29.8427,-98.7704 29.8353,-98.7541 29.8211,-98.7552 29.798,-98.7478 29.7866,-98.7339 29.7788,-98.7155 29.7661,-98.6996 29.7518,-98.6835 29.7365,-98.6688 29.7202,-98.6571 29.7031,-98.6352 29.6636,-98.6149 29.6249,-98.5972 29.5857,-98.5832 29.5441,-98.5624 29.5243,-98.5505 29.5065,-98.5396 29.4919,-98.5219 29.4818,-98.5181 29.4729,-98.5155 29.4634,-98.5139 29.4537,-98.5126 29.4442,-98.5103 29.4418,-98.5068 29.4376,-98.4975 29.4256)
+LINESTRING(-94.8255 29.2822,-94.8368 29.2825,-94.8514 29.2841,-94.86 29.2856)
+LINESTRING(-96.9018 29.6962,-96.9387 29.6942,-96.979 29.6941,-97.0193 29.6956,-97.0562 29.6986,-97.0691 29.7005,-97.0819 29.7027,-97.0948 29.7045,-97.108 29.7051,-97.1348 29.7042,-97.162 29.7029,-97.189 29.7012,-97.2159 29.6992,-97.2344 29.6958,-97.253 29.6898,-97.2714 29.6829,-97.2896 29.6767,-97.319 29.6696,-97.3519 29.6638,-97.3854 29.6597,-97.4163 29.6578,-97.468 29.6574,-97.5422 29.657,-97.614 29.6552,-97.6585 29.6509,-97.7121 29.6371,-97.7878 29.6191,-97.8644 29.6042,-97.9209 29.5998,-97.9265 29.6004,-97.9331 29.6011,-97.9396 29.6011,-97.9443 29.5999,-97.9722 29.5989,-98.006 29.5818,-98.037 29.5602,-98.0563 29.546,-98.0634 29.5437,-98.0705 29.5415,-98.0777 29.5393,-98.0848 29.537,-98.1333 29.5205,-98.1819 29.5039,-98.2302 29.487,-98.2786 29.4695,-98.2844 29.4678,-98.2902 29.4661,-98.3218 29.4575,-98.3541 29.449,-98.3862 29.44,-98.4171 29.4299,-98.4266 29.4227,-98.4386 29.4112,-98.4543 29.4008,-98.4753 29.3973)
+LINESTRING(-98.4975 29.4256,-98.4907 29.4165,-98.4838 29.4075,-98.4785 29.4008,-98.4753 29.3973)
+LINESTRING(-98.4975 29.4256,-98.5011 29.4182,-98.5047 29.4108,-98.5083 29.4034,-98.5119 29.396)
+LINESTRING(-80.8196 28.4134,-80.8114 28.3809,-80.7959 28.3388,-80.7775 28.3007,-80.7606 28.2801,-80.7385 28.2226,-80.7217 28.1864,-80.7104 28.1526,-80.705 28.1023,-80.7049 28.0944,-80.7049 28.0865,-80.7042 28.0779,-80.702 28.0713,-80.6944 28.0645,-80.6822 28.0571,-80.6699 28.0499,-80.6619 28.0433,-80.647 28.0224,-80.6321 28.0015,-80.6233 27.9882,-80.6171 27.9767,-80.6119 27.9632,-80.6071 27.9457,-80.6012 27.9209,-80.5925 27.8855,-80.5921 27.8761,-80.5923 27.8662,-80.5525 27.8172,-80.5471 27.7919,-80.5521 27.7662,-80.5438 27.7163,-80.5372 27.6986,-80.5293 27.6794,-80.5221 27.6601,-80.5176 27.6421,-80.5171 27.6359,-80.5165 27.6296,-80.5158 27.6224,-80.5133 27.6143,-80.5094 27.6076,-80.4936 27.583,-80.4781 27.5631,-80.4585 27.5452,-80.4433 27.5263,-80.4369 27.5127,-80.4319 27.5001,-80.4274 27.4889,-80.4224 27.4796,-80.4129 27.4736,-80.4026 27.4681,-80.3914 27.4589,-80.3849 27.446,-80.3834 27.4279,-80.3863 27.4141,-80.3935 27.3992)
+LINESTRING(-80.3935 27.3992,-80.4104 27.4197,-80.4288 27.442,-80.4493 27.4646,-80.4678 27.4862,-80.489 27.4878,-80.5183 27.4871,-80.5525 27.4881,-80.5709 27.4909,-80.5912 27.514,-80.6051 27.5282,-80.6198 27.5414,-80.6428 27.5614,-80.7708 27.5645,-80.7859 27.5671,-80.7968 27.5735,-80.8054 27.5827,-80.8137 27.5939,-80.8324 27.6184,-80.8497 27.6396,-80.8679 27.6598,-80.8895 27.6814,-80.8944 27.6901,-80.8956 27.6998,-80.8973 27.7102,-80.904 27.7205,-80.928 27.742,-80.9536 27.7637,-80.9784 27.7859,-81 27.8091,-81.005 27.8208,-81.0065 27.835,-81.0078 27.8498,-81.0124 27.8633,-81.0204 27.8724,-81.0288 27.8808,-81.0647 27.9274,-81.0796 27.9444,-81.0969 27.9612,-81.1147 27.9777,-81.1314 27.9937,-81.1439 28.0027,-81.1594 28.0104,-81.176 28.0185,-81.192 28.0289,-81.2759 28.0941,-81.2866 28.1234,-81.2945 28.1523,-81.301 28.1815,-81.3072 28.2116,-81.3161 28.2222,-81.3239 28.2363,-81.3291 28.2512,-81.3303 28.2642,-81.335 28.2723,-81.337 28.2813,-81.3511 28.2959,-81.3612 28.306,-81.3675 28.3138,-81.381 28.3405,-81.3886 28.3596,-81.3921 28.379,-81.3933 28.4069,-81.395 28.4128,-81.3989 28.4208,-81.4078 28.4334)
+LINESTRING(-82.6593 27.7775,-82.6604 27.7901,-82.6627 27.8026,-82.6651 27.8149,-82.6663 27.8269,-82.6656 27.8378,-82.664 27.8485,-82.6627 27.8596,-82.663 27.8715,-82.6435 27.8995)
+LINESTRING(-82.6778 27.6997,-82.6779 27.7046,-82.6758 27.7066,-82.6738 27.7087,-82.6723 27.7214,-82.6708 27.7342,-82.6693 27.7469,-82.6678 27.7597,-82.6659 27.7615,-82.6639 27.7633,-82.662 27.7651,-82.66 27.767,-82.6593 27.7695,-82.6591 27.7722,-82.6592 27.7749,-82.6593 27.7775)
+LINESTRING(-82.3279 28.002,-82.3266 27.9781,-82.3281 27.9527,-82.3333 27.9281,-82.3432 27.9066,-82.3448 27.9033,-82.3464 27.8999,-82.348 27.8966,-82.3496 27.8933,-82.348 27.8627,-82.3482 27.831,-82.3522 27.7999,-82.3622 27.7711,-82.3718 27.7562,-82.379 27.7476,-82.3834 27.7369,-82.3843 27.7157,-82.3914 27.7092,-82.3998 27.7047,-82.4084 27.7008,-82.4165 27.6959,-82.4234 27.6881,-82.4294 27.6776,-82.4352 27.6669,-82.4413 27.6581,-82.4455 27.6548,-82.4508 27.6523,-82.4561 27.65,-82.4605 27.6473,-82.4751 27.6346,-82.4907 27.6203,-82.5047 27.605,-82.5148 27.5896)
+LINESTRING(-82.5148 27.5896,-82.5315 27.5887,-82.5487 27.5876,-82.5657 27.5868,-82.5798 27.5868)
+LINESTRING(-82.5798 27.5868,-82.5824 27.5868,-82.61 27.5891,-82.6305 27.5953,-82.6471 27.6084,-82.6632 27.6313,-82.6675 27.6383,-82.6718 27.6454,-82.6754 27.6527,-82.6776 27.6604,-82.6774 27.6672,-82.6774 27.6818,-82.6777 27.6932,-82.6778 27.6997)
+LINESTRING(-80.3935 27.3992,-80.388 27.3882,-80.3818 27.3764,-80.3763 27.3646,-80.3729 27.3537,-80.3725 27.3417,-80.3735 27.3268,-80.3742 27.3122,-80.3726 27.3012,-80.369 27.2898,-80.3663 27.2778,-80.3634 27.2658,-80.3597 27.2542,-80.3415 27.2136,-80.326 27.1889,-80.3075 27.1654,-80.2805 27.1281,-80.2669 27.1032,-80.2614 27.0848,-80.2588 27.0638,-80.2541 27.0314,-80.2418 27.0202,-80.2288 27.0094,-80.2162 26.9982,-80.2051 26.9862,-80.1881 26.9626,-80.1761 26.9414,-80.1683 26.9219,-80.164 26.9032)
+LINESTRING(-80.164 26.9032,-80.1348 26.8478,-80.1163 26.7922,-80.105 26.7358,-80.098 26.6784)
+LINESTRING(-80.164 26.9032,-80.1625 26.8804,-80.1635 26.8561,-80.1659 26.8289,-80.1683 26.7972,-80.1709 26.742,-80.1736 26.7221,-80.1822 26.7108,-80.2029 26.6811)
+LINESTRING(-82.0365 26.9751,-82.0378 26.9792,-82.0393 26.9928,-82.042 27.0066,-82.0493 27.0209,-82.0685 27.0452,-82.093 27.0709,-82.1216 27.0913,-82.153 27.0998,-82.1863 27.0999,-82.2197 27.1,-82.2625 27.1004,-82.2859 27.1016,-82.2947 27.1047,-82.3035 27.1088,-82.3126 27.1125,-82.3218 27.1142,-82.3421 27.1125,-82.3627 27.1102,-82.382 27.1125,-82.3985 27.1246,-82.4074 27.1358,-82.4168 27.1472,-82.4259 27.1588,-82.4338 27.1704,-82.4387 27.184,-82.4417 27.2007,-82.446 27.2169,-82.4547 27.2292,-82.4537 27.2363,-82.4521 27.243,-82.4504 27.2497,-82.4486 27.2563,-82.4468 27.2715,-82.447 27.2884,-82.448 27.3055,-82.4484 27.3213,-82.4475 27.3374,-82.446 27.3544,-82.4455 27.3714,-82.4472 27.3872,-82.45 27.3965,-82.4533 27.4056,-82.4566 27.4148,-82.4588 27.4243,-82.4594 27.4352,-82.4588 27.4475,-82.4586 27.4596,-82.4601 27.4695,-82.4729 27.4929,-82.4889 27.509,-82.503 27.5229,-82.51 27.5393,-82.5112 27.5519,-82.5124 27.5644,-82.5136 27.577,-82.5148 27.5896)
+LINESTRING(-82.0258 26.945,-82.0278 26.9511,-82.0338 26.9657,-82.0365 26.9751)
+LINESTRING(-98.4753 29.3973,-98.4685 29.3845,-98.4572 29.3747,-98.4436 29.3662,-98.43 29.3577,-98.4228 29.3472,-98.4166 29.3313,-98.4096 29.3156,-98.4001 29.3059,-98.4056 29.2675,-98.4128 29.2159,-98.4232 29.1673,-98.4383 29.1376,-98.4393 29.1102,-98.4373 29.0828,-98.4349 29.0555,-98.4346 29.0284,-98.4369 28.9979,-98.4393 28.9678,-98.4406 28.9377,-98.4394 28.9068,-98.4098 28.8869,-98.3892 28.8601,-98.3715 28.831,-98.3509 28.804,-98.3382 28.7941,-98.324 28.786,-98.3105 28.7776,-98.2997 28.767,-98.2905 28.7477,-98.2839 28.7243,-98.2781 28.7,-98.2709 28.6779,-98.2659 28.6701,-98.2593 28.6639,-98.2523 28.6581,-98.2461 28.6513,-98.2425 28.6446,-98.2403 28.6378,-98.2384 28.6311,-98.2357 28.6245,-98.2264 28.6119,-98.2144 28.5999,-98.203 28.5878,-98.1953 28.5746,-98.1917 28.5617,-98.189 28.5481,-98.1866 28.5345,-98.1835 28.5211,-98.1744 28.5127,-98.1652 28.5043,-98.1561 28.4959,-98.147 28.4874,-98.137 28.4775,-98.1276 28.4677,-98.1175 28.4583,-98.1053 28.4499,-98.0986 28.4473,-98.0926 28.4428,-98.0735 28.4181,-98.0529 28.3911,-98.0341 28.3629,-98.0206 28.3344)
+LINESTRING(-80.098 26.6784,-80.0977 26.6764,-80.098 26.6558,-80.0983 26.6292,-80.1004 26.6041,-80.1058 26.5879,-80.1093 26.5879,-80.1128 26.5878,-80.1163 26.5878,-80.1198 26.5877,-80.1201 26.5804,-80.1204 26.5732,-80.1208 26.5659,-80.1211 26.5586,-80.122 26.5558,-80.123 26.5529,-80.124 26.55,-80.1249 26.5471,-80.1254 26.5289,-80.1253 26.5109,-80.1246 26.4929,-80.1233 26.4747,-80.1222 26.4495,-80.1221 26.4243,-80.1222 26.3993,-80.1213 26.3743,-80.1195 26.36,-80.1171 26.3456,-80.1152 26.331,-80.1153 26.3162,-80.1175 26.3025,-80.122 26.2849,-80.128 26.2678,-80.1351 26.2554,-80.1346 26.2441,-80.1347 26.2328,-80.135 26.2214,-80.1351 26.2101,-80.1529 26.1862,-80.1639 26.1523,-80.1688 26.116,-80.1684 26.0853)
+LINESTRING(-80.2465 26.0952,-80.227 26.0927,-80.2075 26.0903,-80.1879 26.0878,-80.1684 26.0853)
+LINESTRING(-80.2465 26.0952,-80.2493 26.1234,-80.2507 26.1531,-80.2469 26.1816,-80.2342 26.2058,-80.2247 26.2163,-80.2127 26.2298,-80.2019 26.2436,-80.1957 26.2553,-80.1966 26.2677,-80.1974 26.2801,-80.198 26.2925,-80.1986 26.305,-80.2001 26.3667,-80.2012 26.4281,-80.2022 26.4894,-80.2035 26.5507,-80.2038 26.5853,-80.2036 26.6267,-80.2032 26.6539,-80.2029 26.6811)
+LINESTRING(-80.4419 26.1461,-80.393 26.1334,-80.3442 26.1207,-80.2954 26.108,-80.2465 26.0952)
+LINESTRING(-80.2308 25.9383,-80.2419 25.9586,-80.2488 25.9805,-80.2499 26.0002,-80.2435 26.0141,-80.2442 26.0343,-80.245 26.0546,-80.2458 26.0749,-80.2465 26.0952)
+LINESTRING(-80.1684 26.0853,-80.1676 26.0658,-80.1672 26.0495,-80.1683 26.0328,-80.172 26.012,-80.1731 25.9985,-80.172 25.9843,-80.1707 25.9698,-80.1715 25.9559,-80.1769 25.9523,-80.1837 25.9471,-80.1898 25.9412,-80.193 25.9358,-80.1994 25.9331,-80.2055 25.9296,-80.2113 25.9256,-80.2157 25.9223)
+LINESTRING(-80.2157 25.9223,-80.2194 25.9252,-80.2233 25.929,-80.2271 25.9334,-80.2308 25.9383)
+LINESTRING(-97.6306 27.9023,-97.6409 27.9212,-97.6525 27.9424,-97.6651 27.9629,-97.6784 27.9797,-97.7046 28.003,-97.7331 28.0245,-97.7614 28.0464,-97.7867 28.0709,-97.7945 28.0814,-97.8014 28.0928,-97.8082 28.1041,-97.816 28.1143,-97.8253 28.1235,-97.8355 28.1323,-97.8456 28.1411,-97.8547 28.1505,-97.8727 28.1739,-97.8878 28.198,-97.9019 28.2223,-97.9168 28.2464,-97.9392 28.2697,-97.9681 28.2902,-97.9972 28.3108,-98.0206 28.3344)
+LINESTRING(-97.291 27.9273,-97.3006 27.9123,-97.31 27.8974,-97.3203 27.8831,-97.3223 27.881)
+LINESTRING(-81.6722 26.1552,-81.6325 26.1544,-81.5928 26.1535,-81.5531 26.1529,-81.5135 26.1529,-81.4634 26.1542,-81.3848 26.1564,-81.3075 26.1575,-81.2615 26.1558,-81.2564 26.1582,-81.2515 26.1609,-81.2467 26.1639,-81.2425 26.1673,-81.1876 26.1673,-81.1328 26.1678,-81.078 26.1686,-81.0232 26.1697,-80.9846 26.1705,-80.946 26.1713,-80.9074 26.1721,-80.8688 26.1729,-80.8257 26.1679,-80.7821 26.1597,-80.7386 26.1514,-80.6954 26.1462,-80.6326 26.144,-80.5687 26.1443,-80.5048 26.1454,-80.4419 26.1461)
+LINESTRING(-81.6722 26.1552,-81.6866 26.1603,-81.6997 26.1629,-81.7127 26.1645,-81.7268 26.1666,-81.7324 26.1707,-81.7361 26.1967,-81.7378 26.2177,-81.7401 26.2379,-81.7436 26.259,-81.7446 26.2718,-81.7441 26.2852,-81.7436 26.2986,-81.7447 26.3117,-81.7471 26.3207,-81.7501 26.3293,-81.7525 26.338,-81.7534 26.3475,-81.7584 26.3537,-81.7641 26.3616,-81.7695 26.3696,-81.7734 26.3762,-81.7734 26.3831,-81.7735 26.39,-81.7757 26.4113,-81.7807 26.4311,-81.7868 26.4507,-81.7922 26.4713,-81.7952 26.4943,-81.7956 26.5175,-81.7946 26.5407,-81.7933 26.5638,-81.7951 26.5803,-81.7998 26.5964,-81.8043 26.6119,-81.8054 26.6269,-81.8031 26.6436,-81.8008 26.66,-81.7993 26.6766,-81.7995 26.6942,-81.8072 26.712,-81.8171 26.7202,-81.8288 26.725,-81.8418 26.7329,-81.8584 26.7477,-81.8743 26.7628,-81.8898 26.7781,-81.9052 26.7938,-81.9157 26.8027,-81.9283 26.8115,-81.9414 26.8204,-81.9531 26.8295,-81.9612 26.8366,-81.9685 26.8444,-81.9705 26.8504,-81.972 26.8565,-81.9735 26.8626,-81.9755 26.8686,-81.981 26.8752,-81.9912 26.8853,-82.0023 26.8966,-82.0102 26.9066,-82.0172 26.9209,-82.0227 26.9359,-82.0258 26.945)
+LINESTRING(-97.6229 27.8662,-97.6255 27.8742,-97.6269 27.8836,-97.6282 27.8933,-97.6306 27.9023)
+LINESTRING(-97.3223 27.881,-97.3329 27.8699,-97.3537 27.8553,-97.3754 27.841,-97.3917 27.8228,-97.3925 27.8184)
+LINESTRING(-80.2157 25.9223,-80.2167 25.9214,-80.216 25.8877,-80.2159 25.8526,-80.2142 25.8175,-80.2091 25.784)
+LINESTRING(-80.3463 25.7817,-80.339 25.7816,-80.3318 25.7815,-80.3263 25.7813,-80.3207 25.7811,-80.296 25.7839,-80.2709 25.7855,-80.2457 25.785,-80.2208 25.7816,-80.2179 25.7822,-80.2149 25.7828,-80.212 25.7834,-80.2091 25.784)
+LINESTRING(-80.2308 25.9383,-80.2609 25.9382,-80.291 25.9381,-80.3211 25.9381,-80.3513 25.938,-80.3529 25.9363,-80.3546 25.9346,-80.3517 25.897,-80.3493 25.8582,-80.3475 25.8194,-80.3463 25.7817)
+LINESTRING(-80.3852 25.7755,-80.3782 25.7786,-80.3687 25.7805,-80.3577 25.7814,-80.3463 25.7817)
+LINESTRING(-99.4427 27.7668,-99.4299 27.7701,-99.4223 27.7727,-99.3902 27.8921,-99.3601 28.0086,-99.3276 28.1246,-99.2935 28.2405,-99.2874 28.2603,-99.2811 28.28,-99.2753 28.2998,-99.2706 28.3199,-99.2802 28.3477,-99.2724 28.3832,-99.2576 28.4193,-99.2461 28.4487,-99.2453 28.4542,-99.2446 28.4597,-99.2439 28.4651,-99.2431 28.4706,-99.2425 28.4761,-99.2419 28.4816,-99.2402 28.4925,-99.2377 28.5011,-99.2347 28.5096,-99.2259 28.5362,-99.2172 28.5631,-99.2092 28.5901,-99.2028 28.6172,-99.2017 28.6293,-99.2019 28.6417,-99.201 28.6541,-99.1966 28.6658,-99.1877 28.6778,-99.1791 28.6873,-99.1711 28.6982,-99.164 28.7143,-99.1527 28.7486,-99.1414 28.783,-99.1302 28.8173,-99.1189 28.8516,-99.1168 28.8643,-99.1178 28.8753,-99.1193 28.8861,-99.1184 28.898,-99.1124 28.9124,-99.1029 28.9261,-99.0927 28.9396,-99.0845 28.9537,-99.0764 28.9721,-99.0682 28.9905,-99.0601 29.0089,-99.0519 29.0273,-99.0206 29.044,-98.9872 29.0591,-98.9547 29.0753,-98.9262 29.0949,-98.9127 29.0958,-98.9011 29.0999,-98.8909 29.1063,-98.8816 29.1142,-98.8566 29.1355,-98.8184 29.1663,-98.7805 29.1954,-98.7562 29.2115,-98.7258 29.2232,-98.6942 29.2331,-98.6628 29.2436,-98.6328 29.2568,-98.6197 29.2658,-98.6087 29.2763,-98.5982 29.2866,-98.5867 29.2952,-98.5696 29.3087,-98.5559 29.3254,-98.5424 29.3429,-98.5262 29.359,-98.5195 29.3666,-98.5151 29.3761,-98.5128 29.3863,-98.5119 29.396)
+LINESTRING(-99.4788 27.5302,-99.4769 27.5486,-99.4768 27.5653,-99.4789 27.5797,-99.4838 27.5914,-99.4882 27.5953,-99.4926 27.5992,-99.497 27.6031,-99.5015 27.607,-99.5002 27.6611,-99.4824 27.6991,-99.4596 27.7309,-99.4427 27.7668)
+LINESTRING(-97.7192 26.1891,-97.7166 26.2308,-97.7184 26.2666,-97.7293 26.2947,-97.754 26.3136)
+LINESTRING(-98.249 26.1865,-98.2576 26.1877,-98.2818 26.1909,-98.3061 26.1942,-98.3304 26.1975,-98.3369 26.2033,-98.3432 26.2093,-98.3494 26.2154,-98.3556 26.2215)
+LINESTRING(-98.1805 26.2075,-98.1962 26.2045,-98.2066 26.1955,-98.2171 26.1867,-98.2333 26.1844,-98.249 26.1865)
+LINESTRING(-97.7192 26.1891,-97.7352 26.1894,-97.7544 26.1902,-97.7735 26.1907,-97.7892 26.1897,-97.7911 26.1891,-97.7926 26.1883,-97.7941 26.1872,-97.7957 26.1861,-97.8083 26.1798,-97.818 26.1763,-97.8281 26.1739,-97.8416 26.1709,-97.8436 26.17,-97.846 26.1685,-97.8484 26.1671,-97.8503 26.1665,-97.8734 26.1662,-97.8974 26.1659,-97.9212 26.164,-97.9437 26.1591,-97.9504 26.1628,-97.9572 26.1665,-97.9655 26.1706,-97.971 26.1726,-98.0237 26.1788,-98.0731 26.187,-98.1222 26.1968,-98.1739 26.2078,-98.1754 26.208,-98.1772 26.2078,-98.1788 26.2077,-98.1805 26.2075)
+LINESTRING(-65.6912 18.316,-65.6918 18.317,-65.6925 18.3181,-65.6931 18.3191,-65.6938 18.3201,-65.6993 18.328,-65.7056 18.3368,-65.7128 18.3448,-65.7209 18.3501,-65.7408 18.3559,-65.7623 18.3597,-65.7839 18.3623,-65.8044 18.3643,-65.8164 18.3655,-65.8284 18.3666,-65.8404 18.3678,-65.8524 18.3689,-65.8549 18.3692,-65.8574 18.3694,-65.8599 18.3696,-65.8625 18.3699,-65.8787 18.3707,-65.895 18.3715,-65.9113 18.3723,-65.9275 18.3731)
+LINESTRING(-66.0832 18.3799,-66.0856 18.3613,-66.0877 18.3452,-66.083 18.3315,-66.0647 18.3202,-66.0585 18.312,-66.0562 18.2975,-66.0565 18.2815,-66.0581 18.269)
+LINESTRING(-66.4942 18.4194,-66.4642 18.4264,-66.4281 18.4347,-66.3919 18.4394,-66.3618 18.4358,-66.3553 18.431,-66.3474 18.4224,-66.3388 18.413,-66.3305 18.4056)
+LINESTRING(-65.8567 18.1457,-65.8675 18.1566,-65.8789 18.165,-65.8909 18.1726,-65.9036 18.1811,-65.9178 18.1916,-65.928 18.2005,-65.936 18.2114,-65.944 18.2278,-65.9458 18.2316,-65.9471 18.234,-65.9489 18.236,-65.9523 18.2387,-65.9547 18.2402,-65.9571 18.2418,-65.9595 18.2434,-65.962 18.245,-65.9924 18.2502,-66.0126 18.2462,-66.0315 18.2476,-66.0581 18.269)
+LINESTRING(-66.2977 18.0013,-66.2684 18.0065,-66.2572 18.0165,-66.2545 18.0325,-66.2503 18.0562,-66.2467 18.0625,-66.2412 18.0676,-66.2363 18.0709,-66.2341 18.0721,-66.2246 18.0827,-66.2064 18.0942,-66.1868 18.1048,-66.173 18.1131,-66.1583 18.1229,-66.1452 18.134,-66.1326 18.1455,-66.1191 18.1562,-66.1041 18.1653,-66.0898 18.1741,-66.0779 18.1849,-66.07 18.2002,-66.0695 18.2021,-66.0691 18.204,-66.0687 18.2059,-66.0682 18.2079,-66.0674 18.211,-66.0667 18.2142,-66.0659 18.2174,-66.0651 18.2205,-66.0643 18.2238,-66.0635 18.227,-66.063 18.2303,-66.0625 18.2337,-66.0614 18.2425,-66.0603 18.2513,-66.0592 18.2602,-66.0581 18.269)
+LINESTRING(-66.2977 18.0013,-66.3024 18.0016,-66.3066 18.0032,-66.3108 18.0055,-66.3153 18.0075,-66.3276 18.0123,-66.34 18.017,-66.3524 18.0217,-66.3648 18.0264,-66.3986 18.0378,-66.4338 18.047,-66.4692 18.0536,-66.5039 18.0571,-66.526 18.0553,-66.5468 18.0489,-66.5646 18.0377,-66.5778 18.0213,-66.5845 18.0202,-66.5911 18.0192,-66.5978 18.0181,-66.6045 18.017,-66.608 18.0164,-66.6115 18.0159,-66.615 18.0153,-66.6185 18.0147,-66.6327 18.0067,-66.647 17.9975,-66.6623 17.9914,-66.6793 17.9929,-66.7014 18.0025,-66.7308 18.017,-66.7593 18.0329,-66.7787 18.0466,-66.7929 18.0481,-66.8062 18.0468,-66.8189 18.0432,-66.8317 18.038,-66.8373 18.0353,-66.843 18.0326,-66.8487 18.03,-66.8544 18.0273,-66.8698 18.0205,-66.8847 18.0161,-66.9003 18.0154,-66.9178 18.0195,-66.9442 18.0337,-66.9662 18.0524,-66.9881 18.0724,-67.0141 18.0905,-67.0175 18.0923,-67.0209 18.0941,-67.0244 18.0959,-67.0278 18.0976,-67.0488 18.1082,-67.068 18.1186,-67.0864 18.1305,-67.105 18.1452,-67.1138 18.1638,-67.1144 18.1768,-67.1106 18.1891,-67.1061 18.2055,-67.1065 18.2129,-67.1098 18.219,-67.1149 18.2245,-67.1209 18.2298,-67.1234 18.2353,-67.1247 18.239,-67.125 18.2426,-67.1246 18.2483)
+LINESTRING(-89.0047 40.5367,-89.0074 40.5726,-89.0076 40.6107,-89.0138 40.6478,-89.0346 40.6806,-89.0342 40.7277,-89.0363 40.7747,-89.039 40.8218,-89.0407 40.8689,-89.0435 40.8708,-89.0464 40.8727,-89.0493 40.8747,-89.0522 40.8766,-89.053 40.9149,-89.0543 40.9531,-89.0564 40.9914,-89.0597 41.0295,-89.0618 41.0308,-89.064 41.0321,-89.0661 41.0333,-89.0682 41.0346,-89.0735 41.103,-89.0806 41.1743,-89.0857 41.245,-89.0855 41.3114,-89.0851 41.313,-89.0846 41.3146,-89.0842 41.3162,-89.0838 41.3178,-89.081 41.3238,-89.0758 41.3291,-89.0701 41.3342,-89.0657 41.3395,-89.0633 41.3457,-89.0619 41.3526,-89.0605 41.3596,-89.0582 41.3662)
+LINESTRING(-88.1968 41.487,-88.1969 41.4445,-88.192 41.4004,-88.1885 41.3567,-88.1926 41.3149,-88.2229 41.2992,-88.2367 41.2805,-88.2437 41.2618,-88.2538 41.2461,-88.2694 41.2334,-88.286 41.2211,-88.3024 41.2087,-88.3176 41.1954,-88.3214 41.1908,-88.3247 41.1857,-88.3319 41.176,-88.3511 41.1594,-88.3725 41.1427,-88.3948 41.1265,-88.4165 41.1115,-88.4294 41.1103,-88.4378 41.105,-88.4426 41.0969,-88.4449 41.0872,-88.4635 41.0712,-88.4816 41.0552,-88.4993 41.0389,-88.5221 41.0178,-88.5349 41.0103,-88.5393 41.0054,-88.5405 40.9997,-88.5419 40.9945,-88.5666 40.9692,-88.5863 40.9518,-88.6092 40.9369,-88.6432 40.9194,-88.6698 40.9016,-88.6752 40.8859,-88.6741 40.8681,-88.6812 40.8439,-88.6919 40.8222,-88.7021 40.7996,-88.7138 40.7776,-88.7289 40.758,-88.7383 40.7452,-88.7398 40.736,-88.7393 40.7275,-88.7427 40.7164,-88.7505 40.7028,-88.7594 40.6889,-88.7695 40.6746,-88.7809 40.6595,-88.7881 40.659,-88.7964 40.6577,-88.8106 40.6528,-88.8153 40.6447,-88.8184 40.6357,-88.8215 40.6269,-88.8261 40.6193,-88.8388 40.6084,-88.8578 40.5958,-88.8781 40.5847,-88.8949 40.578,-88.9058 40.5665,-88.9178 40.5566,-88.9309 40.5475,-88.9454 40.5387,-88.9602 40.5381,-88.9751 40.5377,-88.9899 40.5374,-89.0271 40.5359)
+LINESTRING(-76.0036 44.3458,-75.9982 44.3216,-75.9866 44.3056)
+LINESTRING(-70.776 43.0827,-70.7629 43.0942,-70.7622 43.0946)
+LINESTRING(-70.8583 42.9591,-70.8512 42.9927,-70.8275 43.0301,-70.7954 43.0657,-70.776 43.0827)
+LINESTRING(-71.4081 41.8176,-71.3989 41.8197,-71.3777 41.8176,-71.3736 41.8166)
+LINESTRING(-71.1643 41.7023,-71.1401 41.6824,-71.1092 41.6647,-71.0539 41.6518,-71.0344 41.6501,-70.9849 41.6475,-70.9434 41.6508,-70.9177 41.6561,-70.886 41.6613,-70.8478 41.6772,-70.8016 41.7035,-70.7841 41.7186,-70.7704 41.7352,-70.7553 41.7547,-70.7387 41.7739,-70.7366 41.7762,-70.7346 41.7786,-70.7326 41.781,-70.7306 41.7833)
+LINESTRING(-73.8874 40.6257,-73.8915 40.6196,-73.8918 40.619,-73.8972 40.6135,-73.9097 40.603,-73.9292 40.5903,-73.9433 40.5863,-73.9494 40.5852,-73.9497 40.5852,-73.976 40.5841,-73.9908 40.5907,-74.0091 40.5997,-74.0201 40.6054,-74.021 40.6058)
+LINESTRING(-74.0268 40.6161,-74.0252 40.6178,-74.0206 40.6254,-74.0188 40.6333,-74.0215 40.6413,-74.0133 40.6472,-74.0057 40.6526,-73.9997 40.6589,-73.9961 40.6669,-73.9913 40.6783,-73.9795 40.6949,-73.9896 40.7086,-73.9982 40.7168)
+LINESTRING(-73.9605 40.7661,-73.9789 40.7501,-73.9806 40.7484)
+LINESTRING(-73.9806 40.7484,-74.0085 40.7227)
+LINESTRING(-73.97 40.7447,-73.9806 40.7484)
+LINESTRING(-73.7215 41.0234,-73.7236 40.9975,-73.7337 40.9755,-73.7507 40.9557,-73.7695 40.9367,-73.779 40.9274,-73.7946 40.9142,-73.8115 40.9032,-73.825 40.9005,-73.8379 40.8818,-73.8616 40.8619,-73.8842 40.846,-73.8944 40.8395,-73.905 40.8301,-73.9165 40.8172,-73.9257 40.8058,-73.9295 40.8008,-73.9605 40.7661)
+LINESTRING(-74.2488 40.5247,-74.2334 40.5223,-74.2071 40.5215)
+LINESTRING(-74.1629 40.6155,-74.1535 40.6115,-74.1296 40.608,-74.0937 40.6066,-74.0571 40.6075,-74.047 40.6089)
+LINESTRING(-74.2071 40.5215,-74.2035 40.532,-74.1994 40.5415,-74.1899 40.5487,-74.1817 40.561,-74.1779 40.5783,-74.1721 40.6017,-74.1629 40.6155)
+LINESTRING(-76.5621 39.2702,-76.5628 39.2696,-76.5725 39.2577,-76.5809 39.2447,-76.5877 39.2336,-76.5912 39.234)
+LINESTRING(-74.9263 38.9691,-74.907 38.9949,-74.8907 39.0146,-74.874 39.034,-74.8574 39.0537,-74.825 39.0981,-74.7906 39.1395,-74.754 39.1795,-74.7151 39.2194,-74.6924 39.2408,-74.6673 39.2658,-74.6515 39.2871)
+LINESTRING(-122.333 37.8205,-122.322 37.8241,-122.308 37.8261,-122.294 37.8314)
+LINESTRING(-81.538 31.2,-81.5397 31.1975,-81.5482 31.1827,-81.5498 31.1797)
+LINESTRING(-87.1596 30.5095,-87.127 30.5303,-87.1136 30.5335)
+LINESTRING(-81.4311 30.2579,-81.4228 30.2582,-81.4147 30.2575)
+LINESTRING(-94.86 29.2856,-94.8659 29.2867,-94.877 29.2896,-94.8896 29.2954,-94.9077 29.3054,-94.9131 29.3093)
+LINESTRING(-80.6027 28.4059,-80.6529 28.4072,-80.664 28.4076)
+LINESTRING(-97.3925 27.8184,-97.408 27.792,-97.4181 27.791,-97.4311 27.7895,-97.4455 27.7893,-97.4612 27.7903,-97.4781 27.7924,-97.5141 27.8054,-97.5548 27.8249,-97.5934 27.8467,-97.6229 27.8662)
+LINESTRING(-84.3439 46.5063,-84.3438 46.5045)
+LINESTRING(-97.5019 25.8768,-97.4959 25.9305,-97.5024 25.9511,-97.5104 25.9807,-97.5169 26.011,-97.522 26.0417,-97.533 26.0591,-97.5568 26.0793,-97.5858 26.1001,-97.6122 26.1196,-97.6386 26.1268,-97.6688 26.1469,-97.6974 26.1708,-97.7192 26.1891)
diff --git a/src/boost/libs/geometry/example/data/world.wkt b/src/boost/libs/geometry/example/data/world.wkt
new file mode 100644
index 000000000..baec1fb25
--- /dev/null
+++ b/src/boost/libs/geometry/example/data/world.wkt
@@ -0,0 +1,203 @@
+MULTIPOLYGON(((20.61688 41.83297,20.76739 41.90526,20.76739 42.06565,21.10499 42.15466,21.30066 42.11898,21.47828 42.33228,21.6559 42.26132,21.92253 42.33228,22.37164 42.32233,22.8776 42.02653,22.94867 41.34562,22.72656 41.14888,21.00006 40.86164,20.53307 41.23506,20.61688 41.83297)),((1.439922 42.60649,1.72351 42.50385,1.464789 42.44115,1.439922 42.60649)))
+MULTIPOLYGON(((56.08878 26.07641,56.2636 25.63005,56.37507 24.97792,56.11956 24.73428,56.01702 24.96965,55.81068 24.87648,55.7797 24.23422,56.02393 24.07637,55.48066 23.9653,55.21152 22.69804,55.00691 22.49706,52.0006 23.00111,51.75201 23.86324,51.11637 24.26911,51.11311 24.48294,51.26202 24.6087,51.51158 24.56832,51.30591 24.28478,51.6072 24.37317,51.93002 23.94947,52.60069 24.18971,53.88236 24.05914,54.19826 24.19694,54.13523 24.32686,54.42883 24.28546,54.70065 24.80842,55.31879 25.23269,56.08878 26.07641)))
+MULTIPOLYGON(((65.64548 37.38977,65.76604 37.54458,66.31045 37.32011,67.62237 37.22717,67.75214 37.21798,68.00586 36.92937,68.89037 37.32844,69.25591 37.09871,69.53245 37.59031,70.1679 37.52888,70.30613 37.69593,70.17991 37.94419,70.98909 38.48343,71.36493 38.24717,71.24846 37.9254,71.58373 37.91962,71.4258 37.06402,71.66684 36.67787,73.30843 37.46241,73.76276 37.43214,73.65158 37.23478,74.356 37.41876,74.87856 37.23569,74.48911 37.24192,74.57156 37.03444,74.05276 36.82872,72.6316 36.84843,71.85727 36.39943,71.63596 36.47205,71.20142 36.03578,71.54667 35.72023,71.6749 35.19654,70.99556 34.55477,71.17126 34.35826,71.06528 34.05179,69.89754 34.02774,70.32659 33.34047,69.5071 33.02904,69.2407 32.46139,69.31762 31.92807,68.91688 31.60471,68.16888 31.83424,67.55399 31.5288,67.76277 31.32756,66.73107 31.21251,66.38657 30.93392,66.23059 29.84671,64.10529 29.37748,62.45577 29.38897,60.8786 29.86178,61.8457 31.04082,61.71288 31.37597,60.8569 31.49167,60.87726 32.19884,60.58612 33.14312,60.94499 33.49451,60.64322 33.56461,60.47844 34.07925,60.91771 34.30145,60.74568 34.52298,60.99798 34.63269,61.27663 35.61316,62.0574 35.43748,62.30208 35.14109,62.74783 35.26518,63.09636 35.42773,63.24798 35.69232,63.12922 35.86929,64.44881 36.237,64.75661 37.10646,65.52431 37.23418,65.64548 37.38977)))
+MULTIPOLYGON(((-61.87162 17.12554,-61.68788 17.02532,-61.87162 16.9251,-61.87162 17.12554)))
+MULTIPOLYGON(((-63.0576 18.26141,-62.95737 18.26141,-63.12442 18.16119,-63.15783 18.2113,-63.0576 18.26141)))
+MULTIPOLYGON(((19.37668 41.85016,19.29396 42.18192,19.66689 42.62945,20.16859 42.51689,20.63682 41.97525,20.61688 41.83297,20.53307 41.23506,21.00006 40.86164,21.05243 40.57025,20.69255 40.11284,20.30562 39.98825,20.25783 39.67355,20.00683 39.69328,19.87255 40.04107,19.30259 40.42855,19.49517 40.35749,19.32162 40.65578,19.43578 40.93272,19.40092 41.41341,19.61718 41.61703,19.60125 41.81387,19.37668 41.85016)))
+MULTIPOLYGON(((42.85301 41.56945,44.5701 41.55434,45.86707 41.55434,46.70084 41.43105,46.48491 40.53529,46.79348 40.34929,46.42291 40.04073,46.95339 39.10436,46.53373 38.86489,46 38.82019,45.44402 38.99178,44.82024 39.62525,44.41919 40,43.65548 40.11077,43.67179 40.93345,42.85301 41.56945)))
+MULTIPOLYGON(((12.65399 -6.037013,12.96863 -5.906919,16.59974 -5.918555,16.95371 -7.203343,17.58297 -8.129065,18.53232 -7.920376,19.3744 -8,19.54379 -6.999425,20.62715 -6.913397,20.54168 -7.28143,21.78059 -7.283893,21.74475 -7.932942,21.95976 -8.496954,21.79289 -9.420432,22.32795 -10.38512,22.27194 -11.24606,22.56217 -11.03055,23.08404 -11.12396,23.9957 -10.89157,24.07812 -12.36638,23.9036 -12.83371,24.04029 -12.99056,21.9999 -13.00472,21.99966 -16.19787,23.42815 -17.63928,20.81847 -18.04176,18.91064 -17.8228,18.42207 -17.39404,13.95689 -17.43337,13.37857 -16.97535,11.75755 -17.25208,11.74717 -16.6881,11.73233 -15.88144,12.15138 -15.18429,12.53412 -13.4128,12.94115 -12.83112,13.467 -12.5137,13.79342 -11.80745,13.85923 -10.97377,13.02756 -9.002469,13.40002 -8.745378,13.39898 -8.403039,12.28803 -6.113584,12.63508 -6.050797,12.65399 -6.037013)),((12.01273 -5.028313,12.75132 -4.372592,13.1025 -4.646508,12.47494 -5.075711,12.5351 -5.733854,12.20663 -5.769247,12.01273 -5.028313)))
+MULTIPOLYGON(((-147.5728 -77.41933,-146.9314 -77.26492,-146.0174 -77.41646,-145.8275 -77.32224,-146.1909 -77.19681,-145.9868 -77.11285,-146.3534 -77.03259,-145.3482 -77.092,-146.1951 -76.88565,-145.5312 -76.78005,-146.9839 -76.49876,-149.5277 -76.36947,-148.281 -76.123,-146.7817 -76.33167,-146.7433 -76.34364,-146.7307 -76.33876,-145.6279 -76.49223,-145.4614 -76.35822,-146.4002 -76.08617,-145 -75.91054,-142.5825 -75.52001,-141.8391 -75.70647,-140.5461 -75.55716,-139.8635 -75.1922,-137.3887 -75.14377,-136.718 -74.95844,-137.16 -74.72287,-135.5306 -74.49046,-134.2872 -74.53017,-134.2444 -74.82861,-134.0197 -74.85934,-132.7386 -74.73093,-129.7287 -74.86763,-126.852 -74.64171,-126.0899 -74.76897,-118.6806 -74.52064,-117.8101 -74.2263,-117.0412 -74.51672,-114.682 -74.48839,-114.8884 -74.0795,-113.9766 -73.84374,-113.6018 -73.91348,-114.2086 -74.1787,-113.222 -74.02512,-113.1076 -74.11888,-113.6062 -74.37547,-112.9866 -74.41528,-112.8163 -74.52793,-112.9526 -74.66494,-112.653 -74.67432,-112.759 -74.87855,-111.2249 -74.71639,-111.7395 -74.57491,-111.3477 -74.44996,-111.6424 -74.24312,-111.3317 -74.19423,-110.2559 -74.25336,-109.9251 -74.61841,-109.2242 -74.59337,-109.0429 -74.66589,-109.3077 -74.72726,-108.7616 -74.80927,-107.3295 -74.56448,-107.1918 -74.75031,-106.5581 -74.80162,-106.7394 -75.28212,-105.278 -75.15098,-105.3028 -74.94767,-104.9805 -74.68797,-103.0581 -74.76038,-102.073 -75.03714,-101.9929 -75.26157,-101.0923 -75.20399,-100.4025 -75.11072,-101.7179 -74.48742,-100.5283 -74.32193,-100.467 -74.15931,-101.0017 -73.87003,-102.0246 -73.84728,-102.2851 -73.56465,-100.3858 -73.60537,-100.0153 -73.51032,-99.98972 -73.33138,-100.9725 -73.11209,-102.6611 -73.38333,-103.5061 -72.95382,-103.1021 -72.78841,-99.97404 -73.17883,-97.9697 -72.91085,-95.96609 -73.3474,-94.42165 -73.15022,-94.42994 -72.89843,-93.66614 -73.22129,-90.94019 -73.29758,-90 -73.15421,-90.4012 -72.95483,-90 -72.8713,-89.962 -72.47079,-88.26778 -72.68866,-88.12673 -72.81371,-88.60003 -73.05901,-86.87103 -73.32407,-85.79853 -72.99453,-85.38904 -73.42181,-83.37257 -73.52801,-82.01028 -73.93527,-80.82079 -73.76456,-81.09064 -73.31288,-80.08873 -73.38499,-80.3499 -73.12941,-80.19923 -73.0058,-78.60605 -73.37926,-78.57241 -73.64366,-76.75238 -73.52545,-76.59073 -73.59186,-76.99323 -73.88334,-75.21279 -73.6545,-73.98232 -73.71864,-68.58909 -73.05271,-67.59163 -72.84678,-66.86262 -72.41231,-66.91649 -71.88332,-67.66322 -71.41415,-67.40353 -71.00305,-67.98428 -70.27345,-68.43533 -70.11948,-68.3597 -69.6742,-68.86506 -69.41468,-68.25706 -69.27932,-67.35022 -69.34709,-66.76933 -69.0435,-67.5133 -68.8274,-66.93756 -68.77835,-67.2028 -68.52607,-66.97169 -68.33936,-67.18924 -68.28534,-66.63203 -68.24282,-67.33577 -67.96159,-66.87568 -67.90828,-66.81796 -67.77625,-67.13553 -67.75828,-66.52871 -67.48795,-67.04088 -67.51513,-67.62241 -67.546,-67.51044 -67.04943,-66.93105 -66.92978,-66.87534 -67.18613,-66.48825 -67.3066,-66.59651 -66.64635,-65.78734 -66.68829,-65.61314 -66.39616,-65.89759 -66.32666,-65.71958 -66.13799,-65.16219 -66.17399,-65.33278 -65.97628,-64.99884 -65.92052,-64.56108 -66.00523,-64.69849 -65.72955,-63.66611 -65.50052,-64.08839 -65.41027,-63.97317 -65.08804,-63.12215 -65.1503,-63.01684 -65.02059,-63.26606 -64.94816,-62.39233 -64.86849,-62.70923 -64.75967,-62.55341 -64.58768,-62.21902 -64.76328,-61.82244 -64.49062,-61.61133 -64.6512,-61.48842 -64.35381,-60.93779 -64.29189,-60.97498 -64.04292,-60.01381 -63.9524,-59.92006 -63.77994,-59.49873 -63.90261,-59.40754 -63.71262,-58.99091 -63.66924,-57.3187 -63.2212,-56.77402 -63.59177,-57.40773 -63.47425,-58.08009 -63.66578,-58.68206 -64.00797,-58.94403 -64.36893,-58.83054 -64.52641,-59.67423 -64.32935,-61.05989 -65.0194,-62.20528 -65.32352,-61.69928 -65.53353,-62.36173 -65.77531,-62.34217 -65.96835,-61.91059 -66.17244,-61.34767 -66.07581,-61.34012 -65.92807,-60.65046 -65.92867,-60.93151 -66.25571,-61.13863 -66.33443,-61.44387 -66.1122,-61.70694 -66.25465,-61.68738 -66.46681,-61.89595 -66.202,-62.91435 -66.26334,-62.42487 -66.43945,-62.69852 -66.54893,-62.41847 -66.64384,-62.61674 -66.74141,-63.56338 -66.15765,-63.79447 -66.32298,-63.58502 -66.37685,-63.90477 -66.38157,-63.81412 -66.59188,-64.13767 -66.60095,-64.18324 -66.77244,-63.71266 -66.86559,-64.86923 -66.95708,-64.73378 -67.08302,-65.03812 -67.34045,-65.55116 -67.36085,-65.38097 -67.65559,-65.74351 -67.87952,-65.33723 -67.97603,-65.67077 -68.15653,-64.79382 -68.09529,-65.52914 -68.32217,-64.98169 -68.40441,-65.35143 -68.51173,-65.22174 -68.63541,-64.16667 -68.79305,-64.0137 -68.754,-64.2501 -68.58929,-63.79322 -68.45882,-62.94085 -68.47106,-63.88078 -68.67364,-63.22372 -68.83101,-63.82441 -69.02592,-63.34288 -69.04276,-63.58084 -69.1996,-62.42803 -69.50658,-62.42072 -69.74123,-62.67359 -69.81426,-61.88752 -70.20612,-62.39297 -70.47464,-61.42079 -70.5108,-62.11673 -70.90354,-61.3151 -70.8662,-61.44621 -71.04655,-60.93929 -71.18828,-61.4011 -71.23296,-60.99498 -71.36226,-61.56833 -71.46904,-60.7638 -71.74326,-61.92571 -72.0224,-60.74674 -71.98843,-61.06091 -72.16923,-60.68889 -72.32858,-61.03845 -72.36711,-60.64115 -72.39993,-61.43761 -72.41726,-61.57085 -72.50953,-61.3608 -72.61472,-61.56639 -72.66229,-60.53943 -72.68136,-60.49797 -72.85863,-60.9557 -73.06677,-59.7777 -72.95154,-59.90271 -73.26619,-60.57046 -73.18784,-60.78634 -73.54672,-60.68141 -73.73476,-61.04305 -73.94541,-60.75034 -74.10011,-61.68134 -74.30824,-60.75232 -74.27431,-61.10506 -74.41919,-60.95983 -74.48443,-61.93676 -74.58352,-62.10286 -74.6641,-61.97239 -74.86247,-62.84492 -75.13849,-64.39689 -75.26897,-63.14361 -75.3409,-64.04523 -75.6248,-69.87975 -76.43345,-67.64175 -76.88115,-67.64221 -77.62765,-69.1323 -78.09476,-73.90698 -77.80989,-75.78711 -77.13175,-75.7566 -76.64487,-80.99268 -76.96474,-80.85527 -77.16985,-81.36038 -77.46996,-81.95492 -77.08365,-83.21609 -77.15144,-82.71931 -77.26604,-81.99026 -77.89556,-81.93612 -78.0342,-82.38802 -78.12708,-81.87347 -78.19384,-82.04189 -78.38471,-81.07503 -78.65464,-81.42198 -78.87599,-81.03156 -79.07471,-81.55747 -79.18211,-81.14625 -79.45135,-80.33558 -79.74485,-79.99423 -79.57108,-80.35086 -79.30121,-79.45218 -79.31159,-77.33015 -79.98404,-80.04183 -79.9687,-76.91351 -80.17494,-75.47997 -80.59967,-72.32603 -80.77515,-60.02951 -80.17545,-59.03929 -79.63911,-54.20277 -79.23016,-53.14785 -78.66412,-49.07594 -77.73048,-46.18996 -78,-44.90673 -78.53878,-48.46818 -78.91118,-44.49999 -78.79726,-44.20585 -78.862,-44.12358 -79.09916,-46.44064 -79.25513,-46.34858 -79.43591,-42.89036 -79.39927,-43.132 -79.70922,-42.97097 -79.90626,-44.90707 -79.87933,-44.273 -80.17167,-45.48098 -80.4883,-51.10136 -80.72634,-54.79165 -79.97941,-58.43475 -80.4541,-60.77186 -81.03344,-71.7254 -81.43987,-72.05063 -81.6597,-71.52993 -81.92525,-69.77004 -82.21433,-65.79501 -82.50506,-60.184 -82.42217,-59.0042 -82.646,-59.34418 -82.92903,-59.19208 -82.9997,-58.28839 -83.00181,-55.70493 -82.35511,-51.64454 -81.83927,-42.93808 -81.53368,-34.58165 -80.20743,-31.9802 -80.08701,-31.84765 -80.13922,-32.05788 -80.39796,-30.6669 -80.42556,-30.78801 -80.30796,-30.07994 -80.04109,-30.76914 -79.5375,-29.96069 -79.28139,-36.14171 -78.89499,-36.53619 -78.70159,-36.43656 -78.39095,-35.61145 -78.1042,-35.47655 -77.84616,-31.45897 -77.21949,-31.77299 -77.08531,-31.36195 -77.15858,-31.46373 -77.02705,-31.03682 -77.08697,-28.52219 -76.46471,-28.85636 -76.32193,-24.76731 -75.75751,-23.4526 -75.2246,-22.72079 -74.62666,-18.40745 -73.53629,-15.10938 -72.90343,-13.74999 -72.90005,-12.08424 -72.57872,-11.42006 -72.30421,-11.08251 -71.90502,-12.00747 -71.66534,-12.32292 -71.35822,-11.6453 -71.26801,-11.68905 -71.43419,-10.99034 -71.72793,-10.09897 -71.12045,-10.47855 -70.96667,-9.517255 -70.93051,-9.690064 -71.03048,-9.013316 -71.202,-8.728431 -71.72924,-8.451492 -71.82283,-7.395785 -71.69027,-7.769455 -71.44356,-7.29634 -71.0847,-7.682946 -70.86235,-6.962509 -70.69255,-5.81931 -70.71194,-5.688478 -70.97182,-6.210674 -71.33774,-5.95564 -71.42253,-3.036795 -71.27336,-3.734743 -71.1056,-3.384041 -70.86763,-3.545782 -70.66454,-3.428405 -70.4242,-2.988321 -70.29671,-2.691787 -70.42541,-3.175043 -70.65756,-2.000521 -70.82707,-2.567526 -70.99836,-2.208274 -71.47318,-1.019805 -71.29742,-0.836051 -71.39875,-0.968873 -71.59109,-0.456557 -71.67822,0.529507 -71.25839,2.305984 -70.89809,3.014672 -70.49787,4.436982 -70.25055,5.670681 -70.4614,7.833029 -70.18001,9.494116 -70.19629,11.7798 -70.62699,12.39532 -70.31272,16.21163 -70.18961,23.41115 -70.5189,31.72936 -69.628,33.06709 -69.69125,33.48785 -69.48714,33.37331 -69.29433,33.59489 -69.16609,33.21576 -69.04489,33.26189 -68.75616,34.23629 -68.59197,35.79956 -69.3579,36.90151 -69.56645,37.15831 -69.84441,37.80981 -69.66705,38.67226 -70.07151,38.58318 -69.9601,38.9083 -70.02296,39.23177 -69.74181,39.80762 -69.63715,39.62285 -69.4534,39.95324 -69.40948,39.73758 -69.20739,39.99142 -68.87428,42.81926 -68.07922,45.81517 -67.77689,46.40792 -67.60997,46.28537 -67.36136,46.49178 -67.29949,47.48447 -67.41605,47.25159 -67.63833,47.45211 -67.63939,47.5349 -67.63982,47.98007 -67.59997,47.87607 -67.57869,49.4569 -67.29541,48.34365 -67.09341,49.3224 -66.80885,50.00279 -67.08418,49.80191 -67.26958,50.91731 -67.18555,50.51878 -67.06622,50.85866 -66.78371,50.35193 -66.75648,50.3709 -66.45477,52.27291 -65.93916,55.38184 -65.91651,57.39758 -66.60725,56.32425 -66.83919,56.67126 -66.81158,56.49264 -66.86327,56.98476 -67.07581,58.90776 -67.18205,59.13305 -67.30628,58.64329 -67.32986,59.1706 -67.45032,60.60191 -67.3499,62.76725 -67.65801,63.66072 -67.5055,68.45863 -67.9194,69.87563 -67.78748,70.11676 -68.7112,69.15128 -68.9537,70.04378 -68.92805,69.07282 -69.11681,69.86195 -69.26615,68.69155 -69.29709,68.9686 -69.41339,68.47423 -69.63497,69.23495 -69.84467,68.36102 -69.89578,68.08611 -70.26635,69.15845 -70.33264,69.284 -70.79163,71.40216 -71.43564,72.36285 -70.91404,72.50028 -70.65328,73.28226 -70.44197,72.86921 -70.08109,74.26321 -69.72987,75.91163 -69.72246,76.36084 -69.39919,78.14053 -69.10808,78.30648 -68.77959,78.08856 -68.70493,78.46104 -68.59782,78.1698 -68.60279,78.79246 -68.5162,78.31927 -68.48941,81.67205 -67.79097,83.61402 -67.45132,84.6001 -67.06803,85.9603 -67.1938,88.10524 -66.69263,89.89406 -66.81253,91.87505 -66.47141,93.71259 -66.63811,98.82478 -66.47701,98.99207 -66.40373,98.72893 -66.36834,99.03833 -66.32893,99.05618 -66.15019,98.73563 -65.74736,99.53096 -65.88039,99.54245 -65.70877,100.2154 -65.66605,100.6863 -65.38854,101.2088 -65.52851,100.2486 -65.67573,100.1351 -66.09203,100.3285 -66.19418,100.8398 -65.97073,100.6665 -66.12186,101.0506 -66.11575,100.6814 -66.19862,101.0122 -66.24654,101.5474 -66.0193,101.3692 -65.94209,102.9815 -65.83827,106.5823 -66.3073,108.8386 -66.92116,109.3091 -66.87197,109.4749 -66.60022,110.2998 -66.6193,110.8931 -66.04882,113.2011 -65.70032,114.5305 -66.18295,114.5185 -66.44607,116.1025 -66.36686,117.1731 -66.87701,118.2123 -67.023,121.1011 -66.78055,121.1265 -67.10377,124.6841 -66.65664,126.148 -66.26966,127.4321 -66.59846,127.9185 -67.02029,129.304 -67.02381,129.6118 -66.92625,129.6243 -66.57887,130.0063 -66.23624,129.4954 -65.94498,131.664 -66.21098,134.1377 -66.21222,134.6561 -65.98722,134.5516 -65.9004,134.7616 -65.79397,134.4632 -65.56325,134.5461 -65.32607,134.867 -65.27472,135.4795 -65.6518,135.1459 -66.00288,136.0647 -66.13612,136.4369 -66.39406,141.8895 -66.79362,142.5231 -67.0338,143.3853 -66.86347,144.5772 -67.17476,145.5483 -66.82233,146.4588 -66.84972,146.8305 -67.02197,146.6762 -67.2179,145.2431 -67.6058,146.0246 -67.60463,147.0567 -67.92679,148.4443 -67.81563,148.605 -68.2843,147.8668 -68.40709,149.6341 -68.35247,151.0027 -68.31017,151.0526 -68.64378,151.3749 -68.73972,153.821 -68.33959,154.6931 -68.58529,154.424 -68.64033,154.635 -68.73774,154.4506 -68.81104,154.8658 -69.035,155.4362 -68.91848,156.7822 -69.22552,157.1035 -69.20149,157.0791 -69.00245,157.3781 -69.23898,158.8946 -69.33869,159.7298 -69.78117,160.4875 -69.91448,160.2974 -70.06155,160.9778 -70.33642,161.5367 -70.25034,161.7135 -70.45775,161.8595 -70.25493,161.8945 -70.46589,162.5891 -70.31775,163.4853 -70.71352,163.6991 -70.66218,163.479 -70.51976,164.125 -70.52856,167.6969 -70.82607,168.0675 -71.18837,170.1368 -71.70781,170.2349 -71.3571,170.9236 -71.87417,169.7586 -72.25951,169.9705 -72.33115,169.8099 -72.41871,170.2306 -72.34328,170.2555 -72.60704,169.8266 -72.71067,169.613 -73.09855,168.9938 -73.20042,169.1598 -73.30328,168.9369 -73.30568,169.0139 -73.47444,166.4648 -73.62717,166.6773 -73.73735,165.587 -73.95702,166.229 -74.13102,164.7455 -74.15847,165.3993 -74.5546,165.3334 -74.69353,164.2539 -74.57372,163.8123 -74.94694,163.6224 -74.77486,163.9435 -74.6445,163.4471 -74.52147,163.0902 -74.64754,163.2143 -74.73726,162.584 -74.79971,162.8241 -74.97465,162.414 -74.94543,162.7377 -75.03963,162.4285 -75.14815,162.5589 -75.25808,164.2032 -75.24989,164.2856 -75.4393,164.668 -75.43253,164.5858 -75.58115,162.6921 -75.47926,162.8512 -75.59428,162.4975 -75.71823,162.9669 -75.78131,162.6532 -75.938,162.9795 -75.97341,162.2323 -76.16073,162.6884 -76.29354,162.6117 -76.59978,162.7705 -76.62653,162.5243 -76.69476,162.8759 -76.76836,162.2711 -77.06906,163.0521 -77.0862,163.7231 -77.45632,163.3826 -77.60658,163.5875 -77.66483,163.4315 -77.74576,164.423 -77.79288,164.2696 -78.13965,163.2988 -78.32821,164.5751 -78.37548,165.3374 -78.05782,165.4823 -78.17262,165.2273 -78.24527,165.6399 -78.4621,167.1327 -78.70752,164.2644 -78.63433,162.6158 -78.88318,162.4938 -79.11423,160.8867 -79.10896,160.2669 -79.24658,160.5073 -79.32079,160.0142 -79.60326,160.1582 -79.93282,160.3885 -80.01711,159.987 -80.18458,160.7754 -80.54825,159.6631 -80.68921,160.9685 -80.70805,160.0746 -80.90494,160.6584 -80.97607,160.3304 -81.02613,160.5971 -81.14688,160.4303 -81.25339,160.7851 -81.27731,160.4414 -81.40389,163.7532 -82.24459,161.3385 -82.38057,161.6653 -82.54998,163.1775 -82.68518,163.3479 -82.58295,163.1544 -82.48756,164.6994 -82.42028,165.3371 -82.51988,164.7892 -82.68946,168.3345 -83.08816,168.5695 -83.20914,167.7549 -83.32128,167.5719 -83.45518,167.6987 -83.50731,171.6197 -83.56647,171.935 -83.63277,171.2699 -83.84739,171.5889 -83.89169,172.7756 -83.75088,173.4915 -83.82764,172.9185 -83.93702,174.8425 -83.90095,180 -84.42592,180 -90,-180 -90,-180 -84.42873,-178.2959 -84.35055,-179.0668 -84.25339,-167.0431 -84.79213,-165.9325 -85.0291,-162.9406 -85.16615,-161.8117 -85.44962,-160.4957 -85.39356,-161.026 -85.49464,-151.476 -85.58276,-148.2741 -85.15272,-139.3479 -85.2896,-137.4463 -85.06761,-146.0752 -84.8842,-151.1268 -84.45387,-153.2165 -83.86245,-152.8448 -83.71663,-152.8648 -83.35514,-154.1623 -82.75488,-154.1538 -82.22446,-155.0297 -81.77632,-154.7962 -81.56052,-153.3934 -81.21027,-145.2031 -80.70447,-147.8717 -80.29346,-151.1926 -80.24664,-153.9755 -79.40808,-157.5723 -78.76943,-157.7191 -78.5678,-156.8064 -78.41953,-157.008 -78.26968,-156.7668 -78.14735,-158.4707 -78.18495,-158.0243 -78.02477,-158.2086 -77.90778,-157.7493 -77.61858,-157.991 -77.36395,-157.7951 -77.12065,-156.6954 -77.41307,-155.8544 -77.11487,-153.3442 -77.30086,-153.0636 -77.40474,-153.4772 -77.49279,-152.4204 -77.51863,-152.0616 -77.34062,-149.6266 -77.82256,-148.9874 -77.73803,-149.4907 -77.62564,-148.7133 -77.69389,-147.6885 -77.44719,-148.1964 -77.46984,-148.8712 -77.22492,-147.7076 -77.23919,-147.5728 -77.41933),(-146.7817 -76.33167,-146.7307 -76.33876,-146.6022 -76.28893,-146.8358 -76.12966,-147.4025 -76.13773,-146.7817 -76.33167)),((-72.0526 -69.04539,-70.1859 -68.83833,-70.1087 -69.25607,-69.71538 -69.27843,-69.09383 -70.18921,-68.41619 -70.64532,-68.11154 -71.64629,-68.4998 -71.97771,-68.44913 -72.26418,-69.01806 -72.31477,-69.11895 -72.45484,-68.88744 -72.44739,-69.64333 -72.66664,-71.97277 -72.69437,-72.68424 -72.4633,-72.34042 -72.27847,-70.60326 -72.24277,-71.04533 -72.13254,-70.68277 -71.98978,-71.78941 -71.63515,-72.43605 -71.57677,-72.37437 -71.86303,-73.38788 -71.76559,-72.97045 -71.91033,-73.57765 -72.16489,-75.51772 -71.66758,-75.71548 -71.41877,-75.45765 -71.34412,-74.68185 -71.60888,-74.98726 -71.23129,-73.50524 -71.55373,-74.12457 -71.19611,-72.98431 -71.34515,-72.35819 -71.24561,-73.22094 -71.10751,-72.81709 -70.94792,-71.32877 -70.79364,-70.67202 -70.92309,-71.55853 -70.54302,-71.56237 -70.37491,-70.02051 -70.22272,-71.92459 -69.78998,-71.95126 -69.50468,-71.68019 -69.27412,-72.1918 -69.1181,-72.0526 -69.04539)),((-79.58303 -77.24992,-78.04823 -77.05433,-76.8585 -77.15038,-76.92802 -77.28667,-76.5863 -77.42095,-76.73336 -77.65762,-75.70747 -78.05892,-77.65456 -78.19331,-79.79225 -78.05751,-80.74554 -77.75739,-79.86858 -77.51847,-79.58303 -77.24992)),((-163.6036 -78.83811,-161.4224 -78.85066,-159.1478 -79.70826,-161.0139 -79.90076,-163.4663 -79.57716,-164.3637 -79.16306,-163.6036 -78.83811)),((-98.55214 -71.66763,-98.12888 -71.76827,-98.49451 -71.86636,-98.47515 -72.08824,-97.9698 -72.09177,-98.02152 -71.81902,-97.87325 -71.78709,-97.45589 -71.94469,-97.71951 -72.03629,-97.44469 -72.1617,-97.0216 -71.74893,-96.10952 -71.80008,-97.08627 -72.13387,-95.62218 -72.00095,-95.49735 -72.1116,-95.67108 -72.17345,-96.46546 -72.2283,-95.41721 -72.29886,-96.40557 -72.38291,-95.96152 -72.42532,-96.04736 -72.5324,-98.59394 -72.51672,-102.4134 -72.11128,-100.423 -71.77707,-100.1679 -71.86201,-100.6113 -71.98118,-99.74869 -71.84312,-98.77071 -72.03275,-99.23086 -71.77925,-98.55214 -71.66763)),((-121.796 -73.59129,-118.6296 -73.79707,-120.2779 -74.31898,-121.946 -74.31485,-122.613 -74.23581,-122.4615 -74.10719,-122.6064 -74.00391,-122.2748 -73.83063,-122.8737 -73.73671,-121.796 -73.59129)),((-125.3644 -73.17935,-124.6479 -73.53107,-125.0987 -73.66828,-124.9696 -73.74028,-123.9798 -73.60165,-123.382 -73.97388,-123.5475 -74.12675,-124.3815 -74.09237,-125.716 -73.81211,-126.1862 -73.44826,-126.7121 -73.55973,-126.6023 -73.44232,-126.9187 -73.37045,-126.768 -73.14906,-125.3644 -73.17935)),((-68.52562 -78.58097,-65.46762 -78.40364,-69.40013 -79.20899,-70.83311 -79.14777,-68.52562 -78.58097)),((-75.45554 -73.01366,-75.82319 -72.94495,-75.29984 -72.81456,-74.32782 -72.97176,-74.61892 -73.32809,-74.37962 -73.54627,-74.66709 -73.65527,-76.10168 -73.30847,-76.16866 -73.12941,-75.45554 -73.01366)),((-68.00626 -66.67634,-67.6729 -66.6468,-67.99707 -66.93274,-67.68823 -67.14931,-68.20452 -67.3452,-67.97286 -67.39326,-68.13316 -67.56461,-68.61757 -67.75422,-69.20239 -67.59001,-68.47512 -66.82755,-68.00626 -66.67634)),((169.2601 -77.52044,166.5901 -77.88824,166.7761 -77.72889,165.9984 -77.57982,166.4998 -77.43961,166.2326 -77.31303,166.5663 -77.21448,167.3681 -77.4474,169.2601 -77.52044)),((121.3173 -66.69778,121.7549 -66.45598,121.2224 -66.22855,121.4709 -66.04633,121.1836 -65.9185,121.3297 -65.64651,122.5503 -66.56289,121.3173 -66.69778)),((-74.84757 -69.53473,-74.45148 -69.79233,-74.69836 -69.98404,-75.93615 -69.92476,-76.09235 -69.66798,-74.84757 -69.53473)),((-78.07573 -72.64796,-77.23979 -72.70985,-77.39474 -72.94318,-78.58921 -73.19484,-79.07538 -73.02606,-78.26971 -72.89185,-78.07573 -72.64796)),((-57.36388 -64.31935,-58.22072 -64.40555,-58.07511 -64.12164,-58.46537 -64.06358,-57.80148 -63.77441,-57.84019 -64.09006,-57.4918 -63.91711,-57.06267 -64.16769,-57.36388 -64.31935)),((-63.71189 -64.84069,-64.3112 -64.6825,-63.56023 -64.2682,-63.20474 -64.29337,-63.39188 -64.43457,-63.17106 -64.40388,-63.29947 -64.57651,-62.84572 -64.55225,-63.71189 -64.84069)),((-74.2181 -70.51205,-73.74133 -70.64433,-74.36571 -70.81686,-75.55737 -70.7342,-74.2181 -70.51205)),((-90.87988 -72.64127,-90.99516 -72.79259,-90.85046 -72.9045,-91.33047 -73.17935,-91.5123 -73.11709,-91.34204 -72.7998,-91.67634 -72.6086,-90.87988 -72.64127)),((-56.41531 -63.43903,-56.56045 -63.33496,-56.04965 -63.13462,-55.02081 -63.30928,-56.41531 -63.43903)),((-60.29945 -62.757,-61.24283 -62.59126,-60.15171 -62.45975,-59.82209 -62.60682,-60.29945 -62.757)),((-127.2717 -74.60647,-127.8218 -74.44791,-127.8742 -74.25546,-126.8852 -74.38795,-127.2717 -74.60647)),((-58.65427 -62.25686,-59.01677 -62.20316,-58.4412 -61.93731,-57.60457 -62.02293,-58.25566 -62.18198,-58.43576 -62.05663,-58.65427 -62.25686)),((-62.0629 -69.72955,-62.60696 -69.20187,-62.22961 -69.16122,-61.94405 -69.38932,-62.0629 -69.72955)),((-131.9041 -74.30228,-130.7346 -74.41314,-131.1382 -74.55045,-131.9033 -74.4631,-131.9041 -74.30228)),((-115.8807 -73.88317,-116.575 -74.15652,-117.7219 -74.17339,-115.8807 -73.88317)),((-62.64101 -64.51308,-62.82548 -64.49399,-62.48399 -64.23106,-62.561 -64.04622,-62.04785 -64.13434,-62.64101 -64.51308)),((167.2993 -78.30534,166.7438 -78.26464,167.3865 -78.04678,167.5394 -78.16717,167.2993 -78.30534)),((-72.5708 -69.52946,-72.85082 -69.45647,-72.5686 -69.30872,-72.09885 -69.53014,-72.5708 -69.52946)),((-148.705 -76.86867,-149.2135 -76.78181,-148.9665 -76.71465,-148.1698 -76.79898,-148.705 -76.86867)),((-55.1548 -61.22437,-55.30748 -61.00346,-54.59457 -61.05054,-55.1548 -61.22437)),((96.47849 -66.23496,96.25699 -66.18226,96.40884 -66.03873,96.99506 -66.15076,96.47849 -66.23496)),((-66.17471 -65.87418,-66.00462 -65.54506,-65.67765 -65.5135,-65.93126 -65.67324,-65.84351 -65.82101,-66.17471 -65.87418)),((-77.95332 -73.41058,-78.12079 -73.29176,-77.93359 -73.22186,-77.4177 -73.32956,-77.95332 -73.41058)),((-56.33197 -63.1843,-56.62877 -63.05325,-56.49831 -62.97749,-56.01629 -63.03848,-56.33197 -63.1843)),((166.1538 -78.35339,165.9238 -78.16309,166.6582 -78.26231,166.1538 -78.35339)),((-145.7229 -75.55936,-145.1527 -75.74972,-145.813 -75.6778,-145.9611 -75.59669,-145.7229 -75.55936)),((-94.952 -72.50469,-94.43655 -72.60088,-95.28873 -72.64246,-94.952 -72.50469)),((-146.8169 -77.01942,-146.9574 -76.86395,-146.2917 -76.90291,-146.8169 -77.01942)),((-67.53762 -67.79745,-67.83548 -67.67426,-67.15509 -67.63554,-67.53762 -67.79745)),((169.4168 -73.57291,169.72 -73.35628,169.8466 -73.57433,169.4168 -73.57291)),((-73.61285 -73.17296,-73.85072 -73.40416,-74.18481 -73.33899,-73.61285 -73.17296)),((103.0362 -65.16444,103.4796 -65.45354,102.8312 -65.22557,103.0362 -65.16444)),((-146.8622 -76.75887,-147.3378 -76.59945,-146.8588 -76.59675,-146.8622 -76.75887)),((-55.96684 -63.57532,-56.22236 -63.43515,-55.6869 -63.42879,-55.96684 -63.57532)))
+MULTIPOLYGON(((-67.1775 -22.80469,-66.73935 -22.23658,-66.2907 -22.08444,-66.22161 -21.78128,-65.75531 -22.10854,-64.6478 -22.1946,-64.32063 -22.86866,-63.93525 -22.00273,-62.80806 -22.00444,-62.64708 -22.24563,-60.98194 -23.81165,-60.04662 -24.01213,-57.66761 -25.27694,-57.56323 -25.55561,-58.15548 -26.18055,-58.18894 -26.64248,-58.59655 -27.30121,-58.00693 -27.26365,-56.85005 -27.60421,-56.59883 -27.44798,-56.37604 -27.60447,-56.11202 -27.30512,-55.7326 -27.4448,-55.42037 -26.99908,-54.80127 -26.65639,-54.59636 -25.59497,-54.43019 -25.70594,-54.11059 -25.5044,-53.84392 -25.68932,-53.59184 -26.26489,-53.7986 -27.14745,-54.80873 -27.5359,-55.77309 -28.24701,-55.69562 -28.4253,-55.87476 -28.36226,-57.61797 -30.17916,-57.87759 -30.51556,-57.79935 -30.8506,-58.20473 -31.87094,-58.1342 -33.02597,-58.43176 -33.09301,-58.55584 -33.72223,-58.37045 -34.11233,-58.55108 -34.4315,-57.19667 -35.30555,-57.37623 -35.97168,-56.93692 -36.3834,-56.71917 -36.35655,-56.67129 -36.90549,-57.55159 -38.10962,-58.13091 -38.41871,-60.85211 -38.98208,-61.8046 -38.99224,-62.40413 -38.75271,-62.32888 -39.25965,-62.01193 -39.36519,-62.31648 -39.29819,-62.03953 -39.44709,-62.49056 -40.31401,-62.17091 -40.63277,-62.32671 -40.88292,-63.80169 -41.16122,-64.89481 -40.83786,-64.808 -40.73302,-65.11484 -40.8338,-65.01897 -42.0984,-64.47105 -42.24342,-64.62181 -42.40866,-64.47688 -42.44341,-64.12061 -42.43194,-64.0796 -42.26264,-64.38059 -42.2414,-63.76488 -42.07257,-63.58712 -42.60842,-64.14539 -42.87541,-64.34579 -42.53803,-64.94518 -42.63102,-65.03279 -42.77519,-64.31453 -42.97735,-64.95638 -43.24234,-65.32807 -43.64673,-65.21431 -44.36818,-65.6827 -44.72032,-65.52219 -44.93477,-66.94747 -45.26959,-67.61881 -46.05798,-67.38772 -46.58865,-66.73991 -47.03672,-65.75169 -47.20084,-65.8941 -47.76728,-65.76698 -47.91746,-67.41094 -48.90168,-67.77747 -49.89847,-68.3317 -50.12669,-68.60137 -49.86246,-68.3556 -50.16536,-69.07726 -50.56383,-69.21799 -50.97392,-68.94093 -51.54959,-69.22515 -51.6956,-68.95716 -51.637,-68.43986 -52.40015,-69.22569 -52.20016,-70.01936 -51.99819,-71.93159 -51.99528,-72.43781 -51.56912,-72.27752 -50.65468,-73.15174 -50.76809,-73.52998 -50.14991,-73.42122 -49.79916,-73.57778 -49.54358,-72.54967 -48.79079,-72.59288 -48.47141,-72.2951 -48.35757,-72.52264 -47.90715,-72.32291 -47.43373,-71.84908 -47.21814,-71.92654 -46.80474,-71.64585 -46.68254,-71.89174 -46.14821,-71.59829 -45.97458,-71.75804 -45.56223,-71.29688 -45.29317,-72.06971 -44.76825,-71.30264 -44.80802,-71.11016 -44.52303,-71.83199 -44.38578,-71.58262 -43.66576,-71.93305 -43.45695,-71.73962 -43.17142,-72.13357 -43.01638,-72.12493 -42.30677,-71.72849 -42.11539,-71.94669 -40.73969,-71.65408 -40.36865,-71.83086 -40.22242,-71.58906 -39.89707,-71.71897 -39.6377,-71.48103 -39.59019,-71.42781 -38.92983,-70.83273 -38.57305,-71.20322 -37.6801,-71.1721 -36.84647,-71.03448 -36.46488,-70.42343 -36.15309,-70.32522 -35.81524,-70.57765 -35.25788,-70.36263 -35.14241,-70.04218 -34.28701,-69.81541 -34.22364,-69.74717 -33.40779,-69.88811 -33.22215,-70.02461 -33.31369,-69.99737 -32.9016,-70.38564 -32.05095,-70.20244 -31.97015,-70.53893 -31.60142,-70.50563 -31.14843,-69.8166 -30.21648,-70.00744 -29.35628,-69.7677 -29.12587,-69.64111 -28.37884,-69.11214 -27.89204,-68.83334 -27.04887,-68.27213 -26.9169,-68.5877 -26.50918,-68.39045 -26.19049,-68.58668 -25.20431,-68.35064 -25.10669,-68.56738 -24.74768,-68.39136 -24.47407,-67.33754 -24.0342,-66.98794 -22.9924,-67.1775 -22.80469)),((-68.60475 -52.66537,-68.1955 -53.12925,-68.36179 -53.02316,-68.52022 -53.25929,-68.13199 -53.32545,-67.69617 -53.79746,-66.00002 -54.61374,-65.11077 -54.65778,-66.51212 -55.06131,-67.0083 -55.0222,-67.20625 -55.0066,-68.26682 -54.9196,-68.26516 -54.92312,-68.61058 -54.89589,-68.60475 -52.66537)),((-64.67084 -54.90871,-64.56756 -54.71271,-63.80831 -54.72062,-64.67084 -54.90871)))
+MULTIPOLYGON(((13.84239 48.77366,14.31861 48.54292,14.98922 48.76698,15.02669 49.01706,16.53641 48.80704,16.92182 48.69472,16.84774 48.37205,17.16273 48.00808,17.09076 47.71126,16.44964 47.69149,16.71279 47.53454,16.44933 47.40102,16.51555 47.00671,16.11189 46.87151,16.03466 46.6609,15.03901 46.65263,14.56157 46.37804,13.71563 46.52403,12.43604 46.69191,12.18404 47.09521,11.16155 46.96649,11.01477 46.77032,10.47005 46.86188,9.603659 47.06155,9.535914 47.27354,9.672874 47.38769,9.544334 47.54256,9.970167 47.55003,10.1776 47.27579,10.43452 47.58615,11.26402 47.40426,12.26024 47.74409,13.01005 47.4729,13.09669 47.64745,12.75725 48.12494,13.32995 48.32526,13.50247 48.59414,13.7241 48.51663,13.84239 48.77366)))
+MULTIPOLYGON(((151.1082 -23.67241,151.3314 -23.96753,151.7671 -24.01801,152.5719 -25.18659,152.9069 -25.28642,152.8776 -25.69229,153.0163 -25.99169,153.0525 -25.81284,153.2 -25.93735,153.0388 -26.37094,153.1388 -26.83153,153.1335 -26.83862,153.0184 -27.29772,153.5562 -28.20489,153.6071 -28.85146,153.2702 -29.38704,152.9848 -30.68061,153.0728 -31.05367,152.7566 -31.84962,152.389 -32.19935,152.5246 -32.31677,152.153 -32.67678,151.9661 -32.54739,151.9244 -32.7889,152.1687 -32.76987,151.7859 -32.92263,151.5545 -33.24315,151.2371 -33.52746,151.1819 -33.53236,151.1806 -33.63742,151.2147 -33.63214,151.2992 -33.8309,151.0599 -33.83002,151.282 -33.84256,151.2492 -34.00505,151.0008 -33.98333,151.2265 -34.03266,150.7183 -34.89363,150.7558 -35.17306,150.4502 -35.23199,150.1717 -35.70893,149.8772 -36.88865,149.9798 -37.504,149.6812 -37.46145,149.49 -37.77309,147.651 -37.84713,147.4542 -38.08467,147.9371 -37.90533,146.7988 -38.63347,146.7959 -38.63742,146.2136 -38.69617,146.2977 -38.90679,146.4786 -38.79554,146.3758 -39.13894,146.1645 -38.81575,145.9241 -38.91,145.8236 -38.64722,145.3757 -38.53807,145.411 -38.39565,145.4274 -38.32978,145.3125 -38.2919,145.3012 -38.29755,144.8947 -38.49966,144.6536 -38.31044,144.8817 -38.36496,145.1252 -38.12079,144.9319 -37.81201,144.3627 -38.11053,144.6839 -38.11992,144.6616 -38.27836,143.5556 -38.85681,142.3862 -38.35413,141.4049 -38.3992,140.392 -37.92358,139.8253 -37.30661,139.7004 -36.30559,138.9085 -35.58389,138.0914 -35.62812,138.4367 -35.35149,138.5573 -34.81263,138.0991 -34.14187,137.7563 -35.11504,136.8215 -35.24552,137.0112 -34.89704,137.448 -34.91169,137.4451 -34.14328,137.9714 -33.55882,137.8084 -33.27885,138.0428 -33.09461,137.7523 -32.42775,137.7839 -33.00387,137.4452 -33.14289,137.21 -33.66787,136.5912 -33.90289,135.931 -34.53521,135.7855 -34.81306,135.9934 -34.73018,136.002 -34.98735,135.1102 -34.59377,135.2154 -34.4367,135.4086 -34.5429,134.7038 -33.18215,134.3555 -33.16018,134.0604 -32.91077,134.2645 -32.57745,133.8494 -32.54741,133.9488 -32.39925,133.6485 -32.10089,133.1248 -32.21086,132.7416 -31.94971,132.1988 -32.02856,131.1501 -31.46841,129.3651 -31.64174,127.2668 -32.27406,126.0324 -32.27488,124.2384 -33.02344,123.527 -33.94466,120.0352 -33.92232,119.638 -34.09865,119.577 -34.38853,118.9028 -34.47012,118.4022 -34.92164,117.8532 -35.03323,118.0216 -35.10872,117.3391 -35.02494,116.4808 -35.01508,115.0253 -34.25426,115.0042 -33.5369,115.3656 -33.64424,115.6637 -33.32426,115.7524 -31.90021,115.0532 -30.51018,114.8653 -29.11643,114.166 -28.11618,113.8107 -26.98724,113.1493 -26.15357,113.2695 -26.24968,113.3002 -26.02671,113.3795 -26.43909,113.36 -26.02205,113.6508 -26.67277,113.8768 -26.36396,113.7412 -26.17003,113.892 -25.9595,114.076 -26.47389,114.2747 -26.00367,113.3805 -24.23071,113.7822 -23.46454,113.6558 -22.58013,114.0273 -21.85242,114.1938 -21.81702,114.1318 -22.48988,114.3544 -22.4952,114.6441 -21.84849,115.5039 -21.51101,116.2051 -20.8369,116.8159 -20.53016,116.8994 -20.72457,117.7831 -20.67538,119.1679 -20.00292,120.2323 -19.90876,121.2349 -19.44454,121.8143 -18.45387,122.3734 -18.10803,122.1713 -17.97735,122.17 -17.2685,122.5889 -16.95817,122.5706 -16.77079,122.8301 -16.78805,122.9217 -16.39615,123.5656 -17.63133,123.6897 -17.06268,123.9427 -17.28489,123.7924 -17.01186,123.9225 -17.10269,123.9518 -16.82112,123.7764 -16.90512,123.4223 -16.50671,123.5934 -16.51287,123.5017 -16.38424,123.7076 -16.33925,123.5543 -16.18025,123.7049 -16.13271,123.8672 -16.45177,123.9077 -16.21568,124.3087 -16.4566,124.9464 -16.38397,124.3778 -16.28192,124.7505 -15.80893,124.491 -16.00236,124.3617 -15.67157,124.6811 -15.48736,124.6775 -15.25406,124.8332 -15.32694,125.2936 -15.60703,125.106 -15.27117,124.8768 -15.30982,125.0527 -15.164,124.8338 -15.16299,125.016 -14.98069,125.3612 -15.11136,125.4878 -14.9903,125.1821 -14.96114,125.2548 -14.59409,125.5987 -14.55916,125.6003 -14.23088,125.6474 -14.65057,125.7347 -14.40692,125.9257 -14.64833,126.1592 -14.15074,126.0084 -13.92399,126.2194 -13.98457,126.2228 -14.26576,126.5658 -13.93898,126.4495 -14.09294,126.6118 -14.24444,126.7012 -13.97512,126.9269 -14.00033,126.7457 -13.78815,126.9587 -13.7349,128.2336 -14.73633,127.8699 -15.65046,128.1228 -15.18894,128.3421 -15.4926,128.2005 -15.06218,128.4328 -15.03927,128.4419 -15.04551,128.521 -14.76564,129.0758 -14.89008,129.1279 -15.28106,129.2603 -15.10386,129.2993 -14.85676,129.5981 -15.22134,129.6784 -14.90574,129.8024 -14.52369,129.3542 -14.41678,129.5842 -14.10074,129.8126 -13.50029,130.2728 -13.33018,130.1371 -12.92859,130.4366 -12.63457,130.624 -12.72983,130.7094 -12.71735,130.5784 -12.40634,130.9685 -12.67362,130.818 -12.40404,131.2986 -12.04239,131.4632 -12.28321,132.7747 -12.16209,132.6253 -11.72357,132.6344 -11.71094,132.526 -11.43523,132.0759 -11.52932,131.7556 -11.30089,131.9929 -11.12303,132.2021 -11.41214,132.1377 -11.12279,132.2815 -11.27042,132.3405 -11.11712,132.6554 -11.50677,132.9156 -11.33348,133.5054 -11.8822,133.9112 -11.74105,133.8299 -11.86276,134.124 -11.90073,134.177 -12.13673,134.7489 -11.95177,135.2503 -12.32984,135.5948 -12.04499,135.9102 -11.95826,135.646 -12.19998,136.0388 -12.06723,136.0172 -12.49509,136.3054 -12.39344,136.3891 -12.24506,136.1641 -12.16665,136.5587 -11.87812,136.4419 -11.99225,136.6612 -12.28144,136.9232 -12.28423,136.6158 -12.84248,136.4644 -12.77563,136.6594 -13.00559,136.4563 -12.97658,136.4673 -13.24467,136.3401 -13.32411,136.3342 -13.04918,136.1769 -13.28319,136.1367 -13.1295,135.9104 -13.27552,135.8732 -13.71035,136.0776 -13.65999,135.9001 -14.19353,135.32 -14.73736,135.6902 -15.11134,135.6341 -15.19089,135.4144 -15.34214,135.741 -15.11962,136.5388 -15.74217,136.7209 -15.69851,136.4449 -15.90838,137.0079 -15.89278,138.1774 -16.68902,139.0133 -16.89407,139.2394 -17.32325,140.0025 -17.7154,140.5957 -17.59815,141.2988 -16.48848,141.5774 -15.20735,141.7487 -15.23109,141.5938 -15.19851,141.5363 -13.57201,141.7849 -13.37148,141.586 -12.99449,141.8202 -12.67224,141.9456 -12.8935,142.0227 -12.72291,141.8275 -12.64872,141.976 -12.58115,141.7229 -12.38515,141.5926 -12.55694,141.8823 -11.95632,141.9295 -12.25757,142.0624 -11.98718,142.1285 -10.98328,142.5364 -10.69383,142.5026 -10.94977,142.6663 -10.99097,142.8572 -11.84996,143.246 -11.97608,143.08 -12.33769,143.4408 -12.61134,143.352 -12.8936,143.5451 -12.84207,143.5352 -13.76332,143.8042 -14.42536,143.9498 -14.51724,144.5196 -14.1698,144.6828 -14.5512,145.3472 -14.94608,145.2173 -15.45711,145.4762 -16.07886,145.4141 -16.46722,145.7763 -16.99296,145.9595 -16.89581,146.1464 -17.65281,146.0168 -18.24553,146.3341 -18.53351,146.2616 -18.86672,146.823 -19.28863,147.0196 -19.18341,147.126 -19.4455,147.4507 -19.38767,147.559 -19.6046,147.6565 -19.82311,147.8214 -19.70989,148.7623 -20.23579,148.927 -20.53556,148.6679 -20.44393,148.6923 -20.69207,149.2031 -21.1497,149.186 -21.21486,149.484 -21.5755,149.6165 -22.3648,149.6308 -22.58933,149.8073 -22.38585,150.0585 -22.65808,149.9103 -22.34991,150.0378 -22.13089,150.627 -22.66296,150.6669 -22.35275,150.8708 -23.48707,150.6397 -23.4833,150.7117 -23.54112,150.6909 -23.57003,150.6862 -23.57644,150.7156 -23.56973,150.7155 -23.60209,150.9423 -23.6101,150.9531 -23.59446,151.0979 -23.66216,150.9751 -23.4967,151.2367 -23.4906,151.3136 -23.75998,151.1082 -23.67241)),((145.4553 -42.44371,144.7447 -41.42496,144.7217 -40.64587,144.9141 -40.71412,146.3787 -41.23373,146.7636 -41.08134,147.1181 -41.41112,146.7858 -41.05701,147.9369 -40.74318,148.3456 -40.99535,148.3522 -42.19884,148.1547 -42.00274,147.8778 -42.84887,147.6017 -42.84795,147.4072 -43.0464,147.484 -42.91708,147.1572 -42.75444,147.3398 -43.05286,147.1644 -43.2831,147.029 -43.05572,146.8687 -43.63766,146.029 -43.57027,145.9288 -43.37072,146.2272 -43.32574,145.9237 -43.21409,145.8371 -43.31503,145.2639 -42.63265,145.1648 -42.19845,145.4553 -42.44371)),((130.4518 -11.5365,130.3587 -11.24776,130.8159 -11.53686,130.6956 -11.39614,130.8962 -11.30636,131.0241 -11.47866,131.1439 -11.24723,131.2501 -11.47,131.2553 -11.18953,131.4385 -11.31093,131.4706 -11.60843,130.9573 -11.94351,130.5251 -11.67711,130.6062 -11.83248,130.0278 -11.81299,130.2997 -11.71565,130.2335 -11.40581,130.3363 -11.31485,130.4518 -11.5365)),((137.4212 -35.59309,137.6296 -35.56724,137.7512 -35.84631,138.0396 -35.74517,138.0408 -35.90743,137.7416 -35.85561,137.4596 -36.07764,136.7021 -36.06597,136.5385 -35.902,137.4212 -35.59309)),((136.563 -13.81999,136.6924 -13.65382,136.7269 -13.84458,136.9052 -13.7685,136.6962 -14.12127,136.9472 -14.30985,136.3236 -14.24752,136.563 -13.81999)),((153.2266 -25,153.1238 -24.81661,153.2742 -24.70381,153.3676 -25.00854,153.0468 -25.79978,152.9939 -25.22204,153.2266 -25)),((148.2793 -40,148.3331 -40.21474,148.0882 -40.27396,147.7497 -39.8752,147.9441 -39.72156,148.2793 -40)),((144.1067 -39.81976,143.9201 -40.15881,143.8458 -39.71451,144.0009 -39.60104,144.1067 -39.81976)),((147.8619 -42.94779,147.9913 -42.91217,147.9953 -43.23017,147.6199 -43.06626,147.8619 -42.94779)),((139.1832 -16.6805,139.307 -16.46286,139.6892 -16.45211,139.1872 -16.68674,139.1832 -16.6805)),((113.6772 -26.07854,113.4052 -25.68978,113.5007 -25.51634,113.6772 -26.07854)),((148.3302 -40.29791,148.3961 -40.49413,147.9851 -40.42483,148.3302 -40.29791)))
+MULTIPOLYGON(((-70.07329 12.54865,-70.03988 12.59876,-69.92295 12.49854,-69.88954 12.39831,-69.95635 12.46513,-70.05658 12.51524,-70.07329 12.54865)))
+MULTIPOLYGON(((47.19468 41.89426,48.75009 41.69004,48.97988 41.47123,49.54342 40.63153,50.35502 40.36194,50.36355 40.19574,49.83642 40.36721,49.47114 40.17324,49.2779 39.49604,49.43929 39.2739,49.25684 39.31741,49.16844 39.10341,48.94538 39.15733,48.87941 38.437,48.63203 38.40241,48.01774 38.84517,48.36908 39.01485,48.13177 39.26484,48.37463 39.37077,47.99076 39.69632,46.95339 39.10436,46.42291 40.04073,46.79348 40.34929,46.48491 40.53529,46.70084 41.43105,47.19468 41.89426)))
+MULTIPOLYGON(((19.08731 44.85201,19.07898 44.84029,19.3452 44.87598,19.23896 44.60893,19.14994 44.37799,19.20327 44.23565,19.38089 44.16427,19.62988 44.02193,19.4699 43.93332,19.22091 43.98665,19.54087 43.68433,19.41658 43.54198,19.29187 43.631,19.11425 43.54198,18.97232 43.52393,19.11425 43.31063,19.02565 43.22161,18.88331 43.36395,18.72333 43.31063,18.59903 43.16829,18.68764 43.06163,18.45669 42.95498,18.52766 42.77695,18.58098 42.6703,18.52357 42.584,18.38573 42.61697,18.13673 42.70598,17.85246 42.90165,17.69248 42.97262,17.39015 43.2573,17.24822 43.47061,16.89257 43.66628,16.59066 43.89763,16.21737 44.23565,16.07503 44.57365,15.91505 44.73363,15.80839 44.73363,15.75507 44.87598,15.73743 45.1783,16.00406 45.24927,16.07503 45.12497,16.3593 44.98263,16.46596 45.21399,16.82161 45.21399,16.92826 45.23163,17.2835 45.1783,17.69248 45.14261,17.79913 45.03596,18.03008 45.14261,18.43905 45.10733,18.65236 45.07165,18.84762 44.87598,19.08731 44.85201)),((14.60021 45.2305,14.81975 44.97352,14.43313 45.07368,14.60021 45.2305)))
+MULTIPOLYGON(((-59.66669 13.31703,-59.44955 13.14998,-59.66669 13.01636,-59.66669 13.31703)))
+MULTIPOLYGON(((90.81133 22.22115,90.71954 22.05296,90.61105 22.15818,90.65922 22.78461,90.88893 22.44499,90.81133 22.22115)))
+MULTIPOLYGON(((3.369472 51.37461,3.31712 51.33633,3.338228 51.27769,3.476597 51.23314,3.474252 51.2988,3.553989 51.3246,3.720502 51.27535,3.753336 51.2261,3.887015 51.21203,3.983169 51.25659,4.123883 51.28942,4.222384 51.33163,4.311502 51.38792,4.442835 51.35274,4.38655 51.46297,4.541337 51.4747,4.517883 51.40903,4.67267 51.42075,4.759444 51.48642,4.848564 51.48642,4.771171 51.3973,4.968171 51.3973,5.022111 51.48642,5.099504 51.44186,5.06667 51.36447,5.132337 51.26597,5.20973 51.33163,5.219111 51.22141,5.448946 51.26597,5.514612 51.31991,5.592005 51.27769,5.570898 51.21203,5.711612 51.18858,5.800732 51.16747,5.878123 51.13464,5.800732 51.05724,5.767898 50.93763,5.645946 50.86024,5.678778 50.76174,5.821838 50.76174,6.025336 50.75425,6.403867 50.32674,6.13802 50.1329,5.73455 49.89968,5.816617 49.54663,5.477649 49.49361,4.856486 49.79186,4.877701 50.15532,4.148557 49.97853,4.206795 50.27324,3.694881 50.31094,3.139944 50.79072,2.795442 50.72651,2.546947 51.09281,3.369472 51.37461)))
+MULTIPOLYGON(((0.229351 14.98967,0.167995 14.52335,0.398786 14.02787,1.280971 13.35863,0.991821 13.37092,0.992786 13.05922,1.570111 12.6313,2.098688 12.72653,2.274273 12.42838,2.059467 12.35238,2.405395 11.90161,2.019249 11.42771,1.434505 11.47221,0.912155 10.99649,-0.142005 11.13898,-0.621151 10.90218,-2.834325 11.00416,-2.945597 10.62952,-2.689926 9.488792,-3.209423 9.924427,-3.900427 9.900578,-4.318694 9.599602,-4.6924 9.677105,-5.152773 10.32246,-5.518916 10.43326,-5.496531 11.06307,-5.199527 11.43251,-5.409314 11.83188,-4.569054 12.1346,-4.489498 12.71048,-4.228288 12.77813,-4.355398 13.13399,-3.984532 13.49584,-3.433222 13.16286,-3.237766 13.30563,-3.279644 13.71579,-2.911576 13.64737,-2.852649 13.99764,-2.147321 14.24911,-1.991972 14.58708,-0.7192 15.08039,0.229351 14.98967)))
+MULTIPOLYGON(((22.68183 44.21765,23.04128 44.08787,22.88669 43.84492,24.18021 43.68976,25.5627 43.64891,26.13661 43.98953,27.03238 44.15238,28.58377 43.73735,28.46886 43.36409,28.1502 43.40705,27.90702 43.19363,27.90702 42.70922,27.45765 42.4894,28.03134 41.98704,27.08228 42.09672,26.36189 41.71968,26.06927 41.71579,26.13499 41.36612,25.33353 41.24466,24.5423 41.57489,22.94867 41.34562,22.8776 42.02653,22.37164 42.32233,22.56844 42.48317,22.44953 42.83245,23.0071 43.19424,22.37304 43.81076,22.68183 44.21765)),((90.31396 23.0658,90.35698 22.97843,90.39146 22.83909,90.43008 22.82998,90.51941 22.17456,90.51005 22.16134,90.41635 22.19499,90.26651 21.9347,90.25928 21.89232,90.15397 21.88538,90.12435 21.91242,90.10071 21.89571,90.09218 21.92318,90.2271 22.18465,90.05339 21.97147,90.03577 22.12167,89.95785 21.97894,89.89097 22.20993,89.71237 21.76619,89.56026 21.99107,89.39063 21.70843,89.38985 21.90211,89.21927 21.75718,89.08354 21.93857,88.86646 22.9578,88.99747 23.19974,88.72794 23.2574,88.80328 23.48974,88.57062 23.6455,88.73291 24.26673,88.02834 24.68834,88.4422 25.20072,89.0113 25.29883,88.10567 25.82449,88.18036 26.14472,88.52641 26.37258,88.39457 26.62918,88.66698 26.2735,89.10016 26.39598,89.35738 26.00834,89.55626 25.96017,89.67532 26.22877,89.88033 25.9313,89.84493 25.28913,92.41306 25.02052,92.48511 24.86508,92.26034 24.83023,91.9061 24.14516,91.38819 24.1085,91.15093 23.64115,91.34951 23.08543,91.42766 23.25905,91.61399 22.92959,91.82832 23.09429,91.95375 23.72646,92.28809 23.69794,92.60881 21.97587,92.67366 21.29128,92.36672 21.47219,92.19804 21.15457,92.32608 20.74335,92.04735 21.17658,91.8118 22.19048,91.99925 22.41232,91.78563 22.22937,91.48845 22.9029,91.40863 22.76092,90.73324 22.88753,90.65673 23.32542,90.75747 23.63916,90.75493 23.64277,90.48831 23.59008,90.4809 23.59268,90.46096 23.63227,90.45624 23.64163,90.3849 23.69919,90.31414 23.75628,90.2522 23.7467,90.2309 23.72915,90.25223 23.6991,90.52809 23.39069,89.72082 24,89.77084 23.8359,89.54674 23.8241,89.06078 23.98389,90.12556 23.54546,90.15361 23.3245,90.12689 23.31145,90.1179 23.30705,90.10226 23.28774,90.11904 23.25971,90.16079 23.24258,90.3161 23.07075,90.17214 23.26201,90.48385 23.29943,90.44595 23.02246,90.31396 23.0658)))
+MULTIPOLYGON(((29.03217 -2.749662,29.07672 -2.592048,29.36887 -2.840679,29.86715 -2.76578,29.95822 -2.325547,30.56441 -2.417881,30.40339 -2.860481,30.84607 -2.977164,30.83693 -3.25414,30.0348 -4.273422,29.39148 -4.44525,29.24615 -3.070362,29.03217 -2.749662)))
+MULTIPOLYGON(((2.405395 11.90161,2.387346 12.24222,2.805825 12.41742,3.605074 11.69697,3.495874 11.29233,3.850976 10.59981,3.088169 9.101578,2.780915 9.065207,2.709604 6.36882,1.627816 6.225748,1.806693 6.28424,1.57392 6.688242,1.624833 9.042293,1.341589 9.54626,1.355205 10,0.774575 10.38476,0.912155 10.99649,1.434505 11.47221,2.019249 11.42771,2.405395 11.90161)))
+MULTIPOLYGON(((92.60881 21.97587,92.70662 22.15061,93.00166 21.98413,93.19876 22.25992,93.09991 22.7794,93.1313 23.04397,93.38774 23.13586,93.33115 24.07977,94.15455 23.8483,94.72583 25,94.582 25.24725,95.18343 26.06357,95.14398 26.61056,96.60806 27.36686,97.14354 27.09397,96.88756 27.60774,97.37821 27.8962,97.34721 28.21058,97.55236 28.53457,97.90508 28.3721,98.32202 27.53787,98.42828 27.68903,98.70368 27.56615,98.76456 27.05228,98.73453 26.18707,98.57286 26.11908,98.70353 25.85471,97.84502 25.26789,97.78796 24.84673,97.55451 24.74129,97.75788 24.16994,97.53503 23.93779,98.88095 24.15503,98.67962 23.96499,98.88978 23.18311,99.56421 22.9258,99.32204 22.7415,99.16896 22.15524,99.9706 22.05203,100.2026 21.43935,101.1177 21.77615,101.1547 21.56387,100.727 21.31212,100.5156 20.89783,100.6474 20.87555,100.2595 20.74696,100.0931 20.35574,99.46452 20.38927,99.53727 20.14476,99.07542 20.09255,98.92458 19.74414,98.04517 19.80859,97.67117 18.94544,97.76765 18.57921,97.34662 18.57051,97.6436 18.28764,97.69774 17.8203,98.50951 16.94456,98.68119 16.26792,98.9175 16.39474,98.84703 16.14147,98.56137 16.05271,98.58364 15.36202,98.1906 15.11106,98.61044 14.31464,99.11597 13.89081,99.10999 13.06757,99.66872 11.81529,98.77948 10.67773,98.68176 10.17759,98.5319 10,98.45467 10.68943,98.78153 10.98869,98.6548 11.12695,98.84052 11.68118,98.62184 11.78567,98.63331 11.92195,98.66819 11.93257,98.52191 12.25829,98.67622 12.99231,98.24451 13.81278,98.12527 13.54714,97.61571 16.07418,97.62534 16.50003,97.79173 16.34585,97.62139 16.64326,97.36294 16.47897,97.26455 17.10355,96.83478 17.40438,96.79061 17.48162,96.64977 17.33832,96.91109 17.32145,96.80129 16.73966,96.59639 16.53656,96.28638 16.58571,96.22281 16.75418,96.51187 16.8882,96.19852 16.76851,96.18707 16.47177,95.91209 16.41091,95.77855 16.12915,95.70959 16.27312,95.42638 15.72129,95.28683 15.7187,95.38594 15.87744,95.33962 15.98329,95.34706 16.00374,95.39066 16.23959,95.31509 16.06776,95.3014 16.04461,95.1768 15.7679,95.1907 16.04383,95.20765 16.09386,95.14078 16.2315,94.98206 15.76001,94.83425 15.78081,94.94432 15.95355,94.83636 15.85843,94.83456 15.88112,95.10056 16.30059,94.68565 15.83711,94.85285 16.2398,94.56961 15.92896,94.70086 16.21161,94.72485 16.63121,94.68309 16.68635,94.65501 16.35236,94.63886 16.33919,94.61512 16.31985,94.61045 16.30802,94.29451 15.99343,94.28742 15.98753,94.26152 16.5308,94.61115 17.55011,94.1409 18.73599,94.28001 18.73507,94.03092 18.86327,94.06857 19.3853,93.93727 18.8473,93.67422 19.01024,93.48414 19.40915,93.80901 19.22632,94.01077 19.381,93.77513 19.30105,93.68749 19.56537,93.99709 19.45255,93.72203 19.62648,93.79333 19.91599,93.41602 19.97076,93.32242 20.30786,93.30818 20.3201,93.28751 20.21659,93.24567 20.25241,93.2234 20.23547,93.25119 20.4261,93.12595 20.32796,93.12486 20.33121,93.0958 20.40571,93.10008 20.46338,93.07664 20.57224,92.8966 20.10944,92.76945 20.19339,92.90755 20.38484,92.7924 20.48871,92.7771 20.48516,92.61235 20.67968,92.61049 20.6864,92.60686 20.68616,92.61235 20.67968,92.72845 20.25999,92.33392 20.991,92.3291 20.99236,92.19804 21.15457,92.36672 21.47219,92.67366 21.29128,92.60881 21.97587)))
+MULTIPOLYGON(((114.0715 4.588868,115.0549 5.047173,115.0064 4.891522,114.7719 4.728659,114.8755 4.359025,114.6437 4.006352,114.0715 4.588868)),((115.0336 4.797955,115.1529 4.908361,115.3376 4.305109,115.0898 4.385616,115.0336 4.797955)))
+MULTIPOLYGON(((-69.46265 -17.50755,-69.64076 -17.28202,-68.81416 -16.33753,-69.23594 -16.14303,-69.41386 -15.62077,-69.12598 -15.25612,-69.3628 -14.80396,-68.84068 -14.21027,-69.07586 -13.6541,-68.96119 -12.85152,-68.6793 -12.49715,-69.56644 -10.95666,-68.58749 -11.11032,-66.61626 -9.89316,-65.37914 -9.697423,-65.38455 -11.26927,-64.993 -11.99937,-64.27783 -12.51148,-63.08235 -12.65285,-62.76447 -13.02264,-62.10852 -13.14852,-61.82428 -13.53925,-61.06904 -13.46343,-60.46772 -13.80096,-60.33445 -14.50884,-60.38313 -15.1052,-60.5653 -15.10499,-60.23581 -15.47606,-60.17298 -16.26463,-58.30934 -16.26969,-58.39461 -17.197,-57.77334 -17.55281,-57.4581 -18.22818,-58.13403 -19.76053,-57.87358 -19.98538,-58.16346 -20.16246,-58.1924 -19.79767,-59.11981 -19.34715,-59.98358 -19.29404,-61.7347 -19.62802,-62.27002 -20.56706,-62.64708 -22.24563,-62.80806 -22.00444,-63.93525 -22.00273,-64.32063 -22.86866,-64.6478 -22.1946,-65.75531 -22.10854,-66.22161 -21.78128,-66.2907 -22.08444,-66.73935 -22.23658,-67.1775 -22.80469,-67.87513 -22.8258,-68.17242 -21.29667,-68.54726 -20.87996,-68.43936 -20.6324,-68.75569 -20.39242,-68.78046 -20.08205,-68.52397 -19.92741,-68.69057 -19.73909,-68.40726 -19.4076,-68.95712 -18.94081,-69.06861 -18.0672,-69.46265 -17.50755)))
+MULTIPOLYGON(((-54.52573 2.303486,-54.1146 2.127094,-53.78421 2.36406,-52.90534 2.189559,-51.61506 4.190925,-51.54459 4.396619,-51.20151 4.083854,-51.17274 3.766992,-51.08532 3.895347,-50.68165 2.137318,-50.47079 1.819995,-49.97104 1.657724,-50.01251 1.026816,-50.18824 0.845562,-50.70216 0.315456,-51.41934 -0.412021,-51.12468 -0.140907,-51.39903 -0.472508,-51.25976 -0.50003,-50.95959 -0.065808,-50.66278 0,-50.75057 -0.428578,-51.05093 -0.68197,-50.68434 -0.604112,-50.65222 -0.275707,-50.32945 -0.085205,-49.63085 -0.247299,-49.00004 -0.13924,-48.36641 -0.373186,-48.90458 -1.505262,-50.38137 -1.938749,-49.28593 -1.704642,-49.38261 -2.158832,-48.60114 -1.305875,-48.49585 -1.552548,-48.31873 -1.478195,-48.50538 -1.470624,-48.4786 -1.149023,-47.89947 -0.558959,-47.40634 -0.763861,-47.46553 -0.593707,-47.2976 -0.588874,-47.16048 -0.814573,-47.07706 -0.663258,-47.05518 -0.867923,-46.82608 -0.708367,-46.41338 -1.084126,-46.17887 -0.913831,-46.14482 -1.257475,-45.99024 -1.076045,-45.82584 -1.2394,-45.70231 -1.149633,-45.69042 -1.347267,-45.68893 -1.368566,-45.6895 -1.378696,-45.41734 -1.289758,-45.46293 -1.547559,-45.32345 -1.319209,-45.39185 -1.553046,-45.33771 -1.753466,-45.08317 -1.474162,-44.97945 -1.607043,-44.86608 -1.423055,-44.96828 -1.661565,-44.78315 -1.724905,-44.70116 -1.800982,-44.69297 -1.803213,-44.47177 -2.035491,-44.76423 -2.264556,-44.55345 -2.221581,-44.35778 -2.334604,-44.49757 -2.442367,-44.51086 -2.480514,-44.77902 -3.312406,-44.56086 -2.961123,-44.36917 -2.652451,-44.02117 -2.398679,-44.34119 -2.783974,-44.20816 -2.856943,-43.72867 -2.481327,-43.45839 -2.59554,-43.37791 -2.329287,-42.22842 -2.817891,-42.23304 -2.673932,-41.43734 -2.938721,-39.88791 -2.885612,-38.47274 -3.699807,-37.1498 -4.943036,-35.48149 -5.161574,-34.8233 -7.001977,-34.82721 -8.003979,-35.30216 -9.193793,-36.41692 -10.51059,-37.02728 -10.94227,-38.32528 -12.9416,-38.5321 -13.0167,-38.49805 -12.72199,-38.71762 -12.6273,-38.76933 -12.99508,-38.58959 -12.9721,-38.93288 -13.22948,-38.88331 -13.62918,-39.07525 -13.88656,-38.92039 -13.94445,-39.06145 -14.71554,-38.85707 -15.86002,-39.21211 -17.15461,-39.13535 -17.69114,-39.56293 -18.09085,-39.69177 -19.35342,-40.35189 -20.31977,-41.0706 -21.50746,-40.99014 -22.01388,-41.96181 -22.53823,-42.01799 -22.99797,-43.04995 -22.98193,-43.08371 -22.67972,-43.2872 -22.80633,-43.18703 -22.99548,-43.54939 -23.08072,-44.40698 -22.94505,-44.66341 -23.05743,-44.58301 -23.36653,-44.9049 -23.33899,-45.40392 -23.6257,-45.41194 -23.82464,-45.93429 -23.77109,-46.81634 -24.20527,-48.25321 -25.43574,-48.25317 -25.43114,-48.12101 -25.26685,-48.41291 -25.22891,-48.44543 -25.389,-48.73886 -25.37393,-48.34996 -25.58059,-48.76333 -26.1993,-48.63543 -26.3741,-48.4933 -26.22403,-48.69536 -26.65774,-48.46946 -27.14774,-48.76078 -28.53476,-49.82983 -29.4736,-50.7809 -31.13062,-52.08659 -32.13484,-52.63416 -33.12595,-53.37161 -33.75053,-53.52446 -33.68903,-53.51495 -33.16332,-53.07554 -32.73903,-53.59493 -32.43153,-53.71415 -32.10408,-54.52603 -31.50096,-55.2451 -31.25673,-55.62381 -30.8503,-56.00782 -31.06264,-56.0214 -30.78441,-56.83579 -30.0911,-57.22708 -30.28558,-57.61797 -30.17916,-55.87476 -28.36226,-55.69562 -28.4253,-55.77309 -28.24701,-54.80873 -27.5359,-53.7986 -27.14745,-53.59184 -26.26489,-53.84392 -25.68932,-54.11059 -25.5044,-54.43019 -25.70594,-54.59636 -25.59497,-54.31655 -24.01433,-54.66784 -23.81538,-55.39753 -23.9739,-55.6128 -22.65852,-55.86168 -22.2791,-56.40335 -22.07751,-56.83665 -22.30044,-57.98896 -22.08457,-57.82151 -20.94222,-58.16346 -20.16246,-57.87358 -19.98538,-58.13403 -19.76053,-57.4581 -18.22818,-57.77334 -17.55281,-58.39461 -17.197,-58.30934 -16.26969,-60.17298 -16.26463,-60.23581 -15.47606,-60.5653 -15.10499,-60.38313 -15.1052,-60.33445 -14.50884,-60.46772 -13.80096,-61.06904 -13.46343,-61.82428 -13.53925,-62.10852 -13.14852,-62.76447 -13.02264,-63.08235 -12.65285,-64.27783 -12.51148,-64.993 -11.99937,-65.38455 -11.26927,-65.37914 -9.697423,-66.61626 -9.89316,-68.58749 -11.11032,-69.56644 -10.95666,-70.61765 -11.00737,-70.4999 -9.431578,-71.28828 -9.995796,-72.16473 -10.00232,-72.36356 -9.490671,-73.19613 -9.418253,-72.94584 -8.990152,-73.98156 -7.553418,-73.9537 -7.348258,-73.69297 -7.315934,-73.74282 -6.897146,-73.16131 -6.48023,-72.89562 -5.136259,-72.34502 -4.773405,-71.10893 -4.372511,-69.95342 -4.230484,-69.36835 -1.333702,-69.5933 -0.516707,-70 -0.20092,-70.06187 0,-70.03735 0.553025,-69.46821 0.734351,-69.11382 0.634123,-69.32924 1.062455,-69.85407 1.069752,-69.85519 1.714919,-68.12775 1.730217,-68.20544 2.037632,-67.95162 1.746852,-67.44616 2.141113,-67.11682 1.732161,-67.09666 1.170079,-66.86983 1.225646,-66.31854 0.743681,-65.38742 0.863895,-64.39851 1.539462,-64.34303 1.39162,-64.04498 2.034915,-63.41759 2.133158,-63.37712 2.423593,-63.81604 2.314885,-64.24787 2.527704,-64.29391 3.170593,-64.08481 3.603836,-64.61086 4.251375,-62.7561 3.674234,-62.73957 4.032468,-61.93494 4.116556,-61.34529 4.530355,-60.97837 4.522421,-60.59009 4.941295,-60.73177 5.19614,-60.12056 5.243235,-59.96942 5.073079,-60.16332 4.52116,-59.67398 4.381637,-59.51631 3.939903,-59.8651 3.560974,-59.99205 2.726567,-59.72432 2.276611,-59.7539 1.860766,-59.25275 1.397388,-58.80411 1.17508,-58.32467 1.590138,-58.00851 1.500673,-58 1.665301,-57.55563 1.695373,-57.3024 1.990075,-56.48025 1.941472,-55.91082 1.882989,-56.13354 2.256321,-55.94821 2.532005,-55.37018 2.407456,-54.93989 2.632479,-54.52573 2.303486),(-52.08681 -32.13097,-52.0918 -31.83675,-51.23351 -31.45783,-51.16632 -31.06297,-50.70461 -30.75599,-50.60135 -30.19411,-50.89063 -30.44112,-51.29451 -30.0068,-51.29333 -30.29492,-51.09238 -30.37138,-51.28168 -30.81134,-51.37454 -30.63546,-51.43591 -31.08794,-51.94927 -31.34798,-52.19708 -31.72896,-52.10632 -31.95207,-52.26282 -32.06171,-52.08681 -32.13097)),((-50.19813 0.265829,-50 0.309631,-49.60857 0.311495,-49.8603 0.008283,-50.35073 0.043637,-50.39441 0.222437,-50.19813 0.265829)))
+MULTIPOLYGON(((-78.17474 25.19393,-77.71301 24.48749,-78.04403 24.27788,-78.12514 24.51678,-78.44704 24.60538,-78.17474 25.19393)),((-73.65738 20.91607,-73.67854 21.10629,-73.00998 21.32986,-73.15784 20.97089,-73.65738 20.91607)),((-77.54922 26.87074,-77.03242 26.55475,-77.21186 25.84782,-77.39642 26.02855,-77.14205 26.56961,-77.54922 26.87074)),((-77.89266 26.64635,-77.9213 26.63776,-78.71546 26.48987,-78.99591 26.69455,-78.75601 26.52026,-78.57582 26.79688,-77.89266 26.64635)),((-76.14482 25,-76.32014 25.26903,-76.10857 25.12107,-76.16878 24.63396,-76.34193 24.83279,-76.14482 25)))
+MULTIPOLYGON(((88.92725 27.28978,89.35764 27.96391,90.00265 28.32378,90.38075 28.248,90.39165 28.07166,91.32251 28.08927,91.66819 27.94326,91.6572 27.76037,91.63419 27.53725,92.12455 27.28041,92.11964 26.92154,91.91294 26.80428,90.41105 26.90381,89.62505 26.72416,88.87685 26.94915,88.75972 27.11429,88.92725 27.28978)))
+MULTIPOLYGON(((25.2567 -17.78792,25.27033 -17.79891,26.16599 -19.54607,27.20168 -20.08701,27.28722 -20.49983,27.72207 -20.51928,27.68603 -21.06585,28.01623 -21.57341,29 -21.77173,29.36078 -22.19663,28.34627 -22.57694,27.74442 -23.23639,27.00567 -23.64784,26.8654 -24.26007,26.42155 -24.63555,25.87019 -24.75385,25.58393 -25.63317,24.65421 -25.81951,23.90865 -25.62613,23.46499 -25.27447,23.01187 -25.29341,22.56291 -26.22073,21.69972 -26.86086,20.69333 -26.90725,20.61319 -26.47431,20.83805 -25.95612,20.67549 -25.45156,20.00024 -24.75299,20 -22.00178,21.00174 -22.00384,20.99883 -18.31788,23.29662 -17.99752,23.61286 -18.50405,24.19486 -18.01912,25.2567 -17.78792)))
+MULTIPOLYGON(((26.61967 55.67435,27.60297 55.78648,28.24113 56.27555,28.58053 55.8454,31.23648 55.46122,31.10284 54.37546,32.32224 53.49015,31.85452 53.12265,31.90463 52.23735,31.65407 52.23735,31.06944 52.02019,30.48478 51.76965,30.48478 51.35204,28.07942 51.85316,26.19187 51.93666,24.52147 51.93666,23.65413 52.07933,23.17688 52.28258,23.91802 52.67258,23.92022 53.15824,23.50595 53.96659,24.76473 53.96052,25.51306 54.31833,25.79186 54.16851,25.55723 54.33265,25.75194 54.8152,26.87194 55.28482,26.44965 55.35035,26.61967 55.67435)))
+MULTIPOLYGON(((-89.14696 17.8095,-89.0387 18.00308,-88.84317 17.8665,-88.51293 18.46227,-88.3055 18.48507,-88.36373 18.29552,-88.09531 18.37731,-88.08086 18.20452,-88.28183 17.64348,-88.24293 16.80161,-88.93882 15.89004,-89.22346 15.89967,-89.14696 17.8095)))
+MULTIPOLYGON(((-75 44.97811,-76.13676 44.30282,-76.27047 44.26953,-76.42081 44.18601,-76.75488 44.1526,-76.88852 43.91876,-77.28941 43.85195,-77.38964 43.96888,-77.57337 43.96888,-77.59008 44.01899,-79.09344 43.75172,-79.46093 43.60138,-79.79501 43.3007,-79.34401 43.20047,-79.07674 43.23388,-79.07674 43.11695,-79.02663 43.06686,-79.00992 42.98334,-78.92641 42.91652,-79.02663 42.86641,-79.51104 42.833,-80.24602 42.79959,-80.39636 42.58244,-80.17921 42.51562,-80.51328 42.56573,-81.29838 42.64925,-81.79949 42.38198,-81.86631 42.26505,-82.46765 42.09803,-82.51776 41.94769,-82.71822 42.01451,-82.93536 41.96439,-83.18593 42.01451,-83.13581 42.24835,-82.91866 42.33187,-82.45094 42.29846,-82.45094 42.4488,-82.6681 42.53232,-82.50106 42.64925,-82.37823 42.95786,-81.69927 43.36752,-81.78279 44.10249,-81.28167 44.60362,-81.39859 44.95441,-81.63245 45.22166,-81.28167 45.22166,-81.28167 45.10473,-81.16474 44.93771,-80.94759 44.95441,-80.93088 44.73726,-80.64691 44.70385,-80.51328 44.57021,-80.04557 44.46999,-80.01216 44.62033,-80.09568 44.80407,-79.92865 44.83748,-79.92865 44.95441,-80.44646 45.48893,-80.69703 45.92324,-81.432 45.90654,-81.69927 46.00677,-82.16698 46.12368,-83.00217 46.17379,-83.68704 46.25731,-84.10887 46.51847,-84.32179 46.52458,-84.53895 46.5914,-84.50554 46.79185,-84.72269 46.94219,-84.63918 47.25955,-84.97325 47.61034,-84.88972 47.92773,-85.80845 48.01123,-86.45991 48.74622,-87.2617 48.77963,-88.11361 48.99676,-88.23052 48.94665,-88.16372 48.6794,-88.28064 48.52906,-88.63143 48.46224,-89.01562 48.22838,-89.56577 47.99149,-90.75883 48.08698,-90.86729 48.24529,-91.58295 48.04938,-92.08531 48.36502,-92.37912 48.23077,-92.98031 48.63298,-93.76878 48.51838,-94.59069 48.72066,-94.82763 49.31594,-95.16843 49.38861,-95.16467 48.99572,-122.7561 49.00119,-123.034 49.00134,-123.0919 49.00121,-122.9675 49.15862,-122.9294 49.17823,-122.8746 49.20648,-122.9278 49.1922,-123.0098 49.18598,-123.2609 49.26229,-122.8331 49.28077,-122.8838 49.47029,-122.9563 49.30083,-123.2639 49.32918,-123.1923 49.79649,-123.5146 49.38487,-123.7497 49.48208,-123.5294 49.70382,-123.9231 49.82747,-124.5173 49.80653,-124.8407 50.06272,-124.6724 49.97048,-124.7338 50.3232,-124.3182 50.50993,-125.0921 50.34944,-124.8548 50.5947,-124.915 50.80025,-124.6572 50.85981,-124.8811 50.94513,-125.1015 50.43336,-125.3219 50.43977,-125.5918 50.44762,-125.4833 50.68161,-125.6663 50.42501,-126.0816 50.48991,-126.2111 50.50215,-125.6832 50.38641,-125.4414 50.33339,-124.7904 49.46021,-123.8085 49.12729,-123.3852 48.42591,-123.7148 48.35976,-124.8465 48.67947,-125.2094 48.79484,-124.9149 48.98592,-125.0295 48.97424,-125.1991 49.09264,-125.5376 48.92008,-125.7788 49.18309,-125.7767 49.37007,-125.9794 49.22705,-125.9066 49.42902,-126.5368 49.37806,-126.5331 49.60481,-126.5319 49.60563,-126.1128 49.68929,-126.6522 49.76529,-126.7143 49.83463,-126.8491 49.9851,-127.1554 49.85764,-127.0897 50.13697,-127.3054 50.19187,-127.3473 50.01732,-127.6518 50.18264,-127.9165 50.11016,-127.7258 50.2939,-127.9739 50.321,-127.9345 50.46085,-127.4354 50.33154,-127.6056 50.51783,-127.42 50.60348,-127.7818 50.60365,-127.5609 50.55173,-128.048 50.44314,-128.4285 50.78627,-127.876 50.86717,-126.3616 50.53514,-126.2655 50.51407,-125.7277 50.65529,-125.501 50.93761,-125.6335 51.08655,-125.7107 50.71496,-126.1819 50.66846,-126.0215 50.81202,-126.5836 50.84942,-126.1865 50.95654,-126.5136 51.05704,-126.6618 50.86448,-126.7967 50.95782,-127.0703 51.00972,-127.1878 50.92647,-127.0184 50.81645,-127.5167 51.09131,-126.704 50.99166,-126.6644 51.19911,-127.1683 51.06207,-127.5478 51.12278,-126.9147 51.18697,-127.7825 51.15929,-127.0635 51.3476,-127.7845 51.35867,-127.3076 51.41555,-127.5585 51.46945,-127.5067 51.61805,-126.5954 51.61751,-126.6658 51.84129,-126.6951 51.66187,-127.4322 51.65166,-127.3597 51.86919,-127.6653 51.51414,-127.7655 51.64287,-127.8813 51.89525,-127.7116 52.03467,-127.8958 51.93128,-127.774 52.23319,-127.9189 52.34659,-128.092 52.5385,-128.3473 52.26048,-128.1203 52.75221,-127.891 52.74167,-128.1302 52.76873,-127.9719 52.92192,-128.4336 52.8109,-128.4314 53.0962,-128.9548 53.51012,-128.9442 53.5169,-128.47 53.31591,-128.1483 53.44825,-127.8232 53.0728,-127.5445 53.09444,-128.0513 53.37825,-127.9931 53.5199,-128.753 53.53412,-128.8073 53.7656,-128.4736 53.80376,-128.7106 53.87881,-128.524 54.25859,-128.812 53.85264,-129.3591 53.64951,-129.2852 53.3564,-129.6461 53.56383,-129.4206 53.40829,-129.5982 53.21214,-130.287 53.81858,-129.6737 53.58293,-130.1015 53.93475,-129.9532 54.15805,-129.7349 53.96415,-129.9383 54.17885,-129.2504 54.31887,-130.1249 54.14739,-130.2386 54.39596,-130.4865 54.36218,-130.4296 54.6297,-130.0623 54.35767,-129.9853 54.50495,-130.3549 54.63238,-129.8866 54.61713,-130.2147 54.71887,-130.1667 54.85464,-129.4075 55.11374,-130.0046 55.00305,-129.4587 55.46355,-129.7006 55.4039,-129.8097 55.62306,-129.7705 55.35984,-130.1191 54.98964,-129.9442 55.28502,-130.1438 55.73757,-130.0106 55.903,-130.1073 56.12453,-131.8436 56.64807,-131.8473 56.66231,-133.3731 58.42699,-134.96 59.2839,-135.0289 59.56924,-135.4831 59.80002,-136.3462 59.60201,-136.2238 59.54335,-136.5758 59.17006,-137.0295 59.04845,-137.0443 59.04448,-137.5208 58.91674,-137.5982 59.24158,-139.1862 60.09261,-139.069 60.35199,-139.9773 60.18466,-141 60.32135,-140.9922 69.64477,-139.1001 69.5027,-138.6087 69.23388,-135.2956 68.63409,-135.804 68.97524,-135.5454 69.01839,-135.9859 69.16249,-135.9875 69.16516,-135.1566 69.24895,-135.3124 69.40022,-135.1534 69.46591,-134.5387 69.41145,-134.4618 69.70893,-134.4218 69.70735,-133.872 69.567,-134.0692 69.25402,-131.3651 69.97023,-131.2122 69.81791,-130.9424 70.0942,-130.0771 70.06848,-130.0208 70.05245,-129.6703 70.25343,-129.3721 70.10094,-129.4845 70.01009,-131.074502 69.500741,-131.1414 69.29657,-130.9571 69.49844,-131.0408 69.12592,-130.8994 69.08076,-130.8847 69.32905,-130.344 69.68072,-128.9038 69.96047,-129.1892 69.70356,-128.9572 69.65469,-128.2186 69.91087,-128.3289 70.12772,-127.5049 70.20448,-128.1946 70.37044,-128.0385 70.57615,-127.4997 70.40517,-126.779 69.96833,-127.0353 69.91087,-125.4372 69.30676,-125.0982 69.43823,-125.6362 69.41277,-125.1403 69.47845,-125.5029 69.58787,-125.3704 69.69109,-124.7863 69.70212,-125.297 69.81142,-124.6281 69.97943,-125.1991 70.0145,-124.4508 70.03142,-124.6693 70.13815,-124.3363 70.04842,-124.4997 69.72333,-124.031 69.67475,-124.5382 69.39407,-123.8123 69.35184,-123.8097 69.35294,-123.1662 69.48947,-123.0368 69.81123,-121.8782 69.81344,-117.8693 68.99815,-114.9718 68.87074,-113.8886 68.40495,-114.0004 68.24091,-115.2444 68.19066,-115.0871 68.0095,-115.7488 67.91255,-115.1552 67.78632,-111.8819 67.67841,-110.0463 68.00929,-109.7139 67.72414,-109.0319 67.72794,-108.8335 67.35497,-108.5836 67.61952,-108.4539 67.35005,-107.9571 67.28417,-107.8487 67.04201,-108.6045 67.1551,-107.2212 66.35226,-107.7891 66.7728,-107.6314 67.07805,-107.5525 66.8394,-107.3817 66.97335,-107.0614 66.8162,-107.4214 67.05916,-107.0876 67.14344,-107.5168 67.20586,-107.7037 67.40512,-107.5659 67.5038,-108.0287 67.78281,-107.7093 68.02925,-107.704 68.03272,-106.323 68.18652,-106.4232 68.32474,-105.7389 68.41523,-105.6279 68.63642,-106.5783 68.52766,-106.3836 68.50646,-106.6225 68.47303,-106.5353 68.28894,-106.8862 68.36946,-106.9236 68.36829,-108.3777 68.11349,-108.3707 68.30072,-108.7383 68.34247,-108.2764 68.62838,-106.2007 68.94273,-105.4351 68.73598,-105.2795 68.4587,-105.535 68.40827,-104.5818 68.26037,-104.4886 68.02329,-104.0165 68.05297,-104.108 67.8829,-103.3922 68.16615,-103.0833 67.89893,-102.1296 67.67853,-100.6579 67.85955,-99.35172 67.77045,-98.3962 67.75763,-98.74615 68.05382,-98.29169 68.18349,-98.68971 68.40847,-97.69131 68.36664,-97.91167 68.56834,-96.57774 68.18755,-96.38296 68.32576,-96.71906 68.02126,-95.87786 68.30016,-96.20416 67.83835,-96.14408 67.62604,-96.30278 67.71399,-96.45303 67.46732,-96.08569 67.4841,-96.23621 67.24819,-96.09553 67.2233,-95.5507 67.39514,-95.8355 67.16297,-95.36604 67.15414,-95.11701 67.26289,-95.69269 67.74054,-95.46625 68.06966,-94.73415 68.05049,-93.32501 68.64629,-93.74701 68.62115,-93.56546 68.84476,-93.79462 69.08199,-94.0721 68.76642,-94.61455 68.75719,-94.57383 68.98434,-93.98794 69.16463,-94.29529 69.16582,-94.26258 69.32861,-93.54497 69.4435,-94.24697 69.44011,-94.5994 69.68726,-94.83006 69.56587,-95.9286 69.78378,-96.54889 70.25035,-96.21748 70.57755,-95.77225 70.53983,-96.04289 70.64789,-96.59743 70.814,-96.32858 71.0992,-96.53364 71.14194,-96.3423 71.15806,-96.47265 71.2814,-95.51697 71.29825,-95.49366 71.47686,-95.17489 71.52966,-95.88683 71.61687,-95.33151 71.76401,-95.0028 71.8511,-95.19084 71.95008,-94.63256 71.98933,-95.17501 71.97736,-95.11719 72.46407,-95.82698 72.85519,-95.63171 73.05653,-95.84602 73.14024,-95.53402 73.2322,-95.69366 73.68533,-94.6054 73.65302,-95.29697 73.98781,-93.32892 74.17175,-92.32559 73.94334,-90.15958 73.89754,-92.05442 72.75126,-94.28864 72.7699,-93.74217 72.7442,-93.44041 72.4575,-94.01038 72.00307,-94.4872 71.99255,-94.59119 71.86899,-94.32972 71.81612,-94.38658 71.67585,-93.68156 71.77267,-93.78529 71.657,-92.94928 71.35866,-92.81886 70.8683,-93.0009 70.85027,-92.14626 70.6054,-92.29051 70.50468,-92.07778 70.31825,-91.7265 70.37842,-91.51353 70.15752,-92.27831 70.28892,-92.5812 70.09193,-91.93058 70.02628,-92.99538 69.68998,-91.75511 69.48267,-91.19774 69.65306,-91.61312 69.52323,-90.63249 69.54817,-90.34602 69.45638,-90.76047 69.34503,-90.76376 69.33858,-91.42982 69.3632,-91.03319 69.24515,-91.02219 69.24187,-90.42717 68.88723,-90.59467 68.45854,-90.28441 68.37635,-90.59347 68.32227,-90.25544 68.24567,-89.75011 68.55257,-89.92817 68.62914,-89.73455 68.62405,-89.73733 68.97742,-89.37035 69.23206,-88.96773 69.25272,-88.05195 68.84465,-87.77516 68.31964,-88.37009 68.29033,-88.38001 67.98549,-87.33322 67.26902,-87.4866 67.11502,-87.24123 67.10143,-86.85229 67.17263,-87.00607 67.35979,-86.50747 67.33333,-86.49989 67.6897,-85.8651 68.05265,-85.63544 68.72397,-84.70601 68.73039,-85.12582 68.96409,-84.49545 69.02047,-85.44105 69.26222,-85.30013 69.4435,-85.51321 69.4903,-85.33549 69.57285,-85.49 69.77242,-85.1561 69.79155,-85.53936 69.8643,-83.71136 69.73965,-82.20935 69.63722,-83.24606 69.53812,-81.31645 69.19946,-81.23459 69.08636,-82.02563 68.88731,-81.31788 68.86902,-81.23434 68.6358,-81.92306 68.41135,-82.62427 68.44984,-81.99102 68.34766,-82.47884 68.31741,-82.22408 68.29284,-82.23102 68.12622,-81.95097 68.20844,-82.07736 67.911,-81.18546 67.46371,-81.39223 67.05808,-83.33627 66.34932,-83.95309 66.5972,-83.89772 66.92111,-84.00141 66.77145,-84.0043 66.7655,-84.72528 67.01403,-84.7317 67.01469,-84.8369 66.97414,-85.19254 66.87957,-84.55842 66.93622,-84.74583 66.90669,-84.48369 66.82855,-84.67268 66.8423,-84.10635 66.69222,-83.65919 66.2196,-84.55658 66.31937,-84.54868 66.31811,-84.32761 66.15912,-85.23753 66.27431,-85.41751 66.60213,-86.74689 66.53934,-86.59143 66.30985,-85.85161 66.16231,-87.3362 65.3207,-88.00572 65.34389,-88.83847 65.64796,-88.38457 65.63202,-89.81829 65.99384,-89.99532 65.93768,-89.73255 65.82664,-90.40662 65.87976,-89.03951 65.32479,-87.00521 65.23821,-86.96278 65.05343,-88.15434 64.29144,-88.03313 64.17556,-89.55719 63.98312,-89.77947 64.24969,-89.98738 64.20982,-90.09883 64.13517,-89.83656 63.92487,-90.22067 64,-89.97548 63.80347,-90.26727 63.60639,-90.79945 63.64837,-90.9349 63.57028,-90.64909 63.45958,-91.43768 63.76025,-93.08154 63.88984,-94.08669 63.96908,-92.24731 63.74968,-92.12867 63.64141,-92.47374 63.51673,-91.74611 63.71773,-90.69578 63.36351,-90.64087 63.09034,-91.36649 62.79967,-92.40672 62.84426,-91.8439 62.61996,-92.66149 62.6268,-92.14264 62.36467,-92.74367 62.48783,-92.54189 62.17306,-93.0718 62.33585,-92.73743 62.22551,-93.21292 62.20827,-92.97182 62.10959,-93.45991 62.05332,-93.29552 61.89162,-93.88383 61.9498,-93.27151 61.73639,-94.29131 61.40294,-93.8085 61.33755,-94.11243 61.31532,-93.98612 61.09594,-94.69445 60.45749,-94.84469 59.97152,-94.66818 59.35824,-94.8395 59.39122,-94.79692 59.08936,-95.02884 59.05895,-94.42935 58.71201,-93.18522 58.75551,-92.8473 57.82377,-92.43536 57.36339,-92.7354 56.92532,-90.61557 57.22998,-88.87547 56.85758,-87.96927 56.45853,-87.6161 55.98876,-85.90997 55.64656,-85.11507 55.25528,-82.35637 55.15685,-82.20412 54.80194,-82.46147 54.20195,-82.13016 53.81188,-82.29672 52.94795,-81.39362 52.11588,-80.67103 51.79826,-80.41902 51.33051,-79.81666 51.16312,-79.35505 51.66524,-78.86868 51.16614,-78.89952 51.39488,-78.68147 51.48997,-79.04461 51.76928,-78.45495 52.25507,-78.87654 52.73593,-78.70328 52.76521,-78.91798 52.91173,-78.78487 52.96339,-78.99019 53.01143,-78.89085 53.39813,-79.12489 53.4878,-78.8924 53.54769,-79.15621 53.68871,-78.95544 53.98975,-79.24315 54.16706,-79.75098 54.64175,-77.7693 55.26558,-76.71653 55.99261,-76.53454 56.37706,-76.58003 57.18884,-77.2084 58.00447,-76.99876 58.02364,-78.59483 58.65078,-78.57996 58.79597,-78.35629 58.71128,-78.55256 58.94977,-77.65475 59.37566,-77.96641 59.41412,-77.72179 59.55027,-77.82116 59.71626,-77.29651 59.80495,-77.48444 59.92154,-77.25406 59.99731,-77.65455 60.06463,-77.44888 60.11739,-77.78645 60.3961,-77.35775 60.5153,-77.84747 60.64655,-77.52276 60.84299,-78.23283 60.786,-77.7188 61.17718,-77.8229 61.45991,-77.49185 61.53091,-77.80447 61.70193,-78.01528 61.70924,-78.20424 62.25844,-77.52173 62.58499,-75.54941 62.27531,-75.88232 62.16849,-75.70893 62.08677,-75.36375 62.31903,-74.53571 62.10228,-74.70074 62.25795,-73.66656 62.47773,-72.60026 62.11346,-72.79279 61.82505,-72.19405 61.8673,-71.98133 61.66349,-72.26591 61.56703,-71.58022 61.632,-71.92908 61.44765,-71.56721 61.40466,-71.91061 61.39143,-71.62191 61.15356,-70.13313 61.09244,-70.14154 60.88103,-69.90303 60.79889,-69.49925 61.06556,-69.36131 60.81696,-69.81999 60.507,-69.62328 60.07256,-70.99586 60.08541,-69.72512 59.96646,-69.50762 59.63753,-69.75881 59.31074,-69.24852 59.33216,-69.53496 59.14359,-69.09587 59.05722,-69.34735 58.94014,-69.2908 59.09465,-69.48775 59.07932,-69.65952 58.79082,-69.84766 59.06273,-69.79144 58.83199,-70.29556 58.75962,-69.90928 58.78429,-69.81096 58.58174,-69.25824 58.90374,-68.35146 58.78123,-68.18862 58.5476,-68.33429 58.124,-69.41737 57.73291,-68.31128 58.09055,-68.01222 58.5827,-67.86809 58.33539,-67.74801 58.46358,-67.72518 57.92027,-67.46124 58.29366,-66.93604 58.51204,-66.51944 58.44284,-66.66404 58.54295,-66.45104 58.83094,-65.9258 58.61475,-66.02736 58.30462,-65.81712 58.5732,-66.08871 58.81678,-65.76555 58.83728,-65.99887 58.91339,-65.28447 59.04015,-65.5942 59.19307,-65.46886 59.14086,-65.56644 59.38555,-65.32336 59.24308,-65.52029 59.4798,-65.30608 59.4934,-65.48491 59.67002,-65 59.89758,-65.13273 60.05421,-64.67062 60.34659,-64.37997 60.23697,-64.74168 60.23514,-64.3593 60.17064,-64.69978 60.02381,-64.36559 60.13277,-64.5246 59.89762,-64.15212 60.01294,-64.30019 59.94469,-64.17535 59.7893,-63.9383 59.75893,-64.27118 59.78283,-63.91124 59.66231,-64.13061 59.51973,-63.72141 59.49353,-64.06448 59.38152,-63.37615 59.2677,-63.44973 59.09938,-64.05538 59.01992,-63.13515 59.05141,-63.34988 59.02545,-63.15535 58.8252,-62.89383 58.78299,-63.08622 58.66003,-62.90741 58.59315,-63.45332 58.54805,-63.32288 58.46318,-63.59982 58.28629,-62.56951 58.48663,-62.95313 58.19325,-62.58707 58.20253,-63.34994 57.97277,-62.50548 58.17508,-62.31678 58.02004,-62.6784 57.92881,-62.32626 57.91307,-61.88671 57.87132,-62.16 57.83049,-61.89939 57.60931,-62.55563 57.50223,-61.80781 57.37111,-62.01731 57.2262,-61.63529 57.23204,-61.3487 56.94438,-61.93456 56.80064,-61.6816 56.61314,-62.4519 56.75256,-61.65628 56.53774,-62.22871 56.45635,-61.58287 56.27827,-62.05095 56.21871,-61.34473 56.23223,-61.50194 56.06536,-61.24988 56.05794,-61.54337 56.01181,-60.95689 55.88713,-60.83663 55.86156,-60.93666 55.72396,-60.57506 55.80717,-60.6682 55.539,-60.30577 55.7728,-60.49441 55.33541,-60.17463 55.42584,-60.68043 54.98783,-60.21658 55.27921,-60.282 55.11107,-60.05479 55.24825,-60.30552 54.98354,-59.75761 55.33323,-59.97087 55.11024,-59.39874 55.15994,-59.91409 54.73906,-59.14868 55.22765,-59.38556 54.966,-58.94065 55.12924,-58.88161 54.85222,-59.10656 54.82042,-58.38875 54.72534,-57.94385 54.92255,-57.82427 54.81707,-58.1796 54.73762,-57.42859 54.64676,-57.36839 54.49819,-57.6861 54.45768,-57.50814 54.45702,-57.78081 54.36654,-57.78536 54.36642,-59.58337 54.03247,-58.44033 54.14395,-60.13058 53.77576,-60.01348 53.43372,-59.09501 53.67419,-58.83869 53.95044,-57.76866 54.06944,-58.35691 54.10599,-57.34674 54.13845,-57.05706 53.80972,-57.51561 53.57732,-57.29442 53.45132,-56.9548 53.72853,-56.46534 53.78222,-56.6997 53.68789,-56.22675 53.52377,-55.73884 53.13808,-56.17245 53.03307,-55.80016 52.83341,-56.1972 52.83873,-55.79918 52.65574,-56.53207 52.60164,-55.6188 52.44056,-56.23322 52.44659,-55.61524 52.21017,-55.89048 51.95683,-56.96179 51.41772,-57.68928 51.41149,-57.67268 51.60893,-57.76857 51.3907,-58.26172 51.31403,-58.5904 51.22453,-58.88981 50.97351,-58.89126 50.97338,-59.00827 50.73263,-59.07204 50.88222,-59.42444 50.66204,-59.59283 50.47704,-59.96666 50.2895,-60.8252 50.23673,-60.9648 50.23227,-61.7451 50.08135,-61.58482 50.1871,-62.34949 50.28849,-63.7628 50.304,-66.45371 50.26146,-67.13618 49.80164,-67.37097 49.31466,-68.04184 49.2999,-69.07185 48.76894,-69.90295 47.77265,-71.17139 46.82405,-70.49103 47.01621,-68.82513 48.37036,-66.24691 49.18906,-64.9535 49.20143,-64.21242 48.85229,-64.63388 48.82677,-64.17631 48.61745,-64.32932 48.41,-65.25108 48.00405,-65.9118 48.19959,-66.78469 47.98643,-66.36907 48.06531,-65.61979 47.64543,-64.74488 47.76628,-64.97902 47.28011,-65.36513 47.09086,-64.80652 47.07615,-64.91228 46.88135,-64.56149 46.21244,-63.79509 46.13371,-64.10583 46.01532,-63.25583 45.73671,-62.68547 45.7608,-62.5066 45.58865,-61.91117 45.87936,-61.86677 45.68111,-61.49866 45.70008,-61.23976 45.4885,-61.49364 45.38461,-60.98605 45.27863,-61.69363 45.16757,-62.47809 44.8524,-62.49819 44.88583,-63.612 44.67433,-63.65039 44.43065,-63.93682 44.50154,-63.91249 44.68487,-64.08931 44.46818,-64.30708 44.56729,-64.23368 44.2896,-64.40664 44.22847,-65.07163 43.69117,-65.38692 43.74115,-65.47486 43.45284,-65.73166 43.49458,-65.8624 43.81212,-66.12601 43.7404,-66.21465 44.09741,-65.85098 44.56831,-66.11064 44.49644,-64.50256 45.33141,-64.20509 44.94878,-64.16921 45.19009,-63.34638 45.36783,-64.94868 45.32487,-64.28714 45.79143,-64.55496 45.72178,-64.55752 45.9754,-64.78236 45.59124,-65.5782 45.3001,-67.09035 45.07576,-67.46207 45.24411,-67.4472 45.60041,-67.81347 45.68372,-67.78654 47.06619,-68.2367 47.3573,-68.89502 47.17887,-69.22559 47.45865,-69.98644 46.6995,-70.30109 46.19219,-70.25917 45.88986,-70.86777 45.23078,-71.2938 45.29987,-71.53727 45,-74.66793 45.0026,-75 44.97811),(-127.5208 52.14182,-126.9952 52.29173,-126.6705 51.95804,-126.9596 52.30944,-126.309 52.43107,-127.1635 52.33678,-127.206054 52.525647,-127.6317 52.6021,-127.5017 52.3382,-127.4443 52.35879,-127.2122 52.3151,-127.5208 52.14182),(-131.258349 69.516869,-131.882663 69.405321,-131.499649 69.42548,-131.5992 69.28653,-131.334952 69.47655,-131.377 69.2889,-131.258349 69.516869),(-131.9452 69.38998,-131.9477 69.39596,-131.9452 69.38998),(-123.921 49.8327,-123.9231 49.82747,-123.921 49.8327),(-131.2312 69.52977,-131.2344 69.52972,-131.2312 69.52977),(-131.112 69.53172,-131.1049 69.53184,-131.112 69.53172),(-93.55222 69.41476,-93.54497 69.4435,-93.55222 69.41476)),((-121.9422 49.25759,-121.8597 49.3837,-121.9422 49.25759)),((-64.5199 63.68056,-64.6731 63.68548,-64.45908 63.44946,-64.70481 63.38692,-64.51477 63.24119,-64.9769 63.5677,-64.99326 63.55076,-65.13944 63.39942,-64.87598 63.23276,-65.05095 63.31309,-64.9246 63.21321,-65.06152 63.1652,-64.59206 62.91599,-65.26785 63.02649,-64.92731 62.65748,-65.31199 62.69165,-65.29322 62.93619,-65.53734 62.79973,-65.68414 63.04811,-65.7615 62.8777,-66.23787 63.22181,-66.056 62.94187,-66.39428 63.01326,-66.66677 63.29911,-66.5191 63.40867,-66.68747 63.29752,-66.53225 63.001,-66.78832 63.28839,-66.79892 63.1499,-67.00606 63.24693,-66.91729 63.39692,-67.14238 63.27811,-67.89263 63.77288,-67.68774 63.3704,-68.40948 63.72571,-68.97713 63.74998,-68.86382 63.60463,-67.04703 62.75028,-66.33638 62.43639,-66.49679 62.33883,-66.32441 62.25582,-65.88769 62.20542,-66.23204 62.08253,-65.94785 61.87126,-66.27477 61.85809,-68.60662 62.26283,-68.8373 62.59862,-68.9708 62.36065,-69.23489 62.64098,-69.58691 62.65485,-69.37595 62.76188,-69.81245 62.82139,-70.15999 62.7381,-70.99393 62.94806,-70.81835 63.0583,-71.11793 62.99168,-70.85942 63.15988,-71.17903 62.99736,-71.37985 63.11783,-71.63625 63.13517,-71.74288 63.37787,-72.11536 63.43977,-71.19482 63.59259,-71.54689 63.56866,-71.47861 63.71214,-71.90572 63.86594,-71.90208 63.63464,-72.10548 63.71165,-72.10667 63.71275,-72.31856 63.71335,-72.24088 63.94717,-72.4859 63.77544,-73.04372 64.23251,-73.46371 64.39129,-73.68146 64.54728,-73.4259 64.6016,-73.93095 64.60274,-73.76268 64.46763,-74.11595 64.32616,-74.13318 64.53938,-73.94047 64.5136,-74.16122 64.56799,-73.98009 64.5607,-74.02942 64.72514,-74.38348 64.56538,-74.68639 64.71782,-74.46143 64.83041,-74.64029 64.89792,-74.97359 64.7701,-74.4437 64.56133,-74.69894 64.54548,-74.46016 64.38638,-75.8646 64.61923,-75.60648 64.44343,-75.90182 64.42695,-75.69151 64.3655,-76.64567 64.18736,-77.88824 64.3711,-78.29413 64.69967,-77.96453 65.04658,-77.30958 65.17905,-77.52541 65.3187,-77.31705 65.48144,-76.00956 65.25232,-74.52949 65.32627,-74.13007 65.53614,-73.46538 65.4482,-74.45757 66.15591,-72.99874 66.7122,-72.80652 67.02031,-72.15702 67.26558,-72.93243 67.9282,-72.99319 68.23821,-73.50298 68.27742,-73.20325 68.37621,-73.64925 68.25051,-73.96282 68.41727,-73.65117 68.6616,-74.19792 68.7291,-73.88392 68.55865,-74.23353 68.51638,-74.64902 68.79345,-75.4688 69.02628,-76.62923 68.69081,-76.61549 69.02504,-75.60004 69.07727,-75.59758 69.24265,-76.65012 69.54085,-76.18031 69.67326,-77.1913 69.64409,-76.68973 69.84872,-77.30827 69.83691,-76.9656 70.00124,-77.5873 69.74413,-77.64282 70.17577,-77.88632 70.2459,-79.05778 70.47508,-78.70623 70.54786,-78.87183 70.63687,-79.38031 70.52818,-79.60027 70.37154,-78.94543 70.32769,-78.65893 69.97462,-79.63122 69.86477,-81.7291 70.13999,-80.76743 69.79851,-80.92403 69.72294,-82.08414 70.22441,-83.02024 70.31941,-81.71169 69.95527,-82.12012 69.79416,-83.03744 70.02144,-85.83322 70.01758,-86.55068 70.2476,-86.3586 70.52974,-86.64453 70.32373,-86.97366 70.47256,-87.24086 70.3921,-86.97721 70.29262,-87.87707 70.25062,-88.77643 70.50388,-89.52448 71.09993,-86.98323 71.00665,-87.82109 71.27393,-89.98872 71.4647,-89.76058 71.77264,-90.10643 71.93687,-90.02966 72.06528,-89.5676 72.16036,-89.88557 72.19007,-89.91465 72.42513,-89.46223 72.66122,-89.57243 72.79729,-89.23199 72.78493,-89.40664 72.82606,-89.30318 73.05638,-88.27144 73.57001,-87.22573 73.79201,-84.82253 73.74149,-86.02046 73.3125,-86.73479 72.72504,-86.22977 72.41372,-86.39201 72.01264,-84.83014 71.27882,-86.79687 70.99731,-84.95172 71.20235,-84.85992 71.0804,-85.14844 71.09446,-84.75906 70.94001,-84.63252 71.22581,-84.77496 71.37484,-84.43948 71.65023,-85.27711 71.68404,-85.93666 71.99365,-85.50518 72.06039,-85.47314 72.2691,-84.36124 72.07504,-85.7007 72.6496,-85.56317 72.97138,-84.49556 72.87536,-85.46214 73.11748,-84.09555 73.06042,-85.1182 73.31747,-84.31102 73.2275,-84.63196 73.40574,-83.64307 73.3846,-84.00085 73.51431,-82.85393 73.73848,-81.60035 73.73363,-81.17266 73.48571,-81.17345 73.25952,-80.57674 73.15323,-80.63028 72.93019,-80.22767 72.7339,-80.90268 72.46136,-80.46852 72.46114,-80.89397 72.18871,-80.53792 72.06955,-81.07833 72.05807,-80.77258 72.02274,-80.94498 71.89096,-80.32227 72.0722,-80.48262 72.18927,-79.91238 72.46537,-79.9051 72.46395,-78.93256 72.27471,-79.17982 71.96439,-78.4974 71.87194,-78.92414 72.01812,-78.84425 72.17764,-77.72746 71.74634,-78.81512 72.31867,-77.65176 72.20636,-78.54666 72.50015,-76.91398 72.74686,-75.16029 72.49182,-75.31162 72.4254,-74.92292 72.24818,-75.4702 72.13573,-75.22668 72.05851,-76.07014 71.69533,-75.02431 72.12353,-74.2076 72.0635,-74.23416 71.8191,-75.34546 71.69349,-74.90122 71.66085,-75.37881 71.50887,-74.60366 71.65986,-75.11955 71.46165,-74.68015 71.39552,-75.0396 71.17955,-74.61527 71.37473,-74.74006 71.5229,-74.52367 71.65266,-74.13819 71.64744,-73.57227 71.75566,-74.29495 71.41213,-74.0061 71.43981,-74.22076 71.20027,-73.54733 71.55042,-73.61479 71.36303,-73.3652 71.39869,-73.85559 71.0473,-73.31864 71.35014,-73.03032 71.27985,-73.3468 70.96989,-72.82279 71.43418,-73.02835 71.29661,-73.3783 71.51764,-73.06453 71.51721,-72.80716 71.44804,-72.57671 71.65223,-71.28671 71.38203,-71.13108 71.26434,-71.65172 71.0304,-71.83311 71.05367,-72.22227 70.92384,-72.77285 70.82101,-72.16936 70.84051,-72.55479 70.61366,-70.59946 71.06287,-70.50176 70.92359,-70.75528 70.75151,-71.39559 70.57114,-71.15383 70.54086,-71.52436 70.02307,-70.99262 70.62998,-69.87016 70.8803,-70.60933 70.45492,-69.43354 70.79012,-68.34855 70.57866,-68.42438 70.37559,-70.01765 70.00737,-68.6702 70.20808,-69.98078 69.6114,-68.21177 70.10079,-68.3568 70.16833,-68.04906 70.32941,-67.4357 70.10075,-67.11507 69.729,-67.8113 69.68356,-67.91944 69.51966,-68.30367 69.58353,-68.02643 69.66953,-70.04547 69.53774,-67.20722 69.46412,-66.65708 69.19048,-69.25535 69.26143,-68.06551 69.22046,-68.97076 69.23002,-68.49039 69.20726,-69.06793 69.11143,-68.90739 69.10326,-69.0004 68.97631,-68.18236 69.1513,-67.69398 69.02041,-68.50322 68.89843,-67.75414 68.78375,-68.44744 68.79404,-69.38037 68.80787,-68.04383 68.68188,-68.88731 68.59787,-67.92183 68.55628,-67.93865 68.39909,-67.65853 68.56757,-67.4933 68.54217,-67.60394 68.38265,-66.6525 68.44458,-67.86531 68.26816,-66.99524 68.32909,-67.5807 68.16842,-66.76453 68.2455,-67.03475 67.99461,-66.28909 68.12518,-66.50656 68.07533,-66.1591 68.01035,-66.40572 67.8495,-66.76086 67.87523,-66.36202 67.76746,-66.11081 67.91632,-65.91558 67.87624,-66.02255 67.59163,-65.77993 67.97449,-65.44707 67.99043,-65.61334 67.7757,-65.33123 67.58582,-65.56064 67.78049,-65.40871 67.91799,-64.71049 67.98351,-65.08299 67.91933,-64.91044 67.91611,-65.15208 67.66167,-64.67509 67.82375,-64.39319 67.69953,-64.05017 67.52406,-64.45733 67.47048,-63.9405 67.34055,-64.78137 67.36322,-64.21751 67.29491,-64.80341 67.20451,-63.94788 67.26331,-64.69962 67.00661,-63.50244 67.23297,-63.8172 66.89641,-63.12547 67.32937,-62.95602 67.22375,-63.28617 67.10887,-63.23744 66.9572,-63.82985 66.81631,-63.43379 66.91014,-63.38131 66.70958,-63.33656 66.89101,-62.82937 66.95953,-62.92754 66.63628,-62.7666 66.93456,-62.33494 66.71593,-62.41642 66.93049,-61.97283 67.04003,-62.08302 66.89506,-61.82057 66.9626,-61.99643 66.85711,-61.27528 66.66946,-61.42581 66.53002,-62.18172 66.62165,-61.55994 66.48399,-61.9856 66.39886,-61.46335 66.34919,-62.56998 66.39443,-62.31822 66.28976,-62.79379 66.22718,-61.92661 66.00426,-63.04427 66.10685,-62.27991 65.79621,-62.84642 65.90812,-62.56051 65.73254,-62.84472 65.75732,-62.60973 65.67207,-62.83963 65.60577,-62.84605 65.60982,-63.24118 65.63394,-63.49438 65.93543,-63.34795 65.6569,-63.73732 65.67088,-63.36761 65.62336,-63.68722 65.55659,-63.29044 65.41809,-63.74046 65.47494,-63.31228 65.17876,-63.51014 65.19384,-63.32775 65.13807,-63.57963 65.04398,-63.54018 64.88314,-63.84431 64.97144,-63.72885 65.0556,-64.24858 65.08219,-64.11594 65.24751,-64.32615 65.13333,-64.20824 65.43948,-64.55044 65.07452,-64.8968 65.25972,-64.68507 65.33454,-64.91006 65.33308,-64.40047 65.46894,-65.04933 65.36118,-65.16559 65.48096,-64.70819 65.64613,-65.29552 65.62746,-64.77443 65.71803,-65.49574 65.73604,-65.34432 65.91297,-64.66337 65.95468,-64.84624 66.02168,-64.75738 66.1723,-64.32525 66.3381,-65.87399 65.93875,-65.46513 66.38232,-65.96649 66.1017,-66.5349 66.23641,-66.43494 66.39935,-66.75317 66.37031,-66.75523 66.37066,-66.72038 66.59314,-67.93072 66.63082,-67.11389 66.43988,-67.42336 66.4409,-67.22594 66.26604,-67.97379 66.50675,-67.76949 66.2403,-67.23193 65.98803,-67.67478 65.91776,-67.71561 66.10492,-67.73077 65.8874,-68.36174 66.06488,-68.04858 65.82395,-68.23516 65.7637,-67.7858 65.78091,-68.11454 65.43169,-67.78278 65.58394,-67.41679 65.64857,-67.2579 65.6431,-67.50528 65.54332,-67.34023 65.43034,-67.04633 65.4606,-67.40656 65.3413,-67.07343 65.28082,-67.24796 65.16647,-66.90427 65.21545,-67.10526 65.04639,-66.73746 65.16264,-66.9297 65.03637,-66.75031 65.04398,-66.7246 64.71368,-66.67274 65.03426,-66.11642 64.8605,-66.43678 64.72267,-66.30961 64.60576,-66.40919 64.71687,-66.01772 64.84917,-65.80641 64.62348,-65.95654 64.86697,-65.70422 64.8431,-65.53488 64.71667,-65.67866 64.51395,-65.67997 64.5121,-65.05984 64.44436,-65.68297 64.29631,-65.27238 64.21909,-65.42213 64.13361,-65.01024 64.03897,-65.22717 64.01065,-64.60505 63.97697,-64.96906 63.80438,-64.57482 63.69984,-64.90353 63.81525,-64.53584 63.90116,-64.45593 63.6581,-64.5199 63.68056),(-71.54161 70.53001,-71.39559 70.57114,-71.54161 70.53001)),((-78.21884 82.92164,-75.86047 82.58842,-76.26974 82.43539,-75.46043 82.61913,-77.27365 83.02971,-74.47939 83.02983,-72.6256 82.69371,-73.63957 82.92488,-73.1084 83.03407,-66.37541 82.93134,-68.66579 82.62379,-65.17776 82.7528,-65.44755 82.78979,-65.06759 82.8454,-65.27299 82.88352,-64.84644 82.91032,-63.52161 82.82157,-63.96028 82.71264,-62.96911 82.57607,-63.35703 82.43183,-61.13573 82.3563,-64.41186 81.71519,-68.32737 81.56062,-69.33637 81.71329,-68.62269 81.51137,-66.65344 81.51105,-69.99689 81.08273,-64.5404 81.54749,-70.18258 80.34515,-69.93493 80.25927,-70.12061 80.18999,-72.38819 80.21512,-71.85825 80.10623,-72.32915 80.05468,-70.47473 80.08865,-71.42247 79.92927,-70.86974 79.88396,-71.466 79.72487,-74.90097 79.83525,-73.34926 79.76772,-73.20783 79.5224,-75.04905 79.3689,-77.13725 79.53192,-75.87103 79.34179,-78.06289 79.35041,-74.44998 79.22299,-74.80547 79.18172,-74.40408 79.0501,-74.58818 79.0128,-77.80033 79.20516,-76.06375 79.10049,-77.92059 78.93435,-76.6906 79.02704,-74.76842 78.8231,-74.82314 78.63535,-74.5952 78.58634,-76.08208 78.48222,-75.0192 78.32892,-76.9058 78.2081,-75.5974 78.12601,-75.88023 77.95909,-78.40002 77.89891,-77.70501 77.59546,-78.32793 77.3707,-80.04715 77.27242,-81.67703 77.50965,-81.15198 77.32565,-82.20728 77.29278,-79.25259 77.21534,-78.9769 77.09658,-79.40788 76.93426,-78.73836 76.81586,-78.08983 77.01528,-77.78216 76.67222,-78.37595 76.45074,-78.80261 76.56828,-79.28024 76.30032,-81.062 76.13159,-80.76167 76.41681,-82.12399 76.53411,-82.7785 76.37616,-83.32237 76.6605,-83.1523 76.41804,-84.16161 76.50052,-85.03056 76.58186,-84.93646 76.41294,-84.44161 76.29757,-86.51313 76.48375,-86.6992 76.34439,-87.48347 76.53522,-87.39763 76.35128,-88.32666 76.38331,-88.62944 76.74287,-88.59683 76.39921,-88.61871 76.55583,-88.87518 76.40685,-89.65209 76.57175,-89.36512 76.72707,-89.527 76.84896,-88.53726 77.09458,-86.6113 77.17514,-87.22311 77.20002,-86.83426 77.35864,-87.71595 77.35564,-87.62704 77.48835,-88.22834 77.65956,-88.09078 77.8112,-88.22313 77.85532,-86.43169 77.83761,-85.9655 77.70631,-85.81355 77.4166,-84.52551 77.29169,-83.45089 77.3484,-83.83093 77.45205,-82.31645 78.07549,-83.89857 77.4861,-84.78098 77.51653,-85.69016 77.92947,-85.04745 78.05666,-84.7672 78.33941,-85.47997 78.09577,-86.25645 78.06469,-85.98499 78.30396,-87.51965 78.14028,-87.06882 78.20117,-87.49977 78.2126,-87.52731 78.3978,-86.64781 78.79836,-85.08517 78.92099,-82.34089 78.56297,-83.25671 78.84543,-81.64313 78.87885,-81.69907 79.02681,-82.52604 78.8878,-84.72626 79.02741,-83.5361 79.04611,-84.31136 79.18882,-85.13403 79.63984,-86.42596 79.76492,-86.20876 80,-86.66797 80.11884,-86.52673 80.29913,-83.7102 80.22907,-81.63425 79.62585,-80.72512 79.57033,-79.82093 79.67067,-81.50503 79.71058,-81.60435 79.95574,-83.23376 80.32454,-78.10284 80.56483,-80.00912 80.61169,-76.49068 80.87172,-79.00092 80.88163,-78.48402 81.14967,-79.51657 81.1863,-79.08438 81.07983,-79.67983 80.81194,-82.83002 80.54086,-83.10314 80.64513,-81.95412 80.83327,-83.39065 80.67726,-83.60751 80.73712,-83.26122 80.8364,-83.81535 80.73138,-83.70388 80.62372,-83.89657 80.5345,-86.76152 80.59388,-85.1004 81.02583,-82.439 81.14494,-85.70877 81.04475,-87.2154 80.62939,-89.45199 80.91177,-85.81654 81.06989,-84.70577 81.28954,-89.89796 81.01438,-90.28654 81.19711,-88.93315 81.2404,-89.95764 81.33448,-87.26992 81.48882,-88.32804 81.5751,-90.37183 81.3601,-90.85586 81.44466,-89.54535 81.62343,-91.93626 81.60668,-89.43023 81.86319,-89.16425 81.89041,-88.07726 82.1021,-86.81657 81.88404,-87.20064 81.95573,-86.89404 82.05154,-84.55436 81.87737,-86.90459 82.20691,-85.35464 82.27622,-85.90762 82.43342,-85.05518 82.47912,-83.24208 82.27635,-82.94586 82.11465,-83.11445 82.05093,-81.86156 82.03364,-82.67325 82.09366,-83.04297 82.24312,-82.66504 82.28036,-79.18816 81.81364,-82.65868 82.35561,-81.48357 82.49612,-82.33184 82.65824,-80.58206 82.54477,-81.56808 82.81128,-78.4994 82.67706,-80.41549 82.89111,-78.21884 82.92164)),((-115.889 70.58663,-115.9213 70.58358,-117.3928 70.57552,-118.4141 70.97755,-115.0394 71.53217,-118.0037 71.37566,-118.3046 71.47005,-117.6824 71.67742,-119.0677 71.66673,-118.9016 72.00014,-118.0794 72.2395,-118.5272 72.47167,-117.3195 72.91604,-114.4975 73.3735,-113.9659 73.19157,-113.9266 72.8232,-114.5675 72.56354,-113.4109 72.66671,-113.5778 72.78152,-113.3351 72.9239,-112.7751 72.98914,-111.1852 72.72295,-111.8815 72.34852,-111.6416 72.27831,-110.6734 72.57294,-109.7544 72.48132,-110.2889 72.66492,-109.7281 72.71794,-110.7158 72.95969,-109.8896 72.97004,-109.0414 72.74606,-108.9994 72.57632,-108.6499 72.61827,-108.3088 71.95184,-108.2493 71.72901,-107.8196 71.59888,-107.2729 71.81002,-107.745 72.13743,-107.7419 72.44971,-108.2495 73.1192,-107.8557 73.19763,-108.0323 73.33786,-107.0136 73.16711,-106.7366 73.29471,-105.7541 73.02531,-105.3079 72.77396,-105.4405 72.69564,-104.8595 71.90244,-104.3373 71.5966,-104.2965 71.35611,-104.6378 71.12718,-104.467 71.0178,-103.5301 70.58863,-102.8773 70.51989,-103.0135 70.68827,-101.5238 70.27505,-101.513 70.11826,-100.9896 70.20097,-100.9389 69.6757,-101.306 69.68413,-101.426 69.94554,-101.6529 69.65686,-102.0418 69.96184,-102.6674 69.77826,-102.5247 69.55721,-103.5191 69.71607,-102.998 69.50344,-103.1761 69.1096,-102.2952 69.52513,-101.9606 69.45929,-102.2133 69.22322,-101.8816 69.27496,-101.7105 69.16019,-101.8064 69.00326,-103.4189 68.78451,-105.1251 68.89618,-105.2497 68.96227,-105.0364 69.11478,-106.3912 69.17584,-106.3174 69.40505,-106.5876 69.49583,-107.394 69.00006,-108.6159 68.94643,-109.008 68.73111,-113.249 68.46378,-113.0002 68.50129,-113.6694 68.8159,-113.5098 69.0479,-113.7039 69.17502,-113.3577 69.17022,-116.4922 69.40429,-117.4044 69.98692,-114.4643 70.32364,-113.0599 70.2579,-111.4187 70.28149,-113.1825 70.64858,-115.889 70.58663)),((-125.8087 71.96925,-125.6623 72.24694,-124.945 72.56747,-125.1259 72.86475,-124.4371 72.94443,-124.8599 73.09658,-123.7468 73.74931,-124.7759 74.3413,-121.5336 74.55783,-119.6624 74.2401,-119.7426 74.08933,-119.0857 74.20992,-119.1032 73.99854,-118.6827 74.21912,-117.3895 74.22612,-115.2924 73.47508,-119.1118 72.64126,-119.2926 72.35822,-120.1916 72.22433,-120.4923 71.54838,-121.6489 71.467,-122.7868 71.08147,-123.1324 71.07635,-123.8882 71.62217,-124.9756 71.96917,-125.8087 71.96925)),((-95.28692 79.39037,-95.75322 79.5338,-94.3553 79.73173,-95.90239 79.64828,-96.63701 79.88033,-96.19211 79.92563,-96.77585 80.11426,-94.41689 80,-94.82084 80.08522,-94.13364 80.18353,-95.33544 80.11375,-95.72933 80.16805,-95.23328 80.23992,-96.68804 80.32957,-95.42737 80.33196,-96.01642 80.57446,-93.80067 80.52017,-94.6378 80.63337,-94.07425 80.70803,-95.55109 80.81165,-94.91594 81.06079,-93.14418 81.09074,-94.4138 81.24529,-93.5499 81.37808,-91.94349 81.18396,-90.64766 80.66457,-90.80362 80.56241,-89.1516 80.48819,-89.25385 80.28371,-88.80341 80.12624,-88.15274 80.09095,-88.67461 80.38012,-87.67182 80.4045,-87.59848 80.1795,-88.10257 80.12238,-86.92981 79.91436,-87.43255 79.52859,-85.71525 79.61685,-84.87173 79.26627,-86.99045 79.00459,-87.631 78.63861,-88.00384 78.81849,-87.85184 78.99393,-88.15856 78.9951,-88.10004 78.68119,-88.3649 78.65678,-87.88045 78.55022,-88.80582 78.60519,-88.53542 78.40003,-88.76309 78.16548,-89.9757 78.61337,-89.98823 78.44056,-89.44247 78.16383,-90.24413 78.32991,-90.36476 78.13975,-92.04947 78.19861,-92.9905 78.46867,-91.66324 78.56687,-93.29565 78.5795,-93.8218 78.77015,-93.03194 78.76058,-94.31303 78.98423,-90.73074 79.21729,-92.67965 79.24677,-92.03334 79.31987,-92.57191 79.36167,-92.40664 79.4584,-93.89309 79.26102,-94.25693 79.269,-93.8457 79.39278,-95.28692 79.39037)),((-93.66617 76.31744,-95.38068 76.22718,-94.79523 76.31176,-96.01771 76.43835,-95.58642 76.60562,-96.97273 76.73431,-96.29507 76.75084,-96.88541 76.8877,-96.39894 77.03138,-93.66167 76.91317,-93.16849 76.6875,-93.58891 76.40901,-93.08839 76.6175,-90.97179 76.65202,-90.47386 76.4669,-91.47205 76.45285,-89.18552 76.24635,-91.2552 76.20045,-90.17542 76.05952,-91.06971 75.98694,-89.9257 76.00296,-89.67242 75.88994,-89.78615 75.82259,-89.14975 75.7637,-89.61891 75.5919,-88.92911 75.42723,-88.74319 75.46922,-88.92245 75.60801,-88.77006 75.68279,-88.2169 75.47022,-87.25645 75.61971,-86.5491 75.36033,-84.00972 75.82653,-81.14612 75.77444,-81.29681 75.65229,-79.94899 75.54095,-80.37007 75.45737,-79.59146 75.45626,-79.5165 75.22341,-80.38149 75.01198,-79.34235 74.90208,-80.13854 74.82835,-80.22821 74.58066,-81.76391 74.45975,-82.91736 74.54771,-83.13682 74.68607,-83.03831 74.78471,-83.5195 74.90494,-83.31522 74.78365,-83.45635 74.58792,-84.33047 74.50565,-88.52671 74.50082,-88.46043 74.83031,-89.95404 74.52961,-91.02074 74.70282,-90.77345 74.88528,-91.24744 74.72467,-91.12663 74.62379,-91.68652 74.66655,-92.08322 74.80037,-92.25178 75.07192,-92.01342 75.10683,-92.50685 75.21716,-91.9998 75.58788,-92.10532 75.84956,-93.10067 76.36113,-93.66617 76.31744)),((-114.6135 76.49503,-114.1142 76.45985,-113.9364 76.19453,-112.41 76.17935,-111.6833 75.91943,-112.2164 75.81367,-111.4524 75.84389,-111.6004 75.81333,-111.1927 75.51975,-108.8824 75.49506,-109.0482 75.55017,-108.7903 75.61606,-108.9359 75.71562,-110.0475 75.89345,-109.2848 76.11606,-110.3962 76.35431,-108.7621 76.85413,-108.3874 76.71373,-108.6982 76.63172,-108.4308 76.45741,-108.5729 76.41981,-108.0436 76.27857,-108.4069 76.05711,-107.5779 75.99464,-108.0144 75.79916,-107.1596 75.91136,-106.8315 75.74928,-106.8453 75.96951,-106.5292 76.06738,-105.5656 75.93438,-105.3574 75.70488,-105.978 75.0566,-107.2019 74.90942,-108.7921 75.07056,-111.6422 74.49593,-113.7321 74.45879,-114.4203 74.69292,-110.8892 75.24522,-113.904 75.05511,-113.803 75.31914,-113.4144 75.40354,-113.969 75.45659,-114.1472 75.2187,-114.5775 75.28445,-114.2679 75.16927,-114.4351 75.06018,-115.0261 74.96368,-115.1924 75.15763,-115.6317 74.97385,-117.6455 75.24136,-117.2312 75.47394,-115.0966 75.68168,-117.1967 75.62082,-116.8765 75.79301,-114.7837 75.88906,-116.7147 75.94344,-116.2126 76.19572,-114.7537 76.15921,-115.8997 76.2944,-114.6135 76.49503)),((-55.44404 51.58365,-55.4326 51.58027,-55.5969 51.29137,-56.10115 51.33297,-55.73158 51.08476,-56.10166 50.72316,-56.26801 50.90702,-56.11395 50.68027,-56.93342 49.75192,-56.8783 49.54273,-56.17007 50.15922,-56.21636 49.9232,-55.47989 49.93903,-56.14408 49.69951,-55.85424 49.68897,-56.15487 49.43364,-55.86262 49.52855,-55.84081 49.52995,-55.58894 49.35817,-55.37278 49.49757,-55.32841 49.30363,-55.33704 49.53623,-55.16536 49.54324,-55.40467 49.02972,-55.09302 49.36482,-54.84505 49.27137,-54.48226 49.56157,-54.50583 49.25902,-54.07175 49.47976,-53.4707 49.25561,-54.21347 48.80299,-53.62544 48.67721,-54.17765 48.32138,-53.09331 48.69846,-53.21389 48.34719,-53.91626 48.20112,-53.68586 48.06111,-53.96464 48.02412,-53.61985 48.05275,-53.80253 47.7766,-53.95328 47.85228,-53.57186 47.51991,-53.31205 48.00767,-52.95582 48.17287,-53.29047 47.55246,-53.13834 47.38634,-52.80329 47.80859,-52.64447 47.48319,-53.08944 46.6579,-53.60677 46.62273,-53.47222 46.92605,-53.67341 46.79184,-53.52193 46.98066,-53.66781 46.98998,-53.42197 47.17445,-53.56766 47.2167,-54.21088 46.8266,-53.94937 47.25647,-53.82467 47.41979,-53.99689 47.84999,-54.26308 47.89309,-54.53639 47.36339,-54.44463 47.61906,-55.03042 47.29905,-55.24796 46.94365,-55.75948 46.85016,-55.9784 46.91144,-55.88858 47.07108,-54.71167 47.67662,-55.09277 47.58831,-54.95506 47.82676,-55.13145 47.5785,-55.45256 47.73324,-55.60019 47.40506,-55.594 47.57989,-55.79186 47.45405,-55.7294 47.59403,-55.94818 47.43754,-55.73753 47.61982,-56.20146 47.49802,-55.63186 47.68585,-55.94214 47.66389,-55.70917 47.84666,-55.82762 47.78187,-55.79615 47.96793,-56.08405 47.70133,-56.18154 47.87655,-56.18046 47.63899,-56.33353 47.79474,-56.34861 47.62332,-56.59422 47.72938,-56.86762 47.53006,-57.35616 47.59049,-57.28368 47.79088,-57.66433 47.60018,-58.37325 47.65689,-58.30404 47.83659,-58.4523 47.63932,-59.17863 47.56621,-59.33823 47.76829,-59.20108 47.84533,-59.42296 47.89811,-58.27771 48.51521,-59.27374 48.47411,-58.77071 48.79154,-58.97612 48.63134,-58.72421 48.56585,-58.37832 49.14985,-57.90567 48.96194,-58.159 49.1262,-57.85661 49.18168,-58.26513 49.31696,-57.99674 49.56305,-57.70984 49.45825,-57.95457 49.71981,-57.68588 49.8152,-57.83928 49.87178,-57.72901 50.02878,-57.5606 49.96894,-57.71574 50.03712,-57.38418 50.6031,-57.16484 50.62692,-57.41575 50.70292,-56.91735 50.91714,-57.09678 51.01417,-55.89953 51.62365,-55.87514 51.48588,-55.44404 51.58365)),((-100.3596 73.04686,-100.5803 73.13932,-100.0775 73.24992,-100.2528 73.36347,-100.9023 73.26672,-101.6123 73.49319,-100.8867 73.6045,-100.5023 73.44476,-101.1139 73.73214,-99.97006 73.86244,-99.14591 73.71965,-97.74977 73.9146,-96.93948 73.74376,-97.69877 73.54209,-97.14444 73.35522,-98.46268 72.94925,-97.27831 72.96775,-96.99818 72.73577,-97.16058 72.59673,-96.52769 72.7569,-96.26806 72.41817,-96.65742 72.30659,-96.48296 72.08056,-96.79437 72.0342,-96.4705 72.04293,-96.72942 71.93219,-96.47157 71.9019,-97.4699 71.62492,-98.19818 71.66496,-98.3549 71.7491,-98.26153 71.91393,-98.48737 71.73279,-98.03844 71.53691,-98.7037 71.29412,-99.21357 71.36636,-99.66158 71.77973,-100.6107 72.18274,-101.7709 72.29401,-102.667 72.6911,-102.4968 73.02608,-102.226 73.08919,-101.0228 72.68896,-100.3574 72.75401,-100.3596 73.04686),(-100.3474 73.04176,-100.3596 73.04686,-100.3474 73.04176)),((-81.70731 64,-80.91866 63.97554,-80.91128 64.12295,-80.16556 63.77902,-80.94607 63.45272,-82.49277 63.65388,-82.37766 63.89502,-83.1445 63.96342,-82.93239 64.13009,-83.07295 64.17784,-83.52847 64.09938,-83.60788 63.76587,-84.32889 63.64917,-84.58969 63.29171,-85.21426 63.10679,-85.62169 63.18608,-85.72366 63.75062,-87.22533 63.6236,-86.88599 63.91625,-86.17583 64.08778,-86.39319 64.59123,-86.12334 64.92238,-86.13552 65.37819,-85.98971 65.72063,-85.50563 65.92618,-85.12806 65.76254,-85.02874 65.60645,-85.27735 65.54351,-84.90495 65.21867,-84.46874 65.4763,-84.11322 65.20351,-82.06982 64.67999,-81.57458 64.17074,-82.00568 63.98642,-81.70731 64)),((-121.0107 76.72556,-119.1347 77.32504,-117.0149 77.29802,-116.6348 77.38058,-117.1371 77.46053,-116.4475 77.55468,-115.8085 77.43672,-115.3387 77.31261,-116.3861 77.13911,-115.7071 76.94897,-116.3513 76.93018,-115.8677 76.69632,-116.9791 76.55445,-116.9252 76.34593,-117.2947 76.26073,-118.0413 76.41172,-117.6718 76.79664,-117.8385 76.82454,-118.9575 76.4925,-118.525 76.33567,-119.0576 76.08981,-119.6421 76.30684,-119.5319 76.12275,-119.8086 76.11209,-119.4669 76.00433,-119.93 75.84935,-120.4798 75.84409,-120.3795 75.97098,-120.6901 76.17645,-121.0216 76.13933,-120.9102 75.95237,-121.9324 76.04081,-122.336 75.86236,-122.6824 75.90397,-122.4467 76.11012,-122.7076 76.11095,-122.5226 76.15247,-123.0161 76.08469,-121.0107 76.72556)),((-105.1586 79.30178,-103.7424 79.36445,-102.8461 79.23532,-102.5552 78.86649,-101.828 79.09044,-100.9575 78.93713,-101.1908 78.80036,-100.3537 78.83057,-99.48936 78.58512,-99.87401 78.437,-99.78429 78.30857,-98.93371 78.06564,-99.16809 77.83713,-99.86404 77.78113,-101.4223 78.24182,-104.4142 78.26242,-105.0166 78.50164,-103.5089 78.50601,-104.0261 78.62614,-103.2993 78.7318,-104.1984 78.77067,-103.8276 78.89189,-104.116 78.98296,-105 78.8004,-104.6866 79.02872,-105.5995 79.04113,-105.4521 79.31616,-105.1586 79.30178)),((-80.44704 73.76917,-77.18826 73.51052,-76.05467 72.86659,-79.57581 72.75642,-79.99072 72.86674,-80.14294 73.22936,-80.87289 73.33891,-80.6675 73.48636,-80.86597 73.54835,-80.84087 73.75405,-80.44704 73.76917)),((-97.39048 69.74936,-97.38435 69.58893,-97.25945 69.71603,-96.16931 69.30539,-96.19154 69.05175,-96.02063 69.25146,-95.83115 68.88921,-95.15894 68.86887,-96.55254 68.46024,-99.00421 68.98675,-99.41324 68.90578,-99.55091 69.0242,-99.42316 69.15947,-98.3606 69.31322,-98.53972 69.60056,-97.97608 69.45921,-98.34217 69.61686,-98.02473 69.89651,-97.39048 69.74936)),((-94.86588 75.63734,-93.47375 75.26369,-93.49271 74.67515,-94.69352 74.6368,-96.62096 74.9932,-95.83369 75.38332,-96.11623 75.41741,-94.86588 75.63734)),((-97.08665 78.74478,-94.90963 78.3925,-95.43842 78.23148,-94.90225 78.05894,-97.11317 77.80251,-97.00982 77.91842,-97.78322 78.03239,-96.86756 78.13365,-97.94586 78.22214,-98.42702 78.50209,-98.04858 78.54016,-98.36926 78.64945,-98.19228 78.81236,-97.08665 78.74478)),((-76.15875 68.29661,-75.01726 68.16608,-75.18965 67.44036,-76.68964 67.21204,-77.22475 67.4487,-77.29158 67.72925,-76.95683 68.09101,-76.15875 68.29661)),((-110 78.11423,-109.5455 78.07095,-109.6608 77.95975,-110.8944 77.85726,-110.0441 77.77026,-110.0552 77.55623,-110.8692 77.40376,-112.446 77.36959,-113.1771 77.52224,-113.295 77.79411,-110 78.11423)),((-105.6061 73.74528,-104.4451 73.5416,-104.6989 73.18212,-105.329 72.95405,-105.2274 72.84553,-107.0025 73.46478,-106.5391 73.70525,-105.6061 73.74528)),((-61.10395 45.86626,-60.98792 45.896,-61.18234 45.71735,-60.74851 45.69591,-60.36687 46.03772,-60.79776 45.96835,-60.30617 46.34115,-60.23168 46.12446,-60.14308 46.27293,-59.82699 46.18876,-59.97815 46.03874,-59.79653 45.95888,-60.69664 45.57153,-61.47034 45.7119,-61.56363 46.04674,-60.6249 47.04205,-60.31112 46.85195,-60.62605 46.30775,-60.43114 46.3012,-61.10395 45.86626)),((-82.23849 62.98935,-81.87467 62.91627,-81.96534 62.71027,-83.0777 62.19095,-83.72654 62.1414,-83.95488 62.42193,-83.40041 62.91168,-82.23849 62.98935)),((-110.5032 78.75322,-109.345 78.55119,-109.3792 78.3116,-113.311 78.33614,-110.5032 78.75322)),((-132.288315 53.883864,-131.651 54.17406,-131.9917 53.24614,-132.5516 53.16835,-132.7175 53.37475,-132.4153 53.33472,-132.8793 53.46403,-132.9993 53.58939,-132.8162 53.59877,-133.1197 53.79421,-133.0788 54.17796,-132.5762 54.11937,-132.6656 53.9416,-132.288315 53.883864),(-132.288315 53.883864,-132.6007 53.67896,-132.2029 53.64992,-132.288315 53.883864)),((-64.259 49.93024,-63.02747 49.74916,-61.67597 49.13903,-63.09779 49.22566,-64.52284 49.8563,-64.259 49.93024)),((-95.64572 77.77436,-93.0817 77.65719,-93.56934 77.43945,-95.83035 77.46099,-96.32771 77.60239,-95.64572 77.77436)),((-64.04024 46.81315,-63.78946 46.43246,-63.67956 46.56305,-62.00592 46.43046,-62.37192 46.35469,-62.47074 45.99583,-62.74481 45.94678,-63.04512 46.05301,-62.94532 46.18764,-64.13857 46.40082,-64.07374 46.63958,-64.41815 46.6964,-64.00209 47.06044,-64.04024 46.81315)),((-79.51006 62.38774,-79.27594 62.25226,-79.30566 62.03133,-79.68618 61.61192,-80.21782 61.79719,-80.15578 62.21481,-79.51006 62.38774)),((-100.1189 80.07204,-99.06607 80.12096,-98.61731 79.78414,-98.86556 79.66654,-100.1389 79.8886,-100.1189 80.07204)),((-90.68183 77.63753,-89.61872 77.34636,-90.12687 77.19375,-91.00766 77.31806,-91.21661 77.39095,-91.19773 77.61466,-90.68183 77.63753)),((-106.0845 77.72585,-105.3773 77.68713,-104.3446 77.20498,-105.2242 77.16346,-106.0845 77.72585)),((-131.8326 52.76128,-131.6513 52.64225,-131.578 52.57734,-131.5681 52.58758,-131.2701 52.39184,-130.9977 52.21292,-131.3113 52.14302,-132.3584 52.92597,-132.1084 52.99276,-132.5754 53.08485,-131.8176 53.2578,-131.6113 53.02746,-132.0342 53.05184,-132.0078 52.87566,-131.6546 52.80917,-131.8326 52.76128)),((-83.21934 45.90654,-82.81844 45.97336,-82.50106 45.93995,-82.30061 45.97336,-81.91641 45.97336,-81.66586 45.87313,-81.59904 45.7729,-81.8329 45.52234,-83.21934 45.90654)),((-117.9147 76.05423,-117.4379 76.0953,-118.1942 75.60087,-119.4035 75.61056,-117.9147 76.05423)),((-103.9791 76.66074,-102.9782 76.44084,-104.3343 76.32127,-104.6535 76.59309,-103.9791 76.66074)),((-80.7123 52.6667,-82.05449 53.00809,-81.12334 53.19252,-80.7123 52.6667)),((-79.54195 56.35642,-79.64982 56.08871,-79.41074 56.21439,-79.25873 56.63018,-78.88442 56.3097,-79.21809 55.85867,-79.09661 56.17562,-79.28216 55.85057,-79.13679 56.24207,-79.77939 55.78228,-79.52313 56.1321,-80.01978 55.89064,-79.54195 56.35642)),((-104.4838 75.40555,-103.8135 75.36451,-103.566 75.15903,-104.901 75.11866,-104.4838 75.40555)),((-78.51458 69.37903,-78.2131 69.292,-78.81708 68.91957,-79.41299 68.92709,-78.51458 69.37903)),((-74.19186 68.06091,-73.3419 67.83739,-74.53516 67.8036,-74.73551 68.06971,-74.19186 68.06091)),((-103.5498 76.27102,-102.4898 76.22243,-104.0738 76.04157,-104.4739 76.15718,-103.5498 76.27102)),((-114.7149 78.01527,-113.5412 77.81602,-114.2781 77.70486,-115.0804 77.94741,-114.7149 78.01527)),((-83.49369 65.64431,-84.11653 65.76234,-84.44608 66.13903,-83.17697 65.7152,-83.49369 65.64431)),((-86.56913 67.73096,-86.8774 67.8383,-86.95509 68.08929,-86.64433 68.30429,-86.33833 67.96288,-86.56913 67.73096)),((-128.6203 52.64433,-128.6331 52.60083,-128.663 52.59994,-128.6587 52.96796,-128.7635 52.6622,-129.1064 52.7899,-128.8323 53.0186,-129.0335 53.1453,-128.8651 53.03324,-129.1555 52.91297,-129.0999 53.18269,-128.8908 53.15741,-129.0945 53.28085,-128.5809 53.10158,-128.6203 52.64433)),((-98.21187 74.08377,-97.62773 74.08408,-98.14412 73.87697,-99.42251 73.90974,-98.21187 74.08377)),((-77.93615 63.46016,-77.49979 63.25586,-77.90172 63.09409,-78.54987 63.43209,-77.93615 63.46016)),((-102.0781 77.89989,-100.9005 77.73255,-102.0684 77.68039,-102.5163 77.7951,-102.0781 77.89989)),((15 68.85033,15.18499 69.018,15.42047 68.69589,15.0307 68.58096,14.78566 68.63544,15.14075 68.75703,14.36213 68.68958,15 68.85033)),((-76.90292 69.13343,-77.2617 69.15147,-77.34589 69.41108,-76.62164 69.39293,-76.90292 69.13343)),((-89.97798 76.8335,-89.70205 76.74338,-89.86703 76.61037,-89.75213 76.48647,-90.59743 76.74278,-89.97798 76.8335)),((-79.89297 69.74661,-79.32712 69.71213,-80.0573 69.64728,-80.00326 69.50011,-80.79765 69.69173,-79.89297 69.74661)),((-96.39507 75.55894,-96.80199 75.35555,-97.00984 75.46007,-96.31741 75.65868,-95.89586 75.57114,-96.12702 75.45913,-96.39507 75.55894)),((-75 68.67595,-74.8159 68.32607,-75.41213 68.53321,-75.25972 68.73127,-75 68.67595)),((-70.7037 62.8194,-70.17082 62.57511,-70.72129 62.55348,-70.89168 62.74303,-70.72816 62.77382,-71.21359 62.88121,-70.7037 62.8194)),((-64.93053 61.38405,-65.36399 61.55415,-64.70109 61.65086,-64.69028 61.41737,-64.93215 61.38279,-64.93053 61.38405)),((-85 66.0283,-84.55311 65.62383,-85.09306 65.74715,-85.15245 65.99585,-85 66.0283)),((-95.64018 69.53109,-95.9819 69.37371,-95.75641 69.63994,-95.34595 69.53842,-95.4462 69.36023,-95.72784 69.34947,-95.64018 69.53109)),((14.00136 53.85646,14.21288 53.86478,14.61713 53.84257,14.59569 53.5862,14.26866 53.69652,14.00136 53.85646)),((-102.2676 75.85693,-103.3697 75.76891,-102.3377 75.97668,-101.9584 75.94601,-102.2676 75.85693),(-102.2676 75.85693,-102.0818 75.71381,-102.7488 75.54329,-99.74516 75.66617,-100.7641 75.34844,-99.9961 75.23863,-100.5225 75.19895,-100.352 75.02143,-97.61259 75.11184,-98.1182 75.30933,-97.71513 75.57128,-97.25871 75.39752,-97.34377 75.68047,-97.88178 75.74888,-97.5508 75.86652,-97.46065 76.12911,-97.77973 76.31064,-97.66137 76.4853,-97.9343 76.5348,-98.53603 76.64394,-98.99194 76.60647,-98.83964 76.45514,-99.13432 76.40003,-100.0986 76.63064,-100.9807 76.49335,-99.9974 76.31909,-100.4342 76.21346,-99.39694 76.16012,-100.2348 76.12991,-99.58926 75.9502,-100.1015 75.92552,-101.7448 76.45197,-102.1518 76.23331,-101.6289 76.19581,-101.9031 76.0715,-101.3837 75.97386,-101.5869 75.9278,-101.2336 75.74868,-102.2676 75.85693)),((-100.3537 68.71497,-100.6113 68.78229,-100.6234 69.00672,-100.1186 68.91708,-100.3537 68.71497)),((-114.3032 76.88794,-113.4422 76.79379,-114.7928 76.75331,-114.3032 76.88794)),((-86.90395 70,-87.35842 70.10717,-86.59954 70.12825,-86.46114 69.99886,-86.90395 70)),((-78.79624 76.09637,-79.17658 75.94893,-78.88606 75.84315,-79.75646 75.8801,-78.79624 76.09637)),((-68.29916 60.48855,-67.82848 60.4543,-68.37606 60.19724,-68.29916 60.48855)),((-101.8108 68.56733,-102.3373 68.70196,-101.7002 68.79801,-101.8108 68.56733)),((-96.11974 69.35888,-96.70444 69.5878,-96.15344 69.59132,-96.11974 69.35888)),((-94.67776 75.95028,-94.26967 75.77613,-94.7724 75.78065,-94.8555 75.9374,-94.67776 75.95028)),((-130.3716 53.97481,-130.7314 53.90911,-130.4101 54.09978,-130.2331 53.97351,-130.3377 53.82629,-130.51 53.86525,-130.3716 53.97481)),((-77.28457 63.61661,-76.55722 63.44897,-76.96491 63.39964,-77.28457 63.61661)),((-97.02837 73.14477,-96.53589 73.03647,-96.95092 72.92861,-97.02837 73.14477)),((-64.68192 62.52752,-64.33105 62.48555,-64.74749 62.37807,-64.93496 62.46457,-64.68192 62.52752)),((-78.85395 56.2775,-78.66767 56.43111,-78.67776 56.17233,-78.9437 56.09877,-78.85395 56.2775)),((-78.42086 69.64282,-77.9381 69.64768,-78.82248 69.46201,-78.42086 69.64282)),((-61.61547 56.80928,-61.34424 56.92664,-61.52321 56.78513,-61.38586 56.60259,-61.7158 56.66525,-61.61547 56.80928)),((-78.80299 68.44616,-78.94846 68.53028,-78.67225 68.59492,-78.89185 68.66534,-78.45854 68.62782,-78.80299 68.44616)),((-64.4236 63.65214,-64.01153 63.28265,-64.3213 63.37569,-64.4236 63.65214)),((-101.2149 69.37138,-101.3336 69.58816,-100.9299 69.48144,-101.2149 69.37138)))
+MULTIPOLYGON(((15.50748 7.527468,15.97481 7.483338,16.59592 7.88019,16.84385 7.529787,17.67167 7.982768,18.61805 8.052467,19.12222 8.671246,18.86246 8.852613,19.02328 8.995074,20.43423 9.153878,21.67271 10.23371,21.83262 10.83948,22.88134 10.9309,23.66824 9.891512,23.52011 8.726969,24.25266 8.711761,24.20358 8.303996,24.86475 8.180498,25.18009 7.902913,25.20037 7.488982,26.41443 6.643824,26.28659 6.46246,26.45115 6.085776,27.16044 5.767366,27.46342 5.016153,27.14294 5.204216,26.50912 5.043906,25.54606 5.386098,25.08842 4.937803,24.39604 5.112711,23.42093 4.588927,22.90667 4.817867,22.55044 4.21542,22.26635 4.114358,20.60624 4.403446,19.8252 5.09344,19.42282 5.128375,18.54905 4.316255,18.6351 3.471089,18.48676 3.653269,18.189 3.481166,17.47406 3.703082,16.66285 3.537679,16.19199 2.220514,16.03593 2.974406,15.24779 3.713966,15.09312 4.292163,14.73201 4.60929,14.52787 5.278019,14.62132 5.896153,14.42192 6.031818,14.75068 6.261004,15.50748 7.527468)))
+MULTIPOLYGON(((16.19199 2.220514,16.66285 3.537679,17.47406 3.703082,18.189 3.481166,18.48676 3.653269,18.6351 3.471089,18.09457 2.23824,17.70007 -0.567603,16.8458 -1.263571,16.20089 -2.197611,16.22239 -3.296272,15.91541 -3.934902,15.5615 -4.04695,14.69051 -4.917224,14.41206 -4.893814,14.40724 -4.279238,13.73834 -4.44858,13.7292 -4.709084,13.43464 -4.919622,13.1025 -4.646508,12.75132 -4.372592,12.01273 -5.028313,11.20501 -3.978806,11.52937 -3.512756,11.88431 -3.747393,12.04545 -3.352566,12.06658 -2.969432,11.61747 -2.789746,11.60872 -2.322756,12.50287 -2.422352,12.44544 -1.869991,12.73326 -1.864831,13.04093 -2.333772,13.5031 -2.431169,13.75816 -2.113381,14.08302 -2.481633,14.39857 -1.875691,14.49294 -0.615902,13.89537 -0.212169,13.88868 0.202671,14.50007 0.898546,14.18722 1.39562,13.15633 1.234311,13.29897 2.170563,14.58318 2.211797,15.75006 1.915821,16.05783 1.652548,16.19199 2.220514)))
+MULTIPOLYGON(((7.58092 47.58238,8.595754 47.60012,8.413456 47.67541,8.595241 47.80518,9.544334 47.54256,9.672874 47.38769,9.535914 47.27354,9.603659 47.06155,10.47005 46.86188,10.45701 46.54151,10.05119 46.53883,10.13348 46.23097,9.283881 46.49617,9.016438 45.82587,8.451571 46.25948,8.442933 46.46386,7.859254 45.93451,7.03618 45.93694,6.776672 46.15083,6.775381 46.4403,5.957461 46.20375,6.428569 46.92942,7.051111 47.33619,6.874169 47.359,6.985055 47.50213,7.58092 47.58238)),((110.0041 19.93149,110.381 20.08842,110.6242 19.92804,110.6848 20.15647,110.9279 20.01449,111.0378 19.64333,110.7916 19.61385,110.4854 19.1696,110.5375 18.78081,109.5727 18.16126,108.7089 18.49626,108.6841 19.37382,109.3029 19.71653,109.1573 19.78983,109.2924 19.91909,110.0041 19.93149)))
+MULTIPOLYGON(((-7.978548 10.17511,-7.641548 10.48812,-7.030167 10.16143,-6.947465 10.36964,-6.672197 10.36513,-6.642263 10.67225,-6.444196 10.56543,-6.256417 10.73664,-6.172732 10.22263,-5.518916 10.43326,-5.152773 10.32246,-4.6924 9.677105,-4.318694 9.599602,-3.900427 9.900578,-3.209423 9.924427,-2.689926 9.488792,-2.779666 9.055429,-2.494897 8.205227,-2.780885 7.949609,-3.25542 6.618508,-2.727679 5.137735,-3.110742 5.094452,-3.98789 5.246169,-6.088667 4.986833,-6.093508 4.988578,-6.101426 4.972904,-6.098122 4.968613,-7.527073 4.357078,-7.422362 5.843457,-7.758396 5.953354,-7.901638 6.27985,-8.599302 6.505595,-8.27361 7.006707,-8.472179 7.554582,-8.193576 7.545011,-7.945582 8.012988,-8.243995 8.228629,-8.240768 8.460761,-7.641071 8.377432,-7.961311 8.810396,-7.736526 9.078054,-7.919881 9.186895,-7.849985 9.437742,-8.149226 9.532056,-7.978548 10.17511)))
+MULTIPOLYGON(((-73.24222 -44.91862,-73.40647 -44.57259,-72.91604 -44.45549,-72.69938 -44.52677,-72.9793 -44.58108,-72.85447 -44.70382,-72.57278 -44.50288,-73.28896 -44.16524,-72.88111 -43.61763,-73.09241 -43.43901,-72.70744 -42.94301,-72.82127 -42.53,-72.52686 -42.5624,-72.83748 -42.30013,-72.58704 -42.19411,-72.39391 -42.4915,-72.43085 -41.97572,-72.87922 -41.91405,-72.58203 -41.7109,-72.97804 -41.48755,-73.17828 -41.77288,-73.19005 -41.76506,-73.75925 -41.74515,-73.65451 -41.61227,-73.94408 -40.97664,-73.71321 -40.0069,-73.37312 -39.93909,-73.21568 -39.38827,-73.68263 -37.33414,-73.58519 -37.15131,-73.1984 -37.17437,-73.21659 -36.77448,-73.11427 -36.61233,-72.99512 -36.73359,-72.63081 -35.57739,-72.19292 -35.08144,-72.01015 -34.12406,-71.60082 -33.53947,-71.75748 -33.10215,-71.56316 -33.00626,-71.41867 -32.40774,-71.71597 -30.59923,-71.27634 -29.92492,-71.51958 -28.90519,-70.90517 -27.62399,-70.9698 -27.16887,-70.62814 -26.33661,-70.7312 -25.78265,-70.45029 -25.36307,-70.57887 -24.54476,-70.39381 -23.57468,-70.62499 -23.50621,-70.5786 -23.08342,-70.28738 -22.91118,-70.05627 -21.43386,-70.37419 -18.34973,-69.94788 -18.24803,-69.799 -17.65035,-69.46265 -17.50755,-69.06861 -18.0672,-68.95712 -18.94081,-68.40726 -19.4076,-68.69057 -19.73909,-68.52397 -19.92741,-68.78046 -20.08205,-68.75569 -20.39242,-68.43936 -20.6324,-68.54726 -20.87996,-68.17242 -21.29667,-67.87513 -22.8258,-67.1775 -22.80469,-66.98794 -22.9924,-67.33754 -24.0342,-68.39136 -24.47407,-68.56738 -24.74768,-68.35064 -25.10669,-68.58668 -25.20431,-68.39045 -26.19049,-68.5877 -26.50918,-68.27213 -26.9169,-68.83334 -27.04887,-69.11214 -27.89204,-69.64111 -28.37884,-69.7677 -29.12587,-70.00744 -29.35628,-69.8166 -30.21648,-70.50563 -31.14843,-70.53893 -31.60142,-70.20244 -31.97015,-70.38564 -32.05095,-69.99737 -32.9016,-70.02461 -33.31369,-69.88811 -33.22215,-69.74717 -33.40779,-69.81541 -34.22364,-70.04218 -34.28701,-70.36263 -35.14241,-70.57765 -35.25788,-70.32522 -35.81524,-70.42343 -36.15309,-71.03448 -36.46488,-71.1721 -36.84647,-71.20322 -37.6801,-70.83273 -38.57305,-71.42781 -38.92983,-71.48103 -39.59019,-71.71897 -39.6377,-71.58906 -39.89707,-71.83086 -40.22242,-71.65408 -40.36865,-71.94669 -40.73969,-71.72849 -42.11539,-72.12493 -42.30677,-72.13357 -43.01638,-71.73962 -43.17142,-71.93305 -43.45695,-71.58262 -43.66576,-71.83199 -44.38578,-71.11016 -44.52303,-71.30264 -44.80802,-72.06971 -44.76825,-71.29688 -45.29317,-71.75804 -45.56223,-71.59829 -45.97458,-71.89174 -46.14821,-71.64585 -46.68254,-71.92654 -46.80474,-71.84908 -47.21814,-72.32291 -47.43373,-72.52264 -47.90715,-72.2951 -48.35757,-72.59288 -48.47141,-72.54967 -48.79079,-73.57778 -49.54358,-73.42122 -49.79916,-73.52998 -50.14991,-73.15174 -50.76809,-72.27752 -50.65468,-72.43781 -51.56912,-71.93159 -51.99528,-70.01936 -51.99819,-69.22569 -52.20016,-69.66827 -52.54416,-70.87466 -52.73598,-70.73814 -52.78922,-70.96228 -53.78879,-71.28926 -53.9029,-72.09499 -53.69886,-72.46213 -53.37105,-72.12518 -53.24398,-72.21123 -53.44884,-71.84605 -53.22706,-71.77476 -53.39636,-71.18076 -52.81555,-71.55768 -52.56058,-72.89146 -52.54597,-73.224 -52.40874,-73.27116 -52.68798,-73.42886 -52.55856,-73.74389 -52.73709,-73.49429 -52.49295,-73.75943 -52.04823,-73.34671 -52.25334,-73.00555 -52.07181,-73.12071 -52.25046,-72.88005 -52.28546,-72.74142 -52.08661,-72.89774 -52.22314,-72.96014 -52.05955,-72.77599 -51.96296,-72.5561 -52.2006,-72.54461 -51.73154,-72.73412 -51.85456,-73.29729 -51.58558,-72.99676 -51.80307,-73.2192 -51.9045,-72.91719 -51.87162,-73.24245 -52.10829,-73.39974 -51.6473,-73.27306 -52.1795,-73.59254 -52.0226,-73.59838 -51.8209,-73.38865 -52.04894,-73.60086 -51.75854,-73.45644 -51.68519,-73.71201 -51.80508,-73.70057 -51.6314,-73.92886 -51.6269,-73.90192 -51.3739,-73.64915 -51.54033,-73.68168 -51.14441,-73.96539 -51.24696,-74.13271 -51.19484,-74.08409 -50.98714,-73.80587 -51.00838,-73.75912 -50.67272,-73.38177 -50.68794,-73.70744 -50.52204,-74.03259 -50.85655,-74.30185 -50.47522,-73.86702 -50.56458,-74.14629 -50.44449,-73.99896 -50.37909,-74.37437 -50.3815,-74.69939 -50.20422,-74.50559 -50.13492,-73.85388 -50.30098,-74.35324 -50.00921,-73.85291 -50.07529,-74.0193 -50,-73.81215 -49.92426,-74.31844 -49.8779,-74.03322 -49.70452,-74.32057 -49.6356,-73.66111 -49.72493,-74.09788 -49.5008,-74.03283 -49.26136,-73.80724 -49.39627,-74.0146 -49.0857,-74.17609 -49.53275,-74.41471 -49.39048,-74.4396 -48.80293,-74.21555 -48.72193,-74.398 -48.60426,-73.96749 -48.60841,-73.88055 -48.42785,-74.27049 -48.20767,-74.30189 -48.02039,-74.10533 -47.98394,-73.6392 -48.26558,-73.27496 -48.1613,-73.64219 -48.00723,-73.7389 -47.56316,-73.92386 -47.84189,-74.71735 -47.72752,-74.53532 -47.52084,-74.43063 -47.67564,-74.14397 -47.60229,-74.51471 -47.41999,-73.9994 -46.97364,-74.26679 -46.75634,-74.63155 -46.78896,-74.43808 -46.90854,-74.9826 -46.75982,-74.97445 -46.49957,-75.51554 -46.65548,-75.36787 -46.92783,-75.68734 -46.69662,-74.75882 -46.19981,-74.70323 -45.95214,-75.0369 -46.11666,-75.09542 -45.89167,-74.72708 -45.8178,-74.43388 -46.04555,-74.44651 -45.80548,-74.08889 -45.81993,-74.03127 -46.17208,-73.73959 -46.24218,-73.84178 -46.59807,-73.33689 -46.03957,-73.68448 -46.32694,-73.5238 -45.81584,-73.14986 -45.67418,-73.568 -45.78683,-73.2477 -45.31152,-73.44592 -45.25869,-73.24222 -44.91862),(-72.54461 -51.73154,-72.54829 -51.72915,-72.54461 -51.73154)),((-71.35474 -54.5994,-71.97408 -54.56209,-71.5046 -54.55263,-71.85047 -54.43521,-71.3925 -54.37399,-70.93102 -54.51526,-70.75761 -54.32531,-70.58414 -54.3419,-70.75538 -54.6323,-70.55784 -54.39291,-70.07841 -54.54856,-70.92416 -54.12815,-70.13144 -54.43351,-70.0624 -54.25214,-69.82415 -54.55326,-69.84899 -54.28506,-69.20483 -54.44539,-69.35909 -54.71305,-69.14237 -54.60218,-68.97376 -54.44665,-70 -54.11998,-70.18124 -53.83385,-69.324 -53.42673,-70.44344 -53.38099,-70.42791 -53.01678,-70.09575 -52.93019,-70.43166 -52.7706,-69.90105 -52.84027,-69.43363 -52.45683,-69.18389 -52.69351,-68.78374 -52.54082,-68.60475 -52.66537,-68.61058 -54.89589,-69.07925 -54.95971,-69.71315 -54.6919,-69.91203 -54.83395,-69.94449 -54.67878,-69.94819 -54.83685,-70.29298 -54.85793,-70.21593 -54.68373,-70.57233 -54.78673,-70.81266 -54.78963,-70.43372 -54.62704,-70.96526 -54.69347,-71.35474 -54.5994)),((-73.6098 -42.42853,-73.80442 -42.54289,-73.70382 -42.64185,-73.45917 -42.88253,-73.66968 -42.88434,-73.48232 -43.1521,-73.73986 -43.1456,-73.83492 -43.43195,-74.41708 -43.23071,-73.90768 -41.77277,-73.48137 -41.83194,-73.3356 -42.26742,-73.6098 -42.42853)),((-72.97182 -52.93457,-73.19514 -53.10455,-73.44852 -53.00926,-73.25968 -52.91945,-73.58219 -52.807,-72.89758 -52.5561,-73.01178 -52.74517,-72.68235 -52.66826,-72.88029 -52.80264,-72.5723 -52.82703,-72.1806 -52.63778,-71.40897 -52.72181,-72.03294 -53.13026,-72.60193 -53.07178,-72.20413 -53.18832,-72.52552 -53.27699,-72.60567 -53.37247,-72.38577 -53.53907,-72.53907 -53.55801,-73.32495 -53.15733,-72.71641 -53.29646,-72.84722 -53.17816,-72.65632 -53.14757,-72.97523 -53.09996,-72.97182 -52.93457)),((-75.05872 -49.23446,-74.87993 -49.38818,-74.75239 -49.10678,-74.93613 -49.01538,-74.79661 -48.99709,-75.04184 -48.7956,-74.50744 -48.73373,-74.53397 -49.67704,-74.42033 -49.91077,-74.79845 -50.02766,-74.83113 -49.96637,-74.62196 -49.80539,-74.79898 -49.79223,-74.8904 -49.61161,-74.68388 -49.64019,-74.87853 -49.54367,-74.60509 -49.3248,-75.02164 -49.49245,-75.05895 -49.91715,-75.30811 -49.62539,-75.14941 -49.52536,-75.47486 -49.30725,-75.13733 -49.50551,-74.97122 -49.42443,-75.33045 -49.27389,-75.04832 -49.3701,-75.09298 -49.21934,-75.23029 -49.15876,-74.90466 -49.06145,-74.89807 -49.30533,-75.05872 -49.23446)),((-73.42761 -53.56767,-73.41415 -53.56451,-73.22441 -53.65667,-73.45972 -53.45137,-73.05795 -53.54927,-73.19199 -53.39583,-73.03204 -53.3833,-72.87141 -53.68566,-72.86702 -53.45703,-72.12933 -53.81114,-72.4052 -53.84236,-72.32348 -54.04368,-72.80581 -54.06562,-72.96216 -54.02012,-72.65169 -53.86692,-72.82003 -53.82279,-73.05587 -53.81195,-73.09964 -54.04789,-73.35192 -53.9759,-73.2416 -53.70652,-73.61773 -53.74617,-73.42761 -53.56767)),((-69.24039 -55.17559,-69.4837 -55.24413,-69.12214 -55.48726,-69.7805 -55.30127,-69.48708 -55.17648,-70.01579 -55.16467,-68.50295 -54.92266,-68.31403 -55.03096,-68.56479 -55.09347,-69.06313 -55.07208,-68.2613 -55.22544,-68.7409 -55.27457,-68.14135 -55.38745,-68.0724 -55.72333,-68.33756 -55.47251,-68.97346 -55.43268,-68.72253 -55.38641,-68.97112 -55.39253,-68.78975 -55.18314,-69.24039 -55.17559)),((-68.258489 -54.930777,-67.199579 -55.014257,-67.032529 -55.148327,-67.207799 -55.317727,-67.837469 -55.283957,-68.116949 -55.231327,-68.258489 -54.930777)),((-73.80109 -53.17184,-73.80795 -53.16441,-74.32555 -53.11764,-74.7498 -52.77395,-73.61003 -53.07045,-73.15726 -53.37687,-73.80109 -53.17184)),((-70.53081 -54.16032,-70.84109 -54.12117,-70.89363 -53.88923,-70.60798 -53.87253,-70.7065 -53.70599,-70.48555 -53.56389,-70.33699 -54.00923,-70.67607 -53.91827,-70.53081 -54.16032)),((-71.89748 -54.22831,-71.97157 -54.21706,-72.25776 -53.95837,-71.90928 -53.85465,-71.60609 -54.09644,-71.89664 -54.01429,-71.7141 -54.24075,-71.89748 -54.22831)),((-74.87216 -48.42607,-74.70602 -48.47838,-74.70289 -48.14195,-74.47606 -48.65519,-74.97094 -48.62226,-74.87216 -48.42607)),((-75.39803 -50.37036,-75.39107 -50.16293,-75.16673 -50.28694,-75.09585 -50.14531,-75.35244 -50.01888,-74.78661 -50.13615,-75.23331 -50.46223,-75.18901 -50.30218,-75.39803 -50.37036)),((-74.84398 -51.00659,-74.83934 -51.00058,-74.94334 -50.89065,-74.53904 -50.92036,-74.64352 -50.71528,-74.39615 -50.82218,-74.37969 -51.09489,-74.84398 -51.00659)),((-75.3289 -48.14061,-75.33076 -48.14263,-75.05191 -48.60897,-75.22577 -48.71763,-75.27714 -48.33622,-75.57104 -48.38987,-75.36392 -48.29257,-75.54684 -48.35078,-75.39362 -48.20187,-75.5821 -48.09588,-75.3289 -48.14061)),((-75.03801 -48.11059,-74.99657 -48.12489,-74.78368 -48.20436,-75.01956 -48.47293,-75.26512 -48.0896,-75.03801 -48.11059)),((-71.39897 -54.1195,-71.65424 -54.22776,-71.43325 -53.9556,-71.19186 -54.20606,-70.99033 -54.09599,-70.96526 -54.31203,-71.34532 -54.3174,-71.16639 -54.24416,-71.39897 -54.1195)),((-74.28314 -50.6978,-74.15287 -50.84114,-74.34256 -50.85123,-74.59902 -50.63215,-74.35555 -50.54039,-74.688 -50.49857,-74.37289 -50.45979,-74.28314 -50.6978)),((-73.84028 -45.25069,-74.21956 -45.16691,-73.91615 -45,-73.75821 -44.98145,-73.81079 -45.2572,-73.84028 -45.25069)),((-70.54221 -55.00183,-70.55764 -55.00322,-70.23924 -55.10943,-70.53922 -55.17696,-71.00089 -54.96968,-70.54221 -55.00183)),((-74.3446 -47.8168,-73.78364 -47.87295,-74.30367 -47.97623,-74.50021 -47.90353,-74.3446 -47.8168)),((-74.85143 -51.87255,-74.93851 -51.66368,-74.75163 -51.79514,-75.02433 -52.12413,-74.94624 -51.93877,-75.13374 -51.82122,-74.98589 -51.71463,-74.85143 -51.87255)),((-74.44547 -45.50452,-74.27339 -45.49538,-74.20646 -45.68729,-74.46135 -45.78475,-74.44873 -45.512,-74.44547 -45.50452)),((-75.50002 -48.8327,-75.21676 -48.97669,-75.21437 -48.98353,-75.47464 -49.06939,-75.65687 -48.90248,-75.50002 -48.8327)),((-74.74896 -50.69143,-74.66804 -50.88846,-74.92787 -50.87397,-74.93272 -50.68066,-74.74896 -50.69143)),((-74.12131 -52.18149,-73.93063 -52.36374,-74.17678 -52.41679,-74.24151 -52.25767,-74.07568 -52.299,-74.25015 -52.19971,-74.10632 -52.21936,-74.44565 -52.13906,-74.12131 -52.18149)),((-73.57379 -45.52574,-73.62644 -45.77091,-73.79679 -45.67231,-73.68954 -45.43818,-73.57379 -45.52574)),((-75.48345 -48.48434,-75.2897 -48.62125,-75.61799 -48.68919,-75.38722 -48.59958,-75.63913 -48.64066,-75.66451 -48.49036,-75.48345 -48.48434)),((-73.90056 -44.65815,-74.24758 -44.81012,-74.41177 -44.66319,-73.90056 -44.65815)),((-74.81822 -51.46082,-75.02884 -51.49046,-74.78706 -51.33543,-74.95007 -51.31003,-74.53223 -51.24933,-74.81822 -51.46082)),((-74.99657 -48.12489,-74.89184 -47.98327,-74.96626 -47.9295,-75 -47.90513,-75.27802 -48.02776,-75.03801 -48.11059,-75 -48.1141,-74.99657 -48.12489)))
+MULTIPOLYGON(((14.08543 13.07806,14.45988 13.0745,14.83153 12.6285,15.11895 11.79355,15.14594 10.53835,15.67966 10,14.23641 9.997405,14.01946 9.670767,14.50994 9.032372,15.20761 8.610803,15.59733 7.767455,15.50748 7.527468,14.75068 6.261004,14.42192 6.031818,14.62132 5.896153,14.52787 5.278019,14.73201 4.60929,15.09312 4.292163,15.24779 3.713966,16.03593 2.974406,16.19199 2.220514,16.05783 1.652548,15.75006 1.915821,14.58318 2.211797,13.29897 2.170563,11.69521 2.322612,11.33461 2.173887,10.04082 2.161885,9.822182 2.346989,9.975469 3.084204,9.546248 3.811305,9.713395 3.853545,9.699567 4.118757,9.216111 3.943225,8.644445 4.716199,8.713179 4.504194,8.506061 4.502273,8.527482 4.726633,8.816417 5.184829,8.841041 5.824076,9.706893 6.51328,9.784036 6.796423,10.1549 7.03955,10.49373 6.899972,10.57661 7.161691,11.10094 6.541077,11.35264 6.502454,11.84693 7.079654,12.23703 8.428885,12.79066 8.759627,12.85477 9.384972,13.21933 9.542589,13.69474 10.96683,13.98038 11.30761,14.63724 11.5288,14.6782 12.16546,14.17308 12.4051,14.08543 13.07806)))
+MULTIPOLYGON(((112.9982 22.47025,112.9846 21.88995,112.8033 22.02505,112.5618 21.75739,112.5004 21.94506,112.3917 22.07701,112.4015 21.7367,112.1962 21.80529,111.8706 21.6689,111.6752 21.79575,111.7861 21.61888,111.2569 21.4134,110.7815 21.43369,110.7782 21.44063,110.749 21.42544,110.693 21.39635,110.431 21.18894,110.3263 21.43312,110.264 21.04172,110.2595 21.03705,110.1799 20.85242,110.5334 20.48269,110.2863 20.2401,109.9275 20.22848,109.9865 20.37448,109.6649 20.9427,109.953 21.48437,109.6751 21.5004,109.5694 21.76208,109.5362 21.50236,109.1604 21.40231,108.8598 21.8176,108.7423 21.60615,108.4773 21.93543,108.5376 21.73108,108.4698 21.56241,108.3692 21.67672,108.364 21.67916,108.3382 21.69123,108.1326 21.55578,108.0241 21.55152,107.3836 21.59821,107.0213 21.94991,106.697 21.96585,106.565 22.45686,106.8187 22.81807,105.8806 22.92103,105.3316 23.38878,104.8184 23.12538,104.7335 22.82427,104.1109 22.80446,103.9694 22.50606,103.3324 22.82147,103.0307 22.44462,102.4978 22.78027,102.1496 22.40003,101.7469 22.50021,101.547 22.25014,101.7815 21.83249,101.7879 21.14003,101.285 21.17868,101.1547 21.56387,101.1177 21.77615,100.2026 21.43935,99.9706 22.05203,99.16896 22.15524,99.32204 22.7415,99.56421 22.9258,98.88978 23.18311,98.67962 23.96499,98.88095 24.15503,97.53503 23.93779,97.75788 24.16994,97.55451 24.74129,97.78796 24.84673,97.84502 25.26789,98.70353 25.85471,98.57286 26.11908,98.73453 26.18707,98.76456 27.05228,98.70368 27.56615,98.42828 27.68903,98.32202 27.53787,97.90508 28.3721,97.55236 28.53457,97.34721 28.21058,96.27107 28.4075,96.62262 28.77994,96.5154 29.07517,96.17328 28.90239,96.12448 29.07665,96.3967 29.25173,96.09804 29.45244,95.26135 29.07291,94.69138 29.31206,94.42386 29.21401,93.94067 28.77195,93.29386 28.63134,93.22356 28.35798,92.55601 27.86175,91.6572 27.76037,91.66819 27.94326,91.32251 28.08927,90.39165 28.07166,90.38075 28.248,90.00265 28.32378,89.35764 27.96391,88.92725 27.28978,88.78898 28.05352,88.13596 27.87923,87.13796 27.82401,86.7031 28.10784,86.41976 27.9102,86.16701 28.17015,86.04537 27.90898,85.49779 28.32973,85.11485 28.33332,85.1314 28.67791,84.85825 28.56832,84.15152 28.88498,84.09618 29.27633,83.54865 29.19856,83.23838 29.58295,82.19776 30.09251,82.14826 30.32864,81.40681 30.41374,81.19847 30.02989,81.05566 30.20446,80.22026 30.57917,80.25038 30.74959,79.95748 30.87472,79.40791 31.08637,79.07217 31.45461,78.88874 31.26903,78.74631 31.90719,78.47343 32.23766,78.41224 32.55606,78.73645 32.69593,78.97096 32.34428,79.25841 32.52338,79.56429 32.67076,79.40984 33.17877,79.18546 33.19123,78.94111 33.39008,78.89888 33.59235,79.0872 33.63753,78.90406 33.9967,79.42042 34.01869,79.51649 34.46106,79.72459 34.43313,80.17257 34.85013,80.34001 35.46458,80.03587 35.41065,79.32433 35.9853,78.70403 35.91927,77.85342 35.48316,77.8409 35.50421,77.18671 35.52834,76.56726 35.91782,76.17518 35.83339,75.85235 36.6753,75.4545 36.72161,75.14687 37.01989,74.57156 37.03444,74.48911 37.24192,74.87856 37.23569,75.13383 37.43744,74.89603 37.66544,74.86215 38.50415,73.7812 38.61199,73.84548 38.97701,73.5577 39.25914,73.58203 39.28056,73.93794 39.59399,73.94488 40.02313,74.89946 40.33709,74.82812 40.52475,75.21906 40.44147,75.59311 40.65871,75.69683 40.29395,76.33176 40.35956,76.86404 41.02094,78.05938 41.03276,78.39241 41.41043,80.28261 42.05965,80.16733 42.63659,80.26365 42.6949,80.58799 42.89124,80.40971 43.0573,80.79986 43.17976,80.34283 44.4813,80.48974 44.71143,79.84063 44.89213,81.68958 45.36663,82.48621 45.12067,82.60367 45.43167,82.27198 45.57064,83.03088 47.21212,84.68604 47.00464,84.80595 46.82669,85.52972 47.0594,85.69684 47.23086,85.5416 47.93944,85.73545 48.371,86.58855 48.543,86.86476 49.1126,86.93111 49.11688,87.83231 49.175,87.91448 48.98592,87.74966 48.88459,88.08491 48.70694,87.97818 48.5092,88.5164 48.41327,89.04101 47.9473,89.56589 48.04869,89.79642 47.81815,90.0731 47.85859,90.91358 46.9533,91.01986 46.01566,90.66355 45.51682,90.87865 45.19198,93.50827 44.96534,94.69542 44.3477,95.431 44.28123,95.34509 44.04517,96.37058 42.71486,100.8255 42.65695,103.3221 41.90749,104.5437 41.88379,104.534 41.66262,105.0344 41.56764,107.4528 42.46183,109.2717 42.42277,110.4165 42.76889,111.047 43.34341,112.0054 43.77061,111.3868 44.34732,111.8645 45.0648,113.6466 44.76521,114.6434 45.4309,115.721 45.43835,116.2234 45.70384,116.6052 46.297,117.3657 46.34863,117.4388 46.57964,118.9783 46.81819,119.5133 46.41943,119.9207 46.7435,119.7014 47.19307,119.8565 47.21655,118.4786 48,117.8419 48.02544,117.3744 47.63805,116.8039 47.90002,115.9354 47.67554,115.4767 47.96859,116.7003 49.83983,117.8546 49.5054,118.5626 49.92574,119.1975 50.01209,119.3606 50.16798,119.1163 50.38475,119.2803 50.6097,120.0925 51.67718,120.7782 52.15837,120.6102 52.34472,120.721 52.54308,120.0612 52.58407,120.0243 52.76811,120.8139 53.26356,123.5218 53.55318,124.8751 53.09429,125.6005 53.0746,125.6722 52.85682,126.102 52.77266,125.9655 52.62254,126.5565 52.12088,126.4619 51.94272,126.9158 51.38577,126.8254 51.27232,126.9743 51.31988,126.9202 51.06199,127.2946 50.74709,127.3414 50.31707,127.5981 50.21679,127.523 49.81782,128.2506 49.49959,129.4714 49.4316,130.2226 48.86702,130.6731 48.86701,130.5245 48.61383,130.8255 48.30009,130.651 48.10178,131 47.6912,132.562 47.71522,132.6697 47.94657,133.1603 48.1057,134.5697 48.36628,134.7118 48.27581,134.5513 47.99365,134.7739 47.72915,134.1813 47.32342,133.9099 46.26525,133.1559 45.4652,133.131 45.12125,132.942 45.01337,131.8915 45.33602,131.4698 44.95948,130.9542 44.85416,131.2931 44.0797,131.3084 43.39982,131.1066 42.91479,130.4051 42.72232,130.6146 42.42395,130.259 42.8958,129.8965 43.002,129.7144 42.42675,129.3423 42.44767,128.9451 42.01748,128.0694 41.9782,128.3138 41.58303,128.1353 41.37826,126.6772 41.74695,126.0196 40.89744,124.8972 40.47795,124.3644 40,123.6468 39.8606,122.3854 39.43032,121.8802 38.94814,121.7059 39.05667,121.7003 38.86315,121.1427 38.7196,121.0971 38.92241,121.687 39.10405,121.5901 39.26279,121.9363 39.40033,121.2716 39.37237,121.5522 39.53826,121.4731 39.792,122.2851 40.48697,121.8038 40.95296,121.1892 40.937,120.4445 40.19276,119.394 39.79017,118.9877 39.19087,118.318 39.03813,117.8177 39.16712,117.5215 38.68634,118.0375 38.12706,118.5202 38.04356,118.8414 38.20891,119.0773 37.72818,118.89 37.28757,119.1172 37.20395,119.7698 37.166,120.221 37.68293,120.735 37.8399,121.5708 37.418,122.1174 37.55382,122.6682 37.41513,122.3838 37.02761,122.5344 37.01122,122.3365 36.83031,122.1946 37.04904,121.6362 36.74135,121.4436 36.86429,120.8485 36.65417,120.9541 36.4631,120.6834 36.38377,120.7109 36.135,120.2817 36.04828,120.3392 36.25572,120.115 36.20107,120.2932 35.97583,119.6192 35.61073,119.2038 35.04116,119.2062 34.75571,120.2884 34.30332,120.8313 32.61757,121.8113 31.9336,121.8704 31.69532,121.1061 31.83654,121.0377 31.81791,120.5218 32.09286,120.2708 31.93319,120.7106 31.99174,121.7072 31.29293,121.8834 30.88735,120.5082 30.31112,120.6782 30.09365,121.2798 30.3123,121.723 29.94876,122.1214 29.90477,121.4534 29.52279,121.4877 29.3878,121.9982 29.5897,121.9678 29.19673,121.8086 29.37851,121.7414 29.18855,121.4564 29.25615,121.3957 29.10852,121.6326 29.05306,121.7276 28.94267,121.4958 28.93484,121.6783 28.79261,121.4436 28.69154,121.6668 28.34389,121.3444 28.14142,121.1712 28.38927,120.9584 27.98499,120.6431 28.03683,120.8649 27.93188,120.6438 27.36485,120.0446 26.89451,120.1321 26.64603,119.8359 26.52199,119.9075 26.69044,119.8517 26.85539,119.5736 26.79332,119.831 26.4445,119.5809 26.42111,119.9581 26.37013,119.6143 26.16364,119.611 26.16002,119.7116 25.9623,119.4628 25.63036,119.6552 25.35127,119.3148 25.61117,119.1077 25.42362,119.3723 25.24816,119.129 25.27175,119.107 25.11101,118.8791 25.25459,119.0286 24.95979,118.6594 24.97705,118.6528 24.55454,118.4382 24.72174,118.2343 24.53569,118.1766 24.68885,117.8736 24.43393,118.1411 24.26461,117.7669 23.91921,117.6459 24.07347,117.5853 23.72171,117.422 23.9567,117.2421 23.60753,116.9178 23.66179,116.7479 23.34495,116.5327 23.42078,116.8015 23.23664,116.5004 22.9463,115.8156 22.74022,115.6449 22.87709,115.5681 22.6528,115.2227 22.78163,115.324 22.91621,114.8777 22.54238,114.7761 22.83329,114.5142 22.69923,114.6118 22.49697,114.2354 22.55644,114.0369 22.50504,113.5125 22.92255,113.5138 22.90736,113.6165 22.75491,113.4561 22.80441,113.5544 22.22112,113.529 22.2136,113.5158 22.21807,113.4965 22.22462,113.474 22.22078,113.4578 22.18258,113.3405 22.23388,113.3393 22.2268,113.1151 22.07514,112.9982 22.47025,112.9983 22.47192,112.9945 22.48273,112.9982 22.47025)),((122.0976 30.15388,122.3167 29.947,122.0269 29.99033,121.9371 30.16885,122.0976 30.15388)))
+MULTIPOLYGON(((-77.36086 8.686984,-76.76639 7.909259,-76.93661 8.552897,-76.33702 8.923599,-76.08941 9.333804,-75.62019 9.415977,-75.5163 10.23934,-75.69952 10.14136,-75.5125 10.57647,-74.85291 11.10267,-74.35 10.97785,-74.10612 11.35108,-73.27779 11.28881,-71.66233 12.46331,-71.22466 12.30771,-71.11625 12.03485,-71.32639 11.84789,-71.96606 11.65008,-72.23744 11.15238,-72.48579 11.09459,-73.37431 9.179666,-73.01078 9.296101,-72.76882 9.106619,-72.38087 8.321577,-72.48071 7.484616,-72.01836 7.011073,-70.08932 7.002468,-69.44788 6.114453,-67.47605 6.194591,-67.85004 5.290832,-67.87634 4.521809,-67.30263 3.397936,-67.85923 2.789513,-67.61562 2.812483,-67.19505 2.391271,-66.86983 1.225646,-67.09666 1.170079,-67.11682 1.732161,-67.44616 2.141113,-67.95162 1.746852,-68.20544 2.037632,-68.12775 1.730217,-69.85519 1.714919,-69.85407 1.069752,-69.32924 1.062455,-69.11382 0.634123,-69.46821 0.734351,-70.03735 0.553025,-70.06187 0,-70 -0.20092,-69.5933 -0.516707,-69.36835 -1.333702,-69.95342 -4.230484,-70.59111 -3.854687,-70.20691 -2.635289,-71.14234 -2.36803,-73.19693 -2.301213,-73.38068 -1.800092,-74.48315 -0.697625,-75.10118 -0.163096,-75.2882 -0.093691,-76.26915 0.441074,-76.59544 0.232862,-77.40308 0.361558,-77.67379 0.81724,-77.97404 0.817894,-78.77576 1.407844,-79.04723 1.613037,-78.84613 1.81657,-78.57029 1.761888,-78.55822 2.440422,-78.24505 2.673349,-77.79861 2.649674,-77.65806 2.872989,-77.16634 3.692999,-77.16255 3.69564,-77.10458 3.901834,-77.27479 3.839324,-77.17149 4.054936,-77.35904 3.933906,-77.52853 4.21599,-77.30168 4.643438,-77.37936 5.451063,-77.54697 5.488408,-77.23264 5.796444,-77.47776 6.189802,-77.32779 6.550925,-77.88682 7.220824,-77.74377 7.724391,-77.57512 7.508054,-77.17687 7.926277,-77.36086 8.686984)))
+MULTIPOLYGON(((-85.69843 11.07388,-85.60976 11.21682,-84.91411 10.94132,-84.67788 11.07886,-83.92849 10.70754,-83.69353 10.93761,-83.27977 10.18317,-82.5631 9.566999,-82.93756 9.473368,-82.93277 9.07554,-82.714 8.931086,-83.03423 8.364222,-83.48779 8.706521,-83.29498 8.371211,-83.56781 8.438021,-83.72871 8.576993,-83.48788 8.855814,-83.62083 9.036473,-84.5358 9.516808,-84.74493 9.96275,-85.24442 10.21484,-85.24252 10.12167,-84.86781 9.821921,-85.11121 9.551605,-85.78996 10.0892,-85.87448 10.35149,-85.62969 10.62717,-85.95062 10.88872,-85.69843 11.07388)))
+MULTIPOLYGON(((-84.83004 21.91694,-84.28132 22.01696,-84.44423 22.19913,-84.22116 22.56988,-83.22783 23.00043,-80.87563 23.14306,-77.87231 21.86489,-77.94974 22.10805,-77.64858 22.06589,-77.85509 21.92567,-77.7408 21.79838,-77.33253 21.63296,-77.43053 21.81045,-76.12368 21.09571,-75.71162 21.12968,-75.56042 20.78312,-74.73582 20.62732,-74.14251 20.18187,-75.1534 19.8943,-75.84227 20.03105,-77.73359 19.84306,-77.10847 20.37204,-77.26452 20.69829,-78.13723 20.76148,-78.48692 21.03594,-78.74833 21.64364,-79.8257 21.67051,-80.45974 22.07845,-81.05759 22.07245,-81.18996 22.28377,-81.22284 22.05452,-81.80782 22.18142,-82.16041 22.39826,-81.60777 22.52159,-81.88952 22.68474,-82.76345 22.70647,-83.36718 22.20912,-83.90379 22.1867,-84.03968 21.91084,-84.51357 21.75973,-84.51421 21.93356,-84.83004 21.91694)),((-82.93224 21.9352,-82.69332 21.88861,-82.55298 21.5619,-83.08946 21.47495,-83.19929 21.63253,-82.97388 21.57014,-83.09505 21.78799,-82.93224 21.9352)))
+MULTIPOLYGON(((-25.09711 17.19718,-24.98303 17.06912,-25.29724 16.90989,-25.35259 17.074,-25.09711 17.19718)),((-23.77427 15.3103,-23.48785 14.90434,-23.73463 14.97797,-23.77427 15.3103)))
+MULTIPOLYGON(((32.30749 35,32.91033 35.17661,32.92602 35.40247,33.64697 35.35596,34.59792 35.6995,33.93032 35.27253,34.09648 34.95496,33.69581 34.97161,33.03815 34.56351,32.41229 34.75311,32.30749 35)))
+MULTIPOLYGON(((14.82523 50.87399,15.17237 51.02024,15.38146 50.77971,16.3499 50.65818,16.19747 50.4337,16.63588 50.10873,17.01608 50.22456,16.91216 50.44516,17.68593 50.32611,17.59099 50.15761,17.78249 50.01773,18.57495 49.92144,18.85366 49.56773,18.7347 49.45151,18.57029 49.46633,18.33142 49.39188,18.34624 49.31708,18.12219 49.2571,18.12219 49.1823,18.01774 49.06304,17.86849 48.98824,17.56964 48.85381,17.31595 48.83865,17.15153 48.85381,17.03227 48.76385,16.92182 48.69472,16.53641 48.80704,15.02669 49.01706,14.98922 48.76698,14.31861 48.54292,13.84239 48.77366,12.66035 49.43354,12.40317 49.75452,12.54792 49.92308,12.214155 50.182137,12.3256 50.1721,12.50997 50.39046,14.38607 50.90216,14.30408 51.05877,14.82523 50.87399)))
+MULTIPOLYGON(((13.18373 54.34568,13.14224 54.54697,13.38461 54.52999,13.22123 54.60621,13.66617 54.57478,13.76725 54.3427,13.26875 54.29482,13.91638 53.90731,14.00136 53.85646,14.26866 53.69652,14.45072 53.26357,14.12299 52.8411,14.63822 52.57733,14.53389 52.39124,14.75716 52.06902,14.58629 51.82447,15.03887 51.27147,14.82523 50.87399,14.30408 51.05877,14.38607 50.90216,12.50997 50.39046,12.3256 50.1721,12.214155 50.182137,12.54792 49.92308,12.40317 49.75452,12.66035 49.43354,13.84239 48.77366,13.7241 48.51663,13.50247 48.59414,13.32995 48.32526,12.75725 48.12494,13.09669 47.64745,13.01005 47.4729,12.26024 47.74409,11.26402 47.40426,10.43452 47.58615,10.1776 47.27579,9.970167 47.55003,9.544334 47.54256,8.595241 47.80518,8.413456 47.67541,8.595754 47.60012,7.58092 47.58238,7.581027 48.12104,8.235493 48.96933,6.732141 49.16809,6.374592 49.45884,6.527001 49.81488,6.13802 50.1329,6.403867 50.32674,6.025336 50.75425,6.030564 50.82741,6.096231 50.83913,6.107958 50.9048,6.030564 50.9048,6.030564 50.97047,5.899231 50.97047,5.878123 51.03613,5.943792 51.08069,5.986005 51.03613,6.194732 51.14636,6.173625 51.21203,6.096231 51.1792,6.084505 51.25424,6.194732 51.34336,6.239291 51.42075,6.227565 51.51925,6.107958 51.61776,6.117339 51.6928,6.018838 51.70453,5.953171 51.74909,5.953171 51.83586,6.150171 51.83586,6.140792 51.90153,6.281507 51.85697,6.424565 51.83586,6.666125 51.90153,6.797459 51.90153,6.851399 51.94609,6.80684 52.01176,6.687233 52.02114,6.731792 52.09853,6.884233 52.13136,7.060126 52.25331,7.015567 52.29553,7.060126 52.38465,6.994459 52.48315,6.872507 52.42686,6.7529 52.47142,6.675507 52.52536,6.720066 52.56992,6.698958 52.64732,6.973351 52.63559,7.060126 52.62386,7.048399 52.87715,7.179733 52.98738,7.137519 53.12809,7.179733 53.17265,7.158627 53.25004,7.224293 53.25943,7.301686 53.31571,7.114066 53.32509,7.006186 53.32509,7.104686 53.47988,7.1469 53.52209,7.081234 53.54554,7.114066 53.61121,7.278234 53.66515,7.465852 53.65342,7.606567 53.67688,7.802905 53.703,8.019035 53.71154,8.205529 53.40596,8.276391 53.61264,8.556741 53.54255,8.680147 53.89381,9.052367 53.87154,8.811317 54.1769,8.964425 54.31462,8.588911 54.32712,9.050051 54.47654,8.812621 54.47458,8.976296 54.53461,8.703629 54.71344,8.61216 54.88446,8.28185 54.74732,8.390188 55.04619,8.378885 54.89544,8.651432 54.91,9.472132 54.84745,9.959934 54.78204,10.0287 54.55287,9.841899 54.47237,10.19967 54.45798,10.13167 54.31627,11.13042 54.39335,10.75883 54.05312,10.87973 53.95297,12.15211 54.09328,12.52026 54.48446,12.92828 54.42917,12.42218 54.25908,13.18373 54.34568)),((6.65909 53.59245,6.736483 53.60886,6.818566 53.59245,6.724756 53.57368,6.764627 53.55962,6.705994 53.54554,6.65909 53.57368,6.65909 53.59245)),((7.130483 53.69329,7.184423 53.70971,7.334519 53.71206,7.233675 53.68626,7.137519 53.67219,7.130483 53.69329)),((6.877197 53.66281,6.966317 53.68157,7.067162 53.68157,7.09296 53.66281,6.959281 53.66515,6.874852 53.64639,6.877197 53.66281)),((7.458817 53.71206,7.470543 53.74723,7.620639 53.75192,7.597186 53.73082,7.498686 53.72613,7.458817 53.71206)),((7.686306 53.77772,7.801222 53.77538,7.754317 53.74958,7.698032 53.75661,7.658162 53.75192,7.686306 53.77772)))
+MULTIPOLYGON(((42.41032 12.44916,42.4554 12.51723,42.69648 12.35956,43.13463 12.70684,43.3728 11.98542,42.51382 11.57484,43.25469 11.4696,42.96164 10.98441,41.81599 10.95938,41.77344 11.48747,42.41032 12.44916)))
+MULTIPOLYGON(((9.771108 54.93061,9.778394 54.91796,9.472132 54.84745,8.651432 54.91,8.62571 55.42776,8.075603 55.56623,8.162464 56.64308,8.558956 56.56107,8.256482 56.82804,8.623206 57.12032,9.396707 57.15497,9.953356 57.5889,10.56769 57.74319,10.55971 57.22423,10.18962 56.7011,10.96203 56.43379,10.70406 56.13452,10.35611 56.25669,10.19714 55.84081,9.857654 55.8551,10.03451 55.7001,9.544365 55.70776,9.862017 55.62768,9.501693 55.49574,9.695034 55.46497,9.515706 55.2523,9.719143 55.25641,9.427959 55.0272,9.771108 54.93061)),((11.13289 55.53054,10.88031 55.74566,11.38251 55.77841,11.52033 55.93058,11.28877 55.99945,11.78232 55.9762,11.61304 55.78364,11.81653 55.68839,11.91094 55.93458,12.08448 55.65274,12.0233 55.95794,11.84993 55.9571,12.63485 56.03262,12.59752 55.68785,12.19602 55.46967,12.45854 55.29117,12.01612 55.1478,12.17196 54.99295,11.83315 55.04755,11.7333 55.19399,11.24863 55.21091,11.13289 55.53054)),((10.49426 55.55054,10.85972 55.29445,10.65249 55.04998,10.64571 55.04885,10.61209 55.04326,10.07891 55.07621,9.680588 55.51643,10.49426 55.55054)),((11.82714 54.78779,11.77402 54.96134,12.12247 54.88567,11.97223 54.56238,11.86402 54.75827,11.49926 54.59722,11.00996 54.76348,11.17926 54.95888,11.82714 54.78779)),((15 55.18967,15.07421 54.98485,14.68471 55.09652,14.77224 55.30014,15 55.18967)))
+MULTIPOLYGON(((-61.47072 15.52196,-61.30369 15.58877,-61.23687 15.35492,-61.40391 15.17117,-61.47072 15.52196)))
+MULTIPOLYGON(((-71.75405 18.03015,-71.69286 18.34117,-72.00349 18.62527,-71.73773 18.73045,-71.88239 18.9543,-71.61336 19.20164,-71.78707 19.33363,-71.7578 19.70272,-71.65755 19.89631,-70.98975 19.92854,-69.9672 19.68463,-69.7485 19.28398,-69.1488 19.29421,-69.62262 19.2239,-69.61973 19.08248,-68.77193 18.97396,-68.32426 18.62411,-68.63787 18.21252,-69.32555 18.47192,-69.88219 18.48724,-70.50739 18.19358,-70.67525 18.43261,-71.03745 18.31735,-71.42178 17.60656,-71.75405 18.03015)))
+MULTIPOLYGON(((-2.206259 35.09098,-1.382006 35.31348,-0.825226 35.7767,-0.092147 35.801,0.345144 36.20284,1.352905 36.55564,2.548406 36.59274,3.906962 36.92595,4.789081 36.89609,5.300296 36.64227,6.40426 37.08866,6.917278 36.88607,7.212918 37.09152,7.852205 36.84656,8.641963 36.94693,8.154936 36.49945,8.409268 36.42483,8.255554 35.76288,8.473442 35.24205,8.31266 34.72816,7.636226 34.19632,7.533545 33.79332,7.738455 33.25135,8.326456 32.80933,8.353506 32.51591,9.129236 32,9.575346 30.24043,9.395229 30.17122,9.877125 29.04413,9.962235 27.87777,9.773593 27.27238,9.927657 26.64288,9.387854 26.18385,10.04183 25.32771,10.23926 24.61171,11.60618 24.24904,11.97955 23.52503,7.445678 20.84247,5.817081 19.43771,4.242888 19.13672,3.294835 18.98319,3.10724 19.15906,3.231133 19.82456,1.798455 20.29978,1.634107 20.57896,1.172165 20.73779,1.166675 21.11889,0 21.83772,-4.827674 24.9966,-8.673868 27.29807,-8.670276 27.66212,-8.669257 28.71986,-7.640522 29.38141,-5.108271 30.017,-4.82199 30.64122,-3.586124 30.90655,-3.807284 31.22201,-3.656205 31.61393,-2.829027 31.77569,-2.867483 32.10715,-1.205814 32.11682,-1.250021 32.33232,-0.991742 32.52681,-1.542218 32.9575,-1.745389 34.75318,-2.206259 35.09098)))
+MULTIPOLYGON(((-78.77576 1.407844,-77.97404 0.817894,-77.67379 0.81724,-77.40308 0.361558,-76.59544 0.232862,-76.26915 0.441074,-75.2882 -0.093691,-75.62195 -0.108895,-75.24495 -0.534989,-75.18459 -0.970688,-75.36436 -0.955734,-75.53837 -1.536144,-76.62732 -2.590585,-77.79285 -2.984906,-78.19521 -3.364114,-78.13014 -3.516708,-78.32841 -3.441479,-78.61257 -4.475154,-78.9999 -4.979351,-79.26035 -4.967359,-79.61343 -4.442309,-80.13631 -4.285207,-80.44341 -4.436912,-80.30513 -4.200802,-80.47536 -4.054242,-80.15477 -3.910297,-80.21902 -3.437626,-80.04405 -3.370153,-80.03853 -3.356442,-79.71052 -2.482893,-79.84434 -2.307149,-79.95517 -2.493104,-80.00433 -2.419199,-80.2761 -2.732283,-81.00587 -2.192326,-80.73239 -2.038729,-80.90808 -1.054829,-80.30134 -0.652601,-80.48804 -0.379718,-80.0427 0.108537,-80.04128 0.821698,-79.18088 1.07305,-78.77576 1.407844)),((-91.43499 -0.784657,-91.07195 -0.590685,-91.59045 0,-91.33742 0.163616,-90.78073 -0.753479,-91.16916 -1.05116,-91.44044 -0.997582,-91.43499 -0.784657)),((-90.35518 -0.769967,-90.53396 -0.566315,-90.24759 -0.47706,-90.17548 -0.665049,-90.35518 -0.769967)))
+MULTIPOLYGON(((24.35622 57.87815,24.57626 58.33288,23.75047 58.34032,23.50237 58.57251,23.76257 58.76242,23.46284 58.77376,23.43765 58.94152,23.66576 58.97635,23.41722 59.02584,23.51536 59.2305,25.69773 59.67622,28.04841 59.47015,28.18678 59.30873,27.54815 58.86166,27.44971 58.50935,27.82688 57.85849,27.32212 57.54839,26.50471 57.52006,25.29386 58.07761,24.35622 57.87815)),((22.85475 58.33971,22.29942 58.20514,22.184302 58.074735,22.166799 58.145438,21.84381 58.28842,22 58.39152,21.84379 58.49769,22.95893 58.61528,23.33162 58.46026,22.85475 58.33971)),((22.5642 58.6882,22.04432 58.92493,22.59108 59.09182,22.94615 58.9837,23.07467 58.83891,22.5642 58.6882)))
+MULTIPOLYGON(((34.23046 31.33046,34.26801 31.22361,34.91122 29.49664,34.24915 27.72421,33.24136 28.55233,33.17902 29.00064,32.82695 29.31606,32.57037 30.00153,32.34132 29.58844,32.86613 28.57118,33.56222 27.88803,33.49742 27.64889,33.84745 27.24946,33.93649 26.66787,35.14138 24.51279,35.79397 23.90703,35.48408 23.89439,35.62337 23.14688,35.21217 22.7873,34.95135 22.85757,34.69196 22.29791,34.16069 22.2071,34.00521 21.77233,33.56408 21.72539,33.16651 22.00619,31.4121 22.00813,31.4745 22.22508,31.31852 22.0064,25 21.9992,24.99944 29.25016,24.6981 30.14885,25.01827 30.77798,24.86111 31.40591,25.14805 31.64858,27.3445 31.37001,29.09328 30.81744,30.25248 31.29898,30.35956 31.50974,30.97031 31.58241,30.62933 31.38031,31.10268 31.4888,30.97656 31.58651,31.87915 31.52854,31.78458 31.27357,32.09054 31.05464,32.28268 31.19773,32.70239 31.06094,32.91797 31.08571,33.10033 31.17812,33.36142 31.06066,34.23046 31.33046)))
+MULTIPOLYGON(((-13.16859 27.66702,-8.670276 27.66212,-8.673868 27.29807,-8.674157 25.99761,-12.00389 25.99864,-12 23.45452,-12.75983 23.38755,-13.05887 23.0585,-13.00176 21.33081,-16.91926 21.33035,-17.05185 20.77416,-16.95304 21.83368,-15.70791 23.82401,-16.00132 23.65436,-14.89122 24.70029,-14.49319 26.14625,-13.57368 26.73241,-13.16859 27.66702)))
+MULTIPOLYGON(((-8.207305 43.32568,-8.317112 43.56603,-7.676827 43.79172,-7.049364 43.48129,-6.102077 43.48532,-5.836588 43.66094,-4.471512 43.38303,-3.587238 43.51397,-2.978318 43.31048,-2.750118 43.45387,-1.788518 43.35551,-0.561222 42.79122,0.678369 42.68731,0.703 42.86748,1.439922 42.60649,1.464789 42.44115,1.72351 42.50385,2.032906 42.35859,3.164816 42.44079,3.315126 42.32742,3.03903 42.17483,3.1712 41.8692,2.118542 41.29733,0.981047 41.03984,0.707491 40.80322,0.853528 40.72556,-0.326278 39.46793,-0.147956 38.98944,0.23056 38.73304,-0.503325 38.33036,-0.858919 37.71926,-0.694572 37.62732,-1.823366 37.26987,-2.124149 36.73759,-4.398425 36.72457,-5.177732 36.41409,-5.340027 36.15975,-5.353222 36.1598,-5.610219 36.01498,-6.138934 36.30164,-6.433872 36.74737,-6.085259 37.06393,-6.382065 36.80788,-6.918484 37.18449,-6.837488 37.29861,-7.115517 37.20753,-7.380345 37.17237,-7.457407 37.41022,-7.415919 37.7572,-6.951722 38.14727,-7.330624 38.43736,-6.953342 39.029,-7.524928 39.65641,-7.012062 39.67205,-6.874694 40,-7.018512 40.18777,-6.776533 40.36558,-6.93036 41.034,-6.184047 41.58385,-6.5545 41.69159,-6.571484 41.96747,-8.095398 41.80145,-8.199442 42.14565,-8.799806 41.90958,-8.892814 42.11259,-8.604636 42.29104,-8.866341 42.25817,-8.660237 42.41981,-8.935301 42.4627,-8.74061 42.65106,-9.016839 42.51727,-8.875895 42.8243,-9.084396 42.73923,-9.28828 43.05134,-8.836575 43.34566,-8.207305 43.32568)),((3.058582 39.26368,2.34437 39.58329,3.2098 39.95784,3.134699 39.77854,3.470593 39.71291,3.058582 39.26368)),((-14.01923 28.63949,-13.82573 28.69311,-13.92146 28.24234,-14.50271 28.06274,-14.01923 28.63949)),((-16.67809 28.38674,-16.11931 28.55642,-16.54099 28.02102,-16.91243 28.33643,-16.67809 28.38674)),((-15.55806 28.14362,-15.36081 27.93222,-15.59388 27.73076,-15.82851 27.95347,-15.55806 28.14362)),((1.412784 39.09651,1.534737 39.10589,1.623856 39.0285,1.424511 38.91827,1.391677 38.84088,1.302557 38.89716,1.213439 38.88544,1.204058 38.97456,1.314284 38.97456,1.302557 39.05195,1.412784 39.09651)),((-17.86377 28.832,-17.72186 28.73906,-17.83327 28.44737,-18.00255 28.75838,-17.86377 28.832)),((4.052117 40.05807,4.297035 39.83351,3.812775 39.92062,4.052117 40.05807)),((-13.78044 28.83317,-13.81041 29.02878,-13.43715 29.21933,-13.78044 28.83317)))
+MULTIPOLYGON(((42.41032 12.44916,41.77344 11.48747,41.81599 10.95938,42.96164 10.98441,42.68301 10.60633,42.83263 10.27788,44.00586 8.996557,46.9897 8,47.98618 8,44.98174 4.917296,43.65907 4.868027,42.83331 4.270625,42.08767 4.179365,41.89908 3.975494,41.16927 3.94258,40.77492 4.281918,39.86957 3.874727,39.53289 3.402422,38.12922 3.616987,37.0419 4.375583,36.04136 4.447551,35.9477 4.629333,35.8614 5.314649,35.30796 5.341023,35.12726 5.62447,34.93832 6.551554,34.19323 7.038556,33.67129 7.693246,33.00082 7.873695,33.2178 8.430296,33.7691 8.362971,34.13977 8.595025,34.29985 10.58783,34.60198 10.90413,34.78151 10.70829,34.97515 10.90899,35.06233 11.74959,35.68944 12.66013,36.15517 12.68091,36.37843 13.54732,36.56107 14.25609,36.43877 15.15664,36.96253 16.28581,37.00204 17.06818,37.39465 17.04713,37.5153 17.33686,38.26013 17.55859,38.56443 18.00309,39.69333 15.12198,39.81512 15.0743,39.87025 15.49886,40.16063 14.97856,40.52112 15.0214,40.77411 14.70481,41.17978 14.6216,41.68169 13.94352,42.22152 13.6234,42.38828 13.20285,43.13463 12.70684,42.69648 12.35956,42.4554 12.51723,42.41032 12.44916)),((40 15.85672,40.41896 15.55736,39.95969 15.61414,40 15.85672)))
+MULTIPOLYGON(((22.9639 60.3084,22.76673 60.00655,22.37797 60.09168,22.94714 60.30462,22.53627 60.21209,22.64918 60.40788,21.77085 60.50473,21.8603 60.64865,21.5849 60.49359,21.21686 60.90632,21.44547 60.91067,21.30112 61.07809,21.61727 61.22718,21.4831 61.56853,21.72353 61.55123,21.28389 61.99358,21.45276 62.21346,21.11172 62.48463,21.12302 62.79442,21.69213 63.05116,21.58454 63.28366,22.36647 63.28535,22.20118 63.47124,22.40269 63.4355,22.32429 63.57304,22.8406 63.6464,22.93846 63.75509,22.66913 63.80982,22.82948 63.90371,23.00955 63.77902,23.61997 64.04483,24.54426 64.81657,25.49055 64.96886,25.22754 65.12632,25.36902 65.42327,25.2062 65.56065,24.15595 65.81819,23.65543 66.30672,24.01554 66.82013,23.5792 67.16257,23.78639 67.42785,23.40979 67.49654,23.65582 67.96259,20.55732 69.0625,21.64404 69.27008,22.37394 68.72049,23.16076 68.62904,23.95907 68.83519,24.90355 68.55798,25.78341 69.02026,25.70955 69.25553,25.97886 69.71546,27.96325 70.09605,29.33293 69.49054,28.82457 69.2292,28.92693 69.05738,28.43475 68.90842,28.80354 68.87493,28.45037 68.54767,28.65979 68.19511,30.03453 67.66936,29.02974 66.91658,30.10133 65.83206,30.12272 65.66451,29.73441 65.62791,29.88122 65.56409,29.60952 65.25109,29.89286 65.10344,29.59626 64.98994,30.08586 64.77503,30.05301 64.40425,30.55125 64.11019,29.98095 63.75448,31.58095 62.90803,30.94843 62.31269,27.8018 60.5494,26.44571 60.49363,26.52312 60.34407,26.24531 60.45474,25.78704 60.23732,25.67679 60.38103,24.41668 59.96262,23.64137 59.93294,23.57659 59.92838,22.89621 59.81329,23.23341 60.03376,22.84129 60.02602,23.15738 60.05233,22.87505 60.1638,22.9639 60.3084)),((19.89858 60.3023,19.80618 60.39631,20.28798 60.28155,19.96204 60.20273,20.24253 60.00166,19.7592 60.09486,19.64925 60.2912,19.89509 60.29403,19.89858 60.3023)))
+MULTIPOLYGON(((178.1421 -18.25408,177.3382 -18.11754,177.2647 -17.89015,177.5227 -17.51011,178.1833 -17.31135,178.5816 -17.64541,178.6837 -18.05215,178.1421 -18.25408)),((180 -16.17001,179.4743 -16.70402,179.9275 -16.4691,179.9317 -16.75956,179.2012 -16.6999,178.7163 -17.01024,178.5064 -16.82339,178.551 -16.63551,180 -16.17001)))
+MULTIPOLYGON(((-59.32932 -52.34733,-59.72961 -52.13116,-59.49426 -51.83852,-58.96808 -51.78765,-59.17275 -51.58753,-58.92181 -51.53147,-59.14103 -51.46628,-58.85584 -51.38089,-58.963 -51.24174,-58.33759 -51.36374,-58.58615 -51.44751,-58.21596 -51.66436,-58.26746 -51.39955,-57.73994 -51.51839,-58.15722 -51.55529,-57.71249 -51.68759,-58.39589 -51.92214,-58.93896 -51.79064,-58.62948 -52.11549,-59.25478 -51.99445,-59.01723 -52.25996,-59.4515 -52.13249,-59.32932 -52.34733)),((-60.236 -51.42021,-60.17057 -51.39289,-59.59754 -51.45232,-59.19929 -51.44551,-59.85421 -51.96618,-60.61304 -52.26045,-61.07092 -52.01685,-60.50035 -52.02376,-60.38986 -51.9291,-60.62925 -51.92735,-60.46045 -51.84176,-60.46168 -51.83904,-60.19226 -51.71931,-60.64433 -51.34375,-60.25455 -51.38418,-60.236 -51.42021)),((-36.18698 -54.4221,-35.7921 -54.75687,-36.1126 -54.885,-36.454 -54.52568,-37.41179 -54.26977,-37.24134 -54.14586,-38.01948 -54.00739,-36.66531 -54.10859,-36.4875 -54.19356,-36.67097 -54.28681,-36.18698 -54.4221)))
+MULTIPOLYGON(((158.12 6.90269,158.1702 6.952803,158.2871 6.936099,158.3205 6.885985,158.2871 6.78577,158.2036 6.78577,158.12 6.90269)),((162.9976 5.36592,163.0477 5.315818,162.9976 5.265705,162.8807 5.299114,162.9976 5.36592)))
+MULTIPOLYGON(((-6.685637 62.0614,-7.106133 62.31528,-6.62926 62.20536,-6.685637 62.0614)))
+MULTIPOLYGON(((-149.3768 -17.53473,-149.1532 -17.87719,-149.5832 -17.7391,-149.6221 -17.5621,-149.3768 -17.53473)))
+MULTIPOLYGON(((2.546947 51.09281,2.795442 50.72651,3.139944 50.79072,3.694881 50.31094,4.206795 50.27324,4.148557 49.97853,4.877701 50.15532,4.856486 49.79186,5.477649 49.49361,5.816617 49.54663,6.374592 49.45884,6.732141 49.16809,8.235493 48.96933,7.581027 48.12104,7.58092 47.58238,6.985055 47.50213,6.874169 47.359,7.051111 47.33619,6.428569 46.92942,5.957461 46.20375,6.775381 46.4403,6.776672 46.15083,7.03618 45.93694,6.790975 45.77126,7.12885 45.26577,6.615681 45.10521,7.013811 44.83339,6.849277 44.53329,7.002817 44.24012,7.678827 44.18167,7.523377 43.78971,6.150552 43.03003,4.875491 43.3631,4.738445 43.46336,4.832345 43.33904,4.574308 43.3745,4.038548 43.5651,3.332358 43.28226,2.991492 42.96224,3.164816 42.44079,2.032906 42.35859,1.72351 42.50385,1.439922 42.60649,0.703 42.86748,0.678369 42.68731,-0.561222 42.79122,-1.788518 43.35551,-1.424399 43.66138,-1.253916 44.55111,-1.020061 44.65529,-1.16444 44.7733,-1.262118 44.62058,-1.152009 45.48921,-0.558637 45.03542,-0.824097 45.48967,-1.234649 45.68884,-0.992596 45.97147,-1.239468 46.16558,-1.117898 46.29456,-1.804643 46.48708,-2.139063 46.81699,-1.984438 47.03243,-2.243252 47.13449,-2.009018 47.31611,-2.53937 47.28721,-2.477763 47.51271,-2.910778 47.54142,-2.70604 47.6384,-3.109616 47.47004,-3.136508 47.73933,-4.109377 47.97178,-4.3661 47.78963,-4.738554 48.04216,-4.294135 48.10557,-4.633099 48.28314,-4.189399 48.30006,-4.461697 48.33046,-4.284529 48.44025,-4.796903 48.41734,-4.548846 48.64105,-3.861644 48.62415,-3.078109 48.88744,-2.692234 48.49808,-2.325284 48.69125,-1.358894 48.63744,-1.614106 48.84066,-1.610309 49.21982,-1.942512 49.73267,-1.268516 49.70425,-1.141551 49.31734,-0.229212 49.269,0.481422 49.47628,0.092723 49.47592,0.194277 49.70889,1.672195 50.1855,1.582968 50.87255,2.546947 51.09281)),((9.483669 42.84132,9.553199 42.14012,9.180149 41.37232,8.660048 41.75091,8.799218 41.9035,8.609168 41.9044,8.739815 42.06124,8.545298 42.38079,9.295632 42.68132,9.353201 43.01014,9.483669 42.84132)))
+MULTIPOLYGON(((68.9295 -48.86312,69.17527 -48.76316,69.0575 -49.1187,69.25529 -49.07036,69.62476 -48.98005,69.65557 -49.12193,69.30565 -49.19022,69.57137 -49.30214,70.5244 -49.10763,70.53436 -49.30701,70.30265 -49.38895,70.4429 -49.44366,69.8761 -49.37181,69.87763 -49.37266,69.61449 -49.38235,69.78697 -49.54977,70.3018 -49.55116,70.2247 -49.70134,69.12501 -49.46886,69.09065 -49.68557,68.772 -49.73171,68.93176 -49.32593,68.76415 -49.22182,68.92656 -49.14744,68.73909 -49.08115,68.89362 -48.99872,68.79001 -48.85332,69.12785 -48.73497,68.9295 -48.86312)))
+MULTIPOLYGON(((-5.761648 56.85765,-5.923347 56.88718,-5.825565 57.01194,-5.50931 56.99562,-5.802319 57.06939,-5.3873 57.11016,-5.657581 57.23205,-5.391338 57.23504,-5.734032 57.28438,-5.440399 57.41738,-5.830651 57.3815,-5.835985 57.58011,-5.513047 57.54048,-5.819703 57.63965,-5.673998 57.70136,-5.814012 57.86035,-5.073551 57.82016,-5.456258 58.07318,-5.240592 58.15485,-5.377501 58.26773,-4.94328 58.21893,-5.182642 58.35573,-4.996487 58.63159,-4.48174 58.44477,-3.026596 58.64274,-3.127723 58.36174,-4.192018 57.86132,-3.782587 57.856,-4.467337 57.48183,-3.336853 57.72617,-1.827003 57.61489,-2.546609 56.57108,-3.360783 56.38087,-2.819083 56.45011,-2.596072 56.28216,-3.296456 56.04559,-2.147081 55.91851,-1.645028 55.58646,-1.245967 54.59323,-0.596015 54.49137,-0.081918 54.12095,-0.203828 53.9763,0.134925 53.61492,-0.706891 53.70306,0.161409 53.48294,0.339487 53.10311,0 52.89512,0.367313 52.79057,0.971131 52.98265,1.739798 52.63234,1.579712 52.09655,1.142966 52.04163,1.286637 51.8724,0.959528 51.80658,0.928523 51.80112,0.686442 51.73093,0.94825 51.61734,0.602265 51.53315,0.531331 51.53715,0.344282 51.44876,0.725905 51.42236,0.744292 51.38912,0.87593 51.38862,1.437325 51.38649,0.963791 50.91404,0.237589 50.73737,-0.85875 50.8159,-1.478651 50.9216,-1.406337 50.78976,-2.465522 50.5185,-2.798604 50.72173,-3.483619 50.69411,-3.648454 50.22518,-4.205175 50.4288,-4.704587 50.34961,-5.207258 49.96104,-5.713986 50.12914,-4.791278 50.60564,-4.532721 51.0243,-4.160434 51.08017,-3.00623 51.22282,-2.419979 51.81339,-3.340029 51.3843,-3.837151 51.63112,-4.30424 51.5638,-4.081483 51.66132,-4.347486 51.80293,-5.060992 51.62495,-4.933724 51.71405,-5.322225 51.86536,-4.211852 52.26543,-3.948004 52.55988,-4.133759 52.61578,-3.939249 52.7523,-4.155301 52.81306,-4.060295 52.92563,-4.764292 52.79308,-4.204031 53.21437,-3.3178 53.35903,-3.06123 53.22663,-3.204575 53.39034,-3.046917 53.4413,-2.789017 53.29852,-3.108091 53.55709,-2.839477 53.72302,-3.060501 53.77135,-2.853241 54.00626,-2.805058 54.2462,-3.153319 54.06556,-3.64097 54.51077,-3.060157 54.98634,-3.602532 55.02723,-3.986511 54.76991,-4.406258 54.91104,-4.396054 54.67985,-4.816141 54.86673,-4.96006 54.80833,-4.853545 54.63635,-5.185563 54.97681,-4.994437 54.91571,-4.625731 55.4992,-4.907257 55.70077,-4.880601 55.94394,-4.493469 55.92852,-4.857075 55.992,-4.754687 56.21059,-5 55.86493,-5.170537 55.91907,-5.345491 55.97461,-4.922588 56.27454,-5.44153 56.03485,-5.314846 55.78452,-5.602317 55.30992,-5.806814 55.36736,-5.436556 55.85783,-5.671417 55.81552,-5.605306 56.02883,-5.485006 56.26105,-5.665133 56.29794,-5 56.71432,-5.180667 56.79288,-5.686227 56.50142,-6.008562 56.65339,-5.53949 56.68963,-6.235613 56.71775,-5.761648 56.85765)),((11.33461 2.173887,11.69521 2.322612,13.29897 2.170563,13.15633 1.234311,14.18722 1.39562,14.50007 0.898546,13.88868 0.202671,13.89537 -0.212169,14.49294 -0.615902,14.39857 -1.875691,14.08302 -2.481633,13.75816 -2.113381,13.5031 -2.431169,13.04093 -2.333772,12.73326 -1.864831,12.44544 -1.869991,12.50287 -2.422352,11.60872 -2.322756,11.61747 -2.789746,12.06658 -2.969432,12.04545 -3.352566,11.88431 -3.747393,11.52937 -3.512756,11.20501 -3.978806,9.624951 -2.408721,8.704875 -0.68259,8.842259 -0.834064,9.294266 -0.400335,9.320472 0.332451,9.476711 0.145474,9.912024 0.181602,9.916915 0.187098,9.310792 0.517722,9.503311 0.66844,9.613253 0.517494,9.665299 1.061179,11.33478 0.999263,11.33461 2.173887)),((-7.405216 54.94457,-6.959617 55.19511,-6.144355 55.22849,-5.762994 54.81772,-5.929478 54.59916,-5.545345 54.65722,-5.460032 54.38773,-5.686832 54.58477,-5.703889 54.35185,-5.527007 54.31477,-6.266092 54.09651,-6.634315 54.04186,-7.032411 54.41945,-7.282304 54.12552,-7.550656 54.12475,-8.160958 54.43678,-7.405216 54.94457)),((-6.841243 57.81628,-7.132653 57.8365,-6.822138 57.9038,-7.11227 57.99076,-6.913652 58.05386,-7.095441 58.18867,-6.863925 58.11589,-6.804593 58.30701,-6.185835 58.46983,-6.381968 58.22593,-6.157477 58.22328,-6.581411 58.08951,-6.401071 58.11052,-6.477533 57.93663,-6.699586 58.05869,-6.841243 57.81628)),((-6.303623 57.69365,-6.172023 57.29937,-5.649447 57.25922,-6.022753 57.02213,-5.841354 57.19072,-6.327704 57.16341,-6.39142 57.36631,-6.791327 57.4233,-6.586012 57.42461,-6.636896 57.60946,-6.31823 57.45966,-6.303623 57.69365)),((-6.275485 56.4812,-6.330446 56.60921,-6.071127 56.6426,-5.649987 56.43379,-6.328577 56.27247,-5.983783 56.39249,-6.275485 56.4812)),((-1.3017 60.25573,-1.70729 60.29218,-1.055126 60.43896,-1.279205 59.85966,-1.3017 60.25573)),((-4.572057 53.26992,-4.591009 53.2866,-4.433951 53.43357,-4.047035 53.31404,-4.346991 53.1317,-4.572057 53.26992)),((-6.269501 55.58354,-6.262885 55.78733,-6.489327 55.79449,-6.127541 55.94006,-6.024627 55.6871,-6.269501 55.58354)),((-45.19071 -60.73222,-46.03582 -60.60854,-45.45302 -60.54016,-45.19071 -60.73222)),((-4.628757 54.05592,-4.798655 54.06398,-4.723104 54.21301,-4.367136 54.41885,-4.628757 54.05592)),((-7.263451 57.33499,-7.20893 57.11899,-7.392337 57.11483,-7.426861 57.39123,-7.263451 57.33499)),((-2.836712 58.87268,-3.360115 59.10545,-2.712693 58.97096,-2.836712 58.87268)))
+MULTIPOLYGON(((-61.62106 12.24797,-61.63776 11.99741,-61.85492 11.99741,-61.62106 12.24797)))
+MULTIPOLYGON(((39.25613 43.92894,41.57566 43.84114,47.16404 41.89426,47.19468 41.89426,46.70084 41.43105,45.86707 41.55434,44.5701 41.55434,42.85301 41.56945,42.82929 41.58788,42.52033 41.44005,41.547 41.52649,41.77663 41.86655,41.43321 42.73899,40.33849 43.14618,39.25613 43.92894)))
+MULTIPOLYGON(((-54.01162 5.621387,-53.83072 5.7702,-52.93198 5.458016,-52.65663 5.141731,-51.94453 4.508541,-51.79938 4.608623,-51.61506 4.190925,-52.90534 2.189559,-53.78421 2.36406,-54.1146 2.127094,-54.52573 2.303486,-53.97749 3.601097,-54.3625 4.046188,-54.47425 4.903628,-54.01162 5.621387)))
+MULTIPOLYGON(((-2.689926 9.488792,-2.945597 10.62952,-2.834325 11.00416,-0.621151 10.90218,-0.142005 11.13898,0.022753 11.08191,-0.063918 10.64102,0.392497 10.30426,0.227102 9.455466,0.562796 9.40219,0.381674 8.749467,0.725227 8.284056,0.530341 6.825836,1.191781 6.104417,0.924824 5.784073,0.238387 5.760786,-1.979184 4.756618,-3.110742 5.094452,-2.727679 5.137735,-3.25542 6.618508,-2.780885 7.949609,-2.494897 8.205227,-2.779666 9.055429,-2.689926 9.488792)))
+MULTIPOLYGON(((-28.14555 70.46027,-27.09641 70.88862,-25.69718 71.01743,-25.29546 70.65814,-28.13041 70.46035,-26.33931 70.36531,-28.59663 70.10286,-27.37967 69.96333,-26.91559 70.25006,-25.31204 70.41239,-25.32899 70.27416,-23.86761 70.1242,-22.12541 70.15429,-23.31262 69.75248,-23.31853 69.75288,-23.92075 69.75668,-23.64756 69.56281,-24.34126 69.60481,-24.08908 69.40952,-25.24182 69.27723,-25.03749 69.11531,-25.64768 69.09978,-25.45255 68.9678,-26.38128 68.66959,-27.64891 68.4732,-28.00777 68.59305,-28.01519 68.44726,-29.17162 68.39511,-29.39096 68.21064,-29.86814 68.41541,-30.29809 68.2607,-30.02576 68.11399,-30.83574 68.24348,-30.47677 68.0569,-31.7185 68.10094,-31.51678 68.24383,-32.00249 68.26142,-32.52806 68.61318,-32.58184 68.48006,-32.09141 68.18427,-32.46302 68.20065,-31.98782 68.13315,-32.15352 68.03827,-32.02939 67.92458,-33.22132 67.68338,-33.05204 67.63641,-33.38855 67.54549,-33.27136 67.40015,-33.58484 67.36236,-33.36094 67.24952,-33.67861 67.22143,-33.5231 67.08051,-34.05738 67.00077,-33.85258 66.96443,-34.01257 66.96568,-33.96321 66.78907,-33.96092 66.7874,-34.2821 66.57556,-34.40937 66.75153,-34.39795 66.54102,-34.71579 66.33395,-35.20616 66.37548,-35.03725 66.24724,-35.84027 66.44345,-35.5596 66.12851,-35.76114 66.18983,-36.08715 65.91762,-36.57527 66.0724,-37.04347 65.86806,-37.25504 66.09955,-37.12794 65.88628,-37.29777 65.90532,-37.09521 65.85374,-37.21599 65.75349,-37.47003 65.80631,-37.27514 65.74495,-37.89751 65.57227,-37.97995 65.77876,-37.75264 65.86507,-37.82204 66.02455,-37.2021 66.33979,-38.12551 66.37542,-37.70875 66.25516,-38.04847 66.08759,-38.07007 65.90343,-38.48322 66.01666,-38.09731 65.79227,-38.21062 65.63786,-38.74276 65.69275,-38.61815 65.55751,-38.96515 65.51833,-39.35147 65.74557,-39.33249 65.53265,-39.66852 65.67104,-39.80758 65.49055,-40.1243 65.543,-39.76071 65.22646,-40.15472 65.00868,-41.13086 65.11428,-40.97775 64.95284,-41.1604 64.93859,-40.39711 64.36694,-41.32666 64.29459,-41.07946 64.24009,-40.63292 64.14164,-40.61458 63.95367,-40.84501 63.93075,-40.51359 63.69147,-41.50156 63.85398,-41.57879 63.741,-40.74203 63.57571,-41.30433 63.55124,-41.13933 63.37884,-41.59218 63.48257,-41.34764 63.3476,-41.41479 63.35833,-41.93033 63.46777,-41.42868 63.10695,-42.11901 63.24866,-41.54306 63.02187,-42.21598 63.09504,-41.64922 62.89853,-43.15359 62.74079,-42.14779 62.37841,-42.99031 62.51328,-42.26389 62.29115,-42.54786 61.93954,-42.11208 62.00198,-42.42638 61.90294,-42.19338 61.85585,-42.31166 61.75439,-42.88283 61.76127,-42.24213 61.71105,-42.42539 61.54898,-43.08371 61.58697,-42.40396 61.48519,-42.6499 61.2816,-43.24071 61.31836,-42.68864 61.26142,-43.19075 61.20586,-42.64785 61.08757,-43.62982 61.12609,-42.70446 61.05399,-42.97501 60.87681,-43.48579 60.93408,-42.89833 60.79795,-43.5269 60.83239,-42.75582 60.72429,-43.29513 60.6689,-42.77542 60.68485,-43.23233 60.4532,-43.71304 60.71693,-43.63351 60.53573,-44.19664 60.62235,-43.32105 60.43966,-43.60344 60.29723,-43.09855 60.30228,-43.33697 60.20972,-43.1211 60.11584,-44.10293 60.1707,-43.48964 60.03858,-43.58833 59.9066,-44.10857 60.1688,-44.09177 60.37852,-44.41204 60.13229,-44.42534 60.12207,-44.95188 60.08015,-45.11016 60.09793,-44.76089 60.18834,-44.46674 60.5599,-45.17358 60.12288,-44.62157 60.74009,-45.22956 60.41784,-45.07727 60.65126,-45.50875 60.47629,-45.22031 60.76381,-45.56776 60.46017,-45.75364 60.59219,-45.62763 60.64048,-46.00314 60.56429,-45.82497 60.64519,-45.26233 60.90065,-46.21436 60.73175,-45.26133 61.09457,-45.51891 61.24727,-45.49773 61.0873,-46.02214 60.89751,-45.6222 61.14131,-45.87765 61.21574,-45.71909 61.3129,-46.12 61.24056,-45.82755 61.12078,-46.24053 60.96814,-46.89675 60.93089,-46.69751 60.87564,-46.86066 60.79264,-47.03407 60.97438,-48.07035 60.81425,-48.08761 60.81141,-47.68956 61.00789,-48.4183 60.99311,-47.84388 61.02166,-48.2257 61.17739,-47.92518 61.32137,-48.50281 61.16364,-48.62698 61.25446,-48.32741 61.37207,-49.07418 61.39491,-48.2557 61.51986,-49.28308 61.54552,-48.5824 61.62947,-49.16111 61.7124,-48.75236 61.98153,-49.23682 61.7043,-49.35764 61.76336,-49.15832 61.88962,-49.38348 61.79842,-49.40537 61.937,-48.84612 62.06821,-49.09842 62.06213,-49.04012 62.20267,-49.17943 62.00394,-49.72402 61.99625,-49.36276 62.06744,-49.37777 62.20792,-49.71151 62.14263,-49.29831 62.26247,-49.89986 62.35502,-50.32828 62.48676,-49.8842 62.88608,-50.33025 62.73368,-49.69945 63.04596,-50.34715 62.77113,-50.15666 62.99714,-50.62399 63.08483,-50.07456 63.22289,-51.02853 63.23297,-50.15849 63.37881,-51.2112 63.37507,-50.75204 63.54491,-50.95669 63.58371,-51.40285 63.52108,-51.30294 63.61147,-51.54817 63.66962,-51.34977 63.71077,-51.55897 63.73604,-50.91773 63.92724,-51.42657 63.79373,-51.35708 63.95633,-51.63495 64.01893,-50.54148 64.19648,-51.2743 64.27278,-50.16857 64.44247,-50.91721 64.58614,-50.48874 64.70216,-50.07016 64.53222,-50.12548 64.83095,-50.5658 64.75699,-50.86142 65.11344,-50.66662 65.20126,-51.04179 65.22356,-50.6373 64.74516,-51.13672 64.60527,-51.07537 64.75097,-52.02903 64.20364,-52.15518 64.6785,-51.61219 64.84779,-51.25061 65.01993,-52.2107 64.79685,-52.02048 64.9808,-52.29142 65.08043,-51.99521 65.32018,-52.58793 65.31689,-51.4193 65.59827,-51.88955 65.5976,-52.50327 65.38522,-52.43837 65.54483,-52.63651 65.48678,-52.4763 65.6712,-52.81177 65.54525,-52.55216 65.66936,-52.80112 65.63402,-52.72082 65.76869,-51.7367 65.91946,-51.75545 66.07773,-53.18819 65.84727,-52.89822 66.01677,-53.47952 66.02846,-51.28415 66.84447,-50.3189 66.82603,-50.94397 66.98449,-53.10065 66.29104,-53.62734 66.23997,-53.50035 66.47602,-53.64889 66.5026,-52.44911 66.51741,-53.48396 66.59266,-52.59816 66.70349,-53.17166 66.71347,-52.6839 66.79375,-53.08122 66.83652,-52.23697 66.84201,-52.88662 66.88889,-52.89135 66.88934,-53.83362 66.95385,-53.21435 66.98473,-53.98417 67.07246,-53.53165 67.2226,-53.82722 67.19913,-53.83753 67.40339,-53.29626 67.60654,-53.70768 67.49526,-53.54312 67.68037,-53.69761 67.80457,-53.06647 67.86991,-53.32687 67.90934,-52.90884 67.96806,-53.25853 67.97595,-53.11347 68.05927,-52.07756 67.94404,-53.48133 68.15084,-52.16309 68.1154,-50.13596 67.9315,-51.33354 68.27843,-53.37239 68.2783,-52.02196 68.58157,-52.01623 68.58234,-51.03962 68.5876,-51.10798 68.7017,-50.67762 68.82063,-51.31794 68.74992,-51.13245 68.88589,-51.09883 69.13688,-50.19825 68.96844,-50.71322 69.11329,-50.15835 69.1634,-50.49763 69.19804,-50.41976 69.34853,-51.14857 69.20639,-50.89211 69.46269,-50.23154 69.52814,-50.90349 69.48605,-50.83698 69.64491,-50.41843 69.59883,-50.82163 69.71577,-50.19744 69.76241,-50.62982 69.92654,-50.25739 70.04337,-52.34518 70.0504,-54.62635 70.65181,-53.09321 70.77789,-50.55227 70.32685,-50.70911 70.39897,-50.52119 70.5173,-51.36948 70.55631,-50.66058 70.61297,-51.47482 70.7381,-50.67352 70.70908,-50.87666 70.88378,-51.96832 71.02554,-50.93677 71.02549,-52.26462 71.1237,-51.53505 71.30318,-52.56266 71.17054,-51.36395 71.47401,-52.99587 71.4239,-51.65284 71.7141,-53.27787 71.71384,-52.70002 72.00007,-53.37428 71.77656,-53.52871 72,-53.46876 71.80655,-53.93425 71.75147,-53.74016 71.64999,-54.11363 71.73019,-53.8986 71.44592,-55.34764 71.40327,-55.87665 71.70541,-54.63294 72,-55.61369 72,-54.90398 72.32346,-55.08973 72.35572,-55.6471 72.45253,-55.15972 72.53603,-54.8047 72.59685,-54.79735 72.59811,-54.79779 72.59958,-54.7226 72.72791,-55.08203 72.72337,-54.58127 72.83009,-54.76434 72.99429,-55.73773 73.0918,-55.16069 73.19617,-55.46841 73.2702,-55.15866 73.42033,-56.07065 73.65427,-55.80207 73.76915,-55.95939 73.86819,-55.6037 73.8665,-56.4315 74.07304,-56.13281 74.25784,-57.3114 74.10525,-56.25363 74.27782,-56.71957 74.35591,-56.28641 74.44775,-56.82084 74.45461,-56.35929 74.48444,-56.32121 74.49257,-57.15164 74.74181,-56.78924 74.8149,-56.97397 74.90287,-58.6931 75.35082,-58.13716 75.51884,-58.58828 75.67424,-58.37256 75.7149,-59.77588 75.80223,-59.66836 75.97004,-63.41718 76.38249,-63.96902 76.13738,-64.34446 76.36026,-64.97635 76.12064,-65.62978 76.03011,-65.88131 76.09883,-65.53345 76.2382,-66.19076 76.28215,-66.41331 76.08879,-66.94909 76.2749,-67.30036 76.17663,-66.48148 75.91088,-68.50931 76.09393,-69.63847 76.38279,-67.94397 76.68876,-70.02199 76.77023,-69.85648 76.96404,-70.63395 76.7957,-71.3839 77.01604,-70.47363 77.22885,-68.09475 77.17738,-69.10619 77.27593,-68.34023 77.3765,-66.23434 77.26073,-66.63561 77.41866,-66.11443 77.43323,-66.19059 77.59901,-68.37785 77.51064,-68.71292 77.67309,-68.60901 77.51486,-69.18089 77.45958,-70.29501 77.5732,-69.56183 77.73582,-70.68573 77.6966,-70.15213 77.85326,-71.42501 77.79472,-71.26183 77.89183,-73.04203 78.173,-72.67249 78.19798,-72.85124 78.35027,-72.59833 78.5109,-69.22673 78.81557,-68.55481 79.04223,-66.05612 79.11364,-65.14085 79.3737,-64.8119 79.53706,-65.06808 80,-63.59893 80.11676,-64.01382 80.13842,-63.90718 80.26811,-64.32851 80.06968,-65.64215 80,-67.41831 80.18811,-66.61549 80.5402,-65.37178 80.65918,-63.63564 81.1367,-62.70361 80.74539,-63.3176 81.15242,-60.98559 81.14142,-61.34058 81.34665,-60.77701 81.49766,-61.42698 81.76199,-60.09566 81.93845,-56.45251 81.33553,-59.52304 81.98774,-55.8941 82.26759,-55.13906 82.14953,-55.62801 82.27724,-54.59059 82.3624,-53.59948 82.11454,-53.53478 81.86765,-53.87788 81.69285,-53.59822 81.54498,-52.96531 81.82965,-52.92236 82.03039,-49.64294 81.63279,-51.13588 81.93353,-49.47973 81.9241,-50.76741 82.19353,-51.0715 82.51257,-49.2877 82.47915,-44.6468 81.75911,-44.21621 81.8307,-44.97985 82.02648,-44.34969 82.10508,-44.77335 82.25634,-42.33032 82.21101,-43.86695 82.32986,-45.78048 82.77394,-42.10249 82.75707,-41.77908 82.47218,-41.68823 82.65119,-41.99852 82.72868,-41.82192 82.75338,-39.86321 82.35831,-39.93886 82.48553,-39.74581 82.50078,-40.16508 82.7188,-45.10057 82.91608,-43.38381 82.94218,-45.57642 83.14489,-42.93217 83.21451,-38.63818 82.75134,-38.51028 82.83351,-39.04739 83.02007,-36.95845 83.14888,-38.93605 83.2485,-38.72478 83.30937,-38.88985 83.43783,-36.48051 83.36389,-36.96846 83.50204,-36.44117 83.56442,-33.87707 83.46004,-34.16059 83.57257,-32.60862 83.62696,-26.28423 83.39066,-25.70142 83.29356,-26.95507 83.15107,-25.30665 83.16553,-24.80565 82.97458,-25.94098 82.77133,-24.00149 82.91538,-23.79731 82.8981,-24.06358 82.75002,-23.41582 82.85439,-21.37832 82.56393,-24.99492 82.15875,-30.12133 82.18053,-32.74325 81.82196,-32.65096 81.64621,-28.8716 81.99226,-24.55974 81.99512,-24.66936 81.76372,-26.6853 81.53676,-26.34334 81.42517,-23.26189 81.69637,-23.22566 81.99029,-21.2561 82.07239,-20.99261 81.77075,-21.25238 81.49158,-22.89808 81.08366,-22.58378 81.05447,-23.97291 80.56963,-19.47007 81.55724,-19.42779 81.56053,-18.91917 81.60008,-19.52467 81.35762,-18.45139 81.49064,-17.36484 81.35722,-16.66944 81.51414,-16.99375 81.55992,-16.85143 81.64722,-16.36899 81.61996,-16.54635 81.65129,-16.45639 81.75927,-15.62531 81.83095,-11.31232 81.45669,-13.3436 81.01219,-14.32841 81.01286,-14.51412 80.97047,-14.13162 80.82867,-15.47235 80.61592,-17.28877 80.75825,-18.1343 80.55278,-20.85436 80.55784,-15.70082 80.41879,-16.85193 80.17031,-19.28878 80.26202,-20.22284 80.09207,-19.977 80.0748,-20.45069 79.82984,-19.94182 79.71956,-19.54794 79.79916,-19.93719 79.77851,-19.72666 79.93687,-18.97553 80.05466,-17.15697 80.00001,-17.94281 79.69401,-19.4482 79.60286,-19.3343 79.51917,-19.60075 79.40356,-19.43839 79.29396,-19.6693 79.11216,-19.17532 79.22771,-19.95476 79.02206,-19.7839 78.85245,-21.06997 78.76053,-20.77872 78.65167,-21.23918 78.57278,-20.76974 78.58437,-21.31158 78.11718,-21.74902 78.10468,-21.32243 78.07911,-21.95144 77.63788,-21.37852 77.6382,-21.72008 77.47606,-21.15937 77.60255,-21.35045 77.76094,-20.8246 77.97794,-19.26413 77.72829,-18.93954 77.59399,-19.34281 77.53487,-20.70052 77.70201,-20.88986 77.61488,-20.21071 77.50574,-21.05636 77.50001,-19.45691 77.19889,-18.46959 77.28142,-18.22526 76.89658,-18.51156 76.75527,-20.98997 76.93395,-21.68072 76.86636,-20.76077 76.80586,-21.66715 76.62245,-22.23213 76.84409,-22.699 76.69296,-21.70149 76.52077,-22.57416 76.4566,-21.62774 76.42976,-21.70908 76.25068,-21.33297 76.22085,-20.94969 76.22875,-20.47902 76.2361,-19.8921 76.24526,-19.80019 76.05142,-21.93523 75.99461,-19.76736 75.89034,-19.36195 75.72788,-19.60325 75.68162,-19.34806 75.42039,-19.45715 75.2042,-22.11149 75.67018,-21.40673 75.45142,-22.46332 75.50835,-20.50347 75.13656,-21.76379 74.97749,-22.47357 75.16891,-21.7592 74.95338,-20.63758 75.05076,-20.76673 74.85767,-20.61812 74.75056,-21.1105 74.6682,-19.21752 74.58466,-19.20034 74.57744,-18.97684 74.48338,-19.64561 74.23621,-20.71581 74.39705,-20.12521 74.19879,-21.31815 74.08649,-21.99524 74.22454,-21.87755 74.35825,-22.45639 74.30653,-22.02169 74.30395,-22.50743 74.06013,-22.05188 74.00856,-21.88581 73.64987,-21.73775 73.70659,-21.93872 74.01174,-21.7461 74.05891,-20.2875 73.88158,-20.53525 73.72254,-20.41591 73.48486,-22.45171 73.25818,-24.09643 73.6834,-22.27736 73.63705,-24.13375 73.81319,-24.49292 73.71524,-24.40784 73.55146,-25.69375 73.95196,-24.69392 73.52306,-25.21862 73.39608,-23.22319 73.23543,-24.85397 73.31055,-22.87068 73.15957,-24.41366 73.02441,-25.74364 73.19809,-25.41068 73.3496,-25.84574 73.24432,-27.3162 73.50385,-26.35393 73.24327,-27.69605 73.12244,-27.35569 73.12112,-27.3447 72.97363,-27.23481 73.13902,-26.08953 73.1995,-25 73.01083,-26.2444 72.77463,-27.4031 72.83974,-26.42349 72.78356,-26.78502 72.70955,-26.33312 72.74647,-26.42895 72.57894,-25.52929 72.83907,-24.71549 72.68829,-24.65984 72.52517,-24.87871 72.46775,-26.30881 72.38677,-25.24635 72.39455,-25.54598 72.0267,-25.21232 72.35236,-24.55699 72.41786,-22.5061 71.91082,-23.14008 71.62605,-21.90918 71.73267,-22.56562 71.45732,-22.42601 71.24445,-21.765 71.49272,-21.83862 71.30773,-21.61362 71.32686,-21.94951 71.26789,-21.71311 71.11799,-22.33149 71.05215,-21.68026 71.07487,-22.01398 70.96871,-21.60328 70.95948,-21.91793 70.80227,-21.53272 70.71065,-21.79149 70.56614,-21.47547 70.5371,-22.40204 70.45303,-22.51227 70.85562,-22.62911 70.43879,-23.37208 70.44881,-24.08279 70.69372,-24.6111 71.33912,-25.8384 71.4584,-25.42752 71.2716,-26.76429 70.93672,-27.53107 70.9398,-27.93192 71.14745,-27.62672 70.94726,-28.42991 70.97313,-27.9202 70.87489,-28.18025 70.63155,-29.26052 70.45469,-28.14555 70.46027),(-33.7826 82.87383,-27.40449 83.14713,-33.62451 83.14703,-32.54295 83.0432,-35.63765 82.91679,-35.28968 82.90237,-35.58089 82.7587,-33.7826 82.87383),(-52.375187 67.778817,-52.97591 67.69319,-50.16449 67.45318,-50.69578 67.64301,-51.2975 67.73514,-50.15227 67.85117,-50.81799 67.86457,-51.17954 67.75042,-51.38514 67.86927,-51.04343 67.98149,-51.627909 67.93823,-51.31668 67.80476,-51.73619 67.6855,-52.375187 67.778817),(-26.23754 71.4972,-27.35974 71.7074,-28.4663 71.54572,-26.23754 71.4972),(-52.0521 67.34005,-51.20815 67.12019,-50.36268 67.17007,-51.207 67.12654,-51.55331 67.35231,-51.09772 67.41582,-52.0521 67.34005),(-51.27444 68.30428,-50.81928 68.50327,-51.62458 68.41907,-51.27444 68.30428),(-26.23754 71.4972,-25.8384 71.4584,-26.23754 71.4972),(-51.27444 68.30428,-51.33354 68.27843,-51.27444 68.30428),(-33.7826 82.87383,-33.78602 82.87215,-33.7826 82.87383)),((-52.97591 67.69319,-53.29626 67.60654,-52.97591 67.69319)),((-53.53165 67.2226,-52.0521 67.34005,-53.53165 67.2226)),((-26.95507 83.15107,-27.40449 83.14713,-26.95507 83.15107)),((-54.26654 69.93257,-54.78088 70.03835,-54.81676 70.22186,-53.29022 70.20001,-51.84831 69.64091,-53.85342 69.26327,-54.22256 69.45567,-53.38759 69.44254,-53.59248 69.46542,-53.36069 69.58073,-53.79931 69.45777,-54.9934 69.70049,-54.39809 69.67743,-54.94343 69.83913,-54.26654 69.93257)),((-24.20613 72.87333,-23.50274 73.03796,-21.98338 72.94053,-22.19094 72.81561,-21.87298 72.71885,-23.03228 72.79561,-21.92968 72.42393,-22.74426 72.44869,-22.03206 72.27174,-22.69777 72.17223,-24.40764 72.61176,-24.51589 72.84647,-24.20613 72.87333)),((-47.56549 82.60365,-46.19449 82.65955,-44.4143 82.3645,-45.12329 82.21884,-44.69842 82.09728,-45.0113 82.05331,-47.56549 82.60365)),((-18.84585 75.25514,-18.0426 75.42302,-17.81165 75.30054,-18.20919 75.21754,-17.32105 75.12432,-17.62654 74.92715,-18.77809 74.98763,-18.84585 75.25514)),((-45.6722 82.87822,-46.95057 82.95763,-46.02589 82.91138,-46.76864 83.00266,-46.03219 83.0967,-44.90423 82.8643,-45.6722 82.87822)),((-20.12174 75.01055,-19.74716 74.85922,-20.07422 74.70508,-20.67638 74.81385,-20.48385 75.02602,-20.12174 75.01055)),((-51.54631 81.96103,-53.41801 82.23185,-52.76576 82.30508,-51.54631 81.96103)),((-51.23862 69.92619,-50.674 69.85931,-51.15369 69.51058,-51.39348 69.72424,-51.01506 69.89031,-51.23862 69.92619)),((-18.83618 76.55819,-18.46059 75.94325,-19.17009 76.47566,-18.83618 76.55819)),((-19.0248 82.02837,-18.61792 81.84016,-18.81014 81.79662,-19.56583 82.05766,-19.0248 82.02837)),((-55.23654 72.84,-54.93779 72.81406,-55.19822 72.67501,-55.8481 72.62366,-55.23654 72.84)),((-19.62635 80.02088,-19.36048 80.21169,-18.67136 80.13188,-19.62635 80.02088)),((-53.17135 71.33792,-52.34462 71.28054,-52.97269 71.15108,-53.17135 71.33792)),((-41.41479 63.35833,-41.33729 63.34188,-41.10471 63.19713,-41.43771 63.22081,-41.8814 63.43295,-41.41479 63.35833)),((-48.05143 82.77119,-48.45181 82.80066,-48.33594 82.89301,-47.49111 82.7963,-48.05143 82.77119)),((-17.58673 77.80525,-18.21959 77.63401,-17.92962 77.85815,-17.58673 77.80525)),((-17.63455 79.02203,-17.95078 78.99835,-17.5793 79.17499,-17.37508 79.0665,-17.63455 79.02203)),((-19.28531 78.67429,-19.56787 78.77731,-18.97851 78.84709,-19.28531 78.67429)))
+MULTIPOLYGON(((-16.56014 13.58879,-15.48113 13.58728,-15.07115 13.82657,-13.80755 13.38672,-14.36912 13.22905,-15.1106 13.58946,-15.29622 13.36043,-15.80781 13.34109,-15.81226 13.1591,-16.75583 13.06425,-16.68503 13.48858,-16.45518 13.2689,-15.58562 13.47499,-16.41561 13.3264,-16.56014 13.58879)))
+MULTIPOLYGON(((-13.70903 12.67622,-13.07347 12.63898,-13.0606 12.47781,-12.35323 12.30727,-11.37946 12.41356,-11.46411 12.13361,-11.24695 11.99247,-10.9286 12.22242,-10.69021 11.893,-10.33932 12.22548,-9.699758 12.02382,-9.340386 12.24292,-9.362003 12.49567,-9.034279 12.42307,-8.80539 12.00517,-8.854325 11.62834,-8.37589 11.36748,-8.677261 10.95531,-8.323532 11.0482,-8.261836 10.47687,-7.978548 10.17511,-8.149226 9.532056,-7.849985 9.437742,-7.919881 9.186895,-7.736526 9.078054,-7.961311 8.810396,-7.641071 8.377432,-8.240768 8.460761,-8.243995 8.228629,-7.945582 8.012988,-8.193576 7.545011,-8.472179 7.554582,-8.666122 7.693086,-8.848072 7.263333,-9.104451 7.193552,-9.211778 7.385181,-9.477838 7.362011,-9.343918 7.748662,-9.480072 8.376794,-9.77296 8.551791,-10.28686 8.484799,-10.71892 8.27101,-10.46939 8.67458,-10.73339 9.084249,-10.66331 9.30055,-11.20675 10.00043,-12.43174 9.881638,-12.78951 9.300714,-13.30763 9.037539,-13.32463 9.338552,-13.72582 9.503187,-13.5682 9.770332,-13.76004 9.779703,-13.68374 9.938039,-13.81432 9.839963,-14.04811 10.1532,-14.45648 10.20833,-14.66708 10.47467,-14.541 10.81716,-14.70327 10.63254,-14.75263 10.97044,-14.92662 11.05454,-14.66538 11.50674,-13.71343 11.70982,-13.70556 12.00434,-13.96502 12.19151,-13.66319 12.31524,-13.70903 12.67622)))
+MULTIPOLYGON(((-61.50909 16.38901,-61.46194 16.51685,-61.16898 16.25104,-61.50312 16.21101,-61.50909 16.38901)),((-61.6709 16.32425,-61.55082 16.05427,-61.69314 15.94776,-61.80717 16.27585,-61.6709 16.32425)))
+MULTIPOLYGON(((9.8123725033182 2.3423616497371,10.032578305808 2.15922444068786,11.3356457744242 2.17109891548586,11.3358169934549 1.00895568226423,9.65436453163893 1.07021380437662,9.33364711513291 1.18224960271446,9.80541597481996 1.93102517288593,9.8123725033182 2.3423616497371)),((8.86137064137851 3.74265725994811,8.66677819870317 3.19892266466099,8.4279347011417 3.26218624923094,8.67203462294413 3.75590993366243,8.86137064137851 3.74265725994811)))
+MULTIPOLYGON(((22.94867 41.34562,24.5423 41.57489,25.33353 41.24466,26.13499 41.36612,26.06927 41.71579,26.36189 41.71968,26.63687 41.35608,26.33243 41.26126,26.35771 40.95393,26.04115 40.74553,25.15605 41.00514,23.8556 40.79778,23.70548 40.67533,23.8704 40.42207,24.40636 40.16606,23.74212 40.36008,23.99912 40.12073,23.93617 39.9391,23.40856 40.28523,23.75336 39.92299,23.3605 39.95621,23.31954 40.23159,22.82742 40.48318,22.95872 40.63184,22.60129 40.4915,22.59789 40.02324,23.35318 39.18967,23.06023 39.09605,23.22033 39.19235,22.93881 39.36161,22.82284 39.22221,23.05827 39.02071,22.5245 38.86047,24.07553 38.20406,24.03009 37.65218,23.57774 38.0475,23.00382 37.86118,23.52091 37.43631,23.16991 37.28865,22.72132 37.56178,23.19774 36.43824,22.62776 36.80886,22.48725 36.39054,22.1484 37.0211,21.93266 36.98443,21.88299 36.72033,21.70795 36.81683,21.65293 37.43657,21.10634 37.85333,21.37129 38.21561,21.85617 38.33976,22.86103 37.94213,23.22748 38.15472,22.41657 38.44308,21.49081 38.30099,21.35494 38.43558,21.15797 38.29834,21.09926 38.43034,20.73259 38.85539,21.17361 38.86879,21.11843 39.04126,20.73074 38.95249,20.00683 39.69328,20.25783 39.67355,20.30562 39.98825,20.69255 40.11284,21.05243 40.57025,21.00006 40.86164,22.72656 41.14888,22.94867 41.34562)),((26.04521 35.22865,26.31555 35.3095,26.14713 35.00499,24.73855 34.92517,24.39129 35.19379,23.5205 35.29219,23.74733 35.69273,24.32897 35.35386,25.77174 35.34311,25.81339 35.11456,26.04521 35.22865)),((23.47596 38.83876,24.15096 38.6576,24.25156 38.2353,24.59016 38.15908,24.55712 37.98051,23.19374 38.83964,22.83576 38.82952,23.30401 39.04393,23.47596 38.83876)),((25.90916 39.29025,26.34688 39.39348,26.61927 39.03311,26.16331 39.01029,26.29281 39.18812,25.95476 39.10683,25.90916 39.29025)),((20.44531 38.33776,20.58158 38.46497,20.79726 38.06824,20.33934 38.18163,20.44531 38.33776)),((28.22038 36.36724,27.75582 35.88139,27.6902 36.15646,28.22038 36.36724)),((19.70205 39.83864,19.86204 39.81829,19.92215 39.67818,20.10249 39.43773,19.90227 39.43773,19.82228 39.59819,19.64194 39.77852,19.70205 39.83864)),((27.17498 35.92854,27.23509 35.76808,27.21475 35.54798,27.23509 35.44764,27.11487 35.40741,26.87442 35.38752,26.99464 35.4874,27.13475 35.52763,27.09452 35.64786,27.17498 35.92854)),((25.99062 38.39549,25.84592 38.57217,26.16125 38.53859,26.0128 38.15358,25.86854 38.25405,25.99062 38.39549)),((25.1528 40,25.44839 39.98299,25.34782 39.78173,25.04693 39.8343,25.1528 40)),((26.85138 37.82038,27.00591 37.80098,27.11205 37.80098,27.07347 37.75259,26.98651 37.70443,26.85138 37.65604,26.74502 37.73342,26.65805 37.69462,26.59049 37.71402,26.59049 37.76241,26.76442 37.82997,26.85138 37.82038)),((20.70362 37.91364,20.92419 37.83365,20.9843 37.75319,20.86407 37.63297,20.7235 37.75319,20.64351 37.83365,20.70362 37.91364)),((24.65025 40.78102,24.8107 40.72091,24.83059 40.64045,24.71036 40.52022,24.55037 40.64045,24.55037 40.74079,24.65025 40.78102)),((24.77406 38.00412,24.89001 37.90734,24.95757 37.90734,25.00596 37.76241,24.94799 37.69462,24.73548 37.87836,24.69691 37.94614,24.77406 38.00412)),((25.45996 37.13381,25.55673 37.1822,25.6049 37.09524,25.57591 36.98887,25.46977 36.90191,25.3924 37.01786,25.36341 37.07584,25.45996 37.13381)),((20.625 38.82915,20.7024 38.86902,20.7024 38.75176,20.69536 38.68844,20.69536 38.61808,20.63204 38.58055,20.59217 38.6345,20.53823 38.57117,20.53823 38.67437,20.5781 38.78225,20.625 38.82915)),((22.92733 36.39002,23.10766 36.28968,23.08778 36.16945,23.00778 36.12922,22.92733 36.18933,22.92733 36.39002)),((26.9961 36.81472,27.15085 36.88251,27.25699 36.92109,27.32478 36.86311,27.10246 36.76656,26.98651 36.77615,26.93834 36.68918,26.88996 36.74716,26.9961 36.81472)),((26.09769 37.64623,26.19425 37.64623,26.29102 37.69462,26.33919 37.69462,26.27162 37.61724,26.14608 37.55927,26.01073 37.53028,25.94317 37.52069,26.01073 37.60765,26.09769 37.64623)),((24.48418 38.99038,24.55197 38.9614,24.58096 38.88402,24.67751 38.77766,24.53257 38.78724,24.52298 38.85503,24.4262 38.88402,24.4262 38.9614,24.48418 38.99038)),((25.04454 37.68503,25.27644 37.63664,25.22828 37.52069,24.99637 37.64623,24.99637 37.69462,25.04454 37.68503)),((25.10251 37.09524,25.23787 37.15321,25.22828 37.05644,25.1703 37.00827,25.07353 37.00827,25.00596 36.95988,24.9384 36.97906,25.01555 37.03726,25.10251 37.09524)),((26.80299 37.1822,26.89955 37.08543,27.04449 36.99846,27.0155 36.95007,26.88996 36.95007,26.88996 37.00827,26.75461 37.1822,26.80299 37.1822)),((24.51317 36.86311,24.57114 36.86311,24.52298 36.78574,24.52298 36.71817,24.4262 36.68918,24.28126 36.68918,24.32006 36.77615,24.40703 36.76656,24.48418 36.78574,24.51317 36.86311)),((25.81763 36.86311,25.96234 36.95007,26.05912 36.9309,25.91418 36.82454,25.79823 36.78574,25.72085 36.81472,25.81763 36.86311)),((24.32006 37.69462,24.39721 37.68503,24.39721 37.62706,24.33924 37.56908,24.30066 37.53987,24.26209 37.55927,24.26209 37.61724,24.32006 37.69462)),((23.64375 39.20311,23.7403 39.13532,23.82727 39.13532,23.83685 39.10633,23.73071 39.04836,23.64375 39.11592,23.64375 39.20311)),((25.26686 36.79555,25.38281 36.71817,25.34401 36.63099,25.26686 36.71817,25.22828 36.73735,25.26686 36.79555)))
+MULTIPOLYGON(((-89.14696 17.8095,-89.22346 15.89967,-88.93882 15.89004,-88.61941 15.69048,-88.59233 15.96096,-88.2232 15.72008,-89.15445 15.0653,-89.15538 14.57221,-89.34995 14.42176,-89.57234 14.40572,-89.52058 14.22222,-90.12866 13.73827,-91.31594 13.95284,-92.24149 14.53962,-92.05993 15.07075,-92.21432 15.26208,-91.72518 16.0801,-90.42336 16.09669,-90.38557 16.40808,-91.43755 17.25004,-90.99025 17.2585,-90.98163 17.81522,-89.14696 17.8095)))
+MULTIPOLYGON(((144.6733 13.26691,144.6399 13.48407,144.8905 13.601,144.6733 13.26691)))
+MULTIPOLYGON(((-16.71754 12.32819,-15.66585 12.4283,-15.17925 12.68079,-13.70903 12.67622,-13.66319 12.31524,-13.96502 12.19151,-13.70556 12.00434,-13.71343 11.70982,-14.66538 11.50674,-14.92662 11.05454,-14.9316 11.04646,-14.95219 10.97312,-14.95698 10.97378,-14.97658 10.97648,-15.11668 10.9652,-14.99552 11.21057,-15.22874 11.07393,-15.35382 11.40649,-15.51723 11.3396,-15.28599 11.62508,-14.97517 11.58834,-15.22389 11.75911,-15.48492 11.6215,-15.03174 11.97414,-15.96125 11.73463,-15.88122 11.94545,-16.38612 12.07134,-16.13909 12.29314,-16.47266 12.17658,-16.71754 12.32819)))
+MULTIPOLYGON(((-59.99787 8.557567,-58.4854 7.366343,-58.61452 6.41889,-58.41235 6.871654,-58.03988 6.818614,-57.14622 5.999986,-57.34863 5.312995,-57.19182 5.169795,-57.87356 4.904678,-58.0864 4.131202,-57.67311 3.381816,-57.30506 3.373516,-57.2044 2.833982,-56.48025 1.941472,-57.3024 1.990075,-57.55563 1.695373,-58 1.665301,-58.00851 1.500673,-58.32467 1.590138,-58.80411 1.17508,-59.25275 1.397388,-59.7539 1.860766,-59.72432 2.276611,-59.99205 2.726567,-59.8651 3.560974,-59.51631 3.939903,-59.67398 4.381637,-60.16332 4.52116,-59.96942 5.073079,-60.12056 5.243235,-60.73177 5.19614,-61.39627 5.961447,-61.11466 6.199507,-61.14338 6.717797,-60.28549 7.074996,-60.61609 7.206539,-60.71212 7.539176,-59.80846 8.273121,-59.99787 8.557567)))
+MULTIPOLYGON(((114.0369 22.50504,114.2354 22.55644,114.1892 22.37235,114.4032 22.41155,114.2957 22.25342,113.9186 22.37282,114.0369 22.50504)))
+MULTIPOLYGON(((73.49461 -53.01786,73.85915 -53.10776,73.482 -53.1899,73.2533 -52.98622,73.49461 -53.01786)))
+MULTIPOLYGON(((-88.2232 15.72008,-87.72701 15.92312,-86.92149 15.74986,-86.36485 15.77617,-85.93369 15.926,-86.03465 16.02559,-85.45474 15.86028,-85.01488 15.98707,-84.30397 15.81543,-83.15781 14.99208,-84.46906 14.61453,-84.89904 14.80938,-85.18357 14.25056,-85.75548 13.8319,-86.01214 14.07706,-86.34616 13.76178,-86.76284 13.77312,-86.70654 13.29538,-87.31461 12.98241,-87.46735 13.27842,-87.42423 13.3631,-87.39264 13.38208,-87.81824 13.40119,-87.75652 13.8623,-88.4948 13.85812,-89.34995 14.42176,-89.15538 14.57221,-89.15445 15.0653,-88.2232 15.72008)))
+MULTIPOLYGON(((16.65091 46.53329,17.86854 45.76926,18.44096 45.74571,18.82852 45.89342,18.95427 45.6406,19.06093 45.33828,19.43422 45.23163,19.11425 45.16066,19.06093 45.00027,19.16758 44.96499,19.08731 44.85201,18.84762 44.87598,18.65236 45.07165,18.43905 45.10733,18.03008 45.14261,17.79913 45.03596,17.69248 45.14261,17.2835 45.1783,16.92826 45.23163,16.82161 45.21399,16.46596 45.21399,16.3593 44.98263,16.07503 45.12497,16.00406 45.24927,15.73743 45.1783,15.75507 44.87598,15.80839 44.73363,15.91505 44.73363,16.07503 44.57365,16.21737 44.23565,16.59066 43.89763,16.89257 43.66628,17.24822 43.47061,17.39015 43.2573,17.69248 42.97262,17.85246 42.90165,18.13673 42.70598,18.38573 42.61697,18.52357 42.584,18.51002 42.56364,18.43905 42.54559,18.5575 42.40775,18.50661 42.43169,17.73295 42.79568,17.00358 43.00785,17.70711 42.8816,16.88874 43.39784,15.9609 43.50254,15.97907 43.90528,15.69571 43.76876,15.14007 44.19426,15.27213 44.33268,15.62655 44.14614,14.98721 44.57682,14.84465 45.11316,14.54348 45.30357,14.30443 45.33355,13.9051 44.77005,13.49747 45.47862,13.8063 45.41586,14.00036 45.47583,14.41847 45.49065,14.58289 45.64025,14.85175 45.47583,14.95619 45.52064,15.23987 45.44584,15.3743 45.62508,15.3743 45.7895,15.64316 45.87946,15.68797 45.98391,15.55354 46.14832,15.64316 46.19313,15.80758 46.2083,16.06127 46.32756,16.10608 46.38754,16.28532 46.38754,16.30014 46.53714,16.50937 46.52197,16.65091 46.53329)))
+MULTIPOLYGON(((-71.7578 19.70272,-71.78707 19.33363,-71.61336 19.20164,-71.88239 18.9543,-71.73773 18.73045,-72.00349 18.62527,-71.69286 18.34117,-71.75405 18.03015,-72.03558 18.22021,-73.38584 18.27442,-73.87939 18.02103,-74.47858 18.41937,-74.19939 18.68184,-72.88028 18.42488,-72.34834 18.53638,-72.81721 19.04432,-72.69473 19.45916,-73.36245 19.62543,-73.40799 19.84048,-72.81625 19.95057,-71.7578 19.70272)))
+MULTIPOLYGON(((22.13036 48.3819,22.90599 47.95905,22.03673 47.53268,21.17978 46.30436,20.26995 46.12806,19.57521 46.17799,18.82852 45.89342,18.44096 45.74571,17.86854 45.76926,16.65091 46.53329,16.11189 46.87151,16.51555 47.00671,16.44933 47.40102,16.71279 47.53454,16.44964 47.69149,17.09076 47.71126,17.16273 48.00808,17.78487 47.73532,18.68 47.75199,18.86988 47.80854,18.83232 48.04372,19.63655 48.24422,19.93207 48.13028,20.51103 48.54143,21.4518 48.58484,21.72957 48.35518,22.13036 48.3819)))
+MULTIPOLYGON(((-23.46942 66.02618,-23.55333 66.1254,-22.98991 66.01614,-22.84542 65.89241,-22.68245 66.05091,-22.66644 65.82387,-22.53407 65.97375,-22.47002 65.83935,-22.38589 66.09045,-22.98359 66.21464,-22.37324 66.26727,-23.20143 66.35029,-22.94453 66.46739,-22.41729 66.45931,-21.32641 66.00092,-21.60987 65.95439,-21.28761 65.92573,-21.35364 65.72963,-21.78558 65.76366,-21.30206 65.59778,-21.47668 65.44579,-21.19975 65.43414,-21.07954 65.15491,-20.94641 65.57841,-20.67199 65.68942,-20.37893 65.52882,-20.42806 66.08151,-20.09644 66.1172,-19.4501 65.72404,-19.46036 66.04275,-18.80056 66.19163,-18.07023 65.64036,-18.30614 66.16427,-17.40607 65.95537,-17.14587 66.20623,-16.66784 66.12196,-16.43267 66.13537,-16.44503 66.51932,-16.01746 66.53373,-15.38129 66.13844,-14.54198 66.37646,-15.18042 66.10503,-14.61395 65.99041,-14.90228 65.75747,-13.69155 65.55268,-13.66756 65.3706,-13.99783 65.27134,-13.57067 65.2679,-13.996 65.18927,-13.49582 65.07482,-14.22674 65.03012,-13.69307 64.9107,-14.04165 64.93161,-13.75467 64.86849,-14.22622 64.68867,-14.49288 64.79352,-14.2529 64.64355,-14.47059 64.53272,-15.03282 64.25318,-15.49601 64.39551,-15.47246 64.23507,-16.80174 63.79494,-17.00074 63.93982,-17.23638 63.80868,-17.05948 63.78155,-18.01537 63.81412,-17.86558 63.62949,-19.14395 63.40562,-20.16836 63.53274,-20.79489 63.76771,-20.66478 63.92621,-20.81959 63.77448,-21.2107 63.88039,-20.99189 63.94674,-22.71504 63.79833,-22.70471 64.07153,-21.94545 64.06384,-21.69043 64.1777,-21.8329 64.29293,-21.35866 64.38608,-22.10282 64.31048,-21.76225 64.57921,-22.17202 64.45873,-22.33466 64.68878,-24.06094 64.8808,-21.81585 65.01991,-21.71866 65.17029,-22.56744 65.16341,-21.69249 65.45361,-22.28804 65.43836,-22.10897 65.59915,-24.54234 65.49426,-24.32251 65.6371,-23.79729 65.53337,-24.10838 65.80081,-23.26312 65.68241,-23.87907 65.88198,-23.19849 65.83522,-23.82732 66.02974,-23.46942 66.02618)))
+MULTIPOLYGON(((109.6417 2.081388,109.6592 1.619646,110.5719 0.855222,111.2186 1.088406,111.8283 0.987671,112.4924 1.577371,112.9943 1.578012,112.9738 1.407019,113.6582 1.210515,113.9698 1.446303,114.5663 1.433472,114.8729 1.922119,114.8113 2.264977,115.2373 2.511148,115.0891 2.823322,115.5618 3.159515,115.5595 3.917913,115.8762 4.389797,117.2388 4.373793,117.5858 4.17752,117.3947 4.104475,117.8333 3.704301,117.0194 3.601971,117.6199 3.495893,117.2274 3.487141,118.099 2.285805,117.7615 2.016922,117.8388 1.8317,118.9958 1.022845,118.7942 0.797073,118.3584 0.805793,117.8851 1.12195,118.031 0.788065,117.7569 0.76596,117.4724 0.15878,117.453 -0.390635,117.634 -0.425977,117.4449 -0.672159,117.6097 -0.791409,117.3414 -0.91429,117.288 -0.756236,116.901 -1.273525,116.7387 -1.057364,116.7597 -1.368607,116.2058 -1.783018,116.4469 -1.773103,116.3128 -2.135445,116.454 -2.16662,116.6003 -2.19891,116.1966 -2.942306,116.1741 -3.285381,116.1381 -3.307326,116.136 -3.343464,115.9577 -3.615326,114.6461 -4.188225,114.5339 -3.345182,114.4719 -3.502592,114.0981 -3.275024,113.6319 -3.464067,113.6132 -3.15517,113.3447 -3.283297,113.0269 -2.936992,113.0321 -3.144436,112.6309 -3.410052,112.2359 -3.310372,111.8808 -3.570069,111.7 -2.804117,111.541 -3.040402,111.4138 -2.90217,110.9304 -3.096985,110.6219 -3.054545,110.6039 -2.867153,110.2266 -2.971627,110.125 -2.038915,109.8964 -1.838918,110.0811 -1.411488,109.9562 -1.121264,109.7587 -1.019303,109.7428 -0.998937,109.2507 -0.81042,109.2501 -0.661919,109.5688 -0.740737,109.1148 -0.517509,109.2 0.053827,108.9117 0.317856,108.839 0.814596,109.0515 1.523634,109.6417 2.081388)),((100.9268 1.856497,100.935 1.860658,100.7702 2.224259,101.0466 2.289879,101.4033 1.707079,102.1575 1.367923,102.4055 0.816251,102.8817 0.73381,103.1097 0.446135,102.6976 0.215476,103.3339 0.543288,103.7226 0.286564,103.8109 0.004425,103.4368 -0.20343,103.7714 -0.347089,103.3733 -0.722477,103.7477 -1.012227,104.3613 -1.021747,104.4581 -1.935812,104.8669 -2.074599,104.6336 -2.389143,104.7209 -2.585658,104.8517 -2.292364,105.611 -2.395448,105.8137 -2.920509,106.0479 -2.997278,105.8182 -3.71465,105.957 -3.839156,105.7965 -5.792992,105.7141 -5.909359,105.288 -5.443848,105.2173 -5.787442,104.55 -5.512948,104.7288 -5.931019,104.5513 -5.930291,103.7228 -4.969719,102.2849 -3.979338,102.216 -3.670946,100.8867 -2.333125,100.3276 -0.865789,99.65638 0.039026,99.13891 0.251739,98.79923 1.720059,97.78893 2.240896,97.60357 2.869762,96.87305 3.687165,96.49667 3.751369,95.41193 4.817936,95.18967 5.522778,95.43145 5.65644,96.38824 5.214849,97.51366 5.246362,97.90357 4.884578,97.96084 4.527452,98.28915 4.421815,98.16736 4.157561,99.75997 3.172256,100.1289 2.52239,100.2258 2.701185,100.9268 1.856497)),((139.4299 -7.21115,138.5487 -6.953701,139.0828 -6.91857,138.4045 -6.344897,138.2454 -5.877429,138.4043 -5.741106,138.0585 -5.727854,138.1534 -5.453088,137.7074 -5.177695,137.5565 -5.110066,137.4602 -4.952026,137.4126 -5.105817,137.318 -4.96523,135.1772 -4.435026,134.6304 -4.111171,134.9472 -3.914259,134.5123 -4.024375,134.3437 -3.864351,134.3059 -4.025395,134.1516 -3.736306,134.0222 -3.816791,133.6323 -3.471212,133.6923 -3.195787,133.4663 -3.549077,133.2501 -4.069128,132.8997 -4.086795,132.7236 -3.640093,132.9296 -3.549771,132.8371 -3.296674,131.9426 -2.781653,132.7215 -2.813688,133.2519 -2.410754,133.3913 -2.510615,133.2767 -2.703947,133.4391 -2.509702,133.601 -2.628564,133.644 -2.808288,133.7089 -2.502631,133.8009 -2.604163,133.8093 -2.619447,133.8112 -2.550296,133.8085 -2.538123,133.9032 -2.460743,134.041 -2.378235,134.0555 -2.362239,133.9214 -2.192686,133.9626 -2.047041,133.798 -2.137251,132.304 -2.290982,132.0936 -2.016249,131.9188 -1.869633,132.0234 -1.675048,131.8805 -1.656041,131.972 -1.509944,131.7207 -1.517375,131.7223 -1.514881,131.5254 -1.480447,131.5887 -1.34423,131.448 -1.517668,131.3429 -1.347232,131.2081 -1.532779,130.9396 -1.448196,131.2283 -0.826661,132.7103 -0.359109,134.1508 -0.862349,134.0257 -0.95362,134.291 -1.354152,134.154 -1.907014,134.1581 -1.922511,134.464 -2.857567,134.6439 -2.483087,134.8709 -3.245714,135.3409 -3.393879,135.9208 -2.986668,136.4098 -2.211005,137.2864 -2.10383,137.256 -1.911406,137.2542 -1.904951,137.1989 -1.82862,137.1914 -1.813877,137.9291 -1.469803,139.7508 -2.356036,140.999 -2.608743,141.0003 -6.31305,140.8429 -6.611421,141.0218 -6.898336,141.0214 -9.131344,140.3833 -8.469405,140.2309 -8.368771,139.9339 -8.129582,140.1484 -7.858081,139.8607 -8.116987,139.3613 -8.163068,139.2563 -8,138.948 -8.255133,139.1298 -7.565531,138.6753 -7.203467,139.4299 -7.21115)),((133.7219 -3.149508,133.6923 -3.195787,133.7219 -3.149508)),((125.2275 1.472993,124.4661 0.448734,123.6281 0.271407,123.0685 0.529858,120.5137 0.526934,120.1329 0.187793,120.06 -0.632907,120.5077 -0.986457,120.6791 -1.419575,121.0959 -1.423707,121.6103 -0.803237,121.9401 -0.981518,122.2009 -0.775112,122.9579 -0.748518,122.7176 -0.659124,123.054 -0.561298,123.4563 -0.769121,123.3416 -1.042975,123.0974 -0.832567,122.7948 -0.945312,122.3868 -1.49776,121.6613 -1.943879,121.2895 -1.853133,122.3136 -2.905743,122.4777 -3.165916,122.2038 -3.616509,122.6655 -3.896488,122.5312 -3.969648,122.6801 -4.154491,122.8464 -4.062827,122.8932 -4.393916,122.0896 -4.535966,121.9856 -4.89656,121.5778 -4.785447,121.6032 -4.059939,120.881 -3.532354,121.0871 -2.718576,120.8069 -2.623637,120.1914 -2.970125,120.4112 -3.255863,120.4296 -4.678784,120.2657 -5.138552,120.4658 -5.621928,119.4229 -5.58476,119.6298 -3.973415,119.4191 -3.461248,118.9354 -3.572695,118.7525 -2.782486,119.1444 -2.47298,119.3316 -1.964087,119.3326 -1.174551,119.7373 -0.645166,119.8782 -0.857212,119.8118 -0.139942,119.6121 -0.010906,119.8424 -0.101705,119.7755 0.22187,120.0465 0.718429,120.2832 0.982884,120.5909 0.760178,120.9112 1.354875,122.8469 0.805428,122.9734 0.966245,123.9415 0.832896,124.584 1.195822,124.535 1.357874,124.9666 1.738123,125.2275 1.472993)),((112.7013 -8.437901,112.6948 -8.439592,110.7107 -8.201706,108.8719 -7.605248,108.3401 -7.814145,106.4078 -7.379401,106.5187 -6.969193,105.4796 -6.807122,106.0364 -5.873757,108.2951 -6.242659,108.6963 -6.811722,110.3713 -6.973555,110.9123 -6.397272,111.1707 -6.7036,112.5511 -6.861817,112.9478 -7.669765,113.2931 -7.792129,114.0425 -7.615606,114.4379 -7.790659,114.3527 -8.53114,114.6 -8.710374,114.2383 -8.605833,113.2375 -8.283751,112.7013 -8.437901)),((124.1143 -10.16846,123.4523 -10.36439,123.7535 -10.05713,123.5679 -10.02652,123.6583 -9.633697,125.0997 -8.752322,125.2849 -8.847486,125.1285 -8.647179,127.2943 -8.397074,126.4702 -8.951621,125.374 -9.27804,124.4857 -10.10442,124.1143 -10.16846)),((127.9185 2.159569,128.0691 2.191294,127.8406 1.853614,128.0159 1.31513,127.6531 0.875979,127.8762 0.820619,128.1671 1.367971,128.7284 1.546142,128.703 1.070277,128.1946 0.801879,128.9091 0.207443,127.9603 0.482091,127.8635 0.300212,128.0468 -0.422707,128.4363 -0.920513,127.6628 -0.229606,127.6323 0.853512,127.391 1.059648,127.5699 1.758012,127.9185 2.159569)),((129.6191 -2.810791,130.5644 -3.114848,130.8285 -3.451581,130.8452 -3.873016,129.9066 -3.334303,129.5186 -3.29356,129.5307 -3.469759,128.8772 -3.197397,128.4559 -3.455557,128.1747 -3.057812,127.9134 -3.568954,127.8338 -3.158372,128.1661 -2.85906,129.0434 -2.7969,129.1274 -2.966905,129.6191 -2.810791)),((117.8895 -8.099442,118.2781 -8.372096,118.6452 -8.297636,118.6465 -8.55589,118.7637 -8.313971,119.0006 -8.316621,119.1396 -8.757843,118.4182 -8.868382,118.3943 -8.608338,117.8871 -8.943034,117.0263 -9.112103,116.7193 -8.971774,116.828 -8.518329,117.127 -8.364887,117.5692 -8.411745,117.8083 -8.729995,118.2523 -8.669119,117.6932 -8.239166,117.8895 -8.099442)),((123.009 -8.322679,122.7783 -8.428374,122.8187 -8.599476,121.7858 -8.896641,119.8065 -8.767161,119.862 -8.430293,120.4334 -8.231742,121.5004 -8.626773,122.0031 -8.433077,122.4567 -8.60618,122.88 -8.284707,122.7193 -8.225791,122.834 -8.074396,123.009 -8.322679)),((106.149 -2.090856,106.3622 -2.474618,106.845 -2.576815,106.5911 -2.894365,106.7369 -3.085875,105.945 -2.812951,105.757 -2.145321,105.1276 -2.087412,105.3853 -1.608835,105.5907 -1.530048,105.7916 -1.811156,105.6917 -1.529714,105.9101 -1.502093,106.149 -2.090856)),((138.2959 -8.402906,138.2874 -8.407409,137.6244 -8.422536,138.2143 -7.495863,138.669 -7.371625,139.1036 -7.564309,138.9553 -8.047141,138.2959 -8.402906)),((120.2778 -9.651771,120.8252 -10.02814,120.4528 -10.32221,119.6646 -9.782634,118.9387 -9.56801,119.9397 -9.283732,120.2778 -9.651771)),((126.6061 -3.063457,127.2598 -3.370298,127.2186 -3.66758,126.6928 -3.844355,126.1756 -3.602276,126.0184 -3.162229,126.6061 -3.063457)),((115.1572 -8.062587,115.7192 -8.391159,115.1638 -8.849496,114.4307 -8.179665,115.1572 -8.062587)),((116.1558 -8.351388,116.3435 -8.219005,116.7263 -8.353747,116.5773 -8.897724,115.8411 -8.81915,116.066 -8.772664,116.1558 -8.351388)),((113.7474 -6.882952,114.1223 -6.981162,113.5303 -7.248936,112.6741 -7.061266,112.8626 -6.889683,113.7474 -6.882952)),((97.81693 0.545709,97.05953 1.412042,97.40904 1.516504,97.8853 1.055496,97.81693 0.545709)),((123.1269 -4.717384,122.9254 -5.169833,123.215 -5.296303,122.6483 -5.701154,122.8647 -4.52009,123.0813 -4.366273,123.1269 -4.717384)),((107.6248 -2.606023,108.1851 -2.688966,108.1959 -3.143872,107.9743 -3.268104,107.8408 -3.057205,107.6073 -3.240922,107.6248 -2.606023)),((126.4273 -7.63068,126.8426 -7.735018,126.4724 -7.967912,125.7792 -8.011725,125.9443 -7.663583,126.4273 -7.63068)),((99.17957 -1.508052,99.25424 -1.782622,98.86172 -1.686982,98.64793 -0.992241,98.91953 -0.94647,99.17957 -1.508052)),((134.4155 -6.004848,134.2049 -5.708978,134.5021 -5.542168,134.5034 -5.54572,134.7024 -5.734791,134.7099 -5.735772,134.6325 -5.9813,134.7122 -6.02903,134.6151 -6.366838,134.3407 -6.178817,134.2735 -6.116869,134.4155 -6.004848)),((124.5717 -1.643565,125.3223 -1.879372,124.4022 -2.029361,124.3613 -1.699968,124.5717 -1.643565)),((122.3969 -5.070944,122.3707 -4.738174,122.7411 -4.644409,122.5991 -5.427899,122.5415 -5.258076,122.2828 -5.388706,122.3969 -5.070944)),((135.4377 -0.66069,135.88 -0.712989,136.3853 -1.101698,135.8798 -1.191841,135.7427 -0.787879,135.4836 -0.74467,135.5491 -0.883408,135.4377 -0.66069)),((131.2279 -7.553687,131.7097 -7.13711,131.3473 -7.983702,131.1056 -7.984068,131.2279 -7.553687)),((128.5224 2.580829,128.6899 2.465109,128.5686 2.107352,128.257 1.984516,128.1901 2.284296,128.5224 2.580829)),((135.9251 -1.641356,136.9069 -1.789967,136.232 -1.905224,135.4814 -1.680104,135.9251 -1.641356)),((102.6982 0.983687,103.035 0.682563,102.4443 0.924888,102.2128 1.403009,102.4908 1.227135,102.4585 0.92845,102.5472 1.11868,102.6598 1.017977,102.9736 1.089948,103.1351 0.820805,102.6982 0.983687)),((127.6303 -1.335111,128.1462 -1.691225,127.4188 -1.688151,127.4083 -1.42103,127.6303 -1.335111)),((124.9767 -8.159108,125.1085 -8.343347,124.3292 -8.422364,124.4635 -8.133295,124.9767 -8.159108)),((123.3836 -1.220799,123.5541 -1.282871,123.4544 -1.516691,123.292 -1.415775,123.1541 -1.639529,123.1461 -1.301808,122.8542 -1.587309,122.9012 -1.187582,123.1818 -1.157866,123.2393 -1.398993,123.3836 -1.220799)),((129.8887 -1.795571,130.345 -1.675565,130.4364 -1.980287,129.8992 -2.002939,129.7127 -1.884272,129.8887 -1.795571)),((127.2943 -0.521792,127.3171 -0.338487,127.5612 -0.322465,127.5979 -0.637763,127.9022 -0.797312,127.4695 -0.834976,127.2943 -0.521792)),((123.9177 -8.244354,123.5387 -8.579031,123.195 -8.52935,123.3954 -8.257503,123.9177 -8.244354)),((130.6475 -0.109906,131.0414 -0.023858,131.3334 -0.304008,130.9532 -0.3625,130.6475 -0.109906)),((107.9869 4.009458,108.236 4.221169,108.3995 3.961394,108.2981 3.657955,108.0891 3.676888,108.2809 3.710928,107.9869 4.009458)),((134.1656 -6.836565,134.105 -6.453737,134.2914 -6.656324,134.0877 -6.162454,134.5258 -6.581078,134.1656 -6.836565)),((131.0561 -1.168251,130.8592 -1.352052,130.638 -0.989307,131.0386 -0.927145,131.0561 -1.168251)),((116.142964 -3.351424,116.180028 -3.295117,116.3347 -3.738888,116.0924 -4.08303,116.142964 -3.351424)),((125.7877 -1.803772,126.35 -1.816954,125.4188 -1.95198,125.3686 -1.779667,125.7877 -1.803772)),((101.5911 2.069988,101.79 1.960159,101.6241 1.686206,101.3865 1.907348,101.5911 2.069988)),((104.5443 0.007856,104.9972 -0.306154,104.4338 -0.247322,104.5443 0.007856)),((95.7921 2.83274,96.4968 2.362147,95.7914 2.623433,95.7921 2.83274)),((102.5107 1.241529,101.995 1.610747,102.4649 1.518405,102.5107 1.241529)),((100.4503 -3.349013,100.185 -2.791292,100.4713 -3.026565,100.4503 -3.349013)),((121.9925 -5.155172,121.9509 -5.493283,121.7905 -5.262755,121.8841 -5.058366,121.9925 -5.155172)),((104.3472 -0.397982,104.5883 -0.467341,104.4998 -0.653567,104.3406 -0.670489,104.3472 -0.397982)),((123.9624 -8.341529,124.3093 -8.19349,124.1342 -8.537789,123.9624 -8.341529)),((128.1755 -3.56742,128.3411 -3.519277,128.2464 -3.738943,127.9291 -3.778539,128.1755 -3.56742)),((123.1161 -4.017374,123.2622 -4.087534,123.1213 -4.257167,122.9384 -4.072475,123.1161 -4.017374)))
+MULTIPOLYGON(((-7.46914 55.05043,-7.525289 55.28312,-7.251913 55.2827,-7.369507 55.38791,-6.923227 55.23738,-7.255213 55.06712,-7.405216 54.94457,-8.160958 54.43678,-7.550656 54.12475,-7.282304 54.12552,-7.032411 54.41945,-6.634315 54.04186,-6.266092 54.09651,-6.107816 54.00118,-6.403613 54.01521,-6.221015 53.79626,-6.339353 53.71866,-6.085886 53.55663,-6.209974 53.46759,-6.057437 53.36481,-6.236537 53.3622,-6.002564 52.96395,-6.514523 52.35198,-6.36582 52.17206,-6.928827 52.12389,-6.994727 52.28001,-8.00851 51.82772,-8.310498 51.89138,-8.319308 51.8453,-8.637495 51.74102,-8.532841 51.60956,-9.774042 51.45157,-9.456813 51.73584,-10.1593 51.61216,-9.748881 51.83235,-10.34159 51.78676,-10.18384 51.96445,-10.32225 51.95573,-9.751362 52.14962,-10.4546 52.19119,-9.72333 52.25878,-9.951208 52.41228,-9.623416 52.58303,-8.715978 52.66534,-8.958472 52.77181,-9.941096 52.56108,-8.979424 53.21976,-10.18829 53.41159,-10.02172 53.47262,-10.19256 53.55916,-9.694108 53.5998,-9.907255 53.76432,-9.546713 53.80319,-9.945444 53.87233,-9.8339 54.13009,-10.12756 54.09829,-10.11219 54.24703,-9.341279 54.33186,-9.138386 54.14283,-8.576988 54.32924,-8.119458 54.65449,-8.804006 54.7036,-8.267118 54.8727,-8.461501 54.92608,-8.287798 55.16141,-7.798321 55.22076,-7.519329 55.12454,-7.685642 54.9525,-7.46914 55.05043)))
+MULTIPOLYGON(((35.55973 32.39043,35.47559 31.48824,34.88395 31.39669,35.22941 31.75167,34.96389 31.84679,35.09043 32.47389,35.55973 32.39043)))
+MULTIPOLYGON(((78.94111 33.39008,79.18546 33.19123,79.40984 33.17877,79.56429 32.67076,79.25841 32.52338,78.97096 32.34428,78.73645 32.69593,78.41224 32.55606,78.47343 32.23766,78.74631 31.90719,78.88874 31.26903,79.07217 31.45461,79.40791 31.08637,79.95748 30.87472,80.25038 30.74959,80.22026 30.57917,81.05566 30.20446,80.36317 29.74552,80.0665 28.83346,81.89027 27.85854,82.70869 27.7071,82.76105 27.50681,83.31216 27.33275,84.1551 27.51991,84.62772 27.32822,84.64421 27.04913,85.20665 26.76708,85.62429 26.88045,85.85046 26.56794,86.34086 26.6219,86.72475 26.42732,87.06647 26.58938,87.32799 26.35671,88.02405 26.36578,88.18853 26.76687,87.9837 27.12124,88.13596 27.87923,88.78898 28.05352,88.92725 27.28978,88.75972 27.11429,88.87685 26.94915,89.62505 26.72416,90.41105 26.90381,91.91294 26.80428,92.11964 26.92154,92.12455 27.28041,91.63419 27.53725,91.6572 27.76037,92.55601 27.86175,93.22356 28.35798,93.29386 28.63134,93.94067 28.77195,94.42386 29.21401,94.69138 29.31206,95.26135 29.07291,96.09804 29.45244,96.3967 29.25173,96.12448 29.07665,96.17328 28.90239,96.5154 29.07517,96.62262 28.77994,96.27107 28.4075,97.34721 28.21058,97.37821 27.8962,96.88756 27.60774,97.14354 27.09397,96.60806 27.36686,95.14398 26.61056,95.18343 26.06357,94.582 25.24725,94.72583 25,94.15455 23.8483,93.33115 24.07977,93.38774 23.13586,93.1313 23.04397,93.09991 22.7794,93.19876 22.25992,93.00166 21.98413,92.70662 22.15061,92.60881 21.97587,92.28809 23.69794,91.95375 23.72646,91.82832 23.09429,91.61399 22.92959,91.42766 23.25905,91.34951 23.08543,91.15093 23.64115,91.38819 24.1085,91.9061 24.14516,92.26034 24.83023,92.48511 24.86508,92.41306 25.02052,89.84493 25.28913,89.88033 25.9313,89.67532 26.22877,89.55626 25.96017,89.35738 26.00834,89.10016 26.39598,88.66698 26.2735,88.39457 26.62918,88.52641 26.37258,88.18036 26.14472,88.10567 25.82449,89.0113 25.29883,88.4422 25.20072,88.02834 24.68834,88.73291 24.26673,88.57062 23.6455,88.80328 23.48974,88.72794 23.2574,88.99747 23.19974,88.86646 22.9578,89.08354 21.93857,89.06349 21.92776,89.03131 21.90706,89.05953 21.61154,88.73206 21.67889,88.7229 21.68925,88.74857 22.06594,88.48277 21.82861,88.46631 21.80936,88.43805 21.66155,88.43002 21.60411,88.41084 21.91539,88.29903 21.83306,88.22757 21.61672,88.23467 21.65239,88.2133 21.71215,88.2134 21.71363,88.21426 22.15742,88.0447 22.22218,88.19611 22.1048,87.82855 21.7222,86.97277 21.39405,86.81679 21.13818,87.05199 20.7035,86.7629 20.31075,85 19.32192,84.14108 18.31418,82.30446 17.0442,82.36817 16.84393,82.31754 16.58463,81.33067 16.31521,80.93883 15.70794,80.76952 15.86851,80.29359 15.70468,80.0457 15.08755,80.34645 13.30402,79.77618 11.76944,79.87608 10.2956,79.39067 10.31869,78.98161 9.676768,78.96533 9.376285,79.44234 9.153852,78.96259 9.268795,78.41982 9.109741,78.06974 8.36659,77.55257 8.069007,76.55161 8.890351,75.73327 11.35397,75.20039 12.00316,74.39533 14.41856,73.45624 16.05808,73.26486 17.28613,72.85629 18.68839,73.09037 19.04566,72.97643 19.17068,72.80319 18.89796,72.91546 19.29084,72.65936 19.8391,72.9519 20.75498,72.74421 20.9789,72.64137 21.45602,73.10773 21.72976,72.54304 21.65636,72.77861 21.95182,72.50419 21.94306,72.76682 22.19364,72.5878 22.26793,72.29237 22.21461,72.10708 21.20381,70.83937 20.68841,70.21914 21.00221,68.93578 22.31657,70.17786 22.56044,70.39329 23.04573,70.38342 23.05162,70.37627 23.04768,70.38002 23.03903,69.46711 22.77078,68.60395 23.33114,68.38507 23.44854,68.78115 23.86632,68.25272 23.63652,68.24763 23.6382,68.31957 23.92002,68.74924 23.96205,68.82635 24.3084,69.97868 24.16505,71.1244 24.40936,70.65932 25.70151,70.27539 25.71132,70.09608 25.94432,70.16774 26.55075,69.51545 26.74006,69.57813 27.16549,70.36617 28.00825,70.86549 27.70511,71.89957 27.9642,72.39619 28.77465,72.94442 29.0341,73.39652 29.93901,73.96526 30.19131,73.93529 30.46296,74.6857 31.06146,74.53585 31.15423,74.54382 31.8223,75.37476 32.22432,74.69842 32.48494,74.69702 32.83971,74.53153 32.74073,74.01427 33.19825,74.18707 33.45552,73.95624 33.72029,74.26275 33.97429,73.88322 34.04995,73.97623 34.26481,73.76322 34.35963,73.94156 34.6772,74.37554 34.80344,75.74921 34.51583,76.68182 34.75959,77.8409 35.50421,77.85342 35.48316,78.70403 35.91927,79.32433 35.9853,80.03587 35.41065,80.34001 35.46458,80.17257 34.85013,79.72459 34.43313,79.51649 34.46106,79.42042 34.01869,78.90406 33.9967,79.0872 33.63753,78.89888 33.59235,78.94111 33.39008)),((93.05704 13.36986,92.72138 11.47929,92.52598 11.84491,92.84876 13.39596,93.03716 13.57325,93.05704 13.36986)),((93.67802 7.153168,93.88215 7.197016,93.84781 6.747382,93.67802 7.153168)))
+MULTIPOLYGON(((42.36371 37.10926,42.80326 37.37804,43.85316 37.19084,44.14184 37.31565,44.31998 36.96706,44.80497 37.14814,45.35571 35.98217,46.34515 35.81621,46.01299 35.67784,46.189 35.10828,45.70106 34.81196,45.74831 34.54156,45.53599 34.59146,45.58042 34.14325,45.41276 33.97156,46.19623 33.23977,46.10195 32.96962,47.45319 32.39359,47.86495 31.77916,47.70172 30.9925,48.03083 30.99381,48.03505 30.48498,48.48461 29.97987,47.95707 30.01171,47.18075 30.02608,46.55759 29.10305,45.47203 29.47496,44.71873 29.20663,43.59605 29.60304,43.66146 30.3756,43.0655 30.4107,42.9772 30.72498,39.31893 32.21677,38.80408 33.37191,41.01237 34.41986,41.39429 35.63027,41.29453 36.35617,42.36371 37.10926)))
+MULTIPOLYGON(((44.82024 39.62525,45.44402 38.99178,46 38.82019,46.53373 38.86489,46.95339 39.10436,47.99076 39.69632,48.37463 39.37077,48.13177 39.26484,48.36908 39.01485,48.01774 38.84517,48.63203 38.40241,48.87941 38.437,49.15762 37.59504,50.18956 37.38953,50.48304 37.02308,51.64344 36.60569,53.99164 36.94398,53.89781 37.34081,54.67566 37.44039,54.85671 37.76054,55.47419 38.08433,57.23291 38.26714,57.51798 37.91442,59.34782 37.51545,59.55383 37.12253,60.05066 37.01224,60.37067 36.62425,61.14761 36.65593,61.27663 35.61316,60.99798 34.63269,60.74568 34.52298,60.91771 34.30145,60.47844 34.07925,60.64322 33.56461,60.94499 33.49451,60.58612 33.14312,60.87726 32.19884,60.8569 31.49167,61.71288 31.37597,61.8457 31.04082,60.8786 29.86178,61.80416 28.64017,62.79194 28.2771,62.78297 27.23428,63.31746 27.13866,63.16919 26.64729,62.43453 26.56814,61.84788 26.22814,61.61045 25.19495,61.41459 25.06409,60.53225 25.44646,60.45864 25.29239,59.11906 25.42644,57.3302 25.78979,56.80032 27.1285,56.07236 27.11989,54.61605 26.50467,54.31315 26.72567,53.71799 26.70395,52.04406 27.84187,51.40396 27.92542,51.03392 28.80974,50.81421 28.92234,50.92504 29.06672,50.66298 29.13639,50.64366 29.4595,50.09842 30.17461,49.55951 29.99754,48.93444 30.38899,48.92179 30.02477,48.48461 29.97987,48.03505 30.48498,48.03083 30.99381,47.70172 30.9925,47.86495 31.77916,47.45319 32.39359,46.10195 32.96962,46.19623 33.23977,45.41276 33.97156,45.58042 34.14325,45.53599 34.59146,45.74831 34.54156,45.70106 34.81196,46.189 35.10828,46.01299 35.67784,46.34515 35.81621,45.35571 35.98217,44.80497 37.14814,44.63467 37.72633,44.23886 37.88711,44.50953 38.32789,44.31766 38.38543,44.04729 39.37641,44.42366 39.4098,44.61477 39.77621,44.82024 39.62525),(48.93444 30.38899,48.95354 30.39982,48.93444 30.38899)))
+MULTIPOLYGON(((35.11546 33.09018,35.62841 33.25093,35.64941 32.6873,35.55973 32.39043,35.09043 32.47389,34.96389 31.84679,35.22941 31.75167,34.88395 31.39669,35.47559 31.48824,34.96632 29.5476,34.91122 29.49664,34.26801 31.22361,34.48946 31.59407,35.11546 33.09018)))
+MULTIPOLYGON(((10.47005 46.86188,11.01477 46.77032,11.16155 46.96649,12.18404 47.09521,12.43604 46.69191,13.71563 46.52403,13.38307 46.30019,13.66695 46.18206,13.47854 46.00447,13.90781 45.6393,13.72107 45.59447,13.54803 45.7973,13.13257 45.77088,12.14619 45.38552,12.54236 44.96169,12.24288 44.72267,12.38784 44.22705,13.62712 43.55183,13.9515 42.72435,14.72871 42.09376,15.34631 41.86517,16.18133 41.89166,15.95641 41.46295,18.01636 40.6409,18.51345 40.13034,18.34918 39.78941,17.87668 40.27125,16.9521 40.47552,16.48812 39.77875,17.15826 39.40068,17.21372 39.02584,16.61732 38.81383,16.57636 38.42414,16.06622 37.92332,15.63801 38.01673,15.84763 38.65526,16.2241 38.85559,15.62409 40.0722,15.33235 40,14.9016 40.24603,14.79204 40.66367,14.32527 40.57592,14.4567 40.74391,14.02882 40.79278,13.71053 41.25045,13.04785 41.22547,11.54984 42.34292,11.0949 42.39658,11.08124 42.64227,10.49544 42.9358,10.51972 43.26908,9.983374 44.09307,8.763913 44.43042,8.074021 43.89411,7.523377 43.78971,7.678827 44.18167,7.002817 44.24012,6.849277 44.53329,7.013811 44.83339,6.615681 45.10521,7.12885 45.26577,6.790975 45.77126,7.03618 45.93694,7.859254 45.93451,8.442933 46.46386,8.451571 46.25948,9.016438 45.82587,9.283881 46.49617,10.13348 46.23097,10.05119 46.53883,10.45701 46.54151,10.47005 46.86188)),((12.46719 37.9219,12.72997 38.19249,12.91789 38.03049,13.31619 38.22785,13.74824 37.97554,15.65654 38.26612,15.09115 37.48394,15.33887 37.0099,15.08873 36.65308,12.66241 37.56498,12.46719 37.9219)),((8.494676 39.72335,8.485087 40.30003,8.153088 40.57606,8.178012 40.93834,8.53252 40.82807,9.141717 41.24946,9.527966 41.16186,9.826783 40.54034,9.625611 40.24757,9.567271 39.15408,9.088002 39.23002,8.853909 38.88334,8.490665 39.08624,8.405216 38.96561,8.494676 39.72335)))
+MULTIPOLYGON(((44.71873 29.20663,45.47203 29.47496,46.55759 29.10305,45.50752 28.77784,44.71873 29.20663)))
+MULTIPOLYGON(((130.9294 33.9484,130.9785 34.43993,131.4019 34.41845,132.6323 35.43069,135.2295 35.77887,135.3156 35.44886,135.4661 35.603,135.6297 35.4942,136.0833 35.66702,135.9685 36.00132,136.6254 36.61107,136.7425 37.3471,137.3331 37.52606,136.8657 37.10735,137.0636 37.10849,136.9882 36.87307,137.2243 36.73678,138.5621 37.37778,138.8298 37.79981,139.4192 38.14941,140.0642 39.58677,139.965 39.89338,139.7036 39.94135,140.0202 40.24436,139.863 40.60953,140.2527 40.79341,140.3431 41.25708,140.6445 41.1805,140.7352 40.83061,140.8726 41.01303,141.1376 40.86794,141.1875 41.28007,140.7697 41.14425,140.9178 41.54623,141.4743 41.42971,141.4514 40.63988,141.7782 40.34172,142.0742 39.55208,141.7379 39.02082,141.4525 38.66979,141.5247 38.26907,141.0862 38.38846,140.8953 38.04001,140.9852 37.00156,140.568 36.30336,140.8729 35.69378,140.5361 35.60752,140.3927 35.19065,139.8483 34.90217,139.7843 35.31156,140.1324 35.5697,139.784 35.6139,139.683 35.13995,139.5459 35.3041,139.1538 35.23222,139.1583 34.92938,138.8479 34.60121,138.8182 35.11343,138.5673 35.09829,138.2363 34.59475,137.0192 34.57833,137.3527 34.78025,136.9795 34.91299,136.9209 34.70311,136.9038 35.0886,136.7166 35.06303,136.5315 34.61195,136.9272 34.44617,136.907 34.27694,136.351 34.20865,136.2074 33.97331,135.8043 33.44193,135.4523 33.54549,135.0653 33.88164,135.2029 34.14472,135.0764 34.29442,135.4581 34.7013,134.3026 34.7299,133.9376 34.44866,133.491 34.51265,132.688 34.20469,132.4259 34.38474,132.1458 33.82857,131.7551 34.06356,131.035 33.92691,131.1104 33.61341,131.6702 33.66291,131.7408 33.46668,131.5164 33.26581,131.9093 33.25998,131.9002 32.92883,132.0904 32.92501,131.6984 32.60675,131.3469 31.35632,131.0969 31.45794,131.1316 31.26823,130.6621 30.98901,130.7197 31.7167,130.5322 31.51944,130.6386 31.18041,130.1068 31.40829,130.3368 31.60995,130.1779 32.08168,130.6299 32.77022,130.2592 33.20152,130.0821 32.84294,130.3482 32.84658,130.3627 32.68273,130.1771 32.58385,130.1964 32.77386,129.959 32.76047,129.7436 32.56274,129.8754 32.73706,129.6856 33.09111,130 32.829,129.5652 33.32096,129.8326 33.31048,129.8513 33.55061,129.9947 33.42612,130.9294 33.9484)),((145.5114 43.22366,143.9198 42.86976,143.4125 42.4386,143.2483 41.92071,141.6276 42.64253,141.0031 42.29575,140.4632 42.57674,140.2934 42.24724,141.1941 41.80054,140.6495 41.81721,140.2051 41.3923,139.9885 41.5498,140.1237 41.99354,139.7761 42.25787,139.8238 42.60303,140.5217 42.98658,140.3451 43.33046,141.1685 43.14311,141.4247 43.32488,141.3312 43.72747,141.6443 43.94796,141.7931 44.61361,141.5685 45.20618,141.6489 45.4501,141.9401 45.52314,143.0152 44.5451,144.3436 43.96353,144.7943 43.93336,145.3439 44.33778,145.0626 43.77736,145.3541 43.57341,145.1924 43.62068,145.3938 43.29514,145.2275 43.33104,145.5114 43.22366)),((134.5955 34.20631,134.749 33.83235,134.3161 33.57089,134.1839 33.24019,133.89 33.49704,133.2982 33.40092,133.0255 32.71769,132.381 33.0168,132.5585 33.22402,132.4267 33.45823,132.0275 33.3409,132.6566 33.69629,132.9484 34.13662,133.1368 33.91342,133.5213 33.96704,133.5594 34.25644,133.9341 34.38949,134.5955 34.20631)),((128.2996 26.7151,127.6633 26.07894,127.7156 26.43266,127.9858 26.57748,127.8856 26.70172,128.1226 26.65594,128.2625 26.87129,128.2996 26.7151)),((138.3738 38.21914,138.521 38.3264,138.4262 38.06371,138.5752 38.05661,138.2193 37.80915,138.3738 38.21914)))
+MULTIPOLYGON(((-77.64528 18.48845,-76.89505 18.4116,-76.18114 17.90755,-76.84061 17.99445,-77.17693 17.70355,-77.7407 17.85424,-78.36664 18.26574,-78.21104 18.46,-77.64528 18.48845)))
+MULTIPOLYGON(((35.64941 32.6873,35.80864 32.75319,36.84583 32.31248,38.80408 33.37191,39.31893 32.21677,37.00248 31.49365,37.99682 30.50064,37.50061 29.99781,36.75305 29.86721,36.07088 29.18588,34.96001 29.3589,34.96632 29.5476,35.47559 31.48824,35.55973 32.39043,35.64941 32.6873)))
+MULTIPOLYGON(((129.3704 28.10762,129.1419 28.24985,129.6908 28.51964,129.3704 28.10762)),((135 34.60735,134.9592 34.2672,134.664 34.23848,135 34.60735)))
+MULTIPOLYGON(((33.9945 4.214427,34.37846 4.611326,35.9477 4.629333,36.04136 4.447551,37.0419 4.375583,38.12922 3.616987,39.53289 3.402422,39.86957 3.874727,40.77492 4.281918,41.16927 3.94258,41.89908 3.975494,40.99211 2.829568,41.00099 -0.834049,41.56717 -1.662053,40.98409 -2.018724,40.83646 -2.021824,40.96167 -2.306771,40.81121 -2.278281,40.189 -2.728733,40.12308 -3.287777,39.77795 -3.587569,39.44699 -4.584176,39.22181 -4.678047,37.60839 -3.519971,37.58214 -2.989356,33.92483 -0.994076,33.90886 0.102833,34.51596 1.101287,34.7998 1.227813,35.03605 1.919515,34.92859 2.518256,34.45232 3.192519,34.46005 3.667987,34.1721 3.767278,33.9945 4.214427)))
+MULTIPOLYGON(((70.55601 42.47714,71.58846 42.96639,73.32719 42.53108,74.19781 43.23862,74.95803 43.12947,76.2627 43.12947,79.30737 43.29256,80.26365 42.6949,80.16733 42.63659,80.28261 42.05965,78.39241 41.41043,78.05938 41.03276,76.86404 41.02094,76.33176 40.35956,75.69683 40.29395,75.59311 40.65871,75.21906 40.44147,74.82812 40.52475,74.89946 40.33709,73.94488 40.02313,73.93794 39.59399,73.58203 39.28056,70.28378 39.75739,70.44686 40.30059,73.16536 41.11726,72.45782 41.60652,70.93612 41.71566,70.55601 42.47714)))
+MULTIPOLYGON(((105.2132 14.33601,105.3669 14.10214,106.1029 13.91008,106.0027 14.36157,106.5326 14.58762,106.968 14.30803,107.5446 14.68599,107.3392 14.11099,107.6185 13.51608,107.5572 12.36875,106.418 11.97237,106.4487 11.66724,105.8506 11.65794,106.1924 10.78987,105.7775 11.02648,105.3569 10.84966,105.1097 10.95593,104.8844 10.53115,104.4453 10.421,103.9025 10.65082,103.5692 10.53901,103.7203 10.85512,103.5521 11.16269,103.427 10.88745,103.1248 10.86612,103.115 11.45798,102.9195 11.63612,102.34 13.54311,102.6269 13.60597,103.0927 14.29263,103.6626 14.43951,104.8053 14.43433,105.0859 14.20729,105.2132 14.33601)))
+MULTIPOLYGON(((43.45427 -11.94077,43.21945 -11.75558,43.3312 -11.36282,43.45427 -11.94077)),((44.51069 -12.38046,44.20354 -12.16853,44.47016 -12.06774,44.51069 -12.38046)))
+MULTIPOLYGON(((130.6146 42.42395,130.6749 42.28362,130.3857 42.32814,129.7616 41.76048,129.7157 40.83027,129.2283 40.70313,128.3224 40,127.5643 39.83855,127.5665 39.30658,127.332 39.40328,127.3745 39.2047,128.3599 38.61244,128.0783 38.30883,127.1323 38.30494,126.6771 37.8218,126.4514 37.78783,126.4231 37.78357,125.5636 38.02898,125.7282 37.9121,125.3414 37.67334,125.5124 37.88852,124.9765 37.92745,125.2767 38.06451,124.6529 38.12884,124.9968 38.21886,124.9643 38.584,125.5526 38.68468,125.1264 38.87503,125.4436 39.55909,124.7627 39.77337,124.6071 39.58504,124.3644 40,124.8972 40.47795,126.0196 40.89744,126.6772 41.74695,128.1353 41.37826,128.3138 41.58303,128.0694 41.9782,128.9451 42.01748,129.3423 42.44767,129.7144 42.42675,129.8965 43.002,130.259 42.8958,130.6146 42.42395)))
+MULTIPOLYGON(((126.6771 37.8218,127.1323 38.30494,128.0783 38.30883,128.3599 38.61244,129.4268 37.05933,129.3786 36.02074,129.5847 36.01646,129.3842 35.50624,129.0415 35.0859,129.0398 35.0827,128.5895 35.20887,128.6321 35.06407,128.365 35.0426,128.4503 34.84069,128.0442 34.93248,128.0558 35.08058,127.588 34.9455,127.7715 34.85437,127.6454 34.62245,127.5117 34.88973,127.3483 34.83514,127.5127 34.58437,127.3306 34.43707,127.1136 34.54973,127.2376 34.77213,126.8874 34.4197,126.7662 34.61247,126.519 34.28574,126.5392 34.57703,126.2579 34.66254,126.6203 34.62637,126.3681 34.73677,126.6444 34.81292,126.3555 34.79034,126.4424 34.9732,126.2451 35.11051,126.4611 35.06792,126.2973 35.23034,126.6748 35.53216,126.4575 35.63457,126.9 35.90852,126.6087 35.88583,126.4885 36.72523,126.1189 36.70518,126.2992 36.97605,126.2664 36.80231,126.4277 36.90165,126.3263 36.99556,126.5649 36.88605,126.492 37.0564,126.8369 36.82073,127.0034 36.98733,126.6562 37.15142,126.8692 37.26259,126.5909 37.44984,126.5187 37.76182,126.7662 37.61766,126.6771 37.8218)),((126.5122 33.51381,126.9482 33.45398,126.2703 33.19129,126.1652 33.3327,126.5122 33.51381)))
+MULTIPOLYGON(((46.55759 29.10305,47.18075 30.02608,47.95707 30.01171,48.19046 29.54315,47.70333 29.37312,48.10133 29.34784,48.43147 28.53563,47.70495 28.52461,47.46055 29.00044,46.55759 29.10305)),((48.1397 29.91679,48.12482 29.94437,48.38211 29.75845,48.18782 29.58773,48.1397 29.91679)))
+MULTIPOLYGON(((-81.39859 19.39729,-81.36519 19.29706,-81.29838 19.34718,-81.13133 19.34718,-81.09792 19.29706,-81.24826 19.28036,-81.41529 19.28036,-81.432 19.38058,-81.39859 19.39729)))
+MULTIPOLYGON(((49.19137 46.35909,48.68242 47.33046,47.99833 48.01681,46.92366 48.89732,47.90125 51.14826,48.97592 50.75767,51.12978 52.02877,52.59729 52.12811,54.74889 51.14826,58.17159 51.14826,59.54202 50.95184,60.42253 50.85476,60.71603 51.14826,60.2261 52.22519,61.2037 53.30212,62.08421 53.30212,61.59654 53.79204,63.55172 54.08554,65.89974 54.47613,70.39936 55.45597,71.08571 54.57547,73.13797 53.88912,73.92139 53.69496,77.05058 54.67255,77.24701 54.37905,76.85642 53.98846,78.42102 52.71511,80.37846 50.75767,81.06255 51.24534,81.55247 51.05118,83.21414 51.24534,84.97516 49.77782,86.53976 50.07133,86.93111 49.11688,86.86476 49.1126,86.58855 48.543,85.73545 48.371,85.5416 47.93944,85.69684 47.23086,85.52972 47.0594,84.80595 46.82669,84.68604 47.00464,83.03088 47.21212,82.27198 45.57064,82.60367 45.43167,82.48621 45.12067,81.68958 45.36663,79.84063 44.89213,80.48974 44.71143,80.34283 44.4813,80.79986 43.17976,80.40971 43.0573,80.58799 42.89124,80.26365 42.6949,79.30737 43.29256,76.2627 43.12947,74.95803 43.12947,74.19781 43.23862,73.32719 42.53108,71.58846 42.96639,70.55601 42.47714,68.43591 41.33429,66.58804 42.09577,66.80507 42.80331,66.15273 43.56479,64.30486 43.61873,61.75071 43.78181,61.12239 44.6563,61.13844 44.67618,61.11451 44.66727,61.11324 44.66904,61.79484 44.93174,61.80758 45.11567,61.72933 44.94716,61.31798 45.10165,61.34788 45.34447,61.13265 45.3161,60.86492 45.77643,60.8772 46.10632,61.17527 46.17042,61.66479 46.78025,60.98714 46.47668,60.83824 46.76168,60.51076 46.7757,60.73715 46.64245,60.40186 46.49827,60.27652 46.70614,59.9384 46.40144,60.43949 46.2855,60.73527 46.33081,60.77562 46.17736,59.85021 46.09455,59.5675 46.3592,59.51931 45.82307,59.2774 45.76174,59.3783 46.04139,58.75704 45.86393,56.09795 45.19688,55.93486 41.55257,53.97785 42.20491,54.14094 42.80331,52.73736 42.72655,51.91213 42.82872,51.64697 43.18023,51.26829 43.15116,51.30716 43.46929,50.85681 44.14088,50.23559 44.39585,50.30873 44.64459,51.52919 44.52299,50.83926 44.82603,51.41844 45.36433,52.67431 45.3816,52.96412 45.38559,52.72464 45.61796,52.86669 45.62964,53.03076 46.59469,52.63223 46.87456,51.7043 46.872,51.74908 46.72523,51.24955 47.01562,50.45811 46.85718,49.72255 46.34251,49.15001 46.45202,49.19137 46.35909)))
+MULTIPOLYGON(((101.1547 21.56387,101.285 21.17868,101.7879 21.14003,101.7815 21.83249,101.547 22.25014,101.7469 22.50021,102.1496 22.40003,102.677 21.65939,102.8436 21.84679,102.986 21.69021,102.8097 21.26276,103.1761 20.85108,103.699 20.66491,104.1231 20.98185,104.6435 20.66785,104.3783 20.44445,104.9776 20,104.6509 19.62435,104.0453 19.70294,104.1264 19.50412,103.8763 19.31214,105.138 18.71571,105.1911 18.32619,106.5534 16.99335,106.6789 16.45194,106.8739 16.53206,107.4526 16.08298,107.2178 15.73087,107.6967 15.25985,107.4715 15.00654,107.5446 14.68599,106.968 14.30803,106.5326 14.58762,106.0027 14.36157,106.1029 13.91008,105.3669 14.10214,105.2132 14.33601,105.5351 14.55281,105.4707 15.3448,105.6378 15.65781,104.7471 16.5365,104.7039 17.53196,103.9733 18.33454,103.5137 18.43748,102.6675 17.80686,102.0844 18.21974,101.1601 17.46701,100.9601 17.57215,101.3553 19.04666,101.2857 19.57056,100.5158 19.52846,100.5814 20.16878,100.0931 20.35574,100.2595 20.74696,100.6474 20.87555,100.5156 20.89783,100.727 21.31212,101.1547 21.56387)))
+MULTIPOLYGON(((35.98031 34.64496,36.47128 34.63018,36.34557 34.51201,36.63919 34.2057,36.38395 33.82193,36.02116 33.76341,35.90757 33.43406,35.62841 33.25093,35.11546 33.09018,35.98031 34.64496)))
+MULTIPOLYGON(((-60.88248 13.92187,-60.9401 13.70614,-61.06706 13.78446,-60.94818 14.10146,-60.88248 13.92187)))
+MULTIPOLYGON(((79.91742 8.905259,80.1861 9.482726,79.90987 9.758654,80.24934 9.823592,80.8117 9.290943,81.19769 8.461504,81.35297 8.490927,81.87177 7.315879,81.71006 6.505597,80.58682 5.916833,80.13106 6.092922,79.84307 6.933345,79.69839 8.213809,79.78356 8.348022,79.82488 7.912805,79.91742 8.905259)))
+MULTIPOLYGON(((-10.28686 8.484799,-9.77296 8.551791,-9.480072 8.376794,-9.343918 7.748662,-9.477838 7.362011,-9.211778 7.385181,-9.104451 7.193552,-8.848072 7.263333,-8.666122 7.693086,-8.472179 7.554582,-8.27361 7.006707,-8.599302 6.505595,-7.901638 6.27985,-7.758396 5.953354,-7.422362 5.843457,-7.527073 4.357078,-9.02896 4.976782,-10.02147 5.9439,-11.37094 6.785412,-11.45917 6.929611,-10.60413 7.770212,-10.28686 8.484799)))
+MULTIPOLYGON(((27.12344 -29.57842,27.76015 -28.89541,28.66901 -28.57445,29.46576 -29.35254,29.16626 -29.92973,28.39915 -30.14675,28.11823 -30.66896,27.39462 -30.33049,27.12344 -29.57842)))
+MULTIPOLYGON(((21.27649 55.2457,21.21554 54.92387,20.59391 55,20.98837 55.27225,21.13474 55.67651,21.13117 55.6827,21.07143 56.06343,22 56.4148,24.45596 56.25781,24.89075 56.4469,25.09741 56.18651,25.68371 56.14792,26.61967 55.67435,26.44965 55.35035,26.87194 55.28482,25.75194 54.8152,25.55723 54.33265,25.79186 54.16851,25.51306 54.31833,24.76473 53.96052,23.50595 53.96659,23.38738 54.21452,22.78779 54.36525,22.68608 54.58844,22.89281 54.81372,22.58557 55.07003,21.27649 55.2457)))
+MULTIPOLYGON(((5.816617 49.54663,5.73455 49.89968,6.13802 50.1329,6.527001 49.81488,6.374592 49.45884,5.816617 49.54663)))
+MULTIPOLYGON(((24.35622 57.87815,25.29386 58.07761,26.50471 57.52006,27.32212 57.54839,27.85104 57.30485,27.66686 56.83715,27.9718 56.82376,28.24113 56.27555,27.60297 55.78648,26.61967 55.67435,25.68371 56.14792,25.09741 56.18651,24.89075 56.4469,24.45596 56.25781,22 56.4148,21.07143 56.06343,21.06604 56.83326,21.71081 57.57136,22.60883 57.76169,23.26426 57.09216,23.77018 56.96909,24.40896 57.25403,24.35622 57.87815)))
+MULTIPOLYGON(((11.56605 33.16901,12.31339 32.83547,13.38961 32.90039,15.21193 32.38599,15.74868 31.40099,17.84702 30.92648,19.02585 30.26951,19.6081 30.41167,20.05587 30.84785,20.15043 31.23724,19.92422 31.74471,20.12848 32.20301,21.62793 32.92353,23.11104 32.63566,23.09164 32.34143,23.32558 32.16043,24.9826 31.96675,25.14805 31.64858,24.86111 31.40591,25.01827 30.77798,24.6981 30.14885,24.99944 29.25016,25 21.9992,25 20,24 20,24 19.50804,15.99817 23.45037,14.99587 23.00189,14.18932 22.64448,13.48059 23.18613,11.97955 23.52503,11.60618 24.24904,10.23926 24.61171,10.04183 25.32771,9.387854 26.18385,9.927657 26.64288,9.773593 27.27238,9.962235 27.87777,9.877125 29.04413,9.395229 30.17122,9.575346 30.24043,10.27783 30.82461,10.1375 31.48572,10.29116 31.69012,11.52732 32.40281,11.56605 33.16901)))
+MULTIPOLYGON(((43.94985 -17.6231,44.44566 -16.68605,44.44888 -16.19563,44.99743 -16.19502,45.24511 -15.93451,45.29548 -16.14581,45.34951 -15.98366,45.60741 -16.08033,45.66762 -15.77411,46.06434 -15.87776,46.12192 -15.70968,46.55495 -16,46.32012 -15.66818,46.94991 -15.20294,46.94013 -15.55696,47.21299 -15.47386,47.04673 -15.19086,47.46684 -14.67156,47.50592 -15.07986,47.76294 -14.26077,48.00293 -14.15646,47.97754 -14.37735,48.02802 -14.0491,47.8978 -13.59387,48.03513 -13.52395,48.23207 -13.8117,48.32628 -13.5467,48.54916 -13.52377,48.47263 -13.3634,48.81197 -13.37247,48.94949 -12.82917,48.72057 -12.44364,48.9416 -12.48711,49.29308 -11.96339,49.37016 -12.20941,49.19624 -12.29652,49.54088 -12.3838,49.92963 -13.04408,50.48179 -15.32926,50.21931 -15.99049,49.86713 -15.41446,49.61515 -15.56046,49.82998 -16.84689,49.48369 -17.10523,49.42936 -18.16511,47.09993 -24.99274,45.15136 -25.60602,44.09486 -25.06348,43.69332 -24.39403,43.76323 -23.46284,43.37013 -22.85543,43.27704 -21.91154,43.49803 -21.32102,43.7304 -21.32144,44.50232 -20.02127,43.94985 -17.6231)))
+MULTIPOLYGON(((26.81927 48.25461,27.66181 48.82974,29.93356 46.90878,30.35117 46.57469,30.77076 46.5524,30.24746 45.88604,29.72769 45.58736,29.88055 45.67812,29.6388 45.83161,29.67573 45.21692,29.42979 45.44407,28.73659 45.22992,28.06982 45.59521,28.25912 46.44143,28.09873 46.99154,26.81927 48.25461)))
+MULTIPOLYGON(((168.6603 7.336993,168.8607 7.286891,168.7271 7.270186,168.6603 7.336993)))
+MULTIPOLYGON(((18.82852 45.89342,19.57521 46.17799,20.26995 46.12806,20.82344 45.77556,20.79429 45.48373,21.52709 45.16339,21.40279 44.78959,22.1509 44.47602,22.49272 44.70761,22.76005 44.56408,22.46022 44.46281,22.68183 44.21765,22.37304 43.81076,23.0071 43.19424,22.44953 42.83245,22.56844 42.48317,22.37164 42.32233,21.92253 42.33228,21.6559 42.26132,21.47828 42.33228,21.30066 42.11898,21.10499 42.15466,20.76739 42.06565,20.76739 41.90526,20.61688 41.83297,20.63682 41.97525,20.16859 42.51689,19.66689 42.62945,19.29396 42.18192,19.37668 41.85016,18.5575 42.40775,18.43905 42.54559,18.51002 42.56364,18.52357 42.584,18.58098 42.6703,18.52766 42.77695,18.45669 42.95498,18.68764 43.06163,18.59903 43.16829,18.72333 43.31063,18.88331 43.36395,19.02565 43.22161,19.11425 43.31063,18.97232 43.52393,19.11425 43.54198,19.29187 43.631,19.41658 43.54198,19.54087 43.68433,19.22091 43.98665,19.4699 43.93332,19.62988 44.02193,19.38089 44.16427,19.20327 44.23565,19.14994 44.37799,19.23896 44.60893,19.3452 44.87598,19.07898 44.84029,19.08731 44.85201,19.16758 44.96499,19.06093 45.00027,19.11425 45.16066,19.43422 45.23163,19.06093 45.33828,18.95427 45.6406,18.82852 45.89342)))
+MULTIPOLYGON(((-4.827674 24.9966,0 21.83772,1.166675 21.11889,1.172165 20.73779,1.634107 20.57896,1.798455 20.29978,3.231133 19.82456,3.10724 19.15906,3.294835 18.98319,4.242888 19.13672,4.241203 16.9877,4.076758 16.91231,3.872143 15.69188,3.527506 15.34149,1.32403 15.26515,0.956915 14.97472,0.229351 14.98967,-0.7192 15.08039,-1.991972 14.58708,-2.147321 14.24911,-2.852649 13.99764,-2.911576 13.64737,-3.279644 13.71579,-3.237766 13.30563,-3.433222 13.16286,-3.984532 13.49584,-4.355398 13.13399,-4.228288 12.77813,-4.489498 12.71048,-4.569054 12.1346,-5.409314 11.83188,-5.199527 11.43251,-5.496531 11.06307,-5.518916 10.43326,-6.172732 10.22263,-6.256417 10.73664,-6.444196 10.56543,-6.642263 10.67225,-6.672197 10.36513,-6.947465 10.36964,-7.030167 10.16143,-7.641548 10.48812,-7.978548 10.17511,-8.261836 10.47687,-8.323532 11.0482,-8.677261 10.95531,-8.37589 11.36748,-8.854325 11.62834,-8.80539 12.00517,-9.034279 12.42307,-9.362003 12.49567,-9.340386 12.24292,-9.699758 12.02382,-10.33932 12.22548,-10.69021 11.893,-10.9286 12.22242,-11.24695 11.99247,-11.46411 12.13361,-11.37946 12.41356,-11.36283 12.97394,-12.04093 13.6279,-11.94072 13.92137,-12.24192 14.76061,-11.80774 14.89681,-11.74731 15.45623,-11.49894 15.64284,-10.90292 15.10362,-10.72423 15.43658,-9.40824 15.43437,-9.332037 15.69228,-9.328486 15.49625,-5.506424 15.50797,-5.327115 16.33314,-5.6028 16.49943,-6.564405 25,-4.827674 24.9966)))
+MULTIPOLYGON(((92.60686 20.68616,92.61049 20.6864,92.61235 20.67968,92.60686 20.68616)))
+MULTIPOLYGON(((87.83231 49.175,88.192 49.28303,88.22323 49.48986,88.86329 49.45017,89.68183 49.70971,89.62073 49.97399,90.67541 50.16824,90.73773 50.48793,91.42917 50.45771,91.75664 50.72041,92.27581 50.71622,92.34013 50.893,92.61613 50.70516,93.00924 50.784,93.12958 50.56275,94.27628 50.5753,94.61906 50.03394,96.63409 49.98194,97.3162 49.75739,98.25439 50.25548,98.32318 50.54744,97.82797 51.01169,98.02279 51.41996,98.89359 52.14954,99.97604 51.75824,102.0688 51.3971,102.3017 50.59977,102.9157 50.31429,103.6905 50.13724,105.3573 50.4804,106.7247 50.327,107.1465 50.01965,107.9756 49.92023,107.9455 49.67678,108.5434 49.33666,110.7663 49.1451,112.7549 49.49241,114.3401 50.28222,115.4007 49.90234,116.2339 50.0324,116.7003 49.83983,115.4767 47.96859,115.9354 47.67554,116.8039 47.90002,117.3744 47.63805,117.8419 48.02544,118.4786 48,119.8565 47.21655,119.7014 47.19307,119.9207 46.7435,119.5133 46.41943,118.9783 46.81819,117.4388 46.57964,117.3657 46.34863,116.6052 46.297,116.2234 45.70384,115.721 45.43835,114.6434 45.4309,113.6466 44.76521,111.8645 45.0648,111.3868 44.34732,112.0054 43.77061,111.047 43.34341,110.4165 42.76889,109.2717 42.42277,107.4528 42.46183,105.0344 41.56764,104.534 41.66262,104.5437 41.88379,103.3221 41.90749,100.8255 42.65695,96.37058 42.71486,95.34509 44.04517,95.431 44.28123,94.69542 44.3477,93.50827 44.96534,90.87865 45.19198,90.66355 45.51682,91.01986 46.01566,90.91358 46.9533,90.0731 47.85859,89.79642 47.81815,89.56589 48.04869,89.04101 47.9473,88.5164 48.41327,87.97818 48.5092,88.08491 48.70694,87.74966 48.88459,87.91448 48.98592,87.83231 49.175)))
+MULTIPOLYGON(((-5.384489 35.91991,-5.336971 35.8774,-5.234484 35.55744,-4.694509 35.21396,-2.956949 35.33714,-2.926725 35.28344,-2.813016 35.11618,-2.902431 35.25594,-2.206259 35.09098,-1.745389 34.75318,-1.542218 32.9575,-0.991742 32.52681,-1.250021 32.33232,-1.205814 32.11682,-2.867483 32.10715,-2.829027 31.77569,-3.656205 31.61393,-3.807284 31.22201,-3.586124 30.90655,-4.82199 30.64122,-5.108271 30.017,-7.640522 29.38141,-8.669257 28.71986,-8.670276 27.66212,-13.16859 27.66702,-12.90705 27.95427,-12.30218 27.97571,-11.45002 28.34365,-10.22215 29.30859,-9.646635 30.15814,-9.60318 30.39591,-9.894488 30.63796,-9.846688 31.39382,-9.264161 32.17827,-9.277806 32.55085,-8.515005 33.26479,-6.963262 33.9288,-5.923534 35.79824,-5.384489 35.91991)))
+MULTIPOLYGON(((145.6087 14.90391,145.6255 15.12106,145.7591 15.2714,145.7925 15.17117,145.6087 14.90391)),((145.0742 14.10212,145.2246 14.20234,145.3081 14.16893,145.1912 14.05201,145.0742 14.10212)),((145.6422 18.84606,145.7257 18.67901,145.6087 18.67901,145.6422 18.84606)),((145.6087 16.40727,145.709 16.37386,145.6087 16.30704,145.6087 16.40727)))
+MULTIPOLYGON(((-61.2269 14.79864,-60.88121 14.77388,-60.84352 14.40422,-61.08501 14.46286,-61.2269 14.79864)))
+MULTIPOLYGON(((-8.673868 27.29807,-4.827674 24.9966,-6.564405 25,-5.6028 16.49943,-5.327115 16.33314,-5.506424 15.50797,-9.328486 15.49625,-9.332037 15.69228,-9.40824 15.43437,-10.72423 15.43658,-10.90292 15.10362,-11.49894 15.64284,-11.74731 15.45623,-11.80774 14.89681,-12.24192 14.76061,-13.23643 15.61703,-13.3739 16.05435,-13.83995 16.1071,-14.33291 16.64259,-16.26278 16.52475,-16.50577 16.06219,-16.02789 18.17116,-16.19354 18.94203,-16.53949 19.38191,-16.28629 19.53273,-16.46858 19.42866,-16.19995 20.20925,-16.48839 20.72809,-16.53293 20.55799,-16.6788 20.67878,-16.84644 21.26954,-17.05185 20.77416,-16.91926 21.33035,-13.00176 21.33081,-13.05887 23.0585,-12.75983 23.38755,-12 23.45452,-12.00389 25.99864,-8.674157 25.99761,-8.673868 27.29807)))
+MULTIPOLYGON(((57.60295 -19.98763,57.72297 -20.43411,57.30263 -20.47056,57.60295 -19.98763)))
+MULTIPOLYGON(((73.24704 6.986212,73.31384 6.90269,73.21363 6.819168,73.24704 6.986212)),((73.78156 -0.380253,73.91519 -0.413662,73.83167 -0.48048,73.78156 -0.380253)),((73.63122 1.924907,73.64793 1.858089,73.59781 1.82468,73.5477 1.891498,73.63122 1.924907)),((73.41406 5.716712,73.48088 5.616486,73.38065 5.599782,73.41406 5.716712)),((73.5644 4.630949,73.63122 4.564132,73.5477 4.48061,73.5644 4.630949)),((73.5477 0.120867,73.63122 0.137571,73.63122 0.003936,73.5477 0.120867)),((73.1134 6.919394,73.16352 6.852577,73.06329 6.78577,73.1134 6.919394)),((73.36395 -0.83126,73.38065 -0.931487,73.28045 -0.898078,73.36395 -0.83126)),((73.04659 7.069734,73.16352 7.103142,73.16352 7.036325,73.04659 7.069734)),((73.16352 -0.647512,73.26375 -0.680921,73.19693 -0.731034,73.16352 -0.647512)),((73.71474 2.375914,73.74815 2.292392,73.66463 2.292392,73.71474 2.375914)),((73.48088 1.791272,73.49758 1.724454,73.41406 1.640932,73.48088 1.791272)),((73.48088 -0.647512,73.5477 -0.647512,73.49758 -0.747739,73.48088 -0.647512)),((73.5644 2.559651,73.63122 2.542947,73.59781 2.459425,73.5644 2.559651)),((73.49758 3.010658,73.5644 2.993954,73.5477 2.910432,73.49758 3.010658)),((73.84837 2.125348,73.89849 2.091939,73.81496 2.041826,73.84837 2.125348)),((73.58111 0.521761,73.68134 0.571874,73.64793 0.505057,73.58111 0.521761)),((72.79602 2.743399,72.91296 2.726695,72.86284 2.693286,72.79602 2.743399)))
+MULTIPOLYGON(((32.95351 -9.401445,33.93895 -9.711681,34.0363 -9.49193,34.30602 -9.740206,34.53863 -10.05235,34.63319 -11.1177,34.95793 -11.57134,34.64264 -11.58251,34.41465 -12.19816,34.52367 -13.35815,35.08227 -13.68788,35.91682 -14.89119,35.81857 -16.02424,35.40392 -16.12876,35.14883 -16.55797,35.30424 -17.11892,35.09425 -17.123,35.15962 -16.84059,34.25424 -15.90769,34.60411 -15.2672,34.5158 -14.56037,34.3589 -14.38926,33.68045 -14.60495,33.20901 -14.00362,33.02915 -14.04606,32.67395 -13.60776,33.0166 -13.21101,33.01505 -12.65771,33.54823 -12.35774,33.26135 -12.14225,33.22755 -11.42278,33.40601 -11.16108,33.2459 -10.89392,33.70504 -10.56948,32.95351 -9.401445)))
+MULTIPOLYGON(((-112.2979 29.21396,-113.0753 30.66136,-113.1236 31.23038,-114.956 31.91462,-114.7782 31.65857,-114.8879 31.1645,-114.6643 30.20063,-113.6344 29.27282,-113.5213 28.89904,-112.8416 28.4421,-112.7692 27.86483,-111.9514 27.09634,-111.7618 26.55508,-111.8496 26.8779,-111.5661 26.70953,-111.301 25.77688,-110.6538 24.80308,-110.6074 24.25615,-110.3103 24.1663,-110.2412 24.35156,-109.4027 23.46491,-109.5213 23.1222,-110 22.8937,-110.3254 23.57928,-111.7797 24.54576,-112.1637 24.90137,-112.169 24.92215,-112.1769 24.95252,-112.1536 24.97824,-112.16 25.16634,-112.1881 25.98791,-113.2353 26.78338,-113.1632 26.99011,-113.263 26.75141,-113.5997 26.71311,-115.0034 27.71741,-115.0786 27.8477,-114.3144 27.87504,-114.1031 27.60114,-113.9136 27.71301,-114.1413 27.72984,-114.166 27.9437,-114.1692 27.94229,-114.0947 28.55332,-114.9635 29.37366,-115.697 29.75217,-116.0529 30.78753,-116.3307 30.95913,-116.6818 31.54971,-116.6073 31.84644,-117.1236 32.53462,-114.717 32.71676,-114.8062 32.49187,-111.0648 31.32881,-108.2059 31.33134,-108.2035 31.78346,-106.5211 31.77821,-104.921 30.60049,-104.5407 29.68035,-103.3844 29.02264,-103.1495 28.97568,-102.6814 29.72309,-102.3142 29.87947,-101.4006 29.76785,-99.51466 27.56314,-99.08967 26.40093,-97.37753 25.83655,-97.15015 25.94769,-97.42307 25.34037,-97.76283 25.36551,-97.73684 24.77798,-97.81365 24.55242,-97.77628 24,-97.6758 24.51143,-97.79669 22.20284,-97.33157 21.57589,-97.41952 21.21629,-97.16896 20.67244,-96.44569 19.86379,-95.93621 18.88182,-94.7949 18.52908,-94.48807 18.14931,-91.99119 18.72085,-91.5381 18.44302,-91.22063 18.74888,-91.49359 18.81255,-90.72387 19.37765,-90.32948 21.01364,-88.59792 21.53474,-87.09799 21.60572,-86.73654 21.1376,-87.41928 20.22597,-87.46362 19.78516,-87.72881 19.67433,-87.65773 19.49923,-87.40913 19.58409,-87.6864 19.24184,-87.45303 19.3207,-87.83448 18.17945,-88.07471 18.49161,-88.03753 18.86504,-88.3055 18.48507,-88.51293 18.46227,-88.84317 17.8665,-89.0387 18.00308,-89.14696 17.8095,-90.98163 17.81522,-90.99025 17.2585,-91.43755 17.25004,-90.38557 16.40808,-90.42336 16.09669,-91.72518 16.0801,-92.21432 15.26208,-92.05993 15.07075,-92.24149 14.53962,-93.85432 16,-94.72378 16.19503,-94.58032 16.31958,-94.8553 16.43175,-95.06493 16.28778,-94.82529 16.2805,-95.10141 16.23738,-94.75913 16.20415,-96.23109 15.67138,-97.79529 15.96518,-98.77 16.54596,-99.69207 16.70072,-101.0581 17.26851,-101.9591 17.96553,-103.4816 18.31849,-103.9728 18.86589,-105.0295 19.37303,-105.6995 20.39069,-105.2608 20.57193,-105.5466 20.79482,-105.2436 21.06258,-105.1953 21.45812,-105.6662 22.01355,-105.8376 22.67778,-106.977 23.92292,-108.0076 24.6607,-108.0709 25.09311,-108.7889 25.38165,-108.6973 25.52733,-109.3975 25.63853,-109.2658 26.50163,-109.7904 26.72504,-109.9626 27.10275,-110.5221 27.29557,-110.5075 27.86071,-111.1019 27.93795,-112.2875 29.19471,-112.2862 29.22792,-112.2979 29.21396)),((-112.2979 29.21396,-112.2875 29.19471,-112.3058 28.74643,-112.581 28.87606,-112.2979 29.21396)))
+MULTIPOLYGON(((117.6765 5.97528,117.6747 5.971512,117.9811 6.066454,118.1282 5.847018,117.9425 5.655738,118.3515 5.822273,119.205 5.426463,119.2635 5.210077,118.1249 4.878731,118.4181 4.644211,118.5428 4.349458,117.977 4.222434,117.6489 4.415679,117.5858 4.17752,117.2388 4.373793,115.8762 4.389797,115.5595 3.917913,115.5618 3.159515,115.0891 2.823322,115.2373 2.511148,114.8113 2.264977,114.8729 1.922119,114.5663 1.433472,113.9698 1.446303,113.6582 1.210515,112.9738 1.407019,112.9943 1.578012,112.4924 1.577371,111.8283 0.987671,111.2186 1.088406,110.5719 0.855222,109.6592 1.619646,109.6417 2.081388,109.9139 1.691883,110.2983 1.653294,110.3332 1.807999,110.6513 1.428853,110.7839 1.581164,111.3176 1.338974,110.9865 1.568877,111.3488 2.131454,111.1572 2.156086,111.2116 2.422667,111.3576 2.383279,111.4584 2.488615,111.6337 2.855534,113.017 3.17411,114.0715 4.588868,114.6437 4.006352,114.8755 4.359025,114.7719 4.728659,115.0064 4.891522,115.0336 4.797955,115.0898 4.385616,115.3376 4.305109,115.1529 4.908361,115.5131 5.033322,115.6052 5.227926,115.3665 5.389658,115.5952 5.630774,115.8733 5.581436,116.7415 7.032845,116.7812 6.563479,117.1325 7.009437,117.2941 6.61086,117.7346 6.428298,117.6765 5.97528)),((100.1211 6.422595,100.2888 6.7026,100.8171 6.436154,100.8508 6.231196,101.1082 6.253929,100.9842 5.799289,101.1384 5.610009,101.584 5.933687,101.8259 5.731784,102.0921 6.243936,103.1023 5.404828,103.4439 4.780984,103.4437 2.911093,103.8276 2.581701,104.2891 1.367801,103.9711 1.621413,103.9434 1.415829,103.7047 1.331343,103.5108 1.262738,103.3437 1.55732,101.2889 2.955697,101.2439 3.352402,100.5609 4.306905,100.6641 4.684416,100.362 5.085588,100.3516 5.972256,100.1211 6.422595)))
+MULTIPOLYGON(((34.95793 -11.57134,35.64745 -11.59284,35.83432 -11.40724,36.18958 -11.71623,37.02496 -11.56913,37.45184 -11.73482,37.92789 -11.29055,38.48034 -11.41681,39.24163 -11.17998,40.39444 -10.51768,40.64163 -10.69449,40.35606 -11.33262,40.46063 -12.50205,40.62346 -12.78335,40.40431 -12.95219,40.58856 -12.96936,40.52758 -14.16551,40.72264 -14.19849,40.62603 -14.5654,40.8135 -14.40475,40.8381 -14.82999,40.61849 -14.85911,40.77884 -14.99763,40.49853 -15.1752,40.67694 -15.25073,40.55643 -15.49374,39.78497 -16.28246,39.85743 -16.4415,39.06789 -17.00679,38.06876 -17.18328,37.36107 -17.6303,36.31637 -18.87488,35.69125 -19.11693,34.89563 -19.84631,34.64858 -19.65181,34.72627 -20.54937,34.72777 -20.55013,35.1021 -20.93992,34.98402 -21.11549,35.34348 -22.1861,35.54524 -22.19043,35.60454 -22.92652,35.33002 -23.67928,35.34169 -23.99519,35.55148 -23.79219,35.50026 -24.11318,35.13178 -24.6007,33.21906 -25.34035,32.45242 -25.97557,32.67982 -26.39493,32.96269 -26.08695,32.89597 -26.85684,32.13366 -26.83497,31.98213 -25.95205,31.99045 -24.31326,31.31127 -22.41774,32.48002 -21.32811,32.48854 -20.62747,33.01094 -20.01879,32.70041 -18.94058,33.05502 -18.36191,33.04526 -17.34697,32.83567 -16.92076,32.97855 -16.70721,31.24465 -16,30.42459 -16,30.41826 -15.61757,30.21732 -14.99723,33.20901 -14.00362,33.68045 -14.60495,34.3589 -14.38926,34.5158 -14.56037,34.60411 -15.2672,34.25424 -15.90769,35.15962 -16.84059,35.09425 -17.123,35.30424 -17.11892,35.14883 -16.55797,35.40392 -16.12876,35.81857 -16.02424,35.91682 -14.89119,35.08227 -13.68788,34.52367 -13.35815,34.41465 -12.19816,34.64264 -11.58251,34.95793 -11.57134)))
+MULTIPOLYGON(((23.42815 -17.63928,24.72062 -17.50023,25.2567 -17.78792,24.19486 -18.01912,23.61286 -18.50405,23.29662 -17.99752,20.99883 -18.31788,21.00174 -22.00384,20 -22.00178,20.00024 -24.75299,19.99676 -28.43311,19.56238 -28.53189,19.17275 -28.95783,18.17901 -28.91589,17.40949 -28.72295,17.37844 -28.29535,17.08332 -28.03777,16.47328 -28.58356,15.70359 -27.99036,15.29395 -27.31786,14.82919 -25.74554,14.87734 -25.0899,14.45738 -24.0687,14.44809 -23.148,14.72931 -23.23087,14.66691 -22.64301,14.52676 -22.68227,12.60813 -19.15822,12.02966 -18.48881,11.73316 -17.81028,11.75755 -17.25208,13.37857 -16.97535,13.95689 -17.43337,18.42207 -17.39404,18.91064 -17.8228,20.81847 -18.04176,23.42815 -17.63928)))
+MULTIPOLYGON(((165.8344 -21.38717,166.9273 -22.0894,167.0057 -22.32611,166.768 -22.3962,164.9405 -21.35858,163.9879 -20.10739,165.2365 -20.78086,165.8344 -21.38717)),((167.045 -20.94816,167.1951 -20.67421,167.4529 -21.06541,167.3363 -21.18629,167.045 -20.94816)),((168.02 -21.65969,167.8031 -21.37832,168.1286 -21.44526,168.02 -21.65969)))
+MULTIPOLYGON(((11.97955 23.52503,13.48059 23.18613,14.18932 22.64448,14.99587 23.00189,15.19843 21.49131,15.99564 20.34847,15.72462 19.76368,15.50555 16.89787,13.47883 14.46007,13.63455 13.71068,12.87706 13.49705,12.47672 13.06241,11.52219 13.35306,10.66923 13.3569,10.06089 13.20342,9.650239 12.80361,8.969789 12.83305,7.82488 13.33957,6.934086 12.98861,6.433632 13.59198,5.526512 13.89201,4.464738 13.70343,4.130281 13.47263,4.096463 12.99607,3.642556 12.52015,3.605074 11.69697,2.805825 12.41742,2.387346 12.24222,2.405395 11.90161,2.059467 12.35238,2.274273 12.42838,2.098688 12.72653,1.570111 12.6313,0.992786 13.05922,0.991821 13.37092,1.280971 13.35863,0.398786 14.02787,0.167995 14.52335,0.229351 14.98967,0.956915 14.97472,1.32403 15.26515,3.527506 15.34149,3.872143 15.69188,4.076758 16.91231,4.241203 16.9877,4.242888 19.13672,5.817081 19.43771,7.445678 20.84247,11.97955 23.52503)))
+MULTIPOLYGON(((13.63455 13.71068,14.08543 13.07806,14.17308 12.4051,14.6782 12.16546,14.63724 11.5288,13.98038 11.30761,13.69474 10.96683,13.21933 9.542589,12.85477 9.384972,12.79066 8.759627,12.23703 8.428885,11.84693 7.079654,11.35264 6.502454,11.10094 6.541077,10.57661 7.161691,10.49373 6.899972,10.1549 7.03955,9.784036 6.796423,9.706893 6.51328,8.841041 5.824076,8.816417 5.184829,8.527482 4.726633,8.288529 4.853129,8.279236 4.538615,6.084265 4.277556,5.621665 4.61497,5.38742 5.391228,4.529322 6.304786,2.709604 6.36882,2.780915 9.065207,3.088169 9.101578,3.850976 10.59981,3.495874 11.29233,3.605074 11.69697,3.642556 12.52015,4.096463 12.99607,4.130281 13.47263,4.464738 13.70343,5.526512 13.89201,6.433632 13.59198,6.934086 12.98861,7.82488 13.33957,8.969789 12.83305,9.650239 12.80361,10.06089 13.20342,10.66923 13.3569,11.52219 13.35306,12.47672 13.06241,12.87706 13.49705,13.63455 13.71068)))
+MULTIPOLYGON(((-87.31461 12.98241,-86.70654 13.29538,-86.76284 13.77312,-86.34616 13.76178,-86.01214 14.07706,-85.75548 13.8319,-85.18357 14.25056,-84.89904 14.80938,-84.46906 14.61453,-83.15781 14.99208,-83.57407 13.39966,-83.64787 11.6028,-83.87389 11.37332,-83.69353 10.93761,-83.92849 10.70754,-84.67788 11.07886,-84.91411 10.94132,-85.60976 11.21682,-85.69843 11.07388,-87.68703 12.90361,-87.57708 13.08299,-87.31461 12.98241)))
+MULTIPOLYGON(((4.222384 51.33163,4.201276 51.38792,4.13561 51.36447,4.025384 51.40903,4.016003 51.48642,4.091051 51.43013,4.213003 51.42075,4.288051 51.46297,4.234109 51.4958,4.048835 51.52864,3.971442 51.58492,4.058217 51.58492,4.156717 51.58492,4.156717 51.65059,4.255217 51.61776,4.344337 51.63886,4.419384 51.6717,4.574171 51.68342,4.705504 51.70453,4.81573 51.72564,4.750063 51.73736,4.541337 51.71626,4.353717 51.72564,4.255217 51.75847,4.069943 51.83586,3.99255 51.95547,4.180169 52.04459,4.365444 52.18765,4.550717 52.45031,4.67267 52.71298,4.738337 52.94281,4.804003 52.94281,4.881396 52.86542,4.968171 52.89826,5.054944 52.90998,5.111231 52.84431,5.111231 52.77161,5.162826 52.73643,5.228492 52.74582,5.287123 52.74112,5.287123 52.69188,5.233183 52.64497,5.125301 52.61683,5.071361 52.64262,5.015075 52.61214,5.080742 52.49018,5.01742 52.44328,5.080742 52.42921,4.956444 52.35885,5.031492 52.33071,5.120612 52.31898,5.183933 52.30257,5.244909 52.30491,5.341063 52.26739,5.399694 52.23924,5.523993 52.25566,5.566207 52.3096,5.676433 52.36354,5.793696 52.41279,5.861708 52.47611,5.859363 52.53709,5.796041 52.57227,5.849981 52.59806,5.645946 52.60979,5.58966 52.64262,5.592005 52.75989,5.6436 52.80914,5.716303 52.8279,5.645946 52.84431,5.561516 52.82555,5.484123 52.84197,5.413766 52.83025,5.348099 52.87715,5.404385 52.89826,5.40673 52.9991,5.383279 53.07415,5.448946 53.21721,5.580279 53.30398,5.845291 53.36965,5.976624 53.38138,6.140792 53.39076,6.183005 53.32509,6.206459 53.39076,6.370625 53.40248,6.764627 53.47988,6.851399 53.40248,6.928792 53.33682,7.048399 53.28288,7.158627 53.25004,7.179733 53.17265,7.137519 53.12809,7.179733 52.98738,7.048399 52.87715,7.060126 52.62386,6.973351 52.63559,6.698958 52.64732,6.720066 52.56992,6.675507 52.52536,6.7529 52.47142,6.872507 52.42686,6.994459 52.48315,7.060126 52.38465,7.015567 52.29553,7.060126 52.25331,6.884233 52.13136,6.731792 52.09853,6.687233 52.02114,6.80684 52.01176,6.851399 51.94609,6.797459 51.90153,6.666125 51.90153,6.424565 51.83586,6.281507 51.85697,6.140792 51.90153,6.150171 51.83586,5.953171 51.83586,5.953171 51.74909,6.018838 51.70453,6.117339 51.6928,6.107958 51.61776,6.227565 51.51925,6.239291 51.42075,6.194732 51.34336,6.084505 51.25424,6.096231 51.1792,6.173625 51.21203,6.194732 51.14636,5.986005 51.03613,5.943792 51.08069,5.878123 51.03613,5.899231 50.97047,6.030564 50.97047,6.030564 50.9048,6.107958 50.9048,6.096231 50.83913,6.030564 50.82741,6.025336 50.75425,5.821838 50.76174,5.678778 50.76174,5.645946 50.86024,5.767898 50.93763,5.800732 51.05724,5.878123 51.13464,5.800732 51.16747,5.711612 51.18858,5.570898 51.21203,5.592005 51.27769,5.514612 51.31991,5.448946 51.26597,5.219111 51.22141,5.20973 51.33163,5.132337 51.26597,5.06667 51.36447,5.099504 51.44186,5.022111 51.48642,4.968171 51.3973,4.771171 51.3973,4.848564 51.48642,4.759444 51.48642,4.67267 51.42075,4.517883 51.40903,4.541337 51.4747,4.38655 51.46297,4.442835 51.35274,4.311502 51.38792,4.222384 51.33163)),((5.455981 52.55116,5.514612 52.5582,5.573243 52.59103,5.634219 52.59103,5.73272 52.57462,5.791351 52.56758,5.854672 52.52771,5.8406 52.46908,5.756171 52.41279,5.674088 52.39403,5.573243 52.37058,5.540409 52.31664,5.507576 52.26504,5.397349 52.25097,5.294159 52.30725,5.198003 52.33305,5.134682 52.32836,5.153444 52.39403,5.411421 52.49488,5.455981 52.55116)),((4.222384 51.33163,4.123883 51.28942,3.983169 51.25659,3.887015 51.21203,3.753336 51.2261,3.720502 51.27535,3.553989 51.3246,3.474252 51.2988,3.476597 51.23314,3.338228 51.27769,3.31712 51.33633,3.369472 51.37461,3.467216 51.41137,3.600895 51.37854,3.718157 51.34336,3.840109 51.34805,3.924538 51.36447,3.952681 51.41607,4.011312 51.39496,4.072289 51.35509,4.128574 51.32225,4.222384 51.33163)),((3.40155 51.54036,3.500049 51.58258,3.56337 51.59665,3.619656 51.57554,3.659526 51.5216,3.720502 51.51456,3.781478 51.54036,3.887015 51.54271,3.971442 51.52864,4.016003 51.50753,3.999586 51.43717,3.9433 51.46062,3.879979 51.44186,3.854181 51.38792,3.753336 51.39027,3.65249 51.46062,3.556334 51.44421,3.483632 51.48173,3.429692 51.51456,3.40155 51.54036)),((3.973788 51.84524,4.037109 51.81241,4.123883 51.7913,4.196586 51.76081,4.269289 51.71391,4.360754 51.69515,4.313848 51.65293,4.248181 51.65293,4.177824 51.67873,4.119193 51.69984,4.044145 51.71391,4.023039 51.7913,3.933919 51.80537,3.870598 51.77958,3.847145 51.83821,3.973788 51.84524)),((3.793204 51.74674,3.933919 51.73502,3.985514 51.68577,4.076979 51.667,4.116848 51.65293,4.023039 51.62714,3.931574 51.6201,3.865907 51.6459,3.826037 51.6928,3.76037 51.69984,3.692358 51.66935,3.647799 51.70922,3.713466 51.73502,3.793204 51.74674)),((4.806348 53.12574,4.879051 53.175,4.92361 53.13278,4.91423 53.0718,4.86967 53.0249,4.801658 52.99676,4.747718 52.97096,4.72192 53.0249,4.754754 53.0765,4.806348 53.12574)),((5.216766 53.39545,5.507576 53.4447,5.559171 53.43766,5.493505 53.41655,5.460672 53.39545,5.387969 53.3931,5.336373 53.37669,5.240219 53.36027,5.183933 53.33682,5.165171 53.36027,5.216766 53.39545)),((3.596204 51.60134,3.720502 51.60134,3.840109 51.61306,3.877634 51.55443,3.774442 51.56147,3.718157 51.52864,3.645454 51.56147,3.596204 51.60134)),((5.636564 53.46346,5.728029 53.44939,5.852327 53.46112,5.941446 53.45877,5.88985 53.44001,5.800732 53.43063,5.716303 53.43063,5.674088 53.41421,5.622492 53.42828,5.60373 53.45408,5.636564 53.46346)),((5.008039 53.28757,5.050254 53.30398,5.094813 53.31102,5.120612 53.28991,5.001003 53.2688,4.982243 53.24066,4.932992 53.20548,4.862634 53.19845,4.890778 53.22659,4.970516 53.2688,5.008039 53.28757)),((6.138446 53.49395,6.27447 53.50567,6.307303 53.49629,6.236946 53.46815,6.154862 53.46581,6.12672 53.44939,6.100922 53.46581,6.138446 53.49395)),((6.419876 53.54085,6.483197 53.51974,6.42691 53.51506,6.396423 53.53382,6.419876 53.54085)))
+MULTIPOLYGON(((21.84207 70.15152,21.97319 70.33302,22.2882 70.28674,22.21218 70.13094,22.55299 70.11597,22.35402 70.26537,22.82551 70.11418,22.99043 70.13941,23.14568 69.96069,23.01921 69.92293,23.46515 69.97898,23.18046 70.2192,23.86261 70.49794,24.32043 70.45166,24.09572 70.53973,24.29384 70.68726,24.68787 70.62997,24.2305 70.83685,24.83872 70.9241,25.90773 70.86875,25.04135 70.50842,25.27655 70.47153,24.93924 70.23252,24.98052 70.04855,26.6761 70.96709,26.68946 70.75258,26.32351 70.65202,26.63604 70.68196,26.4777 70.36253,27.10075 70.46803,26.96149 70.58899,27.28107 70.58844,27.11594 70.74791,27.66703 70.80116,27.10248 70.93214,27.54397 70.95575,27.64564 71.1329,28.54985 70.96791,27.8016 70.79721,28.13842 70.73431,27.63552 70.62026,28.31022 70.69151,27.86082 70.43165,28.52319 70.45166,28.52629 70.73009,28.83331 70.8766,31.05219 70.36028,30.15698 70.0697,28.74352 70.16062,29.67748 69.97577,29.35053 69.86671,29.74806 69.89113,29.48698 69.6563,30.11405 69.68554,30.17638 69.88417,30.37833 69.84275,30.32192 69.66548,30.83539 69.78523,30.92936 69.57227,30.11127 69.66338,30.10989 69.46273,28.92693 69.05738,28.82457 69.2292,29.33293 69.49054,27.96325 70.09605,25.97886 69.71546,25.70955 69.25553,25.78341 69.02026,24.90355 68.55798,23.95907 68.83519,23.16076 68.62904,22.37394 68.72049,21.64404 69.27008,20.55732 69.0625,20.06123 69.05964,20.34719 68.81397,19.97152 68.56113,20.2639 68.49102,19.95874 68.35111,18.41782 68.58438,18.12506 68.53831,18.15558 68.20344,17.90159 67.96887,17.28317 68.12019,16.74116 67.92086,16.10075 67.43378,16.40015 67.04433,15.37616 66.48485,15.49498 66.2817,14.51744 66.13348,14.51194 65.30472,13.63731 64.58576,14.10011 64.46725,14.13239 64.1923,13.95622 64.01196,12.68735 63.98003,11.97954 63.26993,12.22478 63.00294,12.05315 62.61018,12.31056 62.26601,12.13189 61.72578,12.87404 61.36028,12.67642 61.06058,12.22046 61.01215,12.6107 60.42669,12.4589 60.05256,11.84861 59.839,11.65688 58.90471,11.20772 59.08662,10.74242 59.21956,10.58851 59.76298,10.79186 59.84684,10.53784 59.89065,10.51422 59.51633,10.21649 59.74139,10.5291 59.30939,10.31263 59.05987,9.517869 59.1284,9.753135 58.99102,9.071466 58.75585,9.207537 58.66503,8.242558 58.12066,8.038828 58.23193,7.058003 57.97793,6.876623 58.19601,6.557533 58.11429,6.914882 58.28115,6.66843 58.26048,6.050154 58.37374,5.488884 58.75281,5.580944 59.0373,5.745366 58.85494,6.287653 58.843,6.144905 58.95353,5.891702 59.08628,6.555896 59.31867,6.021346 59.34036,6.609819 59.55851,6.14249 59.49675,5.865594 59.54847,5.669926 59.39749,5.872622 59.33651,5.645582 59.26267,5.377397 59.42097,5.354337 59.26957,5.221019 59.52766,6.371719 59.87321,5.664391 59.85282,6.309535 60.12941,6.07875 60.19475,6.353264 60.36945,6.671223 60.40372,6.544109 60.07598,6.687149 60.38522,7.103882 60.48833,6.220839 60.46949,5.825242 59.98647,5.581362 60.16747,5.762334 60.39264,5.443075 60.13733,5.248583 60.21247,5.299051 60.52531,5.532582 60.43325,5.544197 60.43011,5.708794 60.65871,5.660356 60.66037,5.582963 60.66302,5.43147 60.65918,5.272727 60.76728,5.588912 60.87415,5.273562 60.81738,5.249347 60.82107,5.017087 60.96661,5.195727 60.97346,5.55893 61.06534,5.695195 61.08549,5.791351 61.09957,5.833564 61.07846,5.882814 61.11833,5.98366 61.11129,6.039946 61.08315,6.185351 61.09488,6.270331 61.03673,6.413271 61.00889,6.638805 61.17937,7.008846 61.06535,6.846293 60.88282,7.127317 60.86863,7.03549 61.10806,7.704967 61.23224,7.328164 61.29511,6.969072 61.16276,6.595055 61.21049,6.748674 61.41132,6.475671 61.11507,6.30256 61.10785,6.204113 61.1582,6.093886 61.13709,5.993042 61.15585,5.793696 61.1582,5.638909 61.13943,5.549871 61.09982,4.986366 61.28486,5.340508 61.36329,4.980358 61.41684,5.4542 61.58797,5.007262 61.60167,5.408236 61.64253,4.968744 61.72462,5.426607 61.91809,5.982037 61.84818,5.924161 61.68971,6.032152 61.84679,6.838664 61.86786,5.140533 61.95007,5.141387 61.95128,5.430501 62.01894,5.114 62.10267,5.226726 62.20879,5.45742 62.00763,5.621748 62.06984,5.4958 62.20156,6.310968 62.06096,5.937289 62.22519,6.332246 62.38054,6.556844 62.10916,6.658926 62.19667,6.404811 62.36027,6.717857 62.45584,7.011213 62.29262,6.884479 62.09021,7.209925 62.10387,6.968877 62.11902,7.040806 62.28042,7.423234 62.26151,6.65845 62.47693,6.269083 62.58661,7.564664 62.50094,7.787214 62.57508,7.407303 62.63333,8.147413 62.68806,6.987703 62.72311,7.237048 62.81256,6.897095 62.91248,7.403111 63.00898,7.500012 62.938,7.555977 62.9989,8.001214 62.96955,8.102819 63.12164,8.306108 62.85692,8.695156 62.82569,8.175073 63.12996,8.484628 63.16019,8.969247 63.20753,8.615882 63.32793,8.883061 63.41566,8.9576 63.42763,8.985616 63.43121,9.436234 63.38131,9.15294 63.49339,9.747838 63.65078,9.982463 63.44253,9.8304 63.32309,10.89838 63.45858,10.72612 63.62346,11.48346 63.79624,11.07235 63.86567,11.4907 64.00929,11.23665 64.03039,11.38492 64.1105,10.60142 63.81313,10.94973 63.911,10.94455 63.74199,10 63.48926,9.809731 63.66524,10.12201 63.78666,9.561911 63.77358,10.21547 63.92772,9.95276 63.91139,10.12348 63.96981,9.95577 63.95246,10.03705 64.1037,10.67308 64.361,10.51963 64.44307,10.83173 64.37196,10.64976 64.45038,10.95751 64.61182,11.33908 64.4626,11.21798 64.31768,11.6893 64.46881,11.44312 64.51115,11.78494 64.59402,11.45601 64.59724,11.84772 64.79591,11.6978 64.84655,11.26072 64.7318,11.7552 65.01889,12.38212 65.17827,12.25053 65.23299,12.41924 65.36651,11.98542 65.23069,12.28498 65.58868,12.76865 65.46489,12.36043 65.63313,12.65575 65.65398,12.66485 65.92242,13.2088 65.8272,12.92165 66.00634,12.66613 66.03586,12.84315 66.13247,13.82388 66.14137,13.60046 66.23106,14.17114 66.32902,13.04136 66.17626,13.56458 66.30881,13.00419 66.33389,13.16111 66.46726,12.96768 66.53413,13.52345 66.58945,13.16226 66.66192,13.55189 66.72039,13.98573 66.80309,13.49166 66.95868,14.22807 66.99952,14.50419 67.24226,15.47197 67.1009,15.17461 67.33096,14.3141 67.2567,15.00751 67.5779,15.77652 67.37537,15.51575 67.45078,15.89476 67.58096,15.21906 67.55827,15.46124 67.59695,15.1717 67.6355,15.30596 67.74119,15.84335 67.69236,15.38452 67.88085,15.0626 67.78135,14.75179 67.81334,15.00795 67.91244,15.98013 67.97713,15.28366 68.02984,16.05567 68.26249,16.21682 67.89803,16.51566 67.82095,16.2466 67.90721,16.184 68.02721,16.38955 67.96309,16.73819 68.08881,16.28369 68.11938,16.6081 68.187,16.1689 68.32867,16.81884 68.15864,16.27487 68.37633,17.18027 68.39504,17.35028 68.20119,17.30406 68.42419,17.91361 68.42042,16.50356 68.44904,16.59055 68.63325,17.38981 68.73111,17.80978 68.74881,17.47015 68.83342,17.85003 68.86791,17.4722 68.99735,18.15218 69.15166,17.96909 69.23325,18.15841 69.46892,18.4974 69.23608,18.99115 69.29081,18.44538 69.4445,19.01626 69.47414,19.24318 69.52424,18.96236 69.54367,19.11832 69.74664,19.73742 69.80253,19.48765 69.40062,19.73866 69.60735,20.1421 69.58543,19.77212 69.68628,20.34433 69.95657,20.35719 69.61816,19.92563 69.27035,20.42307 69.58904,20.91118 69.47294,20.46038 69.76516,20.60266 69.81219,21.05739 69.96253,20.84925 69.85654,21.12836 69.80554,21.33885 69.90916,21.23839 70.0144,22.1411 69.74796,21.88229 69.84032,22.06984 70.03361,21.77377 70.04034,22.06465 70.12924,21.84207 70.15152)),((16.23835 68.5464,16.23503 68.54613,15.65811 68.31426,15.32005 68.36246,15.57218 68.50522,14.97887 68.31692,15.35949 68.50402,15.20224 68.57796,15.62283 68.62086,15.43368 68.71577,15.70119 68.69968,15.45875 68.75798,15.63318 68.95781,15.96381 68.89573,15.7635 68.74171,16.00945 68.77895,15.7222 68.53527,16.26578 68.74454,16.08812 68.82629,16.25584 68.92373,16.59678 68.83749,16.51619 68.56886,16.23835 68.5464)),((17.86936 69.45183,18.06351 69.49537,17.8777 69.31853,18.00643 69.1969,16.77182 69.10138,17.20649 69.20067,16.8796 69.20518,17.18257 69.35673,16.86032 69.38138,17.67585 69.47153,17.485 69.60749,17.86936 69.45183)),((22.59373 70.64883,23.50484 70.78535,22.92434 70.53392,22.07697 70.4828,22.3043 70.60646,21.95986 70.66729,22.59373 70.64883)),((23.16913 70.27516,22.81106 70.41317,23.56939 70.62529,23.63326 70.44396,23.16913 70.27516)),((19.14832 70.07784,19.68089 69.97761,19.07579 69.79224,18.70502 69.92783,19.14832 70.07784)),((18.92441 69.82628,19.05021 69.76727,18.74888 69.56024,18.00589 69.56647,18.92441 69.82628)),((16.09279 69.18268,15.4134 68.90026,15.84895 69.25932,16.12759 69.32863,16.09279 69.18268)),((14.2677 68.28825,13.45181 68.09159,13.6646 68.31562,14.2677 68.28825)),((15 68.38623,14.19797 68.18076,14.41151 68.39838,15 68.38623)),((25.98209 71.14107,25.90011 71.01073,26.21401 71.06045,26.07679 70.98218,25.24771 71.03871,25.98209 71.14107)),((21.8353 70.1522,21.17303 70.21849,21.55424 70.32643,21.8353 70.1522)),((11.12816 64.96505,11.37226 64.94659,11.14611 64.82578,10.74204 64.86393,11.12816 64.96505)))
+MULTIPOLYGON(((81.05566 30.20446,81.19847 30.02989,81.40681 30.41374,82.14826 30.32864,82.19776 30.09251,83.23838 29.58295,83.54865 29.19856,84.09618 29.27633,84.15152 28.88498,84.85825 28.56832,85.1314 28.67791,85.11485 28.33332,85.49779 28.32973,86.04537 27.90898,86.16701 28.17015,86.41976 27.9102,86.7031 28.10784,87.13796 27.82401,88.13596 27.87923,87.9837 27.12124,88.18853 26.76687,88.02405 26.36578,87.32799 26.35671,87.06647 26.58938,86.72475 26.42732,86.34086 26.6219,85.85046 26.56794,85.62429 26.88045,85.20665 26.76708,84.64421 27.04913,84.62772 27.32822,84.1551 27.51991,83.31216 27.33275,82.76105 27.50681,82.70869 27.7071,81.89027 27.85854,80.0665 28.83346,80.36317 29.74552,81.05566 30.20446)))
+MULTIPOLYGON(((173.9964 -41.19994,173.9924 -40.97184,174.3091 -40.99643,173.9084 -41.27447,174.1897 -41.23452,174.03 -41.44682,174.2724 -41.74858,173.2549 -42.9416,172.6731 -43.19185,172.8073 -43.58964,172.6532 -43.64121,173.0494 -43.6531,173.1068 -43.83355,172.3805 -43.8531,171.4624 -44.2086,170.5057 -45.88421,170.7407 -45.87521,170.1664 -46.03535,169.8104 -46.44553,169.3551 -46.63894,168.3276 -46.62592,168.3372 -46.39865,167.7338 -46.36562,167.6788 -46.13684,166.6541 -46.20186,166.9069 -45.92653,166.5555 -46.0769,166.7539 -45.94624,166.4405 -45.99981,166.4442 -45.81805,166.9687 -45.719,166.7124 -45.60304,167.0025 -45.48468,166.6618 -45.55541,166.8969 -45.43191,166.8359 -45.27074,167.0119 -45.36002,167.1845 -45.31486,166.97 -45.13329,167.814 -44.59441,168.3659 -44.00691,168.8066 -43.96864,170.7672 -42.9087,171.1402 -42.56164,171.4547 -41.75324,172.0582 -41.39113,172.1071 -40.88616,172.9104 -40.52041,172.6532 -40.65624,173.0605 -40.86075,173.0746 -41.27824,173.9737 -40.89411,173.7549 -41.26729,173.9964 -41.19994)),((174.3094 -36.30801,174.3664 -36.11094,174.2299 -36.26088,173.9713 -36.11866,174.1787 -36.33075,174.0383 -36.39416,173.0493 -35.18896,173.1573 -35.00779,172.6389 -34.47308,173.038 -34.40247,173.2464 -34.97886,173.3985 -34.78116,173.4103 -34.97341,174.0756 -35.11601,174.1067 -35.33955,174.3306 -35.17216,174.5901 -35.85564,174.462 -35.95218,174.7551 -36.32113,174.6783 -36.60498,174.8815 -36.8723,175.5585 -37.18783,175.3252 -36.47904,175.5318 -36.54259,175.6052 -36.7577,175.8139 -36.71889,175.6707 -36.88263,175.8243 -36.85992,176.1529 -37.63459,177.148 -37.99561,177.988 -37.53841,178.5509 -37.6825,178.2861 -38.52654,177.9391 -38.71741,177.9992 -39.11107,177.8618 -39.26913,177.6937 -39.05359,177.043 -39.19933,176.8686 -40.13,175.9584 -41.24759,175.2365 -41.61131,175.2044 -41.42995,174.8683 -41.41119,174.8864 -41.23567,174.6116 -41.28827,174.8501 -41.09486,175.244 -40.50157,175.1102 -40.03469,173.7513 -39.30873,174.5628 -38.83226,174.81 -38.0105,174.7645 -37.34124,174.1525 -36.47236,174.4451 -36.64529,174.3094 -36.30801)),((167.9923 -47.11349,167.4458 -47.26273,167.7847 -46.68311,168.1631 -46.89505,167.9174 -46.96764,168.2014 -46.92371,168.2191 -47.09335,167.9923 -47.11349)),((166.2163 -50.85637,165.8886 -50.83928,166.0643 -50.52962,166.2821 -50.5443,166.075 -50.71669,166.2163 -50.85637)))
+MULTIPOLYGON(((55.21152 22.69804,55.48066 23.9653,56.02393 24.07637,55.7797 24.23422,55.81068 24.87648,56.01702 24.96965,56.11956 24.73428,56.37507 24.97792,57.15146 23.95011,58.75342 23.51822,59.50596 22.54907,59.79465 22.53149,59.80586 22.22342,58.51667 20.41323,58.19778 20.40164,58.1912 20.61224,57.82123 20.1942,57.67968 19.67735,57.84337 19.00342,56.83932 18.77858,56.35007 17.91949,55.42701 17.81874,55.04304 17.02286,54.07638 16.99513,53.0783 16.64576,51.88201 18.57879,52.0007 19.00233,55 20.00092,55.66659 21.99673,55.21152 22.69804)),((56.08878 26.07641,56.36845 26.19224,56.2636 25.63005,56.08878 26.07641)))
+MULTIPOLYGON(((-81.75515 7.34421,-81.89146 7.516112,-81.74836 7.643628,-81.58934 7.326368,-81.75515 7.34421)))
+MULTIPOLYGON(((-75.2882 -0.093691,-75.10118 -0.163096,-74.48315 -0.697625,-73.38068 -1.800092,-73.19693 -2.301213,-71.14234 -2.36803,-70.20691 -2.635289,-70.59111 -3.854687,-69.95342 -4.230484,-71.10893 -4.372511,-72.34502 -4.773405,-72.89562 -5.136259,-73.16131 -6.48023,-73.74282 -6.897146,-73.69297 -7.315934,-73.9537 -7.348258,-73.98156 -7.553418,-72.94584 -8.990152,-73.19613 -9.418253,-72.36356 -9.490671,-72.16473 -10.00232,-71.28828 -9.995796,-70.4999 -9.431578,-70.61765 -11.00737,-69.56644 -10.95666,-68.6793 -12.49715,-68.96119 -12.85152,-69.07586 -13.6541,-68.84068 -14.21027,-69.3628 -14.80396,-69.12598 -15.25612,-69.41386 -15.62077,-69.23594 -16.14303,-68.81416 -16.33753,-69.64076 -17.28202,-69.46265 -17.50755,-69.799 -17.65035,-69.94788 -18.24803,-70.37419 -18.34973,-71.38322 -17.70824,-71.51504 -17.26545,-75.19878 -15.38405,-76.27729 -14.2076,-76.3952 -13.90756,-76.20631 -13.3999,-77.17233 -12.08666,-77.30103 -11.52143,-77.66255 -11.29718,-78.75967 -8.604612,-79.98344 -6.742804,-81.14457 -5.980618,-81.06863 -5.787531,-80.84117 -5.841435,-80.84823 -5.533973,-81.19141 -5.215608,-81.06191 -5.03185,-81.32584 -4.679606,-81.24965 -4.270189,-80.21902 -3.437626,-80.15477 -3.910297,-80.47536 -4.054242,-80.30513 -4.200802,-80.44341 -4.436912,-80.13631 -4.285207,-79.61343 -4.442309,-79.26035 -4.967359,-78.9999 -4.979351,-78.61257 -4.475154,-78.32841 -3.441479,-78.13014 -3.516708,-78.19521 -3.364114,-77.79285 -2.984906,-76.62732 -2.590585,-75.53837 -1.536144,-75.36436 -0.955734,-75.18459 -0.970688,-75.24495 -0.534989,-75.62195 -0.108895,-75.2882 -0.093691)))
+MULTIPOLYGON(((140.999 -2.608743,144.1146 -3.808876,144.1956 -3.822025,144.1997 -3.824358,144.2385 -3.82054,144.3123 -3.815015,144.3343 -3.821932,144.4263 -3.80323,145.8048 -4.849302,145.7606 -5.474028,147.3366 -5.918141,147.8046 -6.317366,147.7639 -6.694505,146.9345 -6.711218,147.1799 -7.463336,148.1337 -8.066836,148.6026 -9.083832,149.2981 -9.020769,149.2463 -9.507924,150.0552 -9.686542,149.7133 -9.812922,149.8595 -10,150.8737 -10.22459,150.3429 -10.33383,150.6933 -10.56322,150.4249 -10.69422,149.8812 -10.57376,150.0898 -10.47519,150.093 -10.47522,150.1029 -10.44177,148.7363 -10.1607,147.7295 -10.10448,146.9023 -9.270635,147.0222 -9.051986,146.5969 -8.999637,146.1151 -8.137254,145.813 -7.90257,144.8635 -7.778987,144.9334 -7.632177,144.5779 -7.640738,144.5248 -7.431922,144.518 -7.686209,144.3904 -7.486765,144.5048 -7.812098,144.2164 -7.666005,144.1159 -7.786599,143.7076 -7.516954,143.8409 -7.796087,143.9221 -8.003697,143.7794 -7.899379,143.8682 -8.049958,143.4788 -7.997828,143.2546 -7.792652,143.4337 -8.02028,143.4603 -8.0582,143.6114 -8.236415,142.9742 -8.341662,142.1535 -8.239811,143.109 -8.455365,143.406 -8.76221,143.3776 -9.006149,142.6406 -9.333755,142.218 -9.148643,142.1993 -8.909586,142.0811 -9.179693,142.026 -8.974239,141.9197 -9.200983,141.0214 -9.131344,141.0218 -6.898336,140.8429 -6.611421,141.0003 -6.31305,140.999 -2.608743)),((149.9601 -5.417626,150.0392 -5.010802,150.1875 -5.059336,150.0886 -5.51531,150.6727 -5.546333,151.3457 -4.915129,151.6375 -4.942677,151.5182 -4.188996,151.944 -4.343509,152.1659 -4.141066,152.3988 -4.333271,152.3288 -4.838703,151.9495 -4.999009,152.0783 -5.449806,151.4851 -5.514403,151.18 -5.957832,149.9992 -6.309951,149.3246 -6.054186,149.0372 -6.161993,148.3565 -5.742074,148.343 -5.492445,149.2194 -5.582567,149.9601 -5.417626)),((150.8843 -2.680818,152.0497 -3.243535,152.9324 -3.979725,153.1121 -4.38087,152.8719 -4.854138,152.3373 -3.637312,150.7177 -2.758145,150.8843 -2.680818)),((154.7747 -5.559685,154.7062 -5.408555,155.0605 -5.543166,155.814 -6.365134,155.9051 -6.800642,155.335 -6.726784,155.209 -6.317973,154.7417 -5.944575,154.7747 -5.559685)),((146.7999 -1.970029,147.3455 -2.041809,146.5556 -2.254868,146.57 -1.988917,146.7999 -1.970029)),((150.5663 -9.368417,150.9251 -9.685266,150.4405 -9.63889,150.5663 -9.368417)),((151.2724 -9.932449,151.2201 -10.19261,150.9637 -10.10765,150.7396 -9.739069,151.1077 -10.04107,151.2724 -9.932449)),((152.5086 -8.994152,153.0195 -9.162484,152.7328 -9.263479,152.5086 -8.994152)),((150.2314 -2.38647,150.4418 -2.657031,149.9557 -2.506341,150.2314 -2.38647)),((153.2103 -11.32783,153.7687 -11.62338,153.2572 -11.51046,153.2103 -11.32783)))
+MULTIPOLYGON(((121.7873 13.93721,121.7853 13.93825,121.2876 13.5966,120.8871 13.6927,120.8761 13.90552,120.6582 13.77089,120.5929 14.22979,120.9611 14.63483,120.5994 14.90262,120.4764 14.4093,120.2979 14.82682,120.0843 14.78565,119.7568 16.16742,119.8844 16.39118,120.1015 16.05869,120.4222 16.16321,120.3483 17.684,120.5638 18.49328,120.8483 18.65069,121.928 18.26576,122.2396 18.51276,122.1636 17.61864,122.5278 17.09649,122.2289 16.38917,121.9998 16.02581,122.1405 16.2638,121.5523 15.89799,121.6386 15.71886,121.3716 15.31909,121.7339 14.69525,121.6042 14.6623,121.7421 14.15639,122.2307 13.89511,122.1637 14.16183,122.6816 14.34383,123.0428 14.10384,123.12 13.73078,123.3128 13.78915,123.338 14.10619,123.4253 13.9227,123.7137 13.9427,123.9701 13.71217,123.5844 13.7222,123.532 13.56439,123.869 13.22884,123.7555 13.06432,124.1972 13.04049,124.1405 12.67423,123.9965 12.54283,123.793 12.83673,124.029 12.96995,123.7361 12.84538,123.3181 13.00962,123.1909 13.42915,122.5336 13.9643,122.5994 13.16033,121.7873 13.93721)),((126.5723 7.723431,126.4573 6.997792,126.3432 6.801862,126.152 6.904821,126.1886 6.273873,125.8481 7.36192,125.3809 6.801755,125.7129 6.106777,125.3304 5.555425,125.2493 6.098561,124.9493 5.855325,124.1787 6.215242,123.9426 6.821443,124.2444 7.407478,123.7181 7.792254,123.4275 7.815274,123.4097 7.358588,123.1175 7.513375,123.1223 7.758925,122.8112 7.435522,122.8513 7.716344,122.6105 7.767706,122.1555 6.915938,121.8941 7.106333,122.2274 7.963125,122.9892 8.200829,123.0273 8.485272,123.3913 8.726957,123.7582 8.600774,123.749 8,124.2303 8.218649,124.3832 8.593207,124.7511 8.500415,124.8039 9.003431,125.0972 8.826818,125.2063 9.095564,125.5185 9.0111,125.435 9.824158,126.0498 9.236019,126.2115 9.309255,126.337 8.843996,126.0872 8.612478,126.3959 8.505733,126.3786 7.832776,126.5723 7.723431)),((124.9084 11.39225,125.0264 11.77384,124.3999 12.18456,124.2628 12.56041,125.0252 12.55442,125.036 12.54425,125.5185 12.19497,125.4449 11.59937,125.7613 11.04088,124.988 11.2848,125.2646 10.36711,125.13 10.16527,124.9844 10.38388,125.033 10.00383,124.7753 10.1434,124.7825 10.78576,124.6132 10.99946,124.3793 10.91966,124.315 11.56559,124.4894 11.3262,124.9084 11.39225)),((122.7102 10,122.9528 10.89416,123.5094 10.94045,123.136 9.834645,123.2061 9.094457,122.9357 9.083772,122.3838 9.710353,122.4516 9.975727,122.7102 10)),((119.5589 11.06492,119.5594 11.0585,119.7004 10.49537,118.7495 9.927208,118.4893 9.295677,117.201 8.332909,117.6331 9.049329,119.2562 10.49023,119.2226 10.95388,119.4584 10.72194,119.3015 11.00448,119.3027 11.01071,119.4851 11.42674,119.5589 11.06492)),((122.6271 10.78448,121.916 10.44899,122.1013 11.65333,121.8874 11.90057,122.5928 11.50883,122.8269 11.61428,122.8843 11.43027,123.1525 11.59888,123.1274 11.17202,122.6271 10.78448)),((121.3782 12.29665,121.0932 12.26944,120.3186 13.48308,120.9868 13.52215,121.5578 13.12539,121.3782 12.29665)),((123.9202 11.87073,123.5354 12.21131,123.167 11.90774,123.2414 12.60446,123.9022 12.20752,124.0702 11.85565,124.0612 11.72544,123.9202 11.87073)),((123.9401 10.30818,123.9386 10.30701,123.3019 9.517315,123.9996 11.27327,123.9401 10.30818)),((124.1776 10.15537,124.1808 10.15591,124.5681 10.02752,124.605 9.804487,124.2449 9.599773,123.785 9.754159,124.1776 10.15537)),((124.2058 13.51797,124.0243 13.66346,124.2089 14.10054,124.4219 13.79581,124.2058 13.51797)),((121.9572 6.702037,122.3251 6.620943,121.9587 6.404049,121.7925 6.627535,121.9572 6.702037)),((120.0858 12.16537,120.3364 11.99266,119.9799 12.00516,119.8614 12.31052,120.0858 12.16537)),((125.6463 10.25395,125.6114 9.817491,125.4814 10.11613,125.6328 10.47033,125.6463 10.25395)),((121.8192 15,122.047 15.00603,121.9518 14.631,121.8192 15)),((121.2289 6.000042,121.4256 5.983068,121.2756 5.853281,120.8687 5.94961,121.2289 6.000042)),((122.0228 13.19721,121.8664 13.57089,122.1221 13.45867,122.0228 13.19721)))
+MULTIPOLYGON(((74.57156 37.03444,75.14687 37.01989,75.4545 36.72161,75.85235 36.6753,76.17518 35.83339,76.56726 35.91782,77.18671 35.52834,77.8409 35.50421,76.68182 34.75959,75.74921 34.51583,74.37554 34.80344,73.94156 34.6772,73.76322 34.35963,73.97623 34.26481,73.88322 34.04995,74.26275 33.97429,73.95624 33.72029,74.18707 33.45552,74.01427 33.19825,74.53153 32.74073,74.69702 32.83971,74.69842 32.48494,75.37476 32.22432,74.54382 31.8223,74.53585 31.15423,74.6857 31.06146,73.93529 30.46296,73.96526 30.19131,73.39652 29.93901,72.94442 29.0341,72.39619 28.77465,71.89957 27.9642,70.86549 27.70511,70.36617 28.00825,69.57813 27.16549,69.51545 26.74006,70.16774 26.55075,70.09608 25.94432,70.27539 25.71132,70.65932 25.70151,71.1244 24.40936,69.97868 24.16505,68.82635 24.3084,68.74924 23.96205,68.31957 23.92002,67.46552 23.90661,67.29723 24.30736,67.52905 24.33453,67.41748 24.47749,67.31557 24.58925,67.32438 24.59338,67.42773 24.68052,67.41364 24.69534,67.24619 24.72478,66.65139 24.82935,66.74201 25.18326,66.54139 25.6426,66.09185 25.47961,66.51988 25.40648,64.78055 25.34775,64.61661 25.1546,64.02867 25.46499,64.06428 25.32833,63.60587 25.37063,63.49269 25.19816,62.49446 25.25285,61.76439 25.03278,61.61045 25.19495,61.84788 26.22814,62.43453 26.56814,63.16919 26.64729,63.31746 27.13866,62.78297 27.23428,62.79194 28.2771,61.80416 28.64017,60.8786 29.86178,62.45577 29.38897,64.10529 29.37748,66.23059 29.84671,66.38657 30.93392,66.73107 31.21251,67.76277 31.32756,67.55399 31.5288,68.16888 31.83424,68.91688 31.60471,69.31762 31.92807,69.2407 32.46139,69.5071 33.02904,70.32659 33.34047,69.89754 34.02774,71.06528 34.05179,71.17126 34.35826,70.99556 34.55477,71.6749 35.19654,71.54667 35.72023,71.20142 36.03578,71.63596 36.47205,71.85727 36.39943,72.6316 36.84843,74.05276 36.82872,74.57156 37.03444)))
+MULTIPOLYGON(((14.61713 53.84257,14.21288 53.86478,14.22437 53.92654,14.69307 53.99624,14.66894 53.90725,17.98088 54.83335,18.73148 54.68366,18.39455 54.74372,18.7814 54.35429,19.87666 54.63707,19.2318 54.33939,19.37303 54.22312,19.78606 54.43672,22.78779 54.36525,23.38738 54.21452,23.50595 53.96659,23.92022 53.15824,23.91802 52.67258,23.17688 52.28258,23.65413 52.07933,23.54564 51.606,24.15068 50.87114,23.96477 50.80079,24.10886 50.63593,22.68042 49.56676,22.89656 49.00924,22.57044 49.08673,21.63166 49.44709,20.32678 49.40271,19.79252 49.19341,19.47433 49.60033,18.98867 49.39638,18.85366 49.56773,18.57495 49.92144,17.78249 50.01773,17.59099 50.15761,17.68593 50.32611,16.91216 50.44516,17.01608 50.22456,16.63588 50.10873,16.19747 50.4337,16.3499 50.65818,15.38146 50.77971,15.17237 51.02024,14.82523 50.87399,15.03887 51.27147,14.58629 51.82447,14.75716 52.06902,14.53389 52.39124,14.63822 52.57733,14.12299 52.8411,14.45072 53.26357,14.26866 53.69652,14.59569 53.5862,14.61713 53.84257)))
+MULTIPOLYGON(((-82.5631 9.566999,-82.17525 9.193913,-82.26879 9.010703,-81.81246 8.938623,-81.88934 9.18726,-81.29579 8.775654,-79.80585 9.374632,-79.63265 9.616993,-78.97169 9.564364,-79.05305 9.442777,-78.04528 9.236524,-77.36086 8.686984,-77.17687 7.926277,-77.57512 7.508054,-77.74377 7.724391,-77.88682 7.220824,-78.44577 8.062403,-78.15136 8.415541,-77.80226 8.131576,-78.08723 8.470945,-78.25148 8.380498,-78.23177 8.546016,-78.36933 8.421503,-78.41398 8.56051,-78.41977 8.348485,-78.62105 8.770122,-79.39434 9.023646,-80.48365 8.204998,-80.00105 7.462819,-80.87225 7.198997,-81.05313 7.923686,-81.214 7.884013,-81.228 7.604705,-81.53633 7.712834,-81.75175 8.198595,-82.16496 8.162915,-82.21665 8.378905,-82.83902 8.291308,-82.89683 8.032975,-83.03423 8.364222,-82.714 8.931086,-82.93277 9.07554,-82.93756 9.473368,-82.5631 9.566999)))
+MULTIPOLYGON(((-67.1852 18.26983,-67.09653 18.51993,-65.99045 18.46575,-65.595 18.22752,-65.92176 17.97407,-67.18151 17.93584,-67.1852 18.26983)))
+MULTIPOLYGON(((-8.917275 39.01782,-9.13045 38.70432,-9.495944 38.7795,-9.407098 39.35523,-9.069618 39.58304,-8.608323 40.7261,-8.656229 40.85842,-8.751431 40.64624,-8.799806 41.90958,-8.199442 42.14565,-8.095398 41.80145,-6.571484 41.96747,-6.5545 41.69159,-6.184047 41.58385,-6.93036 41.034,-6.776533 40.36558,-7.018512 40.18777,-6.874694 40,-7.012062 39.67205,-7.524928 39.65641,-6.953342 39.029,-7.330624 38.43736,-6.951722 38.14727,-7.415919 37.7572,-7.457407 37.41022,-7.404598 37.1709,-7.875167 36.98083,-8.503443 37.15196,-8.993265 37.02172,-8.725278 37.6787,-8.906224 38.48983,-8.622249 38.40612,-8.743523 38.55943,-9.216735 38.41735,-9.26402 38.67098,-8.953477 38.6875,-8.917275 39.01782)),((-28.7643 38.6737,-28.01261 38.38972,-28.8311 38.35632,-28.7643 38.6737)),((-25.8411 37.87191,-25.13953 37.8218,-25.60724 37.65475,-25.8411 37.87191)),((-17.22564 32.84394,-16.67172 32.74069,-16.93982 32.6294,-17.22564 32.84394)),((-28.54714 38.77393,-28.32998 38.77393,-28.02932 38.62358,-28.17966 38.57347,-28.54714 38.77393)),((-31.28659 39.57571,-31.06945 39.45878,-31.06945 39.32515,-31.28659 39.35855,-31.28659 39.57571)),((-25.25646 36.9866,-25.02259 36.9866,-25.0393 36.85297,-25.27316 36.85297,-25.25646 36.9866)),((-27.27764 38.80733,-27.04378 38.70711,-27.27764 38.54007,-27.27764 38.80733)),((-28.04602 39.14142,-27.86227 39.04119,-27.9792 38.97438,-28.09613 39.0579,-28.04602 39.14142)))
+MULTIPOLYGON(((134.6175 7.721193,134.6676 7.637671,134.5841 7.353697,134.5006 7.353697,134.4672 7.437219,134.534 7.487332,134.5173 7.570854,134.6342 7.637671,134.6175 7.721193)),((134.4505 7.353697,134.4505 7.303584,134.4338 7.236777,134.3503 7.220073,134.3503 7.270186,134.3837 7.236777,134.4338 7.286891,134.4505 7.353697)),((134.2667 7.069734,134.2834 7.01962,134.2333 6.969507,134.25 7.01962,134.2667 7.069734)),((134.1331 6.936099,134.1665 6.90269,134.1331 6.869281,134.1331 6.936099)))
+MULTIPOLYGON(((-62.64708 -22.24563,-62.27002 -20.56706,-61.7347 -19.62802,-59.98358 -19.29404,-59.11981 -19.34715,-58.1924 -19.79767,-58.16346 -20.16246,-57.82151 -20.94222,-57.98896 -22.08457,-56.83665 -22.30044,-56.40335 -22.07751,-55.86168 -22.2791,-55.6128 -22.65852,-55.39753 -23.9739,-54.66784 -23.81538,-54.31655 -24.01433,-54.59636 -25.59497,-54.80127 -26.65639,-55.42037 -26.99908,-55.7326 -27.4448,-56.11202 -27.30512,-56.37604 -27.60447,-56.59883 -27.44798,-56.85005 -27.60421,-58.00693 -27.26365,-58.59655 -27.30121,-58.18894 -26.64248,-58.15548 -26.18055,-57.56323 -25.55561,-57.66761 -25.27694,-60.04662 -24.01213,-60.98194 -23.81165,-62.64708 -22.24563)))
+MULTIPOLYGON(((50.82992 24.74214,50.76339 25.4989,50.85052 25.64467,50.92041 25.47988,50.99568 25.97755,51.26283 26.15473,51.60325 25.71651,51.48189 25.50295,51.63665 25.0143,51.35101 24.61598,51.26202 24.6087,51.11311 24.48294,50.82992 24.74214)))
+MULTIPOLYGON(((55.51909 -20.87204,55.83528 -21.13003,55.79983 -21.3466,55.30052 -21.22212,55.29248 -20.9104,55.51909 -20.87204)))
+MULTIPOLYGON(((22.90599 47.95905,23.18665 48.11842,24.57831 47.96524,24.91005 47.72233,26.81927 48.25461,28.09873 46.99154,28.25912 46.44143,28.06982 45.59521,28.73659 45.22992,29.42979 45.44407,29.67573 45.21692,29.60929 44.85711,29.09656 44.75714,28.65602 44.33971,28.58377 43.73735,27.03238 44.15238,26.13661 43.98953,25.5627 43.64891,24.18021 43.68976,22.88669 43.84492,23.04128 44.08787,22.68183 44.21765,22.46022 44.46281,22.76005 44.56408,22.49272 44.70761,22.1509 44.47602,21.40279 44.78959,21.52709 45.16339,20.79429 45.48373,20.82344 45.77556,20.26995 46.12806,21.17978 46.30436,22.03673 47.53268,22.90599 47.95905)))
+MULTIPOLYGON(((29.59532 -1.392395,29.82593 -1.314871,29.92129 -1.48405,30.47686 -1.062396,30.89596 -2.078556,30.81868 -2.364058,30.56441 -2.417881,29.95822 -2.325547,29.86715 -2.76578,29.36887 -2.840679,29.07672 -2.592048,29.03217 -2.749662,28.87052 -2.419076,29.59532 -1.392395)))
+MULTIPOLYGON(((39.31893 32.21677,42.9772 30.72498,43.0655 30.4107,43.66146 30.3756,43.59605 29.60304,44.71873 29.20663,45.50752 28.77784,46.55759 29.10305,47.46055 29.00044,47.70495 28.52461,48.43147 28.53563,48.84699 27.61473,49.31306 27.47198,49.13666 27.40769,49.37329 27.13253,49.58826 27.17681,50.17196 26.63334,49.9974 26.75092,50.23676 26.31022,50.00939 25.98298,50.82992 24.74214,51.11311 24.48294,51.11637 24.26911,51.75201 23.86324,52.0006 23.00111,55.00691 22.49706,55.21152 22.69804,55.66659 21.99673,55 20.00092,52.0007 19.00233,48.76487 18.2688,46.33119 15.61425,46.32877 16.34975,46.08288 16.48298,44.36618 17.39002,43.86814 17.31088,43.34187 17.58682,43.23257 17.2722,43.21629 17.22469,43.23682 16.65217,42.77824 16.3692,42.31212 17.44274,41.63613 17.99704,41.26306 18.60587,40.75253 19.77845,39.70105 20.41832,39.28145 20.96123,39.1375 21.76241,38.94618 21.91311,39.09587 22.36292,38.60019 23.57171,37.94745 24.20642,37.42712 24.36739,37.15151 24.83314,37.24831 25.16879,35.22016 28.04927,34.57586 28.09255,34.96001 29.3589,36.07088 29.18588,36.75305 29.86721,37.50061 29.99781,37.99682 30.50064,37.00248 31.49365,39.31893 32.21677)))
+MULTIPOLYGON(((160.8149 -9.825731,159.8227 -9.801437,159.5989 -9.300936,160.3808 -9.415167,160.8149 -9.825731)),((161.3096 -10.19486,162.0749 -10.46595,162.3956 -10.82947,161.7573 -10.75466,161.3096 -10.19486)),((158.5452 -7.640836,158.5434 -7.639532,158.4251 -7.507535,158.7296 -7.575862,159.5331 -8.083711,159.9023 -8.583666,158.5452 -7.640836)),((161.3722 -9.522727,161.3738 -9.537572,160.7969 -9.07138,160.5489 -8.358188,161.002 -8.631818,160.9321 -8.813795,161.3722 -9.522727)),((157.5381 -7.373233,157.0112 -7.289949,156.4032 -6.736026,156.4874 -6.592081,157.55 -7.374984,157.5381 -7.373233)),((157.7509 -8.23035,157.8013 -8.660317,157.5421 -8.252825,157.2074 -8.316396,157.5024 -7.945463,157.7509 -8.23035)))
+MULTIPOLYGON(((25 21.9992,31.31852 22.0064,31.4745 22.22508,31.4121 22.00813,33.16651 22.00619,33.56408 21.72539,34.00521 21.77233,34.16069 22.2071,34.69196 22.29791,34.95135 22.85757,35.21217 22.7873,35.62337 23.14688,35.84367 22.76245,36.89112 22.06415,36.9726 21.39592,37.31501 21.06388,37.1324 21.22809,37.08739 21.05591,37.40939 18.87394,38.56443 18.00309,38.26013 17.55859,37.5153 17.33686,37.39465 17.04713,37.00204 17.06818,36.96253 16.28581,36.43877 15.15664,36.56107 14.25609,36.37843 13.54732,36.15517 12.68091,35.68944 12.66013,35.06233 11.74959,34.97515 10.90899,34.78151 10.70829,34.60198 10.90413,34.29985 10.58783,34.13977 8.595025,33.7691 8.362971,33.2178 8.430296,33.00082 7.873695,33.67129 7.693246,34.19323 7.038556,34.93832 6.551554,35.12726 5.62447,35.30796 5.341023,35.8614 5.314649,35.9477 4.629333,34.37846 4.611326,33.9945 4.214427,33.50901 3.748913,33.02008 3.887586,32.19777 3.515032,31.81783 3.827985,31.53893 3.654138,31.17384 3.793183,30.85357 3.48639,29.61472 4.660875,29.2455 4.344783,28.77811 4.558043,28.37458 4.275577,27.46342 5.016153,27.16044 5.767366,26.45115 6.085776,26.28659 6.46246,26.41443 6.643824,25.20037 7.488982,25.18009 7.902913,24.86475 8.180498,24.20358 8.303996,24.25266 8.711761,23.52011 8.726969,23.66824 9.891512,22.88134 10.9309,22.94528 11.41724,22.56609 11.62066,22.45838 12.62413,21.94108 12.63553,21.85074 12.87154,22.28421 13.34969,22.09221 13.7762,22.57632 14.17612,22.38421 14.50674,22.94006 15.10751,22.93059 15.55081,23.12228 15.7099,24.00159 15.70492,24 19.50804,24 20,25 20,25 21.9992)))
+MULTIPOLYGON(((20.55732 69.0625,23.65582 67.96259,23.40979 67.49654,23.78639 67.42785,23.5792 67.16257,24.01554 66.82013,23.65543 66.30672,24.15595 65.81819,23.79421 65.79698,23.06765 65.88229,23.23356 65.77407,23.10046 65.69971,22.63185 65.91102,22.67175 65.75342,22.20244 65.76402,22.14694 65.61271,22.40484 65.54126,22.03564 65.59631,22.09975 65.51413,22.08755 65.51017,21.44492 65.38924,21.74555 65.19302,21.23984 65.33414,21.59233 65.13867,21.00386 64.84528,21.61457 64.4379,21.075 64.22844,20.67546 63.79464,19.66945 63.43396,19.45469 63.57586,19.04459 63.1942,18.72535 63.29103,18.89701 63.21093,18.21487 63.01419,18.55248 62.95926,18.12101 62.76802,17.63623 63.16147,17.99957 62.66323,17.39172 62.44689,17.40183 62.41244,17.66954 62.23135,17.31168 61.85648,17.49206 61.61866,17.10894 61.70771,17.26128 61.65739,17.04956 61.57509,17.16948 61.43436,17.23318 60.89976,17.08458 60.90046,17.30548 60.67878,17.31552 60.67511,17.74145 60.49643,17.99307 60.60161,18.91607 59.93686,18.73001 59.75701,19.07313 59.72053,18.34891 59.38919,17.96753 59.43769,18.32234 59.27012,18.47579 59.17046,18.20595 59.02012,17.90366 58.85171,17.67621 59.17817,17.51422 58.77985,16.20383 58.64122,16.95583 58.48086,16.31331 58.49336,16.80689 58.33369,16.63668 58.34548,16.82097 58.31331,16.83426 58.12677,16.61994 58.20142,16.74702 58.02753,16.80994 57.87129,16.48153 57.89133,16.65873 57.76301,16.41756 57.92513,16.74178 57.70049,16.54031 57.72862,16.71506 57.48856,16.47146 57.26032,16.58572 57.04582,15.85938 56.07094,14.69408 56.15786,14.78384 56.03181,14.25196 55.87392,14.36262 55.554,14.18751 55.38017,12.81369 55.37869,13.06721 55.67295,12.44831 56.29349,12.78139 56.21265,12.61948 56.41773,12.87763 56.42852,12.91182 56.6227,12.35429 56.92632,12.12287 57.42981,11.95449 57.35889,11.72845 57.70001,11.9201 58.35195,11.5245 58.24786,11.7182 58.43204,11.58298 58.47839,11.42335 58.26945,11.46331 58.45503,11.24383 58.35351,11.25737 58.53282,11.25648 58.55013,11.20772 59.08662,11.65688 58.90471,11.84861 59.839,12.4589 60.05256,12.6107 60.42669,12.22046 61.01215,12.67642 61.06058,12.87404 61.36028,12.13189 61.72578,12.31056 62.26601,12.05315 62.61018,12.22478 63.00294,11.97954 63.26993,12.68735 63.98003,13.95622 64.01196,14.13239 64.1923,14.10011 64.46725,13.63731 64.58576,14.51194 65.30472,14.51744 66.13348,15.49498 66.2817,15.37616 66.48485,16.40015 67.04433,16.10075 67.43378,16.74116 67.92086,17.28317 68.12019,17.90159 67.96887,18.15558 68.20344,18.12506 68.53831,18.41782 68.58438,19.95874 68.35111,20.2639 68.49102,19.97152 68.56113,20.34719 68.81397,20.06123 69.05964,20.55732 69.0625),(12.31084 58.38442,12.57811 58.46795,12.49459 58.35101,12.61152 58.38442,12.79527 58.48465,12.9957 58.58488,13.14604 58.58488,13.17945 58.48465,13.36319 58.60158,13.61376 58.6851,13.73069 58.71849,13.91442 58.85212,14.04805 59.05258,13.91442 58.95235,13.88101 59.05258,14.04805 59.18621,14.04805 59.28644,13.88101 59.23632,13.7641 59.28644,13.71399 59.35326,13.54694 59.31985,13.56365 59.23632,13.46342 59.20292,13.36319 59.31985,13.04581 59.25303,13.12933 59.10269,13.17945 58.88553,12.77856 59.00246,12.46118 58.73519,12.66163 58.61829,12.31084 58.38442)),((18.80105 57.83535,19.10913 57.81799,18.81418 57.73992,18.77971 57.4671,18.94515 57.42034,18.136 56.90984,18.3084 57.09709,18.11047 57.52665,18.80105 57.83535)),((16.41026 56.19281,16.38081 56.52638,17.12928 57.35426,16.41026 56.19281)))
+MULTIPOLYGON(((16.11189 46.87151,16.65091 46.53329,16.50937 46.52197,16.30014 46.53714,16.28532 46.38754,16.10608 46.38754,16.06127 46.32756,15.80758 46.2083,15.64316 46.19313,15.55354 46.14832,15.68797 45.98391,15.64316 45.87946,15.3743 45.7895,15.3743 45.62508,15.23987 45.44584,14.95619 45.52064,14.85175 45.47583,14.58289 45.64025,14.41847 45.49065,14.00036 45.47583,13.8063 45.41586,13.49747 45.47862,13.49323 45.486,13.72107 45.59447,13.90781 45.6393,13.47854 46.00447,13.66695 46.18206,13.38307 46.30019,13.71563 46.52403,14.56157 46.37804,15.03901 46.65263,16.03466 46.6609,16.11189 46.87151)))
+MULTIPOLYGON(((-8.163539 71.14302,-7.940665 71.16119,-7.980974 71.02014,-9.078603 70.8614,-8.163539 71.14302)),((-53.94928 71.16938,-53.59618 71.3135,-53.376 71.11485,-53.94928 71.16938)))
+MULTIPOLYGON(((18.85366 49.56773,18.98867 49.39638,19.47433 49.60033,19.79252 49.19341,20.32678 49.40271,21.63166 49.44709,22.57044 49.08673,22.13036 48.3819,21.72957 48.35518,21.4518 48.58484,20.51103 48.54143,19.93207 48.13028,19.63655 48.24422,18.83232 48.04372,18.86988 47.80854,18.68 47.75199,17.78487 47.73532,17.16273 48.00808,16.84774 48.37205,16.92182 48.69472,17.03227 48.76385,17.15153 48.85381,17.31595 48.83865,17.56964 48.85381,17.86849 48.98824,18.01774 49.06304,18.12219 49.1823,18.12219 49.2571,18.34624 49.31708,18.33142 49.39188,18.57029 49.46633,18.7347 49.45151,18.85366 49.56773)))
+MULTIPOLYGON(((-13.30763 9.037539,-12.78951 9.300714,-12.43174 9.881638,-11.20675 10.00043,-10.66331 9.30055,-10.73339 9.084249,-10.46939 8.67458,-10.71892 8.27101,-10.28686 8.484799,-10.60413 7.770212,-11.45917 6.929611,-12.51441 7.385785,-12.30025 7.382319,-12.48358 7.449021,-12.37687 7.543462,-12.47503 7.781277,-12.78423 7.797123,-13.2902 8.419016,-12.92804 8.56413,-13.17512 8.531333,-13.30763 9.037539)))
+MULTIPOLYGON(((-16.50577 16.06219,-16.26278 16.52475,-14.33291 16.64259,-13.83995 16.1071,-13.3739 16.05435,-13.23643 15.61703,-12.24192 14.76061,-11.94072 13.92137,-12.04093 13.6279,-11.36283 12.97394,-11.37946 12.41356,-12.35323 12.30727,-13.0606 12.47781,-13.07347 12.63898,-13.70903 12.67622,-15.17925 12.68079,-15.66585 12.4283,-16.71754 12.32819,-16.76155 12.54338,-16.40078 12.57309,-16.7681 12.56695,-16.75583 13.06425,-15.81226 13.1591,-15.80781 13.34109,-15.29622 13.36043,-15.1106 13.58946,-14.36912 13.22905,-13.80755 13.38672,-15.07115 13.82657,-15.48113 13.58728,-16.56014 13.58879,-16.51591 13.85931,-16.69994 13.77484,-16.72587 13.99647,-16.77232 13.83145,-17.15847 14.62255,-17.53524 14.74664,-16.99009 15.08517,-16.50577 16.06219)))
+MULTIPOLYGON(((42.96164 10.98441,43.25469 11.4696,43.95675 10.68133,44.56458 10.3796,45.80741 10.86752,46.44966 10.68072,47.42209 11.17539,49.42203 11.33354,50.43153 11.6704,50.77378 11.98437,51.28105 11.83807,51.0172 10.41967,51.2337 10.43215,51.17758 10.56051,51.41303 10.43968,50.89915 10.31001,50.82713 9.417613,47.93942 4.438889,46.00196 2.423229,44.60449 1.596498,42.07595 -0.838695,41.83284 -1.175312,41.56717 -1.662053,41.00099 -0.834049,40.99211 2.829568,41.89908 3.975494,42.08767 4.179365,42.83331 4.270625,43.65907 4.868027,44.98174 4.917296,47.98618 8,46.9897 8,44.00586 8.996557,42.83263 10.27788,42.68301 10.60633,42.96164 10.98441)))
+MULTIPOLYGON(((-57.14622 5.999986,-57.14113 5.816273,-56.94384 6.00015,-55.91341 5.780722,-55.82718 5.953795,-54.83414 5.99401,-54.02424 5.823861,-54.01162 5.621387,-54.47425 4.903628,-54.3625 4.046188,-53.97749 3.601097,-54.52573 2.303486,-54.93989 2.632479,-55.37018 2.407456,-55.94821 2.532005,-56.13354 2.256321,-55.91082 1.882989,-56.48025 1.941472,-57.2044 2.833982,-57.30506 3.373516,-57.67311 3.381816,-58.0864 4.131202,-57.87356 4.904678,-57.19182 5.169795,-57.34863 5.312995,-57.14622 5.999986)))
+MULTIPOLYGON(((6.546042 0.352522,6.768535 0.294206,6.52479 0.024766,6.546042 0.352522)))
+MULTIPOLYGON(((11.89043 79.78609,12.30052 79.66035,12.1985 79.84067,13.85463 79.86784,13.96915 79.77794,13.7401 79.68999,12.3925 79.57956,13.49319 79.5741,13.22422 79.46852,14.01854 79.26618,14.14412 79.34093,13.84003 79.53727,14.73645 79.78636,15.26308 79.6091,15.75435 79.23559,15.64764 79.10672,16.52278 78.91335,15.61462 79.80681,16.44942 80.05889,18.05725 79.71346,17.56195 79.55282,17.76587 79.54418,17.65998 79.36821,18.30262 79.6245,18.86415 79.44118,18.60848 79.25294,18.90725 79.16695,21.52265 78.75532,18.96081 78.47273,19.05066 78.11738,18.37228 78.03956,18.30932 77.53676,17.70638 77.50509,17.31409 77.04971,17.068 77.05907,17.31506 76.96965,16.8949 76.80209,17.09303 76.64012,16.29881 76.57001,16.32986 76.71011,15.51376 76.87786,16.50116 77.01035,15.15264 77.03728,14.41185 77.19664,13.94165 77.52817,16.22956 77.43284,14.74774 77.65439,17.10048 77.78341,16.7587 77.88144,17.01988 77.93037,13.98495 77.72104,13.60757 78.05173,14.35501 77.96799,14.21214 78.10292,15.79702 78.34637,17.30019 78.42036,16.31411 78.45432,16.86323 78.66039,16.5398 78.72538,15.42297 78.46151,15.14858 78.60475,15.46802 78.63663,15.36961 78.84654,14.96843 78.59409,14.44135 78.68501,14.62225 78.55595,14.42493 78.47829,14.78641 78.37439,12.99782 78.20219,12.38307 78.49169,13.21738 78.54404,12.0367 78.60847,11.56738 78.74433,11.93077 78.83366,11.34544 78.97346,12.50275 78.91492,11.67208 79.0742,12.13165 79.29768,11.19189 79.11697,10.66446 79.53889,11.89043 79.78609)),((22.68399 80.33907,22.79388 80.5107,23.32733 80.41931,23.09837 80.38505,23.31011 80.33836,22.99885 80.17566,23.15994 80.11221,24.47143 80.3606,27.23061 80.07037,25.71329 79.62428,25.87874 79.51979,25.75757 79.44138,24.10345 79.23221,20.75345 79.36063,19.61994 79.60561,21.08651 79.53838,20.4556 79.66674,21.66445 79.80612,18.786 79.7125,18.08923 79.90682,18.9279 80.05235,17.70056 80.13579,19.42172 80.1133,18.99864 80.34449,19.78 80.21519,19.91125 80.37697,19.39987 80.43407,19.6448 80.50684,20.89507 80.19829,21.85966 80.25248,21.6327 80.13216,22.32095 80,22.58008 80.30102,22.33769 80.3866,22.68399 80.33907)),((22.43988 78.22848,24.3713 77.83358,23.92713 77.63831,24.14765 77.57308,22.68183 77.24064,22.55412 77.29334,22.79028 77.47029,22.52024 77.61302,20.8684 77.44043,21.55337 77.90948,20.82459 78.11438,22.43988 78.22848)),((-90.12866 13.73827,-89.52058 14.22222,-89.57234 14.40572,-89.34995 14.42176,-88.4948 13.85812,-87.75652 13.8623,-87.81824 13.40119,-87.89957 13.14959,-88.46616 13.15169,-90.12866 13.73827)),((21.63919 78.62122,22.13163 78.47421,22.04444 78.26186,20.72989 78.23103,20.59167 78.44015,20.16912 78.48421,21.63919 78.62122)),((31.65179 80.04832,31.45267 80.1118,31.6112 80.18989,32.63564 80.31588,33.49709 80.19212,31.65179 80.04832)),((10.64388 78.8913,12.14691 78.20528,11.03502 78.47587,10.50603 78.79975,10.64388 78.8913)),((28.4277 78.97012,29.69242 78.9026,28.08719 78.79597,27.87254 78.85575,28.4277 78.97012)),((26.61912 78.66003,26.39926 78.78109,26.54684 78.81599,27.00123 78.70078,26.61912 78.66003)),((18.98674 74.5161,19.29377 74.4603,19.06211 74.34914,18.7672 74.48451,18.98674 74.5161)))
+MULTIPOLYGON(((35.80864 32.75319,35.64941 32.6873,35.62841 33.25093,35.90757 33.43406,36.02116 33.76341,36.38395 33.82193,36.63919 34.2057,36.34557 34.51201,36.47128 34.63018,35.98031 34.64496,35.97204 35.2588,35.72723 35.5843,35.92172 35.93049,36.16907 35.81543,36.39755 36.22324,36.70071 36.24428,36.55289 36.49698,36.67554 36.8456,37.091 36.62365,38.25282 36.91349,39.22735 36.665,40.78173 37.12058,41.55814 37.08523,42.22494 37.31915,42.36371 37.10926,41.29453 36.35617,41.39429 35.63027,41.01237 34.41986,38.80408 33.37191,36.84583 32.31248,35.80864 32.75319)))
+MULTIPOLYGON(((31.98213 -25.95205,32.13366 -26.83497,31.97532 -27.31699,31.53687 -27.31616,30.81216 -26.82551,30.83329 -26.418,31.32036 -25.74403,31.98213 -25.95205)))
+MULTIPOLYGON(((14.99587 23.00189,15.99817 23.45037,24 19.50804,24.00159 15.70492,23.12228 15.7099,22.93059 15.55081,22.94006 15.10751,22.38421 14.50674,22.57632 14.17612,22.09221 13.7762,22.28421 13.34969,21.85074 12.87154,21.94108 12.63553,22.45838 12.62413,22.56609 11.62066,22.94528 11.41724,22.88134 10.9309,21.83262 10.83948,21.67271 10.23371,20.43423 9.153878,19.02328 8.995074,18.86246 8.852613,19.12222 8.671246,18.61805 8.052467,17.67167 7.982768,16.84385 7.529787,16.59592 7.88019,15.97481 7.483338,15.50748 7.527468,15.59733 7.767455,15.20761 8.610803,14.50994 9.032372,14.01946 9.670767,14.23641 9.997405,15.67966 10,15.14594 10.53835,15.11895 11.79355,14.83153 12.6285,14.45988 13.0745,14.08543 13.07806,13.63455 13.71068,13.47883 14.46007,15.50555 16.89787,15.72462 19.76368,15.99564 20.34847,15.19843 21.49131,14.99587 23.00189)))
+MULTIPOLYGON(((-0.142005 11.13898,0.912155 10.99649,0.774575 10.38476,1.355205 10,1.341589 9.54626,1.624833 9.042293,1.57392 6.688242,1.806693 6.28424,1.627816 6.225748,1.191781 6.104417,0.530341 6.825836,0.725227 8.284056,0.381674 8.749467,0.562796 9.40219,0.227102 9.455466,0.392497 10.30426,-0.063918 10.64102,0.022753 11.08191,-0.142005 11.13898)))
+MULTIPOLYGON(((100.0931 20.35574,100.5814 20.16878,100.5158 19.52846,101.2857 19.57056,101.3553 19.04666,100.9601 17.57215,101.1601 17.46701,102.0844 18.21974,102.6675 17.80686,103.5137 18.43748,103.9733 18.33454,104.7039 17.53196,104.7471 16.5365,105.6378 15.65781,105.4707 15.3448,105.5351 14.55281,105.2132 14.33601,105.0859 14.20729,104.8053 14.43433,103.6626 14.43951,103.0927 14.29263,102.6269 13.60597,102.34 13.54311,102.9195 11.63612,102.6046 12.21878,102.5811 12.04519,102.2926 12.18562,101.8354 12.6748,100.8566 12.64322,100.9773 13.47675,100.2692 13.52427,99.95284 13.30872,100.0208 12.18722,99.14848 10.347,99.25865 9.21736,99.83924 9.303065,100.5397 7.273146,101.0186 6.850026,101.5334 6.860398,102.0921 6.243936,101.8259 5.731784,101.584 5.933687,101.1384 5.610009,100.9842 5.799289,101.1082 6.253929,100.8508 6.231196,100.8171 6.436154,100.2888 6.7026,100.1211 6.422595,99.71484 6.893289,99.71948 6.901778,99.59379 7.374567,99.40384 7.300714,99.26925 7.660047,99.04448 7.695403,99.10603 7.952439,98.75483 8.138763,98.69901 8.308032,98.39011 8.129838,98.38534 8.133008,98.21206 8.573505,98.56767 9.880453,98.68176 10.17759,98.77948 10.67773,99.66872 11.81529,99.10999 13.06757,99.11597 13.89081,98.61044 14.31464,98.1906 15.11106,98.58364 15.36202,98.56137 16.05271,98.84703 16.14147,98.9175 16.39474,98.68119 16.26792,98.50951 16.94456,97.69774 17.8203,97.6436 18.28764,97.34662 18.57051,97.76765 18.57921,97.67117 18.94544,98.04517 19.80859,98.92458 19.74414,99.07542 20.09255,99.53727 20.14476,99.46452 20.38927,100.0931 20.35574)))
+MULTIPOLYGON(((70.93612 41.71566,72.45782 41.60652,73.16536 41.11726,70.44686 40.30059,70.28378 39.75739,73.58203 39.28056,73.5577 39.25914,73.84548 38.97701,73.7812 38.61199,74.86215 38.50415,74.89603 37.66544,75.13383 37.43744,74.87856 37.23569,74.356 37.41876,73.65158 37.23478,73.76276 37.43214,73.30843 37.46241,71.66684 36.67787,71.4258 37.06402,71.58373 37.91962,71.24846 37.9254,71.36493 38.24717,70.98909 38.48343,70.17991 37.94419,70.30613 37.69593,70.1679 37.52888,69.53245 37.59031,69.25591 37.09871,68.89037 37.32844,68.00586 36.92937,67.75214 37.21798,67.62237 37.22717,68.48985 38.39752,68.32677 38.99591,67.89272 39.21294,67.45741 39.64825,70.93612 41.71566)))
+MULTIPOLYGON(((52.73736 42.72655,54.14094 42.80331,53.97785 42.20491,55.93486 41.55257,57.23954 41.33429,57.23954 41.82354,58.97827 42.74936,60.06592 42.04183,60.44603 40.89898,62.23996 40.35579,63.65252 39.32208,65.3373 38.5606,65.64548 37.38977,65.52431 37.23418,64.75661 37.10646,64.44881 36.237,63.12922 35.86929,63.24798 35.69232,63.09636 35.42773,62.74783 35.26518,62.30208 35.14109,62.0574 35.43748,61.27663 35.61316,61.14761 36.65593,60.37067 36.62425,60.05066 37.01224,59.55383 37.12253,59.34782 37.51545,57.51798 37.91442,57.23291 38.26714,55.47419 38.08433,54.85671 37.76054,54.67566 37.44039,53.89781 37.34081,53.83055 38.52482,53.99278 38.93935,53.53237 39.33275,53.17293 39.37973,53.18463 39.21556,53.0963 39.43308,53.28534 39.69695,53.23618 39.54518,53.6595 39.568,53.43864 39.70164,53.44873 39.98264,52.88393 40.02711,52.94738 39.85824,52.73585 40.08132,52.91964 40.89231,53.59774 40.84504,54.0318 40.57281,54.30402 40.7359,54.63019 41.11726,54.41191 41.38949,54.0318 41.82354,53.70563 42.04183,52.99935 41.98788,52.81438 41.2697,52.41895 42.08253,52.68018 42.55856,52.55398 42.72366,52.70261 42.57597,52.73736 42.72655)))
+MULTIPOLYGON(((8.641963 36.94693,9.755942 37.34962,9.813557 37.1471,10.2789 37.18811,10.13229 37.14772,10.38788 36.72108,11.04808 37.08922,11.12227 36.84296,10.57805 36.39962,10.48948 36.04889,11.04988 35.63386,11.16134 35.23075,10.72583 34.65115,10.11265 34.30937,10.00903 34.0055,10.44824 33.63025,10.73653 33.70676,10.75259 33.48042,11.05261 33.62707,11.18444 33.21049,11.56605 33.16901,11.52732 32.40281,10.29116 31.69012,10.1375 31.48572,10.27783 30.82461,9.575346 30.24043,9.129236 32,8.353506 32.51591,8.326456 32.80933,7.738455 33.25135,7.533545 33.79332,7.636226 34.19632,8.31266 34.72816,8.473442 35.24205,8.255554 35.76288,8.409268 36.42483,8.154936 36.49945,8.641963 36.94693)),((10.93262 33.87753,11.07154 33.80139,10.88713 33.63782,10.74518 33.8871,10.93262 33.87753)))
+MULTIPOLYGON(((41.547 41.52649,42.52033 41.44005,42.82929 41.58788,42.85301 41.56945,43.67179 40.93345,43.65548 40.11077,44.41919 40,44.82024 39.62525,44.61477 39.77621,44.42366 39.4098,44.04729 39.37641,44.31766 38.38543,44.50953 38.32789,44.23886 37.88711,44.63467 37.72633,44.80497 37.14814,44.31998 36.96706,44.14184 37.31565,43.85316 37.19084,42.80326 37.37804,42.36371 37.10926,42.22494 37.31915,41.55814 37.08523,40.78173 37.12058,39.22735 36.665,38.25282 36.91349,37.091 36.62365,36.67554 36.8456,36.55289 36.49698,36.70071 36.24428,36.39755 36.22324,36.16907 35.81543,35.92172 35.93049,35.79093 36.31989,36.19867 36.59865,36.02021 36.93353,35.34907 36.54282,34.65621 36.80597,33.9586 36.21222,32.80812 36.01908,32.02614 36.54405,31.00871 36.86121,30.63026 36.85546,30.40457 36.20012,29.67679 36.12218,29.11926 36.37487,29.09581 36.68213,28.84761 36.59026,28.45742 36.8829,27.98264 36.55764,28.1247 36.80329,27.40521 36.66545,28.03409 36.78895,28.32711 37.0551,27.26519 36.9681,27.61315 37.27448,27.19638 37.35196,27.21101 37.59679,27.00681 37.6661,27.23981 37.73287,27.27196 37.96629,26.23426 38.27596,26.51241 38.41988,26.3595 38.65775,26.67268 38.31821,27.1592 38.46755,26.72291 38.6533,27.06037 38.87019,26.61069 39.28137,26.93734 39.57529,26.06342 39.4862,26.18284 40,26.71473 40.3956,27.288 40.48043,27.43316 40.33316,27.88348 40.3839,27.78122 40.53607,28.03737 40.48919,27.96021 40.36108,29.05984 40.37062,28.78209 40.53698,28.97738 40.64876,29.94561 40.74962,29.35839 40.76603,29.0421 40.97464,29.09707 41.18399,31.23326 41.10408,32.27687 41.72291,33.33943 42.02536,34.71677 41.94685,35 42.08839,35.22164 42.0157,35.09207 41.91779,35.29425 41.70956,35.98152 41.736,36.43448 41.24112,36.81222 41.35863,38.35494 40.90874,39.42577 41.10553,40.22606 40.92389,41.547 41.52649)),((26.36189 41.71968,27.08228 42.09672,28.03134 41.98704,28.27519 41.50606,29.11266 41.24482,28.99239 41.0156,27.52145 40.98276,26.19533 40.04464,26.21911 40.32451,26.83944 40.61272,26.04115 40.74553,26.35771 40.95393,26.33243 41.26126,26.63687 41.35608,26.36189 41.71968)))
+MULTIPOLYGON(((-61.49664 10.62091,-61.61113 10.744,-60.91115 10.83435,-60.9945 10.1307,-61.91985 10.04083,-61.47605 10.25937,-61.49664 10.62091)))
+MULTIPOLYGON(((120.4372 22.46492,120.0475 23.04844,120.1485 23.67498,121.0282 25.02177,121.5832 25.29271,122.0004 25.01018,121.4075 23.1227,120.9715 22.5533,120.8572 21.90316,120.4372 22.46492)))
+MULTIPOLYGON(((30.47686 -1.062396,33.92483 -0.994076,37.58214 -2.989356,37.60839 -3.519971,39.22181 -4.678047,38.77885 -6.030701,38.85862 -6.388468,39.55244 -7.021945,39.25142 -7.817995,39.44592 -7.832924,39.26825 -8.322478,39.49911 -8.976987,39.71642 -9.999192,40.1954 -10.25691,40.44312 -10.34902,40.39444 -10.51768,39.24163 -11.17998,38.48034 -11.41681,37.92789 -11.29055,37.45184 -11.73482,37.02496 -11.56913,36.18958 -11.71623,35.83432 -11.40724,35.64745 -11.59284,34.95793 -11.57134,34.63319 -11.1177,34.53863 -10.05235,34.30602 -9.740206,34.0363 -9.49193,33.93895 -9.711681,32.95351 -9.401445,31.98438 -9.071177,31.37501 -8.587209,31.07797 -8.621837,30.77425 -8.22436,30.25485 -7.048671,29.61157 -6.304459,29.39148 -4.44525,30.0348 -4.273422,30.83693 -3.25414,30.84607 -2.977164,30.40339 -2.860481,30.56441 -2.417881,30.81868 -2.364058,30.89596 -2.078556,30.47686 -1.062396)),((39.21043 -5.941314,39.32874 -5.737778,39.53308 -6.467469,39.21427 -6.250589,39.21043 -5.941314)),((39.74304 -5.428621,39.68135 -4.868561,39.87556 -4.981088,39.74304 -5.428621)))
+MULTIPOLYGON(((31.65407 52.23735,31.90463 52.23735,32.87347 52.48791,34.46033 52.27075,36.56504 50.18275,37.40024 50.26627,40.0896 49.5146,40.47378 48.12815,39.58847 47.87761,39.2142 47.2791,37.59052 47.09627,36.81785 46.69179,36.38628 46.70972,36.11586 46.48625,36.24526 46.63953,35.92154 46.6566,35.04019 46.08367,35.35799 46.35327,35.1688 46.49597,34.80906 46.16551,35.53008 45.28258,35.83474 45.46763,36.58466 45.4371,36.42466 45.07668,35.53499 45.12379,35.09064 44.79358,33.74446 44.39071,33.38176 44.58884,33.54525 44.62583,33.58496 45.05432,33.06531 45.37609,32.48293 45.39583,33.17711 45.80716,33.68655 45.84929,33.59453 46.16362,32.53133 46.07453,31.77245 46.31574,31.79509 46.3282,32.02471 46.45077,31.51475 46.5784,32.42399 46.49025,31.99723 46.64642,31.97508 46.87891,31.87895 46.63408,31.45643 46.63771,31.59144 46.85146,31.41255 46.62546,30.77076 46.5524,30.35117 46.57469,29.93356 46.90878,27.66181 48.82974,26.81927 48.25461,24.91005 47.72233,24.57831 47.96524,23.18665 48.11842,22.90599 47.95905,22.13036 48.3819,22.57044 49.08673,22.89656 49.00924,22.68042 49.56676,24.10886 50.63593,23.96477 50.80079,24.15068 50.87114,23.54564 51.606,23.65413 52.07933,24.52147 51.93666,26.19187 51.93666,28.07942 51.85316,30.48478 51.35204,30.48478 51.76965,31.06944 52.02019,31.65407 52.23735)))
+MULTIPOLYGON(((30.85357 3.48639,31.17384 3.793183,31.53893 3.654138,31.81783 3.827985,32.19777 3.515032,33.02008 3.887586,33.50901 3.748913,33.9945 4.214427,34.1721 3.767278,34.46005 3.667987,34.45232 3.192519,34.92859 2.518256,35.03605 1.919515,34.7998 1.227813,34.51596 1.101287,33.90886 0.102833,33.92483 -0.994076,30.47686 -1.062396,29.92129 -1.48405,29.82593 -1.314871,29.59532 -1.392395,29.96222 0.806247,31.30536 2.11931,30.74787 2.452595,30.85357 3.48639)))
+MULTIPOLYGON(((40.4982 64.58804,40.46845 64.76054,40.22547 64.94896,39.72263 65.33889,39.79567 65.59131,42.11118 66.48769,43.2719 66.4053,43.68024 66.23746,43.34723 66.03854,43.84738 66.18501,44.17996 65.88619,44.0629 66.22952,44.59214 66.65333,44.36386 66.76524,44.52662 66.9026,43.76951 67.1933,44.36264 68.03293,44.21439 68.01942,44.22059 68.27728,43.24859 68.66807,46.01463 68.41569,46.53052 68.12004,46.64486 67.8047,45.28561 67.69849,44.83464 67.31074,45.59736 67.1552,45.96432 66.81135,47.60315 66.88747,47.85191 67.58661,49.05906 67.61958,48.59493 67.91588,49.16038 67.85266,52.21257 68.56967,52.04908 68.48449,52.32349 68.46231,52.16533 68.3642,52.3156 68.30717,52.76698 68.47396,52.28752 68.59131,53.4089 68.89153,54.57985 68.98077,53.6156 68.89829,54.01173 68.82616,53.71263 68.59383,53.95472 68.39748,53.17437 68.21862,54.10674 68.2326,53.98693 67.98674,54.5131 68.29504,54.8065 68.1053,55.37011 68.54394,57.25057 68.52147,57.84937 68.74605,57.223 68.71465,59.25395 68.9797,58.98732 68.91112,59.518 68.72781,59.17303 68.65864,59.11363 68.4057,59.5261 68.33306,59.9503 68.45369,59.79534 68.62407,59.93134 68.70433,61.05845 68.88011,61.03838 68.88482,60.21699 69.621,60.79217 69.61872,60.72264 69.80666,61.11454 69.86349,62.99968 69.69743,67.24409 68.78218,68.22919 68.36031,68.25536 68.13668,68.60745 68.25223,69.11288 68.8591,68.11576 69.22112,68.16456 69.51521,66.83138 69.57138,66.95551 70.02274,67.43639 70.02869,67.12791 70.21162,67.39177 70.71281,66.70394 70.75124,66.99422 71.06039,66.76869 71.10617,68.38193 71.72099,68.93552 72.6562,69.33884 72.93552,72.80556 72.67517,72.59679 72.49133,72.82123 72.26434,72.33573 71.70651,71.83425 71.47982,72.83222 70.8599,72.76084 70.38735,72.38226 70.29165,72.68154 69.80001,72.48732 69.09171,73.57745 68.40405,73.09379 68.21263,73.1148 67.68429,72.60365 67.57751,71.83182 66.8844,69.46434 66.83599,69.3957 66.84477,68.77541 66.87087,69.09662 66.85677,68.93073 66.77065,69.4444 66.48854,72.23521 66.24488,72.43066 66.34689,72.32212 66.49529,73.87228 66.98717,73.93364 67.28817,74.72758 67.66803,74.79773 68.02816,74.31217 68.37022,74.48479 68.71322,76.08697 68.98926,76.5548 68.98781,76.61222 68.75387,77.31255 68.49063,77.12122 68.29233,77.31305 68.2412,77.26963 67.87434,77.04356 67.78649,77.68127 67.57762,77.60342 67.32716,78.50276 67.55064,78.86246 67.44662,79.24853 67.46408,78.96108 67.56729,78.94048 67.57267,77.44583 67.75995,77.47778 68.11363,78.14926 68.2606,77.60535 68.9053,75.96492 69.25705,73.80424 69.15645,73.91005 69.42621,73.5434 69.76466,74.31156 70.59469,73.61063 71.17639,72.98857 71.39926,73.5285 71.79546,74.99432 72.17144,75.06522 72.43623,74.76619 72.79434,75.45364 72.7438,75.28986 72.6942,75.63506 72.52459,75.47609 72.48546,75.68069 72.26163,75.22124 71.82691,75.49261 71.52242,75.20242 71.41418,75.79678 71.21141,77.77612 71.11064,78.39359 70.89378,78.27691 71.23857,76.69088 71.46069,76.00571 71.88631,76.79454 72.05392,78.10931 71.86156,78.21709 72,77.4099 72.06577,77.45277 72.20925,78.58257 72.26272,78.42407 72.3854,80.60556 72.09982,81.66299 71.68432,83.29488 71.68005,82.99944 71.40204,82.24258 71.25033,82.3485 70.93884,82.31001 70.64695,81.8099 70.21137,82.16143 70.45351,82.2735 70.29804,82.01897 70.28139,82.30015 70.14621,83.2096 69.90781,83.24867 69.8892,83.77528 69.7759,84.55149 69.6089,82.99222 70.27865,83.78537 70.45268,83.16048 71.11007,83.65169 71.62679,82.69587 71.8626,81.96449 72.33777,80.86139 72.43805,80.9379 72.60798,80.6855 72.67693,80.88707 72.91771,80.39501 73.16862,80.80965 73.19363,80.34986 73.28944,80.73617 73.4298,80.53416 73.54296,87.10263 73.84702,86.92329 74.02316,87.45389 74.07528,85.88815 74.3277,87.17338 74.37474,85.75124 74.65343,86.12072 74.83515,86.95792 74.59921,86.75347 74.7044,87.07306 74.72179,87.39427 74.94709,87.19801 74.98438,87.75072 74.9974,86.91621 75.07461,88.24816 75.13549,89.31824 75.51092,94.10726 75.91436,92.87063 75.88627,93.25022 76.11229,96.27627 76.08806,95.74909 75.82893,97.86251 75.97079,97.57423 76.03993,98.85695 76.2539,99.62257 76.0811,98.90095 76.47694,101.1246 76.54408,101.3212 76.70045,100.9524 76.84142,101.831 77.2554,104.2699 77.7341,106.2977 77.38107,104.2433 77.08313,107.3375 77.00635,107.5192 76.89897,106.443 76.56705,106.6031 76.47375,107.8927 76.52532,108.2866 76.75023,111.1754 76.77437,112.2495 76.47242,111.949 76.21558,112.3797 76.45283,112.8291 76.32292,112.488 76.23377,112.8628 76.13111,112.616 76.05174,113.3615 76.12112,112.9721 76.23279,113.2978 76.25297,113.6963 75.92709,113.9153 75.82427,113.5698 75.55331,113.7027 75.5052,113.5097 75.21039,111.7962 74.65242,109.8146 74.3123,108.4026 73.80742,107.8388 73.61809,106.1248 73.63555,107.0381 73.47591,106.1297 73.25927,105.7222 72.88139,105.2557 72.7831,105.4756 72.73537,105.9836 72.83233,106.3659 73.17737,108.5141 73.09115,108.4078 73.22441,108.5719 73.25546,108.2182 73.28064,110.8843 73.67241,109.5322 73.81839,110.2815 74.0203,111.2097 73.95999,112.4997 73.70094,112.9769 73.77522,112.8309 73.99158,113.4104 73.67712,113.2003 73.44453,113.5003 73.23686,114.0947 73.35608,113.5004 73.50938,115.5634 73.71088,118.6769 73.56088,118.9708 73.45742,118.4137 73.41178,118.5285 73.1794,119.6601 73.06912,123.3167 72.91902,123.7384 73.10506,123.28 73.40218,123.5281 73.39699,123.3472 73.47871,123.4497 73.65491,124.0174 73.60087,124.3694 73.79802,125.8276 73.41653,126.3199 73.55521,126.4518 73.35116,127.5778 73.47348,127.6355 73.47205,129.59 72.96128,129.1243 72.97086,129.4959 72.78333,129.1618 72.73604,129.5358 72.6479,128.8208 72.52156,129.4513 72.4347,129.5534 72.30589,129.3843 72.26398,129.5975 72.21251,129.3865 72.15844,129.5636 72.12707,128.8878 71.97224,128.6988 71.92895,128.6362 71.94373,128.9815 71.70985,129.2763 71.80444,129.1129 72.01095,129.6087 71.70439,128.9315 71.57364,129.2364 71.59631,130.3671 70.89893,130.8608 70.96175,131.0625 70.70415,131.6902 70.92168,132.5729 71.87852,133.0328 71.96686,133.3548 71.84568,132.9982 71.94799,132.783 71.76508,133.8568 71.40441,136.0339 71.62562,138.0704 71.20733,137.8487 71.37183,138.1637 71.57501,138.8426 71.6299,139.2666 71.39725,140.0983 71.50949,139.7735 71.68717,139.8388 71.85428,139.3816 71.94949,140.246 72.21105,139.1692 72.26443,139.6177 72.48666,141.3139 72.57973,140.7365 72.87749,149.2062 72.22298,150.1067 71.85908,149.3367 71.88045,149.0834 71.67314,151.6954 71.26807,151.713 71.25865,152.1391 70.99513,151.7218 70.97195,152.5646 70.81894,156.0465 71.08228,158.7075 70.92345,159.9792 70.46207,160.1172 70.25779,159.7738 69.81796,160.9725 69.62244,161.0263 69.2377,161.2215 69.24902,161.0883 69.44078,161.3897 69.4291,161.3494 69.40311,162.371 69.67098,164.0496 69.74959,166.964 69.47414,167.8068 69.7632,168.2799 69.54607,168.2843 69.22865,169.3423 69.08469,169.7411 68.75729,171.0659 69.05031,170.682 69.56557,170.2026 69.58692,170.6343 69.758,170.5643 70.12776,173.7909 69.8038,176.1116 69.87669,179.4197 69.22298,180 68.9799,180 65.02738,178.8075 64.64135,177.6429 64.6922,177.4137 64.81152,177.5019 64.92024,177.0816 64.74984,176.0597 64.94259,175.2051 64.72363,176.1688 64.8891,176.4533 64.69538,176.1862 64.58507,177.5198 64.73763,177.429 64.4826,177.8132 64.25166,178.2536 64.17886,178.12 64.22968,178.2907 64.40369,178.8925 63.41894,179.452 63.10777,179.2701 62.97346,179.6192 62.73449,179.0978 62.26967,177.6348 62.55209,176.5866 62.42043,173.847 61.6418,173.5636 61.73421,173.2633 61.42944,172.7489 61.41278,172.9379 61.26349,172.3469 61.20689,172.4081 61.00858,172.0536 61.09628,172.2234 60.95269,172.1035 60.85878,171.3967 60.665,170.6454 60.40097,170.2911 59.92762,169.6336 60.43815,168.4464 60.59834,167.0502 60.40269,166.2707 59.81704,166.0909 59.8105,166.3746 60.4078,166.24 60.46817,165.0332 60.09874,165.2342 59.99067,164.8569 59.78123,164.4278 60.10614,164.2141 59.85516,164.0721 59.89318,164.2796 60.01299,163.521 59.89087,163.2021 59.56166,163.3551 59.27268,163.0838 59.23968,163.2493 59.05433,162.9561 59.17841,163.0654 58.97657,162.4494 58.67765,162.0021 58.01287,162.2491 57.80532,162.7065 57.94735,163.3258 57.72046,162.7876 57.3412,162.7829 56.7809,163.2412 56.75031,163.3694 56.18514,163.0621 56.00956,162.6219 56.23159,162.0919 56.08207,161.7373 55.36121,162.1218 54.75227,161.7202 54.50799,160.8624 54.5628,160.1082 54.2086,159.8451 53.71445,160.0222 53.08755,159.8089 53.2661,158.7123 52.87762,158.4234 53.00522,158.6305 52.90941,158.5603 52.61988,158.3935 52.64318,158.5713 52.31472,157.9021 51.62428,156.6593 50.86994,156.7605 51.07053,156.5413 51.28904,156.4923 51.90914,156.7105 51.8815,156.4947 51.91913,156.1519 52.81838,155.5514 55.19243,155.9887 56.6876,156.8744 57.25745,156.8673 57.80712,157.4541 57.79598,159.0855 58.43304,159.8571 59.12571,161.9278 60.20634,162.0992 60.48243,163.7921 60.83236,163.5069 61.00426,164.0238 61.31402,163.7576 61.46215,164.0654 61.67899,164.1724 62.27046,165.2439 62.48683,164.607 62.67488,163.3364 62.53108,163.1359 62.40726,163.3882 62.33088,163.078 62.21904,163.2021 62.05662,162.9864 61.80394,163.3342 61.65603,163.021 61.51144,162.8369 61.71045,162.3857 61.66236,160.9308 60.89475,160.1639 60.57072,160.4399 61.03279,159.7995 60.92818,160.0079 61.10957,159.7951 61.25835,160.4229 61.75961,160.304 61.93589,159.5865 61.6531,159.5894 61.83051,159.152 61.92044,157.4807 61.78186,156.6845 61.51326,156.6568 61.19573,154.2198 59.86475,154.3706 59.5775,154.2277 59.67112,154.0861 59.4099,154.9751 59.49475,155.1808 59.17505,154.0432 59.04596,153.3904 59.242,152.914 58.90635,152.3564 59.05696,151.3481 58.83426,151.1249 59.09921,152.2895 59.24113,151.7448 59.29918,151.4154 59.6009,150.7724 59.4345,149.4405 59.75829,149.0761 59.6445,149.2266 59.46195,148.7599 59.48039,148.9989 59.36822,148.9313 59.23401,146.4515 59.46267,146.3467 59.19883,146.0414 59.14101,145.833 59.23767,145.9671 59.40066,145.6967 59.42324,143.2337 59.39624,142.4727 59.20366,140.7734 58.29924,140.4895 57.84279,138.4361 56.84101,138.1087 56.56901,138.2255 56.42478,135.1824 54.85205,135.7502 54.55546,136.8388 54.64153,136.6783 53.91805,136.8132 53.7657,137.1954 53.84193,137.1976 54.21048,137.7376 54.31787,137.3189 54.0434,137.8613 53.96548,137.3189 53.52874,137.9556 53.57482,138.5752 53.99004,138.2628 53.55909,138.4603 53.52062,138.7668 53.98464,138.6587 54.28512,139.7839 54.28809,140.5466 53.64368,141.4027 53.29984,141.3632 53.0809,140.8756 53.08162,141.2346 52.8625,141.1224 52.39187,141.5463 52.15199,140.748 51.46471,140.8812 51.42624,140.4351 50.71279,140.5111 50.14814,140.6872 50.09215,140.4038 49.87887,140.5435 49.56638,140.2066 48.9751,140.3876 48.97366,140.1729 48.44787,139.2884 47.8131,138.1118 46.23507,134.7779 43.30216,133.0457 42.67246,133.0037 42.84996,132.3224 42.84124,132.3058 43.33993,131.957 43.05519,132.0724 43.31266,131.7984 43.3347,131.2139 42.55295,130.66 42.66169,130.8689 42.52186,130.6749 42.28362,130.6146 42.42395,130.4051 42.72232,131.1066 42.91479,131.3084 43.39982,131.2931 44.0797,130.9542 44.85416,131.4698 44.95948,131.8915 45.33602,132.942 45.01337,133.131 45.12125,133.1559 45.4652,133.9099 46.26525,134.1813 47.32342,134.7739 47.72915,134.5513 47.99365,134.7118 48.27581,134.5697 48.36628,133.1603 48.1057,132.6697 47.94657,132.562 47.71522,131 47.6912,130.651 48.10178,130.8255 48.30009,130.5245 48.61383,130.6731 48.86701,130.2226 48.86702,129.4714 49.4316,128.2506 49.49959,127.523 49.81782,127.5981 50.21679,127.3414 50.31707,127.2946 50.74709,126.9202 51.06199,126.9743 51.31988,126.8254 51.27232,126.9158 51.38577,126.4619 51.94272,126.5565 52.12088,125.9655 52.62254,126.102 52.77266,125.6722 52.85682,125.6005 53.0746,124.8751 53.09429,123.5218 53.55318,120.8139 53.26356,120.0243 52.76811,120.0612 52.58407,120.721 52.54308,120.6102 52.34472,120.7782 52.15837,120.0925 51.67718,119.2803 50.6097,119.1163 50.38475,119.3606 50.16798,119.1975 50.01209,118.5626 49.92574,117.8546 49.5054,116.7003 49.83983,116.2339 50.0324,115.4007 49.90234,114.3401 50.28222,112.7549 49.49241,110.7663 49.1451,108.5434 49.33666,107.9455 49.67678,107.9756 49.92023,107.1465 50.01965,106.7247 50.327,105.3573 50.4804,103.6905 50.13724,102.9157 50.31429,102.3017 50.59977,102.0688 51.3971,99.97604 51.75824,98.89359 52.14954,98.02279 51.41996,97.82797 51.01169,98.32318 50.54744,98.25439 50.25548,97.3162 49.75739,96.63409 49.98194,94.61906 50.03394,94.27628 50.5753,93.12958 50.56275,93.00924 50.784,92.61613 50.70516,92.34013 50.893,92.27581 50.71622,91.75664 50.72041,91.42917 50.45771,90.73773 50.48793,90.67541 50.16824,89.62073 49.97399,89.68183 49.70971,88.86329 49.45017,88.22323 49.48986,88.192 49.28303,87.83231 49.175,86.93111 49.11688,86.53976 50.07133,84.97516 49.77782,83.21414 51.24534,81.55247 51.05118,81.06255 51.24534,80.37846 50.75767,78.42102 52.71511,76.85642 53.98846,77.24701 54.37905,77.05058 54.67255,73.92139 53.69496,73.13797 53.88912,71.08571 54.57547,70.39936 55.45597,65.89974 54.47613,63.55172 54.08554,61.59654 53.79204,62.08421 53.30212,61.2037 53.30212,60.2261 52.22519,60.71603 51.14826,60.42253 50.85476,59.54202 50.95184,58.17159 51.14826,54.74889 51.14826,52.59729 52.12811,51.12978 52.02877,48.97592 50.75767,47.90125 51.14826,46.92366 48.89732,47.99833 48.01681,48.68242 47.33046,49.19137 46.35909,49.22092 46.2927,49.04577 46.36475,48.71399 45.91456,48.72657 45.62616,48.54764 45.95636,48.49978 45.67001,48.35889 45.823,48.42334 45.5986,47.85413 45.72282,47.87246 45.47527,47.66007 45.64598,47.19746 44.84016,46.69099 44.57006,47.52176 43.77692,47.74323 43.90609,47.46127 43.03159,47.75621 42.63647,48.75009 41.69004,47.19468 41.89426,47.16404 41.89426,41.57566 43.84114,39.25613 43.92894,38.74588 44.29795,36.60306 45.20868,36.98147 45.27539,36.62472 45.3024,36.79005 45.4361,37.53011 45.37588,37.94805 46.01265,38.14619 45.99788,38.28967 46.26418,37.70404 46.70001,38.59312 46.65932,38.39439 46.72139,38.49885 46.87507,39.30454 47.02416,39.2142 47.2791,39.58847 47.87761,40.47378 48.12815,40.0896 49.5146,37.40024 50.26627,36.56504 50.18275,34.46033 52.27075,32.87347 52.48791,31.90463 52.23735,31.85452 53.12265,32.32224 53.49015,31.10284 54.37546,31.23648 55.46122,28.58053 55.8454,28.24113 56.27555,27.9718 56.82376,27.66686 56.83715,27.85104 57.30485,27.32212 57.54839,27.82688 57.85849,27.44971 58.50935,27.54815 58.86166,28.18678 59.30873,28.04841 59.47015,28.11032 59.79525,28.35409 59.65744,29.1304 59.98737,30.2407 59.91512,29.87385 60.16388,28.62092 60.3523,28.4467 60.54326,28.71409 60.43666,28.55463 60.60149,28.74478 60.72201,28.74918 60.73083,27.8018 60.5494,30.94843 62.31269,31.58095 62.90803,29.98095 63.75448,30.55125 64.11019,30.05301 64.40425,30.08586 64.77503,29.59626 64.98994,29.89286 65.10344,29.60952 65.25109,29.88122 65.56409,29.73441 65.62791,30.12272 65.66451,30.10133 65.83206,29.02974 66.91658,30.03453 67.66936,28.65979 68.19511,28.45037 68.54767,28.80354 68.87493,28.43475 68.90842,28.92693 69.05738,30.10989 69.46273,30.11127 69.66338,30.92936 69.57227,30.83539 69.78523,31.42713 69.70583,31.256 69.57366,31.81601 69.65076,31.78155 69.8315,32.08978 69.76392,31.91456 69.94856,33.08357 69.74338,32.85202 69.56254,31.96296 69.62888,32.52147 69.50045,32.2112 69.41406,33.06524 69.45255,32.82973 69.28968,33.50263 69.39146,33.22475 69.25066,33.43694 69.16953,33.82619 69.30338,35.70131 69.1909,35.72731 69.00615,35.81894 69.18346,36.28549 69.09692,38.44433 68.29055,39.65535 68.01017,39.84422 68.03217,39.75326 68.16006,40.47012 67.71731,41.04241 67.62479,40.95098 67.44229,41.38123 67.11272,41.2007 66.81772,40.37266 66.37833,39.10674 66.09283,37.91672 66.07623,34.48362 66.53726,34.16911 66.78398,33.51696 66.71313,32.85182 66.96944,32.96323 67.08738,32.36699 67.15379,31.85411 67.12916,33.27506 66.61634,33.22582 66.62206,32.87348 66.5225,33.67265 66.33282,33.00989 66.25372,34.10589 66.22401,34.85258 65.85934,34.64494 65.78228,34.79813 65.58572,34.67695 65.44629,34.28074 65.37086,34.78024 64.99444,34.95678 64.83234,34.73631 64.74281,34.9715 64.61633,34.77781 64.51678,34.97318 64.42013,37.36407 63.79004,38.0781 64,37.89503 64.21313,38.04221 64.32653,37.33078 64.34241,36.53646 64.71412,36.43211 64.91527,36.80934 64.95979,36.83111 65.14846,38.35836 64.84514,38.01637 64.7575,38.01634 64.58232,38.43861 64.80898,40.40347 64.54486,40.4071 64.54437,40.4982 64.58804)),((113.1439 75.63515,113.5698 75.55331,113.1439 75.63515)),((54.3793 73.35465,54.02171 73.36783,54.72594 73.64162,55.98956 73.63071,55.12049 73.70009,55.40813 73.77931,53.96772 73.62244,53.67546 73.79038,54.87809 73.92935,54.59021 73.99638,55.02927 74.15511,56.35002 74.0074,55.10872 74.24159,55.83978 74.26353,55.34871 74.41091,56.24519 74.48576,55.57513 74.62938,56.96211 74.68848,55.88097 74.78727,56.72857 74.93738,55.90469 74.96282,55.83951 75.13445,56.07654 75.19372,56.44022 75.04382,57.0579 75.37331,57.88976 75.31409,57.56399 75.47554,58.25322 75.58334,58.05564 75.66513,60.27382 76.09396,60.81613 76.11137,60.44459 75.9996,60.77626 75.98638,61.18348 76.10476,60.93505 76.14227,61.08066 76.26304,64.74003 76.34335,67.53819 76.99086,68.46478 76.96027,69.07032 76.7047,68.29228 76.25085,61.33072 75.31985,60.76073 75.01344,59.99205 74.98163,60.65992 74.9114,60.16818 74.86159,60.30886 74.74047,59.46324 74.79279,59.77039 74.57285,59.16003 74.73829,59.15107 74.422,58.22176 74.54754,58.72907 74.22041,58.28712 74.16139,58.5358 74.1158,58.12624 74.14595,58.16906 73.97439,57.48231 74.1876,57.19032 74.07583,57.88987 73.90184,57.67302 73.71262,56.59261 73.88577,57.61684 73.61811,56.40674 73.73714,57.22775 73.47999,56.74327 73.23316,56.12612 73.2616,55.76121 73.51465,55.93729 73.29726,55.60111 73.30964,56.55836 73.14988,55.51849 72.93986,56.23978 72.94689,56.09948 72.78261,55.45324 72.80682,55.90625 72.65137,55.63417 72.6834,55.58838 72.52284,55.08148 72.58209,55.54156 72.50906,55.12175 72.44775,55.45898 72.42695,55.29251 72.27692,55.57356 72.17113,55.14277 71.90808,55.5059 71.88631,56.19815 71.1861,57.58368 70.71062,56.74617 70.67592,57.28765 70.54507,55.41106 70.73708,55.16938 70.54546,54.50415 70.80718,54.75187 70.63685,53.33661 70.86486,53.74715 70.81517,53.56914 71.0859,54.25019 71.09013,53.33504 71.32735,53.49966 71.54619,52.9458 71.37142,52.5448 71.7139,52.45138 71.46111,51.5713 71.57182,51.43204 71.82805,51.57411 72.05993,52.45331 72.05089,52.68928 72.44264,53.28335 72.56269,52.70363 72.6193,53.69415 72.64285,52.40007 72.71584,53.2043 72.87841,53.62158 72.88132,53.06304 72.94883,53.37401 73.01066,53.16602 73.06858,53.37839 73.21882,54.3793 73.35465)),((-174.3079 67.0621,-171.7201 66.95611,-169.8248 66.16167,-169.7244 66.01048,-170.597 65.8501,-170.5831 65.60438,-171.474 65.83848,-170.98 65.58222,-171.0532 65.46355,-172.7096 65.67041,-172.3483 65.41756,-172.0769 65.47713,-172.2142 65.31131,-172.0752 65.08668,-172.897 64.84093,-172.742 64.76914,-172.9763 64.56869,-172.2269 64.40627,-172.9542 64.49267,-172.8122 64.35699,-173.3679 64.29704,-173.1589 64.44193,-173.3445 64.60548,-173.3007 64.43904,-173.627 64.32809,-174.2284 64.65853,-175.8762 65,-175.7211 65.1405,-176.0213 65.45609,-177.2098 65.53393,-177.2124 65.53264,-178.211 65.45192,-178.3044 65.45457,-178.9054 66.03407,-178.4771 66.12198,-178.4686 66.38958,-178.8343 66.15221,-179.0378 66.36443,-179.3858 66.30019,-179.2209 66.15373,-179.6719 66.15983,-179.7817 65.94515,-179.2594 65.5298,-180 65.02757,-179.9922 68.9772,-175.2816 67.66474,-174.725 67.24392,-174.9096 67.08244,-174.7011 66.72852,-174.9572 66.65952,-174.4307 66.52804,-174.3758 66.32382,-173.685 66.4394,-174.2487 66.49675,-173.9197 66.66508,-174.0034 66.98097,-174.5595 67.02987,-174.3079 67.0621)),((94.85079 80.07516,91.46669 80.25947,92.76982 80.33351,91.98838 80.40828,92.87981 80.47652,93.38114 80.76008,92.58621 80.72775,93.15398 80.93066,95.23175 81.16602,95.88255 81.25642,98.00768 80.66081,96.72164 80.71401,97.22813 80.62313,97.11929 80.50292,97.46917 80.29011,95.25292 80.10089,98.11304 80.06406,96.48049 79.71849,97.73301 79.81091,97.22299 79.59293,98.52047 79.87872,98.51108 80.04414,99.3255 80.05867,100.155 79.78369,99.86949 79.74901,99.84386 79.27608,99.22449 79.27998,100.0486 78.94768,98.41129 78.77001,94.90891 79.04713,94.38945 79.24464,94.4147 79.48191,93.7023 79.56838,93.07658 79.56699,94.73635 79.77637,94.3811 79.98315,94.85079 80.07516)),((143.2503 53.13401,143.252 53.12804,143.2672 53.07361,143.2793 52.94373,143.2823 52.9357,143.1921 51.88258,143.203 51.51143,143.3579 51.64766,143.7874 50.31884,144.7516 48.65234,144.0328 49.25991,142.9817 49.12775,142.5602 47.70694,143.1654 46.84499,143.4839 46.81414,143.6175 46.36786,143.4172 46.02223,143.3074 46.50419,142.6902 46.75058,142.4091 46.57967,142.0823 45.88929,141.8132 46.53418,142.0507 47.05016,141.9675 47.6134,142.2061 47.98304,141.8423 48.76961,142.1384 49.51562,142.0402 50.55153,142.2494 51.14658,141.6261 51.88739,141.9199 53.05185,141.7533 53.36644,142.6693 53.49287,142.4826 53.65508,142.7896 53.70277,142.6899 53.84386,142.5829 53.69141,142.6888 53.93698,142.2618 54.30004,142.5674 54.20958,142.7047 54.41357,142.9934 54.07883,142.8093 53.86835,143.2503 53.13401)),((139.0953 76.12658,140.9257 75.6274,141.0737 75.63609,140.9017 75.77117,141.0425 76.05117,141.7269 75.99868,141.4122 76.17501,145.4137 75.49647,144.872 75.42966,144.9884 75.27302,144.4229 75.05519,143.5228 75.05939,143.7205 74.94658,143.4369 74.88986,142.4319 74.80753,141.97 74.92403,142.3792 74.91918,142.2506 75.01884,139.9866 74.79781,139.691 74.97329,139.1797 74.63687,138.1431 74.77855,136.9512 75.34443,137.3091 75.47742,137.0095 75.59011,137.1664 75.72011,137.6106 75.78152,137.4847 75.9388,139.0953 76.12658)),((101.303 79.10058,101.8027 79.33735,102.3329 79.18193,102.3337 79.39771,102.9123 79.35831,103.1973 79.28683,102.4189 78.78143,103.87 79.16038,104.6946 78.86359,104.0856 78.85116,105.2044 78.79447,105.3864 78.53106,104.8528 78.31322,99.6047 77.95125,99.49225 78.02908,99.69765 78.16306,100.647 78.59775,100.3885 78.60424,100.5102 78.70333,101.2791 78.73557,100.8691 78.84018,101.0734 78.99502,101.6654 78.95022,101.1168 79.03197,101.303 79.10058)),((20.55576 55,20.59391 55,21.21554 54.92387,21.27649 55.2457,22.58557 55.07003,22.89281 54.81372,22.68608 54.58844,22.78779 54.36525,19.78606 54.43672,20.41205 54.68088,19.90449 54.63435,19.98434 54.96437,20.55576 55)),((146.3992 75.53217,147.026 75.32156,147.6312 75.44278,148.5786 75.37303,148.6227 75.1993,150.984 75.12556,150.6666 74.86657,148.2744 74.77046,146.1782 75.21423,146.3992 75.53217)),((142.0395 73.91537,143.3762 73.58673,143.6094 73.21416,139.8039 73.40452,140.6203 73.51381,141.1651 73.8659,142.0395 73.91537)),((-178.7127 71.57099,-178.5214 71.54985,-178.0889 71.46845,-177.5347 71.27624,-177.5925 71.10806,-179.5624 70.86082,-180 70.97481,-180 71.52834,-178.7127 71.57099)),((49.24596 80.57323,49.67633 80.68885,49.01678 80.78114,50.16521 80.94427,51.00276 80.85762,50.21344 80.74879,51.78249 80.70227,48.7802 80.37305,48.53498 80.27302,49.1139 80.16965,48.34258 80.07372,46.73793 80.30825,48.05873 80.30078,47.60544 80.39422,48.23674 80.44434,47.41751 80.4552,49.24596 80.57323)),((48.22332 68.86259,48.34939 69.30089,48.66958 69.44836,49.33182 69.49265,50.30279 69.12757,48.82998 68.72256,48.22332 68.86259)),((62.09539 80.84077,62.07396 80.59004,61.15728 80.36612,59.33807 80.48501,59.77873 80.80766,62.09539 80.84077)),((12.31084 58.38442,12.66163 58.61829,12.46118 58.73519,12.77856 59.00246,13.17945 58.88553,13.12933 59.10269,13.04581 59.25303,13.36319 59.31985,13.46342 59.20292,13.56365 59.23632,13.54694 59.31985,13.71399 59.35326,13.7641 59.28644,13.88101 59.23632,14.04805 59.28644,14.04805 59.18621,13.88101 59.05258,13.91442 58.95235,14.04805 59.05258,13.91442 58.85212,13.73069 58.71849,13.61376 58.6851,13.36319 58.60158,13.17945 58.48465,13.14604 58.58488,12.9957 58.58488,12.79527 58.48465,12.61152 58.38442,12.49459 58.35101,12.57811 58.46795,12.31084 58.38442)),((65 81.17093,65.38487 80.91269,64.90041 80.76444,63.13629 80.63741,62.5206 80.78021,65 81.17093)),((59.13943 70.41869,60.55285 69.79707,59.99367 69.65714,58.80408 69.96742,58.41834 70.25581,58.81364 70.2038,58.52017 70.33682,59.13943 70.41869)),((57.17137 80.30888,57.0096 80.45027,59.31664 80.32092,58.0207 80.16171,57.19404 80.28905,57.0572 80.06345,55.82498 80.0899,56.15305 80.17767,55.94777 80.30117,57.00672 80.33948,57.17137 80.30888)),((179.9832 71.53181,180 70.97478,178.7495 70.78169,178.6146 71.01589,179.9832 71.53181)),((48.46035 80.73998,48.71847 80.62312,47.6736 80.76824,46.27543 80.44254,44.88595 80.59377,47.43914 80.852,48.46035 80.73998)),((70.51064 73.46571,71.27184 73.42784,71.64835 73.17366,69.93626 73.0087,69.98754 73.38631,70.51064 73.46571)),((91.24138 80.03845,93.90546 79.91269,91.7907 79.64763,91.27856 79.74815,92.40354 79.76885,91.2904 79.83881,91.45201 79.9135,91.24138 80.03845)),((112.5646 74.52036,113.4315 74.43113,112.8444 74.08443,111.4898 74.29467,112.041 74.36967,112.0178 74.54803,112.5646 74.52036)),((168.2988 70.01192,169.4584 69.81021,169.2016 69.55118,168.3798 69.63025,167.7772 69.81078,168.2988 70.01192)),((56.58947 80.74642,56.51231 80.74235,54.49223 80.99286,54.86309 81.09415,57.83117 80.76485,56.86874 80.69815,56.58947 80.74642)),((164.3488 59.1195,164.6138 59.22999,164.6557 58.87013,163.4157 58.54025,163.9315 58.99274,163.7042 58.9957,164.3488 59.1195)),((148.6178 45.48572,148.8774 45.5299,148.8486 45.32803,147.6669 44.9995,146.8553 44.45377,147.9398 45.42991,148.2573 45.25557,148.6178 45.48572)),((137.4374 55,137.6375 55.1948,138.2235 55.02222,137.7161 54.60864,137.4762 54.86153,137.241 54.7595,137.4374 55)),((155.8906 50.68039,156.1315 50.75882,156.1692 50.59876,155.8898 50.24759,155.2271 50.05127,155.2115 50.29393,155.6408 50.37805,155.8906 50.68039)),((55.76814 81.30657,57.96063 81.29467,56.42086 81.15563,55.57701 81.202,55.49142 81.31632,55.76814 81.30657)),((165.8757 55.34595,166.2677 55.31407,166.6672 54.66467,165.6879 55.28865,165.8757 55.34595)),((140.6796 74.27116,141.1109 74.21584,141.0288 73.99573,140.5486 73.90372,140.203 74.07412,140.6796 74.27116)),((52.45782 80.18242,52.21942 80.24835,53.0352 80.38749,53.94748 80.23,52.45782 80.18242)),((70.74767 66.65314,70.77215 66.69656,70.79721 66.73404,71.59683 66.82323,71.54283 66.62331,70.82758 66.63313,71.02138 66.54991,70.73387 66.48704,70.33683 66.56591,70.74767 66.65314)),((79.37695 72.9934,79.52377 72.71258,78.60709 72.83343,79.17096 73.0929,79.37695 72.9934)),((82.91557 70.55383,82.65272 70.76055,82.84393 70.94331,83.11126 70.74729,83.03121 70.65115,82.94832 70.55158,82.96266 70.3782,82.46949 70.59068,82.62025 70.76324,82.91557 70.55383)),((77.81749 72.5938,78.31659 72.39473,76.84759 72.30229,77.81749 72.5938)),((135.6288 75.69395,135.7461 75.87301,136.2386 75.62299,135.5795 75.36459,135.6288 75.69395)),((61.33288 81.10697,61.58058 81.01769,61.10041 80.90437,60.00123 80.97356,61.33288 81.10697)),((57.81933 80.81454,56.10005 81.09599,58.3001 80.91582,57.81933 80.81454)),((146.159 44.26355,145.4329 43.71735,146.0931 44.48294,146.5776 44.45213,146.159 44.26355)),((96.33821 76.09833,95.31268 76.22487,96.41329 76.30412,96.69438 76.23248,96.33821 76.09833)),((52.92279 71.31572,53.26419 71.18941,53.0453 70.93996,52.63523 71.2747,52.23945 71.28942,52.92279 71.31572)),((57.81965 81.52337,58.57087 81.43438,58.30226 81.37794,56.83438 81.4653,57.81965 81.52337)),((58.57271 81.83858,59.37563 81.8244,58.18936 81.68636,57.91254 81.81087,58.57271 81.83858)),((150.4105 46.22131,150.5818 46.22425,150.1453 45.89111,149.416 45.57236,150.4105 46.22131)),((74.48667 73.11058,74.89085 73.0414,74.7 73.06737,74.64056 72.85061,74.07414 72.98733,74.48667 73.11058)),((55 80.8735,55.97357 80.76895,54.19998 80.77751,55 80.8735)),((90.92747 81.03186,90.07881 81.10547,91.60179 81.17816,90.92747 81.03186)),((76.83112 79.47069,76.17468 79.64875,77.60796 79.49898,76.83112 79.47069)),((50 80.22242,50.38718 80.19159,50.12312 80.05275,49.54557 80.15204,50 80.22242)),((82.23524 70.44041,82.39281 70.59411,82.93291 70.36163,82.2646 70.40834,82.23524 70.44041)),((95.76112 77.07336,96.58344 77.13605,95.73912 76.91894,96.01563 77.0155,95.30161 76.97751,95.76112 77.07336)),((112.435 76.61292,112.7757 76.52644,112.6381 76.424,112.0189 76.60962,112.435 76.61292)),((54.14156 80.59067,54.54229 80.47465,53.8903 80.4479,53.83424 80.56947,54.14156 80.59067)),((-40.83127 64.92065,-40.22419 64.44716,-40.53018 64.49117,-40.83127 64.92065)),((59.02744 81.29298,58.52892 81.34538,59.23543 81.42448,59.35094 81.32401,59.02744 81.29298)),((137.3113 71.47205,137.2906 71.47357,137.9337 71.57602,137.7808 71.40367,137.3113 71.47205)),((86.89864 74.80553,86.23676 74.88707,87.04796 74.99056,86.72055 74.90353,86.89864 74.80553)),((57.50334 81.0971,56.99825 81.16486,58.09269 81.18685,57.50334 81.0971)),((58.41065 80.92764,57.86178 81.03998,58.6842 81.02501,58.41065 80.92764)))
+MULTIPOLYGON(((-73.98766 40.71467,-74.27888 40.49207,-73.99971 40.47089,-74.10079 39.75806,-74.14362 39.98888,-74.44784 39.3762,-74.50224 39.34725,-74.53178 39.33154,-74.53561 39.31553,-74.77111 39.0632,-74.77276 39.05719,-74.97454 38.93808,-74.89513 39.15727,-75.62909 39.59673,-75.09157 38.79139,-75.06089 38.60616,-75.2858 38.58674,-75.06735 38.599,-75.07094 38.43824,-75.19289 38.26284,-75.90184 37.18869,-75.81254 37.71569,-75.64317 37.97321,-75.8979 37.92933,-75.75179 38.08444,-75.95638 38.12623,-75.86815 38.35305,-76.0362 38.21486,-76.28024 38.48143,-76.13392 38.53638,-76.29053 38.62801,-75.97314 38.60062,-76.24818 38.76892,-76.2859 38.75221,-76.16158 38.86921,-76.14548 38.87322,-76.36966 38.92945,-76.14722 38.99947,-76.27785 39.14784,-75.95139 39.58261,-76.58588 39.17646,-76.39847 39.01405,-76.61121 38.9714,-76.32822 38.03932,-77.02212 38.49105,-77.21246 38.39021,-76.24836 37.89038,-76.36376 37.60291,-76.90633 37.97502,-76.30454 37.55298,-76.27406 37.30688,-76.46321 37.24319,-76.80559 37.48755,-76.30595 37.00014,-76.9477 37.22442,-76.44678 36.90483,-76.00096 36.92537,-75.91353 36.64815,-76.03982 36.49754,-75.79812 36.07376,-76.14029 36.28764,-76.07106 36.13816,-76.7242 35.95586,-76.05511 35.98423,-76.03706 35.64447,-75.81004 35.95577,-75.73165 35.62489,-76.16335 35.32164,-76.9315 35.44542,-76.47143 35.25912,-76.98331 35.00599,-76.28406 34.94073,-77.799 34.21786,-78.01891 33.8899,-78.77863 33.7722,-79.25211 33.11812,-80.00917 32.61446,-80.54631 32.5124,-80.55367 32.33615,-80.55548 32.33134,-80.83809 32.47521,-80.67422 32.21772,-81.20229 31.736,-81.48198 30.9878,-81.24987 29.76809,-80.52784 28.46446,-80.58482 28.15488,-80.0308 26.79992,-80.1182 25.90679,-80.42825 25.24681,-80.24875 25.33744,-80.57894 24.94721,-80.46434 25.20786,-81.13786 25.15631,-81.13807 25.3254,-80.89446 25.24905,-81.34302 25.81616,-81.73025 25.91104,-82.00932 26.49358,-81.75209 26.72557,-82.05271 26.54706,-82.02471 26.97271,-82.22161 26.97569,-82.1507 26.79684,-82.28456 26.81848,-82.69652 27.47772,-82.39742 27.94416,-82.53821 27.83809,-82.70294 28.04263,-82.65002 27.70326,-82.85555 27.86606,-82.60386 28.71526,-82.7988 29.17272,-83.03533 29.16673,-84.17139 30.21199,-84.46233 30.01124,-84.35007 29.89636,-85.37386 29.71445,-85.59927 30.10895,-85.73322 30.18143,-85.58951 30.3044,-85.84467 30.28739,-85.73206 30.12306,-86.44302 30.48984,-87.18488 30.34152,-86.87053 30.43526,-87.033 30.62559,-87.09432 30.43402,-87.18123 30.57686,-87.26764 30.33824,-87.54722 30.27342,-87.42487 30.39606,-87.5643 30.30103,-87.74482 30.28814,-87.98131 30.75492,-88.13259 30.30797,-88.95489 30.45198,-89.71393 30.16832,-90.15164 30.40045,-90.37897 30.06391,-89.75442 30.07346,-89.77032 30.06277,-89.62153 29.86591,-89.41939 30.02819,-89.33909 29.77735,-89.7756 29.6011,-89.02319 29.21291,-89.11143 29.0893,-89.41136 28.92029,-89.46288 29.24842,-89.82258 29.30713,-89.76371 29.47885,-89.94997 29.53209,-90.21764 29.53438,-90.04221 29.44281,-90.09554 29.20963,-89.95142 29.25688,-90.1577 29.10529,-90.34677 29.29484,-90.60876 29.30393,-90.64472 29.13036,-91.10709 29.28798,-91.24968 29.62971,-91.28576 29.4684,-91.38747 29.65893,-91.55258 29.51426,-91.61654 29.74265,-91.96894 29.83194,-92.20219 29.75024,-92.00992 29.60893,-92.28888 29.52802,-93.33588 29.76046,-93.28835 30.05209,-93.3742 29.82718,-93.36663 29.82329,-93.83128 29.68867,-93.7466 30,-93.93451 29.79722,-93.91193 29.76888,-94.76105 29.35688,-94.46409 29.55338,-94.77911 29.52567,-94.80283 29.76133,-95.07311 29.56185,-94.90401 29.41694,-95.29653 28.92581,-96.36286 28.39534,-95.97602 28.65344,-96.40722 28.71888,-96.47455 28.56593,-96.66185 28.69107,-96.39734 28.43298,-96.66584 28.30939,-96.79382 28.48027,-96.78293 28.22418,-97.2196 28.07308,-97.02608 28.02376,-97.39124 27.81165,-97.24153 27.68693,-97.40581 27.32655,-97.76814 27.45467,-97.77904 27.27712,-97.42342 27.25967,-97.5862 26.84757,-97.16439 26.06026,-97.15015 25.94769,-97.37753 25.83655,-99.08967 26.40093,-99.51466 27.56314,-101.4006 29.76785,-102.3142 29.87947,-102.6814 29.72309,-103.1495 28.97568,-103.3844 29.02264,-104.5407 29.68035,-104.921 30.60049,-106.5211 31.77821,-108.2035 31.78346,-108.2059 31.33134,-111.0648 31.32881,-114.8062 32.49187,-114.717 32.71676,-117.1236 32.53462,-117.5182 33.34199,-118.4071 33.74527,-118.5426 34.04146,-120.6398 34.56411,-120.6491 35.14135,-121.9019 36.30948,-121.8971 36.96305,-122.4039 37.19444,-122.513 37.77975,-122.109 37.5172,-122.4274 37.9653,-122.2615 38.06841,-122.5253 38.14785,-122.5284 37.81554,-123.0203 37.99454,-122.9987 38.29549,-123.7235 38.91683,-123.8505 39.83137,-124.4054 40.44267,-124.0549 41.53893,-124.5614 42.83796,-124.1643 43.81684,-123.9344 45.41414,-124.0222 46.22642,-123.4921 46.26481,-124.0838 46.26403,-124.0609 46.63499,-123.9417 46.41284,-123.938 46.43478,-123.7937 46.66664,-124.135 46.90166,-123.8255 46.96188,-124.1712 46.92815,-124.7278 48.38123,-123.1781 48.1437,-122.5823 48,-122.769 48.22422,-122.6079 48.41058,-122.5031 48.29779,-122.7331 48.22487,-122.5391 48.01093,-122.1737 48,-122.7561 49.00119,-95.16467 48.99572,-95.16843 49.38861,-94.82763 49.31594,-94.59069 48.72066,-93.76878 48.51838,-92.98031 48.63298,-92.37912 48.23077,-92.08531 48.36502,-91.58295 48.04938,-90.86729 48.24529,-90.75883 48.08698,-89.56577 47.99149,-89.8007 47.86091,-90.43546 47.72727,-90.88647 47.56023,-91.63815 47.00898,-92.05575 46.77515,-92.02234 46.69162,-91.78848 46.69162,-91.32077 46.82526,-90.88647 46.9756,-90.78624 46.89207,-90.95329 46.55799,-90.70272 46.65821,-90.46887 46.55799,-89.91763 46.70833,-89.39981 46.89207,-89.08244 47.02569,-88.69825 47.25955,-88.26393 47.4433,-87.89645 47.46,-87.76282 47.39318,-88.23052 47.20944,-88.44769 46.92548,-87.84634 46.89207,-87.59578 46.74174,-87.39533 46.52458,-86.71047 46.49117,-86.25947 46.65821,-85.77505 46.70833,-85.00666 46.75844,-84.98995 46.49117,-84.57236 46.39095,-84.10887 46.51847,-84.15475 46.32413,-84.07124 46.15709,-83.83737 46.04015,-83.58682 46.09027,-83.45319 45.97336,-83.65363 45.90654,-84.08794 45.97336,-84.3719 45.92324,-84.63918 46.00677,-84.7394 45.83972,-85.02336 46.02345,-85.47437 46.10697,-85.608 45.97336,-86.17594 45.92324,-86.4265 45.7562,-86.74388 45.80631,-86.81068 45.7395,-87.01114 45.78961,-87.36192 45.45552,-87.61249 44.97112,-87.82964 44.87089,-87.99667 44.62033,-87.79623 44.63703,-87.57908 44.82078,-87.34521 45.05462,-87.01114 45.30518,-86.97773 45.15484,-87.56237 44.35305,-87.52896 44.23613,-87.72942 44.00229,-87.71272 43.78513,-87.86304 43.41763,-87.91315 43.11695,-87.81293 42.73277,-87.81293 42.28176,-87.62919 41.93099,-87.41203 41.64701,-87.11137 41.64701,-86.82739 41.76394,-86.56013 42.06462,-86.30957 42.38198,-86.20935 42.68266,-86.22606 42.96664,-86.35968 43.26729,-86.47661 43.61808,-86.4265 43.80183,-86.52673 44.01899,-86.40979 44.18601,-86.25947 44.48669,-86.25947 44.65373,-86.15924 44.70385,-86.0256 44.9043,-85.54118 45.12143,-85.65812 44.98782,-85.608 44.77066,-85.40755 44.8876,-85.37415 45.02123,-85.37415 45.17155,-85.29063 45.30518,-85.04007 45.32189,-85.00666 45.40541,-85.09018 45.42211,-85.12359 45.57245,-85.00666 45.70609,-84.72269 45.72279,-84.22157 45.58916,-84.13805 45.50563,-83.45319 45.33859,-83.28615 45.03793,-83.41978 45.08802,-83.43648 44.98782,-83.30286 44.87089,-83.33627 44.55351,-83.53671 44.23613,-83.55341 44.11919,-83.85408 43.95217,-83.97101 43.76842,-83.72045 43.55127,-83.55341 43.6849,-83.36966 43.88535,-83.11911 44.01899,-82.91866 44.0691,-82.68481 43.93547,-82.61799 43.6849,-82.51776 43.20047,-82.37823 42.95786,-82.50106 42.64925,-82.6681 42.53232,-82.6514 42.64925,-82.75163 42.64925,-82.83514 42.61584,-82.88525 42.48221,-82.91866 42.33187,-83.13581 42.24835,-83.18593 42.01451,-83.38637 41.88087,-83.45319 41.73053,-83.36966 41.66372,-83.15252 41.6136,-82.95206 41.53008,-82.75163 41.53008,-82.51776 41.39645,-82.31732 41.42986,-82.10017 41.49667,-81.74938 41.49667,-81.3819 41.71383,-80.5968 41.93099,-79.7449 42.29846,-79.36071 42.4655,-79.14355 42.56573,-79.00992 42.68266,-78.90971 42.73277,-78.92641 42.91652,-79.00992 42.98334,-79.02663 43.06686,-79.07674 43.11695,-79.07674 43.23388,-78.52551 43.33411,-77.72372 43.33411,-77.55667 43.23388,-77.00545 43.284,-76.53773 43.46775,-76.25376 43.53456,-76.22035 43.6682,-76.25376 43.80183,-76.27047 43.88535,-76.18694 43.85195,-76.15353 43.88535,-76.32058 44.00229,-76.3874 44.0691,-76.33729 44.20272,-76.13676 44.30282,-75 44.97811,-74.66793 45.0026,-71.53727 45,-71.2938 45.29987,-70.86777 45.23078,-70.25917 45.88986,-70.30109 46.19219,-69.98644 46.6995,-69.22559 47.45865,-68.89502 47.17887,-68.2367 47.3573,-67.78654 47.06619,-67.81347 45.68372,-67.4472 45.60041,-67.46207 45.24411,-67.09035 45.07576,-66.97901 44.86927,-66.97279 44.85178,-68.03481 44.4864,-68.05862 44.32999,-68.26769 44.49398,-68.33674 44.22467,-68.37878 44.42384,-68.59048 44.4096,-68.53169 44.22762,-68.83547 44.31098,-68.75982 44.5208,-69.0632 44.44376,-69.14104 43.99013,-69.83807 43.70461,-70.09378 43.85207,-70.33942 43.54007,-70.71558 43.15908,-70.83032 42.68554,-70.59549 42.63744,-70.99018 42.45941,-70.92501 42.25277,-70.27111 41.70403,-70.05318 41.79193,-70.01534 41.54635,-70.16691 41.6892,-70.69456 41.52509,-70.61455 41.7685,-71.1951 41.45945,-71.17753 41.71644,-71.38929 41.80583,-71.48842 41.36469,-72.05358 41.32679,-72.95657 41.3075,-73.97534 40.73178,-73.48306 40.91101,-72.26098 41.14254,-72.8671 40.74208,-73.94196 40.54873,-73.98766 40.71467)),((-163.3118 54.81525,-163.0629 54.6576,-163.3772 54.74283,-164.6413 54.38886,-164.9407 54.52951,-164.4837 54.91759,-163.6624 55.03736,-163.3441 54.83573,-163.3372 55.08929,-162.4657 55.36859,-162.6259 55.43608,-162.0495 55.78507,-160.8524 55.93177,-160.8582 55.92899,-161.0182 55.89508,-160.7998 55.71012,-160.6521 55.7272,-160.7831 55.88313,-160.2531 55.76408,-160.5772 55.91076,-160.3845 56.25481,-158.8871 56.88484,-158.6865 56.78305,-158.3461 57.25614,-157.59 57.49617,-157.5875 58.12745,-157.3654 58.23081,-157.5424 58.38252,-156.9806 58.72009,-157.0166 58.96766,-158.185 58.61168,-158.5711 58.80559,-158.3128 59.02414,-158.4411 59.07678,-158.9048 58.7387,-158.6999 58.49014,-158.9013 58.39078,-159.4952 58.81642,-159.595 58.95609,-159.9049 58.76834,-160.3585 59.07383,-161.7632 58.55006,-162.1709 58.65134,-161.7583 58.7966,-162.0437 59.2616,-161.708 59.5,-162.2101 60.03709,-164.1409 59.84983,-164.0991 59.99654,-165.1321 60.4314,-164.9695 60.53978,-165.424 60.55106,-164.9691 60.72097,-165.1989 60.9812,-165.0142 61.05541,-165.5829 61.0985,-165.8922 61.33951,-165.7713 61.50361,-166.1927 61.58073,-165.7774 61.67631,-166.1053 61.80931,-165.6114 61.85868,-165.7494 62.07237,-164.8031 62.59517,-164.8902 62.78291,-164.5801 63.14024,-163.6942 63.13641,-163.6978 63.13167,-163.3801 63.04647,-163.374 63.04673,-162.6747 63.2249,-162.3155 63.54072,-161.4539 63.45604,-160.9041 63.65336,-160.7725 63.76305,-160.9707 64.22994,-161.5331 64.38034,-160.7877 64.62657,-160.8719 64.83627,-162.1718 64.67966,-162.7818 64.32538,-163.1263 64.64933,-163.3835 64.58038,-163.0243 64.51266,-163.1719 64.40102,-163.7706 64.57379,-165.0079 64.43317,-166.2234 64.58187,-166.866 65.11819,-166.3538 65.28329,-168.0989 65.6843,-165.4601 66.40849,-163.8464 66.55461,-163.8254 66.27031,-164.1963 66.19578,-163.7607 66.06143,-160.9987 66.189,-161.5263 66.39742,-161.9032 66.26526,-161.8764 66.51309,-162.6142 66.85083,-162.3184 66.94808,-161.5822 66.44195,-161.254 66.53391,-161.8801 66.71859,-161.4751 66.95222,-163.6951 67.10671,-164.1368 67.61349,-166.8384 68.34132,-166.3245 68.44492,-166.214 68.88184,-163.6908 69.07616,-163.1904 69.35981,-163.0165 69.8117,-162.2426 70.2306,-160.8289 70.37325,-159.2807 70.86278,-158.0181 70.83276,-156.6366 71.33396,-155.5239 71.10973,-156.1185 70.96185,-156.0081 70.75265,-155.2838 70.80817,-155.5184 70.94434,-155.0838 71.13541,-154.1833 70.76878,-152.2759 70.84442,-152.4758 70.63707,-152.0516 70.58219,-152.6021 70.54787,-151.7417 70.54659,-151.9826 70.43184,-149.7749 70.4884,-144.9519 69.95982,-143.2119 70.11563,-141.7768 69.78617,-141.5222 69.72273,-140.9922 69.64477,-141 60.32135,-139.9773 60.18466,-139.069 60.35199,-139.1862 60.09261,-137.5982 59.24158,-137.5208 58.91674,-137.0443 59.04448,-136.908 58.93143,-137.1353 58.83219,-136.6631 58.85749,-136.3393 58.68591,-136.544 58.61201,-136.0841 58.51116,-136.27 58.31458,-136.5195 58.45139,-136.3575 58.30202,-136.5997 58.368,-136.6454 58.20665,-138.4911 59.16981,-138.5062 59.18807,-139.845 59.53186,-139.4628 59.70977,-139.6285 59.89356,-139.4766 59.99577,-139.2926 59.56239,-139.2775 59.82567,-139.0525 59.83709,-139.505 60.05507,-139.8247 59.81968,-140.3441 59.6939,-141.4605 59.88712,-141.2092 59.97616,-141.5211 60.15619,-141.3711 60.03001,-141.7118 59.94888,-144.2539 60.02664,-143.9819 60.04849,-144.2098 60.1423,-144.0527 60.17208,-144.939 60.28714,-144.7309 60.45918,-145.9393 60.45403,-145.615 60.65666,-146.6579 60.68088,-146.096 60.8329,-146.574 60.84092,-146.7665 60.94191,-146.5761 61.04969,-147.3946 60.87113,-147.4206 61.01629,-147.5608 60.90497,-147.5164 61.14316,-147.6087 60.85125,-147.8926 60.82516,-148.0778 60.92884,-147.702 61.27226,-148.3547 60.80513,-148.7281 60.78513,-148.3756 60.76402,-148.4439 60.61724,-148.2374 60.76137,-148.4564 60.52448,-148.2922 60.43117,-147.9706 60.4977,-148.4518 60.18188,-148.1278 60.16656,-148.6429 59.91554,-149.1312 59.96432,-149.0347 60.0953,-149.3028 59.86865,-149.4395 60.12162,-149.608 59.78474,-149.7503 59.94116,-149.7457 59.63845,-150.0383 59.79882,-149.9222 59.68707,-150.2544 59.49024,-150.403 59.46766,-150.2297 59.73192,-150.9671 59.20012,-151.0537 59.30308,-151.9818 59.25793,-150.9246 59.7938,-151.4259 59.6,-151.8739 59.77604,-151.2194 60.526,-151.4176 60.71933,-150.382 61.03511,-149.0046 60.81922,-150.0739 61.16158,-149.3179 61.47567,-149.606 61.4985,-149.9874 61.2362,-150.6608 61.31284,-151.7396 60.91568,-151.7137 60.71682,-152.7225 60.24483,-152.5715 60.07566,-152.7069 59.92014,-153.2222 59.86509,-152.9938 59.80837,-153.2179 59.63506,-153.4599 59.78601,-154.2697 59.13859,-153.2531 58.84842,-154.1002 58.47763,-153.9881 58.39185,-154.3578 58.28476,-154.106 58.27777,-154.2155 58.13839,-155.0318 58.02443,-155.3048 57.72335,-155.6132 57.79116,-155.7351 57.53984,-156.5415 57.323,-156.3225 57.28986,-156.5606 56.97707,-157.4294 56.86127,-157.4624 56.62349,-158.1378 56.53439,-157.8667 56.47111,-158.3311 56.48208,-158.6678 56.26998,-158.1181 56.23659,-158.4115 56,-158.589 56.03551,-158.4534 56.18475,-158.6719 56.13659,-158.6633 55.94858,-159.5238 55.88407,-159.6756 55.60098,-159.5802 55.80091,-159.8493 55.84003,-160.4965 55.47541,-160.589 55.60629,-161.2391 55.3546,-161.4995 55.36195,-161.3553 55.61101,-161.5749 55.61732,-162.0401 55.22236,-161.9562 55.10414,-162.4821 55.05943,-162.3513 55.10466,-162.6655 55.29094,-162.5593 54.95132,-163.1694 55.13439,-163.0305 54.94361,-163.3118 54.81525)),((-135.8469 58.89944,-135.8505 58.89988,-136.1996 59.06943,-136.2365 58.75393,-137.0295 59.04845,-136.5758 59.17006,-136.2238 59.54335,-136.3462 59.60201,-135.4831 59.80002,-135.0289 59.56924,-134.96 59.2839,-133.3731 58.42699,-131.8473 56.66231,-132.422 56.67813,-132.4644 56.68121,-132.3622 56.82113,-132.9363 56.98676,-132.8037 57.09358,-133.5601 57.18224,-133.125 57.32744,-133.459 57.36337,-133.3336 57.44502,-133.6653 57.65044,-132.8832 57.49903,-133.5611 57.90702,-133.8342 57.9334,-133.3651 58.13492,-134.0368 58.05956,-133.9623 58.37809,-134.2288 58.21161,-134.7482 58.38002,-134.9315 58.8606,-135.1371 58.85104,-135.2646 59.2278,-135.084 59.2575,-135.33 59.23457,-135.3009 59.46252,-135.399 59.28764,-135.7105 59.46354,-135.2865 59.09553,-135.6129 59.25718,-135.1324 58.62214,-135.1394 58.20765,-135.5006 58.51162,-135.4605 58.37596,-135.9107 58.38246,-135.8239 58.60376,-136.0757 58.82156,-135.8906 58.88184,-135.8469 58.89944)),((-131.4072 55.92048,-131.5047 55.9255,-131.8433 55.94298,-131.9871 55.49357,-132.2825 55.7568,-131.9978 55.77553,-131.9654 56.17038,-131.5796 56.19768,-132.0562 56.36025,-131.9158 56.20236,-132.0612 56.11211,-132.3834 56.48544,-132.0971 56.36389,-132.3552 56.5911,-131.8436 56.64807,-130.1073 56.12453,-130.0106 55.903,-130.1724 55.74739,-129.9916 55.27802,-130.8241 54.76537,-130.9813 55.06348,-130.685 55.02736,-130.4683 55.33473,-130.7463 55.09144,-131.0682 55.11845,-130.621 55.29547,-130.8686 55.31176,-130.6357 55.64803,-130.8528 55.5455,-130.695 55.74617,-130.9036 55.70945,-130.8224 55.89029,-131.2092 55.91026,-130.9401 55.61683,-131.1602 55.19368,-131.3153 55.24173,-131.1985 55.39494,-131.4606 55.27512,-131.2745 55.42735,-131.3607 55.64489,-131.3237 55.43304,-131.4842 55.32287,-131.5127 55.50412,-131.5441 55.28986,-131.832 55.44715,-131.7183 55.53416,-131.5097 55.72923,-131.7366 55.7197,-131.4915 55.78184,-131.7132 55.82529,-131.4072 55.92048)),((-153.3376 57.72657,-153.3712 57.74371,-153.0456 57.81606,-153.2995 57.99662,-152.8133 57.91498,-152.8703 57.71915,-152.5912 57.92455,-152.3309 57.82117,-152.5607 57.71542,-152.4753 57.59804,-152.1607 57.58718,-152.3257 57.4308,-152.955 57.51889,-152.6267 57.40254,-152.7039 57.27811,-153.1571 57.36072,-152.9608 57.24783,-153.5417 57.17791,-153.7643 57.04919,-153.5808 57.04416,-153.6935 56.86005,-154.1497 56.75021,-153.7805 57.16878,-154.3138 56.84157,-154.8015 57.34629,-154.2051 57.66127,-153.6342 57.27068,-153.8784 57.64111,-153.5563 57.59649,-153.9379 57.80788,-153.624 57.88089,-153.4883 57.6131,-153.3376 57.72657)),((-170.4665 63.69576,-170.1065 63.4633,-168.6935 63.29181,-169.646 62.93705,-170.6081 63.36638,-171.5592 63.32071,-171.8498 63.48646,-171.7477 63.78433,-171.0882 63.57101,-170.4665 63.69576)),((-155.8214 20.26227,-154.8099 19.52062,-155.6782 18.91368,-155.9115 19.08803,-156.064 19.73091,-155.8214 20.26227)),((-133.3409 56.15327,-133.4346 56.15383,-133.6185 56.35644,-133.1687 56.32695,-132.9283 56.01316,-132.1383 55.45164,-132.5629 55.62103,-132.7275 55.34566,-132.4034 55.50951,-132.2799 55.4394,-132.4626 55.30733,-132.0925 55.27504,-132.4612 55.255,-132.3522 55.12712,-131.9989 55.26527,-132.3091 54.97902,-131.9803 55.03589,-132.1091 54.89707,-131.9522 54.78738,-132.298 54.71325,-132.38 55.08428,-132.4185 54.90588,-132.6053 54.96308,-132.5462 55.27383,-132.8183 55.18702,-132.827 55.1898,-133.2666 55.33158,-132.8578 55.34531,-133.136 55.46057,-132.9061 55.4766,-133.0885 55.55095,-132.9306 55.6254,-133.3878 55.62629,-133.1231 55.88276,-133.3409 56.15327)),((-136.0277 57.63404,-136.4137 57.82458,-136.3414 58.00237,-136.0057 57.83541,-136.4374 58.11353,-136.2693 58.22203,-136.0856 58.05678,-136.1544 58.21832,-135.7835 58.28746,-135.4844 58.16914,-135.7815 58.05488,-135.662 57.94392,-135.4055 58.14022,-134.9211 58.01601,-134.9289 57.84575,-135.2126 57.94773,-134.9355 57.80661,-135.1396 57.77315,-135.8926 58.00011,-135.4488 57.73281,-134.9276 57.76072,-134.8205 57.50137,-135.8171 57.77138,-135.5519 57.5846,-135.6969 57.36984,-136.0277 57.63404)),((-166.6097 60.3063,-165.6767 60.28886,-165.7247 60.05902,-165.5313 59.97916,-166.1926 59.75154,-167.142 60.00245,-167.4644 60.2093,-166.6097 60.3063)),((-134.5746 57.50663,-134.9407 58.4068,-134.6886 58.16124,-134.159 58.15123,-133.7952 57.6204,-134.3071 58.08672,-134.2957 57.83427,-133.8517 57.46404,-134.0966 57.466,-133.8503 57.36563,-134.1855 57.39364,-134.1002 57.24289,-134.6138 57.01692,-134.636 57.23553,-134.4292 57.30422,-134.5662 57.39762,-134.31 57.33554,-134.5746 57.50663)),((-135 56.66066,-135.2205 56.69049,-135.0134 56.81931,-135.3687 56.82158,-135.1266 56.92055,-135.3732 56.98154,-135.1087 56.98485,-135.6827 57.35492,-135.4757 57.35841,-135.5391 57.50872,-134.8422 57.26068,-134.6162 56.25714,-135.0521 56.53246,-134.82 56.74903,-135 56.66066)),((-133.7692 57.07434,-133.0985 56.99616,-132.9275 56.66636,-133.3631 56.8431,-133.0823 56.53033,-133.6454 56.43599,-133.6748 56.85608,-134.0408 57.02184,-133.7692 57.07434)),((-167.165 53.46146,-167.1005 53.52244,-167.0679 53.69091,-166.697 53.71228,-167.0854 53.91864,-166.209 53.9269,-166.6214 53.73442,-166.281 53.67983,-167.0431 53.44606,-167.6623 53.23619,-167.8523 53.30897,-167.165 53.46146)),((-133.9783 56.78539,-134.0442 56.64763,-133.8751 56.80941,-133.7001 56.58777,-133.9291 56.61729,-133.847 56.28588,-133.9743 56.36905,-133.9592 56.08216,-134.1241 56.26134,-134.1201 56.00291,-134.2826 56.35555,-134.0297 56.49991,-134.3151 56.56498,-134.0739 56.64552,-134.4165 56.83759,-133.9783 56.78539)),((-152.6732 58.07205,-153.226 58.18698,-152.8566 58.15434,-153.0927 58.27364,-152.7662 58.24134,-152.8927 58.40862,-152.1259 58.39702,-152.1506 58.2206,-151.9891 58.35028,-152.117 58.15111,-152.291 58.26395,-152.6732 58.07205)),((-147.469 60.08747,-147.1641 60.37337,-146.919 60.30186,-147.4848 59.85359,-147.9342 59.78352,-147.469 60.08747)),((-169.0627 52.83848,-168.6944 53.22089,-168.3516 53.25216,-168.345 53.4724,-167.7847 53.50721,-169.0627 52.83848)),((-174.5944 52.14303,-174.2772 52.20985,-174.4551 52.31911,-174.2674 52.40174,-173.9942 52.35456,-174.192 52.21893,-174.0914 52.10121,-175.3323 52.02393,-174.5944 52.14303)),((172.9132 52.741,172.4553 52.91609,172.6431 52.99778,173.4343 52.8462,172.9132 52.741)),((-156.6385 21.02172,-155.9847 20.71651,-156.4117 20.58434,-156.6385 21.02172)),((-157.956 21.69758,-157.7007 21.2627,-158.2339 21.48015,-157.956 21.69758)),((-132.5264 56.30662,-132.0966 56.10926,-132.2534 56.13256,-132.2148 55.92873,-132.4478 55.95982,-132.4533 56.16851,-132.6512 56.04821,-132.5264 56.30662)),((-177.904 51.59604,-178.2183 51.88571,-177.6081 51.8522,-177.904 51.59604)),((-176.936 51.5904,-176.9 51.80798,-176.7023 51.78551,-176.7704 51.96286,-176.4208 51.83135,-176.936 51.5904)),((-146.6152 60.23754,-146.4897 60.36406,-146.7288 60.34592,-146.6284 60.48171,-146.0841 60.40246,-146.6152 60.23754)),((-159.3872 22.22399,-159.4408 21.88081,-159.7891 22.0198,-159.3872 22.22399)),((-135.8291 57.29532,-135.617 57.23064,-135.6234 57.01297,-135.8496 57.00298,-135.8291 57.29532)),((-160 55.19365,-159.8708 55.28981,-159.8226 55.1287,-160.2164 54.8604,-160 55.19365)),((-173.4906 52.0243,-174.0453 52.13379,-172.9588 52.09604,-173.4906 52.0243)),((-132.6985 56.69904,-132.5312 56.58294,-132.9468 56.51829,-132.8091 56.61177,-132.9688 56.80367,-132.6985 56.69904)),((-177.6402 51.65364,-177.0416 51.90232,-177.1393 51.7084,-177.6402 51.65364)),((-72.47688 40.84109,-72.33081 41.03508,-71.85998 41.07202,-72.47688 40.84109)),((-161.0746 58.54728,-161.1766 58.69509,-160.6864 58.82161,-161.0746 58.54728)),((-165.8907 54.03064,-166.1153 54.12124,-165.9812 54.21906,-165.6628 54.11871,-165.8907 54.03064)),((-160.4965 55.30745,-160.8161 55.1173,-160.8698 55.32278,-160.4965 55.30745)))
+MULTIPOLYGON(((-58.1342 -33.02597,-58.20473 -31.87094,-57.79935 -30.8506,-57.87759 -30.51556,-57.61797 -30.17916,-57.22708 -30.28558,-56.83579 -30.0911,-56.0214 -30.78441,-56.00782 -31.06264,-55.62381 -30.8503,-55.2451 -31.25673,-54.52603 -31.50096,-53.71415 -32.10408,-53.59493 -32.43153,-53.07554 -32.73903,-53.51495 -33.16332,-53.52446 -33.68903,-53.37161 -33.75053,-54.14246 -34.68089,-54.94716 -34.98082,-55.46095 -34.73521,-56.15804 -34.93877,-57.12647 -34.46138,-57.8563 -34.48499,-58.22089 -34.15302,-58.43656 -33.52903,-58.35335 -33.13548,-58.1342 -33.02597)))
+MULTIPOLYGON(((61.11451 44.66727,61.13844 44.67618,61.12239 44.6563,61.75071 43.78181,64.30486 43.61873,66.15273 43.56479,66.80507 42.80331,66.58804 42.09577,68.43591 41.33429,70.55601 42.47714,70.93612 41.71566,67.45741 39.64825,67.89272 39.21294,68.32677 38.99591,68.48985 38.39752,67.62237 37.22717,66.31045 37.32011,65.76604 37.54458,65.64548 37.38977,65.3373 38.5606,63.65252 39.32208,62.23996 40.35579,60.44603 40.89898,60.06592 42.04183,58.97827 42.74936,57.23954 41.82354,57.23954 41.33429,55.93486 41.55257,56.09795 45.19688,58.75704 45.86393,59.3783 46.04139,59.2774 45.76174,59.51931 45.82307,59.5675 46.3592,59.85021 46.09455,60.77562 46.17736,60.73527 46.33081,60.43949 46.2855,59.9384 46.40144,60.27652 46.70614,60.40186 46.49827,60.73715 46.64245,60.51076 46.7757,60.83824 46.76168,60.98714 46.47668,61.66479 46.78025,61.17527 46.17042,60.8772 46.10632,60.86492 45.77643,61.13265 45.3161,61.34788 45.34447,61.31798 45.10165,61.72933 44.94716,61.80758 45.11567,61.79484 44.93174,61.11324 44.66904,61.11451 44.66727)))
+MULTIPOLYGON(((-61.2097 9.584465,-61.20908 9.58693,-60.79706 9.37693,-60.8659 9.036358,-60.8682 9.030631,-60.89254 8.908685,-60.90077 8.851967,-60.84422 8.841609,-60.85171 8.832647,-60.98471 8.571118,-59.99787 8.557567,-59.80846 8.273121,-60.71212 7.539176,-60.61609 7.206539,-60.28549 7.074996,-61.14338 6.717797,-61.11466 6.199507,-61.39627 5.961447,-60.73177 5.19614,-60.59009 4.941295,-60.97837 4.522421,-61.34529 4.530355,-61.93494 4.116556,-62.73957 4.032468,-62.7561 3.674234,-64.61086 4.251375,-64.08481 3.603836,-64.29391 3.170593,-64.24787 2.527704,-63.81604 2.314885,-63.37712 2.423593,-63.41759 2.133158,-64.04498 2.034915,-64.34303 1.39162,-64.39851 1.539462,-65.38742 0.863895,-66.31854 0.743681,-66.86983 1.225646,-67.19505 2.391271,-67.61562 2.812483,-67.85923 2.789513,-67.30263 3.397936,-67.87634 4.521809,-67.85004 5.290832,-67.47605 6.194591,-69.44788 6.114453,-70.08932 7.002468,-72.01836 7.011073,-72.48071 7.484616,-72.38087 8.321577,-72.76882 9.106619,-73.01078 9.296101,-73.37431 9.179666,-72.48579 11.09459,-72.23744 11.15238,-71.96606 11.65008,-71.32639 11.84789,-71.9631 11.56015,-71.57778 10.70763,-72.12893 9.81395,-71.99763 9.446594,-71.71617 9.391037,-71.70588 9.052748,-71.0612 9.319377,-71.02335 9.715961,-71.58749 10.80117,-70.0476 11.44202,-70 11.66138,-70.22527 11.61711,-70.29669 11.86659,-70.01847 12.20115,-69.61324 11.46071,-68.82822 11.44149,-68.4013 11.18558,-68.12967 10.48547,-66.23213 10.64486,-65.78642 10.20939,-65.09121 10.04332,-64.181 10.47311,-63.66295 10.47305,-64.22894 10.5008,-64.26272 10.66255,-61.8549 10.7554,-62.9038 10.52107,-62.33775 9.809538,-62.20023 10.02041,-61.2097 9.584465)),((-64.2709 11.06305,-64.04752 10.98658,-63.87902 11.16968,-63.77856 10.97322,-64.05508 10.86034,-64.40665 10.96881,-64.2709 11.06305)))
+MULTIPOLYGON(((-64.89504 17.71018,-64.79482 17.7937,-64.57767 17.74359,-64.89504 17.71018)),((-64.67789 18.42846,-64.56097 18.44516,-64.62778 18.39505,-64.728 18.37834,-64.67789 18.42846)))
+MULTIPOLYGON(((102.1496 22.40003,102.4978 22.78027,103.0307 22.44462,103.3324 22.82147,103.9694 22.50606,104.1109 22.80446,104.7335 22.82427,104.8184 23.12538,105.3316 23.38878,105.8806 22.92103,106.8187 22.81807,106.565 22.45686,106.697 21.96585,107.0213 21.94991,107.3836 21.59821,108.0241 21.55152,107.3848 21.27126,107.3558 21.00552,106.8705 20.92064,106.6408 21.04128,106.8109 20.67578,106.5614 20.68176,106.571 20.28312,105.9396 19.96568,105.7968 19.60766,105.5902 19.02375,105.812 18.43896,106.4377 18.11997,106.629 17.46822,107.8197 16.29067,108.0252 16.34285,108.2069 16,108.3356 16.12037,108.9428 15.24303,109.4633 12.87732,109.4454 12.56257,109.3441 12.79624,109.193 12.62406,109.2862 11.87812,109.1334 11.90551,109.2358 11.72428,109.0223 11.35512,107.9945 10.70015,107.1188 10.4191,106.7409 10.45916,106.534 9.574359,106.2877 9.605159,106.1819 9.359591,104.8384 8.559973,104.8611 9.710616,105.1106 9.944055,104.7842 10.21045,104.6006 10.13844,104.4453 10.421,104.8844 10.53115,105.1097 10.95593,105.3569 10.84966,105.7775 11.02648,106.1924 10.78987,105.8506 11.65794,106.4487 11.66724,106.418 11.97237,107.5572 12.36875,107.6185 13.51608,107.3392 14.11099,107.5446 14.68599,107.4715 15.00654,107.6967 15.25985,107.2178 15.73087,107.4526 16.08298,106.8739 16.53206,106.6789 16.45194,106.5534 16.99335,105.1911 18.32619,105.138 18.71571,103.8763 19.31214,104.1264 19.50412,104.0453 19.70294,104.6509 19.62435,104.9776 20,104.3783 20.44445,104.6435 20.66785,104.1231 20.98185,103.699 20.66491,103.1761 20.85108,102.8097 21.26276,102.986 21.69021,102.8436 21.84679,102.677 21.65939,102.1496 22.40003)))
+MULTIPOLYGON(((166.8918 -15.17098,167.0802 -14.93592,167.2465 -15.51878,166.8311 -15.66659,166.6198 -15.38821,166.609 -14.62651,166.8918 -15.17098)),((167.3787 -16,167.7624 -16.55241,167.4264 -16.53896,167.3899 -16.18786,167.1528 -16.08714,167.2089 -15.88183,167.3787 -16)),((168.1579 -16.10152,168.2923 -16.3483,167.9197 -16.26694,168.1579 -16.10152)),((169.0475 -18.63596,169.2877 -19.00046,168.9952 -18.8801,169.0475 -18.63596)),((168.2862 -17.55591,168.5589 -17.78741,168.1829 -17.74683,168.2862 -17.55591)))
+MULTIPOLYGON(((-172.418 -13.4522,-172.2043 -13.57168,-172.228 -13.80045,-172.5263 -13.80205,-172.7986 -13.51573,-172.418 -13.4522)),((-171.8288 -13.78687,-171.4302 -14.04094,-171.9154 -13.99943,-172.054 -13.86133,-171.8288 -13.78687)))
+MULTIPOLYGON(((43.21629 17.22469,43.23257 17.2722,43.34187 17.58682,43.86814 17.31088,44.36618 17.39002,46.08288 16.48298,46.32877 16.34975,46.33119 15.61425,48.76487 18.2688,52.0007 19.00233,51.88201 18.57879,53.0783 16.64576,52.45185 16.42215,52.14711 15.95149,52.22734 15.6352,51.66716 15.33482,49.40985 14.65454,48.68648 14.03903,47.96798 14.04398,46.69682 13.42517,45.66945 13.34684,44.89632 12.77472,43.46087 12.67452,42.88342 14.86844,42.86375 15.11969,42.59566 15.23652,42.8068 15.28345,42.77824 16.3692,43.23682 16.65217,43.21629 17.22469)))
+MULTIPOLYGON(((29.36078 -22.19663,31.31127 -22.41774,31.99045 -24.31326,31.98213 -25.95205,31.32036 -25.74403,30.83329 -26.418,30.81216 -26.82551,31.53687 -27.31616,31.97532 -27.31699,32.13366 -26.83497,32.89597 -26.85684,32.40335 -28.5225,31.43322 -29.19788,29.90961 -31.38778,27.89992 -33.04585,26.62374 -33.72743,25.66923 -33.78168,25.69934 -34.03587,25.00793 -33.95828,24.83034 -34.21434,22.57194 -33.99672,21.81955 -34.38114,20.75139 -34.39661,20.00533 -34.83983,19.29433 -34.63351,19.13797 -34.30788,18.82177 -34.38503,18.79114 -34.08531,18.37985 -34.27206,18.43716 -33.70218,17.8457 -32.82472,18.31321 -32.56527,18.28197 -31.89546,17.35824 -30.48131,16.47328 -28.58356,17.08332 -28.03777,17.37844 -28.29535,17.40949 -28.72295,18.17901 -28.91589,19.17275 -28.95783,19.56238 -28.53189,19.99676 -28.43311,20.00024 -24.75299,20.67549 -25.45156,20.83805 -25.95612,20.61319 -26.47431,20.69333 -26.90725,21.69972 -26.86086,22.56291 -26.22073,23.01187 -25.29341,23.46499 -25.27447,23.90865 -25.62613,24.65421 -25.81951,25.58393 -25.63317,25.87019 -24.75385,26.42155 -24.63555,26.8654 -24.26007,27.00567 -23.64784,27.74442 -23.23639,28.34627 -22.57694,29.36078 -22.19663),(27.12344 -29.57842,27.39462 -30.33049,28.11823 -30.66896,28.39915 -30.14675,29.16626 -29.92973,29.46576 -29.35254,28.66901 -28.57445,27.76015 -28.89541,27.12344 -29.57842)),((14.44809 -23.148,14.52676 -22.68227,14.66691 -22.64301,14.72931 -23.23087,14.44809 -23.148)))
+MULTIPOLYGON(((25.27033 -17.79891,26.69029 -18.07947,27.03777 -17.96473,27.82958 -16.96254,28.80209 -16.50385,28.91203 -15.94682,29.56215 -15.64117,30.41826 -15.61757,30.42459 -16,31.24465 -16,32.97855 -16.70721,32.83567 -16.92076,33.04526 -17.34697,33.05502 -18.36191,32.70041 -18.94058,33.01094 -20.01879,32.48854 -20.62747,32.48002 -21.32811,31.31127 -22.41774,29.36078 -22.19663,29 -21.77173,28.01623 -21.57341,27.68603 -21.06585,27.72207 -20.51928,27.28722 -20.49983,27.20168 -20.08701,26.16599 -19.54607,25.27033 -17.79891)))
+MULTIPOLYGON(((30.77425 -8.22436,31.07797 -8.621837,31.37501 -8.587209,31.98438 -9.071177,32.95351 -9.401445,33.70504 -10.56948,33.2459 -10.89392,33.40601 -11.16108,33.22755 -11.42278,33.26135 -12.14225,33.54823 -12.35774,33.01505 -12.65771,33.0166 -13.21101,32.67395 -13.60776,33.02915 -14.04606,33.20901 -14.00362,30.21732 -14.99723,30.41826 -15.61757,29.56215 -15.64117,28.91203 -15.94682,28.80209 -16.50385,27.82958 -16.96254,27.03777 -17.96473,26.69029 -18.07947,25.27033 -17.79891,25.2567 -17.78792,24.72062 -17.50023,23.42815 -17.63928,21.99966 -16.19787,21.9999 -13.00472,24.04029 -12.99056,23.9036 -12.83371,24.07812 -12.36638,23.9957 -10.89157,24.38296 -11.09247,24.28872 -11.38917,24.44542 -11.4757,25.3518 -11.19585,25.33671 -11.62697,25.98967 -11.94062,26.88356 -11.98459,27.20575 -11.56842,27.65628 -12.28707,28.4416 -12.51617,29.00366 -13.41588,29.58906 -13.21372,29.80896 -13.45514,29.80884 -12.15971,29.48926 -12.23857,29.49944 -12.46983,29.05881 -12.38911,28.43867 -11.83067,28.69705 -9.806156,28.36363 -9.308095,28.89654 -8.794926,28.90192 -8.474615,30.77425 -8.22436)))
+MULTIPOLYGON(((27.46342 5.016153,28.37458 4.275577,28.77811 4.558043,29.2455 4.344783,29.61472 4.660875,30.85357 3.48639,30.74787 2.452595,31.30536 2.11931,29.96222 0.806247,29.59532 -1.392395,28.87052 -2.419076,29.03217 -2.749662,29.24615 -3.070362,29.39148 -4.44525,29.61157 -6.304459,30.25485 -7.048671,30.77425 -8.22436,28.90192 -8.474615,28.89654 -8.794926,28.36363 -9.308095,28.69705 -9.806156,28.43867 -11.83067,29.05881 -12.38911,29.49944 -12.46983,29.48926 -12.23857,29.80884 -12.15971,29.80896 -13.45514,29.58906 -13.21372,29.00366 -13.41588,28.4416 -12.51617,27.65628 -12.28707,27.20575 -11.56842,26.88356 -11.98459,25.98967 -11.94062,25.33671 -11.62697,25.3518 -11.19585,24.44542 -11.4757,24.28872 -11.38917,24.38296 -11.09247,23.9957 -10.89157,23.08404 -11.12396,22.56217 -11.03055,22.27194 -11.24606,22.32795 -10.38512,21.79289 -9.420432,21.95976 -8.496954,21.74475 -7.932942,21.78059 -7.283893,20.54168 -7.28143,20.62715 -6.913397,19.54379 -6.999425,19.3744 -8,18.53232 -7.920376,17.58297 -8.129065,16.95371 -7.203343,16.59974 -5.918555,12.96863 -5.906919,12.4657 -6.017591,12.46839 -6.015355,12.47843 -5.991628,12.4728 -5.990575,12.20663 -5.769247,12.5351 -5.733854,12.47494 -5.075711,13.1025 -4.646508,13.43464 -4.919622,13.7292 -4.709084,13.73834 -4.44858,14.40724 -4.279238,14.41206 -4.893814,14.69051 -4.917224,15.5615 -4.04695,15.91541 -3.934902,16.22239 -3.296272,16.20089 -2.197611,16.8458 -1.263571,17.70007 -0.567603,18.09457 2.23824,18.6351 3.471089,18.54905 4.316255,19.42282 5.128375,19.8252 5.09344,20.60624 4.403446,22.26635 4.114358,22.55044 4.21542,22.90667 4.817867,23.42093 4.588927,24.39604 5.112711,25.08842 4.937803,25.54606 5.386098,26.50912 5.043906,27.14294 5.204216,27.46342 5.016153)))
+MULTIPOLYGON(((50.544687 26.14707,50.588199 26.175003,50.644797 26.194206,50.632258 26.034066,50.594499 25.958531,50.537276 26.039707,50.541161 26.077232,50.544687 26.14707)))
diff --git a/src/boost/libs/geometry/example/ml01_multipolygon_simplify.cpp b/src/boost/libs/geometry/example/ml01_multipolygon_simplify.cpp
new file mode 100644
index 000000000..f9b329371
--- /dev/null
+++ b/src/boost/libs/geometry/example/ml01_multipolygon_simplify.cpp
@@ -0,0 +1,67 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Multipolygon DP simplification example from the mailing list discussion
+// about the DP algorithm issue:
+// http://lists.osgeo.org/pipermail/ggl/2011-September/001533.html
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+#include <boost/foreach.hpp>
+
+int main()
+{
+ typedef boost::geometry::model::d2::point_xy<double> point_xy;
+ typedef boost::geometry::model::polygon<point_xy > polygon;
+ typedef boost::geometry::model::ring<point_xy > ring;
+ typedef boost::geometry::model::multi_polygon<polygon > multi_polygon;
+
+ multi_polygon original_1;
+ multi_polygon simplified_1;
+
+ // Values between 0..1 and simplified with 1/2048
+ boost::geometry::read_wkt("MULTIPOLYGON(((0.561648 1,1 1,1 0,0.468083 0,0.52758 0.00800554,0.599683 0.0280924,0.601611 0.265374,0.622693 0.316765,0.69507 0.357497,0.695623 0.429711,0.655111 0.502298,0.696467 0.543147,0.840712 0.593546,0.882583 0.66546,0.852357 0.748213,0.84264 0.789567,0.832667 0.841202,0.832667 0.841202,0.740538 0.873004,0.617349 0.905045,0.566576 0.977697,0.561648 1)),((0 0.801979,0.0308575 0.786234,0.0705513 0.631135,0.141616 0.527248,0.233985 0.505872,0.264777 0.526263,0.336631 0.505009,0.356603 0.422321,0.355803 0.350038,0.375252 0.205364,0.415206 0.0709182,0.45479 0,0 0,0 0,0 0.801979)))", original_1);
+
+ std::cout << "Original: \n" << boost::geometry::num_points(original_1) << " points.\n\n";
+
+ boost::geometry::simplify(original_1, simplified_1, 1.0 / 2048.0);
+
+ std::cout << "Polygon with values 0..1 and simplified with 1.0 / 2048.0 \n"
+ << "Result: \n" << boost::geometry::wkt(simplified_1) << "\n" << boost::geometry::num_points(simplified_1) << " points.\n\n";
+
+ // Multiply every points from original_1 by 2047
+ multi_polygon original_2(original_1);
+ BOOST_FOREACH(polygon& p, original_2)
+ {
+ BOOST_FOREACH(point_xy& pt, p.outer())
+ {
+ pt.x(pt.x() * 2047.0);
+ pt.y(pt.y() * 2047.0);
+ }
+
+ BOOST_FOREACH(ring& r, p.inners())
+ {
+ BOOST_FOREACH(point_xy& pt, r)
+ {
+ pt.x(pt.x() * 2047.0);
+ pt.y(pt.y() * 2047.0);
+ }
+ }
+ }
+
+ multi_polygon simplified_2;
+ boost::geometry::simplify(original_2, simplified_2, 1.0);
+ std::cout << "Same values but multiplied by 2047.0 and simplified with 1.0\n"
+ << "Result: \n" << boost::geometry::wkt(simplified_2) << "\n" << boost::geometry::num_points(simplified_2) << " points.\n";
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/example/ml02_distance_strategy.cpp b/src/boost/libs/geometry/example/ml02_distance_strategy.cpp
new file mode 100644
index 000000000..1e2989016
--- /dev/null
+++ b/src/boost/libs/geometry/example/ml02_distance_strategy.cpp
@@ -0,0 +1,36 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Multipolygon DP simplification example from the mailing list discussion
+// about the DP algorithm issue:
+// http://lists.osgeo.org/pipermail/ggl/2011-September/001533.html
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+using namespace boost::geometry;
+
+int main()
+{
+ typedef model::d2::point_xy<double> point_xy;
+
+ point_xy p1(0.0, 0.0);
+ point_xy p2(5.0, 0.0);
+
+ // 1) This is direct call to Pythagoras algo
+ typedef strategy::distance::pythagoras<point_xy, point_xy, double> strategy1_type;
+ strategy1_type strategy1;
+ strategy1_type ::calculation_type d1 = strategy1.apply(p1, p2);
+
+ // 2) This is what is effectively called by simplify
+ typedef strategy::distance::comparable::pythagoras<point_xy, point_xy, double> strategy2_type;
+ strategy2_type strategy2;
+ strategy2_type::calculation_type d2 = strategy2.apply(p1, p2);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/ml03_distance_formula.cpp b/src/boost/libs/geometry/example/ml03_distance_formula.cpp
new file mode 100644
index 000000000..6ddd9fc42
--- /dev/null
+++ b/src/boost/libs/geometry/example/ml03_distance_formula.cpp
@@ -0,0 +1,37 @@
+// Boost.Geometry
+
+// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
+
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Formula example - Show how to use Karney's direct method.
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/formulas/karney_direct.hpp>
+
+using namespace boost::geometry;
+
+int main()
+{
+ double lon1_deg = 0.;
+ double lat1_deg = 73.114273316483;
+ double distance_m = 19992866.6147806;
+ double azi12_deg = 78.154765899661;
+
+ // Create an alias of the formula.
+ typedef formula::karney_direct<double, true, true, true, true, 8> karney_direct;
+
+ // Structure to hold the resulting values.
+ formula::result_direct<double> result;
+
+ // WGS-84 spheroid.
+ srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ result = karney_direct::apply(lon1_deg, lat1_deg, distance_m, azi12_deg, spheroid);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt b/src/boost/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt
new file mode 100644
index 000000000..93d331a30
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt
@@ -0,0 +1,20 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+
+Download gd from
+http://www.libgd.org/
+(currently from: https://bitbucket.org/pierrejoye/gd-libgd/downloads)
+
+and extract to this folder.
+(currently: extract from ../src/ into this folder)
+
+Nothing has to be installed.
+
+This is used in x02_gd_example.cpp
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/contrib/shapelib-1.3.0b2/boost_geometry_readme.txt b/src/boost/libs/geometry/example/with_external_libs/contrib/shapelib-1.3.0b2/boost_geometry_readme.txt
new file mode 100644
index 000000000..19426e75f
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/contrib/shapelib-1.3.0b2/boost_geometry_readme.txt
@@ -0,0 +1,24 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) test file
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+
+Download shapelib from
+http://shapelib.maptools.org/
+or http://download.osgeo.org/shapelib/
+
+and extract to this folder.
+
+
+Install at least the following files:
+- shpopen.c
+- shapefil.h
+- dbfopen.c
+
+For new shapelibs:
+- safileio.c
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/boost_geometry_readme.txt b/src/boost/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/boost_geometry_readme.txt
new file mode 100644
index 000000000..39470eb9d
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/boost_geometry_readme.txt
@@ -0,0 +1,18 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+
+Download soci from
+http://soci.sourceforge.net
+and extract to this folder.
+
+Nothing has to be installed.
+
+This is used in the examples x03_*_soci_example.cpp
+
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/x01_qt_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x01_qt_example.cpp
new file mode 100644
index 000000000..4ccade27a
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x01_qt_example.cpp
@@ -0,0 +1,81 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Qt Example
+
+// Qt is a well-known and often used platform independent windows library
+
+// To build and run this example:
+// 1) download (from http://qt.nokia.com), configure and make QT
+// 2) if necessary, adapt Qt clause in include path (note there is a Qt property sheet)
+
+#include <sstream>
+
+#include <QtGui>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+
+
+// Adapt a QPointF such that it can be handled by Boost.Geometry
+BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(QPointF, double, cs::cartesian, x, y, setX, setY)
+
+// Adapt a QPolygonF as well.
+// A QPolygonF has no holes (interiors) so it is similar to a Boost.Geometry ring
+BOOST_GEOMETRY_REGISTER_RING(QPolygonF)
+
+
+int main(int argc, char *argv[])
+{
+ // This usage QApplication and QLabel is adapted from
+ // http://en.wikipedia.org/wiki/Qt_(toolkit)#Qt_hello_world
+ QApplication app(argc, argv);
+
+ // Declare a Qt polygon. The Qt Polygon can be used
+ // in Boost.Geometry, just by its oneline registration above.
+ QPolygonF polygon;
+
+ // Use Qt to add points to polygon
+ polygon
+ << QPointF(10, 20) << QPointF(20, 30)
+ << QPointF(30, 20) << QPointF(20, 10)
+ << QPointF(10, 20);
+
+ // Use Boost.Geometry e.g. to calculate area
+ std::ostringstream out;
+ out << "Boost.Geometry area: " << boost::geometry::area(polygon) << std::endl;
+
+ // Some functionality is defined in both Qt and Boost.Geometry
+ QPointF p(20,20);
+ out << "Qt contains: "
+ << (polygon.containsPoint(p, Qt::WindingFill) ? "yes" : "no")
+ << std::endl
+ << "Boost.Geometry within: "
+ << (boost::geometry::within(p, polygon) ? "yes" : "no")
+ << std::endl;
+ // Detail: if point is ON boundary, Qt says yes, Boost.Geometry says no.
+
+ // Qt defines an iterator
+ // (which is required for of the Boost.Geometry ring-concept)
+ // such that Boost.Geometry can use the points of this polygon
+ QPolygonF::const_iterator it;
+ for (it = polygon.begin(); it != polygon.end(); ++it)
+ {
+ // Stream Delimiter-Separated, just to show something Boost.Geometry can do
+ out << boost::geometry::dsv(*it) << std::endl;
+ }
+
+ // Stream the polygon as well
+ out << boost::geometry::dsv(polygon) << std::endl;
+
+ // Just show what we did in a label
+ QLabel label(out.str().c_str());
+ label.show();
+ return app.exec();
+}
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/x02_gd_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x02_gd_example.cpp
new file mode 100644
index 000000000..dd2d8dd4a
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x02_gd_example.cpp
@@ -0,0 +1,144 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// GD example
+
+// GD is a well-known and often used graphic library to write GIF (and other formats)
+
+// To build and run this example:
+// 1) download GD from http://www.libgd.org (currently gd-2.0.35 is assumed)
+// 2) add 11 files
+// gd.c, gd_gd.c, gd_gif_out.c, gd_io*.c, gd_security.c, gd_topal.c, gdhelpers.c, gdtables.c
+// to the project or makefile or jamfile
+// 3) for windows, add define NONDLL to indicate GD is not used as a DLL
+// (Note that steps 2 and 3 are done in the MSVC gd_example project file and property sheets)
+
+#include <cmath>
+#include <cstdio>
+#include <vector>
+
+#include <fstream>
+#include <sstream>
+
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/extensions/gis/latlong/latlong.hpp>
+#include <boost/geometry/extensions/gis/geographic/strategies/area_huiller_earth.hpp>
+
+
+#include <gd.h>
+
+namespace bg = boost::geometry;
+
+
+// ----------------------------------------------------------------------------
+// Read an ASCII file containing WKT's
+// (note this function is shared by various examples)
+// ----------------------------------------------------------------------------
+template <typename Geometry>
+inline void read_wkt(std::string const& filename, std::vector<Geometry>& geometries)
+{
+ std::ifstream cpp_file(filename.c_str());
+ if (cpp_file.is_open())
+ {
+ while (! cpp_file.eof() )
+ {
+ std::string line;
+ std::getline(cpp_file, line);
+ if (! line.empty())
+ {
+ Geometry geometry;
+ bg::read_wkt(line, geometry);
+ geometries.push_back(geometry);
+ }
+ }
+ }
+}
+
+
+int main()
+{
+ // Adapt if necessary
+ std::string filename = "../data/world.wkt";
+
+
+ // The world is measured in latlong (degrees), so latlong is appropriate.
+ // We ignore holes in this sample (below)
+ typedef bg::model::ll::point<bg::degree> point_type;
+ typedef bg::model::polygon<point_type> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> country_type;
+
+ std::vector<country_type> countries;
+
+ // Read (for example) world countries
+ read_wkt(filename, countries);
+
+
+ // Create a GD image.
+ // A world map, as world.shp, is usually mapped in latitude-longitude (-180..180 and -90..90)
+ // For this example we use a very simple "transformation"
+ // mapping to 0..720 and 0..360
+ const double factor = 2.0;
+ gdImagePtr im = gdImageCreateTrueColor(int(360 * factor), int(180 * factor));
+
+ // Allocate three colors
+ int blue = gdImageColorResolve(im, 0, 52, 255);
+ int green = gdImageColorResolve(im, 0, 255, 0);
+ int black = gdImageColorResolve(im, 0, 0, 0);
+
+ // Paint background in blue
+ gdImageFilledRectangle(im, 0, 0, im->sx, im->sy, blue);
+
+ // Paint all countries in green
+ BOOST_FOREACH(country_type const& country, countries)
+ {
+ BOOST_FOREACH(polygon_type const& polygon, country)
+ {
+ // Ignore holes, so take only exterior ring
+ bg::model::ring<point_type> const& ring = bg::exterior_ring(polygon);
+
+ // If wished, suppress too small polygons.
+ // (Note that even in latlong, area is calculated in square meters)
+ double const a = bg::area(ring);
+ if (std::fabs(a) > 5000.0e6)
+ {
+ int const n = ring.size();
+ gdPoint* points = new gdPoint[n];
+
+ for (int i = 0; i < n; i++)
+ {
+ // Translate lon/lat or x/y to GD x/y points
+ points[i].x = int(factor * (bg::get<0>(ring[i]) + 180.0));
+ points[i].y = im->sy - int(factor * (bg::get<1>(ring[i]) + 90.0));
+ }
+
+ // Draw the polygon...
+ gdImageFilledPolygon(im, points, n, green);
+ // .. and the outline in black...
+ gdImagePolygon(im, points, n, black);
+
+ delete[] points;
+ }
+ }
+ }
+
+ // Use GD to create a GIF file
+ std::FILE* out = std::fopen("world.gif", "wb");
+ if (out != NULL)
+ {
+ gdImageGif(im, out);
+ std::fclose(out);
+ }
+
+ gdImageDestroy(im);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp
new file mode 100644
index 000000000..5b509057f
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp
@@ -0,0 +1,78 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// SOCI example
+
+// a: using boost::tuple to retrieve points
+
+// SOCI is a generic C++ template interface to access relational databases
+
+// To build and run this example:
+// 1) download SOCI from http://soci.sourceforge.net/
+// 2) put it in contrib/soci-3.0.0 (or another version/folder, but then update this VCPROJ)
+// 3) adapt your makefile or use this VCPROJ file
+// (note that SOCI sources are included directly, building SOCI is not necessary)
+// 4) load the demo-data, see script data/cities.sql (for PostgreSQL)
+
+#include <soci.h>
+#include <soci-postgresql.h>
+
+#include <boost/algorithm/string.hpp>
+#include <boost/optional.hpp>
+#include <boost/timer.hpp>
+#include <boost/random.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <iostream>
+#include <istream>
+#include <ostream>
+#include <sstream>
+#include <string>
+#include <exception>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
+
+
+int main()
+{
+ try
+ {
+ soci::session sql(soci::postgresql, "dbname=ggl user=ggl password=ggl");
+
+ int count;
+ sql << "select count(*) from cities", soci::into(count);
+ std::cout << "# Capitals: " << count << std::endl;
+
+ typedef std::vector<boost::tuple<double, double> > V;
+
+ soci::rowset<boost::tuple<double, double> > rows
+ = sql.prepare << "select x(location),y(location) from cities";
+ V vec;
+ std::copy(rows.begin(), rows.end(), std::back_inserter(vec));
+
+ for (V::const_iterator it = vec.begin(); it != vec.end(); ++it)
+ {
+ std::cout << it->get<0>() << " " << it->get<1>() << std::endl;
+ }
+ // Calculate distances
+ for (V::const_iterator it1 = vec.begin(); it1 != vec.end(); ++it1)
+ {
+ for (V::const_iterator it2 = vec.begin(); it2 != vec.end(); ++it2)
+ {
+ std::cout << boost::geometry::dsv(*it1) << " " << boost::geometry::distance(*it1, *it2) << std::endl;
+ }
+ }
+ }
+ catch (std::exception const &e)
+ {
+ std::cerr << "Error: " << e.what() << '\n';
+ }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/with_external_libs/x03_b_soci_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x03_b_soci_example.cpp
new file mode 100644
index 000000000..59eaf6d2f
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x03_b_soci_example.cpp
@@ -0,0 +1,100 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// SOCI example
+
+// b: using WKT to retrieve points
+
+// To build and run this example, see comments in example a
+
+#include <soci.h>
+#include <soci-postgresql.h>
+
+#include <boost/algorithm/string.hpp>
+#include <boost/optional.hpp>
+#include <boost/timer.hpp>
+#include <boost/random.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <iostream>
+#include <istream>
+#include <ostream>
+#include <sstream>
+#include <string>
+#include <exception>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+struct city
+{
+ boost::geometry::model::point<float, 2, boost::geometry::cs::geographic<boost::geometry::degree> > location;
+ std::string name;
+};
+
+namespace soci
+{
+ template <>
+ struct type_conversion<city>
+ {
+ typedef soci::values base_type;
+
+ static void from_base(const base_type& v, soci::indicator ind, city& value)
+ {
+ try
+ {
+ value.name = v.get<std::string>("name");
+ boost::geometry::read_wkt(v.get<std::string>("wkt"), value.location);
+ }
+ catch(const std::exception& e)
+ {
+ std::cout << e.what() << std::endl;
+ }
+ }
+
+ static void to_base(const city& value, base_type& v, soci::indicator& ind)
+ {
+ v.set("name", value.name);
+ std::ostringstream out;
+ out << boost::geometry::wkt(value.location);
+ v.set("wkt", out.str());
+ ind = i_ok;
+ }
+ };
+}
+
+int main()
+{
+ try
+ {
+ soci::session sql(soci::postgresql, "dbname=ggl user=ggl password=ggl");
+
+
+ typedef std::vector<city> V;
+
+ soci::rowset<city> rows = sql.prepare << "select name,astext(location) as wkt from cities";
+ V vec;
+ std::copy(rows.begin(), rows.end(), std::back_inserter(vec));
+
+ for (V::const_iterator it = vec.begin(); it != vec.end(); ++it)
+ {
+ static const double sqrkm = 1000.0 * 1000.0;
+ std::cout << it->name
+ << " " << boost::geometry::dsv(it->location)
+ //<< " " << boost::geometry::area(it->shape) / sqrkm << " km2"
+ << std::endl;
+ }
+ }
+ catch (std::exception const &e)
+ {
+ std::cerr << "Error: " << e.what() << '\n';
+ }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/with_external_libs/x03_c_soci_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x03_c_soci_example.cpp
new file mode 100644
index 000000000..d9739763f
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x03_c_soci_example.cpp
@@ -0,0 +1,118 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// SOCI example
+
+// c: using WKB to retrieve geometries
+
+// SOCI is a generic C++ template interface to access relational databases
+
+// To build and run this example, see comments in example a
+// Alternatively compile composing and executing compiler command directoy in examples directory,
+// for example using GCC compiler:
+// g++ -I../../../boost -I/home/mloskot/usr/include/soci \
+// -I /home/mloskot/usr/include/soci/postgresql -I/usr/include/postgresql \
+// -L/home/mloskot/usr/lib -lsoci_core-gcc-3_0 -lsoci_postgresql-gcc-3_0 x03_c_soci_example.cpp
+
+#include <soci.h>
+#include <soci-postgresql.h>
+
+#include <exception>
+#include <iostream>
+#include <iterator>
+#include <string>
+#include <vector>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/extensions/gis/io/wkb/read_wkb.hpp>
+#include <boost/geometry/extensions/gis/io/wkb/utility.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+// user-defined type with GGL geometry
+struct tree
+{
+ int id;
+ boost::geometry::model::point<float, 2, boost::geometry::cs::geographic<boost::geometry::degree> > location;
+};
+
+// conversion of row of result to user-defined type - performs WKB parsing
+namespace soci
+{
+ template <>
+ struct type_conversion<tree>
+ {
+ typedef soci::values base_type;
+
+ static void from_base(base_type const& v, soci::indicator ind, tree& value)
+ {
+ try
+ {
+ value.id = v.get<int>("id");
+
+ // intermediate step: hex-encoded binary string to raw WKB
+ std::string const& hex = v.get<std::string>("wkb");
+ std::vector<unsigned char> wkb;
+ if (!boost::geometry::hex2wkb(hex, std::back_inserter(wkb)))
+ throw std::runtime_error("hex2wkb translation failed");
+
+ // parse WKB and construct point geometry
+ if (!boost::geometry::read_wkb(wkb.begin(), wkb.end(), value.location))
+ throw std::runtime_error("read_wkb failed");
+ }
+ catch(const std::exception& e)
+ {
+ std::cout << e.what() << std::endl;
+ }
+ }
+
+ static void to_base(tree const& value, base_type& v, soci::indicator& ind)
+ {
+ throw std::runtime_error("todo: wkb writer not yet implemented");
+ }
+ };
+}
+
+int main()
+{
+ try
+ {
+ // establish database connection
+ soci::session sql(soci::postgresql, "dbname=ggl user=ggl password=ggl");
+
+ // construct schema of table for trees (point geometries)
+ sql << "DELETE FROM geometry_columns WHERE f_table_name = 'trees'";
+ sql << "DROP TABLE IF EXISTS trees CASCADE";
+ sql << "CREATE TABLE trees (id INTEGER)";
+ sql << "SELECT AddGeometryColumn('trees', 'geom', -1, 'POINT', 2)";
+
+ // insert sample data using plain WKT input
+ sql << "INSERT INTO trees VALUES(1, ST_GeomFromText('POINT(1.23 2.34)', -1))";
+ sql << "INSERT INTO trees VALUES(2, ST_GeomFromText('POINT(3.45 4.56)', -1))";
+ sql << "INSERT INTO trees VALUES(3, ST_GeomFromText('POINT(5.67 6.78)', -1))";
+ sql << "INSERT INTO trees VALUES(4, ST_GeomFromText('POINT(7.89 9.01)', -1))";
+
+ // query data in WKB form and read to geometry object
+ typedef std::vector<tree> trees_t;
+ soci::rowset<tree> rows = (sql.prepare << "SELECT id, encode(ST_AsBinary(geom), 'hex') AS wkb FROM trees");
+ trees_t trees;
+ std::copy(rows.begin(), rows.end(), std::back_inserter(trees));
+
+ // print trees output
+ for (trees_t::const_iterator it = trees.begin(); it != trees.end(); ++it)
+ {
+ std::cout << "Tree #" << it->id << " located at\t" << boost::geometry::wkt(it->location) << std::endl;
+ }
+ }
+ catch (std::exception const &e)
+ {
+ std::cerr << "Error: " << e.what() << '\n';
+ }
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp
new file mode 100644
index 000000000..26b59a72b
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp
@@ -0,0 +1,84 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// SOCI example
+
+// d: using WKB to retrieve geometries
+
+// SOCI is a generic C++ template interface to access relational databases
+
+// To build and run this example, see comments in example a
+// Alternatively compile composing and executing compiler command directoy in examples directory,
+// for example using GCC compiler:
+// g++ -I../../../boost -I/home/mloskot/usr/include/soci \
+// -I /home/mloskot/usr/include/soci/postgresql -I/usr/include/postgresql \
+// -L/home/mloskot/usr/lib -lsoci_core-gcc-3_0 -lsoci_postgresql-gcc-3_0 x03_c_soci_example.cpp
+
+#include <soci.h>
+#include <soci-postgresql.h>
+
+#include <exception>
+#include <iostream>
+#include <iterator>
+#include <string>
+#include <vector>
+
+#include <boost/geometry.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/extensions/gis/io/wkb/read_wkb.hpp>
+#include <boost/geometry/extensions/gis/io/wkb/utility.hpp>
+
+int main()
+{
+ try
+ {
+ // establish database connection
+ soci::session sql(soci::postgresql, "dbname=ggl user=ggl password=ggl");
+
+ // construct schema of table for trees (point geometries)
+ sql << "DELETE FROM geometry_columns WHERE f_table_name = 'parcels'";
+ sql << "DROP TABLE IF EXISTS parcels CASCADE";
+ sql << "CREATE TABLE parcels (id INTEGER)";
+ sql << "SELECT AddGeometryColumn('parcels', 'geom', -1, 'GEOMETRY', 2)";
+
+ // insert sample data using plain WKT input
+ sql << "INSERT INTO parcels VALUES(1, ST_GeomFromText('POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))', -1))";
+ sql << "INSERT INTO parcels VALUES(2, ST_GeomFromText('POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))', -1))";
+ sql << "INSERT INTO parcels VALUES(3, ST_GeomFromText('POLYGON((1 1,2 1,2 2,1 2,1 1))', -1))";
+
+ // query data in WKB form and read to geometry object
+ soci::rowset<std::string> rows = (sql.prepare << "SELECT encode(ST_AsBinary(geom), 'hex') AS wkb FROM parcels");
+
+ // calculate area of each parcel
+ for (soci::rowset<std::string>::iterator it = rows.begin(); it != rows.end(); ++it)
+ {
+ // parse WKB and construct geometry object
+ std::string const& hex = *it;
+ std::vector<unsigned char> wkb;
+ if (!boost::geometry::hex2wkb(*it, std::back_inserter(wkb)))
+ throw std::runtime_error("hex2wkb translation failed");
+
+ boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double> > parcel;
+ if (!boost::geometry::read_wkb(wkb.begin(), wkb.end(), parcel))
+ throw std::runtime_error("read_wkb failed");
+
+ double a = boost::geometry::area(parcel);
+ std::cout << "Parcel geometry: " << boost::geometry::wkt(parcel) << std::endl
+ << "\thas area is " << a << " in coordinate units" << std::endl;
+ }
+ }
+ catch (std::exception const &e)
+ {
+ std::cerr << "Error: " << e.what() << '\n';
+ }
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp b/src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp
new file mode 100644
index 000000000..49bf0878b
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp
@@ -0,0 +1,393 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// wxWidgets World Mapper example
+
+
+// #define EXAMPLE_WX_USE_GRAPHICS_CONTEXT 1
+
+#include <fstream>
+#include <sstream>
+
+#include <boost/foreach.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/scoped_array.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_geometries.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+#include <boost/geometry/extensions/algorithms/selected.hpp>
+
+
+// wxWidgets, if these headers are NOT found, adapt include path (and lib path)
+
+#include "wx/wx.h"
+#include "wx/math.h"
+#include "wx/stockitem.h"
+
+
+#ifdef EXAMPLE_WX_USE_GRAPHICS_CONTEXT
+#include "wx/graphics.h"
+#include "wx/dcgraph.h"
+#endif
+
+typedef boost::geometry::model::d2::point_xy<double> point_2d;
+typedef boost::geometry::model::multi_polygon
+ <
+ boost::geometry::model::polygon<point_2d>
+ > country_type;
+
+// Adapt wxWidgets points to Boost.Geometry points such that they can be used
+// in e.g. transformations (see below)
+BOOST_GEOMETRY_REGISTER_POINT_2D(wxPoint, int, cs::cartesian, x, y)
+BOOST_GEOMETRY_REGISTER_POINT_2D(wxRealPoint, double, cs::cartesian, x, y)
+
+
+// wxWidgets draws using wxPoint*, so we HAVE to use that.
+// Therefore have to make a wxPoint* array
+// 1) compatible with Boost.Geometry
+// 2) compatible with Boost.Range (required by Boost.Geometry)
+// 3) compatible with std::back_inserter (required by Boost.Geometry)
+
+// For compatible 2):
+typedef std::pair<wxPoint*,wxPoint*> wxPointPointerPair;
+
+// For compatible 1):
+BOOST_GEOMETRY_REGISTER_RING(wxPointPointerPair);
+
+
+// For compatible 3):
+// Specialize back_insert_iterator for the wxPointPointerPair
+// (has to be done within "namespace std")
+namespace std
+{
+
+template <>
+class back_insert_iterator<wxPointPointerPair>
+{
+public:
+ typedef std::output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ typedef wxPointPointerPair container_type;
+
+ explicit back_insert_iterator(wxPointPointerPair& x)
+ : current(boost::begin(x))
+ , end(boost::end(x))
+ {}
+
+ inline back_insert_iterator<wxPointPointerPair>&
+ operator=(wxPoint const& value)
+ {
+ // Check if not passed beyond
+ if (current != end)
+ {
+ *current++ = value;
+ }
+ return *this;
+ }
+
+ // Boiler-plate
+ inline back_insert_iterator<wxPointPointerPair>& operator*() { return *this; }
+ inline back_insert_iterator<wxPointPointerPair>& operator++() { return *this; }
+ inline back_insert_iterator<wxPointPointerPair>& operator++(int) { return *this; }
+
+private:
+ boost::range_iterator<wxPointPointerPair>::type current, end;
+};
+
+} // namespace std
+
+
+// ----------------------------------------------------------------------------
+// Read an ASCII file containing WKT's
+// ----------------------------------------------------------------------------
+template <typename Geometry, typename Box>
+inline void read_wkt(std::string const& filename, std::vector<Geometry>& geometries, Box& box)
+{
+ std::ifstream cpp_file(filename.c_str());
+ if (cpp_file.is_open())
+ {
+ while (! cpp_file.eof() )
+ {
+ std::string line;
+ std::getline(cpp_file, line);
+ if (! line.empty())
+ {
+ Geometry geometry;
+ boost::geometry::read_wkt(line, geometry);
+ geometries.push_back(geometry);
+ boost::geometry::expand(box, boost::geometry::return_envelope<Box>(geometry));
+ }
+ }
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+class HelloWorldFrame: public wxFrame
+{
+public:
+ HelloWorldFrame(wxFrame *frame, wxString const& title, wxPoint const& pos, wxSize const& size);
+
+ void OnCloseWindow(wxCloseEvent& );
+ void OnExit(wxCommandEvent& );
+
+ DECLARE_EVENT_TABLE()
+};
+
+
+// ----------------------------------------------------------------------------
+class HelloWorldCanvas: public wxWindow
+{
+public:
+ HelloWorldCanvas(wxFrame *frame);
+
+private:
+ void DrawCountries(wxDC& dc);
+ void DrawCountry(wxDC& dc, country_type const& country);
+
+ void OnPaint(wxPaintEvent& );
+ void OnMouseMove(wxMouseEvent&);
+
+ typedef boost::geometry::strategy::transform::map_transformer
+ <
+ double, 2, 2,
+ true, true
+ > map_transformer_type;
+
+ typedef boost::geometry::strategy::transform::inverse_transformer
+ <
+ double, 2, 2
+ > inverse_transformer_type;
+
+ boost::shared_ptr<map_transformer_type> m_map_transformer;
+ boost::shared_ptr<inverse_transformer_type> m_inverse_transformer;
+
+ boost::geometry::model::box<point_2d> m_box;
+ std::vector<country_type> m_countries;
+ int m_focus;
+
+ wxBrush m_orange;
+ wxFrame* m_owner;
+
+DECLARE_EVENT_TABLE()
+};
+
+
+
+// ----------------------------------------------------------------------------
+class HelloWorldApp: public wxApp
+{
+public:
+ bool OnInit()
+ {
+ // Create the main frame window
+ HelloWorldFrame *frame = new HelloWorldFrame(NULL, _T("Boost.Geometry for wxWidgets - Hello World!"), wxDefaultPosition, wxSize(640, 480));
+
+ wxMenu *file_menu = new wxMenu;
+ file_menu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT));
+ wxMenuBar* menuBar = new wxMenuBar;
+ menuBar->Append(file_menu, _T("&File"));
+ frame->SetMenuBar(menuBar);
+
+ int width, height;
+ frame->GetClientSize(&width, &height);
+
+ (void) new HelloWorldCanvas(frame);
+
+ // Show the frame
+ frame->Show(true);
+
+ return true;
+ }
+};
+
+
+
+// ----------------------------------------------------------------------------
+HelloWorldFrame::HelloWorldFrame(wxFrame *frame, wxString const& title, wxPoint const& pos, wxSize const& size)
+ : wxFrame(frame, wxID_ANY, title, pos, size, wxDEFAULT_FRAME_STYLE | wxFULL_REPAINT_ON_RESIZE )
+{
+ CreateStatusBar(2);
+}
+
+
+void HelloWorldFrame::OnExit(wxCommandEvent& )
+{
+ this->Destroy();
+}
+
+void HelloWorldFrame::OnCloseWindow(wxCloseEvent& )
+{
+ static bool destroyed = false;
+ if (! destroyed)
+ {
+ this->Destroy();
+ destroyed = true;
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+HelloWorldCanvas::HelloWorldCanvas(wxFrame *frame)
+ : wxWindow(frame, wxID_ANY)
+ , m_owner(frame)
+ , m_focus(-1)
+{
+ boost::geometry::assign_inverse(m_box);
+ read_wkt("../data/world.wkt", m_countries, m_box);
+ m_orange = wxBrush(wxColour(255, 128, 0), wxSOLID);
+}
+
+
+
+void HelloWorldCanvas::OnMouseMove(wxMouseEvent &event)
+{
+ namespace bg = boost::geometry;
+
+ if (m_inverse_transformer)
+ {
+ // Boiler-plate wxWidgets code
+ wxClientDC dc(this);
+ PrepareDC(dc);
+ m_owner->PrepareDC(dc);
+
+ // Transform the point to Lon/Lat
+ point_2d point;
+ bg::transform(event.GetPosition(), point, *m_inverse_transformer);
+
+ // Determine selected object
+ int i = 0;
+ int previous_focus = m_focus;
+ m_focus = -1;
+ BOOST_FOREACH(country_type const& country, m_countries)
+ {
+ if (bg::selected(country, point, 0))
+ {
+ m_focus = i;
+ }
+ i++;
+ }
+
+ // On change:
+ if (m_focus != previous_focus)
+ {
+ // Undraw old focus
+ if (previous_focus >= 0)
+ {
+ dc.SetBrush(*wxWHITE_BRUSH);
+ DrawCountry(dc, m_countries[previous_focus]);
+ }
+ // Draw new focus
+ if (m_focus >= 0)
+ {
+ dc.SetBrush(m_orange);
+ DrawCountry(dc, m_countries[m_focus]);
+ }
+ }
+
+ // Create a string and set it in the status text
+ std::ostringstream out;
+ out << "Position: " << point.x() << ", " << point.y();
+ m_owner->SetStatusText(wxString(out.str().c_str(), wxConvUTF8));
+ }
+}
+
+
+
+void HelloWorldCanvas::OnPaint(wxPaintEvent& )
+{
+#if defined(EXAMPLE_WX_USE_GRAPHICS_CONTEXT)
+ wxPaintDC pdc(this);
+ wxGCDC gdc(pdc);
+ wxDC& dc = (wxDC&) gdc;
+#else
+ wxPaintDC dc(this);
+#endif
+
+ PrepareDC(dc);
+
+ static bool running = false;
+ if (! running)
+ {
+ running = true;
+
+ // Update the transformers
+ wxSize sz = dc.GetSize();
+ m_map_transformer.reset(new map_transformer_type(m_box, sz.x, sz.y));
+ m_inverse_transformer.reset(new inverse_transformer_type(*m_map_transformer));
+
+ DrawCountries(dc);
+
+ running = false;
+ }
+}
+
+
+void HelloWorldCanvas::DrawCountries(wxDC& dc)
+{
+ namespace bg = boost::geometry;
+
+ dc.SetBackground(*wxLIGHT_GREY_BRUSH);
+ dc.Clear();
+
+ BOOST_FOREACH(country_type const& country, m_countries)
+ {
+ DrawCountry(dc, country);
+ }
+ if (m_focus != -1)
+ {
+ dc.SetBrush(m_orange);
+ DrawCountry(dc, m_countries[m_focus]);
+ }
+}
+
+
+void HelloWorldCanvas::DrawCountry(wxDC& dc, country_type const& country)
+{
+ namespace bg = boost::geometry;
+
+ BOOST_FOREACH(bg::model::polygon<point_2d> const& poly, country)
+ {
+ // Use only exterior ring, holes are (for the moment) ignored. This would need
+ // a holey-polygon compatible wx object
+
+ std::size_t n = boost::size(bg::exterior_ring(poly));
+
+ boost::scoped_array<wxPoint> points(new wxPoint[n]);
+
+ wxPointPointerPair pair = std::make_pair(points.get(), points.get() + n);
+ bg::transform(bg::exterior_ring(poly), pair, *m_map_transformer);
+
+ dc.DrawPolygon(n, points.get());
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+
+BEGIN_EVENT_TABLE(HelloWorldFrame, wxFrame)
+ EVT_CLOSE(HelloWorldFrame::OnCloseWindow)
+ EVT_MENU(wxID_EXIT, HelloWorldFrame::OnExit)
+END_EVENT_TABLE()
+
+
+BEGIN_EVENT_TABLE(HelloWorldCanvas, wxWindow)
+ EVT_PAINT(HelloWorldCanvas::OnPaint)
+ EVT_MOTION(HelloWorldCanvas::OnMouseMove)
+END_EVENT_TABLE()
+
+
+IMPLEMENT_APP(HelloWorldApp)
diff --git a/src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper_readme.txt b/src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper_readme.txt
new file mode 100644
index 000000000..cba0c8eeb
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper_readme.txt
@@ -0,0 +1,23 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+
+wxWidgets World Mapper example
+
+It will show a basic wxWidgets window, displaying world countries, highlighting the country under
+the mouse, and indicating position of the mouse in latitude/longitude and in pixels.
+
+
+To compile this program:
+
+Install wxWidgets (if not done before)
+
+Using Linux/gcc
+ - check if installation is OK, http://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu
+ - compile using e.g. gcc -o x04_wxwidgets -I../../../.. x04_wxwidgets_world_mapper.cpp `wx-config --cxxflags` `wx-config --libs`
+
diff --git a/src/boost/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp b/src/boost/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp
new file mode 100644
index 000000000..d9fd73115
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp
@@ -0,0 +1,118 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// SHAPELIB example
+
+// Shapelib is a well-known and often used library to read (and write) shapefiles by Frank Warmerdam
+
+// To build and run this example:
+// 1) download shapelib from http://shapelib.maptools.org/
+// 2) extract and put the source "shpopen.cpp" in project or makefile
+// 3) download a shapefile, for example world countries from http://aprsworld.net/gisdata/world
+// Alternativelly, install Shapelib using OSGeo4W installer from http://trac.osgeo.org/osgeo4w/
+// that provides Windows binary packages
+
+#include "shapefil.h"
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+using namespace boost::geometry;
+
+template <typename T, typename F>
+void read_shapefile(const std::string& filename, std::vector<T>& polygons, F functor)
+{
+ try
+ {
+ SHPHandle handle = SHPOpen(filename.c_str(), "rb");
+ if (handle <= 0)
+ {
+ throw std::string("File " + filename + " not found");
+ }
+
+ int nShapeType, nEntities;
+ double adfMinBound[4], adfMaxBound[4];
+ SHPGetInfo(handle, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+
+ for (int i = 0; i < nEntities; i++)
+ {
+ SHPObject* psShape = SHPReadObject(handle, i );
+
+ // Read only polygons, and only those without holes
+ if (psShape->nSHPType == SHPT_POLYGON && psShape->nParts == 1)
+ {
+ T polygon;
+ functor(psShape, polygon);
+ polygons.push_back(polygon);
+ }
+ SHPDestroyObject( psShape );
+ }
+ SHPClose(handle);
+ }
+ catch(const std::string& s)
+ {
+ throw s;
+ }
+ catch(...)
+ {
+ throw std::string("Other exception");
+ }
+}
+
+
+template <typename T>
+void convert(SHPObject* psShape, T& polygon)
+{
+ double* x = psShape->padfX;
+ double* y = psShape->padfY;
+ for (int v = 0; v < psShape->nVertices; v++)
+ {
+ typename point_type<T>::type point;
+ assign_values(point, x[v], y[v]);
+ append(polygon, point);
+ }
+}
+
+
+int main()
+{
+ std::string filename = "c:/data/spatial/shape/world_free/world.shp";
+
+ typedef model::polygon<model::d2::point_xy<double> > polygon_2d;
+ std::vector<polygon_2d> polygons;
+
+ try
+ {
+ read_shapefile(filename, polygons, convert<polygon_2d>);
+ }
+ catch(const std::string& s)
+ {
+ std::cout << s << std::endl;
+ return 1;
+ }
+
+ // Do something with the polygons, for example simplify them
+ for (std::vector<polygon_2d>::iterator it = polygons.begin(); it != polygons.end(); it++)
+ {
+ polygon_2d p;
+ simplify(*it, p, 0.01);
+ std::cout << it->outer().size() << "," << p.outer().size() << std::endl;
+ *it = p;
+ }
+ std::cout << "Simplified " << polygons.size() << std::endl;
+
+ double sum = 0;
+ for (std::vector<polygon_2d>::const_iterator it = polygons.begin(); it != polygons.end(); it++)
+ {
+ sum += area(*it);
+ }
+ std::cout << "Total area of " << polygons.size() << " polygons, total: " << sum << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp b/src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp
new file mode 100644
index 000000000..67bd9067c
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp
@@ -0,0 +1,162 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Qt World Mapper Example
+
+// Qt is a well-known and often used platform independent windows library
+
+// To build and run this example:
+// 1) download (from http://qt.nokia.com), configure and make QT
+// 2) if necessary, adapt Qt clause in include path (note there is a Qt property sheet)
+
+#include <fstream>
+
+#include <QtGui>
+#include <QWidget>
+#include <QObject>
+#include <QPainter>
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/geometry.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/multi_geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/ring.hpp>
+
+#include <boost/geometry/extensions/algorithms/selected.hpp>
+
+
+
+// Adapt a QPointF such that it can be handled by Boost.Geometry
+BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(QPointF, double, cs::cartesian, x, y, setX, setY)
+
+// Adapt a QPolygonF as well.
+// A QPolygonF has no holes (interiors) so it is similar to a Boost.Geometry ring
+BOOST_GEOMETRY_REGISTER_RING(QPolygonF)
+
+
+typedef boost::geometry::model::d2::point_xy<double> point_2d;
+typedef boost::geometry::model::multi_polygon
+ <
+ boost::geometry::model::polygon<point_2d>
+ > country_type;
+
+
+class WorldMapper : public QWidget
+{
+ public:
+ WorldMapper(std::vector<country_type> const& countries, boost::geometry::model::box<point_2d> const& box)
+ : m_countries(countries)
+ , m_box(box)
+ {
+ setPalette(QPalette(QColor(200, 250, 250)));
+ setAutoFillBackground(true);
+ }
+
+ protected:
+ void paintEvent(QPaintEvent*)
+ {
+ map_transformer_type transformer(m_box, this->width(), this->height());
+
+ QPainter painter(this);
+ painter.setBrush(Qt::green);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ BOOST_FOREACH(country_type const& country, m_countries)
+ {
+ typedef boost::range_value<country_type>::type polygon_type;
+ BOOST_FOREACH(polygon_type const& polygon, country)
+ {
+ typedef boost::geometry::ring_type<polygon_type>::type ring_type;
+ ring_type const& ring = boost::geometry::exterior_ring(polygon);
+
+ // This is the essention:
+ // Directly transform from a multi_polygon (ring-type) to a QPolygonF
+ QPolygonF qring;
+ boost::geometry::transform(ring, qring, transformer);
+
+ painter.drawPolygon(qring);
+ }
+ }
+ }
+
+ private:
+ typedef boost::geometry::strategy::transform::map_transformer
+ <
+ double, 2, 2,
+ true, true
+ > map_transformer_type;
+
+ std::vector<country_type> const& m_countries;
+ boost::geometry::model::box<point_2d> const& m_box;
+ };
+
+
+class MapperWidget : public QWidget
+{
+ public:
+ MapperWidget(std::vector<country_type> const& countries, boost::geometry::model::box<point_2d> const& box, QWidget *parent = 0)
+ : QWidget(parent)
+ {
+ WorldMapper* mapper = new WorldMapper(countries, box);
+
+ QPushButton *quit = new QPushButton(tr("Quit"));
+ quit->setFont(QFont("Times", 18, QFont::Bold));
+ connect(quit, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(mapper);
+ layout->addWidget(quit);
+ setLayout(layout);
+ }
+
+};
+
+
+// ----------------------------------------------------------------------------
+// Read an ASCII file containing WKT's
+// ----------------------------------------------------------------------------
+template <typename Geometry, typename Box>
+inline void read_wkt(std::string const& filename, std::vector<Geometry>& geometries, Box& box)
+{
+ std::ifstream cpp_file(filename.c_str());
+ if (cpp_file.is_open())
+ {
+ while (! cpp_file.eof() )
+ {
+ std::string line;
+ std::getline(cpp_file, line);
+ if (! line.empty())
+ {
+ Geometry geometry;
+ boost::geometry::read_wkt(line, geometry);
+ geometries.push_back(geometry);
+ boost::geometry::expand(box, boost::geometry::return_envelope<Box>(geometry));
+ }
+ }
+ }
+}
+
+
+int main(int argc, char *argv[])
+{
+ std::vector<country_type> countries;
+ boost::geometry::model::box<point_2d> box;
+ boost::geometry::assign_inverse(box);
+ read_wkt("../data/world.wkt", countries, box);
+
+ QApplication app(argc, argv);
+ MapperWidget widget(countries, box);
+ widget.setWindowTitle("Boost.Geometry for Qt - Hello World!");
+ widget.setGeometry(50, 50, 800, 500);
+ widget.show();
+ return app.exec();
+}
diff --git a/src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper_readme.txt b/src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper_readme.txt
new file mode 100644
index 000000000..131bcca21
--- /dev/null
+++ b/src/boost/libs/geometry/example/with_external_libs/x06_qt_world_mapper_readme.txt
@@ -0,0 +1,23 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+Qt World Mapper example
+
+It will show a basic Qt Widget, displaying world countries
+
+To compile this program:
+
+Install Qt (if not done before)
+
+Using Linux/gcc
+ - install Qt with sudo apt-get install libqt4-dev
+ - run qmake -project
+ - edit the generated file "with_external_libs.pro" and delete all lines but the x06_qt_world_mapper.cpp
+ - run qmake
+ - edit the generated Makefile, if necessary, and add -I../../../.. to include Boost and Boost.Geometry
+ - run make
+
diff --git a/src/boost/libs/geometry/index.html b/src/boost/libs/geometry/index.html
new file mode 100644
index 000000000..0942ef1ee
--- /dev/null
+++ b/src/boost/libs/geometry/index.html
@@ -0,0 +1,16 @@
+
+<!--
+Copyright 2010 Barend Gehrels.
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<html>
+<head>
+ <meta http-equiv="refresh" content="0; URL=doc/html/index.html">
+</head>
+<body>
+Automatic redirection failed, please go to
+<a href="doc/html/index.html">doc/html/index.html</a>
+</body>
+</html>
diff --git a/src/boost/libs/geometry/index/Jamfile b/src/boost/libs/geometry/index/Jamfile
new file mode 100644
index 000000000..3675b7f06
--- /dev/null
+++ b/src/boost/libs/geometry/index/Jamfile
@@ -0,0 +1,18 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+project boost-geometry-index
+ :
+ requirements
+ <toolset>msvc:<asynch-exceptions>on
+ ;
+
+build-project test ;
+build-project example ;
diff --git a/src/boost/libs/geometry/index/example/3d_benchmark.cpp b/src/boost/libs/geometry/index/example/3d_benchmark.cpp
new file mode 100644
index 000000000..251817681
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/3d_benchmark.cpp
@@ -0,0 +1,161 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/chrono.hpp>
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+
+int main()
+{
+ namespace bg = boost::geometry;
+ namespace bgi = bg::index;
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+ size_t values_count = 500000;
+ size_t queries_count = 200000;
+
+ std::vector< boost::tuple<float, float, float> > coords;
+
+ //randomize values
+ {
+ boost::mt19937 rng;
+ //rng.seed(static_cast<unsigned int>(std::time(0)));
+ float max_val = static_cast<float>(values_count / 2);
+ boost::uniform_real<float> range(-max_val, max_val);
+ boost::variate_generator<boost::mt19937&, boost::uniform_real<float> > rnd(rng, range);
+
+ coords.reserve(values_count);
+
+ std::cout << "randomizing data\n";
+ for ( size_t i = 0 ; i < values_count ; ++i )
+ {
+ coords.push_back(boost::make_tuple(rnd(), rnd(), rnd()));
+ }
+ std::cout << "randomized\n";
+ }
+
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P;
+ typedef bg::model::box<P> B;
+ //typedef bgi::rtree<B, bgi::linear<32, 8> > RT;
+ //typedef bgi::rtree<B, bgi::quadratic<32, 8> > RT;
+ typedef bgi::rtree<B, bgi::rstar<8, 3> > RT;
+
+ std::cout << "sizeof rtree: " << sizeof(RT) << std::endl;
+
+ for (;;)
+ {
+ RT t;
+
+ // inserting test
+ {
+ clock_t::time_point start = clock_t::now();
+ for (size_t i = 0 ; i < values_count ; ++i )
+ {
+ float x = boost::get<0>(coords[i]);
+ float y = boost::get<1>(coords[i]);
+ float z = boost::get<2>(coords[i]);
+ B b(P(x - 0.5f, y - 0.5f, z - 0.5f), P(x + 0.5f, y + 0.5f, z + 0.5f));
+
+ t.insert(b);
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - insert " << values_count << '\n';
+ }
+
+ std::vector<B> result;
+ result.reserve(100);
+ B result_one;
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = boost::get<0>(coords[i]);
+ float y = boost::get<1>(coords[i]);
+ float z = boost::get<2>(coords[i]);
+ result.clear();
+ t.query(bgi::intersects(B(P(x - 10, y - 10, z - 10), P(x + 10, y + 10, z + 10))), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(B) " << queries_count << " found " << temp << '\n';
+ }
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count / 2 ; ++i )
+ {
+ float x1 = boost::get<0>(coords[i]);
+ float y1 = boost::get<1>(coords[i]);
+ float z1 = boost::get<2>(coords[i]);
+ float x2 = boost::get<0>(coords[i+1]);
+ float y2 = boost::get<1>(coords[i+1]);
+ float z2 = boost::get<2>(coords[i+1]);
+ float x3 = boost::get<0>(coords[i+2]);
+ float y3 = boost::get<1>(coords[i+2]);
+ float z3 = boost::get<2>(coords[i+2]);
+ result.clear();
+ t.query(
+ bgi::intersects(B(P(x1 - 10, y1 - 10, z1 - 10), P(x1 + 10, y1 + 10, z1 + 10)))
+ &&
+ !bgi::within(B(P(x2 - 10, y2 - 10, z2 - 10), P(x2 + 10, y2 + 10, z2 + 10)))
+ &&
+ !bgi::overlaps(B(P(x3 - 10, y3 - 10, z3 - 10), P(x3 + 10, y3 + 10, z3 + 10)))
+ ,
+ std::back_inserter(result)
+ );
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(i && !w && !o) " << queries_count << " found " << temp << '\n';
+ }
+
+ result.clear();
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count / 10 ; ++i )
+ {
+ float x = boost::get<0>(coords[i]) - 100;
+ float y = boost::get<1>(coords[i]) - 100;
+ float z = boost::get<2>(coords[i]) - 100;
+ result.clear();
+ temp += t.query(bgi::nearest(P(x, y, z), 5), std::back_inserter(result));
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(nearest(P, 5)) " << (queries_count / 10) << " found " << temp << '\n';
+ }
+
+ {
+ clock_t::time_point start = clock_t::now();
+ for (size_t i = 0 ; i < values_count / 10 ; ++i )
+ {
+ float x = boost::get<0>(coords[i]);
+ float y = boost::get<1>(coords[i]);
+ float z = boost::get<2>(coords[i]);
+ B b(P(x - 0.5f, y - 0.5f, z - 0.5f), P(x + 0.5f, y + 0.5f, z + 0.5f));
+
+ t.remove(b);
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - remove " << values_count / 10 << '\n';
+ }
+
+ std::cout << "------------------------------------------------\n";
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/Jamfile b/src/boost/libs/geometry/index/example/Jamfile
new file mode 100644
index 000000000..5cfa81a0c
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/Jamfile
@@ -0,0 +1,55 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2013 Mateusz Loskot, London, UK.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Usage:
+# Build as optimised for proper benchmarking:
+# b2 variant=release threading=multi
+# b2 variant=release threading=multi link=static runtime-link=static
+#
+# Set GLUT_ROOT to installation prefix of GLUT or, for Windows,
+# it may be all-in-one directory with GLUT header and binaries.
+
+import os ;
+
+project boost-geometry-index-example
+ : requirements
+ <implicit-dependency>/boost//headers
+ ;
+
+local GLUT_ROOT = [ os.environ GLUT_ROOT ] ;
+if $(GLUT_ROOT)
+{
+ local glut_name = glut ;
+ if [ os.name ] = NT
+ {
+ glut_name = glut32 ;
+ }
+
+ lib glut
+ :
+ :
+ <name>$(glut_name)
+ <search>$(GLUT_ROOT)
+ <search>$(GLUT_ROOT)/lib
+ :
+ :
+ <include>$(GLUT_ROOT)
+ <include>$(GLUT_ROOT)/include
+ ;
+}
+
+exe random_test : random_test.cpp ;
+link serialize.cpp /boost//serialization : ;
+link benchmark.cpp /boost//chrono : <threading>multi ;
+link benchmark2.cpp /boost//chrono : <threading>multi ;
+link benchmark3.cpp /boost//chrono : <threading>multi ;
+link benchmark_experimental.cpp /boost//chrono : <threading>multi ;
+if $(GLUT_ROOT)
+{
+ link glut_vis.cpp glut ;
+}
diff --git a/src/boost/libs/geometry/index/example/benchmark.cpp b/src/boost/libs/geometry/index/example/benchmark.cpp
new file mode 100644
index 000000000..ba2a1dec9
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/benchmark.cpp
@@ -0,0 +1,158 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/chrono.hpp>
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+
+int main()
+{
+ namespace bg = boost::geometry;
+ namespace bgi = bg::index;
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+ size_t values_count = 1000000;
+ size_t queries_count = 100000;
+ size_t nearest_queries_count = 10000;
+ unsigned neighbours_count = 10;
+
+ std::vector< std::pair<float, float> > coords;
+
+ //randomize values
+ {
+ boost::mt19937 rng;
+ //rng.seed(static_cast<unsigned int>(std::time(0)));
+ float max_val = static_cast<float>(values_count / 2);
+ boost::uniform_real<float> range(-max_val, max_val);
+ boost::variate_generator<boost::mt19937&, boost::uniform_real<float> > rnd(rng, range);
+
+ coords.reserve(values_count);
+
+ std::cout << "randomizing data\n";
+ for ( size_t i = 0 ; i < values_count ; ++i )
+ {
+ coords.push_back(std::make_pair(rnd(), rnd()));
+ }
+ std::cout << "randomized\n";
+ }
+
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+ typedef bg::model::box<P> B;
+ typedef bgi::rtree<B, bgi::linear<16, 4> > RT;
+ //typedef bgi::rtree<B, bgi::quadratic<8, 3> > RT;
+ //typedef bgi::rtree<B, bgi::rstar<8, 3> > RT;
+
+ std::cout << "sizeof rtree: " << sizeof(RT) << std::endl;
+
+ for (;;)
+ {
+ RT t;
+
+ // inserting test
+ {
+ clock_t::time_point start = clock_t::now();
+ for (size_t i = 0 ; i < values_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ B b(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f));
+
+ t.insert(b);
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - insert " << values_count << '\n';
+ }
+
+ std::vector<B> result;
+ result.reserve(100);
+ B result_one;
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ t.query(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(B) " << queries_count << " found " << temp << '\n';
+ }
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count / 2 ; ++i )
+ {
+ float x1 = coords[i].first;
+ float y1 = coords[i].second;
+ float x2 = coords[i+1].first;
+ float y2 = coords[i+1].second;
+ float x3 = coords[i+2].first;
+ float y3 = coords[i+2].second;
+ result.clear();
+ t.query(
+ bgi::intersects(B(P(x1 - 10, y1 - 10), P(x1 + 10, y1 + 10)))
+ &&
+ !bgi::within(B(P(x2 - 10, y2 - 10), P(x2 + 10, y2 + 10)))
+ &&
+ !bgi::overlaps(B(P(x3 - 10, y3 - 10), P(x3 + 10, y3 + 10)))
+ ,
+ std::back_inserter(result)
+ );
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(i && !w && !o) " << queries_count << " found " << temp << '\n';
+ }
+
+ result.clear();
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first + 100;
+ float y = coords[i].second + 100;
+ result.clear();
+ temp += t.query(bgi::nearest(P(x, y), neighbours_count), std::back_inserter(result));
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(nearest(P, " << neighbours_count << ")) " << nearest_queries_count << " found " << temp << '\n';
+ }
+
+ {
+ clock_t::time_point start = clock_t::now();
+ for (size_t i = 0 ; i < values_count / 10 ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ B b(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f));
+
+ t.remove(b);
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - remove " << values_count / 10 << '\n';
+ }
+
+ std::cout << "------------------------------------------------\n";
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/benchmark2.cpp b/src/boost/libs/geometry/index/example/benchmark2.cpp
new file mode 100644
index 000000000..48194cbd8
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/benchmark2.cpp
@@ -0,0 +1,86 @@
+// Boost.Geometry Index
+// Compare performance with std::set using 1-dimensional object
+// (i.e. angle, or number line coordiante)
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/chrono.hpp>
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+#include <set>
+
+int main()
+{
+ namespace bg = boost::geometry;
+ namespace bgi = bg::index;
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+ size_t values_count = 1001;
+ size_t count_start = 10;
+ size_t count_stop = 1000;
+ size_t count_step = 10;
+ size_t insrem_count = 3000000;
+
+ typedef bg::model::point<float, 1, bg::cs::cartesian> P;
+ //typedef bgi::rtree<P, bgi::linear<8, 3> > RT;
+ typedef bgi::rtree<P, bgi::quadratic<8, 3> > RT;
+ //typedef bgi::rtree<P, bgi::rstar<8, 3> > RT;
+
+ RT t;
+ std::set<float> s;
+ size_t val_i = 0;
+ for ( size_t curr_count = count_start ; curr_count < count_stop ; curr_count += count_step )
+ {
+ // inserting test
+ {
+ for (; val_i < curr_count ; ++val_i )
+ {
+ float v = val_i / 100.0f;
+ P p(v);
+ t.insert(p);
+ s.insert(v);
+ }
+
+ float v = (val_i+1) / 100.0f;
+ P test_p(v);
+
+ std::cout << t.size() << ' ';
+
+ clock_t::time_point start = clock_t::now();
+
+ for (size_t i = 0 ; i < insrem_count ; ++i )
+ {
+ t.insert(test_p);
+ t.remove(test_p);
+ }
+
+ dur_t time = clock_t::now() - start;
+ std::cout << time.count() << ' ';
+
+ start = clock_t::now();
+
+ for (size_t i = 0 ; i < insrem_count ; ++i )
+ {
+ s.insert(v);
+ s.erase(v);
+ }
+
+ time = clock_t::now() - start;
+ std::cout << time.count() << ' ';
+ }
+
+ std::cout << '\n';
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/benchmark3.cpp b/src/boost/libs/geometry/index/example/benchmark3.cpp
new file mode 100644
index 000000000..ad1910e45
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/benchmark3.cpp
@@ -0,0 +1,99 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/chrono.hpp>
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+#include <set>
+
+int main()
+{
+ namespace bg = boost::geometry;
+ namespace bgi = bg::index;
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+ size_t stored_count = 100000;
+
+ std::vector< std::pair<float, float> > coords;
+
+ //randomize values
+ {
+ boost::mt19937 rng;
+ //rng.seed(static_cast<unsigned int>(std::time(0)));
+ float max_val = static_cast<float>(stored_count / 10);
+ boost::uniform_real<float> range(-max_val, max_val);
+ boost::variate_generator<boost::mt19937&, boost::uniform_real<float> > rnd(rng, range);
+
+ coords.reserve(stored_count);
+
+ std::cout << "randomizing data\n";
+ for ( size_t i = 0 ; i < stored_count ; ++i )
+ {
+ coords.push_back(std::make_pair(rnd(), rnd()));
+ }
+ std::cout << "randomized\n";
+ }
+
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P;
+ typedef bgi::rtree<P, bgi::dynamic_linear > RTL;
+ typedef bgi::rtree<P, bgi::dynamic_quadratic > RTQ;
+ typedef bgi::rtree<P, bgi::dynamic_rstar > RTR;
+
+ for ( size_t m = 4 ; m < 33 ; m += 2 )
+ {
+ size_t mm = ::ceil(m / 3.0f);
+
+ RTL rtl(bgi::dynamic_linear(m, mm));
+ RTQ rtq(bgi::dynamic_quadratic(m, mm));
+ RTR rtr(bgi::dynamic_rstar(m, mm));
+
+ std::cout << m << ' ' << mm << ' ';
+
+ // inserting test
+ {
+ clock_t::time_point start = clock_t::now();
+ for (size_t i = 0 ; i < stored_count ; ++i )
+ {
+ P p(coords[i].first, coords[i].second);
+ rtl.insert(p);
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time.count() << ' ';
+
+ start = clock_t::now();
+ for (size_t i = 0 ; i < stored_count ; ++i )
+ {
+ P p(coords[i].first, coords[i].second);
+ rtq.insert(p);
+ }
+ time = clock_t::now() - start;
+ std::cout << time.count() << ' ';
+
+ start = clock_t::now();
+ for (size_t i = 0 ; i < stored_count ; ++i )
+ {
+ float v = i / 100.0f;
+ P p(coords[i].first, coords[i].second);
+ rtr.insert(p);
+ }
+ time = clock_t::now() - start;
+ std::cout << time.count() << ' ';
+ }
+
+ std::cout << '\n';
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/benchmark_experimental.cpp b/src/boost/libs/geometry/index/example/benchmark_experimental.cpp
new file mode 100644
index 000000000..6556d7662
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/benchmark_experimental.cpp
@@ -0,0 +1,482 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+#include <iostream>
+
+#include <boost/chrono.hpp>
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+#include <boost/range/algorithm/copy.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+#include <boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp>
+
+namespace bg = boost::geometry;
+namespace bgi = bg::index;
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+typedef bg::model::box<P> B;
+typedef bg::model::linestring<P> LS;
+typedef bg::model::segment<P> S;
+//typedef P V;
+typedef B V;
+//typedef S V;
+//#define SEGMENT_INDEXABLE
+
+template <typename V>
+struct generate_value {};
+
+template <>
+struct generate_value<B>
+{
+ static inline B apply(float x, float y) { return B(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f)); }
+};
+
+template <>
+struct generate_value<S>
+{
+ static inline S apply(float x, float y) { return S(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f)); }
+};
+
+template <>
+struct generate_value<P>
+{
+ static inline P apply(float x, float y) { return P(x, y); }
+};
+
+//#include <boost/geometry/extensions/nsphere/nsphere.hpp>
+//typedef bg::model::nsphere<P, double> NS;
+//typedef NS V;
+//
+//template <>
+//struct generate_value<NS>
+//{
+// static inline NS apply(float x, float y) { return NS(P(x, y), 0.5); }
+//};
+
+template <typename I1, typename I2, typename O>
+void mycopy(I1 first, I2 last, O o)
+{
+ for ( ; first != last ; ++o, ++first )
+ *o = *first;
+}
+
+//#define BOOST_GEOMETRY_INDEX_BENCHMARK_DEBUG
+
+int main()
+{
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+#ifndef BOOST_GEOMETRY_INDEX_BENCHMARK_DEBUG
+ size_t values_count = 1000000;
+ size_t queries_count = 100000;
+ size_t nearest_queries_count = 20000;
+ unsigned neighbours_count = 10;
+ size_t path_queries_count = 2000;
+ size_t path_queries_count2 = 20000;
+ unsigned path_values_count = 10;
+#else
+ size_t values_count = 1000;
+ size_t queries_count = 1;
+ size_t nearest_queries_count = 1;
+ unsigned neighbours_count = 10;
+ size_t path_queries_count = 1;
+ size_t path_queries_count2 = 1;
+ unsigned path_values_count = 10;
+#endif
+
+ float max_val = static_cast<float>(values_count / 2);
+ std::vector< std::pair<float, float> > coords;
+ std::vector<V> values;
+
+ //randomize values
+ {
+ boost::mt19937 rng;
+ //rng.seed(static_cast<unsigned int>(std::time(0)));
+ boost::uniform_real<float> range(-max_val, max_val);
+ boost::variate_generator<boost::mt19937&, boost::uniform_real<float> > rnd(rng, range);
+
+ coords.reserve(values_count);
+
+ std::cout << "randomizing data\n";
+ for ( size_t i = 0 ; i < values_count ; ++i )
+ {
+ float x = rnd();
+ float y = rnd();
+ coords.push_back(std::make_pair(x, y));
+ values.push_back(generate_value<V>::apply(x, y));
+ }
+ std::cout << "randomized\n";
+ }
+
+ typedef bgi::rtree<V, bgi::linear<16, 4> > RT;
+ //typedef bgi::rtree<V, bgi::quadratic<16, 4> > RT;
+ //typedef bgi::rtree<V, bgi::rstar<16, 4> > RT;
+
+ std::cout << "sizeof rtree: " << sizeof(RT) << std::endl;
+
+ for (;;)
+ {
+ std::vector<V> result;
+ result.reserve(100);
+ B result_one;
+
+ // packing test
+ {
+ clock_t::time_point start = clock_t::now();
+
+ RT t(values.begin(), values.end());
+
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - pack " << values_count /*<< '\n'*/;
+
+ std::cout << (bgi::detail::rtree::utilities::are_levels_ok(t) ? " ok" : " NOK")
+ << (bgi::detail::rtree::utilities::are_boxes_ok(t) ? " ok\n" : "NOK\n");
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ t.query(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(B) " << queries_count << " found " << temp << '\n';
+ }
+ }
+
+ RT t;
+
+ // inserting test
+ {
+ clock_t::time_point start = clock_t::now();
+ t.insert(values);
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - insert " << values_count /*<< '\n'*/;
+
+ std::cout << (bgi::detail::rtree::utilities::are_levels_ok(t) ? " ok" : " NOK")
+ << (bgi::detail::rtree::utilities::are_boxes_ok(t) ? " ok\n" : "NOK\n");
+ }
+
+
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ t.query(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(B) " << queries_count << " found " << temp << '\n';
+ }
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ boost::copy(t | bgi::adaptors::queried(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - range queried(B) " << queries_count << " found " << temp << '\n';
+ }
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ std::copy(
+ t.qbegin_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ t.qend_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - qbegin(B) qend(B) " << queries_count << " found " << temp << '\n';
+ }
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ mycopy(
+ t.qbegin_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ t.qend_(),
+ std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - qbegin(B) qend() " << queries_count << " found " << temp << '\n';
+ }
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ boost::copy(
+ std::make_pair(
+ t.qbegin_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ t.qend_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))))
+ ), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - range qbegin(B) qend(B)" << queries_count << " found " << temp << '\n';
+ }
+#endif // BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ RT::const_query_iterator first = t.qbegin(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))));
+ RT::const_query_iterator last = t.qend();
+ std::copy(first, last, std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - type-erased qbegin(B) qend() " << queries_count << " found " << temp << '\n';
+ }
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ RT::const_query_iterator first = t.qbegin(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))));
+ RT::const_query_iterator last = t.qend();
+ boost::copy(std::make_pair(first, last), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - range type-erased qbegin(B) qend() " << queries_count << " found " << temp << '\n';
+ }
+
+#ifndef SEGMENT_INDEXABLE
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count / 2 ; ++i )
+ {
+ float x1 = coords[i].first;
+ float y1 = coords[i].second;
+ float x2 = coords[i+1].first;
+ float y2 = coords[i+1].second;
+ float x3 = coords[i+2].first;
+ float y3 = coords[i+2].second;
+ result.clear();
+ t.query(
+ bgi::intersects(B(P(x1 - 10, y1 - 10), P(x1 + 10, y1 + 10)))
+ &&
+ !bgi::within(B(P(x2 - 10, y2 - 10), P(x2 + 10, y2 + 10)))
+ &&
+ !bgi::covered_by(B(P(x3 - 10, y3 - 10), P(x3 + 10, y3 + 10)))
+ ,
+ std::back_inserter(result)
+ );
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(i && !w && !c) " << queries_count << " found " << temp << '\n';
+ }
+#endif
+
+ result.clear();
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first + 100;
+ float y = coords[i].second + 100;
+ result.clear();
+ temp += t.query(bgi::nearest(P(x, y), neighbours_count), std::back_inserter(result));
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(nearest(P, " << neighbours_count << ")) " << nearest_queries_count << " found " << temp << '\n';
+ }
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first + 100;
+ float y = coords[i].second + 100;
+ result.clear();
+ std::copy(
+ t.qbegin_(bgi::nearest(P(x, y), neighbours_count)),
+ t.qend_(bgi::nearest(P(x, y), neighbours_count)),
+ std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - qbegin(nearest(P, " << neighbours_count << ")) qend(n) " << nearest_queries_count << " found " << temp << '\n';
+ }
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first + 100;
+ float y = coords[i].second + 100;
+ result.clear();
+ mycopy(
+ t.qbegin_(bgi::nearest(P(x, y), neighbours_count)),
+ t.qend_(),
+ std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - qbegin(nearest(P, " << neighbours_count << ")) qend() " << nearest_queries_count << " found " << temp << '\n';
+ }
+#endif // BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ RT::const_query_iterator first = t.qbegin(bgi::nearest(P(x, y), neighbours_count));
+ RT::const_query_iterator last = t.qend();
+ std::copy(first, last, std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - type-erased qbegin(nearest(P, " << neighbours_count << ")) qend() " << nearest_queries_count << " found " << temp << '\n';
+ }
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+#ifndef SEGMENT_INDEXABLE
+
+ {
+ LS ls;
+ ls.resize(6);
+
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < path_queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ for ( int i = 0 ; i < 3 ; ++i )
+ {
+ float foo = i*max_val/300;
+ ls[2*i] = P(x, y+foo);
+ ls[2*i+1] = P(x+max_val/100, y+foo);
+ }
+ result.clear();
+ t.query(bgi::path(ls, path_values_count), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(path(LS6, " << path_values_count << ")) " << path_queries_count << " found " << temp << '\n';
+ }
+
+ {
+ LS ls;
+ ls.resize(2);
+
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < path_queries_count2 ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ ls[0] = P(x, y);
+ ls[1] = P(x+max_val/100, y+max_val/100);
+ result.clear();
+ t.query(bgi::path(ls, path_values_count), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(path(LS2, " << path_values_count << ")) " << path_queries_count2 << " found " << temp << '\n';
+ }
+
+ {
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < path_queries_count2 ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ S seg(P(x, y), P(x+max_val/100, y+max_val/100));
+ result.clear();
+ t.query(bgi::path(seg, path_values_count), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - query(path(S, " << path_values_count << ")) " << path_queries_count2 << " found " << temp << '\n';
+ }
+#endif
+#endif
+ {
+ clock_t::time_point start = clock_t::now();
+ for (size_t i = 0 ; i < values_count / 10 ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+
+ t.remove(generate_value<V>::apply(x, y));
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time << " - remove " << values_count / 10 << '\n';
+
+ std::cout << (bgi::detail::rtree::utilities::are_boxes_ok(t) ? " boxes ok\n" : "boxes NOT ok\n");
+ }
+
+ std::cout << "------------------------------------------------\n";
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/benchmark_insert.cpp b/src/boost/libs/geometry/index/example/benchmark_insert.cpp
new file mode 100644
index 000000000..4fe82e91f
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/benchmark_insert.cpp
@@ -0,0 +1,196 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <vector>
+#include <algorithm>
+
+#include <boost/chrono.hpp>
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp>
+
+namespace bg = boost::geometry;
+namespace bgi = bg::index;
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+typedef bg::model::box<P> B;
+typedef bg::model::segment<P> S;
+typedef P V;
+//typedef B V;
+//typedef S V;
+
+template <typename V>
+struct generate_value {};
+
+template <>
+struct generate_value<B>
+{
+ static inline B apply(float x, float y) { return B(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f)); }
+};
+
+template <>
+struct generate_value<S>
+{
+ static inline S apply(float x, float y) { return S(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f)); }
+};
+
+template <>
+struct generate_value<P>
+{
+ static inline P apply(float x, float y) { return P(x, y); }
+};
+
+template <typename RT>
+void test_queries(RT const& t, std::vector< std::pair<float, float> > const& coords, size_t queries_count)
+{
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+ std::vector<V> result;
+ result.reserve(100);
+
+ clock_t::time_point start = clock_t::now();
+ size_t temp = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ t.query(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))), std::back_inserter(result));
+ temp += result.size();
+ }
+ dur_t time = clock_t::now() - start;
+ std::cout << time.count() << " " << temp << '\n';
+}
+
+//#define BOOST_GEOMETRY_INDEX_BENCHMARK_DEBUG
+
+int main()
+{
+ //typedef bgi::rtree<V, bgi::linear<4, 2> > RT;
+ //typedef bgi::rtree<V, bgi::linear<16, 4> > RT;
+ //typedef bgi::rtree<V, bgi::quadratic<4, 2> > RT;
+ typedef bgi::rtree<V, bgi::rstar<8, 2> > RT;
+
+ typedef boost::chrono::thread_clock clock_t;
+ typedef boost::chrono::duration<float> dur_t;
+
+#ifndef BOOST_GEOMETRY_INDEX_BENCHMARK_DEBUG
+ size_t values_count = 1000000;
+ size_t queries_count = 100000;
+ size_t nearest_queries_count = 20000;
+ unsigned neighbours_count = 10;
+ size_t max_range_inserts = 10;
+#else
+ size_t values_count = 10000;
+ size_t queries_count = 1000;
+ size_t nearest_queries_count = 100;
+ unsigned neighbours_count = 10;
+ size_t max_range_inserts = 10;
+#endif
+
+ float max_val = static_cast<float>(values_count / 2);
+ std::vector< std::pair<float, float> > coords;
+ std::vector<V> values;
+
+ //randomize values
+ {
+ boost::mt19937 rng;
+ //rng.seed(static_cast<unsigned int>(std::time(0)));
+ boost::uniform_real<float> range(-max_val, max_val);
+ boost::variate_generator<boost::mt19937&, boost::uniform_real<float> > rnd(rng, range);
+
+ coords.reserve(values_count);
+
+ std::cout << "randomizing data\n";
+ for ( size_t i = 0 ; i < values_count ; ++i )
+ {
+ float x = rnd();
+ float y = rnd();
+ coords.push_back(std::make_pair(x, y));
+ values.push_back(generate_value<V>::apply(x, y));
+ }
+ std::cout << "randomized\n";
+ }
+
+ for (;;)
+ {
+ // packing test
+ {
+ clock_t::time_point start = clock_t::now();
+
+ RT t(values.begin(), values.end());
+
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_boxes_ok(t));
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_counts_ok(t));
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_levels_ok(t));
+
+ dur_t time = clock_t::now() - start;
+ std::cout << "pack(" << values_count << ") - " << time.count() << ", ";
+
+ test_queries(t, coords, queries_count);
+ }
+
+ {
+ size_t n_per_max = values_count / max_range_inserts;
+
+ for ( size_t j = 0 ; j < max_range_inserts ; ++j )
+ {
+ clock_t::time_point start = clock_t::now();
+
+ RT t;
+
+ // perform j range-inserts
+ for ( size_t i = 0 ; i < j ; ++i )
+ {
+ t.insert(values.begin() + n_per_max * i,
+ values.begin() + (std::min)(n_per_max * (i + 1), values_count));
+ }
+
+ if ( !t.empty() )
+ {
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_boxes_ok(t));
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_counts_ok(t));
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_levels_ok(t));
+ }
+
+ // perform n-n/max_inserts*j inserts
+ size_t inserted_count = (std::min)(n_per_max*j, values_count);
+ for ( size_t i = inserted_count ; i < values_count ; ++i )
+ {
+ t.insert(values[i]);
+ }
+
+ if ( !t.empty() )
+ {
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_boxes_ok(t));
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_counts_ok(t));
+ BOOST_ASSERT(bgi::detail::rtree::utilities::are_levels_ok(t));
+ }
+
+ dur_t time = clock_t::now() - start;
+ std::cout << j << "*insert(N/" << max_range_inserts << ")+insert(" << (values_count - inserted_count) << ") - " << time.count() << ", ";
+
+ test_queries(t, coords, queries_count);
+ }
+ }
+
+ std::cout << "------------------------------------------------\n";
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/glut_vis.cpp b/src/boost/libs/geometry/index/example/glut_vis.cpp
new file mode 100644
index 000000000..2c5f5740b
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/glut_vis.cpp
@@ -0,0 +1,1094 @@
+// Boost.Geometry Index
+// OpenGL visualization
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <GL/glut.h>
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/index/detail/rtree/utilities/gl_draw.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/print.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/statistics.hpp>
+
+#include <boost/variant.hpp>
+
+#define ENABLE_POINTS_AND_SEGMENTS
+
+namespace bg = boost::geometry;
+namespace bgi = bg::index;
+
+// used types
+
+typedef bg::model::point<float, 2, boost::geometry::cs::cartesian> P;
+typedef bg::model::box<P> B;
+typedef bg::model::linestring<P> LS;
+typedef bg::model::segment<P> S;
+typedef bg::model::ring<P> R;
+typedef bg::model::polygon<P> Poly;
+typedef bg::model::multi_polygon<Poly> MPoly;
+
+// containers variant
+
+template <typename V>
+struct containers
+{
+ containers & operator=(containers const& c)
+ {
+ tree = c.tree;
+ values = c.values;
+ result = c.result;
+ return *this;
+ }
+
+ bgi::rtree< V, bgi::rstar<4, 2> > tree;
+ std::vector<V> values;
+ std::vector<V> result;
+};
+
+boost::variant<
+ containers<B>
+#ifdef ENABLE_POINTS_AND_SEGMENTS
+ , containers<P>
+ , containers<S>
+#endif
+> cont;
+
+// visitors
+
+template <typename Pred>
+struct query_v : boost::static_visitor<size_t>
+{
+ Pred m_pred;
+ query_v(Pred const& pred) : m_pred(pred) {}
+
+ template <typename C>
+ size_t operator()(C & c) const
+ {
+ c.result.clear();
+ return c.tree.query(m_pred, std::back_inserter(c.result));
+ }
+};
+template <typename Cont, typename Pred>
+inline size_t query(Cont & cont, Pred const& pred)
+{
+ return boost::apply_visitor(query_v<Pred>(pred), cont);
+}
+
+struct print_result_v : boost::static_visitor<>
+{
+ template <typename C>
+ void operator()(C & c) const
+ {
+ for ( size_t i = 0 ; i < c.result.size() ; ++i )
+ {
+ bgi::detail::utilities::print_indexable(std::cout, c.result[i]);
+ std::cout << '\n';
+ }
+ }
+};
+template <typename Cont>
+inline void print_result(Cont const& cont)
+{
+ boost::apply_visitor(print_result_v(), cont);
+}
+
+struct bounds_v : boost::static_visitor<B>
+{
+ template <typename C>
+ B operator()(C & c) const
+ {
+ return c.tree.bounds();
+ }
+};
+template <typename Cont>
+inline B bounds(Cont const& cont)
+{
+ return boost::apply_visitor(bounds_v(), cont);
+}
+
+struct depth_v : boost::static_visitor<size_t>
+{
+ template <typename C>
+ size_t operator()(C & c) const
+ {
+ return get(c.tree);
+ }
+ template <typename RTree>
+ static size_t get(RTree const& t)
+ {
+ return bgi::detail::rtree::utilities::view<RTree>(t).depth();
+ }
+};
+template <typename Cont>
+inline size_t depth(Cont const& cont)
+{
+ return boost::apply_visitor(depth_v(), cont);
+}
+
+struct draw_tree_v : boost::static_visitor<>
+{
+ template <typename C>
+ void operator()(C & c) const
+ {
+ bgi::detail::rtree::utilities::gl_draw(c.tree);
+ }
+};
+template <typename Cont>
+inline void draw_tree(Cont const& cont)
+{
+ return boost::apply_visitor(draw_tree_v(), cont);
+}
+
+struct draw_result_v : boost::static_visitor<>
+{
+ template <typename C>
+ void operator()(C & c) const
+ {
+ for ( size_t i = 0 ; i < c.result.size() ; ++i )
+ {
+ bgi::detail::utilities::gl_draw_indexable(c.result[i], depth_v::get(c.tree));
+ }
+ }
+};
+template <typename Cont>
+inline void draw_result(Cont const& cont)
+{
+ return boost::apply_visitor(draw_result_v(), cont);
+}
+
+struct print_tree_v : boost::static_visitor<>
+{
+ template <typename C>
+ void operator()(C & c) const
+ {
+ bgi::detail::rtree::utilities::print(std::cout, c.tree);
+ }
+};
+template <typename Cont>
+inline void print_tree(Cont const& cont)
+{
+ return boost::apply_visitor(print_tree_v(), cont);
+}
+
+// globals used in querying
+
+size_t found_count = 0;
+size_t count = 5;
+
+P search_point;
+B search_box;
+R search_ring;
+Poly search_poly;
+MPoly search_multi_poly;
+S search_segment;
+LS search_linestring;
+LS search_path;
+
+enum query_mode_type {
+ qm_knn, qm_knnb, qm_knns, qm_c, qm_d, qm_i, qm_o, qm_w, qm_nc, qm_nd, qm_ni, qm_no, qm_nw, qm_all, qm_ri, qm_pi, qm_mpi, qm_si, qm_lsi, qm_path
+} query_mode = qm_knn;
+
+bool search_valid = false;
+
+// various queries
+
+void query_knn()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+
+ if ( query_mode == qm_knn )
+ {
+ search_point = P(x, y);
+ found_count = query(cont, bgi::nearest(search_point, count));
+ }
+ else if ( query_mode == qm_knnb )
+ {
+ float w = 2 + ( rand() % 1000 ) / 500.0f;
+ float h = 2 + ( rand() % 1000 ) / 500.0f;
+ search_box = B(P(x - w, y - h), P(x + w, y + h));
+ found_count = query(cont, bgi::nearest(search_box, count));
+ }
+ else if ( query_mode == qm_knns )
+ {
+ int signx = rand() % 2 ? 1 : -1;
+ int signy = rand() % 2 ? 1 : -1;
+ float w = (10 + ( rand() % 1000 ) / 100.0f) * signx;
+ float h = (10 + ( rand() % 1000 ) / 100.0f) * signy;
+ search_segment = S(P(x - w, y - h), P(x + w, y + h));
+ found_count = query(cont, bgi::nearest(search_segment, count));
+ }
+ else
+ {
+ BOOST_ASSERT(false);
+ }
+
+ if ( found_count > 0 )
+ {
+ if ( query_mode == qm_knn )
+ {
+ std::cout << "search point: ";
+ bgi::detail::utilities::print_indexable(std::cout, search_point);
+ }
+ else if ( query_mode == qm_knnb )
+ {
+ std::cout << "search box: ";
+ bgi::detail::utilities::print_indexable(std::cout, search_box);
+ }
+ else if ( query_mode == qm_knns )
+ {
+ std::cout << "search segment: ";
+ bgi::detail::utilities::print_indexable(std::cout, search_segment);
+ }
+ else
+ {
+ BOOST_ASSERT(false);
+ }
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "nearest not found\n";
+}
+
+#ifndef ENABLE_POINTS_AND_SEGMENTS
+void query_path()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 20 + ( rand() % 1000 ) / 100.0f;
+ float h = 20 + ( rand() % 1000 ) / 100.0f;
+
+ search_path.resize(10);
+ float yy = y-h;
+ for ( int i = 0 ; i < 5 ; ++i, yy += h / 2 )
+ {
+ search_path[2 * i] = P(x-w, yy);
+ search_path[2 * i + 1] = P(x+w, yy);
+ }
+
+ found_count = query(cont, bgi::detail::path<LS>(search_path, count));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search path: ";
+ BOOST_FOREACH(P const& p, search_path)
+ bgi::detail::utilities::print_indexable(std::cout, p);
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "values on path not found\n";
+}
+#endif
+
+template <typename Predicate>
+void query()
+{
+ if ( query_mode != qm_all )
+ {
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 10 + ( rand() % 1000 ) / 100.0f;
+ float h = 10 + ( rand() % 1000 ) / 100.0f;
+
+ search_box = B(P(x - w, y - h), P(x + w, y + h));
+ }
+ else
+ {
+ search_box = bounds(cont);
+ }
+
+ found_count = query(cont, Predicate(search_box));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search box: ";
+ bgi::detail::utilities::print_indexable(std::cout, search_box);
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "boxes not found\n";
+}
+
+template <typename Predicate>
+void query_ring()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 10 + ( rand() % 1000 ) / 100.0f;
+ float h = 10 + ( rand() % 1000 ) / 100.0f;
+
+ search_ring.clear();
+ search_ring.push_back(P(x - w, y - h));
+ search_ring.push_back(P(x - w/2, y - h));
+ search_ring.push_back(P(x, y - 3*h/2));
+ search_ring.push_back(P(x + w/2, y - h));
+ search_ring.push_back(P(x + w, y - h));
+ search_ring.push_back(P(x + w, y - h/2));
+ search_ring.push_back(P(x + 3*w/2, y));
+ search_ring.push_back(P(x + w, y + h/2));
+ search_ring.push_back(P(x + w, y + h));
+ search_ring.push_back(P(x + w/2, y + h));
+ search_ring.push_back(P(x, y + 3*h/2));
+ search_ring.push_back(P(x - w/2, y + h));
+ search_ring.push_back(P(x - w, y + h));
+ search_ring.push_back(P(x - w, y + h/2));
+ search_ring.push_back(P(x - 3*w/2, y));
+ search_ring.push_back(P(x - w, y - h/2));
+ search_ring.push_back(P(x - w, y - h));
+
+ found_count = query(cont, Predicate(search_ring));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search ring: ";
+ BOOST_FOREACH(P const& p, search_ring)
+ {
+ bgi::detail::utilities::print_indexable(std::cout, p);
+ std::cout << ' ';
+ }
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "boxes not found\n";
+}
+
+template <typename Predicate>
+void query_poly()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 10 + ( rand() % 1000 ) / 100.0f;
+ float h = 10 + ( rand() % 1000 ) / 100.0f;
+
+ search_poly.clear();
+ search_poly.outer().push_back(P(x - w, y - h));
+ search_poly.outer().push_back(P(x - w/2, y - h));
+ search_poly.outer().push_back(P(x, y - 3*h/2));
+ search_poly.outer().push_back(P(x + w/2, y - h));
+ search_poly.outer().push_back(P(x + w, y - h));
+ search_poly.outer().push_back(P(x + w, y - h/2));
+ search_poly.outer().push_back(P(x + 3*w/2, y));
+ search_poly.outer().push_back(P(x + w, y + h/2));
+ search_poly.outer().push_back(P(x + w, y + h));
+ search_poly.outer().push_back(P(x + w/2, y + h));
+ search_poly.outer().push_back(P(x, y + 3*h/2));
+ search_poly.outer().push_back(P(x - w/2, y + h));
+ search_poly.outer().push_back(P(x - w, y + h));
+ search_poly.outer().push_back(P(x - w, y + h/2));
+ search_poly.outer().push_back(P(x - 3*w/2, y));
+ search_poly.outer().push_back(P(x - w, y - h/2));
+ search_poly.outer().push_back(P(x - w, y - h));
+
+ search_poly.inners().push_back(Poly::ring_type());
+ search_poly.inners()[0].push_back(P(x - w/2, y - h/2));
+ search_poly.inners()[0].push_back(P(x + w/2, y - h/2));
+ search_poly.inners()[0].push_back(P(x + w/2, y + h/2));
+ search_poly.inners()[0].push_back(P(x - w/2, y + h/2));
+ search_poly.inners()[0].push_back(P(x - w/2, y - h/2));
+
+ found_count = query(cont, Predicate(search_poly));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search poly outer: ";
+ BOOST_FOREACH(P const& p, search_poly.outer())
+ {
+ bgi::detail::utilities::print_indexable(std::cout, p);
+ std::cout << ' ';
+ }
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "boxes not found\n";
+}
+
+template <typename Predicate>
+void query_multi_poly()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 10 + ( rand() % 1000 ) / 100.0f;
+ float h = 10 + ( rand() % 1000 ) / 100.0f;
+
+ search_multi_poly.clear();
+
+ search_multi_poly.push_back(Poly());
+ search_multi_poly[0].outer().push_back(P(x - w, y - h));
+ search_multi_poly[0].outer().push_back(P(x - w/2, y - h));
+ search_multi_poly[0].outer().push_back(P(x, y - 3*h/2));
+ search_multi_poly[0].outer().push_back(P(x + w/2, y - h));
+ search_multi_poly[0].outer().push_back(P(x + w, y - h));
+ search_multi_poly[0].outer().push_back(P(x + w, y - h/2));
+ search_multi_poly[0].outer().push_back(P(x + 3*w/2, y));
+ search_multi_poly[0].outer().push_back(P(x + w, y + h/2));
+ search_multi_poly[0].outer().push_back(P(x + w, y + h));
+ search_multi_poly[0].outer().push_back(P(x + w/2, y + h));
+ search_multi_poly[0].outer().push_back(P(x, y + 3*h/2));
+ search_multi_poly[0].outer().push_back(P(x - w/2, y + h));
+ search_multi_poly[0].outer().push_back(P(x - w, y + h));
+ search_multi_poly[0].outer().push_back(P(x - w, y + h/2));
+ search_multi_poly[0].outer().push_back(P(x - 3*w/2, y));
+ search_multi_poly[0].outer().push_back(P(x - w, y - h/2));
+ search_multi_poly[0].outer().push_back(P(x - w, y - h));
+
+ search_multi_poly[0].inners().push_back(Poly::ring_type());
+ search_multi_poly[0].inners()[0].push_back(P(x - w/2, y - h/2));
+ search_multi_poly[0].inners()[0].push_back(P(x + w/2, y - h/2));
+ search_multi_poly[0].inners()[0].push_back(P(x + w/2, y + h/2));
+ search_multi_poly[0].inners()[0].push_back(P(x - w/2, y + h/2));
+ search_multi_poly[0].inners()[0].push_back(P(x - w/2, y - h/2));
+
+ search_multi_poly.push_back(Poly());
+ search_multi_poly[1].outer().push_back(P(x - 2*w, y - 2*h));
+ search_multi_poly[1].outer().push_back(P(x - 6*w/5, y - 2*h));
+ search_multi_poly[1].outer().push_back(P(x - 6*w/5, y - 6*h/5));
+ search_multi_poly[1].outer().push_back(P(x - 2*w, y - 6*h/5));
+ search_multi_poly[1].outer().push_back(P(x - 2*w, y - 2*h));
+
+ search_multi_poly.push_back(Poly());
+ search_multi_poly[2].outer().push_back(P(x + 6*w/5, y + 6*h/5));
+ search_multi_poly[2].outer().push_back(P(x + 2*w, y + 6*h/5));
+ search_multi_poly[2].outer().push_back(P(x + 2*w, y + 2*h));
+ search_multi_poly[2].outer().push_back(P(x + 6*w/5, y + 2*h));
+ search_multi_poly[2].outer().push_back(P(x + 6*w/5, y + 6*h/5));
+
+ found_count = query(cont, Predicate(search_multi_poly));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search multi_poly[0] outer: ";
+ BOOST_FOREACH(P const& p, search_multi_poly[0].outer())
+ {
+ bgi::detail::utilities::print_indexable(std::cout, p);
+ std::cout << ' ';
+ }
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "boxes not found\n";
+}
+
+template <typename Predicate>
+void query_segment()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 10.0f - ( rand() % 1000 ) / 50.0f;
+ float h = 10.0f - ( rand() % 1000 ) / 50.0f;
+ w += 0 <= w ? 10 : -10;
+ h += 0 <= h ? 10 : -10;
+
+ boost::geometry::set<0, 0>(search_segment, x - w);
+ boost::geometry::set<0, 1>(search_segment, y - h);
+ boost::geometry::set<1, 0>(search_segment, x + w);
+ boost::geometry::set<1, 1>(search_segment, y + h);
+
+ found_count = query(cont, Predicate(search_segment));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search segment: ";
+ bgi::detail::utilities::print_indexable(std::cout, P(x-w, y-h));
+ bgi::detail::utilities::print_indexable(std::cout, P(x+w, y+h));
+
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "boxes not found\n";
+}
+
+template <typename Predicate>
+void query_linestring()
+{
+ float x = ( rand() % 1000 ) / 10.0f;
+ float y = ( rand() % 1000 ) / 10.0f;
+ float w = 10 + ( rand() % 1000 ) / 100.0f;
+ float h = 10 + ( rand() % 1000 ) / 100.0f;
+
+ search_linestring.clear();
+ float a = 0;
+ float d = 0;
+ for ( size_t i = 0 ; i < 300 ; ++i, a += 0.05, d += 0.005 )
+ {
+ float xx = x + w * d * ::cos(a);
+ float yy = y + h * d * ::sin(a);
+ search_linestring.push_back(P(xx, yy));
+ }
+
+ found_count = query(cont, Predicate(search_linestring));
+
+ if ( found_count > 0 )
+ {
+ std::cout << "search linestring: ";
+ BOOST_FOREACH(P const& p, search_linestring)
+ {
+ bgi::detail::utilities::print_indexable(std::cout, p);
+ std::cout << ' ';
+ }
+ std::cout << "\nfound: ";
+ print_result(cont);
+ }
+ else
+ std::cout << "boxes not found\n";
+}
+
+// the function running the correct query based on the query_mode
+
+void search()
+{
+ namespace d = bgi::detail;
+
+ if ( query_mode == qm_knn || query_mode == qm_knnb || query_mode == qm_knns )
+ query_knn();
+ else if ( query_mode == qm_d )
+ query< d::spatial_predicate<B, d::disjoint_tag, false> >();
+ else if ( query_mode == qm_i )
+ query< d::spatial_predicate<B, d::intersects_tag, false> >();
+ else if ( query_mode == qm_nd )
+ query< d::spatial_predicate<B, d::disjoint_tag, true> >();
+ else if ( query_mode == qm_ni )
+ query< d::spatial_predicate<B, d::intersects_tag, true> >();
+ else if ( query_mode == qm_all )
+ query< d::spatial_predicate<B, d::intersects_tag, false> >();
+#ifdef ENABLE_POINTS_AND_SEGMENTS
+ else
+ std::cout << "query disabled\n";
+#else
+ else if ( query_mode == qm_c )
+ query< d::spatial_predicate<B, d::covered_by_tag, false> >();
+ else if ( query_mode == qm_o )
+ query< d::spatial_predicate<B, d::overlaps_tag, false> >();
+ else if ( query_mode == qm_w )
+ query< d::spatial_predicate<B, d::within_tag, false> >();
+ else if ( query_mode == qm_nc )
+ query< d::spatial_predicate<B, d::covered_by_tag, true> >();
+ else if ( query_mode == qm_no )
+ query< d::spatial_predicate<B, d::overlaps_tag, true> >();
+ else if ( query_mode == qm_nw )
+ query< d::spatial_predicate<B, d::within_tag, true> >();
+ else if ( query_mode == qm_ri )
+ query_ring< d::spatial_predicate<R, d::intersects_tag, false> >();
+ else if ( query_mode == qm_pi )
+ query_poly< d::spatial_predicate<Poly, d::intersects_tag, false> >();
+ else if ( query_mode == qm_mpi )
+ query_multi_poly< d::spatial_predicate<MPoly, d::intersects_tag, false> >();
+ else if ( query_mode == qm_si )
+ query_segment< d::spatial_predicate<S, d::intersects_tag, false> >();
+ else if ( query_mode == qm_lsi )
+ query_linestring< d::spatial_predicate<LS, d::intersects_tag, false> >();
+ else if ( query_mode == qm_path )
+ query_path();
+#endif
+
+ search_valid = true;
+}
+
+// various drawing functions
+
+void draw_point(P const& p)
+{
+ float x = boost::geometry::get<0>(p);
+ float y = boost::geometry::get<1>(p);
+ float z = depth(cont);
+
+ glBegin(GL_QUADS);
+ glVertex3f(x+1, y, z);
+ glVertex3f(x, y+1, z);
+ glVertex3f(x-1, y, z);
+ glVertex3f(x, y-1, z);
+ glEnd();
+}
+
+void draw_knn_area(float min_distance, float max_distance)
+{
+ float x = boost::geometry::get<0>(search_point);
+ float y = boost::geometry::get<1>(search_point);
+ float z = depth(cont);
+
+ draw_point(search_point);
+
+ // search min circle
+
+ glBegin(GL_LINE_LOOP);
+ for(float a = 0 ; a < 3.14158f * 2 ; a += 3.14158f / 180)
+ glVertex3f(x + min_distance * ::cos(a), y + min_distance * ::sin(a), z);
+ glEnd();
+
+ // search max circle
+
+ glBegin(GL_LINE_LOOP);
+ for(float a = 0 ; a < 3.14158f * 2 ; a += 3.14158f / 180)
+ glVertex3f(x + max_distance * ::cos(a), y + max_distance * ::sin(a), z);
+ glEnd();
+}
+
+void draw_linestring(LS const& ls)
+{
+ glBegin(GL_LINE_STRIP);
+
+ BOOST_FOREACH(P const& p, ls)
+ {
+ float x = boost::geometry::get<0>(p);
+ float y = boost::geometry::get<1>(p);
+ float z = depth(cont);
+ glVertex3f(x, y, z);
+ }
+
+ glEnd();
+}
+
+void draw_segment(S const& s)
+{
+ float x1 = boost::geometry::get<0, 0>(s);
+ float y1 = boost::geometry::get<0, 1>(s);
+ float x2 = boost::geometry::get<1, 0>(s);
+ float y2 = boost::geometry::get<1, 1>(s);
+ float z = depth(cont);
+
+ glBegin(GL_LINES);
+ glVertex3f(x1, y1, z);
+ glVertex3f(x2, y2, z);
+ glEnd();
+}
+
+template <typename Box>
+void draw_box(Box const& box)
+{
+ float x1 = boost::geometry::get<bg::min_corner, 0>(box);
+ float y1 = boost::geometry::get<bg::min_corner, 1>(box);
+ float x2 = boost::geometry::get<bg::max_corner, 0>(box);
+ float y2 = boost::geometry::get<bg::max_corner, 1>(box);
+ float z = depth(cont);
+
+ // search box
+ glBegin(GL_LINE_LOOP);
+ glVertex3f(x1, y1, z);
+ glVertex3f(x2, y1, z);
+ glVertex3f(x2, y2, z);
+ glVertex3f(x1, y2, z);
+ glEnd();
+}
+
+template <typename Range>
+void draw_ring(Range const& range)
+{
+ float z = depth(cont);
+
+ // search box
+ glBegin(GL_LINE_LOOP);
+
+ BOOST_FOREACH(P const& p, range)
+ {
+ float x = boost::geometry::get<0>(p);
+ float y = boost::geometry::get<1>(p);
+
+ glVertex3f(x, y, z);
+ }
+ glEnd();
+}
+
+template <typename Polygon>
+void draw_polygon(Polygon const& polygon)
+{
+ draw_ring(polygon.outer());
+ BOOST_FOREACH(Poly::ring_type const& r, polygon.inners())
+ draw_ring(r);
+}
+
+template <typename MultiPolygon>
+void draw_multi_polygon(MultiPolygon const& multi_polygon)
+{
+ BOOST_FOREACH(Poly const& p, multi_polygon)
+ draw_polygon(p);
+}
+
+// render the scene -> tree, if searching data available also the query geometry and result
+
+void render_scene(void)
+{
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ draw_tree(cont);
+
+ if ( search_valid )
+ {
+ glColor3f(1.0f, 0.25f, 0.0f);
+
+ if ( query_mode == qm_knn )
+ draw_knn_area(0, 0);
+ else if ( query_mode == qm_knnb )
+ draw_box(search_box);
+ else if ( query_mode == qm_knns )
+ draw_segment(search_segment);
+ else if ( query_mode == qm_ri )
+ draw_ring(search_ring);
+ else if ( query_mode == qm_pi )
+ draw_polygon(search_poly);
+ else if ( query_mode == qm_mpi )
+ draw_multi_polygon(search_multi_poly);
+ else if ( query_mode == qm_si )
+ draw_segment(search_segment);
+ else if ( query_mode == qm_lsi )
+ draw_linestring(search_linestring);
+ else if ( query_mode == qm_path )
+ draw_linestring(search_path);
+ else
+ draw_box(search_box);
+
+ glColor3f(1.0f, 0.5f, 0.0f);
+
+ draw_result(cont);
+ }
+
+ glFlush();
+}
+
+void resize(int w, int h)
+{
+ if ( h == 0 )
+ h = 1;
+
+ //float ratio = float(w) / h;
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+
+ glViewport(0, 0, w, h);
+
+ //gluPerspective(45, ratio, 1, 1000);
+ glOrtho(-150, 150, -150, 150, -150, 150);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ /*gluLookAt(
+ 120.0f, 120.0f, 120.0f,
+ 50.0f, 50.0f, -1.0f,
+ 0.0f, 1.0f, 0.0f);*/
+ gluLookAt(
+ 50.0f, 50.0f, 75.0f,
+ 50.0f, 50.0f, -1.0f,
+ 0.0f, 1.0f, 0.0f);
+
+ glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ glLineWidth(1.5f);
+
+ srand(1);
+}
+
+// randomize various indexables
+
+inline void rand_val(B & b)
+{
+ float x = ( rand() % 100 );
+ float y = ( rand() % 100 );
+ float w = ( rand() % 2 ) + 1;
+ float h = ( rand() % 2 ) + 1;
+ b = B(P(x - w, y - h),P(x + w, y + h));
+}
+inline void rand_val(P & p)
+{
+ float x = ( rand() % 100 );
+ float y = ( rand() % 100 );
+ p = P(x, y);
+}
+inline void rand_val(S & s)
+{
+ float x = ( rand() % 100 );
+ float y = ( rand() % 100 );
+ float w = ( rand() % 2 + 1) * (rand() % 2 ? 1.0f : -1.0f);
+ float h = ( rand() % 2 + 1) * (rand() % 2 ? 1.0f : -1.0f);
+ s = S(P(x - w, y - h),P(x + w, y + h));
+}
+
+// more higher-level visitors
+
+struct insert_random_value_v : boost::static_visitor<>
+{
+ template <typename V>
+ void operator()(containers<V> & c) const
+ {
+ V v;
+ rand_val(v);
+
+ boost::geometry::index::insert(c.tree, v);
+ c.values.push_back(v);
+
+ std::cout << "inserted: ";
+ bgi::detail::utilities::print_indexable(std::cout, v);
+ std::cout << '\n';
+
+ std::cout << ( bgi::detail::rtree::utilities::are_boxes_ok(c.tree) ? "boxes OK\n" : "WRONG BOXES!\n" );
+ std::cout << ( bgi::detail::rtree::utilities::are_levels_ok(c.tree) ? "levels OK\n" : "WRONG LEVELS!\n" );
+ std::cout << "\n";
+ }
+};
+template <typename Cont>
+inline void insert_random_value(Cont & cont)
+{
+ return boost::apply_visitor(insert_random_value_v(), cont);
+}
+
+struct remove_random_value_v : boost::static_visitor<>
+{
+ template <typename V>
+ void operator()(containers<V> & c) const
+ {
+ if ( c.values.empty() )
+ return;
+
+ size_t i = rand() % c.values.size();
+ V v = c.values[i];
+
+ c.tree.remove(v);
+ c.values.erase(c.values.begin() + i);
+
+ std::cout << "removed: ";
+ bgi::detail::utilities::print_indexable(std::cout, v);
+ std::cout << '\n';
+
+ std::cout << ( bgi::detail::rtree::utilities::are_boxes_ok(c.tree) ? "boxes OK\n" : "WRONG BOXES!\n" );
+ std::cout << ( bgi::detail::rtree::utilities::are_levels_ok(c.tree) ? "levels OK\n" : "WRONG LEVELS!\n" );
+ std::cout << "\n";
+ }
+};
+template <typename Cont>
+inline void remove_random_value(Cont & cont)
+{
+ return boost::apply_visitor(remove_random_value_v(), cont);
+}
+
+// handle mouse input
+
+void mouse(int button, int state, int /*x*/, int /*y*/)
+{
+ if ( button == GLUT_LEFT_BUTTON && state == GLUT_DOWN )
+ {
+ insert_random_value(cont);
+ search_valid = false;
+ }
+ else if ( button == GLUT_RIGHT_BUTTON && state == GLUT_DOWN )
+ {
+ remove_random_value(cont);
+ search_valid = false;
+ }
+ else if ( button == GLUT_MIDDLE_BUTTON && state == GLUT_DOWN )
+ {
+ search();
+ }
+
+ glutPostRedisplay();
+}
+
+// more higher-level visitors
+
+struct insert_random_values_v : boost::static_visitor<>
+{
+ template <typename V>
+ void operator()(containers<V> & c) const
+ {
+ for ( size_t i = 0 ; i < 35 ; ++i )
+ {
+ V v;
+ rand_val(v);
+
+ c.tree.insert(v);
+ c.values.push_back(v);
+
+ std::cout << "inserted: ";
+ bgi::detail::utilities::print_indexable(std::cout, v);
+ std::cout << '\n';
+ }
+
+ std::cout << ( bgi::detail::rtree::utilities::are_boxes_ok(c.tree) ? "boxes OK\n" : "WRONG BOXES!\n" );
+ std::cout << ( bgi::detail::rtree::utilities::are_levels_ok(c.tree) ? "levels OK\n" : "WRONG LEVELS!\n" );
+ std::cout << "\n";
+ }
+};
+template <typename Cont>
+inline void insert_random_values(Cont & cont)
+{
+ return boost::apply_visitor(insert_random_values_v(), cont);
+}
+
+struct bulk_insert_random_values_v : boost::static_visitor<>
+{
+ template <typename V>
+ void operator()(containers<V> & c) const
+ {
+ c.values.clear();
+
+ for ( size_t i = 0 ; i < 35 ; ++i )
+ {
+ V v;
+ rand_val(v);
+
+ c.values.push_back(v);
+
+ std::cout << "inserted: ";
+ bgi::detail::utilities::print_indexable(std::cout, v);
+ std::cout << '\n';
+ }
+
+ create(c.tree, c.values);
+
+ std::cout << ( bgi::detail::rtree::utilities::are_boxes_ok(c.tree) ? "boxes OK\n" : "WRONG BOXES!\n" );
+ std::cout << ( bgi::detail::rtree::utilities::are_levels_ok(c.tree) ? "levels OK\n" : "WRONG LEVELS!\n" );
+ std::cout << "\n";
+ }
+
+ template <typename Tree, typename Values>
+ void create(Tree & tree, Values const& values) const
+ {
+ Tree t(values);
+ tree = boost::move(t);
+ }
+};
+template <typename Cont>
+inline void bulk_insert_random_values(Cont & cont)
+{
+ return boost::apply_visitor(bulk_insert_random_values_v(), cont);
+}
+
+// handle keyboard input
+
+std::string current_line;
+
+void keyboard(unsigned char key, int /*x*/, int /*y*/)
+{
+ if ( key == '\r' || key == '\n' )
+ {
+ if ( current_line == "storeb" )
+ {
+ cont = containers<B>();
+ glutPostRedisplay();
+ }
+#ifdef ENABLE_POINTS_AND_SEGMENTS
+ else if ( current_line == "storep" )
+ {
+ cont = containers<P>();
+ glutPostRedisplay();
+ }
+ else if ( current_line == "stores" )
+ {
+ cont = containers<S>();
+ glutPostRedisplay();
+ }
+#endif
+ else if ( current_line == "t" )
+ {
+ std::cout << "\n";
+ print_tree(cont);
+ std::cout << "\n";
+ }
+ else if ( current_line == "rand" )
+ {
+ insert_random_values(cont);
+ search_valid = false;
+
+ glutPostRedisplay();
+ }
+ else if ( current_line == "bulk" )
+ {
+ bulk_insert_random_values(cont);
+ search_valid = false;
+
+ glutPostRedisplay();
+ }
+ else
+ {
+ if ( current_line == "knn" )
+ query_mode = qm_knn;
+ else if ( current_line == "knnb" )
+ query_mode = qm_knnb;
+ else if ( current_line == "knns" )
+ query_mode = qm_knns;
+ else if ( current_line == "c" )
+ query_mode = qm_c;
+ else if ( current_line == "d" )
+ query_mode = qm_d;
+ else if ( current_line == "i" )
+ query_mode = qm_i;
+ else if ( current_line == "o" )
+ query_mode = qm_o;
+ else if ( current_line == "w" )
+ query_mode = qm_w;
+ else if ( current_line == "nc" )
+ query_mode = qm_nc;
+ else if ( current_line == "nd" )
+ query_mode = qm_nd;
+ else if ( current_line == "ni" )
+ query_mode = qm_ni;
+ else if ( current_line == "no" )
+ query_mode = qm_no;
+ else if ( current_line == "nw" )
+ query_mode = qm_nw;
+ else if ( current_line == "all" )
+ query_mode = qm_all;
+ else if ( current_line == "ri" )
+ query_mode = qm_ri;
+ else if ( current_line == "pi" )
+ query_mode = qm_pi;
+ else if ( current_line == "mpi" )
+ query_mode = qm_mpi;
+ else if ( current_line == "si" )
+ query_mode = qm_si;
+ else if ( current_line == "lsi" )
+ query_mode = qm_lsi;
+ else if ( current_line == "path" )
+ query_mode = qm_path;
+
+ search();
+ glutPostRedisplay();
+ }
+
+ current_line.clear();
+ std::cout << '\n';
+ }
+ else
+ {
+ current_line += key;
+ std::cout << key;
+ }
+}
+
+// main function
+
+int main(int argc, char **argv)
+{
+ glutInit(&argc, argv);
+ glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
+ glutInitWindowPosition(100,100);
+ glutInitWindowSize(600, 600);
+ glutCreateWindow("boost::geometry::index::rtree GLUT test");
+
+ glutDisplayFunc(render_scene);
+ glutReshapeFunc(resize);
+ glutMouseFunc(mouse);
+ glutKeyboardFunc(keyboard);
+
+ glutMainLoop();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/random_test.cpp b/src/boost/libs/geometry/index/example/random_test.cpp
new file mode 100644
index 000000000..1c40d1553
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/random_test.cpp
@@ -0,0 +1,185 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/foreach.hpp>
+#include <boost/random.hpp>
+
+int main()
+{
+ namespace bg = boost::geometry;
+ namespace bgi = bg::index;
+
+ size_t values_count = 1000000;
+ size_t queries_count = 10000;
+ size_t nearest_queries_count = 10000;
+ unsigned neighbours_count = 10;
+
+ std::vector< std::pair<float, float> > coords;
+
+ //randomize values
+ {
+ boost::mt19937 rng;
+ //rng.seed(static_cast<unsigned int>(std::time(0)));
+ float max_val = static_cast<float>(values_count / 2);
+ boost::uniform_real<float> range(-max_val, max_val);
+ boost::variate_generator<boost::mt19937&, boost::uniform_real<float> > rnd(rng, range);
+
+ coords.reserve(values_count);
+
+ std::cout << "randomizing data\n";
+ for ( size_t i = 0 ; i < values_count ; ++i )
+ {
+ coords.push_back(std::make_pair(rnd(), rnd()));
+ }
+ std::cout << "randomized\n";
+ }
+
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+ typedef bg::model::box<P> B;
+ typedef bgi::rtree<B, bgi::linear<16, 4> > RT;
+ //typedef bgi::rtree<B, bgi::quadratic<8, 3> > RT;
+ //typedef bgi::rtree<B, bgi::rstar<8, 3> > RT;
+
+ std::cout << "sizeof rtree: " << sizeof(RT) << std::endl;
+
+ {
+ RT t;
+
+ // inserting
+ {
+ for (size_t i = 0 ; i < values_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ B b(P(x - 0.5f, y - 0.5f), P(x + 0.5f, y + 0.5f));
+
+ t.insert(b);
+ }
+ std::cout << "inserted values: " << values_count << '\n';
+ }
+
+ std::vector<B> result;
+ result.reserve(100);
+
+ // test
+ std::vector<size_t> spatial_query_data;
+ size_t spatial_query_index = 0;
+
+ {
+ size_t found_count = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ t.query(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))), std::back_inserter(result));
+
+ // test
+ spatial_query_data.push_back(result.size());
+ found_count += result.size();
+ }
+ std::cout << "spatial queries found: " << found_count << '\n';
+ }
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ {
+ size_t found_count = 0;
+ for (size_t i = 0 ; i < queries_count ; ++i )
+ {
+ float x = coords[i].first;
+ float y = coords[i].second;
+ result.clear();
+ std::copy(t.qbegin_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ t.qend_(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10)))),
+ std::back_inserter(result));
+
+ // test
+ if ( spatial_query_data[spatial_query_index] != result.size() )
+ std::cout << "Spatial query error - should be: " << spatial_query_data[spatial_query_index] << ", is: " << result.size() << '\n';
+ ++spatial_query_index;
+ found_count += result.size();
+ }
+ std::cout << "incremental spatial queries found: " << found_count << '\n';
+ }
+#endif
+
+ // test
+ std::vector<float> nearest_query_data;
+ size_t nearest_query_data_index = 0;
+
+ {
+ size_t found_count = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first + 100;
+ float y = coords[i].second + 100;
+ result.clear();
+ t.query(bgi::nearest(P(x, y), neighbours_count), std::back_inserter(result));
+
+ // test
+ {
+ float max_dist = 0;
+ BOOST_FOREACH(B const& b, result)
+ {
+ float curr_dist = bgi::detail::comparable_distance_near(P(x, y), b);
+ if ( max_dist < curr_dist )
+ max_dist = curr_dist;
+ }
+ nearest_query_data.push_back(max_dist);
+ }
+ found_count += result.size();
+ }
+ std::cout << "nearest queries found: " << found_count << '\n';
+ }
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ {
+ size_t found_count = 0;
+ for (size_t i = 0 ; i < nearest_queries_count ; ++i )
+ {
+ float x = coords[i].first + 100;
+ float y = coords[i].second + 100;
+ result.clear();
+
+ std::copy(t.qbegin_(bgi::nearest(P(x, y), neighbours_count)),
+ t.qend_(bgi::nearest(P(x, y), neighbours_count)),
+ std::back_inserter(result));
+
+ // test
+ {
+ float max_dist = 0;
+ BOOST_FOREACH(B const& b, result)
+ {
+ float curr_dist = bgi::detail::comparable_distance_near(P(x, y), b);
+ if ( max_dist < curr_dist )
+ max_dist = curr_dist;
+ }
+ if ( nearest_query_data_index < nearest_query_data.size() &&
+ nearest_query_data[nearest_query_data_index] != max_dist )
+ std::cout << "Max distance error - should be: " << nearest_query_data[nearest_query_data_index] << ", and is: " << max_dist << "\n";
+ ++nearest_query_data_index;
+ }
+ found_count += result.size();
+ }
+ std::cout << "incremental nearest queries found: " << found_count << '\n';
+ }
+#endif
+
+ std::cout << "finished\n";
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/example/serialize.cpp b/src/boost/libs/geometry/index/example/serialize.cpp
new file mode 100644
index 000000000..11ce08bc0
--- /dev/null
+++ b/src/boost/libs/geometry/index/example/serialize.cpp
@@ -0,0 +1,168 @@
+// Boost.Geometry Index
+// Additional tests
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <fstream>
+
+#define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/index/rtree.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/statistics.hpp>
+
+#include <boost/archive/binary_oarchive.hpp>
+#include <boost/archive/binary_iarchive.hpp>
+#include <boost/archive/xml_oarchive.hpp>
+#include <boost/archive/xml_iarchive.hpp>
+#include <boost/serialization/vector.hpp>
+
+#include <boost/foreach.hpp>
+#include <boost/timer.hpp>
+
+template <typename T, size_t I = 0, size_t S = boost::tuples::length<T>::value>
+struct print_tuple
+{
+ template <typename Os>
+ static inline Os & apply(Os & os, T const& t)
+ {
+ os << boost::get<I>(t) << ", ";
+ return print_tuple<T, I+1>::apply(os, t);
+ }
+};
+
+template <typename T, size_t S>
+struct print_tuple<T, S, S>
+{
+ template <typename Os>
+ static inline Os & apply(Os & os, T const&)
+ {
+ return os;
+ }
+};
+
+int main()
+{
+ namespace bg = boost::geometry;
+ namespace bgi = bg::index;
+
+ typedef boost::tuple<std::size_t, std::size_t, std::size_t, std::size_t, std::size_t, std::size_t> S;
+
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+ typedef bg::model::box<P> B;
+ typedef B V;
+ //typedef bgi::rtree<V, bgi::linear<16> > RT;
+ //typedef bgi::rtree<V, bgi::quadratic<8, 3> > RT;
+ //typedef bgi::rtree<V, bgi::rstar<8, 3> > RT;
+ typedef bgi::rtree<V, bgi::dynamic_linear > RT;
+
+ //RT tree;
+ RT tree(bgi::dynamic_linear(16));
+ std::vector<V> vect;
+
+ boost::timer t;
+
+ //insert values
+ {
+ for ( double x = 0 ; x < 1000 ; x += 1 )
+ for ( double y = 0 ; y < 1000 ; y += 1 )
+ vect.push_back(B(P(x, y), P(x+0.5, y+0.5)));
+ RT tmp(vect, tree.parameters());
+ tree = boost::move(tmp);
+ }
+ B q(P(5, 5), P(6, 6));
+ S s;
+
+ std::cout << "vector and tree created in: " << t.elapsed() << std::endl;
+
+ print_tuple<S>::apply(std::cout, bgi::detail::rtree::utilities::statistics(tree)) << std::endl;
+ std::cout << boost::get<0>(s) << std::endl;
+ BOOST_FOREACH(V const& v, tree | bgi::adaptors::queried(bgi::intersects(q)))
+ std::cout << bg::wkt<V>(v) << std::endl;
+
+ // save
+ {
+ std::ofstream ofs("serialized_vector.bin", std::ios::binary | std::ios::trunc);
+ boost::archive::binary_oarchive oa(ofs);
+ t.restart();
+ oa << vect;
+ std::cout << "vector saved to bin in: " << t.elapsed() << std::endl;
+ }
+ {
+ std::ofstream ofs("serialized_tree.bin", std::ios::binary | std::ios::trunc);
+ boost::archive::binary_oarchive oa(ofs);
+ t.restart();
+ oa << tree;
+ std::cout << "tree saved to bin in: " << t.elapsed() << std::endl;
+ }
+ {
+ std::ofstream ofs("serialized_tree.xml", std::ios::trunc);
+ boost::archive::xml_oarchive oa(ofs);
+ t.restart();
+ oa << boost::serialization::make_nvp("rtree", tree);
+ std::cout << "tree saved to xml in: " << t.elapsed() << std::endl;
+ }
+
+ t.restart();
+ vect.clear();
+ std::cout << "vector cleared in: " << t.elapsed() << std::endl;
+
+ t.restart();
+ tree.clear();
+ std::cout << "tree cleared in: " << t.elapsed() << std::endl;
+
+ // load
+
+ {
+ std::ifstream ifs("serialized_vector.bin", std::ios::binary);
+ boost::archive::binary_iarchive ia(ifs);
+ t.restart();
+ ia >> vect;
+ std::cout << "vector loaded from bin in: " << t.elapsed() << std::endl;
+ t.restart();
+ RT tmp(vect, tree.parameters());
+ tree = boost::move(tmp);
+ std::cout << "tree rebuilt from vector in: " << t.elapsed() << std::endl;
+ }
+
+ t.restart();
+ tree.clear();
+ std::cout << "tree cleared in: " << t.elapsed() << std::endl;
+
+ {
+ std::ifstream ifs("serialized_tree.bin", std::ios::binary);
+ boost::archive::binary_iarchive ia(ifs);
+ t.restart();
+ ia >> tree;
+ std::cout << "tree loaded from bin in: " << t.elapsed() << std::endl;
+ }
+
+ std::cout << "loaded from bin" << std::endl;
+ print_tuple<S>::apply(std::cout, bgi::detail::rtree::utilities::statistics(tree)) << std::endl;
+ BOOST_FOREACH(V const& v, tree | bgi::adaptors::queried(bgi::intersects(q)))
+ std::cout << bg::wkt<V>(v) << std::endl;
+
+ t.restart();
+ tree.clear();
+ std::cout << "tree cleared in: " << t.elapsed() << std::endl;
+
+ {
+ std::ifstream ifs("serialized_tree.xml");
+ boost::archive::xml_iarchive ia(ifs);
+ t.restart();
+ ia >> boost::serialization::make_nvp("rtree", tree);
+ std::cout << "tree loaded from xml in: " << t.elapsed() << std::endl;
+ }
+
+ std::cout << "loaded from xml" << std::endl;
+ print_tuple<S>::apply(std::cout, bgi::detail::rtree::utilities::statistics(tree)) << std::endl;
+ BOOST_FOREACH(V const& v, tree | bgi::adaptors::queried(bgi::intersects(q)))
+ std::cout << bg::wkt<V>(v) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/index.html b/src/boost/libs/geometry/index/index.html
new file mode 100644
index 000000000..ff0005b2a
--- /dev/null
+++ b/src/boost/libs/geometry/index/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=../doc/html/index.html">
+ </head>
+ <body>
+ Automatic redirection failed, click this
+ <a href="doc/html/index.html">link</a> &nbsp;<hr>
+ <p>Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates</p>
+ <p>Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file <a href="../../../LICENSE_1_0.txt">
+ LICENSE_1_0.txt</a> or copy at
+ <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
+ </body>
+</html>
diff --git a/src/boost/libs/geometry/index/meta/libraries.json b/src/boost/libs/geometry/index/meta/libraries.json
new file mode 100644
index 000000000..46b6fd932
--- /dev/null
+++ b/src/boost/libs/geometry/index/meta/libraries.json
@@ -0,0 +1,26 @@
+[
+ {
+ "key": "geometry/index",
+ "boost-version": "hidden",
+ "name": "Geometry Index",
+ "status": "hidden",
+ "authors": [
+ "Barend Gehrels",
+ "Bruno Lalande",
+ "Mateusz Loskot",
+ "Adam Wulkiewicz",
+ "Menelaos Karavelas"
+ ],
+ "maintainers": [
+ "Barend Gehrels <barend -at- xs4all.nl>",
+ "Bruno Lalande <bruno.lalande -at- gmail.com>",
+ "Mateusz Loskot <mateusz -at- loskot.net>",
+ "Adam Wulkiewicz <adam.wulkiewicz -at- gmail.com>"
+ ],
+ "description":
+ "The Boost.Geometry library provides geometric algorithms, primitives and spatial index.",
+ "category": [
+ "Algorithms", "Data", "Math"
+ ]
+ }
+]
diff --git a/src/boost/libs/geometry/index/test/Jamfile b/src/boost/libs/geometry/index/test/Jamfile
new file mode 100644
index 000000000..90fcbf425
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/Jamfile
@@ -0,0 +1,31 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import testing ;
+
+project boost-geometry-index-test
+ :
+ requirements
+ <include>. # libs/geometry/index/test
+ <include>../../test # libs/geometry/test
+ #<include>../../../../boost/geometry/extensions/contrib/ttmath
+ <toolset>msvc:<asynch-exceptions>on
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ <define>BOOST_NO_AUTO_PTR # disable the deprecated std::auto_ptr support in SmartPtr and Core
+ <library>/boost/timer//boost_timer
+ ;
+
+test-suite boost-geometry-index-varray
+ :
+ [ run varray_old.cpp ]
+ [ run varray.cpp ]
+ ;
+
+build-project algorithms ;
+build-project rtree ;
diff --git a/src/boost/libs/geometry/index/test/algorithms/Jamfile b/src/boost/libs/geometry/index/test/algorithms/Jamfile
new file mode 100644
index 000000000..1fe75c6fc
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/Jamfile
@@ -0,0 +1,20 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-index-algorithms
+ :
+ [ run content.cpp ]
+ [ run intersection_content.cpp ] # this tests overlap() too
+ [ run is_valid.cpp ]
+ [ run margin.cpp ]
+ #[ run minmaxdist.cpp ]
+ [ run union_content.cpp ]
+ [ run segment_intersection.cpp ]
+ [ run path_intersection.cpp ]
+ ;
+
diff --git a/src/boost/libs/geometry/index/test/algorithms/content.cpp b/src/boost/libs/geometry/index/test/algorithms/content.cpp
new file mode 100644
index 000000000..07644656c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/content.cpp
@@ -0,0 +1,71 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_content.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+//#define BOOST_GEOMETRY_TEST_DEBUG
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box;
+ bg::model::box<double_point_type> double_box;
+
+ std::string const box_li = "POLYGON((1536119 192000, 1872000 528000))";
+ bg::read_wkt(box_li, int_box);
+ bg::read_wkt(box_li, double_box);
+
+ double int_value = bgi::detail::content(int_box);
+ double double_value = bgi::detail::content(double_box);
+
+ BOOST_CHECK_CLOSE(int_value, double_value, 0.0001);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_content(P2ic(0, 0), 0);
+ test_content(P2fc(0, 0), 0);
+ test_content(P2dc(0, 0), 0);
+ test_content(P3ic(0, 0, 0), 0);
+ test_content(P3fc(0, 0, 0), 0);
+ test_content(P3dc(0, 0, 0), 0);
+
+ test_geometry<bg::model::box<P2ic> >("POLYGON((0 1,2 4))", 6.0);
+ test_geometry<bg::model::box<P2fc> >("POLYGON((0 1,2 4))", 6.0);
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", 6.0);
+ test_geometry<bg::model::box<P3ic> >("POLYGON((0 1 2,2 4 6))", 24.0);
+ test_geometry<bg::model::box<P3fc> >("POLYGON((0 1 2,2 4 6))", 24.0);
+ test_geometry<bg::model::box<P3dc> >("POLYGON((0 1 2,2 4 6))", 24.0);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc> >("POLYGON((0 1,2 4))", 6.0);
+ test_geometry<bg::model::box<P3ttmc> >("POLYGON((0 1 2,2 4 6))", 24.0);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/intersection_content.cpp b/src/boost/libs/geometry/index/test/algorithms/intersection_content.cpp
new file mode 100644
index 000000000..a668af790
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/intersection_content.cpp
@@ -0,0 +1,70 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_intersection_content.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+//#define BOOST_GEOMETRY_TEST_DEBUG
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box1, int_box2;
+ bg::model::box<double_point_type> double_box1, double_box2;
+
+ std::string const box_li1 = "POLYGON((1536119 192000, 1872000 528000))";
+ std::string const box_li2 = "POLYGON((1701234 368250, 2673400 777400))";
+ bg::read_wkt(box_li1, int_box1);
+ bg::read_wkt(box_li1, double_box1);
+ bg::read_wkt(box_li2, int_box2);
+ bg::read_wkt(box_li2, double_box2);
+
+ double int_value = bgi::detail::intersection_content(int_box1, int_box2);
+ double double_value = bgi::detail::intersection_content(double_box1, double_box2);
+
+ BOOST_CHECK_CLOSE(int_value, double_value, 0.0001);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_geometry<bg::model::box<P2ic> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0);
+ test_geometry<bg::model::box<P2fc> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0);
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0);
+ test_geometry<bg::model::box<P3ic> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 6.0);
+ test_geometry<bg::model::box<P3fc> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 6.0);
+ test_geometry<bg::model::box<P3dc> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 6.0);
+
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", "POLYGON((2 1,3 4))", 0.0);
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", "POLYGON((2 4,3 5))", 0.0);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0);
+ test_geometry<bg::model::box<P3ttmc> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 6.0);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/is_valid.cpp b/src/boost/libs/geometry/index/test/algorithms/is_valid.cpp
new file mode 100644
index 000000000..4c0584a0f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/is_valid.cpp
@@ -0,0 +1,110 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/is_valid.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+//#define BOOST_GEOMETRY_TEST_DEBUG
+
+template <typename Geometry>
+void test(Geometry const& geometry, bool expected_value)
+{
+ bool value = bgi::detail::is_valid(geometry);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " "
+ << typeid(bool).name()
+ << " "
+ << "is_valid : " << value
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK(value == expected_value);
+}
+
+template <typename Box>
+void test_box(std::string const& wkt, bool expected_value)
+{
+ Box box;
+ bg::read_wkt(wkt, box);
+ test(box, expected_value);
+ typename bg::point_type<Box>::type temp_pt;
+ temp_pt = box.min_corner();
+ box.min_corner() = box.max_corner();
+ box.max_corner() = temp_pt;
+ test(box, !expected_value);
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box;
+ bg::model::box<double_point_type> double_box;
+
+ std::string const box_li = "POLYGON((1536119 192000, 1872000 528000))";
+ bg::read_wkt(box_li, int_box);
+ bg::read_wkt(box_li, double_box);
+
+ BOOST_CHECK(bgi::detail::is_valid(int_box) == bgi::detail::is_valid(double_box));
+
+ std::string const box_li2 = "POLYGON((1872000 528000, 1536119 192000))";
+ bg::read_wkt(box_li2, int_box);
+ bg::read_wkt(box_li2, double_box);
+
+ BOOST_CHECK(bgi::detail::is_valid(int_box) == bgi::detail::is_valid(double_box));
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test(P2ic(0, 0), true);
+ test(P2fc(0, 0), true);
+ test(P2dc(0, 0), true);
+ test(P3ic(0, 0, 0), true);
+ test(P3fc(0, 0, 0), true);
+ test(P3dc(0, 0, 0), true);
+
+ test_box<bg::model::box<P2ic> >("POLYGON((0 1,2 4))", true);
+ test_box<bg::model::box<P2fc> >("POLYGON((0 1,2 4))", true);
+ test_box<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", true);
+ test_box<bg::model::box<P3ic> >("POLYGON((0 1 2,2 4 6))", true);
+ test_box<bg::model::box<P3fc> >("POLYGON((0 1 2,2 4 6))", true);
+ test_box<bg::model::box<P3dc> >("POLYGON((0 1 2,2 4 6))", true);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc> >("POLYGON((0 1,2 4))", true);
+ test_geometry<bg::model::box<P3ttmc> >("POLYGON((0 1 2,2 4 6))", true);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/margin.cpp b/src/boost/libs/geometry/index/test/algorithms/margin.cpp
new file mode 100644
index 000000000..e1e9eab09
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/margin.cpp
@@ -0,0 +1,66 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_margin.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+//#define BOOST_GEOMETRY_TEST_DEBUG
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box;
+ bg::model::box<double_point_type> double_box;
+
+ std::string const box_li = "POLYGON((1536119 192000, 1872000 528000))";
+ bg::read_wkt(box_li, int_box);
+ bg::read_wkt(box_li, double_box);
+
+ double int_value = bgi::detail::comparable_margin(int_box);
+ double double_value = bgi::detail::comparable_margin(double_box);
+
+ BOOST_CHECK_CLOSE(int_value, double_value, 0.0001);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_geometry<bg::model::box<P2ic> >("POLYGON((0 1,2 4))", 5);
+ test_geometry<bg::model::box<P2fc> >("POLYGON((0 1,2 4))", 5.0);
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", 5.0);
+ test_geometry<bg::model::box<P3ic> >("POLYGON((0 1 2,2 4 6))", 9);
+ test_geometry<bg::model::box<P3fc> >("POLYGON((0 1 2,2 4 6))", 9.0);
+ test_geometry<bg::model::box<P3dc> >("POLYGON((0 1 2,2 4 6))", 9.0);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc> >("POLYGON((0 1,2 4))", 10.0);
+ test_geometry<bg::model::box<P3ttmc> >("POLYGON((0 1 2,2 4 6))", 52.0);
+#endif
+
+ test_large_integers();
+
+ // test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/minmaxdist.cpp b/src/boost/libs/geometry/index/test/algorithms/minmaxdist.cpp
new file mode 100644
index 000000000..4534b2f3c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/minmaxdist.cpp
@@ -0,0 +1,101 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/minmaxdist.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+#define BOOST_GEOMETRY_TEST_DEBUG
+
+template <typename Point, typename Indexable>
+void test(Point const& pt, Indexable const& indexable,
+ typename bg::default_distance_result<Point, Indexable>::type expected_value)
+{
+ typename bg::default_distance_result<Point, Indexable>::type value = bgi::detail::minmaxdist(pt, indexable);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Point>::type).name()
+ << " "
+ << typeid(typename bg::coordinate_type<Indexable>::type).name()
+ << " "
+ << typeid(bg::default_distance_result<Point, Indexable>::type).name()
+ << " "
+ << "minmaxdist : " << value
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(value, expected_value, 0.0001);
+}
+
+template <typename Indexable, typename Point>
+void test_indexable(Point const& pt, std::string const& wkt,
+ typename bg::default_distance_result<Point, Indexable>::type expected_value)
+{
+ Indexable indexable;
+ bg::read_wkt(wkt, indexable);
+ test(pt, indexable, expected_value);
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ int_point_type int_pt(0, 0);
+ double_point_type double_pt(0, 0);
+
+ bg::model::box<int_point_type> int_box;
+ bg::model::box<double_point_type> double_box;
+
+ std::string const box_li = "POLYGON((1536119 192000, 1872000 528000))";
+ bg::read_wkt(box_li, int_box);
+ bg::read_wkt(box_li, double_box);
+
+ BOOST_CHECK(bgi::detail::minmaxdist(int_pt, int_box) == bgi::detail::minmaxdist(double_pt, double_box));
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_indexable<bg::model::box<P2ic> >(P2ic(1, 2), "POLYGON((0 1,2 4))", 5.0);
+ test_indexable<bg::model::box<P2fc> >(P2fc(1, 2), "POLYGON((0 1,2 4))", 5.0);
+ test_indexable<bg::model::box<P2dc> >(P2dc(1, 2), "POLYGON((0 1,2 4))", 5.0);
+ test_indexable<bg::model::box<P3ic> >(P3ic(1, 2, 3), "POLYGON((0 1 2,2 4 6))", 14.0);
+ test_indexable<bg::model::box<P3fc> >(P3fc(1, 2, 3), "POLYGON((0 1 2,2 4 6))", 14.0);
+ test_indexable<bg::model::box<P3dc> >(P3dc(1, 2, 3), "POLYGON((0 1 2,2 4 6))", 14.0);
+
+ test_indexable<bg::model::box<P2ic> >(P2ic(1, 2), "POLYGON((1 2,3 5))", 4.0);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_indexable<bg::model::box<P2ttmc> >(P2ttmc(1, 2), "POLYGON((0 1,2 4))", 5.0);
+ test_indexable<bg::model::box<P3ttmc> >(P3ttmc(1, 2, 3), "POLYGON((0 1 2,2 4 6))", 14.0);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/path_intersection.cpp b/src/boost/libs/geometry/index/test/algorithms/path_intersection.cpp
new file mode 100644
index 000000000..2670d0775
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/path_intersection.cpp
@@ -0,0 +1,133 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/path_intersection.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+//#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Box, typename Linestring>
+void test_path_intersection(Box const& box, Linestring const& path,
+ bool expected_result,
+ typename bg::default_length_result<Linestring>::type expected_dist)
+{
+ typename bgi::detail::default_path_intersection_distance_type<Box, Linestring>::type dist;
+
+ bool value = bgi::detail::path_intersection(box, path, dist);
+ BOOST_CHECK(value == expected_result);
+ if ( value && expected_result )
+ BOOST_CHECK_CLOSE(dist, expected_dist, 0.0001);
+
+ if ( ::boost::size(path) == 2 )
+ {
+ typedef typename ::boost::range_value<Linestring>::type P;
+ typedef bg::model::segment<P> Seg;
+ typename bgi::detail::default_path_intersection_distance_type<Box, Seg>::type dist;
+ Seg seg(*::boost::begin(path), *(::boost::begin(path)+1));
+ bool value = bgi::detail::path_intersection(box, seg, dist);
+ BOOST_CHECK(value == expected_result);
+ if ( value && expected_result )
+ BOOST_CHECK_CLOSE(dist, expected_dist, 0.0001);
+ }
+}
+
+template <typename Box, typename Linestring>
+void test_geometry(std::string const& wkt_g, std::string const& wkt_path,
+ bool expected_result,
+ typename bg::default_length_result<Linestring>::type expected_dist)
+{
+ Box box;
+ bg::read_wkt(wkt_g, box);
+ Linestring path;
+ bg::read_wkt(wkt_path, path);
+ test_path_intersection(box, path, expected_result, expected_dist);
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box;
+ bg::model::box<double_point_type> double_box;
+ typedef bg::model::linestring<int_point_type> IP;
+ IP int_path;
+ typedef bg::model::linestring<double_point_type> DP;
+ DP double_path;
+
+ std::string const str_box = "POLYGON((1536119 192000, 1872000 528000))";
+ std::string const str_path = "LINESTRING(1535000 191000, 1873000 191000, 1873000 300000, 1536119 300000)";
+ bg::read_wkt(str_box, int_box);
+ bg::read_wkt(str_box, double_box);
+ bg::read_wkt(str_path, int_path);
+ bg::read_wkt(str_path, double_path);
+
+ bg::default_length_result<IP>::type int_value;
+ bool int_result = bgi::detail::path_intersection(int_box, int_path, int_value);
+ bg::default_length_result<DP>::type double_value;
+ bool double_result = bgi::detail::path_intersection(double_box, double_path, double_value);
+
+ BOOST_CHECK(int_result == double_result);
+ if ( int_result && double_result )
+ BOOST_CHECK_CLOSE(int_value, double_value, 0.0001);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ typedef bg::model::linestring<P2ic> L2ic;
+ typedef bg::model::linestring<P2fc> L2fc;
+ typedef bg::model::linestring<P2dc> L2dc;
+
+ typedef bg::model::linestring<P3ic> L3ic;
+ typedef bg::model::linestring<P3fc> L3fc;
+ typedef bg::model::linestring<P3dc> L3dc;
+
+ // IMPORTANT! For 2-point linestrings comparable distance optimization is enabled!
+
+ test_geometry<bg::model::box<P2ic>, L2ic>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 2 5)", true, 1.0f/5);
+ test_geometry<bg::model::box<P2fc>, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 2 5)", true, 1.0f/5);
+ test_geometry<bg::model::box<P2dc>, L2dc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 2 5)", true, 1.0/5);
+ test_geometry<bg::model::box<P3ic>, L3ic>("POLYGON((0 1 2,2 4 6))", "LINESTRING(0 0 0, 2 5 7)", true, 2.0f/7);
+ test_geometry<bg::model::box<P3fc>, L3fc>("POLYGON((0 1 2,2 4 6))", "LINESTRING(0 0 0, 2 5 7)", true, 2.0f/7);
+ test_geometry<bg::model::box<P3dc>, L3dc>("POLYGON((0 1 2,2 4 6))", "LINESTRING(0 0 0, 2 5 7)", true, 2.0/7);
+
+ test_geometry<bg::model::box<P2fc>, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 1 0, 1 5)", true, 2);
+ test_geometry<bg::model::box<P2fc>, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 3 0, 3 2, 0 2)", true, 6);
+ test_geometry<bg::model::box<P2fc>, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(1 2, 3 3, 0 3)", true, 0);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ typedef bg::model::linestring<P2ttmc> L2ttmc;
+ typedef bg::model::linestring<P3ttmc> L3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc>, L2ttmc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 2 5)", true, 1.0/5);
+ test_geometry<bg::model::box<P3ttmc>, L3ttmc>("POLYGON((0 1 2,2 4 6))", "LINESTRING(0 0 0, 2 5 7)", true, 2.0/7);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/segment_intersection.cpp b/src/boost/libs/geometry/index/test/algorithms/segment_intersection.cpp
new file mode 100644
index 000000000..1cc6dc22b
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/segment_intersection.cpp
@@ -0,0 +1,129 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/segment_intersection.hpp>
+
+//#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Box, typename Point, typename RelativeDistance>
+void test_segment_intersection(Box const& box, Point const& p0, Point const& p1,
+ bool expected_result,
+ RelativeDistance expected_rel_dist)
+{
+ RelativeDistance rel_dist;
+ bool value = bgi::detail::segment_intersection(box, p0, p1, rel_dist);
+ BOOST_CHECK(value == expected_result);
+ if ( value && expected_result )
+ BOOST_CHECK_CLOSE(rel_dist, expected_rel_dist, 0.0001);
+}
+
+template <typename Box, typename Point, typename RelativeDistance>
+void test_geometry(std::string const& wkt_g, std::string const& wkt_p0, std::string const& wkt_p1,
+ bool expected_result,
+ RelativeDistance expected_rel_dist)
+{
+ Box box;
+ bg::read_wkt(wkt_g, box);
+ Point p0, p1;
+ bg::read_wkt(wkt_p0, p0);
+ bg::read_wkt(wkt_p1, p1);
+ test_segment_intersection(box, p0, p1, expected_result, expected_rel_dist);
+}
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box;
+ bg::model::box<double_point_type> double_box;
+ int_point_type int_p0, int_p1;
+ double_point_type double_p0, double_p1;
+
+ std::string const str_box = "POLYGON((1536119 192000, 1872000 528000))";
+ std::string const str_p0 = "POINT(1535000 191000)";
+ std::string const str_p1 = "POINT(1873000 529000)";
+ bg::read_wkt(str_box, int_box);
+ bg::read_wkt(str_box, double_box);
+ bg::read_wkt(str_p0, int_p0);
+ bg::read_wkt(str_p1, int_p1);
+ bg::read_wkt(str_p0, double_p0);
+ bg::read_wkt(str_p1, double_p1);
+
+ float int_value;
+ bool int_result = bgi::detail::segment_intersection(int_box, int_p0, int_p1, int_value);
+ double double_value;
+ bool double_result = bgi::detail::segment_intersection(double_box, double_p0, double_p1, double_value);
+ BOOST_CHECK(int_result == double_result);
+ if ( int_result && double_result )
+ BOOST_CHECK_CLOSE(int_value, double_value, 0.0001);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_geometry<bg::model::box<P2ic>, P2ic>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0f/5);
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0f/5);
+ test_geometry<bg::model::box<P2dc>, P2dc>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0/5);
+ test_geometry<bg::model::box<P3ic>, P3ic>("POLYGON((0 1 2,2 4 6))", "POINT(0 0 0)", "POINT(2 5 7)", true, 2.0f/7);
+ test_geometry<bg::model::box<P3fc>, P3fc>("POLYGON((0 1 2,2 4 6))", "POINT(0 0 0)", "POINT(2 5 7)", true, 2.0f/7);
+ test_geometry<bg::model::box<P3dc>, P3dc>("POLYGON((0 1 2,2 4 6))", "POINT(0 0 0)", "POINT(2 5 7)", true, 2.0/7);
+
+ test_geometry<bg::model::box<P2ic>, P2ic>("POLYGON((0 1,2 4))", "POINT(3 4)", "POINT(0 0)", true, 1.0f/3);
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(3 4)", "POINT(0 2)", true, 1.0f/3);
+ test_geometry<bg::model::box<P2dc>, P2dc>("POLYGON((0 1,2 4))", "POINT(3 4)", "POINT(0 2)", true, 1.0/3);
+ test_geometry<bg::model::box<P3ic>, P3ic>("POLYGON((0 1 2,2 4 6))", "POINT(3 5 6)", "POINT(0 3 3)", true, 1.0f/2);
+ test_geometry<bg::model::box<P3fc>, P3fc>("POLYGON((0 1 2,2 4 6))", "POINT(3 5 6)", "POINT(0 3 3)", true, 1.0f/2);
+ test_geometry<bg::model::box<P3dc>, P3dc>("POLYGON((0 1 2,2 4 6))", "POINT(3 5 6)", "POINT(0 3 3)", true, 1.0/2);
+
+ test_geometry<bg::model::box<P2ic>, P2ic>("POLYGON((0 1,2 4))", "POINT(1 0)", "POINT(1 5)", true, 1.0f/5);
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(1 5)", "POINT(1 0)", true, 1.0f/5);
+ test_geometry<bg::model::box<P2dc>, P2dc>("POLYGON((0 1,2 4))", "POINT(1 0)", "POINT(1 5)", true, 1.0/5);
+ test_geometry<bg::model::box<P3ic>, P3ic>("POLYGON((0 1 2,2 4 6))", "POINT(1 3 0)", "POINT(1 3 7)", true, 2.0f/7);
+ test_geometry<bg::model::box<P3fc>, P3fc>("POLYGON((0 1 2,2 4 6))", "POINT(1 3 7)", "POINT(1 3 0)", true, 1.0f/7);
+ test_geometry<bg::model::box<P3dc>, P3dc>("POLYGON((0 1 2,2 4 6))", "POINT(1 3 0)", "POINT(1 3 7)", true, 2.0/7);
+
+ test_geometry<bg::model::box<P2ic>, P2ic>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(0 5)", true, 0.2f);
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(0 5)", "POINT(0 0)", true, 0.2f);
+ test_geometry<bg::model::box<P2dc>, P2dc>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(0 5)", true, 0.2);
+
+ test_geometry<bg::model::box<P2ic>, P2ic>("POLYGON((0 1,2 4))", "POINT(3 0)", "POINT(3 5)", false, 0.0f);
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(3 5)", "POINT(3 0)", false, 0.0f);
+ test_geometry<bg::model::box<P2dc>, P2dc>("POLYGON((0 1,2 4))", "POINT(3 0)", "POINT(3 5)", false, 0.0);
+
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(1 0)", "POINT(1 1)", true, 1.0f);
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(1 4)", "POINT(1 5)", true, 0.0f);
+
+ test_geometry<bg::model::box<P2fc>, P2fc>("POLYGON((0 1,2 4))", "POINT(0.5 2)", "POINT(1.5 3)", true, 0.0f);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc>, P2ttmc>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0f/5);
+ test_geometry<bg::model::box<P3ttmc>, P3ttmc>("POLYGON((0 1 2,2 4 6))", "POINT(0 0 0)", "POINT(2 5 7)", true, 2.0f/7);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/algorithms/test_content.hpp b/src/boost/libs/geometry/index/test/algorithms/test_content.hpp
new file mode 100644
index 000000000..92282f8bb
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/test_content.hpp
@@ -0,0 +1,49 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_CONTENT_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_CONTENT_HPP
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/content.hpp>
+
+//#include <boost/geometry/io/wkt/read.hpp>
+
+
+template <typename Geometry>
+void test_content(Geometry const& geometry,
+ typename bgi::detail::default_content_result<Geometry>::type expected_value)
+{
+ typename bgi::detail::default_content_result<Geometry>::type value = bgi::detail::content(geometry);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " "
+ << typeid(typename bgi::detail::default_content_result<Geometry>::type).name()
+ << " "
+ << "content : " << value
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(value, expected_value, 0.0001);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ typename bgi::detail::default_content_result<Geometry>::type expected_value)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_content(geometry, expected_value);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/index/test/algorithms/test_intersection_content.hpp b/src/boost/libs/geometry/index/test/algorithms/test_intersection_content.hpp
new file mode 100644
index 000000000..1445f8f40
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/test_intersection_content.hpp
@@ -0,0 +1,47 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_INTERSECTION_CONTENT_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_INTERSECTION_CONTENT_HPP
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/intersection_content.hpp>
+
+template <typename Geometry>
+void test_intersection_content(Geometry const& geometry1, Geometry const& geometry2,
+ typename bgi::detail::default_content_result<Geometry>::type expected_value)
+{
+ typename bgi::detail::default_content_result<Geometry>::type value = bgi::detail::intersection_content(geometry1, geometry2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " "
+ << typeid(typename bgi::detail::default_content_result<Geometry>::type).name()
+ << " "
+ << "intersection_content : " << value
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(value, expected_value, 0.0001);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ typename bgi::detail::default_content_result<Geometry>::type expected_value)
+{
+ Geometry geometry1, geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ test_intersection_content(geometry1, geometry2, expected_value);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/index/test/algorithms/test_margin.hpp b/src/boost/libs/geometry/index/test/algorithms/test_margin.hpp
new file mode 100644
index 000000000..8146b7fe0
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/test_margin.hpp
@@ -0,0 +1,48 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_MARGIN_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_MARGIN_HPP
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/margin.hpp>
+
+//#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Geometry>
+void test_margin(Geometry const& geometry,
+ typename bgi::detail::default_margin_result<Geometry>::type expected_value)
+{
+ typename bgi::detail::default_margin_result<Geometry>::type value = bgi::detail::comparable_margin(geometry);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " "
+ << typeid(typename bgi::detail::default_margin_result<Geometry>::type).name()
+ << " "
+ << "content : " << value
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(value, expected_value, 0.0001);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ typename bgi::detail::default_margin_result<Geometry>::type expected_value)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_margin(geometry, expected_value);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/index/test/algorithms/test_union_content.hpp b/src/boost/libs/geometry/index/test/algorithms/test_union_content.hpp
new file mode 100644
index 000000000..b2648c471
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/test_union_content.hpp
@@ -0,0 +1,47 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_UNION_CONTENT_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_UNION_CONTENT_HPP
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/detail/algorithms/union_content.hpp>
+
+template <typename Geometry>
+void test_union_content(Geometry const& geometry1, Geometry const& geometry2,
+ typename bgi::detail::default_content_result<Geometry>::type expected_value)
+{
+ typename bgi::detail::default_content_result<Geometry>::type value = bgi::detail::union_content(geometry1, geometry2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " "
+ << typeid(typename bgi::detail::default_content_result<Geometry>::type).name()
+ << " "
+ << "union_content : " << value
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(value, expected_value, 0.0001);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ typename bgi::detail::default_content_result<Geometry>::type expected_value)
+{
+ Geometry geometry1, geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ test_union_content(geometry1, geometry2, expected_value);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/index/test/algorithms/union_content.cpp b/src/boost/libs/geometry/index/test/algorithms/union_content.cpp
new file mode 100644
index 000000000..beaa17136
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/algorithms/union_content.cpp
@@ -0,0 +1,70 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_union_content.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+//#define BOOST_GEOMETRY_TEST_DEBUG
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::box<int_point_type> int_box1, int_box2;
+ bg::model::box<double_point_type> double_box1, double_box2;
+
+ std::string const box_li1 = "POLYGON((1536119 192000, 1872000 528000))";
+ std::string const box_li2 = "POLYGON((1701234 368250, 2673400 777400))";
+ bg::read_wkt(box_li1, int_box1);
+ bg::read_wkt(box_li1, double_box1);
+ bg::read_wkt(box_li2, int_box2);
+ bg::read_wkt(box_li2, double_box2);
+
+ double int_value = bgi::detail::union_content(int_box1, int_box2);
+ double double_value = bgi::detail::union_content(double_box1, double_box2);
+
+ BOOST_CHECK_CLOSE(int_value, double_value, 0.0001);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_geometry<bg::model::box<P2ic> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0);
+ test_geometry<bg::model::box<P2fc> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0);
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0);
+ test_geometry<bg::model::box<P3ic> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 60.0);
+ test_geometry<bg::model::box<P3fc> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 60.0);
+ test_geometry<bg::model::box<P3dc> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 60.0);
+
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", "POLYGON((2 1,3 4))", 9.0);
+ test_geometry<bg::model::box<P2dc> >("POLYGON((0 1,2 4))", "POLYGON((2 4,3 5))", 12.0);
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_geometry<bg::model::box<P2ttmc> >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0);
+ test_geometry<bg::model::box<P3ttmc> >("POLYGON((0 1 2,2 4 6))", "POLYGON((1 2 3,3 5 7))", 60.0);
+#endif
+
+ test_large_integers();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/geometry_index_test_common.hpp b/src/boost/libs/geometry/index/test/geometry_index_test_common.hpp
new file mode 100644
index 000000000..4a2ac615c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/geometry_index_test_common.hpp
@@ -0,0 +1,28 @@
+// Boost.Geometry Index
+// Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_GEOMETRY_INDEX_TEST_COMMON_HPP
+#define GEOMETRY_TEST_GEOMETRY_INDEX_TEST_COMMON_HPP
+
+#if defined(_MSC_VER)
+
+//#pragma warning (disable : 4996) // deprecated functions
+//#pragma warning (disable : 4100) // unreferenced formal parameter
+//#pragma warning (disable : 4127) // conditional expression is constant
+
+#endif // _MSC_VER
+
+#include <boost/geometry.hpp>
+
+#include <geometry_test_common.hpp>
+
+namespace boost { namespace geometry { namespace index {}}}
+namespace bgi = boost::geometry::index;
+
+#endif // GEOMETRY_TEST_GEOMETRY_INDEX_TEST_COMMON_HPP
diff --git a/src/boost/libs/geometry/index/test/movable.hpp b/src/boost/libs/geometry/index/test/movable.hpp
new file mode 100644
index 000000000..c1dd278e7
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/movable.hpp
@@ -0,0 +1,92 @@
+// Boost.Geometry.Index varray
+// Unit Test
+
+// Copyright (c) 2009 Ion Gaztanaga
+// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_MOVABLE_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_MOVABLE_HPP
+
+//[movable_definition
+//header file "movable.hpp"
+#include <boost/move/move.hpp>
+
+//A movable class
+class movable
+{
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(movable)
+ int value_;
+
+public:
+ movable() : value_(1){}
+
+ //Move constructor and assignment
+ movable(BOOST_RV_REF(movable) m)
+ { value_ = m.value_; m.value_ = 0; }
+
+ movable & operator=(BOOST_RV_REF(movable) m)
+ { value_ = m.value_; m.value_ = 0; return *this; }
+
+ bool moved() const //Observer
+ { return value_ == 0; }
+};
+
+
+class copy_movable
+{
+ BOOST_COPYABLE_AND_MOVABLE(copy_movable)
+ size_t value_;
+
+public:
+ copy_movable(size_t value = 1) : value_(value){}
+
+ //Move constructor and assignment
+ copy_movable(BOOST_RV_REF(copy_movable) m)
+ { value_ = m.value_; m.value_ = 0; }
+
+ copy_movable(const copy_movable &m)
+ { value_ = m.value_; }
+
+ copy_movable & operator=(BOOST_RV_REF(copy_movable) m)
+ { value_ = m.value_; m.value_ = 0; return *this; }
+
+ copy_movable & operator=(BOOST_COPY_ASSIGN_REF(copy_movable) m)
+ { value_ = m.value_; return *this; }
+
+ bool moved() const //Observer
+ { return value_ == 0; }
+
+ bool operator==(const copy_movable& m) const
+ { return value_ == m.value_; }
+};
+
+struct copy_movable_wrapper
+{
+ copy_movable cm;
+};
+
+copy_movable produce()
+{ return copy_movable(); }
+
+namespace boost{
+
+template<>
+struct has_nothrow_move<movable>
+{
+ static const bool value = true;
+};
+
+template<>
+struct has_nothrow_move<copy_movable>
+{
+ static const bool value = true;
+};
+
+} //namespace boost{
+//]
+
+#endif //BOOST_GEOMETRY_INDEX_TEST_MOVABLE_HPP
diff --git a/src/boost/libs/geometry/index/test/rtree/Jamfile b/src/boost/libs/geometry/index/test/rtree/Jamfile
new file mode 100644
index 000000000..c930e8a3f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/Jamfile
@@ -0,0 +1,23 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2016 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+build-project exceptions ;
+build-project interprocess ;
+build-project generated ;
+
+test-suite boost-geometry-index-rtree
+ :
+ [ run rtree_contains_point.cpp ]
+ [ run rtree_epsilon.cpp ]
+ [ run rtree_insert_remove.cpp ]
+ [ run rtree_intersects_geom.cpp ]
+ [ run rtree_move_pack.cpp ]
+ [ run rtree_non_cartesian.cpp ]
+ [ run rtree_values.cpp ]
+ [ compile-fail rtree_values_invalid.cpp ]
+ ;
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/Jamfile b/src/boost/libs/geometry/index/test/rtree/exceptions/Jamfile
new file mode 100644
index 000000000..84855c4fd
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/Jamfile
@@ -0,0 +1,27 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-exceptions : [ test_all r ] ;
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_lin.cpp b/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_lin.cpp
new file mode 100644
index 000000000..74c0ba6d0
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_lin.cpp
@@ -0,0 +1,20 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/exceptions/test_exceptions.hpp>
+
+int test_main(int, char* [])
+{
+ test_rtree_value_exceptions< bgi::linear<4, 2> >();
+ test_rtree_value_exceptions(bgi::dynamic_linear(4, 2));
+
+ test_rtree_elements_exceptions< bgi::linear_throwing<4, 2> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_qua.cpp b/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_qua.cpp
new file mode 100644
index 000000000..5dde64a8d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_qua.cpp
@@ -0,0 +1,20 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/exceptions/test_exceptions.hpp>
+
+int test_main(int, char* [])
+{
+ test_rtree_value_exceptions< bgi::quadratic<4, 2> >();
+ test_rtree_value_exceptions(bgi::dynamic_quadratic(4, 2));
+
+ test_rtree_elements_exceptions< bgi::quadratic_throwing<4, 2> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_rst.cpp b/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_rst.cpp
new file mode 100644
index 000000000..c09e2d378
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/rtree_exceptions_rst.cpp
@@ -0,0 +1,20 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/exceptions/test_exceptions.hpp>
+
+int test_main(int, char* [])
+{
+ test_rtree_value_exceptions< bgi::rstar<4, 2> >();
+ test_rtree_value_exceptions(bgi::dynamic_rstar(4, 2));
+
+ test_rtree_elements_exceptions< bgi::rstar_throwing<4, 2> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp b/src/boost/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp
new file mode 100644
index 000000000..df85e217c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp
@@ -0,0 +1,209 @@
+// Boost.Geometry Index
+//
+// R-tree nodes based on runtime-polymorphism, storing static-size containers
+// test version throwing exceptions on creation
+//
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+//
+// This file was modified by Oracle on 2019.
+// Modifications copyright (c) 2019 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_RTREE_EXCEPTIONS_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_RTREE_EXCEPTIONS_HPP
+
+#include <rtree/test_rtree.hpp>
+
+#include <rtree/exceptions/test_throwing.hpp>
+#include <rtree/exceptions/test_throwing_node.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+// test value exceptions
+template <typename Parameters>
+void test_rtree_value_exceptions(Parameters const& parameters = Parameters())
+{
+ typedef std::pair<bg::model::point<float, 2, bg::cs::cartesian>, throwing_value> Value;
+ typedef bgi::rtree<Value, Parameters> Tree;
+ typedef typename Tree::bounds_type B;
+
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls((std::numeric_limits<size_t>::max)());
+ std::vector<Value> input;
+ B qbox;
+ generate::input<2>::apply(input, qbox);
+
+ for ( size_t i = 0 ; i < 50 ; i += 2 )
+ {
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(10000);
+
+ Tree tree(parameters);
+
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(i);
+
+ BOOST_CHECK_THROW( tree.insert(input.begin(), input.end()), throwing_value_copy_exception );
+
+ BOOST_CHECK(bgi::detail::rtree::utilities::are_counts_ok(tree, false));
+ }
+
+ for ( size_t i = 0 ; i < 20 ; i += 1 )
+ {
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(i);
+
+ BOOST_CHECK_THROW( Tree tree(input.begin(), input.end(), parameters), throwing_value_copy_exception );
+ }
+
+ for ( size_t i = 0 ; i < 10 ; i += 1 )
+ {
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(10000);
+
+ Tree tree(parameters);
+
+ tree.insert(input.begin(), input.end());
+
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(i);
+
+ BOOST_CHECK_THROW( tree.remove(input.begin(), input.end()), throwing_value_copy_exception );
+
+ BOOST_CHECK(bgi::detail::rtree::utilities::are_counts_ok(tree, false));
+ }
+
+ for ( size_t i = 0 ; i < 20 ; i += 2 )
+ {
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(10000);
+
+ Tree tree(parameters);
+
+ tree.insert(input.begin(), input.end());
+
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(i);
+
+ BOOST_CHECK_THROW( Tree tree2(tree), throwing_value_copy_exception );
+ }
+
+ for ( size_t i = 0 ; i < 20 ; i += 2 )
+ {
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(10000);
+
+ Tree tree(parameters);
+ Tree tree2(parameters);
+
+ tree.insert(input.begin(), input.end());
+
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(i);
+
+ BOOST_CHECK_THROW(tree2 = tree, throwing_value_copy_exception );
+
+ BOOST_CHECK(tree2.empty());
+ }
+}
+
+// test value exceptions
+template <typename Parameters>
+void test_rtree_elements_exceptions(Parameters const& parameters = Parameters())
+{
+ typedef std::pair<bg::model::point<float, 2, bg::cs::cartesian>, throwing_value> Value;
+ typedef bgi::rtree<Value, Parameters> Tree;
+ typedef typename Tree::bounds_type B;
+
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls((std::numeric_limits<size_t>::max)());
+
+ std::vector<Value> input;
+ B qbox;
+ generate::input<2>::apply(input, qbox, 2);
+
+ for ( size_t i = 0 ; i < 100 ; i += 2 )
+ {
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(10000);
+
+ Tree tree(parameters);
+
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(i);
+
+ BOOST_CHECK_THROW( tree.insert(input.begin(), input.end()), throwing_varray_exception );
+
+ BOOST_CHECK(bgi::detail::rtree::utilities::are_counts_ok(tree, false));
+ }
+
+ for ( size_t i = 0 ; i < 100 ; i += 2 )
+ {
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(i);
+
+ throwing_nodes_stats::reset_counters();
+
+ BOOST_CHECK_THROW( Tree tree(input.begin(), input.end(), parameters), throwing_varray_exception );
+
+ BOOST_CHECK_EQUAL(throwing_nodes_stats::internal_nodes_count(), 0u);
+ BOOST_CHECK_EQUAL(throwing_nodes_stats::leafs_count(), 0u);
+ }
+
+ for ( size_t i = 0 ; i < 50 ; i += 2 )
+ {
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(10000);
+
+ Tree tree(parameters);
+
+ tree.insert(input.begin(), input.end());
+
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(i);
+
+ BOOST_CHECK_THROW( tree.remove(input.begin(), input.end()), throwing_varray_exception );
+
+ BOOST_CHECK(bgi::detail::rtree::utilities::are_counts_ok(tree, false));
+ }
+
+ for ( size_t i = 0 ; i < 50 ; i += 2 )
+ {
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(10000);
+
+ Tree tree(parameters);
+
+ tree.insert(input.begin(), input.end());
+
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(i);
+
+ BOOST_CHECK_THROW( Tree tree2(tree), throwing_varray_exception );
+ }
+
+ for ( size_t i = 0 ; i < 50 ; i += 2 )
+ {
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(10000);
+
+ Tree tree(parameters);
+ Tree tree2(parameters);
+
+ tree.insert(input.begin(), input.end());
+
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(i);
+
+ BOOST_CHECK_THROW(tree2 = tree, throwing_varray_exception );
+
+ BOOST_CHECK(tree2.empty());
+ }
+}
+
+#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_EXCEPTIONS_HPP
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp b/src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp
new file mode 100644
index 000000000..c88a5f56e
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp
@@ -0,0 +1,167 @@
+// Boost.Geometry Index
+//
+// Throwing objects implementation
+//
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_THROWING_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_THROWING_HPP
+
+// value
+
+struct throwing_value_copy_exception : public std::exception
+{
+ const char * what() const throw() { return "value copy failed."; }
+};
+
+struct throwing_value
+{
+ explicit throwing_value(int v = 0)
+ : value(v)
+ {}
+
+ bool operator==(throwing_value const& v) const
+ {
+ return value == v.value;
+ }
+
+ throwing_value(throwing_value const& v)
+ {
+ throw_if_required();
+
+ value = v.value;
+ }
+
+ throwing_value & operator=(throwing_value const& v)
+ {
+ throw_if_required();
+
+ value = v.value;
+ return *this;
+ }
+
+ void throw_if_required()
+ {
+ // throw if counter meets max count
+ if ( get_max_calls_ref() <= get_calls_counter_ref() )
+ throw throwing_value_copy_exception();
+ else
+ ++get_calls_counter_ref();
+ }
+
+ static void reset_calls_counter() { get_calls_counter_ref() = 0; }
+ static void set_max_calls(size_t mc) { get_max_calls_ref() = mc; }
+
+ static size_t & get_calls_counter_ref() { static size_t cc = 0; return cc; }
+ static size_t & get_max_calls_ref() { static size_t mc = (std::numeric_limits<size_t>::max)(); return mc; }
+
+ int value;
+};
+
+namespace generate {
+template <typename T, typename C>
+struct value< std::pair<bg::model::point<T, 2, C>, throwing_value> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef std::pair<P, throwing_value> R;
+ static R apply(int x, int y)
+ {
+ return std::make_pair(P(x, y), throwing_value(x + y * 100));
+ }
+};
+} // namespace generate
+
+#include <boost/geometry/index/detail/varray.hpp>
+
+struct throwing_varray_exception : public std::exception
+{
+ const char * what() const throw() { return "static vector exception."; }
+};
+
+struct throwing_varray_settings
+{
+ static void throw_if_required()
+ {
+ // throw if counter meets max count
+ if ( get_max_calls_ref() <= get_calls_counter_ref() )
+ throw throwing_varray_exception();
+ else
+ ++get_calls_counter_ref();
+ }
+
+ static void reset_calls_counter() { get_calls_counter_ref() = 0; }
+ static void set_max_calls(size_t mc) { get_max_calls_ref() = mc; }
+
+ static size_t & get_calls_counter_ref() { static size_t cc = 0; return cc; }
+ static size_t & get_max_calls_ref() { static size_t mc = (std::numeric_limits<size_t>::max)(); return mc; }
+};
+
+template <typename Element, size_t Capacity>
+class throwing_varray
+ : public boost::geometry::index::detail::varray<Element, Capacity>
+{
+ typedef boost::geometry::index::detail::varray<Element, Capacity> container;
+
+public:
+ typedef typename container::value_type value_type;
+ typedef typename container::size_type size_type;
+ typedef typename container::iterator iterator;
+ typedef typename container::const_iterator const_iterator;
+ typedef typename container::reverse_iterator reverse_iterator;
+ typedef typename container::const_reverse_iterator const_reverse_iterator;
+ typedef typename container::reference reference;
+ typedef typename container::const_reference const_reference;
+
+ inline throwing_varray() {}
+
+ template <typename It>
+ inline throwing_varray(It first, It last)
+ : container(first, last)
+ {}
+
+ inline throwing_varray(size_type s)
+ {
+ throwing_varray_settings::throw_if_required();
+ container::resize(s);
+ }
+
+ inline void resize(size_type s)
+ {
+ throwing_varray_settings::throw_if_required();
+ container::resize(s);
+ }
+
+ inline void reserve(size_type s)
+ {
+ throwing_varray_settings::throw_if_required();
+ container::reserve(s);
+ }
+
+ void push_back(Element const& v)
+ {
+ throwing_varray_settings::throw_if_required();
+ container::push_back(v);
+ }
+};
+
+// elements derived type trait
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+template <typename OldValue, size_t N, typename NewValue>
+struct container_from_elements_type<throwing_varray<OldValue, N>, NewValue>
+{
+ typedef throwing_varray<NewValue, N> type;
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_INDEX_TEST_THROWING_HPP
diff --git a/src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing_node.hpp b/src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing_node.hpp
new file mode 100644
index 000000000..4aa0ef750
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/exceptions/test_throwing_node.hpp
@@ -0,0 +1,322 @@
+// Boost.Geometry Index
+//
+// R-tree nodes storing static-size containers
+// test version throwing exceptions on creation
+//
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_RTREE_THROWING_NODE_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_RTREE_THROWING_NODE_HPP
+
+#include <rtree/exceptions/test_throwing.hpp>
+
+struct throwing_nodes_stats
+{
+ static void reset_counters() { get_internal_nodes_counter_ref() = 0; get_leafs_counter_ref() = 0; }
+ static size_t internal_nodes_count() { return get_internal_nodes_counter_ref(); }
+ static size_t leafs_count() { return get_leafs_counter_ref(); }
+
+ static size_t & get_internal_nodes_counter_ref() { static size_t cc = 0; return cc; }
+ static size_t & get_leafs_counter_ref() { static size_t cc = 0; return cc; }
+};
+
+namespace boost { namespace geometry { namespace index {
+
+template <size_t MaxElements, size_t MinElements>
+struct linear_throwing : public linear<MaxElements, MinElements> {};
+
+template <size_t MaxElements, size_t MinElements>
+struct quadratic_throwing : public quadratic<MaxElements, MinElements> {};
+
+template <size_t MaxElements, size_t MinElements, size_t OverlapCostThreshold = 0, size_t ReinsertedElements = detail::default_rstar_reinserted_elements_s<MaxElements>::value>
+struct rstar_throwing : public rstar<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements> {};
+
+namespace detail { namespace rtree {
+
+// options implementation (from options.hpp)
+
+struct node_throwing_static_tag {};
+
+template <size_t MaxElements, size_t MinElements>
+struct options_type< linear_throwing<MaxElements, MinElements> >
+{
+ typedef options<
+ linear_throwing<MaxElements, MinElements>,
+ insert_default_tag, choose_by_content_diff_tag, split_default_tag, linear_tag,
+ node_throwing_static_tag
+ > type;
+};
+
+template <size_t MaxElements, size_t MinElements>
+struct options_type< quadratic_throwing<MaxElements, MinElements> >
+{
+ typedef options<
+ quadratic_throwing<MaxElements, MinElements>,
+ insert_default_tag, choose_by_content_diff_tag, split_default_tag, quadratic_tag,
+ node_throwing_static_tag
+ > type;
+};
+
+template <size_t MaxElements, size_t MinElements, size_t OverlapCostThreshold, size_t ReinsertedElements>
+struct options_type< rstar_throwing<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements> >
+{
+ typedef options<
+ rstar_throwing<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements>,
+ insert_reinsert_tag, choose_by_overlap_diff_tag, split_default_tag, rstar_tag,
+ node_throwing_static_tag
+ > type;
+};
+
+}} // namespace detail::rtree
+
+// node implementation
+
+namespace detail { namespace rtree {
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct variant_internal_node<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+{
+ typedef throwing_varray<
+ rtree::ptr_pair<Box, typename Allocators::node_pointer>,
+ Parameters::max_elements + 1
+ > elements_type;
+
+ template <typename Alloc>
+ inline variant_internal_node(Alloc const&) { throwing_nodes_stats::get_internal_nodes_counter_ref()++; }
+ inline ~variant_internal_node() { throwing_nodes_stats::get_internal_nodes_counter_ref()--; }
+
+ // required because variants are initialized using node object
+ // temporary must be taken into account
+ inline variant_internal_node(variant_internal_node const& n)
+ : elements(n.elements)
+ {
+ throwing_nodes_stats::get_internal_nodes_counter_ref()++;
+ }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ inline variant_internal_node(variant_internal_node && n)
+ : elements(boost::move(n.elements))
+ {
+ throwing_nodes_stats::get_internal_nodes_counter_ref()++;
+ }
+#endif
+
+ elements_type elements;
+
+private:
+ variant_internal_node & operator=(variant_internal_node const& n);
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct variant_leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+{
+ typedef throwing_varray<Value, Parameters::max_elements + 1> elements_type;
+
+ template <typename Alloc>
+ inline variant_leaf(Alloc const&) { throwing_nodes_stats::get_leafs_counter_ref()++; }
+ inline ~variant_leaf() { throwing_nodes_stats::get_leafs_counter_ref()--; }
+
+ // required because variants are initialized using node object
+ // temporary must be taken into account
+ inline variant_leaf(variant_leaf const& n)
+ : elements(n.elements)
+ {
+ throwing_nodes_stats::get_leafs_counter_ref()++;
+ }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ inline variant_leaf(variant_leaf && n)
+ : elements(boost::move(n.elements))
+ {
+ throwing_nodes_stats::get_leafs_counter_ref()++;
+ }
+#endif
+
+ elements_type elements;
+
+private:
+ variant_leaf & operator=(variant_leaf const& n);
+};
+
+// nodes traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+{
+ typedef boost::variant<
+ variant_leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag>,
+ variant_internal_node<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+ > type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+{
+ typedef variant_internal_node<Value, Parameters, Box, Allocators, node_throwing_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+{
+ typedef variant_leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag> type;
+};
+
+// visitor traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_throwing_static_tag, IsVisitableConst>
+{
+ typedef static_visitor<> type;
+};
+
+// allocators
+
+template <typename Allocator, typename Value, typename Parameters, typename Box>
+class allocators<Allocator, Value, Parameters, Box, node_throwing_static_tag>
+ : public Allocator::template rebind<
+ typename node<
+ Value, Parameters, Box,
+ allocators<Allocator, Value, Parameters, Box, node_throwing_static_tag>,
+ node_throwing_static_tag
+ >::type
+ >::other
+{
+ typedef typename Allocator::template rebind<
+ Value
+ >::other value_allocator_type;
+
+public:
+ typedef Allocator allocator_type;
+
+ typedef Value value_type;
+ typedef value_type & reference;
+ typedef const value_type & const_reference;
+ typedef typename value_allocator_type::size_type size_type;
+ typedef typename value_allocator_type::difference_type difference_type;
+ typedef typename value_allocator_type::pointer pointer;
+ typedef typename value_allocator_type::const_pointer const_pointer;
+
+ typedef typename Allocator::template rebind<
+ typename node<Value, Parameters, Box, allocators, node_throwing_static_tag>::type
+ >::other::pointer node_pointer;
+
+// typedef typename Allocator::template rebind<
+// typename internal_node<Value, Parameters, Box, allocators, node_throwing_static_tag>::type
+// >::other::pointer internal_node_pointer;
+
+ typedef typename Allocator::template rebind<
+ typename node<Value, Parameters, Box, allocators, node_throwing_static_tag>::type
+ >::other node_allocator_type;
+
+ inline allocators()
+ : node_allocator_type()
+ {}
+
+ template <typename Alloc>
+ inline explicit allocators(Alloc const& alloc)
+ : node_allocator_type(alloc)
+ {}
+
+ inline allocators(BOOST_FWD_REF(allocators) a)
+ : node_allocator_type(boost::move(a.node_allocator()))
+ {}
+
+ inline allocators & operator=(BOOST_FWD_REF(allocators) a)
+ {
+ node_allocator() = boost::move(a.node_allocator());
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ inline allocators & operator=(allocators const& a)
+ {
+ node_allocator() = a.node_allocator();
+ return *this;
+ }
+#endif
+
+ void swap(allocators & a)
+ {
+ boost::swap(node_allocator(), a.node_allocator());
+ }
+
+ bool operator==(allocators const& a) const { return node_allocator() == a.node_allocator(); }
+ template <typename Alloc>
+ bool operator==(Alloc const& a) const { return node_allocator() == node_allocator_type(a); }
+
+ Allocator allocator() const { return Allocator(node_allocator()); }
+
+ node_allocator_type & node_allocator() { return *this; }
+ node_allocator_type const& node_allocator() const { return *this; }
+};
+
+struct node_bad_alloc : public std::exception
+{
+ const char * what() const throw() { return "internal node creation failed."; }
+};
+
+struct throwing_node_settings
+{
+ static void throw_if_required()
+ {
+ // throw if counter meets max count
+ if ( get_max_calls_ref() <= get_calls_counter_ref() )
+ throw node_bad_alloc();
+ else
+ ++get_calls_counter_ref();
+ }
+
+ static void reset_calls_counter() { get_calls_counter_ref() = 0; }
+ static void set_max_calls(size_t mc) { get_max_calls_ref() = mc; }
+
+ static size_t & get_calls_counter_ref() { static size_t cc = 0; return cc; }
+ static size_t & get_max_calls_ref() { static size_t mc = (std::numeric_limits<size_t>::max)(); return mc; }
+};
+
+// create_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box>
+struct create_node<
+ Allocators,
+ variant_internal_node<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+>
+{
+ static inline typename Allocators::node_pointer
+ apply(Allocators & allocators)
+ {
+ // throw if counter meets max count
+ throwing_node_settings::throw_if_required();
+
+ return create_variant_node<
+ typename Allocators::node_pointer,
+ variant_internal_node<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+ >::apply(allocators.node_allocator());
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box>
+struct create_node<
+ Allocators,
+ variant_leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+>
+{
+ static inline typename Allocators::node_pointer
+ apply(Allocators & allocators)
+ {
+ // throw if counter meets max count
+ throwing_node_settings::throw_if_required();
+
+ return create_variant_node<
+ typename Allocators::node_pointer,
+ variant_leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag>
+ >::apply(allocators.node_allocator());
+ }
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_THROWING_NODE_HPP
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/Jamfile b/src/boost/libs/geometry/index/test/rtree/generated/Jamfile
new file mode 100644
index 000000000..02e2122bc
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/Jamfile
@@ -0,0 +1,13 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+build-project b2d ;
+build-project b3d ;
+build-project p2d ;
+build-project p3d ;
+build-project s2d ;
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/Jamfile b/src/boost/libs/geometry/index/test/rtree/generated/b2d/Jamfile
new file mode 100644
index 000000000..6db91618c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/Jamfile
@@ -0,0 +1,28 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-generated-b2d : [ test_all r ] ;
+
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_add_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_add_b2d.cpp
new file mode 100644
index 000000000..adab4cb9c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_add_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_mod_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_mod_b2d.cpp
new file mode 100644
index 000000000..0b355cb82
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_mod_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_que_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_que_b2d.cpp
new file mode 100644
index 000000000..8a2ee0e70
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dlin_que_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_add_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_add_b2d.cpp
new file mode 100644
index 000000000..80c16cd1f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_add_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_mod_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_mod_b2d.cpp
new file mode 100644
index 000000000..7de20a5f1
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_mod_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_que_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_que_b2d.cpp
new file mode 100644
index 000000000..790e29c4d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_dqua_que_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_add_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_add_b2d.cpp
new file mode 100644
index 000000000..358de99d7
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_add_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_mod_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_mod_b2d.cpp
new file mode 100644
index 000000000..df3cfdac2
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_mod_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_que_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_que_b2d.cpp
new file mode 100644
index 000000000..5f1ea2e29
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_drst_que_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_add_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_add_b2d.cpp
new file mode 100644
index 000000000..3474fc438
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_add_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_mod_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_mod_b2d.cpp
new file mode 100644
index 000000000..dc8f48c39
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_mod_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_que_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_que_b2d.cpp
new file mode 100644
index 000000000..19f08a6a8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_lin_que_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_add_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_add_b2d.cpp
new file mode 100644
index 000000000..4601697cd
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_add_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_mod_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_mod_b2d.cpp
new file mode 100644
index 000000000..201c0979b
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_mod_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_que_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_que_b2d.cpp
new file mode 100644
index 000000000..875cbf4f5
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_qua_que_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_add_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_add_b2d.cpp
new file mode 100644
index 000000000..cdce85839
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_add_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_mod_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_mod_b2d.cpp
new file mode 100644
index 000000000..5d0760d36
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_mod_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_que_b2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_que_b2d.cpp
new file mode 100644
index 000000000..b7d694b08
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b2d/rtree_rst_que_b2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/Jamfile b/src/boost/libs/geometry/index/test/rtree/generated/b3d/Jamfile
new file mode 100644
index 000000000..00cbbe252
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/Jamfile
@@ -0,0 +1,28 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-generated-b3d : [ test_all r ] ;
+
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_add_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_add_b3d.cpp
new file mode 100644
index 000000000..b387eb1ff
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_add_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_mod_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_mod_b3d.cpp
new file mode 100644
index 000000000..86a1df0de
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_mod_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_que_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_que_b3d.cpp
new file mode 100644
index 000000000..c054f630f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dlin_que_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_add_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_add_b3d.cpp
new file mode 100644
index 000000000..47760e224
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_add_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_mod_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_mod_b3d.cpp
new file mode 100644
index 000000000..4c2e7c718
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_mod_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_que_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_que_b3d.cpp
new file mode 100644
index 000000000..3c27c09ea
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_dqua_que_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_add_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_add_b3d.cpp
new file mode 100644
index 000000000..1816462bd
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_add_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_mod_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_mod_b3d.cpp
new file mode 100644
index 000000000..9f8ea3bef
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_mod_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_que_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_que_b3d.cpp
new file mode 100644
index 000000000..61e51a2f1
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_drst_que_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_add_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_add_b3d.cpp
new file mode 100644
index 000000000..d390a866c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_add_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_mod_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_mod_b3d.cpp
new file mode 100644
index 000000000..c00b20ab5
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_mod_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_que_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_que_b3d.cpp
new file mode 100644
index 000000000..19f2ee5c7
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_lin_que_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_add_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_add_b3d.cpp
new file mode 100644
index 000000000..fbcd98103
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_add_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_mod_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_mod_b3d.cpp
new file mode 100644
index 000000000..0f96c8160
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_mod_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_que_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_que_b3d.cpp
new file mode 100644
index 000000000..f29b08831
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_qua_que_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_add_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_add_b3d.cpp
new file mode 100644
index 000000000..b8d85a034
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_add_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_mod_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_mod_b3d.cpp
new file mode 100644
index 000000000..8ed1ca8c0
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_mod_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_que_b3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_que_b3d.cpp
new file mode 100644
index 000000000..75f89886f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/b3d/rtree_rst_que_b3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::box< bg::model::point<double, 3, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/Jamfile b/src/boost/libs/geometry/index/test/rtree/generated/p2d/Jamfile
new file mode 100644
index 000000000..d150007d2
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/Jamfile
@@ -0,0 +1,28 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-generated-p2d : [ test_all r ] ;
+
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_add_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_add_p2d.cpp
new file mode 100644
index 000000000..09e1c20e3
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_add_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_mod_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_mod_p2d.cpp
new file mode 100644
index 000000000..072b8e243
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_mod_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_que_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_que_p2d.cpp
new file mode 100644
index 000000000..22bdb83f4
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dlin_que_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_add_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_add_p2d.cpp
new file mode 100644
index 000000000..46cc6db24
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_add_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_mod_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_mod_p2d.cpp
new file mode 100644
index 000000000..3cce646e1
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_mod_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_que_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_que_p2d.cpp
new file mode 100644
index 000000000..8ba91c01e
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_dqua_que_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_add_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_add_p2d.cpp
new file mode 100644
index 000000000..2b2146e07
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_add_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_mod_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_mod_p2d.cpp
new file mode 100644
index 000000000..0cdd1706d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_mod_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_que_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_que_p2d.cpp
new file mode 100644
index 000000000..f9bd1951a
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_drst_que_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_add_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_add_p2d.cpp
new file mode 100644
index 000000000..af06e30ec
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_add_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_mod_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_mod_p2d.cpp
new file mode 100644
index 000000000..7879a5bf0
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_mod_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_que_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_que_p2d.cpp
new file mode 100644
index 000000000..b05ee3f64
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_lin_que_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_add_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_add_p2d.cpp
new file mode 100644
index 000000000..c7644da8e
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_add_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_mod_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_mod_p2d.cpp
new file mode 100644
index 000000000..5c0710bab
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_mod_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_que_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_que_p2d.cpp
new file mode 100644
index 000000000..91fd0cfee
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_qua_que_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_add_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_add_p2d.cpp
new file mode 100644
index 000000000..154c5ecd7
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_add_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_mod_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_mod_p2d.cpp
new file mode 100644
index 000000000..7040f93f9
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_mod_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_que_p2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_que_p2d.cpp
new file mode 100644
index 000000000..9345409ba
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p2d/rtree_rst_que_p2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/Jamfile b/src/boost/libs/geometry/index/test/rtree/generated/p3d/Jamfile
new file mode 100644
index 000000000..748563a54
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/Jamfile
@@ -0,0 +1,28 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-generated-p3d : [ test_all r ] ;
+
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_add_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_add_p3d.cpp
new file mode 100644
index 000000000..9959dc3f0
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_add_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_mod_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_mod_p3d.cpp
new file mode 100644
index 000000000..b8e1d6235
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_mod_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_que_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_que_p3d.cpp
new file mode 100644
index 000000000..68f901776
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dlin_que_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_add_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_add_p3d.cpp
new file mode 100644
index 000000000..28ec6586c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_add_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_mod_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_mod_p3d.cpp
new file mode 100644
index 000000000..c0d782d3d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_mod_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_que_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_que_p3d.cpp
new file mode 100644
index 000000000..2fad909f8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_dqua_que_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_add_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_add_p3d.cpp
new file mode 100644
index 000000000..ecbc1c336
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_add_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_mod_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_mod_p3d.cpp
new file mode 100644
index 000000000..e15305115
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_mod_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_que_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_que_p3d.cpp
new file mode 100644
index 000000000..b7cfc7f71
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_drst_que_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_add_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_add_p3d.cpp
new file mode 100644
index 000000000..24fc32feb
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_add_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_mod_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_mod_p3d.cpp
new file mode 100644
index 000000000..440dbbd0d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_mod_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_que_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_que_p3d.cpp
new file mode 100644
index 000000000..726287fdd
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_lin_que_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_add_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_add_p3d.cpp
new file mode 100644
index 000000000..17d378094
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_add_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_mod_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_mod_p3d.cpp
new file mode 100644
index 000000000..d3db906e8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_mod_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_que_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_que_p3d.cpp
new file mode 100644
index 000000000..15646b04d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_qua_que_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_add_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_add_p3d.cpp
new file mode 100644
index 000000000..f072f354d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_add_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::additional<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_mod_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_mod_p3d.cpp
new file mode 100644
index 000000000..95014311d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_mod_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::modifiers<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_que_p3d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_que_p3d.cpp
new file mode 100644
index 000000000..51a3f4494
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/p3d/rtree_rst_que_p3d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> Indexable;
+ testset::queries<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/Jamfile b/src/boost/libs/geometry/index/test/rtree/generated/s2d/Jamfile
new file mode 100644
index 000000000..889b6ec8c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/Jamfile
@@ -0,0 +1,28 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>msvc:<cxxflags>/bigobj
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-generated-s2d : [ test_all r ] ;
+
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_add_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_add_s2d.cpp
new file mode 100644
index 000000000..c89e3ddbe
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_add_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_mod_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_mod_s2d.cpp
new file mode 100644
index 000000000..595312c4d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_mod_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_que_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_que_s2d.cpp
new file mode 100644
index 000000000..41f93c575
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dlin_que_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_linear(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_add_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_add_s2d.cpp
new file mode 100644
index 000000000..e6009b833
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_add_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_mod_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_mod_s2d.cpp
new file mode 100644
index 000000000..be0cb0ad9
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_mod_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_que_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_que_s2d.cpp
new file mode 100644
index 000000000..8d353e622
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_dqua_que_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_quadratic(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_add_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_add_s2d.cpp
new file mode 100644
index 000000000..fabc1e2e8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_add_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_mod_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_mod_s2d.cpp
new file mode 100644
index 000000000..ca3934411
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_mod_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_que_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_que_s2d.cpp
new file mode 100644
index 000000000..8b402560e
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_drst_que_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::dynamic_rstar(5, 2), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_add_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_add_s2d.cpp
new file mode 100644
index 000000000..10419db62
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_add_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_mod_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_mod_s2d.cpp
new file mode 100644
index 000000000..92c81faf0
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_mod_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_que_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_que_s2d.cpp
new file mode 100644
index 000000000..8cfba6bf1
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_lin_que_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::linear<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_add_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_add_s2d.cpp
new file mode 100644
index 000000000..456e1039c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_add_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_mod_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_mod_s2d.cpp
new file mode 100644
index 000000000..efd0e0d04
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_mod_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_que_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_que_s2d.cpp
new file mode 100644
index 000000000..84ba5c6b9
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_qua_que_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::quadratic<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_add_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_add_s2d.cpp
new file mode 100644
index 000000000..ec2df11ca
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_add_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::additional<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_mod_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_mod_s2d.cpp
new file mode 100644
index 000000000..10daa8662
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_mod_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::modifiers<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_que_s2d.cpp b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_que_s2d.cpp
new file mode 100644
index 000000000..33fb4f52f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/generated/s2d/rtree_rst_que_s2d.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::segment< bg::model::point<double, 2, bg::cs::cartesian> > Indexable;
+ testset::queries<Indexable>(bgi::rstar<5, 2>(), std::allocator<int>());
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/Jamfile b/src/boost/libs/geometry/index/test/rtree/interprocess/Jamfile
new file mode 100644
index 000000000..0933eae08
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/Jamfile
@@ -0,0 +1,34 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb) /boost/thread//boost_thread
+ : # additional args
+ : # test-files
+ : # requirements
+ <toolset>acc:<linkflags>-lrt
+ <toolset>acc-pa_risc:<linkflags>-lrt
+ <target-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
+# <toolset>gcc-mingw:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
+ <toolset>gcc,<target-os>windows:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
+ <target-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
+ <toolset>msvc:<cxxflags>/bigobj
+ <target-os>windows,<toolset>intel:<cxxflags>/bigobj
+ <target-os>linux:<linkflags>"-lrt"
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite boost-geometry-index-rtree-interprocess : [ test_all r ] : <threading>multi ;
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear.cpp b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear.cpp
new file mode 100644
index 000000000..80221ac3f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear.cpp
@@ -0,0 +1,19 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/interprocess/test_interprocess.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2f;
+
+ testset::interprocess::modifiers_and_additional<P2f>(bgi::linear<32, 8>());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear_dyn.cpp b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear_dyn.cpp
new file mode 100644
index 000000000..17717ce31
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_linear_dyn.cpp
@@ -0,0 +1,19 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/interprocess/test_interprocess.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2f;
+
+ testset::interprocess::modifiers_and_additional<P2f>(bgi::dynamic_linear(32, 8));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp
new file mode 100644
index 000000000..b4630a172
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp
@@ -0,0 +1,19 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/interprocess/test_interprocess.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2f;
+
+ testset::interprocess::modifiers_and_additional<P2f>(bgi::quadratic<32, 8>());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp
new file mode 100644
index 000000000..cf935b377
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp
@@ -0,0 +1,19 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/interprocess/test_interprocess.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2f;
+
+ testset::interprocess::modifiers_and_additional<P2f>(bgi::dynamic_quadratic(32, 8));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp
new file mode 100644
index 000000000..415a473da
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp
@@ -0,0 +1,19 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/interprocess/test_interprocess.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2f;
+
+ testset::interprocess::modifiers_and_additional<P2f>(bgi::rstar<32, 8>());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp
new file mode 100644
index 000000000..06edc43a8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp
@@ -0,0 +1,19 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/interprocess/test_interprocess.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2f;
+
+ testset::interprocess::modifiers_and_additional<P2f>(bgi::dynamic_rstar(32, 8));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/interprocess/test_interprocess.hpp b/src/boost/libs/geometry/index/test/rtree/interprocess/test_interprocess.hpp
new file mode 100644
index 000000000..7f061b00c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/interprocess/test_interprocess.hpp
@@ -0,0 +1,101 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+#include <boost/interprocess/managed_shared_memory.hpp>
+#include <boost/interprocess/allocators/allocator.hpp>
+
+template <typename Point, typename Parameters>
+void test_rtree_interprocess(Parameters const& parameters = Parameters())
+{
+ namespace bi = boost::interprocess;
+ struct shm_remove
+ {
+ shm_remove() { bi::shared_memory_object::remove("shmem"); }
+ ~shm_remove(){ bi::shared_memory_object::remove("shmem"); }
+ } remover;
+
+ bi::managed_shared_memory segment(bi::create_only, "shmem", 65535);
+ typedef bi::allocator<Point, bi::managed_shared_memory::segment_manager> shmem_alloc;
+
+ test_rtree_for_box<Point>(parameters, shmem_alloc(segment.get_segment_manager()));
+}
+
+namespace testset { namespace interprocess {
+
+template <typename Indexable, typename Parameters>
+void modifiers(Parameters const& parameters = Parameters())
+{
+ namespace bi = boost::interprocess;
+ struct shm_remove
+ {
+ shm_remove() { bi::shared_memory_object::remove("shmem"); }
+ ~shm_remove(){ bi::shared_memory_object::remove("shmem"); }
+ } remover;
+
+ bi::managed_shared_memory segment(bi::create_only, "shmem", 65535);
+ typedef bi::allocator<Indexable, bi::managed_shared_memory::segment_manager> shmem_alloc;
+
+ testset::modifiers<Indexable>(parameters, shmem_alloc(segment.get_segment_manager()));
+}
+
+template <typename Indexable, typename Parameters>
+void queries(Parameters const& parameters = Parameters())
+{
+ namespace bi = boost::interprocess;
+ struct shm_remove
+ {
+ shm_remove() { bi::shared_memory_object::remove("shmem"); }
+ ~shm_remove(){ bi::shared_memory_object::remove("shmem"); }
+ } remover;
+
+ bi::managed_shared_memory segment(bi::create_only, "shmem", 65535);
+ typedef bi::allocator<Indexable, bi::managed_shared_memory::segment_manager> shmem_alloc;
+
+ testset::queries<Indexable>(parameters, shmem_alloc(segment.get_segment_manager()));
+}
+
+template <typename Indexable, typename Parameters>
+void additional(Parameters const& parameters = Parameters())
+{
+ namespace bi = boost::interprocess;
+ struct shm_remove
+ {
+ shm_remove() { bi::shared_memory_object::remove("shmem"); }
+ ~shm_remove(){ bi::shared_memory_object::remove("shmem"); }
+ } remover;
+
+ bi::managed_shared_memory segment(bi::create_only, "shmem", 65535);
+ typedef bi::allocator<Indexable, bi::managed_shared_memory::segment_manager> shmem_alloc;
+
+ testset::additional<Indexable>(parameters, shmem_alloc(segment.get_segment_manager()));
+}
+
+template <typename Indexable, typename Parameters>
+void modifiers_and_additional(Parameters const& parameters = Parameters())
+{
+ namespace bi = boost::interprocess;
+ struct shm_remove
+ {
+ shm_remove() { bi::shared_memory_object::remove("shmem"); }
+ ~shm_remove(){ bi::shared_memory_object::remove("shmem"); }
+ } remover;
+
+ bi::managed_shared_memory segment(bi::create_only, "shmem", 65535);
+ typedef bi::allocator<Indexable, bi::managed_shared_memory::segment_manager> shmem_alloc;
+
+ testset::modifiers<Indexable>(parameters, shmem_alloc(segment.get_segment_manager()));
+ testset::additional<Indexable>(parameters, shmem_alloc(segment.get_segment_manager()));
+}
+
+}}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_contains_point.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_contains_point.cpp
new file mode 100644
index 000000000..3ab81fad8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_contains_point.cpp
@@ -0,0 +1,45 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2016 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/index/rtree.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+template <typename Params>
+void test_one()
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Pt;
+ typedef bgi::rtree<Pt, Params> Rtree;
+ Rtree rtree;
+
+ rtree.insert(Pt(0, 0));
+ rtree.insert(Pt(1, 1));
+ rtree.insert(Pt(2, 2));
+ rtree.insert(Pt(3, 3));
+ rtree.insert(Pt(4, 4));
+ rtree.insert(Pt(4, 3));
+ rtree.insert(Pt(0, 3));
+
+ for (typename Rtree::const_iterator it = rtree.begin() ; it != rtree.end() ; ++it)
+ {
+ std::vector<Pt> result;
+ rtree.query(bgi::contains(*it), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 1);
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_one< bgi::linear<4> >();
+ test_one< bgi::quadratic<4> >();
+ test_one< bgi::rstar<4> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_epsilon.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_epsilon.cpp
new file mode 100644
index 000000000..728e22d9c
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_epsilon.cpp
@@ -0,0 +1,95 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Enable enlargement of Values' bounds by epsilon in the rtree
+// for Points and Segments
+#define BOOST_GEOMETRY_INDEX_EXPERIMENTAL_ENLARGE_BY_EPSILON
+
+#include <vector>
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+template <typename Params>
+void test_rtree(unsigned vcount)
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> point_t;
+
+ std::vector<point_t> values;
+
+ double eps = std::numeric_limits<double>::epsilon();
+ values.push_back(point_t(eps/2, eps/2));
+
+ for ( unsigned i = 1 ; i < vcount ; ++i )
+ {
+ values.push_back(point_t(i, i));
+ }
+
+ point_t qpt(0, 0);
+
+ BOOST_CHECK(bg::intersects(qpt, values[0]));
+
+ {
+ bgi::rtree<point_t, Params> rt(values);
+
+ std::vector<point_t> result;
+ rt.query(bgi::intersects(qpt), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 1);
+
+ rt.remove(values.begin() + vcount/2, values.end());
+
+ result.clear();
+ rt.query(bgi::intersects(qpt), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 1);
+ }
+
+ {
+ bgi::rtree<point_t, Params> rt;
+ rt.insert(values);
+
+ std::vector<point_t> result;
+ rt.query(bgi::intersects(qpt), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 1);
+
+ rt.remove(values.begin() + vcount/2, values.end());
+
+ result.clear();
+ rt.query(bgi::intersects(qpt), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 1);
+ }
+}
+
+template <int Max, int Min>
+void test_rtree_all()
+{
+ int pow = Max;
+ for (int l = 0 ; l < 3 ; ++l)
+ {
+ pow *= Max;
+ int vcount = (pow * 8) / 10;
+
+ //std::cout << Max << " " << Min << " " << vcount << std::endl;
+
+ test_rtree< bgi::linear<Max, Min> >(vcount);
+ test_rtree< bgi::quadratic<Max, Min> >(vcount);
+ test_rtree< bgi::rstar<Max, Min> >(vcount);
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_rtree_all<2, 1>();
+ test_rtree_all<4, 1>();
+ test_rtree_all<4, 2>();
+ test_rtree_all<5, 3>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_insert_remove.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_insert_remove.cpp
new file mode 100644
index 000000000..068843fa8
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_insert_remove.cpp
@@ -0,0 +1,82 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+template <typename Params>
+void test_rtree(unsigned vcount)
+{
+ typedef bg::model::point<int, 1, bg::cs::cartesian> point_t;
+
+ bgi::rtree<point_t, Params> rt;
+
+ BOOST_CHECK(rt.remove(point_t(0)) == 0);
+
+ for ( unsigned i = 0 ; i < vcount ; ++i )
+ {
+ rt.insert(point_t(static_cast<int>(i)));
+ }
+
+ BOOST_CHECK(rt.size() == vcount);
+ BOOST_CHECK(rt.count(point_t(vcount / 2)) == 1);
+
+ for ( unsigned i = 0 ; i < vcount + 3 ; ++i )
+ {
+ rt.remove(point_t((i + 3) % vcount));
+ }
+
+ BOOST_CHECK(rt.size() == 0);
+ BOOST_CHECK(rt.count(point_t(vcount / 2)) == 0);
+
+ for ( unsigned i = 0 ; i < vcount ; ++i )
+ {
+ rt.insert(point_t((i + 5) % vcount));
+ }
+
+ BOOST_CHECK(rt.size() == vcount);
+ BOOST_CHECK(rt.count(point_t(vcount / 2)) == 1);
+
+ for ( unsigned i = 0 ; i < vcount + 3 ; ++i )
+ {
+ rt.remove(point_t((i + 7) % vcount));
+ }
+
+ BOOST_CHECK(rt.size() == 0);
+ BOOST_CHECK(rt.count(point_t(vcount / 2)) == 0);
+}
+
+template <int Max, int Min>
+void test_rtree_all()
+{
+ int pow = Max;
+ for (int l = 0 ; l < 3 ; ++l)
+ {
+ pow *= Max;
+ int vcount = (pow * 8) / 10;
+
+ //std::cout << Max << " " << Min << " " << vcount << std::endl;
+
+ test_rtree< bgi::linear<Max, Min> >(vcount);
+ test_rtree< bgi::quadratic<Max, Min> >(vcount);
+ test_rtree< bgi::rstar<Max, Min> >(vcount);
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_rtree_all<2, 1>();
+ test_rtree_all<4, 1>();
+ test_rtree_all<4, 2>();
+ test_rtree_all<5, 3>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_intersects_geom.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_intersects_geom.cpp
new file mode 100644
index 000000000..973628cbb
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_intersects_geom.cpp
@@ -0,0 +1,55 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2016 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename Value, typename Point, typename Params>
+void test_all()
+{
+ typedef bg::model::box<Point> Box;
+ typedef bg::model::segment<Point> Seg;
+ typedef bg::model::ring<Point> Ring;
+ typedef bg::model::polygon<Point> Poly;
+ typedef bg::model::multi_polygon<Poly> MPoly;
+ typedef bg::model::linestring<Point> Ls;
+ typedef bg::model::multi_linestring<Ls> MLs;
+ typedef bg::model::multi_point<Point> MPt;
+
+ bgi::rtree<Value, Params> rt;
+ std::vector<Value> found;
+
+ rt.query(bgi::intersects(Point()), back_inserter(found));
+ rt.query(bgi::intersects(Seg()), back_inserter(found));
+ rt.query(bgi::intersects(Box()), back_inserter(found));
+ rt.query(bgi::intersects(Ring()), back_inserter(found));
+ rt.query(bgi::intersects(Poly()), back_inserter(found));
+ rt.query(bgi::intersects(MPoly()), back_inserter(found));
+ rt.query(bgi::intersects(Ls()), back_inserter(found));
+ rt.query(bgi::intersects(MLs()), back_inserter(found));
+ rt.query(bgi::intersects(MPt()), back_inserter(found));
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::d2::point_xy<double> Pt;
+ typedef bg::model::box<Pt> Box;
+
+ test_all< Pt, Pt, bgi::linear<16> >();
+ test_all< Pt, Pt, bgi::quadratic<4> >();
+ test_all< Pt, Pt, bgi::rstar<4> >();
+
+ test_all< Box, Pt, bgi::linear<16> >();
+ test_all< Box, Pt, bgi::quadratic<4> >();
+ test_all< Box, Pt, bgi::rstar<4> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_move_pack.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_move_pack.cpp
new file mode 100644
index 000000000..b7210772d
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_move_pack.cpp
@@ -0,0 +1,134 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <algorithm>
+#include <boost/container/vector.hpp>
+#include <boost/move/move.hpp>
+#include <boost/move/iterator.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+
+class point_cm
+{
+ BOOST_COPYABLE_AND_MOVABLE(point_cm)
+
+public:
+ point_cm(double xx = 0, double yy = 0)
+ : x(xx)
+ , y(yy)
+ , moved(false)
+ {}
+ point_cm(point_cm const& other)
+ : x(other.x)
+ , y(other.y)
+ , moved(false)
+ {
+ BOOST_CHECK_MESSAGE(false, "copy not allowed");
+ }
+ point_cm & operator=(BOOST_COPY_ASSIGN_REF(point_cm) other)
+ {
+ BOOST_CHECK_MESSAGE(false, "copy not allowed");
+ x = other.x;
+ y = other.y;
+ moved = false;
+ return *this;
+ }
+ point_cm(BOOST_RV_REF(point_cm) other)
+ : x(other.x)
+ , y(other.y)
+ , moved(false)
+ {
+ BOOST_CHECK_MESSAGE(!other.moved, "only one move allowed");
+ other.moved = true;
+ }
+ point_cm & operator=(BOOST_RV_REF(point_cm) other)
+ {
+ BOOST_CHECK_MESSAGE(!other.moved, "only one move allowed");
+ x = other.x;
+ y = other.y;
+ moved = false;
+ other.moved = true;
+ return *this;
+ }
+
+ double x, y;
+ bool moved;
+};
+
+template <typename Point>
+struct indexable
+{
+ typedef Point const& result_type;
+ result_type operator()(Point const& p) const
+ {
+ BOOST_CHECK_MESSAGE(!p.moved, "can't access indexable of moved Value");
+ return p;
+ }
+};
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(point_cm, double, bg::cs::cartesian, x, y)
+
+template <typename Vector>
+void append(Vector & vec, double x, double y)
+{
+ point_cm pt(x, y);
+ BOOST_CHECK(!pt.moved);
+ vec.push_back(boost::move(pt));
+ BOOST_CHECK(pt.moved);
+}
+
+struct test_moved
+{
+ test_moved(bool ex)
+ : expected(ex)
+ {}
+ template <typename Point>
+ void operator()(Point const& p) const
+ {
+ BOOST_CHECK_EQUAL(p.moved, expected);
+ }
+ bool expected;
+};
+
+template <typename Point, typename Params>
+void test_rtree(Params const& params = Params())
+{
+ // sanity check
+ boost::container::vector<Point> vec;
+ append(vec, 0, 0); append(vec, 0, 1); append(vec, 0, 2);
+ append(vec, 1, 0); append(vec, 1, 1); append(vec, 1, 2);
+ append(vec, 2, 0); append(vec, 2, 1); append(vec, 2, 2);
+
+ std::for_each(vec.begin(), vec.end(), test_moved(false));
+
+ bgi::rtree<Point, Params, indexable<Point> > rt(
+ boost::make_move_iterator(vec.begin()),
+ boost::make_move_iterator(vec.end()),
+ params);
+
+ std::for_each(vec.begin(), vec.end(), test_moved(true));
+
+ BOOST_CHECK_EQUAL(rt.size(), vec.size());
+}
+
+
+int test_main(int, char* [])
+{
+ test_rtree< point_cm, bgi::linear<4> >();
+ test_rtree< point_cm, bgi::quadratic<4> >();
+ test_rtree< point_cm, bgi::rstar<4> >();
+
+ test_rtree<point_cm>(bgi::dynamic_linear(4));
+ test_rtree<point_cm>(bgi::dynamic_quadratic(4));
+ test_rtree<point_cm>(bgi::dynamic_rstar(4));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_non_cartesian.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_non_cartesian.cpp
new file mode 100644
index 000000000..6111a2847
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_non_cartesian.cpp
@@ -0,0 +1,128 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2016 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Point>
+inline void fill(Point & pt, double x, double y)
+{
+ bg::set<0>(pt, x);
+ bg::set<1>(pt, y);
+}
+
+template <typename Point>
+inline void fill(bg::model::box<Point> & box, double x, double y)
+{
+ bg::set<0, 0>(box, x);
+ bg::set<0, 1>(box, y);
+ bg::set<1, 0>(box, x + 20);
+ bg::set<1, 1>(box, y + 20);
+}
+
+template <typename Rtree>
+void test_rtree()
+{
+ typedef typename Rtree::value_type value_t;
+
+ Rtree rtree;
+ value_t v;
+
+ // This is not fully valid because both point's longitude and box's min
+ // longitude should be in range [-180, 180]. So if this stopped passing
+ // in the future it wouldn't be that bad. Still it works as it is now.
+
+ size_t n = 0;
+ for (double x = -170; x < 400; x += 30, ++n)
+ {
+ //double lon = x <= 180 ? x : x - 360;
+ double lon = x;
+ double lat = x <= 180 ? 0 : 30;
+
+ fill(v, lon, lat);
+ rtree.insert(v);
+ BOOST_CHECK_EQUAL(rtree.size(), n + 1);
+ size_t vcount = 1; // x < 180 ? 1 : 2;
+ BOOST_CHECK_EQUAL(rtree.count(v), vcount);
+ std::vector<value_t> res;
+ rtree.query(bgi::intersects(v), std::back_inserter(res));
+ BOOST_CHECK_EQUAL(res.size(), vcount);
+ }
+
+ for (double x = -170; x < 400; x += 30, --n)
+ {
+ //double lon = x <= 180 ? x : x - 360;
+ double lon = x;
+ double lat = x <= 180 ? 0 : 30;
+
+ fill(v, lon, lat);
+ rtree.remove(v);
+ BOOST_CHECK_EQUAL(rtree.size(), n - 1);
+ size_t vcount = 0; // x < 180 ? 1 : 0;
+ BOOST_CHECK_EQUAL(rtree.count(v), vcount);
+ std::vector<value_t> res;
+ rtree.query(bgi::intersects(v), std::back_inserter(res));
+ BOOST_CHECK_EQUAL(res.size(), vcount);
+ }
+}
+
+template <typename Value>
+void test_value()
+{
+ test_rtree<bgi::rtree<Value, bgi::linear<4> > >();
+ test_rtree<bgi::rtree<Value, bgi::quadratic<4> > >();
+ test_rtree<bgi::rtree<Value, bgi::rstar<4> > >();
+}
+
+template <typename Rtree>
+void test_ticket_12413()
+{
+ typedef typename Rtree::value_type pair_t;
+ typedef typename pair_t::first_type point_t;
+
+ Rtree rtree;
+ rtree.insert(std::make_pair(point_t(-1.558444, 52.38664), 792));
+ rtree.insert(std::make_pair(point_t(-1.558444, 52.38664), 793));
+ rtree.insert(std::make_pair(point_t(-2.088824, 51.907406), 800));
+ rtree.insert(std::make_pair(point_t(-1.576363, 53.784089), 799));
+ rtree.insert(std::make_pair(point_t(-77.038816, 38.897282), 801));
+ rtree.insert(std::make_pair(point_t(-1.558444, 52.38664), 794));
+ rtree.insert(std::make_pair(point_t(-0.141588, 51.501009), 797));
+ rtree.insert(std::make_pair(point_t(-118.410468, 34.103003), 798));
+ rtree.insert(std::make_pair(point_t(-0.127592, 51.503407), 796));
+
+ size_t num_removed = rtree.remove(std::make_pair(point_t(-0.127592, 51.503407), 796));
+
+ BOOST_CHECK_EQUAL(num_removed, 1);
+}
+
+template <typename Point>
+void test_cs()
+{
+ test_value<Point>();
+ test_value<bg::model::box<Point> >();
+
+ {
+ typedef std::pair<Point, unsigned> value_t;
+ test_ticket_12413<bgi::rtree<value_t, bgi::linear<4> > >();
+ test_ticket_12413<bgi::rtree<value_t, bgi::quadratic<4> > >();
+ test_ticket_12413<bgi::rtree<value_t, bgi::rstar<4> > >();
+ }
+}
+
+int test_main(int, char* [])
+{
+ //test_cs<bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_cs<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_test_generator.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_test_generator.cpp
new file mode 100644
index 000000000..e1d76ee2f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_test_generator.cpp
@@ -0,0 +1,111 @@
+// Boost.Geometry Index
+// Rtree tests generator
+
+// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <fstream>
+#include <vector>
+#include <string>
+#include <boost/foreach.hpp>
+#include <boost/assert.hpp>
+#include <boost/tuple/tuple.hpp>
+
+int main()
+{
+ typedef boost::tuple<std::string, std::string> CT;
+ std::vector<CT> coordinate_types;
+ coordinate_types.push_back(boost::make_tuple("double", "d"));
+ //coordinate_types.push_back(boost::make_tuple("int", "i"));
+ //coordinate_types.push_back(boost::make_tuple("float", "f"));
+
+ std::vector<std::string> dimensions;
+ dimensions.push_back("2");
+ dimensions.push_back("3");
+
+ typedef boost::tuple<std::string, std::string> P;
+ std::vector<P> parameters;
+ parameters.push_back(boost::make_tuple("bgi::linear<5, 2>()", "lin"));
+ parameters.push_back(boost::make_tuple("bgi::dynamic_linear(5, 2)", "dlin"));
+ parameters.push_back(boost::make_tuple("bgi::quadratic<5, 2>()", "qua"));
+ parameters.push_back(boost::make_tuple("bgi::dynamic_quadratic(5, 2)", "dqua"));
+ parameters.push_back(boost::make_tuple("bgi::rstar<5, 2>()", "rst"));
+ parameters.push_back(boost::make_tuple("bgi::dynamic_rstar(5, 2)","drst"));
+
+ std::vector<std::string> indexables;
+ indexables.push_back("p");
+ indexables.push_back("b");
+ indexables.push_back("s");
+
+ typedef std::pair<std::string, std::string> TS;
+ std::vector<TS> testsets;
+ testsets.push_back(std::make_pair("testset::modifiers", "mod"));
+ testsets.push_back(std::make_pair("testset::queries", "que"));
+ testsets.push_back(std::make_pair("testset::additional", "add"));
+
+ BOOST_FOREACH(P const& p, parameters)
+ {
+ BOOST_FOREACH(TS const& ts, testsets)
+ {
+ BOOST_FOREACH(std::string const& i, indexables)
+ {
+ BOOST_FOREACH(std::string const& d, dimensions)
+ {
+ // If the I is Segment, generate only for 2d
+ if ( i == "s" && d != "2" )
+ {
+ continue;
+ }
+
+ BOOST_FOREACH(CT const& c, coordinate_types)
+ {
+ std::string filename = std::string() +
+ "rtree_" + boost::get<1>(p) + '_' + ts.second + '_' + i + d + boost::get<1>(c) + ".cpp";
+
+ std::ofstream f(filename.c_str(), std::ios::trunc);
+
+ f <<
+ "// Boost.Geometry Index\n" <<
+ "// Unit Test\n" <<
+ "\n" <<
+ "// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.\n" <<
+ "\n" <<
+ "// Use, modification and distribution is subject to the Boost Software License,\n" <<
+ "// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\n" <<
+ "// http://www.boost.org/LICENSE_1_0.txt)\n" <<
+ "\n";
+
+ f <<
+ "#include <rtree/test_rtree.hpp>\n" <<
+ "\n";
+
+ std::string indexable_type;
+ std::string point_type = std::string("bg::model::point<") + boost::get<0>(c) + ", " + d + ", bg::cs::cartesian>";
+ if ( i == "p" )
+ indexable_type = point_type;
+ else if ( i == "b" )
+ indexable_type = std::string("bg::model::box< ") + point_type + " >";
+ else if ( i == "s" )
+ indexable_type = std::string("bg::model::segment< ") + point_type + " >";
+ else
+ BOOST_ASSERT(false);
+
+ f <<
+ "int test_main(int, char* [])\n" <<
+ "{\n" <<
+ " typedef " << indexable_type << " Indexable;\n" <<
+ " " << ts.first << "<Indexable>(" << boost::get<0>(p) << ", std::allocator<int>());\n" <<
+ " return 0;\n" <<
+ "}\n";
+ }
+ }
+ }
+
+ }
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_values.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_values.cpp
new file mode 100644
index 000000000..e9eb13810
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_values.cpp
@@ -0,0 +1,146 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/core/addressof.hpp>
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+struct point
+{
+ point(double xx = 0, double yy = 0) : x(xx), y(yy) {}
+ double x, y;
+};
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(point, double, bg::cs::cartesian, x, y)
+
+template <typename Rtree, typename Convertible>
+void check_convertible_to_value(Rtree const& rt, Convertible const& conv)
+{
+ static const bool
+ is_conv_to_indexable
+ = boost::is_convertible<Convertible, typename Rtree::indexable_type>::value;
+ static const bool
+ is_conv_to_value
+ = boost::is_convertible<Convertible, typename Rtree::value_type>::value;
+ static const bool
+ is_same_as_indexable
+ = boost::is_same<Convertible, typename Rtree::indexable_type>::value;
+ static const bool
+ is_same_as_value
+ = boost::is_same<Convertible, typename Rtree::value_type>::value;
+
+ BOOST_CHECK_EQUAL(is_same_as_indexable, false);
+ BOOST_CHECK_EQUAL(is_same_as_value, false);
+ BOOST_CHECK_EQUAL(is_conv_to_indexable, false);
+ BOOST_CHECK_EQUAL(is_conv_to_value, true);
+
+ typename Rtree::value_type const& val = conv;
+ BOOST_CHECK(rt.value_eq()(val, conv));
+}
+
+template <typename Box, typename Params>
+void test_pair()
+{
+ typedef std::pair<Box, std::size_t> Value;
+
+ typename boost::remove_const<Box>::type box;
+ bg::assign_zero(box);
+
+ Value val(box, 0);
+
+ // sanity check
+ std::vector<Value> vec;
+ vec.push_back(val);
+ vec.push_back(std::make_pair(box, 0));
+ vec.push_back(std::make_pair(box, (unsigned short)0));
+
+ bgi::rtree<Value, Params> rt;
+ rt.insert(val);
+ rt.insert(std::make_pair(box, 0));
+ rt.insert(std::make_pair(box, (unsigned short)0));
+ BOOST_CHECK_EQUAL(rt.size(), 3u);
+
+ check_convertible_to_value(rt, std::make_pair(box, 0));
+ check_convertible_to_value(rt, std::make_pair(box, (unsigned short)0));
+ BOOST_CHECK(bg::covered_by(rt.indexable_get()(std::make_pair(box, 0)), rt.bounds()));
+ BOOST_CHECK(bg::covered_by(rt.indexable_get()(std::make_pair(box, (unsigned short)0)), rt.bounds()));
+
+ BOOST_CHECK_EQUAL(rt.count(val), 3u);
+ BOOST_CHECK_EQUAL(rt.count(std::make_pair(box, 0)), 3u);
+ BOOST_CHECK_EQUAL(rt.count(std::make_pair(box, (unsigned short)0)), 3u);
+ BOOST_CHECK_EQUAL(rt.count(box), 3u);
+
+ BOOST_CHECK_EQUAL(rt.remove(val), 1u);
+ BOOST_CHECK_EQUAL(rt.remove(std::make_pair(box, 0)), 1u);
+ BOOST_CHECK_EQUAL(rt.remove(std::make_pair(box, (unsigned short)0)), 1u);
+ BOOST_CHECK_EQUAL(rt.size(), 0u);
+}
+
+template <typename Box, typename Params>
+void test_pair_geom_ptr()
+{
+ typedef typename bg::point_type<Box>::type point_t;
+ typedef bg::model::polygon<point_t> polygon_t;
+
+ typedef std::pair<Box, polygon_t*> Value;
+
+ typename boost::remove_const<Box>::type box;
+ bg::assign_zero(box);
+
+ polygon_t poly;
+
+ Value val(box, boost::addressof(poly));
+
+ bgi::rtree<Value, Params> rt;
+ rt.insert(val);
+ rt.insert(std::make_pair(box, boost::addressof(poly)));
+
+ BOOST_CHECK_EQUAL(rt.size(), 2u);
+
+ BOOST_CHECK_EQUAL(rt.remove(val), 1u);
+ BOOST_CHECK_EQUAL(rt.remove(std::make_pair(box, boost::addressof(poly))), 1u);
+
+ BOOST_CHECK_EQUAL(rt.size(), 0u);
+}
+
+template <typename Params>
+void test_point()
+{
+ bgi::rtree<point, Params> rt;
+
+ rt.insert(0.0);
+ BOOST_CHECK_EQUAL(rt.size(), 1u);
+ BOOST_CHECK_EQUAL(rt.remove(0.0), 1u);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> Pt;
+ typedef bg::model::box<Pt> Box;
+
+ test_pair< Box, bgi::linear<16> >();
+ test_pair< Box, bgi::quadratic<4> >();
+ test_pair< Box, bgi::rstar<4> >();
+ //test_rtree< Box const, bgi::linear<16> >();
+ //test_rtree< Box const, bgi::quadratic<4> >();
+ //test_rtree< Box const, bgi::rstar<4> >();
+
+ test_pair_geom_ptr< Box, bgi::linear<16> >();
+ test_pair_geom_ptr< Box, bgi::quadratic<4> >();
+ test_pair_geom_ptr< Box, bgi::rstar<4> >();
+
+ test_point< bgi::linear<16> >();
+ test_point< bgi::quadratic<4> >();
+ test_point< bgi::rstar<4> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/rtree_values_invalid.cpp b/src/boost/libs/geometry/index/test/rtree/rtree_values_invalid.cpp
new file mode 100644
index 000000000..d16861331
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/rtree_values_invalid.cpp
@@ -0,0 +1,31 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <rtree/test_rtree.hpp>
+
+
+template <typename Point, typename Params>
+void test_rtree()
+{
+ bgi::rtree<Point, Params> rt;
+ // coordinates aren't implicitly convertible to Point
+ rt.insert(1.0);
+ rt.remove(1.0);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 1, bg::cs::cartesian> Pt;
+
+ test_rtree<Pt, bgi::linear<16> >();
+ test_rtree<Pt, bgi::quadratic<4> >();
+ test_rtree<Pt, bgi::rstar<4> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/rtree/test_rtree.hpp b/src/boost/libs/geometry/index/test/rtree/test_rtree.hpp
new file mode 100644
index 000000000..89aaf02dd
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/rtree/test_rtree.hpp
@@ -0,0 +1,2024 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2019.
+// Modifications copyright (c) 2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP
+
+#include <boost/foreach.hpp>
+#include <vector>
+#include <algorithm>
+
+#include <geometry_index_test_common.hpp>
+
+#include <boost/geometry/index/rtree.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+#include <boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp>
+#include <boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp>
+
+//#include <boost/geometry/geometries/ring.hpp>
+//#include <boost/geometry/geometries/polygon.hpp>
+
+namespace generate {
+
+// Set point's coordinates
+
+template <typename Point>
+struct outside_point
+{};
+
+template <typename T, typename C>
+struct outside_point< bg::model::point<T, 2, C> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ static P apply()
+ {
+ return P(13, 26);
+ }
+};
+
+template <typename T, typename C>
+struct outside_point< bg::model::point<T, 3, C> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ static P apply()
+ {
+ return P(13, 26, 13);
+ }
+};
+
+// Default value generation
+
+template <typename Value>
+struct value_default
+{
+ static Value apply(){ return Value(); }
+};
+
+// Values, input and rtree generation
+
+template <typename Value>
+struct value
+{};
+
+template <typename T, typename C>
+struct value< bg::model::point<T, 2, C> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ static P apply(int x, int y)
+ {
+ return P(x, y);
+ }
+};
+
+template <typename T, typename C>
+struct value< bg::model::box< bg::model::point<T, 2, C> > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ static B apply(int x, int y)
+ {
+ return B(P(x, y), P(x + 2, y + 3));
+ }
+};
+
+template <typename T, typename C>
+struct value< bg::model::segment< bg::model::point<T, 2, C> > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ static S apply(int x, int y)
+ {
+ return S(P(x, y), P(x + 2, y + 3));
+ }
+};
+
+template <typename T, typename C>
+struct value< std::pair<bg::model::point<T, 2, C>, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef std::pair<P, int> R;
+ static R apply(int x, int y)
+ {
+ return std::make_pair(P(x, y), x + y * 100);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::pair<bg::model::box< bg::model::point<T, 2, C> >, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ typedef std::pair<B, int> R;
+ static R apply(int x, int y)
+ {
+ return std::make_pair(B(P(x, y), P(x + 2, y + 3)), x + y * 100);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::pair<bg::model::segment< bg::model::point<T, 2, C> >, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ typedef std::pair<S, int> R;
+ static R apply(int x, int y)
+ {
+ return std::make_pair(S(P(x, y), P(x + 2, y + 3)), x + y * 100);
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::tuple<bg::model::point<T, 2, C>, int, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef boost::tuple<P, int, int> R;
+ static R apply(int x, int y)
+ {
+ return boost::make_tuple(P(x, y), x + y * 100, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::tuple<bg::model::box< bg::model::point<T, 2, C> >, int, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ typedef boost::tuple<B, int, int> R;
+ static R apply(int x, int y)
+ {
+ return boost::make_tuple(B(P(x, y), P(x + 2, y + 3)), x + y * 100, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::tuple<bg::model::segment< bg::model::point<T, 2, C> >, int, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ typedef boost::tuple<S, int, int> R;
+ static R apply(int x, int y)
+ {
+ return boost::make_tuple(S(P(x, y), P(x + 2, y + 3)), x + y * 100, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< bg::model::point<T, 3, C> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ static P apply(int x, int y, int z)
+ {
+ return P(x, y, z);
+ }
+};
+
+template <typename T, typename C>
+struct value< bg::model::box< bg::model::point<T, 3, C> > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ static B apply(int x, int y, int z)
+ {
+ return B(P(x, y, z), P(x + 2, y + 3, z + 4));
+ }
+};
+
+template <typename T, typename C>
+struct value< std::pair<bg::model::point<T, 3, C>, int> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef std::pair<P, int> R;
+ static R apply(int x, int y, int z)
+ {
+ return std::make_pair(P(x, y, z), x + y * 100 + z * 10000);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::pair<bg::model::box< bg::model::point<T, 3, C> >, int> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ typedef std::pair<B, int> R;
+ static R apply(int x, int y, int z)
+ {
+ return std::make_pair(B(P(x, y, z), P(x + 2, y + 3, z + 4)), x + y * 100 + z * 10000);
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::tuple<bg::model::point<T, 3, C>, int, int> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef boost::tuple<P, int, int> R;
+ static R apply(int x, int y, int z)
+ {
+ return boost::make_tuple(P(x, y, z), x + y * 100 + z * 10000, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::tuple<bg::model::box< bg::model::point<T, 3, C> >, int, int> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ typedef boost::tuple<B, int, int> R;
+ static R apply(int x, int y, int z)
+ {
+ return boost::make_tuple(B(P(x, y, z), P(x + 2, y + 3, z + 4)), x + y * 100 + z * 10000, 0);
+ }
+};
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+template <typename T, typename C>
+struct value< std::tuple<bg::model::point<T, 2, C>, int, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef std::tuple<P, int, int> R;
+ static R apply(int x, int y)
+ {
+ return std::make_tuple(P(x, y), x + y * 100, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::tuple<bg::model::box< bg::model::point<T, 2, C> >, int, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ typedef std::tuple<B, int, int> R;
+ static R apply(int x, int y)
+ {
+ return std::make_tuple(B(P(x, y), P(x + 2, y + 3)), x + y * 100, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::tuple<bg::model::segment< bg::model::point<T, 2, C> >, int, int> >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ typedef std::tuple<S, int, int> R;
+ static R apply(int x, int y)
+ {
+ return std::make_tuple(S(P(x, y), P(x + 2, y + 3)), x + y * 100, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::tuple<bg::model::point<T, 3, C>, int, int> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef std::tuple<P, int, int> R;
+ static R apply(int x, int y, int z)
+ {
+ return std::make_tuple(P(x, y, z), x + y * 100 + z * 10000, 0);
+ }
+};
+
+template <typename T, typename C>
+struct value< std::tuple<bg::model::box< bg::model::point<T, 3, C> >, int, int> >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ typedef std::tuple<B, int, int> R;
+ static R apply(int x, int y, int z)
+ {
+ return std::make_tuple(B(P(x, y, z), P(x + 2, y + 3, z + 4)), x + y * 100 + z * 10000, 0);
+ }
+};
+
+#endif // #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+} // namespace generate
+
+// shared_ptr value
+
+template <typename Indexable>
+struct test_object
+{
+ test_object(Indexable const& indexable_) : indexable(indexable_) {}
+ Indexable indexable;
+};
+
+namespace boost { namespace geometry { namespace index {
+
+template <typename Indexable>
+struct indexable< boost::shared_ptr< test_object<Indexable> > >
+{
+ typedef boost::shared_ptr< test_object<Indexable> > value_type;
+ typedef Indexable const& result_type;
+
+ result_type operator()(value_type const& value) const
+ {
+ return value->indexable;
+ }
+};
+
+}}}
+
+namespace generate {
+
+template <typename T, typename C>
+struct value< boost::shared_ptr<test_object<bg::model::point<T, 2, C> > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef test_object<P> O;
+ typedef boost::shared_ptr<O> R;
+
+ static R apply(int x, int y)
+ {
+ return R(new O(P(x, y)));
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::shared_ptr<test_object<bg::model::point<T, 3, C> > > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef test_object<P> O;
+ typedef boost::shared_ptr<O> R;
+
+ static R apply(int x, int y, int z)
+ {
+ return R(new O(P(x, y, z)));
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::shared_ptr<test_object<bg::model::box<bg::model::point<T, 2, C> > > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ typedef test_object<B> O;
+ typedef boost::shared_ptr<O> R;
+
+ static R apply(int x, int y)
+ {
+ return R(new O(B(P(x, y), P(x + 2, y + 3))));
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::shared_ptr<test_object<bg::model::box<bg::model::point<T, 3, C> > > > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ typedef test_object<B> O;
+ typedef boost::shared_ptr<O> R;
+
+ static R apply(int x, int y, int z)
+ {
+ return R(new O(B(P(x, y, z), P(x + 2, y + 3, z + 4))));
+ }
+};
+
+template <typename T, typename C>
+struct value< boost::shared_ptr<test_object<bg::model::segment<bg::model::point<T, 2, C> > > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ typedef test_object<S> O;
+ typedef boost::shared_ptr<O> R;
+
+ static R apply(int x, int y)
+ {
+ return R(new O(S(P(x, y), P(x + 2, y + 3))));
+ }
+};
+
+} //namespace generate
+
+// counting value
+
+template <typename Indexable>
+struct counting_value
+{
+ counting_value() { counter()++; }
+ counting_value(Indexable const& i) : indexable(i) { counter()++; }
+ counting_value(counting_value const& c) : indexable(c.indexable) { counter()++; }
+ ~counting_value() { counter()--; }
+
+ static size_t & counter() { static size_t c = 0; return c; }
+ Indexable indexable;
+};
+
+namespace boost { namespace geometry { namespace index {
+
+template <typename Indexable>
+struct indexable< counting_value<Indexable> >
+{
+ typedef counting_value<Indexable> value_type;
+ typedef Indexable const& result_type;
+ result_type operator()(value_type const& value) const
+ {
+ return value.indexable;
+ }
+};
+
+template <typename Indexable>
+struct equal_to< counting_value<Indexable> >
+{
+ typedef counting_value<Indexable> value_type;
+ typedef bool result_type;
+ bool operator()(value_type const& v1, value_type const& v2) const
+ {
+ return boost::geometry::equals(v1.indexable, v2.indexable);
+ }
+};
+
+}}}
+
+namespace generate {
+
+template <typename T, typename C>
+struct value< counting_value<bg::model::point<T, 2, C> > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef counting_value<P> R;
+ static R apply(int x, int y) { return R(P(x, y)); }
+};
+
+template <typename T, typename C>
+struct value< counting_value<bg::model::point<T, 3, C> > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef counting_value<P> R;
+ static R apply(int x, int y, int z) { return R(P(x, y, z)); }
+};
+
+template <typename T, typename C>
+struct value< counting_value<bg::model::box<bg::model::point<T, 2, C> > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ typedef counting_value<B> R;
+ static R apply(int x, int y) { return R(B(P(x, y), P(x+2, y+3))); }
+};
+
+template <typename T, typename C>
+struct value< counting_value<bg::model::box<bg::model::point<T, 3, C> > > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ typedef counting_value<B> R;
+ static R apply(int x, int y, int z) { return R(B(P(x, y, z), P(x+2, y+3, z+4))); }
+};
+
+template <typename T, typename C>
+struct value< counting_value<bg::model::segment<bg::model::point<T, 2, C> > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ typedef counting_value<S> R;
+ static R apply(int x, int y) { return R(S(P(x, y), P(x+2, y+3))); }
+};
+
+} // namespace generate
+
+// value without default constructor
+
+template <typename Indexable>
+struct value_no_dctor
+{
+ value_no_dctor(Indexable const& i) : indexable(i) {}
+ Indexable indexable;
+};
+
+namespace boost { namespace geometry { namespace index {
+
+template <typename Indexable>
+struct indexable< value_no_dctor<Indexable> >
+{
+ typedef value_no_dctor<Indexable> value_type;
+ typedef Indexable const& result_type;
+ result_type operator()(value_type const& value) const
+ {
+ return value.indexable;
+ }
+};
+
+template <typename Indexable>
+struct equal_to< value_no_dctor<Indexable> >
+{
+ typedef value_no_dctor<Indexable> value_type;
+ typedef bool result_type;
+ bool operator()(value_type const& v1, value_type const& v2) const
+ {
+ return boost::geometry::equals(v1.indexable, v2.indexable);
+ }
+};
+
+}}}
+
+namespace generate {
+
+template <typename Indexable>
+struct value_default< value_no_dctor<Indexable> >
+{
+ static value_no_dctor<Indexable> apply() { return value_no_dctor<Indexable>(Indexable()); }
+};
+
+template <typename T, typename C>
+struct value< value_no_dctor<bg::model::point<T, 2, C> > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef value_no_dctor<P> R;
+ static R apply(int x, int y) { return R(P(x, y)); }
+};
+
+template <typename T, typename C>
+struct value< value_no_dctor<bg::model::point<T, 3, C> > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef value_no_dctor<P> R;
+ static R apply(int x, int y, int z) { return R(P(x, y, z)); }
+};
+
+template <typename T, typename C>
+struct value< value_no_dctor<bg::model::box<bg::model::point<T, 2, C> > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::box<P> B;
+ typedef value_no_dctor<B> R;
+ static R apply(int x, int y) { return R(B(P(x, y), P(x+2, y+3))); }
+};
+
+template <typename T, typename C>
+struct value< value_no_dctor<bg::model::box<bg::model::point<T, 3, C> > > >
+{
+ typedef bg::model::point<T, 3, C> P;
+ typedef bg::model::box<P> B;
+ typedef value_no_dctor<B> R;
+ static R apply(int x, int y, int z) { return R(B(P(x, y, z), P(x+2, y+3, z+4))); }
+};
+
+template <typename T, typename C>
+struct value< value_no_dctor<bg::model::segment<bg::model::point<T, 2, C> > > >
+{
+ typedef bg::model::point<T, 2, C> P;
+ typedef bg::model::segment<P> S;
+ typedef value_no_dctor<S> R;
+ static R apply(int x, int y) { return R(S(P(x, y), P(x+2, y+3))); }
+};
+
+// generate input
+
+template <size_t Dimension>
+struct input
+{};
+
+template <>
+struct input<2>
+{
+ template <typename Value, typename Box>
+ static void apply(std::vector<Value> & input, Box & qbox, int size = 1)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < size, "the value must be greather than 0");
+
+ for ( int i = 0 ; i < 12 * size ; i += 3 )
+ {
+ for ( int j = 1 ; j < 25 * size ; j += 4 )
+ {
+ input.push_back( generate::value<Value>::apply(i, j) );
+ }
+ }
+
+ typedef typename bg::traits::point_type<Box>::type P;
+
+ qbox = Box(P(3, 0), P(10, 9));
+ }
+};
+
+template <>
+struct input<3>
+{
+ template <typename Value, typename Box>
+ static void apply(std::vector<Value> & input, Box & qbox, int size = 1)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < size, "the value must be greather than 0");
+
+ for ( int i = 0 ; i < 12 * size ; i += 3 )
+ {
+ for ( int j = 1 ; j < 25 * size ; j += 4 )
+ {
+ for ( int k = 2 ; k < 12 * size ; k += 5 )
+ {
+ input.push_back( generate::value<Value>::apply(i, j, k) );
+ }
+ }
+ }
+
+ typedef typename bg::traits::point_type<Box>::type P;
+
+ qbox = Box(P(3, 0, 3), P(10, 9, 11));
+ }
+};
+
+// generate_value_outside
+
+template <typename Value, size_t Dimension>
+struct value_outside_impl
+{};
+
+template <typename Value>
+struct value_outside_impl<Value, 2>
+{
+ static Value apply()
+ {
+ //TODO - for size > 1 in generate_input<> this won't be outside
+ return generate::value<Value>::apply(13, 26);
+ }
+};
+
+template <typename Value>
+struct value_outside_impl<Value, 3>
+{
+ static Value apply()
+ {
+ //TODO - for size > 1 in generate_input<> this won't be outside
+ return generate::value<Value>::apply(13, 26, 13);
+ }
+};
+
+template <typename Rtree>
+inline typename Rtree::value_type
+value_outside()
+{
+ typedef typename Rtree::value_type V;
+ typedef typename Rtree::indexable_type I;
+
+ return value_outside_impl<V, bg::dimension<I>::value>::apply();
+}
+
+template<typename Rtree, typename Elements, typename Box>
+void rtree(Rtree & tree, Elements & input, Box & qbox)
+{
+ typedef typename Rtree::indexable_type I;
+
+ generate::input<
+ bg::dimension<I>::value
+ >::apply(input, qbox);
+
+ tree.insert(input.begin(), input.end());
+}
+
+} // namespace generate
+
+namespace basictest {
+
+// low level test functions
+
+template <typename Rtree, typename Iter, typename Value>
+Iter find(Rtree const& rtree, Iter first, Iter last, Value const& value)
+{
+ for ( ; first != last ; ++first )
+ if ( rtree.value_eq()(value, *first) )
+ return first;
+ return first;
+}
+
+template <typename Rtree, typename Value>
+void compare_outputs(Rtree const& rtree, std::vector<Value> const& output, std::vector<Value> const& expected_output)
+{
+ bool are_sizes_ok = (expected_output.size() == output.size());
+ BOOST_CHECK( are_sizes_ok );
+ if ( are_sizes_ok )
+ {
+ BOOST_FOREACH(Value const& v, expected_output)
+ {
+ BOOST_CHECK(find(rtree, output.begin(), output.end(), v) != output.end() );
+ }
+ }
+}
+
+template <typename Rtree, typename Range1, typename Range2>
+void exactly_the_same_outputs(Rtree const& rtree, Range1 const& output, Range2 const& expected_output)
+{
+ size_t s1 = std::distance(output.begin(), output.end());
+ size_t s2 = std::distance(expected_output.begin(), expected_output.end());
+ BOOST_CHECK(s1 == s2);
+
+ if ( s1 == s2 )
+ {
+ typename Range1::const_iterator it1 = output.begin();
+ typename Range2::const_iterator it2 = expected_output.begin();
+ for ( ; it1 != output.end() && it2 != expected_output.end() ; ++it1, ++it2 )
+ {
+ if ( !rtree.value_eq()(*it1, *it2) )
+ {
+ BOOST_CHECK(false && "rtree.translator().equals(*it1, *it2)");
+ break;
+ }
+ }
+ }
+}
+
+// alternative version of std::copy taking iterators of differnet types
+template <typename First, typename Last, typename Out>
+void copy_alt(First first, Last last, Out out)
+{
+ for ( ; first != last ; ++first, ++out )
+ *out = *first;
+}
+
+// test query iterators
+template <typename QItF, typename QItL>
+void check_fwd_iterators(QItF first, QItL last)
+{
+ QItF vinit = QItF();
+ BOOST_CHECK(vinit == last);
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ QItL vinit2 = QItL();
+ BOOST_CHECK(vinit2 == last);
+#endif
+
+ QItF def;
+ BOOST_CHECK(def == last);
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ QItL def2;
+ BOOST_CHECK(def2 == last);
+#endif
+
+ QItF it = first;
+ for ( ; it != last && first != last ; ++it, ++first)
+ {
+ BOOST_CHECK(it == first);
+
+ bg::index::equal_to<typename std::iterator_traits<QItF>::value_type> eq;
+ BOOST_CHECK(eq(*it, *first));
+ }
+ BOOST_CHECK(it == last);
+ BOOST_CHECK(first == last);
+}
+
+// spatial query
+
+template <typename Rtree, typename Value, typename Predicates>
+void spatial_query(Rtree & rtree, Predicates const& pred, std::vector<Value> const& expected_output)
+{
+ BOOST_CHECK( bgi::detail::rtree::utilities::are_levels_ok(rtree) );
+ if ( !rtree.empty() )
+ BOOST_CHECK( bgi::detail::rtree::utilities::are_boxes_ok(rtree) );
+
+ std::vector<Value> output;
+ size_t n = rtree.query(pred, std::back_inserter(output));
+
+ BOOST_CHECK( expected_output.size() == n );
+ compare_outputs(rtree, output, expected_output);
+
+ std::vector<Value> output2;
+ size_t n2 = query(rtree, pred, std::back_inserter(output2));
+
+ BOOST_CHECK( n == n2 );
+ exactly_the_same_outputs(rtree, output, output2);
+
+ exactly_the_same_outputs(rtree, output, rtree | bgi::adaptors::queried(pred));
+
+ std::vector<Value> output3;
+ std::copy(rtree.qbegin(pred), rtree.qend(), std::back_inserter(output3));
+
+ compare_outputs(rtree, output3, expected_output);
+
+ std::vector<Value> output4;
+ std::copy(qbegin(rtree, pred), qend(rtree), std::back_inserter(output4));
+
+ exactly_the_same_outputs(rtree, output3, output4);
+
+ check_fwd_iterators(rtree.qbegin(pred), rtree.qend());
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ {
+ std::vector<Value> output4;
+ std::copy(rtree.qbegin_(pred), rtree.qend_(pred), std::back_inserter(output4));
+ compare_outputs(rtree, output4, expected_output);
+ output4.clear();
+ copy_alt(rtree.qbegin_(pred), rtree.qend_(), std::back_inserter(output4));
+ compare_outputs(rtree, output4, expected_output);
+
+ check_fwd_iterators(rtree.qbegin_(pred), rtree.qend_(pred));
+ check_fwd_iterators(rtree.qbegin_(pred), rtree.qend_());
+ }
+#endif
+}
+
+// rtree specific queries tests
+
+template <typename Rtree, typename Value, typename Box>
+void intersects(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ if ( bg::intersects(tree.indexable_get()(v), qbox) )
+ expected_output.push_back(v);
+
+ //spatial_query(tree, qbox, expected_output);
+ spatial_query(tree, bgi::intersects(qbox), expected_output);
+ spatial_query(tree, !bgi::disjoint(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::intersects(qring), expected_output);
+ spatial_query(tree, !bgi::disjoint(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::intersects(qpoly), expected_output);
+ spatial_query(tree, !bgi::disjoint(qpoly), expected_output);*/
+}
+
+template <typename Rtree, typename Value, typename Box>
+void disjoint(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ if ( bg::disjoint(tree.indexable_get()(v), qbox) )
+ expected_output.push_back(v);
+
+ spatial_query(tree, bgi::disjoint(qbox), expected_output);
+ spatial_query(tree, !bgi::intersects(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::disjoint(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::disjoint(qpoly), expected_output);*/
+}
+
+template <typename Tag>
+struct contains_impl
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+ {
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ if ( bg::within(qbox, tree.indexable_get()(v)) )
+ expected_output.push_back(v);
+
+ spatial_query(tree, bgi::contains(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::contains(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::contains(qpoly), expected_output);*/
+ }
+};
+
+template <>
+struct contains_impl<bg::point_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <>
+struct contains_impl<bg::segment_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <typename Rtree, typename Value, typename Box>
+void contains(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ contains_impl<
+ typename bg::tag<
+ typename Rtree::indexable_type
+ >::type
+ >::apply(tree, input, qbox);
+}
+
+template <typename Tag>
+struct covered_by_impl
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+ {
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ {
+ if ( bgi::detail::covered_by_bounds(
+ tree.indexable_get()(v),
+ qbox,
+ bgi::detail::get_strategy(tree.parameters())) )
+ {
+ expected_output.push_back(v);
+ }
+ }
+
+ spatial_query(tree, bgi::covered_by(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::covered_by(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::covered_by(qpoly), expected_output);*/
+ }
+};
+
+template <>
+struct covered_by_impl<bg::segment_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <typename Rtree, typename Value, typename Box>
+void covered_by(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ covered_by_impl<
+ typename bg::tag<
+ typename Rtree::indexable_type
+ >::type
+ >::apply(tree, input, qbox);
+}
+
+template <typename Tag>
+struct covers_impl
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+ {
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ if ( bg::covered_by(qbox, tree.indexable_get()(v)) )
+ expected_output.push_back(v);
+
+ spatial_query(tree, bgi::covers(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::covers(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::covers(qpoly), expected_output);*/
+ }
+};
+
+template <>
+struct covers_impl<bg::point_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <>
+struct covers_impl<bg::segment_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <typename Rtree, typename Value, typename Box>
+void covers(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ covers_impl<
+ typename bg::tag<
+ typename Rtree::indexable_type
+ >::type
+ >::apply(tree, input, qbox);
+}
+
+template <typename Tag>
+struct overlaps_impl
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+ {
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ if ( bg::overlaps(tree.indexable_get()(v), qbox) )
+ expected_output.push_back(v);
+
+ spatial_query(tree, bgi::overlaps(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::overlaps(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::overlaps(qpoly), expected_output);*/
+ }
+};
+
+template <>
+struct overlaps_impl<bg::point_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <>
+struct overlaps_impl<bg::segment_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <typename Rtree, typename Value, typename Box>
+void overlaps(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ overlaps_impl<
+ typename bg::tag<
+ typename Rtree::indexable_type
+ >::type
+ >::apply(tree, input, qbox);
+}
+
+//template <typename Tag, size_t Dimension>
+//struct touches_impl
+//{
+// template <typename Rtree, typename Value, typename Box>
+// static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+// {}
+//};
+//
+//template <>
+//struct touches_impl<bg::box_tag, 2>
+//{
+// template <typename Rtree, typename Value, typename Box>
+// static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+// {
+// std::vector<Value> expected_output;
+//
+// BOOST_FOREACH(Value const& v, input)
+// if ( bg::touches(tree.translator()(v), qbox) )
+// expected_output.push_back(v);
+//
+// spatial_query(tree, bgi::touches(qbox), expected_output);
+// }
+//};
+//
+//template <typename Rtree, typename Value, typename Box>
+//void touches(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+//{
+// touches_impl<
+// bgi::traits::tag<typename Rtree::indexable_type>::type,
+// bgi::traits::dimension<typename Rtree::indexable_type>::value
+// >::apply(tree, input, qbox);
+//}
+
+template <typename Tag>
+struct within_impl
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+ {
+ std::vector<Value> expected_output;
+
+ BOOST_FOREACH(Value const& v, input)
+ if ( bg::within(tree.indexable_get()(v), qbox) )
+ expected_output.push_back(v);
+
+ spatial_query(tree, bgi::within(qbox), expected_output);
+
+ /*typedef bg::traits::point_type<Box>::type P;
+ bg::model::ring<P> qring;
+ bg::convert(qbox, qring);
+ spatial_query(tree, bgi::within(qring), expected_output);
+ bg::model::polygon<P> qpoly;
+ bg::convert(qbox, qpoly);
+ spatial_query(tree, bgi::within(qpoly), expected_output);*/
+ }
+};
+
+template <>
+struct within_impl<bg::segment_tag>
+{
+ template <typename Rtree, typename Value, typename Box>
+ static void apply(Rtree const& /*tree*/, std::vector<Value> const& /*input*/, Box const& /*qbox*/)
+ {}
+};
+
+template <typename Rtree, typename Value, typename Box>
+void within(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ within_impl<
+ typename bg::tag<
+ typename Rtree::indexable_type
+ >::type
+ >::apply(tree, input, qbox);
+}
+
+// rtree nearest queries
+
+template <typename Rtree, typename Point>
+struct NearestKLess
+{
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ template <typename Value>
+ bool operator()(std::pair<D, Value> const& p1, std::pair<D, Value> const& p2) const
+ {
+ return p1.first < p2.first;
+ }
+};
+
+template <typename Rtree, typename Point>
+struct NearestKTransform
+{
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ template <typename Value>
+ Value const& operator()(std::pair<D, Value> const& p) const
+ {
+ return p.second;
+ }
+};
+
+template <typename Rtree, typename Value, typename Point, typename Distance>
+inline void compare_nearest_outputs(Rtree const& rtree, std::vector<Value> const& output, std::vector<Value> const& expected_output, Point const& pt, Distance greatest_distance)
+{
+ // check output
+ bool are_sizes_ok = (expected_output.size() == output.size());
+ BOOST_CHECK( are_sizes_ok );
+ if ( are_sizes_ok )
+ {
+ BOOST_FOREACH(Value const& v, output)
+ {
+ // TODO - perform explicit check here?
+ // should all objects which are closest be checked and should exactly the same be found?
+
+ if ( find(rtree, expected_output.begin(), expected_output.end(), v) == expected_output.end() )
+ {
+ Distance d = bg::comparable_distance(pt, rtree.indexable_get()(v));
+ BOOST_CHECK(d == greatest_distance);
+ }
+ }
+ }
+}
+
+template <typename Rtree, typename Value, typename Point>
+inline void check_sorted_by_distance(Rtree const& rtree, std::vector<Value> const& output, Point const& pt)
+{
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ D prev_dist = 0;
+ BOOST_FOREACH(Value const& v, output)
+ {
+ D d = bg::comparable_distance(pt, rtree.indexable_get()(v));
+ BOOST_CHECK(prev_dist <= d);
+ prev_dist = d;
+ }
+}
+
+template <typename Rtree, typename Value, typename Point>
+inline void nearest_query_k(Rtree const& rtree, std::vector<Value> const& input, Point const& pt, unsigned int k)
+{
+ // TODO: Nearest object may not be the same as found by the rtree if distances are equal
+ // All objects with the same closest distance should be picked
+
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ std::vector< std::pair<D, Value> > test_output;
+
+ // calculate test output - k closest values pairs
+ BOOST_FOREACH(Value const& v, input)
+ {
+ D d = bg::comparable_distance(pt, rtree.indexable_get()(v));
+
+ if ( test_output.size() < k )
+ test_output.push_back(std::make_pair(d, v));
+ else
+ {
+ std::sort(test_output.begin(), test_output.end(), NearestKLess<Rtree, Point>());
+ if ( d < test_output.back().first )
+ test_output.back() = std::make_pair(d, v);
+ }
+ }
+
+ // caluclate biggest distance
+ std::sort(test_output.begin(), test_output.end(), NearestKLess<Rtree, Point>());
+ D greatest_distance = 0;
+ if ( !test_output.empty() )
+ greatest_distance = test_output.back().first;
+
+ // transform test output to vector of values
+ std::vector<Value> expected_output(test_output.size(), generate::value_default<Value>::apply());
+ std::transform(test_output.begin(), test_output.end(), expected_output.begin(), NearestKTransform<Rtree, Point>());
+
+ // calculate output using rtree
+ std::vector<Value> output;
+ rtree.query(bgi::nearest(pt, k), std::back_inserter(output));
+
+ // check output
+ compare_nearest_outputs(rtree, output, expected_output, pt, greatest_distance);
+
+ exactly_the_same_outputs(rtree, output, rtree | bgi::adaptors::queried(bgi::nearest(pt, k)));
+
+ std::vector<Value> output2(k, generate::value_default<Value>::apply());
+ typename Rtree::size_type found_count = rtree.query(bgi::nearest(pt, k), output2.begin());
+ output2.resize(found_count, generate::value_default<Value>::apply());
+
+ exactly_the_same_outputs(rtree, output, output2);
+
+ std::vector<Value> output3;
+ std::copy(rtree.qbegin(bgi::nearest(pt, k)), rtree.qend(), std::back_inserter(output3));
+
+ compare_nearest_outputs(rtree, output3, expected_output, pt, greatest_distance);
+ check_sorted_by_distance(rtree, output3, pt);
+
+ check_fwd_iterators(rtree.qbegin(bgi::nearest(pt, k)), rtree.qend());
+
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ {
+ std::vector<Value> output4;
+ std::copy(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_(bgi::nearest(pt, k)), std::back_inserter(output4));
+ exactly_the_same_outputs(rtree, output4, output3);
+ output4.clear();
+ copy_alt(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_(), std::back_inserter(output4));
+ exactly_the_same_outputs(rtree, output4, output3);
+
+ check_fwd_iterators(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_(bgi::nearest(pt, k)));
+ check_fwd_iterators(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_());
+ }
+#endif
+}
+
+// rtree nearest not found
+
+struct AlwaysFalse
+{
+ template <typename Value>
+ bool operator()(Value const& ) const { return false; }
+};
+
+template <typename Rtree, typename Point>
+void nearest_query_not_found(Rtree const& rtree, Point const& pt)
+{
+ typedef typename Rtree::value_type Value;
+
+ std::vector<Value> output_v;
+ size_t n_res = rtree.query(bgi::nearest(pt, 5) && bgi::satisfies(AlwaysFalse()), std::back_inserter(output_v));
+ BOOST_CHECK(output_v.size() == n_res);
+ BOOST_CHECK(n_res < 5);
+}
+
+template <typename Value>
+bool satisfies_fun(Value const& ) { return true; }
+
+struct satisfies_obj
+{
+ template <typename Value>
+ bool operator()(Value const& ) const { return true; }
+};
+
+template <typename Rtree, typename Value>
+void satisfies(Rtree const& rtree, std::vector<Value> const& input)
+{
+ std::vector<Value> result;
+ rtree.query(bgi::satisfies(satisfies_obj()), std::back_inserter(result));
+ BOOST_CHECK(result.size() == input.size());
+ result.clear();
+ rtree.query(!bgi::satisfies(satisfies_obj()), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 0);
+
+ result.clear();
+ rtree.query(bgi::satisfies(satisfies_fun<Value>), std::back_inserter(result));
+ BOOST_CHECK(result.size() == input.size());
+ result.clear();
+ rtree.query(!bgi::satisfies(satisfies_fun<Value>), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 0);
+
+#ifndef BOOST_NO_CXX11_LAMBDAS
+ result.clear();
+ rtree.query(bgi::satisfies([](Value const&){ return true; }), std::back_inserter(result));
+ BOOST_CHECK(result.size() == input.size());
+ result.clear();
+ rtree.query(!bgi::satisfies([](Value const&){ return true; }), std::back_inserter(result));
+ BOOST_CHECK(result.size() == 0);
+#endif
+}
+
+// rtree copying and moving
+
+template <typename Rtree, typename Box>
+void copy_swap_move(Rtree const& tree, Box const& qbox)
+{
+ typedef typename Rtree::value_type Value;
+ typedef typename Rtree::parameters_type Params;
+
+ size_t s = tree.size();
+ Params params = tree.parameters();
+
+ std::vector<Value> expected_output;
+ tree.query(bgi::intersects(qbox), std::back_inserter(expected_output));
+
+ // copy constructor
+ Rtree t1(tree);
+
+ BOOST_CHECK(tree.empty() == t1.empty());
+ BOOST_CHECK(tree.size() == t1.size());
+ BOOST_CHECK(t1.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t1.parameters().get_min_elements() == params.get_min_elements());
+
+ std::vector<Value> output;
+ t1.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t1, output, expected_output);
+
+ // copying assignment operator
+ t1 = tree;
+
+ BOOST_CHECK(tree.empty() == t1.empty());
+ BOOST_CHECK(tree.size() == t1.size());
+ BOOST_CHECK(t1.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t1.parameters().get_min_elements() == params.get_min_elements());
+
+ output.clear();
+ t1.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t1, output, expected_output);
+
+ Rtree t2(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ t2.swap(t1);
+ BOOST_CHECK(tree.empty() == t2.empty());
+ BOOST_CHECK(tree.size() == t2.size());
+ BOOST_CHECK(true == t1.empty());
+ BOOST_CHECK(0 == t1.size());
+ // those fails e.g. on darwin 4.2.1 because it can't copy base obejcts properly
+ BOOST_CHECK(t1.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t1.parameters().get_min_elements() == params.get_min_elements());
+ BOOST_CHECK(t2.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t2.parameters().get_min_elements() == params.get_min_elements());
+
+ output.clear();
+ t1.query(bgi::intersects(qbox), std::back_inserter(output));
+ BOOST_CHECK(output.empty());
+
+ output.clear();
+ t2.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t2, output, expected_output);
+ t2.swap(t1);
+ // those fails e.g. on darwin 4.2.1 because it can't copy base obejcts properly
+ BOOST_CHECK(t1.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t1.parameters().get_min_elements() == params.get_min_elements());
+ BOOST_CHECK(t2.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t2.parameters().get_min_elements() == params.get_min_elements());
+
+ // moving constructor
+ Rtree t3(boost::move(t1), tree.get_allocator());
+
+ BOOST_CHECK(t3.size() == s);
+ BOOST_CHECK(t1.size() == 0);
+ BOOST_CHECK(t3.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t3.parameters().get_min_elements() == params.get_min_elements());
+
+ output.clear();
+ t3.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t3, output, expected_output);
+
+ // moving assignment operator
+ t1 = boost::move(t3);
+
+ BOOST_CHECK(t1.size() == s);
+ BOOST_CHECK(t3.size() == 0);
+ BOOST_CHECK(t1.parameters().get_max_elements() == params.get_max_elements());
+ BOOST_CHECK(t1.parameters().get_min_elements() == params.get_min_elements());
+
+ output.clear();
+ t1.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t1, output, expected_output);
+
+ //TODO - test SWAP
+
+ ::boost::ignore_unused(params);
+}
+
+template <typename I, typename O>
+inline void my_copy(I first, I last, O out)
+{
+ for ( ; first != last ; ++first, ++out )
+ *out = *first;
+}
+
+// rtree creation and insertion
+
+template <typename Rtree, typename Value, typename Box>
+void create_insert(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ std::vector<Value> expected_output;
+ tree.query(bgi::intersects(qbox), std::back_inserter(expected_output));
+
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ BOOST_FOREACH(Value const& v, input)
+ t.insert(v);
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ //std::copy(input.begin(), input.end(), bgi::inserter(t));
+ my_copy(input.begin(), input.end(), bgi::inserter(t)); // to suppress MSVC warnings
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(input.begin(), input.end(), tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ compare_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(input, tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ compare_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ t.insert(input.begin(), input.end());
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ t.insert(input);
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ BOOST_FOREACH(Value const& v, input)
+ bgi::insert(t, v);
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ bgi::query(t, bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ bgi::insert(t, input.begin(), input.end());
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ bgi::query(t, bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator());
+ bgi::insert(t, input);
+ BOOST_CHECK(tree.size() == t.size());
+ std::vector<Value> output;
+ bgi::query(t, bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+}
+
+// rtree removing
+
+template <typename Rtree, typename Box>
+void remove(Rtree const& tree, Box const& qbox)
+{
+ typedef typename Rtree::value_type Value;
+
+ std::vector<Value> values_to_remove;
+ tree.query(bgi::intersects(qbox), std::back_inserter(values_to_remove));
+ BOOST_CHECK(0 < values_to_remove.size());
+
+ std::vector<Value> expected_output;
+ tree.query(bgi::disjoint(qbox), std::back_inserter(expected_output));
+ size_t expected_removed_count = values_to_remove.size();
+ size_t expected_size_after_remove = tree.size() - values_to_remove.size();
+
+ // Add value which is not stored in the Rtree
+ Value outsider = generate::value_outside<Rtree>();
+ values_to_remove.push_back(outsider);
+
+ {
+ Rtree t(tree);
+ size_t r = 0;
+ BOOST_FOREACH(Value const& v, values_to_remove)
+ r += t.remove(v);
+ BOOST_CHECK( r == expected_removed_count );
+ std::vector<Value> output;
+ t.query(bgi::disjoint(qbox), std::back_inserter(output));
+ BOOST_CHECK( t.size() == expected_size_after_remove );
+ BOOST_CHECK( output.size() == tree.size() - expected_removed_count );
+ compare_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree);
+ size_t r = t.remove(values_to_remove.begin(), values_to_remove.end());
+ BOOST_CHECK( r == expected_removed_count );
+ std::vector<Value> output;
+ t.query(bgi::disjoint(qbox), std::back_inserter(output));
+ BOOST_CHECK( t.size() == expected_size_after_remove );
+ BOOST_CHECK( output.size() == tree.size() - expected_removed_count );
+ compare_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree);
+ size_t r = t.remove(values_to_remove);
+ BOOST_CHECK( r == expected_removed_count );
+ std::vector<Value> output;
+ t.query(bgi::disjoint(qbox), std::back_inserter(output));
+ BOOST_CHECK( t.size() == expected_size_after_remove );
+ BOOST_CHECK( output.size() == tree.size() - expected_removed_count );
+ compare_outputs(t, output, expected_output);
+ }
+
+ {
+ Rtree t(tree);
+ size_t r = 0;
+ BOOST_FOREACH(Value const& v, values_to_remove)
+ r += bgi::remove(t, v);
+ BOOST_CHECK( r == expected_removed_count );
+ std::vector<Value> output;
+ bgi::query(t, bgi::disjoint(qbox), std::back_inserter(output));
+ BOOST_CHECK( t.size() == expected_size_after_remove );
+ BOOST_CHECK( output.size() == tree.size() - expected_removed_count );
+ compare_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree);
+ size_t r = bgi::remove(t, values_to_remove.begin(), values_to_remove.end());
+ BOOST_CHECK( r == expected_removed_count );
+ std::vector<Value> output;
+ bgi::query(t, bgi::disjoint(qbox), std::back_inserter(output));
+ BOOST_CHECK( t.size() == expected_size_after_remove );
+ BOOST_CHECK( output.size() == tree.size() - expected_removed_count );
+ compare_outputs(t, output, expected_output);
+ }
+ {
+ Rtree t(tree);
+ size_t r = bgi::remove(t, values_to_remove);
+ BOOST_CHECK( r == expected_removed_count );
+ std::vector<Value> output;
+ bgi::query(t, bgi::disjoint(qbox), std::back_inserter(output));
+ BOOST_CHECK( t.size() == expected_size_after_remove );
+ BOOST_CHECK( output.size() == tree.size() - expected_removed_count );
+ compare_outputs(t, output, expected_output);
+ }
+}
+
+template <typename Rtree, typename Value, typename Box>
+void clear(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ std::vector<Value> values_to_remove;
+ tree.query(bgi::intersects(qbox), std::back_inserter(values_to_remove));
+ BOOST_CHECK(0 < values_to_remove.size());
+
+ //clear
+ {
+ Rtree t(tree);
+
+ std::vector<Value> expected_output;
+ t.query(bgi::intersects(qbox), std::back_inserter(expected_output));
+ size_t s = t.size();
+ t.clear();
+ BOOST_CHECK(t.empty());
+ BOOST_CHECK(t.size() == 0);
+ t.insert(input);
+ BOOST_CHECK(t.size() == s);
+ std::vector<Value> output;
+ t.query(bgi::intersects(qbox), std::back_inserter(output));
+ exactly_the_same_outputs(t, output, expected_output);
+ }
+}
+
+template <typename Rtree, typename Value>
+void range(Rtree & tree, std::vector<Value> const& input)
+{
+ check_fwd_iterators(tree.begin(), tree.end());
+
+ size_t count = std::distance(tree.begin(), tree.end());
+ BOOST_CHECK(count == tree.size());
+ BOOST_CHECK(count == input.size());
+
+ count = std::distance(boost::begin(tree), boost::end(tree));
+ BOOST_CHECK(count == tree.size());
+
+ count = boost::size(tree);
+ BOOST_CHECK(count == tree.size());
+
+ count = 0;
+ BOOST_FOREACH(Value const& v, tree)
+ {
+ boost::ignore_unused(v);
+ ++count;
+ }
+ BOOST_CHECK(count == tree.size());
+
+}
+
+// rtree queries
+
+template <typename Rtree, typename Value, typename Box>
+void queries(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ basictest::intersects(tree, input, qbox);
+ basictest::disjoint(tree, input, qbox);
+ basictest::covered_by(tree, input, qbox);
+ basictest::overlaps(tree, input, qbox);
+ //basictest::touches(tree, input, qbox);
+ basictest::within(tree, input, qbox);
+ basictest::contains(tree, input, qbox);
+ basictest::covers(tree, input, qbox);
+
+ typedef typename bg::point_type<Box>::type P;
+ P pt;
+ bg::centroid(qbox, pt);
+
+ basictest::nearest_query_k(tree, input, pt, 10);
+ basictest::nearest_query_not_found(tree, generate::outside_point<P>::apply());
+
+ basictest::satisfies(tree, input);
+}
+
+// rtree creation and modification
+
+template <typename Rtree, typename Value, typename Box>
+void modifiers(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
+{
+ basictest::copy_swap_move(tree, qbox);
+ basictest::create_insert(tree, input, qbox);
+ basictest::remove(tree, qbox);
+ basictest::clear(tree, input, qbox);
+}
+
+} // namespace basictest
+
+template <typename Value, typename Parameters, typename Allocator>
+void test_rtree_queries(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef bgi::indexable<Value> I;
+ typedef bgi::equal_to<Value> E;
+ typedef typename Allocator::template rebind<Value>::other A;
+ typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
+ typedef typename Tree::bounds_type B;
+
+ Tree tree(parameters, I(), E(), allocator);
+ std::vector<Value> input;
+ B qbox;
+
+ generate::rtree(tree, input, qbox);
+
+ basictest::queries(tree, input, qbox);
+
+ Tree empty_tree(parameters, I(), E(), allocator);
+ std::vector<Value> empty_input;
+
+ basictest::queries(empty_tree, empty_input, qbox);
+}
+
+template <typename Value, typename Parameters, typename Allocator>
+void test_rtree_modifiers(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef bgi::indexable<Value> I;
+ typedef bgi::equal_to<Value> E;
+ typedef typename Allocator::template rebind<Value>::other A;
+ typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
+ typedef typename Tree::bounds_type B;
+
+ Tree tree(parameters, I(), E(), allocator);
+ std::vector<Value> input;
+ B qbox;
+
+ generate::rtree(tree, input, qbox);
+
+ basictest::modifiers(tree, input, qbox);
+
+ Tree empty_tree(parameters, I(), E(), allocator);
+ std::vector<Value> empty_input;
+
+ basictest::copy_swap_move(empty_tree, qbox);
+}
+
+// run all tests for a single Algorithm and single rtree
+// defined by Value
+
+template <typename Value, typename Parameters, typename Allocator>
+void test_rtree_by_value(Parameters const& parameters, Allocator const& allocator)
+{
+ test_rtree_queries<Value>(parameters, allocator);
+ test_rtree_modifiers<Value>(parameters, allocator);
+}
+
+// rtree inserting and removing of counting_value
+
+template <typename Indexable, typename Parameters, typename Allocator>
+void test_count_rtree_values(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef counting_value<Indexable> Value;
+
+ typedef bgi::indexable<Value> I;
+ typedef bgi::equal_to<Value> E;
+ typedef typename Allocator::template rebind<Value>::other A;
+ typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
+ typedef typename Tree::bounds_type B;
+
+ Tree t(parameters, I(), E(), allocator);
+ std::vector<Value> input;
+ B qbox;
+
+ generate::rtree(t, input, qbox);
+
+ size_t rest_count = input.size();
+
+ BOOST_CHECK(t.size() + rest_count == Value::counter());
+
+ std::vector<Value> values_to_remove;
+ t.query(bgi::intersects(qbox), std::back_inserter(values_to_remove));
+
+ rest_count += values_to_remove.size();
+
+ BOOST_CHECK(t.size() + rest_count == Value::counter());
+
+ size_t values_count = Value::counter();
+
+ BOOST_FOREACH(Value const& v, values_to_remove)
+ {
+ size_t r = t.remove(v);
+ --values_count;
+
+ BOOST_CHECK(1 == r);
+ BOOST_CHECK(Value::counter() == values_count);
+ BOOST_CHECK(t.size() + rest_count == values_count);
+ }
+}
+
+// rtree count
+
+template <typename Indexable, typename Parameters, typename Allocator>
+void test_rtree_count(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef std::pair<Indexable, int> Value;
+
+ typedef bgi::indexable<Value> I;
+ typedef bgi::equal_to<Value> E;
+ typedef typename Allocator::template rebind<Value>::other A;
+ typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
+ typedef typename Tree::bounds_type B;
+
+ Tree t(parameters, I(), E(), allocator);
+ std::vector<Value> input;
+ B qbox;
+
+ generate::rtree(t, input, qbox);
+
+ BOOST_CHECK(t.count(input[0]) == 1);
+ BOOST_CHECK(t.count(input[0].first) == 1);
+
+ t.insert(input[0]);
+
+ BOOST_CHECK(t.count(input[0]) == 2);
+ BOOST_CHECK(t.count(input[0].first) == 2);
+
+ t.insert(std::make_pair(input[0].first, -1));
+
+ BOOST_CHECK(t.count(input[0]) == 2);
+ BOOST_CHECK(t.count(input[0].first) == 3);
+}
+
+// test rtree box
+
+template <typename Value, typename Parameters, typename Allocator>
+void test_rtree_bounds(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef bgi::indexable<Value> I;
+ typedef bgi::equal_to<Value> E;
+ typedef typename Allocator::template rebind<Value>::other A;
+ typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
+ typedef typename Tree::bounds_type B;
+ //typedef typename bg::traits::point_type<B>::type P;
+
+ Tree t(parameters, I(), E(), allocator);
+ std::vector<Value> input;
+ B qbox;
+
+ B b;
+ bg::assign_inverse(b);
+
+ BOOST_CHECK(bg::equals(t.bounds(), b));
+
+ generate::rtree(t, input, qbox);
+
+ b = bgi::detail::rtree::values_box<B>(input.begin(), input.end(), t.indexable_get(),
+ bgi::detail::get_strategy(parameters));
+
+ BOOST_CHECK(bg::equals(t.bounds(), b));
+ BOOST_CHECK(bg::equals(t.bounds(), bgi::bounds(t)));
+
+ size_t s = input.size();
+ while ( s/2 < input.size() && !input.empty() )
+ {
+ t.remove(input.back());
+ input.pop_back();
+ }
+
+ b = bgi::detail::rtree::values_box<B>(input.begin(), input.end(), t.indexable_get(),
+ bgi::detail::get_strategy(parameters));
+
+ BOOST_CHECK(bg::equals(t.bounds(), b));
+
+ Tree t2(t);
+ BOOST_CHECK(bg::equals(t2.bounds(), b));
+ t2.clear();
+ t2 = t;
+ BOOST_CHECK(bg::equals(t2.bounds(), b));
+ t2.clear();
+ t2 = boost::move(t);
+ BOOST_CHECK(bg::equals(t2.bounds(), b));
+
+ t.clear();
+
+ bg::assign_inverse(b);
+ BOOST_CHECK(bg::equals(t.bounds(), b));
+}
+
+// test rtree iterator
+
+template <typename Indexable, typename Parameters, typename Allocator>
+void test_rtree_range(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef std::pair<Indexable, int> Value;
+
+ typedef bgi::indexable<Value> I;
+ typedef bgi::equal_to<Value> E;
+ typedef typename Allocator::template rebind<Value>::other A;
+ typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
+ typedef typename Tree::bounds_type B;
+
+ Tree t(parameters, I(), E(), allocator);
+ std::vector<Value> input;
+ B qbox;
+
+ generate::rtree(t, input, qbox);
+
+ basictest::range(t, input);
+ basictest::range((Tree const&)t, input);
+}
+
+template <typename Indexable, typename Parameters, typename Allocator>
+void test_rtree_additional(Parameters const& parameters, Allocator const& allocator)
+{
+ test_count_rtree_values<Indexable>(parameters, allocator);
+ test_rtree_count<Indexable>(parameters, allocator);
+ test_rtree_bounds<Indexable>(parameters, allocator);
+ test_rtree_range<Indexable>(parameters, allocator);
+}
+
+// run all tests for one Algorithm for some number of rtrees
+// defined by some number of Values constructed from given Point
+
+template<typename Point, typename Parameters, typename Allocator>
+void test_rtree_for_point(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef std::pair<Point, int> PairP;
+ typedef boost::tuple<Point, int, int> TupleP;
+ typedef boost::shared_ptr< test_object<Point> > SharedPtrP;
+ typedef value_no_dctor<Point> VNoDCtor;
+
+ test_rtree_by_value<Point, Parameters>(parameters, allocator);
+ test_rtree_by_value<PairP, Parameters>(parameters, allocator);
+ test_rtree_by_value<TupleP, Parameters>(parameters, allocator);
+
+ test_rtree_by_value<SharedPtrP, Parameters>(parameters, allocator);
+ test_rtree_by_value<VNoDCtor, Parameters>(parameters, allocator);
+
+ test_rtree_additional<Point>(parameters, allocator);
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ typedef std::tuple<Point, int, int> StdTupleP;
+ test_rtree_by_value<StdTupleP, Parameters>(parameters, allocator);
+#endif
+}
+
+template<typename Point, typename Parameters, typename Allocator>
+void test_rtree_for_box(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef bg::model::box<Point> Box;
+ typedef std::pair<Box, int> PairB;
+ typedef boost::tuple<Box, int, int> TupleB;
+ typedef value_no_dctor<Box> VNoDCtor;
+
+ test_rtree_by_value<Box, Parameters>(parameters, allocator);
+ test_rtree_by_value<PairB, Parameters>(parameters, allocator);
+ test_rtree_by_value<TupleB, Parameters>(parameters, allocator);
+
+ test_rtree_by_value<VNoDCtor, Parameters>(parameters, allocator);
+
+ test_rtree_additional<Box>(parameters, allocator);
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ typedef std::tuple<Box, int, int> StdTupleB;
+ test_rtree_by_value<StdTupleB, Parameters>(parameters, allocator);
+#endif
+}
+
+template<typename Point, typename Parameters>
+void test_rtree_for_point(Parameters const& parameters)
+{
+ test_rtree_for_point<Point>(parameters, std::allocator<int>());
+}
+
+template<typename Point, typename Parameters>
+void test_rtree_for_box(Parameters const& parameters)
+{
+ test_rtree_for_box<Point>(parameters, std::allocator<int>());
+}
+
+namespace testset {
+
+template<typename Indexable, typename Parameters, typename Allocator>
+void modifiers(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef std::pair<Indexable, int> Pair;
+ typedef boost::tuple<Indexable, int, int> Tuple;
+ typedef boost::shared_ptr< test_object<Indexable> > SharedPtr;
+ typedef value_no_dctor<Indexable> VNoDCtor;
+
+ test_rtree_modifiers<Indexable>(parameters, allocator);
+ test_rtree_modifiers<Pair>(parameters, allocator);
+ test_rtree_modifiers<Tuple>(parameters, allocator);
+
+ test_rtree_modifiers<SharedPtr>(parameters, allocator);
+ test_rtree_modifiers<VNoDCtor>(parameters, allocator);
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ typedef std::tuple<Indexable, int, int> StdTuple;
+ test_rtree_modifiers<StdTuple>(parameters, allocator);
+#endif
+}
+
+template<typename Indexable, typename Parameters, typename Allocator>
+void queries(Parameters const& parameters, Allocator const& allocator)
+{
+ typedef std::pair<Indexable, int> Pair;
+ typedef boost::tuple<Indexable, int, int> Tuple;
+ typedef boost::shared_ptr< test_object<Indexable> > SharedPtr;
+ typedef value_no_dctor<Indexable> VNoDCtor;
+
+ test_rtree_queries<Indexable>(parameters, allocator);
+ test_rtree_queries<Pair>(parameters, allocator);
+ test_rtree_queries<Tuple>(parameters, allocator);
+
+ test_rtree_queries<SharedPtr>(parameters, allocator);
+ test_rtree_queries<VNoDCtor>(parameters, allocator);
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ typedef std::tuple<Indexable, int, int> StdTuple;
+ test_rtree_queries<StdTuple>(parameters, allocator);
+#endif
+}
+
+template<typename Indexable, typename Parameters, typename Allocator>
+void additional(Parameters const& parameters, Allocator const& allocator)
+{
+ test_rtree_additional<Indexable, Parameters>(parameters, allocator);
+}
+
+} // namespace testset
+
+#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP
diff --git a/src/boost/libs/geometry/index/test/varray.cpp b/src/boost/libs/geometry/index/test/varray.cpp
new file mode 100644
index 000000000..d561f1c78
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/varray.cpp
@@ -0,0 +1,781 @@
+// Boost.Geometry.Index varray
+// Unit Test
+
+// Copyright (c) 2012-2014 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2012-2013 Andrew Hundt.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/impl/execution_monitor.ipp>
+
+// TODO: Disable parts of the unit test that should not run when BOOST_NO_EXCEPTIONS
+// if exceptions are enabled there must be a user defined throw_exception function
+#ifdef BOOST_NO_EXCEPTIONS
+namespace boost {
+ void throw_exception(std::exception const & e){}; // user defined
+} // namespace boost
+#endif // BOOST_NO_EXCEPTIONS
+
+#include <vector>
+#include <list>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#include <boost/container/vector.hpp>
+#include <boost/container/stable_vector.hpp>
+using namespace boost::container;
+#endif
+
+#include "varray_test.hpp"
+
+using namespace boost::geometry::index::detail;
+
+template <typename T, size_t N>
+void test_ctor_ndc()
+{
+ varray<T, N> s;
+ BOOST_CHECK_EQUAL(s.size(), 0u);
+ BOOST_CHECK(s.capacity() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(0), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+}
+
+template <typename T, size_t N>
+void test_ctor_nc(size_t n)
+{
+ varray<T, N> s(n);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+ if ( 1 < n )
+ {
+ T val10(10);
+ s[0] = val10;
+ BOOST_CHECK(T(10) == s[0]);
+ BOOST_CHECK(T(10) == s.at(0));
+ T val20(20);
+ s.at(1) = val20;
+ BOOST_CHECK(T(20) == s[1]);
+ BOOST_CHECK(T(20) == s.at(1));
+ }
+}
+
+template <typename T, size_t N>
+void test_ctor_nd(size_t n, T const& v)
+{
+ varray<T, N> s(n, v);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+ if ( 1 < n )
+ {
+ BOOST_CHECK(v == s[0]);
+ BOOST_CHECK(v == s.at(0));
+ BOOST_CHECK(v == s[1]);
+ BOOST_CHECK(v == s.at(1));
+ s[0] = T(10);
+ BOOST_CHECK(T(10) == s[0]);
+ BOOST_CHECK(T(10) == s.at(0));
+ s.at(1) = T(20);
+ BOOST_CHECK(T(20) == s[1]);
+ BOOST_CHECK(T(20) == s.at(1));
+ }
+}
+
+template <typename T, size_t N>
+void test_resize_nc(size_t n)
+{
+ varray<T, N> s;
+
+ s.resize(n);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+ if ( 1 < n )
+ {
+ T val10(10);
+ s[0] = val10;
+ BOOST_CHECK(T(10) == s[0]);
+ BOOST_CHECK(T(10) == s.at(0));
+ T val20(20);
+ s.at(1) = val20;
+ BOOST_CHECK(T(20) == s[1]);
+ BOOST_CHECK(T(20) == s.at(1));
+ }
+}
+
+template <typename T, size_t N>
+void test_resize_nd(size_t n, T const& v)
+{
+ varray<T, N> s;
+
+ s.resize(n, v);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+ if ( 1 < n )
+ {
+ BOOST_CHECK(v == s[0]);
+ BOOST_CHECK(v == s.at(0));
+ BOOST_CHECK(v == s[1]);
+ BOOST_CHECK(v == s.at(1));
+ s[0] = T(10);
+ BOOST_CHECK(T(10) == s[0]);
+ BOOST_CHECK(T(10) == s.at(0));
+ s.at(1) = T(20);
+ BOOST_CHECK(T(20) == s[1]);
+ BOOST_CHECK(T(20) == s.at(1));
+ }
+}
+
+template <typename T, size_t N>
+void test_push_back_nd()
+{
+ varray<T, N> s;
+
+ BOOST_CHECK(s.size() == 0);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(0), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ T t(i);
+ s.push_back(t);
+ BOOST_CHECK(s.size() == i + 1);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(i + 1), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+ BOOST_CHECK(T(i) == s.at(i));
+ BOOST_CHECK(T(i) == s[i]);
+ BOOST_CHECK(T(i) == s.back());
+ BOOST_CHECK(T(0) == s.front());
+ BOOST_CHECK(T(i) == *(s.data() + i));
+ }
+}
+
+template <typename T, size_t N>
+void test_pop_back_nd()
+{
+ varray<T, N> s;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ T t(i);
+ s.push_back(t);
+ }
+
+ for ( size_t i = N ; i > 1 ; --i )
+ {
+ s.pop_back();
+ BOOST_CHECK(s.size() == i - 1);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW( s.at(i - 1), std::out_of_range );
+#endif // BOOST_NO_EXCEPTIONS
+ BOOST_CHECK(T(i - 2) == s.at(i - 2));
+ BOOST_CHECK(T(i - 2) == s[i - 2]);
+ BOOST_CHECK(T(i - 2) == s.back());
+ BOOST_CHECK(T(0) == s.front());
+ }
+}
+
+template <typename It1, typename It2>
+void test_compare_ranges(It1 first1, It1 last1, It2 first2, It2 last2)
+{
+ BOOST_CHECK(std::distance(first1, last1) == std::distance(first2, last2));
+ for ( ; first1 != last1 && first2 != last2 ; ++first1, ++first2 )
+ BOOST_CHECK(*first1 == *first2);
+}
+
+template <typename T, size_t N, typename C>
+void test_copy_and_assign(C const& c)
+{
+ {
+ varray<T, N> s(c.begin(), c.end());
+ BOOST_CHECK(s.size() == c.size());
+ test_compare_ranges(s.begin(), s.end(), c.begin(), c.end());
+ }
+ {
+ varray<T, N> s;
+ BOOST_CHECK(0 == s.size());
+ s.assign(c.begin(), c.end());
+ BOOST_CHECK(s.size() == c.size());
+ test_compare_ranges(s.begin(), s.end(), c.begin(), c.end());
+ }
+}
+
+template <typename T, size_t N>
+void test_copy_and_assign_nd(T const& val)
+{
+ varray<T, N> s;
+ std::vector<T> v;
+ std::list<T> l;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ T t(i);
+ s.push_back(t);
+ v.push_back(t);
+ l.push_back(t);
+ }
+ // copy ctor
+ {
+ varray<T, N> s1(s);
+ BOOST_CHECK(s.size() == s1.size());
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ }
+ // copy assignment
+ {
+ varray<T, N> s1;
+ BOOST_CHECK(0 == s1.size());
+ s1 = s;
+ BOOST_CHECK(s.size() == s1.size());
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ }
+
+ // ctor(Iter, Iter) and assign(Iter, Iter)
+ test_copy_and_assign<T, N>(s);
+ test_copy_and_assign<T, N>(v);
+ test_copy_and_assign<T, N>(l);
+
+ // assign(N, V)
+ {
+ varray<T, N> s1(s);
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ std::vector<T> a(N, val);
+ s1.assign(N, val);
+ test_compare_ranges(a.begin(), a.end(), s1.begin(), s1.end());
+ }
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ stable_vector<T> bsv(s.begin(), s.end());
+ vector<T> bv(s.begin(), s.end());
+ test_copy_and_assign<T, N>(bsv);
+ test_copy_and_assign<T, N>(bv);
+#endif
+}
+
+template <typename T, size_t N>
+void test_iterators_nd()
+{
+ varray<T, N> s;
+ std::vector<T> v;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ s.push_back(T(i));
+ v.push_back(T(i));
+ }
+
+ test_compare_ranges(s.begin(), s.end(), v.begin(), v.end());
+ test_compare_ranges(s.rbegin(), s.rend(), v.rbegin(), v.rend());
+
+ s.assign(v.rbegin(), v.rend());
+
+ test_compare_ranges(s.cbegin(), s.cend(), v.rbegin(), v.rend());
+ test_compare_ranges(s.crbegin(), s.crend(), v.begin(), v.end());
+
+ varray<T, N> const& cs = s;
+ std::vector<T> const& cv = v;
+ s.assign(cv.rbegin(), cv.rend());
+
+ test_compare_ranges(cs.begin(), cs.end(), cv.rbegin(), cv.rend());
+ test_compare_ranges(cs.rbegin(), cs.rend(), cv.begin(), cv.end());
+}
+
+template <typename T, size_t N>
+void test_erase_nd()
+{
+ varray<T, N> s;
+ typedef typename varray<T, N>::iterator It;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ s.push_back(T(i));
+
+ // erase(pos)
+ {
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ varray<T, N> s1(s);
+ It it = s1.erase(s1.begin() + i);
+ BOOST_CHECK(s1.begin() + i == it);
+ BOOST_CHECK(s1.size() == N - 1);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = i+1 ; j < N ; ++j )
+ BOOST_CHECK(s1[j-1] == T(j));
+ }
+ }
+ // erase(first, last)
+ {
+ size_t n = N/3;
+ for ( size_t i = 0 ; i <= N ; ++i )
+ {
+ varray<T, N> s1(s);
+ size_t removed = i + n < N ? n : N - i;
+ It it = s1.erase(s1.begin() + i, s1.begin() + i + removed);
+ BOOST_CHECK(s1.begin() + i == it);
+ BOOST_CHECK(s1.size() == N - removed);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = i+n ; j < N ; ++j )
+ BOOST_CHECK(s1[j-n] == T(j));
+ }
+ }
+}
+
+template <typename T, size_t N, typename SV, typename C>
+void test_insert(SV const& s, C const& c)
+{
+ size_t h = N/2;
+ size_t n = size_t(h/1.5f);
+
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+
+ typename C::const_iterator it = c.begin();
+ std::advance(it, n);
+ typename varray<T, N>::iterator
+ it1 = s1.insert(s1.begin() + i, c.begin(), it);
+
+ BOOST_CHECK(s1.begin() + i == it1);
+ BOOST_CHECK(s1.size() == h+n);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = 0 ; j < n ; ++j )
+ BOOST_CHECK(s1[j+i] == T(100 + j));
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+n] == T(j+i));
+ }
+}
+
+template <typename T, size_t N>
+void test_insert_nd(T const& val)
+{
+ size_t h = N/2;
+
+ varray<T, N> s, ss;
+ std::vector<T> v;
+ std::list<T> l;
+
+ typedef typename varray<T, N>::iterator It;
+
+ for ( size_t i = 0 ; i < h ; ++i )
+ {
+ s.push_back(T(i));
+ ss.push_back(T(100 + i));
+ v.push_back(T(100 + i));
+ l.push_back(T(100 + i));
+ }
+
+ // insert(pos, val)
+ {
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ It it = s1.insert(s1.begin() + i, val);
+ BOOST_CHECK(s1.begin() + i == it);
+ BOOST_CHECK(s1.size() == h+1);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ BOOST_CHECK(s1[i] == val);
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+1] == T(j+i));
+ }
+ }
+ // insert(pos, n, val)
+ {
+ size_t n = size_t(h/1.5f);
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ It it = s1.insert(s1.begin() + i, n, val);
+ BOOST_CHECK(s1.begin() + i == it);
+ BOOST_CHECK(s1.size() == h+n);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = 0 ; j < n ; ++j )
+ BOOST_CHECK(s1[j+i] == val);
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+n] == T(j+i));
+ }
+ }
+ // insert(pos, first, last)
+ test_insert<T, N>(s, ss);
+ test_insert<T, N>(s, v);
+ test_insert<T, N>(s, l);
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ stable_vector<T> bsv(ss.begin(), ss.end());
+ vector<T> bv(ss.begin(), ss.end());
+ test_insert<T, N>(s, bv);
+ test_insert<T, N>(s, bsv);
+#endif
+}
+
+template <typename T>
+void test_capacity_0_nd()
+{
+ varray<T, 10> v(5u, T(0));
+
+ //varray<T, 0, bad_alloc_strategy<T> > s;
+ varray<T, 0> s;
+ BOOST_CHECK(s.size() == 0);
+ BOOST_CHECK(s.capacity() == 0);
+#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_CHECK_THROW(s.at(0), std::out_of_range);
+ //BOOST_CHECK_THROW(s.resize(5u, T(0)), std::bad_alloc);
+ //BOOST_CHECK_THROW(s.push_back(T(0)), std::bad_alloc);
+ //BOOST_CHECK_THROW(s.insert(s.end(), T(0)), std::bad_alloc);
+ //BOOST_CHECK_THROW(s.insert(s.end(), 5u, T(0)), std::bad_alloc);
+ //BOOST_CHECK_THROW(s.insert(s.end(), v.begin(), v.end()), std::bad_alloc);
+ //BOOST_CHECK_THROW(s.assign(v.begin(), v.end()), std::bad_alloc);
+ //BOOST_CHECK_THROW(s.assign(5u, T(0)), std::bad_alloc);
+ //try{
+ // varray<T, 0, bad_alloc_strategy<T> > s2(v.begin(), v.end());
+ // BOOST_CHECK(false);
+ //}catch(std::bad_alloc &){}
+ //try{
+ // varray<T, 0, bad_alloc_strategy<T> > s1(5u, T(0));
+ // BOOST_CHECK(false);
+ //}catch(std::bad_alloc &){}
+#endif // BOOST_NO_EXCEPTIONS
+}
+
+template <typename T, size_t N>
+void test_exceptions_nd()
+{
+ varray<T, N> v(N, T(0));
+ //varray<T, N/2, bad_alloc_strategy<T> > s(N/2, T(0));
+ varray<T, N/2> s(N/2, T(0));
+
+#ifndef BOOST_NO_EXCEPTIONS
+ /*BOOST_CHECK_THROW(s.resize(N, T(0)), std::bad_alloc);
+ BOOST_CHECK_THROW(s.push_back(T(0)), std::bad_alloc);
+ BOOST_CHECK_THROW(s.insert(s.end(), T(0)), std::bad_alloc);
+ BOOST_CHECK_THROW(s.insert(s.end(), N, T(0)), std::bad_alloc);
+ BOOST_CHECK_THROW(s.insert(s.end(), v.begin(), v.end()), std::bad_alloc);
+ BOOST_CHECK_THROW(s.assign(v.begin(), v.end()), std::bad_alloc);
+ BOOST_CHECK_THROW(s.assign(N, T(0)), std::bad_alloc);
+ try{
+ container_detail::varray<T, N/2, bad_alloc_strategy<T> > s2(v.begin(), v.end());
+ BOOST_CHECK(false);
+ }catch(std::bad_alloc &){}
+ try{
+ container_detail::varray<T, N/2, bad_alloc_strategy<T> > s1(N, T(0));
+ BOOST_CHECK(false);
+ }catch(std::bad_alloc &){}*/
+#endif // BOOST_NO_EXCEPTIONS
+}
+
+template <typename T, size_t N>
+void test_swap_and_move_nd()
+{
+ {
+ varray<T, N> v1, v2, v3, v4;
+ varray<T, N> s1, s2;
+ //varray<T, N, bad_alloc_strategy<T> > s4;
+ varray<T, N> s4;
+
+ for (size_t i = 0 ; i < N ; ++i )
+ {
+ v1.push_back(T(i));
+ v2.push_back(T(i));
+ v3.push_back(T(i));
+ v4.push_back(T(i));
+ }
+ for (size_t i = 0 ; i < N/2 ; ++i )
+ {
+ s1.push_back(T(100 + i));
+ s2.push_back(T(100 + i));
+ s4.push_back(T(100 + i));
+ }
+
+ s1.swap(v1);
+ s2 = boost::move(v2);
+ varray<T, N> s3(boost::move(v3));
+ s4.swap(v4);
+
+ BOOST_CHECK(v1.size() == N/2);
+ BOOST_CHECK(s1.size() == N);
+ BOOST_CHECK(v2.size() == N); // objects aren't destroyed
+ BOOST_CHECK(s2.size() == N);
+ BOOST_CHECK(v3.size() == N); // objects aren't destroyed
+ BOOST_CHECK(s3.size() == N);
+ BOOST_CHECK(v4.size() == N/2);
+ BOOST_CHECK(s4.size() == N);
+ for (size_t i = 0 ; i < N/2 ; ++i )
+ {
+ BOOST_CHECK(v1[i] == T(100 + i));
+ BOOST_CHECK(v4[i] == T(100 + i));
+ }
+ for (size_t i = 0 ; i < N ; ++i )
+ {
+ BOOST_CHECK(s1[i] == T(i));
+ BOOST_CHECK(s2[i] == T(i));
+ BOOST_CHECK(s3[i] == T(i));
+ BOOST_CHECK(s4[i] == T(i));
+ }
+ }
+ {
+ varray<T, N> v1, v2, v3;
+ varray<T, N/2> s1, s2;
+
+ for (size_t i = 0 ; i < N/2 ; ++i )
+ {
+ v1.push_back(T(i));
+ v2.push_back(T(i));
+ v3.push_back(T(i));
+ }
+ for (size_t i = 0 ; i < N/3 ; ++i )
+ {
+ s1.push_back(T(100 + i));
+ s2.push_back(T(100 + i));
+ }
+
+ s1.swap(v1);
+ s2 = boost::move(v2);
+ varray<T, N/2> s3(boost::move(v3));
+
+ BOOST_CHECK(v1.size() == N/3);
+ BOOST_CHECK(s1.size() == N/2);
+ BOOST_CHECK(v2.size() == N/2); // objects aren't destroyed
+ BOOST_CHECK(s2.size() == N/2);
+ BOOST_CHECK(v3.size() == N/2); // objects aren't destroyed
+ BOOST_CHECK(s3.size() == N/2);
+ for (size_t i = 0 ; i < N/3 ; ++i )
+ BOOST_CHECK(v1[i] == T(100 + i));
+ for (size_t i = 0 ; i < N/2 ; ++i )
+ {
+ BOOST_CHECK(s1[i] == T(i));
+ BOOST_CHECK(s2[i] == T(i));
+ BOOST_CHECK(s3[i] == T(i));
+ }
+ }
+ {
+ varray<T, N> v(N, T(0));
+ //varray<T, N/2, bad_alloc_strategy<T> > s(N/2, T(1));
+ varray<T, N/2> s(N/2, T(1));
+#ifndef BOOST_NO_EXCEPTIONS
+ //BOOST_CHECK_THROW(s.swap(v), std::bad_alloc);
+ //v.resize(N, T(0));
+ //BOOST_CHECK_THROW(s = boost::move(v), std::bad_alloc);
+ //v.resize(N, T(0));
+ //try {
+ // varray<T, N/2, bad_alloc_strategy<T> > s2(boost::move(v));
+ // BOOST_CHECK(false);
+ //} catch (std::bad_alloc &) {}
+#endif // BOOST_NO_EXCEPTIONS
+ }
+}
+
+template <typename T, size_t N>
+void test_emplace_0p()
+{
+ //emplace_back()
+ {
+ //varray<T, N, bad_alloc_strategy<T> > v;
+ varray<T, N> v;
+
+ for (int i = 0 ; i < int(N) ; ++i )
+ v.emplace_back();
+ BOOST_CHECK(v.size() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ //BOOST_CHECK_THROW(v.emplace_back(), std::bad_alloc);
+#endif
+ }
+}
+
+template <typename T, size_t N>
+void test_emplace_2p()
+{
+ //emplace_back(pos, int, int)
+ {
+ //varray<T, N, bad_alloc_strategy<T> > v;
+ varray<T, N> v;
+
+ for (int i = 0 ; i < int(N) ; ++i )
+ v.emplace_back(i, 100 + i);
+ BOOST_CHECK(v.size() == N);
+#ifndef BOOST_NO_EXCEPTIONS
+ //BOOST_CHECK_THROW(v.emplace_back(N, 100 + N), std::bad_alloc);
+#endif
+ BOOST_CHECK(v.size() == N);
+ for (int i = 0 ; i < int(N) ; ++i )
+ BOOST_CHECK(v[i] == T(i, 100 + i));
+ }
+
+ // emplace(pos, int, int)
+ {
+ //typedef typename varray<T, N, bad_alloc_strategy<T> >::iterator It;
+ typedef typename varray<T, N>::iterator It;
+
+ int h = N / 2;
+
+ //varray<T, N, bad_alloc_strategy<T> > v;
+ varray<T, N> v;
+ for ( int i = 0 ; i < h ; ++i )
+ v.emplace_back(i, 100 + i);
+
+ for ( int i = 0 ; i <= h ; ++i )
+ {
+ //varray<T, N, bad_alloc_strategy<T> > vv(v);
+ varray<T, N> vv(v);
+ It it = vv.emplace(vv.begin() + i, i+100, i+200);
+ BOOST_CHECK(vv.begin() + i == it);
+ BOOST_CHECK(vv.size() == size_t(h+1));
+ for ( int j = 0 ; j < i ; ++j )
+ BOOST_CHECK(vv[j] == T(j, j+100));
+ BOOST_CHECK(vv[i] == T(i+100, i+200));
+ for ( int j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(vv[j+i+1] == T(j+i, j+i+100));
+ }
+ }
+}
+
+template <typename T, size_t N>
+void test_sv_elem(T const& t)
+{
+ //typedef varray<T, N, bad_alloc_strategy<T> > V;
+ typedef varray<T, N> V;
+
+ //varray<V, N, bad_alloc_strategy<V> > v;
+ varray<V, N> v;
+
+ v.push_back(V(N/2, t));
+ V vvv(N/2, t);
+ v.push_back(boost::move(vvv));
+ v.insert(v.begin(), V(N/2, t));
+ v.insert(v.end(), V(N/2, t));
+ v.emplace_back(N/2, t);
+}
+
+int test_main(int, char* [])
+{
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_ctor_ndc<size_t, 10>();
+ test_ctor_ndc<value_ndc, 10>();
+ test_ctor_ndc<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_ctor_ndc<shptr_value, 10>();
+ test_ctor_ndc<copy_movable, 10>();
+
+ test_ctor_nc<size_t, 10>(5);
+ test_ctor_nc<value_nc, 10>(5);
+ test_ctor_nc<counting_value, 10>(5);
+ BOOST_CHECK(counting_value::count() == 0);
+ test_ctor_nc<shptr_value, 10>(5);
+ test_ctor_nc<copy_movable, 10>(5);
+
+ test_ctor_nd<size_t, 10>(5, 1);
+ test_ctor_nd<value_nd, 10>(5, value_nd(1));
+ test_ctor_nd<counting_value, 10>(5, counting_value(1));
+ BOOST_CHECK(counting_value::count() == 0);
+ test_ctor_nd<shptr_value, 10>(5, shptr_value(1));
+ test_ctor_nd<copy_movable, 10>(5, produce());
+
+ test_resize_nc<size_t, 10>(5);
+ test_resize_nc<value_nc, 10>(5);
+ test_resize_nc<counting_value, 10>(5);
+ BOOST_CHECK(counting_value::count() == 0);
+ test_resize_nc<shptr_value, 10>(5);
+ test_resize_nc<copy_movable, 10>(5);
+
+ test_resize_nd<size_t, 10>(5, 1);
+ test_resize_nd<value_nd, 10>(5, value_nd(1));
+ test_resize_nd<counting_value, 10>(5, counting_value(1));
+ BOOST_CHECK(counting_value::count() == 0);
+ test_resize_nd<shptr_value, 10>(5, shptr_value(1));
+ test_resize_nd<copy_movable, 10>(5, produce());
+
+ test_push_back_nd<size_t, 10>();
+ test_push_back_nd<value_nd, 10>();
+ test_push_back_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_push_back_nd<shptr_value, 10>();
+ test_push_back_nd<copy_movable, 10>();
+
+ test_pop_back_nd<size_t, 10>();
+ test_pop_back_nd<value_nd, 10>();
+ test_pop_back_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_pop_back_nd<shptr_value, 10>();
+ test_pop_back_nd<copy_movable, 10>();
+
+ test_copy_and_assign_nd<size_t, 10>(1);
+ test_copy_and_assign_nd<value_nd, 10>(value_nd(1));
+ test_copy_and_assign_nd<counting_value, 10>(counting_value(1));
+ BOOST_CHECK(counting_value::count() == 0);
+ test_copy_and_assign_nd<shptr_value, 10>(shptr_value(1));
+ test_copy_and_assign_nd<copy_movable, 10>(produce());
+
+ test_iterators_nd<size_t, 10>();
+ test_iterators_nd<value_nd, 10>();
+ test_iterators_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_iterators_nd<shptr_value, 10>();
+ test_iterators_nd<copy_movable, 10>();
+
+ test_erase_nd<size_t, 10>();
+ test_erase_nd<value_nd, 10>();
+ test_erase_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_erase_nd<shptr_value, 10>();
+ test_erase_nd<copy_movable, 10>();
+
+ test_insert_nd<size_t, 10>(50);
+ test_insert_nd<value_nd, 10>(value_nd(50));
+ test_insert_nd<counting_value, 10>(counting_value(50));
+ BOOST_CHECK(counting_value::count() == 0);
+ test_insert_nd<shptr_value, 10>(shptr_value(50));
+ test_insert_nd<copy_movable, 10>(produce());
+
+ test_capacity_0_nd<size_t>();
+ test_capacity_0_nd<value_nd>();
+ test_capacity_0_nd<counting_value>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_capacity_0_nd<shptr_value>();
+ test_capacity_0_nd<copy_movable>();
+
+ test_exceptions_nd<size_t, 10>();
+ test_exceptions_nd<value_nd, 10>();
+ test_exceptions_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_exceptions_nd<shptr_value, 10>();
+ test_exceptions_nd<copy_movable, 10>();
+
+ test_swap_and_move_nd<size_t, 10>();
+ test_swap_and_move_nd<value_nd, 10>();
+ test_swap_and_move_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+ test_swap_and_move_nd<shptr_value, 10>();
+ test_swap_and_move_nd<copy_movable, 10>();
+
+ test_emplace_0p<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_emplace_2p<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_sv_elem<size_t, 10>(50);
+ test_sv_elem<value_nd, 10>(value_nd(50));
+ test_sv_elem<counting_value, 10>(counting_value(50));
+ BOOST_CHECK(counting_value::count() == 0);
+ test_sv_elem<shptr_value, 10>(shptr_value(50));
+ test_sv_elem<copy_movable, 10>(copy_movable(50));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/varray_old.cpp b/src/boost/libs/geometry/index/test/varray_old.cpp
new file mode 100644
index 000000000..37840f96f
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/varray_old.cpp
@@ -0,0 +1,490 @@
+// Boost.Geometry Index
+// Unit Test
+
+// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/impl/execution_monitor.ipp>
+
+#include <boost/geometry/index/detail/varray.hpp>
+
+using namespace boost::geometry::index::detail;
+
+class value_ndc
+{
+public:
+ explicit value_ndc(int a) : aa(a) {}
+ ~value_ndc() {}
+ bool operator==(value_ndc const& v) const { return aa == v.aa; }
+private:
+ value_ndc(value_ndc const&) {}
+ value_ndc & operator=(value_ndc const&) { return *this; }
+ int aa;
+};
+
+class value_nd
+{
+public:
+ explicit value_nd(int a) : aa(a) {}
+ ~value_nd() {}
+ bool operator==(value_nd const& v) const { return aa == v.aa; }
+private:
+ int aa;
+};
+
+class value_nc
+{
+public:
+ explicit value_nc(int a = 0) : aa(a) {}
+ ~value_nc() {}
+ bool operator==(value_nc const& v) const { return aa == v.aa; }
+private:
+ value_nc(value_nc const&) {}
+ value_nc & operator=(value_ndc const&) { return *this; }
+ int aa;
+};
+
+class counting_value
+{
+public:
+ explicit counting_value(int a = 0) : aa(a) { ++c(); }
+ counting_value(counting_value const& v) : aa(v.aa) { ++c(); }
+ counting_value & operator=(counting_value const& v) { aa = v.aa; return *this; }
+ ~counting_value() { --c(); }
+ bool operator==(counting_value const& v) const { return aa == v.aa; }
+ static size_t count() { return c(); }
+private:
+ static size_t & c() { static size_t co = 0; return co; }
+ int aa;
+};
+
+template <typename T, size_t N>
+void test_ctor_ndc()
+{
+ varray<T, N> s;
+ BOOST_CHECK(s.size() == 0);
+ BOOST_CHECK(s.capacity() == N);
+ BOOST_CHECK_THROW( s.at(0), std::out_of_range );
+}
+
+template <typename T, size_t N>
+void test_ctor_nc(size_t n)
+{
+ varray<T, N> s(n);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+ if ( !boost::has_trivial_constructor<T>::value )
+ {
+ for ( size_t i = 0 ; i < n ; ++i )
+ BOOST_CHECK(T() == s[i]);
+ }
+}
+
+template <typename T, size_t N>
+void test_ctor_nd(size_t n, T const& v)
+{
+ varray<T, N> s(n, v);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+ if ( 1 < n )
+ {
+ BOOST_CHECK(v == s[0]);
+ BOOST_CHECK(v == s.at(0));
+ BOOST_CHECK(v == s[1]);
+ BOOST_CHECK(v == s.at(1));
+ s[0] = T(10);
+ BOOST_CHECK(T(10) == s[0]);
+ BOOST_CHECK(T(10) == s.at(0));
+ s.at(1) = T(20);
+ BOOST_CHECK(T(20) == s[1]);
+ BOOST_CHECK(T(20) == s.at(1));
+ }
+}
+
+template <typename T, size_t N>
+void test_resize_nc(size_t n)
+{
+ varray<T, N> s;
+
+ s.resize(n);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+
+ if ( !boost::has_trivial_constructor<T>::value )
+ {
+ for ( size_t i = 0 ; i < n ; ++i )
+ BOOST_CHECK(T() == s[i]);
+ }
+}
+
+template <typename T, size_t N>
+void test_resize_nd(size_t n, T const& v)
+{
+ varray<T, N> s;
+
+ s.resize(n, v);
+ BOOST_CHECK(s.size() == n);
+ BOOST_CHECK(s.capacity() == N);
+ BOOST_CHECK_THROW( s.at(n), std::out_of_range );
+ if ( 1 < n )
+ {
+ BOOST_CHECK(v == s[0]);
+ BOOST_CHECK(v == s.at(0));
+ BOOST_CHECK(v == s[1]);
+ BOOST_CHECK(v == s.at(1));
+ s[0] = T(10);
+ BOOST_CHECK(T(10) == s[0]);
+ BOOST_CHECK(T(10) == s.at(0));
+ s.at(1) = T(20);
+ BOOST_CHECK(T(20) == s[1]);
+ BOOST_CHECK(T(20) == s.at(1));
+ }
+}
+
+template <typename T, size_t N>
+void test_push_back_nd()
+{
+ varray<T, N> s;
+
+ BOOST_CHECK(s.size() == 0);
+ BOOST_CHECK_THROW( s.at(0), std::out_of_range );
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ s.push_back(T(i));
+ BOOST_CHECK(s.size() == i + 1);
+ BOOST_CHECK_THROW( s.at(i + 1), std::out_of_range );
+ BOOST_CHECK(T(i) == s.at(i));
+ BOOST_CHECK(T(i) == s[i]);
+ BOOST_CHECK(T(i) == s.back());
+ BOOST_CHECK(T(0) == s.front());
+ }
+}
+
+template <typename T, size_t N>
+void test_pop_back_nd()
+{
+ varray<T, N> s;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ s.push_back(T(i));
+
+ for ( size_t i = N ; i > 1 ; --i )
+ {
+ s.pop_back();
+ BOOST_CHECK(s.size() == i - 1);
+ BOOST_CHECK_THROW( s.at(i - 1), std::out_of_range );
+ BOOST_CHECK(T(i - 2) == s.at(i - 2));
+ BOOST_CHECK(T(i - 2) == s[i - 2]);
+ BOOST_CHECK(T(i - 2) == s.back());
+ BOOST_CHECK(T(0) == s.front());
+ }
+}
+
+template <typename It1, typename It2>
+void test_compare_ranges(It1 first1, It1 last1, It2 first2, It2 last2)
+{
+ BOOST_CHECK(std::distance(first1, last1) == std::distance(first2, last2));
+ for ( ; first1 != last1 && first2 != last2 ; ++first1, ++first2 )
+ BOOST_CHECK(*first1 == *first2);
+}
+
+template <typename T, size_t N>
+void test_copy_and_assign_nd(T const& val)
+{
+ varray<T, N> s;
+ std::vector<T> v;
+ std::list<T> l;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ s.push_back(T(i));
+ v.push_back(T(i));
+ l.push_back(T(i));
+ }
+ // copy ctor
+ {
+ varray<T, N> s1(s);
+ BOOST_CHECK(s.size() == s1.size());
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ }
+ // copy assignment
+ {
+ varray<T, N> s1;
+ BOOST_CHECK(0 == s1.size());
+ s1 = s;
+ BOOST_CHECK(s.size() == s1.size());
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ }
+ // ctor(Iter, Iter)
+ {
+ varray<T, N> s1(s.begin(), s.end());
+ BOOST_CHECK(s.size() == s1.size());
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ }
+ {
+ varray<T, N> s1(v.begin(), v.end());
+ BOOST_CHECK(v.size() == s1.size());
+ test_compare_ranges(v.begin(), v.end(), s1.begin(), s1.end());
+ }
+ {
+ varray<T, N> s1(l.begin(), l.end());
+ BOOST_CHECK(l.size() == s1.size());
+ test_compare_ranges(l.begin(), l.end(), s1.begin(), s1.end());
+ }
+ // assign(Iter, Iter)
+ {
+ varray<T, N> s1;
+ BOOST_CHECK(0 == s1.size());
+ s1.assign(s.begin(), s.end());
+ BOOST_CHECK(s.size() == s1.size());
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ }
+ {
+ varray<T, N> s1;
+ BOOST_CHECK(0 == s1.size());
+ s1.assign(v.begin(), v.end());
+ BOOST_CHECK(v.size() == s1.size());
+ test_compare_ranges(v.begin(), v.end(), s1.begin(), s1.end());
+ }
+ {
+ varray<T, N> s1;
+ BOOST_CHECK(0 == s1.size());
+ s1.assign(l.begin(), l.end());
+ BOOST_CHECK(l.size() == s1.size());
+ test_compare_ranges(l.begin(), l.end(), s1.begin(), s1.end());
+ }
+ // assign(N, V)
+ {
+ varray<T, N> s1(s);
+ test_compare_ranges(s.begin(), s.end(), s1.begin(), s1.end());
+ std::vector<T> a(N, val);
+ s1.assign(N, val);
+ test_compare_ranges(a.begin(), a.end(), s1.begin(), s1.end());
+ }
+}
+
+template <typename T, size_t N>
+void test_iterators_nd()
+{
+ varray<T, N> s;
+ std::vector<T> v;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ s.push_back(T(i));
+ v.push_back(T(i));
+ }
+
+ test_compare_ranges(s.begin(), s.end(), v.begin(), v.end());
+ test_compare_ranges(s.rbegin(), s.rend(), v.rbegin(), v.rend());
+
+ s.assign(v.rbegin(), v.rend());
+
+ test_compare_ranges(s.begin(), s.end(), v.rbegin(), v.rend());
+ test_compare_ranges(s.rbegin(), s.rend(), v.begin(), v.end());
+}
+
+template <typename T, size_t N>
+void test_erase_nd()
+{
+ varray<T, N> s;
+
+ for ( size_t i = 0 ; i < N ; ++i )
+ s.push_back(T(i));
+
+ // erase(pos)
+ {
+ for ( size_t i = 0 ; i < N ; ++i )
+ {
+ varray<T, N> s1(s);
+ s1.erase(s1.begin() + i);
+ BOOST_CHECK(s1.size() == N - 1);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = i+1 ; j < N ; ++j )
+ BOOST_CHECK(s1[j-1] == T(j));
+ }
+ }
+ // erase(first, last)
+ {
+ size_t n = N/3;
+ for ( size_t i = 0 ; i <= N ; ++i )
+ {
+ varray<T, N> s1(s);
+ size_t removed = i + n < N ? n : N - i;
+ s1.erase(s1.begin() + i, s1.begin() + i + removed);
+ BOOST_CHECK(s1.size() == N - removed);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = i+n ; j < N ; ++j )
+ BOOST_CHECK(s1[j-n] == T(j));
+ }
+ }
+}
+
+template <typename T, size_t N>
+void test_insert_nd(T const& val)
+{
+ size_t h = N/2;
+
+ varray<T, N> s, ss;
+ std::vector<T> v;
+ std::list<T> l;
+
+ for ( size_t i = 0 ; i < h ; ++i )
+ {
+ s.push_back(T(i));
+ ss.push_back(T(100 + i));
+ v.push_back(T(100 + i));
+ l.push_back(T(100 + i));
+ }
+
+ // insert(pos, val)
+ {
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ s1.insert(s1.begin() + i, val);
+ BOOST_CHECK(s1.size() == h+1);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ BOOST_CHECK(s1[i] == val);
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+1] == T(j+i));
+ }
+ }
+ // insert(pos, n, val)
+ {
+ size_t n = size_t(h/1.5f);
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ s1.insert(s1.begin() + i, n, val);
+ BOOST_CHECK(s1.size() == h+n);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = 0 ; j < n ; ++j )
+ BOOST_CHECK(s1[j+i] == val);
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+n] == T(j+i));
+ }
+ }
+ // insert(pos, first, last)
+ {
+ size_t n = size_t(h/1.5f);
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ s1.insert(s1.begin() + i, ss.begin(), ss.begin() + n);
+ BOOST_CHECK(s1.size() == h+n);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = 0 ; j < n ; ++j )
+ BOOST_CHECK(s1[j+i] == T(100 + j));
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+n] == T(j+i));
+ }
+ }
+ {
+ size_t n = size_t(h/1.5f);
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ s1.insert(s1.begin() + i, v.begin(), v.begin() + n);
+ BOOST_CHECK(s1.size() == h+n);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = 0 ; j < n ; ++j )
+ BOOST_CHECK(s1[j+i] == T(100 + j));
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+n] == T(j+i));
+ }
+ }
+ {
+ size_t n = size_t(h/1.5f);
+ for ( size_t i = 0 ; i <= h ; ++i )
+ {
+ varray<T, N> s1(s);
+ typename std::list<T>::iterator it = l.begin();
+ std::advance(it, n);
+ s1.insert(s1.begin() + i, l.begin(), it);
+ BOOST_CHECK(s1.size() == h+n);
+ for ( size_t j = 0 ; j < i ; ++j )
+ BOOST_CHECK(s1[j] == T(j));
+ for ( size_t j = 0 ; j < n ; ++j )
+ BOOST_CHECK(s1[j+i] == T(100 + j));
+ for ( size_t j = 0 ; j < h-i ; ++j )
+ BOOST_CHECK(s1[j+i+n] == T(j+i));
+ }
+ }
+}
+
+int test_main(int, char* [])
+{
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_ctor_ndc<int, 10>();
+ test_ctor_ndc<value_ndc, 10>();
+ test_ctor_ndc<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_ctor_nc<int, 10>(5);
+ test_ctor_nc<value_nc, 10>(5);
+ test_ctor_nc<counting_value, 10>(5);
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_ctor_nd<int, 10>(5, 1);
+ test_ctor_nd<value_nd, 10>(5, value_nd(1));
+ test_ctor_nd<counting_value, 10>(5, counting_value(1));
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_resize_nc<int, 10>(5);
+ test_resize_nc<value_nc, 10>(5);
+ test_resize_nc<counting_value, 10>(5);
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_resize_nd<int, 10>(5, 1);
+ test_resize_nd<value_nd, 10>(5, value_nd(1));
+ test_resize_nd<counting_value, 10>(5, counting_value(1));
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_push_back_nd<int, 10>();
+ test_push_back_nd<value_nd, 10>();
+ test_push_back_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_pop_back_nd<int, 10>();
+ test_pop_back_nd<value_nd, 10>();
+ test_pop_back_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_copy_and_assign_nd<int, 10>(1);
+ test_copy_and_assign_nd<value_nd, 10>(value_nd(1));
+ test_copy_and_assign_nd<counting_value, 10>(counting_value(1));
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_iterators_nd<int, 10>();
+ test_iterators_nd<value_nd, 10>();
+ test_iterators_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_erase_nd<int, 10>();
+ test_erase_nd<value_nd, 10>();
+ test_erase_nd<counting_value, 10>();
+ BOOST_CHECK(counting_value::count() == 0);
+
+ test_insert_nd<int, 10>(50);
+ test_insert_nd<value_nd, 10>(value_nd(50));
+ test_insert_nd<counting_value, 10>(counting_value(50));
+ BOOST_CHECK(counting_value::count() == 0);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/index/test/varray_test.hpp b/src/boost/libs/geometry/index/test/varray_test.hpp
new file mode 100644
index 000000000..4136db7fc
--- /dev/null
+++ b/src/boost/libs/geometry/index/test/varray_test.hpp
@@ -0,0 +1,97 @@
+// Boost.Geometry.Index varray
+// Unit Test
+
+// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2012-2013 Andrew Hundt.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_INDEX_TEST_VARRAY_TEST_HPP
+#define BOOST_GEOMETRY_INDEX_TEST_VARRAY_TEST_HPP
+
+#include <boost/geometry/index/detail/varray.hpp>
+
+#include <boost/shared_ptr.hpp>
+#include "movable.hpp"
+
+class value_ndc
+{
+public:
+ explicit value_ndc(size_t a) : aa(a) {}
+ ~value_ndc() {}
+ bool operator==(value_ndc const& v) const { return aa == v.aa; }
+ bool operator<(value_ndc const& v) const { return aa < v.aa; }
+private:
+ value_ndc(value_ndc const&) {}
+ value_ndc & operator=(value_ndc const&) { return *this; }
+ size_t aa;
+};
+
+class value_nd
+{
+public:
+ explicit value_nd(size_t a) : aa(a) {}
+ ~value_nd() {}
+ bool operator==(value_nd const& v) const { return aa == v.aa; }
+ bool operator<(value_nd const& v) const { return aa < v.aa; }
+private:
+ size_t aa;
+};
+
+class value_nc
+{
+public:
+ explicit value_nc(size_t a = 0) : aa(a) {}
+ ~value_nc() {}
+ bool operator==(value_nc const& v) const { return aa == v.aa; }
+ bool operator<(value_nc const& v) const { return aa < v.aa; }
+private:
+ value_nc(value_nc const&) {}
+ value_nc & operator=(value_ndc const&) { return *this; }
+ size_t aa;
+};
+
+class counting_value
+{
+ BOOST_COPYABLE_AND_MOVABLE(counting_value)
+
+public:
+ explicit counting_value(size_t a = 0, size_t b = 0) : aa(a), bb(b) { ++c(); }
+ counting_value(counting_value const& v) : aa(v.aa), bb(v.bb) { ++c(); }
+ counting_value(BOOST_RV_REF(counting_value) p) : aa(p.aa), bb(p.bb) { p.aa = 0; p.bb = 0; ++c(); } // Move constructor
+ counting_value& operator=(BOOST_RV_REF(counting_value) p) { aa = p.aa; p.aa = 0; bb = p.bb; p.bb = 0; return *this; } // Move assignment
+ counting_value& operator=(BOOST_COPY_ASSIGN_REF(counting_value) p) { aa = p.aa; bb = p.bb; return *this; } // Copy assignment
+ ~counting_value() { --c(); }
+ bool operator==(counting_value const& v) const { return aa == v.aa && bb == v.bb; }
+ bool operator<(counting_value const& v) const { return aa < v.aa || ( aa == v.aa && bb < v.bb ); }
+ static size_t count() { return c(); }
+
+private:
+ static size_t & c() { static size_t co = 0; return co; }
+ size_t aa, bb;
+};
+
+namespace boost {
+
+template <>
+struct has_nothrow_move<counting_value>
+{
+ static const bool value = true;
+};
+
+}
+
+class shptr_value
+{
+ typedef boost::shared_ptr<size_t> Ptr;
+public:
+ explicit shptr_value(size_t a = 0) : m_ptr(new size_t(a)) {}
+ bool operator==(shptr_value const& v) const { return *m_ptr == *(v.m_ptr); }
+ bool operator<(shptr_value const& v) const { return *m_ptr < *(v.m_ptr); }
+private:
+ boost::shared_ptr<size_t> m_ptr;
+};
+
+#endif // BOOST_GEOMETRY_INDEX_TEST_VARRAY_TEST_HPP
diff --git a/src/boost/libs/geometry/meta/libraries.json b/src/boost/libs/geometry/meta/libraries.json
new file mode 100644
index 000000000..a6648fc39
--- /dev/null
+++ b/src/boost/libs/geometry/meta/libraries.json
@@ -0,0 +1,25 @@
+[
+ {
+ "key": "geometry",
+ "boost-version": "1.47.0",
+ "name": "Geometry",
+ "authors": [
+ "Barend Gehrels",
+ "Bruno Lalande",
+ "Mateusz Loskot",
+ "Adam Wulkiewicz",
+ "Menelaos Karavelas"
+ ],
+ "maintainers": [
+ "Barend Gehrels <barend -at- xs4all.nl>",
+ "Bruno Lalande <bruno.lalande -at- gmail.com>",
+ "Mateusz Loskot <mateusz -at- loskot.net>",
+ "Adam Wulkiewicz <adam.wulkiewicz -at- gmail.com>"
+ ],
+ "description":
+ "The Boost.Geometry library provides geometric algorithms, primitives and spatial index.",
+ "category": [
+ "Algorithms", "Data", "Math"
+ ]
+ }
+]
diff --git a/src/boost/libs/geometry/sublibs b/src/boost/libs/geometry/sublibs
new file mode 100644
index 000000000..edc2ec078
--- /dev/null
+++ b/src/boost/libs/geometry/sublibs
@@ -0,0 +1,2 @@
+The existance of this file tells the regression reporting programs that the directory contains sub-directories which are libraries.
+
diff --git a/src/boost/libs/geometry/test/Jamfile b/src/boost/libs/geometry/test/Jamfile
new file mode 100644
index 000000000..d179fe7c3
--- /dev/null
+++ b/src/boost/libs/geometry/test/Jamfile
@@ -0,0 +1,57 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2018 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2017, 2018, 2019.
+# Modifications copyright (c) 2017-2019 Oracle and/or its affiliates.
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os ;
+import testing ;
+
+project boost-geometry-test
+ :
+ requirements
+ <include>.
+ <include>../../../boost/geometry/extensions/contrib/ttmath
+ <toolset>msvc:<asynch-exceptions>on
+ <toolset>msvc:<cxxflags>/bigobj
+ <toolset>clang:<cxxflags>-Wno-unneeded-internal-declaration # supress warning by Boost.None
+ <toolset>intel:<define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ <host-os>windows,<toolset>intel:<cxxflags>/bigobj
+ <define>BOOST_NO_AUTO_PTR # disable the deprecated std::auto_ptr support in SmartPtr and Core
+ ;
+
+# Run minimal testset
+test-suite boost-geometry-minimal
+ :
+ [ run minimal.cpp : : : : minimal ]
+ ;
+
+# If not on Travis run all of the tests
+if ! [ os.environ TRAVIS ]
+{
+
+build-project core ;
+build-project concepts ;
+build-project geometries ;
+build-project arithmetic ;
+build-project algorithms ;
+build-project formulas ;
+build-project iterators ;
+build-project strategies ;
+build-project policies ;
+build-project io ;
+build-project srs ;
+build-project cs_undefined ;
+build-project util ;
+build-project views ;
+
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/Jamfile b/src/boost/libs/geometry/test/algorithms/Jamfile
new file mode 100644
index 000000000..0ff096c95
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/Jamfile
@@ -0,0 +1,85 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2018 Adam Wulkiewicz, Lodz, Poland.
+#
+# This file was modified by Oracle on 2014, 2015, 2016, 2017.
+# Modifications copyright (c) 2014-2017, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms
+ :
+ [ run append.cpp : : : : algorithms_append ]
+ [ run assign.cpp : : : : algorithms_assign ]
+ [ run centroid.cpp : : : : algorithms_centroid ]
+ [ run centroid_multi.cpp : : : : algorithms_centroid_multi ]
+ [ run comparable_distance.cpp : : : : algorithms_comparable_distance ]
+ [ run convert.cpp : : : : algorithms_convert ]
+ [ run convert_multi.cpp : : : : algorithms_convert_multi ]
+ [ run convex_hull.cpp : : : : algorithms_convex_hull ]
+ [ run convex_hull_multi.cpp : : : : algorithms_convex_hull_multi ]
+ [ run correct.cpp : : : : algorithms_correct ]
+ [ run correct_multi.cpp : : : : algorithms_correct_multi ]
+ [ run correct_closure.cpp : : : : algorithms_correct_closure ]
+ [ run densify.cpp : : : : algorithms_densify ]
+ [ run for_each.cpp : : : : algorithms_for_each ]
+ [ run for_each_multi.cpp : : : : algorithms_for_each_multi ]
+ [ run is_convex.cpp : : : : algorithms_is_convex ]
+ [ run is_empty.cpp : : : : algorithms_is_empty ]
+ [ run is_simple.cpp : : : : algorithms_is_simple ]
+ [ run is_simple_geo.cpp : : : : algorithms_is_simple_geo ]
+ [ run is_valid.cpp : : : : algorithms_is_valid ]
+ [ run is_valid_failure.cpp : : : : algorithms_is_valid_failure ]
+ [ run is_valid_geo.cpp : : : : algorithms_is_valid_geo ]
+ [ run line_interpolate.cpp : : : : algorithms_line_interpolate ]
+ [ run make.cpp : : : : algorithms_make ]
+ [ run maximum_gap.cpp : : : : algorithms_maximum_gap ]
+ [ run num_geometries.cpp : : : : algorithms_num_geometries ]
+ [ run num_geometries_multi.cpp : : : : algorithms_num_geometries_multi ]
+ [ run num_interior_rings.cpp : : : : algorithms_num_interior_rings ]
+ [ run num_interior_rings_multi.cpp : : : : algorithms_num_interior_rings_multi ]
+ [ run num_points.cpp : : : : algorithms_num_points ]
+ [ run num_points_multi.cpp : : : : algorithms_num_points_multi ]
+ [ run num_segments.cpp : : : : algorithms_segments ]
+ [ run perimeter.cpp : : : : algorithms_perimeter ]
+ [ run perimeter_multi.cpp : : : : algorithms_perimeter_multi ]
+ [ run point_on_surface.cpp : : : : algorithms_point_on_surface ]
+ [ run remove_spikes.cpp : : : : algorithms_remove_spikes ]
+ [ run reverse.cpp : : : : algorithms_reverse ]
+ [ run reverse_multi.cpp : : : : algorithms_reverse_multi ]
+ [ run simplify.cpp : : : : algorithms_simplify ]
+ [ run simplify_multi.cpp : : : : algorithms_simplify_multi ]
+ [ run transform.cpp : : : : algorithms_transform ]
+ [ run transform_multi.cpp : : : : algorithms_transform_multi ]
+ [ run unique.cpp : : : : algorithms_unique ]
+ [ run unique_multi.cpp : : : : algorithms_unique_multi ]
+ ;
+
+build-project area ;
+build-project buffer ;
+build-project covered_by ;
+build-project crosses ;
+build-project detail ;
+build-project disjoint ;
+build-project distance ;
+build-project envelope_expand ;
+build-project equals ;
+build-project intersects ;
+build-project length ;
+build-project overlaps ;
+build-project overlay ;
+build-project perimeter ;
+build-project relate ;
+build-project set_operations ;
+build-project similarity ;
+build-project touches ;
+build-project within ;
diff --git a/src/boost/libs/geometry/test/algorithms/append.cpp b/src/boost/libs/geometry/test/algorithms/append.cpp
new file mode 100644
index 000000000..0eda9669c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/append.cpp
@@ -0,0 +1,175 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <deque>
+#include <vector>
+
+#include <boost/concept/requires.hpp>
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/point_type.hpp>
+#include <boost/geometry/core/tags.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/clear.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <test_common/test_point.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <bool EnableAll>
+struct do_checks
+{
+ template <typename G>
+ static inline void apply(G const& geometry,
+ std::size_t size1,
+ std::size_t = 0,
+ std::size_t = 0)
+ {
+ BOOST_CHECK_EQUAL(bg::num_points(geometry), size1);
+ }
+};
+
+
+template<>
+struct do_checks<true>
+{
+ template <typename G>
+ static inline void apply(G const& geometry,
+ std::size_t size1,
+ std::size_t size2 = 0,
+ std::size_t size3 = 0)
+ {
+ do_checks<false>::apply(geometry, size1);
+ BOOST_CHECK_EQUAL(bg::num_points(geometry[0]), size2);
+ BOOST_CHECK_EQUAL(bg::num_points(geometry[1]), size3);
+ }
+};
+
+
+
+template <bool HasMultiIndex, bool IsVariant>
+struct test_geometry
+{
+ template <typename G>
+ static inline void apply(G& geometry, bool check)
+ {
+ typedef typename bg::point_type<G>::type P;
+ typedef do_checks<HasMultiIndex && !IsVariant> checks;
+
+ bg::append(geometry, bg::make_zero<P>(), -1, 0);
+ if (check)
+ {
+ checks::apply(geometry, 1u, 1u, 0u);
+ }
+
+ // Append a range
+ std::vector<P> v;
+ v.push_back(bg::make_zero<P>());
+ v.push_back(bg::make_zero<P>());
+ bg::append(geometry, v, -1, 1);
+
+ if (check)
+ {
+ checks::apply(geometry, 3u, 1u, 2u);
+ }
+
+ bg::clear(geometry);
+
+ if (check)
+ {
+ do_checks<false>::apply(geometry, 0u);
+ }
+ }
+};
+
+
+
+template <typename G>
+void test_geometry_and_variant(bool check = true)
+{
+ G geometry;
+ boost::variant<G> variant_geometry = G();
+ test_geometry<false, false>::apply(geometry, check);
+ test_geometry<false, true>::apply(variant_geometry, check);
+}
+
+
+template <typename MG>
+void test_multigeometry_and_variant(bool check = true)
+{
+ typedef typename boost::range_value<MG>::type G;
+
+ G geometry;
+ MG multigeometry;
+ bg::traits::push_back<MG>::apply(multigeometry, geometry);
+ bg::traits::push_back<MG>::apply(multigeometry, geometry);
+
+ boost::variant<MG> variant_multigeometry = multigeometry;
+ test_geometry<true, false>::apply(multigeometry, check);
+ test_geometry<true, true>::apply(variant_multigeometry, check);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry_and_variant<P>(false);
+ test_geometry_and_variant<bg::model::box<P> >(false);
+ test_geometry_and_variant<bg::model::segment<P> >(false);
+ test_geometry_and_variant<bg::model::linestring<P> >();
+ test_geometry_and_variant<bg::model::ring<P> >();
+ test_geometry_and_variant<bg::model::polygon<P> >();
+ test_geometry_and_variant<bg::model::multi_point<P> >();
+ test_multigeometry_and_variant
+ <
+ bg::model::multi_linestring<bg::model::linestring<P> >
+ >();
+ test_multigeometry_and_variant
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >();
+
+ test_geometry_and_variant<std::vector<P> >();
+ test_geometry_and_variant<std::deque<P> >();
+}
+
+int test_main(int, char* [])
+{
+ test_all<test::test_point>();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/area/Jamfile b/src/boost/libs/geometry/test/algorithms/area/Jamfile
new file mode 100644
index 000000000..f3c868da7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/area/Jamfile
@@ -0,0 +1,18 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2016 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-area
+ :
+ [ run area.cpp : : : : algorithms_area ]
+ [ run area_sph_geo.cpp : : : : algorithms_area_sph_geo ]
+ [ run area_geo.cpp : : : : algorithms_area_geo ]
+ [ run area_multi.cpp : : : : algorithms_area_multi ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/algorithms/area/area.cpp b/src/boost/libs/geometry/test/algorithms/area/area.cpp
new file mode 100644
index 000000000..ce4115049
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/area/area.cpp
@@ -0,0 +1,242 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015, 2016, 2017.
+// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/area/test_area.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <test_geometries/all_custom_ring.hpp>
+#include <test_geometries/all_custom_polygon.hpp>
+//#define BOOST_GEOMETRY_TEST_DEBUG
+
+#include <boost/variant/variant.hpp>
+
+template <typename Polygon>
+void test_polygon()
+{
+ // Rotated square, length=sqrt(2) -> area=2
+ test_geometry<Polygon>("POLYGON((1 1,2 2,3 1,2 0,1 1))", 2.0);
+ test_geometry<Polygon>("POLYGON((1 1,2 2,3 1,2 0,1 1))", 2.0);
+ test_geometry<Polygon>("POLYGON((0 0,0 7,4 2,2 0,0 0))", 16.0);
+ test_geometry<Polygon>("POLYGON((1 1,2 1,2 2,1 2,1 1))", -1.0);
+ test_geometry<Polygon>("POLYGON((0 0,0 7,4 2,2 0,0 0), (1 1,2 1,2 2,1 2,1 1))", 15.0);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::box<P> >("POLYGON((0 0,2 2))", 4.0);
+ test_geometry<bg::model::box<P> >("POLYGON((2 2,0 0))", 4.0);
+
+ test_polygon<bg::model::polygon<P> >();
+ test_polygon<all_custom_polygon<P> >();
+
+ // clockwise rings (second is wrongly ordered)
+ test_geometry<bg::model::ring<P> >("POLYGON((0 0,0 7,4 2,2 0,0 0))", 16.0);
+ test_geometry<bg::model::ring<P> >("POLYGON((0 0,2 0,4 2,0 7,0 0))", -16.0);
+
+ test_geometry<all_custom_ring<P> >("POLYGON((0 0,0 7,4 2,2 0,0 0))", 16.0);
+
+ // ccw
+ test_geometry<bg::model::polygon<P, false> >
+ ("POLYGON((0 0,0 7,4 2,2 0,0 0), (1 1,2 1,2 2,1 2,1 1))", -15.0);
+
+ test_geometry<bg::model::polygon<P, false> >
+ ("POLYGON((1 0,0 1,-1 0,0 -1,1 0))", 2);
+
+ typedef typename bg::coordinate_type<P>::type coord_type;
+ if (BOOST_GEOMETRY_CONDITION((boost::is_same<coord_type, double>::value)))
+ {
+ test_geometry<bg::model::polygon<P, false, false> >
+ ("POLYGON((100000001 100000000, 100000000 100000001, \
+ 99999999 100000000, 100000000 99999999))", 2);
+ }
+ else if (BOOST_GEOMETRY_CONDITION((boost::is_same<coord_type, float>::value)))
+ {
+ test_geometry<bg::model::polygon<P, false, false> >
+ ("POLYGON((100001 100000, 100000 100001, \
+ 99999 100000, 100000 99999))", 2);
+ }
+}
+
+template <typename P>
+void test_ccw()
+{
+ typedef typename bg::coordinate_type<P>::type ct;
+ bg::model::polygon<P, false> ccw_polygon;
+ // counterclockwise rings (second is wrongly ordered)
+ std::string poly1 = "POLYGON((1 1,2 2,3 1,2 0,1 1))";
+ std::string poly2 = "POLYGON((1 1,2 0,3 1,2 2,1 1))";
+ std::string poly3 = "POLYGON((0 0,0 7,4 2,2 0,0 0))";
+ std::string poly4 = "POLYGON((0 0,2 0,4 2,0 7,0 0))";
+
+ bg::read_wkt(poly1, ccw_polygon);
+ ct area1 = bg::area(ccw_polygon);
+ bg::read_wkt(poly2, ccw_polygon);
+ ct area2 = bg::area(ccw_polygon);
+ bg::read_wkt(poly3, ccw_polygon);
+ ct area3 = bg::area(ccw_polygon);
+ bg::read_wkt(poly4, ccw_polygon);
+ ct area4 = bg::area(ccw_polygon);
+ BOOST_CHECK_CLOSE(area1, -1 * area2, 0.001);
+ BOOST_CHECK_CLOSE(area3, -1 * area4, 0.001);
+}
+
+template <typename P, typename CT>
+void test_open(CT expected_area)
+{
+ typedef bg::model::polygon<P, true, false> open_polygon;
+ test_geometry<open_polygon>("POLYGON((1 1,2 2,3 1,2 0))", expected_area);
+ // Note the triangular testcase used in CCW is not sensible for open/close
+}
+
+template <typename P, typename CT>
+void test_open_ccw(CT expected_area)
+{
+ typedef bg::model::polygon<P, false, false> open_polygon;
+ test_geometry<open_polygon>("POLYGON((1 1,2 0,3 1,2 2))", expected_area);
+ // Note the triangular testcase used in CCW is not sensible for open/close
+}
+
+template <typename P>
+void test_poles_ccw()
+{
+ typedef typename bg::coordinate_type<P>::type ct;
+ bg::model::polygon<P, false> polygon;
+
+ std::string poly1 = "POLYGON((45 45,45 95,95 45,45 45))";
+ std::string poly2 = "POLYGON((45 45,95 45,45 95,45 45))";
+ std::string poly3 = "POLYGON((45 -45,45 -95,95 -45,45 -45))";
+ std::string poly4 = "POLYGON((45 -45,95 -45,45 -95,45 -45))";
+
+ bg::read_wkt(poly1, polygon);
+ ct area1 = bg::area(polygon);
+ bg::read_wkt(poly2, polygon);
+ ct area2 = bg::area(polygon);
+ bg::read_wkt(poly3, polygon);
+ ct area3 = bg::area(polygon);
+ bg::read_wkt(poly4, polygon);
+ ct area4 = bg::area(polygon);
+ BOOST_CHECK_CLOSE(area1, -1 * area2, 0.001);
+ BOOST_CHECK_CLOSE(area3, -1 * area4, 0.001);
+}
+
+template <typename P>
+void test_empty_input()
+{
+ bg::model::polygon<P> poly_empty;
+ bg::model::ring<P> ring_empty;
+
+ test_empty_input(poly_empty);
+ test_empty_input(ring_empty);
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::polygon<int_point_type> int_poly;
+ bg::model::polygon<double_point_type> double_poly;
+
+ std::string const polygon_li = "POLYGON((1872000 528000,1872000 192000,\
+ 1536119 192000,1536000 528000,1200000 528000,\
+ 1200000 863880,1536000 863880,1872000 863880,\
+ 1872000 528000))";
+ bg::read_wkt(polygon_li, int_poly);
+ bg::read_wkt(polygon_li, double_poly);
+
+ double int_area = bg::area(int_poly);
+ double double_area = bg::area(double_poly);
+
+ BOOST_CHECK_CLOSE(int_area, double_area, 0.0001);
+}
+
+void test_variant()
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+ typedef bg::model::polygon<double_point_type> polygon_type;
+ typedef bg::model::box<double_point_type> box_type;
+
+ polygon_type poly;
+ std::string const polygon_li = "POLYGON((18 5,18 1,15 1,15 5,12 5,12 8,15 8,18 8,18 5))";
+ bg::read_wkt(polygon_li, poly);
+
+ box_type box;
+ std::string const box_li = "BOX(0 0,2 2)";
+ bg::read_wkt(box_li, box);
+
+ boost::variant<polygon_type, box_type> v;
+
+ v = poly;
+ BOOST_CHECK_CLOSE(bg::area(v), bg::area(poly), 0.0001);
+ v = box;
+ BOOST_CHECK_CLOSE(bg::area(v), bg::area(box), 0.0001);
+}
+
+int test_main(int, char* [])
+{
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ typedef bg::model::point<double, 2, bg::cs::cartesian> pt_crt;
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > pt_sph;
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > pt_geo;
+
+ // mean Earth's radius^2
+ double r2 = bg::math::sqr(bg::get_radius<0>(bg::srs::sphere<double>()));
+
+ test_ccw<pt_crt>();
+ test_ccw<pt_sph>();
+ test_ccw<pt_geo>();
+
+ test_open<pt_crt>(2.0);
+ test_open<pt_sph>(24726179921.523518 / r2);
+ test_open<pt_geo >(24615492936.977146);
+
+ test_open_ccw<pt_crt>(2.0);
+ test_open_ccw<pt_sph>(24726179921.523518 / r2);
+ test_open_ccw<pt_geo >(24615492936.977146);
+
+ test_poles_ccw<pt_crt>();
+ test_poles_ccw<pt_sph>();
+ test_poles_ccw<pt_geo >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_spherical_geo<ttmath_big>();
+#endif
+
+ test_large_integers();
+
+ test_variant();
+
+ // test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/area/area_geo.cpp b/src/boost/libs/geometry/test/algorithms/area/area_geo.cpp
new file mode 100644
index 000000000..5a380653d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/area/area_geo.cpp
@@ -0,0 +1,203 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2015, 2016, 2017.
+// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry.hpp>
+#include <geometry_test_common.hpp>
+
+namespace bg = boost::geometry;
+
+//Testing geographic strategies
+template <typename CT>
+void test_geo_strategies()
+{
+ std::string poly = "POLYGON((52 0, 41 -74, -23 -43, -26 28, 52 0))";
+
+ typedef bg::model::point<CT, 2, bg::cs::geographic<bg::degree> > pt_geo;
+
+ bg::strategy::area::geographic<> geographic_default;
+
+ bg::strategy::area::geographic<bg::strategy::andoyer, 1>
+ geographic_andoyer1;
+ bg::strategy::area::geographic<bg::strategy::andoyer, 2>
+ geographic_andoyer2;
+ bg::strategy::area::geographic<bg::strategy::andoyer, 3>
+ geographic_andoyer3;
+ bg::strategy::area::geographic<bg::strategy::andoyer, 4>
+ geographic_andoyer4;
+ bg::strategy::area::geographic<bg::strategy::andoyer, 5>
+ geographic_andoyer5;
+
+ bg::strategy::area::geographic<bg::strategy::thomas, 1>
+ geographic_thomas1;
+ bg::strategy::area::geographic<bg::strategy::thomas, 2>
+ geographic_thomas2;
+ bg::strategy::area::geographic<bg::strategy::thomas, 3>
+ geographic_thomas3;
+ bg::strategy::area::geographic<bg::strategy::thomas, 4>
+ geographic_thomas4;
+ bg::strategy::area::geographic<bg::strategy::thomas, 5>
+ geographic_thomas5;
+
+ bg::strategy::area::geographic<bg::strategy::vincenty, 1>
+ geographic_vincenty1;
+ bg::strategy::area::geographic<bg::strategy::vincenty, 2>
+ geographic_vincenty2;
+ bg::strategy::area::geographic<bg::strategy::vincenty, 3>
+ geographic_vincenty3;
+ bg::strategy::area::geographic<bg::strategy::vincenty, 4>
+ geographic_vincenty4;
+ bg::strategy::area::geographic<bg::strategy::vincenty, 5>
+ geographic_vincenty5;
+
+ bg::strategy::area::geographic<bg::strategy::andoyer>
+ geographic_andoyer_default;
+ bg::strategy::area::geographic<bg::strategy::thomas>
+ geographic_thomas_default;
+ bg::strategy::area::geographic<bg::strategy::vincenty>
+ geographic_vincenty_default;
+
+ bg::model::polygon<pt_geo> geometry_geo;
+
+ //GeographicLib 63316536351834.289
+ //PostGIS (v2.2.2) 6.33946+13
+ //MS SQL SERVER 632930207487035
+
+ bg::read_wkt(poly, geometry_geo);
+ CT area;
+ CT err = 0.0000001;
+
+ CT area_default = bg::area(geometry_geo);
+ BOOST_CHECK_CLOSE(area_default, 63316309346280.18, err);
+ area = bg::area(geometry_geo, geographic_default);
+ BOOST_CHECK_CLOSE(area, 63316309346280.18, err);
+
+ CT area_less_accurate = bg::area(geometry_geo, geographic_andoyer1);
+ BOOST_CHECK_CLOSE(area, 63316309346280.18, err);
+ area = bg::area(geometry_geo, geographic_andoyer2);
+ BOOST_CHECK_CLOSE(area, 63316309224306.5, err);
+ area = bg::area(geometry_geo, geographic_andoyer3);
+ BOOST_CHECK_CLOSE(area, 63316309224411.195, err);
+ area = bg::area(geometry_geo, geographic_andoyer4);
+ BOOST_CHECK_CLOSE(area, 63316309224411.094, err);
+ area = bg::area(geometry_geo, geographic_andoyer5);
+ BOOST_CHECK_CLOSE(area, 63316309224411.094, err);
+
+ area = bg::area(geometry_geo, geographic_thomas1);
+ BOOST_CHECK_CLOSE(area, 63316536214315.32, err);
+ area = bg::area(geometry_geo, geographic_thomas2);
+ BOOST_CHECK_CLOSE(area, 63316536092341.266, err);
+ area = bg::area(geometry_geo, geographic_thomas3);
+ BOOST_CHECK_CLOSE(area, 63316536092445.961, err);
+ area = bg::area(geometry_geo, geographic_thomas4);
+ BOOST_CHECK_CLOSE(area, 63316536092445.859, err);
+ area = bg::area(geometry_geo, geographic_thomas5);
+ BOOST_CHECK_CLOSE(area, 63316536092445.859, err);
+
+ area = bg::area(geometry_geo, geographic_vincenty1);
+ BOOST_CHECK_CLOSE(area, 63316536473798.984, err);
+ area = bg::area(geometry_geo, geographic_vincenty2);
+ BOOST_CHECK_CLOSE(area, 63316536351824.93, err);
+ area = bg::area(geometry_geo, geographic_vincenty3);
+ BOOST_CHECK_CLOSE(area, 63316536351929.625, err);
+ area = bg::area(geometry_geo, geographic_vincenty4);
+ BOOST_CHECK_CLOSE(area, 63316536351929.523, err);
+ CT area_most_accurate = bg::area(geometry_geo, geographic_vincenty5);
+ BOOST_CHECK_CLOSE(area, 63316536351929.523, err);
+
+ area = bg::area(geometry_geo, geographic_andoyer_default);
+ BOOST_CHECK_CLOSE(area, 63316309346280.18, err);
+ area = bg::area(geometry_geo, geographic_thomas_default);
+ BOOST_CHECK_CLOSE(area, 63316536092341.266, err);
+ area = bg::area(geometry_geo, geographic_vincenty_default);
+ BOOST_CHECK_CLOSE(area, 63316536351929.523, err);
+
+ BOOST_CHECK_CLOSE(area_most_accurate, area_less_accurate, .001);
+ BOOST_CHECK_CLOSE(area_most_accurate, area_default, .001);
+/*
+ // timings and accuracy
+ std::cout.precision(25);
+ std::size_t exp_times = 100000;
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_andoyer1);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_andoyer2);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_andoyer3);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_andoyer4);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_andoyer5);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_thomas1);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_thomas2);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_thomas3);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_thomas4);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_thomas5);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_vincenty1);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_vincenty2);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_vincenty3);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_vincenty4);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+ { clock_t startTime = clock();
+ for (int j=0; j < exp_times; j++) area = bg::area(geometry_geo, geographic_vincenty5);
+ std::cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " ";
+ std::cout << area << std::endl;}
+*/
+}
+
+int test_main(int, char* [])
+{
+
+ test_geo_strategies<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/area/area_multi.cpp b/src/boost/libs/geometry/test/algorithms/area/area_multi.cpp
new file mode 100644
index 000000000..37ac0cecf
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/area/area_multi.cpp
@@ -0,0 +1,55 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+//
+// This file was modified by Oracle on 2015, 2016.
+// Modifications copyright (c) 2015-2016, Oracle and/or its affiliates.
+//
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/area/test_area.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+
+
+template <typename CT>
+void test_all()
+{
+ typedef typename bg::model::d2::point_xy<CT> pt_crt;
+ typedef typename bg::model::point<CT, 2, bg::cs::spherical_equatorial<bg::degree> > pt_sph;
+ typedef typename bg::model::point<CT, 2, bg::cs::geographic<bg::degree> > pt_geo;
+
+ typedef bg::model::multi_polygon<bg::model::polygon<pt_crt> > mp_crt;
+ typedef bg::model::multi_polygon<bg::model::polygon<pt_sph> > mp_sph;
+ typedef bg::model::multi_polygon<bg::model::polygon<pt_geo> > mp_geo;
+
+ // mean Earth's radius^2
+ double r2 = bg::math::sqr(bg::get_radius<0>(bg::srs::sphere<double>()));
+
+ std::string poly = "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)))";
+ test_geometry<mp_crt>(poly, 16.0);
+ test_geometry<mp_sph>(poly, 197897454752.69489 / r2);
+ test_geometry<mp_geo>(poly, 197018888665.8331);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<double>();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/area/area_sph_geo.cpp b/src/boost/libs/geometry/test/algorithms/area/area_sph_geo.cpp
new file mode 100644
index 000000000..dc7d9f628
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/area/area_sph_geo.cpp
@@ -0,0 +1,413 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2015, 2016, 2017.
+// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry.hpp>
+#include <geometry_test_common.hpp>
+
+namespace bg = boost::geometry;
+
+//Testing spherical and geographic strategies
+template <typename CT>
+void test_spherical_geo()
+{
+ typedef CT ct;
+
+ //Geographic
+
+ typedef typename bg::model::point
+ <
+ ct, 2, bg::cs::geographic<bg::degree>
+ > pt_geo;
+
+ bg::strategy::area::geographic
+ <
+ bg::strategy::vincenty,
+ 5
+ > area_geographic;
+
+ bg::model::polygon<pt_geo> geometry_geo;
+
+ //Spherical
+
+ typedef typename bg::model::point
+ <
+ ct, 2, bg::cs::spherical_equatorial<bg::degree>
+ > pt;
+ bg::model::polygon<pt> geometry;
+
+ // unit-sphere has area of 4-PI. Polygon covering 1/8 of it:
+ // calculations splitted for ttmath
+ std::string poly = "POLYGON((0 0,0 90,90 0,0 0))";
+
+ bg::strategy::area::spherical
+ <
+ ct
+ > strategy_unary(1.0);
+
+ ct const four = 4.0;
+ ct const eight = 8.0;
+ ct expected = four * boost::geometry::math::pi<ct>() / eight;
+ bg::read_wkt(poly, geometry);
+ ct area = bg::area(geometry, strategy_unary);
+ BOOST_CHECK_CLOSE(area, expected, 0.0001);
+
+ // With strategy, radius 2 -> 4 pi r^2
+ bg::strategy::area::spherical
+ <
+ ct
+ > strategy(2.0);
+
+ area = bg::area(geometry, strategy);
+ ct const two = 2.0;
+ BOOST_CHECK_CLOSE(area, two * two * expected, 0.0001);
+
+ // Geographic total area of earth is about 510065626583900.6 (WGS84 ellipsoid)
+ // (510072000 in https://en.wikipedia.org/wiki/Earth)
+ // So the 1/8 is 6.375820332*10^13 and here we get something close to it
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ //GeoGraphicLib gives: 63758202715511.055
+ BOOST_CHECK_CLOSE(area, 63758202715509.844, 0.0001);
+
+
+ // Wrangel Island (dateline crossing)
+ // With (spherical) Earth strategy
+ poly = "POLYGON((-178.7858 70.7852, 177.4758 71.2333, 179.7436 71.5733, -178.7858 70.7852))";
+
+ bg::strategy::area::spherical
+ <
+ ct
+ > spherical_earth(6373);
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ // SQL Server gives: 4537.9654419375
+ // PostGIS gives: 4537.9311668307
+ // Note: those are Geographic, this test is Spherical
+ BOOST_CHECK_CLOSE(area, 4506.6389, 0.001);
+
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 4537929936.5349159, 0.0001);
+
+ // Wrangel, more in detail
+ poly = "POLYGON((-178.568604 71.564148,-178.017548 71.449692,-177.833313 71.3461,\
+ -177.502838 71.277466 ,-177.439453 71.226929,-177.620026 71.116638,\
+ -177.9389 71.037491,-178.8186 70.979965,-179.274445 70.907761,\
+ -180 70.9972,179.678314 70.895538,179.272766 70.888596,\
+ 178.791016 70.7964,178.617737 71.035538,178.872192 71.217484,\
+ 179.530273 71.4383 ,-180 71.535843 ,-179.628601 71.577194,\
+ -179.305298 71.551361,-179.03421 71.597748,-178.568604 71.564148))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ // SQL Server gives: 7669.10402181435
+ // PostGIS gives: 7669.55565459832
+ BOOST_CHECK_CLOSE(area, 7616.523769, 0.001);
+
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 7669498457.4130802, 0.0001);
+
+ // Check more at the equator
+ /*
+ select 1,geography::STGeomFromText('POLYGON((-178.7858 10.7852 , 179.7436 11.5733 , \
+ 177.4758 11.2333 , -178.7858 10.7852))',4326) .STArea()/1000000.0
+ union select 2,geography::STGeomFromText('POLYGON((-178.7858 20.7852 , 179.7436 21.5733 ,\
+ 177.4758 21.2333 , -178.7858 20.7852))',4326) .STArea()/1000000.0
+ union select 3,geography::STGeomFromText('POLYGON((-178.7858 30.7852 , 179.7436 31.5733 , \
+ 177.4758 31.2333 , -178.7858 30.7852))',4326) .STArea()/1000000.0
+ union select 0,geography::STGeomFromText('POLYGON((-178.7858 0.7852 , 179.7436 1.5733 , \
+ 177.4758 1.2333 , -178.7858 0.7852))',4326) .STArea()/1000000.0
+ union select 4,geography::STGeomFromText('POLYGON((-178.7858 40.7852 , 179.7436 41.5733 , \
+ 177.4758 41.2333 , -178.7858 40.7852))',4326) .STArea()/1000000.0
+ */
+
+ poly = "POLYGON((-178.7858 0.7852, 177.4758 1.2333, 179.7436 1.5733, -178.7858 0.7852))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 14136.09946, 0.001); // SQL Server gives: 14064.1902284513
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 14064129044.674297, 0.0001);
+
+ poly = "POLYGON((-178.7858 10.7852, 177.4758 11.2333, 179.7436 11.5733, -178.7858 10.7852))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 13760.2456, 0.001); // SQL Server gives: 13697.0941155193
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 13696308940.315653, 0.0001);
+
+ poly = "POLYGON((-178.7858 20.7852, 177.4758 21.2333, 179.7436 21.5733, -178.7858 20.7852))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 12987.8682, 0.001); // SQL Server gives: 12944.3970990317 -> -39m^2
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 12943176284.560806, 0.0001);
+
+ poly = "POLYGON((-178.7858 30.7852, 177.4758 31.2333, 179.7436 31.5733, -178.7858 30.7852))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 11856.3935, 0.001); // SQL Server gives: 11838.5338423574 -> -18m^2
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 11837280445.349375, 0.0001);
+
+ poly = "POLYGON((-178.7858 40.7852, 177.4758 41.2333, 179.7436 41.5733, -178.7858 40.7852))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 10404.627685523914, 0.001);
+ // SQL Server gives: 10412.0607137119, -> +8m^2
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 10411098789.39222, 0.0001);
+
+ // Concave
+ poly = "POLYGON((0 40,1 42,0 44,2 43,4 44,3 42,4 40,2 41,0 40))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 73538.2958, 0.001); // SQL Server gives: 73604.2047689719
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 73604208172.719223, 0.0001);
+
+ // With hole POLYGON((0 40,4 40,4 44,0 44,0 40),(1 41,2 43,3 42,1 41))
+ poly = "POLYGON((0 40,0 44,4 44,4 40,0 40),(1 41,3 42,2 43,1 41))";
+ bg::read_wkt(poly, geometry);
+ area = bg::area(geometry, spherical_earth);
+ BOOST_CHECK_CLOSE(area, 133233.844876, 0.001); // SQL Server gives: 133353.335
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 133353077343.10347, 0.0001);
+
+ // mean Earth's radius^2
+ double r2 = bg::math::sqr(bg::get_radius<0>(bg::srs::sphere<double>()));
+
+ // around 0 meridian
+ {
+ std::string poly1 = "POLYGON((-10 0,-10 10,0 10,0 0,-10 0))";
+ std::string poly2 = "POLYGON((0 0,0 10,10 10,10 0,0 0))";
+ std::string poly3 = "POLYGON((-5 0,-5 10,5 10,5 0,-5 0))";
+ bg::read_wkt(poly1, geometry);
+ ct area1 = bg::area(geometry);
+ bg::read_wkt(poly2, geometry);
+ ct area2 = bg::area(geometry);
+ bg::read_wkt(poly3, geometry);
+ ct area3 = bg::area(geometry);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area1 * r2, 1233204227903.1848, 0.001);
+ //geographic
+ bg::read_wkt(poly1, geometry_geo);
+ area1 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly2, geometry_geo);
+ area2 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly3, geometry_geo);
+ area3 = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area1, 1227877191611.2805, 0.001);
+ }
+ {
+ std::string poly1 = "POLYGON((-10 -5,-10 5,0 5,0 -5,-10 -5))";
+ std::string poly2 = "POLYGON((0 -5,0 5,10 5,10 -5,0 -5))";
+ std::string poly3 = "POLYGON((-5 -5,-5 5,5 5,5 -5,-5 -5))";
+ bg::read_wkt(poly1, geometry);
+ ct area1 = bg::area(geometry);
+ bg::read_wkt(poly2, geometry);
+ ct area2 = bg::area(geometry);
+ bg::read_wkt(poly3, geometry);
+ ct area3 = bg::area(geometry);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area1 * r2, 1237986107636.0261, 0.001);
+ //geographic
+ bg::read_wkt(poly1, geometry_geo);
+ area1 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly2, geometry_geo);
+ area2 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly3, geometry_geo);
+ area3 = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area1, 1232514639151.6477, 0.001);
+ }
+ // around 180 meridian
+ {
+ std::string poly1 = "POLYGON((-180 0,-180 10,-170 10,-170 0,-180 0))";
+ std::string poly2 = "POLYGON((175 0,175 10,-175 10,-175 0,175 0))";
+ std::string poly3 = "POLYGON((170 0,170 10,180 10,180 0,170 0))";
+ std::string poly4 = "POLYGON((170 0,170 10,-180 10,-180 0,170 0))";
+ std::string poly5 = "POLYGON((180 0,180 10,-170 10,-170 0,180 0))";
+ bg::read_wkt(poly1, geometry);
+ ct area1 = bg::area(geometry);
+ bg::read_wkt(poly2, geometry);
+ ct area2 = bg::area(geometry);
+ bg::read_wkt(poly3, geometry);
+ ct area3 = bg::area(geometry);
+ bg::read_wkt(poly4, geometry);
+ ct area4 = bg::area(geometry);
+ bg::read_wkt(poly5, geometry);
+ ct area5 = bg::area(geometry);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area4, area5, 0.001);
+ BOOST_CHECK_CLOSE(area1 * r2, 1233204227903.1833, 0.001);
+ //geographic
+ bg::read_wkt(poly1, geometry_geo);
+ area1 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly2, geometry_geo);
+ area2 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly3, geometry_geo);
+ area3 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly4, geometry_geo);
+ area4 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly5, geometry_geo);
+ area5 = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area4, area5, 0.001);
+ BOOST_CHECK_CLOSE(area1, 1227877191611.2805, 0.001);
+ }
+ {
+ std::string poly1 = "POLYGON((-180 -5,-180 5,-170 5,-170 -5,-180 -5))";
+ std::string poly2 = "POLYGON((175 -5,175 5,-175 5,-175 -5,175 -5))";
+ std::string poly3 = "POLYGON((170 -5,170 5,180 5,180 -5,170 -5))";
+ std::string poly4 = "POLYGON((170 -5,170 5,180 5,180 -5,170 -5))";
+ std::string poly5 = "POLYGON((180 -5,180 5,-170 5,-170 -5,180 -5))";
+ bg::read_wkt(poly1, geometry);
+ ct area1 = bg::area(geometry);
+ bg::read_wkt(poly2, geometry);
+ ct area2 = bg::area(geometry);
+ bg::read_wkt(poly3, geometry);
+ ct area3 = bg::area(geometry);
+ bg::read_wkt(poly4, geometry);
+ ct area4 = bg::area(geometry);
+ bg::read_wkt(poly5, geometry);
+ ct area5 = bg::area(geometry);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area4, area5, 0.001);
+ BOOST_CHECK_CLOSE(area1 * r2, 1237986107636.0247, 0.001);
+ //geographic
+ bg::read_wkt(poly1, geometry_geo);
+ area1 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly2, geometry_geo);
+ area2 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly3, geometry_geo);
+ area3 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly4, geometry_geo);
+ area4 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly5, geometry_geo);
+ area5 = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area4, area5, 0.001);
+ BOOST_CHECK_CLOSE(area1, 1232514639151.6477, 0.001);
+ }
+ // around poles
+ {
+ std::string poly1 = "POLYGON((0 80,-90 80,-180 80,90 80,0 80))";
+ std::string poly2 = "POLYGON((0 80,-90 80,180 80,90 80,0 80))";
+ std::string poly3 = "POLYGON((0 -80,90 -80,-180 -80,-90 -80,0 -80))";
+ std::string poly4 = "POLYGON((0 -80,90 -80,180 -80,-90 -80,0 -80))";
+ bg::read_wkt(poly1, geometry);
+ ct area1 = bg::area(geometry);
+ bg::read_wkt(poly2, geometry);
+ ct area2 = bg::area(geometry);
+ bg::read_wkt(poly3, geometry);
+ ct area3 = bg::area(geometry);
+ bg::read_wkt(poly4, geometry);
+ ct area4 = bg::area(geometry);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ //geographic
+ bg::read_wkt(poly1, geometry_geo);
+ area1 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly2, geometry_geo);
+ area2 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly3, geometry_geo);
+ area3 = bg::area(geometry_geo, area_geographic);
+ bg::read_wkt(poly4, geometry_geo);
+ area4 = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area2, area3, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ }
+
+ {
+ bg::model::ring<pt> aurha; // a'dam-utr-rott.-den haag-a'dam
+ std::string poly = "POLYGON((4.892 52.373,5.119 52.093,4.479 51.930,\
+ 4.23 52.08,4.892 52.373))";
+ bg::read_wkt(poly, aurha);
+ /*if (polar)
+ {
+ // Create colatitudes (measured from pole)
+ BOOST_FOREACH(pt& p, aurha)
+ {
+ bg::set<1>(p, ct(90) - bg::get<1>(p));
+ }
+ bg::correct(aurha);
+ }*/
+ bg::strategy::area::spherical
+ <
+ ct
+ > area_spherical(6372.795);
+ area = bg::area(aurha, area_spherical);
+ BOOST_CHECK_CLOSE(area, 1476.645675, 0.0001);
+ //geographic
+ bg::read_wkt(poly, geometry_geo);
+ area = bg::area(geometry_geo, area_geographic);
+ BOOST_CHECK_CLOSE(area, 1481555970.0765088, 0.001);
+
+ // SQL Server gives: 1481.55595960659
+ // for select geography::STGeomFromText('POLYGON((4.892 52.373,4.23 52.08,
+ // 4.479 51.930,5.119 52.093,4.892 52.373))',4326).STArea()/1000000.0
+ }
+
+ {
+ bg::model::polygon<pt, false> geometry_sph;
+ std::string wkt = "POLYGON((0 0, 5 0, 5 5, 0 5, 0 0))";
+ bg::read_wkt(wkt, geometry_sph);
+
+ area = bg::area(geometry_sph, bg::strategy::area::spherical<>(6371228.0));
+ BOOST_CHECK_CLOSE(area, 308932296103.83051, 0.0001);
+
+ bg::model::polygon<pt_geo, false> geometry_geo;
+ bg::read_wkt(wkt, geometry_geo);
+
+ area = bg::area(geometry_geo, bg::strategy::area::geographic<>(bg::srs::spheroid<double>(6371228.0, 6371228.0)));
+ BOOST_CHECK_CLOSE(area, 308932296103.82574, 0.001);
+ }
+}
+
+int test_main(int, char* [])
+{
+
+ test_spherical_geo<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/area/test_area.hpp b/src/boost/libs/geometry/test/algorithms/area/test_area.hpp
new file mode 100644
index 000000000..bf8b41c88
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/area/test_area.hpp
@@ -0,0 +1,81 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_AREA_HPP
+#define BOOST_GEOMETRY_TEST_AREA_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+template <typename Geometry>
+void test_area(Geometry const& geometry,
+ typename bg::default_area_result<Geometry>::type expected_area)
+{
+ typename bg::default_area_result<Geometry>::type area = bg::area(geometry);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " "
+ << typeid(typename bg::default_area_result<Geometry>::type).name()
+ << " "
+ << "area : " << bg::area(geometry)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(area, expected_area, 0.0001);
+
+ // Test with explicitly defined strategies
+ bg::strategy::area::cartesian<> strategy1;
+
+ area = bg::area(geometry, strategy1);
+
+ bg::strategy::area::cartesian
+ <
+ typename bg::coordinate_type<Geometry>::type
+ > strategy2;
+
+ area = bg::area(geometry, strategy2);
+
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ typename bg::default_area_result<Geometry>::type expected_area)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_area(geometry, expected_area);
+}
+
+template <typename Geometry>
+void test_empty_input(Geometry const& geometry)
+{
+ try
+ {
+ bg::area(geometry);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/assign.cpp b/src/boost/libs/geometry/test/algorithms/assign.cpp
new file mode 100644
index 000000000..aca34a687
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/assign.cpp
@@ -0,0 +1,326 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2014 Samuel Debionne, Grenoble, France.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/arithmetic/arithmetic.hpp>
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/variant/variant.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename Geometry>
+void check_geometry(Geometry const& geometry, std::string const& expected)
+{
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+template <typename Geometry, typename Points>
+void check_assign_points(Points const& points, std::string const& /*expected*/)
+{
+ Geometry geometry;
+ bg::assign_points(geometry, points);
+ check_geometry(geometry, "LINESTRING(1 2,3 4,5 6)");
+
+ boost::variant<Geometry> v;
+ bg::assign_points(v, points);
+}
+
+template <typename Point>
+void test_assign_linestring_2d()
+{
+ bg::model::linestring<Point> line;
+
+ // Test assignment of plain array (note that this is only possible if adapted c-array is included!)
+ const double coors[3][2] = { {1, 2}, {3, 4}, {5, 6} };
+ check_assign_points<bg::model::linestring<Point> >(coors, "LINESTRING(1 2,3 4,5 6)");
+
+ // Test assignment of point array
+ Point points[3];
+ bg::assign_values(points[0], 1, 2);
+ bg::assign_values(points[1], 3, 4);
+ bg::assign_values(points[2], 5, 6);
+ check_assign_points<bg::model::linestring<Point> >(points, "LINESTRING(1 2,3 4,5 6)");
+
+ // Test assignment of array with different point-type (tuple adaption should be included)
+ boost::tuple<float, float> tuples[3];
+ tuples[0] = boost::make_tuple(1, 2);
+ tuples[1] = boost::make_tuple(3, 4);
+ tuples[2] = boost::make_tuple(5, 6);
+ check_assign_points<bg::model::linestring<Point> >(tuples, "LINESTRING(1 2,3 4,5 6)");
+}
+
+namespace detail
+{
+ template <typename BoxOrSegment>
+ void test_assign_box_or_segment_2d()
+ {
+ BoxOrSegment geometry;
+ bg::assign_values(geometry, 1, 2, 3, 4);
+ BOOST_CHECK((bg::get<bg::min_corner, 0>(geometry) == 1));
+ BOOST_CHECK((bg::get<bg::min_corner, 1>(geometry) == 2));
+ BOOST_CHECK((bg::get<bg::max_corner, 0>(geometry) == 3));
+ BOOST_CHECK((bg::get<bg::max_corner, 1>(geometry) == 4));
+
+ bg::assign_zero(geometry);
+ BOOST_CHECK((bg::get<bg::min_corner, 0>(geometry) == 0));
+ BOOST_CHECK((bg::get<bg::min_corner, 1>(geometry) == 0));
+ BOOST_CHECK((bg::get<bg::max_corner, 0>(geometry) == 0));
+ BOOST_CHECK((bg::get<bg::max_corner, 1>(geometry) == 0));
+
+ bg::assign_inverse(geometry);
+ BOOST_CHECK((bg::get<bg::min_corner, 0>(geometry) > 9999));
+ BOOST_CHECK((bg::get<bg::min_corner, 1>(geometry) > 9999));
+ BOOST_CHECK((bg::get<bg::max_corner, 0>(geometry) < 9999));
+ BOOST_CHECK((bg::get<bg::max_corner, 1>(geometry) < 9999));
+ }
+}
+
+template <typename Point>
+void test_assign_box_or_segment_2d()
+{
+ detail::test_assign_box_or_segment_2d<bg::model::box<Point> >();
+ detail::test_assign_box_or_segment_2d<bg::model::segment<Point> >();
+}
+
+template <typename Point>
+void test_assign_box_2d()
+{
+ detail::test_assign_box_or_segment_2d<bg::model::box<Point> >();
+}
+
+template <typename Point>
+void test_assign_point_3d()
+{
+ Point p;
+ bg::assign_values(p, 1, 2, 3);
+ check_geometry(p, "POINT(1 2 3)");
+
+ bg::assign_value(p, 123);
+ check_geometry(p, "POINT(123 123 123)");
+
+ bg::assign_zero(p);
+ check_geometry(p, "POINT(0 0 0)");
+}
+
+template <typename P>
+void test_assign_conversion()
+{
+ typedef bg::model::box<P> box_type;
+ typedef bg::model::ring<P> ring_type;
+ typedef bg::model::polygon<P> polygon_type;
+
+ P p;
+ bg::assign_values(p, 1, 2);
+
+ box_type b;
+ bg::assign(b, p);
+
+ BOOST_CHECK_CLOSE((bg::get<0, 0>(b)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<0, 1>(b)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<1, 0>(b)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<1, 1>(b)), 2.0, 0.001);
+
+
+ bg::set<bg::min_corner, 0>(b, 1);
+ bg::set<bg::min_corner, 1>(b, 2);
+ bg::set<bg::max_corner, 0>(b, 3);
+ bg::set<bg::max_corner, 1>(b, 4);
+
+ ring_type ring;
+ bg::assign(ring, b);
+
+ {
+ typedef bg::model::ring<P, false, false> ring_type_ccw;
+ ring_type_ccw ring_ccw;
+ // Should NOT compile (currently): bg::assign(ring_ccw, ring);
+
+ }
+
+ typename boost::range_const_iterator<ring_type>::type it = ring.begin();
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
+
+ BOOST_CHECK_EQUAL(ring.size(), 5u);
+
+
+ polygon_type polygon;
+
+ bg::assign(polygon, ring);
+ BOOST_CHECK_EQUAL(bg::num_points(polygon), 5u);
+
+ ring_type ring2;
+ bg::assign(ring2, polygon);
+ BOOST_CHECK_EQUAL(bg::num_points(ring2), 5u);
+}
+
+
+template <typename P>
+void test_assign_conversion_variant()
+{
+ typedef bg::model::box<P> box_type;
+ typedef bg::model::ring<P> ring_type;
+ typedef bg::model::polygon<P> polygon_type;
+
+ P p;
+ bg::assign_values(p, 1, 2);
+
+ box_type b;
+ boost::variant<box_type&> variant_b(b);
+ bg::assign(variant_b, p);
+
+ BOOST_CHECK_CLOSE((bg::get<0, 0>(b)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<0, 1>(b)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<1, 0>(b)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<1, 1>(b)), 2.0, 0.001);
+
+
+ bg::set<bg::min_corner, 0>(b, 1);
+ bg::set<bg::min_corner, 1>(b, 2);
+ bg::set<bg::max_corner, 0>(b, 3);
+ bg::set<bg::max_corner, 1>(b, 4);
+
+ ring_type ring;
+ boost::variant<ring_type&> variant_ring(ring);
+ bg::assign(variant_ring, boost::variant<box_type>(b));
+
+ {
+ typedef bg::model::ring<P, false, false> ring_type_ccw;
+ ring_type_ccw ring_ccw;
+ // Should NOT compile (currently): bg::assign(ring_ccw, ring);
+
+ }
+
+ typename boost::range_const_iterator<ring_type>::type it = ring.begin();
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
+ it++;
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
+
+ BOOST_CHECK_EQUAL(ring.size(), 5u);
+
+
+ polygon_type polygon;
+ boost::variant<polygon_type&> variant_polygon(polygon);
+
+ bg::assign(variant_polygon, boost::variant<ring_type>(ring));
+ BOOST_CHECK_EQUAL(bg::num_points(polygon), 5u);
+
+ ring_type ring2;
+ boost::variant<ring_type&> variant_ring2(ring2);
+ bg::assign(variant_ring2, boost::variant<polygon_type>(polygon));
+ BOOST_CHECK_EQUAL(bg::num_points(ring2), 5u);
+}
+
+
+template <typename Point>
+void test_assign_point_2d()
+{
+ Point p;
+ bg::assign_values(p, 1, 2);
+ check_geometry(p, "POINT(1 2)");
+
+ bg::assign_value(p, 123);
+ check_geometry(p, "POINT(123 123)");
+
+ bg::assign_zero(p);
+ check_geometry(p, "POINT(0 0)");
+}
+
+
+
+
+
+int test_main(int, char* [])
+{
+ test_assign_point_3d<int[3]>();
+ test_assign_point_3d<float[3]>();
+ test_assign_point_3d<double[3]>();
+ test_assign_point_3d<test::test_point>();
+ test_assign_point_3d<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_assign_point_3d<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_assign_point_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ test_assign_point_2d<int[2]>();
+ test_assign_point_2d<float[2]>();
+ test_assign_point_2d<double[2]>();
+ test_assign_point_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_assign_point_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_assign_point_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_assign_conversion<bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_assign_conversion_variant<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+
+ // Segment (currently) cannot handle array's because derived from std::pair
+ test_assign_box_2d<int[2]>();
+ test_assign_box_2d<float[2]>();
+ test_assign_box_2d<double[2]>();
+
+ test_assign_box_or_segment_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_assign_box_or_segment_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_assign_box_or_segment_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_assign_linestring_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_assign_linestring_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_assign_linestring_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#ifdef HAVE_TTMATH
+ // Next 3 need extra traits for c-array with custom type:
+ // test_assign_point_2d<ttmath_big[2]>();
+ // test_assign_point_3d<ttmath_big[3]>();
+ // test_assign_box_2d<ttmath_big[2]>();
+
+ test_assign_point_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_assign_point_3d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+ test_assign_box_or_segment_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_assign_linestring_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/Jamfile b/src/boost/libs/geometry/test/algorithms/buffer/Jamfile
new file mode 100644
index 000000000..d4278cbc8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/Jamfile
@@ -0,0 +1,31 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2011-2019 Barend Gehrels, Amsterdam, the Netherlands.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+project boost-geometry-algorithms-buffer
+ :
+ requirements
+ <include>.
+ ;
+
+test-suite boost-geometry-algorithms-buffer
+ :
+ [ run buffer.cpp : : : : algorithms_buffer ]
+ [ run buffer_with_strategies.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_with_strategies ]
+ [ run buffer_point.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_point ]
+ [ run buffer_point_geo.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_point_geo ]
+ [ run buffer_linestring.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_linestring ]
+ [ run buffer_ring.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_ring ]
+ [ run buffer_polygon.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_polygon ]
+ [ run buffer_multi_point.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_multi_point ]
+ [ run buffer_multi_linestring.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_multi_linestring ]
+ [ run buffer_multi_polygon.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_multi_polygon ]
+ [ run buffer_linestring_aimes.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_linestring_aimes ]
+# Uncomment next line if you want to test this manually; requires access to data/ folder
+# [ run buffer_countries.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE : algorithms_buffer_countries ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer.cpp
new file mode 100644
index 000000000..04e1055e0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer.cpp
@@ -0,0 +1,73 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2019 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/variant/variant.hpp>
+
+#include "geometry_test_common.hpp"
+
+#include <boost/geometry/algorithms/buffer.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include "test_common/test_point.hpp"
+
+
+template <typename P>
+void test_all()
+{
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+
+ P p1(0, 0);
+ P p2(2, 2);
+
+ typedef bg::model::box<P> box_type;
+
+ box_type b1(p1, p2);
+ box_type b2;
+ bg::buffer(b1, b2, coordinate_type(2));
+
+ box_type expected(P(-2, -2), P(4, 4));
+ BOOST_CHECK(bg::equals(b2, expected));
+
+ boost::variant<box_type> v(b1);
+ bg::buffer(v, b2, coordinate_type(2));
+
+ BOOST_CHECK(bg::equals(b2, expected));
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+#endif
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_countries.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_countries.cpp
new file mode 100644
index 000000000..c80047df3
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_countries.cpp
@@ -0,0 +1,248 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+
+template <typename MultiPolygon>
+std::string read_from_file(std::string const& filename)
+{
+ MultiPolygon mp;
+ std::ifstream in(filename.c_str());
+ while (in.good())
+ {
+ std::string line;
+ std::getline(in, line);
+ if (! line.empty())
+ {
+ typename boost::range_value<MultiPolygon>::type pol;
+ bg::read_wkt(line, pol);
+ mp.push_back(pol);
+ }
+ }
+ std::ostringstream out;
+ if (! mp.empty())
+ {
+ out << std::fixed << std::setprecision(19) << bg::wkt(mp);
+ }
+
+ BOOST_CHECK(! out.str().empty());
+
+ return out.str();
+}
+
+
+/*
+
+Area's from PostGIS:
+
+query:
+ with viewy as
+ (
+ select ST_GeomFromText
+ (
+ 'MULTIPOLYGON(((-702580.6096782692475244403 6430990.7687819330021739006,-703230.0475875560659915209 6431039.6897066971287131310,-703260.8830865059280768037 6431616.0447590677067637444,-702209.5818154554581269622 6433969.2453343933448195457,-701931.2830884709255769849 6434497.0344218844547867775,-701467.5260898249689489603 6434786.0182951148599386215,-700756.1945436559617519379 6434833.5779418582096695900,-699921.2983627079520374537 6434065.5660789832472801208,-699643.1109552145935595036 6433585.3568368786945939064,-699086.5135012482060119510 6432576.2640118366107344627,-698993.6730459277750924230 6432239.8116209311410784721,-699797.6224084376590326428 6431375.9207902560010552406,-700292.3262255217414349318 6431087.0551158646121621132,-702580.6096782692475244403 6430990.7687819330021739006)),((-735358.0771448947489261627 7178577.3841606164351105690,-735605.4290534354513511062 7178156.5045146262273192406,-736935.1403709617443382740 7177207.7119220057502388954,-737491.6265054368413984776 7177576.5995239885523915291,-738326.6340058789355680346 7178735.1250268649309873581,-740893.1048661170061677694 7182528.6822584075853228569,-749705.9349937491351738572 7205006.6147208353504538536,-762724.0815250772284343839 7224794.0963690327480435371,-762600.4055708040250465274 7225641.0741515457630157471,-764765.0130692812381312251 7234599.5305097363889217377,-765445.2864775179186835885 7235820.5329339085146784782,-770021.7420635188464075327 7241232.3524428531527519226,-771103.9901530132628977299 7242295.3629226731136441231,-776391.6659656920237466693 7246596.8462748657912015915,-782050.3696411874843761325 7249518.3589066835120320320,-782668.8607320359442383051 7249677.3384689968079328537,-783287.2405033904360607266 7249572.3082885984331369400,-785730.0354093580972403288 7248190.2115479269996285439,-797140.2832156693330034614 7234175.6422693207859992981,-798779.2400786185171455145 7225111.4401018721982836723,-795377.7617179383523762226 7219339.8478290000930428505,-795099.5743104477878659964 7218756.8999792803078889847,-794975.7870366862043738365 7218121.5951453419402241707,-795470.6021732615772634745 7212936.2726683067157864571,-810498.7334303526440635324 7193863.9115921957418322563,-811179.0068385921185836196 7193284.3684667171910405159,-814116.6168811351526528597 7191490.3536884263157844543,-816002.8143331365427002311 7191596.1295820372179150581,-841513.5680797586683183908 7194233.5802007140591740608,-847141.4362563013564795256 7197189.2738139629364013672,-848254.6311642369255423546 7197876.6753672696650028229,-848656.4945260005770251155 7198404.4778307117521762848,-848718.3881628799717873335 7199670.4357275264337658882,-848594.7122086095623672009 7201097.6388064818456768990,-848749.3349813210079446435 7201730.2385471686720848083,-849120.3628441347973421216 7202364.2203078540042042732,-856819.9980638342676684260 7208600.8437178684398531914,-857438.3778351887594908476 7208600.8437178684398531914,-862478.7017393268179148436 7208177.0236210795119404793,-870023.7141863148426637053 7207966.3590856380760669708,-870580.3116402812302112579 7207966.3590856380760669708,-874012.6254999083466827869 7210450.9231998035684227943,-875187.7140447233105078340 7211560.6087152827531099319,-875806.0938160805962979794 7212724.1476780120283365250,-875991.6634072330780327320 7214047.8326450148597359657,-876022.6102256742306053638 7218227.7297820551320910454,-876610.0431785903638228774 7223839.8538713958114385605,-876702.8836339107947424054 7224475.6212571412324905396,-876981.1823608925333246589 7225111.4401018721982836723,-879454.9240853014634922147 7226066.0278311185538768768,-884031.3796713051851838827 7227071.4743356276303529739,-893926.5692079173168167472 7238101.1117624733597040176,-895596.3615698162466287613 7238896.9872776530683040619,-896771.3387951399199664593 7239853.0616000862792134285,-897853.5868846315424889326 7241073.3528286991640925407,-907996.1283297898480668664 7253664.5514006679877638817,-908305.2625557214487344027 7254302.7396087851375341415,-909665.6980527064297348261 7258503.5592825226485729218,-895781.9311609688447788358 7266808.4238847019150853157,-885082.7922618469456210732 7271603.5667797476053237915,-872033.5875925865257158875 7275761.4648210369050502777,-862973.5168759049847722054 7283550.4871917199343442917,-865787.3396446865517646074 7289796.4451190056279301643,-873796.2204098060028627515 7290971.6515730358660221100,-874445.5469996044412255287 7291293.0323402481153607368,-880135.1974935409380123019 7297012.0099565647542476654,-880970.0936744889477267861 7298293.9856944410130381584,-882485.3745831678388640285 7303643.4018597202375531197,-882238.0226746243424713612 7304285.6780861504375934601,-873085.0001831282861530781 7310334.7953147590160369873,-871600.6660928905475884676 7310709.9959785044193267822,-871013.2331399742979556322 7310496.7502252506092190742,-870425.6888675697846338153 7309853.9632561607286334038,-861520.1296041056048125029 7305890.8288697442039847374,-840833.2946715191937983036 7315960.4538994673639535904,-832985.8271680481266230345 7328929.2893263995647430420,-830226.9962277177255600691 7334311.5376756498590111732,-828650.0443211420206353068 7339095.0725443745031952858,-824475.4520969019504263997 7352813.8748141247779130936,-815569.8928334405645728111 7370657.6415467225015163422,-807345.3862146517494693398 7375579.2351953061297535896,-807622.9057052005082368851 7371088.9971275608986616135,-807190.0955249957041814923 7370819.1056331051513552666,-789811.7871782749425619841 7369039.1054780697450041771,-787430.7745896981796249747 7369200.5359869319945573807,-786379.4733186477096751332 7369740.0217997981235384941,-785389.9543649854604154825 7370495.9865155210718512535,-784524.2226850874722003937 7371413.6954120760783553123,-782483.2911408834625035524 7373897.2790033649653196335,-781431.9898698300821706653 7375516.8260253472253680229,-778587.1089631190989166498 7383297.7232969645410776138,-775556.7697847438976168633 7392222.0447648391127586365,-766960.4560667055193334818 7394495.1678112838417291641,-759724.5778456518892198801 7394550.3234224319458007812,-749211.1198571709683164954 7396932.7178549375385046005,-736192.9733258428750559688 7402187.9909061845391988754,-725308.3761550596682354808 7407229.3494948502629995346,-709816.4878993228776380420 7408422.4015268804505467415,-707249.7944001023424789310 7408151.4058539085090160370,-696303.4149119253270328045 7403107.8879097951576113701,-686655.7999228363623842597 7404409.0014582388103008270,-684553.0860612413380295038 7404897.2679815273731946945,-683749.0253792431904003024 7404735.0945201823487877846,-679481.8153386650374159217 7402783.4239942766726016998,-678894.3823857487877830863 7402458.9736336832866072655,-675338.3925718484679237008 7399695.3543038265779614449,-674688.9546625588554888964 7398557.0712014045566320419,-672091.4256643884582445025 7393304.2529149157926440239,-671658.5041646952740848064 7392006.5564168058335781097,-671627.6686657454119995236 7391194.9242857862263917923,-672648.0231183547293767333 7381838.4430372426286339760,-673421.1369819147512316704 7378811.9759865151718258858,-671936.9142111683031544089 7373087.5347176529467105865,-650600.6413692950736731291 7341729.4264621166512370110,-644694.4744657649425789714 7333076.6175461346283555031,-643643.1731947144726291299 7333774.4993700264021754265,-642931.9529680367559194565 7333882.2134874602779746056,-639746.9910169501090422273 7333505.8973950138315558434,-638571.9024721352616325021 7332861.2130459556356072426,-638077.1986550511792302132 7332485.1395546719431877136,-635696.1860664744162932038 7329532.4808910498395562172,-635417.8873394897673279047 7328995.5782044418156147003,-633717.2594786409754306078 7325506.4177591772750020027,-633191.4975236244499683380 7324326.0056811599060893059,-633021.4013416939415037632 7317593.0931803137063980103,-633005.9279324719682335854 7316390.1439637970179319382,-633129.6038867422612383962 7315639.4076945250853896141,-633469.7962506090989336371 7314674.0333597715944051743,-633779.0417960318736732006 7313870.4174501933157444000,-634119.1228404046269133687 7313281.7431463403627276421,-635758.0797033538110554218 7311407.2306827269494533539,-639258.4097718583652749658 7308761.1154594300314784050,-639592.3682442387798801064 7308568.5479629402980208397,-640019.0558524483349174261 7308503.7815833184868097305,-641985.7372962941881269217 7308503.7815833184868097305,-644075.9833749192766845226 7307658.2055283375084400177,-647477.4617355966474860907 7305890.8288697442039847374,-648065.0060080040711909533 7305570.3889232203364372253,-652610.5147755667567253113 7302306.0416051279753446579,-653569.1982302792603150010 7301449.3883516052737832069,-654342.2007743450812995434 7300487.1135643599554896355,-655486.3425007188925519586 7298990.3059588475152850151,-655826.4235450944397598505 7298348.4646951872855424881,-659444.3069958741543814540 7291133.0134554086253046989,-659567.9829501473577693105 7290330.4681210117414593697,-657712.7323165842099115252 7285525.3807995188981294632,-657310.7576353321783244610 7285044.5346792098134756088,-656599.5374086515512317419 7284830.4504301641136407852,-655362.5552269573090597987 7285258.6247859327122569084,-654898.7982283142628148198 7285685.2850175667554140091,-654558.6058644475415349007 7286271.6925147818401455879,-653971.0615920429117977619 7288408.5788867557421326637,-651868.4590499391779303551 7291827.1575358547270298004,-647477.4617355966474860907 7295299.9569906648248434067,-645993.2389648500829935074 7296423.2570062335580587387,-639042.0046817560214549303 7298690.5552950426936149597,-638763.5946352829923853278 7298819.1559704272076487541,-638318.4279915994266048074 7298883.0720631638541817665,-626636.1153497900813817978 7299899.4466651547700166702,-623296.4193065008148550987 7299845.1493975305929780006,-620822.6775820920011028647 7299632.1999242166057229042,-620235.1333096873713657260 7299310.4762344490736722946,-616586.3030404637102037668 7295087.1312795402482151985,-616184.3283592087682336569 7294605.5046063205227255821,-615967.9232691064244136214 7293964.0231761783361434937,-615349.5434977519325911999 7290384.6993595836684107780,-609969.0272297499468550086 7272402.8508998267352581024,-605052.3792798821814358234 7263400.9426858676597476006,-604526.7286443569464609027 7262975.4949916983023285866,-604433.9995085247792303562 7262282.3713537119328975677,-605052.3792798821814358234 7257865.6035474222153425217,-605176.0552341524744406343 7257067.9925211919471621513,-607928.2070050371112301946 7243515.8429014263674616814,-612356.2737098102224990726 7239513.5310624139383435249,-612690.2321821906371042132 7239353.8020243635401129723,-613153.9891808364773169160 7239322.4680012036114931107,-613821.9061255943961441517 7239736.5075368294492363930,-614230.1146983328508213162 7240372.7991492254659533501,-617291.4006951490882784128 7246553.8178517967462539673,-617421.3105409058043733239 7246936.1097532864660024643,-617476.9702863016864284873 7247351.1250555245205760002,-617514.0396767350612208247 7248306.8912714971229434013,-617347.0604405448539182544 7249136.7063253857195377350,-617198.5602398286573588848 7249550.4989193044602870941,-617031.6923231268301606178 7249900.7953358525410294533,-615844.2473148361314088106 7251400.6847681496292352676,-617359.4169040236156433821 7254250.2890685461461544037,-616895.5485858893953263760 7255631.9227854702621698380,-616771.8726316161919385195 7256376.9229258280247449875,-617112.0649954801192507148 7261006.2797204386442899704,-617823.1739026695722714067 7265263.9857233623042702675,-618039.6903122602961957455 7265903.1192052718251943588,-618905.5333116523688659072 7268460.1747035766020417213,-619121.9384017547126859426 7269045.4850603407248854637,-619833.1586284324293956161 7270110.7394062280654907227,-623358.3129433830035850406 7273468.5620510326698422432,-627780.1457566726021468639 7276775.0316838556900620461,-629975.5887540967669337988 7278160.6439954033121466637,-632356.6013426764402538538 7279441.0702628456056118011,-633717.2594786409754306078 7279867.6054819477722048759,-634366.4747489481233060360 7279655.0071296412497758865,-634582.9911585417576134205 7278960.5978231728076934814,-635046.7481571848038583994 7271869.8578517930582165718,-631830.9507071482948958874 7269844.3163336357101798058,-631336.2468900642124935985 7269578.0941229732707142830,-628400.8632373372092843056 7264020.9494932899251580238,-620421.1481788019882515073 7241887.6865395959466695786,-619846.0716893646167591214 7239944.9685657471418380737,-619066.8352538122562691569 7235710.5318127926439046860,-619252.2935254735639318824 7235360.1044908678159117699,-618843.6396747701801359653 7225430.1317164767533540726,-619183.7207191428169608116 7223946.0657785069197416306,-621904.9256715864175930619 7220504.5390589004382491112,-624316.8850786042166873813 7217592.4677235791459679604,-628738.7178918938152492046 7213306.8386734155938029289,-629326.2621643012389540672 7212989.9712846651673316956,-629913.6951172174885869026 7213148.4033825341612100601,-630315.7811179606942459941 7213623.5283982306718826294,-630841.4317534888396039605 7214787.3727535428479313850,-632789.5228423695079982281 7216322.0976330684497952461,-633408.0139332180842757225 7216640.2424348145723342896,-634181.0164772868156433105 7216798.7481244029477238655,-637922.5758823397336527705 7217169.4962707208469510078,-639654.2618811180582270026 7217275.6180500760674476624,-648157.7351438361220061779 7215793.0913441013544797897,-648714.3325978023931384087 7215528.5063093286007642746,-651837.5122314980253577232 7213465.0867246836423873901,-652765.2488677693763747811 7212671.9741857927292585373,-653785.6033203788101673126 7210662.9868646310642361641,-653878.3324562108609825373 7209075.6939942780882120132,-653661.9273661085171625018 7207648.5650895787402987480,-652981.6539578718366101384 7205799.1447007078677415848,-652888.9248220397857949138 7205058.9276083298027515411,-652765.2488677693763747811 7202681.9910357510671019554,-652919.7603209896478801966 7200991.7351339543238282204,-655115.2033184138126671314 7192229.2954357927665114403,-656383.0209990608273074031 7189011.9584304438903927803,-657186.9703615678008645773 7188009.6574359694495797157,-659042.4436341105028986931 7186428.4453326268121600151,-664391.9017641830723732710 7182265.4030445581302046776,-672802.6458910661749541759 7176102.8584930133074522018,-675462.0685261187609285116 7175417.5443301461637020111,-676266.0178886285284534097 7175365.4280199278146028519,-677038.9091132060857489705 7175523.1046035401523113251,-679976.6304752404103055596 7177050.1911828350275754929,-686934.0986498210113495588 7183318.9521107096225023270,-687645.2075570075539872050 7184372.6421100758016109467,-688603.8910117199411615729 7186744.0550359664484858513,-689315.1112383977742865682 7187851.7307325564324855804,-689809.8150554818566888571 7188221.1171403760090470314,-690490.0884637213312089443 7188484.5955257071182131767,-697636.4658141745021566749 7189085.8072432382032275200,-697695.0198663338087499142 7189486.9569816533476114273,-698251.5060008089058101177 7190066.4104806575924158096,-698931.7794090455863624811 7190487.9270409662276506424,-700044.9743169782450422645 7190751.4812934864312410355,-705641.8956750826910138130 7192071.4739870699122548103,-706847.9310383386909961700 7192071.4739870699122548103,-707435.3639912548242136836 7191807.6856330027803778648,-707992.0727647095918655396 7191332.5470526618883013725,-708393.9361264732433483005 7190751.4812934864312410355,-708579.5057176257250830531 7190172.1672446671873331070,-708672.3461729490663856268 7189591.1871162438765168190,-708641.3993545080302283168 7189011.9584304438903927803,-717732.4168896306073293090 7181210.4776329882442951202,-731090.7557848254218697548 7179788.2020574221387505531,-735358.0771448947489261627 7178577.3841606164351105690)),((-688882.1897387016797438264 7412436.5099641056731343269,-694015.2427786719053983688 7418624.0284140892326831818,-697169.2579113173997029662 7418407.8061552522704005241,-698839.1615927076200023293 7418516.6985288234427571297,-699364.7009087415644899011 7418788.0563712492585182190,-699241.0249544712714850903 7419602.5779014062136411667,-697169.2579113173997029662 7421068.9713027896359562874,-696025.2275044348789379001 7421829.9468861259520053864,-694510.0579152472782880068 7421992.6735327132046222687,-689191.4352841245708987117 7420797.5336704570800065994,-687768.9948307690210640430 7420254.4913531979545950890,-687367.0201495141955092549 7419818.8334604389965534210,-687150.5037399205612018704 7418950.7192241176962852478,-688078.1290567035321146250 7413467.8112517688423395157,-688480.2150574468541890383 7412761.3775515491142868996,-688882.1897387016797438264 7412436.5099641056731343269)),((-698468.0224104025401175022 7473833.5146531024947762489,-701374.6856345045380294323 7474653.6489164056256413460,-703230.0475875560659915209 7475583.7647755797952413559,-704157.6729043362429365516 7476567.9621847020462155342,-704374.0779944385867565870 7477114.9677619626745581627,-703755.6982230813009664416 7482205.5315547427162528038,-703632.0222688110079616308 7482918.3282846277579665184,-699735.7287715553538873792 7500351.2504732506349682808,-696087.0098218229832127690 7511500.4964982029050588608,-695870.6047317205229774117 7512214.6175983380526304245,-695901.5515501616755500436 7513038.8378656907007098198,-696241.6325945372227579355 7513698.6733295693993568420,-696767.2832300624577328563 7514083.8343340521678328514,-697447.5566382991382852197 7514302.7473613265901803970,-704126.7260858950903639197 7515018.5136068165302276611,-704837.9463125757174566388 7515018.5136068165302276611,-705518.2197208123980090022 7514797.9966831970959901810,-706384.0627202015602961183 7513753.1013900088146328926,-706693.1969461359549313784 7513038.8378656907007098198,-707157.1765837614657357335 7511719.3362279795110225677,-707589.9867639662697911263 7510400.0602311035618185997,-708053.8550821004901081324 7508862.2448687991127371788,-708826.8576261692214757204 7506994.0948427924886345863,-710187.5157621366670355201 7504467.4917841125279664993,-711671.7385328831151127815 7502326.0925307748839259148,-713650.6651207137620076537 7499692.5552066601812839508,-717948.9332992242416366935 7495028.9645483279600739479,-719402.3205710208276286721 7493766.8251204313710331917,-720608.1332952943630516529 7493000.1262787943705916405,-721907.0091138707939535379 7492726.1545226909220218658,-722618.1180210572201758623 7492890.1811141148209571838,-723731.4242484811693429947 7493658.2508851466700434685,-724133.2876102448208257556 7494316.4315773332491517067,-724597.1559283791575580835 7495412.9975283788517117500,-724689.8850642112083733082 7497058.3359622266143560410,-723576.6901562785496935248 7503149.4548785416409373283,-723051.0395207533147186041 7505565.5006046025082468987,-717979.7687981741037219763 7528337.0292042447254061699,-717083.2016193262534216046 7529327.9761461354792118073,-709074.2095347127178683877 7532468.2375808423385024071,-702395.1514066079398617148 7531311.8393505858257412910,-689315.1112383977742865682 7541787.6536649884656071663,-686068.2556504289386793971 7543996.0762523645535111427,-683718.1898802933283150196 7545210.4222629889845848083,-683130.6456078859046101570 7545375.7677722154185175896,-682326.6962453760206699371 7545210.4222629889845848083,-681491.8000644280109554529 7544271.8755555301904678345,-681120.6608821229310706258 7542836.3568872893229126930,-681584.5292002571513876319 7537540.8627359746024012566,-681460.8532459868583828211 7534342.3719757227227091789,-679389.0862028329866006970 7520903.3390643103048205376,-679265.4102485626935958862 7520133.9395713303238153458,-678770.7064314757008105516 7518042.6464647594839334488,-678306.8381133413640782237 7516722.2886397214606404305,-677750.2406593750929459929 7515512.4231265708804130554,-676327.8002060195431113243 7514248.3154224921017885208,-674534.3318898474099114537 7513203.4945802800357341766,-673730.2712078491458669305 7512214.6175983380526304245,-673482.9192993056494742632 7511609.1241234233602881432,-671287.4763018814846873283 7502985.2102015949785709381,-670669.0965305241988971829 7495138.9401649823412299156,-670978.2307564557995647192 7494534.9820824339985847473,-672184.2661197116831317544 7493000.1262787943705916405,-676451.4761602898361161351 7489052.5557834561914205551,-693396.7516878233291208744 7477662.0120453117415308952,-698468.0224104025401175022 7473833.5146531024947762489)),((-142767.2469423743896186352 6547139.2345692599192261696,-152229.4036598020466044545 6554104.9963345807045698166,-163979.8438299772387836128 6561516.0021916879341006279,-166268.0159632335416972637 6562638.7391632050275802612,-166886.5070540792366955429 6562882.6951917400583624840,-168339.7830063846195116639 6562930.8198394523933529854,-169576.7651880816847551614 6562687.0380198908969759941,-171215.6107315395784098655 6562003.6794201470911502838,-174678.8714096079056616873 6560930.5466297725215554237,-174771.6005454399564769119 6561467.7101931860670447350,-172637.9398654038668610156 6564053.9251385293900966644,-169576.7651880816847551614 6567567.2077301768586039543,-145704.8569849174818955362 6580905.3427298367023468018,-144375.2569868824211880565 6581051.6178714158013463020,-143756.7658960339031182230 6580953.5727541074156761169,-124461.4245983647560933605 6574990.3297461569309234619,-123997.5562802276544971392 6574599.8518867725506424904,-121771.1664643623080337420 6572010.5021970951929688454,-117967.7134224300389178097 6566199.7380468165501952171,-130058.3459564691875129938 6551181.9892134414985775948,-132624.8168167072290088981 6549719.5585852097719907761,-135284.1281322685827035457 6548599.8054481893777847290,-138221.7381748116458766162 6547771.9240455087274312973,-142767.2469423743896186352 6547139.2345692599192261696)),((-106928.6047984238393837586 6581490.8109566625207662582,-108289.1516148999944562092 6581784.9690047213807702065,-113824.1793361222225939855 6583496.2583401361480355263,-113731.4502002901717787609 6584132.9769384199753403664,-113422.2046548673097277060 6584572.3344440879300236702,-108629.2326592727040406317 6591326.2465774957090616226,-108072.6352053063747007400 6591423.1816138168796896935,-107361.5262981198466150090 6591228.2552289562299847603,-105660.7871177797496784478 6589955.0025413725525140762,-105351.5415723540645558387 6589417.2116007748991250992,-104207.3998459831345826387 6582566.6249391864985227585,-104454.7517545237933518365 6582029.3165351273491978645,-106928.6047984238393837586 6581490.8109566625207662582)),((-519150.8017779086367227137 6649348.9302046010270714760,-519769.4041882483870722353 6649545.2418169863522052765,-520233.1611868914333172143 6649890.6622821614146232605,-520356.8371411645784974098 6650581.3694077720865607262,-520016.7560967890312895179 6654131.8595868386328220367,-519800.2396871982491575181 6655514.0480420421808958054,-519367.3181875022710300982 6655859.7204466462135314941,-518625.2624618746340274811 6655859.7204466462135314941,-518346.8524154016631655395 6655365.0190682355314493179,-517233.6575074690044857562 6650433.6728300666436553001,-517295.5511443483410403132 6649791.7917294288054108620,-517821.3130993648082949221 6649545.2418169863522052765,-519150.8017779086367227137 6649348.9302046010270714760)),((100094.8125781164126237854 6684726.0087605575099587440,98548.6961704877467127517 6684924.5976608581840991974,87664.0989997017313726246 6686905.0463614761829376221,86952.8787730239710072055 6687103.6882660342380404472,85283.0864111249684356153 6688045.2524453820660710335,84540.9193660061137052253 6688936.4502402693033218384,82963.9674594304087804630 6691364.4189215200021862984,82469.1523228522128192708 6692405.6823790417984127998,81819.8257330566557357088 6693843.4366568028926849365,82438.3168239023507339880 6697660.7728029768913984299,83365.9421406824840232730 6700140.4544257819652557373,84633.7598213294113520533 6700339.2401692178100347519,88066.0736809566442389041 6699495.9075616495683789253,99321.6987145564635284245 6696173.4326590122655034065,100651.4100320827565155923 6695726.6230171313509345055,101177.0606676079914905131 6695379.4386507561430335045,103588.9087551346019608900 6692158.0223465478047728539,104269.2934828625002410263 6691215.9836819367483258247,105073.2428453723114216700 6689679.5164131233468651772,105475.2175266272242879495 6688540.5088516287505626678,105506.1643450683186529204 6687846.5876310169696807861,105413.3238897450355580077 6687203.0110306832939386368,104918.6200726608949480578 6686856.1890392992645502090,100713.1923494708753423765 6684875.5739196399226784706,100094.8125781164126237854 6684726.0087605575099587440)),((-484394.4077234524884261191 7006049.7621033526957035065,-490053.2227184362709522247 7006307.4369544526562094688,-498587.6427995953708887100 7015743.4408356416970491409,-500319.3287983737536706030 7018115.9862014595419168472,-508451.7741982779698446393 7033717.6659270338714122772,-508637.3437894305097870529 7055102.4795240126550197601,-508389.9918808870133943856 7055724.8110826518386602402,-507616.8780173270497471094 7056708.9933504080399870872,-498123.8858009495306760073 7060807.9525244953110814095,-493052.6150783703196793795 7061896.6329905483871698380,-492372.3416701336973346770 7062000.6893656672909855843,-491599.3391260649659670889 7062000.6893656672909855843,-480220.0381381948245689273 7059562.5416110474616289139,-477838.9142301268293522298 7058731.8781612580642104149,-476849.3952764644636772573 7057953.9569422556087374687,-476107.3395508368266746402 7057020.9627588037401437759,-475334.2256872769212350249 7055206.4469419745728373528,-470015.6030561570660211146 7042719.9294385062530636787,-459409.4159318468300625682 7040650.0641330182552337646,-458883.7652963215950876474 7040908.6746784290298819542,-458172.5450696410262025893 7041010.9660405069589614868,-457523.2184798454400151968 7040959.9133565612137317657,-451957.1326206909143365920 7039717.6081727687269449234,-450472.9098499444080516696 7039303.8600313169881701469,-450442.0743509945459663868 7038631.7747488524764776230,-455296.7173444888903759420 7030305.4587014671415090561,-456564.5350251329946331680 7028961.1894702669233083725,-462347.0259743899223394692 7024828.9599360972642898560,-469551.8460575111676007509 7020129.0798942381516098976,-481518.6913177887327037752 7009863.6067247306928038597,-484394.4077234524884261191 7006049.7621033526957035065)),((-509564.9691062106285244226 7027153.0635162591934204102,-512842.7715126176481135190 7030511.4449932724237442017,-519243.6422332319198176265 7034647.9294924885034561157,-520635.1358681463170796633 7035010.0486788097769021988,-521315.4092763858498074114 7035993.1596986297518014908,-522521.4446396389394067228 7038941.5453599998727440834,-522304.9282300453633069992 7039458.8500605020672082901,-521129.9510047245421446860 7041994.8189928056672215462,-520820.7054592988570220768 7042564.8758499575778841972,-520140.4320510621764697134 7042668.6794203175231814384,-515038.2145100419293157756 7042978.6072979765012860298,-514481.6170560755999758840 7042668.6794203175231814384,-511049.3031964483670890331 7038165.5582551229745149612,-507678.7716542092384770513 7030925.8527166405692696571,-507555.0956999360932968557 7030201.8163049044087529182,-507555.0956999360932968557 7029477.8457472492009401321,-507709.7184726503328420222 7028702.9669241644442081451,-508018.9640180732239969075 7028135.2044416479766368866,-508884.6956979711540043354 7027256.6662269476801156998,-509564.9691062106285244226 7027153.0635162591934204102)),((-296666.4429640754242427647 6730809.2905607484281063080,-297748.8023730582208372653 6729365.0000257585197687149,-300438.9491875665844418108 6726228.4902110705152153969,-302201.5820047889137640595 6724685.4097353378310799599,-317013.1968522862880490720 6718269.7042935220524668694,-322022.5739379832521080971 6717125.4435921907424926758,-324929.2371620881021954119 6716976.5386439291760325432,-328918.1484756816644221544 6717324.8229897394776344299,-330216.9129747668630443513 6717672.9432423794642090797,-336308.5381499582435935736 6714740.2493202565237879753,-346822.1074579276028089225 6708430.6989329699426889420,-347533.3276846053777262568 6707535.9388622017577290535,-348182.6542744037578813732 6706443.5887363040819764137,-350841.9655899651115760207 6701827.5188080035150051117,-351800.5377251863828860223 6698999.9858346609398722649,-351614.9681340338429436088 6698355.5290799643844366074,-351553.1858166428864933550 6697709.8733980739489197731,-351614.9681340338429436088 6696173.4326590122655034065,-351955.1604978977702558041 6694735.2678222069516777992,-352202.5124064384144730866 6694091.1478441227227449417,-352480.8111334230052307248 6693545.2294893041253089905,-353624.9528597967582754791 6692206.9114117827266454697,-354614.4718134562717750669 6691563.1693708989769220352,-363829.1653028520522639155 6688887.4024045290425419807,-364416.8208947507082484663 6688737.7637376058846712112,-372487.3726577727356925607 6688540.5088516287505626678,-373971.7067480076220817864 6688540.5088516287505626678,-378857.4078794342931360006 6688737.7637376058846712112,-380310.6838317424990236759 6688887.4024045290425419807,-384175.9191910657682456076 6689630.4641125248745083809,-388350.4000958118122071028 6690572.1413981299847364426,-394349.2961351711419411004 6691959.2574109639972448349,-396328.3340424958732910454 6693346.4307649247348308563,-408759.0476209077169187367 6705550.4764933045953512192,-417386.1968378960737027228 6714740.2493202565237879753,-417866.3178016852471046150 6716183.2003521975129842758,-418684.9613369812141172588 6718170.0024194139987230301,-420973.2447897259262390435 6722298.0005760667845606804,-426972.1408290852559730411 6731556.1845118729397654533,-427497.7914646104909479618 6731854.3516772650182247162,-439681.0418149904580786824 6730411.3097816780209541321,-441443.6746322099352255464 6729862.7735847430303692818,-467572.8081501893466338515 6717821.8609223226085305214,-467789.3245597829227335751 6716430.3385093230754137039,-468160.3524225967703387141 6715982.5962533196434378624,-468809.7903318835305981338 6715882.9223695350810885429,-469459.1169216819689609110 6716082.2713566971942782402,-472303.8865089045721106231 6717524.2072677453979849815,-476200.1800061601679772139 6720358.1752467108890414238,-477900.8078670090180821717 6728567.7653740793466567993,-477900.8078670090180821717 6729315.8875402389094233513,-477684.4027769066160544753 6729962.6187606593593955040,-473169.7295082937343977392 6733249.7686292603611946106,-471097.9624651398626156151 6734046.0274155708029866219,-468809.7903318835305981338 6732900.8022920805960893631,-465377.3651527651236392558 6732153.9642069246619939804,-464697.0917445255909115076 6732103.2211532425135374069,-463367.3804270021500997245 6732302.9677236676216125488,-458234.3273870319826528430 6734245.8216936066746711731,-453967.1173464538296684623 6736388.9867214597761631012,-453627.0363020811346359551 6736836.4176607690751552582,-452575.6237115394324064255 6739229.5325915897265076637,-452390.1654398753307759762 6739927.8440811540931463242,-452513.8413941484759561718 6740624.7796155549585819244,-453085.4669793718494474888 6741509.3617311874404549599,-453595.9781641488079912961 6741971.0771495644003152847,-467263.5626047664554789662 6742320.2533843247219920158,-474468.3826878877007402480 6741921.7089691357687115669,-493825.6176224390510469675 6752750.3917194996029138565,-509224.8880618350813165307 6752200.3463254561647772789,-515223.7841011944110505283 6751251.5156823564320802689,-517171.8751900779898278415 6750852.5330523196607828140,-519552.8877786547527648509 6750103.8644746709614992142,-520511.4599138760240748525 6749455.3496915753930807114,-521253.6269589948933571577 6748506.8395475624129176140,-521655.4903207585448399186 6747159.4591391524299979210,-521717.3839576378813944757 6744165.4814152186736464500,-522119.3586388928233645856 6740076.9900818299502134323,-524160.1788636056007817388 6737136.2137496760115027428,-524685.9408186221262440085 6736887.1902486104518175125,-532478.3051741536473855376 6733847.6727800481021404266,-533189.4140813400736078620 6733996.7073211427778005600,-533746.1228547976352274418 6734295.1432984098792076111,-535137.5051702208584174514 6735391.2361996844410896301,-537425.7886229683645069599 6736189.1397955883294343948,-538167.9556680872337892652 6736338.2172435978427529335,-538817.3935773740522563457 6736238.2937905825674533844,-541229.2416649034712463617 6735441.8203898128122091293,-541723.9454819876700639725 6735192.6693880939856171608,-544383.2567975489655509591 6732950.1157429544255137444,-550072.9072914826683700085 6727074.7735988246276974678,-557185.1095582658890634775 6729265.1621820526197552681,-561328.5323250824585556984 6731107.4303566515445709229,-562318.1625982332043349743 6731755.7383567309007048607,-558966.1100914680864661932 6740426.2644657352939248085,-553325.9967709350166842341 6741712.2116987816989421844,-546022.2136604981496930122 6745512.3655102550983428955,-544816.1782972421497106552 6745961.7356973951682448387,-541136.5125290714204311371 6748457.4316534223034977913,-541816.7859373081009835005 6750153.2823813902214169502,-543733.9302077505271881819 6754448.3974975654855370522,-544352.3099791079293936491 6751950.8608885398134589195,-544414.2036159901181235909 6750502.8103392431512475014,-544630.7200255808420479298 6749854.2637134613469243050,-545403.7225696495734155178 6748905.7070041354745626450,-545929.3732051748083904386 6748556.0680754212662577629,-546949.8389772782102227211 6748057.1489544212818145752,-557048.9658210255438461900 6746779.8974972786381840706,-557791.1328661444131284952 6746600.2720435233786702156,-563839.4547594159375876188 6746959.3472899133339524269,-577871.9444908523000776768 6747658.3231466887518763542,-582046.4253955984022468328 6750203.9585106121376156807,-584087.2456203140318393707 6751500.9796426724642515182,-574532.3597670543240383267 6757244.5433394722640514374,-573419.1648591215489432216 6757745.2861772757023572922,-572769.7269498319365084171 6757844.2153189647942781448,-570419.6611796963261440396 6757794.7505974583327770233,-569090.0611816612072288990 6758044.5954917315393686295,-568595.3573645771248266101 6758343.7359562143683433533,-568224.2181822720449417830 6758793.8165175551548600197,-567945.9194552875123918056 6760243.3462205436080694199,-567945.9194552875123918056 6760992.9501268640160560608,-569368.2485891545657068491 6769694.5714717023074626923,-569492.0358629161491990089 6770395.5073453346267342567,-569955.9041810504859313369 6772247.1268248278647661209,-570172.3092711528297513723 6772847.9084392869845032692,-570759.8535435602534562349 6773848.8294274490326642990,-571749.2611777313286438584 6774550.1244038157165050507,-576820.5319003105396404862 6776503.1116253528743982315,-577562.6989454294089227915 6776652.9309746790677309036,-580345.6862152611138299108 6776753.3529545711353421211,-585416.8456183490343391895 6776753.3529545711353421211,-583221.4026209219591692090 6785020.3456817232072353363,-567945.9194552875123918056 6792845.0460455110296607018,-567389.3220013211248442531 6793146.9183306964114308357,-565688.5828209810424596071 6795655.7299079764634370804,-565472.0664113903185352683 6796258.2495336793363094330,-565131.9853670147713273764 6799421.9422668581828474998,-539281.1505760198924690485 6802636.4299470074474811554,-537920.6037595437373965979 6802887.6607939898967742920,-537487.6822598505532369018 6803239.6503190854564309120,-530746.6191753724124282598 6811785.0676737958565354347,-529788.0470401511993259192 6813344.8049502596259117126,-528334.7710878457874059677 6816464.0953564802184700966,-527314.3053157423855736852 6818880.6518225604668259621,-525737.2420896753901615739 6820592.5748667381703853607,-519800.2396871982491575181 6823714.6641129478812217712,-517295.5511443483410403132 6824420.2928618714213371277,-516646.1132350615225732327 6824521.3092674687504768372,-515038.2145100419293157756 6824420.2928618714213371277,-511018.3563780072727240622 6823966.3693792633712291718,-503968.1590675974148325622 6823815.6716964272782206535,-500937.7085697310394607484 6824822.9151354199275374413,-500412.0579342058044858277 6825074.8363033309578895569,-477777.1319127358729019761 6840455.9986039269715547562,-471067.1269661900005303323 6845252.9463985934853553772,-466830.6411050704773515463 6850253.9696522578597068787,-461202.8842480161692947149 6858243.5609792144969105721,-459842.3374315428663976490 6860874.3301865793764591217,-456224.3426612690673209727 6869482.4721138169988989830,-455853.3147984552197158337 6870900.3640763349831104279,-455513.2337540825246833265 6872370.1356682535260915756,-451926.2971217410522513092 6888451.3487260565161705017,-452080.8085749612073414028 6892157.9926208704710006714,-454245.4160734384204261005 6900799.5060561988502740860,-459069.2235679829027503729 6909094.0329884337261319160,-459347.6336144558736123145 6909653.4035110054537653923,-459471.3095687262248247862 6910314.7279802327975630760,-459316.6867960147792473435 6911079.8647817652672529221,-457121.1324790993239730597 6918670.8410148052498698235,-451215.0768950632773339748 6930758.7002626033499836922,-452328.2718029959360137582 6932136.9039406375959515572,-459811.3906131017720326781 6941996.8956455085426568985,-461542.9652923917165026069 6945218.3859691601246595383,-461790.4285204235929995775 6945781.5711939493194222450,-461914.1044746939442120492 6946446.0665490739047527313,-461914.1044746939442120492 6947213.1862867726013064384,-460460.8285223885322920978 6960216.4198623634874820709,-460306.0944301859126426280 6961035.5885519329458475113,-460089.6893400835106149316 6961599.8879740536212921143,-459378.4691134057356975973 6962727.3147383863106369972,-458450.8437966256169602275 6963495.9969000769779086113,-460151.5829769656993448734 6967188.0293207084760069847,-471252.5852378512499853969 6967289.3793843016028404236,-479725.2230016194516792893 6965545.9311952916905283928,-480498.2255456881248392165 6965341.8000272838398814201,-491382.8227164713316597044 6961702.6430851500481367111,-494320.4327590144239366055 6959448.2372251432389020920,-498402.0732084428891539574 6956221.0161899179220199585,-500968.6553881721338257194 6951510.4893854716792702675,-505328.7058840707759372890 6944809.6918431045487523079,-526293.8395436417777091265 6942662.3653290001675486565,-527747.2268154383637011051 6942559.8543665027245879173,-528489.2825410659424960613 6942712.9771497584879398346,-529447.8546762871555984020 6943429.1226814882829785347,-529976.8448965380666777492 6944058.2645517345517873764,-529015.0444960824679583311 6947366.2139230202883481979,-527778.1736338793998584151 6949669.3476609392091631889,-525644.5129538433393463492 6952739.1353130275383591652,-517759.4194624854717403650 6962112.2008093828335404396,-514172.4828301439411006868 6966213.3620561584830284119,-510523.6525609202799387276 6968930.5431283572688698769,-506812.9286548172240145504 6969854.5729465251788496971,-505421.4350199028267525136 6970161.8679190166294574738,-503906.3767502064583823085 6971136.8320272667333483696,-501587.1464790178579278290 6973035.2043069805949926376,-496763.3389844733756035566 6977501.6763582713901996613,-485847.7949952490744180977 6987879.3680515941232442856,-485074.6811316891689784825 6988805.7774775763973593712,-484765.5469057575101032853 6989370.7456465400755405426,-484301.6785876204376108944 6990708.3542606756091117859,-483683.1874967747135087848 6994618.0482657440006732941,-483590.4583609426626935601 6995492.8107249001041054726,-482044.3419533139676786959 7003782.8049474963918328285,-467139.8866504933102987707 7021213.6930979220196604729,-462347.0259743899223394692 7024828.9599360972642898560,-460646.2867940498399548233 7025603.6477430770173668861,-459873.1729304898763075471 7025603.6477430770173668861,-456997.4565248289727605879 7025189.3310140827670693398,-452668.3528473686310462654 7024983.6683287052437663078,-447349.8415357400663197041 7027049.4621537392958998680,-445618.1555369588313624263 7027876.8226692667230963707,-429074.8546906802803277969 7035785.7280582245439291000,-415530.9462043329258449376 7036872.6628930959850549698,-414943.4019319283543154597 7036561.4830648237839341164,-411047.2197541639907285571 7035993.1596986297518014908,-402203.5541275819996371865 7034802.8288447102531790733,-401492.3339009042829275131 7034906.3449965324252843857,-399575.1896304617985151708 7035372.3705378724262118340,-385351.0077358777634799480 7042512.3223147960379719734,-377156.6686990942107513547 7046810.1867410531267523766,-374342.7346108242636546493 7047276.7238292396068572998,-371405.1245682783192023635 7047484.4553862772881984711,-369889.9549790907767601311 7047484.4553862772881984711,-369024.1119797016144730151 7047380.5889292778447270393,-357521.1350375611218623817 7038216.7792665986344218254,-348491.8998198266490362585 7030771.2148909578099846840,-347471.4340477260411716998 7030047.1925449492409825325,-345337.7733676899224519730 7028961.1894702669233083725,-343821.2679446131805889308 7031238.3010051175951957703,-343266.0063245359924621880 7031959.4539151135832071304,-343049.6012344364426098764 7032631.1619424512609839439,-343142.3303702656994573772 7033355.4194014230743050575,-347997.1960027425084263086 7043341.2922983570024371147,-351120.2643169468501582742 7047690.8870053039863705635,-352264.2947238293709233403 7049142.2134381914511322975,-352821.0034972869325429201 7049504.9931898834183812141,-353594.0060413556639105082 7050385.9920698264613747597,-354799.9300851204316131771 7052562.3267318932339549065,-355171.0692674226011149585 7053805.3343668170273303986,-355356.6388585751410573721 7054635.2962300619110465050,-354799.9300851204316131771 7055672.1704734433442354202,-354026.9275410517002455890 7056606.4997908826917409897,-352975.6262699983781203628 7057384.1023639896884560585,-342389.4766540309065021574 7058931.3191051157191395760,-341664.2301715115318074822 7059230.4899098463356494904,-340829.4453100546961650252 7059355.0543599035590887070,-340031.6185195372090674937 7059106.4876597877591848373,-339345.1112198169576004148 7058732.4383816169574856758,-338899.8332566422177478671 7058203.2344924295321106911,-338510.2150388660957105458 7057549.3410466406494379044,-337285.7006401418475434184 7054780.6931206267327070236,-337063.0616585530224256217 7053131.8355975281447172165,-332783.4951544989598914981 7051214.2909560613334178925,-327557.6016592083615250885 7040650.0641330182552337646,-325975.9743340178392827511 7039086.4692494664341211319,-322795.6878015432157553732 7036665.2083219364285469055,-320878.4322116123512387276 7035940.6495621176436543465,-318621.2068967971717938781 7035476.0802941126748919487,-309066.2097240461735054851 7037286.0983680160716176033,-306685.1971354694105684757 7039252.8183029191568493843,-306283.2224542145268060267 7039717.6081727687269449234,-300840.9238688215264119208 7047328.0035564331337809563,-300655.4655971602187491953 7048053.6005296036601066589,-301057.4402784151607193053 7048467.6176822083070874214,-301892.3364593632286414504 7048624.2784440144896507263,-302510.7162307205144315958 7048467.6176822083070874214,-307829.3388618432218208909 7046344.9821726074442267418,-308757.0754981145728379488 7045670.8101515313610434532,-309097.1565424872678704560 7045101.8355482658371329308,-309344.5084510279120877385 7044480.3351130951195955276,-317662.5234420846682041883 7042512.3223147960379719734,-318497.4196230327361263335 7042616.1251992043107748032,-319888.9132579499855637550 7043186.2265946781262755394,-320940.3258484916877932847 7043755.0641425708308815956,-328825.4193398524075746536 7049919.0859430814161896706,-329938.6142477851244620979 7051318.2075183065608143806,-334712.9958884173538535833 7060579.1393866641446948051,-335436.5725785738904960454 7062011.5247577866539359093,-345925.3176400973461568356 7085700.3273308007046580315,-345832.5885042680893093348 7087313.0469446722418069839,-345554.2897772835567593575 7087990.9518432654440402985,-344379.2012324686511419713 7090333.4216981232166290283,-342091.0290992152295075357 7094396.8940942101180553436,-331979.5457919891341589391 7111767.0194333102554082870,-331577.4597912430181168020 7112340.7957691308110952377,-331082.7559741588775068521 7112706.4776853527873754501,-327526.7661602584994398057 7115057.9622176717966794968,-323073.9865285278065130115 7117408.6407044371590018272,-322702.8473462227848358452 7117879.3493779106065630913,-322548.2245735113392584026 7118558.3705776063725352287,-322888.4169373752665705979 7119133.9567664228379726410,-323290.3916186302085407078 7119500.1409429926425218582,-323970.6650268668890930712 7119761.3350805733352899551,-325547.7282529338262975216 7120022.7260320717468857765,-327217.5206148328143171966 7120074.2901339065283536911,-330185.9661563285626471043 7119864.6483984775841236115,-333154.5230173127492889762 7119708.2675620289519429207,-334669.6926065003499388695 7120126.0427638562396168709,-336370.4317868376383557916 7121014.9235066156834363937,-337700.0317848726408556104 7122374.8803893411532044411,-338473.1456484326045028865 7123315.5991421435028314590,-339679.0696921973722055554 7125721.8406816367059946060,-339988.3152376202051527798 7126716.2602372914552688599,-340421.2367373161832801998 7128756.9069768153131008148,-340606.6950089774909429252 7130274.9713758537545800209,-340606.6950089774909429252 7131896.7979978239163756371,-339864.6392833498539403081 7152341.7575662042945623398,-339771.7988280265708453953 7153023.7466275608167052269,-339215.3126935514737851918 7154335.9240338336676359177,-338380.3051931121735833585 7155228.4729645876213908195,-336741.4596496514277532697 7156174.6245612036436796188,-326444.4067512757028453052 7160797.3695420371368527412,-322486.4422561203828081489 7169945.3185568284243345261,-315436.1336262193508446217 7186270.5503361336886882782,-313642.6653100471594370902 7197242.8650309965014457703,-313209.8551298452657647431 7212459.8563267467543482780,-325795.0801614772644825280 7199618.1586596202105283737,-326753.6522966985357925296 7198878.5228944523259997368,-350903.8592268444481305778 7185690.0477500427514314651,-357861.3274014250491745770 7188273.3185697188600897789,-359129.0337625779211521149 7188854.0116235781461000443,-359994.8767619699356146157 7189750.6675885217264294624,-376321.7725181461428292096 7216586.5188759565353393555,-379506.7344692326732911170 7222728.4333535833284258842,-379815.9800146555644460022 7224052.0884321387857198715,-379846.8155136054265312850 7225482.3899835590273141861,-382258.7749206232838332653 7236350.8898326409980654716,-385845.7115529647562652826 7242188.9024894414469599724,-388845.2152323900372721255 7246914.8814502703025937080,-392370.3695473405532538891 7251272.8605816522613167763,-395957.3061796791735105217 7255525.2811666997149586678,-402203.5541275819996371865 7263241.4929156471043825150,-404058.9160806335275992751 7266542.3048335723578929901,-404553.6198977176682092249 7267714.0249515157192945480,-404460.8907618884695693851 7268406.0951544297859072685,-397317.8529961553285829723 7292788.3670299844816327095,-381733.1242850980488583446 7326150.4946560785174369812,-377558.6433803490945138037 7337912.6026934264227747917,-376383.5548355370992794633 7339470.1102552358061075211,-366457.6411194635438732803 7349637.6401906181126832962,-365870.0968470561201684177 7350014.7357774116098880768,-364014.7348940045922063291 7350498.0494048753753304482,-357180.9426736971363425255 7352059.6247507967054843903,-355634.9375855597318150103 7352167.5918185878545045853,-355047.3933131523081101477 7351898.3553642285987734795,-354552.5781765769352205098 7351413.4043160993605852127,-354367.0085854243952780962 7350659.2898099292069673538,-353872.3047683374024927616 7350337.0061289258301258087,-349141.2264096250291913748 7348561.4872619006782770157,-348368.2238655562978237867 7348561.4872619006782770157,-345461.4493219630676321685 7349044.9045187048614025116,-336896.0824223656672984362 7351305.4476988706737756729,-336741.4596496514277532697 7352059.6247507967054843903,-336525.0545595490257255733 7356152.7590438164770603180,-337421.7330578909022733569 7357068.5847051348537206650,-338565.8747842646553181112 7357768.6180988922715187073,-339638.6607170382048934698 7357959.4943135073408484459,-341070.5633271117694675922 7357068.5847051348537206650,-341627.1607810780988074839 7356852.5161710949614644051,-349945.1757721348549239337 7355075.5119649851694703102,-350687.3428172536659985781 7355075.5119649851694703102,-374095.3827022807672619820 7356313.9225882794708013535,-375857.9042000090121291578 7356529.9761815508827567101,-377434.9674260788015089929 7356852.5161710949614644051,-383526.5926012673298828304 7359223.5853684665635228157,-397534.2580862577306106687 7360086.4123517451807856560,-398554.7238583611906506121 7356368.6142240101471543312,-398647.4529941903892904520 7355506.0050766775384545326,-402512.7996730048907920718 7337697.0645915912464261055,-403966.0756253130966797471 7338126.5988389421254396439,-410645.2450729091069661081 7338824.9327172618359327316,-411449.1944354160805232823 7338824.9327172618359327316,-424374.6118309149169363081 7332592.8358689714223146439,-430775.4825515291304327548 7324165.3088273415341973305,-440113.9633146864944137633 7316871.5715599860996007919,-441381.7809953305986709893 7316443.2056702664121985435,-442989.7910398386302404106 7316443.2056702664121985435,-455915.2084353374084457755 7316925.9872876051813364029,-460398.9348855091957375407 7318265.8529948890209197998,-484054.2153595885611139238 7334311.5376756498590111732,-484549.0304961639340035617 7334795.4259652942419052124,-487146.5594943342730402946 7338449.9260353958234190941,-487672.2101298595080152154 7339524.6838094489648938179,-487795.8860841326531954110 7340277.7217413242906332016,-487517.5873571481206454337 7342051.3544057011604309082,-487548.5341755892150104046 7342804.6364329317584633827,-487734.1037667416967451572 7343450.1433990737423300743,-488135.9671285054064355791 7343933.2437204523012042046,-489032.7569463356630876660 7344041.0982611542567610741,-489589.3544003019924275577 7343718.8945121262222528458,-492403.2884885747916996479 7339201.3120461301878094673,-492650.6403971154359169304 7338610.7239055326208472252,-493052.6150783703196793795 7337105.0426507415249943733,-493021.6682599292253144085 7335440.2702085031196475029,-492928.9391241000266745687 7334795.4259652942419052124,-491042.7416720986366271973 7328136.1856125276535749435,-485322.1443597238394431770 7317569.5495664961636066437,-483806.8634510450647212565 7305998.1589573910459876060,-483714.1343152130139060318 7305249.9621166158467531204,-484023.3798606386990286410 7303697.7255198266357183456,-484889.2228600278613157570 7301556.6574587998911738396,-485909.6886321313213557005 7300059.6450568856671452522,-487115.6126758931786753237 7299364.7697884002700448036,-488383.3190370460506528616 7299150.2931946692988276482,-490053.2227184362709522247 7299417.7159931827336549759,-500535.7338884761556982994 7303643.4018597202375531197,-501617.9819779677200131118 7304392.9861292643472552299,-507276.7969729543547146022 7311085.0218444764614105225,-507493.2020630567567422986 7311675.0732801137492060661,-507616.8780173270497471094 7313174.3129446320235729218,-507802.4476084795896895230 7313817.3732218593358993530,-511915.1461958375293761492 7319337.8339232783764600754,-521068.0573678423534147441 7323092.6648230087012052536,-527716.2799969972111284733 7327331.1827524537220597267,-534024.4215817794902250171 7333398.1884740386158227921,-534921.1000801213085651398 7334366.0751424813643097878,-535910.6190337808802723885 7335064.0723519250750541687,-537178.4367144248681142926 7335601.1994602633640170097,-540146.8822559206746518612 7336407.0562121253460645676,-544785.2314788039075210690 7333184.3220268506556749344,-547722.9528408382320776582 7330766.6467525400221347809,-548619.6313391772564500570 7329853.9057584553956985474,-549423.5807016870239749551 7328888.1247963691130280495,-552268.4616083981236442924 7323628.9683988010510802269,-552361.1907442301744595170 7322716.8687183316797018051,-552144.6743346365401521325 7321912.6177066862583160400,-550444.0464737876318395138 7316871.5715599860996007919,-546795.2162045668810606003 7307068.6501135462895035744,-545465.6162065317621454597 7304072.6075961450114846230,-544445.1504344283603131771 7303268.7329980144277215004,-543795.7125251415418460965 7302948.2079297648742794991,-542868.0872083613649010658 7302145.9897665642201900482,-542156.8669816836481913924 7301021.8672180408611893654,-541940.4618915813043713570 7300487.1135643599554896355,-540548.9682566639967262745 7290651.8225432001054286957,-540858.2138020896818488836 7289957.7827585916966199875,-541476.5935734441736713052 7289850.6726551959291100502,-547970.3047493788180872798 7292414.2180133098736405373,-549083.4996573114767670631 7293162.7263257186859846115,-550042.0717925328062847257 7294018.4720156816765666008,-550846.0211550425738096237 7294872.7719973642379045486,-551247.9958362975157797337 7295514.3279841132462024689,-552206.5679715187288820744 7298722.8977807499468326569,-552515.8135169416200369596 7300059.6450568856671452522,-552546.7603353826561942697 7300754.5821008244529366493,-552330.2439257890218868852 7301449.3883516052737832069,-551526.2945632792543619871 7302520.6048074951395392418,-551124.3198820272227749228 7303910.9784320062026381493,-551804.4819707726128399372 7308246.4561829632148146629,-552144.6743346365401521325 7308783.0904304319992661476,-557154.0514203335624188185 7316067.9224346978589892387,-560524.5829625726910308003 7319713.4673932855948805809,-564915.4689574239309877157 7324272.8903694152832031250,-568007.8130921697011217475 7327331.1827524537220597267,-569213.7371359316166490316 7328780.4796105446293950081,-569955.9041810504859313369 7329800.7528070313856005669,-571285.5041790854884311557 7331895.0597502989694476128,-572429.5345859680091962218 7334203.8176293242722749710,-575521.7674012253992259502 7340760.6255087079480290413,-576233.0989473944064229727 7342588.9630549391731619835,-576573.1799917670432478189 7344041.0982611542567610741,-577129.7774457334307953715 7346676.9306908566504716873,-577268.8154897345229983330 7349194.1014714818447828293,-577253.4534000037238001823 7349798.8627920215949416161,-576449.5040374967502430081 7359709.0229227598756551743,-575985.6357193596195429564 7361972.6634850092232227325,-574656.0357213246170431376 7363591.2837319280952215195,-573542.8408133919583633542 7364130.3809066936373710632,-568286.0004996630595996976 7366503.6677023600786924362,-562627.2968241675989702344 7370927.3331355582922697067,-562503.6208698945119976997 7371845.0929058594629168510,-558112.7348750460660085082 7387460.6773691773414611816,-557865.3829665025696158409 7388165.0084091825410723686,-556504.7248305380344390869 7389462.0636020163074135780,-553690.7907422651769593358 7392006.5564168058335781097,-549361.6870648048352450132 7396606.9521838556975126266,-541940.4618915813043713570 7404517.6976240603253245354,-541631.2163461584132164717 7405114.6755043659359216690,-541445.7580744943115860224 7405872.7220549043267965317,-539652.1784388336818665266 7414335.5076649766415357590,-538693.7176231037592515349 7422426.8887438448145985603,-538600.8771677832119166851 7424111.9521764740347862244,-538291.6316223575267940760 7424709.0696901064366102219,-528798.5280864888336509466 7441684.9049287764355540276,-528396.5534052366856485605 7442229.6465787151828408241,-526417.5154979120707139373 7443863.5129646947607398033,-524716.8876370631624013186 7444789.7393481815233826637,-521253.6269589948933571577 7446533.6286841230466961861,-518377.7992338399053551257 7447078.5152014587074518204,-517728.4726440443191677332 7447297.1084670927375555038,-516677.0600535026169382036 7448005.1261356342583894730,-516275.0853722477331757545 7448496.3416110388934612274,-513615.8853761776117607951 7456840.9701854353770613670,-513553.9917392954230308533 7458533.3387779006734490395,-514512.5638745166943408549 7461918.0069793518632650375,-514728.9689646190381608903 7462573.4907166687771677971,-518687.0447792655904777348 7471700.5883307904005050659,-521624.6548218086827546358 7478374.5869022384285926819,-521933.9003672315157018602 7479029.8906536586582660675,-522645.1205939092906191945 7480070.2945414464920759201,-523046.9839556729421019554 7480563.3530168291181325912,-524067.4497277764021418989 7481384.3986715553328394890,-526479.4091347942594438791 7482698.7262673750519752502,-530901.2419480838580057025 7484834.6896913861855864525,-535848.8367163898656144738 7488176.6438662633299827576,-541105.5657106303842738271 7493438.3433833224698901176,-542775.3580725293140858412 7495357.3164986893534660339,-545898.5377062249463051558 7496894.0233288249000906944,-547228.0263847715687006712 7498319.6308487802743911743,-547351.8136585331521928310 7499856.9274073811247944832,-543362.7910254455637186766 7544934.3906168844550848007,-543208.2795722252922132611 7545706.2707003252580761909,-542806.3048909704666584730 7546259.7905436092987656593,-537011.4574782375711947680 7548368.4992670519277453423,-534043.0119367417646571994 7549030.5716537795960903168,-533504.8935182493878528476 7548932.1518849516287446022,-533152.4560103978728875518 7548733.3279079142957925797,-532354.6292198804439976811 7547871.8829430760815739632,-528953.1508592030731961131 7547694.3573386920616030693,-524685.9408186221262440085 7545375.7677722154185175896,-523881.9914561150944791734 7545210.4222629889845848083,-508761.0197437008027918637 7542725.6989457299932837486,-503504.2907494603423401713 7542230.2410548646003007889,-498896.9996645094943232834 7542725.6989457299932837486,-499731.7845259663299657404 7543720.0881354566663503647,-501061.4958434926229529083 7544326.5199617613106966019,-515100.1081469241180457175 7547583.6295554768294095993,-531727.9004867146722972393 7554389.6878355210646986961,-535463.4486392636317759752 7553722.5784520916640758514,-540412.9358389149419963360 7555725.6721437172964215279,-541720.3832582823233678937 7564745.5551264593377709389,-540973.3181555690243840218 7572438.5017515700310468674,-539479.0766306512523442507 7575617.7549175210297107697,-537517.9611613443121314049 7580976.2699969690293073654,-541813.7803110589738935232 7579468.4106733193621039391,-543401.4188887506024912000 7572606.0290160523727536201,-545269.1373052808921784163 7554723.5626798011362552643,-546950.1729357491713017225 7550718.4179797386750578880,-548631.2085662202443927526 7545214.9930646773427724838,-552361.1907442301744595170 7534563.4486953206360340118,-554247.3881962315645068884 7531806.7938464414328336716,-554927.7729239594191312790 7531531.4404878914356231689,-555638.8818311459617689252 7531476.8867755979299545288,-557958.0007828433299437165 7531973.2405976857990026474,-559473.2816915222210809588 7532524.1871358714997768402,-568842.7092731178272515535 7539140.4077039826661348343,-575892.9065835303626954556 7544326.5199617613106966019,-579542.7387281695846468210 7542881.0575838973745703697,-581597.2512502502650022507 7538882.0674366783350706100,-582157.6335669015534222126 7533387.0918295802548527718,-579758.1419428536901250482 7527510.9738995777443051338,-579170.5976704462664201856 7525363.3668284397572278976,-579356.1672615987481549382 7524481.7385187903419137001,-579758.1419428536901250482 7523931.1683868365362286568,-580500.3089879725594073534 7523820.9798069568350911140,-589158.4050233991583809257 7528116.1310436213389039040,-590364.4403866550419479609 7528722.7238455498591065407,-590797.2505668598460033536 7529382.5146479764953255653,-594291.5693828605581074953 7537981.6177929006516933441,-594477.1389740130398422480 7538699.5863360874354839325,-594507.9744729629019275308 7539526.8421414215117692947,-594538.9212914011441171169 7543720.0881354566663503647,-591075.5492938415845856071 7558912.3560458663851022720,-591038.4799034082097932696 7559476.5824041925370693207,-590945.7507675761589780450 7559908.8388476064428687096,-587884.4647707627154886723 7565285.9010660173371434212,-587049.5685898117953911424 7566713.4577158931642770767,-579170.5976704462664201856 7581785.9207013463601469994,-578706.7293523119296878576 7582340.4458873094990849495,-564637.2815499305725097656 7595721.0870233085006475449,-553721.7375607063295319676 7605005.9760906687006354332,-550726.7979804017813876271 7608345.4135369891300797462,-548032.0870667698327451944 7611351.3489257842302322388,-547475.4896128034451976418 7612576.5869784224778413773,-547753.7883397880941629410 7613243.4136294042691588402,-548526.9022033452056348324 7613133.3411337248980998993,-560184.5019181999377906322 7604839.3427863111719489098,-579510.6787148189032450318 7585779.9151765964925289154,-583190.5671219720970839262 7582119.5895048100501298904,-585416.8456183490343391895 7579734.1062304284423589706,-588595.6849974404321983457 7575166.4594591846689581871,-590655.0955771155422553420 7572207.9582950612530112267,-591861.0196208803681656718 7569449.3521843859925866127,-594328.5274538027588278055 7565297.4575516693294048309,-596239.6604717412265017629 7563371.5499128662049770355,-600104.8958310673478990793 7558415.6560810878872871399,-600878.0096946244593709707 7558304.7739343997091054916,-601589.1186018137959763408 7558359.5180620308965444565,-603722.7792818470625206828 7559077.7971014725044369698,-604341.1590532043483108282 7559410.4817635063081979752,-604650.4045986272394657135 7559963.3952792305499315262,-603227.9641452716896310449 7539857.0941298268735408783,-598898.8604678113479167223 7508862.2448687991127371788,-601589.1186018137959763408 7506114.7613255186006426811,-606072.8450519855832681060 7500569.7742751771584153175,-606412.9260963583365082741 7499966.7742423238232731819,-607062.3640056450385600328 7496345.6157262232154607773,-607464.2273674088064581156 7495851.5490331957116723061,-608793.9386849350994452834 7492726.1545226909220218658,-610742.0297738186782225966 7487682.9021548954769968987,-618401.7012963209999725223 7442711.2787298168987035751,-616184.3283592087682336569 7439561.0136069916188716888,-615906.0296322270296514034 7439016.6555541269481182098,-614019.8321802256396040320 7433083.3396282317116856575,-613896.1562259553465992212 7432376.4882230628281831741,-614823.7815427355235442519 7430526.9147069631144404411,-616184.3283592087682336569 7428243.0212605353444814682,-619709.4826741593424230814 7423568.6777871046215295792,-622925.3914436870254576206 7421449.5475499229505658150,-638726.6365643379976972938 7418788.0563712492585182190,-640365.4821077958913519979 7418732.9238223517313599586,-641849.7048785451333969831 7419059.6192177310585975647,-643148.3580581390997394919 7419656.1524058720096945763,-644075.9833749192766845226 7420579.6864177007228136063,-644292.4997845129109919071 7421285.4633120549842715263,-644539.9630125447874888778 7422752.1748917521908879280,-645127.5072849522111937404 7432104.4586815088987350464,-645189.2896023431094363332 7434661.4039742629975080490,-645096.4491470198845490813 7437165.3010793505236506462,-644941.9376937996130436659 7437981.7554277461022138596,-644292.4997845129109919071 7439179.5473105553537607193,-641107.5378334262641146779 7443318.8525478057563304901,-637582.4948379641864448786 7446044.1072282148525118828,-636871.1632917951792478561 7447078.5152014587074518204,-636623.8113832544768229127 7447788.0827978411689400673,-636345.6239757612347602844 7449477.0995066165924072266,-636531.0822474224260076880 7462465.3537021325901150703,-634706.6671128120506182313 7476951.2756828563287854195,-631088.8949815207161009312 7491354.2706713257357478142,-624255.1027612133184447885 7510510.2550652492791414261,-624718.8597598591586574912 7510785.0565796466544270515,-628676.8242550116265192628 7515018.5136068165302276611,-631428.9760258934693410993 7519417.6984367296099662781,-631645.3811159958131611347 7520078.0798785584047436714,-631929.9137344639748334885 7536007.3507909551262855530,-631985.5734798597404733300 7536470.6476539000868797302,-632059.7122607295168563724 7538423.1922929277643561363,-631837.0732791435439139605 7540872.3651104364544153214,-631391.7953159686876460910 7541567.9585998225957155228,-630557.0104545118520036340 7542361.9494845289736986160,-629499.3639724837848916650 7543488.2180768847465515137,-627130.8191668741637840867 7551672.0716077527031302452,-621348.3282176200300455093 7560738.1781936613842844963,-621008.1358537561027333140 7561345.9525353331118822098,-620111.4573554142843931913 7565827.8790837377309799194,-620729.9484462627442553639 7565995.0630998956039547920,-621472.0041718903230503201 7565884.0716371666640043259,-623110.9610348395071923733 7564832.2231024028733372688,-626234.0293490438489243388 7562508.4646861730143427849,-630018.8920360166812315583 7555141.8220489416271448135,-630204.4616271691629663110 7554776.6895123803988099098,-630965.1077077591326087713 7553317.9241124149411916733,-631206.2257248162059113383 7552986.2984898770228028297,-631651.6150074822362512350 7552921.0492999963462352753,-632022.6428702960256487131 7553119.1857457403093576431,-632226.6914969196077436209 7553450.8170948037877678871,-632282.3512423154897987843 7556269.9622159684076905251,-632263.8722068442730233073 7556701.0433939341455698013,-631837.0732791435439139605 7557961.5868970239534974098,-628089.2799826069967821240 7566991.0689534870907664299,-627007.1432126038707792759 7568762.5962103353813290596,-623543.7712150443112477660 7573636.8009063620120286942,-619307.5079929071944206953 7581009.0137706603854894638,-614607.2651331418892368674 7590887.6317691532894968987,-614359.9132245983928442001 7591720.5208720434457063675,-613555.9638620885089039803 7594665.1462415019050240517,-613586.9106805296614766121 7595498.2452233731746673584,-614112.5613160548964515328 7595830.9100026590749621391,-614792.9460437856614589691 7595553.2549406941980123520,-615844.2473148361314088106 7594831.3587708855047821999,-618812.6928563290275633335 7592220.7775808572769165039,-620482.5965377192478626966 7590332.4891860084608197212,-623141.7965337893692776561 7590277.5168613130226731300,-623018.1205795190762728453 7608901.8606251943856477737,-622987.2850805692141875625 7610571.4441312914714217186,-620451.5383997869212180376 7623330.6740666655823588371,-619956.8345827028388157487 7624781.3151242770254611969,-615163.9739065994508564472 7633152.0074393870308995247,-615102.0802697172621265054 7634828.4906064746901392937,-614978.4043154468527063727 7635609.2590998029336333275,-614607.2651331418892368674 7636336.4125423133373260498,-605268.8956894756993278861 7642952.9402038650587201118,-604267.0202723346883431077 7644261.3506676610559225082,-603413.5337364242877811193 7645100.8640749985352158546,-593506.0990558217745274305 7645737.5061285542324185371,-592634.1334844402736052871 7645569.9848064649850130081,-590945.7507675761589780450 7644428.8433526214212179184,-583499.7013479066081345081 7645782.8100005267187952995,-582850.3747581081697717309 7645615.4890336738899350166,-581180.5823962091235443950 7645670.6582383047789335251,-580036.4406698354287073016 7646286.8084915485233068466,-579046.9217161758570000529 7647125.5371557772159576416,-578119.2963993957964703441 7648187.3202392403036355972,-571687.4788603404304012656 7655576.1483199028298258781,-570017.6864984413841739297 7657705.2339517800137400627,-568595.3573645771248266101 7660170.3822070378810167313,-564235.1955491844564676285 7670151.6414698222652077675,-563987.8436406437540426850 7670825.3199614593759179115,-564328.0360045077977702022 7671273.7985344389453530312,-565070.2030496265506371856 7671161.2723834570497274399,-565595.7423656606115400791 7670655.6322282897308468819,-566338.0207302706548944116 7669590.7257001409307122231,-567265.6460470508318394423 7667626.3301212359219789505,-568162.3245453898562118411 7664542.7202141098678112030,-569461.0890444751130416989 7661178.6958307139575481415,-577871.9444908523000776768 7650929.2628415934741497040,-579201.5444888873025774956 7649363.0664271879941225052,-580469.3621695314068347216 7648915.6693822499364614487,-582077.2608945482643321157 7648691.4770984323695302010,-582788.4811212287750095129 7648748.2799130156636238098,-597600.2072882173815742135 7653426.8951496751978993416,-600976.8614024488488212228 7654300.2713927906006574631,-598584.7168647940270602703 7662862.7428454048931598663,-597063.4247036112938076258 7661618.9416700415313243866,-594855.5139232198707759380 7661719.6247330401092767715,-594336.0971791782649233937 7661786.6129962932318449020,-593593.9301340593956410885 7662122.9755862103775143623,-584767.5190285505959764123 7668749.5301919383928179741,-584334.5975288546178489923 7669253.4285087063908576965,-584025.3519834318431094289 7669871.2794329514726996422,-583932.6228475997922942042 7670768.1509353239089250565,-584767.5190285505959764123 7670768.1509353239089250565,-591372.4383757885079830885 7670610.9888196662068367004,-591724.9872031311970204115 7670342.1238500587642192841,-592504.2236386835575103760 7669466.7117092106491327286,-593747.2170728817582130432 7668557.6738326698541641235,-594396.6549821684602648020 7668120.8651574626564979553,-595157.3010627584299072623 7667784.2386079188436269760,-595713.8985167248174548149 7667784.2386079188436269760,-596530.3156622046371921897 7668120.8651574626564979553,-598478.4067510853055864573 7669938.3391573987901210785,-597995.9480779886944219470 7671183.4946518354117870331,-599239.0528316752752289176 7675371.7275347234681248665,-591632.2580672991462051868 7690264.7426660489290952682,-583561.5949847858864814043 7701524.7897592484951019287,-576233.0989473944064229727 7711221.1246676445007324219,-571501.9092691878322511911 7717824.3887505372986197472,-571161.8282248151954263449 7718446.1837435495108366013,-570141.3624527116771787405 7721947.3952255463227629662,-569955.9041810504859313369 7722738.7454501269385218620,-573790.1927219354547560215 7719179.8410347662866115570,-577624.5925823088036850095 7714549.7747569298371672630,-582664.8051669556880369782 7707837.9005845338106155396,-597043.6098342511104419827 7691334.1557144531980156898,-619369.4016297865891829133 7666785.1488293502479791641,-622585.1990798230981454253 7663477.0502433264628052711,-623605.6648519237060099840 7662524.1280005862936377525,-631954.6266614214982837439 7657369.8722159853205084801,-633377.0671147770481184125 7660450.5904816919937729836,-634242.7987946749199181795 7661347.9715940030291676521,-644601.7453299356857314706 7666281.4131772564724087715,-648621.6034619703423231840 7667122.5390420444309711456,-655022.4741825846722349524 7669365.7246035486459732056,-656290.2918632287764921784 7670094.6794743090867996216,-660186.4740409930236637592 7672676.3729850547388195992,-661547.1321769604692235589 7674079.4069835711270570755,-667453.0764415052253752947 7681099.8598617259413003922,-668721.0054416406201198697 7682729.6276842541992664337,-669184.8737597776344045997 7683966.1445693038403987885,-669153.8156218453077599406 7684753.5647499328479170799,-668844.6813959137070924044 7686384.3149067135527729988,-668009.7852149627869948745 7687508.6565122948959469795,-667112.9953971325885504484 7688409.2208956573158502579,-666525.4511247250484302640 7688801.6313156671822071075,-665103.1219908607890829444 7689195.4793882267549633980,-654849.3723743992159143090 7690264.7426660489290952682,-634428.3683858275180682540 7695555.5464410297572612762,-628800.6115287760039791465 7695048.4914979264140129089,-624780.6420772472629323602 7695385.5110735064372420311,-618503.4473109061364084482 7696118.5749691501259803772,-617266.5764487031847238541 7696681.4423376144841313362,-617483.0928582940250635147 7697412.8062782948836684227,-617977.9079948721919208765 7697862.8488564118742942810,-638912.0948359991889446974 7701411.8169762650504708290,-641447.6188777990173548460 7701467.5932758646085858345,-642282.6263782383175566792 7701243.2736175647005438805,-643364.8744677299400791526 7700622.6767362505197525024,-644849.0972384791821241379 7699327.6982208164408802986,-648572.1776080582058057189 7697333.9501986689865589142,-650334.6991057891864329576 7695340.7228882731869816780,-651076.7548314168816432357 7695002.8946825573220849037,-658918.7676798402098938823 7693753.0400504823774099350,-689222.2707830744329839945 7694935.6145458146929740906,-691201.3086903991643339396 7695837.0555134583264589310,-692932.9946891774889081717 7697920.2210562909021973610,-693613.2680974169634282589 7699046.2631236556917428970,-694077.1364155513001605868 7701130.3050026390701532364,-694107.9719145011622458696 7702088.0560450982302427292,-694077.1364155513001605868 7702933.1348811537027359009,-693829.7845070078037679195 7703609.5088090514764189720,-689500.6808295502560213208 7708739.2431454947218298912,-689098.5948288041399791837 7709191.5786064267158508301,-683501.6734706996940076351 7710770.0903161438181996346,-664237.2789914688328281045 7715340.3573290472850203514,-662752.9449012310942634940 7715622.5974873211234807968,-662196.3474472648231312633 7715284.6826785169541835785,-661268.7221304846461862326 7714380.9408367108553647995,-657341.7044537704205140471 7710543.8724155491217970848,-653167.1122295331442728639 7707724.8342732694000005722,-651590.0490034633548930287 7707555.9483984513208270073,-650755.2641420065192505717 7708570.5378203485161066055,-645498.5351477660005912185 7717146.7529787486419081688,-646271.5376918347319588065 7718219.7379818670451641083,-650044.0439153286861255765 7720082.5254447590559720993,-651188.1856416997034102678 7720931.0242721689864993095,-651930.2413673300761729479 7722003.1185607267543673515,-652177.7045953619526699185 7722567.8995877066627144814,-652208.6514138031052425504 7723528.5505657941102981567,-652115.8109584797639399767 7724376.0091261854395270348,-651713.8362772277323529124 7724998.3388804411515593529,-651219.0211406495654955506 7725336.6846215771511197090,-644076.0946944104507565498 7727395.3631055718287825584,-640458.2112436279421672225 7727994.7370103215798735619,-639530.5859268477652221918 7727881.3713351078331470490,-638200.8746093214722350240 7727316.1963596548885107040,-636531.0822474224260076880 7727371.9589690761640667915,-630593.9685254540527239442 7732517.9178758235648274422,-630161.0470257580745965242 7733367.8027516771107912064,-630408.5102537928614765406 7733933.4269130388274788857,-631459.9228443345054984093 7734837.8610719582065939903,-638850.3125186110846698284 7738404.0893538175150752068,-639716.0441985090728849173 7738460.1370096830651164055,-642035.2744696948211640120 7738177.0496157137677073479,-647663.0313267491292208433 7736762.1780209625139832497,-652919.7603209896478801966 7735517.0721114641055464745,-654404.0944112273864448071 7735347.7729902314022183418,-655331.7197280074469745159 7735517.0721114641055464745,-658702.2512702465755864978 7736875.6759526571258902550,-659227.9019057718105614185 7737272.2188107650727033615,-648961.6845063430955633521 7760288.7283806502819061279,-648095.9528264451073482633 7761366.3798615131527185440,-646333.3200092256302013993 7762445.6152568906545639038,-645003.8313306790078058839 7762901.1521260682493448257,-641583.7626150393625721335 7762207.8391226036474108696,-640210.8593350844457745552 7762514.3120678337290883064,-638745.1155998090980574489 7762616.3361555505543947220,-638411.1571274314774200320 7762377.7368747051805257797,-638207.1085008051013574004 7762072.0872090365737676620,-637743.2401826707646250725 7760845.3187552774325013161,-637001.0731375518953427672 7759448.0945486947894096375,-634211.9632957250578328967 7757904.6196566373109817505,-631367.0823890140745788813 7755974.9503435604274272919,-630192.1051636904012411833 7755236.3097380781546235085,-628831.5583472142461687326 7754555.3368382360786199570,-628212.9559368772897869349 7754329.2444388270378112793,-626697.8976671809796243906 7754612.9332659207284450531,-621070.0294906354974955320 7756031.1275500915944576263,-619616.7535383300855755806 7756484.6460112733766436577,-616493.5739046344533562660 7757960.8111166683956980705,-614916.6219980559544637799 7758869.7401065547019243240,-614514.5359973098384216428 7759379.6298020500689744949,-614731.0524069034727290273 7760061.0347683196887373924,-615565.9485878542764112353 7760004.8277892693877220154,-617544.9864951762137934566 7759153.3939628023654222488,-618534.5054488385794684291 7758300.6250465279445052147,-619956.8345827028388157487 7758017.0029918318614363670,-625182.7280779933789744973 7756995.8059862777590751648,-626883.4672583335777744651 7757051.9907327210530638695,-629388.1558011806337162852 7758472.0703078443184494972,-642715.5478779342956840992 7769435.4249468790367245674,-643890.5251032579690217972 7770230.0911059072241187096,-644230.7174671218963339925 7770742.3806787393987178802,-644447.1225572242401540279 7771481.0963116846978664398,-644385.2289203420514240861 7772277.6141412789002060890,-644075.9833749192766845226 7774041.0589115936309099197,-643272.0340124093927443027 7776087.9705479899421334267,-642529.9782867818139493465 7777169.2983204172924160957,-637273.2492925412952899933 7783260.7100063404068350792,-633587.3496328842593356967 7782827.5264575220644474030,-629282.9588823814410716295 7783853.6354435244575142860,-628874.7503096428699791431 7783920.8857878400012850761,-626110.3533947735559195280 7783169.2740341397002339363,-625219.7974684268701821566 7782349.6796530755236744881,-624681.7903694228734821081 7781290.1600545877590775490,-620884.4598994828993454576 7780072.1718377582728862762,-618874.5864932112162932754 7779048.2127118976786732674,-616802.7081305660540238023 7778250.9848882425576448441,-615967.9232691064244136214 7778080.5270859887823462486,-614267.1840887691359966993 7778136.8678835537284612656,-601094.4147847268031910062 7781779.6237544631585478783,-601218.0907390000065788627 7782577.2220012359321117401,-601558.2831028639338910580 7783146.5177188478410243988,-601991.0932830687379464507 7783545.4806583048775792122,-603444.4805548653239384294 7784229.0558050507679581642,-605980.0045966622419655323 7784343.2643696963787078857,-607495.2855053411331027746 7784000.6438278378918766975,-610216.4904577818233519793 7783090.3447639672085642815,-617854.2320405989885330200 7783944.2595225675031542778,-627798.7361116348765790462 7792058.6766033601015806198,-628522.2014823001809418201 7792469.8080844217911362648,-628763.4308188485447317362 7792811.1688131410628557205,-628911.8197000763611868024 7793222.3410503147169947624,-628856.2712741717696189880 7793804.1375226667150855064,-628522.2014823001809418201 7808301.6504280986264348030,-624799.2324322096537798643 7809284.9224720466881990433,-624298.2947236419422551990 7809867.9519115211442112923,-619010.6189109602710232139 7812371.1263486817479133606,-617841.7642576318467035890 7812783.3599924026057124138,-617470.7363948180573061109 7812645.2602546168491244316,-616802.7081305660540238023 7811067.2737040109932422638,-616542.9997585467062890530 7810690.5234388047829270363,-611669.6550905987387523055 7809102.0406789267435669899,-610154.5968209024285897613 7807559.3439071569591760635,-609196.0246856812154874206 7806817.3156746942549943924,-606660.2780049017164856195 7805502.4915853813290596008,-604279.3767358134500682354 7804816.9980592103675007820,-603568.1565091356169432402 7805160.5595074025914072990,-601805.6350114046363160014 7807159.3224412053823471069,-601589.1186018137959763408 7807788.4659607233479619026,-613667.2833528829505667090 7817038.3112460924312472343,-620179.4735642888117581606 7818410.7478845994919538498,-623260.5744304652325809002 7827969.2937268922105431557,-620922.8651238083839416504 7828243.9923413861542940140,-620440.5177702001528814435 7828381.5516211669892072678,-614545.4828157508745789528 7833885.1464064409956336021,-611422.3031820552423596382 7836293.2464565103873610497,-608113.6652766984188929200 7839620.5575723936781287193,-607680.7437770023243501782 7840252.4017933402210474014,-607000.4703687657602131367 7841515.0088626490905880928,-606536.6020506286295130849 7844958.0876820059493184090,-606505.7665516787674278021 7845934.3455576533451676369,-606722.1716417811112478375 7846508.4183434061706066132,-607557.0678227320313453674 7846795.3676944626495242119,-608051.8829593074042350054 7846451.5672775181010365486,-612628.3385453084483742714 7842547.4375017834827303886,-627013.2657845990033820271 7836236.4720418369397521019,-640210.8593350844457745552 7830618.5294065307825803757,-642251.5682403087848797441 7829930.7611689064651727676,-643210.2516950184945017099 7829987.4883399996906518936,-644385.2289203420514240861 7830733.4385857777670025826,-647539.3553724788362160325 7834286.7872466091066598892,-647786.7072810223326086998 7834859.9775811564177274704,-652332.3273680733982473612 7852827.9567057034000754356,-653105.3299121421296149492 7856334.5611695535480976105,-653600.0337292291224002838 7858692.8719285270199179649,-653507.3045933970715850592 7861281.0070635043084621429,-653352.6818206856260076165 7862202.4039036324247717857,-651342.6970949226524680853 7872913.1762971458956599236,-651188.1856416997034102678 7873720.4263095399364829063,-650074.9907337670447304845 7878101.7436213130131363869,-648281.4110981064150109887 7879254.8272750088945031166,-647601.1376898697344586253 7879543.2295036436989903450,-646859.0819642421556636691 7879484.4684734027832746506,-643086.5757407482014968991 7877525.2677725153043866158,-640118.0188797640148550272 7873893.0491695394739508629,-640056.1252428817097097635 7872164.7161779273301362991,-629573.6140728419413790107 7864964.1596209304407238960,-629017.0166188755538314581 7864676.3131026867777109146,-628151.1736194863915443420 7864791.7405201056972146034,-625615.6495776894735172391 7868131.6093980763107538223,-615689.6245421246858313680 7868879.8776304749771952629,-613555.9638620885089039803 7869571.1948427958413958549,-613215.8828177158720791340 7870205.5454059662297368050,-614236.2372703280998393893 7872854.6742497216910123825,-614669.1587700240779668093 7873258.1816226178780198097,-616184.3283592087682336569 7873834.5395373199135065079,-628244.0140748068224638700 7873834.5395373199135065079,-629357.0976632511010393500 7873028.7295439839363098145,-629666.3432086739921942353 7872509.6873413408175110817,-630346.6166169105563312769 7872278.5984832206740975380,-631088.8949815207161009312 7872509.6873413408175110817,-631645.3811159958131611347 7872970.2266021808609366417,-634026.3937045753700658679 7875333.7323903553187847137,-646797.1883273599669337273 7891606.5970635982230305672,-646920.8642816302599385381 7892358.6498228590935468674,-647601.1376898697344586253 7929017.7337389001622796059,-647508.5198735289741307497 7929947.4355408484116196632,-646055.1326017323881387711 7936453.7502605682238936424,-645560.3174651570152491331 7936918.2089397581294178963,-641973.3808328154264017940 7938952.1220390647649765015,-640643.6695152892498299479 7939533.3110576542094349861,-636407.4062931521330028772 7939940.4002927672117948532,-634143.8357673621503636241 7936511.0737917013466358185,-633494.5091775637120008469 7936057.7277084160596132278,-632919.3213686350500211120 7935500.0260215764865279198,-632659.7243161040823906660 7935117.0222576120868325233,-632566.8838607836514711380 7934663.7600552150979638100,-630563.1330265041906386614 7923679.3942342167720198631,-630253.8874810814158990979 7922519.5037977732717990875,-627965.6040283339098095894 7919967.7048245184123516083,-625027.9939857907593250275 7918112.3364293584600090981,-624193.2091243311297148466 7918169.7293285047635436058,-623667.5584888058947399259 7918575.8748366609215736389,-621410.2218544994248077273 7929076.6727590663358569145,-621255.4877622968051582575 7929889.9528987463563680649,-621224.6522633469430729747 7931689.0539463944733142853,-621472.0041718903230503201 7932386.1485914569348096848,-623110.9610348395071923733 7934535.3372363187372684479,-623574.7180334853474050760 7935058.6634809840470552444,-626234.0293490438489243388 7936337.2216532435268163681,-627248.2612296637380495667 7938883.4789800271391868591,-628287.3173567267367616296 7941184.4087877087295055389,-628361.4561375963967293501 7941673.2349743219092488289,-628324.2754276689374819398 7942860.1574493637308478355,-628231.5462918396806344390 7943383.2248314805328845978,-628336.6318911476992070675 7946281.0648511294275522232,-627347.2242569765076041222 7948200.7963023874908685684,-626512.3280760284978896379 7949307.2264501005411148071,-624626.1306240271078422666 7951286.8429214227944612503,-607526.1210042909951880574 7937732.3360116407275199890,-604959.6501440529245883226 7945990.3089706096798181534,-604526.7286443569464609027 7946514.4317998429760336876,-603908.2375535083701834083 7946862.8197974404320120811,-594291.5693828605581074953 7950704.7460147030651569366,-580809.5545333953341469169 7946514.4317998429760336876,-570790.8003620014060288668 7939940.4002927672117948532,-569059.1143632201710715890 7937848.8862027619034051895,-568038.6485911195632070303 7936046.6402133628726005554,-567543.8334545441903173923 7939649.8891198858618736267,-577686.3748996997019276023 7956470.2657709643244743347,-578552.2178990889806300402 7957461.0562970871105790138,-579201.5444888873025774956 7957811.6297755213454365730,-585849.7671180422184988856 7961250.4654107410460710526,-600908.8451935743214562535 7973854.5646767467260360718,-603011.5590551693458110094 7976307.5482310401275753975,-606474.8197332376148551702 7981392.7043655235320329666,-607155.0931414770893752575 7982621.2739381669089198112,-607278.7690957474987953901 7983380.7848828043788671494,-607124.1463230360532179475 7984257.8544951751828193665,-606598.4956875108182430267 7985779.1793417986482381821,-605918.2222792713437229395 7987066.1763894865289330482,-605423.5184621871449053288 7987591.6951222568750381470,-604093.8071446608519181609 7988061.0070491367951035500,-603259.0222832040162757039 7987884.2743858611211180687,-602052.9869199481327086687 7987124.0974934734404087067,-599362.7287859484786167741 7984902.1427120426669716835,-598002.1819694723235443234 7983323.1031430726870894432,-592157.9087028243811801076 7980866.1458319267258048058,-591199.3365676031680777669 7980750.6109452126547694206,-589715.1137968567200005054 7981335.0378831140697002411,-588787.3771605853689834476 7982094.4188393997028470039,-588323.6201619423227384686 7982736.8375867586582899094,-587921.5341611960902810097 7983323.1031430726870894432,-587736.0758895347826182842 7984082.8955660937353968620,-587086.7492997364606708288 7991981.7917336644604802132,-587148.5316171273589134216 7998599.8071651859208941460,-588972.8354322465602308512 7998659.5048527289181947708,-589715.1137968567200005054 7999069.8074542861431837082,-600723.2756024218397215009 8018431.1903368635103106499,-601001.6856488976627588272 8019841.6262504709884524345,-601032.5211478475248441100 8020722.7544771777465939522,-600692.3287839834811165929 8021546.0100588807836174965,-600259.4072842875029891729 8022015.9684993848204612732,-599641.0275129302171990275 8022369.3560171527788043022,-597909.4528336402727290988 8022133.8330243593081831932,-597352.8553796738851815462 8021781.7261899784207344055,-579263.3268062783172354102 8020195.1228845063596963882,-564575.3879130483837798238 8023133.1108342297375202179,-565008.3094127443619072437 8023662.8540255660191178322,-565750.4764578632311895490 8024014.8375328881666064262,-570667.1244077309966087341 8027955.9372333325445652008,-574934.2231288179755210876 8035959.6835891595110297203,-576047.5293562418082728982 8041203.3859719289466738701,-575398.0914469521958380938 8044386.2614203300327062607,-568780.8156362384324893355 8074868.7607897184789180756,-557123.2159213837003335357 8099415.4077767068520188332,-556411.9956947058672085404 8099770.9718487747013568878,-531241.4343119477853178978 8095199.9599894564598798752,-530777.5659938134485855699 8094784.3578436682000756264,-523387.1763195369276218116 8085590.8264067573472857475,-520604.1890497052227146924 8078301.7823860766366124153,-523418.1231379780219867826 8075223.3722695205360651016,-525180.6446357091190293431 8071908.7092198366299271584,-530004.4521302535431459546 8062743.2399211293086409569,-530282.8621767265722155571 8061797.1660845065489411354,-530375.5913125586230307817 8061029.4598552510142326355,-529509.7483131694607436657 8060852.4880412127822637558,-527809.0091328292619436979 8062092.4423149190843105316,-519645.6169144868035800755 8070607.0664195213466882706,-512502.5791487537208013237 8078065.9861865304410457611,-511915.1461958375293761492 8079487.6984174475073814392,-511729.5766046849894337356 8080315.7336701834574341774,-511853.2525589553406462073 8082983.0015429081395268440,-512224.2804217691300436854 8084522.7927242331206798553,-512038.8221501078805886209 8085471.9587688622996211052,-511513.0601950914133340120 8086953.7778820274397730827,-510801.9512879048706963658 8088199.5612933477386832237,-509657.8095615311176516116 8088970.0614235829561948776,-508173.5867907846113666892 8089326.8369318321347236633,-507183.9565176310716196895 8089207.9098701998591423035,-501679.8756148499087430537 8087546.5450903130695223808,-498278.3972541697439737618 8086123.2997940145432949066,-494351.3795774555183015764 8084049.1083461018279194832,-493392.6961227458668872714 8083041.4553312528878450394,-493021.6682599292253144085 8081560.6246658340096473694,-476138.2863692779210396111 8080257.0879299435764551163,-454245.4160734384204261005 8084879.3560339370742440224,-434517.1532760704285465181 8085530.6454274784773588181,-428394.4699629495735280216 8085887.2568110255524516106,-421375.2194709808682091534 8087310.4571631234139204025,-420787.6751985733862966299 8087665.4457213776186108589,-415252.6474773511872626841 8092885.2754072621464729309,-413459.1791611818480305374 8095022.3914114953950047493,-412902.5817072155186906457 8095438.0067971935495734215,-407460.2831218225182965398 8098643.8299443535506725311,-398090.8555402240599505603 8099118.6540870815515518188,-395555.3314984271419234574 8096386.8503993386402726173,-375548.6586545861791819334 8093538.9718917291611433029,-374590.0865193649078719318 8093419.9777843467891216278,-374126.3295207218616269529 8093953.0092434845864772797,-373848.0307937372708693147 8094725.5984799610450863838,-373105.8637486184597946703 8097099.4171333312988281250,-373013.0232932979706674814 8097870.8354736315086483955,-373445.9447929911548271775 8098405.8947522128000855446,-375517.7118361450848169625 8100306.1672385381534695625,-373353.2156571618979796767 8107378.2808270510286092758,-353594.0060413556639105082 8104999.4823208879679441452,-336803.3532865336164832115 8104584.8323190966621041298,-336153.9153772468562237918 8104168.7077577663585543633,-335720.9938775508198887110 8103633.2355586560443043709,-335473.6419690073234960437 8101554.1788671789690852165,-340142.9380103316507302225 8063392.6046885224059224129,-340668.5886458568857051432 8061857.1564218187704682350,-346172.7808681320748291910 8047923.3855891823768615723,-347533.3276846053777262568 8045328.6519893314689397812,-356500.6692654576618224382 8032309.9628600981086492538,-357180.9426736971363425255 8031545.2727268235757946968,-371528.8005225515225902200 8025720.1701402561739087105,-373291.3220202797092497349 8025720.1701402561739087105,-374002.6535664487164467573 8025486.0238025076687335968,-374497.3573835357092320919 8025074.2742424802854657173,-376476.3952908575301989913 8023133.1108342297375202179,-380743.6053314356831833720 8018666.8085988098755478859,-383186.5115568946348503232 8015143.2477811425924301147,-383650.2685555405332706869 8013498.2314808340743184090,-384701.5698265910032205284 8010739.5907647507265210152,-385443.7368717098142951727 8009448.5301577858626842499,-387762.9671428956207819283 8005811.6842027688398957253,-390855.0886386617203243077 8002057.5707713356241583824,-391318.9569567959988489747 8001531.0388874337077140808,-396977.7719517826335504651 7996607.6954028932377696037,-410150.5412558221141807735 7986188.9895308613777160645,-428023.4421001357259228826 7971519.4539741594344377518,-444937.8821287222090177238 7956937.6391611676663160324,-446576.7276721801026724279 7951985.7540601119399070740,-444412.1201737028895877302 7948491.8471077596768736839,-444288.4442194325383752584 7946746.1300195800140500069,-446947.7555349938920699060 7939592.3324004504829645157,-457152.1906170316506177187 7936279.6902406839653849602,-458636.4133877781569026411 7936046.6402133628726005554,-472334.8333273456664755940 7940116.0101028466597199440,-485198.4684054506942629814 7945349.3450317038223147392,-486064.2000853514764457941 7946397.7474213298410177231,-487362.9645844366750679910 7947096.2047789441421627998,-488939.9164910123799927533 7947444.6196987228468060493,-488816.2405367420287802815 7945816.0284071099013090134,-484703.6532688753213733435 7938487.3286702623590826988,-483745.0811336541082710028 7937615.7876238562166690826,-478395.6230035843909718096 7935116.1855694446712732315,-476818.5597775146015919745 7934651.8379749609157443047,-461945.0512931350385770202 7930701.8574735634028911591,-450089.5255236518569290638 7928426.0700377598404884338,-437083.6241363113513216376 7926986.5002805441617965698,-431332.0800054954597726464 7928612.6971967080608010292,-428641.9331909842439927161 7929599.8290184363722801208,-427652.4142373219365254045 7930585.4177934592589735985,-426879.4116932532051578164 7931805.5106822047382593155,-425982.6218754229485057294 7934884.8448570137843489647,-425271.4016487451735883951 7936163.1643258137628436089,-424281.8826950828079134226 7937208.6147723263129591942,-423261.4169229822000488639 7937963.7641881788149476051,-421715.3005153535632416606 7938196.8735358677804470062,-420231.0777446070569567382 7937673.1199985975399613380,-420014.6726545047131367028 7936104.1698461314663290977,-420540.3232900327420793474 7934535.3372363187372684479,-424776.6978316610329784453 7926986.5002805441617965698,-425580.6471941680065356195 7925768.6496634082868695259,-430311.7255528832902200520 7918865.5747225023806095123,-439062.6620436331722885370 7908146.5803291602060198784,-439928.5050430223345756531 7907162.4612843301147222519,-441783.7556765854824334383 7905079.8117816951125860214,-442804.2214486860902979970 7904210.4574564984068274498,-444041.0923108891001902521 7903574.7026513786986470222,-445401.7504468564875423908 7903112.2934198155999183655,-446613.7970626135356724262 7904153.1706698574125766754,-447615.6724797518108971417 7904430.6510812835767865181,-447819.8324258666834793985 7905264.1952711287885904312,-447560.0127343560452573001 7906271.4045023387297987938,-447077.6653807478141970932 7906966.1530205719172954559,-447102.3783077053376473486 7909014.9291894510388374329,-447442.4593520780326798558 7910404.9956699227914214134,-448741.3351706544635817409 7911100.1249789213761687279,-454771.1780284548876807094 7909999.4984067715704441071,-456162.5603438781108707190 7909536.6952618248760700226,-478302.7825482639018446207 7899235.8357792533934116364,-491630.1746250148280523717 7884100.5738423708826303482,-493794.7821234891889616847 7878562.6237914720550179482,-492836.0986687795375473797 7877639.2308822218328714371,-491444.6050338622881099582 7878101.7436213130131363869,-487393.9114028777694329619 7881620.2998192440718412399,-483528.6760435517062433064 7885370.3156496034935116768,-482044.3419533139676786959 7887680.5423115734010934830,-480065.3040459921467117965 7889585.4105068510398268700,-474159.2484619561000727117 7895247.1371755367144942284,-473046.0535540234413929284 7896114.0029696635901927948,-470634.0941470055840909481 7897269.8401443120092153549,-466583.2891965269809588790 7898600.7080383989959955215,-454270.1290003930917009711 7897339.7704329593107104301,-450472.9098499444080516696 7892647.3448372408747673035,-457677.7299330656533129513 7883407.9262647209689021111,-465253.6891984947724267840 7875966.9064698787406086922,-468747.8966950041940435767 7870493.6025127945467829704,-470757.7701012758770957589 7866230.6901292670518159866,-472056.5346003610757179558 7863008.5110506629571318626,-471438.1548290037899278104 7861627.1391602978110313416,-470355.7954200209933333099 7860764.2205183506011962891,-468995.2486035448382608593 7860130.6614692062139511108,-467170.8334689344046637416 7860073.7079596631228923798,-465222.7423800536780618131 7860821.1792277200147509575,-462965.5170652384986169636 7862317.7935662930831313133,-449885.3655775369843468070 7874238.0992266517132520676,-449545.2845331642893142998 7874872.8415861083194613457,-417908.6192081868648529053 7888958.7861862424761056900,-405141.1641701250919140875 7892877.6015834482386708260,-405419.4628971096826717257 7892242.8005322674289345741,-405481.2452144978451542556 7891317.7338765235617756844,-405048.3237148046609945595 7890856.0748362485319375992,-403471.2604887348716147244 7890510.2649546498432755470,-400533.7617656830116175115 7891260.5448511671274900436,-399946.2174932755879126489 7891490.7593107977882027626,-392092.0708203559624962509 7896923.7363782888278365135,-390329.4380031364853493869 7899062.8409217316657304764,-389989.3569587609381414950 7899583.7110878406092524529,-389278.1367320832214318216 7900972.0410501854494214058,-388906.9975497781415469944 7902475.1732425810769200325,-389030.6735040513449348509 7903226.8516251333057880402,-389308.9722310330835171044 7903921.3198626032099127769,-389463.5950037444708868861 7904731.8913677185773849487,-389339.9190494741778820753 7905542.5499553047120571136,-388288.6177784237079322338 7906526.4577142242342233658,-371776.2637505833990871906 7909420.5819912413135170937,-366179.2310729877208359540 7909942.1676476104184985161,-365468.1221658011781983078 7909593.8144744606688618660,-365127.9298019372508861125 7908957.6059122346341609955,-364695.0083022412727586925 7907683.8908374262973666191,-363025.2159403422265313566 7905542.5499553047120571136,-361355.4235784432385116816 7904210.4574564984068274498,-358819.7882171550882048905 7902823.1978990947827696800,-347687.8391378283849917352 7898657.7445303853601217270,-342956.7607791131595149636 7897385.7666010018438100815,-338627.7684211440500803292 7896691.8994352342560887337,-337854.6545575840864330530 7896807.8170167505741119385,-336463.1609226696891710162 7897328.7397193964570760727,-332783.4951544989598914981 7899178.7949187774211168289,-330340.5889290400082245469 7900451.0750676412135362625,-327557.6016592083615250885 7902359.1685902904719114304,-325454.8877976133371703327 7903921.3198626032099127769,-322610.1182103907340206206 7906005.1081433007493615150,-317569.7943062526173889637 7905772.9920665649697184563,-310643.2729501131107099354 7905079.8117816951125860214,-309715.5363138446118682623 7904963.7670821649953722954,-294532.7822840393055230379 7902069.8936612438410520554,-286091.0913387122564017773 7900335.1015232149511575699,-279411.9218911162461154163 7898657.7445303853601217270,-272114.3726721629500389099 7897963.7604385204613208771,-267197.7247222980367951095 7897558.9311591358855366707,-266300.9349044677801430225 7897558.9311591358855366707,-243356.7633375749283004552 7898022.6654283953830599785,-241872.5405668284511193633 7898311.5771233001723885536,-241254.0494759799330495298 7898716.6549362447112798691,-238254.6571160458843223751 7902591.1796781029552221298,-237265.1381623835477512330 7903574.7026513786986470222,-235997.3204817394434940070 7904037.3485315758734941483,-231049.8370329246390610933 7904442.5254707075655460358,-225112.8346304446749854833 7903285.5894157476723194122,-214815.6704125776886940002 7899930.1450427724048495293,-213547.9640514248167164624 7898427.5195798724889755249,-207054.2528754901140928268 7888199.1726722167804837227,-202817.8783338590001221746 7879311.9254743885248899460,-198303.3163847402029205114 7864159.2944969339296221733,-197499.3670222304062917829 7861108.6719145486131310463,-197406.6378863983263727278 7854322.9903283994644880295,-206590.4958768442447762936 7842088.7466019783169031143,-218062.5260005436139181256 7828384.0264736581593751907,-219515.9132723430811893195 7825863.6018082415685057640,-220165.2398621386382728815 7824547.3261055797338485718,-228668.8244443450530525297 7804931.5168131841346621513,-229503.7206252959731500596 7801962.8116733245551586151,-229967.5889434302516747266 7799165.9901413545012474060,-230987.9433960424503311515 7791122.9890504982322454453,-230833.3206233310338575393 7789584.1477357083931565285,-230122.2117161444912198931 7787646.4188266834244132042,-233028.8749402464891318232 7774495.6529850922524929047,-241223.2139770300709642470 7760230.8845638977363705635,-243820.6316557092068251222 7754952.5976637555286288261,-244500.9050639487104490399 7752400.4817456733435392380,-244624.5810182190325576812 7748997.4949481822550296783,-244531.8518823869817424566 7748317.0801725182682275772,-243758.8493383182503748685 7746333.7345695439726114273,-243264.0342017428774852306 7744237.2962538497522473335,-243387.7101560160517692566 7743387.8288928037509322166,-244253.5531554052140563726 7740215.7584408791735768318,-247098.3227426278463099152 7733140.9131102850660681725,-257766.5148233086511027068 7719122.5119865983724594116,-258725.0869585298933088779 7718106.5176235372200608253,-261384.3982740912178996950 7716186.9059361387044191360,-266053.5829959242837503552 7713590.4577351678162813187,-268867.5170841970248147845 7710939.0473806681111454964,-275855.9320772158680483699 7702143.8372883778065443039,-274155.1928968757856637239 7698314.5398941654711961746,-272519.4642991611035540700 7698975.0949414372444152832,-272516.3473534178920090199 7697357.2623224668204784393,-272609.0764892499428242445 7696455.6417993549257516861,-277030.9093025395413860679 7681663.0372278438881039619,-281329.1774810499628074467 7674472.6987986862659454346,-282225.8559793890453875065 7673462.6303668050095438957,-284019.3242955583846196532 7671498.8558065248653292656,-293976.1848300729761831462 7663141.4353222837671637535,-302881.8554130255361087620 7656360.6491416683420538902,-322300.8726649678428657353 7651321.1642825948074460030,-329351.0699753776425495744 7649754.8876640545204281807,-338009.2773302983259782195 7649418.2626522267237305641,-338937.0139665668830275536 7649530.4693442350253462791,-339740.9633290767087601125 7649530.4693442350253462791,-341781.7835537895443849266 7648915.6693822499364614487,-342956.7607791131595149636 7648244.1193120013922452927,-364911.5247118348488584161 7629915.0750255472958087921,-363427.1906215971685014665 7627626.5736464858055114746,-362066.6438051210134290159 7628017.4850903516635298729,-355449.3679944071918725967 7630194.1779232611879706383,-354861.8237219997681677341 7630473.0900402618572115898,-333463.7685627356404438615 7641309.2897129449993371964,-326413.4599328346084803343 7647068.7463837368413805962,-324960.1839805291965603828 7648411.6991747170686721802,-324372.6397081217728555202 7648691.4770984323695302010,-322919.3637558164191432297 7648971.0638155350461602211,-321094.9486212031333707273 7648803.4717040760442614555,-319486.9385766951018013060 7648411.6991747170686721802,-313395.3134015065152198076 7646566.3073770552873611450,-312684.0931748287985101342 7646286.8084915485233068466,-312158.4425393007113598287 7645056.1682350542396306992,-311601.8450853343820199370 7642204.4286880698055028915,-311478.1691310640308074653 7641421.3775979960337281227,-311663.7387222165707498789 7640638.4065871639177203178,-312034.7665850303601473570 7639912.2529215859249234200,-312745.9868117081350646913 7637788.1106125405058264732,-313395.3134015065152198076 7633152.0074393870308995247,-313178.9083114041713997722 7630976.0818669088184833527,-312158.4425393007113598287 7627793.7029229244217276573,-311756.4678580457693897188 7627292.5268949223682284355,-308509.6122700798441655934 7624893.1614138623699545860,-307891.1211792313260957599 7624614.2515343185514211655,-303995.0503209582529962063 7623330.6740666655823588371,-303160.0428205188945867121 7623163.6420952957123517990,-301026.4934599740663543344 7623330.6740666655823588371,-297810.5846904463833197951 7623051.8210429241880774498,-297099.3644637686084024608 7622829.7898213807493448257,-294285.4303754958673380315 7621714.9129134071990847588,-293759.7797399706323631108 7621379.5180489635095000267,-293172.2354675631504505873 7620933.9533155616372823715,-287853.7241559345857240260 7615137.3490979662165045738,-287451.6381551884114742279 7614636.9998754765838384628,-286956.9343381042708642781 7613355.0917105199769139290,-287513.5317920706002041698 7611963.1416269848123192787,-287946.4532917637843638659 7611461.5962992021813988686,-297594.1796003439812920988 7601724.4468441186472773552,-298119.8302358720684424043 7601334.8734614141285419464,-298676.4276898383977822959 7601001.9700494939461350441,-310364.9742231313721276820 7595830.9100026590749621391,-313920.9640370317501947284 7595165.5948593234643340111,-315528.9740815397817641497 7595054.1812129532918334007,-316920.4677164570312015712 7595609.6653147395700216293,-318126.3917602189467288554 7596388.0507764695212244987,-320043.5360306614311411977 7598054.9133349964395165443,-320631.0803030688548460603 7598444.3202559091150760651,-321465.9764840169227682054 7598722.0799155151471495628,-324681.8852535446058027446 7599332.8663364639505743980,-326351.6776154435938224196 7599389.3044943222776055336,-329165.5003842251608148217 7598777.1127414396032691002,-331299.1610642612795345485 7597276.3588367188349366188,-349048.4972737929783761501 7581065.3174151051789522171,-349821.4998178616515360773 7579956.4910924797877669334,-350780.0719530829228460789 7577017.4980224715545773506,-350965.6415442354627884924 7576297.5412886310368776321,-351120.2643169468501582742 7575464.7264766618609428406,-371961.7220222446485422552 7563227.1312596565112471581,-372549.2662946521304547787 7562895.8749925643205642700,-377651.3725161811453290284 7560627.2625664165243506432,-378393.5395613000146113336 7560516.3485384276136755943,-379537.6812876737676560879 7560903.8576568057760596275,-383062.8356026242836378515 7562231.8118909848853945732,-389339.9190494741778820753 7565274.5438470402732491493,-397565.2049046988249756396 7569094.1052962355315685272,-398802.0757669018348678946 7569371.0050793765112757683,-414077.5589325363398529589 7569704.1353127425536513329,-416025.7613409111509099603 7569482.0468867029994726181,-414881.5082950461073778570 7564555.4867092901840806007,-414696.0500233848579227924 7563891.2803057739511132240,-414263.1285236888215877116 7563503.8198585631325840950,-408140.5565300591406412423 7559852.4908225871622562408,-407645.8527129750582389534 7559576.1326336478814482689,-405883.2198957527289167047 7559410.4817635063081979752,-384577.8938723206520080566 7556811.9024301227182149887,-362314.1070331557421013713 7552776.8266814928501844406,-343760.8214611142175272107 7548081.0225019408389925957,-341472.5380083666532300413 7547363.7690549744293093681,-339864.6392833498539403081 7547196.9893733970820903778,-335968.4571055855485610664 7548357.1669921502470970154,-326722.7054782574414275587 7552335.2238851115107536316,-325547.7282529338262975216 7552942.3347980938851833344,-323970.6650268668890930712 7554047.2722464054822921753,-323537.7435271708527579904 7554434.4556715320795774460,-322331.8194834089372307062 7556148.3642748873680830002,-319023.1815780492033809423 7562673.9831030741333961487,-319301.3689855425618588924 7564057.0277022607624530792,-318961.2879411698668263853 7564777.4328891141340136528,-315467.0804446604452095926 7568596.7473595784977078438,-313951.9108554728445596993 7569758.7612766847014427185,-311045.2476313680526800454 7570423.4747220156714320183,-309715.5363138446118682623 7570645.5903452932834625244,-295800.5999646834097802639 7570312.4193167928606271744,-292893.9367405814118683338 7569316.1825163029134273529,-289492.5696993924793787301 7567045.6756457220762968063,-278546.1902112183161079884 7558968.4980991361662745476,-264414.7374524663900956511 7549848.3991315234452486038,-251612.9960112378757912666 7542230.2410548646003007889,-237141.4622081132256425917 7535720.3350925231352448463,-231513.5940315676853060722 7532027.7978241583332419395,-230740.5914874989539384842 7529327.9761461354792118073,-230245.8876704148133285344 7528116.1310436213389039040,-229441.8269884137844201177 7526629.0999384159222245216,-225050.9409935653093270957 7519913.4744136407971382141,-224154.1511757350235711783 7517713.3279058709740638733,-222731.8220418679120484740 7514797.9966831970959901810,-220412.5917706821055617183 7510125.2724285703152418137,-219701.3715440043597482145 7509136.7898908061906695366,-206095.6807402688718866557 7490478.0977485328912734985,-202570.5264253183559048921 7485929.9104192750528454781,-202106.7694266724865883589 7485492.1190162533894181252,-201302.7087446714285761118 7485272.4438472837209701538,-200560.6530190438206773251 7485382.2806511241942644119,-199787.5391554866801016033 7486477.5790026420727372169,-194469.0278438552340958267 7484121.5190278962254524231,-188129.9394406319479458034 7480289.8218887671828269958,-182347.5598108662525191903 7475857.3263881225138902664,-181883.6914927319739945233 7475418.5295847235247492790,-176039.4182260840607341379 7456677.5100805619731545448,-175946.6890902519808150828 7455914.6764129670336842537,-175142.7397277450072579086 7443754.2639988819137215614,-175390.0916362856514751911 7442011.1962630506604909897,-175853.8486349315207917243 7440540.6407940434291958809,-176472.3397257800679653883 7439233.4532788544893264771,-177338.1827251692302525043 7438253.9913258319720625877,-178049.4029518470051698387 7437110.0377145763486623764,-177956.5624965265451464802 7436349.1286853188648819923,-174307.8435467940871603787 7417809.6096018599346280098,-169267.5196426559996325523 7393792.0168038709089159966,-168649.0285518103046342731 7390977.9059561742469668388,-165309.4438280122994910926 7379298.8314456325024366379,-164845.6868293664301745594 7377946.8761517070233821869,-157269.7275639401341322809 7361758.0114582711830735207,-153775.5200674307125154883 7357284.6592334136366844177,-151951.1049328174558468163 7347860.9245307389646768570,-149786.6087538343272171915 7336944.2758245058357715607,-145210.1531678305182140321 7317622.4263066947460174561,-144437.0393042733776383102 7316122.3325622798874974251,-129718.1535926052310969681 7294178.3575482182204723358,-118153.2830135825643083081 7287927.5555360559374094009,-116205.1919246989855309948 7287126.6845920952036976814,-97497.2835799460444832221 7278907.7899014819413423538,-62864.5654797602182952687 7261591.0334556419402360916,-58040.7579852129128994420 7255897.8630520133301615715,-57391.4313954173485399224 7254834.3475495018064975739,-50928.6670379237402812578 7241869.5298562953248620033,-48547.6544493441469967365 7236774.8955561565235257149,-46939.7557243273477070034 7233327.9344458756968379021,-43785.6292721906356746331 7221986.6204860499128699303,-43878.4697275110956979915 7221298.6330675203353166580,-43723.8469547996719484217 7220663.1227116677910089493,-42517.8115915465459693223 7218704.4958674106746912003,-29221.3663332339092448819 7203262.2267202856019139290,-22322.7861692835504072718 7198941.0594396125525236130,-16883.4932101425183645915 7196979.0933433379977941513,-13018.1465313280514237704 7195236.4839738700538873672,-9183.8579904459147655871 7192704.6780755193904042244,-8719.9896723088095313869 7192281.5234471354633569717,-8348.9618094949983060360 7191384.5792159922420978546,-9060.1820361727550334763 7190277.9254292584955692291,-12523.4427142439144517994 7188800.4774872828274965286,-15151.8072113641555915819 7188273.3185697188600897789,-15739.3514837687544059008 7188009.6574359694495797157,-17934.7944811958222999237 7186849.7671871241182088852,-19357.2349345513357548043 7185637.8634417597204446793,-22573.1437040790115133859 7180526.0465760026127099991,-23222.4702938745722349267 7179315.1152911577373743057,-23748.1209294026375573594 7176944.6104523604735732079,-24026.4196563843906915281 7175207.9441003389656543732,-24057.3664748254886944778 7174418.4873064290732145309,-23933.6905205551593098789 7172997.4369678078219294548,-23624.4449751294814632274 7171734.2435828270390629768,-19047.9893891284882556647 7155333.7633468983694911003,-18615.0678894324810244143 7154126.8833253327757120132,-14193.2350761429133854108 7144419.5832378705963492393,-12554.3895326850124547491 7141903.8511276524513959885,-11070.0554424473011749797 7139859.8072505984455347061,-5998.8960393593388289446 7132945.1507118921726942062,-1453.3872717966128220723 7126454.6479702983051538467,6802.8454018663251190446 7114535.5168764470145106316,7143.0377657331036971300 7114013.2940712310373783112,14069.5591218697554722894 7103259.0684288404881954193,15708.4046653304885694524 7099869.9713335065171122551,16636.0299821106345916633 7097523.1800195593386888504,17099.8983002449058403727 7095647.7857606485486030579,17161.7919371271018462721 7094917.8248328994959592819,16914.3287090923840878531 7093250.6669076913967728615,16357.7312551260511099827 7091948.5844065481796860695,15986.7033923122398846317 7091374.9708274621516466141,15646.6223479395266622305 7090854.2729036491364240646,13141.9338050896112690680 7088093.8515161555260419846,12554.3895326850124547491 7087833.5123058557510375977,12678.0654869553382013692 7088511.4617120213806629181,13296.4452583126330864616 7089708.3704364756122231483,13729.3667580058081512107 7090177.6229659169912338257,15120.8603929230575886322 7092416.4693086668848991394,15337.3768025166773441015 7093146.1998539250344038010,15461.0527567870049097110 7093980.4742726171389222145,15399.1591199048089038115 7094708.8481437452137470245,14533.4274400068607064895 7096324.9029302448034286499,12152.4148514301032264484 7098357.9154378520324826241,9926.0250355647694959771 7099765.4169691428542137146,7514.0656285469149224809 7101017.1566209914162755013,4916.6479498677708761534 7102111.5584062384441494942,3308.6379053569012285152 7102269.0941189657896757126,1886.1974520013864093926 7102164.5080816512927412987,1236.8708622029926118557 7102008.4765428882092237473,0.0000000000000000000 7101431.1302505927160382271,-3865.2353593232346611330 7099556.3123803008347749710,-5751.5441308158542597084 7099088.1933918865397572517,-7946.9871282400890777353 7098983.6493452610448002815,-8781.8833091910055372864 7099139.6213106811046600342,-9524.0503543098602676764 7099348.7149004405364394188,-11781.2756691250579024199 7100703.4522398170083761215,-14440.5869846863988641417 7102529.9080452322959899902,-15801.1338011597163131228 7103780.5822782544419169426,-19109.8830260078502760734 7108896.1305201593786478043,-25758.1056551655856310390 7117618.0292343124747276306,-27767.9790614372977870516 7119133.9567664228379726410,-30334.5612411665752006229 7120230.8664008406922221184,-32715.5738297433344996534 7120440.5178420627489686012,-39772.0050316395572735928 7119290.5144223310053348541,-42406.4921007521479623392 7118537.4854326220229268074,-47044.8413236353298998438 7116844.4668464977294206619,-61132.9908004702592734247 7114691.9835692644119262695,-62431.6439800642110640183 7115265.9720149785280227661,-63359.3806163355911849067 7116102.5801986549049615860,-64317.9527515568333910778 7117618.0292343124747276306,-65245.5780683369812322780 7118558.3705776063725352287,-67441.0210657612187787890 7119133.9567664228379726410,-68987.1374733898846898228 7119185.7032449971884489059,-70378.6311083042965037748 7119029.1476632580161094666,-72852.3728327131248079240 7118297.0280052861198782921,-75047.9271496285946341231 7117147.3361070714890956879,-76068.2816022407932905480 7116520.1650381507351994514,-80026.3574168844934320077 7113489.7894850960001349449,-79500.7067813592584570870 7112237.3926360346376895905,-77150.6410112235898850486 7110930.8694202639162540436,-57855.1883940603875089437 7110774.4770652083680033684,-56203.9863871237321291119 7110994.0287472624331712723,-50971.9703198407660238445 7112811.2030738070607185364,-43439.3143363315102760680 7115037.0863102758303284645,-34014.3383288285258458927 7116102.5801986549049615860,-33148.4953294393417309038 7115946.0856116190552711487,-32035.3004215066757751629 7115162.7187287099659442902,-29437.7714233362967206631 7111818.5297639798372983932,-26891.2267519497254397720 7107538.4878966500982642174,-25665.3765193335239018779 7104772.2481803689152002335,-24799.5335199443434248678 7103103.0153247127309441566,-23067.8475211631484853569 7100547.4494800595566630363,-13049.0933497691494267201 7091374.9708274621516466141,-11224.6782151587249245495 7089708.3704364756122231483,2999.3923599340528198809 7077844.5566999809816479683,9493.1035358687622647267 7073477.1131620751693844795,13667.5844406176784104900 7071294.8535670163109898567,14316.9110304132391320309 7071190.6753119593486189842,15584.7287110573306563310 7071503.2141794422641396523,16357.7312551260511099827 7071294.8535670163109898567,18769.6906621439047739841 7068542.7249169526621699333,24150.0956106547164381482 7060495.8343626335263252258,26221.9739732998568797484 7057227.4555320134386420250,27551.5739713349103112705 7053702.6916324980556964874,28386.4701522858267708216 7051318.2075183065608143806,30056.2625141848257044330 7047328.0035564331337809563,37724.9509154403349384665 7026842.4494658457115292549,37879.5736881545890355483 7026223.6754355067387223244,39394.7432773421678575687 7017703.5450261589139699936,39673.0420043239137157798 7015691.0640749577432870865,39827.6647770353374653496 7012802.3316875854507088661,39703.9888227650153567083 7010533.2681854963302612305,39425.6900957804318750277 7008832.6830489663407206535,38034.1964608660127851181 7000744.1420908663421869278,37477.5990068996834452264 6999455.6372812390327453613,36642.7028259487633476965 6998529.4734485764056444168,36086.1053719824340078048 6998272.2350947232916951180,30798.4295593036804348230 6995389.6200752491131424904,22696.8196583493372600060 6988188.6528307721018791199,19295.3412976691397489049 6984693.0072716111317276955,3586.9366323414842554484 6967700.7002976760268211365,204.8278630594293474587 6961354.9044529246166348457,4.1188211586421843435 6960748.3811523709446191788,730.4784985846645213314 6960382.4234024332836270332,3123.1796336956126651785 6960984.8607404958456754684,6431.8175390525138936937 6962521.7795065864920616150,7668.6884012583386720507 6962830.0843350710347294807,8379.9086279360963089857 6962880.8238509008660912514,9616.7794901390898303362 6962624.5464622424915432930,13605.6908037354824045906 6960369.8807924287393689156,16419.6248920082471158821 6958730.6571325277909636497,17501.8729814998150686733 6958013.1413981756195425987,18398.6627993300935486332 6957194.2821242287755012512,19109.8830260078502760734 6956221.0161899179220199585,19604.5868430948212335352 6955145.0120533993467688560,20810.5108868567149329465 6953047.0633922005072236061,24242.9360659780104469974 6947366.2139230202883481979,26036.4043821473351272289 6945729.6511862622573971748,26562.0550176725701021496 6945371.3754870649427175522,27149.5992900800010829698 6945218.3859691601246595383,40446.0445483926378074102 6942457.3447160013020038605,42177.7305471738291089423 6942662.3653290001675486565,47589.0823141257424140349 6950231.5565550718456506729,47929.2746779896842781454 6950795.0945429606363177299,48207.5734049714374123141 6951409.3390278974547982216,48640.3835851762123638764 6952892.4528996841982007027,48795.0063578876361134462 6954479.9785400191321969032,49351.6038118539654533379 6957809.0179931297898292542,49568.1202214475852088071 6958577.2276446707546710968,54391.9277159920675330795 6970264.7331179445609450340,55010.4188068405928788707 6971443.9915941450744867325,60205.2541641988791525364 6976475.1092778826132416725,60761.8516181652157683857 6976731.6462687784805893898,61473.0718448429688578472 6976885.4245519321411848068,74274.8132860686309868470 6978579.2146231736987829208,97713.7999895368266152218 6977039.0209598978981375694,98270.3974435031559551135 6976936.0685286289080977440,98981.6176701837539440021 6976576.5771750826388597488,100032.9189412342238938436 6975190.5151413669809699059,101022.4378948965604649857 6974317.9738076440989971161,101486.3062130308389896527 6974164.2449267618358135223,104887.6732542198005830869 6973907.7903467118740081787,107948.9592510360380401835 6973754.0693561760708689690,110731.9465208677138434723 6973959.8935649544000625610,111968.8173830707091838121 6974267.1616508271545171738,131789.9206357591319829226 6971702.0295296050608158112,142736.3001239332952536643 6969598.2566089574247598648,145364.6646210535254795104 6968520.4514044271782040596,150559.6112979030585847795 6966316.1764631457626819611,152816.9479322094703093171 6964982.6451792847365140915,155105.1200654629501514137 6963342.4759793952107429504,159434.2237429232918657362 6959857.6795340720564126968,163485.0286933990428224206 6956118.3314620824530720711,167381.2108711662003770471 6952995.0962426476180553436,168896.3804603509488515556 6951869.0399288795888423920,170411.5500495385203976184 6950743.1420124322175979614,183151.5091733760491479188 6940771.3688324391841888428,184450.1623529700154904276 6939492.4941559778526425362,186491.0938971740542910993 6936530.2116574672982096672,187727.9647593770641833544 6934435.6625089757144451141,189521.4330755491973832250 6930605.8057489953935146332,190047.0837110744323581457 6928819.8021876635029911995,191593.2001187031273730099 6923412.4016031753271818161,194128.8354799913067836314 6914339.2039271770045161247,194407.1342069730453658849 6913066.0045715495944023132,194437.9697059229074511677 6912402.9866241440176963806,194695.7856465998629573733 6896365.8756385929882526398,194747.2152513485925737768 6882968.0210112361237406731,192613.6658908037352375686 6874853.6870781192556023598,192922.8001167353359051049 6871508.5254627736285328865,192211.5798900575900916010 6869430.8607410807162523270,187656.9429242505284491926 6859341.4470536075532436371,181450.7699930359667632729 6835510.8029802357777953148,181203.4180844924703706056 6833190.3922358248382806778,180894.1725390696374233812 6831576.9023750508204102516,176843.3675885938573628664 6815608.4350056154653429985,176565.0688616092957090586 6815005.9218393582850694656,175853.8486349315207917243 6813948.6433141799643635750,154765.0390210902260150760 6794701.8020724281668663025,148487.8442547491285949945 6787326.9754436798393726349,147900.2999823417048901320 6787176.7781377770006656647,146694.3759385798184666783 6789934.7506418079137802124,142581.6773512218496762216 6797011.1910111699253320694,141839.6216255942417774349 6798015.1014129379764199257,140788.2090350497164763510 6798768.2063146326690912247,130274.7510465715749887750 6804797.7405615402385592461,129656.2599557230423670262 6804746.7220581844449043274,129161.5561386389017570764 6804345.0982658406719565392,128975.9865474863763665780 6803692.2307787518948316574,134511.0142687086190562695 6791239.5852784086018800735,142272.4318057961936574429 6778656.0165675682947039604,142921.8697150858060922474 6778606.4248035736382007599,143478.4671690521354321390 6778355.9459475129842758179,144004.1178045773704070598 6778005.2164214923977851868,144189.6873957299103494734 6776603.3514611618593335152,143200.1684420675737783313 6773949.2166879503056406975,142519.8950338308932259679 6772997.6602753000333905220,140942.8318077611329499632 6771096.5037884619086980820,136211.7534490487014409155 6765642.7242298284545540810,134511.0142687086190562695 6764042.4606979787349700928,133552.4421334873768500984 6763342.0733725214377045631,131511.6219087745703291148 6762192.8922931132838129997,126038.3765049404610181227 6759893.2189029902219772339,123750.0930521957634482533 6759244.1019327081739902496,121152.6753735166130354628 6758744.5259030275046825409,116885.4653329384746029973 6758744.5259030275046825409,115463.0248795801308006048 6759143.8964259419590234756,115122.9438352074066642672 6759643.4970304546877741814,111041.1920662905613426119 6765992.9195979200303554535,109835.2680225258372956887 6768744.9549126578494906425,108969.4250231366459047422 6768443.9900079276412725449,104269.2934828625002410263 6765443.4166989130899310112,103310.7213476412580348551 6764742.9084688900038599968,95969.7575272797112120315 6759293.3955801734700798988,80613.9016892919171368703 6750852.5330523196607828140,78387.5118734265852253884 6750054.4468685286119580269,77892.6967368512123357505 6749555.4357385458424687386,77954.5903737334156176075 6748956.3753528706729412079,84448.1902301768859615549 6744514.7519229725003242493,85068.5737523678835714236 6744607.9531195899471640587,96074.8431265876861289144 6748157.2177806487306952477,97157.2025355704972753301 6748706.9895085664466023445,97961.1518980803084559739 6749504.7636540355160832405,100125.6480770662747090682 6752040.7322811791673302650,100366.8774136145802913234 6752250.4959800848737359047,100700.8358859949512407184 6752430.7856468530371785164,102290.2555755406501702964 6753349.7319445507600903511,103094.2049380504759028554 6753299.0361882746219635010,103712.6960288961709011346 6752999.9017133433371782303,104609.3745272380474489182 6752251.2149737980216741562,105413.3238897450355580077 6750653.5882240496575832367,106310.1137075753067620099 6730660.1351233590394258499,106186.4377533049846533686 6729912.0686262054368853569,105815.2985699999990174547 6729265.1621820526197552681,101300.7366218783135991544 6724785.1914182389155030251,97435.5012625550734810531 6721153.1737744640558958054,91374.7115863163780886680 6716579.2334731891751289368,89952.3824524492665659636 6715585.3395559396594762802,87880.5040898041188484058 6714540.9331694291904568672,86736.4736829215835314244 6714143.7467630458995699883,85375.8155469570338027552 6714044.0953743606805801392,75759.0360568151081679389 6715982.5962533196434378624,72914.2664695953135378659 6716827.8153850547969341278,72233.9930613558244658634 6716777.1677711084485054016,51763.5632188718227553181 6710764.8671130761504173279,50279.3404481253455742262 6709871.2812930857762694359,42610.6520468670059926808 6701381.8283900208771228790,43064.2789718502899631858 6701007.0742961307987570763,43754.6824537495340337045 6700735.9331194628030061722,45888.3431337856382015161 6700735.9331194628030061722,49413.4974487361614592373 6701579.3939626310020685196,50372.0695839574036654085 6702225.3560402169823646545,50774.0442652094789082184 6702671.0925624407827854156,51639.8872646014933707193 6704409.2511069858446717262,52103.7555827357718953863 6705749.3941652383655309677,52443.8366271113118273206 6706294.8788479296490550041,53309.6796265004959423095 6707039.5279338592663407326,54453.8213528742635389790 6707437.7983302054926753044,59679.6035286736441776156 6708082.7945359824225306511,61102.0439820291576324962 6708082.7945359824225306511,65492.9299768776327255182 6708082.7945359824225306511,66296.9906588786834618077 6707983.2172337938100099564,77645.3448283077304949984 6705005.0416132481768727303,78789.4865546814980916679 6704409.2511069858446717262,79717.1118714616459328681 6703664.8422080753371119499,80150.0333711576531641185 6703266.7560733892023563385,80737.5776435650768689811 6702225.3560402169823646545,80892.2004162765078945085 6701629.7685904707759618759,80923.0359152263699797913 6700983.8536843284964561462,80737.5776435650768689811 6700239.7573901163414120674,80459.2789165805006632581 6699644.3149194410070776939,80057.3042353255877969787 6699198.9223657045513391495,78913.1625089518202003092 6698801.0541552761569619179,76903.1777831888757646084 6698652.4835701789706945419,76161.1220575612533139065 6698703.0186938904225826263,74120.1905133572145132348 6699347.3243200285360217094,71770.1247432215459411964 6699694.8561883503571152687,71244.4741076963109662756 6699446.7962147807702422142,62122.5097541297654970549 6694339.0450256969779729843,61936.9401629800777300261 6693793.1100867912173271179,62184.2920715207292232662 6693248.4608231084421277046,62864.5654797602182952687 6692306.2962902672588825226,64379.7350689449667697772 6690572.1413981299847364426,64812.6565686409740010276 6690174.8719813767820596695,65431.1476594894993468188 6689927.1012506941333413124,68987.1374733898846898228 6689332.4108338663354516029,78387.5118734265852253884 6688341.8319851234555244446,100744.1391679119842592627 6681805.1349956169724464417,101424.4125761514733312652 6681756.1299759773537516594,109247.7237501212366623804 6682646.8198239812627434731,111226.7616574430867331102 6683042.4755222806707024574,112680.0376097484549973160 6683786.2531834430992603302,115030.1033798869466409087 6685567.8164087301120162010,117194.7108783613221021369 6686509.2034763842821121216,118307.9057862939953338355 6686807.1536996848881244659,119080.9083303627121495083 6686905.0463614761829376221,132686.5991340981854591519 6688540.5088516287505626678,154239.3883855649910401553 6690174.8719813767820596695,158908.5731073980568908155 6680073.2087286934256553650,157084.1579727876232936978 6656945.3261903403326869011,156836.8060642441269010305 6654675.3291309745982289314,156558.5073372623883187771 6653096.7032059691846370697,155661.7175194292794913054 6650334.7957205474376678467,154765.0390210902260150760 6648608.2778596915304660797,152384.0264325134630780667 6645355.0285463603213429451,151177.9910692603443749249 6644074.7730702105909585953,150683.2872521733806934208 6643729.5977886170148849487,140540.8571265090431552380 6639296.2930648280307650566,137139.3787658288492821157 6639148.7998142978176474571,135871.6724046760064084083 6638951.3190174130722880363,122482.3866910429060226306 6634324.4684879593551158905,120998.0526008051965618506 6633437.9595231357961893082,116390.6501963602640898898 6630043.3960066903382539749,114659.0755170731426915154 6628519.7884833589196205139,111443.1667475454742088914 6625126.0206480631604790688,110700.9997024266194785014 6624193.0823077233508229256,109773.3743856464716373011 6622570.4257791340351104736,108969.4250231366459047422 6620703.9979277048259973526,108289.1516148999944562092 6618689.4539327388629317284,107948.9592510360380401835 6617216.3961567794904112816,107763.3896598835272016004 6615693.5772022884339094162,107979.9060694743093336001 6611619.0300757139921188354,108536.5035234406386734918 6609263.1620539985597133636,95363.7342194011725950986 6608135.2838680362328886986,90632.6558606859180144966 6609705.2774426080286502838,88313.4255895001260796562 6609999.0332648092880845070,86983.8255914650653721765 6609902.0555871129035949707,79748.0586899027402978390 6604506.3188261361792683601,78572.9701450878783361986 6603231.0086531080305576324,75975.5524664087279234082 6599947.3558878600597381592,75171.6031038989167427644 6599114.1223738146945834160,73718.2158321023016469553 6598231.2304569184780120850,63142.8642067419714294374 6594410.2218072060495615005,55505.1226239247334888205 6592696.6615649545565247536,50403.0164023956676828675 6591962.3375045266002416611,47960.1101769395536393858 6591472.8832935625687241554,44589.6899541916864109226 6590297.7480696095153689384,41404.6166836138800135814 6588878.0462712580338120461,38899.9281407639646204188 6587508.4432779615744948387,34199.7966004898116807453 6582566.6249391864985227585,32993.8725567279179813340 6581296.1196682117879390717,31942.4599661862121138256 6579829.5697773406282067299,30829.2650582535461580846 6577482.7885235277935862541,30179.9384684551514510531 6576456.0180761599913239479,29345.0422875042349915020 6575674.7659990629181265831,28262.7941980126670387108 6575186.2792139910161495209,26964.0296989274793304503 6575088.3038974460214376450,25356.1309739106764027383 6575332.6287153083831071854,23964.6373389934269653168 6575723.1413118075579404831,13729.3667580058081512107 6578850.9004119643941521645,10946.3794881741414428689 6580318.3320494303479790688,6338.9770837320520513458 6582616.2731604762375354767,-10513.4579884809681971092 6587801.4071046337485313416,-15368.3236209549431805499 6589220.9231394883245229721,-17470.9261630587170657236 6589759.9347267141565680504,-21243.4323865527221641969 6590542.5246952790766954422,-22944.1715668928191007581 6590688.9712123088538646698,-28386.4701522858267708216 6590640.5078765731304883957,-64256.0591146746373851784 6585159.4724248666316270828,-70966.1753807117347605526 6583740.6566685084253549576,-75171.6031038989167427644 6582664.6892674667760729790,-79191.4612359364109579474 6581394.1688646301627159119,-83056.6965952596365241334 6579976.0018110657110810280,-85499.6028207185881910846 6577678.7972948485985398293,-85344.9800480071717174724 6576603.6216455642133951187,-85344.9800480071717174724 6575967.4849601816385984421,-85623.2787749889248516411 6574550.2519700163975358009,-86427.2281374987360322848 6573525.0780129041522741318,-86891.0964556358376285061 6573231.2148195700719952583,-87416.7470911610726034269 6572987.1281669437885284424,-88653.6179533640679437667 6572840.8203256204724311829,-89333.8913616007339442149 6573183.0299939680844545364,-100558.5695767594588687643 6580366.7346454048529267311,-101331.6834403194079641253 6581100.0247781453654170036,-101393.4657577103789662942 6581784.9690047213807702065,-101146.1138491668825736269 6582371.9082093313336372375,-99569.0506230999453691766 6584132.9769384199753403664,-99136.2404428951704176143 6584474.2473884969949722290,-96755.2278543184220325202 6585159.4724248666316270828,-96384.0886720133712515235 6585600.1175798885524272919,-96136.7367634698894107714 6586137.6591189010068774223,-96260.4127177402115194127 6586823.0226584235206246376,-97064.4733997412695316598 6587556.8881699843332171440,-103186.9340738797036465257 6592941.3333000577986240387,-103515.6605301919189514592 6593018.0150606799870729446,-104547.5922098470764467493 6593186.1885973056778311729,-121833.0601012445113155991 6594068.5390184000134468079,-128543.0650477903691353276 6593773.9415692239999771118,-129068.8270028068363899365 6593529.0687755867838859558,-129377.9612287412892328575 6592991.2204331913962960243,-129037.8801843657420249656 6592451.8208384830504655838,-127646.3865494513302110136 6591472.8832935625687241554,-124461.4245983647560933605 6588095.7907635690644383430,-124275.8550072122307028621 6587556.8881699843332171440,-124214.0726898212742526084 6586921.1377092571929097176,-124399.5309614825528115034 6586285.4363561803475022316,-125481.7790509741316782311 6583740.6566685084253549576,-125729.2422790088457986712 6583203.2716363826766610146,-126100.2701418226497480646 6582762.7547638705000281334,-126564.1384599597658962011 6582371.9082093313336372375,-127089.7890954850008711219 6582175.7876954572275280952,-127677.3333678924245759845 6582029.3165351273491978645,-148209.5455277645669411868 6584474.2473884969949722290,-156744.0769284148991573602 6580855.5288042686879634857,-177307.2359067281358875334 6572644.9266350185498595238,-179688.2484953048988245428 6573623.0347399692982435226,-185192.3293980888556689024 6574990.3297461569309234619,-186166.3749425292480736971 6575124.5387979382649064064,-187511.5596692746621556580 6575234.6516581308096647263,-189397.7571212760522030294 6574892.3567600846290588379,-202199.4985625045374035835 6572450.4443286526948213577,-215310.4855491530615836382 6570643.5257586129009723663,-223690.3941770891542546451 6571033.8161583300679922104,-224927.2650392949872184545 6571522.0567965423688292503,-225700.2675833608664106578 6572304.1460169507190585136,-225947.7308113955950830132 6572890.4099519327282905579,-226195.0827199390623718500 6574111.4288358055055141449,-226658.8397185821086168289 6574403.9163672123104333878,-227308.2776278717501554638 6574355.7246823841705918312,-229936.6421249919803813100 6571131.7432721024379134178,-230214.9408519737189635634 6570691.8715392947196960449,-231482.7585326178232207894 6568495.1498176343739032745,-231699.1636227201961446553 6567957.5282158264890313148,-231513.5940315676853060722 6567371.4393543517217040062,-219825.0474982746818568558 6563174.7845095358788967133,-218544.8733541518449783325 6562004.3818928413093090057,-218081.1163555059756617993 6562530.9020095784217119217,-217765.6369185995426960289 6562735.8640607446432113647,-217394.6090557857241947204 6562619.2440684689208865166,-217227.6298195955459959805 6562325.9450527308508753777,-217134.9006837634951807559 6561975.5805613631382584572,-215465.1083218644780572504 6557761.3089584950357675552,-218000.6323636642773635685 6550597.2664701351895928383,-218464.5006817985267844051 6550255.9927347600460052490,-219113.8272715969360433519 6550110.2629772489890456200,-228359.5788989222201053053 6548356.4466876452788710594,-229039.8523071616946253926 6548306.8290311563760042191,-236213.8368913330778013915 6552106.6863311016932129860,-237543.4368893681094050407 6553178.6718548554927110672,-238749.3609331300249323249 6553813.0525497095659375191,-244593.6341997779381927103 6555420.8014626977965235710,-265837.1779058218817226589 6558151.1655460912734270096,-266486.5044956202618777752 6558151.1655460912734270096,-270630.0385819252696819603 6556980.7734949644654989243,-272361.7245807064464315772 6555470.4619060028344392776,-274340.7624880283256061375 6550547.8107175137847661972,-274680.8435324038728140295 6549086.7198353800922632217,-274495.3852607397129759192 6548015.2655762238427996635,-273691.3245787415071390569 6546457.1623187074437737465,-269918.9296747387270443141 6543828.4419597163796424866,-271001.8456811748910695314 6540638.4371511004865169525,-273315.0646998595329932868 6541884.1233676308766007423,-273649.9137281669536605477 6544135.2785705877467989922,-277698.1583303528605028987 6550078.8726683063432574272,-285318.0887946435250341892 6556493.2176425578072667122,-296326.3619196998770348728 6563712.0942877801135182381,-300624.5187787191243842244 6566103.2751583149656653404,-302912.6909119753981940448 6567225.4069060487672686577,-308509.6122700798441655934 6569911.3416102193295955658,-314261.1564008957357145846 6571962.1486793523654341698,-318806.6651684584212489426 6573378.9364791419357061386,-320909.3790300505934283137 6573867.3161043440923094749,-323599.6371640530414879322 6574257.7592431930825114250,-325578.6750713749206624925 6574013.4663015846163034439,-326197.0548427322064526379 6573769.3564727697521448135,-327774.1180687991436570883 6572498.8007120154798030853,-329443.9104306981316767633 6570643.5257586129009723663,-331515.6774738520616665483 6569519.6981390863656997681,-344472.0416877919342368841 6567029.6466476824134588242,-352944.6794515572837553918 6566395.4785974835976958275,-353594.0060413556639105082 6566297.6077411789447069168,-361139.0184883408364839852 6563906.3705149488523602486,-362252.2133962735533714294 6563468.2893692338839173317,-379754.0863777761696837842 6553665.8564450433477759361,-382629.8027834370732307434 6551717.2906227651983499527,-385010.8153720138361677527 6549184.3867120612412691116,-385722.0355986944050528109 6548258.7896054740995168686,-388968.8911866603302769363 6541443.7060142951086163521,-389649.1645948970108292997 6539594.1744699953123927116,-395338.8150888335076160729 6522536.1427857801318168640,-395555.3314984271419234574 6520302.7428543651476502419,-406532.6578050423413515091 6486396.6404237886890769005,-409099.1286652804119512439 6484511.5183053677901625633,-412624.2829802309279330075 6482674.6582738365978002548,-413737.4778881635866127908 6482143.8033350799232721329,-415098.0247046397416852415 6482094.7548869289457798004,-421838.9764696267084218562 6483109.8733296152204275131,-423354.2573783026891760528 6483448.3897058935835957527,-424498.3991046764422208071 6483979.1541199050843715668,-426724.6776010505273006856 6485719.5549450898543000221,-427436.0091472195344977081 6486589.1091404585167765617,-428023.4421001357259228826 6487604.7774988533928990364,-428796.4446442044572904706 6489974.0513618225231766701,-431517.6495966479997150600 6494908.6856395686045289040,-431795.9483236297382973135 6495392.4503537956625223160,-438691.6341808193828910589 6500570.8665431030094623566,-439371.9075890560052357614 6500910.0963339135050773621,-439928.5050430223345756531 6501104.2968212217092514038,-440670.5607686528237536550 6501104.2968212217092514038,-442587.7050390924559906125 6500814.3923815786838531494,-443670.0644480752525851130 6500378.0730656441301107407,-445834.5606270612333901227 6499457.9207693589851260185,-446576.7276721801026724279 6498586.8420996433123946190,-446855.0263991618412546813 6498102.8909656442701816559,-447813.7098538743448443711 6497424.8492318037897348404,-448401.1428067905362695456 6497182.9911710228770971298,-449019.5225781478220596910 6497133.6794784562662243843,-451153.1832581810886040330 6497666.8886055145412683487,-452111.7553934023017063737 6498392.7005846193060278893,-457677.7299330656533129513 6503671.5180009743198752403,-463707.5727908660774119198 6510649.9604480331763625145,-464758.8740619165473617613 6511959.0404964704066514969,-487579.3696745390770956874 6509534.2639653859660029411,-492650.6403971154359169304 6507693.2483937256038188934,-493578.2657138984068296850 6507014.4215451674535870552,-494368.0775010754005052149 6506141.3271888131275773048,-495464.5744853881769813597 6504833.1662141699343919754,-495742.8732123727677389979 6504348.8502035420387983322,-497196.2604841693537309766 6503477.4317235788330435753,-499020.6756187797873280942 6502896.0720003144815564156,-502112.7971145459450781345 6502314.7530601238831877708,-505761.6273837667540647089 6502266.8056578664109110832,-517109.9815531958010978997 6502508.8121071672067046165,-520820.7054592988570220768 6502896.0720003144815564156,-530159.1862224561627954245 6500378.0730656441301107407,-540734.4265283253043889999 6486493.5703135132789611816,-551340.7249721267726272345 6479824.5810984466224908829,-561947.0234159281244501472 6475960.9393837330862879753,-563214.8410965750226750970 6470410.8720269836485385895,-564977.3625943033257499337 6460960.2800550907850265503,-564513.6055956602795049548 6460575.1449917182326316833,-564235.1955491844564676285 6460093.4043032908812165260,-562689.1904610469937324524 6457010.1961755231022834778,-562565.5145067767007276416 6456383.1840558908879756927,-562781.9195968790445476770 6454891.0991322873160243034,-563214.8410965750226750970 6453638.6548310611397027969,-563895.1145048117032274604 6452772.3683655355125665665,-566183.3979575593257322907 6450220.8311815606430172920,-574315.8433574606897309422 6447044.8063102504238486290,-574656.0357213246170431376 6446611.4752407195046544075,-576263.9344463442685082555 6443292.9624209115281701088,-576758.6382634283509105444 6442187.4891776861622929573,-578088.3495809546438977122 6438534.0316680874675512314,-578737.7874902414623647928 6438581.6127114910632371902,-579170.5976704462664201856 6438965.7314497744664549828,-582046.4253955984022468328 6441658.0011166380718350410,-583035.8330297694774344563 6443005.0682396311312913895,-585076.7645739734871312976 6446419.9300056621432304382,-585231.3873466849327087402 6446997.3500893814489245415,-585200.4405282466905191541 6447622.2697355588898062706,-584551.1139384482521563768 6449450.1864814916625618935,-584520.1671200072159990668 6450268.3057826254516839981,-584798.4658469917485490441 6451472.7611525235697627068,-587395.9948451621457934380 6456623.8567919051274657249,-588849.1594779762672260404 6458310.8421387113630771637,-593734.8606094029964879155 6462117.1803809301927685738,-608979.5082760875811800361 6467950.4582427898421883583,-610309.1082741225836798549 6468288.3572993138805031776,-611082.2221376826055347919 6468337.3242838028818368912,-612380.9866367677459493279 6468143.8890122128650546074,-613525.1283631415572017431 6467758.4210167797282338142,-615689.6245421246858313680 6466745.1769030587747693062,-616431.6802677522646263242 6465925.2618505218997597694,-616864.6017674482427537441 6464672.5433970680460333824,-616926.4954043276375159621 6463900.5587546769529581070,-616493.5739046344533562660 6461297.7216064278036355972,-616462.6270861934171989560 6460575.1449917182326316833,-616648.1966773458989337087 6459080.9204000355675816536,-617142.9004944300977513194 6457924.4423432126641273499,-618039.6903122602961957455 6456576.3459163447842001915,-618843.6396747701801359653 6455757.4328499510884284973,-619740.4294926003785803914 6455131.7287068972364068031,-621472.0041718903230503201 6454553.7440260341390967369,-629388.1558011806337162852 6452626.9561679409816861153,-630037.3710714877815917134 6452482.9330037198960781097,-630810.4849350476870313287 6452579.4681103099137544632,-632047.3557972507551312447 6452964.2331628119572997093,-633129.6038867422612383962 6453542.1074361680075526237,-635912.7024760651402175426 6455564.2900025611743330956,-636469.2999300315277650952 6456576.3459163447842001915,-636592.9758843046147376299 6457201.9853167394176125526,-636592.9758843046147376299 6457924.4423432126641273499,-635634.2924295922275632620 6468675.2390704853460192680,-634057.3405230136122554541 6472824.2370138922706246376,-633191.4975236244499683380 6473548.0531108947470784187,-617421.3105409058043733239 6481902.2164400974288582802,-613555.9638620885089039803 6483448.3897058935835957527,-611793.3310448691481724381 6483931.4865742065012454987,-610432.8955478841671720147 6483592.9504946963861584663,-609907.1335928677581250668 6483303.6574793346226215363,-609350.5361389013705775142 6482288.5153391053900122643,-609041.2905934784794226289 6481080.9779284242540597916,-608793.9386849350994452834 6480598.0469208294525742531,-608144.6120951366610825062 6480356.5050043519586324692,-605516.2475980191957205534 6479679.9120374908670783043,-604774.0805529003264382482 6479727.7290563872084021568,-604217.4830989340553060174 6479921.4342703213915228844,-586437.3113904496422037482 6493844.2239179955795407295,-573728.4104045444400981069 6505803.2786012487486004829,-573326.3244037983240559697 6506238.4881842527538537979,-562379.9449156242189928889 6519720.2007216988131403923,-562039.7525517601752653718 6520205.4166752127930521965,-561514.2132357262307778001 6521322.7271694773808121681,-559318.6589188107755035162 6527488.8217860972508788109,-559256.8766014197608456016 6528121.2326617483049631119,-559627.9044642335502430797 6529287.5419454993680119514,-560988.4512807097053155303 6532591.2870305376127362251,-560926.5576438275165855885 6533369.6954847564920783043,-558947.5197365056956186891 6540373.2428789725527167320,-558143.5703739959280937910 6541200.3828694252297282219,-547228.0263847715687006712 6546846.3099766355007886887,-545187.2061600559391081333 6547139.2345692599192261696,-542558.8416629385901615024 6547139.2345692599192261696,-534488.2898999165045097470 6548989.0541141862049698830,-532756.4925816440954804420 6549573.6629438968375325203,-532261.7887645600130781531 6549866.6843251455575227737,-531179.5406750683905556798 6551181.9892134414985775948,-530066.3457671357318758965 6553422.3482725294306874275,-528953.1508592030731961131 6558102.8932447293773293495,-528056.3610413699643686414 6562687.0380198908969759941,-523294.4471837076707743108 6566347.3337222440168261528,-517790.2549614353338256478 6571082.1642288379371166229,-508142.6399723435170017183 6581344.3519815802574157715,-507400.4729272246477194130 6582273.8473684089258313179,-506905.7691101405071094632 6583398.1841057818382978439,-506441.9007920034346170723 6586431.9832690181210637093,-506225.4957019010325893760 6588878.0462712580338120461,-506194.5488834627903997898 6590395.9045603703707456589,-506101.8197476307395845652 6595635.6715642046183347702,-506132.6552465806016698480 6596370.3236654140055179596,-506318.2248377330834046006 6596958.3042418546974658966,-505761.6273837667540647089 6608380.5921446401625871658,-503968.1590675974148325622 6623061.9129843506962060928,-503566.1843863425310701132 6623995.9613394439220428467,-502854.8528401735238730907 6624094.5212316401302814484,-498092.9389825084363110363 6623798.8451065737754106522,-493207.2378510817652568221 6623061.9129843506962060928,-492496.0176244039903394878 6622914.7114246273413300514,-491135.4708079306874424219 6621784.9565870827063918114,-487177.5063127753674052656 6619720.2741699311882257462,-485105.7392696214956231415 6619426.1703810859471559525,-483064.8077254174277186394 6619623.1816156450659036636,-481425.8508624683017842472 6620458.3212403720244765282,-479075.8964118210133165121 6622030.6729902913793921471,-472149.2637361931265331805 6629011.4551815437152981758,-471809.1826918176375329494 6629355.8341757701709866524,-471345.3143736833590082824 6629896.2461983226239681244,-468840.6258308333926834166 6633782.5244615664705634117,-468531.3802854105597361922 6634423.1525730984285473824,-469799.1979660546639934182 6640872.0837478553876280785,-470850.6105565963662229478 6654329.7067407211288809776,-470479.4713742913445457816 6654822.9246394680812954903,-468500.4334669694653712213 6656007.3373144594952464104,-467387.2385590368066914380 6656450.5591909773647785187,-458265.2742054730770178139 6658919.0068900147452950478,-453255.8971197761129587889 6659214.5313891069963574409,-443577.3353122460539452732 6659758.3385743526741862297,-432352.5457775960676372051 6661041.0492092268541455269,-422179.1688334906357340515 6663708.9564904095605015755,-411913.0627535531530156732 6662078.6332148471847176552,-404337.2148076153243891895 6659954.8999988278374075890,-402821.9338989393436349928 6659708.2214982789009809494,-400410.0858114127186127007 6660350.8807510212063789368,-399358.6732208681642077863 6660893.3415082683786749840,-397936.2327675126725807786 6661880.5986261591315269470,-396915.8783149004448205233 6662375.6940869214013218880,-390793.3063212707638740540 6660992.3462550239637494087,-390051.1392761518945917487 6660794.3379595801234245300,-383217.3470558444969356060 6658277.8815929768607020378,-382691.6964203192619606853 6657980.9694618340581655502,-382320.6685575054725632071 6657635.2074515735730528831,-381083.7976952996104955673 6655514.0480420421808958054,-380341.6306501807994209230 6654625.0655641015619039536,-379444.8408323504845611751 6653984.2765384409576654434,-378177.1344711976125836372 6653491.1091670170426368713,-377373.0737891966127790511 6653392.1951259449124336243,-375177.6307917723315767944 6653392.1951259449124336243,-367508.9423905140138231218 6653392.1951259449124336243,-337112.5988319564494304359 6657833.1393120000138878822,-335009.8849703642772510648 6665585.3860762137919664383,-335442.8064700574614107609 6666721.1978914896026253700,-335535.5356058895122259855 6667364.4083972629159688950,-335442.8064700574614107609 6669686.8621351048350334167,-334731.5862433796864934266 6675818.3632567543536424637,-329505.6927480890881270170 6687895.4508803253993391991,-317569.7943062526173889637 6700339.2401692178100347519,-308416.8831342477933503687 6708281.9527898402884602547,-295367.7897844786639325321 6721651.8780053677037358284,-293821.6733768528210930526 6724338.2434999896213412285,-284204.8938867108663544059 6738381.9839703468605875969,-275144.7118505381513386965 6750453.5700151724740862846,-273753.2182156209019012749 6751500.9796426724642515182,-272794.6460804024827666581 6752001.5482317414134740829,-270382.6866733846254646778 6752699.5199452098459005356,-267877.9981305347173474729 6753198.9040106711909174919,-267321.4006765683880075812 6753448.4277819134294986725,-266270.0994055179180577397 6753998.5576991466805338860,-265466.0387235168600454926 6754897.0035624913871288300,-264940.3880879916250705719 6756046.5910426154732704163,-264816.7121337184216827154 6756895.9841181430965662003,-264909.5525890417629852891 6757544.9133904082700610161,-265095.0108607030124403536 6758144.7874324973672628403,-265713.5019515515887178481 6759143.8964259419590234756,-266146.3121317534823901951 6759543.2865942474454641342,-266795.7500410431530326605 6759793.0053844498470425606,-273907.8409883351414464414 6754448.3974975654855370522,-287080.6102923746220767498 6742071.0710735591128468513,-292677.5316504790680482984 6736039.8856896292418241501,-296666.4429640754242427647 6730809.2905607484281063080)),((-575738.2838108161231502891 7445662.3215868351981043816,-581489.8279416320146992803 7445770.2241512890905141830,-582386.6177594651235267520 7445825.5493218069896101952,-582974.0507123813731595874 7446151.8189138257876038551,-588138.0505707897245883942 7449095.3408749038353562355,-589189.3518418401945382357 7449914.4276374652981758118,-594477.1389740130398422480 7454604.6953015578910708427,-594693.5440641153836622834 7455040.9381962884217500687,-596363.3364260144298896194 7460335.7556891534477472305,-601156.1971021178178489208 7479304.9535188870504498482,-601218.0907390000065788627 7480946.8646880760788917542,-601156.1971021178178489208 7482698.7262673750519752502,-600723.2756024218397215009 7484888.7174664484336972237,-599022.5364220845513045788 7492726.1545226909220218658,-598682.4553777090040966868 7493328.3919804077595472336,-597878.3946957107400521636 7494370.7231308631598949432,-593332.9972476392285898328 7498868.1786772878840565681,-592838.1821110638557001948 7499308.1117766723036766052,-589467.7618883160175755620 7502216.2121196007356047630,-586159.0126634679036214948 7502326.0925307748839259148,-584643.8430742803029716015 7502107.5190071118995547295,-583221.4026209219591692090 7501613.0834732400253415108,-582015.3672576688695698977 7500954.2805386865511536598,-578675.8938533620676025748 7498759.5326921911910176277,-577222.5065815654816105962 7497496.7834186805412173271,-575305.3623111229389905930 7495797.2470681583508849144,-574439.5193117309827357531 7494809.0180133040994405746,-573821.1395403764909133315 7493658.2508851466700434685,-566090.6688217271585017443 7470661.5068180840462446213,-565935.9347295245388522744 7469951.2167844949290156364,-564915.4689574239309877157 7452313.8906287150457501411,-564884.6334584740689024329 7451494.5500295581296086311,-565039.2562311855144798756 7450732.0305376620963215828,-565379.3372755582677200437 7450131.5305778924375772476,-566987.3473200662992894650 7448060.6635185629129409790,-568131.4890464399941265583 7447460.1744271237403154373,-575738.2838108161231502891 7445662.3215868351981043816)),((-559164.0361460965359583497 7503149.4548785416409373283,-559967.9855086063034832478 7503315.2842772519215941429,-560462.6893256932962685823 7503698.3460194766521453857,-569832.2282267800765112042 7514194.0817999914288520813,-570172.3092711528297513723 7514797.9966831970959901810,-578706.7293523119296878576 7533405.3470081146806478500,-578923.2457619027700275183 7534066.9279908332973718643,-579510.6787148189032450318 7536933.3768309159204363823,-579603.5191701422445476055 7537705.8451215503737330437,-579572.5723517010919749737 7538422.3980714641511440277,-576820.5319003105396404862 7542119.5918227070942521095,-576294.8812647825106978416 7542505.9771181223914027214,-575583.6610381047939881682 7542284.6723198099061846733,-574470.4661301720188930631 7541567.9585998225957155228,-565533.9600482695968821645 7533956.3959615742787718773,-560648.2589168429840356112 7526188.9937526304274797440,-557586.9729200295405462384 7515347.9150803945958614349,-557215.9450572157511487603 7513973.5884437793865799904,-557185.1095582658890634775 7512324.6404690435156226158,-557370.5678299271967262030 7504962.3078959751874208450,-557617.9197384706931188703 7504248.8576145675033330917,-558421.8691009776666760445 7503259.5462272781878709793,-559164.0361460965359583497 7503149.4548785416409373283)),((-664793.8764454351039603353 7516393.0264545530080795288,-670947.3952575059374794364 7517053.1489270376041531563,-671534.8282104220706969500 7517328.1836316678673028946,-673823.1116631695767864585 7518758.9579390995204448700,-674936.3065711023518815637 7519473.5533458655700087547,-675771.2027520503615960479 7520353.2224902408197522163,-676111.2837964259088039398 7521013.6840607589110732079,-676327.8002060195431113243 7521784.5582381589338183403,-676729.7748872715746983886 7523985.6687162136659026146,-677719.2938409339403733611 7534066.9279908332973718643,-677688.3470224929042160511 7534893.4879543641582131386,-677317.3191596789984032512 7537375.6853555440902709961,-676698.8280688333325088024 7539635.8654353143647313118,-664360.9549457419198006392 7563116.1797363320365548134,-663000.2968097745906561613 7564499.3038628213107585907,-657496.2159069934859871864 7570035.6849991707131266594,-656970.6765909566311165690 7570534.5317315002903342247,-646673.5123730896739289165 7580288.4833432398736476898,-640643.6695152892498299479 7585004.0025708498433232307,-639530.5859268477652221918 7585836.2537989197298884392,-635789.0265217948472127318 7588389.7062006164342164993,-635139.5886125080287456512 7588501.0231859032064676285,-633902.7177503022830933332 7587778.3908720752224326134,-632851.3051597605226561427 7583506.1376072801649570465,-632789.5228423695079982281 7582729.0567086441442370415,-632789.5228423695079982281 7581840.8322850158438086510,-632974.9811140308156609535 7580954.1081317737698554993,-633500.7430690473411232233 7579679.4093241794034838676,-634799.3962486413074657321 7578126.0998761691153049469,-635417.8873394897673279047 7577571.6791742900386452675,-636407.4062931521330028772 7576241.0730336820706725121,-637891.6290638985810801387 7573968.7197279091924428940,-639654.2618811180582270026 7571088.2456444287672638893,-640303.5884709164965897799 7569758.7612766847014427185,-650755.2641420065192505717 7548357.1669921502470970154,-657248.8639984499895945191 7535060.1998698618263006210,-662010.8891756035154685378 7524646.4415445849299430847,-664793.8764454351039603353 7516393.0264545530080795288)),((-638417.3910189151065424085 7589943.6933768726885318756,-639252.1758803747361525893 7589943.6933768726885318756,-639870.6669712205184623599 7590277.5168613130226731300,-640087.0720613228622823954 7590887.6317691532894968987,-639437.7454715273343026638 7592165.9916837643831968307,-638479.1733363060047850013 7593886.9354436751455068588,-633562.5253864382393658161 7597221.5368494736030697823,-632913.1987966427113860846 7597442.8280005119740962982,-632263.8722068442730233073 7597276.3588367188349366188,-631769.1683897601906210184 7596720.7541195014491677284,-631614.4342975575709715486 7596165.1896145483478903770,-631583.5987986077088862658 7595332.0182546870782971382,-631583.5987986077088862658 7592942.4283110080286860466,-631830.9507071482948958874 7592220.7775808572769165039,-632882.2519782016752287745 7591442.8144898163154721260,-634799.3962486413074657321 7590610.1554144909605383873,-636005.4316118971910327673 7590221.1456497646868228912,-638417.3910189151065424085 7589943.6933768726885318756)),((-627625.5229839611565694213 7595664.6758304946124553680,-628305.7963921978371217847 7595887.5224618297070264816,-628738.7178918938152492046 7596276.6193867400288581848,-630439.4570722338976338506 7600834.0224557518959045410,-630655.8621623362414538860 7601501.4306786367669701576,-628305.7963921978371217847 7609568.5682490030303597450,-628058.4444836571346968412 7610404.8903153417631983757,-624440.5610328745096921921 7609848.3341843830421566963,-624100.3686690105823799968 7609235.1069969609379768372,-624155.3604974618647247553 7608345.4135369891300797462,-626728.7331661308417096734 7597720.7515125907957553864,-627625.5229839611565694213 7595664.6758304946124553680)),((-625924.7838036210741847754 7611796.5575865879654884338,-626821.5736214512726292014 7611963.1416269848123192787,-627347.2242569765076041222 7612353.2551147406920790672,-628738.7178918938152492046 7616976.7891307510435581207,-628460.4191649092826992273 7618592.9562537530437111855,-628212.9559368772897869349 7619261.9116027252748608589,-626821.5736214512726292014 7621603.1129946140572428703,-625832.0546677918173372746 7622550.9550202786922454834,-624997.1584868408972397447 7622606.1590891517698764801,-622245.1180354503449052572 7622662.7687654243782162666,-621595.6801261607324704528 7622327.3324233889579772949,-621564.7333077224902808666 7621491.3147064875811338425,-621750.4142183633521199226 7620655.1874711913987994194,-623729.3408061967929825187 7614190.4231539648026227951,-624347.8318970424588769674 7613021.6662818389013409615,-625244.5103953843936324120 7612129.9297544891014695168,-625924.7838036210741847754 7611796.5575865879654884338)),((-618132.4194480923470109701 7634046.1933538932353258133,-621657.5737630429212003946 7634883.5821420866996049881,-621904.9256715864175930619 7635442.1603071531280875206,-622028.6016258567105978727 7636279.7017440479248762131,-621781.2497173132142052054 7636895.0966819357126951218,-619802.3231294825673103333 7639688.1229722509160637856,-617359.4169040236156433821 7640358.9228347931057214737,-613370.3942709360271692276 7640695.1496747722849249840,-616308.0043134819716215134 7636000.5781193887814879417,-617112.0649954801192507148 7634995.5760108726099133492,-618132.4194480923470109701 7634046.1933538932353258133)),((-680904.2557920205872505903 7688971.5201006643474102020,-675585.7444803890539333224 7686665.2835735436528921127,-674256.0331628656713292003 7686046.0731141436845064163,-672307.9420739820925518870 7683404.2137830695137381554,-667484.1345794375520199537 7675427.1118102883920073509,-667143.9422155736247077584 7674753.2296862173825502396,-665072.1751724197529256344 7668860.4051676299422979355,-664701.0359901146730408072 7667570.8004183741286396980,-651930.2413673300761729479 7662468.6353409998118877411,-645714.9402378683444112539 7661347.9715940030291676521,-644972.7731927494751289487 7661178.6958307139575481415,-643828.6314663757802918553 7660395.1128663672134280205,-636160.0543846086366102099 7654344.2149505326524376869,-629078.9102557577425613999 7648748.2799130156636238098,-628831.5583472142461687326 7647293.0925275487825274467,-628769.6647103348514065146 7645670.6582383047789335251,-629913.6951172174885869026 7639074.1129465876147150993,-630408.5102537928614765406 7637565.6519075101241469383,-634737.6139312532031908631 7630249.2361390953883528709,-636160.0543846086366102099 7628799.1669095354154706001,-646611.7300556986592710018 7621881.7125919712707400322,-650136.8843706492334604263 7620153.0732755511999130249,-650878.9400962768122553825 7619986.1105338940396904945,-652332.3273680733982473612 7620488.4144801758229732513,-653661.9273661085171625018 7621212.5285919252783060074,-654342.2007743450812995434 7622215.5235715247690677643,-653600.0337292291224002838 7623442.4991875784471631050,-652981.6539578718366101384 7623832.9964729128405451775,-652301.3805496323620900512 7624893.1614138623699545860,-651651.9426403455436229706 7626232.2308252081274986267,-651466.3730491930618882179 7626956.8878510380163788795,-651497.4311871253885328770 7627960.8358448566868901253,-651744.7830956659745424986 7628351.5634496649727225304,-652363.1628670232603326440 7628799.1669095354154706001,-653198.0590479741804301739 7628909.4645963711664080620,-654837.0159109233645722270 7628799.1669095354154706001,-655981.0463178058853372931 7628239.6666702739894390106,-666092.6409445203607901931 7622103.9170802831649780273,-669710.4130758116953074932 7619317.0919895535334944725,-697385.7743209081236273050 7610126.5069936262443661690,-703662.9690872520441189408 7611183.1746214488521218300,-704095.8905869452282786369 7611684.9021986331790685654,-705703.7893119648797437549 7613633.3917428404092788696,-706445.8450375924585387111 7614692.1469864565879106522,-706693.1969461359549313784 7615249.0547652505338191986,-708672.3461729490663856268 7620153.0732755511999130249,-708703.1816718989284709096 7620988.9450392834842205048,-708393.9361264732433483005 7624390.5687281526625156403,-706909.7133557267952710390 7625784.7772830910980701447,-705703.7893119648797437549 7626232.2308252081274986267,-701065.4400890816468745470 7626566.2313562659546732903,-700261.4907265718793496490 7626399.1288499012589454651,-699271.9717729095136746764 7625617.6918163308873772621,-698869.9970916574820876122 7625060.0302770650014281273,-698189.7236834180075675249 7623889.6152115678414702415,-693736.9440516872564330697 7622048.7166286185383796692,-675245.5521165251266211271 7629412.3537727268412709236,-670947.3952575059374794364 7631477.4989179829135537148,-670390.7978035395499318838 7631923.6771551398560404778,-669988.8231222846079617739 7632371.2883725911378860474,-669895.9826669641770422459 7633375.9461823049932718277,-670050.6054396756226196885 7634101.2792629031464457512,-670359.8509851013077422976 7634659.8003760473802685738,-670978.2307564557995647192 7634995.5760108726099133492,-671751.3446200157050043344 7634883.5821420866996049881,-676698.8280688333325088024 7632650.4807734247297048569,-679574.6557939854683354497 7630976.0818669088184833527,-680811.5266561885364353657 7630416.4226354788988828659,-686748.6403781569097191095 7629636.1832222435623407364,-688511.0505563967162743211 7629748.1003992343321442604,-689469.6226916179293766618 7630695.5437986664474010468,-690026.2201455842005088925 7631980.3557103760540485382,-690521.0352821595733985305 7634046.1933538932353258133,-690211.7897367367986589670 7635777.9702437324449419975,-683841.8658345636213198304 7644105.5374458534643054008,-677162.6963869676692411304 7647068.7463837368413805962,-675894.8787063235649839044 7647740.1933232387527823448,-671473.0458930339664220810 7650426.5703271478414535522,-670297.9573482191190123558 7651210.5432822806760668755,-669339.3852129979059100151 7652050.0132930614054203033,-668690.0586231994675472379 7653392.2282215254381299019,-668535.4358504880219697952 7654121.2745546055957674980,-668164.4079876742325723171 7656585.2678927034139633179,-668226.1903050652472302318 7657425.3278924627229571342,-668628.2763058113632723689 7657817.5622460534796118736,-669886.2978712664917111397 7657906.9017260335385799408,-678925.2178846986498683691 7654793.3406463116407394409,-681058.8785647319164127111 7653224.7407988160848617554,-681986.6152010033838450909 7653337.0033232029527425766,-682604.9949723606696352363 7653616.7598327985033392906,-704126.7260858950903639197 7666561.8454829007387161255,-705518.2197208123980090022 7668019.0880806446075439453,-703879.3741773545043542981 7678797.4141988204792141914,-703539.2931329789571464062 7679414.6216089874505996704,-688696.6201475491980090737 7687508.6565122948959469795,-683563.5671075818827375770 7689476.7540199654176831245,-682821.4000624630134552717 7689589.5502855889499187469,-680904.2557920205872505903 7688971.5201006643474102020)),((-690180.9542377869365736842 7564002.2430113358423113823,-694695.5161869085859507322 7564777.4328891141340136528,-697200.2047297556418925524 7565607.4966493323445320129,-693984.2959602307528257370 7573802.7585255075246095657,-693365.9161888734670355916 7574910.6972285006195306778,-691355.9314631104934960604 7577516.9976580627262592316,-690459.1416452802950516343 7578459.4101906763389706612,-687799.9416492101736366749 7580954.1081317737698554993,-687243.3441952437860891223 7581397.5572497285902500153,-683377.9975164294010028243 7582674.1387760406360030174,-682481.3190180874662473798 7582506.5915821185335516930,-682357.6430638171732425690 7581785.9207013463601469994,-687738.0480123279849067330 7566215.6559154046699404716,-689036.8125114131253212690 7564555.4867092901840806007,-689500.6808295502560213208 7564222.7786708874627947807,-690180.9542377869365736842 7564002.2430113358423113823)),((-713558.0473043757956475019 7618759.8886554623022675514,-714485.6726211558561772108 7618815.0654288716614246368,-716124.5181646137498319149 7620041.2961338991299271584,-716495.5460274276556447148 7620488.4144801758229732513,-714269.1562115622218698263 7624669.4704670021310448647,-711764.4676687123719602823 7626622.8702922686934471130,-711084.1942604756914079189 7626845.0114367129281163216,-710434.8676706772530451417 7626566.2313562659546732903,-710311.1917164069600403309 7625896.6382192233577370644,-711238.8170331871369853616 7622941.6076344205066561699,-711702.5740318329771980643 7621546.3104290068149566650,-712568.5283507134299725294 7619595.8091768035665154457,-712970.5030319682555273175 7619093.5637132814154028893,-713558.0473043757956475019 7618759.8886554623022675514)),((-690057.2782835166435688734 7650259.1478064712136983871,-693829.7845070078037679195 7651545.6351253492757678032,-694478.9997773149516433477 7651770.1125533133745193481,-696736.3364116213051602244 7654121.2745546055957674980,-696860.0123658917145803571 7654960.8624124936759471893,-696705.5009126714430749416 7655688.4453540705144405365,-694819.1921411788789555430 7657537.4504156326875090599,-694262.5946872124914079905 7657929.8921899255365133286,-692932.9946891774889081717 7658433.0779828028753399849,-691912.5289170768810436130 7658152.9436111617833375931,-690737.5516917532077059150 7657537.4504156326875090599,-686037.3088319879025220871 7653616.7598327985033392906,-685697.1164681239752098918 7653112.4799216054379940033,-685480.7113780215149745345 7652441.9721416393294930458,-685789.9569234472000971437 7651713.2873035967350006104,-686377.3898763634497299790 7651490.4235533857718110085,-690057.2782835166435688734 7650259.1478064712136983871)),((-767300.5371110781561583281 7646229.8225794527679681778,-770887.4737434196285903454 7646509.5207542572170495987,-776144.2027376601472496986 7648356.3087900653481483459,-778216.0811003053095191717 7657480.5823117960244417191,-777968.6178722705226391554 7658210.0183924464508891106,-776267.8786919304402545094 7660225.8581922017037868500,-774567.2508310816483572125 7661235.5914379972964525223,-752952.6792622238863259554 7668356.5327569469809532166,-752303.3526724282419309020 7668524.5538538070395588875,-751684.9729010709561407566 7668187.1017607403919100761,-750819.0185821906197816133 7667122.5390420444309711456,-749551.3122210348956286907 7664822.8869000077247619629,-749087.4439029005588963628 7663532.5502214934676885605,-749056.4970844595227390528 7662691.8191753616556525230,-750200.6388108332175761461 7661795.8945489320904016495,-752365.2463093076366931200 7661458.7392884017899632454,-754096.8209885975811630487 7661795.8945489320904016495,-755797.5601689376635476947 7661683.5078104771673679352,-756508.7803956154966726899 7661571.1227236548438668251,-757158.1069854138186201453 7661235.5914379972964525223,-757652.8108024980174377561 7660898.4608781281858682632,-765476.2332959589548408985 7653561.3317578630521893501,-766094.6130673162406310439 7652329.7227487266063690186,-767300.5371110781561583281 7646229.8225794527679681778)),((-743428.7402274052146822214 7669814.3195266835391521454,-744263.6364083561347797513 7670039.3338285284116864204,-745222.2085435773478820920 7672621.0086415195837616920,-745717.0236801527207717299 7674753.2296862173825502396,-745407.7781347299460321665 7675427.1118102883920073509,-736254.8669627250637859106 7685765.1272280197590589523,-731802.0873309944290667772 7689589.5502855889499187469,-728678.9076972960028797388 7692177.8419745219871401787,-724659.0495652613462880254 7695442.6619901461526751518,-724102.4521112949587404728 7695779.9016436329111456871,-722834.6344306508544832468 7696455.6417993549257516861,-719742.4016153935808688402 7696794.3451119465753436089,-718814.7762986134039238095 7696849.8849710999056696892,-718505.5307531905127689242 7696229.8479412319138646126,-718350.9079804790671914816 7695498.3946791412308812141,-718505.5307531905127689242 7694767.0115071609616279602,-721907.0091138707939535379 7686609.8177584111690521240,-722834.6344306508544832468 7684866.2912695864215493202,-723731.4242484811693429947 7683853.4313346464186906815,-731863.8696483825333416462 7675875.8605245305225253105,-732358.5734654695261269808 7675427.1118102883920073509,-733502.8265113317174836993 7674753.2296862173825502396,-743428.7402274052146822214 7669814.3195266835391521454)),((-685635.3341507357545197010 7733423.8133532665669918060,-687738.0480123279849067330 7734216.3565954193472862244,-691448.7719184310408309102 7737101.2504727263003587723,-691696.1238269745372235775 7737780.6634278474375605583,-691788.8529628065880388021 7739480.2764370609074831009,-691819.7997812448302283883 7740329.3078640596941113472,-691634.2301900923484936357 7741122.5701952194795012474,-691015.7390992465661838651 7742424.6700222818180918694,-685573.4405138535657897592 7748033.6259813448414206505,-684584.0328796824906021357 7748885.4488587854430079460,-683223.4860632063355296850 7748488.3005979405716061592,-680564.0634281565435230732 7746333.7345695439726114273,-679883.7900199170690029860 7745200.6845221538096666336,-679945.6836567992577329278 7744010.0824914481490850449,-680687.7393824269529432058 7738800.7118177721276879311,-681244.3368363932240754366 7736423.3244223734363913536,-681646.4228371393401175737 7735856.0891268383711576462,-683377.9975164294010028243 7733875.9867491759359836578,-684027.4354257161030545831 7733593.0697105331346392632,-685635.3341507357545197010 7733423.8133532665669918060)),((-703260.8830865059280768037 7746674.6618245746940374374,-704157.6729043362429365516 7746674.6618245746940374374,-704714.2703583025140687823 7746958.0654037864878773689,-708208.4778548119356855750 7749168.7306836582720279694,-717825.2573449538322165608 7759890.9843808347359299660,-718258.1788446470163762569 7760572.4351671617478132248,-718196.2852077677380293608 7761366.3798615131527185440,-714176.4270757301710546017 7766820.7554353112354874611,-711702.5740318329771980643 7769093.4759708065539598465,-710682.2195792207494378090 7769946.0237154727801680565,-706600.5791297951946035028 7770970.3944133082404732704,-704219.5665412184316664934 7771196.7774734115228056908,-698777.2679558254312723875 7768979.4963971134275197983,-698035.1009107065619900823 7768639.2048939717933535576,-697045.5819570441963151097 7767843.0682328445836901665,-696210.7970955873606726527 7766650.5538066504523158073,-695715.8706395179033279419 7765400.5477899685502052307,-695654.0883221297990530729 7764660.9911908647045493126,-695468.5187309773173183203 7759209.5946496361866593361,-696303.4149119253270328045 7752797.8342572487890720367,-696519.9313215189613401890 7752059.2978702094405889511,-697602.1794110105838626623 7750244.8079027310013771057,-698900.9439100957242771983 7748771.7717254515737295151,-701158.2805444021942093968 7747297.3882506629452109337,-702487.8805424371967092156 7746730.7704066531732678413,-703260.8830865059280768037 7746674.6618245746940374374)),((-831216.5151813800912350416 7748033.6259813448414206505,-832144.1404981602681800723 7748033.6259813448414206505,-836596.9201298909028992057 7748488.3005979405716061592,-838297.6593102309852838516 7748714.0154124023392796516,-840493.2136271464405581355 7749394.6697850516065955162,-841513.5680797586683183908 7750188.6734056873247027397,-841637.2440340289613232017 7751039.1043900754302740097,-841575.3503971467725932598 7752003.3541585551574826241,-840864.2414899603463709354 7753251.1599986683577299118,-828835.5025928033282980323 7771481.0963116846978664398,-828186.1760030050063505769 7771254.5000919839367270470,-825836.1102328692795708776 7769093.4759708065539598465,-825403.0774136820109561086 7768581.5021328534930944443,-821321.4369642564561218023 7756484.6460112733766436577,-821105.0318741539958864450 7755747.3858311343938112259,-827629.5785490386188030243 7748885.4488587854430079460,-828124.2823661256115883589 7748430.7505138125270605087,-831216.5151813800912350416 7748033.6259813448414206505)),((-732606.0366935014026239514 7769093.4759708065539598465,-734987.0492820809595286846 7769605.6889409003779292107,-734863.2620083165820688009 7770572.0912204943597316742,-733966.5835099775576964021 7771367.0809285240247845650,-729761.1557867904193699360 7773698.9026612853631377220,-729080.8823785508284345269 7774041.0589115936309099197,-728431.5557887553004547954 7773927.0051164235919713974,-723545.7433378373971208930 7772846.1385993212461471558,-722927.3635664801113307476 7772505.6739396685734391212,-722680.0116579394089058042 7771822.9480177508667111397,-723020.2040218034526333213 7771196.7774734115228056908,-723483.9610204464988783002 7770798.6670958334580063820,-732606.0366935014026239514 7769093.4759708065539598465)),((-803139.2905745200114324689 7783545.4806583048775792122,-803201.1842113992897793651 7782691.4057300575077533722,-804376.1614367229631170630 7779958.0274736341089010239,-804870.8652538099559023976 7779503.1064727054908871651,-808797.9942500125616788864 7781324.5936553860083222389,-811209.9536570303607732058 7781837.6318025905638933182,-813003.4219732024939730763 7781837.6318025905638933182,-816373.8421959504485130310 7780584.9204607559368014336,-818878.6420582886785268784 7780412.9757186239585280418,-819651.6446023574098944664 7780584.9204607559368014336,-821692.5761465615360066295 7782348.8596929777413606644,-822280.0090994776692241430 7783601.8620031997561454773,-822929.4470087644876912236 7785708.9791850121691823006,-823331.3103705309331417084 7787134.6291069323197007179,-825712.3229591076960787177 7797510.9036505632102489471,-825866.9457318191416561604 7798366.6473784530535340309,-826083.4621414127759635448 7804874.9768173359334468842,-826547.2191400558222085238 7838645.1134567204862833023,-826238.0849141242215409875 7839277.0828192858025431633,-825124.8900061915628612041 7840194.1517706615850329399,-820208.2420563237974420190 7842604.0526296412572264671,-816590.3586055439664050937 7841456.5425315601751208305,-811055.2195648277411237359 7838415.2631706120446324348,-809509.2144766930723562837 7837211.6059288652613759041,-808983.4525216766633093357 7836579.8089068550616502762,-804221.5386640115175396204 7830274.0186152849346399307,-804066.9158913000719621778 7829414.6665635276585817337,-804963.7057091303868219256 7828440.5358255095779895782,-806633.4980710294330492616 7827410.0282281637191772461,-807313.7714792659971863031 7827180.3123987615108489990,-808055.8272048936923965812 7827295.1694429172202944756,-810993.4372474396368488669 7829128.1687867753207683563,-811302.6827928624115884304 7826321.5173279317095875740,-808086.7740233347285538912 7791351.6153712701052427292,-803139.2905745200114324689 7783545.4806583048775792122)),((-661918.1600397742586210370 7817105.8563358392566442490,-664453.6840815711766481400 7817564.6846419069916009903,-665721.5017622152809053659 7818136.6114055309444665909,-667514.9700783874141052365 7819280.5943950461223721504,-668844.6813959137070924044 7820710.9189692307263612747,-669926.9294854053296148777 7822370.8705623568966984749,-670050.6054396756226196885 7823287.5438298834487795830,-669895.9826669641770422459 7824088.0749338585883378983,-669586.7371215414023026824 7824660.4941557068377733231,-668566.3826689291745424271 7825519.3071479909121990204,-666556.5092626574914902449 7825920.2985368277877569199,-663093.1372650979319587350 7825519.3071479909121990204,-662381.9170384173048660159 7825232.9566187048330903053,-660557.5019038068130612373 7824088.0749338585883378983,-660124.5804041108349338174 7823686.9743719510734081268,-659104.2259515015175566077 7821913.3997483728453516960,-658856.8740429580211639404 7821226.4211233425885438919,-658764.0335876375902444124 7820483.0542908245697617531,-658825.9272245168685913086 7819510.0708995973691344261,-659382.5246784832561388612 7818251.3314756704494357109,-659908.1753140112850815058 7817735.8256493629887700081,-661145.0461762142367660999 7817163.9291197257116436958,-661918.1600397742586210370 7817105.8563358392566442490)),((-664732.0941280469996854663 7866173.6906613605096936226,-665504.9853526245569810271 7866289.1409389581531286240,-666680.1852169277844950557 7868016.1309835584834218025,-666834.6966701479395851493 7868764.3877861686050891876,-666896.5903070301283150911 7871473.1617560992017388344,-665938.0181718089152127504 7875966.9064698787406086922,-664175.4966740807285532355 7878101.7436213130131363869,-663649.7347190642030909657 7878562.6237914720550179482,-663000.2968097745906561613 7878331.3497779136523604393,-662783.8917196722468361259 7877639.2308822218328714371,-662722.1094022812321782112 7876947.1753730922937393188,-664330.0081273008836433291 7867728.3755705067887902260,-664732.0941280469996854663 7866173.6906613605096936226)),((-327217.5206148328143171966 8122256.1049753436818718910,-328176.0927500540274195373 8122375.5594781693071126938,-329258.3408395484439097345 8123268.8481088783591985703,-330680.7812929039355367422 8124818.6841298276558518410,-331732.0825639544054865837 8126606.3827060386538505554,-338071.1709671777207404375 8141164.8613730743527412415,-337700.0317848726408556104 8141761.9490661276504397392,-337174.3811493474058806896 8142239.3096001911908388138,-335071.6672877524397335947 8144091.8439540863037109375,-334453.2875163979479111731 8144390.6066143354400992393,-331144.5382915498339571059 8144868.1355154002085328102,-324619.9916166624170728028 8145644.2928006444126367569,-322733.7941646638792008162 8145526.1860490273684263229,-322177.1967106975498609245 8145225.8720280602574348450,-321311.3537113055353984237 8144150.9932781057432293892,-320352.7815760842640884221 8142478.8614945756271481514,-320229.1056218139710836112 8141642.1836746307089924812,-324372.6397081217728555202 8123090.6107930103316903114,-324867.4548446971457451582 8122673.2389830201864242554,-327217.5206148328143171966 8122256.1049753436818718910)),((-359716.5780349853448569775 8132032.1771923750638961792,-366117.4487555996165610850 8132032.1771923750638961792,-366890.5626191567280329764 8132151.7883329940959811211,-367447.1600731230573728681 8132569.4760318957269191742,-381949.5293752003926783800 8152639.8082044757902622223,-382166.0457847940269857645 8153357.7678188877180218697,-382166.0457847940269857645 8154254.7761839749291539192,-380496.2534228921867907047 8159700.9549947949126362801,-379846.8155136054265312850 8161079.0209944993257522583,-378269.8636070268694311380 8162516.6373222228139638901,-372827.5650216366630047560 8164612.7600420080125331879,-371312.3954324491205625236 8164732.8952381443232297897,-359902.1476261378847993910 8156049.5478410180658102036,-359376.3856711214175447822 8155571.3019034899771213531,-357861.3274014250491745770 8153237.8159430967643857002,-349141.2264096250291913748 8138178.4206436891108751297,-348955.6568184724892489612 8137461.9215934518724679947,-349203.1200465043657459319 8134417.8906672578305006027,-349728.7706820324528962374 8134001.6030156211927533150,-351800.5377251863828860223 8133224.9385366979986429214,-354088.7098584398045204580 8132807.2141293892636895180,-359716.5780349853448569775 8132032.1771923750638961792)),((-650940.8337331590009853244 7781665.4537310823798179626,-652239.4869127529673278332 7779104.3557837270200252533,-655579.0716365509433671832 7773188.2564562307670712471,-656011.9931362469214946032 7772618.0685839969664812088,-659908.1753140112850815058 7768013.2965631103143095970,-661175.9929946553893387318 7767388.8718715608119964600,-665690.5549437770387157798 7765626.7650331659242510796,-667731.4864879810484126210 7764944.8611572692170739174,-669246.6560771686490625143 7764660.9911908647045493126,-669772.3067126938840374351 7765172.7010596394538879395,-671503.9927114722086116672 7769889.7436121432110667229,-671782.1801189655670896173 7771310.7903017997741699219,-671627.6686657454119995236 7772049.5611863331869244576,-666896.5903070301283150911 7782976.1550377663224935532,-665041.2283539786003530025 7786791.8826122293248772621,-671318.4231203197268769145 7796484.5903450027108192444,-676111.2837964259088039398 7785995.4823604188859462738,-676513.3697971692308783531 7785538.5590157033875584602,-677440.9951139522017911077 7785708.9791850121691823006,-678677.8659761551534757018 7786392.7490999111905694008,-687583.4252396165393292904 7795058.8264241442084312439,-702920.8020421331748366356 7792377.4401110168546438217,-703353.7235418263589963317 7792776.6830875966697931290,-717670.6345722425030544400 7814132.3829986350610852242,-718289.0143435968784615397 7815390.4386823251843452454,-721257.5712045810651034117 7821627.3914837995544075966,-721504.9231131245614960790 7822314.4064546646550297737,-721443.1407957336632534862 7823229.4241122854873538017,-715351.4043010538443922997 7828440.5358255095779895782,-714856.7004839696455746889 7828841.8880936847999691963,-713898.1283487484324723482 7828900.0508747342973947525,-712259.2828052905388176441 7827581.5979150198400020599,-709538.0778528470546007156 7824660.4941557068377733231,-706415.0095386425964534283 7822141.5135000469163060188,-705240.0323133190395310521 7821341.1879651453346014023,-704590.5944040322210639715 7821111.6560192611068487167,-702889.8552236921386793256 7821168.3172089494764804840,-702456.9337239961605519056 7821683.8504735743626952171,-702395.1514066079398617148 7822542.3261973010376095772,-726576.1938357037724927068 7843695.1129715852439403534,-727287.4140623816056177020 7844040.4415323473513126373,-731771.0291930621024221182 7839047.0068216221407055855,-731771.0291930621024221182 7837326.6151750516146421432,-730750.6747404498746618629 7832795.7048286721110343933,-730626.9987861795816570520 7832050.9958565970882773399,-730657.9456046206178143620 7831076.7324042050167918205,-731059.9202858755597844720 7829414.6665635276585817337,-731369.1658312984509393573 7828900.0508747342973947525,-731987.5456026557367295027 7828555.4119750792160630226,-732791.4949651627102866769 7828670.2898664269596338272,-737491.6265054368413984776 7830790.1717676045373082161,-744634.6642711699241772294 7834230.0278706122189760208,-745840.6996344230137765408 7834859.9775811564177274704,-746922.9477239146362990141 7835719.9476449796929955482,-748159.8185861204983666539 7837383.1912799999117851257,-748376.2236762228421866894 7838071.6365813584998250008,-748592.7400858164764940739 7839677.3573641553521156311,-748561.7932673753239214420 7843064.4278551321476697922,-753942.3095353774260729551 7848059.0666098510846495628,-754375.2310350706102326512 7848576.4335481449961662292,-754622.5829436141066253185 7849150.7067721011117100716,-755395.4741681915475055575 7851850.8092466006055474281,-755271.7982139212545007467 7852655.8140139542520046234,-751128.2641276133945211768 7861511.7600345788523554802,-738883.2314598453231155872 7884909.0200083097442984581,-737244.2745968961389735341 7884965.9531716629862785339,-736471.2720528275240212679 7884736.1452953089028596878,-735512.6999176061945036054 7883870.5845353407785296440,-733193.5809659088263288140 7881388.9321941649541258812,-732296.7911480785114690661 7880235.5228319214656949043,-731616.5177398419473320246 7879139.1787895429879426956,-730874.3506947230780497193 7877178.4070259826257824898,-730750.6747404498746618629 7874584.8250432880595326424,-730626.9987861795816570520 7873834.5395373199135065079,-729946.6140584516106173396 7872625.2344198366627097130,-719495.0497068528784438968 7864850.1802075924351811409,-715784.3258007498225197196 7864043.8767328895628452301,-709723.6474439995363354683 7868016.1309835584834218025,-711980.9840783060062676668 7884332.0245320610702037811,-714702.1890307466965168715 7890971.9028529813513159752,-714825.8649850197834894061 7891549.4058504449203610420,-714578.5130764764035120606 7892472.8369492143392562866,-713248.8017589501105248928 7893918.7326100040227174759,-706384.0627202015602961183 7901375.5957725411280989647,-701776.6603157594799995422 7901664.8440894046798348427,-698746.3211373842786997557 7898773.6923043765127658844,-688109.1871946330647915602 7886756.0343129066750407219,-687336.0733310730429366231 7885542.9970754394307732582,-686068.2556504289386793971 7883177.9580443715676665306,-685511.6581964626675471663 7881908.5846560634672641754,-684181.9468789363745599985 7878562.6237914720550179482,-683934.5949703956721350551 7877121.3249458475038409233,-683130.6456078859046101570 7859786.2546087922528386116,-684243.8405158185632899404 7846279.7762876143679022789,-684367.6277895801467821002 7843178.0795488543808460236,-682914.2405177834443747997 7824374.1760758152231574059,-682079.3443368354346603155 7822943.3661821372807025909,-656692.2665444836020469666 7809731.3453689971938729286,-655300.7729095664108172059 7809160.0521987508982419968,-654558.6058644475415349007 7809331.2093394454568624496,-649363.7705070892116054893 7812131.7817999981343746185,-642189.7859229178866371512 7815962.2014425937086343765,-640148.9656982050510123372 7816763.4007026748731732368,-639314.0695172541309148073 7816706.7724281931295990944,-628862.3938461641082540154 7813446.1090800398960709572,-628522.2014823001809418201 7812759.6914533944800496101,-630222.9406626402633264661 7802989.8662061607465147972,-630501.2393896249122917652 7802133.6009787861257791519,-631212.5709357938030734658 7801048.7123676566407084465,-646055.1326017323881387711 7784000.6438278378918766975,-647477.4617355966474860907 7782691.4057300575077533722,-648652.5502804114948958158 7781951.8044139267876744270,-649332.8236886481754481792 7781723.4609073279425501823,-650940.8337331590009853244 7781665.4537310823798179626)),((-673606.5952535760588943958 7826722.5511717032641172409,-674627.0610256794607266784 7826779.2543275719508528709,-675276.4989349662791937590 7827123.6062415624037384987,-675523.8508435097755864263 7827696.4610423119738698006,-676760.7217057127272710204 7831764.6046938020735979080,-676791.5572046625893563032 7832624.0170202022418379784,-676637.0457514424342662096 7841112.9844846883788704872,-676049.5014790350105613470 7848633.3005767501890659332,-675183.6584796457318589091 7852886.3040355583652853966,-674998.2002079845406115055 7853633.0654424177482724190,-671442.0990745929302647710 7861339.4196276441216468811,-671009.2888943881262093782 7861856.2454785956069827080,-668257.1371235062833875418 7864791.7405201056972146034,-665690.5549437770387157798 7862143.9846739172935485840,-665350.4738994014915078878 7861453.3461393844336271286,-665319.5270809632493183017 7860590.4473247332498431206,-666803.8611712008714675903 7831994.2532315347343683243,-667298.5649882850702852011 7830503.6219702130183577538,-667607.8105337079614400864 7829874.2407008716836571693,-668628.2763058113632723689 7828900.0508747342973947525,-670916.4484390676952898502 7827581.5979150198400020599,-673606.5952535760588943958 7826722.5511717032641172409)),((-810777.0321573371766135097 7841801.7689958875998854637,-814147.5636995763052254915 7842260.4425088372081518173,-814889.6194252038840204477 7842604.0526296412572264671,-821321.4369642564561218023 7846508.4183434061706066132,-822434.6318721891148015857 7847254.5506350584328174591,-824289.9938252406427636743 7850989.0049488563090562820,-824815.6444607658777385950 7852310.0921453200280666351,-824877.5380976480664685369 7853115.1457784250378608704,-824475.4520969019504263997 7855587.7400682382285594940,-824228.1001883612480014563 7856334.5611695535480976105,-823795.1786886652698740363 7856852.7012757556512951851,-819064.2116494412766769528 7860590.4473247332498431206,-818321.9332848311169072986 7860821.1792277200147509575,-812694.1764277797192335129 7859612.2967918114736676216,-809973.0827948274090886116 7858980.4908027257770299911,-806416.9816614357987418771 7858117.8740360643714666367,-802025.9843470960622653365 7854897.6998469531536102295,-801778.6324385525658726692 7854207.7225553095340728760,-801747.7969396027037873864 7846221.2731461282819509506,-801995.1488481462001800537 7845416.9524751473218202591,-805891.3310259105637669563 7843064.4278551321476697922,-806478.7639788266969844699 7842777.6198937362059950829,-809169.0221128291450440884 7842088.7466019783169031143,-810777.0321573371766135097 7841801.7689958875998854637)),((-805242.0044361121254041791 7863756.2724463250488042831,-814271.2396538465982303023 7863871.6858208188787102699,-815013.2953794742934405804 7864100.8601484736427664757,-815539.0573344907024875283 7864619.3253505919128656387,-815693.5687877108575776219 7868707.3692137449979782104,-815446.2168791702715680003 7872164.7161779273301362991,-817950.9054220173275098205 7873546.3550861412659287453,-825062.9963693093741312623 7877121.3249458475038409233,-829948.6975007359869778156 7876256.8436097716912627220,-831309.2443172121420502663 7875852.9685768820345401764,-832329.7100893127499148250 7875966.9064698787406086922,-833350.1758614162681624293 7876717.6112698679789900780,-838946.9859000294236466289 7880869.1077992143109440804,-839379.9073997226078063250 7881273.2510386267676949501,-839720.0997635865351185203 7881850.0129269957542419434,-839720.0997635865351185203 7882831.0454295976087450981,-833937.6088143324013799429 7893398.0451419055461883545,-833102.8239528727717697620 7894553.4665402770042419434,-831865.8417711785295978189 7895190.1264471393078565598,-827382.2266404979163780808 7894842.4535497147589921951,-809849.4068405569996684790 7895478.9297529878094792366,-809416.3740213698474690318 7896114.0029696635901927948,-806478.7639788266969844699 7899756.9260776657611131668,-801191.1994856364326551557 7901839.5646060863509774208,-800232.6273504151031374931 7901896.8338320590555667877,-787616.3441808507777750492 7892531.6991114467382431030,-786750.5011814616154879332 7891549.4058504449203610420,-786565.0429098003078252077 7890683.0639442158862948418,-795656.0604449228849261999 7866116.6916231373324990273,-796367.3919910918921232224 7864964.1596209304407238960,-797975.2907161087496206164 7864676.3131026867777109146,-805242.0044361121254041791 7863756.2724463250488042831)),((-801995.1488481462001800537 7904963.7670821649953722954,-803695.8880284862825646996 7905253.1529692234471440315,-803633.9943916040938347578 7906178.2622187910601496696,-802922.7741649263771250844 7907394.6201119190081954002,-801345.7109388565877452493 7909709.9304114840924739838,-800356.3033046883065253496 7910578.4592534480616450310,-798593.6704874660354107618 7911563.0240568816661834717,-797789.7211249590618535876 7911795.3183526406064629555,-797047.6653993285726755857 7911679.1703105298802256584,-795346.9262189912842586637 7909479.3680197680369019508,-795408.7085363793885335326 7908494.8666790891438722610,-795934.4704913959139958024 7908030.6968740494921803474,-796491.0679453621851280332 7907683.8908374262973666191,-801129.3058487570378929377 7905021.0600231559947133064,-801995.1488481462001800537 7904963.7670821649953722954)),((-954626.5271892031887546182 7925129.6127497013658285141,-955399.5297332719201222062 7925187.0590954320505261421,-958028.0055498805595561862 7926406.2782483883202075958,-958677.4434591701719909906 7926755.4090198026970028877,-959728.6334107293514534831 7930180.2969843065366148949,-959419.4991847977507859468 7930877.2520577358081936836,-955523.3170070333871990442 7930411.4932919247075915337,-953513.3322812705300748348 7929540.6768891820684075356,-952307.5195569969946518540 7928786.5801868764683604240,-952029.1095105211716145277 7928322.6224836604669690132,-952369.3018743880093097687 7927683.1600318755954504013,-954626.5271892031887546182 7925129.6127497013658285141)),((-787430.7745896981796249747 7941686.0055912025272846222,-787894.6429078353103250265 7942150.7870398368686437607,-787770.9669535622233524919 7944826.7693878216668963432,-787430.7745896981796249747 7945525.2904836768284440041,-782885.2658221382880583405 7949598.1104610562324523926,-782297.7215497308643534780 7949889.2152951927855610847,-780040.4962349156849086285 7950471.2491385219618678093,-779174.6532355237286537886 7950530.3562806798145174980,-778525.2153262369101867080 7950239.4362448817119002342,-778587.1089631190989166498 7949249.5958655448630452156,-778958.1368259328883141279 7944419.4159345766529440880,-779112.7595986443338915706 7943662.1531161759048700333,-779947.7670990836340934038 7942441.6040757866576313972,-787430.7745896981796249747 7941686.0055912025272846222)),((-720670.0269321736413985491 7956470.2657709643244743347,-720546.3509779033483937383 7955596.4309239611029624939,-720670.0269321736413985491 7954782.0477885073050856590,-727813.0646979068405926228 7949772.4785993508994579315,-728493.4494256346952170134 7949481.3782793292775750160,-731430.9481486893491819501 7948725.2825949238613247871,-732203.9506927580805495381 7948608.5639465516433119774,-737058.8163252320373430848 7949366.3244531759992241859,-737831.8188693007687106729 7949540.6872226530686020851,-740614.8061391324736177921 7950530.3562806798145174980,-741635.2719112358754500747 7951403.6031045736744999886,-742099.0289098789216950536 7951985.7540601119399070740,-744943.9098165928153321147 7958511.1471517411991953850,-745685.9655422203941270709 7960493.1864522015675902367,-746366.2389504598686471581 7964516.5794345876201987267,-746613.5908590005710721016 7967083.5220405189320445061,-746520.9730426626047119498 7968893.2158791339024901390,-745562.2895879501011222601 7971811.1980586852878332138,-745222.2085435773478820920 7972452.7385530890896916389,-741697.0542286268901079893 7976659.0013084486126899719,-741295.0795473719481378794 7977125.9482289021834731102,-740583.9706401826115325093 7977477.4395719552412629128,-737986.4416420122142881155 7977477.4395719552412629128,-737151.5454610640881583095 7977360.2739647664129734039,-736378.5429169953567907214 7977008.7881000870838761330,-734554.1277823849814012647 7976833.9978371746838092804,-733997.5303284185938537121 7977068.3144723521545529366,-733626.5024656048044562340 7977827.2644502716138958931,-734182.9886000799015164375 7978353.8205026816576719284,-734739.5860540462890639901 7978645.8299302291125059128,-735574.5935544855892658234 7978820.8727197982370853424,-742501.0035911338636651635 7979522.3471052441745996475,-743428.7402274052146822214 7979580.2100927950814366341,-744109.0136356446892023087 7979405.1496189218014478683,-744634.6642711699241772294 7978878.7303074216470122337,-752674.4918547333218157291 7966966.5182834491133689880,-748716.4160400867694988847 7957752.2556198462843894958,-748376.2236762228421866894 7957054.4870444852858781815,-747943.3021765268640592694 7956646.2615891080349683762,-746428.1325873392634093761 7956179.1160528566688299179,-745438.6136336798081174493 7955247.6384827783331274986,-744170.7959530327934771776 7953558.2269180696457624435,-743583.3630001166602596641 7952276.7415983201935887337,-743336.0110915759578347206 7951694.5681378180161118507,-741913.4593187292339280248 7946455.3561793249100446701,-741449.7023200833937153220 7943139.6945446738973259926,-741635.2719112358754500747 7942267.4056255519390106201,-749767.7173111372394487262 7930818.2989529734477400780,-774876.4963765044230967760 7910288.8690335713326931000,-775402.1470120325684547424 7909884.8373241545632481575,-776175.2608755896799266338 7909709.9304114840924739838,-776824.4761458968278020620 7909942.1676476104184985161,-777443.0785562365781515837 7910463.9978594612330198288,-792594.8857675979379564524 7928379.8841866310685873032,-792934.9668119734851643443 7929076.6727590663358569145,-793089.5895846848143264651 7929773.5257634706795215607,-793336.9414932255167514086 7932386.1485914569348096848,-793182.3187205140711739659 7933316.2661125017330050468,-792409.3161764453398063779 7933373.7748991921544075012,-790801.3061319373082369566 7933083.3077363111078739166,-789502.6529523433418944478 7932269.6828811541199684143,-788543.9694976309547200799 7930585.4177934592589735985,-786565.0429098003078252077 7929773.5257634706795215607,-782452.4556419336004182696 7932154.8916895156726241112,-760343.0689365004654973745 7946514.4317998429760336876,-760775.9904361936496570706 7947096.2047789441421627998,-765816.3143403317080810666 7953150.1910642273724079132,-772000.6686513522872701287 7956761.6365282991901040077,-773237.6508330465294420719 7957403.3632442764937877655,-777566.7545105068711563945 7958802.3871165215969085693,-778432.4861904048593714833 7958743.2149719782173633575,-781679.3417783735785633326 7957228.8182288901880383492,-782545.1847777627408504486 7957286.5099434768781065941,-783194.5113675611792132258 7957520.2183597078546881676,-787616.3441808507777750492 7959442.8189643006771802902,-791790.9364050909643992782 7963933.4582474185153841972,-791914.6123593612574040890 7964633.5450868243351578712,-788605.8631345131434500217 7969008.5686866920441389084,-785420.9011834264965727925 7971577.0452094133943319321,-785668.2530919699929654598 7974964.7744164736941456795,-789688.1112240046495571733 7982152.3016326762735843658,-793336.9414932255167514086 7993269.8519307244569063187,-793522.5110843779984861612 7994733.5469595398753881454,-793491.5642659397562965751 7995671.4061694080010056496,-789750.0048608868382871151 8005634.5332959173247218132,-785822.8758646814385429025 8013733.6948617883026599884,-785420.9011834264965727925 8014378.8262904621660709381,-783751.1088215275667607784 8016493.4368419172242283821,-782792.5366863062372431159 8017491.9634408326819539070,-780133.2253707449417561293 8016904.7155841961503028870,-779360.2228266762103885412 8016728.9942470602691173553,-770300.0407905034953728318 8012853.1757603893056511879,-769001.2762914182385429740 8012148.5812776368111371994,-768753.9243828747421503067 8011502.1624122951179742813,-769001.2762914182385429740 8010739.5907647507265210152,-770361.9344273856841027737 8010210.9706140225753188133,-772124.3446056226966902614 8006924.9379145596176385880,-765228.7700679242843762040 7990693.9523769477382302284,-764548.4966596876038238406 7989641.0427555870264768600,-763868.2232514509232714772 7989171.6321176402270793915,-763651.8181613485794514418 7990050.8529532160609960556,-765129.9183600998949259520 8004928.2938264198601245880,-757549.5063150412170216441 8008575.9065968403592705727,-751448.1963441522093489766 8006331.3369063120335340500,-750819.6864991351030766964 8008857.0530969668179750443,-755478.8524667968740686774 8015665.8727857079356908798,-757869.3272120916517451406 8022075.6411512596532702446,-758951.6866210744483396411 8026368.0272229677066206932,-758704.2233930396614596248 8027367.8694736715406179428,-756725.1854857178404927254 8031073.4454955356195569038,-742841.1959549977909773588 8041025.3970633633434772491,-741202.3504115398973226547 8041085.4333740184083580971,-740522.0770033032167702913 8040908.9322353173047304153,-739934.5327308957930654287 8039494.5276033077389001846,-730286.8064223156543448567 8043265.7350367736071348190,-729173.7228338741697371006 8044031.6221584426239132881,-707466.3108096930664032698 8064043.7281609382480382919,-702487.8805424371967092156 8068655.7719786865636706352,-700508.8426351153757423162 8070607.0664195213466882706,-698746.3211373842786997557 8074868.7607897184789180756,-698220.6705018590437248349 8075341.8639872856438159943,-697633.1262294516200199723 8075756.5997826606035232544,-696829.1768669418524950743 8075815.2102414192631840706,-696087.0098218229832127690 8075579.2793005006387829781,-695128.4376866045640781522 8074927.3642917294055223465,-694046.1895971101475879550 8073981.2402468603104352951,-692778.2605969748692587018 8072323.2547035785391926765,-686408.4480142928659915924 8057190.8337126951664686203,-686377.3898763634497299790 8056186.7913654660806059837,-690644.7112364327767863870 8042500.1383879883214831352,-693798.7263690782710909843 8034369.8655051235109567642,-699055.5666828071698546410 8028014.1747573809698224068,-703972.2146326749352738261 8022899.0452594198286533356,-704460.6845582755049690604 8017467.8551338436082005501,-704479.2749132377794012427 8016939.3951310329139232635,-704386.4344579173484817147 8016516.6962206689640879631,-704126.7260858950903639197 8016164.2186422776430845261,-703737.1078681189101189375 8015952.9937641918659210205,-699655.3560992020647972822 8014296.5964280683547258377,-699228.7798104838002473116 8014156.2369969626888632774,-698746.3211373842786997557 8014261.9290954815223813057,-698375.2932745704893022776 8014437.5926568955183029175,-697466.1469932614127174020 8015248.9537850487977266312,-692500.0731894843047484756 8016551.3739738147705793381,-691139.4150535169756039977 8018079.2572728907689452171,-687119.6682409706991165876 8021781.7261899784207344055,-686593.9062859541736543179 8022251.4877907298505306244,-685728.1746060563018545508 8022075.6411512596532702446,-684398.4632885300088673830 8021310.5129202296957373619,-684274.7873342595994472504 8020606.6046414244920015335,-685542.6050149037037044764 8013322.3785514980554580688,-686222.8784231403842568398 8012030.8735322710126638412,-687088.7214225324569270015 8010915.3831741800531744957,-692932.9946891774889081717 8005987.3612213982269167900,-697280.5774021089309826493 8004509.4375922940671443939,-704553.4136941075557842851 8005811.0507594170048832893,-708734.1284903400810435414 8000709.9760819813236594200,-709630.8069886791054159403 7995846.6352075962349772453,-709878.2702167109819129109 7995085.8629775904119014740,-710465.8144891184056177735 7994616.1119595533236861229,-723267.5559303440386429429 7987826.3474211450666189194,-728926.2596058394992724061 7986656.5289644505828619003,-734832.3151898783398792148 7985194.4066915316507220268,-736965.9758699116064235568 7984550.3039665548130869865,-736842.2999156413134187460 7983790.4642846547067165375,-734121.2062826890032738447 7983790.4642846547067165375,-723236.6091119057964533567 7985719.7945190295577049255,-714702.1890307466965168715 7988821.2787511013448238373,-713588.8828033227473497391 7989523.6873462749645113945,-712723.0398039335850626230 7989581.4167081136256456375,-712011.8195772558683529496 7989348.3950684312731027603,-711393.4398058985825628042 7988061.0070491367951035500,-707311.6880369817372411489 7974263.7251747092232108116,-707621.0449018958024680614 7973622.0301446886733174324,-710898.6246693232096731663 7969242.6415702234953641891,-718876.5586160043021664023 7960608.4105123337358236313,-720670.0269321736413985491 7956470.2657709643244743347)),((-761301.6410717188846319914 8009859.4229130959138274193,-764672.1726139578968286514 8010270.5494405198842287064,-765105.0941136539913713932 8010797.6947713699191808701,-766867.6156113849719986320 8018842.5753356879577040672,-766991.2915656553814187646 8019723.7977412352338433266,-766960.4560667055193334818 8020546.9436763981357216835,-766063.6662488752044737339 8020900.4735544379800558090,-763682.6536602984415367246 8020253.0886142896488308907,-763002.3802520589670166373 8020019.1129028648138046265,-758054.8968032441334798932 8015494.8317113332450389862,-756354.1576229040510952473 8013262.7754890210926532745,-756013.9652590401237830520 8010915.3831741800531744957,-756354.1576229040510952473 8010152.8711501006036996841,-757219.8893028020393103361 8010093.2932578660547733307,-761301.6410717188846319914 8009859.4229130959138274193)),((-314415.7791736071230843663 8154254.7761839749291539192,-319394.2094408630509860814 8157366.1753244427964091301,-330618.8876560217468068004 8167308.6114223692566156387,-334886.2090160911320708692 8167428.7901212638244032860,-340328.3962819929001852870 8166529.9781254148110747337,-346265.5100039612734690309 8164853.0323724383488297462,-347285.8644565735012292862 8163834.4085745373740792274,-347285.8644565735012292862 8162936.2459341324865818024,-353130.2490427098236978054 8161138.3053241176530718803,-354923.7173588819568976760 8160958.9447254370898008347,-355665.7730845095939002931 8161199.0991994673386216164,-367725.4588001076481305063 8168688.0861030211672186852,-368838.6537080403068102896 8169587.1586798103526234627,-372425.5903403817792423069 8173004.6682517323642969131,-374157.1650196717237122357 8178705.0871962811797857285,-374373.6814292625058442354 8179425.5645581595599651337,-374930.2788832288933917880 8182547.5026265401393175125,-374930.2788832288933917880 8183448.0348873659968376160,-373074.9169301773654296994 8203416.1640427159145474434,-372951.2409759070142172277 8204198.6678917976096272469,-369302.4107066861470229924 8208416.5876278001815080643,-364880.5778933937544934452 8210707.7649166425690054893,-364262.1981220393208786845 8211009.2139681084081530571,-360551.4742159362649545074 8212034.3190615437924861908,-358325.0844000709475949407 8212575.6871830569580197334,-356500.6692654576618224382 8212575.6871830569580197334,-355758.6135398300248198211 8212274.3916364107280969620,-342523.9505989083554595709 8206730.1735943248495459557,-342091.0290992152295075357 8206187.4960609087720513344,-333772.9027886672411113977 8195470.6866239896044135094,-333432.8217442945460788906 8194809.9391960911452770233,-333494.6040616855025291443 8192464.1212498266249895096,-328083.2522947335965000093 8180025.7274808306246995926,-317507.9006693732226267457 8175105.2581908330321311951,-310921.5716770977014675736 8169886.7297789873555302620,-306778.0375907898996956646 8162635.0137194916605949402,-314415.7791736071230843663 8154254.7761839749291539192)),((-298985.5619157699984498322 8220299.1448121173307299614,-299418.5947349572088569403 8220841.3329649502411484718,-299634.9998250596108846366 8221565.9059020085260272026,-299851.4049151591607369483 8223196.1274644229561090469,-299727.7289608888677321374 8225974.6323513938114047050,-299511.3238707864657044411 8226880.4422335214912891388,-298831.0504625497851520777 8228271.2331709414720535278,-288626.7267000032588839531 8243452.6631679208949208260,-284483.1926136954571120441 8246179.0146229611709713936,-282133.1268435569945722818 8246601.6288391575217247009,-268774.6766288737417198718 8248480.1329240286722779274,-267970.7272663667681626976 8248541.8635866008698940277,-267414.2411318888189271092 8248298.8702376186847686768,-267166.7779038569424301386 8247752.9276838572695851326,-266857.6436779224895872176 8246238.7635718090459704399,-266084.5298143653781153262 8241818.2048465302214026451,-266053.5829959242837503552 8241091.4344580508768558502,-277804.0231660994468256831 8233529.1847231518477201462,-286183.9317940355394966900 8232924.6855317205190658569,-286895.0407012220821343362 8232924.6855317205190658569,-291718.9595152577967382967 8231594.6123727718368172646,-292213.6633323419373482466 8231049.8974807532504200935,-298490.8580986858578398824 8222834.4047459559515118599,-298985.5619157699984498322 8220299.1448121173307299614)),((-320321.8347576460218988359 8229962.5458649722859263420,-319827.1309405590291135013 8235040.7570098340511322021,-319827.1309405590291135013 8235947.8917335318401455879,-320260.0524402550654485822 8236492.7484609037637710571,-326908.2750694099231623113 8241939.3764892881736159325,-329351.0699753776425495744 8242847.3550463952124118805,-330124.1838389376061968505 8242908.8208849569782614708,-330835.4040656153811141849 8242725.9506133524700999260,-331330.1078826995217241347 8242182.1615991787984967232,-331082.7559741588775068521 8241455.5734806824475526810,-331391.8902000904781743884 8239578.8471431769430637360,-332628.8723817847203463316 8237702.3775628153234720230,-333092.6293804305605590343 8237158.9565887460485100746,-333865.7432439905242063105 8237037.6451956499367952347,-334329.6115621248027309775 8237582.7997531481087207794,-337112.5988319564494304359 8242242.0963095873594284058,-342152.8114166033337824047 8250783.7109698904678225517,-342369.3278261969680897892 8251511.2134703490883111954,-342462.0569620290189050138 8252358.8198936972767114639,-341936.4063265009317547083 8252358.8198936972767114639,-339400.7709652127814479172 8251874.3368008276447653770,-322517.3890745614771731198 8245452.0349454907700419426,-321713.3283925604191608727 8244482.2581625692546367645,-317229.6019423886900767684 8238549.9323515286669135094,-317600.7411246937117539346 8234497.5308964215219020844,-320321.8347576460218988359 8229962.5458649722859263420)),((-131418.8927729424904100597 8450002.4812638033181428909,-128852.3105932132166344672 8443217.6614618655294179916,-125358.1030967037950176746 8433582.1149839032441377640,-125296.3207793128385674208 8432711.8850616905838251114,-125636.4018236883857753128 8431904.8170470520853996277,-127646.3865494513302110136 8429172.3116981964558362961,-128357.6067761290905764326 8429419.5413138214498758316,-129470.8016840617492562160 8430413.9085405077785253525,-130305.6978650098317302763 8430350.8623820859938859940,-132160.9484985729504842311 8428116.6498009692877531052,-134943.9357684046262875199 8422655.4660612400621175766,-135871.6724046760064084083 8404748.7486409302800893784,-140293.5052179655758664012 8369126.5888590998947620392,-140540.8571265090431552380 8368263.9417213918641209602,-141221.1305347457237076014 8366662.4036922659724950790,-145488.4518948150798678398 8368079.4977552164345979691,-152724.2187963774194940925 8375657.2470140000805258751,-153404.4922046140709426254 8378000.7946866620332002640,-153373.5453861758287530392 8378925.4125343877822160721,-148240.4923462056613061577 8399056.8686607982963323593,-148059.1528957030095625669 8399737.8898180592805147171,-147652.9480737982376012951 8400726.4732431881129741669,-147220.0265741050534415990 8401407.8715051133185625076,-146539.7531658655498176813 8401716.9709801133722066879,-145983.1557118992204777896 8401220.8147236928343772888,-145612.1278490854019764811 8401716.9709801133722066879,-145364.6646210535254795104 8402581.9839985016733407974,-141190.1837163046002388000 8420607.5621528327465057373,-140602.7507633884088136256 8423585.7077235877513885498,-140386.2343537948036100715 8425571.2122797425836324692,-140293.5052179655758664012 8427432.9978936556726694107,-140448.1279906769923400134 8428923.3022035919129848480,-143045.5456693561282008886 8448880.8431634176522493362,-143756.7658960339031182230 8453677.0226260423660278320,-156218.3149733956088311970 8456916.9774842560291290283,-156991.4288369555724784732 8456730.2986293677240610123,-157424.3503366515797097236 8456043.9804964791983366013,-156991.4288369555724784732 8455484.2490402068942785263,-154455.7934756673930678517 8452742.9660407453775405884,-151796.4821601060393732041 8451061.2907705008983612061,-150621.5049347824242431670 8446391.3914110194891691208,-151208.9378876986156683415 8442720.4902771990746259689,-161258.6388775336963590235 8433457.5345053281635046005,-161815.2363315000548027456 8433767.9831401184201240540,-165927.9349188579944893718 8437185.1261108089238405228,-169236.5728242177283391356 8440233.3476771246641874313,-170009.5753682836075313389 8441476.8137898929417133331,-170071.4690051658253651112 8442346.2903630267828702927,-169947.7930508954741526395 8443156.2970731183886528015,-169174.6791873355396091938 8444649.7919906452298164368,-176874.3144070349808316678 8447947.1719167567789554596,-183429.8079003578168340027 8449939.2668903525918722153,-184233.7572628676134627312 8450250.6365618128329515457,-185316.0053523592068813741 8451309.2576242219656705856,-186398.3647613420034758747 8453240.8157563824206590652,-186800.3394425969163421541 8454798.0473017022013664246,-188470.1318044959043618292 8462278.6146730221807956696,-188439.1849860548099968582 8463214.1092274021357297897,-188284.5622133433935232460 8464213.0597421079874038696,-185563.4685803939064498991 8466771.9181299507617950439,-184264.7040813087369315326 8467521.0319710131734609604,-181265.3117213746591005474 8468456.9699385277926921844,-177740.1574064241431187838 8468643.9471145477145910263,-176967.0435428642085753381 8468270.2222475465387105942,-164165.3021016385464463383 8470204.4483535364270210266,-160949.3933321108634117991 8471015.7343615088611841202,-158846.6794705158390570432 8471641.6255598831921815872,-149817.5555722754215821624 8475826.3957046549767255783,-146972.6746655615570489317 8479513.8849765919148921967,-160949.3933321108634117991 8502995.4172549173235893250,-167226.5880984519608318806 8505066.4277327470481395721,-172947.1854108295519836247 8506384.6276615001261234283,-173472.8360463547869585454 8505819.4621988646686077118,-174215.0030914736271370202 8505819.4621988646686077118,-179193.4333587295259349048 8506069.2861623000353574753,-179409.9497683231602422893 8506634.6967900414019823074,-179224.3801771706202998757 8507701.4831505790352821350,-177338.1827251692302525043 8513666.3284741286188364029,-172205.1296852019149810076 8520012.6112211719155311584,-157640.7554267539526335895 8535683.0980203952640295029,-157022.3756553966668434441 8536124.2363177780061960220,-144931.7431213575182482600 8542869.1372172459959983826,-144251.4697131208667997271 8542427.5922357551753520966,-144066.0114414595882408321 8541606.7752905581146478653,-143323.8443963407189585268 8537572.8084496092051267624,-144282.4165315619611646980 8509897.8982137348502874374,-143231.1152605086681433022 8505379.9191853515803813934,-129563.5308198938146233559 8501615.7458084020763635635,-115926.8931977172323968261 8499923.0623582229018211365,-115463.0248795801308006048 8499296.1079841032624244690,-115524.9185164623195305467 8498356.2282211538404226303,-118678.9336491077992832288 8479889.9833878260105848312,-122575.1158268721337663010 8461406.7763581350445747375,-129594.4776383320713648573 8457478.3888761196285486221,-129779.9359099933644756675 8458288.2701066788285970688,-132130.0016801318561192602 8460034.9014685377478599548,-133026.7914979621418751776 8460283.1714041661471128464,-133459.7129976581491064280 8459598.0924596134573221207,-133645.2825888106599450111 8458599.9938295967876911163,-133366.9838618260982912034 8456916.9774842560291290283,-131975.4902269116719253361 8451247.8256347682327032089,-131418.8927729424904100597 8450002.4812638033181428909)),((-122977.0905081270466325805 8508642.7878556754440069199,-125512.7258694152260432020 8508830.7921410575509071350,-126904.2195043324754806235 8509522.0657078959047794342,-127213.4650497553229797632 8510211.8223970048129558563,-130274.7510465715749887750 8518065.2058855388313531876,-131635.2978630448924377561 8533415.0009105317294597626,-131758.9738173180376179516 8535179.6204684469848871231,-131511.6219087745703291148 8539904.5999362692236900330,-131295.2168186721683014184 8541923.6505688149482011795,-131047.7535906402918044478 8542869.1372172459959983826,-123564.6347805344703374431 8563139.6324080415070056915,-122296.8170998903806321323 8564088.0930764134973287582,-121616.5436916508915601298 8564404.1221806351095438004,-120750.7006922617147210985 8564468.5591860376298427582,-117658.5791964956006268039 8564277.2990620024502277374,-110948.4629304584959754720 8562886.0322308056056499481,-110329.9718396128009771928 8561811.1747258920222520828,-109371.3997043915587710217 8547157.2547364681959152222,-109402.3465228326531359926 8546210.9867958705872297287,-113298.5287005969876190647 8516304.7046306654810905457,-113453.1514733084186445922 8515300.2185145672410726547,-113917.0197914426826173440 8512598.6735706087201833725,-114164.3716999861644580960 8511656.8606676571071147919,-114597.1818801909394096583 8510965.3857190217822790146,-122977.0905081270466325805 8508642.7878556754440069199)),((-92951.7748123833152931184 8551198.1008841041475534439,-104145.6175285921781323850 8551449.4778003897517919540,-106712.0883888302196282893 8553280.9716154523193836212,-107485.2022523901687236503 8554543.7577994950115680695,-106835.7643431033793604001 8559852.6179195307195186615,-104516.6453914059820817783 8578775.7893092986196279526,-98301.3442619442648719996 8589683.3030100073665380478,-97775.5823069277830654755 8590192.3755585104227066040,-89735.8660428556468104944 8589303.3496326003223657608,-86025.2534562438231660053 8587145.7811966780573129654,-85468.6560022774938261136 8586638.7480191215872764587,-84386.4079127859295113012 8584100.4570038504898548126,-84293.5674574654694879428 8583213.9983862955123186111,-85004.7876841432298533618 8578521.6460732165724039078,-91251.0356320432183565572 8554734.7635270673781633377,-92951.7748123833152931184 8551198.1008841041475534439)))'
+ ,0) as p1
+ )
+ select 10 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, 10.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, 10.0 * 1000, 25))from viewy
+ union all select 20 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, 20.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, 20.0 * 1000, 25))from viewy
+ union all select 50 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, 50.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, 50.0 * 1000, 25))from viewy
+ union all select 100 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, 100.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, 100.0 * 1000, 25))from viewy
+ union all select -10 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, -10.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, -10.0 * 1000, 25))from viewy
+ union all select -20 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, -20.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, -20.0 * 1000, 25))from viewy
+ union all select -50 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, -50.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, -50.0 * 1000, 25))from viewy
+ union all select -100 as w,ST_NumGeometries(p1),ST_Area(ST_Buffer(p1, -100.0 * 1000, 25)),ST_NumGeometries(ST_Buffer(p1, -100.0 * 1000, 25))from viewy
+
+Checked are 10,20,50,100 kilometer, inflate/deflate
+
+But for many, in the unit tests below, distance of 1,2,5 k are kept too
+because they could cause self-intersections in the past
+
+Values are not identical. We might check area with less precision.
+
+gr:
+ 336277774579
+ 442312549699
+ 680433051228
+ 910463608938
+
+ 139313936462
+ 96993175731
+ 31392586710
+ 2033070670
+
+it:
+ 655017269701
+ 749348852219
+ 1018311961402
+ 1436442592714
+
+ 477946399339
+ 404696093915
+ 238752534654
+ 69771921799
+
+nl:
+ 123407901256
+ 145045853638
+ 201203536326
+ 303295187184
+
+ 64669284652
+ 46684337476
+ 10245330928
+ 0
+
+no:
+ 2102032030338
+ 2292165016326
+ 2725461758029
+ 3374949015149
+
+ 1361202945650
+ 1089854028969
+ 649632754053
+ 306749522531
+
+uk:
+ 857680535981
+ 970483182932
+ 1247820319617
+ 1659854829029
+
+ 572557777232
+ 479260087245
+ 274834862993
+ 78209736228
+
+*/
+
+template <typename MP, typename P>
+void test_one(std::string const& caseid, std::string const& wkt, double expected_area, double distance,
+ ut_settings settings = ut_settings())
+{
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::end_flat end_flat;
+
+ // Test with a high tolerance, even a difference of 1000 is only ~1.0e-6%
+
+ settings.tolerance = 10000.0;
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ // in case robustness policies are changed, areas should be adapted
+ settings.tolerance = boost::starts_with(caseid, "no") ? 200000.0 : 100000.0;
+#endif
+
+ test_one<MP, P>(caseid, wkt, join_round, end_flat,
+ expected_area, distance * 1000.0, settings);
+}
+
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P, Clockwise> pt;
+ typedef bg::model::multi_polygon<pt> mpt;
+
+ std::string base_folder = "data/";
+ std::string gr = read_from_file<mpt>(base_folder + "gr.wkt");
+ std::string it = read_from_file<mpt>(base_folder + "it.wkt");
+ std::string nl = read_from_file<mpt>(base_folder + "nl.wkt");
+ std::string no = read_from_file<mpt>(base_folder + "no.wkt");
+ std::string uk = read_from_file<mpt>(base_folder + "uk.wkt");
+
+ test_one<mpt, pt>("gr10", gr, 336279815682, 10);
+ test_one<mpt, pt>("gr20", gr, 442317491749, 20);
+ test_one<mpt, pt>("gr50", gr, 680442278645, 50);
+ test_one<mpt, pt>("gr100", gr, 910474621215, 100);
+
+ test_one<mpt, pt>("gr10", gr, 139313156846, -10);
+ test_one<mpt, pt>("gr20", gr, 96991350242, -20);
+ test_one<mpt, pt>("gr50", gr, 31391928002, -50);
+ test_one<mpt, pt>("gr100", gr, 2035400805, -100);
+
+ test_one<mpt, pt>("it1", it, 569862998347, 1);
+ test_one<mpt, pt>("it2", it, 579239208963, 2);
+ test_one<mpt, pt>("it5", it, 607625463736, 5);
+ test_one<mpt, pt>("it10", it, 655018578530, 10);
+ test_one<mpt, pt>("it20", it, 749353305743, 20);
+ test_one<mpt, pt>("it50", it, 1018323115670, 50);
+ test_one<mpt, pt>("it100", it, 1436451405439, 100);
+
+ test_one<mpt, pt>("it1", it, 551474421881, -1);
+ test_one<mpt, pt>("it2", it, 542617730624, -2);
+ test_one<mpt, pt>("it5", it, 517402445790, -5);
+ test_one<mpt, pt>("it10", it, 477945510429, -10);
+ test_one<mpt, pt>("it20", it, 404693983797, -20);
+ test_one<mpt, pt>("it50", it, 238748449624, -50);
+ test_one<mpt, pt>("it100", it, 69768648896, -100);
+ test_one<mpt, pt>("it200", it, 0, -200);
+
+ test_one<mpt, pt>("nl1", nl, 97391170774, 1);
+ test_one<mpt, pt>("nl2", nl, 100816707832, 2);
+ test_one<mpt, pt>("nl5", nl, 110239801028, 5);
+ test_one<mpt, pt>("nl10", nl, 123408274536, 10);
+ test_one<mpt, pt>("nl20", nl, 145046915403, 20);
+ test_one<mpt, pt>("nl50", nl, 201207309002, 50);
+ test_one<mpt, pt>("nl100", nl, 303300936340, 100);
+
+ test_one<mpt, pt>("nl1", nl, 90095050333, -1);
+ test_one<mpt, pt>("nl2", nl, 86601861798, -2);
+ test_one<mpt, pt>("nl5", nl, 77307843754, -5);
+ test_one<mpt, pt>("nl10", nl, 64668870425, -10);
+ test_one<mpt, pt>("nl20", nl, 46683531062, -20);
+ test_one<mpt, pt>("nl50", nl, 10244523910, -50);
+ test_one<mpt, pt>("nl100", nl, 0, -100);
+
+ test_one<mpt, pt>("no1", no, 1819566570720, 1);
+ test_one<mpt, pt>("no2", no, 1865041238129, 2, ut_settings::ignore_validity());
+ test_one<mpt, pt>("no5", no, 1973615533600, 5);
+ test_one<mpt, pt>("no10", no, 2102034240506, 10);
+ test_one<mpt, pt>("no20", no, 2292171257647, 20);
+ test_one<mpt, pt>("no50", no, 2725475403816, 50);
+ test_one<mpt, pt>("no100", no, 3374987120112, 100);
+
+ test_one<mpt, pt>("no1", no, 1725145487969, -1);
+ test_one<mpt, pt>("no2", no, 1678942603503, -2);
+ test_one<mpt, pt>("no5", no, 1547329249723, -5);
+ test_one<mpt, pt>("no10", no, 1361198873951, -10);
+ test_one<mpt, pt>("no20", no, 1089847815351, -20);
+ test_one<mpt, pt>("no50", no, 649622162382, -50);
+ test_one<mpt, pt>("no100", no, 306739133606, -100);
+
+ test_one<mpt, pt>("uk1", uk, 733080790315, 1);
+ test_one<mpt, pt>("uk2", uk, 749555939251, 2);
+ test_one<mpt, pt>("uk5", uk, 793752660191, 5);
+ test_one<mpt, pt>("uk10", uk, 857682286960, 10);
+ test_one<mpt, pt>("uk20", uk, 970488082763, 20);
+ test_one<mpt, pt>("uk50", uk, 1247830325401, 50);
+ test_one<mpt, pt>("uk100", uk, 1659861958875, 100);
+
+ test_one<mpt, pt>("uk1", uk, 699378146599, -1);
+ test_one<mpt, pt>("uk2", uk, 683086442146, -2);
+ test_one<mpt, pt>("uk5", uk, 637325279340, -5);
+ test_one<mpt, pt>("uk10", uk, 572556625332, -10);
+ test_one<mpt, pt>("uk20", uk, 479258129205, -20);
+ test_one<mpt, pt>("uk50", uk, 274828071591, -50);
+ test_one<mpt, pt>("uk100", uk, 78205461294, -100);
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring.cpp
new file mode 100644
index 000000000..6cc99260c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring.cpp
@@ -0,0 +1,414 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+#include <boost/geometry/algorithms/buffer.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include "test_common/test_point.hpp"
+
+
+static std::string const simplex = "LINESTRING(0 0,4 5)";
+static std::string const simplex_vertical = "LINESTRING(0 0,0 1)";
+static std::string const simplex_horizontal = "LINESTRING(0 0,1 0)";
+
+static std::string const straight = "LINESTRING(0 0,4 5,8 10)";
+static std::string const one_bend = "LINESTRING(0 0,4 5,7 4)";
+static std::string const two_bends = "LINESTRING(0 0,4 5,7 4,10 6)";
+
+static std::string const bend_near_start1 = "LINESTRING(0 0,1 0,5 2)";
+static std::string const bend_near_start2 = "LINESTRING(0 0,1 0,2 1.5,5 3)";
+
+static std::string const overlapping = "LINESTRING(0 0,4 5,7 4,10 6, 10 2,2 2)";
+static std::string const curve = "LINESTRING(2 7,3 5,5 4,7 5,8 7)";
+static std::string const tripod = "LINESTRING(5 0,5 5,1 8,5 5,9 8)"; // with spike
+
+static std::string const degenerate0 = "LINESTRING()";
+static std::string const degenerate1 = "LINESTRING(5 5)";
+static std::string const degenerate2 = "LINESTRING(5 5,5 5)";
+static std::string const degenerate3 = "LINESTRING(5 5,5 5,5 5)";
+static std::string const degenerate4 = "LINESTRING(5 5,5 5,4 4,5 5,5 5)";
+
+static std::string const for_collinear = "LINESTRING(2 0,0 0,0 4,6 4,6 0,4 0)";
+static std::string const for_collinear2 = "LINESTRING(2 1,2 0,0 0,0 4,6 4,6 0,4 0,4 1)";
+
+static std::string const chained2 = "LINESTRING(0 0,1 1,2 2)";
+static std::string const chained3 = "LINESTRING(0 0,1 1,2 2,3 3)";
+static std::string const chained4 = "LINESTRING(0 0,1 1,2 2,3 3,4 4)";
+
+static std::string const field_sprayer1 = "LINESTRING(76396.40464822574 410095.6795147947,76397.85016212701 410095.211865792,76401.30666443033 410095.0466387949,76405.05892643372 410096.1007777959,76409.45103273794 410098.257640797,76412.96309264141 410101.6522238015)";
+static std::string const aimes120 = "LINESTRING(-2.505218 52.189211,-2.505069 52.189019,-2.504941 52.188854)";
+static std::string const aimes167 = "LINESTRING(-2.378569 52.312133,-2.37857 52.312127,-2.378544 52.31209)";
+static std::string const aimes175 = "LINESTRING(-2.3116 52.354326,-2.311555 52.35417,-2.311489 52.354145,-2.311335 52.354178)";
+static std::string const aimes171 = "LINESTRING(-2.393161 52.265087,-2.393002 52.264965,-2.392901 52.264891)";
+static std::string const aimes181 = "LINESTRING(-2.320686 52.43505,-2.320678 52.435016,-2.320697 52.434978,-2.3207 52.434977,-2.320741 52.434964,-2.320807 52.434964,-2.320847 52.434986,-2.320903 52.435022)";
+
+static std::string const crossing = "LINESTRING(0 0,10 10,10 0,0 10)";
+
+// Simplified cases from multi_linestring tesets:
+static std::string const mikado1 = "LINESTRING(11.406143344709896325639419956133 0.75426621160409546007485914742574,12 1,11.403846153846153299582510953769 0.75)";
+
+static std::string const mysql_report_2015_03_02a = "LINESTRING(0 0,0 5,5 5,5 0,0 0)"; // closed
+static std::string const mysql_report_2015_03_02b = "LINESTRING(0 1,0 5,5 5,5 0,1 0)"; // not closed, 1 difference
+static std::string const mysql_report_2015_03_02c = "LINESTRING(0 2,0 5,5 5,5 0,2 0)"; // not closed, 2 difference
+
+static std::string const mysql_report_2015_04_01 = "LINESTRING(103 5,107 2,111 4,116 -1,115 0,112 4)";
+
+static std::string const mysql_report_2015_04_10a = "LINESTRING(1.922421e+307 1.520384e+308, 15 42, 89 -93,-89 -22)";
+static std::string const mysql_report_2015_04_10b = "LINESTRING(15 42, 89 -93,-89 -22, 1.922421e+307 1.520384e+308)";
+static std::string const mysql_report_2015_04_10c = "LINESTRING(15 42, 1.922421e+307 1.520384e+308, 89 -93,-89 -22)";
+static std::string const mysql_report_2015_04_10d = "LINESTRING(1.922421e+307 1.520384e+308, 1.923421e+307 1.521384e+308, 15 42, 89 -93,-89 -22)";
+static std::string const mysql_report_2015_04_10e = "LINESTRING(15 42, 89 -93,-89 -22, 1.922421e+307 1.520384e+308, 1.923421e+307 1.521384e+308)";
+static std::string const mysql_report_2015_04_10f = "LINESTRING(15 42, 1.922421e+307 1.520384e+308, 1.923421e+307 1.521384e+308, 89 -93,-89 -22)";
+static std::string const mysql_report_2015_04_10g = "LINESTRING(15 42, 89 -93,-89 -22)";
+
+static std::string const mysql_report_2015_06_11 = "LINESTRING("
+ "-155.9300341531310000 4.1672727531600900, -14.0079144546799000 "
+ "-12.2485554508160000, 176.9503531590800000 -3.0930641354495000, "
+ "32.6863251871831000 -17.9691125862157000, -17.7739746299451000 "
+ "41.3177973084700000, -36.0310834162082000 59.9486214620753000, "
+ "153.1574937017440000 46.3007892930418000, 172.7795126069240000 "
+ "19.5367061763707000, -85.6306040220105000 35.0128339347489000, "
+ "-61.1404987988716000 0.3278080608359490, -127.5034592987520000 "
+ "18.6202802642343000, 114.5567005754250000 -83.7227732658958000, "
+ "-66.1134822881378000 -75.2141906159065000, -93.7363999307791000 "
+ "49.3124773443269000, -8.7182702071584100 56.2071174970861000, "
+ "7.7959787229988800 60.8845281744769000, 13.0420633931840000 "
+ "58.8150539662759000, -89.9754374613871000 26.4546501154335000, "
+ "-44.5746548960799000 -88.8122262334508000, -178.4807616092640000 "
+ "10.7770331393820000, 161.8238702890570000 -42.3894892597522000, "
+ "136.2382890452810000 28.6261570633511000, 49.6788041059295000 "
+ "61.7724885566963000, 52.7876201424690000 -61.9246644395984000, "
+ "-162.7456296900030000 11.7183989853218000, 115.6208648232840000 "
+ "51.0941612539320000, -48.7772321835054000 50.4339743128205000)";
+
+static std::string const mysql_report_2015_09_08a = "LINESTRING(1 1, 2 1, 1.765258e+308 4, -1 1, 10 4)";
+static std::string const mysql_report_2015_09_08b = "LINESTRING(2199023255556 16777218, 32770 8194, 1.417733e+308 7.823620e+307, -8 -9, 2147483649 20)";
+static std::string const mysql_report_2015_09_08c = "LINESTRING(-5 -8, 2 8, 2.160023e+307 1.937208e+307, -4 -3, -5 -4, 8796093022208 281474976710653)";
+
+static std::string const mysql_23023665 = "LINESTRING(0 0, 0 5, 5 5, 5 0, 0 0)";
+
+static std::string const mysql_25662426 = "LINESTRING(170 4756, 168 4756, 168 4759, 168 4764, 171 4764, 171 4700)";
+static std::string const mysql_25662426a = "LINESTRING(170 4756, 168 4756, 168 4759, 168 4764, 171 4764, 171 4750)";
+
+static std::string const issue_596 = "LINESTRING(292979.660 6688731.370, 292979.600 6688733.420, 292979.540 6688735.440, 292979.540 6688735.500)";
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P, Clockwise> polygon;
+
+ bg::strategy::buffer::join_miter join_miter;
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::join_round_by_divide join_round_by_divide(4);
+ bg::strategy::buffer::end_flat end_flat;
+ bg::strategy::buffer::end_round end_round(100);
+
+ // For testing MySQL issues, which uses 32 by default
+ bg::strategy::buffer::end_round end_round32(32);
+ bg::strategy::buffer::join_round join_round32(32);
+
+ const ut_settings settings;
+
+ // Simplex (join-type is not relevant)
+ test_one<linestring, polygon>("simplex", simplex, join_miter, end_flat, 19.209, 1.5);
+ test_one<linestring, polygon>("simplex", simplex, join_miter, end_round, 26.2733, 1.5);
+
+ // Should be about PI + 2
+ test_one<linestring, polygon>("simplex_vertical", simplex_vertical, join_round, end_round, 5.14, 1);
+ test_one<linestring, polygon>("simplex_horizontal", simplex_horizontal, join_round, end_round, 5.14, 1);
+
+ // Should be a bit less than PI + 2
+ test_one<linestring, polygon>("simplex_vertical32", simplex_vertical, join_round32, end_round32, 5.12145, 1);
+ test_one<linestring, polygon>("simplex_horizontal32", simplex_horizontal, join_round32, end_round32, 5.12145, 1);
+
+ test_one<linestring, polygon>("simplex_asym_neg", simplex, join_miter, end_flat, 3.202, +1.5, settings, -1.0);
+ test_one<linestring, polygon>("simplex_asym_pos", simplex, join_miter, end_flat, 3.202, -1.0, settings, +1.5);
+ // Do not work yet:
+ // test_one<linestring, polygon>("simplex_asym_neg", simplex, join_miter, end_round, 3.202, +1.5, settings, -1.0);
+ // test_one<linestring, polygon>("simplex_asym_pos", simplex, join_miter, end_round, 3.202, -1.0, settings, +1.5);
+
+ // Generates (initially) a reversed polygon, with a negative area, which is reversed afterwards in assign_parents
+ test_one<linestring, polygon>("simplex_asym_neg_rev", simplex, join_miter, end_flat, 3.202, +1.0, settings, -1.5);
+ test_one<linestring, polygon>("simplex_asym_pos_rev", simplex, join_miter, end_flat, 3.202, -1.5, settings, +1.0);
+
+ test_one<linestring, polygon>("straight", straight, join_round, end_flat, 38.4187, 1.5);
+ test_one<linestring, polygon>("straight", straight, join_miter, end_flat, 38.4187, 1.5);
+
+ // One bend/two bends (tests join-type)
+ test_one<linestring, polygon>("one_bend", one_bend, join_round, end_flat, 28.488, 1.5);
+ test_one<linestring, polygon>("one_bend", one_bend, join_miter, end_flat, 28.696, 1.5);
+ test_one<linestring, polygon>("one_bend", one_bend, join_round_by_divide, end_flat, 28.488, 1.5);
+
+ test_one<linestring, polygon>("one_bend", one_bend, join_round, end_round, 35.5603, 1.5);
+ test_one<linestring, polygon>("one_bend", one_bend, join_miter, end_round, 35.7601, 1.5);
+
+ test_one<linestring, polygon>("two_bends", two_bends, join_round, end_round, 46.2995, 1.5);
+ test_one<linestring, polygon>("two_bends", two_bends, join_round, end_flat, 39.235, 1.5);
+ test_one<linestring, polygon>("two_bends", two_bends, join_round_by_divide, end_flat, 39.235, 1.5);
+ test_one<linestring, polygon>("two_bends", two_bends, join_miter, end_flat, 39.513, 1.5);
+ test_one<linestring, polygon>("two_bends_left", two_bends, join_round, end_flat, 20.028, 1.5, settings, 0.0);
+ test_one<linestring, polygon>("two_bends_left", two_bends, join_miter, end_flat, 20.225, 1.5, settings, 0.0);
+ test_one<linestring, polygon>("two_bends_right", two_bends, join_round, end_flat, 19.211, 0.0, settings, 1.5);
+ test_one<linestring, polygon>("two_bends_right", two_bends, join_miter, end_flat, 19.288, 0.0, settings, 1.5);
+
+ test_one<linestring, polygon>("bend_near_start1", bend_near_start1, join_round, end_flat, 109.2625, 9.0);
+ test_one<linestring, polygon>("bend_near_start2", bend_near_start2, join_round, end_flat, 142.8709, 9.0);
+
+ // Next (and all similar cases) which a offsetted-one-sided buffer has to be fixed. TODO
+ //test_one<linestring, polygon>("two_bends_neg", two_bends, join_miter, end_flat, 99, +1.5, settings, -1.0);
+ //test_one<linestring, polygon>("two_bends_pos", two_bends, join_miter, end_flat, 99, -1.5, settings, +1.0);
+ //test_one<linestring, polygon>("two_bends_neg", two_bends, join_round, end_flat,99, +1.5, settings, -1.0);
+ //test_one<linestring, polygon>("two_bends_pos", two_bends, join_round, end_flat, 99, -1.5, settings, +1.0);
+
+ test_one<linestring, polygon>("overlapping150", overlapping, join_round, end_flat, 65.6786, 1.5);
+ test_one<linestring, polygon>("overlapping150", overlapping, join_miter, end_flat, 68.140, 1.5);
+
+ // Different cases with intersection points on flat and (left/right from line itself)
+ test_one<linestring, polygon>("overlapping_asym_150_010", overlapping, join_round, end_flat, 48.308, 1.5, settings, 0.25);
+ test_one<linestring, polygon>("overlapping_asym_150_010", overlapping, join_miter, end_flat, 50.770, 1.5, settings, 0.25);
+ test_one<linestring, polygon>("overlapping_asym_150_075", overlapping, join_round, end_flat, 58.506, 1.5, settings, 0.75);
+ test_one<linestring, polygon>("overlapping_asym_150_075", overlapping, join_miter, end_flat, 60.985, 1.5, settings, 0.75);
+ test_one<linestring, polygon>("overlapping_asym_150_100", overlapping, join_round, end_flat, 62.514, 1.5, settings, 1.0);
+ test_one<linestring, polygon>("overlapping_asym_150_100", overlapping, join_miter, end_flat, 64.984, 1.5, settings, 1.0);
+
+ // Having flat end
+ test_one<linestring, polygon>("for_collinear", for_collinear, join_round, end_flat, 68.561, 2.0);
+ test_one<linestring, polygon>("for_collinear", for_collinear, join_miter, end_flat, 72, 2.0);
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<linestring, polygon>("for_collinear2", for_collinear2, join_round, end_flat, 74.387, 2.0);
+ test_one<linestring, polygon>("for_collinear2", for_collinear2, join_miter, end_flat, 78.0, 2.0);
+#endif
+
+ test_one<linestring, polygon>("curve", curve, join_round, end_flat, 58.1944, 5.0, settings, 3.0);
+ test_one<linestring, polygon>("curve", curve, join_miter, end_flat, 58.7371, 5.0, settings, 3.0);
+
+ test_one<linestring, polygon>("tripod", tripod, join_miter, end_flat, 74.25, 3.0);
+ test_one<linestring, polygon>("tripod", tripod, join_miter, end_round, 116.6336, 3.0);
+
+ test_one<linestring, polygon>("chained2", chained2, join_round, end_flat, 11.3137, 2.5, settings, 1.5);
+ test_one<linestring, polygon>("chained3", chained3, join_round, end_flat, 16.9706, 2.5, settings, 1.5);
+ test_one<linestring, polygon>("chained4", chained4, join_round, end_flat, 22.6274, 2.5, settings, 1.5);
+
+ test_one<linestring, polygon>("field_sprayer1", field_sprayer1, join_round, end_flat, 324.3550, 16.5, settings, 6.5);
+ test_one<linestring, polygon>("field_sprayer1", field_sprayer1, join_round, end_round, 718.761877, 16.5, settings, 6.5);
+ test_one<linestring, polygon>("field_sprayer1", field_sprayer1, join_miter, end_round, 718.939628, 16.5, settings, 6.5);
+
+ test_one<linestring, polygon>("degenerate0", degenerate0, join_round, end_round, 0.0, 3.0);
+ test_one<linestring, polygon>("degenerate1", degenerate1, join_round, end_round, 28.25, 3.0);
+ test_one<linestring, polygon>("degenerate2", degenerate2, join_round, end_round, 28.2503, 3.0);
+ test_one<linestring, polygon>("degenerate3", degenerate3, join_round, end_round, 28.2503, 3.0);
+ test_one<linestring, polygon>("degenerate4", degenerate4, join_round, end_round, 36.7410, 3.0);
+ test_one<linestring, polygon>("degenerate4", degenerate4, join_round, end_flat, 8.4853, 3.0);
+
+ {
+ // These tests do test behaviour in end_round strategy:
+ // -> it should generate closed pieces, also for an odd number of points.
+ // It also tests behaviour in join_round strategy:
+ // -> it should generate e.g. 4 points for a full circle,
+ // so a quarter circle does not get points in between
+ using bg::strategy::buffer::join_round;
+ using bg::strategy::buffer::end_round;
+
+ double const d10 = 1.0;
+
+ test_one<linestring, polygon>("mysql_report_2015_03_02a_3", mysql_report_2015_03_02a, join_round(3), end_round(3), 38.000, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02a_4", mysql_report_2015_03_02a, join_round(4), end_round(4), 38.000, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02a_5", mysql_report_2015_03_02a, join_round(5), end_round(5), 38.790, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02a_6", mysql_report_2015_03_02a, join_round(6), end_round(6), 38.817, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02a_7", mysql_report_2015_03_02a, join_round(7), end_round(7), 38.851, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02b_3", mysql_report_2015_03_02b, join_round(3), end_round(3), 36.500, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02b_4", mysql_report_2015_03_02b, join_round(4), end_round(4), 36.500, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02b_5", mysql_report_2015_03_02b, join_round(5), end_round(5), 37.346, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02b_6", mysql_report_2015_03_02b, join_round(6), end_round(6), 37.402, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02b_7", mysql_report_2015_03_02b, join_round(7), end_round(7), 37.506, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_3", mysql_report_2015_03_02c, join_round(2), end_round(3), 32.500, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_4", mysql_report_2015_03_02c, join_round(4), end_round(4), 32.500, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_5", mysql_report_2015_03_02c, join_round(5), end_round(5), 33.611, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_6", mysql_report_2015_03_02c, join_round(6), end_round(6), 33.719, d10);
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_7", mysql_report_2015_03_02c, join_round(7), end_round(7), 33.901, d10);
+
+ // Testing the asymmetric end caps with odd number of points
+ double const d15 = 1.5;
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_asym1", mysql_report_2015_03_02c, join_round(7), end_round(7), 39.714, d10, settings, d15);
+ test_one<linestring, polygon>("mysql_report_2015_03_02c_asym2", mysql_report_2015_03_02c, join_round(7), end_round(7), 46.116, d15, settings, d10);
+
+ double const d100 = 10;
+ test_one<linestring, polygon>("mysql_report_2015_04_01", mysql_report_2015_04_01, join_round(32), end_round(32), 632.234, d100);
+ }
+
+ {
+ // Check on validity, with high precision because areas are all very small
+ ut_settings settings(1.0e-10, true);
+
+ test_one<linestring, polygon>("aimes120", aimes120, join_miter, end_flat, 1.62669948622351512e-08, 0.000018, settings);
+ test_one<linestring, polygon>("aimes120", aimes120, join_round, end_round, 1.72842078427493107e-08, 0.000018, settings);
+
+ test_one<linestring, polygon>("aimes167", aimes167, join_miter, end_flat, 1.88900628472765675e-09, 0.000018, settings);
+ test_one<linestring, polygon>("aimes167", aimes167, join_round, end_round, 2.85734813587623648e-09, 0.000018, settings);
+
+ test_one<linestring, polygon>("aimes175", aimes175, join_miter, end_flat, 2.81111809385947709e-08, 0.000036, settings);
+ test_one<linestring, polygon>("aimes175", aimes175, join_round, end_round, 3.21215765097804251e-08, 0.000036, settings);
+
+ test_one<linestring, polygon>("aimes171", aimes171, join_miter, end_flat, 1.1721873249825876e-08, 0.000018, settings);
+ test_one<linestring, polygon>("aimes171", aimes171, join_round, end_round, 1.2739093335767393e-08, 0.000018, settings);
+ test_one<linestring, polygon>("aimes171", aimes171, join_round_by_divide, end_round, 1.2739093335767393e-08, 0.000018, settings);
+
+ test_one<linestring, polygon>("aimes181", aimes181, join_miter, end_flat, 2.1729405830228643e-08, 0.000036, settings);
+ test_one<linestring, polygon>("aimes181", aimes181, join_round, end_round, 2.57415564419716247e-08, 0.000036, settings);
+ test_one<linestring, polygon>("aimes181", aimes181, join_round_by_divide, end_round, 2.57415564419716247e-08, 0.000036, settings);
+ }
+
+ {
+ // Expectations can also be 1702.56530051454502 2140.78725663358819
+ // so we increase tolerance
+ ut_settings settings(0.5);
+ test_one<linestring, polygon>("crossing", crossing, join_round32, end_flat, 1702.1, 20.0, settings);
+ test_one<linestring, polygon>("crossing", crossing, join_round32, end_round32, 2140.4, 20.0, settings);
+ }
+
+ test_one<linestring, polygon>("mikado1", mikado1, join_round32, end_round32, 5441135039.0979, 41751.0);
+
+ {
+ // This case gave a spike (invalid result) up to 1.70
+ // Fixed by general form for line/line intersection in miter calculation
+ using bg::strategy::buffer::join_round;
+ using bg::strategy::buffer::end_round;
+ test_one<linestring, polygon>("issue_596", issue_596, join_round(12), end_round(12), 0.12462779, 0.015);
+ test_one<linestring, polygon>("issue_596", issue_596, join_miter, end_round(12), 0.12462807, 0.015);
+ }
+
+ test_one<linestring, polygon>("mysql_report_2015_06_11",
+ mysql_report_2015_06_11, join_round32, end_round32,
+ 27862.733459829971,
+ 5.9518403867035365);
+
+ test_one<linestring, polygon>("mysql_report_2015_09_08a", mysql_report_2015_09_08a, join_round32, end_round32, 0.0, 1.0);
+ test_one<linestring, polygon>("mysql_report_2015_09_08b", mysql_report_2015_09_08b, join_round32, end_round32, 0.0, 1099511627778.0);
+ test_one<linestring, polygon>("mysql_report_2015_09_08c", mysql_report_2015_09_08c, join_round32, end_round32, 0.0, 0xbe);
+
+ test_one<linestring, polygon>("mysql_23023665_1", mysql_23023665, join_round32, end_flat, 459.1051, 10);
+ test_one<linestring, polygon>("mysql_23023665_2", mysql_23023665, join_round32, end_flat, 6877.7097, 50);
+
+ test_one<linestring, polygon>("mysql_25662426", mysql_25662426, join_round32, end_round32, 1, 0, 1660.6673, 10);
+
+ // Test behaviour with different buffer sizes, generating internally turns on different locations
+ test_one<linestring, polygon>("mysql_25662426a_05", mysql_25662426a, join_round32, end_round32, 27.6156, 0.5);
+ test_one<linestring, polygon>("mysql_25662426a_1", mysql_25662426a, join_round32, end_round32, 54.9018, 1.0);
+ test_one<linestring, polygon>("mysql_25662426a_2", mysql_25662426a, join_round32, end_round32, 103.6072, 2.0);
+ test_one<linestring, polygon>("mysql_25662426a_3", mysql_25662426a, join_round32, end_round32, 152.1163, 3.0);
+ test_one<linestring, polygon>("mysql_25662426a_4", mysql_25662426a, join_round32, end_round32, 206.4831, 4.0);
+ test_one<linestring, polygon>("mysql_25662426a_5", mysql_25662426a, join_round32, end_round32, 266.8505, 5.0);
+ test_one<linestring, polygon>("mysql_25662426a_10", mysql_25662426a, join_round32, end_round32, 660.7355, 10.0);
+
+ test_one<linestring, polygon>("mysql_25662426a_05", mysql_25662426a, join_round32, end_flat, 26.8352, 0.5);
+ test_one<linestring, polygon>("mysql_25662426a_1", mysql_25662426a, join_round32, end_flat, 53.3411, 1.0);
+ test_one<linestring, polygon>("mysql_25662426a_2", mysql_25662426a, join_round32, end_flat, 97.3644, 2.0);
+ test_one<linestring, polygon>("mysql_25662426a_3", mysql_25662426a, join_round32, end_flat, 138.0697, 3.0);
+ test_one<linestring, polygon>("mysql_25662426a_4", mysql_25662426a, join_round32, end_flat, 181.5115, 4.0);
+ test_one<linestring, polygon>("mysql_25662426a_5", mysql_25662426a, join_round32, end_flat, 227.8325, 5.0);
+ test_one<linestring, polygon>("mysql_25662426a_10", mysql_25662426a, join_round32, end_flat, 534.1084, 10.0);
+
+ // Asymmetric buffers
+ // Mostly left
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_05", mysql_25662426a, join_round32, end_round32, 15.6638, 0.5, settings, 0.05);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_1", mysql_25662426a, join_round32, end_round32, 32.9553, 1.0, settings, 0.1);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_2", mysql_25662426a, join_round32, end_round32, 72.1159, 2.0, settings, 0.2);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_3", mysql_25662426a, join_round32, end_round32, 116.3802, 3.0, settings, 0.3);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_4", mysql_25662426a, join_round32, end_round32, 165.9298, 4.0, settings, 0.4);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_5", mysql_25662426a, join_round32, end_round32, 220.8054, 5.0, settings, 0.5);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_left_10", mysql_25662426a, join_round32, end_round32, 577.3742, 10.0, settings, 1.0);
+
+ // Mostly right
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_05", mysql_25662426a, join_round32, end_round32, 14.3419, 0.05, settings, 0.5);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_1", mysql_25662426a, join_round32, end_round32, 27.1955, 0.1, settings, 1.0);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_2", mysql_25662426a, join_round32, end_round32, 43.1821, 0.2, settings, 2.0);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_3", mysql_25662426a, join_round32, end_round32, 54.4337, 0.3, settings, 3.0);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_4", mysql_25662426a, join_round32, end_round32, 75.6376, 0.4, settings, 4.0);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_5", mysql_25662426a, join_round32, end_round32, 102.6952, 0.5, settings, 5.0);
+ test_one<linestring, polygon>("mysql_25662426a_mostly_right_10", mysql_25662426a, join_round32, end_round32, 260.1850, 1.0, settings, 10.0);
+
+ // Left
+ test_one<linestring, polygon>("mysql_25662426a_left_05", mysql_25662426a, join_round32, end_round32, 14.2803, 0.5, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_left_1", mysql_25662426a, join_round32, end_round32, 30.1214, 1.0, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_left_2", mysql_25662426a, join_round32, end_round32, 66.4858, 2.0, ut_settings(0.01, false), 0.0); // It has a self touching point
+ test_one<linestring, polygon>("mysql_25662426a_left_3", mysql_25662426a, join_round32, end_round32, 108.3305, 3.0, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_left_4", mysql_25662426a, join_round32, end_round32, 155.5128, 4.0, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_left_5", mysql_25662426a, join_round32, end_round32, 208.1289, 5.0, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_left_10", mysql_25662426a, join_round32, end_round32, 554.8818, 10.0, settings, 0.0);
+
+ // Right
+ test_one<linestring, polygon>("mysql_25662426a_right_05", mysql_25662426a, join_round32, end_round32, 12.9451, 0.0, settings, 0.5);
+ test_one<linestring, polygon>("mysql_25662426a_right_1", mysql_25662426a, join_round32, end_round32, 24.3902, 0.0, settings, 1.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_2", mysql_25662426a, join_round32, end_round32, 37.5607, 0.0, settings, 2.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_3", mysql_25662426a, join_round32, end_round32, 46.2741, 0.0, settings, 3.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_4", mysql_25662426a, join_round32, end_round32, 70.2429, 0.0, settings, 4.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_5", mysql_25662426a, join_round32, end_round32, 95.7545, 0.0, settings, 5.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_10", mysql_25662426a, join_round32, end_round32, 244.5337, 0.0, settings, 10.0);
+
+ // Flat end for one-sided buffer
+ test_one<linestring, polygon>("mysql_25662426a_left_05", mysql_25662426a, join_round32, end_flat, 14.0853, 0.5, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_05", mysql_25662426a, join_round32, end_flat, 12.7500, 0.0, settings, 0.5);
+ test_one<linestring, polygon>("mysql_25662426a_left_25", mysql_25662426a, join_round32, end_flat, 82.1318, 2.5, settings, 0.0);
+ test_one<linestring, polygon>("mysql_25662426a_right_25", mysql_25662426a, join_round32, end_flat, 39.0000, 0.0, settings, 2.5);
+}
+
+template <bool Clockwise, typename P>
+void test_invalid()
+{
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P, Clockwise> polygon;
+
+ bg::strategy::buffer::end_round end_round32(32);
+ bg::strategy::buffer::join_round join_round32(32);
+
+ // Linestring contains extreme differences causing numeric errors. Empty geometry is returned
+ test_one<linestring, polygon>("mysql_report_2015_04_10a", mysql_report_2015_04_10a, join_round32, end_round32, 0.0, 100.0);
+ test_one<linestring, polygon>("mysql_report_2015_04_10b", mysql_report_2015_04_10b, join_round32, end_round32, 0.0, 100.0);
+ test_one<linestring, polygon>("mysql_report_2015_04_10c", mysql_report_2015_04_10c, join_round32, end_round32, 0.0, 100.0);
+ test_one<linestring, polygon>("mysql_report_2015_04_10d", mysql_report_2015_04_10d, join_round32, end_round32, 0.0, 100.0);
+ test_one<linestring, polygon>("mysql_report_2015_04_10e", mysql_report_2015_04_10e, join_round32, end_round32, 0.0, 100.0);
+ test_one<linestring, polygon>("mysql_report_2015_04_10f", mysql_report_2015_04_10f, join_round32, end_round32, 0.0, 100.0);
+
+ // The equivalent, valid, case
+ test_one<linestring, polygon>("mysql_report_2015_04_10g", mysql_report_2015_04_10g, join_round32, end_round32, 86527.871, 100.0);
+}
+
+#ifdef HAVE_TTMATH
+#include <ttmath_stub.hpp>
+#endif
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+
+ test_invalid<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_invalid<true, bg::model::point<long double, 2, bg::cs::cartesian> >();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring_aimes.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring_aimes.cpp
new file mode 100644
index 000000000..e14954466
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring_aimes.cpp
@@ -0,0 +1,489 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <test_buffer.hpp>
+
+#include <boost/geometry/algorithms/buffer.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+
+
+// Test cases of the list sent by Aimes on geometry list at 2012 Jul 19.
+// Complete list at: http://boost-geometry.203548.n3.nabble.com/file/n4025063/BufferProblems.txt
+template <typename P>
+void test_aimes()
+{
+ static std::string testcases[] =
+ {
+ "LINESTRING(-3.031075 52.22385,-3.030809 52.223579,-3.030424 52.223207,-3.030212 52.222931,-3.030013 52.222764,-3.029721 52.222584,-3.029469 52.222443,-3.029218 52.222319,-3.028886 52.222187,-3.028859 52.222176,-3.028815 52.222158,-3.028563 52.222016,-3.028462 52.221945,-3.028407 52.221881,-3.028351 52.22179,-3.028301 52.221718,-3.028203 52.221601,-3.028151 52.221552,-3.027982 52.221422,-3.027871 52.221353,-3.027755 52.221293,-3.027573 52.22121,-3.027493 52.221179,-3.027463 52.221165,-3.027147 52.221065,-3.027045 52.221039,-3.026812 52.220989,-3.026691 52.220968,-3.026602 52.220957,-3.026111 52.220898,-3.025715 52.220861,-3.025332 52.220842,-3.025011 52.220845,-3.024587 52.220849,-3.024339 52.220869,-3.024213 52.220881,-3.024103 52.220905,-3.023904 52.220966,-3.023687 52.221027,-3.023575 52.221054,-3.023409 52.221077,-3.023317 52.221072,-3.023259 52.221049,-3.023028 52.220905,-3.022859 52.220819,-3.022799 52.220774,-3.022739 52.220688)",
+ "LINESTRING(-3.056646 52.20421,-3.055298 52.204143,-3.054991 52.204119,-3.053966 52.204125,-3.053793 52.204126)",
+ "LINESTRING(-3.040117 52.307787,-3.040012 52.307874,-3.03999 52.30792,-3.039986 52.307973,-3.040054 52.308123,-3.040092 52.308238,-3.040125 52.308398,-3.040165 52.308558,-3.040194 52.308587,-3.040539 52.30889,-3.040868 52.309147,-3.041196 52.309396,-3.042401 52.310114,-3.042414 52.310121,-3.042758 52.31032,-3.04277 52.310327,-3.042779 52.310353,-3.042771 52.31038,-3.042746 52.310444,-3.042627 52.310704,-3.042601 52.310799,-3.042588 52.310846,-3.042588 52.310941,-3.042596 52.311007,-3.04261 52.311035,-3.04264 52.311099,-3.042646 52.311111,-3.042662 52.311134,-3.042681 52.311161,-3.042708 52.311199,-3.042792 52.311275,-3.042808 52.31129,-3.042908 52.311364,-3.04294 52.311385,-3.042996 52.311423,-3.043232 52.311542,-3.043424 52.311632,-3.043447 52.311641,-3.043452 52.311643,-3.043537 52.311677,-3.043725 52.311728,-3.043876 52.311759,-3.044048 52.311784,-3.044325 52.311813,-3.044963 52.31187,-3.045654 52.311927,-3.046044 52.31196,-3.04609 52.311963,-3.046235 52.311979,-3.046374 52.312015,-3.046477 52.312058,-3.046587 52.312109,-3.046654 52.312147,-3.046771 52.312228,-3.046962 52.312372,-3.047043 52.312443,-3.047089 52.312498,-3.04711 52.312547,-3.047112 52.312586,-3.047113 52.312607,-3.047105 52.312666,-3.047067 52.312722)",
+ "LINESTRING(-3.054162 52.34456,-3.054088 52.344534,-3.054014 52.344508,-3.053926 52.34449,-3.053823 52.344491,-3.053632 52.344493,-3.053368 52.344513,-3.053149 52.344551,-3.053076 52.34457,-3.053033 52.344588,-3.053003 52.344598)",
+ "LINESTRING(-3.032714 52.342934,-3.032658 52.342814,-3.032617 52.342701,-3.032583 52.342606,-3.032554 52.342502,-3.032517 52.342439,-3.032453 52.34233,-3.032374 52.3422,-3.032325 52.342121,-3.032288 52.342056,-3.032252 52.342028)",
+ "LINESTRING(-3.041066 52.338221,-3.040547 52.33801,-3.040399 52.337939,-3.040398 52.337921,-3.040427 52.337894,-3.040456 52.337867,-3.040499 52.337849)",
+ "LINESTRING(-3.044091 52.565713,-3.044077 52.565734,-3.044071 52.565742,-3.044028 52.565796,-3.043992 52.565879,-3.043952 52.565959,-3.043915 52.566,-3.043857 52.56604,-3.043741 52.566113,-3.043492 52.566223,-3.042615 52.566563,-3.042425 52.566646,-3.042294 52.566683,-3.041932 52.566745,-3.041648 52.566791,-3.041445 52.566841,-3.041226 52.566924,-3.041066 52.566992,-3.04089 52.567056,-3.040865 52.56708,-3.040858 52.5671,-3.040879 52.567118,-3.040944 52.567135,-3.041034 52.567137,-3.041288 52.567141,-3.041822 52.567144,-3.042107 52.567134,-3.042245 52.567142,-3.04229 52.56715,-3.042558 52.567247,-3.042736 52.56729,-3.042918 52.567326,-3.043082 52.567338,-3.043388 52.567401,-3.043848 52.567532,-3.043908 52.567568,-3.043923 52.567577,-3.043938 52.567603,-3.04394 52.567657,-3.043941 52.567711,-3.043895 52.56798,-3.043869 52.568115,-3.043868 52.568138,-3.043869 52.568158)",
+ "LINESTRING(-3.039713 52.536795,-3.039808 52.536825,-3.039958 52.536844,-3.040172 52.536885,-3.040322 52.536924,-3.040476 52.536964,-3.04061 52.536989,-3.040678 52.536992,-3.040773 52.536986,-3.040949 52.536958,-3.041148 52.536905,-3.041312 52.536857,-3.041544 52.536777,-3.04173 52.536705,-3.041942 52.536634,-3.042081 52.5366,-3.042204 52.53659,-3.042324 52.536587,-3.042414 52.536591,-3.042491 52.536598,-3.042595 52.536619,-3.042767 52.536683,-3.042916 52.536749,-3.043007 52.536786,-3.043108 52.5368)",
+ "LINESTRING(-3.049078 52.571837,-3.049229 52.571855,-3.04964 52.571857,-3.049841 52.571858,-3.049967 52.571873,-3.05006 52.571903,-3.050094 52.571922,-3.050135 52.57194,-3.050228 52.571958,-3.05033 52.571969,-3.050391 52.571987,-3.050413 52.572027,-3.050421 52.572072,-3.050386 52.572205)",
+ "LINESTRING(-2.983733 52.233609,-2.98371 52.233684,-2.983736 52.233793,-2.98379 52.233906,-2.983869 52.233994,-2.984058 52.234121,-2.984225 52.234228,-2.984382 52.234341,-2.984557 52.234481,-2.984695 52.234575,-2.984716 52.234589,-2.984758 52.234617,-2.984943 52.234694,-2.984978 52.234706,-2.985031 52.234722,-2.98506 52.234731,-2.985343 52.234799,-2.985594 52.234867,-2.985755 52.234917,-2.986071 52.23497,-2.9863 52.235006,-2.986458 52.235044,-2.986602 52.235109,-2.987015 52.23534,-2.987215 52.235464,-2.987423 52.235617,-2.987637 52.235785,-2.987968 52.23602,-2.988192 52.236213,-2.988438 52.236386,-2.988512 52.236449,-2.988579 52.236505,-2.98865 52.236583,-2.98869 52.236656,-2.988721 52.236744,-2.988612 52.236848,-2.988548 52.236932,-2.988497 52.237107,-2.988432 52.237336,-2.988372 52.237567,-2.98833 52.237709,-2.988286 52.23788,-2.988233 52.23807,-2.988249 52.238145,-2.988291 52.238321,-2.988323 52.238505,-2.988379 52.238624,-2.988435 52.238727,-2.988438 52.238732,-2.988466 52.238777,-2.988485 52.238809,-2.988525 52.238854,-2.98858 52.238916,-2.988715 52.239098,-2.988806 52.239204,-2.988865 52.239275,-2.988962 52.239393,-2.989045 52.239474,-2.989244 52.239629,-2.989254 52.239636,-2.989273 52.239649,-2.989508 52.239816,-2.989534 52.239835,-2.989747 52.23998,-2.989769 52.239996,-2.98982 52.240033,-2.989843 52.240055,-2.989949 52.240152,-2.989956 52.240159,-2.99002 52.240248,-2.990074 52.240334,-2.990079 52.24034,-2.990089 52.240357,-2.990106 52.240401,-2.99015 52.240512,-2.990268 52.240793,-2.990336 52.24095,-2.990425 52.241123,-2.990472 52.241198,-2.990617 52.241383,-2.990723 52.241527,-2.990784 52.241601,-2.990811 52.241633,-2.990859 52.241753,-2.990892 52.241854,-2.99094 52.241995,-2.990947 52.242025,-2.990958 52.24207,-2.991023 52.242175,-2.991122 52.242333,-2.991202 52.242485,-2.991276 52.242624,-2.991408 52.242809,-2.991639 52.2431,-2.99172 52.243202,-2.991734 52.243222,-2.991897 52.243461,-2.991944 52.243547,-2.992072 52.243781,-2.992267 52.244138,-2.992431 52.244408,-2.992503 52.244532,-2.992657 52.244802,-2.992761 52.245063,-2.9928 52.245305,-2.992813 52.245622,-2.992822 52.245701,-2.99281 52.245784,-2.992793 52.245867,-2.992771 52.245927,-2.992736 52.245978,-2.992646 52.246076,-2.992573 52.246144,-2.992455 52.246276,-2.992316 52.246468,-2.992432 52.246557,-2.99253 52.246568,-2.992901 52.246565,-2.993581 52.246527,-2.993926 52.246509,-2.994191 52.246514)",
+ "LINESTRING(-3.012501 52.228425,-3.012694 52.22837,-3.012848 52.228308,-3.012946 52.22824,-3.013055 52.228146,-3.013123 52.228048,-3.013182 52.227904,-3.013242 52.227742,-3.013269 52.227632,-3.01327 52.227553,-3.013245 52.227479,-3.013151 52.227332,-3.013072 52.227223,-3.012938 52.227095,-3.012779 52.226936,-3.01271 52.226867,-3.012639 52.226817,-3.012452 52.226743,-3.012278 52.226685,-3.01201 52.226616,-3.011707 52.226519,-3.011541 52.226458,-3.011388 52.22638,-3.011334 52.226352,-3.011111 52.226206,-3.010983 52.226107,-3.010893 52.226012,-3.010832 52.225905,-3.010825 52.225845,-3.010841 52.225687,-3.010858 52.225516,-3.010857 52.225451,-3.010844 52.225405,-3.010747 52.225247,-3.01062 52.225123,-3.010467 52.224893,-3.010372 52.224658)",
+ "LINESTRING(-2.998218 52.230123,-2.998074 52.230203,-2.998066 52.230206,-2.997957 52.230258,-2.997863 52.230302,-2.997049 52.230561,-2.996351 52.230783,-2.995741 52.230976,-2.995552 52.231032)",
+ "LINESTRING(-3.005291 52.231131,-3.005218 52.2312,-3.005076 52.23132,-3.004901 52.231443,-3.004725 52.231551,-3.004586 52.231621,-3.004439 52.231667,-3.004381 52.231685,-3.004236 52.231693,-3.004106 52.231684,-3.003877 52.231653,-3.003705 52.231618,-3.003613 52.231587,-3.003529 52.231549,-3.003019 52.231279,-3.002922 52.231244,-3.002789 52.231196,-3.002657 52.231144,-3.002492 52.231112,-3.002372 52.231091,-3.002239 52.231073,-3.001708 52.231062,-3.001596 52.231053,-3.000959 52.230853,-3.000714 52.230758,-3.00005 52.2305,-2.999016 52.230131,-2.999001 52.230122)",
+ "LINESTRING(-3.031075 52.22385,-3.030809 52.223579,-3.030424 52.223207,-3.030212 52.222931,-3.030013 52.222764,-3.029721 52.222584,-3.029469 52.222443,-3.029218 52.222319,-3.028886 52.222187,-3.028859 52.222176,-3.028815 52.222158,-3.028563 52.222016,-3.028462 52.221945,-3.028407 52.221881,-3.028351 52.22179,-3.028301 52.221718,-3.028203 52.221601,-3.028151 52.221552,-3.027982 52.221422,-3.027871 52.221353,-3.027755 52.221293,-3.027573 52.22121,-3.027493 52.221179,-3.027463 52.221165,-3.027147 52.221065,-3.027045 52.221039,-3.026812 52.220989,-3.026691 52.220968,-3.026602 52.220957,-3.026111 52.220898,-3.025715 52.220861,-3.025332 52.220842,-3.025011 52.220845,-3.024587 52.220849,-3.024339 52.220869,-3.024213 52.220881,-3.024103 52.220905,-3.023904 52.220966,-3.023687 52.221027,-3.023575 52.221054,-3.023409 52.221077,-3.023317 52.221072,-3.023259 52.221049,-3.023028 52.220905,-3.022859 52.220819,-3.022799 52.220774,-3.022739 52.220688)",
+ "LINESTRING(-3.005281 52.202464,-3.005919 52.202654,-3.006134 52.202718,-3.007138 52.202939,-3.007725 52.20309)",
+ "LINESTRING(-3.003371 52.210074,-3.003224 52.21001,-3.003195 52.209997,-3.003094 52.209988,-3.003007 52.209981,-3.002994 52.20998,-3.002952 52.209994,-3.002853 52.210026,-3.002667 52.210068,-3.002566 52.21008,-3.002539 52.210084,-3.002326 52.210102,-3.002318 52.210103,-3.00231 52.210104,-3.002164 52.210134,-3.001964 52.21022,-3.001792 52.210359)",
+ "LINESTRING(-2.968498 52.185726,-2.968594 52.185677,-2.968762 52.185642,-2.968969 52.185608,-2.969272 52.185575,-2.970091 52.185526,-2.970473 52.185443,-2.971035 52.185384,-2.971959 52.185251,-2.972754 52.185111,-2.973037 52.185044,-2.973168 52.185016,-2.973851 52.184803,-2.97401 52.184739,-2.974271 52.184602,-2.974856 52.184364,-2.97488 52.184356,-2.975153 52.184265,-2.975391 52.184212,-2.975741 52.184173,-2.97598 52.184125,-2.976288 52.184004,-2.976831 52.183673,-2.977132 52.183471,-2.977414 52.183259,-2.977612 52.183012,-2.978006 52.182385,-2.978157 52.182251,-2.97863 52.181886)",
+ "LINESTRING(-2.898438 52.177673,-2.897173 52.178057,-2.896867 52.178131,-2.89675 52.178159,-2.896383 52.178233,-2.896087 52.178291,-2.895818 52.178337,-2.895512 52.178384,-2.895118 52.178441,-2.894593 52.178499,-2.894339 52.178519,-2.894317 52.178514,-2.894308 52.178511,-2.894282 52.178504,-2.894217 52.178425,-2.894159 52.178354,-2.894028 52.178134,-2.894001 52.178031,-2.893855 52.177495,-2.893851 52.177478,-2.893683 52.17713,-2.893553 52.176988,-2.893238 52.176731,-2.893127 52.176628,-2.892918 52.176433,-2.892613 52.176056,-2.892122 52.175233,-2.892067 52.175113,-2.891895 52.174561,-2.891781 52.174335,-2.891634 52.174134,-2.891492 52.17394,-2.891344 52.173699,-2.891083 52.173401,-2.89083 52.173169,-2.890577 52.172964,-2.890468 52.172913,-2.890384 52.172882,-2.890276 52.172865,-2.890107 52.17286,-2.890063 52.172851,-2.889975 52.172834,-2.889808 52.17278,-2.889709 52.172725,-2.889451 52.172532,-2.88907 52.172247,-2.888619 52.171957,-2.888574 52.171916)",
+ "LINESTRING(-3.001027 52.270697,-3.001233 52.270714,-3.00157 52.270711,-3.001614 52.270715,-3.001658 52.270719,-3.001746 52.270736,-3.002 52.270828)",
+ "LINESTRING(-3.002514 52.270973,-3.002616 52.270954,-3.00282 52.270916,-3.002878 52.27088,-3.002978 52.270771,-3.003022 52.270752,-3.003066 52.270743,-3.003124 52.270734)",
+ "LINESTRING(-2.944639 52.25447,-2.944459 52.254529,-2.944255 52.254603,-2.944087 52.254655,-2.943732 52.254787,-2.943453 52.25489,-2.943209 52.254982,-2.943098 52.255011,-2.942917 52.255063,-2.94283 52.255093,-2.94258 52.255195,-2.942226 52.255335,-2.942051 52.255401,-2.941816 52.255507,-2.941631 52.255602,-2.941497 52.255668,-2.941335 52.255741,-2.941207 52.2558,-2.941149 52.255815,-2.941074 52.255876,-2.94107 52.255945,-2.941106 52.255995,-2.941153 52.256023,-2.94152 52.25616,-2.941797 52.256259,-2.94205 52.256349,-2.9425 52.256509,-2.942615 52.256533,-2.942714 52.256543,-2.94282 52.256546,-2.943027 52.256522,-2.943226 52.256496,-2.943459 52.256443,-2.943774 52.256373,-2.944095 52.256291,-2.944325 52.256228,-2.944471 52.256187,-2.94475 52.256106,-2.944948 52.256054,-2.945042 52.256035,-2.945176 52.256027,-2.945305 52.256026,-2.94547 52.256032,-2.945731 52.256048,-2.945977 52.256064,-2.94623 52.256087,-2.946353 52.256107,-2.94647 52.256139,-2.946483 52.256142,-2.946595 52.256185,-2.946689 52.256202,-2.946889 52.256233,-2.946994 52.256232)",
+ "LINESTRING(-2.983733 52.233609,-2.98371 52.233684,-2.983736 52.233793,-2.98379 52.233906,-2.983869 52.233994,-2.984058 52.234121,-2.984225 52.234228,-2.984382 52.234341,-2.984557 52.234481,-2.984695 52.234575,-2.984716 52.234589,-2.984758 52.234617,-2.984943 52.234694,-2.984978 52.234706,-2.985031 52.234722,-2.98506 52.234731,-2.985343 52.234799,-2.985594 52.234867,-2.985755 52.234917,-2.986071 52.23497,-2.9863 52.235006,-2.986458 52.235044,-2.986602 52.235109,-2.987015 52.23534,-2.987215 52.235464,-2.987423 52.235617,-2.987637 52.235785,-2.987968 52.23602,-2.988192 52.236213,-2.988438 52.236386,-2.988512 52.236449,-2.988579 52.236505,-2.98865 52.236583,-2.98869 52.236656,-2.988721 52.236744,-2.988612 52.236848,-2.988548 52.236932,-2.988497 52.237107,-2.988432 52.237336,-2.988372 52.237567,-2.98833 52.237709,-2.988286 52.23788,-2.988233 52.23807,-2.988249 52.238145,-2.988291 52.238321,-2.988323 52.238505,-2.988379 52.238624,-2.988435 52.238727,-2.988438 52.238732,-2.988466 52.238777,-2.988485 52.238809,-2.988525 52.238854,-2.98858 52.238916,-2.988715 52.239098,-2.988806 52.239204,-2.988865 52.239275,-2.988962 52.239393,-2.989045 52.239474,-2.989244 52.239629,-2.989254 52.239636,-2.989273 52.239649,-2.989508 52.239816,-2.989534 52.239835,-2.989747 52.23998,-2.989769 52.239996,-2.98982 52.240033,-2.989843 52.240055,-2.989949 52.240152,-2.989956 52.240159,-2.99002 52.240248,-2.990074 52.240334,-2.990079 52.24034,-2.990089 52.240357,-2.990106 52.240401,-2.99015 52.240512,-2.990268 52.240793,-2.990336 52.24095,-2.990425 52.241123,-2.990472 52.241198,-2.990617 52.241383,-2.990723 52.241527,-2.990784 52.241601,-2.990811 52.241633,-2.990859 52.241753,-2.990892 52.241854,-2.99094 52.241995,-2.990947 52.242025,-2.990958 52.24207,-2.991023 52.242175,-2.991122 52.242333,-2.991202 52.242485,-2.991276 52.242624,-2.991408 52.242809,-2.991639 52.2431,-2.99172 52.243202,-2.991734 52.243222,-2.991897 52.243461,-2.991944 52.243547,-2.992072 52.243781,-2.992267 52.244138,-2.992431 52.244408,-2.992503 52.244532,-2.992657 52.244802,-2.992761 52.245063,-2.9928 52.245305,-2.992813 52.245622,-2.992822 52.245701,-2.99281 52.245784,-2.992793 52.245867,-2.992771 52.245927,-2.992736 52.245978,-2.992646 52.246076,-2.992573 52.246144,-2.992455 52.246276,-2.992316 52.246468,-2.992432 52.246557,-2.99253 52.246568,-2.992901 52.246565,-2.993581 52.246527,-2.993926 52.246509,-2.994191 52.246514)",
+ "LINESTRING(-2.96971 52.385285,-2.969713 52.385302,-2.969795 52.385527,-2.969832 52.385568,-2.969956 52.38576,-2.970018 52.385883,-2.970042 52.386056,-2.970042 52.386067,-2.970029 52.386343,-2.970014 52.386442,-2.970008 52.386483,-2.970029 52.386586,-2.970032 52.386601,-2.970046 52.38667,-2.970131 52.386944,-2.970207 52.387072,-2.970265 52.387126,-2.970375 52.387143,-2.970425 52.387133,-2.970477 52.387106,-2.970477 52.38709,-2.970472 52.386848,-2.970485 52.386677,-2.970516 52.386575,-2.970655 52.386395,-2.970876 52.386204,-2.971034 52.386111,-2.971198 52.386032,-2.971267 52.386004,-2.97138 52.385958,-2.971639 52.385807,-2.971826 52.385679,-2.972103 52.385586,-2.97241 52.385483,-2.972753 52.385377,-2.973047 52.385311,-2.973623 52.385203,-2.973844 52.385136,-2.974009 52.385057,-2.974682 52.384692,-2.97509 52.384475,-2.975346 52.384353,-2.975663 52.384199,-2.975822 52.384099,-2.976126 52.383856,-2.976248 52.383782,-2.976406 52.383709,-2.976808 52.383507,-2.97691 52.383452,-2.977112 52.383324,-2.977314 52.383143,-2.977415 52.383034,-2.977529 52.382898,-2.9776 52.382799,-2.977628 52.382736,-2.977656 52.382637,-2.977696 52.382474,-2.977693 52.38234,-2.977622 52.382209,-2.977479 52.382031,-2.977175 52.381694,-2.97694 52.381417,-2.976698 52.381146,-2.976623 52.381043,-2.976554 52.380924,-2.976446 52.380715,-2.976363 52.380584,-2.976241 52.380298,-2.976087 52.379831,-2.976036 52.379608,-2.976069 52.37928,-2.976091 52.378928,-2.976071 52.378613,-2.976035 52.378424,-2.975992 52.378395,-2.975901 52.378223,-2.975842 52.378095,-2.975834 52.37802,-2.975822 52.3779,-2.975776 52.377677,-2.97571 52.377473,-2.975613 52.377281,-2.975564 52.377153,-2.975519 52.376974,-2.975433 52.376805,-2.975342 52.376658,-2.975273 52.376573,-2.97521 52.376501,-2.975142 52.376448,-2.975027 52.376371,-2.975012 52.376362,-2.974887 52.376293,-2.974849 52.376237,-2.974917 52.37617,-2.97468 52.376055,-2.974513 52.375966,-2.974362 52.375877,-2.97431 52.375843,-2.974406 52.375776,-2.974582 52.37576,-2.974724 52.37574,-2.974958 52.375653,-2.975739 52.375344,-2.976395 52.37508,-2.976664 52.374976,-2.97683 52.374762)",
+ "LINESTRING(-2.997814 52.40448,-2.997576 52.404378,-2.997296 52.404275,-2.996941 52.404117,-2.99681 52.404059,-2.996536 52.40394,-2.996318 52.403882,-2.996251 52.403881,-2.995987 52.403877,-2.995775 52.403884,-2.995515 52.403893,-2.994131 52.403964,-2.993583 52.403996,-2.992706 52.404048,-2.991636 52.404103,-2.990507 52.404147,-2.990135 52.404129)",
+ "LINESTRING(-2.982697 52.39662,-2.98267 52.396548,-2.982609 52.396497,-2.982548 52.396461,-2.982336 52.396409,-2.981863 52.396237,-2.981625 52.396145,-2.981339 52.396039,-2.981101 52.395931,-2.980871 52.395818,-2.980433 52.395637,-2.979978 52.395444,-2.979797 52.395343,-2.979337 52.395045,-2.978829 52.394739,-2.978805 52.39471,-2.978742 52.394637,-2.978614 52.39454,-2.978484 52.394484,-2.978426 52.394459,-2.97776 52.394027,-2.977536 52.393867,-2.977492 52.393849,-2.977344 52.393805,-2.975869 52.393539,-2.975558 52.393469,-2.975307 52.393408,-2.975026 52.393312,-2.974937 52.393268,-2.974733 52.393166,-2.974573 52.393071,-2.974432 52.39302,-2.974284 52.392994,-2.97424 52.392995,-2.97399 52.392997,-2.973932 52.393006,-2.973771 52.393035)",
+ "LINESTRING(-2.953194 52.366719,-2.953507 52.366736,-2.95351 52.366736,-2.953908 52.366768,-2.954334 52.366791,-2.954562 52.366786,-2.954729 52.366779,-2.95522 52.366749,-2.955385 52.366757,-2.955502 52.366795,-2.955579 52.366826,-2.955921 52.366996,-2.956027 52.367056,-2.95617 52.367141,-2.956353 52.367269,-2.956449 52.367341,-2.956469 52.367356,-2.956512 52.367399,-2.956659 52.367549,-2.956776 52.367661,-2.956944 52.367788,-2.957149 52.367924,-2.95735 52.368033,-2.95769 52.368188,-2.957898 52.368266,-2.95797 52.368293,-2.958228 52.368394,-2.958339 52.368458,-2.958398 52.368522,-2.958431 52.368627,-2.958477 52.368714,-2.95853 52.368773,-2.958568 52.368816,-2.958702 52.368923,-2.958908 52.369053,-2.959013 52.369151,-2.959058 52.369195,-2.959133 52.369258)",
+ "LINESTRING(-2.966068 52.360895,-2.966222 52.360891,-2.966478 52.360892,-2.966667 52.360885,-2.966835 52.360892,-2.967243 52.360923,-2.967495 52.360948,-2.967636 52.360953,-2.968078 52.360941,-2.968299 52.360944,-2.968545 52.360956,-2.968642 52.36095,-2.968822 52.360921,-2.968959 52.360912,-2.96913 52.360911,-2.969356 52.36086,-2.969479 52.360843,-2.969638 52.360834,-2.969796 52.360838,-2.96996 52.360861,-2.970075 52.360884,-2.970228 52.360942,-2.970326 52.360979,-2.970397 52.361011,-2.970521 52.361026,-2.970653 52.361041,-2.97072 52.361051,-2.97083 52.361056,-2.970936 52.36106,-2.97094 52.361061,-2.971028 52.36107,-2.971061 52.361068,-2.971165 52.361061,-2.971173 52.361062,-2.971229 52.361066,-2.971282 52.361087,-2.97138 52.361148,-2.97159 52.361282,-2.971747 52.361379,-2.971835 52.361427,-2.97189 52.361457,-2.971956 52.361493,-2.972094 52.361559,-2.972336 52.361658,-2.972537 52.361748,-2.972635 52.361815,-2.972698 52.361858,-2.972796 52.361938,-2.972891 52.362013,-2.972933 52.362045,-2.973002 52.36209)",
+ "LINESTRING(-2.9647 52.372689,-2.964835 52.372426,-2.964879 52.372262,-2.964847 52.372112,-2.964788 52.372011,-2.964689 52.371911,-2.964426 52.371713,-2.964038 52.371527,-2.963476 52.371297,-2.962907 52.3711,-2.962814 52.371067,-2.962322 52.3709,-2.961904 52.370745,-2.9619 52.370744,-2.961896 52.370742,-2.961634 52.370672,-2.961628 52.370671,-2.961259 52.370618,-2.961135 52.370605,-2.961085 52.3706,-2.961086 52.370591,-2.961095 52.370497,-2.961096 52.370488,-2.961121 52.370455,-2.96131 52.370209,-2.961519 52.369984,-2.961685 52.369803,-2.96174 52.369743,-2.961792 52.369643,-2.961827 52.369523,-2.961869 52.369469)",
+ "LINESTRING(-2.991736 52.342846,-2.991747 52.342813,-2.991756 52.342764,-2.991745 52.342628,-2.991739 52.342554,-2.991732 52.342531,-2.991722 52.342499,-2.991718 52.342485,-2.991714 52.342478,-2.9917 52.342451,-2.99169 52.342431,-2.991614 52.342342,-2.991594 52.342322,-2.991511 52.342239,-2.991321 52.34207,-2.991234 52.341994,-2.991138 52.341912,-2.99098 52.34178,-2.990834 52.34166,-2.990727 52.341549,-2.990648 52.341466,-2.990603 52.341414,-2.990584 52.341391,-2.990528 52.341311,-2.990484 52.341226,-2.990471 52.341181)",
+ "LINESTRING(-2.981095 52.339053,-2.981289 52.3392,-2.981405 52.339277,-2.981642 52.339412,-2.981862 52.339531,-2.98203 52.339615,-2.982129 52.339653,-2.982253 52.339691,-2.982421 52.33973,-2.982601 52.339756,-2.982838 52.339782,-2.982943 52.339791,-2.983192 52.339812,-2.983421 52.339829,-2.983576 52.339841,-2.983713 52.339838,-2.983942 52.339827,-2.984066 52.339821,-2.984197 52.339814,-2.984359 52.339813,-2.984503 52.339822,-2.984523 52.339825,-2.984641 52.339843,-2.984781 52.339878,-2.984989 52.33993,-2.985142 52.339976,-2.98533 52.340048,-2.98545 52.340101,-2.985793 52.340305,-2.986179 52.340517,-2.987262 52.341021,-2.987502 52.341139,-2.987993 52.341405,-2.98828 52.341552,-2.988419 52.341614,-2.988615 52.341683,-2.988796 52.34174,-2.989201 52.34185,-2.98978 52.342006,-2.989938 52.342049,-2.990297 52.342157,-2.990544 52.342244,-2.99059 52.342263,-2.990618 52.342275,-2.990752 52.342331,-2.990972 52.342441,-2.991182 52.342569,-2.991334 52.34268,-2.991462 52.34278,-2.991575 52.342877)",
+ "LINESTRING(-2.978378 52.326615,-2.97858 52.326744,-2.978935 52.326903,-2.979113 52.326964,-2.98031 52.327377,-2.98094 52.327552,-2.981104 52.3276,-2.981291 52.327676,-2.981642 52.327824,-2.981986 52.327972,-2.982377 52.328139,-2.982546 52.328208,-2.982722 52.328274,-2.982959 52.328344,-2.983549 52.328502,-2.983608 52.328518,-2.983888 52.328588,-2.984434 52.328711,-2.984582 52.328744,-2.985255 52.328894)",
+ "LINESTRING(-2.943084 52.483843,-2.943363 52.483805,-2.943509 52.483777,-2.943656 52.483749,-2.943861 52.483702,-2.946632 52.483131,-2.946734 52.483095,-2.946799 52.483048,-2.946915 52.482932,-2.946924 52.482923,-2.947675 52.481978,-2.947651 52.481577)",
+ "LINESTRING(-2.953071 52.469338,-2.953299 52.469326,-2.953594 52.469323,-2.953639 52.469322,-2.953712 52.469319,-2.953768 52.469307,-2.95379 52.469286,-2.953798 52.469217,-2.953806 52.46915,-2.953821 52.469024,-2.953855 52.468907,-2.953909 52.468773,-2.953968 52.468659,-2.954018 52.468562,-2.954068 52.468403,-2.954076 52.46835)",
+ "LINESTRING(-2.916212 52.483947,-2.91619 52.483345,-2.916182 52.48319,-2.916111 52.48314,-2.915883 52.483029,-2.915722 52.482945,-2.915568 52.482864,-2.915468 52.4828,-2.915327 52.482683,-2.915234 52.482569,-2.915128 52.482414,-2.915013 52.482195,-2.914907 52.48201,-2.914737 52.481759,-2.914614 52.481537,-2.914521 52.481405,-2.914382 52.481233,-2.914305 52.481106,-2.914271 52.481006,-2.914213 52.480799,-2.914163 52.480589,-2.914093 52.480359,-2.914032 52.480197,-2.913985 52.480069,-2.913891 52.479905,-2.913802 52.479758,-2.913734 52.479661,-2.913625 52.479521,-2.913468 52.479309,-2.913381 52.479147,-2.913312 52.478929,-2.913259 52.478706,-2.913218 52.478303,-2.913225 52.478168,-2.913255 52.478098,-2.913311 52.478047,-2.913425 52.477985,-2.913772 52.477823,-2.914284 52.477584,-2.914879 52.477304,-2.915429 52.477045,-2.915857 52.476856,-2.915888 52.476843,-2.916396 52.476614,-2.916883 52.476387,-2.917208 52.476227,-2.917382 52.476128,-2.917702 52.47591,-2.917998 52.475688,-2.918258 52.475444,-2.918358 52.475335,-2.918513 52.475115,-2.918572 52.474971,-2.918603 52.474853,-2.918636 52.474674,-2.918663 52.47453,-2.91872 52.474392,-2.918813 52.474244)",
+ "LINESTRING(-2.919312 52.439208,-2.919221 52.439125,-2.919125 52.43902,-2.919047 52.438938,-2.918999 52.438881,-2.918932 52.438799,-2.918872 52.438731,-2.918806 52.438649,-2.918698 52.438542,-2.918601 52.438445,-2.918499 52.438349,-2.918451 52.438292,-2.918439 52.438256,-2.918376 52.438088,-2.918314 52.437944,-2.918234 52.437751,-2.918185 52.437647,-2.918111 52.437478,-2.918055 52.437349,-2.918005 52.437213,-2.917956 52.437109,-2.917925 52.437023,-2.9179 52.43698,-2.917864 52.436926,-2.917809 52.436844,-2.917742 52.436751,-2.917724 52.436719,-2.917693 52.436644,-2.917668 52.436583,-2.917572 52.436479,-2.91747 52.436365,-2.917331 52.436215,-2.917139 52.436033,-2.917043 52.435915,-2.916953 52.435851,-2.916768 52.435712,-2.916576 52.435559,-2.916332 52.435417,-2.916082 52.435279,-2.915838 52.435151,-2.915684 52.435073,-2.915559 52.43501,-2.915481 52.434949,-2.915403 52.434892,-2.915349 52.434824,-2.9153 52.434756,-2.915258 52.434688,-2.915228 52.434645,-2.915186 52.434572,-2.915155 52.434498,-2.915139 52.434444,-2.915139 52.43442,-2.915138 52.434417,-2.915139 52.434415,-2.91516 52.434369,-2.915165 52.434358,-2.915181 52.434324,-2.915231 52.43426,-2.915311 52.434181,-2.915369 52.434138,-2.915495 52.434062,-2.91564 52.433982,-2.915832 52.433884,-2.916101 52.433748,-2.916287 52.433654,-2.916591 52.43349,-2.916911 52.433308,-2.917317 52.433053,-2.917607 52.432862,-2.918043 52.432589,-2.918319 52.432407,-2.91859 52.432242,-2.918741 52.43214,-2.918915 52.43202,-2.919031 52.431948,-2.919164 52.431846,-2.91935 52.4317,-2.919518 52.431584,-2.919732 52.43141,-2.919836 52.431326,-2.920015 52.431156,-2.920147 52.431018,-2.920192 52.430928,-2.920225 52.430809,-2.920223 52.43068,-2.92019 52.430536,-2.920104 52.430342,-2.920006 52.430149,-2.919897 52.429995,-2.919775 52.429802,-2.91972 52.429727,-2.919612 52.429616,-2.919503 52.429521,-2.919419 52.429431,-2.918939 52.429004,-2.918704 52.42882,-2.918615 52.428748,-2.918495 52.428652,-2.918399 52.428585,-2.918197 52.428464,-2.91803 52.428365,-2.917685 52.428162,-2.917572 52.428098,-2.917458 52.428024,-2.917214 52.427882,-2.917012 52.427772,-2.916822 52.427687,-2.916679 52.427623,-2.916631 52.427591,-2.916617 52.427566,-2.916582 52.427504,-2.91651 52.427356)",
+ "LINESTRING(-2.947531 52.452306,-2.947455 52.452225,-2.947258 52.452046,-2.947076 52.45192,-2.946897 52.451781,-2.946825 52.451714,-2.946704 52.451592,-2.946619 52.451467,-2.946503 52.451249,-2.946459 52.451116,-2.946407 52.450915,-2.946378 52.450667,-2.946375 52.45052,-2.946369 52.450229,-2.946394 52.450034,-2.946421 52.449922,-2.946465 52.44976,-2.946549 52.449573,-2.946633 52.449371,-2.946715 52.449246,-2.947034 52.448702,-2.94729 52.448297,-2.947489 52.447958,-2.94775 52.447531,-2.947921 52.447256,-2.948205 52.446801,-2.948314 52.446631,-2.948518 52.446295,-2.948569 52.446201,-2.948642 52.446042,-2.948715 52.445855,-2.948821 52.445591,-2.948888 52.445408,-2.948953 52.445166,-2.948951 52.445083,-2.948944 52.445001,-2.948888 52.444902,-2.948786 52.444799,-2.948738 52.444734,-2.94869 52.444649,-2.948687 52.444493)",
+ "LINESTRING(-2.984196 52.486523,-2.984457 52.486368,-2.984901 52.486099,-2.985548 52.4857,-2.985908 52.48547,-2.986144 52.485334,-2.986369 52.485187,-2.986479 52.485104,-2.986539 52.485057,-2.986632 52.485021,-2.986663 52.485009,-2.986728 52.485002,-2.986917 52.485008,-2.986978 52.485013,-2.987559 52.485093,-2.987778 52.485123,-2.987914 52.485143,-2.988009 52.485137,-2.988065 52.485122,-2.988137 52.485085,-2.988211 52.485037,-2.988273 52.484995,-2.98831 52.484979)",
+ "LINESTRING(-2.995145 52.490812,-2.995121 52.49082,-2.995106 52.490825,-2.995003 52.490841)",
+ "LINESTRING(-2.987242 52.435163,-2.987322 52.435211,-2.987423 52.435307,-2.98768 52.435622,-2.987945 52.435949,-2.988222 52.436339,-2.988312 52.436495,-2.988352 52.436544,-2.988361 52.436555,-2.988405 52.436579,-2.988465 52.436592,-2.988548 52.436586,-2.988625 52.436547,-2.988673 52.436501,-2.988917 52.436278,-2.989057 52.43615,-2.989383 52.435896,-2.989453 52.435863,-2.989572 52.435828,-2.989748 52.435819,-2.990029 52.435835,-2.990331 52.435876,-2.990701 52.435933,-2.990873 52.435968,-2.990993 52.435992,-2.991047 52.436006,-2.991327 52.436078,-2.992217 52.436386,-2.992457 52.436462,-2.992636 52.436531,-2.992846 52.436578,-2.993009 52.436622,-2.993203 52.436691,-2.993324 52.436736,-2.99351 52.436806,-2.993735 52.436909,-2.993967 52.43702,-2.994208 52.437165,-2.994378 52.437262,-2.994486 52.437308,-2.994589 52.437341,-2.994683 52.43736,-2.994729 52.437357,-2.994784 52.437355,-2.994838 52.437352,-2.994951 52.437331,-2.995025 52.437296,-2.995207 52.437212,-2.995258 52.437194,-2.995512 52.43715,-2.995565 52.437141,-2.995813 52.437096,-2.995912 52.437047,-2.996021 52.436998)",
+ "LINESTRING(-3.029102 52.479538,-3.029049 52.479509,-3.028994 52.479479,-3.028888 52.479419,-3.028646 52.47933,-3.028348 52.479265,-3.028073 52.479214,-3.02755 52.479103,-3.027262 52.47905,-3.027073 52.479053,-3.026789 52.479067,-3.026518 52.47907,-3.026262 52.479053,-3.025955 52.479011,-3.025684 52.47899,-3.025529 52.478978,-3.025097 52.478974,-3.024128 52.47895,-3.023829 52.478945,-3.023721 52.478946,-3.023507 52.478953,-3.023167 52.478975,-3.022985 52.478992,-3.02261 52.479015,-3.021561 52.479059,-3.020843 52.479097,-3.020462 52.47911,-3.020266 52.479114,-3.020121 52.479106,-3.019963 52.47908,-3.019725 52.479036,-3.01932 52.478968,-3.018772 52.478867,-3.018526 52.478829,-3.018251 52.478814,-3.017985 52.478774,-3.017884 52.478751,-3.017605 52.478673,-3.017112 52.478514,-3.016597 52.478347,-3.016245 52.478223,-3.015841 52.478072,-3.015526 52.477969,-3.015358 52.477924,-3.014825 52.477794,-3.014565 52.47771,-3.014336 52.477613,-3.014103 52.4775,-3.013876 52.47739,-3.01364 52.477248,-3.013381 52.4771,-3.013161 52.476988,-3.013064 52.476926)",
+ "LINESTRING(-3.008701 52.44449,-3.008806 52.444489,-3.008871 52.444477,-3.00893 52.444439,-3.008992 52.444367,-3.009041 52.444272,-3.009049 52.444253,-3.009086 52.444167,-3.009098 52.444151,-3.009134 52.444105,-3.009155 52.444079,-3.009207 52.444041,-3.009221 52.444037,-3.009296 52.444019,-3.009444 52.444016,-3.009517 52.444026,-3.009602 52.444065,-3.009694 52.444138,-3.009901 52.444328,-3.010028 52.444423,-3.010179 52.444535,-3.010234 52.444616,-3.010236 52.4447,-3.01023 52.444761,-3.010174 52.444835,-3.009969 52.445065,-3.009889 52.445178,-3.009855 52.445256,-3.009839 52.445333,-3.009853 52.445429,-3.009877 52.445498,-3.010006 52.445802,-3.010081 52.445987,-3.010137 52.446124,-3.010162 52.446161,-3.010229 52.446251,-3.010268 52.446287,-3.010294 52.446311,-3.010299 52.446313,-3.010328 52.446328,-3.010406 52.446368,-3.010632 52.446455,-3.010819 52.446526,-3.011086 52.446642,-3.011376 52.446774,-3.011647 52.446917,-3.011727 52.446963,-3.011901 52.447061,-3.012048 52.447139,-3.012145 52.447179,-3.012182 52.447194,-3.012277 52.447234,-3.01243 52.447287,-3.012658 52.447348,-3.012779 52.447373,-3.012893 52.447397,-3.012977 52.447417,-3.012991 52.447421,-3.013064 52.447438,-3.013156 52.447476,-3.013197 52.447503,-3.013264 52.447547,-3.013364 52.447637,-3.013408 52.447677,-3.013462 52.447734,-3.013562 52.447839,-3.013753 52.448031,-3.013818 52.44808,-3.013951 52.44818,-3.014102 52.448282,-3.014287 52.448381,-3.014469 52.448466,-3.014688 52.44857,-3.014982 52.448692,-3.015141 52.448747,-3.015189 52.448758,-3.015261 52.448775,-3.015477 52.448805,-3.015627 52.448814,-3.015683 52.448818,-3.015766 52.448816,-3.01584 52.448814,-3.015968 52.44881,-3.016098 52.448795,-3.016222 52.44878,-3.016235 52.448779,-3.016315 52.448758,-3.0164 52.448737,-3.016504 52.44871,-3.016553 52.448693,-3.016907 52.44857,-3.01692 52.448565,-3.017298 52.448432,-3.017657 52.448308,-3.018457 52.448028,-3.018735 52.447925,-3.019186 52.447718,-3.019297 52.447667,-3.019504 52.447573,-3.019691 52.447485,-3.020021 52.447306,-3.02034 52.447097,-3.020412 52.447042,-3.020528 52.446951,-3.020585 52.446897,-3.0207 52.446752,-3.02077 52.446625,-3.020854 52.446427,-3.020881 52.446319,-3.02093 52.446112,-3.020953 52.446002,-3.020959 52.445992,-3.02098 52.445958,-3.021035 52.445909,-3.021088 52.445881,-3.021142 52.445861,-3.021244 52.445841,-3.021316 52.445845,-3.021396 52.445857,-3.021469 52.445882,-3.021555 52.445938,-3.021636 52.446023,-3.02173 52.446141,-3.021988 52.446453,-3.022105 52.44658,-3.022157 52.446676,-3.022161 52.446683,-3.022195 52.446757,-3.022211 52.446841,-3.022242 52.447147,-3.022262 52.447328,-3.022289 52.4474,-3.022322 52.447442,-3.02234 52.447465,-3.022449 52.44753,-3.022566 52.447562,-3.022722 52.447581,-3.022849 52.447588,-3.023013 52.447578,-3.023241 52.447549,-3.02373 52.447493,-3.023942 52.447483)",
+ "LINESTRING(-2.888846 52.559077,-2.888526 52.559015,-2.8881 52.558936,-2.887961 52.558894,-2.887797 52.55883,-2.887612 52.558738,-2.887359 52.558609,-2.887079 52.558467,-2.886905 52.558368,-2.886651 52.558193,-2.886535 52.55806,-2.886397 52.55782,-2.886355 52.557709,-2.886353 52.557593,-2.886389 52.557524,-2.886442 52.55749,-2.886469 52.557473,-2.886648 52.557357,-2.886851 52.557271,-2.887098 52.557196,-2.887359 52.557129,-2.887542 52.557082,-2.887792 52.557048,-2.88827 52.557015,-2.888439 52.556996,-2.888542 52.55699,-2.889071 52.556911,-2.889527 52.556827,-2.889674 52.556817,-2.889807 52.556843,-2.890283 52.55701,-2.890685 52.557196,-2.890908 52.557302,-2.891384 52.557487)",
+ "LINESTRING(-3.001325 52.540011,-3.001671 52.540197,-3.002042 52.540409,-3.002262 52.540556,-3.002374 52.540609,-3.002493 52.54064,-3.002832 52.540729,-3.00343 52.540875,-3.00422 52.541066,-3.004733 52.54121,-3.004769 52.541221,-3.004913 52.54127,-3.005031 52.541311,-3.005047 52.541327,-3.005244 52.541459,-3.005596 52.541763,-3.006017 52.542175,-3.006452 52.542614,-3.006565 52.542732,-3.006843 52.542953,-3.006847 52.542957,-3.006998 52.543117,-3.007013 52.54314,-3.007085 52.543249,-3.007161 52.543314,-3.007272 52.54334,-3.007546 52.543391,-3.007698 52.543446,-3.007879 52.543533,-3.007883 52.543536,-3.008032 52.543626,-3.008038 52.54363,-3.008144 52.543722,-3.008188 52.543761,-3.008298 52.543868,-3.008317 52.543886,-3.008438 52.54404,-3.008465 52.544087,-3.008538 52.544214,-3.008612 52.544387,-3.008682 52.544563)",
+ "LINESTRING(-3.011001 52.573086,-3.012121 52.572393,-3.01401 52.571244,-3.014085 52.571198,-3.014816 52.570754,-3.014951 52.570672,-3.015417 52.570455,-3.015886 52.570226,-3.016029 52.570153,-3.016323 52.569987,-3.016482 52.569904,-3.016585 52.569854,-3.016815 52.569735,-3.016974 52.56964,-3.017033 52.569586,-3.017063 52.569502,-3.017065 52.569402,-3.017007 52.569243,-3.016987 52.569186,-3.016885 52.568864,-3.016852 52.568756)",
+ "LINESTRING(-3.015129 52.575841,-3.015019 52.575829,-3.014945 52.575821,-3.014885 52.575812,-3.014782 52.575786,-3.014678 52.57576,-3.014574 52.575734,-3.01447 52.575717,-3.014445 52.575713,-3.014381 52.5757,-3.0142 52.575673,-3.013943 52.575639,-3.013602 52.575603)",
+ "LINESTRING(-3.019494 52.52701,-3.019262 52.527165,-3.01868 52.527548,-3.018282 52.52781,-3.01832 52.527865,-3.018397 52.528008,-3.018519 52.528205,-3.018731 52.528464,-3.018942 52.528642,-3.019077 52.52874,-3.019108 52.528766,-3.019393 52.529033,-3.019454 52.529105,-3.01956 52.529248,-3.019938 52.52977,-3.020112 52.529971,-3.020139 52.530025,-3.020088 52.530084,-3.020002 52.530183,-3.019925 52.530293)",
+ "LINESTRING(-2.740076 52.23265,-2.740031 52.232641,-2.739944 52.232642,-2.739856 52.232643,-2.739753 52.232652,-2.739637 52.23268,-2.739535 52.232734,-2.739506 52.232762,-2.739406 52.232888,-2.739377 52.232906,-2.739333 52.232934,-2.73929 52.232952,-2.739217 52.232961,-2.739071 52.232971,-2.738968 52.232981)",
+ "LINESTRING(-2.74881 52.228926,-2.748782 52.228995,-2.748772 52.229095,-2.748813 52.229324,-2.74882 52.229329,-2.7489 52.22938,-2.748952 52.229431,-2.748997 52.229574,-2.749054 52.229656,-2.74907 52.229679,-2.749201 52.229778)",
+ "LINESTRING(-2.762382 52.225983,-2.7627 52.225925,-2.763153 52.225859,-2.763517 52.225776,-2.763912 52.225686)",
+ "LINESTRING(-2.798257 52.212656,-2.798231 52.212824,-2.798217 52.212861,-2.798145 52.212924,-2.797348 52.213361,-2.79711 52.21347,-2.796976 52.213514,-2.796803 52.213559,-2.796593 52.213602,-2.796416 52.213631,-2.796137 52.213677,-2.795965 52.213701,-2.795794 52.213715,-2.795591 52.213721,-2.79543 52.21372,-2.795302 52.213724,-2.795172 52.213737,-2.795033 52.213758,-2.794911 52.213788,-2.794771 52.213826,-2.794724 52.213839,-2.794536 52.213891,-2.794189 52.213996,-2.793878 52.214113,-2.793834 52.21414,-2.79356 52.214357,-2.793459 52.214421,-2.793285 52.214494,-2.793038 52.214595,-2.792965 52.214613,-2.792921 52.214622,-2.792863 52.214632,-2.792819 52.214632,-2.792731 52.214615,-2.792443 52.214496)",
+ "LINESTRING(-2.770867 52.164475,-2.770805 52.164343,-2.770749 52.164267,-2.770768 52.164207,-2.770905 52.164126,-2.771177 52.16399,-2.771345 52.163895,-2.771531 52.163784,-2.771669 52.163688,-2.77181 52.163566,-2.771884 52.163495,-2.771993 52.163371,-2.7721 52.163235,-2.772176 52.163118,-2.772345 52.163,-2.772474 52.162882,-2.772558 52.162848,-2.772658 52.162837,-2.77279 52.162871,-2.772898 52.163016,-2.773065 52.163285,-2.773134 52.163376,-2.773404 52.163732,-2.773459 52.163818,-2.77355 52.16408)",
+ "LINESTRING(-2.781014 52.154968,-2.780805 52.154691,-2.780461 52.154235,-2.780358 52.154095,-2.780245 52.153973,-2.780063 52.153849,-2.77988 52.153794,-2.779824 52.153785,-2.779736 52.153772,-2.77963 52.153756,-2.779487 52.153738)",
+ "LINESTRING(-2.870687 52.157811,-2.870528 52.157893,-2.870484 52.157902,-2.870124 52.157943,-2.869676 52.157994)",
+ "LINESTRING(-2.791074 52.328059,-2.791045 52.32805,-2.791015 52.328041,-2.790911 52.32797,-2.790554 52.327667,-2.79042 52.327582,-2.790316 52.327516,-2.79031 52.327512,-2.790063 52.327293,-2.789899 52.327132,-2.789749 52.32698,-2.789689 52.326881,-2.789596 52.326639,-2.789536 52.326523,-2.78952 52.326482,-2.789505 52.326442,-2.789473 52.32629,-2.789516 52.326217,-2.789573 52.326154,-2.789629 52.326096,-2.789686 52.326042,-2.789909 52.325879,-2.789968 52.325835,-2.790036 52.325764,-2.790079 52.32571,-2.790135 52.325593,-2.790177 52.325449,-2.790223 52.325296)",
+ "LINESTRING(-2.773759 52.312448,-2.77381 52.312252,-2.773812 52.312017,-2.773804 52.311886,-2.77377 52.311786,-2.773674 52.311637,-2.773624 52.311554,-2.773614 52.311493,-2.773592 52.311322,-2.773565 52.311134,-2.773535 52.311048,-2.773523 52.311013,-2.773473 52.310921,-2.773387 52.310827,-2.773263 52.31071,-2.773185 52.310631,-2.773152 52.310584,-2.773114 52.310494,-2.77309 52.310445,-2.773064 52.310392,-2.773028 52.310346,-2.772976 52.310304,-2.772771 52.310182,-2.77243 52.309952,-2.772317 52.309891,-2.772167 52.309832,-2.771975 52.309775,-2.77168 52.309706,-2.77148 52.309669,-2.77137 52.30967)",
+ "LINESTRING(-2.785431 52.305367,-2.785715 52.305338,-2.785805 52.305312,-2.785869 52.305267,-2.785918 52.305217,-2.785966 52.305127,-2.786009 52.305053,-2.786069 52.304985,-2.786168 52.30492,-2.786481 52.30477,-2.786754 52.30465,-2.786958 52.304563,-2.787363 52.304407,-2.787459 52.304362,-2.787543 52.304308,-2.787585 52.304261,-2.787586 52.304219,-2.787557 52.304173,-2.787526 52.304166,-2.787396 52.304139,-2.786805 52.304046,-2.786647 52.304034,-2.786116 52.304031,-2.785881 52.304033,-2.785573 52.304044,-2.785383 52.304052,-2.785165 52.304042,-2.78493 52.304011,-2.784582 52.303947,-2.784168 52.303884,-2.784024 52.303864,-2.783814 52.303824,-2.783694 52.303791,-2.783578 52.303753,-2.78352 52.303729,-2.783488 52.303712,-2.783434 52.303684,-2.783335 52.303628,-2.783206 52.303549,-2.783037 52.303439,-2.782861 52.303342,-2.782699 52.303257,-2.782395 52.30311,-2.781973 52.302914,-2.781694 52.302819,-2.781396 52.30272,-2.781217 52.302671,-2.780941 52.302616,-2.780775 52.302591,-2.780146 52.3025,-2.779867 52.302464,-2.779539 52.302432,-2.779246 52.302421,-2.778979 52.302411,-2.778679 52.302375,-2.778164 52.302297,-2.7779 52.302263,-2.777551 52.30225,-2.777494 52.302248,-2.776549 52.302209,-2.776271 52.302202,-2.77608 52.302203,-2.775656 52.30226,-2.775393 52.302315,-2.775297 52.302361)",
+ "LINESTRING(-2.768162 52.285915,-2.768448 52.285831,-2.768652 52.285764,-2.768716 52.285764,-2.768724 52.285766,-2.76878 52.28578,-2.768815 52.285808,-2.768911 52.285913,-2.769079 52.286078,-2.769143 52.286115,-2.76922 52.286138,-2.769578 52.286155,-2.769661 52.286164,-2.769734 52.286199,-2.769802 52.286251,-2.769847 52.286303)",
+ "LINESTRING(-2.785332 52.291734,-2.785304 52.291218,-2.785283 52.29103,-2.785269 52.290905)",
+ "LINESTRING(-2.810067 52.296994,-2.810306 52.296809,-2.810486 52.296658,-2.810606 52.296549,-2.810711 52.296415,-2.810832 52.296234,-2.810912 52.296108,-2.810927 52.296089,-2.81152 52.295364,-2.811823 52.29498,-2.812021 52.294804,-2.812244 52.294671,-2.812416 52.294582,-2.812839 52.294371,-2.813389 52.294105,-2.813715 52.293961,-2.814725 52.29352,-2.815498 52.293161,-2.815944 52.292958,-2.816497 52.292709,-2.816911 52.292523,-2.817309 52.292353,-2.817554 52.292232,-2.817807 52.29212,-2.818191 52.291952,-2.818516 52.291758,-2.818674 52.291653,-2.818796 52.291556,-2.819045 52.291358,-2.819169 52.291236,-2.819287 52.291088,-2.819404 52.290933,-2.819521 52.290805,-2.819616 52.290721,-2.819736 52.29064,-2.819933 52.290532,-2.820069 52.290466,-2.820477 52.290285,-2.820695 52.29019,-2.820963 52.290063,-2.821334 52.289891,-2.821566 52.289792,-2.821976 52.289633,-2.822547 52.2894,-2.822746 52.289344,-2.822912 52.289303,-2.823099 52.289258,-2.823253 52.289233,-2.823578 52.289197,-2.823976 52.289155,-2.824248 52.289124,-2.824589 52.289082,-2.824774 52.289047,-2.825019 52.289004,-2.825263 52.288949,-2.825477 52.288862,-2.825763 52.288707,-2.826032 52.288602,-2.826442 52.288464,-2.826752 52.288385,-2.82704 52.288331,-2.827267 52.288288,-2.827426 52.288252,-2.827609 52.28819,-2.827827 52.288111,-2.827996 52.288043,-2.828204 52.287909,-2.828342 52.287776,-2.828584 52.287612,-2.828936 52.287406,-2.829149 52.287291,-2.829567 52.287102,-2.82977 52.287014,-2.830091 52.286903,-2.830346 52.286808,-2.830576 52.286697,-2.830867 52.286455,-2.831063 52.286299,-2.831265 52.286057,-2.831309 52.285924,-2.831315 52.285778,-2.831316 52.285452,-2.831349 52.285112,-2.83138 52.284946,-2.831477 52.28477,-2.831655 52.284461,-2.831747 52.284338,-2.832017 52.284076,-2.832121 52.283978,-2.83233 52.283767,-2.832466 52.283576,-2.832612 52.283282,-2.83271 52.283022,-2.832765 52.282754,-2.832774 52.282516,-2.83276 52.28226,-2.832722 52.282057,-2.832663 52.28172,-2.832668 52.281617,-2.8327 52.281503,-2.832809 52.281175,-2.832862 52.280979,-2.832885 52.280839,-2.832872 52.280765,-2.832837 52.280582,-2.832766 52.280266,-2.832763 52.280223,-2.832772 52.280085,-2.832798 52.279996,-2.832863 52.279778,-2.832882 52.279713,-2.832876 52.279654,-2.832819 52.279514,-2.832641 52.279207,-2.832576 52.279063,-2.832564 52.279002,-2.832572 52.278926,-2.832579 52.278835)",
+ "LINESTRING(-2.8096 52.313156,-2.809812 52.312762,-2.809934 52.312592,-2.810033 52.312491,-2.810125 52.312411,-2.81044 52.312106,-2.810489 52.312065,-2.810617 52.311959,-2.810653 52.31193,-2.810848 52.311783,-2.810927 52.311736,-2.811041 52.311684,-2.811097 52.311676,-2.811322 52.311644,-2.811699 52.311638,-2.811945 52.311586,-2.812366 52.311228,-2.812591 52.311079,-2.812836 52.310968,-2.81304 52.310901,-2.813225 52.310872,-2.813313 52.31088,-2.813416 52.310888,-2.813783 52.311141,-2.813911 52.311216,-2.814051 52.311194,-2.814099 52.311176,-2.814195 52.31114,-2.814227 52.311087,-2.814246 52.311025,-2.814254 52.310972,-2.814214 52.310739,-2.814205 52.31068,-2.81411 52.31053,-2.813621 52.310087,-2.813172 52.309559,-2.813157 52.309541,-2.813064 52.309299,-2.813077 52.309132,-2.813233 52.30893,-2.81437 52.308113,-2.814622 52.307931,-2.815506 52.307296,-2.815512 52.307292,-2.81569 52.307207,-2.81587 52.307147,-2.816298 52.307036,-2.816653 52.306942,-2.816811 52.306893,-2.817057 52.3068,-2.817143 52.30675,-2.817279 52.30664,-2.817435 52.306508,-2.817543 52.306409,-2.817628 52.306361,-2.8179 52.306176,-2.818153 52.306013,-2.818347 52.305877,-2.81847 52.305738,-2.818656 52.305494,-2.818772 52.305448)",
+ "LINESTRING(-2.84966 52.261773,-2.849607 52.261747,-2.849544 52.261684,-2.849539 52.261679,-2.849462 52.26156,-2.849356 52.261536,-2.849261 52.261527,-2.849154 52.261515)",
+ "LINESTRING(-2.871409 52.253843,-2.87124 52.25344,-2.871087 52.253117,-2.871026 52.252974,-2.870964 52.252804,-2.870824 52.2524,-2.870797 52.252328,-2.870748 52.252157,-2.870679 52.251973,-2.870634 52.251891,-2.870588 52.251822,-2.870409 52.2517,-2.870132 52.251533,-2.869956 52.251435,-2.869871 52.251388,-2.869749 52.251338,-2.869334 52.251179,-2.868741 52.250899,-2.868417 52.250783,-2.868236 52.250729,-2.868045 52.250672,-2.866816 52.250353)",
+ "LINESTRING(-2.866721 52.282142,-2.866766 52.282095,-2.866835 52.282034,-2.866896 52.281948,-2.866942 52.281807,-2.866984 52.281567,-2.866991 52.281348,-2.867006 52.281279,-2.867061 52.281207,-2.867135 52.281129,-2.867236 52.281049,-2.867331 52.280989,-2.867449 52.280938,-2.867612 52.280873,-2.868169 52.280722,-2.868635 52.280548,-2.868836 52.280505,-2.868971 52.2805,-2.869074 52.280499,-2.869279 52.280507,-2.869416 52.2805,-2.869557 52.280482,-2.869675 52.280445,-2.869778 52.280377,-2.869861 52.280285,-2.869898 52.280191,-2.869895 52.280142,-2.869892 52.280068,-2.869854 52.279936,-2.869807 52.279858,-2.869681 52.279711,-2.869446 52.279519,-2.869358 52.279459,-2.869315 52.279431,-2.869233 52.279397,-2.869029 52.279331,-2.868575 52.279258,-2.8683 52.279184,-2.868182 52.279139,-2.867982 52.279053,-2.867644 52.278872,-2.867516 52.278822,-2.867511 52.27882,-2.867427 52.278795,-2.867315 52.278778,-2.867175 52.278764,-2.867006 52.27877,-2.866844 52.278795,-2.866732 52.278819,-2.866155 52.278948,-2.865845 52.279016,-2.865695 52.279031,-2.865584 52.279027,-2.865529 52.279025,-2.865376 52.279001,-2.865206 52.278966,-2.865049 52.278909,-2.864961 52.278851,-2.864926 52.278799,-2.864926 52.278784,-2.864925 52.278747,-2.864945 52.278685,-2.864986 52.278636,-2.865202 52.278483,-2.865357 52.278359,-2.865431 52.278293,-2.865515 52.278218,-2.865547 52.278181,-2.865644 52.278066,-2.865765 52.277915,-2.865774 52.277902,-2.865846 52.277793,-2.865912 52.277678,-2.86599 52.277542,-2.86609 52.277401,-2.866137 52.277336,-2.86626 52.2772,-2.866323 52.277128,-2.866543 52.276946,-2.866747 52.276785,-2.866852 52.276704,-2.866996 52.276593,-2.867047 52.27655,-2.867079 52.276496,-2.867102 52.27644,-2.86713 52.276372,-2.86713 52.276355,-2.867129 52.276333,-2.867129 52.276317,-2.867122 52.276257,-2.867119 52.276239,-2.867111 52.276195,-2.867043 52.276054,-2.867001 52.275938,-2.866955 52.275829,-2.866893 52.275746,-2.866827 52.275671,-2.866762 52.275632,-2.866691 52.275578,-2.866513 52.275507,-2.866306 52.275444,-2.86601 52.275385,-2.865752 52.275365,-2.865458 52.275371,-2.86523 52.275395,-2.865015 52.275435,-2.864873 52.275467,-2.864636 52.275542,-2.864401 52.275629,-2.864239 52.275701,-2.863556 52.276004,-2.863334 52.276119,-2.863074 52.276293,-2.863031 52.276303,-2.862937 52.276294,-2.862877 52.276262,-2.862847 52.276227,-2.862827 52.276156,-2.862827 52.276075,-2.862831 52.276051,-2.86284 52.275998,-2.862844 52.275975,-2.862864 52.275936,-2.862937 52.275793,-2.86301 52.275653,-2.863091 52.275495,-2.863188 52.275311,-2.863291 52.275136,-2.863322 52.275083,-2.863481 52.274831,-2.863709 52.274511,-2.863937 52.274198,-2.863983 52.274135,-2.864108 52.273941,-2.864208 52.27378,-2.864262 52.273664,-2.864344 52.273524,-2.864377 52.273449,-2.864455 52.273267,-2.864541 52.273114,-2.864604 52.272967,-2.86466 52.272888,-2.864761 52.272799,-2.864874 52.272701,-2.865244 52.272223,-2.865303 52.272127,-2.865359 52.272017,-2.86538 52.271943,-2.865378 52.271853,-2.865358 52.271782,-2.865321 52.271713,-2.865314 52.2717,-2.865286 52.271658,-2.865212 52.271578,-2.865112 52.271488,-2.864864 52.271324,-2.864508 52.271098,-2.864143 52.270876,-2.863871 52.270713,-2.86357 52.270537,-2.863198 52.270336,-2.862901 52.270192,-2.862665 52.270082,-2.862462 52.269977,-2.862355 52.269914,-2.862143 52.269791,-2.861777 52.269578,-2.861671 52.269522,-2.861598 52.269466,-2.861568 52.269412,-2.861557 52.269298,-2.861551 52.269222)",
+ "LINESTRING(-2.870042 52.273476,-2.870124 52.273451,-2.870412 52.273356,-2.870614 52.273316,-2.870828 52.273282,-2.871244 52.27326,-2.871744 52.273239,-2.872129 52.273221,-2.87277 52.273192,-2.87302 52.273178,-2.873339 52.273154,-2.873444 52.273149,-2.873634 52.27313,-2.873663 52.27312,-2.873692 52.273102,-2.873773 52.273038,-2.873892 52.272891,-2.873901 52.272881,-2.873987 52.272815,-2.87408 52.272782,-2.874156 52.272771,-2.874329 52.272746,-2.874551 52.272709,-2.874662 52.272677,-2.874758 52.272637,-2.874892 52.272595,-2.874999 52.272543,-2.875313 52.27243,-2.875555 52.27235,-2.875835 52.272267,-2.876071 52.272199,-2.876178 52.272148,-2.876381 52.272039,-2.876555 52.271924,-2.876722 52.271792,-2.876875 52.271663,-2.87701 52.271536,-2.877145 52.271414,-2.877244 52.271326,-2.877368 52.271244,-2.877559 52.271134,-2.877754 52.271029,-2.877916 52.27095,-2.878073 52.270895,-2.878135 52.270884,-2.878202 52.270885,-2.878258 52.270903,-2.8783 52.27094,-2.878464 52.271092,-2.878685 52.271279,-2.878926 52.271466,-2.879012 52.271546,-2.879085 52.271657,-2.879158 52.271791,-2.879168 52.271856,-2.879157 52.272034,-2.879174 52.272151,-2.879231 52.272368,-2.879301 52.272639,-2.879357 52.272808,-2.879362 52.272916,-2.879353 52.273034,-2.87934 52.273124,-2.879347 52.273212,-2.879365 52.273387,-2.87935 52.2735,-2.879281 52.273704,-2.879202 52.273859,-2.87915 52.273902,-2.879067 52.274004,-2.879003 52.274159,-2.878877 52.27432,-2.878794 52.274425,-2.87864 52.274567)",
+ "LINESTRING(-2.866721 52.282142,-2.866546 52.282289,-2.866394 52.282429,-2.866309 52.282508,-2.86607 52.282714,-2.865899 52.282839,-2.865598 52.283033,-2.865402 52.283143,-2.865272 52.283216,-2.864748 52.28343,-2.864323 52.283589,-2.86384 52.283766,-2.863651 52.28385,-2.863464 52.283952,-2.863198 52.284137,-2.86295 52.284316,-2.862834 52.284492)",
+ "LINESTRING(-2.845194 52.369086,-2.845265 52.369109,-2.845329 52.369154,-2.845454 52.369264,-2.845608 52.369421,-2.845968 52.369803,-2.846306 52.370142,-2.846346 52.370182,-2.846352 52.370188,-2.847293 52.371183,-2.847719 52.371643,-2.847908 52.371843,-2.849636 52.373671)",
+ "LINESTRING(-2.772262 52.351621,-2.772146 52.351676,-2.772073 52.351712,-2.771812 52.351912,-2.771522 52.35213,-2.771022 52.352546,-2.770992 52.352572,-2.770365 52.353117,-2.770282 52.353181,-2.770046 52.353362,-2.769878 52.353489,-2.769556 52.353646,-2.769406 52.353699,-2.76872 52.353919,-2.768529 52.353947,-2.768192 52.353949,-2.767383 52.353892,-2.76723 52.353883,-2.766907 52.353874,-2.766437 52.353888,-2.766083 52.353923,-2.765772 52.353968,-2.765589 52.354014,-2.765519 52.354032,-2.765474 52.354043,-2.765296 52.354115,-2.765148 52.354231,-2.76491 52.3544,-2.764838 52.354448,-2.764679 52.354533,-2.764424 52.354632,-2.764211 52.354685,-2.763933 52.354741,-2.763889 52.35475,-2.763596 52.354806,-2.763321 52.354844,-2.763259 52.354853,-2.763235 52.354852,-2.763095 52.35485,-2.763014 52.354846,-2.762868 52.354839,-2.762565 52.35481,-2.762292 52.354785,-2.762104 52.354779,-2.761605 52.354788,-2.761516 52.354793,-2.761476 52.354795,-2.761285 52.354806,-2.761247 52.354808,-2.760687 52.354846,-2.760029 52.354864,-2.760015 52.354865,-2.759721 52.354886,-2.759369 52.354926,-2.759053 52.354955,-2.758903 52.354953,-2.758735 52.35493,-2.758489 52.354875,-2.758337 52.354841,-2.758063 52.354778,-2.757839 52.354704,-2.757629 52.354657,-2.757158 52.35459,-2.756717 52.354517,-2.756277 52.354423,-2.755841 52.354312,-2.755313 52.354172,-2.754894 52.354049,-2.754619 52.353955,-2.754135 52.353786,-2.753547 52.353566,-2.753298 52.353465,-2.752793 52.353258,-2.752668 52.353175,-2.752563 52.353066,-2.752496 52.352931,-2.752453 52.352791,-2.752438 52.352626,-2.752416 52.352374,-2.752377 52.352138,-2.752361 52.35204,-2.752337 52.351869)",
+ "LINESTRING(-2.773655 52.354022,-2.773551 52.353995,-2.773507 52.353978,-2.773209 52.353728,-2.773149 52.353665,-2.773117 52.353504,-2.773065 52.353162,-2.773034 52.352965,-2.772972 52.35274,-2.772923 52.352611,-2.772886 52.352534,-2.772743 52.352239,-2.772652 52.352068,-2.772561 52.351925,-2.772486 52.351836,-2.772411 52.351764,-2.772262 52.351621)",
+ "LINESTRING(-2.753656 52.360846,-2.753728 52.360934,-2.75384 52.360962,-2.753998 52.360946,-2.754437 52.360861,-2.754844 52.360793,-2.755044 52.36079,-2.755406 52.360811,-2.755894 52.360855,-2.756264 52.360871,-2.756746 52.360857,-2.757133 52.360818,-2.757461 52.360766,-2.757826 52.360684,-2.758227 52.360567,-2.758449 52.360533,-2.758593 52.36053,-2.758726 52.360542,-2.758943 52.360557,-2.759457 52.36057,-2.759816 52.360576,-2.760312 52.360553,-2.761192 52.360483,-2.761344 52.360478,-2.761509 52.360472,-2.761826 52.360457,-2.762371 52.360427,-2.762703 52.360414,-2.762894 52.360411,-2.763043 52.360388,-2.763479 52.360312,-2.763729 52.360296,-2.76429 52.36028,-2.764477 52.36026,-2.764917 52.360214,-2.765116 52.360202,-2.765425 52.360215,-2.765639 52.360213,-2.765865 52.360194,-2.76605 52.360171,-2.766263 52.36013,-2.766457 52.360088,-2.76694 52.359981,-2.76706 52.359964,-2.767268 52.359952,-2.768163 52.359913,-2.768729 52.359888,-2.769041 52.359891,-2.769305 52.359905,-2.769823 52.359945,-2.770114 52.35996,-2.770396 52.35995,-2.770967 52.359901,-2.771202 52.359881,-2.77151 52.359843,-2.771908 52.359735,-2.772174 52.359668,-2.772387 52.35964,-2.77246 52.35963,-2.772868 52.359611,-2.773179 52.359572,-2.773429 52.359575,-2.773575 52.359585,-2.773773 52.359599,-2.773949 52.359605,-2.773984 52.359603,-2.774069 52.359597,-2.774254 52.359562,-2.774815 52.359409,-2.775031 52.359354,-2.775245 52.35932,-2.775579 52.359291,-2.775698 52.35927,-2.775772 52.359256,-2.775799 52.359252,-2.776123 52.359169,-2.776302 52.359162,-2.776435 52.359179,-2.776568 52.359227,-2.776772 52.35931,-2.776943 52.359359,-2.777208 52.359402,-2.777429 52.359408,-2.777672 52.359372,-2.778029 52.359313,-2.778447 52.35922,-2.77871 52.359146,-2.779052 52.359031,-2.77954 52.358873,-2.779776 52.358807,-2.780075 52.358754,-2.780289 52.358728,-2.780606 52.358709,-2.781231 52.358698,-2.781563 52.358681,-2.781774 52.358689,-2.7818 52.358693,-2.782251 52.35876,-2.782572 52.358786,-2.782757 52.358799,-2.782907 52.358797,-2.783039 52.358776,-2.783141 52.358741,-2.783219 52.358672,-2.783336 52.358477,-2.783339 52.358472,-2.783396 52.358373,-2.783511 52.358242,-2.78358 52.35819,-2.78379 52.358072,-2.784078 52.357953,-2.784352 52.357823,-2.784454 52.357751,-2.784543 52.357628,-2.784625 52.357492,-2.784723 52.357393,-2.784828 52.357338,-2.785047 52.357268,-2.785404 52.357212,-2.785891 52.357142,-2.78619 52.357119,-2.786454 52.357117,-2.786613 52.357129,-2.786808 52.357178,-2.787204 52.357335,-2.787725 52.357596,-2.787844 52.357651,-2.787959 52.357686,-2.788219 52.357751,-2.788682 52.357899,-2.789149 52.358066,-2.789808 52.358293,-2.790064 52.358316,-2.790349 52.358303,-2.790691 52.358225,-2.790901 52.358168,-2.791044 52.358104,-2.791144 52.358062,-2.791241 52.357942,-2.791255 52.357924,-2.791346 52.357721,-2.791407 52.357521,-2.791455 52.357414,-2.79158 52.357176,-2.791734 52.356947,-2.791818 52.356849,-2.791869 52.35679,-2.791974 52.356735,-2.792074 52.356716,-2.792153 52.356721,-2.792292 52.356756,-2.79254 52.356832,-2.792669 52.356851,-2.79276 52.356852,-2.792863 52.356848,-2.792998 52.356827,-2.793086 52.356814,-2.793267 52.356791,-2.793417 52.356786,-2.793567 52.356803,-2.793967 52.356842,-2.794114 52.35685,-2.794284 52.356833,-2.794483 52.356768,-2.794772 52.356662,-2.794939 52.356645,-2.795065 52.356662,-2.795174 52.356692,-2.795346 52.356779,-2.795737 52.356976,-2.795915 52.357054,-2.796172 52.357158,-2.79635 52.357236,-2.796486 52.3573,-2.796602 52.357365,-2.796807 52.357481,-2.796919 52.357523,-2.797055 52.357551,-2.797169 52.357565,-2.797284 52.357564,-2.797442 52.357556,-2.797624 52.357529,-2.7978 52.357496,-2.797975 52.357444,-2.798129 52.357373,-2.79824 52.357318,-2.798353 52.357231,-2.798466 52.357144,-2.798585 52.357059,-2.798716 52.356999,-2.79874 52.356991,-2.798815 52.356966,-2.798918 52.35696,-2.799035 52.35697,-2.799433 52.357046,-2.799616 52.357068,-2.799801 52.357071,-2.799918 52.357055,-2.80017 52.357009,-2.800416 52.356975,-2.800521 52.35694,-2.800654 52.356844)",
+ "LINESTRING(-2.818355 52.347202,-2.818399 52.347293,-2.818443 52.347384,-2.818512 52.347477,-2.818663 52.3476,-2.818888 52.347728,-2.819106 52.347835,-2.819235 52.347893,-2.819377 52.347931,-2.819537 52.347956,-2.819804 52.347997,-2.820024 52.348028,-2.820145 52.348056,-2.820331 52.348128,-2.820539 52.348206,-2.82071 52.348258,-2.820909 52.348302,-2.820981 52.348318,-2.821029 52.348352,-2.821031 52.348388,-2.821011 52.348437,-2.820967 52.34846,-2.820826 52.348507,-2.820756 52.348526,-2.82037 52.348612,-2.820269 52.348639,-2.820204 52.34866,-2.819667 52.348853,-2.819451 52.34892,-2.819269 52.348968,-2.819144 52.349017,-2.818939 52.349106,-2.81881 52.349162,-2.818689 52.349193,-2.818372 52.349238,-2.818072 52.349298,-2.817924 52.34933,-2.817707 52.349379,-2.817626 52.349417,-2.817488 52.34949,-2.817383 52.349555,-2.817306 52.349621,-2.817254 52.349654,-2.817208 52.349686,-2.817105 52.34975,-2.817061 52.349773,-2.816975 52.349802,-2.816725 52.349885,-2.816603 52.349932,-2.816494 52.349974,-2.816223 52.350076,-2.816136 52.350122,-2.815942 52.350213,-2.815839 52.350255,-2.815772 52.350275,-2.815636 52.35032,-2.815461 52.350359,-2.815168 52.350407,-2.815007 52.350429,-2.814702 52.35048,-2.814474 52.350521,-2.814312 52.35054,-2.813958 52.350566,-2.813574 52.350584,-2.813074 52.350598,-2.812936 52.350596)",
+ "LINESTRING(-2.817427 52.368525,-2.817397 52.368498,-2.817317 52.368426,-2.817133 52.368212,-2.816979 52.368059,-2.816899 52.367997,-2.816833 52.367974,-2.816774 52.367967,-2.816692 52.367984,-2.816435 52.368082,-2.816345 52.368116,-2.816226 52.368194,-2.816155 52.368223,-2.816103 52.368243,-2.816033 52.368271,-2.816012 52.368352,-2.816011 52.368378,-2.816065 52.368732,-2.816082 52.368876,-2.8161 52.369074,-2.816104 52.369262,-2.816104 52.369271)",
+ "LINESTRING(-2.765419 52.340898,-2.765378 52.342352,-2.765365 52.342451,-2.764943 52.342966,-2.764864 52.343063,-2.764849 52.343129,-2.765031 52.343412,-2.765042 52.343442,-2.765041 52.343497,-2.764983 52.343558,-2.76489 52.343578,-2.764778 52.343581,-2.764724 52.343578,-2.764486 52.343576,-2.764254 52.34357,-2.764096 52.343593,-2.763938 52.343628,-2.763737 52.343721,-2.763547 52.343811,-2.763396 52.343864,-2.763203 52.343899,-2.763004 52.343974,-2.762803 52.344067,-2.762672 52.344127,-2.762663 52.344128,-2.762564 52.344139,-2.762487 52.344123,-2.762484 52.344121,-2.762422 52.344075,-2.762287 52.343936,-2.761979 52.343615,-2.761814 52.343418,-2.761739 52.343311,-2.761583 52.342988,-2.761496 52.342809,-2.761405 52.342665,-2.76136 52.342621,-2.76133 52.342585,-2.761239 52.342546)",
+ "LINESTRING(-2.737783 52.341558,-2.737981 52.341618,-2.738154 52.341638,-2.738366 52.341621,-2.738571 52.341608,-2.738747 52.341607,-2.738976 52.341633,-2.739153 52.341677,-2.739309 52.341678,-2.739566 52.341635,-2.73983 52.341584,-2.740346 52.341505,-2.740486 52.341483,-2.740723 52.341448,-2.740952 52.341432,-2.741154 52.341443,-2.741561 52.341497,-2.741619 52.341505,-2.741772 52.341515,-2.741874 52.341495,-2.741986 52.341474,-2.742249 52.341397,-2.742395 52.341374,-2.742703 52.341356,-2.742976 52.341335,-2.743242 52.341282,-2.743443 52.341211,-2.743662 52.341118,-2.743995 52.341022,-2.744255 52.340947,-2.744517 52.340827,-2.744621 52.340743,-2.744632 52.340675,-2.744546 52.340604,-2.744345 52.340529,-2.744095 52.340491,-2.743921 52.340447,-2.743828 52.340356,-2.743807 52.340312,-2.743809 52.340236,-2.743912 52.340074,-2.744027 52.339961,-2.744239 52.339814,-2.744414 52.339725,-2.744788 52.339635,-2.745551 52.339441,-2.745769 52.339357,-2.745918 52.339264,-2.746016 52.339167,-2.746142 52.33899,-2.746219 52.338838,-2.746281 52.338717)",
+ "LINESTRING(-2.791074 52.328059,-2.791045 52.32805,-2.791015 52.328041,-2.790911 52.32797,-2.790554 52.327667,-2.79042 52.327582,-2.790316 52.327516,-2.79031 52.327512,-2.790063 52.327293,-2.789899 52.327132,-2.789749 52.32698,-2.789689 52.326881,-2.789596 52.326639,-2.789536 52.326523,-2.78952 52.326482,-2.789505 52.326442,-2.789473 52.32629,-2.789516 52.326217,-2.789573 52.326154,-2.789629 52.326096,-2.789686 52.326042,-2.789909 52.325879,-2.789968 52.325835,-2.790036 52.325764,-2.790079 52.32571,-2.790135 52.325593,-2.790177 52.325449,-2.790223 52.325296)",
+ "LINESTRING(-2.876391 52.35697,-2.876449 52.357044,-2.876479 52.357079,-2.876525 52.357196,-2.876726 52.357707,-2.876727 52.357743,-2.876669 52.357797,-2.87664 52.357815,-2.876509 52.357861,-2.876421 52.35788)",
+ "LINESTRING(-2.85556 52.396517,-2.855534 52.396022,-2.855521 52.395526,-2.855513 52.395292,-2.855499 52.395243,-2.855499 52.395241,-2.855441 52.395187,-2.855286 52.395049,-2.855032 52.394824,-2.85445 52.394312,-2.853884 52.393808,-2.853774 52.393713,-2.853653 52.393622,-2.853425 52.393464,-2.853104 52.393254,-2.852847 52.393086,-2.852393 52.392779,-2.852311 52.392723,-2.8519 52.392452,-2.851752 52.392358,-2.851734 52.392346,-2.851695 52.392304,-2.851677 52.392247,-2.851691 52.392204,-2.851704 52.392193,-2.851712 52.392185,-2.851729 52.39217,-2.851751 52.392161,-2.851795 52.392143,-2.853022 52.391795,-2.853067 52.391781,-2.853157 52.391754,-2.853208 52.391727,-2.853232 52.391698,-2.853238 52.391659,-2.853226 52.391609,-2.853207 52.391558,-2.852786 52.390888,-2.852564 52.390535,-2.852295 52.390097,-2.851979 52.389588,-2.85188 52.389439,-2.851585 52.389,-2.851343 52.388633,-2.851011 52.388114,-2.850987 52.388076,-2.850866 52.38789,-2.850855 52.387881,-2.85083 52.387861,-2.850792 52.387854,-2.850735 52.387864,-2.850576 52.387911,-2.850467 52.387949,-2.85043 52.387961,-2.850363 52.387983,-2.850303 52.388025,-2.850294 52.388032,-2.850198 52.3881,-2.850123 52.388144,-2.850047 52.388176,-2.849561 52.38835,-2.849105 52.388508,-2.84873 52.388639,-2.848151 52.388841,-2.848126 52.38885,-2.848093 52.388861,-2.848036 52.388869,-2.847961 52.388866,-2.847881 52.388852,-2.8478 52.388826,-2.847373 52.388665,-2.846573 52.388365,-2.845732 52.388047,-2.845134 52.387819,-2.844629 52.387632,-2.844577 52.387619,-2.844511 52.387615,-2.844423 52.387617,-2.844304 52.387625,-2.844172 52.387633,-2.844031 52.38765,-2.843693 52.387697,-2.843032 52.387787,-2.842679 52.387842,-2.842089 52.387939,-2.841699 52.388,-2.841066 52.388111,-2.840644 52.388189,-2.840601 52.388197,-2.840249 52.388268,-2.840205 52.388278,-2.839876 52.388349,-2.839457 52.388438,-2.839302 52.388471,-2.839156 52.388507,-2.839064 52.388525,-2.838993 52.388536,-2.838901 52.388548,-2.83878 52.388561,-2.838608 52.388572,-2.838373 52.388602,-2.837898 52.38866,-2.837343 52.388751,-2.83692 52.388814,-2.836688 52.388836,-2.836525 52.388853,-2.836407 52.38886,-2.836264 52.388869,-2.836097 52.388875,-2.835884 52.388887,-2.835807 52.388894,-2.835725 52.388908,-2.835593 52.388929,-2.835501 52.388944,-2.835384 52.388961,-2.835305 52.388972,-2.835256 52.388979,-2.835115 52.388998,-2.834892 52.389042,-2.834639 52.38909,-2.834337 52.389144,-2.834152 52.389174,-2.834038 52.38919,-2.833914 52.389202,-2.833758 52.38921,-2.833503 52.389214,-2.833378 52.389219,-2.833226 52.389232,-2.832982 52.389261,-2.832221 52.389361,-2.831966 52.389395,-2.831785 52.389419,-2.831648 52.389439,-2.831467 52.389466,-2.83136 52.389482,-2.831282 52.389492,-2.831212 52.389498,-2.83115 52.389501,-2.831069 52.389498,-2.831008 52.389485,-2.830965 52.389454,-2.830933 52.389431,-2.830912 52.389387,-2.830918 52.389326,-2.830943 52.389246,-2.83098 52.389159,-2.831 52.389088,-2.83101 52.389013,-2.831014 52.38894,-2.831011 52.388855,-2.831001 52.388759,-2.830979 52.388633,-2.830951 52.388515,-2.830863 52.388224,-2.830836 52.388137,-2.830805 52.387982,-2.830787 52.387894,-2.830775 52.387745,-2.830763 52.387601,-2.830759 52.38756,-2.830742 52.387533,-2.830712 52.387509,-2.830673 52.387493,-2.830608 52.387477,-2.830474 52.387467,-2.829886 52.387431,-2.829247 52.387393,-2.828714 52.387362,-2.828589 52.387356,-2.828479 52.387342,-2.828398 52.387328,-2.828291 52.387296,-2.828268 52.387285,-2.828239 52.387272,-2.828188 52.387234,-2.828129 52.3872,-2.828118 52.387197,-2.828062 52.387177,-2.827989 52.387162,-2.827887 52.387148,-2.827766 52.387134,-2.827541 52.387099,-2.827199 52.387048,-2.826926 52.387011,-2.826678 52.386979,-2.826484 52.386962,-2.826128 52.386937,-2.825835 52.386921,-2.825578 52.386909,-2.825252 52.386883,-2.824822 52.386841,-2.82427 52.386796,-2.823937 52.386775,-2.823542 52.386749,-2.823387 52.386739,-2.823187 52.38673,-2.822928 52.386723,-2.822737 52.386725,-2.822636 52.386727,-2.822504 52.386737,-2.82239 52.386753,-2.822291 52.386764,-2.822187 52.386771,-2.822071 52.38677,-2.821698 52.386754,-2.821006 52.386716,-2.820424 52.386678,-2.820017 52.386642,-2.819853 52.386632,-2.819682 52.386628,-2.819589 52.386628,-2.819231 52.386643,-2.818809 52.386659,-2.818609 52.386667,-2.818181 52.386684,-2.817766 52.386708,-2.817455 52.386728,-2.817396 52.386731,-2.817365 52.386732,-2.817012 52.386745,-2.816911 52.386753,-2.816895 52.386757,-2.816813 52.38678,-2.81671 52.386814)",
+ "LINESTRING(-2.749888 52.382861,-2.751339 52.382845,-2.751707 52.382817,-2.751819 52.382778,-2.75187 52.38276,-2.75201 52.382642,-2.752104 52.382552,-2.752124 52.382532,-2.752165 52.382507,-2.752235 52.382465,-2.75224 52.382462,-2.752326 52.382443,-2.75249 52.38246,-2.752823 52.382513,-2.753021 52.38252,-2.753173 52.382509,-2.753231 52.382491,-2.75326 52.382473,-2.753274 52.382455,-2.753361 52.382337,-2.753447 52.38222,-2.753542 52.382158)",
+ "LINESTRING(-2.849636 52.373671,-2.849509 52.373732,-2.849432 52.373769,-2.849363 52.373797,-2.848991 52.373928,-2.848774 52.374004,-2.848314 52.374154,-2.848093 52.374223,-2.847627 52.37434,-2.847196 52.374451,-2.846893 52.374547,-2.846484 52.374688,-2.846072 52.374839,-2.845713 52.374983,-2.845325 52.375139,-2.844837 52.375341,-2.844717 52.375383,-2.844507 52.375452,-2.843824 52.375678,-2.843494 52.375781,-2.8433 52.375826,-2.843033 52.375873,-2.842747 52.37592,-2.842341 52.375982,-2.84211 52.376015,-2.841836 52.376063,-2.841536 52.376121,-2.841258 52.37618,-2.841027 52.376233,-2.840883 52.376266,-2.840791 52.376285,-2.840711 52.376296,-2.840647 52.376305,-2.840597 52.376303,-2.840554 52.376288,-2.840532 52.376278,-2.840492 52.376261,-2.840432 52.376221,-2.840385 52.376186,-2.840337 52.376165,-2.84028 52.376149,-2.840223 52.376136,-2.840149 52.376134,-2.840088 52.376141,-2.840085 52.376141,-2.839997 52.376156,-2.839849 52.376181,-2.839693 52.376196,-2.839501 52.376215,-2.839384 52.376221,-2.839316 52.376223,-2.839233 52.376212,-2.839133 52.376189,-2.838954 52.376148,-2.838297 52.375973,-2.837891 52.375872,-2.837768 52.375854,-2.837658 52.375844,-2.837547 52.375842,-2.83745 52.375842,-2.837346 52.375848,-2.83726 52.37586,-2.837161 52.375877,-2.837075 52.375903,-2.837011 52.375921,-2.836956 52.375931,-2.836916 52.37593,-2.836866 52.375921,-2.83682 52.375905,-2.83677 52.375886,-2.836633 52.375832,-2.836527 52.375789,-2.836448 52.37576,-2.836297 52.37572,-2.835957 52.375646,-2.835684 52.375592,-2.835382 52.375539,-2.835101 52.375498,-2.835051 52.375491,-2.834666 52.375443,-2.834309 52.375408,-2.834102 52.37539,-2.833896 52.375379,-2.833767 52.375379,-2.833655 52.375384,-2.833547 52.3754,-2.833465 52.375423,-2.833372 52.375473,-2.83333 52.375504,-2.833298 52.375527,-2.833246 52.375597,-2.833219 52.375648,-2.833215 52.375691,-2.83321 52.375722,-2.833227 52.375763,-2.833265 52.375818,-2.833342 52.375935,-2.833401 52.376015,-2.833472 52.376113,-2.833505 52.376174,-2.833506 52.376229,-2.8335 52.376258,-2.833497 52.376272,-2.833459 52.376299,-2.833439 52.376303,-2.833401 52.37631,-2.833357 52.376309,-2.833354 52.376308,-2.833312 52.376295,-2.833241 52.376231,-2.833152 52.376155,-2.833073 52.376082,-2.833008 52.376025,-2.832937 52.375973,-2.832878 52.375929,-2.8328 52.375893,-2.832717 52.375865,-2.832619 52.375831,-2.832523 52.3758,-2.832414 52.375772,-2.832111 52.375704,-2.831984 52.37568,-2.831765 52.375635,-2.831397 52.375571,-2.831087 52.375529,-2.830752 52.375481,-2.830563 52.375455,-2.830471 52.375449,-2.830324 52.375441,-2.830123 52.375437,-2.829918 52.375431,-2.829842 52.375423,-2.829737 52.375408,-2.829284 52.37535,-2.828579 52.375259,-2.827637 52.375138,-2.826761 52.375024,-2.826152 52.374942,-2.825627 52.374876,-2.825152 52.374818,-2.824631 52.374752,-2.82419 52.374692,-2.823612 52.374617,-2.822892 52.374522,-2.822234 52.374436,-2.819541 52.374073)",
+ "LINESTRING(-2.812104 52.378289,-2.812462 52.378218,-2.812687 52.378173,-2.812849 52.37812,-2.812995 52.378065,-2.813084 52.378011,-2.813152 52.377925,-2.813193 52.377827,-2.813234 52.377705,-2.813288 52.377616,-2.813365 52.377529,-2.813436 52.377478,-2.813525 52.377435,-2.813627 52.377399,-2.813696 52.377367,-2.813739 52.377308,-2.813784 52.377238,-2.813816 52.37715,-2.813855 52.376997,-2.813891 52.376849,-2.813926 52.376782,-2.813993 52.37674,-2.814096 52.376715,-2.814202 52.376708,-2.814323 52.3767,-2.814413 52.376688,-2.814475 52.376669,-2.814553 52.376617,-2.814678 52.376511,-2.814971 52.376268,-2.815065 52.376187)",
+ "LINESTRING(-2.829632 52.505566,-2.82985 52.505388,-2.830133 52.505157,-2.83044 52.504943,-2.831098 52.50454)",
+ "LINESTRING(-2.857778 52.498206,-2.857762 52.498348,-2.857727 52.498658,-2.857706 52.499173,-2.85764 52.499648,-2.857575 52.5001)",
+ "LINESTRING(-2.779723 52.462749,-2.779545 52.462676,-2.779526 52.462668,-2.779096 52.462511,-2.778881 52.462447,-2.778792 52.462417,-2.778607 52.462395,-2.778255 52.462332,-2.778078 52.462279,-2.777901 52.462215,-2.777793 52.462162,-2.777596 52.462038,-2.777408 52.461908,-2.777232 52.461832,-2.777084 52.461738,-2.776848 52.461632,-2.776494 52.461485,-2.776347 52.461427,-2.77626 52.461391,-2.776088 52.46132,-2.775911 52.46125,-2.775811 52.461218,-2.775773 52.461202,-2.77556 52.461128,-2.775442 52.461087,-2.775236 52.461023,-2.775099 52.460989,-2.774987 52.460989)",
+ "LINESTRING(-2.748927 52.460261,-2.748895 52.460247,-2.748855 52.460247,-2.748774 52.460285,-2.748667 52.460342,-2.748423 52.460455,-2.74833 52.460504,-2.74826 52.460539,-2.748165 52.460628,-2.748143 52.460637,-2.747994 52.460698,-2.747658 52.460744,-2.747408 52.460786,-2.747086 52.460816,-2.746861 52.460802,-2.746672 52.46075,-2.746663 52.460748,-2.746633 52.46073,-2.74641 52.460588,-2.746082 52.460374,-2.745724 52.46018,-2.745566 52.4601,-2.745255 52.460006)",
+ "LINESTRING(-2.831391 52.445745,-2.831339 52.445682,-2.831253 52.445621,-2.831039 52.44551,-2.830941 52.44546,-2.830856 52.445417,-2.830585 52.44522,-2.830148 52.444916,-2.829946 52.444785,-2.829823 52.444658,-2.829669 52.444499,-2.829529 52.444301,-2.829337 52.444027,-2.829228 52.443938)",
+ "LINESTRING(-2.862644 52.42015,-2.862666 52.420191,-2.862617 52.420468,-2.86324 52.42065,-2.863646 52.420786,-2.863929 52.42088,-2.864098 52.420923,-2.864238 52.420943,-2.864523 52.421001,-2.864593 52.421023,-2.864624 52.421057,-2.864662 52.421116,-2.864726 52.421363,-2.864872 52.421795,-2.864946 52.422014,-2.865 52.422122,-2.865058 52.422183,-2.865126 52.422208,-2.865203 52.422225)",
+ "LINESTRING(-2.755579 52.587427,-2.755548 52.587419,-2.755514 52.587406,-2.754749 52.587077,-2.754192 52.586858,-2.754158 52.586844,-2.753716 52.586664,-2.753125 52.586419,-2.75309 52.586407,-2.752784 52.586294,-2.751987 52.585975,-2.750903 52.585522,-2.750786 52.585474,-2.750434 52.585337,-2.7502 52.585287,-2.750041 52.585273,-2.749718 52.585276,-2.749452 52.585272,-2.749222 52.585245,-2.749042 52.585194,-2.74897 52.585173,-2.748916 52.585145,-2.748871 52.585093,-2.748724 52.584982,-2.748585 52.584877,-2.748371 52.584716,-2.74821 52.584667,-2.748025 52.584628,-2.747835 52.584588,-2.747546 52.584561)",
+ "LINESTRING(-2.758824 52.566573,-2.758843 52.566612,-2.758884 52.56673,-2.758879 52.566811,-2.75884 52.566919,-2.758784 52.567022,-2.758735 52.567116,-2.758661 52.567189,-2.758503 52.56727,-2.758483 52.567301,-2.758484 52.567328,-2.758515 52.567351,-2.758562 52.567348,-2.75862 52.567336,-2.758687 52.567284,-2.758831 52.567185,-2.759103 52.566989,-2.759359 52.566874,-2.759639 52.566798,-2.759771 52.566778,-2.759893 52.566784,-2.760066 52.566813,-2.760578 52.56694,-2.760622 52.566931,-2.760666 52.566922,-2.760711 52.566913,-2.760755 52.566894,-2.760798 52.566858,-2.760968 52.566699)",
+ "LINESTRING(-2.79983 52.554365,-2.79986 52.554392,-2.799905 52.554428,-2.800233 52.554632,-2.800442 52.554793,-2.800517 52.554837,-2.800636 52.554899,-2.800948 52.555032,-2.801053 52.555094,-2.801172 52.555183,-2.801217 52.555201,-2.801335 52.555209,-2.801512 52.555199,-2.80163 52.555198,-2.801748 52.555197,-2.801866 52.555188,-2.801969 52.555169,-2.802115 52.555132,-2.80235 52.555085,-2.802454 52.555076,-2.802793 52.555073,-2.80294 52.555054,-2.80316 52.554999,-2.803538 52.554912,-2.803829 52.554803,-2.804605 52.554622,-2.805872 52.554267,-2.806038 52.554234,-2.80643 52.554195,-2.806568 52.554212,-2.806931 52.554219,-2.807023 52.554211,-2.807075 52.554198,-2.807114 52.55418,-2.807192 52.554172,-2.807355 52.554181,-2.807566 52.554194,-2.808058 52.554246,-2.80856 52.554279,-2.808708 52.554287)",
+ "LINESTRING(-2.838002 52.589989,-2.838081 52.590031,-2.838235 52.590053,-2.838557 52.590099,-2.838864 52.590158,-2.83901 52.590208,-2.839129 52.590255,-2.839262 52.590309,-2.839384 52.590391,-2.839451 52.590444,-2.839562 52.590509,-2.839657 52.590536,-2.839789 52.590543,-2.839919 52.590545,-2.840044 52.590556,-2.840131 52.59058,-2.840177 52.590626,-2.840219 52.590711,-2.84025 52.590812,-2.840451 52.591463,-2.840611 52.591889,-2.840709 52.592094,-2.840819 52.592311,-2.841156 52.592947,-2.841231 52.593054,-2.841378 52.59321,-2.841452 52.593274)",
+ "LINESTRING(-2.888846 52.559077,-2.888526 52.559015,-2.8881 52.558936,-2.887961 52.558894,-2.887797 52.55883,-2.887612 52.558738,-2.887359 52.558609,-2.887079 52.558467,-2.886905 52.558368,-2.886651 52.558193,-2.886535 52.55806,-2.886397 52.55782,-2.886355 52.557709,-2.886353 52.557593,-2.886389 52.557524,-2.886442 52.55749,-2.886469 52.557473,-2.886648 52.557357,-2.886851 52.557271,-2.887098 52.557196,-2.887359 52.557129,-2.887542 52.557082,-2.887792 52.557048,-2.88827 52.557015,-2.888439 52.556996,-2.888542 52.55699,-2.889071 52.556911,-2.889527 52.556827,-2.889674 52.556817,-2.889807 52.556843,-2.890283 52.55701,-2.890685 52.557196,-2.890908 52.557302,-2.891384 52.557487)",
+ "LINESTRING(-2.829632 52.505566,-2.82985 52.505388,-2.830133 52.505157,-2.83044 52.504943,-2.831098 52.50454)",
+ "LINESTRING(-2.642485 52.161121,-2.642505 52.161137,-2.642515 52.161145,-2.642731 52.16118,-2.642813 52.161197,-2.643002 52.161234,-2.643168 52.161289,-2.643448 52.161364,-2.643565 52.161395)",
+ "LINESTRING(-2.637575 52.233071,-2.637728 52.233077,-2.637808 52.233079,-2.638076 52.233102,-2.638622 52.233136,-2.638791 52.233154,-2.638988 52.233195,-2.639222 52.233274,-2.639415 52.233362,-2.639539 52.233424,-2.63961 52.23345,-2.639721 52.233468,-2.639879 52.233473,-2.639982 52.233465,-2.640052 52.233456,-2.640186 52.233424,-2.640256 52.233391,-2.640318 52.233354,-2.640357 52.233311,-2.640411 52.233211,-2.640523 52.232946,-2.640638 52.232675,-2.64068 52.232612,-2.640723 52.23256,-2.640835 52.232451,-2.640927 52.232405,-2.641263 52.232261,-2.641743 52.23204,-2.642283 52.23178,-2.642565 52.231658,-2.642817 52.231562,-2.643029 52.231484,-2.643329 52.231368,-2.643708 52.231212,-2.64387 52.231162,-2.644195 52.231077,-2.644562 52.230981,-2.644794 52.230902,-2.644881 52.230856,-2.645009 52.230764,-2.645114 52.23066,-2.645264 52.230502,-2.645455 52.230308,-2.645595 52.230207,-2.64568 52.230165,-2.645736 52.230157,-2.645791 52.230153,-2.646069 52.230191,-2.646136 52.230212,-2.64618 52.230262,-2.646227 52.230349,-2.646285 52.230415,-2.646331 52.230442,-2.646375 52.230449,-2.646438 52.230451,-2.64652 52.230443,-2.646687 52.230402,-2.646814 52.230356,-2.646936 52.230288,-2.64703 52.230232,-2.647068 52.230219,-2.647089 52.230219,-2.647115 52.230227,-2.647136 52.230247,-2.647171 52.230303,-2.647317 52.2306,-2.64753 52.23105,-2.647562 52.231115,-2.647752 52.231493,-2.647963 52.231909,-2.648125 52.232278,-2.648195 52.23237,-2.648499 52.232678,-2.648787 52.233036)",
+ "LINESTRING(-2.690171 52.230102,-2.689196 52.230251,-2.689023 52.230279,-2.689 52.230275,-2.688958 52.230234,-2.688885 52.230144,-2.688817 52.230056,-2.688737 52.229961,-2.688654 52.229882,-2.688612 52.229842,-2.688251 52.229564,-2.687704 52.229139,-2.687509 52.228987,-2.687417 52.22891)",
+ "LINESTRING(-2.665954 52.174958,-2.665528 52.175062,-2.664759 52.175273,-2.663968 52.175413,-2.663044 52.175559,-2.662799 52.175583,-2.662155 52.175646,-2.66196 52.175665,-2.661055 52.175805,-2.660705 52.175852,-2.659976 52.175964,-2.659505 52.175989,-2.659009 52.17604,-2.658398 52.176098,-2.657639 52.176165,-2.657347 52.176185,-2.657069 52.176232,-2.656894 52.176251,-2.656646 52.176252,-2.656445 52.176242,-2.655922 52.176208,-2.655463 52.176181)",
+ "LINESTRING(-2.72594 52.149683,-2.72591 52.149665,-2.725895 52.149656,-2.725866 52.149657,-2.725793 52.149675,-2.725546 52.149748,-2.725343 52.149831,-2.725198 52.149903,-2.725159 52.149924,-2.72514 52.149949,-2.725155 52.149967,-2.725184 52.149984)",
+ "LINESTRING(-2.632796 52.240441,-2.63376 52.240018,-2.634053 52.239885,-2.634766 52.239675,-2.634794 52.239667,-2.634963 52.239618,-2.635271 52.239519,-2.635415 52.239464,-2.635737 52.239402,-2.636024 52.239367,-2.636327 52.239342,-2.63676 52.239321,-2.636986 52.23931,-2.637142 52.239302,-2.637321 52.239294,-2.63775 52.239315,-2.637888 52.239316,-2.637972 52.239302,-2.638385 52.239243,-2.638485 52.239241,-2.638748 52.239205,-2.639029 52.239164,-2.639202 52.239131,-2.639375 52.239092,-2.639563 52.239052,-2.639751 52.238986,-2.64009 52.238867,-2.640313 52.238778,-2.640843 52.238542,-2.641227 52.238369,-2.641732 52.238155,-2.64186 52.238089)",
+ "LINESTRING(-2.639628 52.316021,-2.639653 52.315956,-2.639945 52.315567,-2.640282 52.315088,-2.64036 52.314942,-2.640476 52.314813,-2.640679 52.314644,-2.640745 52.314588,-2.640912 52.314469,-2.641118 52.314317,-2.641179 52.314283,-2.641222 52.314259,-2.641342 52.314239,-2.641487 52.314269,-2.642391 52.314469,-2.642953 52.314591,-2.643178 52.314646)",
+ "LINESTRING(-2.665957 52.29218,-2.666931 52.29203,-2.667244 52.291978,-2.667331 52.29194,-2.667506 52.291819,-2.667615 52.291681,-2.667794 52.29147,-2.668031 52.291296,-2.66824 52.291155,-2.668371 52.291076,-2.668653 52.290936,-2.669207 52.290705,-2.669537 52.290575,-2.669953 52.290379,-2.670247 52.29023,-2.670637 52.290046,-2.670942 52.289843,-2.671075 52.289716,-2.671488 52.289099,-2.671632 52.288956,-2.672236 52.288543,-2.672427 52.288412,-2.672747 52.28806,-2.672811 52.287989,-2.672892 52.287933,-2.672999 52.287857,-2.673944 52.287449,-2.674238 52.287319,-2.674307 52.287288,-2.674378 52.287251,-2.674592 52.28714,-2.674977 52.286959,-2.675056 52.286924,-2.675263 52.28683,-2.675265 52.286828,-2.675294 52.286799,-2.675328 52.286766,-2.675371 52.286705,-2.675399 52.286661,-2.675431 52.286611,-2.675543 52.286414,-2.675699 52.286026,-2.675725 52.285828,-2.675767 52.28572,-2.675881 52.285486,-2.676288 52.284918,-2.67647 52.28468,-2.676749 52.284329,-2.677128 52.283814,-2.6772 52.283739,-2.677232 52.283728,-2.677302 52.283711,-2.677379 52.283733,-2.677402 52.283746)",
+ "LINESTRING(-2.672184 52.273394,-2.671954 52.273362,-2.671202 52.27319,-2.670777 52.273124,-2.670389 52.27307,-2.669867 52.272991,-2.669658 52.272944,-2.669554 52.272906,-2.669302 52.2728,-2.669102 52.272753,-2.669026 52.272692,-2.668962 52.272593,-2.668927 52.272465,-2.6689 52.272333,-2.668849 52.272254,-2.668552 52.271936,-2.668499 52.271864,-2.668375 52.271699,-2.668374 52.271697,-2.668306 52.271613,-2.668247 52.271578,-2.667917 52.271501,-2.667817 52.271476,-2.667733 52.271425,-2.667666 52.27137,-2.667582 52.271301,-2.667422 52.271071,-2.667232 52.270769,-2.667053 52.270509,-2.666868 52.270205,-2.666625 52.269824,-2.66648 52.269572,-2.666433 52.26948,-2.666419 52.269388,-2.666404 52.26923,-2.666411 52.269141,-2.666439 52.269054,-2.666486 52.26889,-2.666521 52.268726,-2.666542 52.268474,-2.666572 52.268218,-2.66661 52.267985,-2.666625 52.267873,-2.666709 52.267648,-2.6668 52.267359,-2.666856 52.267185,-2.666864 52.266914,-2.666884 52.266832,-2.666937 52.266732,-2.666994 52.266678,-2.667118 52.266601,-2.667395 52.266464,-2.667439 52.266433)",
+ "LINESTRING(-2.692432 52.276201,-2.692573 52.276122,-2.692668 52.276056,-2.69298 52.275861,-2.693366 52.275692,-2.693791 52.275545,-2.693888 52.27549,-2.693936 52.275445,-2.69398 52.275364,-2.694043 52.275154,-2.694096 52.27492,-2.69415 52.274558,-2.694205 52.274431,-2.694414 52.273995,-2.694706 52.273077,-2.694727 52.273025,-2.694777 52.272924,-2.694852 52.272846,-2.694945 52.272757,-2.695188 52.272611,-2.695378 52.272511,-2.695563 52.272425,-2.695781 52.272325,-2.69595 52.272254,-2.696126 52.272181,-2.696269 52.272109,-2.69645 52.271997,-2.696741 52.271827,-2.696895 52.271751,-2.697155 52.27167,-2.697364 52.271596,-2.697454 52.27156,-2.697493 52.271543,-2.697549 52.271515,-2.697592 52.271487,-2.69765 52.271451,-2.697679 52.271433,-2.697693 52.271388)",
+ "LINESTRING(-2.71662 52.29899,-2.716103 52.299093,-2.71594 52.299121,-2.715839 52.299122,-2.715711 52.299112,-2.715571 52.299113,-2.715197 52.299153,-2.714666 52.299215,-2.714587 52.299221,-2.714368 52.299293,-2.714006 52.299449,-2.713865 52.299471,-2.713742 52.299458,-2.713671 52.299432,-2.713618 52.299416,-2.713543 52.299414,-2.713271 52.299485,-2.713048 52.299527,-2.712863 52.299542,-2.712736 52.299537,-2.712603 52.299514,-2.712426 52.299461,-2.712134 52.299365,-2.711913 52.299299,-2.711755 52.299265,-2.711653 52.299244,-2.711437 52.299227,-2.711186 52.29922,-2.710958 52.299232,-2.71072 52.299215,-2.710236 52.299199,-2.709901 52.299171,-2.709575 52.299138,-2.709434 52.299134,-2.709285 52.299151,-2.709074 52.299203,-2.708771 52.299229,-2.708419 52.299242,-2.708094 52.299239,-2.707891 52.299202,-2.707749 52.299133,-2.707594 52.299058,-2.707474 52.298978,-2.70734 52.298882,-2.707131 52.298743,-2.706936 52.298636,-2.706577 52.298439,-2.706244 52.298255,-2.706146 52.298212,-2.706107 52.298204)",
+ "LINESTRING(-2.625241 52.364223,-2.625313 52.364079,-2.625396 52.363755,-2.625417 52.363684,-2.625467 52.36353,-2.625566 52.363323,-2.625637 52.363115,-2.625694 52.362997,-2.625737 52.362908,-2.625837 52.362728,-2.626097 52.362394,-2.626226 52.362213,-2.626255 52.362177,-2.626284 52.362105,-2.626297 52.362024,-2.62631 52.361925,-2.626308 52.361772,-2.626276 52.361658,-2.626215 52.36144,-2.626199 52.361341,-2.626197 52.36118,-2.62623 52.361076,-2.626386 52.360856,-2.626497 52.360664,-2.626545 52.360526,-2.626561 52.360396,-2.626552 52.360324,-2.626536 52.360216,-2.62655 52.360062,-2.626547 52.359991,-2.626569 52.359896,-2.626591 52.359799,-2.626651 52.359693,-2.626763 52.359532,-2.626821 52.35939,-2.626881 52.359282,-2.626983 52.358974,-2.626997 52.358931,-2.62704 52.358888,-2.627095 52.358848,-2.627292 52.358805,-2.627482 52.358788,-2.627652 52.358769,-2.627925 52.358743,-2.628089 52.3587,-2.628234 52.358601,-2.6284 52.358454,-2.628643 52.358199,-2.628776 52.358066,-2.628833 52.357997)",
+ "LINESTRING(-2.701915 52.415412,-2.70192 52.415411,-2.701938 52.415405,-2.701956 52.4154,-2.701968 52.415395,-2.701982 52.41539,-2.701996 52.415385,-2.70201 52.41538,-2.702027 52.415375,-2.702051 52.415369,-2.702096 52.415363,-2.702615 52.415426,-2.70304 52.415478,-2.703535 52.415544,-2.703915 52.415593,-2.704146 52.415621,-2.704382 52.415651,-2.704569 52.415674,-2.704741 52.415695,-2.704891 52.415713,-2.705012 52.415727,-2.705118 52.41574,-2.705203 52.415751,-2.705272 52.415759,-2.705334 52.415767,-2.705401 52.415775)",
+ "LINESTRING(-2.707812 52.377531,-2.707872 52.377589,-2.708109 52.377788,-2.708334 52.377977,-2.708556 52.378111,-2.709177 52.378368,-2.70934 52.37842,-2.709472 52.378447,-2.709956 52.378548)",
+ "LINESTRING(-2.620516 52.379118,-2.620457 52.379211,-2.620431 52.379337,-2.62039 52.37952,-2.62036 52.37975,-2.620341 52.379986,-2.620345 52.380114,-2.6204 52.380269,-2.6204 52.380305,-2.620328 52.380386,-2.620246 52.380461,-2.620105 52.380619,-2.620013 52.38068,-2.619911 52.380753,-2.619865 52.380797,-2.619844 52.380845,-2.619698 52.380995,-2.61959 52.381106,-2.61956 52.381171,-2.619543 52.381275,-2.619538 52.381331)",
+ "LINESTRING(-2.707602 52.372668,-2.707795 52.372744,-2.70812 52.372872,-2.70846 52.372996)",
+ "LINESTRING(-2.711811 52.37457,-2.711658 52.374351,-2.711597 52.374317,-2.711513 52.374312,-2.711339 52.374339,-2.710727 52.374445,-2.710437 52.374497,-2.710174 52.374562,-2.709927 52.374623,-2.709397 52.374757)",
+ "LINESTRING(-2.706761 52.37698,-2.706716 52.376953,-2.706627 52.37689,-2.706537 52.37681,-2.706388 52.376667,-2.706314 52.376596,-2.706192 52.376318,-2.706146 52.376153)",
+ "LINESTRING(-2.621756 52.445112,-2.621868 52.444997,-2.621989 52.444842,-2.622251 52.444614,-2.622538 52.444381,-2.622715 52.444245,-2.622746 52.444162,-2.622761 52.444092,-2.622739 52.444014,-2.622645 52.443805,-2.622485 52.443494,-2.622426 52.443401,-2.62237 52.443298,-2.622323 52.443194,-2.622298 52.443091,-2.622292 52.442974,-2.622318 52.442867,-2.622363 52.442789,-2.622434 52.442638,-2.622483 52.442528,-2.622536 52.442409,-2.622539 52.442289,-2.622522 52.442225,-2.622475 52.44213,-2.62243 52.442042,-2.622353 52.441909,-2.622241 52.441739,-2.622058 52.441463,-2.621748 52.441037,-2.621524 52.440713,-2.621368 52.440483,-2.621248 52.440291,-2.621166 52.440152,-2.621086 52.439994,-2.621018 52.439834,-2.62092 52.439574,-2.620759 52.439153,-2.620586 52.438729,-2.620425 52.438338,-2.620138 52.437647)",
+ "LINESTRING(-2.654057 52.461737,-2.654156 52.461723,-2.654248 52.461682,-2.654354 52.461623,-2.654612 52.461392,-2.654764 52.461257,-2.654893 52.461097,-2.655048 52.460894,-2.655062 52.460875,-2.655109 52.460821,-2.655134 52.460792,-2.655226 52.46069,-2.655231 52.460685,-2.655344 52.460581,-2.655418 52.460523,-2.65552 52.460452,-2.655555 52.460434,-2.655627 52.460397,-2.655695 52.460367,-2.655719 52.460356,-2.655819 52.460324,-2.655992 52.460266,-2.656134 52.460217,-2.656205 52.460188,-2.656229 52.460176,-2.656276 52.460152,-2.6564 52.460089,-2.656492 52.46003,-2.656579 52.45996,-2.656722 52.459843,-2.656837 52.459745,-2.657007 52.459598,-2.657009 52.459596,-2.657095 52.459498,-2.657107 52.459484,-2.657153 52.459424,-2.657211 52.459359,-2.657332 52.459224,-2.657388 52.459182,-2.657462 52.459126,-2.65762 52.459015,-2.65783 52.458869,-2.657942 52.458791,-2.658069 52.458703,-2.658316 52.458521,-2.658471 52.45842,-2.658762 52.458249,-2.65919 52.458021,-2.659703 52.457759,-2.659955 52.457606)",
+ "LINESTRING(-2.735941 52.47267,-2.735934 52.472667,-2.735924 52.472661,-2.735852 52.47262,-2.735599 52.47246,-2.73548 52.47237,-2.735464 52.472357,-2.735361 52.472276,-2.735294 52.472218,-2.735262 52.472172,-2.735206 52.472079,-2.735165 52.472022,-2.734934 52.471758,-2.734895 52.471727,-2.734885 52.471718,-2.734835 52.471673,-2.734825 52.471663,-2.734729 52.471589,-2.734697 52.47157,-2.73464 52.471541,-2.734612 52.471531)",
+ "LINESTRING(-2.600202 52.588818,-2.599984 52.588964,-2.599881 52.58905,-2.599775 52.589104,-2.599548 52.589215,-2.599542 52.589219,-2.599052 52.589451,-2.59847 52.589744,-2.598061 52.589933,-2.597517 52.59018,-2.597069 52.590412,-2.596399 52.590737,-2.596005 52.590942,-2.595702 52.591172,-2.595278 52.591479,-2.594971 52.591716,-2.594324 52.592189,-2.594038 52.592401,-2.593483 52.592668,-2.592961 52.592903,-2.592742 52.593009,-2.59245 52.593148,-2.592205 52.593362,-2.591903 52.593647,-2.591599 52.593929,-2.591221 52.594265,-2.590853 52.594544,-2.590349 52.594841,-2.589792 52.595132,-2.589358 52.595346,-2.588695 52.595666,-2.58789 52.596063,-2.587503 52.596248,-2.587206 52.59639,-2.586929 52.596499,-2.58639 52.596768,-2.585825 52.597044,-2.585507 52.597212,-2.585136 52.597431,-2.584636 52.597744,-2.584113 52.598065,-2.583643 52.598353,-2.583338 52.598545,-2.58302 52.598717,-2.582686 52.5989,-2.582504 52.598987,-2.582322 52.599055,-2.582214 52.599083,-2.581887 52.599137,-2.581618 52.599174,-2.581605 52.599185,-2.5816 52.59919,-2.581574 52.599213,-2.581574 52.599231)",
+ "LINESTRING(-2.643908 52.583275,-2.643708 52.583233,-2.643223 52.58317,-2.642576 52.583105,-2.641417 52.582982,-2.64131 52.582971,-2.641297 52.582969,-2.641206 52.582963,-2.641102 52.582947,-2.640998 52.582903,-2.640938 52.582866,-2.640862 52.582804,-2.640729 52.582636,-2.640672 52.582555,-2.640647 52.582507,-2.640625 52.582469,-2.640621 52.58244,-2.640622 52.582385,-2.640636 52.582358,-2.640709 52.582304,-2.640817 52.58222,-2.6409 52.582151,-2.640989 52.582077,-2.641102 52.58199,-2.641183 52.581935,-2.641303 52.581863,-2.641425 52.581798,-2.64147 52.581768,-2.641513 52.581728,-2.641632 52.58163,-2.64178 52.5815,-2.641912 52.581426,-2.642237 52.581273,-2.642484 52.58117,-2.642678 52.581101,-2.642836 52.581071)",
+ "LINESTRING(-2.694135 52.569982,-2.6944 52.570116,-2.694927 52.57055,-2.695022 52.570633,-2.695077 52.570645,-2.695132 52.57064,-2.695204 52.570588,-2.695539 52.570325,-2.695671 52.570243,-2.6957 52.570225,-2.695773 52.570198,-2.695832 52.570188,-2.695906 52.570188,-2.696069 52.570214,-2.696187 52.570213,-2.696305 52.570213,-2.696393 52.570194,-2.696452 52.570185,-2.69654 52.570139,-2.696642 52.570067,-2.696685 52.570013,-2.696742 52.569886,-2.696786 52.569832,-2.696829 52.569796,-2.696932 52.569733,-2.697108 52.569669,-2.697695 52.569485,-2.69793 52.569412,-2.698376 52.569276,-2.698473 52.569256,-2.698576 52.569219,-2.699147 52.568955,-2.699557 52.568755,-2.70001 52.568492,-2.700259 52.568355,-2.700596 52.568219,-2.70091 52.568118,-2.701081 52.568063,-2.701433 52.567971,-2.701933 52.56786,-2.702052 52.567827)",
+ "LINESTRING(-2.735197 52.581367,-2.734933 52.581501,-2.734664 52.581612,-2.734412 52.581716,-2.734155 52.581793,-2.73393 52.581831,-2.733637 52.581899,-2.733549 52.581899)",
+ "LINESTRING(-2.471251 52.186382,-2.471183 52.186377,-2.471137 52.186366,-2.471089 52.18633,-2.471061 52.186262,-2.471046 52.186148,-2.471038 52.186098,-2.470963 52.186025,-2.470884 52.185977,-2.470715 52.185932,-2.470661 52.185913,-2.470461 52.185895,-2.470222 52.185855,-2.470068 52.185818,-2.46998 52.185797,-2.469735 52.185775,-2.469362 52.185764,-2.469308 52.185757,-2.468923 52.185734,-2.468668 52.185713,-2.468601 52.185695,-2.468482 52.185663,-2.468349 52.185615,-2.468213 52.185558,-2.468109 52.185501,-2.467894 52.185386,-2.467456 52.185107,-2.467185 52.184921,-2.467114 52.184875,-2.466823 52.184617,-2.466688 52.184521,-2.466615 52.184469,-2.466488 52.184209,-2.466276 52.183883)",
+ "LINESTRING(-2.471194 52.161747,-2.471208 52.161746,-2.471329 52.161734,-2.471447 52.16172,-2.471514 52.161706,-2.471686 52.16167,-2.471771 52.161669,-2.47189 52.161687)",
+ "LINESTRING(-2.486775 52.192233,-2.486664 52.192166,-2.486034 52.191851,-2.485589 52.191668,-2.485207 52.191477,-2.485187 52.191467,-2.484394 52.191077,-2.484261 52.190967,-2.484201 52.190922,-2.484156 52.190876,-2.484035 52.19073,-2.483971 52.190665,-2.483911 52.190625,-2.48372 52.1905,-2.483666 52.190465,-2.483521 52.19038,-2.483259 52.190129,-2.483087 52.189954,-2.482767 52.189456)",
+ "LINESTRING(-2.506368 52.187521,-2.506339 52.187566,-2.50631 52.187593,-2.506252 52.187611,-2.506223 52.18762,-2.506091 52.187603)",
+ "LINESTRING(-2.505218 52.189211,-2.505069 52.189019,-2.504941 52.188854)",
+ "LINESTRING(-2.50762 52.201419,-2.507724 52.201279,-2.50784 52.201135,-2.507882 52.201,-2.507915 52.200773,-2.50795 52.200666,-2.507951 52.200662,-2.508038 52.200532,-2.508095 52.200451,-2.508153 52.200388,-2.508225 52.200315,-2.508327 52.200234,-2.508414 52.200171,-2.508574 52.20008,-2.509286 52.199681,-2.509563 52.199545,-2.509636 52.199518,-2.509841 52.199449,-2.510023 52.199411,-2.51022 52.199386,-2.51036 52.199374,-2.510693 52.19938,-2.511144 52.199398,-2.511418 52.199391,-2.511575 52.199373,-2.51177 52.199338,-2.512456 52.199218,-2.51266 52.19919,-2.513226 52.199136,-2.513306 52.199118,-2.513362 52.199106,-2.513367 52.199105,-2.5135 52.199064,-2.51351 52.199059,-2.51353 52.199049,-2.513624 52.199006,-2.513725 52.198907)",
+ "LINESTRING(-2.511843 52.190473,-2.511727 52.190563,-2.511672 52.190594,-2.511625 52.1906,-2.511465 52.190619,-2.511392 52.190628,-2.511333 52.190628,-2.5113 52.19062,-2.511274 52.190601,-2.511259 52.190574,-2.511153 52.190269,-2.511032 52.189865,-2.511017 52.189818,-2.511001 52.189775,-2.510972 52.189749,-2.510928 52.189731,-2.510884 52.189713,-2.510825 52.189713,-2.510723 52.189723,-2.510636 52.189744)",
+ "LINESTRING(-2.540195 52.199951,-2.540115 52.199992,-2.539923 52.200124,-2.539792 52.200195,-2.539712 52.200274,-2.539129 52.200421,-2.538881 52.200476,-2.538735 52.200495,-2.538427 52.200514,-2.538121 52.20056,-2.53796 52.200597,-2.537669 52.200706,-2.537523 52.200761,-2.537131 52.201005,-2.53671 52.201286,-2.536448 52.201413,-2.536288 52.201477,-2.536113 52.201522,-2.535953 52.201568,-2.535734 52.201605,-2.535573 52.201633,-2.535295 52.201652,-2.53512 52.201644,-2.535061 52.201635,-2.534944 52.2016,-2.53487 52.201564,-2.534723 52.201475,-2.534162 52.201073,-2.534088 52.201019,-2.533631 52.200707,-2.533528 52.200662,-2.533454 52.200644,-2.533393 52.200645,-2.533258 52.200637,-2.532589 52.200671,-2.532514 52.200672,-2.532447 52.200673,-2.532357 52.200667,-2.532181 52.20065,-2.531512 52.200542,-2.531233 52.200507,-2.531033 52.200494,-2.530901 52.200478,-2.530773 52.200462,-2.529977 52.200263,-2.529738 52.200201,-2.529564 52.200141,-2.529338 52.200039,-2.529245 52.199997,-2.528879 52.199775,-2.528693 52.199663,-2.528521 52.199549,-2.528378 52.199481,-2.528156 52.199402,-2.52758 52.19925,-2.527218 52.199153,-2.526851 52.199047,-2.526484 52.198959,-2.526279 52.198897,-2.525676 52.198692,-2.525427 52.198595,-2.524883 52.198372,-2.524721 52.198328,-2.524545 52.198293)",
+ "LINESTRING(-2.544544 52.17669,-2.544596 52.176676,-2.544688 52.176668,-2.544773 52.176675,-2.54492 52.176689,-2.545117 52.176722,-2.545294 52.176748,-2.545435 52.176759,-2.545625 52.176784,-2.545699 52.176791,-2.545889 52.176809,-2.546085 52.176831,-2.546323 52.176845,-2.546654 52.176873,-2.546825 52.176888,-2.547009 52.17689,-2.54726 52.176893,-2.547529 52.176899,-2.547848 52.176917,-2.548111 52.176923,-2.548264 52.176934,-2.548447 52.176948,-2.548566 52.176945)",
+ "LINESTRING(-2.572267 52.237221,-2.572354 52.23703,-2.572462 52.236915,-2.572642 52.236834,-2.572777 52.236822,-2.573147 52.236798,-2.573256 52.23677,-2.573293 52.236761,-2.573381 52.236734,-2.573672 52.236597,-2.57437 52.23618,-2.574776 52.235936,-2.575348 52.235529,-2.575583 52.235373,-2.575987 52.235117,-2.576503 52.234756,-2.576544 52.234726,-2.576745 52.234593,-2.576895 52.234517,-2.577057 52.234461,-2.577394 52.234363,-2.577633 52.234284,-2.577839 52.234198,-2.577967 52.234153,-2.578536 52.233986,-2.579064 52.233819,-2.579075 52.233815,-2.579399 52.23368,-2.579744 52.233564,-2.580219 52.233415,-2.580847 52.233218)",
+ "LINESTRING(-2.441663 52.321315,-2.441916 52.321358,-2.442019 52.321366,-2.442294 52.321388,-2.44248 52.321436,-2.442685 52.321469,-2.44299 52.321514,-2.443297 52.32154,-2.443602 52.321574,-2.443702 52.321607,-2.443745 52.321669,-2.443789 52.32201,-2.443829 52.322171,-2.443914 52.322332,-2.443995 52.322392,-2.444002 52.322398,-2.444023 52.322413,-2.444032 52.322417,-2.444041 52.322421,-2.4441 52.322447,-2.444476 52.322556,-2.444493 52.32256,-2.444694 52.322611,-2.444935 52.322681,-2.445149 52.322755,-2.445355 52.322852,-2.445631 52.323012,-2.445893 52.323175,-2.446104 52.323281,-2.44629 52.323343,-2.446489 52.323402,-2.446927 52.323534,-2.447081 52.323584,-2.447145 52.323602,-2.447282 52.323637,-2.447384 52.323654,-2.447486 52.323657,-2.447589 52.323648,-2.448131 52.323592,-2.448249 52.323592,-2.44849 52.323599,-2.448762 52.323617)",
+ "LINESTRING(-2.472028 52.316325,-2.472073 52.316386,-2.472207 52.316558,-2.472267 52.316683,-2.472312 52.316764,-2.472327 52.316809,-2.472343 52.316962,-2.472345 52.317132,-2.472304 52.317456,-2.47229 52.317501,-2.472203 52.317683,-2.472045 52.317966,-2.472003 52.318045,-2.47196 52.318159,-2.471917 52.318267,-2.471903 52.318312,-2.471859 52.318375,-2.47183 52.318402,-2.471801 52.318429,-2.471758 52.318447,-2.471654 52.318472)",
+ "LINESTRING(-2.513312 52.310431,-2.513306 52.310371,-2.5133 52.310355,-2.513222 52.310076,-2.513172 52.30988,-2.513115 52.309663,-2.513099 52.309626,-2.513048 52.309509,-2.513032 52.309431,-2.513078 52.309344,-2.513109 52.309326,-2.513184 52.309281,-2.513257 52.309237,-2.513461 52.309147,-2.513605 52.309075,-2.513739 52.309009,-2.513795 52.308971,-2.513839 52.308901,-2.513843 52.308833,-2.513782 52.30868,-2.513738 52.308606,-2.513621 52.308397,-2.513579 52.308322,-2.513493 52.308058,-2.513457 52.307962,-2.513405 52.307867,-2.513197 52.307596,-2.51312 52.30749,-2.512969 52.307256,-2.512865 52.307106,-2.512804 52.307012,-2.512779 52.306933,-2.512773 52.306863,-2.512784 52.306794,-2.5128 52.306747)",
+ "LINESTRING(-2.447545 52.312033,-2.447574 52.312015,-2.447603 52.311997,-2.447748 52.311762,-2.447893 52.311609,-2.447984 52.31151,-2.448009 52.311483,-2.448242 52.311302,-2.448344 52.311221,-2.448708 52.310967,-2.448795 52.310904,-2.449013 52.310652,-2.449042 52.310616,-2.449071 52.310597,-2.449114 52.31057,-2.44929 52.310507,-2.449859 52.310217,-2.449961 52.310154,-2.449975 52.3101,-2.450001 52.309803,-2.450015 52.309686,-2.450058 52.309587,-2.45013 52.309434,-2.450235 52.309256,-2.450453 52.309011,-2.450681 52.308838,-2.450827 52.30873,-2.451118 52.308531,-2.451569 52.308206,-2.451685 52.308114,-2.451712 52.308092,-2.451754 52.308061,-2.4518 52.308009,-2.451846 52.307936,-2.451896 52.307834,-2.451924 52.307764,-2.451926 52.307708,-2.451935 52.307634,-2.451944 52.307557,-2.451928 52.307467,-2.451928 52.307465,-2.451913 52.307395,-2.451838 52.307198,-2.45185 52.307128,-2.451852 52.307116,-2.451856 52.307093,-2.451884 52.307035,-2.451961 52.306947,-2.452048 52.306867,-2.452174 52.306789,-2.452283 52.306727,-2.452473 52.306631,-2.452524 52.306604,-2.452668 52.30651,-2.45271 52.306475,-2.45303 52.306222,-2.453176 52.306123,-2.453239 52.306091)",
+ "LINESTRING(-2.504205 52.303927,-2.504313 52.303921,-2.504708 52.303739,-2.504743 52.303727,-2.504947 52.303657,-2.505136 52.30361,-2.505179 52.303607,-2.505327 52.303594,-2.505721 52.303539,-2.505735 52.303537,-2.506063 52.303488,-2.506494 52.303412,-2.506697 52.303379,-2.506829 52.303359,-2.507095 52.303328,-2.507372 52.303307,-2.507605 52.303302,-2.507775 52.303307,-2.508311 52.303289,-2.508416 52.303304,-2.508705 52.303355,-2.509098 52.303421,-2.509553 52.30349,-2.509639 52.303492,-2.509761 52.303471,-2.509877 52.303422,-2.509979 52.303349,-2.510145 52.303238,-2.510265 52.303178,-2.51049 52.303111,-2.510669 52.303047,-2.510794 52.302988,-2.510973 52.302883,-2.511093 52.302795,-2.511267 52.302679,-2.511436 52.302578,-2.511679 52.302427,-2.511826 52.302358,-2.511969 52.30229,-2.512169 52.302212,-2.512498 52.302075,-2.51274 52.301972,-2.512942 52.3019,-2.513044 52.301864,-2.513083 52.301833,-2.513105 52.301787,-2.513094 52.301723,-2.513033 52.30132,-2.512999 52.301071,-2.512998 52.301062)",
+ "LINESTRING(-2.471692 52.306163,-2.471601 52.306131,-2.471559 52.30611,-2.471471 52.306066,-2.471372 52.306008,-2.471235 52.305918,-2.471124 52.305828,-2.470985 52.3057,-2.470942 52.305644,-2.470888 52.305565,-2.470828 52.305459,-2.470768 52.305348,-2.470707 52.305268,-2.470672 52.30523,-2.470672 52.30523,-2.470671 52.305229,-2.47066 52.305224)",
+ "LINESTRING(-2.460975 52.291103,-2.460895 52.291139,-2.460541 52.291265,-2.46029 52.29135,-2.460273 52.29136,-2.460239 52.29138,-2.460162 52.291444,-2.460092 52.291508,-2.460018 52.291578,-2.459951 52.291614,-2.459858 52.291635,-2.459754 52.291643,-2.459648 52.29164,-2.45952 52.291627,-2.459354 52.291608,-2.459248 52.291608,-2.459195 52.291613,-2.459113 52.291632,-2.458917 52.291709,-2.458094 52.292053,-2.457536 52.29228,-2.45715 52.292444,-2.456959 52.292532,-2.456719 52.292656,-2.455967 52.293047,-2.45559 52.293237,-2.455529 52.293266,-2.455447 52.293284,-2.454891 52.293361,-2.454729 52.293387,-2.454654 52.293412,-2.454636 52.293418,-2.45458 52.293447)",
+ "LINESTRING(-2.527254 52.284957,-2.527217 52.284992,-2.527166 52.285086,-2.527039 52.285303,-2.527002 52.285402,-2.52696 52.285441,-2.526887 52.28558,-2.526854 52.28564,-2.526846 52.285665,-2.526847 52.285695,-2.526855 52.285734,-2.52687 52.285764,-2.526912 52.285807,-2.526946 52.285842,-2.526988 52.285887,-2.527049 52.285949,-2.527079 52.285988,-2.527129 52.286055,-2.527159 52.286105,-2.527186 52.286149,-2.527216 52.286195,-2.52724 52.286247,-2.527259 52.286296,-2.527294 52.286383,-2.527327 52.286465,-2.527392 52.286665,-2.527405 52.286865,-2.527394 52.287169,-2.527378 52.287376,-2.527368 52.287493,-2.527344 52.287666,-2.527326 52.287704,-2.527292 52.287753,-2.527281 52.287816,-2.527302 52.287863,-2.527411 52.287887,-2.527687 52.287883,-2.52791 52.287894,-2.528124 52.287909,-2.528404 52.287941,-2.528654 52.287974,-2.528888 52.288003,-2.529118 52.288033,-2.52948 52.288081,-2.5296 52.288088,-2.5299 52.288117,-2.530232 52.288148,-2.530578 52.288161,-2.530763 52.288171,-2.530984 52.288192,-2.531201 52.2882,-2.531392 52.288201,-2.531518 52.288207,-2.531633 52.288219,-2.531806 52.288224,-2.531985 52.288245,-2.532221 52.288262,-2.532435 52.288288,-2.532926 52.288341,-2.533105 52.288362,-2.533188 52.288389,-2.533259 52.288423,-2.533339 52.288487,-2.533333 52.288518,-2.533328 52.288566,-2.53334 52.288619,-2.533332 52.288664,-2.533289 52.288739,-2.533199 52.288857,-2.533167 52.2889,-2.533148 52.288969,-2.533137 52.289042,-2.533123 52.28912,-2.53308 52.28919,-2.533037 52.289243,-2.532926 52.289358,-2.532822 52.289458,-2.532779 52.289508,-2.532703 52.289579,-2.532616 52.289655,-2.532564 52.28971)",
+ "LINESTRING(-2.448937 52.282899,-2.448852 52.28286,-2.448805 52.282836,-2.447935 52.28238,-2.447175 52.281963,-2.446732 52.28172,-2.446589 52.281628,-2.44658 52.281619,-2.446447 52.281495,-2.446396 52.281389,-2.446387 52.281328,-2.446405 52.281235,-2.446457 52.281182,-2.446507 52.281131,-2.446744 52.281)",
+ "LINESTRING(-2.563133 52.253041,-2.563455 52.252986,-2.563777 52.252876,-2.564579 52.252572,-2.56506 52.25239,-2.565162 52.252371,-2.565269 52.252375,-2.566355 52.252547,-2.566456 52.252563,-2.567209 52.252685,-2.567378 52.252711,-2.567596 52.252732,-2.568538 52.252798,-2.569435 52.252855,-2.569635 52.252857,-2.569726 52.252852,-2.57001 52.252813,-2.570499 52.252757,-2.570648 52.25274,-2.570966 52.25271,-2.57109 52.252714,-2.571365 52.252768,-2.571592 52.252817,-2.57164 52.252824,-2.571675 52.252829,-2.571753 52.25283,-2.571852 52.252811,-2.571865 52.252804,-2.571958 52.252754,-2.572143 52.252652,-2.572291 52.252577,-2.57244 52.252535,-2.572446 52.252534,-2.572473 52.25253,-2.572666 52.252499,-2.57274 52.252496,-2.572809 52.252494,-2.572882 52.252499)",
+ "LINESTRING(-2.548434 52.318773,-2.54837 52.31869,-2.548342 52.318571,-2.54829 52.318243,-2.548328 52.318091,-2.548343 52.317724,-2.548345 52.317578,-2.548348 52.317463,-2.548352 52.317393,-2.548359 52.31729,-2.548367 52.317172,-2.548362 52.317132,-2.548348 52.317089,-2.548335 52.317051,-2.548303 52.317005,-2.548268 52.316968,-2.548228 52.316939,-2.548197 52.316914)",
+ "LINESTRING(-2.5647 52.280694,-2.564611 52.280667,-2.564554 52.280647,-2.564553 52.280646,-2.564466 52.280583,-2.564464 52.280581,-2.564462 52.280579,-2.564382 52.280491,-2.5643 52.280394,-2.5642 52.280285,-2.564089 52.280184,-2.564012 52.280141,-2.563911 52.280103,-2.563849 52.28009,-2.56382 52.280083,-2.563771 52.280073,-2.56375 52.280071,-2.563685 52.280064,-2.56362 52.280057)",
+ "LINESTRING(-2.572267 52.237221,-2.572354 52.23703,-2.572462 52.236915,-2.572642 52.236834,-2.572777 52.236822,-2.573147 52.236798,-2.573256 52.23677,-2.573293 52.236761,-2.573381 52.236734,-2.573672 52.236597,-2.57437 52.23618,-2.574776 52.235936,-2.575348 52.235529,-2.575583 52.235373,-2.575987 52.235117,-2.576503 52.234756,-2.576544 52.234726,-2.576745 52.234593,-2.576895 52.234517,-2.577057 52.234461,-2.577394 52.234363,-2.577633 52.234284,-2.577839 52.234198,-2.577967 52.234153,-2.578536 52.233986,-2.579064 52.233819,-2.579075 52.233815,-2.579399 52.23368,-2.579744 52.233564,-2.580219 52.233415,-2.580847 52.233218)",
+ "LINESTRING(-2.471886 52.410372,-2.472048 52.410396,-2.472451 52.410365,-2.473273 52.4103,-2.473549 52.410281,-2.473782 52.410266,-2.474242 52.410265,-2.474647 52.410255,-2.474666 52.410255,-2.474948 52.410239,-2.475095 52.410224,-2.475192 52.410209,-2.475535 52.410156,-2.476032 52.410086,-2.476313 52.41005,-2.476674 52.410016,-2.476947 52.409988,-2.47713 52.409984,-2.477333 52.409991,-2.477465 52.410011,-2.477505 52.410023,-2.477604 52.410054,-2.477621 52.410059,-2.47776 52.410118,-2.477938 52.410225,-2.47796 52.410242,-2.478004 52.410276,-2.478065 52.410324,-2.478077 52.410336,-2.478164 52.410437,-2.478193 52.410445,-2.478311 52.410454,-2.478707 52.410425,-2.478741 52.410429)",
+ "LINESTRING(-2.466721 52.410894,-2.466809 52.41093,-2.466969 52.411017,-2.467398 52.411283,-2.46767 52.411458,-2.467738 52.411487,-2.467844 52.411521,-2.468032 52.411543,-2.468194 52.411562,-2.468255 52.411569,-2.470843 52.41184,-2.471402 52.411902)",
+ "LINESTRING(-2.554667 52.389753,-2.554543 52.38971,-2.554214 52.389653,-2.55373 52.389577,-2.553436 52.389514,-2.553155 52.389412,-2.552772 52.38929,-2.552624 52.389246,-2.552374 52.389193,-2.552153 52.389131,-2.552101 52.389104,-2.552049 52.389077,-2.552 52.389048)",
+ "LINESTRING(-2.474069 52.386413,-2.474094 52.386471,-2.474115 52.386496,-2.474138 52.386512,-2.474147 52.386518,-2.474168 52.386532,-2.474186 52.386543,-2.474206 52.38655,-2.474224 52.386555,-2.474247 52.386557,-2.474265 52.386558,-2.474356 52.386555)",
+ "LINESTRING(-2.577546 52.379129,-2.577584 52.379095,-2.577739 52.379002,-2.57807 52.378821,-2.579069 52.378298,-2.580057 52.377738,-2.580511 52.377505,-2.580879 52.3773,-2.58191 52.376725,-2.5821 52.376616,-2.582245 52.37653,-2.582368 52.376457,-2.582477 52.376409,-2.582588 52.376376,-2.582702 52.376349,-2.582832 52.37633,-2.583016 52.376318,-2.583245 52.376315,-2.583266 52.376315,-2.583497 52.376348,-2.583633 52.376389,-2.583712 52.376413,-2.583878 52.376449,-2.584109 52.376495,-2.584299 52.376554,-2.584416 52.376593,-2.58449 52.376599,-2.584599 52.376567,-2.584676 52.376514,-2.584728 52.376458,-2.584749 52.376421)",
+ "LINESTRING(-2.459996 52.457962,-2.459215 52.4578,-2.45878 52.457693,-2.458686 52.457664,-2.458619 52.457636,-2.458585 52.457607,-2.458548 52.457468,-2.458519 52.457359,-2.458485 52.457302,-2.458481 52.457242,-2.458492 52.457168,-2.458519 52.457079,-2.458548 52.456995,-2.458598 52.456919,-2.458673 52.456838,-2.458893 52.456647,-2.459155 52.456424,-2.459233 52.456346,-2.459266 52.456298,-2.459277 52.456238,-2.459288 52.456113,-2.459284 52.455913,-2.459288 52.45563,-2.459307 52.45544,-2.459305 52.455367,-2.459301 52.455309,-2.459283 52.455264,-2.459234 52.455202,-2.459169 52.455154,-2.459056 52.455092,-2.458995 52.455039,-2.458933 52.454965,-2.458907 52.454912,-2.458852 52.454721,-2.458775 52.454426,-2.458715 52.454227,-2.458665 52.454112,-2.458609 52.454007,-2.458514 52.453871,-2.458433 52.453774,-2.458356 52.453697,-2.458293 52.45363,-2.458277 52.453587)",
+ "LINESTRING(-2.578602 52.498031,-2.579251 52.498096,-2.579281 52.498114,-2.579311 52.498132,-2.579329 52.498169,-2.579309 52.498265)",
+ "LINESTRING(-2.571655 52.452134,-2.571922 52.452084,-2.572008 52.452068,-2.572449 52.452065,-2.573334 52.452059,-2.573409 52.452073)",
+ "LINESTRING(-2.545333 52.455671,-2.545365 52.455672,-2.545391 52.455671,-2.545479 52.455653,-2.545553 52.455635,-2.545919 52.455507,-2.545995 52.455476,-2.54605 52.455469,-2.546051 52.455469,-2.546107 52.455486,-2.54617 52.455533,-2.546229 52.455605,-2.546334 52.455703,-2.546482 52.455828,-2.54675 52.456016,-2.546824 52.456087,-2.546869 52.456177,-2.546884 52.456377,-2.546897 52.456551,-2.546919 52.456924,-2.546914 52.456973,-2.546866 52.456996,-2.546808 52.456985,-2.546774 52.456978,-2.546585 52.456905,-2.546199 52.456729,-2.546066 52.456697,-2.546052 52.456693,-2.545934 52.456672,-2.545904 52.456667,-2.545727 52.45665,-2.54547 52.456622,-2.544925 52.456606,-2.544903 52.456606,-2.544375 52.456603,-2.544226 52.456608,-2.543741 52.456612,-2.543313 52.456598)",
+ "LINESTRING(-2.47225 52.463886,-2.472365 52.463904,-2.472832 52.463991,-2.472848 52.463994,-2.473175 52.464072,-2.473328 52.464126,-2.473333 52.464128,-2.473338 52.46413,-2.473463 52.464195,-2.473616 52.464322,-2.473678 52.464369,-2.473732 52.464407)",
+ "LINESTRING(-2.457175 52.510534,-2.456312 52.51087,-2.45619 52.510917,-2.456011 52.510988,-2.455861 52.511048,-2.455756 52.51109,-2.455731 52.511109)",
+ "LINESTRING(-2.518319 52.577444,-2.518208 52.577535,-2.518032 52.577597,-2.517232 52.577863,-2.51674 52.578024,-2.516571 52.578088,-2.516489 52.578164,-2.516356 52.578267,-2.5163 52.578304,-2.516133 52.578414,-2.515911 52.578595,-2.515846 52.578648)",
+ "LINESTRING(-2.497517 52.560907,-2.497589 52.560937,-2.497794 52.561027,-2.498074 52.561161,-2.498513 52.561426,-2.49877 52.561577,-2.498981 52.561683,-2.499414 52.561923,-2.499551 52.562023,-2.499692 52.562176,-2.499774 52.562338,-2.499914 52.56263,-2.50008 52.562958,-2.500308 52.563461,-2.500415 52.563697)",
+ "LINESTRING(-2.600202 52.588818,-2.599984 52.588964,-2.599881 52.58905,-2.599775 52.589104,-2.599548 52.589215,-2.599542 52.589219,-2.599052 52.589451,-2.59847 52.589744,-2.598061 52.589933,-2.597517 52.59018,-2.597069 52.590412,-2.596399 52.590737,-2.596005 52.590942,-2.595702 52.591172,-2.595278 52.591479,-2.594971 52.591716,-2.594324 52.592189,-2.594038 52.592401,-2.593483 52.592668,-2.592961 52.592903,-2.592742 52.593009,-2.59245 52.593148,-2.592205 52.593362,-2.591903 52.593647,-2.591599 52.593929,-2.591221 52.594265,-2.590853 52.594544,-2.590349 52.594841,-2.589792 52.595132,-2.589358 52.595346,-2.588695 52.595666,-2.58789 52.596063,-2.587503 52.596248,-2.587206 52.59639,-2.586929 52.596499,-2.58639 52.596768,-2.585825 52.597044,-2.585507 52.597212,-2.585136 52.597431,-2.584636 52.597744,-2.584113 52.598065,-2.583643 52.598353,-2.583338 52.598545,-2.58302 52.598717,-2.582686 52.5989,-2.582504 52.598987,-2.582322 52.599055,-2.582214 52.599083,-2.581887 52.599137,-2.581618 52.599174,-2.581605 52.599185,-2.5816 52.59919,-2.581574 52.599213,-2.581574 52.599231)",
+ "LINESTRING(-2.478365 52.517265,-2.478477 52.517347,-2.478512 52.517372,-2.478895 52.517586,-2.4791 52.517735,-2.479305 52.517896,-2.479507 52.518064,-2.479846 52.518332,-2.480108 52.518545,-2.480699 52.51908,-2.480877 52.519241,-2.480944 52.519297,-2.480997 52.519358,-2.481038 52.519415,-2.48116 52.519651,-2.481163 52.519657,-2.481165 52.519662,-2.4812 52.519808,-2.481269 52.520139,-2.481295 52.520381,-2.481283 52.520579,-2.481261 52.520732,-2.481316 52.520904,-2.481459 52.521127,-2.481552 52.521267,-2.481731 52.521449,-2.481895 52.521618,-2.482215 52.521987,-2.482547 52.522309,-2.483038 52.522747,-2.483544 52.523186,-2.483841 52.523382,-2.484123 52.523534,-2.484448 52.523677,-2.484641 52.523748,-2.485042 52.52389,-2.485233 52.523952,-2.485345 52.523986,-2.485602 52.524068,-2.485927 52.524147,-2.486091 52.524175,-2.486336 52.524205,-2.486547 52.524225,-2.486651 52.524234,-2.486702 52.524243,-2.4868 52.52426,-2.486931 52.524296,-2.487035 52.52434,-2.487168 52.524412,-2.487242 52.524453,-2.487376 52.524546,-2.487449 52.524597,-2.48753 52.524681,-2.4876 52.524761,-2.487704 52.524868,-2.487764 52.524922,-2.487824 52.524976,-2.487943 52.525119,-2.488078 52.525352,-2.488187 52.525735,-2.488216 52.525855,-2.488278 52.526115,-2.488305 52.526239,-2.488385 52.526429,-2.488431 52.5266,-2.488462 52.526735,-2.488512 52.527283,-2.488513 52.527346,-2.488528 52.527418,-2.488559 52.527481,-2.488614 52.527547,-2.488721 52.52762,-2.488857 52.52769,-2.489649 52.528116,-2.490231 52.528454,-2.490491 52.528575,-2.490601 52.528632,-2.490729 52.528709,-2.490812 52.528777,-2.490994 52.528932,-2.491131 52.529129,-2.491132 52.529212,-2.49112 52.529238,-2.491085 52.529304)",
+ "LINESTRING(-2.399788 52.170841,-2.39976 52.170875,-2.399673 52.170957,-2.399615 52.170993,-2.399542 52.171029,-2.399324 52.171111,-2.399207 52.171147,-2.39909 52.171183,-2.398828 52.171238,-2.398687 52.171248,-2.398571 52.171249,-2.398435 52.17124,-2.398415 52.171239,-2.39838 52.171242,-2.398299 52.17125,-2.398201 52.171264,-2.398103 52.171311)",
+ "LINESTRING(-2.39886 52.194121,-2.398902 52.194016,-2.39878 52.19367,-2.398754 52.193547,-2.398799 52.193432,-2.398894 52.193346,-2.398981 52.193289,-2.399046 52.193265,-2.399249 52.193196,-2.399485 52.193106,-2.399774 52.192991,-2.400075 52.192865,-2.400318 52.192747,-2.40067 52.192582,-2.400878 52.192503,-2.401028 52.192446,-2.40112 52.192388,-2.4012 52.192317,-2.401209 52.192289,-2.40121 52.19225,-2.401165 52.192124,-2.40115 52.192061,-2.401261 52.191423,-2.401298 52.191298,-2.4014 52.19114,-2.401526 52.190955,-2.401612 52.190805,-2.401674 52.190626,-2.401736 52.190451,-2.401787 52.190325,-2.401832 52.190182,-2.401888 52.189919)",
+ "LINESTRING(-2.420562 52.189747,-2.420649 52.189755,-2.420904 52.189748,-2.421703 52.189726,-2.421869 52.189701,-2.422065 52.189651,-2.422175 52.18964,-2.422326 52.189643,-2.422433 52.18966,-2.422603 52.189707,-2.422789 52.189736,-2.423127 52.189773,-2.423211 52.189771,-2.423304 52.189737,-2.423401 52.189718,-2.423611 52.189748,-2.423773 52.189749,-2.424169 52.189666,-2.424832 52.189523,-2.424895 52.189492,-2.425031 52.189393,-2.42513 52.189322,-2.425258 52.189185)",
+ "LINESTRING(-2.431553 52.211334,-2.431826 52.211228,-2.432062 52.211176,-2.432725 52.21103,-2.432992 52.210966,-2.433262 52.21089,-2.433621 52.210751,-2.433836 52.210616,-2.434025 52.210455,-2.434143 52.210242,-2.434182 52.210042,-2.434238 52.209873,-2.434312 52.209601,-2.43435 52.209277,-2.434391 52.209007,-2.434394 52.208868)",
+ "LINESTRING(-2.411074 52.184883,-2.410958 52.184882,-2.410934 52.18488,-2.41067 52.184841,-2.410351 52.184785,-2.410136 52.184761,-2.409997 52.18475,-2.409754 52.184755,-2.409291 52.184788,-2.409123 52.1848,-2.40881 52.184786,-2.408474 52.184759,-2.408347 52.184763,-2.407924 52.184807,-2.407374 52.184865,-2.407051 52.184899,-2.406995 52.184894,-2.406965 52.184885,-2.406892 52.184858,-2.406686 52.184751,-2.406636 52.18473,-2.406583 52.184715,-2.406525 52.184707,-2.405576 52.184658,-2.405101 52.184641,-2.404782 52.184628,-2.404481 52.184626,-2.404104 52.184627,-2.403745 52.184639,-2.403416 52.184676,-2.402704 52.184781)",
+ "LINESTRING(-2.411444 52.156441,-2.411417 52.156354,-2.411373 52.156202,-2.411266 52.155878,-2.41114 52.155478,-2.411087 52.155324,-2.41101 52.1551,-2.410884 52.154704,-2.410759 52.154315,-2.41071 52.154107,-2.410674 52.154034,-2.41064 52.153965,-2.410614 52.153891,-2.410553 52.153752,-2.410141 52.153263,-2.40989 52.152986,-2.409609 52.152708,-2.40916 52.152261,-2.409114 52.152257,-2.408964 52.152286,-2.408323 52.152406,-2.408029 52.152462,-2.40781 52.15248,-2.407722 52.152481,-2.40743 52.152473,-2.407093 52.152429,-2.406984 52.152418,-2.406773 52.152362,-2.406536 52.152334,-2.406269 52.152317,-2.406083 52.152324)",
+ "LINESTRING(-2.309246 52.321985,-2.30921 52.322046,-2.309069 52.322272,-2.309024 52.322327,-2.30898 52.322338,-2.30896 52.322343,-2.30885 52.322344,-2.308767 52.322364,-2.308753 52.322369)",
+ "LINESTRING(-2.317414 52.305071,-2.317354 52.305041,-2.317212 52.30497,-2.317056 52.304907,-2.316933 52.304856,-2.316823 52.304778)",
+ "LINESTRING(-2.31162 52.298537,-2.31168 52.298317,-2.311681 52.298306,-2.311717 52.298032,-2.311803 52.297506,-2.311828 52.297403,-2.311885 52.29728,-2.311899 52.297265,-2.311943 52.297213,-2.312097 52.297157,-2.312239 52.297129,-2.312491 52.297101,-2.3128 52.29706,-2.312944 52.297037,-2.313045 52.29702,-2.313186 52.29698,-2.313245 52.296964,-2.313407 52.296912,-2.313418 52.296908,-2.313451 52.296896,-2.313624 52.296829,-2.313666 52.296809,-2.313875 52.296709,-2.314267 52.296499,-2.314505 52.296391,-2.314865 52.29626,-2.315593 52.295989,-2.316099 52.295795,-2.317154 52.295436,-2.317332 52.295378,-2.318137 52.295173,-2.318314 52.29513,-2.319226 52.294921,-2.319938 52.294753,-2.320333 52.29466,-2.320446 52.294633,-2.320696 52.294577,-2.32076 52.294519,-2.32084 52.29447,-2.320946 52.294376,-2.321001 52.294344,-2.321105 52.294315,-2.321169 52.294298,-2.321239 52.294287,-2.321331 52.294279,-2.321476 52.29428,-2.322073 52.294296,-2.322789 52.294317,-2.322742 52.294467,-2.322676 52.294735,-2.322625 52.294996,-2.322596 52.295041,-2.322529 52.295078,-2.322365 52.295129,-2.322313 52.295156,-2.322284 52.295221,-2.322259 52.29536,-2.322265 52.295417)",
+ "LINESTRING(-2.303381 52.282977,-2.303361 52.28292,-2.303334 52.282843,-2.303301 52.282764,-2.303278 52.282705,-2.303027 52.282448,-2.302958 52.282307,-2.302958 52.282251,-2.302958 52.282236)",
+ "LINESTRING(-2.330317 52.266892,-2.330322 52.266946,-2.330326 52.266989,-2.330319 52.267158,-2.330317 52.267329,-2.330291 52.267437,-2.330195 52.267845)",
+ "LINESTRING(-2.325552 52.324293,-2.325676 52.32429,-2.325721 52.324308,-2.325775 52.32433,-2.325834 52.324354,-2.326184 52.324634,-2.326472 52.324866,-2.32673 52.325073,-2.326893 52.325203,-2.327011 52.325296,-2.327231 52.325463)",
+ "LINESTRING(-2.394535 52.321592,-2.394659 52.321506,-2.394904 52.321359,-2.395022 52.321287,-2.395179 52.321211,-2.39532 52.321134,-2.395429 52.321062,-2.39552 52.320986,-2.395648 52.32088,-2.395753 52.320779,-2.395813 52.320708,-2.395856 52.320643,-2.395939 52.3205,-2.396028 52.320348,-2.396095 52.320239,-2.396155 52.320159,-2.396269 52.320018,-2.39646 52.319815,-2.396568 52.319689,-2.396723 52.319489,-2.396904 52.319268,-2.397038 52.31913,-2.397126 52.319043,-2.397219 52.318972,-2.397266 52.318946,-2.397317 52.318896,-2.397368 52.318846,-2.397393 52.318803,-2.397433 52.318728,-2.397467 52.318668,-2.397516 52.318602,-2.39758 52.318536,-2.397689 52.318435,-2.397794 52.318348,-2.397905 52.318255,-2.398077 52.318125,-2.398168 52.31805,-2.398217 52.317987,-2.39824 52.317925,-2.398252 52.317882,-2.398254 52.317838)",
+ "LINESTRING(-2.378569 52.312133,-2.37857 52.312127,-2.378321 52.311753,-2.3781 52.311421)",
+ "LINESTRING(-2.367521 52.286345,-2.367594 52.286291,-2.367984 52.286161,-2.368477 52.286025,-2.368881 52.285927,-2.36908 52.285878,-2.369367 52.285843,-2.369432 52.285834,-2.369552 52.285818,-2.369669 52.285802,-2.369818 52.285757,-2.369894 52.285715,-2.370197 52.285531,-2.370559 52.285294,-2.37092 52.285059,-2.372029 52.284362,-2.372119 52.284306,-2.372218 52.284251,-2.37247 52.284157,-2.372648 52.284069,-2.372718 52.284018,-2.372749 52.283955,-2.372772 52.283858,-2.372733 52.283773,-2.372691 52.283642,-2.372643 52.283484,-2.372621 52.283362,-2.372615 52.283303,-2.372626 52.283207,-2.372652 52.283134,-2.372753 52.282962,-2.372846 52.282879,-2.37293 52.282811,-2.373244 52.282583,-2.37328 52.282551,-2.373543 52.282366,-2.373753 52.282222,-2.374052 52.282024,-2.374299 52.281847,-2.374437 52.281744,-2.374638 52.281589,-2.374835 52.281434,-2.37505 52.281274,-2.37517 52.281179,-2.375292 52.281104,-2.375429 52.281011,-2.375717 52.280825,-2.37583 52.280752,-2.375883 52.280713,-2.375901 52.280687,-2.375908 52.280641,-2.375943 52.280465,-2.375969 52.280312,-2.375983 52.28013,-2.375997 52.280043,-2.376011 52.279916,-2.376028 52.279736,-2.376029 52.279554,-2.376028 52.279374,-2.376055 52.27919,-2.376091 52.279008,-2.37611 52.278827,-2.376143 52.278646,-2.376142 52.278524,-2.376117 52.278402,-2.376085 52.278261,-2.376002 52.278084,-2.375937 52.277952,-2.375879 52.277791,-2.375869 52.277657)",
+ "LINESTRING(-2.356828 52.29325,-2.35674 52.292996,-2.356687 52.292818,-2.356655 52.292763,-2.356609 52.292711,-2.356551 52.292684,-2.35648 52.29268,-2.356456 52.292684,-2.356274 52.292712,-2.356212 52.292719,-2.356141 52.292727,-2.356016 52.292741,-2.355927 52.292741,-2.355848 52.292741,-2.355743 52.292732,-2.355719 52.29273,-2.355703 52.292726,-2.355544 52.292691,-2.355469 52.292682,-2.355305 52.292664,-2.355283 52.292661,-2.355196 52.292648,-2.355177 52.29265,-2.355073 52.292657,-2.354956 52.292666,-2.35483 52.292723,-2.354682 52.292809,-2.354512 52.29291,-2.354314 52.292985,-2.35412 52.293026,-2.354027 52.293038)",
+ "LINESTRING(-2.439742 52.273662,-2.439487 52.27359,-2.439344 52.273597,-2.439059 52.273611,-2.43898 52.273595,-2.43881 52.273451)",
+ "LINESTRING(-2.386295 52.272591,-2.386277 52.272551,-2.386273 52.272507,-2.386273 52.272447,-2.386275 52.272432,-2.386278 52.272384,-2.386279 52.272367,-2.386284 52.272356,-2.386302 52.272316,-2.386322 52.272286,-2.38633 52.272274,-2.386347 52.272262,-2.386366 52.27225,-2.386368 52.272248,-2.386451 52.272216,-2.386781 52.272128,-2.386868 52.272101,-2.386905 52.272065,-2.386904 52.272017,-2.386883 52.271978,-2.386829 52.271926,-2.386761 52.271888,-2.386644 52.271853,-2.386502 52.27183,-2.386391 52.271819,-2.386275 52.271812,-2.386211 52.271794,-2.386207 52.27179,-2.386187 52.271768,-2.386193 52.271714,-2.386224 52.271702,-2.386245 52.271693,-2.386256 52.271689,-2.386336 52.271687,-2.386393 52.271685,-2.386579 52.27167,-2.386619 52.271665,-2.386721 52.271652,-2.386799 52.271643,-2.386816 52.271638,-2.386953 52.271599,-2.387064 52.271552,-2.38708 52.271546,-2.387114 52.271521,-2.387193 52.271465,-2.387434 52.271266,-2.387709 52.271054,-2.387859 52.270946,-2.388003 52.270832,-2.388051 52.270783,-2.388095 52.270737,-2.388136 52.270666,-2.388156 52.27053,-2.388171 52.27044,-2.388222 52.270343,-2.38829 52.270248,-2.388348 52.270213,-2.388433 52.270189,-2.388543 52.270166,-2.388775 52.270123,-2.388964 52.270083,-2.389059 52.270051,-2.38919 52.270002,-2.389295 52.269948,-2.389399 52.269881,-2.389458 52.269828,-2.389488 52.269756,-2.389557 52.269482,-2.389596 52.269274,-2.389609 52.269022,-2.389622 52.268896,-2.389692 52.268518,-2.389749 52.268374,-2.389778 52.268329,-2.389863 52.268272,-2.390046 52.268158,-2.390356 52.267968,-2.390702 52.26776,-2.390886 52.267669,-2.390974 52.267633,-2.391061 52.267605,-2.39112 52.267596,-2.391247 52.267581,-2.39153 52.267568,-2.391603 52.267559,-2.391706 52.267517,-2.391771 52.267474,-2.391774 52.267472,-2.391775 52.267471,-2.391863 52.267381,-2.391962 52.267263,-2.392009 52.267172,-2.39204 52.267074,-2.39206 52.266964,-2.392102 52.266757,-2.392115 52.266694,-2.392193 52.266545,-2.392282 52.266434,-2.39236 52.266357,-2.39245 52.266303,-2.392565 52.266261,-2.392723 52.266231,-2.392901 52.266206,-2.393029 52.266188,-2.393073 52.266175,-2.39316 52.266149,-2.393313 52.26609,-2.393392 52.266044,-2.393453 52.266005,-2.393627 52.265865,-2.393811 52.265725,-2.393847 52.265679,-2.393852 52.265637,-2.393825 52.265578,-2.393745 52.265507,-2.393448 52.265288,-2.393385 52.265244,-2.393161 52.265087,-2.393002 52.264965,-2.392901 52.264891)",
+ "LINESTRING(-2.413413 52.258694,-2.413538 52.259264,-2.41355 52.259313,-2.413676 52.259883,-2.413779 52.260331,-2.413839 52.260595,-2.413895 52.260804,-2.413933 52.261004,-2.413968 52.261134,-2.414015 52.261357,-2.41411 52.26167,-2.414162 52.261798,-2.414221 52.261889,-2.414317 52.261954,-2.414454 52.261996,-2.414872 52.262069,-2.415052 52.26213,-2.415116 52.262207,-2.415148 52.262318,-2.415124 52.262503,-2.415013 52.262875,-2.414913 52.263165,-2.414805 52.263391,-2.414465 52.263742,-2.414041 52.264168,-2.413843 52.264367,-2.413608 52.264517,-2.413418 52.264593,-2.41315 52.264649,-2.412802 52.264738,-2.412492 52.264842,-2.412056 52.265013,-2.411777 52.265105,-2.41154 52.265151,-2.411298 52.265155,-2.411154 52.265137,-2.410854 52.2651,-2.410463 52.265056)",
+ "LINESTRING(-2.422179 52.250591,-2.422229 52.25056,-2.422258 52.250542,-2.422404 52.250506,-2.422448 52.250479,-2.422506 52.250406,-2.422598 52.25024)",
+ "LINESTRING(-2.304096 52.38383,-2.304311 52.383709,-2.304375 52.383673,-2.304741 52.383474)",
+ "LINESTRING(-2.311777 52.355598,-2.311908 52.355533,-2.312027 52.355479,-2.311996 52.355417,-2.311862 52.355242,-2.311751 52.355094,-2.311715 52.35494,-2.311647 52.354695,-2.311602 52.354528,-2.311601 52.354461,-2.3116 52.354326,-2.311555 52.35417,-2.311489 52.354145,-2.311335 52.354178,-2.311181 52.354211,-2.31102 52.354269,-2.310948 52.354295,-2.310895 52.354314,-2.310667 52.354401)",
+ "LINESTRING(-2.310861 52.374127,-2.310797 52.374063,-2.310739 52.374022,-2.310657 52.373964,-2.310579 52.373921)",
+ "LINESTRING(-2.331681 52.351268,-2.331968 52.351174,-2.332394 52.351032,-2.332727 52.350926,-2.333121 52.3508,-2.333336 52.350697,-2.333535 52.350572,-2.333728 52.350421,-2.33399 52.350216,-2.334129 52.350094,-2.334252 52.349977,-2.334333 52.349867,-2.334419 52.349752,-2.334485 52.349592,-2.334495 52.349413,-2.334456 52.349228,-2.334372 52.348983,-2.334323 52.348821,-2.334316 52.348799)",
+ "LINESTRING(-2.328113 52.34744,-2.328381 52.347429,-2.328637 52.347401,-2.328936 52.347357,-2.329147 52.347329,-2.32934 52.347286,-2.32945 52.347264,-2.329714 52.347204,-2.329903 52.347157,-2.330088 52.347111,-2.330303 52.347075,-2.330413 52.347035,-2.330616 52.346951)",
+ "LINESTRING(-2.377692 52.403371,-2.377783 52.403294,-2.377821 52.403256,-2.377923 52.40318,-2.378179 52.402998,-2.378403 52.402832,-2.37892 52.402432,-2.379181 52.40224,-2.379405 52.402124,-2.379934 52.40181,-2.38016 52.401672,-2.380332 52.401507,-2.380498 52.401279,-2.380777 52.400857,-2.380868 52.400761,-2.38108 52.400531,-2.381152 52.400413,-2.381184 52.400297,-2.381217 52.400057,-2.381256 52.399866,-2.381298 52.399733,-2.381373 52.39961,-2.381469 52.399356,-2.381489 52.399177,-2.381495 52.398913,-2.381469 52.398764,-2.381359 52.398634,-2.381155 52.398507,-2.381016 52.398461,-2.380878 52.398423,-2.38062 52.398386,-2.380386 52.398338,-2.380169 52.398274,-2.380085 52.398228,-2.379902 52.398126,-2.379793 52.398048,-2.379716 52.397953,-2.379691 52.397856,-2.379723 52.397749,-2.379781 52.397586,-2.379801 52.39745,-2.379787 52.397334,-2.379669 52.397187,-2.379388 52.396965,-2.37896 52.39669,-2.378453 52.396307,-2.378046 52.395955,-2.377357 52.395277,-2.377302 52.395176,-2.3772 52.394948,-2.377105 52.394613,-2.376996 52.394229,-2.376749 52.393658,-2.376667 52.393464,-2.37645 52.392901,-2.37639 52.392785,-2.375713 52.391955,-2.375234 52.391356,-2.375004 52.391043,-2.374907 52.390855,-2.374914 52.390767,-2.374988 52.390534,-2.375028 52.390408,-2.375047 52.390376,-2.375212 52.390101,-2.375258 52.389951,-2.375276 52.389892,-2.375314 52.389655,-2.375315 52.389636,-2.375321 52.389509,-2.375321 52.389505,-2.375438 52.389241,-2.375754 52.388654,-2.375912 52.388359,-2.375976 52.388178,-2.37602 52.388052,-2.375996 52.387924,-2.375716 52.387478,-2.375151 52.386671,-2.374893 52.386348,-2.374724 52.386148,-2.374601 52.38596,-2.374589 52.385941,-2.374556 52.385827,-2.374571 52.385719,-2.374616 52.385639,-2.374694 52.385554,-2.374796 52.385442,-2.374826 52.38541,-2.375082 52.385237,-2.375492 52.385069,-2.375811 52.384952,-2.376154 52.384779,-2.376547 52.384534,-2.376794 52.384354,-2.377111 52.384089,-2.377263 52.38397,-2.377377 52.38388,-2.377532 52.383758,-2.377707 52.383613)",
+ "LINESTRING(-2.41285 52.381728,-2.41263 52.381673,-2.412534 52.38165,-2.412416 52.381631,-2.412314 52.381609,-2.412146 52.381574,-2.41204 52.381558,-2.411958 52.381553,-2.411908 52.381559,-2.411769 52.381592,-2.411629 52.38164,-2.411416 52.381728,-2.41137 52.381751,-2.411362 52.381755)",
+ "LINESTRING(-2.32153 52.435879,-2.321434 52.435843,-2.321169 52.435748,-2.321029 52.435692,-2.320891 52.435624,-2.320814 52.435544,-2.320789 52.435454,-2.320686 52.43505,-2.320678 52.435016,-2.320697 52.434978,-2.3207 52.434977,-2.320741 52.434964,-2.320807 52.434964,-2.320847 52.434986,-2.320903 52.435022,-2.32098 52.435044,-2.32112 52.435084,-2.321164 52.435095,-2.321305 52.435128,-2.321308 52.435129,-2.321397 52.435165,-2.321537 52.435254,-2.321663 52.435362,-2.321808 52.435503,-2.321811 52.435518,-2.321824 52.43558,-2.321813 52.435716,-2.321777 52.435796,-2.321718 52.435883,-2.321666 52.43593)",
+ "LINESTRING(-2.307716 52.425456,-2.307818 52.425431,-2.307876 52.425407,-2.307913 52.425393,-2.307955 52.425381,-2.307993 52.425377,-2.308035 52.42538,-2.308086 52.425401,-2.308219 52.425445,-2.308331 52.425485,-2.308463 52.425511,-2.308596 52.425534,-2.308714 52.425547,-2.308825 52.425552,-2.309022 52.425546,-2.309125 52.425533,-2.309161 52.425522,-2.309213 52.425506,-2.309219 52.425501,-2.309245 52.425482,-2.309286 52.425452,-2.309447 52.425307,-2.309696 52.425131,-2.309799 52.425067,-2.310109 52.424883,-2.310276 52.424771,-2.310451 52.424658,-2.310519 52.424607,-2.310586 52.424531,-2.310665 52.42442,-2.310708 52.424391)",
+ "LINESTRING(-2.368821 52.479672,-2.368718 52.479668,-2.368563 52.479662,-2.368422 52.479647,-2.368321 52.479625,-2.368055 52.479535,-2.367906 52.479453,-2.367768 52.479353,-2.367678 52.479272)",
+ "LINESTRING(-2.356756 52.456904,-2.3567 52.456817,-2.356403 52.456452,-2.356335 52.456374,-2.356182 52.456224,-2.356001 52.456019,-2.355913 52.455933,-2.355897 52.455925,-2.355889 52.455921,-2.35586 52.455907,-2.355792 52.455906)",
+ "LINESTRING(-2.351301 52.457594,-2.351243 52.457599,-2.351081 52.457613,-2.350831 52.457667,-2.350523 52.457776,-2.350141 52.457939,-2.350024 52.458003)",
+ "LINESTRING(-2.351553 52.453669,-2.351661 52.453639,-2.351911 52.453547,-2.352488 52.453293,-2.352981 52.453076,-2.353348 52.452904,-2.353436 52.452854)",
+ "LINESTRING(-2.358583 52.43464,-2.358485 52.434675,-2.358283 52.434761,-2.358063 52.434905,-2.357924 52.434996,-2.357888 52.435043,-2.357871 52.435063,-2.357815 52.435066,-2.357731 52.435058,-2.357557 52.435069,-2.357033 52.435113,-2.356814 52.43513,-2.356696 52.435121,-2.356544 52.435094,-2.356379 52.435059,-2.356325 52.435055,-2.356269 52.435064,-2.355794 52.435249)",
+ "LINESTRING(-2.36948 52.442856,-2.369591 52.442905,-2.369678 52.442964,-2.369829 52.443057,-2.36992 52.443113,-2.370008 52.443155,-2.370101 52.443184,-2.37022 52.443212)",
+ "LINESTRING(-2.378203 52.420339,-2.377907 52.420588,-2.377812 52.420689,-2.377747 52.420784,-2.377636 52.420949,-2.377438 52.421253,-2.37723 52.421596,-2.377145 52.421741,-2.377032 52.421894,-2.37695 52.421998,-2.37685 52.422099,-2.376733 52.42218,-2.376585 52.422267,-2.376382 52.422369,-2.376173 52.422464,-2.376015 52.422525,-2.375777 52.422613,-2.375539 52.422702,-2.375192 52.422816,-2.374837 52.422933,-2.374674 52.422981,-2.374571 52.423022,-2.374448 52.423075,-2.374379 52.423108,-2.374324 52.423142,-2.374227 52.423211,-2.374132 52.42328,-2.37405 52.423355,-2.373964 52.423444,-2.373799 52.423653,-2.373586 52.423942,-2.373383 52.424274,-2.373231 52.424506,-2.373167 52.424614,-2.373126 52.424671,-2.373096 52.424694,-2.373001 52.424733,-2.372757 52.424811,-2.372453 52.42491,-2.372215 52.424983,-2.371593 52.425148,-2.371186 52.425256,-2.371087 52.425292,-2.370841 52.425377,-2.370665 52.425442,-2.370489 52.425505,-2.370155 52.425593,-2.369952 52.425637,-2.369691 52.425684,-2.369177 52.425766,-2.368982 52.425788,-2.368642 52.425837,-2.368614 52.425842,-2.368611 52.425842,-2.368609 52.425843,-2.368465 52.42587,-2.368347 52.425896,-2.368256 52.425948,-2.368198 52.425992,-2.368112 52.426089,-2.367959 52.42626,-2.367834 52.426413,-2.3677 52.426546,-2.367614 52.426657,-2.36759 52.426744,-2.367598 52.426837,-2.367632 52.426944,-2.367705 52.427086)",
+ "LINESTRING(-2.430145 52.497136,-2.429921 52.496968,-2.42984 52.49691,-2.429772 52.496859,-2.429759 52.496849,-2.429681 52.496802,-2.429674 52.496798,-2.429601 52.49676,-2.429592 52.496755,-2.429577 52.49675,-2.429452 52.496705,-2.429156 52.496622,-2.428936 52.496571,-2.428713 52.496519,-2.428662 52.496509,-2.42838 52.496451,-2.428278 52.49643,-2.427906 52.496362,-2.427796 52.496359,-2.427692 52.496374,-2.427614 52.496413,-2.427594 52.496423,-2.427497 52.496563,-2.427473 52.496604,-2.427424 52.496683,-2.427409 52.496697,-2.427333 52.496767,-2.427313 52.496788,-2.427262 52.496844,-2.427253 52.496852,-2.427253 52.496854,-2.42723 52.496909,-2.427251 52.496965,-2.42727 52.497014,-2.427279 52.497085,-2.427279 52.497097,-2.427274 52.497153,-2.427272 52.497192,-2.427256 52.497239,-2.427248 52.497264,-2.427249 52.497297,-2.427262 52.497316,-2.427274 52.497333,-2.427276 52.497335,-2.427375 52.497409,-2.427536 52.497534,-2.427549 52.497543,-2.427734 52.497685,-2.427863 52.497795,-2.427899 52.49783,-2.427971 52.497897,-2.428166 52.498061,-2.428402 52.498242,-2.428577 52.498372,-2.428759 52.498507,-2.428938 52.498655,-2.429307 52.498971,-2.42952 52.49917,-2.429637 52.499279,-2.429907 52.499533,-2.430107 52.499708,-2.43019 52.499779,-2.430309 52.499887,-2.430347 52.499938,-2.430354 52.499947,-2.430396 52.500005,-2.430403 52.500067,-2.430403 52.50013,-2.430396 52.500164,-2.430395 52.500168,-2.430384 52.500186,-2.430342 52.500254,-2.430222 52.500419,-2.430129 52.500571,-2.430049 52.500741)",
+ "LINESTRING(-2.384219 52.482371,-2.384296 52.482448,-2.384358 52.482546,-2.38439 52.482628,-2.384477 52.482964,-2.38456 52.48325,-2.384633 52.48332,-2.384683 52.483336,-2.385527 52.483375,-2.386516 52.483431,-2.386754 52.483455,-2.386904 52.483491,-2.386908 52.483492,-2.38696 52.48351,-2.387116 52.483564,-2.387205 52.483599,-2.387258 52.48362,-2.387266 52.483624,-2.387373 52.483676,-2.3874 52.483699,-2.387405 52.483732,-2.387404 52.483741,-2.387401 52.483772,-2.387188 52.484013,-2.387151 52.484063,-2.387135 52.484117,-2.387132 52.484128,-2.387132 52.484135,-2.387133 52.484219,-2.387128 52.484283,-2.387116 52.484454,-2.387105 52.484566,-2.387079 52.484639,-2.387041 52.484709,-2.386988 52.484814,-2.386922 52.484945,-2.386917 52.484955,-2.386797 52.485264,-2.386765 52.485391,-2.386753 52.485438,-2.386725 52.485502,-2.386614 52.485766,-2.386546 52.485953,-2.38654 52.485983)",
+ "LINESTRING(-2.409893 52.500854,-2.409695 52.500838,-2.409501 52.500821,-2.409485 52.500817,-2.40946 52.500811,-2.40945 52.500808,-2.409439 52.500768,-2.409456 52.500683,-2.409462 52.500587,-2.409477 52.500532,-2.409451 52.500492,-2.409392 52.500465,-2.409194 52.500421,-2.409173 52.500406,-2.409139 52.500381,-2.409116 52.500337,-2.409098 52.500304,-2.409093 52.500125,-2.40903 52.499999,-2.408956 52.49991,-2.408952 52.499905,-2.408935 52.499891,-2.408772 52.499757,-2.408677 52.499692,-2.408658 52.499679,-2.408632 52.499667,-2.408306 52.499518,-2.408293 52.499507,-2.408247 52.499467,-2.408236 52.499458,-2.408234 52.49945,-2.408202 52.499331,-2.408205 52.499195,-2.408133 52.498988,-2.408037 52.498857,-2.407772 52.49855,-2.407591 52.498335,-2.407348 52.498142,-2.407131 52.497985,-2.407067 52.497943,-2.406992 52.497894,-2.406829 52.497786,-2.406808 52.497772,-2.406522 52.497612,-2.406495 52.497602,-2.406233 52.497495,-2.406027 52.497414,-2.405534 52.497297,-2.405457 52.497278,-2.404824 52.497124,-2.403814 52.496815,-2.40333 52.496679,-2.403133 52.496635,-2.40265 52.496552,-2.401894 52.496427,-2.401568 52.496373,-2.400958 52.496297,-2.40045 52.496245,-2.400184 52.496219,-2.400092 52.496211,-2.400034 52.496193,-2.399953 52.496147,-2.39985 52.496033,-2.399776 52.495956)",
+ "LINESTRING(-2.358014 52.492146,-2.358028 52.492193,-2.358029 52.492234,-2.35786 52.492818,-2.357794 52.493046,-2.357747 52.493245,-2.357732 52.493321)",
+ "LINESTRING(-2.345449 52.467635,-2.345714 52.467635,-2.345802 52.467634,-2.345964 52.467634,-2.346156 52.467651,-2.346421 52.467677,-2.34648 52.467686,-2.346554 52.467713,-2.346687 52.467758,-2.34688 52.467846,-2.347019 52.467912,-2.347165 52.467976,-2.347251 52.468013,-2.347374 52.468089,-2.347533 52.468179,-2.347609 52.468222,-2.347754 52.468317,-2.347802 52.468356,-2.34787 52.468446,-2.347959 52.468599,-2.348004 52.468716,-2.348034 52.468787,-2.348168 52.46894,-2.348276 52.469186,-2.348332 52.469236)",
+ "LINESTRING(-2.304184 52.534293,-2.304229 52.534219,-2.304246 52.53395,-2.304293 52.533323,-2.304343 52.532656,-2.304409 52.531983,-2.304495 52.531339,-2.304623 52.53067,-2.304758 52.530145,-2.304946 52.529717,-2.304941 52.529607)",
+ "LINESTRING(-2.404084 52.529404,-2.404094 52.529399,-2.404103 52.529392,-2.40411 52.529384,-2.404115 52.529376,-2.404118 52.529367,-2.404119 52.529358,-2.404118 52.529349,-2.404115 52.529341,-2.40411 52.529332,-2.404102 52.529325,-2.404093 52.529318,-2.404082 52.529312,-2.40407 52.529307,-2.404057 52.529303,-2.404043 52.529301,-2.404029 52.529299,-2.404014 52.529299,-2.404 52.529301,-2.403986 52.529303,-2.403973 52.529307,-2.403961 52.529312,-2.40395 52.529318,-2.403941 52.529325,-2.403934 52.529333,-2.403929 52.529341,-2.403926 52.52935,-2.403925 52.529359,-2.403926 52.529368,-2.403929 52.529376,-2.403935 52.529385,-2.403942 52.529392,-2.403951 52.529399,-2.403962 52.529405,-2.403974 52.52941,-2.403987 52.529414,-2.404001 52.529416,-2.404015 52.529418,-2.40403 52.529418,-2.404044 52.529416,-2.404058 52.529414,-2.404071 52.52941,-2.404083 52.529405,-2.404084 52.529404)"
+ };
+
+ static double expectations[][4] =
+ {
+ { 3.41515232094025E-07, 3.42522426421965E-07, 6.83030293657794E-07, 6.87058957282716E-07},
+ { 1.02802331980456E-07, 1.03813675877973E-07, 2.05604735015186E-07, 2.09650025340125E-07},
+ { 3.56112451527224E-07, 3.57098969061553E-07, 7.12224860421884E-07, 7.16171342673988E-07},
+ { 4.25305444196056E-08, 4.35412488286602E-08, 8.50612309477583E-08, 8.91039491079937E-08},
+ { 3.69520876120077E-08, 3.79614419898644E-08, 7.39041894348702E-08, 7.79416069462968E-08},
+ { 3.12580681338659E-08, 3.22376649819489E-08, 6.23702476332255E-08, 6.62886350255576E-08},
+ { 2.64535032101776E-07, 2.65503302898651E-07, 5.29010577565714E-07, 5.32883049686461E-07},
+ { 1.26452604831684E-07, 1.27462314480908E-07, 2.52905124398239E-07, 2.56944261423087E-07},
+ { 5.62396706982327E-08, 5.7239461170866E-08, 1.12479426661594E-07, 1.16478773293238E-07},
+ { 7.03945403301987E-07, 7.04847309407342E-07, 1.40789144609244E-06, 1.41149810417573E-06},
+ { 2.05895901217446E-07, 2.06897283305807E-07, 4.11792029808566E-07, 4.15797074992952E-07},
+ { 1.01571146160495E-07, 1.02582319527755E-07, 2.031423207427E-07, 2.07186729994646E-07},
+ { 2.42559636376427E-07, 2.43568607061206E-07, 4.85119102222598E-07, 4.89155340233083E-07},
+ { 3.41515232094025E-07, 3.42522426421965E-07, 6.83030293657794E-07, 6.87058957282716E-07},
+ { 9.08697614931953E-08, 9.1881105390712E-08, 1.81739480353826E-07, 1.85784855943893E-07},
+ { 6.0466163631645E-08, 6.14741111348849E-08, 1.20932355684999E-07, 1.24964373071634E-07},
+ { 4.04659118657946E-07, 4.05667066161186E-07, 8.09318166261619E-07, 8.13350311545946E-07},
+ { 4.80904560618001E-07, 4.81905772176106E-07, 9.61808808597198E-07, 9.65813697462181E-07},
+ { 3.57066625156222E-08, 3.67177221960446E-08, 7.14132681878255E-08, 7.54576063854984E-08},
+ { 2.44433664420285E-08, 2.54509160413363E-08, 4.88867044623476E-08, 5.29170023355618E-08},
+ { 3.61392153536144E-07, 3.62384142249539E-07, 7.22784136542032E-07, 7.26752162449884E-07},
+ { 7.03945403301987E-07, 7.04847309407342E-07, 1.40789144609244E-06, 1.41149810417573E-06},
+ { 7.91276917766481E-07, 7.91866199278957E-07, 1.58255338078561E-06, 1.58491059210064E-06},
+ { 2.80934472129957E-07, 2.81945006008755E-07, 5.61869072157606E-07, 5.65911307148781E-07},
+ { 3.5339049020422E-07, 3.54394444457284E-07, 7.06780582504507E-07, 7.10797138481212E-07},
+ { 2.44327040377357E-07, 2.4533331099974E-07, 4.88653867591893E-07, 4.9267929114194E-07},
+ { 2.6145809783884E-07, 2.62465945866097E-07, 5.22915939882296E-07, 5.26947090406793E-07},
+ { 2.21305654690696E-07, 2.22233921931547E-07, 4.42615530005241E-07, 4.46329210035401E-07},
+ { 7.88202072499189E-08, 7.98287089764926E-08, 1.5764054239753E-07, 1.61674222454167E-07},
+ { 4.08582224054044E-07, 4.09593170047629E-07, 8.17164746536037E-07, 8.21208203660717E-07},
+ { 2.61692591152496E-07, 2.62703764519756E-07, 5.23385125461573E-07, 5.27429577346084E-07},
+ { 2.01361032736713E-07, 2.0236487330294E-07, 4.02722207581974E-07, 4.06737527214318E-07},
+ { 6.18118889406105E-08, 6.28143510539303E-08, 1.23623692616093E-07, 1.27633413171679E-07},
+ { 5.01939382502314E-07, 5.02932437029813E-07, 1.00387870816121E-06, 1.00785118206659E-06},
+ { 6.52623768360172E-07, 6.53615401802199E-07, 1.30525545216642E-06, 1.30922269647726E-06},
+ { 3.24414514807359E-07, 3.25418923807774E-07, 6.48829413307794E-07, 6.52846509296978E-07},
+ { 1.65468009072356E-07, 1.66476610274913E-07, 3.30936202885823E-07, 3.34970451376648E-07},
+ { 5.23240828442795E-09, 6.24356744083343E-09, 1.04648165688559E-08, 1.45333485717657E-08},
+ { 3.62318644420156E-07, 3.63320253882193E-07, 7.24637303051168E-07, 7.28643442471366E-07},
+ { 5.94340193060816E-07, 5.95350627463631E-07, 1.18868054244103E-06, 1.19272210952204E-06},
+ { 7.32884174681203E-07, 7.33866755808776E-07, 1.46576839199497E-06, 1.46969848913159E-06},
+ { 3.02247087802243E-07, 3.0325044519941E-07, 6.04493862965683E-07, 6.08507960464522E-07},
+ { 3.23513106081919E-07, 3.24517259286949E-07, 6.47026212163837E-07, 6.51042981303362E-07},
+ { 2.82636392512359E-07, 2.83643203147221E-07, 5.65272713970444E-07, 5.6930015546186E-07},
+ { 5.57109984811177E-08, 5.67222713243609E-08, 1.11422096438218E-07, 1.15467202022046E-07},
+ { 1.69497056390355E-07, 1.70405499488879E-07, 3.38994169624129E-07, 3.42627942018225E-07},
+ { 4.37937046626757E-08, 4.4801083731727E-08, 8.75873382710779E-08, 9.16166129627527E-08},
+ { 3.69329029581422E-08, 3.79310165499192E-08, 7.38645837827789E-08, 7.78570665715961E-08},
+ { 5.61418005418091E-08, 5.71532154935994E-08, 1.12283629505328E-07, 1.16328905619412E-07},
+ { 2.30063292860905E-07, 2.31069662959271E-07, 4.60126457824117E-07, 4.64152151380404E-07},
+ { 1.53257730062251E-07, 1.54239160110592E-07, 3.06515318015954E-07, 3.10441222950431E-07},
+ { 7.43983150641725E-08, 7.54085220933121E-08, 1.4879661591749E-07, 1.52837202449518E-07},
+ { 3.73331090486317E-08, 3.83436145057203E-08, 7.46662180972635E-08, 7.87081404496348E-08},
+ { 1.35055771011139E-07, 1.36057437316595E-07, 2.70111300437748E-07, 2.74118391985212E-07},
+ { 1.49921490333327E-07, 1.50926723563316E-07, 2.99842824347252E-07, 3.03863657791226E-07},
+ { 5.4672608484907E-07, 5.47715472976051E-07, 1.09345225496327E-06, 1.09740931009128E-06},
+ { 6.82862975054377E-08, 6.92914738920081E-08, 1.3657287922797E-07, 1.40593087394336E-07},
+ { 2.99415603421949E-08, 3.09528473962928E-08, 5.9883106473535E-08, 6.39284820636021E-08},
+ { 1.15991221605327E-06, 1.16091044333189E-06, 2.31982436105227E-06, 2.32381808018545E-06},
+ { 5.37620522322868E-07, 5.38598712296334E-07, 1.07524111570001E-06, 1.07915387559387E-06},
+ { 2.19138769352867E-08, 2.29165522114272E-08, 4.38277680814281E-08, 4.78386539271014E-08},
+ { 2.25320761160219E-07, 2.26330556074572E-07, 4.50641536531293E-07, 4.54680815664688E-07},
+ { 1.01003628572016E-06, 1.01100829397183E-06, 2.02007224459066E-06, 2.02395995074767E-06},
+ { 4.75155772505786E-07, 4.76152848705169E-07, 9.50311530800718E-07, 9.5429980717654E-07},
+ { 1.65787653827465E-07, 1.66797761380622E-07, 3.31575222389802E-07, 3.35615951030377E-07},
+ { 2.30222070740638E-07, 2.31232661462855E-07, 4.60444127270421E-07, 4.64487072804332E-07},
+ { 7.98883817765272E-07, 7.99890472080733E-07, 1.59776760710884E-06, 1.60179418173811E-06},
+ { 1.04933420175257E-07, 1.05940515027214E-07, 2.0986679771795E-07, 2.13895532397146E-07},
+ { 1.77967848458138E-06, 1.78066323996973E-06, 3.55935688389764E-06, 3.56329583439674E-06},
+ { 4.1623603408425E-07, 4.17224313764564E-07, 8.3247203974679E-07, 8.36425286365738E-07},
+ { 9.68960307545785E-08, 9.78908332172068E-08, 1.93792118352576E-07, 1.97771228727106E-07},
+ { 2.7254995416115E-07, 2.73529721539489E-07, 5.45099553050932E-07, 5.49018324136341E-07},
+ { 4.01288005491551E-07, 4.02259715315267E-07, 8.02576039404812E-07, 8.06462495006599E-07},
+ { 1.35055771011139E-07, 1.36057437316595E-07, 2.70111300437748E-07, 2.74118391985212E-07},
+ { 4.29554916081543E-08, 4.39544862729235E-08, 8.59111395357104E-08, 8.99071466164969E-08},
+ { 1.76189836054164E-06, 1.76286511077706E-06, 3.52380727974833E-06, 3.52767503386531E-06},
+ { 1.41602981784672E-07, 1.42607618158763E-07, 2.83206148310455E-07, 2.87224651174256E-07},
+ { 1.15380575493873E-06, 1.15479357987169E-06, 0.000002307610870389, 2.31156330698923E-06},
+ { 1.41356807148441E-07, 1.42356668675347E-07, 2.82713486399189E-07, 2.86713202513056E-07},
+ { 6.45327844495114E-08, 6.55440999253187E-08, 1.29065526266459E-07, 1.33110816591397E-07},
+ { 6.86342787048488E-08, 6.96456083915109E-08, 1.37268628463971E-07, 1.41313861945491E-07},
+ { 1.83265086661777E-07, 1.84274682624164E-07, 3.66530358064665E-07, 3.70568429275409E-07},
+ { 1.43990902756741E-07, 1.44994970696644E-07, 2.87981706037499E-07, 2.91998276225058E-07},
+ { 1.02871865692578E-07, 1.03880751112229E-07, 2.05743802439429E-07, 2.09779301485469E-07},
+ { 1.36728246502571E-07, 1.37673012545747E-07, 2.7345657827027E-07, 2.77235542966991E-07},
+ { 3.10800132297118E-07, 3.11808250330614E-07, 6.21600349859364E-07, 6.25632381456853E-07},
+ { 1.32283005882528E-07, 1.33261437440524E-07, 2.64565414909157E-07, 2.68479169562852E-07},
+ { 3.33188367562798E-07, 3.34195561890738E-07, 6.66376735125596E-07, 6.70405427172227E-07},
+ { 1.90134230138028E-07, 1.91139307048616E-07, 3.80268787125715E-07, 3.8428883897268E-07},
+ { 3.02247087802243E-07, 3.0325044519941E-07, 6.04493862965683E-07, 6.08507960464522E-07},
+ { 6.45327844495114E-08, 6.55440999253187E-08, 1.29065526266459E-07, 1.33110816591397E-07},
+ { 4.02965838475211E-08, 4.13054976888816E-08, 8.05931534841875E-08, 8.46289225364671E-08},
+ { 5.11229515609557E-07, 5.12224545445861E-07, 1.02245836330894E-06, 1.02643905108835E-06},
+ { 1.18189390718726E-07, 1.19196172931879E-07, 2.36378838280871E-07, 2.40405839235791E-07},
+ { 3.81603527443986E-07, 3.82614828708938E-07, 7.63207339105065E-07, 7.67251918887268E-07},
+ { 3.34147500780091E-08, 3.43787576184695E-08, 6.67881465687969E-08, 7.06435514530313E-08},
+ { 3.4107115709503E-07, 3.42081634130409E-07, 6.82142385244333E-07, 6.86184307596704E-07},
+ { 1.58899425173331E-07, 1.59907060037767E-07, 3.17798821924953E-07, 3.21829773497484E-07},
+ { 5.36395234007614E-07, 5.37394143407255E-07, 1.07279079486489E-06, 1.07678548033618E-06},
+ { 3.9406657492691E-07, 3.95064475355866E-07, 7.88133220908094E-07, 7.92124779991354E-07},
+ { 2.77072558674263E-07, 2.78073869708351E-07, 5.54145316300492E-07, 5.58150745177954E-07},
+ { 3.93172285839682E-07, 3.94176680629243E-07, 7.8634455746851E-07, 7.90362207681028E-07},
+ { 2.85718613213248E-07, 2.86716215214256E-07, 5.71436899576838E-07, 5.75428146021295E-07},
+ { 1.26677917933193E-07, 1.27688309703444E-07, 2.5335566533613E-07, 2.57397502423373E-07},
+ { 8.70625598281549E-08, 8.80735200325944E-08, 1.74125048602036E-07, 1.7816884678723E-07},
+ { 9.37471753559294E-08, 9.47451752608686E-08, 1.87494393344423E-07, 1.91486549283582E-07},
+ { 3.30706200202258E-08, 3.40820349720161E-08, 6.61412968838704E-08, 7.01866440522281E-08},
+ { 9.30588299752344E-08, 9.40660100923196E-08, 1.86117645739614E-07, 1.90146408840519E-07},
+ { 3.83720646368602E-08, 3.9382058503179E-08, 7.67441576954297E-08, 8.07838489436108E-08},
+ { 3.12277990133225E-07, 3.13278405883466E-07, 6.2455600868816E-07, 6.28557373261174E-07},
+ { 2.62851173715717E-07, 2.63860243876479E-07, 5.25702404274853E-07, 5.29738812815594E-07},
+ { 6.38404742403509E-08, 6.48505391609433E-08, 1.27680962691556E-07, 1.3172102342196E-07},
+ { 7.73673903609051E-07, 7.74670056102877E-07, 1.54734770774212E-06, 1.55133201928948E-06},
+ { 2.23658261688797E-07, 2.24661988568187E-07, 4.47316281793064E-07, 4.51331573003699E-07},
+ { 3.18664490350784E-07, 3.19664522407948E-07, 6.37329037544987E-07, 6.41328341544067E-07},
+ { 6.28178327133355E-08, 6.38285229115354E-08, 1.25635679637526E-07, 1.29678596749727E-07},
+ { 2.14196546721723E-07, 2.15193523445123E-07, 4.28392880280626E-07, 4.32381142445593E-07},
+ { 2.53436667208007E-08, 2.63544563949836E-08, 5.06872623873278E-08, 5.47306626685895E-08},
+ { 1.79067058070359E-07, 1.80076483502489E-07, 3.58134101929863E-07, 3.62171505230435E-07},
+ { 1.14243619009358E-08, 1.24315846505851E-08, 2.28486385367432E-08, 2.69068462005454E-08},
+ { 1.62669806513804E-08, 1.72783103380425E-08, 3.25339186701967E-08, 3.65793084711186E-08},
+ { 2.55726050113481E-07, 2.56733443393387E-07, 5.11451958118414E-07, 5.15481701768294E-07},
+ { 6.74249776011493E-08, 6.84268144368616E-08, 1.34849770461187E-07, 1.38856961484635E-07},
+ { 6.02680273686929E-07, 6.03684966904439E-07, 1.20536046210873E-06, 1.20937964709356E-06},
+ { 1.45373832083351E-07, 1.46384664390098E-07, 2.90747806275249E-07, 2.94791007604545E-07},
+ { 3.46929951433594E-07, 3.4793785630427E-07, 6.93859675493513E-07, 6.9789133760878E-07},
+ { 2.86301002461187E-07, 2.87301332946299E-07, 5.72601834392117E-07, 5.76603540025644E-07},
+ { 8.92922287221154E-08, 9.02999346408251E-08, 1.78584627974487E-07, 1.82615082167104E-07},
+ { 1.61394524411662E-07, 1.62388303692751E-07, 3.22789020401615E-07, 3.26764009628278E-07},
+ { 3.15667904260408E-07, 3.16657960297562E-07, 6.31335680623124E-07, 6.35296956374987E-07},
+ { 3.65886961617434E-07, 3.66888201597249E-07, 7.31774122186835E-07, 7.35779138949511E-07},
+ { 5.1565010039667E-08, 5.25749044300028E-08, 1.03130020079334E-07, 1.07168872887087E-07},
+ { 2.49045257305625E-07, 2.50053105332881E-07, 4.98090642508942E-07, 5.02122333045918E-07},
+ { 3.89293546732006E-07, 3.90250974646733E-07, 7.78586866090336E-07, 7.82417473033092E-07},
+ { 1.28008643685007E-07, 1.29012775573756E-07, 2.56017258948305E-07, 2.60033857557573E-07},
+ { 3.59406385541661E-07, 3.60415128852765E-07, 7.18812870559304E-07, 7.2284757379748E-07},
+ { 7.04774407722653E-08, 7.14837113946487E-08, 1.40955009442223E-07, 1.44979907190645E-07},
+ { 4.69074876718878E-08, 4.79159325550427E-08, 9.38164674835207E-08, 9.78508154503288E-08},
+ { 3.46929951433594E-07, 3.4793785630427E-07, 6.93859675493513E-07, 6.9789133760878E-07},
+ { 2.52614157147946E-07, 2.5362039934862E-07, 5.05228484826148E-07, 5.09253013092348E-07},
+ { 1.752849669856E-07, 1.76295728238074E-07, 3.50569891338637E-07, 3.54612936348531E-07},
+ { 9.97295472870974E-08, 1.00740251696152E-07, 1.99459023519921E-07, 2.03501656415028E-07},
+ { 1.27083694678731E-08, 1.37173685743619E-08, 2.54168952551481E-08, 2.94820375698493E-08},
+ { 2.88675792603499E-07, 2.89683143250841E-07, 5.77351315200758E-07, 5.81380774633544E-07},
+ { 2.2199529325917E-07, 2.22990578890858E-07, 4.43990884946288E-07, 4.47971643779965E-07},
+ { 3.101136769601E-08, 3.20127782060808E-08, 6.20226217051822E-08, 6.60284200648675E-08},
+ { 6.34119317055593E-08, 6.44227355905969E-08, 1.26823891832828E-07, 1.30867206848961E-07},
+ { 2.27363642579803E-07, 2.28347417419172E-07, 4.54726489351742E-07, 4.5866131870298E-07},
+ { 5.761698673723E-08, 5.86278900982506E-08, 1.15233817155058E-07, 1.19277274279739E-07},
+ { 5.59963240220895E-08, 5.70068436900328E-08, 1.11992690676743E-07, 1.16034897246209E-07},
+ { 1.00404065506154E-07, 1.01413306197173E-07, 2.00808131012309E-07, 2.04845150619803E-07},
+ { 1.51791383018463E-07, 1.52801391095636E-07, 3.03582666560942E-07, 3.07622912032457E-07},
+ { 7.73673903609051E-07, 7.74670056102877E-07, 1.54734770774212E-06, 1.55133201928948E-06},
+ { 6.7849948948151E-07, 6.79496110933542E-07, 1.35699917791499E-06, 1.36098604741619E-06},
+ { 6.46773514745291E-08, 6.56873169191385E-08, 1.29354639000212E-07, 1.33394671308906E-07},
+ { 2.14274791687785E-07, 2.15266346970111E-07, 4.28549661535271E-07, 4.32515697923463E-07},
+ { 1.75431694060535E-07, 1.76439094445868E-07, 3.50863423648207E-07, 3.54893018084113E-07},
+ { 1.54840201105344E-07, 1.55849093630422E-07, 3.09680387999833E-07, 3.13715879940446E-07},
+ { 3.03876547036452E-07, 3.04886683011318E-07, 6.07753179338033E-07, 6.11793765870061E-07},
+ { 2.87581904956369E-07, 2.88585042085288E-07, 5.7516393781043E-07, 5.79176422377259E-07},
+ { 2.4641536811032E-08, 2.56472958426457E-08, 4.92830878329187E-08, 5.33060031671084E-08},
+ { 2.38351063330811E-08, 2.48459812723922E-08, 4.76701984553074E-08, 5.17136911071248E-08},
+ { 5.06429515212403E-07, 5.07291815665667E-07, 1.01285916542793E-06, 1.0163081114456E-06},
+ { 3.16136237188402E-08, 3.26210596313103E-08, 6.32272758593899E-08, 6.72569697712788E-08},
+ { 3.48408235595343E-08, 3.58516203391446E-08, 6.96816471190687E-08, 7.37248200266549E-08},
+ { 7.48174926457068E-08, 7.58264846467682E-08, 1.49634963975132E-07, 1.5367105987707E-07},
+ { 1.93732120123968E-07, 1.94739627090712E-07, 3.87464289985928E-07, 3.9149432495833E-07},
+ { 3.07901757423679E-08, 3.17564925467195E-08, 6.17883486597748E-08, 6.55261729320955E-08},
+ { 4.99771878992306E-07, 5.00766930144891E-07, 9.99543672719483E-07, 1.00352374943213E-06},
+ { 1.17716950853719E-07, 1.18722240927127E-07, 2.35433859074874E-07, 2.39455012263079E-07},
+ { 3.58876590667023E-08, 3.6895563937378E-08, 7.17753749768235E-08, 7.58068807726886E-08},
+ { 4.9829156978376E-07, 4.99225798478165E-07, 9.96582841139571E-07, 1.0003212125298E-06},
+ { 3.75331644875132E-07, 3.76332543794433E-07, 7.50663197379708E-07, 7.54666956481742E-07},
+ { 2.08074482088705E-08, 2.18164970533508E-08, 4.16148893123136E-08, 4.56511770607904E-08},
+ { 2.65227200202389E-08, 2.75340639177557E-08, 5.30454471459052E-08, 5.70908014196903E-08},
+ { 9.48590397342741E-08, 9.57736716600266E-08, 1.89718221577095E-07, 1.93376600066131E-07},
+ { 1.26375994113914E-08, 1.36486946189507E-08, 2.52751917173555E-08, 2.93195441258831E-08},
+ { 1.50946419807951E-07, 1.51955084959354E-07, 3.01892768561629E-07, 3.05927514432369E-07},
+ { 9.22171139450256E-08, 9.32281949417302E-08, 1.84434327366034E-07, 1.88478459506314E-07},
+ { 9.69194388744654E-07, 9.70171512904017E-07, 1.93838912565525E-06, 1.94229757255471E-06},
+ { 5.55253905076825E-08, 5.65363365012672E-08, 1.11050773909938E-07, 1.15094508146285E-07},
+ { 1.13003537194345E-07, 1.13988456007519E-07, 2.26006307002535E-07, 2.29945861462966E-07},
+ { 1.2296865747885E-07, 1.23975510746277E-07, 2.45937201270863E-07, 2.49964827503391E-07},
+ { 4.48469990033118E-08, 4.58578668371956E-08, 8.96939909011962E-08, 9.37375403964325E-08},
+ { 5.0952010610672E-08, 5.19609670845966E-08, 1.01904042537626E-07, 1.05939804484478E-07},
+ { 4.86714952785405E-08, 4.96825975915272E-08, 9.73430047679358E-08, 1.01387534812147E-07},
+ { 7.39467296284602E-08, 7.49580095771307E-08, 1.47893480573202E-07, 1.51938643000449E-07},
+ { 1.0657652893542E-07, 1.07576717311986E-07, 2.13153157346824E-07, 2.17153882431376E-07},
+ { 2.98015478961133E-08, 3.08124867842707E-08, 5.96030602650899E-08, 6.36467447634459E-08},
+ { 4.8263878227317E-07, 4.83640725690293E-07, 9.65278132980529E-07, 9.69288855401373E-07},
+ { 3.14623996189312E-07, 3.15605028333721E-07, 6.29259531592652E-07, 6.33185010201487E-07},
+ { 2.29475041635396E-07, 2.30466028483534E-07, 4.5895009037622E-07, 4.62914151455607E-07},
+ { 4.36916394619402E-07, 4.37877190506697E-07, 8.7382976232675E-07, 8.77673194565887E-07},
+ { 4.38233769273211E-08, 4.4833392109922E-08, 8.76467751709242E-08, 9.16867648470543E-08},
+ { 1.28198685445113E-07, 1.29205858456771E-07, 2.56397569842193E-07, 2.60425942144593E-07},
+ { 1.72098651773922E-07, 1.73105441092503E-07, 3.44197339074981E-07, 3.48224730828406E-07},
+ { 1.79612058559542E-08, 1.79676149514307E-08, 3.59441060869162E-08, 3.59159741947224E-08}
+ };
+
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P> polygon;
+
+ int const n = sizeof(testcases) / sizeof(testcases[0]);
+ int const ne = sizeof(expectations) / sizeof(expectations[0]);
+ BOOST_ASSERT(n == ne);
+
+ boost::ignore_unused(n, ne);
+
+ bg::strategy::buffer::join_miter join_miter;
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::end_flat end_flat;
+ bg::strategy::buffer::end_round end_round(100);
+
+ // Aimes tested originally with 0.000018 degrees (around 2 m)
+ ut_settings settings;
+ settings.use_ln_area = true;
+ settings.tolerance = 0.001;
+
+ int expectation_index = 0;
+ for (int width = 18; width <= 36; width += 18, expectation_index += 2)
+ {
+ double aimes_width = static_cast<double>(width) / 1000000.0;
+ for (int i = 0; i < n; i++)
+ {
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) && ! defined(BOOST_GEOMETRY_TEST_FAILURES)
+ if (i > 10)
+ {
+ // Several cases (11,20,40 etc) are still reported as invalid
+ settings.test_validity = false;
+ }
+#endif
+ std::ostringstream name;
+ try
+ {
+ name << "aimes_" << i << "_" << width;
+ test_one<linestring, polygon>
+ (
+ name.str(), testcases[i], join_miter, end_flat,
+ expectations[i][expectation_index],
+ aimes_width, settings
+ );
+ test_one<linestring, polygon>
+ (
+ name.str(), testcases[i], join_round, end_round,
+ expectations[i][expectation_index + 1],
+ aimes_width, settings
+ );
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception: " << e.what() << " in " << name.str() << std::endl;
+ }
+ }
+ }
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_aimes<bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_linestring.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_linestring.cpp
new file mode 100644
index 000000000..45f4cbea8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_linestring.cpp
@@ -0,0 +1,226 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+static std::string const simplex = "MULTILINESTRING((0 0,4 5),(5 4,10 0))";
+static std::string const two_bends = "MULTILINESTRING((0 0,4 5,7 4,10 6),(1 5,5 9,8 6))";
+static std::string const turn_inside = "MULTILINESTRING((0 0,4 5,7 4,10 6),(1 5,5 9,8 6),(0 4,-2 6))";
+
+static std::string const bend_near_start1 = "MULTILINESTRING((10 0,11 0,15 2),(9 0,8 0,4 2))";
+static std::string const bend_near_start2 = "MULTILINESTRING((10 0,11 0,12 1.5,15 3),(9 0,8 0,7 1.5,4 3))";
+
+static std::string const degenerate0 = "MULTILINESTRING()";
+static std::string const degenerate1 = "MULTILINESTRING((5 5))";
+static std::string const degenerate2 = "MULTILINESTRING((5 5),(9 9))";
+static std::string const degenerate3 = "MULTILINESTRING((5 5),(9 9),(4 10))";
+static std::string const degenerate4 = "MULTILINESTRING((5 5,5 5),(9 9,9 9,10 10,9 9,9 9,9 9),(4 10,4 10,3 11,4 12,3 11,4 10,4 10))";
+
+static std::string const crossing = "MULTILINESTRING((0 0,10 10),(10 0,0 10))";
+
+static std::string const mikado1 = "MULTILINESTRING((-2 0,-17 -11,3.7142857142857144125969171000179 -2.4285714285714283811046243499732),(11.406143344709896325639419956133 0.75426621160409546007485914742574,12 1,11.403846153846153299582510953769 0.75),(4.25 -2.25,-19 -12,-1 0))";
+static std::string const mikado2 = "MULTILINESTRING((-6.1176470588235289937983907293528 -12.696078431372548322997317882255,-6.116279069767442067018237139564 -12.697674418604652402109422837384),(-1.8000000000000007105427357601002 -1.6000000000000000888178419700125,-9.7619047619047627506461140001193 -1.238095238095238137532305700006),(-10.537366548042705005627794889733 -1.2028469750889678735461529868189,-10.567164179104477028658948256634 -1.201492537313432862333684170153),(1.9041095890410959512450972397346 3.4931506849315070439843111671507,-7 1,-7 -4),(-5.540540540540540348501963308081 -5.459459459459459651498036691919,-1.521739130434782261147574899951 -1.2173913043478261641894278000109),(1.2040816326530612290213184678578 2.530612244897959328682190971449,-6.288135593220339103481819620356 -4.711864406779660896518180379644),(-8.4018691588785046064913331065327 -6.755140186915888023122533923015,-8.4131455399061039202024403493851 -6.7660406885758996864410619309638),(-2 5,-12 12,-11.088000000000000966338120633736 0.14400000000000012789769243681803),(-10.720812182741116913575751823373 -0.80456852791878175068518430634867,-10.696969696969697238841945363674 -0.78787878787878784514475682954071),(-10.411764705882353254651206952985 -0.58823529411764707841570043456159,0.11913357400722013323957071406767 6.7833935018050537379963316197973),(-1.5283018867924527128820955113042 -1.2264150943396234794136034906842,1.1922525107604009519945975625888 6.1190817790530829256567812990397),(0.33490011750881265584212087560445 6.6498237367802577324482626863755,-11.548480463096961301516785169952 1.3335745296671497328588884556666))";
+static std::string const mikado3 = "MULTILINESTRING((1 18,4.0559006211180124168436122999992 7.8136645962732922399140989000443),(6.7243816254416959310447055031545 -1.0812720848056533995418249105569,7 -2,7 -8,14 3.6666666666666669627261399000417),(15.297872340425531234586742357351 5.8297872340425538340014099958353,16 7,15.214285714285713524418497399893 5.8445378151260509724806979647838),(13.685863874345550073030608473346 3.5968586387434555717845796607435,-1 -18,-3.7900797165633304253162805252941 -11.117803365810452476125647081062),(-11.540540540540540348501963308081 8,-16 19,8 14),(1 -10,6.5999999999999996447286321199499 -1.200000000000000177635683940025),(11.5 6.5,15 12),(19 10,11.564231738035264385189293534495 6.4886649874055422060337150469422),(-13.438785504407443127661281323526 -5.3183153770812925387190261972137,-17 -7,-12.970074812967581578959652688354 -7.7556109725685784539450651209336),(-2.3532338308457703135445626685396 -9.7462686567164187323442092747428,-1 -10,12.285714285714286475581502600107 3.2857142857142864755815026001073),(14.90000000000000035527136788005 5.9000000000000003552713678800501,15 6,14.893004115226338157640384451952 5.9012345679012341292946075554937),(11.987804878048780921062643756159 3.2195121951219514144781896902714,-11 -18),(-12.210826210826210669324609625619 -11.703703703703702387883822666481,-15 -15,-11.463576158940396609864365018439 -15.589403973509934786534358863719),(-8.9189189189189193029960733838379 -16.013513513513512265262761502527,-3 -17,-7.0297239915074314353660156484693 -14.210191082802548834251865628175),(-12.450511945392491952588898129761 -10.457337883959045399251408525743,-16 -8,-12.923076923076923350208744523115 -8),(-0.52380952380952372493538859998807 -8,18 -8),(2 -19,-2.2961165048543685784920853620861 -9.6917475728155331182733789319173),(6.0463576158940393057150686217938 -1.7284768211920527036795647291001,7 -3,6.4482758620689653028534848999698 -1.3448275862068967967388744000345),(-1.3333333333333339254522798000835 8,4 16,2.9090909090909091716525836091023 8),(0.64705882352941168633719826175366 -6.8823529411764710062016092706472,-3 -16))";
+static std::string const mikado4 = "MULTILINESTRING((-15 2,-15 -17,-6 11,-1.9358288770053475591481628725887 10.572192513368984023713892383967),(2.1545064377682408007785852532834 10.14163090128755406738036981551,6.87603305785123986026974307606 9.6446280991735537924114396446384),(8.4810810810810810522752944962122 9.475675675675674369813350494951,13 9),(-15 0,-8 9,-2.9850746268656713766631582984701 4.4865671641791049495395782287233),(-1.8235294117647056211239942058455 3.4411764705882355031008046353236,-1.1428571428571423496123315999284 2.8285714285714291804652020800859),(1.2307692307692308375521861307789 0.69230769230769229061195346730528,1.2857142857142858094476878250134 0.64285714285714290472384391250671,2 0,1.9459459459459460539676456392044 0.51351351351351348650808859019889),(1.908127208480565384363103476062 0.87279151943462895957281943992712,1.9078014184397162900097555393586 0.87588652482269502286271745106205),(1.4685990338164249813246442499803 5.0483091787439615671928550000302,0.63551401869158885560295857430901 12.962616822429906093816498469096,0 19,2.9565217391304345895264304999728 8.6521739130434784925682834000327),(0 19,3.4942528735632185643567027000245 6.770114942528735468840750399977),(4.75 2.375,5.2427184466019420838733822165523 0.65048543689320226235395239200443),(5.5384615384615383248956277384423 -0.38461538461538458122390693461057,5.7358490566037731994697423942853 -1.0754716981132084185901476303115),(5.9777777777777778567269706400111 -1.9222222222222207221875578397885,6.867052023121386739035187929403 -5.0346820809248553629799971531611,10 -16,-14 -19,-12 -12),(0 10,1.9476439790575916788384347455576 5.4554973821989527493769855936989),(-4 1,-4.2790697674418600726653494348284 0.16279069767441856075862460784265))";
+
+static std::string const mysql_2015_04_10a = "MULTILINESTRING((-58 19, 61 88),(1.922421e+307 1.520384e+308, 15 42, 89 -93,-89 -22),(-63 -5, -262141 -536870908, -3 87, 77 -69))";
+static std::string const mysql_2015_04_10b = "MULTILINESTRING((-58 19, 61 88), (-63 -5, -262141 -536870908, -3 87, 77 -69))";
+
+static std::string const mysql_2015_09_08a = "MULTILINESTRING((7 -4, -3 -5), (72057594037927936 15, 72057594037927940 70368744177660, 32771 36028797018963964, 8589934589 2305843009213693953, 7 2, 9.300367e+307 9.649737e+307, -4092 -274877906946, 5 10, -3 4))";
+static std::string const mysql_2015_09_08b = "MULTILINESTRING((-9 -10, 0 -1, 5 -10, -6 7, -7 7, 5.041061e+307 9.926906e+307, 6.870356e+307 1.064454e+307, 35184372088830 288230376151711743, 183673728842483250000000000000000000000.000000 244323751784861950000000000000000000000.000000), (-23530 -7131, -6 1, 1 1, 2 -6, 32766 -4194302, -4 -6), (134217725 0, 50336782742294697000000000000000000000.000000 36696596077212901000000000000000000000.000000, 7434 16486, 3.025467e+307 8.926790e+307), (2147483646 67108868, 71328904281592545000000000000000000000.000000 225041650340452780000000000000000000000.000000, -7 4, 1.667154e+307 3.990414e+307))";
+
+static std::string const mysql_23023665_1 = "MULTILINESTRING((-5 15, 7 15, 19 -10, -11 -2),(2 13, 2 -9))";
+
+static std::string const touching1 = "MULTILINESTRING((-5 15, 9 15),(2 13, 2 0),(-4 14.75,-4 13),(8 15.25,8 13),(1.5 1,-1 1),(2.25 4,5 4))";
+static std::string const touching2 = "MULTILINESTRING((-5 15, 9 15),(2 13, 2 0),(-11 -2,9 14))";
+
+static std::string const ticket_13444 = "MULTILINESTRING((-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.4931871261580 6736765.77697354280,-14943.4931871261580 6736765.77697354280,-14977.8347379614440 6736783.40904572790,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-15011.938643947820 6736805.44739563390,-15011.4855624884060 6736805.15855005480,-15044.495275804080 6736826.22277528610,-15044.636350994740 6736826.3142731870,-15044.636350994740 6736826.3142731870,-15044.636350994740 6736826.3142731870,-15044.636350994740 6736826.3142731870,-15044.636350994740 6736826.3142731870,-15044.636350994740 6736826.3142731870,-15044.636350994740 6736826.3142731870,-15059.3568953647720 6736834.30329997840,-15068.0541424639030 6736839.02352138140,-15069.4928800905110 6736839.75371170980,-15070.9534140734160 6736840.41931523480,-15087.9426162696510 6736846.96412046530,-15089.5494797231820 6736847.51131521720,-15091.1563320447620 6736848.05671593270,-15094.2349059580680 6736848.97707971370,-15335.9054238793630 6736921.18738844430000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.4931871261580 6736765.77697354280,-14943.4931871261580 6736765.77697354280,-14977.8347379614440 6736783.40904572790,-14978.1533343440550 6736783.59921684120,-14983.6129319775540 6736787.37752308510,-14985.1947819415070 6736788.51675631760,-14986.7766319054570 6736789.65598971210,-14987.9123578781710 6736790.53687736760,-14992.4552617690170 6736794.05684083610,-14998.267508417350 6736798.72501083650,-15010.441029442540 6736809.15394911820,-15011.6583859978380 6736810.19630545840,-15022.6145949955260 6736819.58290076720,-15059.7358046474820 6736849.75929930060,-15061.0431630110740 6736850.7029863410,-15062.3505213746680 6736851.644879410,-15070.4409770615170 6736856.86027784460,-15087.1738995260860 6736866.37430707270,-15088.6108003810950 6736867.09552943430,-15095.9473782124990 6736870.45405826350,-15104.0074102825180 6736873.63317977920,-15116.207314027020 6736878.44671658990,-15123.8358828827350 6736880.87232399170,-15134.5288992083770 6736884.24879940230,-15180.7309406607860 6736898.17991495970000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.4931871261580 6736765.77697354280,-14943.4931871261580 6736765.77697354280,-14977.8347379614440 6736783.40904572790,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-15011.938643947820 6736805.44739563390,-15011.4855624884060 6736805.15855005480,-15044.495275804080 6736826.22277528610,-15044.636350994740 6736826.3142731870,-15045.8532288762310 6736827.08752021570,-15074.3737944831540 6736845.21847973950,-15077.090034585930 6736846.94438557510,-15078.4820514222590 6736847.81092678480,-15078.071961550180 6736847.56872581780,-15087.3648458486150 6736853.06579258570,-15090.2635942565180 6736854.6786728650,-15097.9514630049710 6736858.31707360780,-15103.8265161100060 6736861.09610959050,-15130.264249516680 6736873.60626847480,-15134.7519500720480 6736875.32141580710,-15146.8630765226570 6736879.66849063620,-15194.4412940478560 6736894.61146595520,-15195.9796069589630 6736895.07075342350000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.4931871261580 6736765.77697354280,-14943.4931871261580 6736765.77697354280,-14977.8347379614440 6736783.40904572790,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-15011.938643947820 6736805.44739563390,-15011.4855624884060 6736805.15855005480,-15044.495275804080 6736826.22277528610,-15044.636350994740 6736826.3142731870,-15045.8532288762310 6736827.08752021570,-15074.3737944831540 6736845.21847973950,-15077.090034585930 6736846.94438557510,-15078.4820514222590 6736847.81092678480,-15078.071961550180 6736847.56872581780,-15078.071961550180 6736847.56872581780,-15078.071961550180 6736847.56872581780,-15078.071961550180 6736847.56872581780,-15078.071961550180 6736847.56872581780,-15078.071961550180 6736847.56872581780,-15078.071961550180 6736847.56872581780,-15082.7943681199050 6736849.88488502430,-15097.5442785716020 6736857.11683175990,-15106.6291957973660 6736860.3533587540,-15108.2275099140060 6736860.85390822030,-15125.8089540650780 6736866.36354256610,-15127.375820425570 6736866.840769290,-15215.2540981133260 6736893.00754821770,-15218.3352769027190 6736893.92791708470,-15437.0992937759950 6736959.30128452830,-15461.7487574869660 6736966.66788661480,-15515.650723588680 6736982.80231144560,-15574.1728604397850 6737000.31823665460,-15594.0923367237140 6737006.20472987550,-15710.5446690337120 6737040.61236372680,-15712.0936018242430 6737041.03398283110,-15734.2281022037190 6737046.24412034730,-15742.1332777301140 6737048.10462824910,-15743.8434568030350 6737048.30018792950,-15748.6193127583390 6737048.65262600970000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14943.4931871261580 6736765.77697354280,-14943.4931871261580 6736765.77697354280,-14977.8347379614440 6736783.40904572790,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-14978.1533343440550 6736783.59921684120,-15011.938643947820 6736805.44739563390,-15011.4855624884060 6736805.15855005480,-15011.4855624884060 6736805.15855005480,-15011.4855624884060 6736805.15855005480,-15011.4855624884060 6736805.15855005480,-15011.4855624884060 6736805.15855005480,-15011.4855624884060 6736805.15855005480,-15011.4855624884060 6736805.15855005480,-15024.686885240 6736812.53218883280,-15026.1816388343670 6736813.3144049160,-15030.6658773535710 6736815.65925955030,-15036.7550423671660 6736818.56027804410,-15041.3219133443780 6736820.73649111390,-15048.9609128363750 6736824.08244226970,-15050.4611878774870 6736824.67628146990,-15084.9584078886780 6736837.58108171260,-15086.4811249391280 6736838.09598240720000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.0377729478370 6736780.26763486860,-14980.0377729478370 6736780.26763486860,-14991.6555536792150 6736785.84897732640,-15011.9866671761430 6736795.61588732150,-15012.4519381197970 6736795.86346895620,-15020.770743478080 6736800.37376175450,-15022.2480644401890 6736801.17391738670,-15026.6800384584770 6736803.57797288240,-15038.4986506831680 6736809.98460484760,-15041.4533037393390 6736811.58671214340,-15058.2989705841660 6736819.98118544460,-15081.4365374991940 6736828.96412467860,-15082.9566942013570 6736829.48440706080,-15099.6784290571030 6736835.20392734280,-15104.2978317020080 6736836.58357383120,-15111.9968435314880 6736838.88358319360,-15113.5366592557220 6736839.34286751130,-15175.1290655861190 6736857.7411727840,-15252.1195734991230 6736880.73776734710,-15421.5006278668590 6736931.32583960150,-15423.0404547230450 6736931.78512913550,-15470.7754991468520 6736946.04105874990,-15498.4926942527330 6736954.32084811290,-15500.0325433728140 6736954.78013895270,-15575.3855081806230 6736977.37871549190,-15636.8689327295510 6736995.84730348080,-15638.406032258210 6736996.30839077380,-15730.631692283210 6737024.00955883970,-15733.7340329077980 6737024.91558956820,-15735.3732012775510 6737025.31388429920,-15737.0123696473070 6737025.7121790480,-15740.0858017133340 6737026.31913025120000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-14980.0377729478370 6736780.26763486860,-14980.0377729478370 6736780.26763486860,-14991.6555536792150 6736785.84897732640,-15011.9866671761430 6736795.61588732150,-15012.4519381197970 6736795.86346895620,-15012.4519381197970 6736795.86346895620,-15012.4519381197970 6736795.86346895620,-15012.4519381197970 6736795.86346895620,-15012.4519381197970 6736795.86346895620,-15012.4519381197970 6736795.86346895620,-15012.4519381197970 6736795.86346895620,-15021.625933202080 6736800.2499708710,-15023.1507875867560 6736800.96759922520,-15027.7253396088290 6736803.12227872670,-15042.7733302609810 6736809.10550915170,-15074.0109486029650 6736819.38555251160,-15075.5483598261980 6736819.84483573210,-15089.3850385714010 6736823.99094439390,-15135.5072973447730 6736837.81251791210,-15197.0045366425070 6736856.23952505740,-15275.413533166740 6736879.73487190530000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-15030.7446692891440 6736797.61627536640,-15031.1498499716740 6736797.74544842350,-15038.6298407030480 6736800.08671043440,-15040.2125700909780 6736800.58187397570,-15044.9607693867150 6736802.06915886140,-15048.1262281625750 6736803.05948622340,-15059.2053672739280 6736806.52922108490,-15060.808434732820 6736807.02797317230,-15070.4268283542390 6736810.02228038110,-15090.7124010474890 6736816.33562555160,-15093.7912866553690 6736817.2649561130,-15109.1857035628240 6736821.91519868650,-15121.5012459943460 6736825.63611227830,-15139.9829308673380 6736831.19236878680,-15292.4567809757460 6736877.02759306690,-15297.0794564136850 6736878.40904073880,-15352.5515616689190 6736894.99530161920000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-15030.7446692891440 6736797.61627536640,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15063.4394263695590 6736806.12734892960,-15077.96973686180 6736809.90028341770,-15079.4709581185830 6736810.20886396620,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15111.7280180932050 6736816.8612893540,-15111.7280180932050 6736816.8612893540,-15136.404287537560 6736822.99882040450,-15160.8745380003330 6736830.05133549120,-15177.1880420194980 6736834.75361365080,-15266.4520692562510 6736861.47645545290,-15269.4815178782760 6736862.38605624720,-15320.982200112470 6736877.84569711610,-15416.0519172795560 6736906.38250955010,-15422.1735541886120 6736908.2142799450,-15480.3290491648930 6736925.62239861490,-15523.3135120558580 6736938.44483037390,-15529.4541957297860 6736940.27660798650,-15676.8305371123480 6736984.23760042710,-15684.5052033691940 6736986.53406332340,-15705.9942844730870 6736992.96236877050,-15715.0598543713510 6736996.18818513960,-15722.6144959532430 6736998.8775624940,-15729.8982749501720 6737002.20385167190000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-15030.7446692891440 6736797.61627536640,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15063.4394263695590 6736806.12734892960,-15077.96973686180 6736809.90028341770,-15079.4709581185830 6736810.20886396620,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15123.5406969890390 6736819.20973316490,-15126.6957919203090 6736819.83765943070,-15137.7386408776670 6736822.03360766730,-15142.4712888405410 6736822.97549742090,-15186.6427180658250 6736831.75929733830,-15188.2202710974380 6736832.07326094250,-15189.7978241290440 6736832.38722456990,-15190.0044887636720 6736832.42848835510,-15222.1556839025690 6736840.72251470480,-15234.5402332864270 6736844.34835063950,-15269.996782405240 6736854.92625629810,-15379.4496123019090 6736887.58221805560,-15387.1575630864950 6736889.88224184050,-15474.9321578005460 6736916.19621079690,-15481.0917769198550 6736918.0423361780,-15541.148430687430 6736936.04611730850,-15680.1650234030040 6736978.02997740640,-15694.0778224160020 6736982.24254881030,-15695.6236827885860 6736982.71081178360,-15697.0432178030370 6736983.18086888920,-15719.1585489661970 6736991.21490258910,-15720.7032404841320 6736991.83387157130,-15723.554088115150 6736993.14357420990,-15726.4049394568230 6736994.45417464520000000000),"
+ "(-14900.3540680666540 6736752.97813679560,-14903.4321076464080 6736753.66526194570,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.5703376748190 6736754.36135745610,-14906.2786583450830 6736754.3021534560,-14906.2786583450830 6736754.3021534560,-14922.5830341660040 6736758.55049021640,-14943.1461152178110 6736765.65497725270,-14943.1461152178110 6736765.65497725270,-14980.5459018954430 6736780.45959997360,-14980.5459018954430 6736780.45959997360,-15030.7446692891440 6736797.61627536640,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15031.1498499716740 6736797.74544842350,-15063.4394263695590 6736806.12734892960,-15077.96973686180 6736809.90028341770,-15079.4709581185830 6736810.20886396620,-15112.4978702955780 6736817.01378568450,-15112.4978702955780 6736817.01378568450,-15123.5406969890390 6736819.20973316490,-15126.6957919203090 6736819.83765943070,-15137.7386408776670 6736822.03360766730,-15142.4712888405410 6736822.97549742090,-15186.6427180658250 6736831.75929733830,-15188.2202710974380 6736832.07326094250,-15189.7978241290440 6736832.38722456990,-15190.0044887636720 6736832.42848835510,-15190.0044887636720 6736832.42848835510,-15190.0044887636720 6736832.42848835510,-15190.0044887636720 6736832.42848835510,-15190.0044887636720 6736832.42848835510,-15190.0044887636720 6736832.42848835510,-15190.0044887636720 6736832.42848835510,-15221.983183219660 6736838.87281871770,-15268.3061621668480 6736848.24688855470,-15269.855061561530 6736848.63441014480,-15300.8331273788140 6736856.38484578950,-15302.3963647239070 6736856.82798435070,-15308.5770232269750 6736858.67050808390,-15393.5610720781510 6736884.00839143530,-15395.0947874942920 6736884.46947239150,-15454.9098758556520 6736902.42873865920000000000),"
+ "(-15035.8556810692230 6736780.3429856580,-15067.3888192633710 6736786.679630680,-15089.4620493951220 6736791.11456749960,-15098.9220131172680 6736793.01628063250,-15102.0753269366810 6736793.64958708270,-15102.0753269366810 6736793.64958708270,-15105.2380806489130 6736794.28289358780,-15106.8190066610910 6736794.59864982220,-15166.8942062558330 6736806.61713062690,-15195.3829901481420 6736812.31510593650,-15290.2728818098240 6736831.29463120830,-15329.8103366688590 6736839.2029293180,-15347.0557184092210 6736843.2109036660,-15351.6484711680370 6736844.44164282270,-15368.3596751999520 6736850.43566813880,-15371.3980739090370 6736851.52467590480,-15377.4497910459360 6736854.09380189050,-15380.4756551803580 6736855.37657110580,-15413.5284714028580 6736872.262497440,-15414.9655503690590 6736872.99627892490,-15443.2170790306680 6736887.49968991610,-15454.8128073709250 6736892.57876041620,-15456.2628661897430 6736893.2013100730,-15459.1629949593350 6736894.44461543950,-15471.4299019053380 6736898.62305579240,-15486.7635383708280 6736903.84745482360,-15524.6976920000360 6736915.32428000490,-15532.5896984306750 6736917.71222237870,-15543.2866888621390 6736920.94877348280,-15543.2866888621390 6736920.94877348280,-15543.2866888621390 6736920.94877348280,-15543.2866888621390 6736920.94877348280,-15543.2866888621390 6736920.94877348280,-15543.2866888621390 6736920.94877348280,-15543.1144664779570 6736920.89674465540,-15543.1144664779570 6736920.89674465540,-15569.2930703739980 6736931.11772403310000000000),"
+ "(-14999.0450639284860 6736757.94409741740,-14999.0450639284860 6736757.94409741740,-14999.0450639284860 6736757.94409741740,-14999.0450639284860 6736757.94409741740,-14998.3237136282440 6736757.80416062470,-14998.3237136282440 6736757.80416062470,-15074.4307232707360 6736785.59960193090,-15101.5656395162080 6736793.51682595350,-15101.5656395162080 6736793.51682595350,-15102.0753269366810 6736793.64958708270,-15102.0753269366810 6736793.64958708270,-15102.0753269366810 6736793.64958708270,-15102.0753269366810 6736793.64958708270,-15102.0753269366810 6736793.64958708270,-15105.2380806489130 6736794.28289358780,-15106.8190066610910 6736794.59864982220,-15166.8942062558330 6736806.61713062690,-15195.3829901481420 6736812.31510593650,-15290.2728818098240 6736831.29463120830,-15329.8103366688590 6736839.2029293180,-15347.0557184092210 6736843.2109036660,-15351.6484711680370 6736844.44164282270,-15368.3596751999520 6736850.43566813880,-15371.3980739090370 6736851.52467590480,-15377.4497910459360 6736854.09380189050,-15380.4756551803580 6736855.37657110580,-15413.5284714028580 6736872.262497440,-15414.9655503690590 6736872.99627892490,-15443.2170790306680 6736887.49968991610,-15454.8128073709250 6736892.57876041620,-15456.2628661897430 6736893.2013100730,-15459.1629949593350 6736894.44461543950,-15471.4299019053380 6736898.62305579240,-15486.7635383708280 6736903.84745482360,-15524.6976920000360 6736915.32428000490,-15532.5896984306750 6736917.71222237870,-15543.2866888621390 6736920.94877348280,-15543.2866888621390 6736920.94877348280,-15670.4529210342480 6736958.21046822050,-15675.0913147842820 6736959.22952028270,-15689.4798710369670 6736961.8112390470,-15695.8747861639310 6736962.95767313520,-15697.484822222950 6736963.16040719490,-15703.9249664590210 6736963.96775526740000000000),"
+ "(-15024.331987571450 6736740.12011628040,-15043.3966526176450 6736741.54639214930,-15098.6064446248090 6736747.23176345690,-15109.6695982572860 6736748.86256334840,-15114.2194484843550 6736749.66271390670,-15209.0076497912120 6736768.50036193520,-15329.0727003271190 6736792.35965132710,-15330.651878623290 6736792.66464307440,-15351.2999521063080 6736795.90293848980,-15398.9493695778070 6736803.37524280050,-15419.5974430608280 6736806.61354248320,-15424.1870343461050 6736807.59490003720,-15445.5403613309970 6736812.9842953617))";
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::multi_linestring<linestring> multi_linestring_type;
+ typedef bg::model::polygon<P, Clockwise> polygon;
+
+ bg::strategy::buffer::join_miter join_miter;
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::join_round_by_divide join_round_by_divide(4);
+ bg::strategy::buffer::end_flat end_flat;
+ bg::strategy::buffer::end_round end_round(100);
+
+ bg::strategy::buffer::end_round end_round32(32);
+ bg::strategy::buffer::join_round join_round32(32);
+
+ // Round joins / round ends
+ test_one<multi_linestring_type, polygon>("simplex", simplex, join_round, end_round, 49.0217, 1.5);
+ test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_round, end_round, 74.73, 1.5);
+ test_one<multi_linestring_type, polygon>("turn_inside", turn_inside, join_round, end_round, 86.3313, 1.5);
+ test_one<multi_linestring_type, polygon>("two_bends_asym", two_bends, join_round, end_round, 58.3395, 1.5, ut_settings(), 0.75);
+
+ // Round joins / flat ends:
+ test_one<multi_linestring_type, polygon>("simplex", simplex, join_round, end_flat, 38.2623, 1.5);
+ test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_round, end_flat, 64.6217, 1.5);
+
+ test_one<multi_linestring_type, polygon>("bend_near_start1", bend_near_start1, join_round, end_flat, 202.5910, 9.0);
+ test_one<multi_linestring_type, polygon>("bend_near_start2", bend_near_start2, join_round, end_flat, 231.4988, 9.0);
+
+ // TODO this should be fixed test_one<multi_linestring_type, polygon>("turn_inside", turn_inside, join_round, end_flat, 99, 1.5);
+ test_one<multi_linestring_type, polygon>("two_bends_asym", two_bends, join_round, end_flat, 52.3793, 1.5, ut_settings(), 0.75);
+
+ // This one is far from done:
+ // test_one<multi_linestring_type, polygon>("turn_inside_asym_neg", turn_inside, join_round, end_flat, 99, +1.5, ut_settings(), -1.0);
+
+ // Miter / divide joins, various ends
+ test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_round_by_divide, end_flat, 64.6217, 1.5);
+ test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_miter, end_flat, 65.1834, 1.5);
+ test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_miter, end_round, 75.2917, 1.5);
+
+ test_one<multi_linestring_type, polygon>("degenerate0", degenerate0, join_round, end_round, 0.0, 3.0);
+ test_one<multi_linestring_type, polygon>("degenerate1", degenerate1, join_round, end_round, 28.2503, 3.0);
+ test_one<multi_linestring_type, polygon>("degenerate2", degenerate2, join_round, end_round, 56.0457, 3.0);
+ test_one<multi_linestring_type, polygon>("degenerate3", degenerate3, join_round, end_round, 80.4531, 3.0);
+ test_one<multi_linestring_type, polygon>("degenerate4", degenerate4, join_round, end_round, 104.3142, 3.0);
+
+ test_one<multi_linestring_type, polygon>("crossing", crossing, join_round32, end_flat, 2628.4272, 50.0);
+ test_one<multi_linestring_type, polygon>("crossing", crossing, join_round32, end_round32, 9893.764, 50.0);
+
+ // Cases formly causing a segmentation fault because a generated side was skipped
+ // (The expected area for large distances is about R*R*PI where R is distance)
+ // Note that for large distances the flat ends (not tested here) still give weird effects
+ {
+ // The results can differ between compilers and platforms
+
+ ut_settings settings(40.0);
+
+ ut_settings settings10 = settings;
+ settings10.tolerance *= 10.0;
+
+ test_one<multi_linestring_type, polygon>("mikado1_large", mikado1, join_round32, end_round32, 5455052125.0, 41751.0, settings);
+ test_one<multi_linestring_type, polygon>("mikado1_small", mikado1, join_round32, end_round32, 1057.37, 10.0);
+ test_one<multi_linestring_type, polygon>("mikado1_small", mikado1, join_round32, end_flat, 874.590, 10.0);
+
+ test_one<multi_linestring_type, polygon>("mikado2_large", mikado2, join_round32, end_round32, 19878812253.0, 79610.0, settings10);
+ test_one<multi_linestring_type, polygon>("mikado2_small", mikado2, join_round32, end_round32, 1082.470, 10.0);
+ test_one<multi_linestring_type, polygon>("mikado2_small", mikado2, join_round32, end_flat, 711.678, 10.0);
+
+ // BSD 29151950588
+ // msvc 29151950611
+ // clang/linux 29151950612
+ // mingw 29151950711
+ test_one<multi_linestring_type, polygon>("mikado3_large", mikado3, join_round32, end_round32, 29151950650.0, 96375.0, settings10);
+ test_one<multi_linestring_type, polygon>("mikado3_small", mikado3, join_round32, end_round32, 2533.285, 10.0);
+ test_one<multi_linestring_type, polygon>("mikado3_small", mikado3, join_round32, end_flat, 2136.236, 10.0);
+
+ test_one<multi_linestring_type, polygon>("mikado4_large", mikado4, join_round32, end_round32, 11212832169.0, 59772.0, settings);
+ test_one<multi_linestring_type, polygon>("mikado4_small", mikado4, join_round32, end_round32, 2103.686, 10.0);
+ test_one<multi_linestring_type, polygon>("mikado4_small", mikado4, join_round32, end_flat, 1930.785, 10.0);
+ }
+
+ {
+ // Coordinates in one linestring vary so much that
+ // length = geometry::math::sqrt(dx * dx + dy * dy); returns a value of inf for length
+ // That geometry is skipped for the buffer
+ // SQL Server reports area 2117753600 (for b)
+ // PostGIS reports 2087335072 (for b)
+ // BG (2017) reports 1063005187 (for a/b) which apparently misses parts
+ // BG (2015) reported 794569660 (for a/b)
+ // BG (earlier) reported 927681870 (for a/b)
+ test_one<multi_linestring_type, polygon>("mysql_2015_04_10a",
+ mysql_2015_04_10a, join_round32, end_round32,
+ ut_settings::ignore_area(), 0.98, ut_settings::assertions_only());
+ test_one<multi_linestring_type, polygon>("mysql_2015_04_10b",
+ mysql_2015_04_10b, join_round32, end_round32,
+ ut_settings::ignore_area(), 0.98, ut_settings::assertions_only());
+
+ // Two other cases with <inf> for length calculation
+ test_one<multi_linestring_type, polygon>("mysql_2015_09_08a",
+ mysql_2015_09_08a, join_round32, end_round32,
+ ut_settings::ignore_area(), 4051744443.0, ut_settings::assertions_only());
+ test_one<multi_linestring_type, polygon>("mysql_2015_09_08b",
+ mysql_2015_09_08b, join_round32, end_round32,
+ ut_settings::ignore_area(), 2061380362.0, ut_settings::assertions_only());
+ }
+
+ // Generates first no interior, then one touching point (no interior),
+ // then one real interior ring, then one complete polygon
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1",
+ mysql_23023665_1, join_round32, end_round32, 1, 1, 186.5504, 1.0);
+ test_one<multi_linestring_type, polygon>("touching1_1",
+ touching1, join_round32, end_round32, 2, 0, 78.70773, 1.0
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ , ut_settings::ignore_validity() // false positive, due to rescaling. As we remove it, it is gone
+#endif
+ );
+ test_one<multi_linestring_type, polygon>("touching2_1",
+ touching2, join_round32, end_round32, 1, 1, 107.8991, 1.0);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_09",
+ mysql_23023665_1, join_round32, end_round32, 1, 0, 167.8062, 0.9);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_11",
+ mysql_23023665_1, join_round32, end_round32, 1, 1, 205.1473, 1.1);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_20",
+ mysql_23023665_1, join_round32, end_round32, 1, 1, 368.8422, 2.0);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_59",
+ mysql_23023665_1, join_round32, end_round32, 1, 1, 1020.7214, 5.9821); // very small triangle
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_60",
+ mysql_23023665_1, join_round32, end_round32, 1, 0, 1023.3061, 6.0); // no interior anymore
+
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1",
+ mysql_23023665_1, join_round32, end_flat, 1, 0, 180.3075, 1.0);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_09",
+ mysql_23023665_1, join_round32, end_flat, 1, 0, 162.7494, 0.9);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_11",
+ mysql_23023665_1, join_round32, end_flat, 1, 0, 197.7607, 1.1);
+ test_one<multi_linestring_type, polygon>("mysql_23023665_1_20",
+ mysql_23023665_1, join_round32, end_flat, 1, 1, 350.1135, 2.0);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ {
+ ut_settings settings(10.0);
+ test_one<multi_linestring_type, polygon>("ticket_13444_1",
+ ticket_13444, join_round32, end_round32, 3, 0, 11801.7832, 1.0, settings);
+ test_one<multi_linestring_type, polygon>("ticket_13444_3",
+ ticket_13444, join_round32, end_round32, 3, 1, 34132.0882, 3.0, settings);
+ test_one<multi_linestring_type, polygon>("ticket_13444_5",
+ ticket_13444, join_round32, end_round32, 2, 1, 50525.1110, 5.0, settings);
+ }
+#endif
+
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_point.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_point.cpp
new file mode 100644
index 000000000..1539223bb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_point.cpp
@@ -0,0 +1,224 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+static std::string const simplex = "MULTIPOINT((5 5),(7 7))";
+static std::string const three = "MULTIPOINT((5 8),(9 8),(7 11))";
+
+// Generated error (extra polygon on top of rest) at distance 14.0:
+static std::string const multipoint_a = "MULTIPOINT((39 44),(38 37),(41 29),(15 33),(58 39))";
+
+// Just one with holes at distance ~ 15
+static std::string const multipoint_b = "MULTIPOINT((5 56),(98 67),(20 7),(58 60),(10 4),(75 68),(61 68),(75 62),(92 26),(74 6),(67 54),(20 43),(63 30),(45 7))";
+
+// Grid, U-form, generates error for square point at 0.54 (top cells to control rescale)
+static std::string const grid_a = "MULTIPOINT(5 0,6 0,7 0, 5 1,7 1, 0 13,8 13)";
+
+static std::string const mysql_report_2015_02_25_1 = "MULTIPOINT(-9 19,9 -6,-4 4,16 -14,-3 16,14 9)";
+static std::string const mysql_report_2015_02_25_2 = "MULTIPOINT(-2 11,-15 3,6 4,-14 0,20 -7,-17 -1)";
+
+static std::string const mysql_report_3 = "MULTIPOINT(0 0,0 0,0 0,0 0,0 0)";
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P, Clockwise> polygon;
+ typedef bg::model::multi_point<P> multi_point_type;
+
+ bg::strategy::buffer::join_round join;
+ bg::strategy::buffer::end_flat end_flat;
+ typedef bg::strategy::buffer::distance_symmetric
+ <
+ typename bg::coordinate_type<P>::type
+ > distance_strategy;
+ bg::strategy::buffer::side_straight side_strategy;
+
+ double const pi = boost::geometry::math::pi<double>();
+
+ test_one<multi_point_type, polygon>("simplex1", simplex, join, end_flat, 2.0 * pi, 1.0);
+ test_one<multi_point_type, polygon>("simplex2", simplex, join, end_flat, 22.8372, 2.0);
+ test_one<multi_point_type, polygon>("simplex3", simplex, join, end_flat, 44.5692, 3.0);
+
+ test_one<multi_point_type, polygon>("three1", three, join, end_flat, 3.0 * pi, 1.0);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // For no-rescaling, fails in CCW mode
+ test_one<multi_point_type, polygon>("three2", three, join, end_flat, 36.7592, 2.0);
+#endif
+ test_one<multi_point_type, polygon>("three19", three, join, end_flat, 33.6914, 1.9);
+ test_one<multi_point_type, polygon>("three21", three, join, end_flat, 39.6394, 2.1);
+ test_one<multi_point_type, polygon>("three3", three, join, end_flat, 65.533, 3.0);
+
+ test_one<multi_point_type, polygon>("multipoint_a", multipoint_a, join, end_flat, 2049.98, 14.0);
+ test_one<multi_point_type, polygon>("multipoint_b", multipoint_b, join, end_flat, 7109.88, 15.0);
+ test_one<multi_point_type, polygon>("multipoint_b1", multipoint_b, join, end_flat, 6911.89, 14.7);
+ test_one<multi_point_type, polygon>("multipoint_b2", multipoint_b, join, end_flat, 7174.79, 15.1);
+
+ // Grid tests
+ {
+ bg::strategy::buffer::point_square point_strategy;
+
+ test_with_custom_strategies<multi_point_type, polygon>("grid_a50",
+ grid_a, join, end_flat,
+ distance_strategy(0.5), side_strategy, point_strategy, 7.0);
+
+ test_with_custom_strategies<multi_point_type, polygon>("grid_a54",
+ grid_a, join, end_flat,
+ distance_strategy(0.54), side_strategy, point_strategy, 7.819);
+ }
+
+ test_with_custom_strategies<multi_point_type, polygon>("mysql_report_2015_02_25_1_800",
+ mysql_report_2015_02_25_1, join, end_flat,
+ distance_strategy(6051788), side_strategy,
+ bg::strategy::buffer::point_circle(800),
+ 115057490003226.125, ut_settings(1.0));
+
+ {
+ typename bg::strategy::area::services::default_strategy
+ <
+ typename bg::cs_tag<P>::type
+ >::type area_strategy;
+
+ multi_point_type g;
+ bg::read_wkt(mysql_report_3, g);
+ bg::model::multi_polygon<polygon> buffered;
+ test_buffer<polygon>("mysql_report_3", buffered, g,
+ bg::strategy::buffer::join_round(36),
+ bg::strategy::buffer::end_round(36),
+ distance_strategy(1),
+ side_strategy,
+ bg::strategy::buffer::point_circle(36),
+ area_strategy,
+ 1, 0, 3.12566719800474635, ut_settings(1.0));
+ }
+}
+
+template <typename P>
+void test_many_points_per_circle()
+{
+ // Tests for large distances / many points in circles.
+ // Before Boost 1.58, this would (seem to) hang. It is solved by using monotonic sections in get_turns for buffer
+ // This is more time consuming, only calculate this for counter clockwise
+ // Reported by MySQL 2015-02-25
+ // SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(''), 6051788, ST_BUFFER_STRATEGY('point_circle', 83585)));
+ // SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(''), 5666962, ST_BUFFER_STRATEGY('point_circle', 46641))) ;
+
+ typedef bg::model::polygon<P, false> polygon;
+ typedef bg::model::multi_point<P> multi_point_type;
+
+ bg::strategy::buffer::join_round join;
+ bg::strategy::buffer::end_flat end_flat;
+ typedef bg::strategy::buffer::distance_symmetric
+ <
+ typename bg::coordinate_type<P>::type
+ > distance_strategy;
+ bg::strategy::buffer::side_straight side_strategy;
+
+ using bg::strategy::buffer::point_circle;
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ double const tolerance = 1000.0;
+#else
+ double const tolerance = 1.0;
+#endif
+
+ // Area should be somewhat larger (~>) than pi*distance^2
+ // 6051788: area ~> 115058122875258
+
+ // Strategies with many points, which are (very) slow in debug mode
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "mysql_report_2015_02_25_1_8000",
+ mysql_report_2015_02_25_1, join, end_flat,
+ distance_strategy(6051788), side_strategy, point_circle(8000),
+ 115058661065242.812, ut_settings(10.0 * tolerance));
+
+ // Expectations:
+ // 115058672785641.031
+ // 115058672785680.281
+ // 115058672785679.922
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "mysql_report_2015_02_25_1",
+ mysql_report_2015_02_25_1, join, end_flat,
+ distance_strategy(6051788), side_strategy, point_circle(83585),
+ 115058672785660.0, ut_settings(25.0 * tolerance));
+
+ // Takes about 7 seconds in release mode
+ // Expectations:
+ // 115058672880035.391
+ // 115058672879944.547
+ // 115058672879920.484
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "mysql_report_2015_02_25_1_250k",
+ mysql_report_2015_02_25_1, join, end_flat,
+ distance_strategy(6051788), side_strategy, point_circle(250000),
+ 115058672879977.0, ut_settings(150.0 * tolerance));
+
+#if defined(BOOST_GEOMETRY_BUFFER_INCLUDE_SLOW_TESTS)
+ // Takes about 110 seconds in release mode
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "mysql_report_2015_02_25_1_800k",
+ mysql_report_2015_02_25_1, join, end_flat,
+ distance_strategy(6051788), side_strategy, point_circle(800000),
+ 115058672871849.219, ut_settings(tolerance));
+#endif
+
+ // 5666962: area ~> 100890546298964
+ // Expectations:
+ // 100891031341796.875
+ // 100891031341794.766
+ // 100891031341794.078
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "mysql_report_2015_02_25_2",
+ mysql_report_2015_02_25_2, join, end_flat,
+ distance_strategy(5666962), side_strategy, point_circle(46641),
+ 100891031341795.0, ut_settings(200.0 * tolerance));
+
+ // Multipoint b with large distances/many points
+ // Area ~> pi * 10x
+
+ // Expectations:
+ // 3141871558222.398
+ // 3141871558231.5166
+ // 3141871558231.48926
+
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "multipoint_b_50k",
+ multipoint_b, join, end_flat,
+ distance_strategy(1000000), side_strategy, point_circle(50000),
+ 3141871558227.0, ut_settings(40.0 * tolerance));
+
+#if defined(BOOST_GEOMETRY_BUFFER_INCLUDE_SLOW_TESTS)
+ // Tests optimization min/max radius
+ // Takes about 55 seconds in release mode
+ test_with_custom_strategies<multi_point_type, polygon>(
+ "multipoint_b_500k",
+ multipoint_b, join, end_flat,
+ distance_strategy(10000000), side_strategy, point_circle(500000),
+ 314162054419515.562, ut_settings((tolerance));
+#endif
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+
+#if defined(BOOST_GEOMETRY_COMPILER_MODE_RELEASE) && ! defined(BOOST_GEOMETRY_COMPILER_MODE_DEBUG)
+ test_many_points_per_circle<bg::model::point<double, 2, bg::cs::cartesian> >();
+#else
+ std::cout << "Skipping some tests in debug or unknown mode" << std::endl;
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_polygon.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_polygon.cpp
new file mode 100644
index 000000000..b3548e355
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_multi_polygon.cpp
@@ -0,0 +1,529 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+
+static std::string const simplex
+ = "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))";
+
+static std::string const zonethru
+ = "MULTIPOLYGON(((0 0,0 6,5 6,5 4,3 4,3 0,0 0)),((5 0,5 2,7 2,7 6,10 6,10 0,5 0)))";
+
+static std::string const wrapped
+ = "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2)),((4 4,4 6,6 6,6 4,4 4)))";
+
+static std::string const nested
+ = "MULTIPOLYGON(((0 0,0 14,14 14,14 0,0 0),(2 2,12 2,12 12,2 12,2 2)),((4 4,4 10,10 10,10 4,4 4),(6 6,8 6,8 8,6 8,6 6)))";
+
+static std::string const triangles
+ = "MULTIPOLYGON(((0 4,3 0,-2.5 -1,0 4)),((3 8,5.5 13,8 8,3 8)),((11 4,13.5 -1,8 0,11 4)))";
+
+static std::string const degenerate0
+ = "MULTIPOLYGON()";
+static std::string const degenerate1
+ = "MULTIPOLYGON(((5 5,5 5,5 5,5 5)),((6 6,6 6,6 6,6 6)))";
+static std::string const degenerate2
+ = "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,5 5,5 5,5 5)),((11 5,11 5,11 5,11 5)))";
+
+// From robustness tests (rt)
+
+// Case with duplicate points (due to chained boxes) (round)
+static std::string const rt_a
+ = "MULTIPOLYGON(((2 7,2 8,3 8,3 7,2 7)),((5 4,5 5,6 5,6 4,5 4)),((5 8,6 8,6 7,6 6,5 6,5 7,4 7,4 8,5 8)),((3 5,4 5,4 4,3 4,2 4,2 5,3 5)))";
+
+// Case with u-u (miter)
+static std::string const rt_b
+ = "MULTIPOLYGON(((8 4,8 5,9 5,9 4,8 4)),((6 2,6 3,7 3,7 2,6 2)),((8 0,8 1,9 1,9 0,8 0)),((9 7,9 8,10 8,10 7,9 7)))";
+
+// Case with geometry::equals( turn.point(7.0000000000000000, 4.3368086899420177e-019), helper_segment(7.0000000000000000, 0.00000000000000000))) (round)
+static std::string const rt_c
+ = "MULTIPOLYGON(((6 1,6 2,7 2,7 1,6 1)),((8 0,8 1,9 1,9 0,8 0)))";
+
+// Case with round corner on same perpendicular points (round)
+static std::string const rt_d
+ = "MULTIPOLYGON(((2 2,2 3,3 2,2 2)),((2 5,2 6,3 5,2 5)),((2 4,2 5,3 4,2 4)),((3 2,3 3,4 2,3 2)),((4 4,4 5,5 4,4 4)),((5 6,5 5,4 5,4 6,5 7,5 6)),((2 2,3 1,3 0,2 0,2 1,1 1,1 2,2 2)),((1 3,1 2,0 2,1 3)),((1 4,2 4,2 3,1 3,1 4)))";
+
+// Case with missing turning point (miter) and many intersections (round, OK)
+static std::string const rt_e
+ = "MULTIPOLYGON(((0 6,0 7,1 6,0 6)),((3 7,3 8,4 8,4 7,3 7)),((4 6,4 7,5 7,4 6)),((3 6,3 7,4 6,3 6)),((1 9,2 10,2 9,1 9)),((1 9,1 8,0 8,0 9,1 9)),((3 5,3 4,2 4,2 5,2 6,3 5)))";
+
+// Extract of e (miter)
+static std::string const rt_f
+ = "MULTIPOLYGON(((0 6,0 7,1 6,0 6)),((1 9,1 8,0 8,0 9,1 9)))";
+
+// Robustness / turn problem (collinearity with turn after), solved in get_turn-info
+static std::string const rt_g1
+ = "MULTIPOLYGON(((3 8,3 9,4 9,3 8)),((7 5,7 6,8 5,7 5)),((1 8,1 9,2 9,1 8)),((1 6,1 7,2 7,1 6)))";
+
+static std::string const rt_g2
+ = "MULTIPOLYGON(((6 5,7 5,6 4,5 4,5 5,6 5)),((4 2,4 3,5 3,4 2)))";
+
+static std::string const rt_g3
+ = "MULTIPOLYGON(((4 2,5 3,5 2,4 2)),((2 0,3 1,3 0,2 0)))";
+
+
+// IP on match of 3 lines
+static std::string const rt_h
+ = "MULTIPOLYGON(((4 7,4 8,5 7,4 7)),((4 8,5 9,5 8,4 8)),((9 1,10 2,10 1,9 1)),((4 1,4 2,5 2,4 1)),((2 9,2 10,3 10,2 9)),((7 7,8 8,8 7,7 7)),((3 4,4 4,3 3,2 3,2 4,3 4)))";
+
+// r=1.16 (touching)
+static std::string const rt_i
+ = "MULTIPOLYGON(((2 1,2 2,3 2,2 1)),((3 2,3 3,4 3,3 2)))";
+
+// r=1.16 (touching in the middle)
+static std::string const rt_j
+ = "MULTIPOLYGON(((2 4,2 5,3 5,2 4)),((5 3,5 4,6 4,5 3)),((9 4,9 5,10 5,10 4,9 4)),((0 2,0 3,1 3,0 2)))";
+
+// Occupied (but not completely - due to duplicate point there)
+static std::string const rt_k
+ = "MULTIPOLYGON(((3 7,3 8,4 8,3 7)),((0 4,0 5,1 5,0 4)),((3 5,3 6,4 6,4 5,3 5)),((2 6,3 7,3 6,2 6)),((3 2,3 1,2 1,2 2,3 3,3 2)),((0 9,1 10,1 9,1 8,0 8,0 9)))";
+
+// Segment-intersection problem (nearly collinear not reported as collinear), fixed
+static std::string const rt_l
+ = "MULTIPOLYGON(((2 5,2 6,3 5,2 5)),((6 1,6 2,7 1,6 1)))";
+
+// Segment-intersection problem (missed touch because of robustness) (with 4), fixed
+static std::string const rt_m1
+ = "MULTIPOLYGON(((4 2,4 3,5 2,4 2)),((1 2,2 3,2 2,1 2)))";
+
+// Same, with 2
+static std::string const rt_m2
+ = "MULTIPOLYGON(((0 3,1 4,1 3,0 3)),((3 6,4 7,4 6,4 5,3 5,3 6)))";
+
+// Segment-intersection problem (disjoint nearly collinear segments were reported as intersecting), fixed.
+static std::string const rt_n
+ = "MULTIPOLYGON(((0 0,1 1,1 0,0 0)),((3 3,4 4,4 3,3 3)))";
+
+// Segment intersection of 3 pieces in one point, plus all intersection points are within the other piece (due to precision)
+static std::string const rt_o1
+ = "MULTIPOLYGON(((8 4,8 5,9 5,8 4)),((9 4,10 5,10 4,9 4)),((6 2,6 3,7 3,6 2)))";
+
+static std::string const rt_o2
+ = "MULTIPOLYGON(((8 4,8 5,9 5,8 4)),((6 5,7 4,6 4,6 5)),((9 4,10 5,10 4,9 4)),((6 2,6 3,7 3,6 2)))";
+
+static std::string const rt_o3
+ = "MULTIPOLYGON(((8 4,8 5,9 5,8 4)),((6.5 5,7.5 4,6.5 4,6.5 5)),((8.5 4,9.5 5,9.5 4,8.5 4)),((6 2,6 3,7 3,6 2)),((10 4,11 5,11 4,10 4)))";
+
+static std::string const rt_o4
+ = "MULTIPOLYGON(((8 4,8 5,9 5,8 4)),((6.5 5,7.5 4,6.5 4,6.5 5)),((8.5 4,9.5 5,9.5 4,8.5 4)),((6 2,6 3,7 3,6 2)),((10 4,11 5,11 4,10 4)),((10 3,11 3,11 2,10 3)))";
+
+// Occupied - intersection
+static std::string const rt_p1
+ = "MULTIPOLYGON(((5 2,5 3,6 3,6 2,5 2)),((8 0,8 1,9 0,8 0)),((8 2,9 3,9 2,8 2)))";
+
+static std::string const rt_p2
+ = "MULTIPOLYGON(((9 3,9 4,10 3,9 3)),((9 4,9 5,10 5,9 4)),((8 6,9 7,9 6,8 6)))";
+
+static std::string const rt_p3
+ = "MULTIPOLYGON(((3 8,3 9,4 9,3 8)),((3 7,3 8,4 8,3 7)),((0 8,0 9,1 8,0 8)))";
+
+// Occupation map: robustness, nearly collinear, both incoming
+static std::string const rt_p4
+ = "MULTIPOLYGON(((8 8,9 9,9 8,8 8)),((5 8,5 9,6 9,5 8)),((6 5,6 6,7 6,6 5)),((4 7,4 8,5 8,4 7)))";
+
+// Occupation map: Two collinear segments intersecting one segment
+static std::string const rt_p5
+ = "MULTIPOLYGON(((3 2,4 3,4 2,3 2)),((2 2,2 3,3 3,3 2,2 2)),((4 3,5 4,5 3,4 3)))";
+
+// Occupied map: only two pieces involved so leave early
+static std::string const rt_p6
+ = "MULTIPOLYGON(((7 3,7 4,8 3,7 3)),((7 6,8 7,8 6,7 6)))";
+
+// Occupation map: needing relaxed_less for map
+static std::string const rt_p7
+ = "MULTIPOLYGON(((6 6,7 7,7 6,6 6)),((3 4,3 5,4 4,3 4)),((2 6,3 7,3 6,2 6)))";
+
+// Occupation map: needing relaxed_less PLUS relaxed_equals for map
+static std::string const rt_p8
+ = "MULTIPOLYGON(((4 7,4 8,5 7,4 7)),((5 3,6 4,6 3,5 3)),((8 5,8 6,9 6,8 5)))";
+
+// Occupation map: needing go back for extra outgoing vectors too
+static std::string const rt_p9
+ = "MULTIPOLYGON(((1 6,1 7,2 6,1 6)),((4 3,4 4,5 3,4 3)),((3 4,2 3,2 4,3 5,3 4)))";
+
+static std::string const rt_p10
+ = "MULTIPOLYGON(((6 6,7 7,7 6,6 6)),((4 6,5 7,5 6,4 6)),((8 8,9 9,9 8,8 8)))";
+
+// Occupation map, multiple back/forward cases and combinations
+static std::string const rt_p11
+ = "MULTIPOLYGON(((0 8,0 9,1 9,1 8,0 8)),((2 8,2 9,3 9,3 8,2 8)),((3 8,4 9,4 8,3 8)),((4 1,4 2,5 2,4 1)))";
+
+// Occupation map - incoming angle, non-zero
+static std::string const rt_p12
+ = "MULTIPOLYGON(((8 4,9 5,9 4,8 4)),((5 5,5 6,6 6,6 5,5 5)),((8 4,8 3,7 3,8 4)))";
+
+// Occupation map - outgoing angle, 1
+static std::string const rt_p13
+ = "MULTIPOLYGON(((5 2,6 3,6 2,5 2)),((3 0,4 1,4 0,3 0)),((3 1,3 2,4 2,4 1,3 1)))";
+
+// Occupation map - touch which was originally in other segment-id
+static std::string const rt_p14
+ = "MULTIPOLYGON(((9 9,10 10,10 9,9 9)),((7 7,8 8,8 7,7 7)),((6 6,6 7,7 7,7 6,6 6)))";
+
+// Occupation map - needing measuring sides from original point and not center point
+static std::string const rt_p15
+ = "MULTIPOLYGON(((5 2,5 3,6 3,6 2,5 2)),((4 1,5 2,5 1,4 1)),((8 5,9 6,9 5,8 5)))";
+
+// Occupation map - needing other approach w.r.t. discarding (collinear) segments
+static std::string const rt_p16
+ = "MULTIPOLYGON(((5 7,5 8,6 7,5 7)),((9 3,9 4,10 3,9 3)),((6 7,7 8,7 7,6 7)))";
+
+// Occupation map - outputting two valid turns (resulting in the wrong choice in the end)
+static std::string const rt_p17
+ = "MULTIPOLYGON(((4 8,5 9,5 8,4 8)),((1 8,2 9,2 8,1 8)),((2 6,3 7,3 6,2 6)))";
+
+// Occupation map - outputting no valid turns (needing to take other turns into account)
+static std::string const rt_p18
+ = "MULTIPOLYGON(((7 6,8 7,8 6,7 6)),((7 3,7 4,8 3,7 3)),((5 4,6 5,6 4,5 4)))";
+
+// Occupation map - showing wrong approach in p17/p18, now new approach with keep_indices
+static std::string const rt_p19
+ = "MULTIPOLYGON(((0 5,1 6,1 5,0 5)),((0 7,0 8,1 7,0 7)),((3 4,3 5,4 4,3 4)))";
+
+// Occupation map: two non-collinear segments non-intersecting, needing relaxed_equal
+static std::string const rt_p20
+ = "MULTIPOLYGON(((2 3,2 4,3 4,3 3,2 3)),((0 5,0 6,1 6,0 5)),((2 7,2 8,3 8,2 7)))";
+
+// Occupation map: turn more right should still be included
+static std::string const rt_p21
+ = "MULTIPOLYGON(((4 2,4 3,5 3,4 2)),((4 1,5 2,5 1,4 1)),((5 2,6 3,6 2,5 2)))";
+
+static std::string const rt_p22
+ = "MULTIPOLYGON(((4 8,5 9,5 8,4 8)),((5 9,6 10,6 9,5 9)),((1 7,1 8,2 8,2 7,1 7)),((2 6,3 7,3 6,2 6)))";
+
+// Occupation map with a uu-turn
+static std::string const rt_q1
+ = "MULTIPOLYGON(((4 6,4 7,5 7,5 6,4 6)),((1 6,1 7,2 7,2 6,1 6)),((1 9,1 10,2 10,2 9,1 9)))";
+
+// Occupation map with twice a uu-turn
+static std::string const rt_q2
+ = "MULTIPOLYGON(((0 6,0 7,1 6,0 6)),((2 6,2 7,3 6,2 6)),((4 5,3 5,3 6,4 6,5 6,5 5,4 4,4 5)))";
+
+// Robustness issue related to collinear correction (meeting) and selecting the right axis (x/y)
+static std::string const rt_r
+ = "MULTIPOLYGON(((3 1,2 0,1 1,2 2,3 1)),((5 3,4 2,3 2,4 4,5 3)))";
+
+// Robustness - flagged by "meeting"
+static std::string const rt_s1
+ = "MULTIPOLYGON(((4 1,5 2,5 1,4 1)),((5 2,6 3,6 2,5 2)),((7 1,7 2,8 1,7 1)))";
+
+// Robustness - flagged by "disjoint"
+static std::string const rt_s2
+ = "MULTIPOLYGON(((0 0,1 1,1 0,0 0)),((2 4,2 5,3 4,2 4)),((3.5 3.5,4 4,4 3,3 3,3 4,3.5 3.5)))";
+
+// Robustness issue in get_turn_info (touch, collinear, blocking q)
+static std::string const rt_t
+ = "MULTIPOLYGON(((1 3,1 4,2 3,1 3)),((1 4,0 3,0 4,0 5,1 4)))";
+
+// Created traversed ring
+static std::string const rt_u1
+ = "MULTIPOLYGON(((7 6,8 7,8 6,7 6)),((8 9,9 10,9 9,8 9)),((2 8,3 9,3 8,2 8)),((6 5,6 6,7 6,6 5)),((6 7,7 7,6 6,5 6,6 7)),((7 7,7 8,8 7,7 7)),((6 7,6 8,7 8,6 7)),((8 7,8 8,9 8,9 7,8 7)))";
+
+static std::string const rt_u2
+ = "MULTIPOLYGON(((4 2,5 3,5 2,4 2)),((6 4,6 5,7 5,6 4)),((7 4,7 5,8 5,7 4)),((7 3,7 4,8 3,7 3)),((7 10,8 10,7 9,6 9,7 10)),((0 7,0 8,1 7,0 7)),((6 1,6 2,7 2,7 1,6 1)),((5 7,5 8,6 9,6 8,7 9,7 8,7 7,6 6,6 7,5 7)),((5 4,6 4,6 3,5 3,4 3,4 4,5 4)),((5 2,6 2,5 1,4 0,3 0,4 1,3 1,3 2,3 3,4 3,4 2,4.5 1.5,5 2)),((5 6,5 5,4 5,4 6,4 7,5 7,5 6)),((5 0,5 1,5.5 0.5,6 1,6 0,5 0)),((5 9,5 8,4 8,3 8,2 8,1 8,0 8,1 9,1 10,2 9,2 10,3 10,4 10,5 10,5 9)),((4 5,4 4,3 4,3 3,2 3,1 3,0 3,0 4,0 5,0 6,1 6,2 5,1 5,1 4,2 4,3 5,2 5,2 6,2.5 5.5,3 6,4 5)),((3 2,2 2,2 3,3 2)),((2 0,1 0,2 1,3 0,2 0)),((1 1,0 1,0 2,0 3,1 2,1.5 1.5,2 2,3 1,2 1,1 1)),((2 6,1 6,1 7,2 7,3 7,2 6)),((4 8,4 7,3 7,4 8)),((9 6,8 6,7 6,7 7,8 7,8.5 6.5,9 7,8 7,8 8,8.5 7.5,9 8,8 8,8 9,9 9,9 10,10 10,10 9,10 8,10 7,10 6,10 5,9 4,9 5,8 5,9 6)),((7 0,6 0,7 1,8 1,7 0)),((8 3,9 2,8 2,7 2,8 3)),((10 2,10 1,10 0,9 0,9 1,8 1,8 2,8.5 1.5,9 2,9 3,10 4,10 3,10 2)),((9 4,9 3,8 3,8 4,9 4)))";
+
+static std::string const rt_u3
+ = "MULTIPOLYGON(((3 0,4 1,4 0,3 0)),((2 0,2 1,3 1,2 0)),((6 7,7 8,7 7,6 7)),((1 2,2 3,2 2,1 2)),((9 1,10 2,10 1,9 1)),((0 2,0 3,1 3,1 2,0 2)),((5 0,5 1,6 1,6 0,5 0)),((1 1,2 2,2 1,1 1)),((0 7,0 8,1 7,0 7)),((9 0,10 1,10 0,9 0)),((0 5,0 6,1 6,1 5,0 5)),((1 6,2 7,2 6,1 6)),((7 0,8 1,8 0,7 0)),((8 6,9 7,9 6,8 6)),((9 6,10 7,10 6,9 6)),((1 4,1 5,2 5,1 4)),((5 6,4 5,4 6,5 7,5 6)),((5 4,4.5 3.5,5 3,4 3,4 2,3 1,3 2,3 3,2 3,2 4,3 4,4 4,5 5,5 4)),((4 7,3 7,3 8,4 9,5 10,6 10,6 9,5 9,4 8,5 8,4 7)),((6 3,5 3,5 4,5.5 3.5,6 4,7 4,7 3,8 3,8 2,8 1,7 1,6 1,6 2,6 3)),((3 5,2 4,2 5,2 6,3 5)),((1 1,1 0,0 0,0 1,1 2,1 1)),((2 9,2 8,1 8,0 8,1 9,1 10,1.5 9.5,2 10,2.5 9.5,3 10,3 9,2 9)),((6 5,6 6,7 7,8 7,8 6,7 6,7 5,6 4,6 5)),((7 8,6 8,6 9,7 9,8 8,7 8)),((9 10,10 10,10 9,10 8,9 7,9 8,8 8,9 9,8 9,8 10,9 10)))";
+
+static std::string const rt_u4
+ = "MULTIPOLYGON(((5 0,6 1,6 0,5 0)),((6 1,6 2,7 2,7 1,6 1)),((6 6,7 7,7 6,6 6)),((4 7,4 8,5 8,4 7)),((1 6,1 7,2 7,1 6)),((3 4,3 5,4 5,3 4)),((2 0,2 1,3 0,2 0)),((7 2,7 3,8 3,7 2)),((3 3,4 4,4 3,3 3)),((5 9,5 10,6 10,7 10,6 9,5 8,5 9)),((5 4,5 5,6 4,5 4)),((3 1,4 2,4 1,3 1)),((3 0,3 1,4 0,3 0)),((2 7,2 8,3 8,3 7,2 7)),((9 2,9 3,10 2,9 2)),((6 2,6 3,7 3,6 2)),((8 8,9 9,9 8,8 8)),((2 1,2 2,3 2,3 1,2 1)),((4 3,5 4,5 3,4 3)),((4 6,5 7,5 6,4 6)),((1 8,1 9,2 8,1 7,1 8)),((8 8,9 7,8 7,7 7,7 8,8 8)),((8 1,8 2,9 2,9 1,10 1,9 0,8 0,8 1)),((5 2,4 2,4 3,5 2)),((2 5,1 5,1 6,2 6,3 5,2 5)),((1 3,2 4,2 3,2 2,1 1,0 1,1 2,1 3)),((1 0,0 0,1 1,2 1,1.5 0.5,2 0,1 0)),((2 10,3 10,4 10,4 9,3 9,2 8,2 9,1 9,0 9,1 10,2 10)),((9 5,9 6,10 6,10 5,10 4,9 4,8.5 3.5,9 3,8 3,8 4,7 4,7 5,8 5,9 5)),((7 0,6 0,7 1,8 1,7 0)),((7 9,7 8,6 8,6 9,7 9)))";
+
+static std::string const rt_u5
+ = "MULTIPOLYGON(((4 3,4 4,5 4,5 3,4 3)),((6 5,6 6,7 6,6 5)),((5 4,6 5,6 4,5 4)),((4 0,4 1,5 1,5 0,4 0)),((7 8,8 9,8 8,7 8)),((8 2,8 3,9 3,8 2)),((2 1,2 2,3 1,2 1)),((5 7,5 8,6 8,5 7)),((4 5,4 6,5 5,4 5)),((7 0,8 1,8 0,7 0)),((7 2,8 1,7 1,6 1,7 2)),((3 3,4 3,4 2,3 2,3 3)),((3 9,3 10,4 9,3 9)),((1 2,2 3,2 2,1 2)),((2 4,2 5,3 4,2 3,2 4)),((3 7,4 7,3 6,2 6,3 7)))";
+
+static std::string const rt_u6
+ = "MULTIPOLYGON(((2 2,3 3,3 2,2 2)),((9 8,9 9,10 9,10 8,9 8)),((5 3,6 4,6 3,5 3)),((5 5,5 6,6 6,5 5)),((5 1,6 2,6 1,5 1)),((6 5,7 6,7 5,6 5)),((3 0,4 1,4 0,3 0)),((6 6,6 7,7 6,6 6)),((9 2,10 2,10 1,9 1,9 2)),((6 8,6 9,7 9,7 8,6 8)),((7 0,7 1,8 0,7 0)),((4 4,4 5,5 5,4 4)),((0 7,0 8,1 8,0 7)),((5 9,6 10,6 9,5 9)),((4 9,4 10,5 10,5 9,4 9)),((3 7,4 7,3 6,2 6,3 7)),((9 7,10 6,9 6,8 6,9 7)),((5 3,5 2,4 2,4 3,4 4,5 4,5 3)),((1 1,2 0,1 0,0 0,1 1)),((2 10,3 10,3 9,2 9,1 9,1 10,2 10)),((8.5 4.5,9 4,8 4,7 4,8 5,9 5,8.5 4.5)),((8 3,9 3,9 2,8 2,8 3)))";
+
+// This case has colocated intersection points and is fixed by specific sorting in enrich_intersection_points
+static std::string const rt_u7
+ = "MULTIPOLYGON(((4 5,4 6,5 5,4 5)),((9 2,9 3,10 3,10 2,9 2)),((7 3,7 4,8 4,8 3,7 3)),((5 5,6 6,6 5,5 5)),((3 6,4 7,4 6,3 6)),((0 5,0 6,1 5,0 5)))";
+
+// This case is also fixed by sorting order in enrich_intersection_points. It also has IP's between piece and original (due to rounding/rescaling pieces but not original) but that is not problematic
+// anymore by the fix in sorting
+static std::string const rt_u8
+ = "MULTIPOLYGON(((4 3,4 4,5 4,5 3,4 3)),((6 3,6 4,7 4,7 3,6 3)),((9 0,9 1,10 0,9 0)),((9 3,9 4,10 4,10 3,9 3)),((8 2,9 2,9 1,8 1,8 2)),((8 4,8 5,9 4,8 4)),((9 1,10 2,10 1,9 1)),((6 7,7 8,7 7,6 7)),((4 6,4 7,5 7,4 6)),((8 8,8 9,9 9,8 8)),((3 2,3 3,4 3,4 2,3 2)),((7 1,8 1,8 0,7 0,6 0,6 1,7 1)))";
+
+// Fixed by checking IP's between piece and original (using robust represention of original)
+static std::string const rt_u9
+ = "MULTIPOLYGON(((2 3,2 4,3 4,2 3)),((9 8,9 9,10 9,10 8,9 8)),((6 3,6 4,7 4,6 3)),((5 8,5 9,6 9,5 8)),((9 5,9 6,10 6,9 5)),((4 4,4 5,5 5,5 4,4 4)),((7 7,7 8,8 8,7 7)),((8 6,8 7,9 6,8 6)),((6 7,7 7,6 6,5 6,5 7,6 7)))";
+
+// Fixed by fixing border check for IP's
+static std::string const rt_u10
+ = "MULTIPOLYGON(((7 5,8 6,8 5,7 5)),((4 5,5 6,5 5,5 4,4 4,4 5)),((9 5,10 5,10 4,9 4,8 4,9 5)),((1 2,1 1,0 1,1 2)),((6 6,6 7,7 7,7 6,6 6)),((3 6,3 7,4 6,3 6)),((8 6,8 7,9 6,8 6)),((1 3,1 4,2 3,1 3)),((9 9,10 8,9 8,9 7,8 7,8 8,9 9)),((9 2,10 3,10 2,9 2)),((2 5,2 6,3 6,2 5)),((1 9,1 10,2 10,2 9,1 9)),((4 6,4 7,5 7,5 6,4 6)),((6 0,6 1,7 1,7 0,6 0)),((0 9,0 10,1 10,0 9)),((3.5 5.5,4 6,4 5,3 5,3 6,3.5 5.5)),((9 3,9 4,10 3,9 3)),((9 9,10 10,10 9,9 9)),((1 6,2 7,2 6,1 6)),((4 2,4 3,5 2,4 2)),((5 10,4 9,4 10,5 10)),((0 3,1 2,0 2,0 3)),((5 8,4 8,5 9,6 10,6 9,7 9,7 8,6 8,5 7,5 8)),((6 2,5 2,5 3,5.5 2.5,6 3,6 4,7 4,8 4,8 3,7 3,7 2,6 2)),((4 0,3 0,3 1,2.5 0.5,3 0,2 0,2 1,2 2,3 3,3 2,4 2,4 1,5 0,4 0)),((3 5,4 4,3 4,2 4,3 5)),((0 6,0 7,1 7,1 6,1 5,0 5,0 6)),((2 8,3 8,3 7,2 7,1 7,1 8,2 8)),((9 1,9 0,8 0,8 1,8 2,9 1)),((7 10,8 10,8 9,7 9,7 10)))";
+
+// Fixed by blocking IP's instead of discarding them
+static std::string const rt_u11
+ = "MULTIPOLYGON(((7 3,8 4,8 3,7 3)),((4 8,5 9,5 8,4 8)),((7 1,8 2,8 1,7 1)),((7 2,8 3,8 2,7 2)),((0 1,0 2,1 2,0 1)),((8 1,9 2,9 1,8 1)),((6 9,6 8,5 8,6 9)),((7 9,7 10,8 10,7 9)),((0 7,1 8,1 7,0 7)),((6 4,6 5,7 5,7 4,6 4)),((7 4,8 5,8 4,7 4)),((4 2,4 3,5 3,5 2,4 2)),((5 5,5 6,6 6,6 5,5 5)),((5 9,6 10,6 9,5 9)),((4 8,4 7,3 7,3 8,4 8)),((5 5,6 4,5 4,4 4,4 5,5 5)),((4.5 0.5,5 0,4 0,4 1,5 2,6 2,6 3,7 4,7 3,7 2,7 1,6 1,6 0,5 0,5 1,4.5 0.5)),((4 6,3 5,3 6,4 7,5 7,5 6,4 6)),((2 3,1 3,0 3,1 4,1 5,1 6,2 6,2 5,2 4,2 3)),((3 4,4 4,3 3,2 3,3 4)),((3 9,4 9,3 8,2 8,2 9,3 9)),((1 9,1 8,0 8,0 9,1 10,2 9,1 9)),((3 7,3 6,2 6,2 7,3 7)),((8 6,8 7,9 7,9 6,9 5,8 5,8 6)),((9 1,10 2,10 1,10 0,9 0,9 1)),((8 8,8 7,7 7,7 8,8 8)),((6 8,7 9,7 8,6 7,6 8)),((10 9,10 8,10 7,9 7,9 8,9 9,9 10,10 10,10 9)))";
+
+static std::string const rt_u12
+ = "MULTIPOLYGON(((9 0,9 1,10 0,9 0)),((1 0,1 1,2 1,2 0,1 0)),((4 0,4 1,5 0,4 0)),((1 2,1 3,2 2,1 2)),((3 7,4 8,4 7,3 7)),((3 6,4 7,4 6,3 6)),((6 9,7 10,7 9,6 9)),((5 6,5 7,6 7,5 6)),((7 6,7 7,8 7,7 6)),((7 3,7 4,8 3,7 3)),((8 7,8 8,9 7,8 6,8 7)),((8 5,8 6,9 6,8 5)),((6 4,6 5,7 5,6 4)),((2 9,2 10,3 10,2 9)),((1 4,2 5,2 4,1 4)),((2 2,2 3,3 3,2 2)),((3 2,3 3,4 3,3 2)),((9 5,10 6,10 5,9 5)),((4 4,5 5,5 4,4 4)),((5 10,6 10,6 9,5 9,4 9,4 10,5 10)),((5 3,5 4,6 4,6 3,6 2,6 1,5 1,5 2,4 2,4 3,5 3)),((0 6,1 6,1 5,0 5,0 6)),((3 5,4 6,4 5,4 4,3 4,3 5)),((2 2,3 2,4 2,4 1,3 1,2 1,2 2)),((2 8,1 8,2 9,3 9,2 8)),((2 6,1 6,2 7,3 6,2 6)),((0 9,1 10,1 9,0 8,0 9)),((1 8,1 7,0 7,1 8)),((9 5,10 4,9 4,8 4,8 5,9 5)),((6 1,7 1,6.5 0.5,7 0,6 0,6 1)),((8 1,9 1,8.5 0.5,9 0,8 0,8 1)),((6 7,7 7,6.5 6.5,7 6,6 6,6 7)),((6.5 8.5,7 9,7 8,6 8,6 9,6.5 8.5)),((9 9,10 10,10 9,9 8,9 9)))";
+
+static std::string const rt_u13
+ = "MULTIPOLYGON(((6 4,6 5,7 5,6 4)),((3 2,3 3,4 3,3 2)),((7 8,7 9,8 9,8 8,7 8)),((4 9,4 10,5 10,4 9)),((7 7,7 8,8 7,7 7)),((2 6,2 7,3 7,2 6)),((0 1,1 2,1 1,0 1)),((3 1,4 2,4 1,3 1)),((2 5,2 6,3 6,2 5)),((3 5,4 4,3 4,2 4,3 5)),((4 1,5 2,5 1,4 1)),((2 0,2 1,3 1,2 0)),((5 7,5 8,6 7,5 7)),((0 2,0 3,1 3,0 2)),((9 8,9 9,10 9,10 8,9 8)),((7 5,7 6,8 5,7 5)),((5 6,5 7,6 6,5 6)),((0 6,0 7,1 7,1 6,0 6)),((5 0,5 1,6 1,5 0)),((8 7,8 8,9 8,8 7)),((4.5 4.5,5 4,4 4,4 5,5 5,4.5 4.5)),((6 2,5 2,5 3,6 3,7 3,8 2,7 2,6 2)),((8 6,8 7,9 7,9 6,9 5,8 5,8 6)),((8 1,9 0,8 0,7 0,8 1)))";
+
+static std::string const neighbouring
+ = "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))";
+
+static std::string const neighbouring_with_holes
+ = "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)),((10 10,10 20,20 20,20 10,10 10),(14 14,14 16,16 16,16 14,14 14)))";
+
+
+// MultiPolygons causing assertion failure
+static std::string const mysql_report_2015_07_05_1
+ = "MULTIPOLYGON(((44 25,2.68435e+08 1.75922e+13,-6.87195e+10 -6.87195e+10,44 25),(-9704 8028,1.01776e+308 4.42027e+307,1.34218e+08 7.20576e+16,-9704 8028),(27945 15972,13 24,18 34,27945 15972),(3.3444e+307 1.47467e+308,1.22536e+38 1.42547e+38,10 -88,-28578 24802,3.3444e+307 1.47467e+308)))";
+static std::string const mysql_report_2015_07_05_2
+ = "MULTIPOLYGON(((19777 -21893,3.22595e+307 6.86823e+307,-40 -13,19777 -21893)),((-1322 4851,8.49998e+307 3.94481e+307,75 -69,8.64636e+307 3.94909e+307,-1.15292e+18 7.20576e+16,-1322 4851)))";
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P, Clockwise> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+ bg::strategy::buffer::join_miter join_miter;
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::join_round join_round_rough(12);
+ bg::strategy::buffer::end_flat end_flat;
+
+ bg::strategy::buffer::join_round join_round32(32);
+ bg::strategy::buffer::end_round end_round32(32);
+
+ test_one<multi_polygon_type, polygon_type>("triangles424", triangles, join_miter, end_flat, 417.910, 4.24);
+ test_one<multi_polygon_type, polygon_type>("triangles425", triangles, join_miter, end_flat, 418.918, 4.25);
+ test_one<multi_polygon_type, polygon_type>("triangles426", triangles, join_miter, end_flat, 419.927, 4.26);
+ test_one<multi_polygon_type, polygon_type>("zonethru_10", zonethru, join_miter, end_flat, 96.0000, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_05", simplex, join_round, end_flat, 23.7030, 0.5);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_05", simplex, join_miter, end_flat, 24.5965, 0.5);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_10", simplex, join_round, end_flat, 34.2532, 1.0);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_10", simplex, join_miter, end_flat, 38.1379, 1.0);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_20", simplex, join_round, end_flat, 59.9159, 2.0);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_20", simplex, join_miter, end_flat, 77.7060, 2.0);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_50", simplex, join_round, end_flat, 174.46, 5.0);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_50", simplex, join_miter, end_flat, 298.797, 5.0);
+
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_01", simplex, join_round, end_flat, 9.7514, -0.1);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_05", simplex, join_round, end_flat, 3.2019, -0.5);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_10", simplex, join_round, end_flat, 0.2012, -1.0);
+ test_one<multi_polygon_type, polygon_type>("multi_simplex_12", simplex, join_round, end_flat, 0.0, -1.2);
+
+ test_one<multi_polygon_type, polygon_type>("zonethru_05", zonethru, join_round, end_flat, 67.4627, 0.5);
+ test_one<multi_polygon_type, polygon_type>("zonethru_05", zonethru, join_miter, end_flat, 68.0000, 0.5);
+ test_one<multi_polygon_type, polygon_type>("zonethru_10", zonethru, join_round, end_flat, 93.8508, 1.0);
+ test_one<multi_polygon_type, polygon_type>("zonethru_10", zonethru, join_miter, end_flat, 96.0000, 1.0);
+ test_one<multi_polygon_type, polygon_type>("zonethru_15", zonethru, join_round, end_flat, 114.584, 1.5);
+ test_one<multi_polygon_type, polygon_type>("zonethru_15", zonethru, join_miter, end_flat, 117.000, 1.5);
+
+ test_one<multi_polygon_type, polygon_type>("wrapped_05", wrapped, join_round, end_flat, 104.570, 0.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_05", wrapped, join_miter, end_flat, 105.000, 0.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_10", wrapped, join_round, end_flat, 142.281, 1.0);
+ test_one<multi_polygon_type, polygon_type>("wrapped_10", wrapped, join_miter, end_flat, 144.000, 1.0);
+ test_one<multi_polygon_type, polygon_type>("wrapped_15", wrapped, join_round, end_flat, 167.066, 1.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_15", wrapped, join_miter, end_flat, 169.000, 1.5);
+
+ test_one<multi_polygon_type, polygon_type>("wrapped_05", wrapped, join_round, end_flat, 33.215, -0.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_05", wrapped, join_miter, end_flat, 33.000, -0.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_15", wrapped, join_round, end_flat, 0.0, -1.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_15", wrapped, join_miter, end_flat, 0.0, -1.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_25", wrapped, join_round, end_flat, 0.0, -2.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_25", wrapped, join_miter, end_flat, 0.0, -2.5);
+ test_one<multi_polygon_type, polygon_type>("wrapped_50", wrapped, join_round, end_flat, 0.0, -5.0);
+ test_one<multi_polygon_type, polygon_type>("wrapped_50", wrapped, join_miter, end_flat, 0.0, -5.0);
+
+ test_one<multi_polygon_type, polygon_type>("nested_05", nested, join_round, end_flat, 191.570, 0.5);
+ test_one<multi_polygon_type, polygon_type>("nested_05", nested, join_round, end_flat, 64.430, -0.5);
+ test_one<multi_polygon_type, polygon_type>("nested_10", nested, join_round, end_flat, 254.279, 1.0);
+ test_one<multi_polygon_type, polygon_type>("nested_10", nested, join_round, end_flat, 1.721, -1.0);
+ test_one<multi_polygon_type, polygon_type>("nested_25", nested, join_round, end_flat, 355.622, 2.5);
+ test_one<multi_polygon_type, polygon_type>("nested_25", nested, join_round, end_flat, 0.0, -2.5);
+ // 3.0 is exactly touching (for the deflate case)
+ test_one<multi_polygon_type, polygon_type>("nested_30", nested, join_round, end_flat, 392.256, 3.0);
+ test_one<multi_polygon_type, polygon_type>("nested_30", nested, join_round, end_flat, 0.0, -3.0);
+ test_one<multi_polygon_type, polygon_type>("nested_29", nested, join_round, end_flat, 384.803, 2.9);
+ test_one<multi_polygon_type, polygon_type>("nested_29", nested, join_round, end_flat, 0.0, -2.9);
+ test_one<multi_polygon_type, polygon_type>("nested_31", nested, join_round, end_flat, 399.771, 3.1);
+ test_one<multi_polygon_type, polygon_type>("nested_31", nested, join_round, end_flat, 0.0, -3.1);
+
+ test_one<multi_polygon_type, polygon_type>("degenerate0", degenerate0, join_round, end_flat, 0.0, 1.0);
+ test_one<multi_polygon_type, polygon_type>("degenerate1", degenerate1, join_round, end_flat, 5.708, 1.0);
+ test_one<multi_polygon_type, polygon_type>("degenerate2", degenerate2, join_round, end_flat, 133.0166, 0.75);
+
+ test_one<multi_polygon_type, polygon_type>("rt_a", rt_a, join_round, end_flat, 34.5381, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_a", rt_a, join_miter, end_flat, 36.0, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_b", rt_b, join_round, end_flat, 31.4186, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_b", rt_b, join_miter, end_flat, 34.0, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_c", rt_c, join_round, end_flat, 14.7093, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_c", rt_c, join_miter, end_flat, 16.0, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_d", rt_d, join_round, end_flat, 18.8726, 0.3);
+ test_one<multi_polygon_type, polygon_type>("rt_e", rt_e, join_round, end_flat, 14.1866, 0.3);
+
+ test_one<multi_polygon_type, polygon_type>("rt_g1", rt_g1, join_round, end_flat, 24.719, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_g3", rt_g3, join_miter, end_flat, 16.5711, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_d", rt_d, join_miter, end_flat, 19.8823, 0.3);
+ test_one<multi_polygon_type, polygon_type>("rt_e", rt_e, join_miter, end_flat, 15.1198, 0.3);
+ test_one<multi_polygon_type, polygon_type>("rt_f", rt_f, join_miter, end_flat, 4.60853, 0.3);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_g1", rt_g1, join_miter, end_flat, 30.3137, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_g2", rt_g2, join_miter, end_flat, 18.5711, 1.0);
+#endif
+
+ test_one<multi_polygon_type, polygon_type>("rt_h", rt_h, join_round, end_flat, 47.6012, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_h", rt_h, join_miter, end_flat, 61.7058, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_i", rt_i, join_round, end_flat, 10.7528, 1.0);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_i", rt_i, join_miter, end_flat, 13.6569, 1.0);
+#endif
+ test_one<multi_polygon_type, polygon_type>("rt_j", rt_j, join_round, end_flat, 28.7309, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_j", rt_j, join_miter, end_flat, 35.1421, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_k", rt_k, join_round, end_flat, 42.0092, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_k", rt_k, join_miter, end_flat, 48.0563, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_l", rt_l, join_miter, end_flat, 19.3995, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_m1", rt_m1, join_round, end_flat, 14.1074, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_m1", rt_m1, join_miter, end_flat, 19.4853, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_m2", rt_m2, join_miter, end_flat, 21.4853, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_n", rt_n, join_miter, end_flat, 18.4853, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_o1", rt_o1, join_round, end_flat, 17.536, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_o1", rt_o1, join_miter, end_flat, 20.9142, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_o2", rt_o2, join_miter, end_flat, 25.7426, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_o3", rt_o3, join_miter, end_flat, 28.8247, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_o4", rt_o4, join_miter, end_flat, 34.6532, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_p1", rt_p1, join_miter, end_flat, 24.8211, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p2", rt_p2, join_miter, end_flat, 21.4853, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p3", rt_p3, join_miter, end_flat, 22.3995, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p4", rt_p4, join_miter, end_flat, 33.0563, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p5", rt_p5, join_miter, end_flat, 17.0, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_p6", rt_p6, join_miter, end_flat, 18.4853, 1.0);
+#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_p7", rt_p7, join_miter, end_flat, 26.2279, 1.0);
+#endif
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_p8", rt_p8, join_miter, end_flat, 29.0563, 1.0);
+#endif
+ test_one<multi_polygon_type, polygon_type>("rt_p9", rt_p9, join_miter, end_flat, 26.1421, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p10", rt_p10, join_miter, end_flat, 23.3995, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_p11", rt_p11, join_miter, end_flat, 28.7426, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p12", rt_p12, join_miter, end_flat, 22.5711, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p13", rt_p13, join_miter, end_flat, 19.9142, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p14", rt_p14, join_miter, end_flat, 20.8284, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_p15", rt_p15, join_miter, end_flat, 23.6569, 1.0);
+#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_p16", rt_p16, join_miter, end_flat, 23.4853, 1.0);
+#endif
+
+ test_one<multi_polygon_type, polygon_type>("rt_p17", rt_p17, join_miter, end_flat, 25.3137, 1.0);
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_p18", rt_p18, join_miter, end_flat, 23.3137, 1.0);
+#endif
+ test_one<multi_polygon_type, polygon_type>("rt_p19", rt_p19, join_miter, end_flat, 25.5637, 1.0);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_p20", rt_p20, join_miter, end_flat, 25.4853, 1.0);
+#endif
+ test_one<multi_polygon_type, polygon_type>("rt_p21", rt_p21, join_miter, end_flat, 17.1716, 1.0);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_p22", rt_p22, join_miter, end_flat, 26.5711, 1.0);
+#endif
+
+ test_one<multi_polygon_type, polygon_type>("rt_q1", rt_q1, join_miter, end_flat, 27, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_q2", rt_q2, join_miter, end_flat, 26.4853, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_q2", rt_q2, join_miter, end_flat, 0.9697, -0.25);
+
+ test_one<multi_polygon_type, polygon_type>("rt_r", rt_r, join_miter, end_flat, 21.0761, 1.0);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_s1", rt_s1, join_miter, end_flat, 20.4853, 1.0);
+#endif
+
+#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_s2", rt_s2, join_miter, end_flat, 24.6495, 1.0);
+#endif
+
+ test_one<multi_polygon_type, polygon_type>("rt_t1", rt_t, join_miter, end_flat, 15.6569, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_t2", rt_t, join_miter, end_flat, 0.1679, -0.25);
+
+ test_one<multi_polygon_type, polygon_type>("rt_u1", rt_u1, join_round, end_flat, 33.2032, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u2", rt_u2, join_round, end_flat, 138.8001, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u3", rt_u3, join_round, end_flat, 133.4526, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u4", rt_u4, join_round, end_flat, 126.9268, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u5", rt_u5, join_round, end_flat, 78.4906, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u6", rt_u6, join_round, end_flat, 115.4461, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_u7", rt_u7, join_miter, end_flat, 42.6421, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u7", rt_u7, join_round, end_flat, 35.6233, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u7_rough", rt_u7, join_round_rough, end_flat, 35.1675, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("rt_u8", rt_u8, join_miter, end_flat, 70.9142, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u9", rt_u9, join_miter, end_flat, 59.3063, 1.0);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<multi_polygon_type, polygon_type>("rt_u10", rt_u10, join_miter, end_flat, 144.0858, 1.0); // PG: 144.085786772487
+#endif
+ test_one<multi_polygon_type, polygon_type>("rt_u10_51", rt_u10, join_miter, end_flat, 0.1674, -0.51); // PG: 0.167380307629637
+
+ // TODO: now one small triangle missing due to clusters/uu turns
+ test_one<multi_polygon_type, polygon_type>("rt_u10_50", rt_u10, join_miter, end_flat, 0.2145, -0.50, ut_settings::ignore_validity()); // PG: 0.214466094067263
+ test_one<multi_polygon_type, polygon_type>("rt_u10_45", rt_u10, join_miter, end_flat, 1.3000, -0.45); // PG: 1.30004221251301
+ test_one<multi_polygon_type, polygon_type>("rt_u10_25", rt_u10, join_miter, end_flat, 9.6682, -0.25); // PG: 9.66820888343117
+
+ test_one<multi_polygon_type, polygon_type>("rt_u11", rt_u11, join_miter, end_flat, 131.3995, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u11_50", rt_u11, join_miter, end_flat, 0.04289, -0.50);
+ test_one<multi_polygon_type, polygon_type>("rt_u11_25", rt_u11, join_miter, end_flat, 10.1449, -0.25);
+
+ test_one<multi_polygon_type, polygon_type>("rt_u12", rt_u12, join_miter, end_flat, 142.1348, 1.0);
+ test_one<multi_polygon_type, polygon_type>("rt_u13", rt_u13, join_miter, end_flat, 115.4853, 1.0);
+
+ test_one<multi_polygon_type, polygon_type>("neighbouring_small",
+ neighbouring,
+ join_round32, end_round32, 128.0, -1.0);
+ test_one<multi_polygon_type, polygon_type>("neighbouring_with_holes_small",
+ neighbouring_with_holes,
+ join_round32, end_round32, 97.757, -1.0);
+ test_one<multi_polygon_type, polygon_type>("neighbouring_large",
+ neighbouring,
+ join_round32, end_round32, 0.0, -10.0);
+ test_one<multi_polygon_type, polygon_type>("neighbouring_with_holes_large",
+ neighbouring_with_holes,
+ join_round32, end_round32, 0.0, -10.0);
+
+ // Check cases with extreme coordinates on assertions
+ test_one<multi_polygon_type, polygon_type>("mysql_report_2015_07_05_1",
+ mysql_report_2015_07_05_1,
+ join_round32, end_round32, ut_settings::ignore_area(), 5526.0,
+ ut_settings::assertions_only());
+
+ test_one<multi_polygon_type, polygon_type>("mysql_report_2015_07_05_2",
+ mysql_report_2015_07_05_2,
+ join_round32, end_round32, ut_settings::ignore_area(), 948189399.0,
+ ut_settings::assertions_only());
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_point.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_point.cpp
new file mode 100644
index 000000000..f1f3d5eb2
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_point.cpp
@@ -0,0 +1,41 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+
+static std::string const simplex = "POINT(5 5)";
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P, Clockwise> polygon;
+
+ bg::strategy::buffer::join_miter join_miter;
+ bg::strategy::buffer::end_flat end_flat;
+
+ double const pi = boost::geometry::math::pi<double>();
+
+ test_one<P, polygon>("simplex1", simplex, join_miter, end_flat, pi, 1.0);
+ test_one<P, polygon>("simplex2", simplex, join_miter, end_flat, pi * 4.0, 2.0, ut_settings(0.1));
+ test_one<P, polygon>("simplex3", simplex, join_miter, end_flat, pi * 9.0, 3.0, ut_settings(0.1));
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_point_geo.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_point_geo.cpp
new file mode 100644
index 000000000..63222705f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_point_geo.cpp
@@ -0,0 +1,47 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer_geo.hpp"
+
+static std::string const simplex = "POINT(4.9 52.0)";
+
+template <bool Clockwise, typename PointType>
+void test_point()
+{
+ typedef bg::model::polygon<PointType, Clockwise> polygon;
+
+ bg::strategy::buffer::join_miter join_miter;
+ bg::strategy::buffer::end_flat end_flat;
+
+ // NOTE: for now do not test with a radius less than 2 meter, because is not precise yet (in double)
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 70.7107, 5.0, ut_settings(0.1, false, 8));
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 76.5437, 5.0, ut_settings(0.1, false, 16));
+ // * Result is different for clang/VCC. Specified expectation is in between, and tolerance higher
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 77.9640, 5.0, ut_settings(0.2, false, 32));
+
+ // The more points used for the buffer, the more the area approaches 10*PI square meters
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 282.8430, 10.0, ut_settings(0.1, false, 8));
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 306.1471, 10.0, ut_settings(0.1, false, 16));
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 312.1450, 10.0, ut_settings(0.1, false, 32));
+ // * Same here
+ test_one_geo<PointType, polygon>("simplex1", simplex, join_miter, end_flat, 313.9051, 10.0, ut_settings(0.2, false, 180));
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_point<true, bg::model::point<default_test_type, 2, bg::cs::geographic<bg::degree> > >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_point<true, bg::model::point<long double, 2, bg::cs::geographic<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_polygon.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_polygon.cpp
new file mode 100644
index 000000000..c217307b7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_polygon.cpp
@@ -0,0 +1,865 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016, 2019.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+
+static std::string const simplex
+ = "POLYGON ((0 0,1 5,6 1,0 0))";
+static std::string const concave_simplex
+ = "POLYGON ((0 0,3 5,3 3,5 3,0 0))";
+static std::string const concave_b
+ = "POLYGON((0 10,5 15,6 13,8 11,0 10))";
+static std::string const square_simplex
+ = "POLYGON ((0 0,0 1,1 1,1 0,0 0))";
+static std::string const spike_simplex
+ = "POLYGON ((0 0,1 5,3 3,5 5,3 3,5 1,0 0))";
+static std::string const chained_box
+ = "POLYGON((0 0,0 4,4 4,8 4,12 4,12 0,8 0,4 0,0 0))";
+
+static std::string const join_types
+ = "POLYGON ((0 0,0 4,4 4,2 6,0 8,2 6,4 8,8 4,4 0,0 0))"; // first 4 join types are all different: convex, concave, continue, spike
+
+static std::string const donut_simplex
+ = "POLYGON ((0 0,1 9,8 1,0 0),(1 1,4 1,1 4,1 1))";
+static std::string const donut_diamond
+ = "POLYGON((15 0,15 15,30 15,30 0,15 0),(26 11,22 14,19 10,23 07,26 11))";
+static std::string const letter_L
+ = "POLYGON ((0 0,0 4,1 4,1 1,3 1,3 0,0 0))";
+static std::string const indentation
+ = "POLYGON ((0 0,0 5,4 5,4 4,3 3,2 4,2 1,3 2,4 1,4 0,0 0))";
+static std::string const funnelgate
+ = "POLYGON((0 0,0 7,7 7,7 0,5 0,5 1,6 6,1 6,2 1,2 0,0 0))";
+static std::string const gammagate
+ = "POLYGON((0 0,0 6,9 6,9 0,4 0,4 2,7 2,7 4,2 4,2 0,0 0))";
+static std::string const fork_a
+ = "POLYGON((0 0,0 6,9 6,9 0,4 0,4 2,7 2,7 4,6 4,6 5,5 5,5 4,4 4,4 5,3 5,3 4,2 4,2 0,0 0))";
+static std::string const fork_b
+ = "POLYGON((0 0,0 8,14 8,14 0,4 0,4 2,13 2,13 4,12 4,12 7,9 7,9 4,7 4,7 7,4 7,4 4,2 4,2 0,0 0))";
+static std::string const fork_c
+ = "POLYGON((0 0,0 9,12 9,12 0,4 0,4 4,6 4,6 2,8 2,8 4,10 4,10 7,6 7,6 6,2 6,2 0,0 0))";
+
+static std::string const arrow
+ = "POLYGON ((1 0,1 5,0.5 4.5,2 10,3.5 4.5,3 5,3 0,1 0))";
+static std::string const tipped_aitch
+ = "POLYGON ((0 0,0 3,3 3,3 4,0 4,0 7,7 7,7 4,4 4,4 3,7 3,7 0,0 0))";
+static std::string const snake
+ = "POLYGON ((0 0,0 3,3 3,3 4,0 4,0 7,8 7,8 4,6 4,6 3,8 3,8 0,7 0,7 2,5 2"
+ ",5 5,7 5,7 6,1 6,1 5,4 5,4 2,1 2,1 1,6 1,6 0,0 0))";
+static std::string const church
+ = "POLYGON ((0 0,0 3,2.999 3,3 8,3 0,0 0))";
+static std::string const flower
+ = "POLYGON ((1 0,1 10,9 10,9 0,4.99 0,4.99 5.5,4.5 6,5 6.5,5.5 6,5.01 5.5,5.01 0.01,5.25 0.01,5.25 5,6 3,8 5,6 6,8 7,6 9,5 7,4 9,2 7,4 6,2 5,4 3,4.75 5,4.75 0,1 0))";
+
+static std::string const saw
+ = "POLYGON((1 3,1 8,1.5 6,5 8,5.5 6,9 8,9.5 6,13 8,13 3,1 3))";
+
+static std::string const bowl
+ = "POLYGON((1 2,1 7,2 7,3 5,5 4,7 5,8 7,9 7,9 2,1 2))";
+
+// Triangle with segmented sides, closing point at longest side
+static std::string const triangle
+ = "POLYGON((4 5,5 4,4 4,3 4,3 5,3 6,4 5))";
+
+// Triangle which caused acos in join_round to fail with larger side strategy
+static std::string const sharp_triangle
+ = "POLYGON((2 0,3 8,4 0,2 0))";
+
+static std::string const right_triangle
+ = "POLYGON((0 1,20 0,0 0,0 1))";
+
+
+static std::string const degenerate0
+ = "POLYGON(())";
+static std::string const degenerate1
+ = "POLYGON((5 5))";
+static std::string const degenerate2
+ = "POLYGON((5 5,5 5,5 5,5 5))";
+static std::string const degenerate3
+ = "POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,5 5,5 5,5 5))";
+
+
+// Real-life examples
+static std::string const county1
+ = "POLYGON((-111.700 41.200 ,-111.681388 41.181739 ,-111.682453 41.181506 ,-111.684052 41.180804 ,-111.685295 41.180538 ,-111.686318 41.180776 ,-111.687517 41.181416 ,-111.688982 41.181520 ,-111.690670 41.181523 ,-111.692135 41.181460 ,-111.693646 41.182034 ,-111.695156 41.182204 ,-111.696489 41.182274 ,-111.697775 41.182075 ,-111.698974 41.181539 ,-111.700485 41.182348 ,-111.701374 41.182955 ,-111.700 41.200))";
+
+//static std::string const invalid_parcel
+// = "POLYGON((116042.20 464335.07,116056.35 464294.59,116066.41 464264.16,116066.44 464264.09,116060.35 464280.93,116028.89 464268.43,116028.89 464268.44,116024.74 464280.7,116018.91 464296.71,116042.2 464335.07))";
+
+static std::string const parcel1
+ = "POLYGON((225343.489 585110.376,225319.123 585165.731,225323.497 585167.287,225323.134 585167.157,225313.975 585169.208,225321.828 585172,225332.677 585175.83,225367.032 585186.977,225401.64 585196.671,225422.799 585201.029,225429.784 585202.454,225418.859 585195.112,225423.803 585196.13,225425.389 585196.454,225397.027 585165.48,225363.802 585130.372,225354.086 585120.261,225343.489 585110.376))";
+static std::string const parcel2
+ = "POLYGON((173356.986490154 605912.122380707,173358.457939143 605902.891897507,173358.458257372 605902.889901239,173214.162964795 605901.13020255,173214.162746654 605901.132200038,173213.665 605905.69,173212.712441616 605913.799985923,173356.986490154 605912.122380707))";
+static std::string const parcel3
+ = "POLYGON((120528.56 462115.62,120533.4 462072.1,120533.4 462072.01,120533.39 462071.93,120533.36 462071.86,120533.33 462071.78,120533.28 462071.72,120533.22 462071.66,120533.15 462071.61,120533.08 462071.58,120533 462071.55,120532.92 462071.54,120467.68 462068.66,120468.55 462059.04,120517.39 462062.87,120517.47 462062.87,120517.55 462062.86,120517.62 462062.83,120517.69 462062.79,120517.76 462062.74,120517.81 462062.68,120517.86 462062.62,120517.89 462062.55,120517.92 462062.47,120530.49 461998.63,120530.5 461998.55,120530.49 461998.47,120530.47 461998.39,120530.44 461998.31,120530.4 461998.24,120530.35 461998.18,120530.28 461998.13,120530.21 461998.09,120530.13 461998.06,120482.19 461984.63,120485 461963.14,120528.2 461950.66,120528.28 461950.63,120528.35 461950.59,120528.42 461950.53,120528.47 461950.47,120528.51 461950.4,120528.54 461950.32,120528.56 461950.24,120528.56 461950.15,120528.55 461950.07,120528.53 461949.99,120528.49 461949.92,120528.44 461949.85,120497.49 461915.03,120497.43 461914.98,120497.37 461914.93,120497.3 461914.9,120497.23 461914.88,120497.15 461914.86,120424.61 461910.03,120424.53 461910.03,120424.45 461910.05,120424.37 461910.07,120424.3 461910.11,120424.24 461910.16,120424.18 461910.22,120424.14 461910.29,120424.11 461910.37,120424.09 461910.45,120424.08 461910.53,120424.08 461967.59,120424.08 461967.67,120424.1 461967.75,120424.14 461967.82,120424.18 461967.89,120424.23 461967.95,120424.3 461968,120424.37 461968.04,120424.44 461968.07,120424.52 461968.09,120473.31 461973.83,120469.63 461993.16,120399.48 461986.43,120399.4 461986.43,120399.32 461986.44,120399.25 461986.47,120399.17 461986.5,120399.11 461986.55,120399.05 461986.61,120399.01 461986.67,120398.97 461986.74,120398.95 461986.82,120398.93 461986.9,120394.1 462057.5,120394.1 462057.58,120394.11 462057.66,120394.14 462057.74,120394.18 462057.81,120394.23 462057.87,120394.29 462057.93,120394.35 462057.97,120394.43 462058,120394.5 462058.03,120394.58 462058.03,120458.74 462059.95,120455.16 462072.48,120396.57 462067.68,120396.49 462067.68,120396.4 462067.69,120396.32 462067.72,120396.25 462067.76,120396.18 462067.82,120396.13 462067.88,120396.08 462067.96,120396.05 462068.04,120396.03 462068.12,120392.17 462103.9,120392.16 462103.99,120392.18 462104.07,120392.2 462104.15,120392.24 462104.22,120392.29 462104.29,120392.35 462104.35,120392.42 462104.4,120392.5 462104.43,120392.58 462104.45,120392.66 462104.46,120393.63 462104.46,120393.63 462103.46,120393.22 462103.46,120396.98 462068.71,120455.49 462073.51,120455.57 462073.51,120455.66 462073.49,120455.74 462073.46,120455.81 462073.42,120455.88 462073.37,120455.93 462073.3,120455.98 462073.23,120456.01 462073.15,120459.88 462059.61,120459.89 462059.52,120459.9 462059.44,120459.88 462059.36,120459.86 462059.28,120459.82 462059.21,120459.77 462059.14,120459.72 462059.08,120459.65 462059.04,120459.57 462059,120459.49 462058.98,120459.41 462058.97,120395.13 462057.05,120399.9 461987.48,120469.99 461994.2,120470.07 461994.2,120470.15 461994.19,120470.23 461994.16,120470.3 461994.13,120470.37 461994.08,120470.42 461994.02,120470.47 461993.95,120470.5 461993.88,120470.53 461993.8,120474.4 461973.48,120474.4 461973.4,120474.4 461973.32,120474.38 461973.24,120474.35 461973.16,120474.31 461973.09,120474.25 461973.03,120474.19 461972.98,120474.12 461972.94,120474.04 461972.91,120473.96 461972.9,120425.08 461967.14,120425.08 461911.06,120496.88 461915.85,120527.16 461949.92,120484.4 461962.27,120484.33 461962.3,120484.25 461962.35,120484.19 461962.4,120484.14 461962.46,120484.09 461962.53,120484.06 461962.61,120484.05 461962.69,120481.14 461984.93,120481.14 461985.01,120481.15 461985.09,120481.17 461985.17,120481.2 461985.24,120481.25 461985.31,120481.3 461985.36,120481.36 461985.41,120481.43 461985.45,120481.51 461985.48,120529.42 461998.9,120517.02 462061.84,120468.14 462058,120468.05 462058,120467.97 462058.02,120467.89 462058.05,120467.81 462058.09,120467.75 462058.15,120467.69 462058.22,120467.65 462058.29,120467.62 462058.37,120467.6 462058.46,120466.64 462069.1,120466.63 462069.18,120466.65 462069.26,120466.67 462069.33,120466.71 462069.4,120466.76 462069.47,120466.81 462069.53,120466.88 462069.57,120466.95 462069.61,120467.03 462069.63,120467.11 462069.64,120532.34 462072.52,120527.62 462115.03,120391.73 462106.36,120391.66 462107.36,120528.03 462116.06,120528.12 462116.06,120528.2 462116.04,120528.28 462116.02,120528.35 462115.97,120528.42 462115.92,120528.47 462115.85,120528.51 462115.78,120528.54 462115.7,120528.56 462115.62))";
+
+static std::string const parcel3_bend // of parcel_3 - clipped
+ = "POLYGON((120399.40000152588 461986.43000030518, 120399.47999954224 461986.43000030518, 120403 461986.76769953477, 120403 461987.777217312, 120399.90000152588 461987.47999954224, 120399.72722010587 461990, 120398.71791817161 461990, 120398.93000030518 461986.90000152588, 120398.95000076294 461986.81999969482, 120398.9700012207 461986.74000167847, 120399.00999832153 461986.66999816895, 120399.04999923706 461986.61000061035, 120399.11000061035 461986.54999923706, 120399.16999816895 461986.5, 120399.25 461986.4700012207, 120399.31999969482 461986.43999862671, 120399.40000152588 461986.43000030518))";
+
+// Has concavety
+static std::string const italy_part1
+ = "POLYGON ((1660000 5190000 , 1651702.9375 5167014.5, 1650311.34375 5167763.53125, 1643318.59375 5172188.15625, 1642488.03125 5172636.75, 1640818.25 5173802.75, 1640107.03125 5174511.21875, 1638931.9375 5176054.03125, 1638684.5625 5177095.75, 1660000 5190000))";
+
+// Did have a self-intersection for first flat/convex solution
+static std::string const nl_part1
+ = "POLYGON ((471871.966884626832325 6683515.683521211147308,470695.876464393688366 6681756.129975977353752,469211.542374156008009 6679924.978601523675025,464542.357652322971262 6674631.078279769048095,463243.59315323777264 6673494.345109832473099,459502.033748187706806 6670774.304660517722368,452204.484529234410729 6666030.372161027044058,439990.287360413349234 6659313.515823394991457,434547.988775020290632 6657783.034025833010674,433867.715366783668287 6657685.311832630075514,433063.65468478546245 6657783.034025833010674,423725.285241116478574 6659758.338574352674186,422581.143514745577704 6660350.880751021206379,422333.791606202081311 6660844.461689073592424,421993.599242338153999 6662622.453031159006059,421993.599242338153999 6663363.130126810632646,422612.090333183819894 6667314.244697011075914,422241.062470370030496 6667759.324870104901493,421096.80942450783914 6668303.522556710988283,408449.802075482031796 6673245.655735924839973,401646.845354124438018 6675273.665065255947411,400842.895991614612285 6675372.844085373915732,400255.351719210040756 6675224.699206517077982,392370.258227849320974 6672455.311684883199632,391968.283546594379004 6672009.975794731639326,391875.554410762328189 6671219.573235900141299,391937.336728153284639 6670527.121663697995245,392122.906319305824582 6669933.841785561293364,392339.311409408226609 6667957.501854715868831,392308.475910458364524 6665733.178529324010015,391937.336728153284639 6665289.631341196596622,387793.802641845482867 6664449.731981083750725,385814.7647345236619 6664202.740090588107705,384268.648326894966885 6664300.5401631873101,382846.319193030707538 6664646.406163938343525,382289.610419573145919 6664943.560305980034173,377186.502322628628463 6668957.888622742146254,376352.608017096004914 6669834.728738470934331,376197.985244384559337 6670428.001423852518201,375548.658654586179182 6676313.056885857135057,375243.086652359867003 6687692.866469252854586,379228.324422756850254 6689778.692146780900657,391782.713955441897269 6694388.125634397380054,393885.427817036863416 6694487.537080916576087,395215.139134563156404 6694091.147844122722745,405171.999669074953999 6689084.665672835893929,414263.128523688821588 6684478.40333267301321,415778.298112876422238 6683439.398042757064104,416396.677884233708028 6683192.009851422160864,419025.042381353967357 6682597.809754087589681,429909.63955213711597 6681508.792763692326844,430497.183824544539675 6681656.873437026515603,440979.806314075656701 6686955.330480101518333,467325.344922157470137 6687797.546342735178769,468129.294284664443694 6687698.216345063410699,468747.785375512961764 6687450.699095219373703,469211.542374156008009 6687054.651439971290529,469489.952420631831046 6686707.835750493220985,471871.966884626832325 6683515.683521211147308))";
+
+static std::string const erode_triangle ="POLYGON((-262.6446228027343700 -261.9999389648437500, -261.0000000000000000 -262.0000000000000000, -261.0000915527343700 -262.5285644531250000, -262.6446228027343700 -261.9999389648437500))";
+
+static std::string const forming_uu_a ="POLYGON((0 0,0 10,5 6,10 10,10 0,5 4,0 0))";
+static std::string const forming_uu_b ="POLYGON((0 0,0 10,5 6,10 10,10 0,5 4,0 0),(1.25 2.5, 4.25 5,1.25 7.5,1.25 5.5,2.25 5.0,1.25 4.5,1.25 2.5))";
+
+// Ticket 10398, fails at next distances ( /10.0 ):
+// #1: 5,25,84
+// #2: 5,13,45,49,60,62,66,73
+// #3: 4,8,12,35,45,54
+// #4: 6,19,21,23,30,43,45,66,78,91
+
+static std::string const ticket_10398_1
+ = "POLYGON((897866.5 6272518.7,897882.5 6272519.2,897882.6 6272519,897883.3 6272508.7,897883.5 6272505.5,897855 6272503.5,897852.4 6272505.6,897850.1 6272517.6,897860.8 6272518.5,897866.5 6272518.7))";
+static std::string const ticket_10398_2
+ = "POLYGON((898882.3 6271337.3,898895.7 6271339.9,898898 6271328.3,898881.6 6271325.1,898879.3 6271336.7,898882.3 6271337.3))";
+static std::string const ticket_10398_3
+ = "POLYGON((897558.7 6272055,897552.5 6272054.2,897552.5 6272053.7,897546.1 6272052.7,897545.6 6272057.7,897560.7 6272059.6,897560.9 6272055.3,897558.7 6272055))";
+static std::string const ticket_10398_4
+ = "POLYGON((898563.3 6272366.9,898554.7 6272379.2,898559.7 6272382.3,898561.6 6272379.4,898568.7 6272369.1,898563.8 6272366.2,898563.3 6272366.9))";
+
+static std::string const ticket_10412
+ = "POLYGON((897747.8 6270564.3,897764.3 6270569.7,897776.5 6270529.5,897768.1 6270527.1,897767.6 6270529.4,897756.3 6270525.8,897745.8 6270522.3,897752 6270502.9,897749.7 6270502,897750.7 6270499.1,897751.8 6270498.6,897752.3 6270499.3,897754.6 6270497.9,897755.8 6270500.2,897766.8 6270494.1,897765.6 6270491.5,897768.3 6270490.5,897770.9 6270491.5,897770.2 6270494.6,897780.1 6270497.5,897781 6270494.6,897786.8 6270496.6,897790.8 6270482.5,897785.3 6270480.7,897785.9 6270478.2,897768.9 6270473.2,897768.1 6270475.8,897766.1 6270475.2,897758.7 6270479.2,897753.2 6270481.8,897751.9 6270479,897746.5 6270481.9,897748 6270484.6,897745.2 6270486.1,897743.9 6270483.3,897741.4 6270484.7,897742.6 6270487.3,897739.4 6270488.9,897738.3 6270486.3,897735.6 6270487.8,897733.1 6270496.8,897731.2 6270502.7,897732.4 6270503.2,897731.5 6270506.1,897730.3 6270505.7,897725.8 6270520.2,897726.8 6270520.7,897726 6270523,897728 6270523.7,897726.3 6270529.6,897742.8 6270534.5,897741.2 6270539.9,897751.4 6270543.4,897750.7 6270546.4,897753.2 6270547.2,897747.8 6270564.3))";
+
+static std::string const ticket_11580
+ = "POLYGON((14.02 474.96,14.02 494.96,14.022 494.96,14.022 486.24,14.02 474.96))";
+
+static std::string const issue_369
+ = "POLYGON((-0.0149622653 -0.0269554816,-0.0149539290 -0.0271028206,-0.0149470828 -0.0271355230,-0.0149622653 -0.0269554816))";
+
+static std::string const issue_555
+ = "POLYGON((100.0637755102041 100.0770239202989,100.0360264929713 100.1,100 100.1,0 100.1,-0.0999999999999943 100.1,-0.09999999999999432 100,-0.1000000000000014 0,-0.1000000000000014 -0.1000000000000014,-1.836970198721056e-17 -0.1000000000000014,100 -0.1000000000000014,100.0360264929713 -0.1000000000000012,100.0637755102041 -0.07702392029888726,101.1041649480706 0.7844145387331185,103.4026139046043 2.203948968996805,105.8748306243106 3.293026604107826,108.4735936784235 4.030845140790255,111.1492644962378 4.403311621418428,113.8507355037622 4.403311621418428,116.5264063215765 4.030845140790252,119.1251693756894 3.293026604107823,121.5973860953957 2.203948968996801,123.8958350519294 0.7844145387331167,124.9362244897959 -0.07702392029888117,124.9639735070287 -0.09999999999999432,125 -0.09999999999999432,135 -0.1000000000000014,135.1 -0.0999999999999943,135.1 0,135.1 100,135.1 100.1,135 100.1,125 100.1,124.9639735070287 100.1,124.9362244897959 100.0770239202989,123.8958350519294 99.21558546126688,121.5973860953958 97.7960510310032,119.1251693756894 96.70697339589218,116.5264063215765 95.96915485920975,113.8507355037622 95.59668837858158,111.1492644962378 95.59668837858158,108.4735936784235 95.96915485920975,105.8748306243106 96.70697339589218,103.4026139046043 97.7960510310032,101.1041649480706 99.21558546126688,100.0637755102041 100.0770239202989),(124.9 71.15855631858324,124.9 28.84144368141676,124.9 27.45166011926875,124.5057975806765 24.70018817664119,123.7253617444602 22.03243382063001,122.574469398775 19.50232706258395,121.0763864178284 17.16101529763987,119.2613973111302 15.0558293341122,117.1661930067267 13.22932657712651,114.8331291254269 11.71843070902665,112.3093697403817 10.55368525835367,109.6459339313539 9.758636146879443,106.8966644080684 9.349355696820595,104.1171390524456 9.33411772066918,101.3635473834475 9.7132302618644,100.0275510204082 10.0961298147011,100.014047339233 10.09999999999999,100 10.09999999999999,29.6 10.1,28.20533247460344 10.1,25.44438883273841 10.49696376664363,22.76804145044581 11.28281026239098,20.2307730424806 12.44154191878281,17.88423507675108 13.94957030080114,15.77619629938279 15.77619629938281,13.94957030080113 17.88423507675109,12.44154191878281 20.23077304248061,11.28281026239098 22.76804145044582,10.49696376664362 25.44438883273843,10.1 28.20533247460346,10.1 29.6,10.1 70.40000000000001,10.1 71.79466752539656,10.49696376664363 74.5556111672616,11.28281026239098 77.23195854955421,12.44154191878281 79.76922695751941,13.94957030080114 82.11576492324893,15.77619629938281 84.22380370061721,17.88423507675109 86.05042969919887,20.23077304248062 87.5584580812172,22.76804145044583 88.71718973760903,25.44438883273843 89.50303623335638,28.20533247460346 89.90000000000001,29.6 89.90000000000001,100 89.90000000000001,100.014047339233 89.90000000000001,100.0275510204082 89.9038701852989,101.3635473834475 90.2867697381356,104.1171390524456 90.66588227933082,106.8966644080684 90.6506443031794,109.6459339313539 90.24136385312056,112.3093697403817 89.44631474164633,114.8331291254269 88.28156929097335,117.1661930067267 86.77067342287347,119.2613973111302 84.94417066588778,121.0763864178284 82.83898470236012,122.574469398775 80.49767293741604,123.7253617444602 77.96756617936998,124.5057975806765 75.29981182335879,124.9 72.54833988073125,124.9 71.15855631858324))";
+
+// CCW Polygons not working in 1.56
+static std::string const mysql_report_2014_10_24
+ = "POLYGON((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))";
+static std::string const mysql_report_2014_10_28_1
+ = "POLYGON((0 0,10 10,0 8,0 0))";
+static std::string const mysql_report_2014_10_28_2
+ = "POLYGON((1 1,10 10,0 8,1 1))";
+static std::string const mysql_report_2014_10_28_3
+ = "POLYGON((2 2,8 2,8 8,2 8,2 2))";
+
+// Polygons having problems with negative distances in 1.57
+static std::string const mysql_report_2015_02_17_1
+ = "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))";
+static std::string const mysql_report_2015_02_17_2
+ = "POLYGON((0 0,0 10,10 10,10 0,0 0))";
+static std::string const mysql_report_2015_02_17_3
+ = "POLYGON((10 10,10 20,20 20,20 10,10 10))";
+
+// Polygons causing assertion failure
+static std::string const mysql_report_2015_07_05_0
+ = "POLYGON((0 0,0 30000,30000 20000,25000 0,0 0),(-11 3,4.99294e+306 1.78433e+307,15 -14,-11 3))";
+static std::string const mysql_report_2015_07_05_1
+ = "POLYGON((9192 27876,128 4.5036e+15,-1 5,3 9,9192 27876),(-11 3,4.99294e+306 1.78433e+307,15 -14,-11 3))";
+static std::string const mysql_report_2015_07_05_2
+ = "POLYGON((-15 -15,1.31128e+308 2.47964e+307,-20 -9,-15 -15),(11 -4,1.04858e+06 5.36871e+08,7.03687e+13 -1.15292e+18,-12 17,10284 -21812,11 -4),(-28066 -10001,2.19902e+12 3.35544e+07,8.80784e+306 1.04773e+308,1.42177e+308 1.6141e+308,-28066 -10001))";
+static std::string const mysql_report_2015_07_05_3
+ = "POLYGON((-2.68435e+08 -12,27090 -14130,5.76461e+17 5.49756e+11,-2.68435e+08 -12),(2.68435e+08 65539,1.42845e+308 1.63164e+308,-1 -8,-4 10,2.68435e+08 65539),(13 17,8.79609e+12 -2.2518e+15,1.02101e+308 3.13248e+306,17868 780,5 -4,13 17),(-1 14,1.35905e+308 2.09331e+307,1.37439e+11 -2047,-1 14))";
+static std::string const mysql_report_2015_07_05_4
+ = "POLYGON((2.19902e+12 524287,1.13649e+308 1.36464e+308,-10 -19,2.19902e+12 524287),(1.44115e+17 -1.09951e+12,-14 0,-4347 16243,1.44115e+17 -1.09951e+12))";
+static std::string const mysql_report_2015_07_05_5
+ = "POLYGON((9 3,-8193 8.38861e+06,-2 -4,9 3),(-10 -2,32268 -2557,1.72036e+308 5.67867e+307,4.91634e+307 1.41031e+308,-2.68435e+08 -19,-10 -2),(-5 4,9.50167e+307 1.05883e+308,-422 -25737,-5 4))";
+
+// Versions without interiors
+static std::string const mysql_report_2015_07_05_0_wi
+ = "POLYGON((0 0,0 30000,30000 20000,25000 0,0 0))";
+static std::string const mysql_report_2015_07_05_1_wi
+ = "POLYGON((9192 27876,128 4.5036e+15,-1 5,3 9,9192 27876))";
+static std::string const mysql_report_2015_07_05_2_wi
+ = "POLYGON((-15 -15,1.31128e+308 2.47964e+307,-20 -9,-15 -15))";
+static std::string const mysql_report_2015_07_05_3_wi
+ = "POLYGON((-2.68435e+08 -12,27090 -14130,5.76461e+17 5.49756e+11,-2.68435e+08 -12))";
+static std::string const mysql_report_2015_07_05_4_wi
+ = "POLYGON((2.19902e+12 524287,1.13649e+308 1.36464e+308,-10 -19,2.19902e+12 524287))";
+static std::string const mysql_report_2015_07_05_5_wi
+ = "POLYGON((9 3,-8193 8.38861e+06,-2 -4,9 3))";
+
+class buffer_custom_side_strategy
+{
+public :
+ template
+ <
+ typename Point,
+ typename OutputRange,
+ typename DistanceStrategy
+ >
+ static inline bg::strategy::buffer::result_code apply(
+ Point const& input_p1, Point const& input_p2,
+ bg::strategy::buffer::buffer_side_selector side,
+ DistanceStrategy const& distance,
+ OutputRange& output_range)
+ {
+ // Generate a block along (left or right of) the segment
+
+ double const dx = bg::get<0>(input_p2) - bg::get<0>(input_p1);
+ double const dy = bg::get<1>(input_p2) - bg::get<1>(input_p1);
+
+ // For normalization [0,1] (=dot product d.d, sqrt)
+ double const length = bg::math::sqrt(dx * dx + dy * dy);
+
+ if (bg::math::equals(length, 0))
+ {
+ return bg::strategy::buffer::result_no_output;
+ }
+
+ // Generate the perpendicular p, to the left (ccw), and use an adapted distance
+ double const d = 1.1 * distance.apply(input_p1, input_p2, side);
+ double const px = d * -dy / length;
+ double const py = d * dx / length;
+
+ output_range.resize(2);
+
+ bg::set<0>(output_range.front(), bg::get<0>(input_p1) + px);
+ bg::set<1>(output_range.front(), bg::get<1>(input_p1) + py);
+ bg::set<0>(output_range.back(), bg::get<0>(input_p2) + px);
+ bg::set<1>(output_range.back(), bg::get<1>(input_p2) + py);
+
+ return bg::strategy::buffer::result_normal;
+ }
+};
+
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P, Clockwise, true> polygon_type;
+
+ bg::strategy::buffer::join_miter join_miter(10.0);
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::join_round join_round_rough(12);
+ bg::strategy::buffer::end_flat end_flat;
+ bg::strategy::buffer::end_round end_round(100);
+
+ test_one<polygon_type, polygon_type>("simplex", simplex, join_round, end_flat, 47.9408, 1.5);
+ test_one<polygon_type, polygon_type>("simplex", simplex, join_miter, end_flat, 52.8733, 1.5);
+
+ test_one<polygon_type, polygon_type>("simplex", simplex, join_round, end_flat, 7.04043, -0.5);
+ test_one<polygon_type, polygon_type>("simplex", simplex, join_miter, end_flat, 7.04043, -0.5);
+
+ test_one<polygon_type, polygon_type>("square_simplex", square_simplex, join_round, end_flat, 14.0639, 1.5);
+ test_one<polygon_type, polygon_type>("square_simplex", square_simplex, join_miter, end_flat, 16.0000, 1.5);
+
+ test_one<polygon_type, polygon_type>("square_simplex01", square_simplex, join_miter, end_flat, 0.6400, -0.1);
+ test_one<polygon_type, polygon_type>("square_simplex04", square_simplex, join_miter, end_flat, 0.0400, -0.4);
+ test_one<polygon_type, polygon_type>("square_simplex05", square_simplex, join_miter, end_flat, 0.0, -0.5);
+ test_one<polygon_type, polygon_type>("square_simplex06", square_simplex, join_miter, end_flat, 0.0, -0.6);
+
+ test_one<polygon_type, polygon_type>("concave_simplex", concave_simplex, join_round, end_flat, 14.5616, 0.5);
+ test_one<polygon_type, polygon_type>("concave_simplex", concave_simplex, join_miter, end_flat, 16.3861, 0.5);
+
+ test_one<polygon_type, polygon_type>("concave_simplex", concave_simplex, join_round, end_flat, 0.777987, -0.5);
+ test_one<polygon_type, polygon_type>("concave_simplex", concave_simplex, join_miter, end_flat, 0.724208, -0.5);
+
+ test_one<polygon_type, polygon_type>("concave_b10", concave_b, join_miter, end_flat, 836.9106, 10.0);
+ test_one<polygon_type, polygon_type>("concave_b25", concave_b, join_miter, end_flat, 4386.6479, 25.0);
+ test_one<polygon_type, polygon_type>("concave_b50", concave_b, join_miter, end_flat, 16487.2000, 50.0);
+ test_one<polygon_type, polygon_type>("concave_b75", concave_b, join_miter, end_flat, 36318.1506, 75.0);
+ test_one<polygon_type, polygon_type>("concave_b100", concave_b, join_miter, end_flat, 63879.5186, 100.0);
+
+ test_one<polygon_type, polygon_type>("concave_b10", concave_b, join_round, end_flat, 532.2875, 10.0);
+ test_one<polygon_type, polygon_type>("concave_b25", concave_b, join_round, end_flat, 2482.8329, 25.0);
+ test_one<polygon_type, polygon_type>("concave_b50", concave_b, join_round, end_flat, 8872.9719, 50.0);
+ test_one<polygon_type, polygon_type>("concave_b75", concave_b, join_round, end_flat, 19187.5490, 75.0);
+ test_one<polygon_type, polygon_type>("concave_b100", concave_b, join_round, end_flat, 33426.6139, 100.0);
+
+ test_one<polygon_type, polygon_type>("concave_b_rough_10", concave_b, join_round_rough, end_flat, 520.312, 10.0);
+ test_one<polygon_type, polygon_type>("concave_b_rough_25", concave_b, join_round_rough, end_flat, 2409.384, 25.0);
+ test_one<polygon_type, polygon_type>("concave_b_rough_50", concave_b, join_round_rough, end_flat, 8586.812, 50.0);
+ test_one<polygon_type, polygon_type>("concave_b_rough_75", concave_b, join_round_rough, end_flat, 18549.018, 75.0);
+ test_one<polygon_type, polygon_type>("concave_b_rough_100", concave_b, join_round_rough, end_flat, 32295.917, 100.0);
+
+ test_one<polygon_type, polygon_type>("spike_simplex15", spike_simplex, join_round, end_round, 50.3633, 1.5);
+ test_one<polygon_type, polygon_type>("spike_simplex15", spike_simplex, join_miter, end_flat, 51.5509, 1.5);
+ test_one<polygon_type, polygon_type>("spike_simplex30", spike_simplex, join_round, end_round, 100.9199, 3.0);
+ test_one<polygon_type, polygon_type>("spike_simplex30", spike_simplex, join_miter, end_flat, 106.6979, 3.0);
+ test_one<polygon_type, polygon_type>("spike_simplex150", spike_simplex, join_round, end_round, 998.9821, 15.0);
+ test_one<polygon_type, polygon_type>("spike_simplex150", spike_simplex, join_miter, end_flat, 1428.1560, 15.0);
+
+ test_one<polygon_type, polygon_type>("join_types", join_types, join_round, end_flat, 88.2060, 1.5);
+
+ test_one<polygon_type, polygon_type>("chained_box", chained_box, join_round, end_flat, 83.1403, 1.0);
+ test_one<polygon_type, polygon_type>("chained_box", chained_box, join_miter, end_flat, 84, 1.0);
+ test_one<polygon_type, polygon_type>("L", letter_L, join_round, end_flat, 13.7314, 0.5);
+ test_one<polygon_type, polygon_type>("L", letter_L, join_miter, end_flat, 14.0, 0.5);
+
+ test_one<polygon_type, polygon_type>("chained_box", chained_box, join_miter, end_flat, 84, 1.0);
+ test_one<polygon_type, polygon_type>("chained_box", chained_box, join_round, end_flat, 83.1403, 1.0);
+
+ test_one<polygon_type, polygon_type>("indentation4", indentation, join_miter, end_flat, 25.7741, 0.4);
+ test_one<polygon_type, polygon_type>("indentation4", indentation, join_round, end_flat, 25.5695, 0.4);
+ test_one<polygon_type, polygon_type>("indentation5", indentation, join_miter, end_flat, 28.2426, 0.5);
+ test_one<polygon_type, polygon_type>("indentation5", indentation, join_round, end_flat, 27.9953, 0.5);
+ test_one<polygon_type, polygon_type>("indentation6", indentation, join_miter, end_flat, 30.6712, 0.6);
+
+ // SQL Server gives 30.34479159164
+ test_one<polygon_type, polygon_type>("indentation6", indentation, join_round, end_flat, 30.3445, 0.6);
+
+ test_one<polygon_type, polygon_type>("indentation7", indentation, join_miter, end_flat, 33.0958, 0.7);
+ test_one<polygon_type, polygon_type>("indentation7", indentation, join_round, end_flat, 32.6533, 0.7);
+
+ test_one<polygon_type, polygon_type>("indentation8", indentation, join_miter, end_flat, 35.5943, 0.8);
+ test_one<polygon_type, polygon_type>("indentation8", indentation, join_round, end_flat, 35.0164, 0.8);
+ test_one<polygon_type, polygon_type>("indentation12", indentation, join_miter, end_flat, 46.3541, 1.2);
+ test_one<polygon_type, polygon_type>("indentation12", indentation, join_round, end_flat, 45.0537, 1.2);
+
+ // Indentation - deflated
+ test_one<polygon_type, polygon_type>("indentation4", indentation, join_miter, end_flat, 6.991, -0.4);
+ test_one<polygon_type, polygon_type>("indentation4", indentation, join_round, end_flat, 7.255, -0.4);
+ test_one<polygon_type, polygon_type>("indentation8", indentation, join_miter, end_flat, 1.369, -0.8);
+ test_one<polygon_type, polygon_type>("indentation8", indentation, join_round, end_flat, 1.374, -0.8);
+ test_one<polygon_type, polygon_type>("indentation12", indentation, join_miter, end_flat, 0, -1.2);
+ test_one<polygon_type, polygon_type>("indentation12", indentation, join_round, end_flat, 0, -1.2);
+
+ test_one<polygon_type, polygon_type>("donut_simplex6", donut_simplex, join_miter, end_flat, 53.648, 0.6);
+ test_one<polygon_type, polygon_type>("donut_simplex6", donut_simplex, join_round, end_flat, 52.820, 0.6);
+ test_one<polygon_type, polygon_type>("donut_simplex8", donut_simplex, join_miter, end_flat, 61.132, 0.8);
+ test_one<polygon_type, polygon_type>("donut_simplex8", donut_simplex, join_round, end_flat, 59.6713, 0.8);
+ test_one<polygon_type, polygon_type>("donut_simplex10", donut_simplex, join_miter, end_flat, 68.670, 1.0);
+ test_one<polygon_type, polygon_type>("donut_simplex10", donut_simplex, join_round, end_flat, 66.387, 1.0);
+ test_one<polygon_type, polygon_type>("donut_simplex12", donut_simplex, join_miter, end_flat, 76.605, 1.2);
+ test_one<polygon_type, polygon_type>("donut_simplex12", donut_simplex, join_round, end_flat, 73.3179, 1.2);
+ test_one<polygon_type, polygon_type>("donut_simplex14", donut_simplex, join_miter, end_flat, 84.974, 1.4);
+ test_one<polygon_type, polygon_type>("donut_simplex14", donut_simplex, join_round, end_flat, 80.500, 1.4);
+ test_one<polygon_type, polygon_type>("donut_simplex16", donut_simplex, join_miter, end_flat, 93.777, 1.6);
+ test_one<polygon_type, polygon_type>("donut_simplex16", donut_simplex, join_round, end_flat, 87.933, 1.6);
+
+ test_one<polygon_type, polygon_type>("donut_simplex3", donut_simplex, join_miter, end_flat, 19.7636, -0.3);
+ test_one<polygon_type, polygon_type>("donut_simplex3", donut_simplex, join_round, end_flat, 19.8861, -0.3);
+ test_one<polygon_type, polygon_type>("donut_simplex6", donut_simplex, join_miter, end_flat, 12.8920, -0.6);
+ test_one<polygon_type, polygon_type>("donut_simplex6", donut_simplex, join_round, end_flat, 12.9157, -0.6);
+
+ test_one<polygon_type, polygon_type>("donut_diamond1", donut_diamond, join_miter, end_flat, 280.0, 1.0);
+ test_one<polygon_type, polygon_type>("donut_diamond4", donut_diamond, join_miter, end_flat, 529.0, 4.0);
+ test_one<polygon_type, polygon_type>("donut_diamond5", donut_diamond, join_miter, end_flat, 625.0, 5.0);
+ test_one<polygon_type, polygon_type>("donut_diamond6", donut_diamond, join_miter, end_flat, 729.0, 6.0);
+
+ test_one<polygon_type, polygon_type>("donut_diamond1", donut_diamond, join_miter, end_flat, 122.0417, -1.0);
+ test_one<polygon_type, polygon_type>("donut_diamond2", donut_diamond, join_miter, end_flat, 56.3750, -2.0);
+ test_one<polygon_type, polygon_type>("donut_diamond3", donut_diamond, join_miter, end_flat, 17.7084, -3.0);
+
+ test_one<polygon_type, polygon_type>("arrow4", arrow, join_miter, end_flat, 28.265, 0.4);
+ test_one<polygon_type, polygon_type>("arrow4", arrow, join_round, end_flat, 27.039, 0.4);
+ test_one<polygon_type, polygon_type>("arrow5", arrow, join_miter, end_flat, 31.500, 0.5);
+ test_one<polygon_type, polygon_type>("arrow5", arrow, join_round, end_flat, 29.621, 0.5);
+ test_one<polygon_type, polygon_type>("arrow6", arrow, join_miter, end_flat, 34.903, 0.6);
+ test_one<polygon_type, polygon_type>("arrow6", arrow, join_round, end_flat, 32.268, 0.6);
+
+ test_one<polygon_type, polygon_type>("tipped_aitch3", tipped_aitch, join_miter, end_flat, 55.36, 0.3);
+ test_one<polygon_type, polygon_type>("tipped_aitch9", tipped_aitch, join_miter, end_flat, 77.44, 0.9);
+ test_one<polygon_type, polygon_type>("tipped_aitch13", tipped_aitch, join_miter, end_flat, 92.16, 1.3);
+
+ // SQL Server: 55.205415532967 76.6468846383224 90.642916957136
+ test_one<polygon_type, polygon_type>("tipped_aitch3", tipped_aitch, join_round, end_flat, 55.2053, 0.3);
+ test_one<polygon_type, polygon_type>("tipped_aitch9", tipped_aitch, join_round, end_flat, 76.6457, 0.9);
+ test_one<polygon_type, polygon_type>("tipped_aitch13", tipped_aitch, join_round, end_flat, 90.641, 1.3);
+
+ test_one<polygon_type, polygon_type>("snake4", snake, join_miter, end_flat, 64.44, 0.4);
+ test_one<polygon_type, polygon_type>("snake5", snake, join_miter, end_flat, 72, 0.5);
+ test_one<polygon_type, polygon_type>("snake6", snake, join_miter, end_flat, 75.44, 0.6);
+ test_one<polygon_type, polygon_type>("snake16", snake, join_miter, end_flat, 114.24, 1.6);
+
+ test_one<polygon_type, polygon_type>("funnelgate2", funnelgate, join_miter, end_flat, 120.982, 2.0);
+ test_one<polygon_type, polygon_type>("funnelgate3", funnelgate, join_miter, end_flat, 13.0*13.0, 3.0);
+ test_one<polygon_type, polygon_type>("funnelgate4", funnelgate, join_miter, end_flat, 15.0*15.0, 4.0);
+ test_one<polygon_type, polygon_type>("gammagate1", gammagate, join_miter, end_flat, 88.0, 1.0);
+ test_one<polygon_type, polygon_type>("fork_a1", fork_a, join_miter, end_flat, 88.0, 1.0);
+ test_one<polygon_type, polygon_type>("fork_b1", fork_b, join_miter, end_flat, 154.0, 1.0);
+ test_one<polygon_type, polygon_type>("fork_c1", fork_c, join_miter, end_flat, 152.0, 1.0);
+ test_one<polygon_type, polygon_type>("triangle", triangle, join_miter, end_flat, 14.6569, 1.0);
+
+ test_one<polygon_type, polygon_type>("degenerate0", degenerate0, join_round, end_round, 0.0, 1.0);
+ test_one<polygon_type, polygon_type>("degenerate1", degenerate1, join_round, end_round, 3.1389, 1.0);
+ test_one<polygon_type, polygon_type>("degenerate2", degenerate2, join_round, end_round, 3.1389, 1.0);
+ test_one<polygon_type, polygon_type>("degenerate3", degenerate3, join_round, end_round, 143.1395, 1.0);
+
+ test_one<polygon_type, polygon_type>("gammagate2", gammagate, join_miter, end_flat, 130.0, 2.0);
+
+ test_one<polygon_type, polygon_type>("flower1", flower, join_miter, end_flat, 67.614, 0.1);
+ test_one<polygon_type, polygon_type>("flower20", flower, join_miter, end_flat, 74.894, 0.20);
+ test_one<polygon_type, polygon_type>("flower25", flower, join_miter, end_flat, 78.226, 0.25);
+ test_one<polygon_type, polygon_type>("flower30", flower, join_miter, end_flat, 81.492, 0.30);
+ test_one<polygon_type, polygon_type>("flower35", flower, join_miter, end_flat, 84.694, 0.35);
+ test_one<polygon_type, polygon_type>("flower40", flower, join_miter, end_flat, 87.831, 0.40);
+ test_one<polygon_type, polygon_type>("flower45", flower, join_miter, end_flat, 90.902, 0.45);
+ test_one<polygon_type, polygon_type>("flower50", flower, join_miter, end_flat, 93.908, 0.50);
+ test_one<polygon_type, polygon_type>("flower55", flower, join_miter, end_flat, 96.849, 0.55);
+ test_one<polygon_type, polygon_type>("flower60", flower, join_miter, end_flat, 99.724, 0.60);
+
+ test_one<polygon_type, polygon_type>("flower10", flower, join_round, end_flat, 67.486, 0.10);
+ test_one<polygon_type, polygon_type>("flower20", flower, join_round, end_flat, 74.702, 0.20);
+ test_one<polygon_type, polygon_type>("flower25", flower, join_round, end_flat, 78.071, 0.25);
+ test_one<polygon_type, polygon_type>("flower30", flower, join_round, end_flat, 81.352, 0.30);
+ test_one<polygon_type, polygon_type>("flower35", flower, join_round, end_flat, 84.547, 0.35);
+ test_one<polygon_type, polygon_type>("flower40", flower, join_round, end_flat, 87.665, 0.40);
+ test_one<polygon_type, polygon_type>("flower45", flower, join_round, end_flat, 90.709, 0.45);
+ test_one<polygon_type, polygon_type>("flower50", flower, join_round, end_flat, 93.680, 0.50);
+ test_one<polygon_type, polygon_type>("flower55", flower, join_round, end_flat, 96.580, 0.55);
+ test_one<polygon_type, polygon_type>("flower60", flower, join_round, end_flat, 99.408, 0.60);
+
+ // Flower - deflated
+ test_one<polygon_type, polygon_type>("flower60", flower, join_round, end_flat, 19.3210, -0.60);
+
+ // Saw
+ {
+ // SQL Server:
+ // 68.6258859984014 90.2254986930165 112.799509089077 136.392823913949 161.224547934625 187.427508982734
+ //215.063576036522 244.167935815974 274.764905445676 306.878264367143 340.530496138041 375.720107548269
+ int const n = 12;
+ double expected_round[n] =
+ {
+ 68.6252, 90.222, 112.792, 136.397, 161.230, 187.435,
+ 215.073, 244.179, 274.779, 306.894, 340.543, 375.734
+ };
+ double expected_miter[n] =
+ {
+ 70.7706, 98.804, 132.101, 170.661, 214.484, 263.57,
+ 317.92, 377.532, 442.408, 512.546, 587.948, 668.613
+ };
+
+ for (int i = 1; i <= n; i++)
+ {
+ std::ostringstream out;
+ out << "saw_" << i;
+ test_one<polygon_type, polygon_type>(out.str(), saw, join_round, end_flat, expected_round[i - 1], double(i) / 2.0, ut_settings(0.1));
+ test_one<polygon_type, polygon_type>(out.str(), saw, join_miter, end_flat, expected_miter[i - 1], double(i) / 2.0);
+ }
+ }
+
+ // Bowl
+ {
+ // SQL Server values - see query below.
+ //1 43.2425133175081 60.0257800296593 78.3497997564532 98.2145746255142 119.620102487345 142.482792724034
+ //2 166.499856911107 191.763334982583 218.446279387336 246.615018368511 276.300134755606 307.518458532186
+
+ int const n = 12;
+ double expected_round[n] =
+ {
+ 43.2423, 60.025, 78.3477, 98.2109, 119.614, 142.487,
+ 166.505, 191.77, 218.455, 246.625, 276.312, 307.532
+ };
+ double expected_miter[n] =
+ {
+ 43.4895, 61.014, 80.5726, 102.166, 125.794, 151.374,
+ 178.599, 207.443, 237.904, 270.000, 304.0, 340.000
+ };
+
+ for (int i = 1; i <= n; i++)
+ {
+ std::ostringstream out;
+ out << "bowl_" << i;
+ test_one<polygon_type, polygon_type>(out.str(), bowl, join_round, end_flat, expected_round[i - 1], double(i) / 2.0, ut_settings(0.1));
+ test_one<polygon_type, polygon_type>(out.str(), bowl, join_miter, end_flat, expected_miter[i - 1], double(i) / 2.0);
+ }
+ }
+
+ {
+ ut_settings settings;
+ settings.use_ln_area = true;
+ test_one<polygon_type, polygon_type>("county1", county1, join_round, end_flat, 0.00114, 0.01, settings);
+ test_one<polygon_type, polygon_type>("county1", county1, join_miter, end_flat, 0.00133, 0.01, settings);
+ test_one<polygon_type, polygon_type>("county1", county1, join_round, end_flat, 3.94411e-05, -0.003, settings);
+ test_one<polygon_type, polygon_type>("county1", county1, join_miter, end_flat, 3.94301e-05, -0.003, settings);
+ }
+
+ test_one<polygon_type, polygon_type>("parcel1_10", parcel1, join_round, end_flat, 7571.405, 10.0);
+ test_one<polygon_type, polygon_type>("parcel1_10", parcel1, join_miter, end_flat, 8207.453, 10.0);
+ test_one<polygon_type, polygon_type>("parcel1_20", parcel1, join_round, end_flat, 11648.111, 20.0);
+ test_one<polygon_type, polygon_type>("parcel1_20", parcel1, join_miter, end_flat, 14184.022, 20.0);
+ test_one<polygon_type, polygon_type>("parcel1_30", parcel1, join_round, end_flat, 16350.488, 30.0);
+ test_one<polygon_type, polygon_type>("parcel1_30", parcel1, join_miter, end_flat, 22417.799, 30.0);
+
+ test_one<polygon_type, polygon_type>("parcel2_10", parcel2, join_round, end_flat, 5000.867, 10.0);
+ test_one<polygon_type, polygon_type>("parcel2_10", parcel2, join_miter, end_flat, 5091.122, 10.0);
+ test_one<polygon_type, polygon_type>("parcel2_20", parcel2, join_round, end_flat, 9049.673, 20.0);
+ test_one<polygon_type, polygon_type>("parcel2_20", parcel2, join_miter, end_flat, 9410.691, 20.0);
+ test_one<polygon_type, polygon_type>("parcel2_30", parcel2, join_round, end_flat, 13726.528, 30.0);
+ test_one<polygon_type, polygon_type>("parcel2_30", parcel2, join_miter, end_flat, 14535.232, 30.0);
+
+ test_one<polygon_type, polygon_type>("parcel3_10", parcel3, join_round, end_flat, 19993.007, 10.0);
+ test_one<polygon_type, polygon_type>("parcel3_10", parcel3, join_miter, end_flat, 20024.558, 10.0, ut_settings(0.05)); // MSVC 14 reports 20024.51456, so we increase the tolerance
+ test_one<polygon_type, polygon_type>("parcel3_20", parcel3, join_round, end_flat, 34505.837, 20.0);
+ test_one<polygon_type, polygon_type>("parcel3_20", parcel3, join_miter, end_flat, 34633.261, 20.0);
+ test_one<polygon_type, polygon_type>("parcel3_30", parcel3, join_round, end_flat, 45262.452, 30.0);
+ test_one<polygon_type, polygon_type>("parcel3_30", parcel3, join_miter, end_flat, 45567.388, 30.0);
+
+ test_one<polygon_type, polygon_type>("parcel3_bend_5", parcel3_bend, join_round, end_flat, 155.634, 5.0);
+ test_one<polygon_type, polygon_type>("parcel3_bend_10", parcel3_bend, join_round, end_flat, 458.454, 10.0);
+
+ // These cases differ a bit based on point order, because piece generation is different in one corner. Tolerance is increased
+ test_one<polygon_type, polygon_type>("parcel3_bend_15", parcel3_bend, join_round, end_flat, 918.06, 15.0, ut_settings(0.25));
+ test_one<polygon_type, polygon_type>("parcel3_bend_20", parcel3_bend, join_round, end_flat, 1534.64, 20.0, ut_settings(0.25));
+
+ // Parcel - deflated
+ test_one<polygon_type, polygon_type>("parcel1_10", parcel1, join_round, end_flat, 1571.9024, -10.0);
+ test_one<polygon_type, polygon_type>("parcel1_10", parcel1, join_miter, end_flat, 1473.7325, -10.0);
+ test_one<polygon_type, polygon_type>("parcel1_20", parcel1, join_round, end_flat, 209.3579, -20.0);
+ test_one<polygon_type, polygon_type>("parcel1_20", parcel1, join_miter, end_flat, 188.4224, -20.0);
+
+ test_one<polygon_type, polygon_type>("nl_part1_2", nl_part1,
+ join_round, end_flat, BG_IF_RESCALED(1848737356.991, 1848737292.653), -0.2 * 1000.0);
+ test_one<polygon_type, polygon_type>("nl_part1_5", nl_part1,
+ join_round, end_flat, BG_IF_RESCALED(1775953811.679, 1775953824.799), -0.5 * 1000.0);
+
+ test_one<polygon_type, polygon_type>("italy_part1_30", italy_part1,
+ join_round, end_flat, BG_IF_RESCALED(5015638814.956, 5015638827.704), 30.0 * 1000.0);
+ test_one<polygon_type, polygon_type>("italy_part1_50", italy_part1,
+ join_round, end_flat, BG_IF_RESCALED(11363180044.822, 11363180033.564), 50.0 * 1000.0);
+ test_one<polygon_type, polygon_type>("italy_part1_60", italy_part1, join_round, end_flat, 15479097108.720, 60.0 * 1000.0);
+
+ {
+ ut_settings settings;
+ settings.test_validity = false;
+
+ // Tickets
+ test_one<polygon_type, polygon_type>("ticket_10398_1_5", ticket_10398_1, join_miter, end_flat, 494.7192, 0.5, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_1_25", ticket_10398_1, join_miter, end_flat, 697.7798, 2.5, settings);
+ {
+ // qcc-arm reports 1470.79863681712281
+ ut_settings specific = settings;
+ specific.tolerance = 0.02;
+ test_one<polygon_type, polygon_type>("ticket_10398_1_84", ticket_10398_1, join_miter, end_flat, 1470.8096, 8.4, specific);
+ }
+
+ test_one<polygon_type, polygon_type>("ticket_10398_2_45", ticket_10398_2, join_miter, end_flat, 535.4780, 4.5, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_2_62", ticket_10398_2, join_miter, end_flat, 705.2046, 6.2, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_2_73", ticket_10398_2, join_miter, end_flat, 827.3394, 7.3, settings);
+
+ test_one<polygon_type, polygon_type>("ticket_10398_3_12", ticket_10398_3, join_miter, end_flat, 122.9443, 1.2, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_3_35", ticket_10398_3, join_miter, end_flat, 258.2729, 3.5, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_3_54", ticket_10398_3, join_miter, end_flat, 402.0571, 5.4, settings);
+
+ test_one<polygon_type, polygon_type>("ticket_10398_4_30", ticket_10398_4, join_miter, end_flat, 257.9482, 3.0, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_4_66", ticket_10398_4, join_miter, end_flat, 553.0112, 6.6, settings);
+ test_one<polygon_type, polygon_type>("ticket_10398_4_91", ticket_10398_4, join_miter, end_flat, 819.1406, 9.1, settings);
+
+ test_one<polygon_type, polygon_type>("ticket_10412", ticket_10412, join_miter, end_flat, 3109.6616, 1.5, settings);
+ test_one<polygon_type, polygon_type>("ticket_11580_100", ticket_11580, join_miter, end_flat, 52.0221000, 1.00, settings);
+ #if defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Larger distance, resulting in only one circle. Not solved yet in non-rescaled mode.
+ test_one<polygon_type, polygon_type>("ticket_11580_237", ticket_11580, join_miter, end_flat, 999.999, 2.37, settings);
+ #endif
+ }
+
+ // Tickets - deflated
+ test_one<polygon_type, polygon_type>("ticket_10398_1_5", ticket_10398_1, join_miter, end_flat, 404.3936, -0.5);
+ test_one<polygon_type, polygon_type>("ticket_10398_1_25", ticket_10398_1, join_miter, end_flat, 246.7329, -2.5);
+
+ {
+ // Test issue 369 as reported (1.15e-3) and some variants
+ // Use high tolerance because output areas are very small
+ const double distance = 1.15e-3;
+ const double join_distance = 0.1e-3;
+ const int points_per_circle = 2 * 3.1415 * distance / join_distance;
+
+ ut_settings specific;
+ specific.use_ln_area = true;
+ specific.tolerance = 0.01;
+ bg::strategy::buffer::join_round jr(points_per_circle);
+ bg::strategy::buffer::end_round er(points_per_circle);
+ test_one<polygon_type, polygon_type>("issue_369", issue_369, jr, er, 4.566e-06, distance, specific);
+ test_one<polygon_type, polygon_type>("issue_369_10", issue_369, jr, er, 8.346e-08, distance / 10.0, specific);
+ test_one<polygon_type, polygon_type>("issue_369_100", issue_369, jr, er, 4.942e-09, distance / 100.0, specific);
+ test_one<polygon_type, polygon_type>("issue_369_1000", issue_369, jr, er, 7.881e-10, distance / 1000.0, specific);
+ }
+
+ {
+ // Test issue 555 as reported (-0.000001) and some variants
+ bg::strategy::buffer::join_round jr(180);
+ bg::strategy::buffer::end_round er(180);
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ // With rescaling the interior ring is missing
+ test_one<polygon_type, polygon_type>("issue_555", issue_555, jr, er, 4520.7942, -0.000001);
+#endif
+ test_one<polygon_type, polygon_type>("issue_555", issue_555, jr, er, 4520.7957, +0.000001);
+ test_one<polygon_type, polygon_type>("issue_555_1000", issue_555, jr, er, 4521.6280, +0.001);
+ test_one<polygon_type, polygon_type>("issue_555_1000", issue_555, jr, er, 4519.9627, -0.001);
+ }
+
+ {
+ bg::strategy::buffer::join_round join_round32(32);
+ bg::strategy::buffer::end_round end_round32(32);
+ test_one<polygon_type, polygon_type>("mysql_report_2014_10_24", mysql_report_2014_10_24,
+ join_round32, end_round32, 174.902, 1.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2014_10_28_1", mysql_report_2014_10_28_1,
+ join_round32, end_round32, 75.46, 1.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2014_10_28_2", mysql_report_2014_10_28_2,
+ join_round32, end_round32, 69.117, 1.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2014_10_28_3", mysql_report_2014_10_28_3,
+ join_round32, end_round32, 63.121, 1.0);
+
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_1_d1",
+ mysql_report_2015_02_17_1,
+ join_round32, end_round32, 48.879, -1);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_1_d5",
+ mysql_report_2015_02_17_1,
+ join_round32, end_round32, 0.0, -5.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_1_d6",
+ mysql_report_2015_02_17_1,
+ join_round32, end_round32, 0.0, -6.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_1_d10",
+ mysql_report_2015_02_17_1,
+ join_round32, end_round32, 0.0, -10.0);
+
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_2_d1",
+ mysql_report_2015_02_17_2,
+ join_round32, end_round32, 64.0, -1.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_2_d10",
+ mysql_report_2015_02_17_2,
+ join_round32, end_round32, 0.0, -10.0);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_02_17_3_d1",
+ mysql_report_2015_02_17_3,
+ join_round32, end_round32, 64.0, -1.0);
+
+ {
+ // These extreme testcases, containing huge coordinate differences
+ // and huge buffer distances, are to verify assertions.
+ // No assertions should be raised.
+
+ // The buffers themselves are most often wrong. Versions
+ // without interior rings might be smaller (or have no output)
+ // then their versions with interior rings.
+
+ // Therefore all checks on area, validity, self-intersections
+ // or having output at all are omitted.
+
+ // Details (for versions with interior rings)
+ // Case 3 is reported as invalid
+ // On MinGW, also case 2 and 4 are reported as invalid
+ // On PowerPC, also case 1 is reported as invalid
+
+ ut_settings settings = ut_settings::assertions_only();
+ const double no_area = ut_settings::ignore_area();
+
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_0", mysql_report_2015_07_05_0,
+ join_round32, end_round32, no_area, 6.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_1", mysql_report_2015_07_05_1,
+ join_round32, end_round32, no_area, 6.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_2", mysql_report_2015_07_05_2,
+ join_round32, end_round32, no_area, 549755813889.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_3", mysql_report_2015_07_05_3,
+ join_round32, end_round32, no_area, 49316.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_4", mysql_report_2015_07_05_4,
+ join_round32, end_round32, no_area, 1479986.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_5", mysql_report_2015_07_05_5,
+ join_round32, end_round32, no_area, 38141.0, settings);
+
+ // Versions without interior rings (area should be smaller but still no checks)
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_0_wi", mysql_report_2015_07_05_0_wi,
+ join_round32, end_round32, no_area, 6.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_1_wi", mysql_report_2015_07_05_1_wi,
+ join_round32, end_round32, no_area, 6.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_2_wi", mysql_report_2015_07_05_2_wi,
+ join_round32, end_round32, no_area, 549755813889.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_3_wi", mysql_report_2015_07_05_3_wi,
+ join_round32, end_round32, no_area, 49316.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_4_wi", mysql_report_2015_07_05_4_wi,
+ join_round32, end_round32, no_area, 1479986.0, settings);
+ test_one<polygon_type, polygon_type>("mysql_report_2015_07_05_5_wi", mysql_report_2015_07_05_5_wi,
+ join_round32, end_round32, no_area, 38141.0, settings);
+ }
+ }
+
+
+ {
+ using bg::strategy::buffer::join_round;
+ using bg::strategy::buffer::join_miter;
+ bg::strategy::buffer::side_straight side_strategy;
+ bg::strategy::buffer::point_circle point_strategy;
+ typedef bg::strategy::buffer::distance_symmetric
+ <
+ typename bg::coordinate_type<P>::type
+ > distance;
+
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_j12",
+ sharp_triangle,
+ join_round(12), end_flat, distance(1.0), side_strategy, point_strategy,
+ 29.1604);
+ // Test very various number of points (min is 3)
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_j2",
+ sharp_triangle,
+ join_round(2), end_flat, distance(1.0), side_strategy, point_strategy,
+ 27.2399);
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_j5",
+ sharp_triangle,
+ join_round(5), end_flat, distance(1.0), side_strategy, point_strategy,
+ 28.8563);
+
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_j36",
+ sharp_triangle,
+ join_round(36), end_flat, distance(1.0), side_strategy, point_strategy,
+ 29.2482);
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_j360",
+ sharp_triangle,
+ join_round(360), end_flat, distance(1.0), side_strategy, point_strategy,
+ 29.2659);
+
+ // Test with various miter limits
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_m2",
+ sharp_triangle,
+ join_miter(2), end_flat, distance(4.0), side_strategy, point_strategy,
+ 148.500);
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_m3",
+ sharp_triangle,
+ join_miter(3), end_flat, distance(4.0), side_strategy, point_strategy,
+ 164.376);
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_m4",
+ sharp_triangle,
+ join_miter(4), end_flat, distance(4.0), side_strategy, point_strategy,
+ 180.2529);
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_m5",
+ sharp_triangle,
+ join_miter(5), end_flat, distance(4.0), side_strategy, point_strategy,
+ 196.1293);
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_m25",
+ sharp_triangle,
+ join_miter(25), end_flat, distance(4.0), side_strategy, point_strategy,
+ 244.7471);
+
+ // Right triangles, testing both points around sharp corner as well as points
+ // around right corners in join_round strategy
+ test_with_custom_strategies<polygon_type, polygon_type>("right_triangle_j3",
+ right_triangle,
+ join_round(3), end_flat, distance(1.0), side_strategy, point_strategy,
+ 53.0240);
+ test_with_custom_strategies<polygon_type, polygon_type>("right_triangle_j4",
+ right_triangle,
+ join_round(4), end_flat, distance(1.0), side_strategy, point_strategy,
+ 53.2492);
+ test_with_custom_strategies<polygon_type, polygon_type>("right_triangle_j5",
+ right_triangle,
+ join_round(5), end_flat, distance(1.0), side_strategy, point_strategy,
+ 53.7430);
+ test_with_custom_strategies<polygon_type, polygon_type>("right_triangle_j6",
+ right_triangle,
+ join_round(6), end_flat, distance(1.0), side_strategy, point_strategy,
+ 53.7430);
+
+ buffer_custom_side_strategy custom_side_strategy;
+ test_with_custom_strategies<polygon_type, polygon_type>("sharp_triangle_custom_side",
+ sharp_triangle,
+ join_round(49), end_flat, distance(1.0), custom_side_strategy, point_strategy,
+ 31.1087);
+ }
+}
+
+template <bool Clockwise, typename P>
+void test_deflate_special_cases()
+{
+ typedef bg::model::polygon<P, Clockwise, true> polygon_type;
+
+ bg::strategy::buffer::join_miter join_miter(5);
+ bg::strategy::buffer::join_round join_round(8);
+ bg::strategy::buffer::end_flat end_flat;
+
+ // This case fails for <float> because there is an IP formed at the border of the original
+ test_one<polygon_type, polygon_type>("erode_50", erode_triangle, join_miter, end_flat, 0, 0, 0.0, -0.50);
+ test_one<polygon_type, polygon_type>("erode_40", erode_triangle, join_miter, end_flat, 0, 0, 0.0, -0.40);
+ test_one<polygon_type, polygon_type>("erode_60", erode_triangle, join_miter, end_flat, 0, 0, 0.0, -0.60);
+
+ // This case generates a uu-turn in deflate, at 1.0
+ test_one<polygon_type, polygon_type>("forming_uu_a_95", forming_uu_a, join_round, end_flat, 1, 0, 23.0516, -0.95);
+ test_one<polygon_type, polygon_type>("forming_uu_a_10", forming_uu_a, join_round, end_flat, 2, 0, 21.4606, -1.0);
+ test_one<polygon_type, polygon_type>("forming_uu_a_15", forming_uu_a, join_round, end_flat, 2, 0, 8.8272, -1.5);
+ test_one<polygon_type, polygon_type>("forming_uu_a_20", forming_uu_a, join_round, end_flat, 2, 0, 1.7588, -2.0);
+ test_one<polygon_type, polygon_type>("forming_uu_a_21", forming_uu_a, join_round, end_flat, 2, 0, 0.9944, -2.1);
+
+ test_one<polygon_type, polygon_type>("forming_uu_b_25", forming_uu_b, join_round, end_flat, 1, 1, 38.4064, -0.25);
+ test_one<polygon_type, polygon_type>("forming_uu_b_50", forming_uu_b, join_round, end_flat, 1, 1, 24.4551, -0.50);
+ test_one<polygon_type, polygon_type>("forming_uu_b_95", forming_uu_b, join_round, end_flat, 1, 0, 11.5009, -0.95);
+ test_one<polygon_type, polygon_type>("forming_uu_b_10", forming_uu_b, join_round, end_flat, 1, 0, 10.7152, -1.0);
+ test_one<polygon_type, polygon_type>("forming_uu_b_15", forming_uu_b, join_round, end_flat, 1, 0, 4.4136, -1.5);
+
+ test_one<polygon_type, polygon_type>("forming_uu_b_25", forming_uu_b, join_round, end_flat, 1, 1, 67.7139, 0.25);
+ test_one<polygon_type, polygon_type>("forming_uu_b_50", forming_uu_b, join_round, end_flat, 1, 1, 82.0260, 0.50);
+ test_one<polygon_type, polygon_type>("forming_uu_b_70", forming_uu_b, join_round, end_flat, 1, 3, 93.0760, 0.70);
+
+ // From here on a/b have the same result
+ test_one<polygon_type, polygon_type>("forming_uu_a_10", forming_uu_a, join_round, end_flat, 1, 0, 108.0959, 1.0);
+ test_one<polygon_type, polygon_type>("forming_uu_b_10", forming_uu_b, join_round, end_flat, 1, 0, 108.0959, 1.0);
+}
+
+template
+<
+ typename InputPoint,
+ typename OutputPoint,
+ bool InputClockwise,
+ bool OutputClockwise,
+ bool InputClosed,
+ bool OutputClosed
+>
+void test_mixed()
+{
+ typedef bg::model::polygon<InputPoint, InputClockwise, InputClosed> input_polygon_type;
+ typedef bg::model::polygon<OutputPoint, OutputClockwise, OutputClosed> output_polygon_type;
+
+ bg::strategy::buffer::join_round join_round(12);
+ bg::strategy::buffer::end_flat end_flat;
+
+ std::ostringstream name;
+ name << "mixed_" << std::boolalpha
+ << InputClockwise << "_" << OutputClockwise
+ << "_" << InputClosed << "_" << OutputClosed;
+
+ test_one<input_polygon_type, output_polygon_type>(name.str(),
+ simplex, join_round, end_flat, 47.4831, 1.5);
+}
+
+#ifdef HAVE_TTMATH
+#include <ttmath_stub.hpp>
+#endif
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ typedef bg::model::point<default_test_type, 2, bg::cs::cartesian> dpoint;
+
+ test_all<true, dpoint>();
+ test_deflate_special_cases<true, dpoint>();
+
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, dpoint>();
+ test_deflate_special_cases<false, dpoint>();
+#endif
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ typedef bg::model::point<float, 2, bg::cs::cartesian> fpoint;
+ test_deflate_special_cases<true, fpoint>();
+
+ test_mixed<dpoint, dpoint, false, false, true, true>();
+ test_mixed<dpoint, dpoint, false, true, true, true>();
+ test_mixed<dpoint, dpoint, true, false, true, true>();
+ test_mixed<dpoint, dpoint, true, true, true, true>();
+
+ test_mixed<dpoint, dpoint, false, false, false, true>();
+ test_mixed<dpoint, dpoint, false, true, false, true>();
+ test_mixed<dpoint, dpoint, true, false, false, true>();
+ test_mixed<dpoint, dpoint, true, true, false, true>();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::point<tt, 2, bg::cs::cartesian> >();
+#endif
+
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_ring.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_ring.cpp
new file mode 100644
index 000000000..d195e6047
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_ring.cpp
@@ -0,0 +1,50 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_buffer.hpp"
+
+// Short test verifying behavior of explicit ring_type (polygon without holes)
+// The test buffer_polygon.cpp contains all other tests, also for rings.
+
+static std::string const concave_simplex = "POLYGON ((0 0,3 5,3 3,5 3,0 0))";
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::ring<P, Clockwise, true> ring_type;
+ typedef bg::model::polygon<P, Clockwise, true> polygon_type;
+
+ bg::strategy::buffer::join_miter join_miter(10.0);
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::end_flat end_flat;
+
+ test_one<ring_type, polygon_type>("concave_simplex", concave_simplex, join_round, end_flat, 14.5616, 0.5);
+ test_one<ring_type, polygon_type>("concave_simplex", concave_simplex, join_miter, end_flat, 16.3861, 0.5);
+
+ test_one<ring_type, polygon_type>("concave_simplex", concave_simplex, join_round, end_flat, 0.777987, -0.5);
+ test_one<ring_type, polygon_type>("concave_simplex", concave_simplex, join_miter, end_flat, 0.724208, -0.5);
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+#endif
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<true, bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<false, bg::model::point<float, 2, bg::cs::cartesian> >();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/buffer_with_strategies.cpp b/src/boost/libs/geometry/test/algorithms/buffer/buffer_with_strategies.cpp
new file mode 100644
index 000000000..2fd10dad1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/buffer_with_strategies.cpp
@@ -0,0 +1,141 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "geometry_test_common.hpp"
+
+#include <boost/geometry/algorithms/buffer.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+// For test
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+
+
+// This unit test tests boost::geometry::buffer (overload with strategies)
+// More detailed tests are, per geometry type, available in buffer_<TYPE>.cpp
+// (testing boost::geometry::buffer_inserter)
+
+// SVG's are not created (they are in detailed tests)
+
+static std::string const polygon_simplex = "POLYGON ((0 0,1 5,6 1,0 0))";
+static std::string const polygon_empty = "POLYGON()";
+static std::string const multi_polygon_empty = "MULTIPOLYGON()";
+static std::string const multi_polygon_simplex
+ = "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))";
+
+
+template
+<
+ typename Geometry,
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy,
+ typename SideStrategy,
+ typename PointStrategy,
+ typename DistanceStrategy
+>
+void test_with_strategies(std::string const& caseid,
+ std::string const& wkt,
+ JoinStrategy const& join_strategy,
+ EndStrategy const& end_strategy,
+ SideStrategy const& side_strategy,
+ PointStrategy const& point_strategy,
+ DistanceStrategy const& distance_strategy,
+ double expected_area,
+ std::size_t expected_numpoints,
+ double tolerance = 0.01)
+{
+ namespace bg = boost::geometry;
+ Geometry g;
+ bg::read_wkt(wkt, g);
+ bg::correct(g);
+
+ GeometryOut result;
+
+ bg::buffer(g, result,
+ distance_strategy, side_strategy,
+ join_strategy, end_strategy, point_strategy);
+
+ BOOST_CHECK_MESSAGE
+ (
+ bg::num_points(result) == expected_numpoints,
+ "Buffer " << caseid
+ << " numpoints expected: " << expected_numpoints
+ << " detected: " << bg::num_points(result)
+ );
+
+ double const area = bg::area(result);
+ double const difference = area - expected_area;
+
+ BOOST_CHECK_MESSAGE
+ (
+ bg::math::abs(difference) < tolerance,
+ "Buffer " << caseid
+ << std::setprecision(12)
+ << " area expected: " << expected_area
+ << " detected: " << area
+ );
+}
+
+
+template <bool Clockwise, typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point, Clockwise> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ bg::strategy::buffer::join_round join(160);
+ bg::strategy::buffer::end_round end(160);
+ bg::strategy::buffer::point_circle circle(160);
+ bg::strategy::buffer::side_straight side;
+
+ typedef bg::strategy::buffer::distance_symmetric
+ <
+ typename bg::coordinate_type<Point>::type
+ > distance;
+
+ test_with_strategies<multi_polygon, multi_polygon>(
+ "multi_polygon_empty", multi_polygon_empty,
+ join, end, side, circle, distance(1.0),
+ 0.0, 0);
+
+
+ // PostGIS: 34.2550669294223 216 (40 / qcircle)
+ // SQL Server: 34.2550419903829 220 (default options)
+ test_with_strategies<multi_polygon, multi_polygon>(
+ "multi_polygon_simplex", multi_polygon_simplex,
+ join, end, side, circle, distance(1.0),
+ 34.2551, 219);
+
+ test_with_strategies<polygon, multi_polygon>(
+ "polygon_empty", polygon_empty,
+ join, end, side, circle, distance(1.0),
+ 0.0, 0);
+
+ //
+ // PostGIS: 35.2256914798762 164 (40 / qcircle)
+ // SQL Server: 35.2252355201605 153 (default options)
+ test_with_strategies<polygon, multi_polygon>(
+ "polygon_simplex", polygon_simplex,
+ join, end, side, circle, distance(1.0),
+ 35.2257, 166);
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+
+ test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/data/gr.wkt b/src/boost/libs/geometry/test/algorithms/buffer/data/gr.wkt
new file mode 100644
index 000000000..036c88a86
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/data/gr.wkt
@@ -0,0 +1,69 @@
+POLYGON ((2591610.140844767447561 4286029.643435961566865,2594115.163346088025719 4285152.154383632354438,2595320.753431379329413 4284579.74977499153465,2595722.950751616619527 4284312.518855294212699,2596619.740569446701556 4283052.568823982961476,2596990.879751751665026 4282213.095253625884652,2597300.125297174789011 4280305.940899614244699,2597331.072115615941584 4276605.626913164742291,2597083.4975680927746 4276224.365647087804973,2596588.793751005548984 4276338.45431409496814,2593527.50775419222191 4280152.943493959493935,2593279.933206666260958 4280534.342283136211336,2591394.069713138509542 4284656.279324283823371,2590775.35598330758512 4286373.458162739872932,2590744.297845378052443 4286869.41149783320725,2591053.877349274698645 4286755.075002126395702,2591610.140844767447561 4286029.643435961566865))
+POLYGON ((2555555.316249697003514 4352689.19908235501498,2557008.369563022628427 4349463.861683191731572,2558987.741428818088025 4345433.099935893900692,2559234.870698379352689 4345049.408414580859244,2560966.556697157677263 4343015.118392486125231,2561430.313695803284645 4342785.395555835217237,2562605.290921126957983 4342516.585997329093516,2569871.893321639392525 4336378.612767102196813,2571634.637458350043744 4334883.0389523813501,2572283.964048148132861 4334232.22402105294168,2572407.528682927601039 4333272.843957723118365,2566717.989508484955877 4320591.121212368831038,2565852.146509092766792 4319480.50177791994065,2565450.060508346650749 4319326.951108642853796,2564862.73887492204085 4319365.82100017927587,2560038.708741397596896 4320169.301217127591372,2559018.242969294078648 4320744.689832178875804,2552555.478611800819635 4325149.20531311724335,2551751.640568782109767 4326221.374757977202535,2550576.66334345843643 4328098.824049399234354,2550453.098708679433912 4328558.753026241436601,2549927.336753659881651 4331739.889987670816481,2548752.359528339467943 4344511.821145920082927,2548690.354571968782693 4345548.058069777674973,2552122.779751087073237 4352689.19908235501498,2552493.918933392036706 4352958.124562109820545,2554967.549338309559971 4353880.126825681887567,2555678.880884478799999 4353304.211824299767613,2555802.445519257802516 4352843.225500854663551,2555555.316249697003514 4352689.19908235501498))
+POLYGON ((2423981.689384551718831 4397064.104942323639989,2423115.846385159529746 4397565.041253533214331,2421260.484432108234614 4399107.56739207636565,2421074.914840955752879 4399532.360126257874072,2421043.968022517394274 4400033.551205471158028,2421136.919797329232097 4400534.765832838602364,2422033.820934650488198 4404663.704022608697414,2422373.901979023125023 4405011.327909963205457,2422806.600839736871421 4405011.327909963205457,2424909.537340311333537 4403390.708195376209915,2425156.666609875392169 4403042.998234177939594,2425187.613428313750774 4402502.49359661154449,2423981.689384551718831 4397064.104942323639989))
+POLYGON ((2414952.342847325839102 4402772.811946315690875,2415199.917394851800054 4407443.344988466240466,2415539.998439224436879 4409295.868931110948324,2416127.32007264951244 4410801.725029764696956,2416436.899576546158642 4411149.688281376846135,2418786.965346681885421 4410260.826705728657544,2418817.912165123037994 4409759.293516525067389,2417921.011027801316231 4407133.719019911251962,2417704.494618207681924 4406670.408635009080172,2415756.626168309245259 4403197.75068792887032,2415477.993482854217291 4402811.985060860402882,2414952.342847325839102 4402772.811946315690875))
+POLYGON ((2575376.196863402612507 4472224.118898721411824,2574788.54127150401473 4472262.430893377400935,2574077.655003299936652 4472844.958158013410866,2571232.551457603927702 4476924.250396336428821,2571046.870546959806234 4477352.313107781112194,2571139.933641265612096 4477857.05776893068105,2571418.121048756409436 4478051.379721556790173,2573180.753865978680551 4478673.681781725026667,2573644.510864621493965 4478789.947777447290719,2574293.837454420048743 4478673.681781725026667,2575345.250044961925596 4478207.231596697121859,2577107.994181675370783 4477196.473884411156178,2578190.01963218441233 4476303.170729604549706,2578839.680180453695357 4475642.544422381557524,2579086.809450014494359 4475254.132838231511414,2578932.297996794339269 4474826.295240636914968,2578406.536041778046638 4473389.061551753431559,2578190.01963218441233 4472922.845304501242936,2577788.267589911818504 4472650.872045905329287,2575376.196863402612507 4472224.118898721411824))
+POLYGON ((2992329.583521094173193 4210636.757361931726336,2989670.494844515342265 4211622.804856428876519,2989299.355662210378796 4211887.312598169781268,2988990.11011678725481 4212570.448900697752833,2988897.15834197262302 4214579.428908327594399,2994277.451970995403826 4221104.691221220418811,2994679.649291229899973 4221331.860711568035185,3005286.059054522309452 4223077.793598398566246,3007419.49709557602182 4222774.352976323105395,3007852.307275780942291 4222584.723914881236851,3005440.681827233638614 4218941.420209947042167,3001668.064284248743206 4217386.771951836533844,2994556.084656450431794 4212760.042085616849363,2992329.583521094173193 4210636.757361931726336))
+POLYGON ((3021458.109399007633328 4218334.91193628590554,3019170.048585242591798 4222280.340583647601306,3013139.983088459353894 4244731.27551181614399,3013016.418453680351377 4245225.340754669159651,3012985.471635239198804 4246404.671038310043514,3013171.041226391680539 4246861.158235197886825,3019015.425812528003007 4254888.940125274471939,3023251.800354156643152 4262009.280857927165926,3023715.446033311076462 4262808.53217298258096,3023777.45098968455568 4263379.794801467098296,3023282.301894635427743 4265856.480225098319352,3023282.301894635427743 4268942.871743682771921,3023437.369945311918855 4272564.139858214184642,3029374.372347788885236 4276644.344143596477807,3029807.071208502631634 4276834.911807493306696,3031013.106571755837649 4276758.437207715585828,3031384.245754060801119 4276491.398155529983342,3031322.240797690115869 4274660.606354106217623,3029621.5016173501499 4262808.53217298258096,3029281.420572974253446 4261894.245038099586964,3025385.238395213149488 4245871.944135325029492,3028137.390166091732681 4229037.501189870759845,3023684.499214872717857 4225355.573288939893246,3023158.737259853631258 4224634.065929244272411,3021458.109399007633328 4218334.91193628590554))
+POLYGON ((3140013.58973282482475 4361679.380983226001263,3140415.341775096952915 4363063.537204368971288,3140631.412906725890934 4363485.932750260457397,3140972.050548554863781 4363793.190280830487609,3141343.18973085982725 4363679.144116920419037,3142084.577539542689919 4363140.624535604380071,3142981.923954826314002 4361525.227856651879847,3143445.235675507225096 4360104.328066130168736,3139982.642914383672178 4348003.370526700280607,3137755.696501065045595 4341978.158247251063585,3132684.982375938910991 4329630.295225298032165,3130612.65873533161357 4326220.409288696944714,3124026.329743056092411 4316033.855261153541505,3117965.762705800123513 4310104.12395291030407,3112121.266800169833004 4306813.83149869274348,3110915.23143691662699 4305399.016821959987283,3109338.613488811533898 4303181.005272405222058,3106493.843901589047164 4298977.470186469145119,3105690.005858570337296 4297258.298849802464247,3105009.621130842715502 4295233.115651254542172,3101979.393271958455443 4291298.952079682610929,3099443.757910670246929 4288740.055800472386181,3099072.618728365283459 4288472.585214412771165,3094650.785915075801313 4285953.10422613658011,3093197.176004296634346 4285571.515517945401371,3092609.854370868764818 4285533.728383533656597,3091187.302598022390157 4285991.854710307903588,3087229.560741849243641 4288397.128361198119819,3086919.981237955857068 4288702.257656610570848,3086734.856924765277654 4289160.517468039877713,3086023.525378596037626 4290954.981583534739912,3085683.444334223400801 4292482.172733942978084,3085930.573603781871498 4293666.622321301139891,3086981.986194326076657 4297715.956746149808168,3088094.958463276270777 4315001.549609431065619,3085745.004012632183731 4323500.611016820184886,3093444.30527385789901 4335304.329701188020408,3095021.925097377970815 4337605.706930064596236,3095331.059323312714696 4337913.330734616145492,3103153.925219320226461 4344702.619414729066193,3105349.368216744158417 4346431.425165256485343,3106833.59098749095574 4347467.846874327398837,3124552.536976037546992 4356492.665546560660005,3128911.919554991647601 4358375.398172507993877,3140013.58973282482475 4361679.380983226001263))
+POLYGON ((2869661.293280427809805 4348273.422753568738699,2868455.369236662983894 4348464.149494192562997,2865239.905745100229979 4349578.862875730730593,2864436.06770208152011 4350654.570571920834482,2864280.554373443126678 4351113.25120413582772,2864280.554373443126678 4351613.287907429039478,2864651.693555748090148 4352689.19908235501498,2868393.809558254666626 4355915.504127815365791,2868826.953696933109313 4356068.470322852954268,2871856.736277852207422 4354301.19344930164516,2878381.060313754249364 4350116.703279375098646,2878381.060313754249364 4349578.862875730730593,2878103.429503716994077 4349195.023546325974166,2877793.849999820347875 4348887.077368510887027,2877361.151139107067138 4348734.213284035213292,2876371.186907482333481 4348619.221118183806539,2869661.293280427809805 4348273.422753568738699))
+POLYGON ((2832771.572504406329244 4346008.731944741681218,2829771.178269057068974 4347369.175229661166668,2825828.130585667211562 4348142.127324001863599,2829678.783091698773205 4350614.481874004937708,2830860.66212545055896 4355358.841731435619295,2829304.304324670694768 4360000.83623484056443,2826554.490263093262911 4363676.929640293121338,2824236.484506305772811 4364602.067025523632765,2824082.418331047520041 4365024.523125616833568,2824051.805471079889685 4365525.069310077466071,2824391.552556981798261 4365831.277767788618803,2825566.975060267839581 4366486.222207658924162,2827545.345050645060837 4366101.77840356528759,2829864.35268285125494 4365486.032512652687728,2830576.129506982397288 4364870.32195342425257,2833173.32454667892307 4362294.908526715822518,2833482.45877261320129 4361949.638619001023471,2836420.625412609893829 4358028.17926303576678,2837131.066402854397893 4356914.802749514579773,2837410.03304678061977 4355493.406172873452306,2836976.888908104971051 4350153.610815620049834,2835214.590049356687814 4347965.502946531400084,2833946.104451768100262 4346623.362936964258552,2832771.572504406329244 4346008.731944741681218))
+POLYGON ((2827421.780415862798691 4355032.325973690487444,2826927.521876740735024 4355032.325973690487444,2826586.995554406195879 4355339.341782544739544,2826494.377738065086305 4356338.586831928230822,2826556.382694435771555 4356914.802749514579773,2826834.570101929362863 4357298.917752743698657,2827267.71424060780555 4357453.010237406939268,2827700.41310131829232 4357453.010237406939268,2828257.121874776203185 4357260.879104228690267,2828628.261057081166655 4356953.808400047942996,2828658.87391704833135 4356452.555076035670936,2828472.859047933947295 4355915.504127815365791,2828195.116918405517936 4355530.332167193293571,2827421.780415862798691 4355032.325973690487444))
+POLYGON ((3049659.121279629413038 4351883.292507800273597,3041000.913924711290747 4357298.917752743698657,3038743.465970913879573 4358873.559323026798666,3038434.331744979135692 4359180.684900897555053,3038557.896379761397839 4364254.6467181192711,3038773.967511389870197 4364716.122996930032969,3039362.179700742010027 4365370.860944991,3045082.665693628136069 4366409.11084074433893,3045577.369510712567717 4366254.889769581146538,3045948.508693017531186 4365986.600226512178779,3054946.351814345922321 4357337.924797600135207,3055255.486040280200541 4356990.739412423223257,3055441.166950923856348 4356567.492721032351255,3055410.554090953897685 4356031.542479675263166,3054483.151413156185299 4354610.26269743964076,3052102.138824579305947 4352573.196799884550273,3051637.491270006634295 4352419.174248870462179,3050184.326637192163616 4351998.319567987695336,3049659.121279629413038 4351883.292507800273597))
+POLYGON ((2946255.114198702387512 4380222.691562238149345,2939483.215615274384618 4378682.888404951430857,2933731.671484458725899 4372332.933580402284861,2933917.241075611207634 4371255.05224512051791,2933917.241075611207634 4370754.100087784230709,2932402.0714864237234 4370524.891465342603624,2929711.924671915359795 4370293.471900186501443,2929093.210942084435374 4370331.556763516739011,2928196.866402216255665 4370716.152219046838582,2927392.917039709165692 4371177.906580962240696,2926434.567543470300734 4372139.566267141140997,2926248.997952317818999 4372564.397179501131177,2924424.694137195590883 4377413.12285110540688,2923496.400903470814228 4380299.902395087294281,2923249.271633910015225 4381301.475791771896183,2923342.223408721853048 4381879.034633260220289,2923527.792999874334782 4382341.270527723245323,2923836.481947846710682 4382649.069151515141129,2936638.891306016594172 4389082.423625545576215,2937226.10161995049566 4389121.685267948545516,2939514.607711677905172 4388196.647164435125887,2939885.746893982868642 4387964.845271034166217,2945327.600201413501054 4383611.620911222882569,2945574.729470974765718 4383227.671343368478119,2946873.827928530517966 4380722.977743802592158,2946749.81801578681916 4380493.417091364972293,2946255.114198702387512 4380222.691562238149345))
+POLYGON ((3099165.236544703599066 4373102.28192847315222,3094310.148273246828467 4376835.804897713474929,3093629.874865010380745 4377413.12285110540688,3090785.216597279068083 4380031.261001949198544,3091218.360735954716802 4381533.133311292156577,3096072.447131995577365 4387388.067401162348688,3097680.679815486073494 4389238.083705622702837,3098515.464676942676306 4389661.512792814522982,3100371.271907959133387 4390315.696544957347214,3100834.472309148870409 4390470.264578749425709,3101329.621404197998345 4390470.264578749425709,3101979.393271958455443 4389238.083705622702837,3102102.95790674071759 4388736.427967187017202,3102782.786037015262991 4385538.37119132000953,3103153.925219320226461 4383304.903861795552075,3103185.428635211661458 4382726.297493098303676,3103061.41872247075662 4375564.04138542059809,3102906.350671794265509 4375025.894491924904287,3101144.05181304551661 4373641.301943959668279,3100772.912630740553141 4373410.923327951692045,3099165.236544703599066 4373102.28192847315222))
+POLYGON ((2777451.908152145799249 4382187.790468361228704,2776926.257516617886722 4382187.790468361228704,2774576.191746482159942 4382572.81191058177501,2773555.837293869815767 4382957.847208662889898,2767062.014798443764448 4388543.73516106698662,2766443.746346578001976 4389198.960370588116348,2765454.338712409604341 4390701.982067508623004,2765299.715939695481211 4391126.579249332658947,2765268.769121257122606 4391665.397940886206925,2765608.850165629759431 4391781.824092406779528,2766907.503345223609358 4392090.033415410667658,2767371.59430234041065 4392167.191215805709362,2768392.060074443928897 4392012.737400809302926,2776122.419473599176854 4388043.083050085231662,2777792.100516006816179 4386463.179297599941492,2777946.723288720939308 4386039.876878512091935,2778812.566288110334426 4383381.027661667205393,2778689.001653331331909 4382765.397153282538056,2778348.809289464261383 4382457.595182967372239,2777451.908152145799249 4382187.790468361228704))
+POLYGON ((2791552.080133982934058 4387927.807373217307031,2790438.996545541565865 4388196.647164435125887,2790067.857363236602396 4388465.35499195381999,2790099.360779130831361 4389044.410724042914808,2794366.236861238256097 4396446.5750179477036,2798726.509996119420975 4399570.549252319149673,2799220.768535241484642 4399686.089549814350903,2803890.287215545307845 4399686.089549814350903,2803952.292171918787062 4399416.960361426696181,2803488.535173272714019 4398142.507823202759027,2800427.249176459386945 4393977.922856635414064,2798046.236587879713625 4391897.280122672207654,2796314.105311136227101 4390470.264578749425709,2794087.604175782762468 4388928.014395661652088,2792975.0771847916767 4388196.647164435125887,2791552.080133982934058 4387927.807373217307031))
+POLYGON ((2708495.606177705805749 4390432.107989124953747,2708062.795997500885278 4390586.677706940099597,2707815.221449974924326 4390817.426428416743875,2707599.150318346451968 4391781.824092406779528,2707630.097136787604541 4392860.803806035779417,2709577.965586688369513 4401963.127562602981925,2709949.104768991004676 4403042.998234177939594,2710536.426402418408543 4403776.494762715883553,2710938.623722652904689 4404007.528835942037404,2728811.635886458214372 4406747.810917943716049,2730326.805475645698607 4406747.810917943716049,2731316.21310981689021 4406361.916791649535298,2732676.871245781425387 4405628.381286242976785,2732831.382699004374444 4405204.318247580900788,2732954.947333783376962 4397449.662762952037156,2732707.818064222112298 4396215.70463749859482,2732274.673925546463579 4395212.73283763974905,2731841.975064833182842 4394287.167169045656919,2731563.787657339591533 4393901.5847502136603,2731192.648475037422031 4393631.629823670722544,2724760.942255473230034 4392205.354002934880555,2717710.522306081373245 4391858.147049539722502,2708495.606177705805749 4390432.107989124953747))
+POLYGON ((2822814.823289383202791 4389738.79179900418967,2821144.585649522021413 4390663.963404381647706,2820804.949883111286908 4391010.160238422453403,2811775.603345888201147 4401383.509644056670368,2812146.742528193630278 4406091.646367501467466,2812393.871797754429281 4406594.118604704737663,2813692.413657857105136 4408677.630211332812905,2814063.218881691340357 4408949.078180028125644,2816723.198114194441587 4409759.293516525067389,2817279.016331724822521 4409642.53197271656245,2819289.780293926596642 4407905.716136941686273,2828318.681553184520453 4399839.682315330021083,2828442.69146592868492 4399493.199055306613445,2826649.000510776881129 4391974.575301819480956,2826339.421006880234927 4390817.426428416743875,2825906.610826675314456 4390663.963404381647706,2822814.823289383202791 4389738.79179900418967))
+POLYGON ((2744983.574911451898515 4403853.87603235989809,2743870.602642501704395 4403892.080636514350772,2741613.15468870382756 4404239.679361053742468,2741242.01550639886409 4404510.041760813444853,2740747.311689314898103 4405281.709882943890989,2739541.721604023594409 4408253.445802656002343,2739788.850873582065105 4408716.82503604516387,2740685.752010903321207 4409605.418750107288361,2741118.450871617067605 4409798.492321811616421,2743159.382415821310133 4409721.067870171740651,2743530.521598126273602 4409527.995702023617923,2745725.964595550205559 4407982.988415124826133,2746282.673369008116424 4406747.810917943716049,2746344.233047416433692 4405705.7760009765625,2746282.673369008116424 4405126.927174153737724,2745787.969551923684776 4404277.885347863659263,2745447.777188059873879 4403969.462745145894587,2744983.574911451898515 4403853.87603235989809))
+POLYGON ((3002440.95550882909447 4393515.183507037349045,3001914.859595338813961 4393554.322651777416468,3000400.135284116026014 4393940.864107725210488,2999657.745600014925003 4394478.714367645792663,2997060.661879806313664 4398219.709376811981201,2996813.087332283146679 4398605.447808753699064,2996565.958062722347677 4399608.738515092991292,2996472.449690454639494 4405049.536662658676505,2996937.097245027311146 4405859.455502709373832,3012398.150001814588904 4416440.464416719041765,3012768.398628192488104 4416671.773395116440952,3022601.694527924992144 4422586.396166446618736,3024333.825804668478668 4423397.650780817493796,3025385.238395213149488 4423629.111171501688659,3037290.301338096614927 4425253.929675227962434,3043535.992688546422869 4423127.921581463888288,3044216.377416274044663 4422547.150215717963874,3044897.096102475654334 4421309.167946700938046,3045206.230328407138586 4420344.181726089678705,3045174.726912512909621 4419455.664805953390896,3043938.635286745615304 4418141.669627649709582,3042299.010506852064282 4417212.997638188302517,3039300.174744371324778 4416479.687834044918418,3036733.592564641963691 4416015.97058436460793,3032713.845752095803618 4415011.133778312243521,3029930.301884810905904 4414006.391851871274412,3009645.998230932746083 4406554.9315883545205,3008748.651815646328032 4406208.230043982155621,3004760.408418997190893 4404510.041760813444853,3003461.421280929353088 4403892.080636514350772,3002749.64445679821074 4403313.330287384800613,3002502.960465199314058 4402965.761763590388,3002348.003734017256647 4402425.261041063815355,3001884.692013333551586 4397873.417565458454192,3001822.687056962866336 4394827.255802458152175,3002440.95550882909447 4393515.183507037349045))
+POLYGON ((2732862.440836933907121 4407751.86814397200942,2732274.673925546463579 4407829.278283690102398,2731563.787657339591533 4408446.355883928947151,2730852.567430661991239 4409566.220655422657728,2729801.154840120114386 4411960.071072018705308,2729677.590205338317901 4412964.619837751612067,2729677.590205338317901 4414586.696965764276683,2729863.159796490799636 4415127.815147946588695,2733913.85342747811228 4417986.699851487763226,2734284.547331818379462 4418025.928970955312252,2737562.461057716514915 4415977.722463401965797,2738366.299100735224783 4414586.696965764276683,2737902.542102092411369 4412347.141336007975042,2737624.466014089994133 4411110.484502057544887,2735985.286512158345431 4408716.82503604516387,2735645.094148294534534 4408408.273934078402817,2733851.848471104633063 4407867.497141764499247,2732862.440836933907121 4407751.86814397200942))
+POLYGON ((2871423.592139176558703 4406283.544610826298594,2868641.384105780627578 4406322.730629188008606,2867744.482968458905816 4406709.735038844868541,2865394.08323984965682 4408176.032580778934062,2865022.832738053519279 4409101.692518272437155,2865208.402329206001014 4409527.022704998962581,2876433.191863853018731 4416904.200170629657805,2890070.052125012036413 4423706.636915417388082,2891708.786348978523165 4421580.938346943818033,2885462.53840107889846 4416285.519423273392022,2875011.085368971340358 4408445.382985705509782,2871423.592139176558703 4406283.544610826298594))
+POLYGON ((2836574.691587867680937 4418101.32718844152987,2836791.319316952489316 4417792.364822591654956,2836791.319316952489316 4417290.476607773452997,2836358.620456239208579 4415939.613563259132206,2836080.43304874561727 4415552.273545492440462,2834193.678999291267246 4414355.433311192318797,2833296.889181460719556 4414083.847474261187017,2831163.451140407007188 4414121.949728757143021,2829772.29146396368742 4415126.702566269785166,2829833.851142372004688 4415707.207860444672406,2830019.420733524486423 4416248.383032094687223,2835770.408266887068748 4420885.592912990599871,2836574.691587867680937 4418101.32718844152987))
+POLYGON ((2857879.794972320087254 4421890.984954208135605,2851201.404761160258204 4422508.878594832494855,2850891.825257263612002 4422856.11162082478404,2850798.762162960600108 4423320.127291233278811,2851417.141934318002313 4424053.909083651378751,2854107.288748829159886 4425640.509660203009844,2855560.787340113893151 4426025.989992116577923,2857447.096111606806517 4425098.856170088984072,2857756.230337541084737 4424750.575453975237906,2859023.825379202608019 4422933.631725312210619,2859116.888473505619913 4422431.361588627099991,2858777.141387606505305 4422122.412531306035817,2857879.794972320087254 4421890.984954208135605))
+POLYGON ((2750920.688633420038968 4425602.226895059458911,2750487.989772706758231 4425602.226895059458911,2749034.825139892753214 4427342.074314353987575,2747704.779863892588764 4429392.472481383010745,2745169.255822095554322 4436280.532989690080285,2742912.141826771665365 4443172.094972506165504,2743035.706461550667882 4444993.485261105932295,2743994.167277280706912 4445187.203341979533434,2745354.825413248036057 4444876.475120771676302,2749931.280999249313027 4443249.624229383654892,2750333.366999995429069 4442978.413751287385821,2754136.931361418683082 4437944.501922651194036,2754631.635178505908698 4437208.783617055974901,2756857.691035897471011 4433299.838508390821517,2757012.647767082322389 4432874.670501386746764,2757043.260627049952745 4432332.647792200557888,2756919.695992270950228 4431713.207272284664214,2756393.934037251397967 4430861.901202405802906,2753363.706178370397538 4427806.28598749730736,2752281.235449896194041 4426800.33404,2750920.688633420038968 4425602.226895059458911))
+POLYGON ((2790964.758500557858497 4431286.013572776690125,2790655.624274626374245 4431595.229334438219666,2786017.609010213986039 4436588.918906288221478,2785770.034462690819055 4436975.9120261836797,2785614.966412014793605 4438987.751332331448793,2785676.971368385013193 4439569.42315,2785862.540959537494928 4440111.815924239344895,2786790.054956829641014 4441156.254623740911484,2789047.50291062425822 4443481.657626637257636,2789388.029232962056994 4443791.22932964283973,2789759.168415267020464 4444022.01952782087028,2791799.65468150889501 4445029.606650262139738,2792324.860039072111249 4445029.606650262139738,2792665.497680898290128 4444759.466273522004485,2791521.467274015769362 4432409.262017754837871,2790964.758500557858497 4431286.013572776690125))
+POLYGON ((3002904.712507471907884 4428578.671140423975885,3002255.385917676147074 4428578.671140423975885,2999657.745600014925003 4429083.320886803790927,2998452.266834214795381 4429662.36082876753062,2996627.963019093032926 4431674.902603208087385,2992484.206293805502355 4448712.961802339181304,2993009.522970859892666 4449331.304155612364411,2993473.613927976693958 4449758.249342942610383,3001234.474867610726506 4446930.267641404643655,3004048.631594866048545 4445264.886822195723653,3011006.099769443739206 4438215.722953799180686,3011191.66936059622094 4437790.357810690067708,3011191.66936059622094 4432022.435482876375318,3011129.664404225535691 4431597.318660767748952,3010728.02368144178763 4431325.291832115501165,3002904.712507471907884 4428578.671140423975885))
+POLYGON ((2804291.927938329055905 4435467.317885399796069,2801447.714948560111225 4436241.23637755215168,2799962.712941377889365 4436861.080760887823999,2796716.636589847505093 4438293.355328067205846,2796376.110267509706318 4438642.080834309570491,2794705.872627645730972 4440731.886706870980561,2794025.599219409283251 4442436.989644778892398,2793933.09272255981341 4442939.092294411733747,2793995.097678933292627 4443481.657626637257636,2795232.079860627185553 4447084.544819872826338,2797767.269943953491747 4452122.80516323260963,2799839.036987107247114 4454720.030186050571501,2801168.636985142249614 4456079.054110595025122,2807879.42116812383756 4458755.034223730675876,2812888.130336876492947 4458445.024254319258034,2814651.319751549512148 4457007.925696013495326,2812857.628796400502324 4446465.217853839509189,2812393.871797754429281 4444566.871689950115979,2810847.755390125792474 4440267.109022814780474,2804291.927938329055905 4435467.317885399796069))
+POLYGON ((2833389.395678310189396 4427727.755652001127601,2831627.096819561906159 4427960.424345386214554,2831225.456096780486405 4428269.543242838233709,2821144.585649522021413 4449138.765884415246546,2820959.016058369539678 4449565.563777130097151,2821577.395829726476222 4451155.010687317699194,2821917.476874099578708 4451464.806924395263195,2838213.425811837427318 4465117.415024137124419,2838986.762314376886934 4465622.831824013963342,2839419.906453055329621 4465778.500044224783778,2842573.810266209766269 4466710.32157569937408,2843037.90122332656756 4466825.477400668896735,2843625.22285675117746 4466747.635279382579029,2843996.362039056140929 4466476.799483831971884,2845944.230488957371563 4464342.498923522420228,2847181.21267065173015 4462557.166817271150649,2847892.544216820504516 4461430.574928456917405,2849315.095989667344838 4458055.01112013310194,2849840.41266672173515 4455691.361983134411275,2849840.41266672173515 4455186.559842771850526,2849716.848031942732632 4454022.507642270997167,2848696.382259839214385 4447084.544819872826338,2848355.744618010241538 4445264.886822195723653,2847582.964712924323976 4441274.338995424099267,2844954.82285478617996 4433221.267514560371637,2844676.635447293054312 4432834.411373354494572,2844335.997805466875434 4432525.020197060890496,2837131.066402854397893 4429044.050923293456435,2834348.747049967292696 4427882.867547772824764,2833389.395678310189396 4427727.755652001127601))
+POLYGON ((2875598.852280358318239 4451696.880951384082437,2874207.24732595263049 4451852.34409193135798,2872227.875460157170892 4452976.798601834103465,2871362.032460767775774 4453479.40158396679908,2870990.893278462812304 4453751.997976299375296,2870156.108417002949864 4455379.208257320336998,2870094.103460632730275 4455844.650148556567729,2870373.070104558952153 4456039.683933571912348,2874887.520734189078212 4456620.199491387233138,2876185.617316329851747 4454797.78369896300137,2876340.685367006342858 4454372.868426292203367,2876062.052681550849229 4452626.344511124305427,2875876.483090398367494 4452083.310158590786159,2875598.852280358318239 4451696.880951384082437))
+POLYGON ((2990474.332887533586472 4452395.366584139876068,2989360.915340618696064 4452588.103708253242075,2988866.211523531470448 4452743.579951132647693,2985650.302754006814212 4454527.25419442076236,2979960.874899053014815 4462750.089399657212198,2979836.864986308850348 4463293.672277498058975,2979929.371483158320189 4463721.042233766056597,2980918.779117329511791 4465312.620136441662908,2981228.024662752170116 4465622.831824013963342,2981754.120576242450625 4465737.975780152715743,2985650.302754006814212 4465234.789175631478429,2989484.925253362860531 4464613.279942925088108,2989855.619157702662051 4464380.92201981600374,2990103.193705228623003 4463837.283149088732898,2991432.793703263625503 4460112.482306686230004,2993256.652240420691669 4454332.387901779264212,2993350.049293194897473 4453286.648213068954647,2993288.044336824212223 4452860.677122609689832,2993009.522970859892666 4452588.103708253242075,2990474.332887533586472 4452395.366584139876068))
+POLYGON ((2727482.147207914385945 4454488.866925731301308,2726770.815661745145917 4456079.054110595025122,2726461.681435813661665 4456388.994668911211193,2722905.691621913108975 4458056.128215600736439,2722441.489345305133611 4458095.505906383506954,2720586.238711742218584 4457552.19051359873265,2719936.912121946457773 4456932.250252790749073,2718638.370261843781918 4456388.994668911211193,2718081.661488386336714 4456466.7604606943205,2717834.08694086316973 4456854.481035389006138,2717896.091897233854979 4457396.783153724856675,2718545.307167540770024 4460927.59360805619508,2719627.777896014973521 4463022.925109363161027,2720864.760077709332108 4464808.336003766395152,2722905.691621913108975 4466438.368755174800754,2725039.129662966821343 4467292.402431542985141,2726461.681435813661665 4467408.682696267031133,2729089.82329395134002 4467176.26320618391037,2730790.562474291305989 4465894.623883603140712,2731038.137021814472973 4465506.571240211836994,2731192.648475037422031 4465079.128976142033935,2731223.706612966954708 4464574.856000680476427,2731130.643518663942814 4457319.98790777195245,2728347.544929341413081 4454838.266005696728826,2727482.147207914385945 4454488.866925731301308))
+POLYGON ((2979311.548309254460037 4465002.417568036355078,2978909.017030545976013 4465156.958788872696459,2979465.725804003886878 4466554.639606798999012,2980270.009124987293035 4467951.387469961307943,2980579.143350918777287 4468261.816532250493765,2981104.348708481993526 4468379.085899204947054,2981970.303027362562716 4467990.941858330741525,2982094.312940106261522 4467329.718194139190018,2979743.801892005838454 4465195.245119240134954,2979311.548309254460037 4465002.417568036355078))
+POLYGON ((2604906.808742059394717 4480460.626241956837475,2602402.231518703512847 4480810.886679148301482,2601969.087380025070161 4480966.779411402530968,2602031.092336398549378 4481355.401777615770698,2603268.074518092907965 4482599.313734346069396,2603638.768422435969114 4482832.073717824183404,2613503.011140606831759 4488393.95167086366564,2617801.279319117311388 4490066.156265456229448,2618296.094455695711076 4490183.668753774836659,2621852.084269595798105 4490727.548790625296533,2622872.550041696522385 4490650.650316619314253,2625191.557673902716488 4490260.563810735009611,2625284.50944871455431 4489989.122570147737861,2624387.608311392832547 4488860.853721854276955,2616008.033641930203885 4483338.340961840935051,2615605.836321692913771 4483143.921381197869778,2610380.165465384721756 4482832.073717824183404,2606514.596147587988526 4481315.937130469828844,2606081.785967383068055 4481121.55491092428565,2604906.808742059394717 4480460.626241956837475))
+POLYGON ((2720740.750164965167642 4504939.620102197863162,2719596.719758082646877 4500926.416647368110716,2719905.965303505305201 4500576.606723877601326,2721235.453982049133629 4499408.648530495353043,2723214.825847844593227 4498863.197286057285964,2724235.180300456937402 4498785.117790421471,2725348.263888898305595 4496253.946593862958252,2725502.775342118460685 4495826.234877014532685,2725471.828523677308112 4494735.732925108633935,2725286.704210489988327 4494152.132486761547625,2721328.517076352145523 4488199.438609330914915,2718019.656532015651464 4484582.487382280640304,2716380.922308045905083 4482987.996394182555377,2714339.990763842128217 4481976.779560344293714,2713907.291903128381819 4481821.991483139805496,2713381.641267603263259 4481782.525086294859648,2712917.438990995287895 4482016.246685699559748,2712577.246627131476998 4482327.090460268780589,2712484.740130282007158 4482832.073717824183404,2712577.246627131476998 4498317.774389814585447,2712701.256539875641465 4498823.666840437799692,2713072.395722180604935 4499719.867032280191779,2716040.729944182094187 4503302.488531158305705,2717339.383123775944114 4504588.554254862479866,2720493.620895403902978 4506497.74816232547164,2720957.377894047182053 4506459.311176656745374,2720926.319756117649376 4505484.265295404009521,2720740.750164965167642 4504939.620102197863162))
+POLYGON ((2770123.300795260351151 4489911.109021447598934,2771329.336158513091505 4508368.705593240447342,2770927.58411624096334 4508640.622678660787642,2770680.009568717796355 4509031.393076618202031,2770494.439977565314621 4509459.643658461049199,2770401.93348071584478 4510433.936853010207415,2770711.067706650123 4510785.058240993879735,2772937.457522512413561 4510355.771143369376659,2774638.196702852845192 4509732.571330790407956,2775565.71070014173165 4509226.292628984898329,2776276.930926822125912 4508524.025788694620132,2776771.634743906091899 4507783.223872453905642,2777544.971246448811144 4505562.394675668329,2779832.920740722678602 4495864.773062561638653,2779925.983835025690496 4495397.559652292169631,2779647.351149570196867 4494969.882817408069968,2778070.287923500407487 4493217.878816088661551,2777699.482699668966234 4492984.748683739453554,2770123.300795260351151 4489911.109021447598934))
+POLYGON ((2822567.248741860035807 4496020.889195878058672,2819505.962745046243072 4497498.641979380510747,2817496.089338771998882 4504821.942305842414498,2817403.471522434148937 4505289.575584920123219,2817526.590879250783473 4506459.311176656745374,2817929.233477450441569 4507354.059750561602414,2819907.603467827662826 4508406.167435117065907,2821886.975333623122424 4509226.292628984898329,2827638.408144948072731 4508095.813445599749684,2834255.238677699584514 4505133.32147,2834595.87631952855736 4504783.371205891482532,2834595.87631952855736 4504237.640412975102663,2834440.808268852066249 4502017.562053215689957,2834317.243634073063731 4501510.534085975959897,2833946.104451768100262 4501238.801860622130334,2824298.489462675992399 4496488.130344793200493,2822968.889464643783867 4496098.948133024387062,2822567.248741860035807 4496020.889195878058672))
+POLYGON ((2614214.342686775606126 4509576.250961092300713,2610658.241553387138993 4510317.179670562967658,2610163.537736299913377 4510550.555001398548484,2608555.41637230059132 4512227.417740616947412,2608524.803512333426625 4512773.564833396114409,2614183.284548846073449 4514332.858559628948569,2618017.907048202119768 4512656.781564996577799,2618512.610865286085755 4512422.236411437392235,2618605.228681627195328 4511954.284698275849223,2617739.385682237800211 4510823.65143764205277,2617090.059092439711094 4510160.850577033124864,2616718.919910134281963 4509927.483928119763732,2615760.459094404708594 4509692.999885652214289,2614214.342686775606126 4509576.250961092300713))
+POLYGON ((2892543.571210438385606 4510005.646441966295242,2892172.432028133422136 4510277.60601701028645,2891740.178445384837687 4511135.20899641700089,2891585.221714199520648 4511641.579972072504461,2891492.158619896508753 4512811.042432369664311,2891492.158619896508753 4513435.408083665184677,2892295.996662915218621 4515230.526379526592791,2892543.571210438385606 4515620.419539357535541,2899532.542800913564861 4525373.879790550097823,2901480.411250814329833 4527286.869613168761134,2901882.051973595749587 4527561.387303836643696,2903304.715065933763981 4528067.570174076594412,2929093.210942084435374 4534317.667983707040548,2933422.53725852444768 4535215.788136119022965,2934505.453264963347465 4535255.596973669715226,2934567.012943371664733 4534786.621939474716783,2934443.448308592662215 4534239.323501671664417,2934040.805710393004119 4533262.809594201855361,2930299.691583302337676 4527951.740549314767122,2928630.010540894698352 4525726.627271573990583,2927980.683951096143574 4525101.527531155385077,2924084.056495369877666 4521822.333944291807711,2918239.67190923076123 4517296.97119851782918,2896625.322979355230927 4511057.038053310476243,2892543.571210438385606 4510005.646441966295242))
+POLYGON ((2788985.497954253572971 4533730.590969812124968,2791274.338004454504699 4530449.812572654336691,2792232.798820184543729 4529981.053417854942381,2798261.973761037457734 4529357.807863540947437,2803581.152989613357931 4528965.293322452344,2804199.421441479586065 4528849.453741465695202,2806828.008577582426369 4527598.91793271061033,2809580.160348464269191 4526155.561766492202878,2810538.621164194308221 4525101.527531155385077,2810847.755390125792474 4524748.801150203682482,2811404.464163583237678 4521900.585346129722893,2811434.96570406248793 4520807.366577243432403,2811372.960747689008713 4520260.800048492848873,2808776.322305445559323 4514138.004334425553679,2808405.183123140595853 4513863.698409047909081,2805900.160621819552034 4512851.748590719886124,2804786.631755413487554 4512889.22646953817457,2801725.34575860016048 4513631.372246361337602,2795665.223999302834272 4516204.233429819345474,2782430.561058384366333 4528693.831472559832036,2780636.870103229302913 4531857.200680519454181,2780204.059923024848104 4533185.598148101009429,2780296.677739365492016 4533693.038293369114399,2780729.821878043934703 4533849.719642945565283,2784161.801779200322926 4533966.739923378452659,2787686.844774659723043 4533848.735102883540094,2788985.497954253572971 4533730.590969812124968))
+POLYGON ((2703424.446774617768824 4512500.417545564472675,2702806.067003260366619 4512617.199070055037737,2702496.932777328882366 4512968.393665758892894,2702311.363186176400632 4513396.805260558612645,2701631.089777936693281 4521510.317570915445685,2701693.094734310172498 4522095.584206197410822,2702125.793595023918897 4524242.779033358208835,2702403.981002514250576 4525491.788878583349288,2703022.694732345174998 4526975.814506788738072,2703486.340411497280002 4527951.740549314767122,2704877.945365905761719 4530802.731521660462022,2705156.132773396093398 4531193.205949375405908,2708093.854135433211923 4534005.418790199793875,2708897.692178449127823 4534435.678107378073037,2710721.995993570890278 4534630.911135165020823,2712546.745086652226746 4534630.911135165020823,2712886.8261310281232 4534630.911135165020823,2715546.0261270981282 4533380.807789346203208,2717463.281717028934509 4530802.731521660462022,2717463.281717028934509 4530294.166452379897237,2715886.218490961939096 4525765.275627778843045,2715422.461492316331714 4524828.058152574114501,2714123.47435424849391 4522642.246653633192182,2713010.390765807125717 4521041.959277048707008,2712392.122313940897584 4520340.023033444769681,2706702.249181024730206 4514099.398920571431518,2706052.922591229435056 4513474.993671901524067,2704909.003503835294396 4512733.841532226651907,2703424.446774617768824 4512500.417545564472675))
+POLYGON ((2985371.670068551320583 4528224.167121556587517,2978228.632302818354219 4535918.865503062494099,2977393.847441358491778 4536350.329197475686669,2973498.110541559290141 4538302.90093,2972848.783951760735363 4538302.90093,2970776.460311153437942 4537833.788868735544384,2966632.703585863113403 4536895.487360257655382,2965674.354089627508074 4536584.286487980745733,2963695.872779755853117 4535333.949087027460337,2963385.847997897304595 4535021.669479073025286,2962582.455232843756676 4534357.3327392982319,2960788.764277691952884 4533613.713982847519219,2960387.01223541656509 4533888.398076020181179,2959056.96695941966027 4535137.577576085925102,2958933.847602602560073 4535528.214225790463388,2957943.99469046946615 4541431.604834700934589,2958068.004603210370988 4541938.461062184534967,2960634.586782942526042 4545184.276553530246019,2960974.333868841640651 4545497.987191624939442,2968395.447722577024251 4549878.673453361727297,2968859.649999184999615 4550075.32295002322644,2975538.485488309990615 4552344.245095481164753,2977054.10035545937717 4552775.403284180909395,2977641.42198888445273 4552814.011130857281387,3004389.269236692227423 4548666.459240220487118,3008810.656772019807249 4547219.058094223961234,3013077.978132089134306 4540962.351978728547692,3013356.610817544627935 4538811.71578948199749,3012768.398628192488104 4538108.58410448115319,3012367.203183373436332 4537873.466996195726097,3010047.750273204874247 4537521.293715745210648,2993999.37588299298659 4532247.855179800651968,2985371.670068551320583 4528224.167121556587517))
+POLYGON ((2614461.917234301567078 4533927.076652469113469,2613379.446505827829242 4534200.643767833709717,2612080.904645725153387 4535529.1989243356511,2608400.90491908043623 4541822.477345631457865,2607534.950600197538733 4545068.256700024940073,2607504.449059721082449 4545576.4163274820894,2607720.520191350020468 4545928.721094898879528,2608091.659373654983938 4546202.603337853215635,2612111.40618620114401 4546710.81831453088671,2616904.489501287229359 4547023.44832668825984,2620646.048906339798123 4547101.888951266184449,2622377.734905120916665 4546593.79571055714041,2623120.124589219689369 4545967.444368174299598,2623212.63108606915921 4545497.987191624939442,2623058.11963284900412 4545068.256700024940073,2622563.304496273864061 4544169.146645400673151,2618636.175500068347901 4537639.480786059983075,2617461.198274744674563 4535959.661762742325664,2614461.917234301567078 4533927.076652469113469))
+POLYGON ((2778565.437018549535424 4535100.019835663959384,2777142.773926211521029 4536154.923311424441636,2773710.348747092764825 4539320.555481129325926,2773463.219477529171854 4539671.663718836382031,2768855.817073086742312 4546476.633602500893176,2764124.738714374601841 4553245.188788737170398,2757228.83021820243448 4561233.804123914800584,2756888.749173829797655 4561585.652410380542278,2755466.531359453685582 4562251.587878682650626,2753703.787222743034363 4562643.384345375932753,2751477.397406877949834 4561546.870952818542719,2751075.645364605356008 4561468.321316871792078,2748879.757089216262102 4569110.161207509227097,2748509.063184873200953 4572560.418353465385735,2748539.676044843625277 4573148.561443340964615,2748725.245635996107012 4573697.911005570553243,2749250.896271521225572 4574599.579413051716983,2749962.227817690465599 4575149.00586155988276,2754477.12372528295964 4578091.637048865668476,2758280.242808744311333 4578993.687776558101177,2759795.412397931795567 4579189.759302168153226,2778843.513106551486999 4561429.681318907998502,2782832.313100656494498 4546672.0922771403566,2782863.259919094853103 4546124.169486564584076,2782677.690327942371368 4545576.4163274820894,2781410.095286280848086 4541861.044603277929127,2778565.437018549535424 4535100.019835663959384))
+POLYGON ((2616131.598276709672064 4579307.290986836887896,2616687.861772205214947 4579151.053245951421559,2618172.52982091344893 4578718.798355277627707,2618728.793316406197846 4578522.735742059536278,2620336.91468040831387 4577424.542934398166835,2620522.484271560795605 4576992.50129134953022,2621264.762636167928576 4569815.391704121604562,2621140.752723424229771 4569502.075460354797542,2620491.537453119643033 4568208.969819192774594,2620151.345089255832136 4567855.909279782325029,2612606.555281250271946 4562800.360942334868014,2611833.330098199192435 4562291.500233652070165,2611369.573099555913359 4562174.161167985759676,2610225.542692673392594 4562408.699589834548533,2605896.21637623058632 4564367.295120688155293,2605494.130375487264246 4564641.663395760580897,2605277.947924364823848 4566288.4485735129565,2606019.892330504022539 4569423.465617178939283,2609050.120189387816936 4577424.542934398166835,2614337.907321557868272 4579347.127749821171165,2615296.702095761429518 4579543.347232771106064,2616131.598276709672064 4579307.290986836887896))
+POLYGON ((2319465.043993145693094 4529591.60845682490617,2318908.335219688247889 4529591.60845682490617,2316805.955316566862166 4530333.95652253460139,2316403.757996329572052 4530607.429481688886881,2305828.295051477849483 4540336.33906732685864,2304684.264644595328718 4541744.076462551951408,2296520.761106761638075 4552462.600466134026647,2296211.626880827359855 4553676.24340208619833,2295407.788837811443955 4557904.456598003394902,2295624.305247402284294 4559784.653234807774425,2296366.249653541482985 4561859.947215891443193,2298004.983877507969737 4565073.332014946267009,2301901.500013746321201 4568208.969819192774594,2304282.067324360832572 4569580.685899084433913,2304622.259688224643469 4569267.376742330379784,2314796.081910292152315 4558100.271050187759101,2322495.383171517867595 4555320.305105186998844,2325061.96535125002265 4553245.188788737170398,2326360.507211352698505 4551954.104603708721697,2336873.965199833735824 4540688.466703986749053,2337554.349927561823279 4539085.411044028587639,2337090.592928915750235 4536936.28743973840028,2331401.165073961950839 4539906.821378733031452,2329267.281754945870489 4541157.707229615189135,2328277.874120775144547 4541588.402489566244185,2326113.377941791899502 4541510.003367272205651,2324165.064213925972581 4541119.142574476078153,2323268.608354569412768 4540805.563741405494511,2322897.469172263983637 4540531.682586186565459,2320021.752766603138298 4535333.949087027460337,2319867.24131338018924 4534786.621939474716783,2319465.043993145693094 4529591.60845682490617))
+POLYGON ((2289965.490252418443561 4645757.938416442833841,2294572.892656860407442 4635258.729845934547484,2302148.629283307120204 4618701.199315794743598,2316743.950360193382949 4596587.520767862908542,2316929.519951345864683 4596155.668770621530712,2316960.466769787017256 4595605.126096258871257,2316774.897178634535521 4594347.661371157504618,2315074.157998294569552 4588847.768120587803423,2314610.512319139670581 4587943.72739571146667,2314115.697182564530522 4587826.239007650874555,2308209.307640054728836 4588022.477880411781371,2288481.267481672111899 4592225.824324194341898,2283966.482893567997962 4593914.771249124780297,2283471.667756992392242 4594111.267165295779705,2268443.759138881228864 4601580.599333385005593,2264733.146552269347012 4604176.317799082957208,2264393.065507896710187 4604490.827350170351565,2264237.997457220219076 4605514.005558609962463,2264331.060551526024938 4607284.024811020120978,2264485.572004746180028 4607835.190679491497576,2266031.799731863196939 4612243.311076653189957,2270762.766771087422967 4625518.306838654913008,2275462.786991870030761 4625872.350122183561325,2275679.41472095483914 4625439.269581297412515,2279111.839900073595345 4623193.134194567799568,2279668.548673531040549 4623035.096011804416776,2280224.812169026583433 4623074.108802542090416,2280627.00948926107958 4623271.0192547775805,2282111.12094051623717 4624335.081860420294106,2282853.39930512662977 4624887.160904505290091,2283873.865077229682356 4625833.326717749238014,2286100.254893095232546 4628238.154554751701653,2287027.768890384119004 4630052.117421989329159,2287244.285299977753311 4630564.468378066085279,2287336.903116315603256 4631076.844877948053181,2287676.984160688240081 4634350.751596965827048,2287367.849934756755829 4635258.729845934547484,2286471.0601169266738 4637428.374474236741662,2285883.738483501598239 4640744.381877313368022,2285821.733527128119022 4641296.348635802976787,2286161.925890994723886 4645718.839369736611843,2286409.389119026716799 4646113.817685523070395,2286842.199299231637269 4646311.170363483019173,2287429.854891130235046 4646311.170363483019173,2288976.082618247251958 4646192.872048554942012,2289965.490252418443561 4645757.938416442833841))
+POLYGON ((2306508.568459717556834 4622641.146046263165772,2305952.30496422201395 4622799.178178265690804,2305117.408783270977437 4623311.167885870672762,2304251.56578388158232 4624375.092761349864304,2301066.26987432455644 4629420.693135056644678,2298159.940608693286777 4635810.259656444191933,2294913.085020724684 4644968.308751791715622,2294665.510473201517016 4645916.326625595800579,2294758.462248012889177 4646548.766415651887655,2298623.697607336100191 4650340.953272711485624,2299489.540606728289276 4650459.157233200967312,2301097.216692762449384 4649353.413182482123375,2305024.457008459139615 4642441.305368578992784,2305210.02659961162135 4642046.610592811368406,2309137.15559581713751 4632181.756960334256291,2311115.970864159520715 4625478.291490620002151,2311023.464367310050875 4624966.193919440731406,2308271.312596428208053 4623311.167885870672762,2306508.568459717556834 4622641.146046263165772))
+POLYGON ((2326515.129984064493328 4656586.152049966156483,2326144.436079724226147 4656743.56911623571068,2326484.517124096862972 4659748.621316115371883,2328154.198166504502296 4662161.415901540778577,2330566.268893013708293 4665129.02960529178381,2330906.46125687751919 4665286.578196319751441,2331184.537344879936427 4664891.001936285756528,2331030.025891656987369 4663665.197347464039922,2326917.21598481060937 4656783.706585568375885,2326515.129984064493328 4656586.152049966156483))
+POLYGON ((2304467.636915510520339 4698023.778242218308151,2305395.596190764103085 4697667.228583095595241,2306075.869599001016468 4697031.615140175446868,2307591.039188188500702 4694134.27539895940572,2307653.04414456197992 4693618.729966255836189,2307003.272276801522821 4669521.784697202965617,2306879.707642019726336 4668295.424598209559917,2306601.520234528928995 4667898.59197184164077,2298035.93069594912231 4661845.278220656327903,2286904.204255605116487 4659471.709627117030323,2286811.141161299310625 4659946.379289745353162,2286749.581482890527695 4662874.185581383295357,2288481.267481672111899 4676491.292090846225619,2288635.890254383441061 4677085.265271780081093,2293366.857293607201427 4690048.055367223918438,2297974.371017540805042 4696912.7278260756284,2298561.692650965880603 4697667.228583095595241,2299365.53069398412481 4698142.535632878541946,2304467.636915510520339 4698023.778242218308151))
+POLYGON ((2554163.711295291315764 4605868.353347864001989,2551813.645525152795017 4607009.515250405296683,2542011.519082843326032 4611456.251391385681927,2536012.400404501706362 4612440.156248584389687,2534249.767587282229215 4614014.486036391928792,2525808.076641955412924 4625242.175727065652609,2514459.72247252613306 4626227.398953069001436,2508460.715113675687462 4628277.18708670604974,2505832.573255538009107 4632576.07265236787498,2500668.350758146960288 4639599.614476575516164,2500328.269713774323463 4639954.143361265771091,2495504.684858212247491 4642402.361096421256661,2495009.869721633847803 4642638.729519088752568,2493927.510312651284039 4642915.186569072306156,2493618.376086719799787 4642559.560414928011596,2491144.300403837114573 4634942.284703065641224,2490989.788950616959482 4634390.801502734422684,2491082.740725428797305 4633917.313671095296741,2492257.717950752004981 4630919.679295207373798,2493185.231948040891439 4629105.563329363241792,2493154.173810111824423 4628671.352995689027011,2492845.039584177080542 4628317.213327918201685,2491546.497724074404687 4626976.702904577367008,2491175.358541769441217 4626739.559328150004148,2490031.328134886920452 4626739.559328150004148,2470612.088243962265551 4627173.688082550652325,2467767.318656739313155 4628553.257770746946335,2463005.293479586020112 4632023.580557527020574,2453790.377351210452616 4635810.259656444191933,2446307.592499578371644 4637033.872444457374513,2443215.35968432109803 4637428.374474236741662,2417086.22616634471342 4629420.693135056644678,2411210.783442273270339 4629657.898564474657178,2408582.53026464395225 4629578.829479771666229,2404037.132816575467587 4628080.038832253776491,2398563.776093250140548 4624690.077629146166146,2397079.664641994982958 4623626.120179714635015,2389348.859964874573052 4631352.990770772099495,2378402.703115680254996 4640783.461966125294566,2376732.910753780975938 4640744.381877313368022,2375495.928572087083012 4635376.902166412211955,2375001.22475 4634469.907626545056701,2367425.042850591242313 4627449.871062623336911,2364240.192218995653093 4624966.193919440731406,2357313.670862859115005 4621734.281463987194002,2356850.025183704681695 4621616.265859089791775,2355612.931682519149035 4621774.282252544537187,2354159.878369193524122 4622483.11634130962193,2349830.552052753511816 4628711.380771597847342,2349799.493914821185172 4630840.600502653047442,2350016.121643905993551 4631787.314415527507663,2351840.425459024962038 4633206.554824812337756,2352799.220233228988945 4634193.535923400893807,2353262.97723187180236 4635100.506055671721697,2353231.919093939475715 4635653.163677715696394,2351376.668460379354656 4640309.679216175340116,2350665.336914210114628 4641493.608634190633893,2350045.176031001843512 4640939.641697967424989,2349833.446359514258802 4640430.60968651343137,2349397.853192039765418 4640232.233306324109435,2349150.278644513804466 4640270.600931724533439,2349552.364645259920508 4640467.983316390775144,2349830.552052753511816 4640901.697904825210571,2350047.068462344352156 4641375.507992236874998,2350232.638053496833891 4642520.473560078069568,2350108.628140755463392 4643033.447078661993146,2347325.974829394835979 4650735.967511750757694,2336533.884155458305031 4674511.250916078686714,2336193.691791594494134 4674827.780745665542781,2326700.699575216975063 4683346.833690881729126,2316527.322631111368537 4687271.475570821203291,2312631.14045334700495 4686954.416517946869135,2312074.876957851462066 4687113.444453830830753,2311734.684593987651169 4687469.624644662253559,2311456.163228023331612 4687826.959409487433732,2308023.738048902247101 4692745.833523603156209,2307900.173414123244584 4693222.05346030369401,2307962.178370493464172 4694412.272219481877983,2309848.487141986377537 4708748.118191925808787,2313342.471999516244978 4711887.748553545214236,2334400.446114404592663 4713358.384705453179777,2341017.721925121266395 4711728.332718722522259,2341234.349654206074774 4711291.597673540003598,2341265.296472647227347 4709622.532822352834046,2341172.344697832595557 4708986.171260136179626,2340585.023064407519996 4708230.829801836051047,2340388.432843665592372 4707751.760709575377405,2340585.023064407519996 4706760.79311132337898,2340925.215428271796554 4706443.269096647389233,2342811.078921802341938 4704933.163468154147267,2343213.164922545664012 4704655.021884850226343,2346985.782465530559421 4702233.152319008484483,2347387.534507803153247 4702192.835605268366635,2353386.541866653598845 4711926.958936070092022,2356231.311453876551241 4718130.260653158649802,2356076.68868116196245 4719164.871233865618706,2355891.119090009480715 4719562.562102527357638,2354407.007638754323125 4721949.178253314457834,2353139.412597092799842 4723899.078209044411778,2349861.49887119140476 4728357.566078249365091,2349521.417826818767935 4728675.92032634653151,2348686.521645870991051 4729274.097909522242844,2348191.817828783765435 4729512.490055119618773,2346954.390369127504528 4729791.457565711811185,2342749.519243390765041 4723581.017339921556413,2330256.689389117062092 4729990.438062083907425,2318352.071724192705005 4737997.631647154688835,2317856.922629146371037 4738077.546218933537602,2317424.22376842983067 4737878.263122140429914,2312631.14045334700495 4733893.712523902766407,2310714.330141375306994 4724616.184505134820938,2314053.692226193845272 4721352.435721680521965,2318135.443995110690594 4718050.503362059593201,2318475.636358974501491 4717732.625956661999226,2318753.823766465298831 4717335.006851085461676,2318877.388401247095317 4716857.655423899181187,2318846.77554127946496 4716261.212479316629469,2318692.152768568135798 4715704.172742631286383,2318197.003673519007862 4715585.209854606539011,2308858.968188324011862 4714471.235198235139251,2308302.259414866100997 4714630.694127983413637,2307869.115276190452278 4714869.744076472707093,2307065.277233172208071 4716021.986577992327511,2305673.672278766520321 4718408.914928647689521,2304684.264644595328718 4720596.316280725412071,2304560.700009816326201 4721073.843761810101569,2304591.646828254684806 4721671.572580081410706,2305550.107643987517804 4722545.955924449488521,2305828.295051477849483 4722984.178709830157459,2306013.864642630331218 4723461.818721451796591,2306013.864642630331218 4724616.184505134820938,2304746.269600966013968 4728277.72824427112937,2303725.803828865289688 4730548.263750562444329,2302983.525464255362749 4731742.724844972603023,2301684.983604152686894 4733097.22017261851579,2285883.738483501598239 4748325.045729099772871,2279853.672986721619964 4760939.263072047382593,2278369.561535463202745 4761259.652613712474704,2269309.602138272952288 4762497.303244823589921,2265196.903550914954394 4762937.262405976653099,2264609.136639525182545 4763096.480868607759476,2260280.255601047538221 4766853.299872535280883,2259599.982192810624838 4767492.163285568356514,2258703.192374980542809 4768571.416561366058886,2250230.554611212108284 4784574.497353283688426,2250354.119245994370431 4784894.487552064470947,2253693.926608772017062 4785094.558677786029875,2251745.72420040005818 4796352.389997471123934,2247385.78502398962155 4810753.585069658234715,2245994.1800695839338 4812038.112105596810579,2244788.25602581910789 4812881.642421011812985,2233439.901856390293688 4819548.122277775779366,2233007.091676188167185 4819789.821429608389735,2232419.436084289569408 4819950.812799114733934,2227506.23903863877058 4821169.253002275712788,2227873.927316727116704 4821678.053283439017832,2228739.881635607220232 4822079.961623873561621,2229945.805679372046143 4822040.17515963409096,2236470.129715274088085 4819750.044087561778724,2236841.268897579051554 4819427.781134614720941,2237367.030852595809847 4818664.256145108491182,2238078.362398764584213 4818021.979971669614315,2242129.056029751896858 4816093.519429086707532,2244942.767479042522609 4815250.730131530202925,2247911.546979006379843 4814527.136044285260141,2248560.762249313294888 4814447.767972481437027,2250694.200290367007256 4814688.187219524756074,2251065.339472671970725 4814969.52700593881309,2261424.286007930058986 4825858.951582726091146,2261733.420233864337206 4826220.067245678976178,2261950.047962946351618 4826702.63658981770277,2262104.559416169300675 4827305.519203849136829,2261795.425190235022455 4828231.119852246716619,2259569.035374369472265 4832856.646169865503907,2258610.574558639433235 4837363.906678560189903,2258826.757009759545326 4837886.865226010791957,2259197.896192064508796 4838168.714896005578339,2260032.681053524371237 4838610.995850442908704,2260467.940262524876744 4838677.368671117350459,2267763.485730644315481 4835311.172091944143176,2268258.189547728747129 4835109.949200641363859,2268845.511181153357029 4835069.096669160760939,2269278.655319832265377 4835270.318735658191144,2271133.905953392386436 4836800.115950211882591,2271721.227586817461997 4837565.030186558142304,2272277.936360274907202 4839214.599022117443383,2272525.510907800868154 4840463.079487620852888,2272618.128724138718098 4842274.625529110431671,2272277.936360274907202 4843201.472494915127754,2271906.797177969943732 4844046.626853190362453,2267546.858001559507102 4850171.609533784911036,2264021.926325591746718 4854564.791302010416985,2263836.356734438799322 4855008.962925953790545,2261424.286007930058986 4864528.879033863544464,2261578.908780644182116 4864973.351221796125174,2273360.407088749110699 4874381.827432692050934,2275215.657722309231758 4875836.6350899906829,2276483.252763973549008 4876482.654459309764206,2277771.664550413843244 4876725.59540655836463,2279482.979082378558815 4875553.714852532371879,2280070.300715803634375 4875391.675742907449603,2288264.751072078477591 4875593.570479412563145,2291326.037068894598633 4876199.570307568646967,2293707.049657471477985 4876886.637988428585231,2295562.300291031599045 4878341.813509859144688,2299551.100285136606544 4879230.998674006201327,2300448.001422458328307 4879635.09430920612067,2301190.279787068255246 4880201.321586113423109,2301406.350918697193265 4880686.518698778934777,2306663.079912937711924 4898408.872629605233669,2306694.138050867244601 4899016.271753195673227,2306632.578372458461672 4901852.121546951122582,2305952.30496422201395 4903107.347568359225988,2305519.160825543571264 4904526.268971375189722,2305642.725460325367749 4905823.125966496765614,2305766.735373069532216 4906470.961777910590172,2305982.806504698004574 4906957.450238967314363,2308023.738048902247101 4910403.683680173009634,2308796.963231953326613 4910971.676898519508541,2310837.89477615756914 4911377.07269162684679,2314022.745407752692699 4923469.094507829286158,2314546.392292444128543 4928852.240950585342944,2319155.909767211414874 4933339.7897560717538,2327783.058984199538827 4933786.345486796461046,2328154.198166504502296 4933461.522465254180133,2328649.013303080108017 4933258.294061372056603,2330689.833527792710811 4933664.608754278160632,2331648.294343522749841 4934030.847734886221588,2332019.433525827713311 4934315.449574803002179,2332359.514570203609765 4934680.542152537964284,2342316.375104715116322 4947941.500721678137779,2342470.886557935271412 4948551.964532686397433,2343615.362242782954127 4956248.005617240443826,2343676.921921191271394 4956858.840305649675429,2343738.926877561956644 4962605.337556990794837,2343615.362242782954127 4964276.958845757879317,2343491.35233003878966 4964766.317995359189808,2342904.030696613714099 4966111.374446692876518,2341782.152868398930877 4967980.9327761977911,2340925.215428271796554 4969374.598410090431571,2340028.314290950074792 4970475.897728648968041,2335915.615703592076898 4981864.78276607580483,2335871.421865748241544 4991108.358754687011242,2351240.747362121473998 4991303.813680176623166,2354499.959413566160947 4991345.318920222111046,2372743.77680120524019 4992980.501055343076587,2375897.680614359211177 4993471.30056560318917,2377413.295481509063393 4993839.637246784754097,2378742.784160052891821 4994411.308032580651343,2380072.38415808789432 4995843.650352413766086,2382205.822199141606688 4998625.599215384572744,2382855.148788939695805 4999320.105820367112756,2383968.566335855051875 5000220.313105899840593,2384432.323334497865289 5000426.115919627249241,2394884.22164457058534 4999157.190599179826677,2396677.467321757227182 4998911.055320804007351,2397110.166182470973581 4998666.104603358544409,2397450.358546334784478 4998297.438137140125036,2398749.345684402622283 4996293.067589838057756,2401161.416410911828279 4993920.461186630651355,2401563.057133692782372 4993635.298471942543983,2402243.441861420869827 4993511.637317202985287,2404500.778495727106929 4993593.636264801025391,2424569.344976450316608 5001858.016964388079941,2425898.94497448252514 5002431.337341226637363,2439226.225731744896621 5019636.49462282191962,2439411.795322897378355 5020210.864236337132752,2439442.74214133573696 5020743.636813308112323,2439071.602959033567458 5022260.921871113590896,2438916.980186322238296 5023327.754945302382112,2439690.316688861697912 5026405.025462832301855,2446091.076089984737337 5031535.142056891694665,2446863.967314562294632 5032068.536762963049114,2471911.075382029637694 5037119.283754193224013,2477600.503236983902752 5037654.168938477523625,2478249.829826781991869 5037531.12942180596292,2482950.295325526967645 5034983.882172437384725,2487248.118226072750986 5032191.506953177042305,2497421.495170181151479 5030262.296185959130526,2499153.181168959476054 5030262.296185959130526,2502987.803668315056711 5030262.296185959130526,2513686.497289475053549 5030057.042710175737739,2514212.147925002966076 5029974.735661121085286,2514737.909880019724369 5030057.042710175737739,2529240.501821076497436 5033423.955413688905537,2530198.962636806536466 5033711.618251780048013,2530941.241001413669437 5034327.476029231213033,2531621.514409653376788 5035846.739494321867824,2531807.084000805858523 5036462.732963413931429,2533414.871406331192702 5045996.846888663247228,2533803.376429200638086 5049544.467288149520755,2534218.70944934990257 5056198.060979123227298,2534033.585136162582785 5056651.467682184651494,2533693.392772298306227 5056980.423115460202098,2533569.382859554607421 5057474.47001566644758,2533600.440997483674437 5058091.841868557035923,2534075.552584190387279 5058962.394319006241858,2534992.045951892156154 5060314.914774382486939,2536012.400404501706362 5061385.94889,2538516.977627860382199 5063650.557952541857958,2539537.443399961106479 5063898.342036843299866,2552153.837889016605914 5063073.606010945513844,2553179.758316170889884 5062936.749943591654301,2557627.08329285075888 5061961.613943135365844,2570861.746233772486448 5059738.162071352824569,2573706.515820994973183 5059779.961032719351351,2580478.414404420182109 5060068.408441480249166,2581436.875220153015107 5060355.678604567423463,2582735.862358218058944 5061015.038925304077566,2584251.031947405543178 5062167.545212736353278,2585642.191623848862946 5063567.964670922607183,2585889.76617137202993 5064062.348644714802504,2585982.272668221965432 5064598.726057955063879,2585549.573807508219033 5066617.267039603553712,2585766.201536593027413 5067811.237693785689771,2586106.282580965664238 5068182.557229286059737,2590837.360939681064337 5071480.109988888725638,2592104.95598134258762 5072221.710132919251919,2593156.36857188725844 5072427.860466413199902,2609390.312553251627833 5072922.698618148453534,2620336.91468040831387 5071108.811907929368317,2621697.461496881674975 5070284.646540273912251,2626923.24367268383503 5068677.177638240158558,2630602.798121363390237 5068182.557229286059737,2631128.560076379682869 5068265.190008547157049,2642538.919202179647982 5072799.209335132502019,2649001.683559675700963 5076963.986345325596631,2659020.437731069978327 5079233.29564834292978,2668822.675492870155722 5077541.769708931446075,2669317.379309957381338 5077624.48272927198559,2679057.946073860861361 5084185.278000235557556,2678686.80689155543223 5088933.448895493522286,2678686.80689155543223 5089469.874151663854718,2678903.434620637912303 5090006.478005197830498,2680604.062481486704201 5092485.444011938758194,2682057.227114303503186 5093807.423845406621695,2682521.429390911478549 5093973.130354365333915,2682985.075070063117892 5093931.182835306040943,2689169.318061592523009 5092485.444011938758194,2693930.897960783913732 5092883.74419055506587,2695632.08241908904165 5094550.894234282895923,2699002.502641837112606 5096452.0776751274243,2699930.350597596727312 5096783.584727366454899,2701043.3228665497154 5096865.272915579378605,2701662.147915869019926 5096783.584727366454899,2705589.276912074536085 5093600.964075463823974,2705929.35795644717291 5093270.756654633209109,2723554.906892217695713 5094096.891476961784065,2734501.175060903187841 5086868.015141350217164,2734841.256105275824666 5084804.361992904916406,2738830.501377343200147 5077087.380500149913132,2739448.769829209428281 5076304.574567339383066,2739850.855829955544323 5076015.789874082431197,2757136.212401861790568 5067152.599757673218846,2761774.672944236081094 5064433.523977391421795,2762114.42003013798967 5068305.83906808309257,2762671.128803595434874 5071892.234948397614062,2762887.756532677449286 5072263.71160726249218,2771731.53347875084728 5073294.214975167065859,2772288.242252208292484 5073294.214975167065859,2787051.210482229012996 5067135.689375552348793,2789799.132112461142242 5065968.944561464712024,2801138.135444666258991 5059284.758718376979232,2803674.104764425195754 5057474.47001566644758,2804229.922981958836317 5056908.11123116966337,2809641.720026872586459 5049943.21918898448348,2810136.869121918920428 5049696.829144877381623,2814125.112518570851535 5048257.853040026500821,2814713.324707922525704 5048257.853040026500821,2820371.805744435638189 5049162.610749549232423,2821391.826238573994488 5049367.084981746971607,2839048.767270750366151 5055128.786987651139498,2844212.433170685078949 5058625.516489160247147,2845263.957080718129873 5059656.788016425445676,2846191.805036480538547 5059985.845790454186499,2855684.351974896155298 5059326.555717932060361,2873619.035136600490659 5062043.155677351169288,2881071.318447756581008 5058131.410732832737267,2881690.032177584711462 5058051.087589741684496,2883792.857358670793474 5058338.297770418226719,2891986.862436980940402 5059574.228883455507457,2892946.213808638043702 5059820.722605410031974,2909891.04405820928514 5064803.378875255584717,2916353.697096211835742 5077376.345797964371741,2914776.633870142046362 5091866.014409247785807,2914529.504600583575666 5092814.583342048339546,2909581.464554312638938 5105630.923441110178828,2909303.722424784209579 5106044.513671593740582,2908747.013651326764375 5106044.513671593740582,2907386.021556885447353 5105508.205100575461984,2905778.234151360113174 5105300.302365380339324,2905345.090012684464455 5105547.969245448708534,2901943.722971495706588 5110224.755946486257017,2901634.477426072582603 5114032.66866032872349,2901665.980841967277229 5115772.820630943402648,2902593.828797726891935 5117926.198329390026629,2903304.715065933763981 5118630.52729545161128,2909736.866563459858298 5121986.456692368723452,2912457.626237938646227 5123106.455233114771545,2913447.47915007174015 5123353.537946856580675,2914065.747601937968284 5123313.699904442764819,2919104.179074733518064 5122634.091406902298331,2920441.460117632523179 5122116.099482588469982,2920685.138482979498804 5121704.202507778070867,2923805.98040736746043 5118506.449497965164483,2925166.972501805983484 5117636.011357743293047,2927053.281273298431188 5117347.175186991691589,2928784.07671615248546 5117303.932523739524186,2934503.672153112012893 5117794.226289664395154,2938648.764712288510054 5114777.557564367540181,2952131.002200736198574 5106252.432523016817868,2957789.03795928414911 5102942.946640087291598,2961593.047598672565073 5093227.62228830717504,2965087.032456199638546 5074448.188861912116408,2965149.037412573117763 5073953.272417837753892,2965179.650272540282458 5072838.986960372887552,2965241.209950949065387 5068347.823495480231941,2965179.650272540282458 5066616.228739549405873,2965025.472777790855616 5065422.40590738505125,2964870.404727117624134 5064762.744564876891673,2964622.830179591663182 5064226.358038769103587,2963077.159049927722663 5062167.545212736353278,2962365.493545284960419 5061509.292207544669509,2961500.42978233192116 5061054.619765172712505,2940535.073483780957758 5050684.352076249197125,2937133.59512310102582 5049778.267467464320362,2936576.886349646374583 5049778.267467464320362,2935339.904167949222028 5049903.683825273998082,2934195.873761066701263 5050314.889122676104307,2930485.261174454819411 5047023.36761015933007,2930361.696539675816894 5026074.743701051920652,2935185.726673199795187 5017259.517662289552391,2935927.114481883123517 5016561.515687679871917,2936082.182532559148967 5016111.161323936656117,2936112.684073035605252 5015577.609903871081769,2934535.62084696860984 5005828.190721437335014,2934319.88367381086573 5005254.670228005386889,2926310.557630726136267 4997887.399616753682494,2922259.75268024764955 4995925.668924441561103,2918085.494414484128356 4994247.444294072687626,2913601.54532532999292 4985622.50104670971632,2908777.515191802754998 4976351.49242555629462,2908190.750155831221491 4975536.361069223843515,2907479.418609662447125 4974881.601356188766658,2906304.441384338773787 4974025.307687539607286,2904386.629196954425424 4973495.083830581977963,2901789.545476746279746 4973208.166705247946084,2900073.555526169482619 4973240.633607111871243,2899284.968253387603909 4973453.654416625387967,2898573.191429256461561 4974556.588816134259105,2898202.942802878562361 4976595.88343863748014,2897460.664438268169761 4981741.270735996775329,2898975.834027455653995 4983947.07794916536659,2896842.395986402407289 4987257.753697221167386,2884472.685488945338875 4989913.784546762704849,2872660.685640361625701 4990607.670562290586531,2868826.953696933109313 4990444.753757906146348,2866321.931195609271526 4989955.283870407380164,2863136.635286051779985 4989628.591844335198402,2858931.318882353138179 4990568.376016210764647,2847614.356809327378869 4993101.800134906545281,2838801.638001189101487 4995638.091578741557896,2829678.783091698773205 4998378.446352214552462,2822629.253698233515024 5003044.036221878603101,2821701.405742470640689 5003616.394882757216692,2818671.06656409567222 5004271.907732407562435,2816846.762748976238072 5004477.648835719563067,2816414.063888262957335 5004271.907732407562435,2809209.021166159305722 5003249.898733896203339,2802622.692173883784562 5003780.56369636952877,2798046.236587879713625 5005254.670228005386889,2797705.598946053534746 5005622.421063783578575,2797365.963179643265903 5006523.211384287104011,2797767.269943953491747 5008408.34557940531522,2798076.738128358963877 5008858.195799253880978,2800333.852123682852834 5010414.180400345474482,2801509.274626968428493 5011070.151463992893696,2801478.661767001263797 5011480.893285455182195,2799437.841542288195342 5013569.529487399384379,2798942.692447239067405 5013857.63719923235476,2798355.370813813991845 5014019.618557096458972,2791281.573771356604993 5013465.97211976442486,2787434.594808521680534 5013056.326509311795235,2786933.545780459884554 5012971.803294125013053,2770463.493159124162048 4999893.276780248619616,2767247.584389596246183 4996866.06045457534492,2760872.985068811103702 4990531.289174153469503,2758527.817356270272285 4990527.904270991683006,2742046.298827379476279 4991385.794058518484235,2741520.648191854357719 4991508.103588390164077,2741025.944374770391732 4992326.777999582700431,2738366.299100735224783 4997357.055707762949169,2734995.878877987153828 5004682.215219059027731,2734748.749608426354825 5005051.123535951599479,2734160.982697039376944 5005255.701974437572062,2728192.922156629618257 5005705.55384,2719658.724714456126094 5004108.762255910784006,2715978.724987808614969 5003045.215092875063419,2715143.940126352012157 5002636.008074736222625,2709206.826404383406043 4996906.41126078274101,2707320.517632890958339 4994739.33824,2707011.383406959474087 4994330.480022084899247,2706825.813815806992352 4993757.636229572817683,2706331.109998719766736 4989995.753239088691771,2706825.813815806992352 4987135.350341885350645,2689107.758383184205741 4974433.316091583110392,2688272.862202235963196 4973984.904469298198819,2682428.366296605672687 4971005.957844934426248,2681036.87266169115901 4970557.703413643874228,2679305.075343418866396 4970557.703413643874228,2677449.824709858745337 4970801.9495939752087,2671049.065308735705912 4972353.047903523780406,2670461.743675310630351 4972556.941626336425543,2667895.161495581269264 4973699.001377834938467,2662298.35145696811378 4976270.666917422786355,2661463.455276017077267 4976842.48501711525023,2659051.384549511130899 4979251.219208499416709,2654536.488641915842891 4981006.553489316254854,2653485.521329335868359 4980884.375534555874765,2642198.726838315371424 4976270.666917422786355,2640838.180021842010319 4975046.462662902660668,2640219.911569976247847 4974270.669000033289194,2639632.144658586010337 4973413.253561505116522,2637869.8457998377271 4970068.05446252413094,2637065.562478857114911 4967008.524057738482952,2636911.051025636959821 4965214.307094823569059,2637189.572391600813717 4964235.568462431430817,2648847.0607869643718 4951035.387748647481203,2651970.351740151178092 4940088.866731777787209,2651475.202645102050155 4937566.933847431093454,2651660.77223625453189 4935412.963154092431068,2652155.476053338963538 4933461.522465254180133,2652526.72655513510108 4932567.436698960140347,2653299.951738183386624 4931388.760615543462336,2655928.093596324324608 4927448.821312197484076,2657659.890914593823254 4925214.46749209985137,2658680.245367205701768 4924158.289820204488933,2659112.944227919448167 4923875.004971791990101,2663071.131362054497004 4921925.85208054818213,2667338.452722126618028 4921114.208620633929968,2671883.961489686276764 4921966.041423079557717,2672317.105628361925483 4922168.890499595552683,2690499.363337592687458 4917298.598153837956488,2691921.46983247436583 4916528.525548479519784,2698167.606460886076093 4911701.167743005789816,2698507.79882474988699 4911335.904623419977725,2713536.152720823418349 4893185.70289006549865,2714742.188084079418331 4891688.276716186664999,2715422.461492316331714 4890474.561914285644889,2715793.155396656133235 4889584.220341579988599,2716009.783125740941614 4888046.268354052677751,2715824.213534588459879 4886791.934526039287448,2715515.079308656975627 4886347.501904183998704,2715112.881988419685513 4886105.344038739800453,2707351.575770823284984 4883354.945636302232742,2706300.163180278614163 4883233.97535714879632,2705743.788365294691175 4883233.97535714879632,2705187.079591837245971 4883394.978244399651885,2704754.380731123499572 4883678.2681635459885,2704259.231636074837297 4884486.839078559540212,2704043.160504445899278 4885457.677320634014904,2704012.102366513572633 4886589.665696772746742,2703362.775776718277484 4888410.816652597859502,2690777.439425594639033 4905660.590052857063711,2690499.363337592687458 4906025.643041610717773,2689416.892609118483961 4906998.60003347042948,2688334.421880644746125 4907322.55121900793165,2685489.763612913433462 4908173.192610918544233,2684345.733206030912697 4908173.192610918544233,2682304.80166182667017 4907849.213488264009356,2677449.824709858745337 4908498.349925624206662,2676893.56121436599642 4908701.067877429537475,2674976.194304941222072 4909674.288822386413813,2671822.401811277959496 4911579.849834209308028,2670987.505630326922983 4912146.742837689816952,2668204.295721516013145 4914256.636276696808636,2667864.214677140116692 4914620.985409303568304,2666843.748905039858073 4916244.437710150144994,2665823.283132939133793 4917298.598153837956488,2664648.305907615460455 4918191.297487592324615,2663225.754134768620133 4918962.668895166367292,2661401.450319646857679 4919449.774310674518347,2655031.637736964505166 4920342.668664479628205,2652990.817512251902372 4920018.289235746487975,2641797.086115534417331 4917218.403794144280255,2641363.941976858768612 4917015.51059727743268,2639199.445797872729599 4914783.669091738760471,2638148.033207330852747 4912958.815830420702696,2637931.405478246044368 4912472.031214875169098,2637467.759799094405025 4910566.297773729078472,2637282.19020794192329 4909308.954823482781649,2638178.98002577200532 4905944.373081988655031,2638828.306615570560098 4904120.133484050631523,2641023.749612994492054 4901000.858169175684452,2646497.106336317025125 4894480.925631389953196,2647672.083561640698463 4893550.29500678088516,2648661.491195811890066 4893752.706268275156617,2649187.253150828182697 4893873.805268422700465,2658309.106184900738299 4891242.604193062521517,2661215.880728493910283 4889867.687543207779527,2661649.024867169559002 4889584.220341579988599,2668822.675492870155722 4884730.122082219459116,2670523.303353718947619 4882505.419080154970288,2670801.936039177235216 4882101.206287914887071,2673306.513262533117086 4870382.425105519592762,2673337.460080974269658 4867596.563944501802325,2673213.450168230105191 4866951.268642218783498,2670863.495717586018145 4859404.283974021673203,2670523.303353718947619 4859081.897250337526202,2670090.604493005666882 4858880.19304081145674,2665235.627541040536016 4857710.41842819750309,2664122.543952599167824 4857670.489377525635064,2660535.607320257462561 4861300.187722977250814,2652403.05060086492449 4869655.976180799305439,2648352.356969877611846 4877614.635494385845959,2648475.921604659408331 4878866.788323625922203,2648290.352013506926596 4879312.049303421750665,2645229.066016690805554 4884082.545363639481366,2641116.701387806329876 4890393.419808938167989,2638611.79020597692579 4893833.875951577909291,2635055.689072585199028 4897720.308572799898684,2633045.815666310489178 4899218.64922490157187,2631468.641120752319694 4899867.218228945508599,2606391.031512808986008 4906917.322058567777276,2605247.001105926465243 4906957.450238967314363,2604752.297288839239627 4906836.044753313064575,2603577.208744024392217 4906065.767595267854631,2602278.221605959814042 4904606.506048484705389,2599712.084704192355275 4901649.544250690378249,2598011.345523852389306 4899097.484692858532071,2597300.125297174789011 4897639.106956114992499,2597114.444386530667543 4897031.938285388052464,2597083.4975680927746 4896424.66116469912231,2597269.067159245256335 4895452.745602964423597,2601319.760790229775012 4886873.047090103849769,2613750.585688132792711 4872523.411136692389846,2615884.023729186505079 4870544.382350513711572,2617213.623727221507579 4869736.948540818877518,2626676.114403119776398 4865901.300116297788918,2628562.423174612689763 4865134.05773657001555,2635550.392889669165015 4861784.460797340609133,2643590.331792723853141 4856178.419499859213829,2643713.896427502855659 4855129.58943179808557,2643466.767157942056656 4854645.640672094188631,2643095.627975637093186 4854404.255723091773689,2641271.324160517659038 4853718.887959462590516,2639385.015389025211334 4853154.169983415864408,2631994.403075769077986 4853758.65599603112787,2628500.418218242004514 4854242.56156762689352,2626676.114403119776398 4854605.86908648815006,2608988.560510976240039 4861744.515363811515272,2602587.801109856460243 4864892.417732688598335,2596063.031795989256352 4883274.007475986145437,2596434.170978294219822 4884405.746073025278747,2596465.229116226546466 4891607.124649567529559,2596372.166021920740604 4893266.86791699193418,2596032.08497754810378 4895290.380307371728122,2595351.811569311656058 4897679.197437481023371,2594980.672387006226927 4898570.122811509296298,2594362.292615649290383 4899299.863828825764358,2593558.454572630580515 4899988.538023591041565,2592723.669711170718074 4900555.931994060985744,2589878.454845989122987 4902054.703000235371292,2589383.751028901897371 4902297.251994022168219,2580107.275222118012607 4905700.567219590768218,2572686.050048891454935 4909511.689438340254128,2549154.111570611596107 4923752.36767238471657,2542938.921760641038418 4935209.694389957003295,2545103.306620135903358 4939437.643306219018996,2546371.34693976258859 4939275.722602820023894,2547979.023025796748698 4939437.643306219018996,2551690.080890373792499 4940698.84223267249763,2554410.840564852114767 4941756.798869955353439,2556421.15924908593297 4943017.124122267588973,2557441.513701698277146 4944075.330663150176406,2558245.463064208161086 4945417.549691008403897,2558369.027698989957571 4946069.169994520023465,2557967.275656714569777 4947493.275080964900553,2554812.926565598230809 4956369.87619560956955,2554410.840564852114767 4957266.133481825701892,2553823.518931427039206 4958000.242633783258498,2550514.65838708775118 4959793.137655030936003,2549370.627980205230415 4960118.980449268594384,2548813.919206747785211 4960118.980449268594384,2545412.88612403254956 4959182.119951448403299,2544979.741985354106873 4957836.841750662773848,2545072.805079657118767 4957347.828822636045516,2545041.746941727586091 4956736.963644482195377,2544701.665897351689637 4953152.473242415115237,2544082.952167523559183 4952378.413057223893702,2539970.587538639549166 4949080.69265341386199,2539568.501537893433124 4948795.66245056129992,2527446.810865921899676 4941552.3737254710868,2521695.37805459741503 4940373.790562064386904,2514830.86165483109653 4935453.207648564130068,2513872.066880627535284 4933502.78317275736481,2513996.07679337169975 4933014.981492416001856,2517057.362790187820792 4925377.326289309188724,2518170.335059138014913 4923265.049333589151502,2519159.742693309206516 4921763.050386058166623,2517211.874243407975882 4908417.059591980651021,2516284.026287645567209 4906349.562278912402689,2510130.396156083326787 4889300.906925423070788,2510006.831521304324269 4888653.030961782671511,2509945.27184289554134 4887439.688597288914025,2510130.396156083326787 4885295.476062068715692,2512356.897291440051049 4874260.821259754709899,2515263.560515544842929 4867717.48881509155035,2517583.013425712939352 4865295.929316299036145,2518695.42909721005708 4864368.618201184086502,2525436.937459649983793 4861018.698512369766831,2527292.299412701744586 4859969.357301495969296,2528034.577777311671525 4859364.493334841914475,2528312.653865314088762 4858961.077534260228276,2543897.382576371077448 4835995.418265760876238,2544361.47353348787874 4834626.972891788929701,2544701.665897351689637 4833138.498454585671425,2544825.230532133951783 4829839.327193905599415,2545319.93434921791777 4826743.454863306134939,2545598.010437219869345 4825818.136926871724427,2550669.615118270274252 4810713.843671167269349,2551937.210159934591502 4807060.621618228033185,2552493.918933392036706 4805737.011813800781965,2553514.384705492760986 4804734.201058094389737,2554287.275930070318282 4804131.523004014045,2562667.295877497643232 4797755.149833257310092,2563161.999694581609219 4797514.992656003683805,2573489.888091910164803 4787337.271366065368056,2575716.389227266889066 4784894.487552064470947,2589136.621759341098368 4769291.702638897113502,2590156.976211952976882 4767772.182417872361839,2591115.437027680221945 4766173.904484544880688,2596712.35838578781113 4754231.684601147659123,2596897.927976940292865 4753792.105256145820022,2598567.60901934793219 4749322.24430906958878,2598753.178610500413924 4748325.045729099772871,2598753.178610500413924 4747208.610439524054527,2598351.537887716200203 4746131.641674716956913,2596557.735613073222339 4743818.270347435958683,2595506.323022531811148 4742900.419510322622955,2583292.125853713601828 4736761.83392261620611,2578282.971406996250153 4735088.56864713691175,2573984.703228485770524 4734252.541774426586926,2570397.655276655685157 4733933.008152157068253,2569841.391781160142273 4733893.712523902766407,2569315.629826143849641 4734012.890611511655152,2566810.607324822805822 4735129.016372791491449,2566408.855282550677657 4735408.13877559453249,2566223.285691398195922 4735845.914605639874935,2566377.908464109525084 4736443.368621147237718,2568109.594462890643626 4740827.594982673414052,2568573.351461533457041 4741824.053520331159234,2569130.060234991367906 4742661.711569720879197,2569933.898278009612113 4743099.801662130281329,2572562.485414112452418 4743538.915612219832838,2573180.753865978680551 4742263.112024434842169,2573366.323457131162286 4741824.053520331159234,2573087.802091164048761 4740628.257661385461688,2572376.915822959970683 4739153.656734830699861,2572098.394456995651126 4738755.195526141673326,2571294.445094485767186 4736603.173829577863216,2571572.632501979358494 4736244.261176694184542,2572036.834778587333858 4736363.466963930986822,2579767.082858251407743 4740349.134614394977689,2583817.887808729894459 4743300.192584484815598,2584096.409174694214016 4743698.833050697110593,2585023.811852491926402 4747128.623610292561352,2585085.816808865405619 4747726.888751536607742,2584961.806896121241152 4748205.698733493685722,2580230.839856897015125 4758343.879346866160631,2578530.100676557049155 4760580.634439825080335,2578251.913269066717476 4760939.263072047382593,2574015.650046926457435 4765334.147664797492325,2573675.457683062646538 4765654.677038250491023,2559822.526290275156498 4772330.423905004747212,2554349.280886443797499 4773449.646194599568844,2553854.577069356571883 4773329.857255415059626,2553421.432930680923164 4773169.469010837376118,2541392.805353012401611 4760979.958306251093745,2541052.612989148590714 4760620.034074403345585,2540557.909172064624727 4759741.343782478943467,2539970.587538639549166 4758103.655749533325434,2539970.587538639549166 4756945.602438813075423,2540094.152173418551683 4755947.650050316005945,2540588.855990505777299 4752874.496610631234944,2540835.985260066576302 4751357.449856139719486,2541856.451032167300582 4748643.885778273455799,2543681.200125251431018 4744815.023917119018734,2544144.957123894244432 4744017.527057806961238,2544608.602803049143404 4743977.043748054653406,2546463.964756100438535 4746171.128500794991851,2546711.539303626399487 4746649.864705791696906,2546587.974668844603002 4747168.114335471764207,2550700.227978237438947 4744097.489249191246927,2556482.718927497509867 4738675.27559750340879,2557441.513701698277146 4737081.456931048072875,2559822.526290275156498 4731424.417508943006396,2559791.579471836797893 4727799.861084855161607,2564151.407328752800822 4726845.340932880528271,2568449.786826754454523 4726964.579373490996659,2566068.774238177575171 4724019.284894147887826,2561430.313695803284645 4718488.675038897432387,2553421.432930680923164 4711449.861872198991477,2541763.944535320624709 4706085.422846220433712,2533631.387815924827009 4703225.823126660659909,2533136.683998840861022 4703106.863366958685219,2532611.033363312948495 4703066.5431874319911,2530786.729548193514347 4703265.143064950592816,2525059.675705352798104 4704282.36699833907187,2524521.779925839975476 4704496.148540951311588,2522375.651462836656719 4705251.78436600510031,2521849.889507820364088 4706005.760148600675166,2521757.383010970894247 4706522.935225269757211,2521571.813419817946851 4706920.130974030122161,2521046.05146480165422 4707714.569070810452104,2520643.965464055538177 4707992.937487637624145,2517706.578060491941869 4708668.43460744433105,2517149.869287037290633 4708628.092348868027329,2507687.823889098130167 4704854.653838687576354,2507347.742844725493342 4704536.045393739826977,2507316.684706793166697 4703940.325884783640504,2507254.679750422481447 4701756.510337509214878,2507285.737888354808092 4701239.577770619653165,2510656.158111099619418 4697944.178697569295764,2511150.861928186845034 4697706.527030857279897,2513501.26165679609403 4696753.689637263305485,2514119.641428153496236 4696634.805571066215634,2516500.654016730375588 4696436.335147518664598,2516964.299695884808898 4696555.21689445246011,2517799.195876833051443 4696992.319299702532589,2523451.888299824204296 4697412.721220673061907,2528436.663778057787567 4696356.748023531399667,2533260.24863361986354 4691278.033582872711122,2534960.987813959829509 4690207.131610706448555,2555184.065747900400311 4686161.597936596721411,2567460.37919258326292 4677719.635436965152621,2567985.58455014647916 4676411.86060332134366,2570614.171686249319464 4671422.463489736430347,2572129.341275434009731 4669007.482136218808591,2572469.533639297820628 4668691.132657101377845,2572964.237456385046244 4668453.02201031986624,2573427.883135539479554 4668532.391609331592917,2575221.685410182457417 4669205.276787543669343,2579024.80449364380911 4670669.902895300649107,2581035.123177877627313 4671779.093955654650927,2581405.817082220688462 4672055.34146158862859,2581746.009446084499359 4672372.935548143461347,2581900.520899305120111 4672966.669121246784925,2581808.014402455184609 4673441.96596755925566,2591672.145801137667149 4672253.337692681699991,2592290.525572495069355 4672134.739057185128331,2595537.381160464137793 4670986.313661848194897,2595846.515386395622045 4670630.708550225012004,2597516.196428803261369 4667859.408257691189647,2597701.766019955743104 4667424.550360667519271,2598011.345523852389306 4665959.392137534916401,2598011.345523852389306 4665365.923207202926278,2597856.388792670331895 4664812.800159432925284,2594362.292615649290383 4659907.22603970952332,2597640.206341547425836 4655716.274264503270388,2598072.905202260706574 4655439.471657078713179,2604813.856967248022556 4651407.683157001622021,2612204.469280504155904 4650143.380744406953454,2619873.157681762240827 4650222.6084353486076,2626304.975220814812928 4645087.588124006055295,2626397.48171766474843 4642638.729519088752568,2627356.387811359483749 4640507.06235253252089,2633324.003073804080486 4630603.509744819253683,2633664.084118176717311 4630288.201708055101335,2635550.392889669165015 4628790.443184090778232,2649310.817785607650876 4625281.196888637728989,2655093.308734864462167 4623744.016964351758361,2663504.27550073293969 4621183.364433858543634,2667276.44776575313881 4619291.974656133912504,2679892.842254808638245 4607284.024811020120978,2679923.789073249790817 4606733.879873962141573,2679336.133481351193041 4601934.812091789208353,2678408.730803553480655 4599653.877782011404634,2672286.047490432858467 4589004.152276128530502,2672873.369123857468367 4575383.837715826928616,2675068.812121281865984 4561429.681318907998502,2677975.586664875037968 4557591.499473336152732,2681253.389071284793317 4551210.215276361443102,2681346.006887623108923 4550701.921485038474202,2681717.146069928072393 4548197.866267948411405,2681655.586391519289464 4547649.863189560361207,2679398.138437724672258 4535646.238042507320642,2678594.30039470596239 4533888.398076020181179,2676213.28780612628907 4530919.57703741081059,2675501.956259957514703 4530333.95652253460139,2675038.199261314235628 4530372.481328573077917,2666194.422315241303295 4532872.257741564884782,2665483.202088563703001 4533497.822811718098819,2663256.700953206978738 4539985.208444117568433,2661401.450319646857679 4545733.135561903938651,2659144.002365848980844 4548784.631943291053176,2656268.285960188135505 4551797.150800188072026,2654660.498554659541696 4552932.371845695190132,2651815.395008966326714 4554420.309083460830152,2651320.691191881895065 4554654.67261160351336,2646558.666014725808054 4556064.34747193288058,2622965.056538545992225 4574756.878176536411047,2622625.309452644083649 4575070.353206622414291,2622192.16531396843493 4576404.140101136639714,2622285.228408271446824 4576913.83464674744755,2623089.066451290156692 4577345.873010224662721,2623892.90449430886656 4577776.94067803490907,2625810.271403730846941 4579503.368447734043002,2626304.975220814812928 4580366.690229751169682,2626861.683994272723794 4582054.832788348197937,2626954.190491122193635 4583232.089359253644943,2626830.625856343191117 4583585.815329613164067,2625593.64367464883253 4584920.69917799718678,2624696.853856815490872 4585430.813013034872711,2624047.527267020195723 4585548.274206908419728,2617739.385682237800211 4585155.752665349282324,2616873.431363357696682 4584803.10376604180783,2611400.631237485446036 4582329.810759479179978,2608030.099695246201009 4579974.365063195116818,2607751.578329282347113 4579582.054754681885242,2606978.687104704789817 4578287.691504815593362,2606236.408740094397217 4576600.303862768225372,2597269.067159245256335 4576325.47792212292552,2587992.591352458577603 4576286.78256300650537,2586570.039579611737281 4575973.129527006298304,2586137.340718897990882 4575775.989117351360619,2580014.880044759716839 4572639.051971771754324,2577448.075226048007607 4569933.805126462131739,2576427.720773435663432 4568992.745054850354791,2575283.245088591240346 4568247.776166656054556,2574417.84736716421321 4567855.909279782325029,2572500.4804577389732 4567464.057187832891941,2567460.37919258326292 4567110.88088748510927,2564275.083283026237041 4567934.507249490357935,2562234.151738821994513 4568639.657850485295057,2561646.830105396918952 4567894.573197675868869,2559482.445245902054012 4563074.828868629410863,2559389.382151599507779 4562565.813677283003926,2560626.475652784574777 4558453.0001260926947,2560873.604922345839441 4558100.271050187759101,2561708.389783805701882 4557551.74613460060209,2562752.23264897428453 4557111.791142655536532,2567367.316098280716687 4556768.692737147212029,2569655.822190007660538 4556651.556966966018081,2571882.212005873210728 4557081.766056092455983,2576891.366452590562403 4545302.409746700897813,2578313.918225436937064 4525882.064801930449903,2578406.536041778046638 4525413.510587077587843,2579272.379041166976094 4524711.280757647007704,2582148.095446831081063 4522408.601508493535221,2591239.00166246201843 4516516.934061098843813,2596279.659525074064732 4513591.786066859029233,2596928.874795378185809 4513474.993671901524067,2597825.775932699907571 4513748.026007477194071,2600237.401381246745586 4515034.391883257776499,2600979.679745854344219 4515542.215101568959653,2601134.191199077293277 4516088.5351602723822,2600484.975928769912571 4518389.823100313544273,2598938.748201652895659 4521159.959989694878459,2597021.492611719295382 4523696.032880863174796,2596681.300247855484486 4524009.098110993392766,2605525.077193925622851 4521433.192941724322736,2607302.960781384725124 4512852.731155118905008,2609947.021326709073037 4509692.999885652214289,2615822.46405077772215 4505796.78631027135998,2618327.04127413360402 4503653.371078725904226,2618450.605908915866166 4503185.810764707624912,2618821.745091220829636 4500498.514477780088782,2618543.669003218412399 4500109.183532061055303,2617523.203231118153781 4499135.849273015744984,2616749.866728575434536 4498628.960541841574013,2615915.081867116037756 4498279.227197921834886,2607349.826287009753287 4496448.608842696994543,2606329.360514909029007 4496293.467363177798688,2603978.960786299780011 4496566.192755940370262,2602803.983560976106673 4496877.326984032057226,2599804.702520533464849 4497266.53805273398757,2590466.221757376100868 4495125.985646169632673,2586137.340718897990882 4492284.68887085095048,2585920.712989813182503 4491817.634683608077466,2582179.153584763407707 4482871.684017214924097,2582797.422036626376212 4481627.599916777573526,2583075.943402593489736 4480732.941178858280182,2582735.862358218058944 4480422.28441684320569,2580632.925857643131167 4479645.122927554883063,2580076.217084185685962 4479683.461922108195722,2577479.133363977540284 4480460.626241956837475,2577014.931087372358888 4480654.996255775913596,2568171.154141298960894 4488432.322563018649817,2567738.455280585680157 4489210.133542786352336,2567738.455280585680157 4494035.556405275128782,2568078.647644449491054 4494346.61565656773746,2568542.293323603924364 4494464.316154189407825,2569006.050322249997407 4494230.177533652633429,2569748.328686857130378 4493646.465076813474298,2570243.032503944355994 4493568.424367186613381,2572160.399413366336375 4493957.512804585509002,2575592.824592487886548 4497539.28872649371624,2575499.761498184874654 4500225.827081769704819,2574695.923455166164786 4501744.694952213205397,2558028.835335123352706 4511252.957712199538946,2552772.106340882834047 4513826.217041872441769,2552277.402523798402399 4514059.810971300117671,2535857.888951281551272 4521666.816289963200688,2535270.12203989457339 4521705.449637657031417,2533878.517085486091673 4521510.317570915445685,2531807.084000805858523 4520535.133262865245342,2530353.585409517865628 4519443.040403475984931,2529827.823454501572996 4518623.378475208766758,2529487.742410128936172 4517648.322851930744946,2529518.689228566829115 4516010.327224457636476,2530013.393045654054731 4507238.459212674759328,2530137.402958394959569 4506770.738984745927155,2533476.876362704671919 4496137.487319583073258,2539104.744539250154048 4487382.214990844018757,2550484.045527117792517 4466204.852682583965361,2550514.65838708775118 4465700.665647047571838,2550050.901388442143798 4464303.097930043935776,2549494.192614984232932 4463488.703952226787806,2549278.121483355760574 4462983.389339240267873,2548690.354571968782693 4458909.484027232043445,2548783.417666271794587 4457319.98790777195245,2549432.632936575915664 4455574.233453514054418,2550019.95457 4454876.514948298223317,2550360.146933864802122 4454682.758956250734627,2551442.506342847831547 4454566.618738356046379,2552215.397567424923182 4455651.993250287137926,2552586.536749730352312 4455885.136465031653643,2553112.298704749438912 4455923.528804956004024,2555276.683564241509885 4455651.993250287137926,2555586.263068138156086 4455302.567271819338202,2561059.174513498321176 4442552.857374437153339,2561368.308739429805428 4437790.357810690067708,2561925.017512887716293 4430436.970140744931996,2562017.969287699088454 4429972.643424762412906,2566223.285691398195922 4420808.08774437289685,2570459.660233026370406 4414393.675601180642843,2573057.189231196418405 4407751.86814397200942,2573149.807047537527978 4407288.530879468657076,2572933.179318452719599 4406825.213763133622706,2570026.516094350721687 4404084.911782586947083,2567800.460236959159374 4402927.560478639788926,2567274.809601430781186 4403081.199932725168765,2566223.285691398195922 4403004.935587024316192,2563934.890919161960483 4401923.957566264085472,2563718.708468039520085 4401422.677655462175608,2563316.62246729619801 4399647.90001015458256,2563533.138876886572689 4391357.339631792157888,2563996.895875532645732 4388428.31535981874913,2564120.46051031164825 4387965.816303793340921,2564460.652874178718776 4387118.138279828242958,2569130.060234991367906 4380261.782075865194201,2572593.098274080082774 4378298.006866681389511,2582673.857401847373694 4363524.962273241952062,2583075.943402593489736 4362718.242576610296965,2583106.556262560654432 4362218.79596976749599,2582952.044809337705374 4361026.943705221638083,2582766.363898696843535 4360488.557131772860885,2582426.282854321412742 4360219.304786041378975,2575963.518496827688068 4359412.833394576795399,2575407.255001334939152 4359450.879663170315325,2570366.597138723358512 4361334.13086802046746,2557317.615108445286751 4372255.780158194713295,2556977.422744581475854 4372564.397179501131177,2556730.293475020676851 4372909.870401630178094,2555307.741702173836529 4376296.624132765457034,2547886.516528950072825 4390046.803444558754563,2536754.678769111633301 4410686.203188331797719,2536476.157403147779405 4411072.254005204886198,2536074.405360875185579 4411342.65083082113415,2535054.050908262841403 4411573.988064298406243,2530353.585409517865628 4412076.718998371623456,2520674.91228249669075 4411960.071072018705308,2519623.499691954813898 4411883.604114179499447,2518727.043832595460117 4411613.193550284951925,2515387.125150323845446 4410184.510957996360958,2514583.287107305135578 4409759.293516525067389,2512790.041430118493736 4407636.379376022145152,2506110.649343539960682 4392898.830288428813219,2502740.229120791889727 4384344.893335309810936,2502400.148076419252902 4382495.584676870144904,2502523.71271119825542 4374103.182351047173142,2502740.229120791889727 4373179.441444976255298,2503080.421484656166285 4372332.933580402284861,2503977.211302486248314 4370255.387172147631645,2504224.45189153868705 4369870.808244172483683,2504688.542848655488342 4369510.061651204712689,2504966.730256148613989 4369294.034952556714416,2505152.299847301095724 4368870.302914453670382,2505368.370978930033743 4367948.120464978739619,2505492.380891673732549 4365870.45425434038043,2505553.940570082515478 4364832.25647543463856,2505615.945526455994695 4363140.624535604380071,2505523.439029606059194 4362526.017233554273844,2503451.560666961129755 4353880.126825681887567,2502090.90253099380061 4356184.510326249524951,2493278.183722855523229 4366024.669799675233662,2491051.793906987644732 4374565.082669512368739,2488670.78131841076538 4397294.993674661964178,2482084.452326138038188 4413350.753284458070993,2476147.338604169432074 4421465.160245471633971,2469684.685566164553165 4424171.664067097008228,2465324.301111792214215 4432255.198337392881513,2466901.475657350383699 4439454.563780858181417,2466715.906066197901964 4440964.840840730816126,2466437.718658707104623 4441856.136350994929671,2466035.632657960988581 4442126.342106496915221,2465479.369162468705326 4442281.664736848324537,2462479.642844060901552 4442824.196391643024981,2457161.242851920425892 4443404.963333116844296,2456047.825305008329451 4443404.963333116844296,2454594.660672191064805 4443172.094972506165504,2452275.207762022968382 4442552.857374437153339,2446740.402679783292115 4440112.791726550087333,2443864.574954628013074 4438758.046454407274723,2442070.883999476674944 4437403.334960106760263,2441576.180182389449328 4436512.27448345720768,2440834.347095744218677 4434460.639510140754282,2440432.149775509722531 4420537.311106176115572,2440463.207913439255208 4419997.030746473930776,2440741.284001441206783 4418025.928970955312252,2441391.055869201663882 4414123.062205391004682,2441576.180182389449328 4413698.660809639841318,2442101.94213740574196 4412964.619837751612067,2443431.430815952830017 4411690.631760626100004,2444761.476091949734837 4410994.8202921487391,2442132.888955846894532 4406014.248850472271442,2435824.747371064964682 4400188.259996409527957,2435298.985416048206389 4400341.859992349520326,2434958.904371675569564 4400651.288761326111853,2434433.587694621179253 4401383.509644056670368,2431928.565193300601095 4405628.381286242976785,2430413.39560411311686 4408408.273934078402817,2430042.25642180768773 4409257.644947963766754,2429826.0739706880413 4410184.510957996360958,2429764.06901431735605 4411227.123120685108006,2429578.499423164874315 4411651.425989485345781,2429238.41837879223749 4411960.071072018705308,2428805.719518075697124 4412114.953102174215019,2427846.813424383755773 4412076.718998371623456,2423455.927429535426199 4411304.55852313991636,2423115.846385159529746 4411072.254005204886198,2422899.218656077515334 4410570.543586943298578,2422775.654021295718849 4409952.230872687883675,2416127.32007264951244 4413389.965314585715532,2415941.750481497030705 4413776.114192477427423,2414674.155439835507423 4417291.450314751826227,2414117.446666378062218 4421078.732129293493927,2414148.504804307594895 4422741.433005985803902,2414303.016257530543953 4423939.217541140504181,2415323.482029630802572 4427148.821208208799362,2416405.952758105006069 4427922.133216517046094,2416900.656575188972056 4428812.333245004527271,2417055.168028412386775 4429353.2013742281124,2417147.785844753030688 4429856.773817924782634,2416962.216253600548953 4431365.684519940987229,2416498.459254954475909 4432177.610151867382228,2408675.148080985061824 4440422.404397350735962,2405861.436631694436073 4442862.401929729618132,2402491.016408946830779 4447627.322640165686607,2402305.335498302709311 4448403.246137661859393,2400604.707637453917414 4459336.816227672621608,2400511.644543151371181 4460384.132527649402618,2400728.272272233385593 4461625.711871846579015,2401965.254453930072486 4466166.562688733451068,2402150.824045082554221 4466710.32157569937408,2402892.657131727784872 4467990.941858330741525,2403449.365905185695738 4468728.805150520056486,2405057.598588676191866 4470397.888906689360738,2407871.310037966351956 4471835.833292075432837,2412262.196032817475498 4476574.259107195772231,2412849.851624713279307 4477312.723571316339076,2415045.294622140470892 4481744.038494327105582,2415168.85925691947341 4482365.439225408248603,2415230.864213290158659 4484620.984358500689268,2413561.183170882519335 4491701.224589797668159,2411149.112444373313338 4498356.321723284199834,2410035.694897461216897 4500887.859871429391205,2405026.540450743865222 4509692.999885652214289,2402336.393636235501617 4513358.202579782344401,2401408.545680472627282 4514372.447541481815279,2399800.758274944033474 4516010.327224457636476,2396986.601547691971064 4518428.303903718478978,2382360.444971852935851 4530333.95652253460139,2370393.822350557893515 4548197.866267948411405,2368538.460397506132722 4549684.140608288347721,2363807.493358285166323 4552462.600466134026647,2362013.69108364218846 4553402.164438782259822,2361024.283449470996857 4553832.239126738160849,2357097.154453265480697 4554890.168884339742362,2354066.815274890512228 4555398.808294584043324,2351098.481052888557315 4556103.108478280715644,2349954.116687532514334 4556925.721580040641129,2349552.364645259920508 4557787.167058262974024,2349552.364645259920508 4558883.283774516545236,2349892.557009123731405 4562055.836216751486063,2350232.638053496833891 4564524.438839602284133,2351531.291233093477786 4569463.264422057196498,2351902.430415395647287 4570521.799300007522106,2352582.703823635354638 4571109.826801325194538,2353169.914137568790466 4571069.880526968277991,2353572.11145780608058 4570835.146340511739254,2354314.38982241647318 4569659.296933384612203,2354716.141864688601345 4569384.654872909188271,2355922.177227941807359 4569110.161207509227097,2357499.240454011596739 4569227.578688781708479,2358921.458268384914845 4569580.685899084433913,2360777.154179910197854 4570913.766880535520613,2361797.619952010456473 4571776.373554300516844,2369280.293484154157341 4578601.414601535536349,2372867.341435984242707 4583507.098596780560911,2378588.272706832736731 4595566.217096707783639,2379330.105793477967381 4598788.944715039804578,2379330.105793477967381 4600990.837986891157925,2379206.541158698499203 4602603.489048136398196,2380505.083018801640719 4609331.036991983652115,2387246.480061753187329 4607835.190679491497576,2390400.272555416449904 4606261.662487578578293,2391482.74328389018774 4605356.238316214643419,2396677.467321757227182 4602288.045950640924275,2397790.550910201855004 4601973.745090745389462,2403975.127860201988369 4600480.097339485771954,2405892.383450135588646 4600952.050255228765309,2409139.239038101397455 4601894.888223518617451,2412107.573260106146336 4603193.342537483200431,2412478.712442408315837 4603468.741751751862466,2413066.034075836185366 4604216.392098695971072,2417395.360392276197672 4610077.978883379139006,2418106.580618953797966 4611495.220343335531652,2419250.611025836318731 4614644.965702180750668,2420116.454025225713849 4618149.452001132071018,2420394.641432718839496 4618583.360282224602997,2423827.066611840389669 4622444.10579123813659,2424538.398158009164035 4623035.096011804416776,2432207.086559264920652 4627331.789867335930467,2433258.165191335603595 4627685.895592899061739,2444421.395047577098012 4626069.314146853983402,2451409.364762633573264 4623271.0192547775805,2451780.503944939002395 4622404.102398933842778,2451966.073536091484129 4620867.352217457257211,2452182.701265173498541 4619882.783899360336363,2453728.817672802135348 4618189.580659801140428,2468107.511020606383681 4608228.574823850765824,2468509.597021349705756 4607952.906867854297161,2473024.047650979831815 4605631.695261105895042,2474013.56660464219749 4605159.528320432640612,2491144.300403837114573 4600125.792935026809573,2499740.948080349247903 4598278.171429161913693,2508800.907477539498359 4595447.510181567631662,2521633.818376188632101 4590183.330998354591429,2528065.524595752824098 4586412.100182895548642,2529364.066455855499953 4585627.006463348865509,2529704.258819719776511 4585313.211805400438607,2530230.020774736069143 4584567.068930239416659,2533754.952450707089156 4580327.979775842279196,2538022.273810773622245 4575383.837715826928616,2544485.038168269675225 4571109.826801325194538,2545660.015393593348563 4570677.907047950662673,2550112.906344812363386 4570677.907047950662673,2554009.088522579986602 4571462.009975601918995,2555338.688520614989102 4571932.641348043456674,2555709.827702919952571 4572168.388545202091336,2556575.670702308882028 4573344.663613837212324,2557255.944110545795411 4574756.878176536411047,2557997.888516684994102 4576913.83464674744755,2557812.318925532512367 4577345.873010224662721,2554689.361930816434324 4579660.741659299470484,2550081.959526374470443 4582564.805428810417652,2548164.703936440404505 4583664.532660949975252,2546185.777348610106856 4583820.838507756590843,2545783.691347863990813 4583585.815329613164067,2544639.660940981470048 4583664.532660949975252,2544082.952167523559183 4583860.692636501975358,2544175.903942335397005 4584331.887476808391511,2544547.043124640360475 4584605.795234808698297,2547144.238164340145886 4586490.839011363685131,2554163.711295291315764 4590614.933554857037961,2555060.501113121397793 4590889.997661768458784,2556173.584701562765986 4590850.116448303684592,2559884.197288174647838 4589633.106281627900898,2561337.695879462640733 4588965.268110646866262,2562481.726286345161498 4588101.228964559733868,2562976.430103431921452 4587864.977510432712734,2565419.447648379486054 4587668.741625010035932,2566934.617237566970289 4587551.114982175640762,2571232.551457603927702 4587708.610574227757752,2571758.202093131840229 4587747.490016640163958,2573053.627007491420954 4588014.419006150215864,2574232.277776011731476 4588257.601834961213171,2579148.814406387973577 4589947.031986461021006,2583725.269992389250547 4592932.772047288715839,2584436.601538558024913 4593521.932081802748144,2584652.672670186497271 4593993.567218992859125,2585549.573807508219033 4600557.810958041809499,2585518.626989069860429 4601069.687948988750577,2585178.434625206049532 4601422.892207245342433,2573768.075499403756112 4609094.299441749230027,2573273.371682316530496 4609290.942817504517734,2563161.999694581609219 4610196.854179413989186,2556668.288518649991602 4609645.562073113396764,2554009.088522579986602 4608858.700680968351662,2554163.711295291315764 4605868.353347864001989))
+POLYGON ((2246210.80779866874218 4746649.864705791696906,2244819.202844260260463 4747128.623610292561352,2244510.068618328776211 4747407.934056561440229,2241603.294074735604227 4750440.062611720524728,2240211.800439818296582 4753432.437551503069699,2240057.177667106967419 4755069.366933985613286,2240149.795483447611332 4755588.049187225289643,2241232.154892427846789 4756027.706823918037117,2241695.911891073454171 4756147.290118428878486,2244757.197887890040874 4753592.511805917136371,2247261.775111245457083 4750798.474415720440447,2248591.820387245621532 4748405.042038280516863,2248900.954613177105784 4746888.666924576275051,2248467.810474501457065 4746689.209962364286184,2246210.80779866874218 4746649.864705791696906))
+POLYGON ((2210248.489700448233634 4839577.358212221413851,2211361.461969398427755 4839376.04914362449199,2218164.307371264323592 4836115.814523646607995,2220483.315003470517695 4834546.285969933494925,2220885.51232370827347 4833218.015262758359313,2220885.51232370827347 4831447.938689767383039,2220019.669324318878353 4828834.239611252211034,2218504.499735131394118 4826944.509008724242449,2218195.365509196650237 4826582.209181436337531,2217051.335102314129472 4825737.521235360763967,2216618.190963638480753 4825536.491404929198325,2212536.439194721635431 4824773.51222223136574,2209568.104972720146179 4823285.349628708325326,2208856.884746039751917 4822843.747791707515717,2208578.252060584258288 4822441.953391986899078,2208423.740607364103198 4821839.21976809669286,2208516.692382175475359 4819026.124135456047952,2209320.530425194185227 4815089.669892700389028,2218349.876962417270988 4790261.46493281237781,2218813.63396106287837 4789460.359654772095382,2228399.689271743409336 4784093.954653345048428,2229481.714722255244851 4783733.202406467869878,2230038.423495712690055 4783773.845839191228151,2231739.162676053121686 4784454.575725758448243,2232790.575266594532877 4785214.487949702888727,2233439.901856390293688 4785935.967709517106414,2233903.547535544726998 4786856.596401552669704,2234367.304534190800041 4786856.596401552669704,2234707.385578563436866 4786536.399489356204867,2239933.613032325170934 4775930.260242241434753,2239995.17271073628217 4775369.919439794495702,2239778.990259613376111 4774889.816747831180692,2239191.334667717572302 4774090.080498282797635,2238820.195485412608832 4773809.885471927933395,2235264.205671512056142 4774570.145005719736218,2213494.900010451674461 4785535.651757119223475,2213062.201149738393724 4785816.029818411916494,2212505.49237628094852 4786576.045108576305211,2210217.43156251590699 4791223.16418301127851,2210031.861971362959594 4791663.228585302829742,2209784.287423840258271 4792665.885965898633003,2209351.588563126511872 4796393.084585448727012,2209382.535381567664444 4798717.568192147649825,2209660.722789057996124 4799719.632264917716384,2209042.454337192233652 4801043.601805137470365,2206723.001427023671567 4804533.73761610686779,2206166.737931528128684 4805295.173406920395792,2204837.137933495920151 4806619.735961075872183,2197477.472438680939376 4811556.250606837682426,2190303.48785450682044 4818785.600505285896361,2190025.300447013229132 4819146.460440088063478,2186469.310633113142103 4828873.908391376957297,2186314.687860401812941 4830643.528108220547438,2187520.723223657812923 4832937.319416861049831,2189994.353628575336188 4835914.720264517702162,2192127.791669625788927 4836196.514153338968754,2192653.442305151373148 4836115.814523646607995,2203197.958431564737111 4835512.399046022444963,2203754.667205022182316 4835552.094403728842735,2204558.505248037632555 4836035.115547454915941,2210248.489700448233634 4839577.358212221413851))
+POLYGON ((2158886.567204357590526 4842477.008023939095438,2158268.298752491362393 4842516.876120765693486,2157835.154613815713674 4842757.972777343355119,2157124.268345608841628 4843402.858915512450039,2156938.698754456359893 4843845.372402957640588,2157124.268345608841628 4846424.289312342181802,2157247.832980387844145 4846866.937166050076485,2157556.967206322122365 4847229.830273079685867,2162102.47597388504073 4847109.154517590999603,2162690.131565780844539 4847068.252730667591095,2162999.265791715588421 4846705.365516665391624,2162782.749382121954113 4846181.943603164516389,2160061.544429681263864 4843241.343493040651083,2158886.567204357590526 4842477.008023939095438))
+POLYGON ((2685984.467429997399449 4137939.478070378303528,2684933.054839455522597 4137977.711723309010267,2680944.254845350515097 4140048.761176745872945,2679398.138437724672258 4141141.389746706467122,2678655.860073114745319 4141706.257034968119115,2676645.986666840035468 4143515.109615967143327,2676676.933485281188041 4144080.232682843226939,2679985.348751658573747 4146039.66516522411257,2683417.885250268038362 4145662.756665557157248,2685427.758656539954245 4144984.814713045023382,2685891.849613659549505 4144758.119679499417543,2685984.467429997399449 4144419.7814986188896,2685984.467429997399449 4137939.478070378303528))
+POLYGON ((2636261.724435838405043 4194423.900392930023372,2626954.190491122193635 4195256.682769252918661,2626428.539855597075075 4195445.842539712786674,2625655.648631019517779 4195976.134049149230123,2618358.099412065930665 4203095.897699853405356,2618234.089499322231859 4204989.802524420432746,2623707.334903156384826 4235685.152649534866214,2625191.557673902716488 4241499.250113813206553,2625346.069127122871578 4242031.764515452086926,2626459.486674037761986 4244655.025254325009882,2627851.091628443449736 4247545.376979343593121,2628098.2208980047144 4247203.741505560465157,2628191.283992307726294 4246708.628603436052799,2628222.230810748878866 4246214.496472283266485,2628252.843670716043562 4241271.663181012496352,2628654.929671462159604 4235722.631021910347044,2628933.117078955750912 4234849.308770543895662,2629180.691626478452235 4234469.363472053781152,2632613.116805600002408 4231999.902709701098502,2633478.959804988931865 4231544.033524968661368,2634560.985255498439074 4231506.432682193815708,2638766.30165919708088 4232303.46137120667845,2640374.423023196402937 4233064.035728407092392,2641054.696431432850659 4233633.612149501219392,2641332.883838926441967 4234013.391765197739005,2641827.587656010407954 4238344.382963853888214,2641642.240703840274364 4240678.152914277277887,2641271.324160517659038 4242259.504090448841453,2639539.638161736540496 4246290.757582847028971,2639168.498979434370995 4251768.844274365343153,2639199.445797872729599 4252339.530375071801245,2639323.010432654526085 4252833.80201150290668,2640188.853432043921202 4254698.618115783669055,2642569.866020620334893 4257440.040612590499222,2642910.058384484611452 4257744.304823121987283,2643682.949609062168747 4257553.933116088621318,2646125.967154012061656 4255459.651964718475938,2646682.67592746950686 4254774.938351130113006,2646651.617789537180215 4254204.262232827022672,2646373.541701538022608 4253823.645346481353045,2645723.769833777565509 4252415.834156680852175,2645723.769833777565509 4251920.348532696254551,2646311.53674516454339 4247545.376979343593121,2647393.896154147572815 4240853.04146474134177,2647672.083561640698463 4239485.345059989951551,2648012.164606013335288 4238649.211681501939893,2648568.984698962420225 4237964.453461112454534,2649372.822741981130093 4237547.052382573485374,2654258.412553913425654 4235305.315198254771531,2654784.063189441803843 4235115.3330138316378,2655928.093596324324608 4235000.579349089413881,2668482.483129006344825 4234051.001192430965602,2671172.629943517502397 4234164.787589509040117,2675965.824578094761819 4235965.833204777911305,2676448.060612211469561 4236216.29057889804244,2679416.840112175326794 4238610.628763426095247,2679602.187064348254353 4238816.269073379226029,2679657.735490252729505 4239089.778026862069964,2680944.254845350515097 4241347.889907804317772,2680449.55102826654911 4242107.996526748873293,2680294.928255554754287 4242525.708087950944901,2680325.541115522384644 4243058.272350239567459,2680480.497846707236022 4243477.115157777443528,2681129.824436502996832 4244123.478504728525877,2684809.378885185346007 4245720.386626795865595,2685706.28002250706777 4245986.811611103825271,2686726.745794607326388 4245720.386626795865595,2690839.444381965324283 4244427.372794724069536,2691766.847059763036668 4243970.98697751853615,2694518.99883064487949 4237888.250243920832872,2694518.99883064487949 4237357.031389210373163,2694364.4873774247244 4236824.743879387155175,2692509.236743864603341 4233405.231020795181394,2692137.986242068000138 4233177.675147348083556,2690529.864878068678081 4232418.186851759441197,2689695.080016612075269 4232076.065062922425568,2687314.067428032401949 4232493.25816648453474,2686003.169104450847954 4231680.628215090371668,2684351.855778023134917 4231794.390054260380566,2684073.33441205881536 4231726.570354460738599,2683851.029388943687081 4231589.838361888192594,2683479.667567659169436 4231202.349141264334321,2683145.820414769928902 4230745.966170595958829,2683090.049349883105606 4230450.243409859016538,2683238.660870090592653 4230222.338604199700058,2683461.188532188069075 4230062.794381815940142,2691055.626833085436374 4225696.529316595755517,2692137.986242068000138 4225355.573288939893246,2701290.897414072882384 4213897.260158933699131,2701940.224003871437162 4213252.53551878221333,2703393.8339146473445 4212721.413403984159231,2707258.957954482641071 4211773.892866633832455,2708897.692178449127823 4211697.87090799305588,2710412.861767636612058 4211773.892866633832455,2712422.735173908527941 4211963.335863291285932,2723400.395438997074962 4213176.50336098484695,2725564.780298491939902 4213555.713845239020884,2726956.385252897627652 4213821.22355276811868,2737191.321875414345413 4215793.021008013747633,2738521.255831920541823 4216134.636687589809299,2739356.152012871112674 4216476.262962376698852,2740469.124281821306795 4217197.235682302154601,2741737.164601447992027 4218448.535802278667688,2759486.278172 4219586.341363942250609,2778905.518062922172248 4218979.934135519899428,2788151.047051267698407 4216173.140797854401171,2787965.477460115216672 4215603.375629632733762,2788027.482416485901922 4214200.319708965718746,2788398.621598790865391 4212342.368116431869566,2788553.133052013814449 4211925.938356756232679,2789109.396547506563365 4211242.841993593610823,2790099.360779130831361 4210826.317292449064553,2805405.345485244411975 4209423.86929845623672,2814218.175612873863429 4209347.863541048951447,2816661.193157823756337 4209574.790721394121647,2823402.033603319432586 4209613.408379377797246,2824979.208148877602071 4209574.790721394121647,2826123.238555760122836 4209271.858307455666363,2826432.372781694866717 4208930.455262877978384,2827174.651146301999688 4206808.999097041785717,2828040.494145694188774 4205785.868740106001496,2830854.205594984348863 4203966.840797035954893,2832554.944775324314833 4203588.09621558804065,2834565.263459558133036 4203701.568201827816665,2837657.162316341884434 4204535.050233136862516,2845820.665854175575078 4207262.890102228149772,2851788.615075093694031 4209271.858307455666363,2856241.506026315502822 4210523.350495097227395,2856767.267981332261115 4210523.350495097227395,2868332.138560354709625 4209461.394775788299739,2868579.379149407148361 4209082.461548279039562,2868393.809558254666626 4208551.540276532992721,2868177.181829172652215 4208096.64117119461298,2867342.285648221615702 4206922.50420405715704,2866043.743788118939847 4205709.888042989186943,2864559.632336860988289 4204762.969630401581526,2864250.498110929038376 4204459.078146541491151,2864064.928519776556641 4203929.470390163362026,2863446.214789948426187 4199800.137698410078883,2864064.928519776556641 4199156.372544873505831,2864590.579155302140862 4198967.01293348800391,2865054.336153947748244 4199080.437451334670186,2865301.465423509012908 4199534.965170281007886,2865517.981833102647215 4200595.966169940307736,2865517.981833102647215 4201125.414060858078301,2865670.712174468673766 4202864.466968565247953,2866937.63929918827489 4202347.345232748426497,2867167.959325638134032 4200795.170858329162002,2867052.743652667850256 4198397.045092117041349,2865286.548611742909998 4195436.030137740075588,2862951.39965337049216 4193704.413837648928165,2862827.835018591023982 4193099.427279733121395,2862055.055113505106419 4187611.911719646770507,2862116.614791913423687 4187157.873708344995975,2862858.893156523350626 4185531.987461700104177,2864033.870381844229996 4183186.583633734378964,2867218.721013442613184 4181070.19670689990744,2869816.361331101506948 4179595.716235893778503,2870713.151148931588978 4179142.00657643424347,2871764.22978100227192 4178801.396317170467228,2872939.207006325945258 4178575.099719868507236,2873805.050005715340376 4178838.818027463741601,2875165.70814168266952 4179973.640343573410064,2879494.923138634301722 4184586.79547339072451,2882741.890046091284603 4187952.792925267480314,2897275.094847115688026 4194423.900392930023372,2897707.793707829434425 4194575.570862357504666,2898759.206298370845616 4194537.142029129900038,2904665.261882409919053 4193363.491666988935322,2906768.087063493207097 4191812.442074799444526,2918549.585371600929648 4196619.850263880565763,2927826.061178384814411 4202413.484188492409885,2926651.083953061141074 4181711.957740809302777,2924919.397954282816499 4175777.595123037695885,2921239.732186109293252 4169280.108385692350566,2920745.028369024861604 4168449.139508158434182,2917189.038555124774575 4166825.041265302337706,2910169.565424173604697 4163767.127900073770434,2909736.866563459858298 4163616.829474643338472,2907633.930062885396183 4162899.338765424676239,2906644.52242871420458 4162823.651630151085556,2906118.871793186292052 4162975.026415769942105,2905747.732610880862921 4163276.695059134624898,2905562.163019731175154 4164182.837289299350232,2905562.163019731175154 4164710.684224761091173,2905407.540247019845992 4165126.428893837146461,2904881.778292 4165805.598039625678211,2903954.375614203047007 4166258.762991134077311,2892915.155670705717057 4168373.550528015010059,2849438.660624449141324 4165202.131704864092171,2848603.764443498570472 4164861.948792568873614,2847799.926400479860604 4164484.538700212258846,2845418.913811902981251 4163352.385277642402798,2845047.774629598017782 4163125.31616752082482,2844460.007718211039901 4162446.310707062482834,2840131.126679732929915 4161427.268830968998373,2839141.719045562203974 4161351.591711314860731,2820310.246066027320921 4161841.939673748333007,2803921.234033986460418 4157389.519692450296134,2784873.133325369562954 4154485.457381670828909,2774978.389066716656089 4154447.167112700175494,2763073.326123829931021 4155389.797743631992489,2755466.531359453685582 4156031.163498562760651,2755806.72372331796214 4157125.359262548852712,2756579.503628403879702 4166032.721895240712911,2756177.417627660557628 4168373.550528015010059,2755837.225263796746731 4170223.996930781751871,2754507.736585252918303 4173548.368847156409174,2754043.979586607310921 4174266.411583446431905,2752157.670815114397556 4176193.754266613163054,2749436.465862673707306 4177025.166988498531282,2748879.757089216262102 4177062.582706361543387,2748014.359367789234966 4176797.95424825605005,2747024.506455656141043 4176684.757781474851072,2742757.630373548716307 4176836.321582020260394,2737191.321875414345413 4177062.582706361543387,2734624.739695682190359 4177214.151669078506529,2734099.423018630594015 4177932.56774347089231,2732645.81310785189271 4180124.160337856505066,2731285.266291375737637 4182354.708791858982295,2730295.858657207340002 4183262.409728444647044,2716133.34776052320376 4189315.06064205756411,2714587.565311368089169 4189843.968605193309486,2693560.204056444112211 4191130.724842534400523,2693065.500239359680563 4191130.724842534400523,2687221.449611694552004 4191054.844846785999835,2682892.123295251745731 4190790.835559186991304,2679521.703072503674775 4189843.968605193309486,2677604.781441043596715 4189730.774999252986163,2677109.632345994468778 4189730.774999252986163,2675934.655120670795441 4189882.517353792209178,2674945.247486502863467 4190298.116806690115482,2674574.108304197899997 4190563.204125095158815,2665730.331358124502003 4193969.446526510175318,2659453.136591783259064 4195711.05325828678906,2652093.916374930180609 4197452.798083708621562,2651568.26573940506205 4197414.35924753267318,2638519.172389635816216 4195672.48419216927141,2637653.32939024688676 4195332.591596726328135,2636261.724435838405043 4194423.900392930023372))
+POLYGON ((2895945.494849080685526 4600557.810958041809499,2893873.171208473388106 4601382.970318645238876,2891152.077575521077961 4602563.562593611888587,2890379.631628908682615 4603114.476352541707456,2885957.242218162864447 4606968.438596752472222,2879185.34363473765552 4613147.214297872036695,2878999.774043585173786 4613580.911909928545356,2878999.774043585173786 4614250.202672699466348,2879216.401772667188197 4615352.316827412694693,2879742.163727683480829 4616770.283928641118109,2880267.369085246697068 4617558.883997678756714,2883885.475175011903048 4620513.622941783629358,2885184.462313076481223 4621143.365941953845322,2887256.340675721876323 4621497.258704880252481,2887905.11066806409508 4621497.258704880252481,2893378.912669351324439 4628119.070763909257948,2893161.950981795787811 4632576.07265236787498,2893100.27998389583081 4633798.164051802828908,2892976.381390643306077 4634311.69598819129169,2888276.249850369058549 4643941.198746394366026,2887565.474901653360575 4644533.427058692090213,2885029.394262400455773 4645797.03761225566268,2884040.431906193960458 4646113.817685523070395,2882308.745907412841916 4646310.032873188145459,2881844.988908770028502 4646548.766415651887655,2881133.212084638886154 4647141.145364047959447,2878814.204452432692051 4649432.634765511378646,2877825.242096223402768 4650420.182491442188621,2877144.968687986955047 4651644.401580119505525,2875073.090325341559947 4655439.471657078713179,2874887.520734189078212 4655913.954332295805216,2874825.515777818858624 4656506.875113124959171,2876897.394140463788062 4660340.625274550169706,2877732.290321412030607 4661409.679289782419801,2878907.267546735703945 4662201.717037918046117,2879835.115502498112619 4662597.189264629967511,2881473.849726464599371 4662951.375608975999057,2894461.383397825527936 4664732.319902593269944,2909736.866563459858298 4659551.009535207413137,2911096.968101971317083 4658285.701213761232793,2911870.304604513570666 4657098.691552055999637,2912055.874195666052401 4656624.153959112241864,2912179.438830445054919 4655715.278046328574419,2909767.034145465120673 4640586.215619917958975,2909180.157790002413094 4638573.041791902855039,2909148.654374107718468 4637271.253736288286746,2910571.762744410894811 4630918.685482553206384,2912272.056646786164492 4626030.431900790892541,2912457.626237938646227 4625597.34470337908715,2912241.443786818534136 4622641.146046263165772,2912148.492012003902346 4622089.187507377937436,2905685.727654510643333 4614369.267846181057394,2898264.502481286879629 4606575.102509717456996,2897337.099803486373276 4604924.019413777627051,2897151.530212336685508 4604451.884855173528194,2895945.494849080685526 4600557.810958041809499))
+POLYGON ((2677233.642258738633245 4631234.864729972556233,2678006.533483316190541 4632378.841917960904539,2678254.108030842151493 4632852.258841659873724,2678223.049892909824848 4633403.801450604572892,2678037.480301757343113 4633838.211803013458848,2677202.695440297480673 4634942.284703065641224,2676645.986666840035468 4635100.506055671721697,2671667.779038566630334 4636324.034264756366611,2671080.012127176858485 4636362.955478857271373,2669224.761493616271764 4635021.39507467020303,2668389.86531266849488 4634587.92884689103812,2664802.928680326789618 4634193.535923400893807,2661123.262912156060338 4633956.36778031475842,2650053.096150217577815 4634547.878172442317009,2646435.101379946805537 4634982.478944976814091,2635303.263620108366013 4637507.504002282395959,2631839.891622548922896 4638770.249448481947184,2629026.068853767123073 4643507.355637005530298,2629149.633488546125591 4646113.817685523070395,2629520.772670851554722 4646390.368435713462532,2630077.592763800173998 4647220.349848629906774,2631252.569989123847336 4650735.967511750757694,2631314.129667532164603 4651328.446301036514342,2630695.861215666402131 4653897.768247847445309,2630015.587807429488748 4656229.908803342841566,2629768.013259903527796 4656625.15026574768126,2626985.248629054520279 4660263.597327772527933,2626645.056265190709382 4660618.841949961148202,2615142.190642538480461 4669125.901960948482156,2597238.120340804103762 4684852.740052834153175,2582611.852445473894477 4697467.737713485956192,2582179.153584763407707 4697745.682726180180907,2577880.774086761288345 4699850.165853177197278,2576829.361496219877154 4700247.100893083959818,2575623.326132963877171 4700525.264822202734649,2575128.622315879911184 4700445.645695127546787,2574695.923455166164786 4700247.100893083959818,2574355.842410790733993 4699929.780317495577037,2573489.888091910164803 4699532.85766417812556,2571263.498276045080274 4698698.613053983077407,2541763.944535320624709 4696356.748023531399667,2541454.698989894706756 4696674.100030587054789,2541423.752171453554183 4697230.097177725285292,2541701.939578947145492 4698420.641999876126647,2542289.595170845743269 4700048.70290454197675,2543093.433213861193508 4701835.138999073766172,2543526.577352540101856 4702034.715569250285625,2552555.478611800819635 4706165.086168532259762,2571108.875503333285451 4719323.258309790864587,2574788.54127150401473 4722148.004740169271827,2591455.629391547292471 4726924.020948274992406,2592909.239302323199809 4727243.333369071595371,2593713.077345344703645 4727202.917147055268288,2594919.112708597909659 4726924.020948274992406,2595413.816525681875646 4726685.689738375134766,2601629.006335652433336 4722745.940173259936273,2602062.150474328082055 4722467.166652292013168,2602309.279743889346719 4722069.361808955669403,2602402.231518703512847 4721591.787423379719257,2602278.221605959814042 4720915.286101602949202,2602062.150474328082055 4720437.766089993529022,2602000.145517957396805 4719403.025613098405302,2602185.71510910987854 4718408.914928647689521,2602494.849335041828454 4717494.510806257836521,2610039.973101520910859 4703424.426116740331054,2611771.325141828507185 4700684.504946833476424,2612822.737732370384037 4699135.95050332415849,2617801.279319117311388 4694690.133772805333138,2626242.970264444127679 4688025.119288235902786,2645538.200242625083774 4679740.527113805525005,2654598.493598288856447 4676253.9977050088346,2665730.331358124502003 4673481.171104392036796,2666225.48045317362994 4673560.579788277857006,2672502.675219514872879 4674946.410669950768352,2688798.624157252721488 4671184.289167394861579,2688767.566019320394844 4660737.164641050621867,2692509.236743864603341 4635021.39507467020303,2699188.07223298959434 4612243.311076653189957,2700301.489779901690781 4610235.676682661287487,2700548.619049462955445 4609842.215962531045079,2701631.089777936693281 4608346.295502464286983,2704970.563182246405631 4606300.611813981086016,2708928.750316381454468 4602091.53600356541574,2709392.395995535887778 4601855.955521958880126,2719287.585532151162624 4599811.557890541851521,2722936.193162389565259 4599064.226467856206,2723523.960073779337108 4598985.533351527526975,2724636.932342729531229 4598946.611618131399155,2733326.086516088340431 4599378.580311738885939,2734964.820740058086812 4600283.480249783955514,2737407.838285005185753 4588493.862255386076868,2737438.896422937512398 4587943.72739571146667,2737284.273650226183236 4586215.891848844476044,2737160.70901544438675 4585038.295925966463983,2737036.699102703016251 4583899.557626127265394,2736913.134467921219766 4583272.082540604285896,2735769.104061038699001 4580014.345665957778692,2734470.116922970861197 4577620.72601118311286,2729213.387928730342537 4573227.199521332979202,2728811.635886458214372 4572952.6041593933478,2727822.228252289816737 4572835.144507666118443,2725441.215663710143417 4573148.561443340964615,2724884.506890252698213 4573344.663613837212324,2714772.689624555408955 4578522.735742059536278,2707970.289500651415437 4585744.611236587166786,2694890.249332441017032 4601580.599333385005593,2688210.857245862483978 4609881.178813767619431,2684005.540842166636139 4620237.626103666611016,2677233.642258738633245 4631234.864729972556233))
+POLYGON ((2845542.033168720081449 4654687.090254120528698,2841677.354406850412488 4663505.53736085165292,2841677.354406850412488 4664019.563120831735432,2841893.091580008156598 4664494.443909238092601,2842202.559764413163066 4664812.800159432925284,2846006.235445328056812 4665722.484781499020755,2848881.951850991696119 4664652.979809387587011,2850953.830213637091219 4663467.509881519712508,2851262.964439568575472 4663110.030004478991032,2851664.716481841169298 4662201.717037918046117,2852035.855664146132767 4661290.067269207909703,2850891.825257263612002 4656348.323081401176751,2850768.260622484609485 4655833.544052937999368,2850582.69103133212775 4655360.203599947504699,2850242.053389503154904 4655044.275969006121159,2849778.407710348255932 4654845.616559355519712,2845542.033168720081449 4654687.090254120528698))
+POLYGON ((2734995.878877987153828 4687469.624644662253559,2733264.526837680023164 4688540.381569314748049,2731192.648475037422031 4690722.361493589356542,2722503.494301675818861 4704615.696568389423192,2721792.162755506578833 4706920.130974030122161,2721730.157799136359245 4714073.743910768069327,2721854.167711877264082 4714591.330155618488789,2722070.350163 4715068.57494118437171,2722689.063892828300595 4716340.955700228922069,2722967.251300321891904 4716738.535835119895637,2724791.555115440860391 4718170.640705809928477,2725193.641116186976433 4718408.914928647689521,2725626.785254862625152 4718607.671989032067358,2726214.106888287700713 4718527.910942745395005,2727605.71184269618243 4717772.002121579833329,2728007.352565477136523 4717494.510806257836521,2735954.673652191180736 4711092.840796408243477,2745756.911413991358131 4696515.922894109971821,2747272.081003178842366 4694134.27539895940572,2747519.655550704803318 4693737.578799966722727,2747704.779863892588764 4692785.112969278357923,2747766.784820266067982 4690166.719726325944066,2747457.650594331789762 4689770.177693425677717,2745045.579867822583765 4688421.593383946456015,2743685.03305134922266 4687945.597894004546106,2741397.083557072561234 4688104.64130324870348,2740747.311689314898103 4688263.687195681035519,2740345.55964703951031 4688540.381569314748049,2739850.855829955544323 4689294.119177313521504,2738985.012830566149205 4690959.992929244413972,2738242.734465956222266 4691595.227263710461557,2737655.412832531146705 4691634.359451653435826,2735243.45342551311478 4690285.528267768211663,2734779.696426867507398 4689294.119177313521504,2734779.696426867507398 4688778.96154510229826,2734995.878877987153828 4687469.624644662253559))
+POLYGON ((2640992.802794553805143 4731902.455812389962375,2639323.010432654526085 4732260.210708173923194,2634128.286394784692675 4734012.890611511655152,2633571.577621330041438 4734969.23445587605238,2626119.405629662331194 4750000.648435574956238,2626026.342535359319299 4750479.566294562071562,2626119.405629662331194 4750997.868938315659761,2626459.486674037761986 4751317.942736368626356,2626954.190491122193635 4751437.470205422490835,2628345.795445530675352 4751077.886435991153121,2647517.460788929369301 4739751.306251281872392,2647919.212831201963127 4739472.207421355880797,2648166.787378725130111 4739073.733655912801623,2648197.734197166282684 4738555.899071138352156,2648043.222743945661932 4738038.091010294854641,2646651.617789537180215 4735925.812173804268241,2646094.909016079735011 4735088.56864713691175,2644270.605200960766524 4733655.217149544507265,2642353.349611026700586 4732379.512948556803167,2640992.802794553805143 4731902.455812389962375))
+POLYGON ((2611091.051733588799834 4740309.670538251288235,2604597.674516127910465 4742302.583730178885162,2604164.530377452261746 4742462.48159939981997,2604040.965742670465261 4743499.582626573741436,2604195.588515381794423 4744615.607907295227051,2604412.10492497542873 4745094.270375182852149,2609823.456691927276552 4750200.02719437237829,2611709.765463419724256 4751556.855425072833896,2612853.684550811070949 4751517.491189330816269,2614554.423731151502579 4751118.398229727521539,2614894.616095015313476 4750798.474415720440447,2616162.656414641998708 4749402.248521786183119,2616749.866728575434536 4748684.531427214853466,2617121.005910880398005 4747806.736708818003535,2617337.633639965672046 4746849.177292386069894,2617368.135180441662669 4746290.451448073610663,2617183.010867251083255 4745054.787759500555694,2616966.494457660242915 4744576.127162767574191,2611091.051733588799834 4740309.670538251288235))
+POLYGON ((2941060.278841344173998 4768451.829597287811339,2940473.068527407944202 4767972.056953751482069,2938277.625529983546585 4765574.543738286010921,2937998.992844528052956 4765175.037681098096073,2936576.886349646374583 4762616.963330622762442,2936298.253664188086987 4760938.256478232331574,2936360.258620561566204 4760340.357521200552583,2936607.387890122365206 4759941.059000664390624,2936978.527072427328676 4759660.107263159938157,2939391.043076898436993 4758102.649438905529678,2947151.904016532935202 4753152.960315148346126,2953120.40983490459621 4743777.787836243398488,2961840.622146195732057 4729312.372157116420567,2962458.890598061960191 4728000.092419369146228,2963139.164006298407912 4725412.009837011806667,2963201.16896267188713 4724814.060332874767482,2962984.207275116350502 4723858.532056475989521,2962706.019867622759193 4723461.818721451796591,2952779.772193078417331 4717969.744374337606132,2952006.99228798924014 4717731.480470515787601,2944462.202479986473918 4717135.129314108751714,2937751.418297004885972 4717532.740582932718098,2930361.696539675816894 4718488.675038897432387,2915178.274592925794423 4724138.490071369335055,2909489.292015933897346 4727442.407114513218403,2904232.563021696172655 4732021.753834937699139,2903984.988474170211703 4732419.949844403192401,2904170.558065322693437 4732857.596375327557325,2906304.441384338773787 4734690.267590324394405,2906829.646741901990026 4734809.598490393720567,2907355.853974882978946 4734690.267590324394405,2912952.775332987774163 4736404.063238701783121,2925135.469085911288857 4744096.484334424138069,2926156.380135977175087 4745730.751440239138901,2926897.767944660037756 4746968.651852835901082,2926959.772901030723006 4747566.907514372840524,2926836.208266251720488 4748086.209532883018255,2926248.997952317818999 4748843.381363463588059,2923434.84122506249696 4750718.459133692085743,2922414.820730924140662 4750996.863336456008255,2921085.220732889138162 4750996.863336456008255,2920497.008543536998332 4750958.506883251480758,2916477.373050482012331 4750520.075686290860176,2913509.038828480057418 4749600.609996439889073,2912705.200785461813211 4749083.384517081081867,2912241.443786818534136 4748205.698733493685722,2911870.304604513570666 4745932.343250782229006,2911406.102327905595303 4744415.190888154320419,2906799.145201425533742 4737759.039475684054196,2906520.512515970040113 4737398.938080705702305,2903737.8592046094127 4734531.639991621486843,2902933.575883628800511 4734011.886698773130774,2901882.051973595749587 4733773.388538479804993,2901294.841659661848098 4733813.831005614250898,2899346.973209761083126 4734490.047271586954594,2892982.72660161787644 4736746.62769372574985,2882061.171359889674932 4741903.998352278955281,2879185.34363473765552 4743697.828175585716963,2876124.057637921534479 4747208.610439524054527,2875814.478134024888277 4747566.907514372840524,2875629.799098799470812 4748005.066831605508924,2878133.9310441929847 4757545.456295991316438,2878319.500635345466435 4757984.193004038184881,2878937.769087211694568 4758701.422017343342304,2880979.145909377839416 4760580.634439825080335,2884040.431906193960458 4762857.294552175328135,2885833.343624909874052 4763576.021236031316221,2885617.606451752129942 4762456.745701747946441,2885679.166130160912871 4761858.756625893525779,2885926.740677686873823 4761459.397928185760975,2886390.052398367784917 4761258.64598788600415,2888771.064986944198608 4760979.958306251093745,2891925.748036537319422 4760699.121397132985294,2892575.074626332614571 4760659.577658173628151,2913138.344924140255898 4768131.211150571703911,2913539.540368959307671 4768412.255403438583016,2913880.178010785486549 4768730.580236381851137,2913942.182967155706137 4769331.280291170813143,2913323.469237327575684 4771290.352753089740872,2912673.697369567118585 4774489.940672427415848,2912767.205741835292429 4775089.83274991158396,2914158.254098787438124 4775528.18266983050853,2918981.950273840688169 4776688.375741811469197,2919631.165544147603214 4776688.375741811469197,2930361.696539675816894 4775448.978740118443966,2938401.635442727711052 4770650.096678278408945,2941060.278841344173998 4768451.829597287811339))
+POLYGON ((2666843.748905039858073 4762577.412063265219331,2669286.766449989750981 4760101.092841959558427,2669379.384266327600926 4759581.171874335035682,2669224.761493616271764 4759022.890590374357998,2662947.566727275494486 4747287.449065466411412,2661030.311137341428548 4745133.753145221620798,2656361.23773 4741266.610191371291876,2655588.012551948428154 4740747.658665994182229,2655124.25555330561474 4740987.469512915238738,2653423.51637296564877 4741983.943816756829619,2653145.440284963231534 4742900.419510322622955,2653206.999963372014463 4743499.582626573741436,2663164.194456357508898 4759022.890590374357998,2666008.852724091615528 4763176.594452445395291,2666503.556541175581515 4763256.708673503249884,2666843.748905039858073 4762937.262405976653099,2666843.748905039858073 4762577.412063265219331))
+POLYGON ((2784687.11845625191927 4802324.717224770225585,2786017.609010213986039 4801641.762542511336505,2787995.979000591207296 4800159.203663164749742,2788831.320459504146129 4798997.304603901691735,2788954.885094286408275 4797995.168435634113848,2788522.186233572661877 4796911.594278798438609,2786480.920730894897133 4794065.821631940081716,2782151.928372926078737 4788699.116538592614233,2781750.287650144658983 4788459.320335396565497,2781410.095286280848086 4788659.462531667202711,2780698.87505960278213 4790461.643081465736032,2780358.682695738971233 4791343.022485624998808,2779616.404331129044294 4794708.726498887874186,2779801.973922281526029 4795951.658145077526569,2780389.629514177329838 4798357.44432095810771,2780575.310424820985645 4798917.915251630358398,2782523.178874722216278 4802046.042987594380975,2782987.26983183901757 4802455.826750383712351,2783203.452282958664 4802604.554391590878367,2783698.156100045889616 4802684.983754707500339,2784687.11845625191927 4802324.717224770225585))
+POLYGON ((2832153.30405254336074 4866627.474111362360418,2826617.497094882186502 4858999.850047429092228,2822691.258654603734612 4852952.586062598973513,2822134.104603184387088 4852024.830260905437171,2820619.380291958805174 4848518.04814846534282,2820433.810700806323439 4847953.625437004491687,2820649.881832437589765 4844287.760562262497842,2820804.949883111286908 4843845.372402957640588,2821824.970377249643207 4842274.625529110431671,2822165.496699587441981 4841911.913041533902287,2822567.248741860035807 4841630.972161829471588,2823649.274192371871322 4840624.549848617054522,2824577.122148134279996 4839013.442208985798061,2824453.557513352483511 4838489.410105472430587,2822597.750282338820398 4834948.713055450469255,2820711.441510846372694 4835310.013129176571965,2818361.932338163722306 4836034.101381357759237,2817310.519747619517148 4836478.460898237302899,2816475.623566671274602 4837039.915098377503455,2815733.790480023249984 4837685.590316276066005,2815486.215932500082999 4838086.840005615726113,2812702.560745724011213 4846786.151013397611678,2813971.046343312598765 4849807.448442344553769,2814094.61097809439525 4850331.061157374642789,2814063.218881691340357 4850895.61880284640938,2812795.623840027023107 4852870.589452959597111,2812486.489614095073193 4853192.919844811782241,2811899.167980670463294 4853395.524575931951404,2809672.332886840216815 4853435.291318843141198,2809177.517750264611095 4853314.685373635031283,2808436.129941581748426 4852749.990358631126583,2806766.003621208947152 4850976.43833839148283,2806116.231753448490053 4849847.345919475890696,2803240.960625749547035 4844851.975367177277803,2802869.821443444583565 4843683.849800517782569,2802869.821443444583565 4843159.426888060756028,2805436.403623173944652 4840905.462335231713951,2807693.851576971355826 4838450.71745619084686,2808281.173210396431386 4837685.590316276066005,2808219.168254022952169 4837121.781385788694024,2807817.416211750824004 4836838.802189745008945,2801725.34575860016048 4836880.821121945045888,2801076.130488292779773 4837039.915098377503455,2790438.996545541565865 4843080.990558187477291,2789759.168415267020464 4843886.260946040041745,2789047.50291062425822 4845698.430062600411475,2787779.907868962734938 4860614.344075405970216,2788027.482416485901922 4863558.92646964173764,2788552.687774049118161 4864447.949169343337417,2797737.102361948229373 4866708.42175339628011,2798602.054805412888527 4866909.122436299920082,2808219.168254022952169 4866385.797737795859575,2808806.378567959647626 4866304.852727851830423,2813259.269519181456417 4864244.973579256795347,2824020.413374676834792 4866789.370055871084332,2832833.577460779808462 4870826.141922674141824,2833234.884225090034306 4870866.123934760689735,2833482.45877261320129 4870503.383946880698204,2832586.00291325384751 4867354.863963279873133,2832153.30405254336074 4866627.474111362360418))
+POLYGON ((2856148.554251504130661 4937851.784518413245678,2859828.108700186479837 4934679.517825729213655,2860322.812517270445824 4933908.083727283403277,2860415.875611573457718 4933380.025761160999537,2860477.880567946936935 4928381.487379752099514,2860354.315933164674789 4927854.895997039973736,2860013.678291338961571 4927529.099061571992934,2856458.133755400311202 4926066.655268743634224,2850459.126396549865603 4924035.648990646935999,2849963.977301500737667 4923954.230356738902628,2846036.736985806841403 4923915.202273746952415,2845047.774629598017782 4924441.582823468372226,2840409.314087223727256 4927529.099061571992934,2837564.210541530046612 4929641.12177802901715,2834657.88127589924261 4932281.715096988715231,2834286.742093593813479 4932687.989420698024333,2832400.433322101365775 4935330.279528129845858,2837997.354680205695331 4938339.826400604099035,2841491.784815697465092 4939885.647591807879508,2843408.14984970446676 4940412.884045056067407,2844862.205038445536047 4940575.994863364845514,2846593.445759264752269 4940534.558016330003738,2847489.901618621312082 4940332.500984992831945,2856148.554251504130661 4937851.784518413245678))
+POLYGON ((2743313.893869044259191 4949243.94761651288718,2743221.276052703149617 4949732.55635747499764,2742788.13191402470693 4950586.874108915217221,2738644.820466702338308 4955026.157206594944,2737469.84324137866497 4955962.620278678834438,2735707.099104668013752 4957062.55811027251184,2735057.883834360633045 4957225.94607765506953,2731068.638562290929258 4956533.252610486932099,2730635.939701579976827 4956696.631749966181815,2728842.694024390541017 4958936.990070756524801,2728657.124433237593621 4959385.739382838830352,2728378.491747782565653 4962034.351309319026768,2729739.149883749894798 4967130.675483634695411,2731068.638562290929258 4970272.047401554882526,2731873.033202765509486 4971699.676495995372534,2734624.739695682190359 4975617.033558047376573,2738119.169831174425781 4979495.68278447072953,2738521.255831920541823 4979781.755569377914071,2740840.263464126735926 4981414.853606842458248,2743035.706461550667882 4982395.314114418812096,2743499.463460196740925 4982559.125905169174075,2744550.876050738152117 4982355.02330522518605,2749219.949453080072999 4980026.232426981441677,2753301.701221996918321 4977821.457695773802698,2756424.992175183724612 4975413.075984126888216,2756703.068263186141849 4972883.062906112521887,2757754.592173218727112 4958162.472778163850307,2756981.700948641635478 4955188.484746527858078,2746375.179865857586265 4950424.769324891269207,2743313.893869044259191 4949243.94761651288718))
+
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/data/it.wkt b/src/boost/libs/geometry/test/algorithms/buffer/data/it.wkt
new file mode 100644
index 000000000..5e1f1ecb7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/data/it.wkt
@@ -0,0 +1,22 @@
+POLYGON ((1384999.923739986261353 4552071.32837841194123,1386205.847783748060465 4552775.403284180909395,1386824.338874596636742 4553440.774611539207399,1387226.313555851578712 4554380.567866337485611,1389081.675508903106675 4560136.452452756464481,1389143.457826291210949 4561429.681318907998502,1389050.61737097078003 4561938.499812935478985,1388834.212280868319795 4562370.056094029918313,1387752.075510867871344 4567581.314941163174808,1392081.179188325535506 4580799.013887928798795,1393163.315958328545094 4582329.810759479179978,1397770.829682261915877 4587864.977510432712734,1398172.693044025683776 4588101.228964559733868,1417498.981160135939717 4599181.98419354762882,1427301.218921939143911 4589161.669990953058004,1433331.061779736774042 4583703.255589353851974,1435155.476914347149432 4582878.516786948777735,1435650.292050925316289 4582722.225165505893528,1436763.486958858091384 4582682.234107964672148,1437876.681866790633649 4582800.935931340791285,1439422.798274416476488 4583075.792400649748743,1442205.785544251091778 4584056.997658606618643,1449286.818353610578924 4587747.490016640163958,1453368.570122527424246 4589985.919842895120382,1454141.683986084535718 4590536.163330434821546,1454976.468847544398159 4591636.738145411014557,1455223.820756087778136 4592068.259930951520801,1455347.608029849361628 4593286.688405959866941,1454296.195439307717606 4596587.520767862908542,1453832.438440661877394 4597413.353552815504372,1453245.005487745627761 4598081.737776983529329,1453090.382715034065768 4598553.581096516922116,1453183.000531374942511 4599025.44597228243947,1457357.48143612104468 4604727.317657791078091,1458377.947208224562928 4605631.695261105895042,1458779.921889479504898 4605868.353347864001989,1482404.478184100240469 4610314.597331520169973,1482837.399683793308213 4610077.978883379139006,1486888.093314780620858 4606065.076858862303197,1487104.72104386263527 4605671.775213534943759,1488217.915951795410365 4602996.67376596853137,1488929.024858984630555 4601187.4685471476987,1488929.024858984630555 4600597.729656166397035,1488186.857813865877688 4599339.657097043469548,1487537.642543558729813 4597609.916010116226971,1487630.149040408199653 4597059.295840914361179,1488310.422448644880205 4595840.422549997456372,1488619.779313558945432 4595487.409135583788157,1489733.085540982894599 4594622.824811748228967,1526344.730229002190754 4576129.460583232343197,1530921.185815003234893 4575383.837715826928616,1532745.60094961640425 4575266.491728635504842,1535219.453993513714522 4575502.314735203050077,1538545.123780964175239 4576422.499402994289994,1545856.476616773754358 4579151.053245951421559,1548484.841113894013688 4580327.979775842279196,1549227.008159012766555 4580837.86738798674196,1549505.306885997299105 4581191.370291410945356,1551886.319474574178457 4583349.666926587000489,1552659.433338134083897 4583860.692636501975358,1560018.764874475542456 4584488.344735810533166,1573253.427815397270024 4582643.514998004771769,1585498.683122147805989 4581151.526435187086463,1593198.207022355869412 4581151.526435187086463,1599166.267562765395269 4581976.127693617716432,1599691.918198290746659 4582054.832788348197937,1616297.112681451486424 4585469.542549388483167,1628944.231349965790287 4589633.106281627900898,1629407.877029120223597 4589789.502311130054295,1630150.155393730383366 4590260.967220051214099,1631912.676891458686441 4591714.385279542766511,1645827.613240619888529 4601266.320010973140597,1655815.42059357278049 4603547.610643842257559,1665741.445629137568176 4602013.669263985939324,1667040.210128222592175 4601305.108923327177763,1678141.212389108259231 4596627.424124195240438,1679439.976888193516061 4596508.705016870051622,1679903.733886839356273 4596627.424124195240438,1681202.498385924380273 4597216.936345137655735,1686583.014653926482424 4600008.165994540788233,1703373.667408748529851 4608740.832485251128674,1726255.945338759105653 4620552.484344797208905,1728080.471792860887945 4621222.370205101557076,1729935.722426421241835 4621537.25857218913734,1731172.593288624193519 4621380.380550798028708,1741933.403185648610815 4617873.660326888784766,1742428.107002732809633 4617676.711307669989765,1742582.95241442671977 4617203.992315398529172,1742335.600505883106962 4616771.276375496760011,1741520.853152768919244 4616357.009014126844704,1738006.496828422881663 4614999.769223774783313,1736986.031056322157383 4614802.875149302184582,1735161.504602220607921 4614133.406744129024446,1734048.309694287832826 4613345.210583809763193,1733522.547739271307364 4612519.093777545727789,1733027.843922187341377 4611691.90952012129128,1732131.165423845406622 4609173.211354583501816,1728668.01606526831165 4598788.944715039804578,1726503.297247302718461 4592068.259930951520801,1725977.646611774573103 4590576.043333165347576,1725730.294703233987093 4590143.452509944327176,1725204.532748217461631 4589357.93419838976115,1717412.168392685940489 4579543.347232771106064,1711134.973626344930381 4571893.821215628646314,1710609.32299081957899 4571109.826801325194538,1695983.27773447195068 4549136.059290452860296,1694251.591735693626106 4546202.603337853215635,1694066.022144541144371 4538734.463261933065951,1694004.239827150246128 4538108.58410448115319,1692148.877874098718166 4530294.166452379897237,1689613.353832298889756 4519638.133899938315153,1688685.728515518596396 4517921.604517630301416,1688438.376606978010386 4517491.884247745387256,1687263.288062163162977 4515853.913106138817966,1686984.989335178630427 4515502.481293311342597,1685995.470381519058719 4514567.446520010940731,1682995.96670209383592 4511759.47473281249404,1680738.518748296191916 4508835.514962027780712,1680213.0907517534215 4508056.248181689530611,1679965.738843209808692 4507628.05495322868228,1679439.976888193516061 4506146.770409090444446,1679347.247752364259213 4503848.170654860325158,1679934.680705277482048 4489131.145430590026081,1680027.521160600939766 4487965.439544102177024,1680243.814931211993098 4486993.229900042526424,1690602.761466469848529 4464768.933271096087992,1692489.070237962529063 4461082.214862537570298,1695333.839825185248628 4456698.944317606277764,1695612.138552166987211 4456349.623337228782475,1697807.581549593945965 4454682.758956250734627,1698302.285366678144783 4454488.866925731301308,1699415.480274610919878 4454255.61491899099201,1702415.095273527316749 4454178.982079457491636,1702909.799090611515567 4453985.238871612586081,1703559.236999901011586 4453364.39118458237499,1703837.424407391576096 4452433.746252713724971,1704981.677453256677836 4445109.52043173648417,1705043.459770647576079 4440345.732249343767762,1698982.558774914825335 4436551.71145364549011,1693633.323283827630803 4432874.670501386746764,1689860.705740842269734 4430088.375027853995562,1686799.419744026148692 4427457.916478905826807,1686335.662745383102447 4426607.090793981216848,1682068.34138531377539 4416827.697679053992033,1680336.655386532424018 4411227.123120685108006,1680429.384522364474833 4408987.162063331343234,1680522.224977684905753 4408446.355883928947151,1681418.903476026840508 4405126.927174153737724,1682470.31606656848453 4403699.114054724574089,1683057.749019484734163 4402425.261041063815355,1684913.110972536262125 4395328.087151520885527,1684944.057790977414697 4394287.167169045656919,1684480.189472840400413 4392745.337360732257366,1680614.954113516956568 4390972.001720665954053,1679347.247752364259213 4390393.951535759493709,1678852.432615786092356 4390316.667791331186891,1675265.495983444619924 4394904.433381571434438,1674059.460620191413909 4396215.70463749859482,1672884.483394867740571 4396986.77291168179363,1671956.858078087680042 4397372.327938619069755,1658753.141955607105047 4400844.061311553232372,1657639.947047674329951 4401075.170747807249427,1655104.311686386121437 4401307.257438722066581,1654021.952277403324842 4401229.894647276960313,1649074.58014807687141 4399455.010206120088696,1645209.122149771312252 4397988.800637569278479,1638777.415930207120255 4399956.197651370428503,1620100.454403895419091 4408523.771070262417197,1609741.507868634536862 4415552.273545492440462,1609432.37364270281978 4416479.687834044918418,1607577.12300914269872 4421465.160245471633971,1605443.462329106638208 4425524.687317130155861,1604577.508010226069018 4427148.821208208799362,1604144.586510530207306 4427922.133216517046094,1602320.282695411005989 4431094.638601732440293,1600062.946061104536057 4434422.324919797480106,1597844.905207050498575 4436857.875537100248039,1596383.280292933806777 4438370.848893498070538,1590075.138708151644096 4444257.27731149084866,1588405.346346252597868 4445806.455539613962173,1585838.764166523236781 4447782.725990596227348,1575572.658086585812271 4452549.723479456268251,1573655.625135634560138 4453286.648213068954647,1570687.068274650489911 4454295.118038680404425,1568924.324137939605862 4454566.618738356046379,1558256.354696238646284 4454488.866925731301308,1553547.5402356821578 4453103.389215351082385,1551236.99288477585651 4452317.630736764520407,1550649.559931859606877 4452317.630736764520407,1546753.37775409524329 4452743.579951132647693,1545176.203208537073806 4453208.905813178047538,1529344.233908427413553 4461121.60383662674576,1522077.408868932863697 4465584.4042056677863,1521737.21650506881997 4465894.623883603140712,1520840.538006729912013 4466904.298374428413808,1520098.482281099306419 4467913.091136327944696,1519665.560781406238675 4468728.805150520056486,1518830.664600455202162 4469815.636636137031019,1510790.837016891920939 4477158.004053992219269,1509708.588927400298417 4478089.852815622463822,1507636.933203737717122 4478673.681781725026667,1503400.66998160071671 4479216.96700004208833,1493103.505763730732724 4484388.044808050617576,1483888.812274337746203 4489560.685465858317912,1478168.103642471833155 4493607.935031009837985,1477580.670689555583522 4494269.690686974674463,1477085.855552977416664 4495670.12163789011538,1475725.308736501261592 4498084.671168078668416,1471457.987376434728503 4502757.816418469883502,1465706.554565107217059 4507316.601669631898403,1464840.711565718054771 4507783.223872453905642,1463758.46347622666508 4508056.248181689530611,1456708.266165816690773 4508056.248181689530611,1446040.185404624324292 4514216.198281607590616,1444926.990496691782027 4515502.481293311342597,1443906.52472458826378 4516400.249436816200614,1441989.157815166050568 4517765.161827243864536,1438835.365321500226855 4519208.483565763570368,1438309.603366483701393 4519364.807388568297029,1425167.780880885431543 4520261.7833088086918,1423003.062062919838354 4519988.580961307510734,1420003.558383494615555 4519286.574958794750273,1417653.603932847268879 4518545.151590287685394,1416262.221617424162105 4518076.926055870018899,1412458.657255997881293 4516907.015571624971926,1410912.652167860418558 4516633.760403543710709,1409892.186395759694278 4516828.801518647000194,1409026.343396370531991 4517258.354130526073277,1408284.287670742953196 4517803.640333087183535,1393070.586822496494278 4531348.724858328700066,1387968.369281479157507 4537014.652177982963622,1383113.614968493580818 4549684.140608288347721,1382835.427561 4550662.053592963144183,1382897.209878391120583 4551210.215276361443102,1383330.131378087215126 4551954.104603708721697,1384319.650331746554002 4552579.689068344421685,1384752.571831442648545 4552345.372283137403429,1384999.923739986261353 4552071.32837841194123))
+POLYGON ((1374733.70634055742994 4566091.492124513722956,1368394.84057631669566 4567659.910831437446177,1367436.157121604075655 4568013.105814421549439,1366137.392622519051656 4569933.805126462131739,1366044.552167198387906 4570443.181730434298515,1366322.962213671533391 4570796.471464061178267,1366910.395166587783024 4570835.146340511739254,1370652.06589113175869 4570873.962511117570102,1373064.025298149557784 4570325.891634424217045,1373589.787253166083246 4570168.660060069523752,1376434.445520897628739 4568561.054540241137147,1376620.015112050110474 4568090.576077600941062,1376341.716385065577924 4567032.289154392667115,1375661.442976828897372 4566405.834136897698045,1375259.468295573955402 4566170.076735302805901,1374733.70634055742994 4566091.492124513722956))
+POLYGON ((1344430.091917829122394 4571619.119993964210153,1341090.618513522436842 4572913.780209045857191,1340719.479331217240542 4573227.199521332979202,1339080.522468268172815 4577109.866820841096342,1339173.362923591397703 4577580.754643878899515,1342420.218511557439342 4577895.445056701079011,1342574.841284268768504 4577542.054597694426775,1344059.175374506507069 4572873.968163629993796,1344430.091917829122394 4571619.119993964210153))
+POLYGON ((1668555.37971741030924 4630998.75869628880173,1667967.835445002885535 4630998.75869628880173,1667534.913945306790993 4631234.864729972556233,1664906.549448186531663 4633246.600269651040435,1664566.357084322720766 4633522.946495647542179,1663236.868405778892338 4636007.556292821653187,1663144.027950458228588 4636521.198722642846406,1663731.572222862858325 4638691.110185885801911,1665215.683674118248746 4640507.06235253252089,1665617.88099435553886 4640625.152998842298985,1666050.802494051633403 4640388.830961012281477,1669421.222716799471527 4635415.81979076191783,1670256.118897747481242 4633128.594459761865437,1670256.118897747481242 4632535.887825555168092,1669792.361899104434997 4631669.325365367345512,1669019.248035544529557 4631155.925488477572799,1668555.37971741030924 4630998.75869628880173))
+POLYGON ((1664288.058357340749353 4642481.528987363912165,1660020.959636251209304 4645482.399947934783995,1659340.686228014528751 4646153.913527280092239,1658845.982410927535966 4646903.535582135431468,1658443.78509069303982 4648364.972749872133136,1658505.790047063492239 4648918.345424103550613,1659093.334319470915943 4651644.401580119505525,1659680.767272387165576 4652395.42129538860172,1660020.959636251209304 4652672.283901928924024,1660453.881135947071016 4652908.889275052584708,1661319.501496356679127 4653146.638363784179091,1665061.172220898093656 4653383.254696160554886,1665555.87603798485361 4653185.623480750247836,1665772.39244757569395 4652790.514767126180232,1666019.744356119306758 4651802.738530470058322,1665679.663311746437103 4643547.441288503818214,1665586.822856423212215 4643073.53087808098644,1665246.74181205057539 4642797.069560501724482,1664813.708992866100743 4642559.560414928011596,1664288.058357340749353 4642481.528987363912165))
+POLYGON ((1654733.172504081157967 4654529.562506003305316,1653558.19527875748463 4654767.349225773476064,1651455.592736653750762 4656032.364955497905612,1647188.271376584423706 4658641.873669360764325,1646817.132194279227406 4659511.85779820010066,1646940.919468040810898 4659946.379289745353162,1647961.273920653155074 4661884.438889589160681,1648487.035875669447705 4661963.757503910921514,1654671.390186690259725 4661607.326979557983577,1655166.094003774225712 4661409.679289782419801,1655691.855958793545142 4660658.994623123668134,1655753.638276181649417 4660143.998707657679915,1655691.855958793545142 4659471.709627117030323,1655135.147185336099938 4654767.349225773476064,1654733.172504081157967 4654529.562506003305316))
+POLYGON ((1464809.653427785728127 4677205.062372087500989,1464376.954567072214559 4677323.577316032722592,1464067.597702158149332 4677640.194386810995638,1464098.655840090475976 4678195.153685863129795,1465211.850748023251072 4680849.563145770691335,1465551.931792395887896 4681127.197677467949688,1466386.827973346691579 4681602.874819892458618,1467314.453290126984939 4681800.913717764429748,1467747.374789820052683 4681563.638463071547449,1468922.463334634900093 4680770.097715876065195,1469231.597560569411144 4680414.294210001826286,1469262.544379007769749 4679819.984521962702274,1468953.410153076052666 4679463.07297567371279,1467283.506471685832366 4677877.521012073382735,1466943.314107821788639 4677601.115892526693642,1466448.610290735028684 4677403.015901028178632,1464809.653427785728127 4677205.062372087500989))
+POLYGON ((1693571.318327454151586 4688858.489445560611784,1692983.774055046727881 4688858.489445560611784,1691097.465283556841314 4690285.528267768211663,1690850.113375013461336 4691278.033582872711122,1690973.900648775044829 4691713.909655039198697,1693107.561328811105341 4694213.845141770318151,1693416.695554742822424 4694571.416674461215734,1693880.67519237101078 4694729.420722863636911,1695117.434735082788393 4694649.846948807127774,1696416.199234168045223 4693935.996592060662806,1696725.333460099529475 4693578.44738319888711,1696725.333460099529475 4692983.369357353076339,1695364.786643626401201 4690325.79782351385802,1695055.65241769189015 4689968.518177315592766,1694035.18664559116587 4689016.40485518053174,1693571.318327454151586 4688858.489445560611784))
+POLYGON ((1581014.956671976018697 4944115.610674955882132,1580427.523719059769064 4944237.330551641993225,1580241.954127910081297 4944725.689978146925569,1580489.306036450667307 4946639.226753560826182,1580613.093310212250799 4947249.462999792769551,1580829.38708082633093 4947696.651813368313015,1581911.635170317953452 4947738.118912516161799,1585344.060349436243996 4946923.168692829087377,1585900.546483911341056 4947004.777881120331585,1586271.796985707711428 4947289.756044737063348,1587230.369120928924531 4947615.036868806928396,1587601.285664251539856 4947331.074902703054249,1587632.343802183866501 4947004.777881120331585,1587044.799529776442796 4946354.12098032142967,1586828.283120182808489 4945905.967861759476364,1586704.718485403805971 4945337.125634915195405,1586395.361620489740744 4945092.34171746019274,1585714.976892758859321 4945743.940422654151917,1585127.543939842609689 4945865.680499922484159,1584169.083124112803489 4945540.457673186436296,1582901.265443468699232 4944848.73577840346843,1581014.956671976018697 4944115.610674955882132))
+POLYGON ((1546413.185390231199563 4967008.524057738482952,1543289.894437044393271 4968355.063527161255479,1542517.114531958242878 4968925.243997490033507,1541991.352576941717416 4969740.852213766425848,1542207.757667044177651 4973291.023627653717995,1543568.304483517538756 4976678.769091141410172,1545021.691755316918716 4977168.74935310240835,1545609.12470823014155 4977046.619399967603385,1552164.729521047091112 4974638.428658995777369,1552690.38015657523647 4974433.316091583110392,1552999.514382506720722 4974107.143081358633935,1553308.648608438437805 4973740.578748620115221,1553834.410563454963267 4972679.162380767054856,1554576.46628908533603 4970924.148409446701407,1554576.46628908533603 4970312.288411883637309,1553061.296699897851795 4968395.296650093980134,1546413.185390231199563 4967008.524057738482952))
+POLYGON ((1442731.54749926738441 4994984.190249461680651,1442144.003226859960705 4995106.692179691046476,1441834.646361945895478 4995475.09067687112838,1441587.294453402515501 4995884.144175119698048,1441123.537454756675288 4996988.438779830001295,1440937.967863603960723 4997479.440201032906771,1441154.372953706420958 4998543.557909308932722,1441618.241271843435243 5000220.313105899840593,1441958.43363570747897 5000466.481477052904665,1443813.68426926783286 5001611.960747523233294,1445823.557675539515913 5002226.81825714558363,1444432.175360116409138 4997234.525480988435447,1444277.441267913673073 4996825.562550690956414,1443164.468998960684985 4995230.226334676146507,1442731.54749926738441 4994984.190249461680651))
+POLYGON ((1335895.671836672816426 4402579.865620532073081,1335060.775655724806711 4402734.611352640204132,1334411.337746435077861 4403004.935587024316192,1330669.667021893896163 4405898.639961685985327,1327639.439163009868935 4410415.684020363725722,1327237.464481754926965 4411844.397632421925664,1327113.677207993343472 4413543.755734885111451,1327330.304937075357884 4414316.217723816633224,1328134.142980094067752 4415398.454096580855548,1328598.011298228288069 4415862.144431585446,1329185.555570635711774 4416209.021380712278187,1329958.669434195617214 4416363.965259992517531,1330793.454295655479655 4416402.214769592508674,1331628.350476603489369 4416286.493038269691169,1335462.750336979748681 4415475.780774854123592,1336668.785700232721865 4414779.860899657942355,1341214.183148304233328 4410841.066689037717879,1341461.535056847846135 4410377.595028585754335,1342018.243830302497372 4407250.453068076632917,1341863.509738099761307 4405937.824564742855728,1341554.375512168277055 4405281.709882943890989,1341152.400830913335085 4404741.091732761822641,1340100.988240371691063 4403930.146450998261571,1338926.011015048017725 4403235.952940950170159,1337596.411017013015226 4402695.438522345386446,1335895.671836672816426 4402579.865620532073081))
+POLYGON ((922529.33313081425149 4734969.23445587605238,921354.355905490694568 4735088.56864713691175,918818.497905220021494 4736523.270909687504172,918509.363679288420826 4736841.738727582618594,915169.667635999154299 4742023.270902130752802,915046.103001217241399 4742542.431482979096472,915200.725773928686976 4744894.992422343231738,915479.024500913219526 4745293.695836432278156,917674.467498337500729 4746370.43163766246289,924260.796490613021888 4748923.381780591793358,924446.366081765503623 4748563.887576275505126,924693.717990309000015 4742343.060330395586789,924662.993810847518034 4740628.257661385461688,924570.153355527087115 4738196.917096892371774,924415.419263324467465 4737041.001395764760673,923456.958447594428435 4735328.245296869426966,923085.81926528934855 4735088.56864713691175,922529.33313081425149 4734969.23445587605238))
+POLYGON ((1006699.224634006619453 4728119.201125808991492,1002648.308364039636217 4719960.268572038970888,991516.470604204223491 4708191.490640126168728,990434.111195221310481 4707277.005363148637116,986197.736653590225615 4704377.888897651806474,985795.873291826574132 4704138.942838804796338,985208.329019421944395 4704059.295401091687381,984033.351794098387472 4704218.59090079087764,970180.197762328200042 4710734.830667356029153,969376.24839982111007 4710218.442612736485898,962511.398041581385769 4705966.429603641852736,959110.142319883685559 4710019.849822008982301,953605.838778120116331 4723103.371709452010691,951936.157735709450208 4728835.459561286494136,947303.931084821466357 4730348.69883138500154,947044.111393308034167 4730468.408637540414929,946376.417087529785931 4730587.689756808802485,946060.937650623265654 4730516.006223312579095,945819.819633563398384 4730372.210585779510438,943686.047634038841352 4727816.343829692341387,943519.179717339924537 4727576.84501826018095,943407.860226545599289 4727314.420448805205524,942888.332163015496917 4724926.110488103702664,940556.74542834807653 4723023.575279343873262,940781.610799753107131 4720640.000373373739421,940649.585883671417832 4719999.653389065526426,939752.90738533239346 4717335.006851085461676,938546.872022076393478 4715903.019962769933045,936320.482206211076118 4715545.842178429476917,935856.725207568029873 4715744.686294911429286,935547.368342651054263 4716101.727918216958642,930847.348121868213639 4725252.381234178319573,930414.426622175029479 4726765.515021025203168,929115.662123089772649 4731981.318530310876667,928991.874849328305572 4732499.820358178578317,929486.801305394852534 4734650.825595170259476,930259.915168951964006 4737200.81604930665344,930445.262121124891564 4737638.669494730420411,930909.130439259111881 4737838.95216157194227,937804.816296448814683 4737120.908406796865165,938113.950522383209318 4736921.644163966178894,940062.041611263994128 4734929.934802027419209,940896.937792214914225 4733813.831005614250898,940760.905374462949112 4735455.185859018936753,940946.363646127050743 4734714.363139407709241,941131.933237279648893 4734116.29415721539408,941243.364047562354244 4733997.114851419813931,941874.100282395607792 4733901.887149323709309,942041.190838076989166 4734140.962010812945664,942764.767528233584017 4735383.467831508256495,942727.47549881762825 4735670.773311780765653,941670.051655772025697 4738515.86807562597096,938918.011204381473362 4744655.08880615234375,938392.360568856238388 4745453.641060731373727,934743.530299635371193 4750440.062611720524728,931311.105120514053851 4754111.118107815273106,937773.86947800766211 4760260.266488189809024,938454.14288624713663 4761538.34803213365376,938825.282068549422547 4763176.594452445395291,938825.282068549422547 4763855.787634761072695,938639.71247739973478 4764975.218668008223176,937155.378387161996216 4770410.586892049759626,936722.456887466018088 4770610.513838365674019,934805.312617023475468 4770570.931154179386795,934341.444298889255151 4770770.86128674633801,933630.33539169980213 4772010.689546692185104,931960.543029800872318 4774970.024270806461573,931867.813893971615471 4775489.732684206217527,934186.821526177809574 4785935.967709517106414,936536.998615804710425 4792625.206503624096513,940587.803566280403174 4812038.112105596810579,940340.451657736906782 4813082.417745406739414,940278.446701366337948 4813684.478796198964119,939907.530158043722622 4819829.454284301958978,939845.74784065282438 4830643.528108220547438,940031.094792822841555 4831086.633741095662117,940433.180793568957597 4831327.453981552273035,940989.666928044054657 4831447.938689767383039,941515.428883060580119 4831327.453981552273035,941886.568065365660004 4831045.797692514024675,942474.112337773083709 4830322.071637745946646,945102.476834893343039 4825617.105472651310265,946710.375559910084121 4826140.461467765271664,948844.036239946144633 4830000.62552766315639,950884.745145167806186 4833942.965504664927721,951967.10455415060278 4839336.338547906838357,952585.373006016598083 4843442.730720230378211,952616.431143948924728 4844772.365634752437472,952523.59068862569984 4846503.912260796874762,952121.727326862048358 4847431.298227426595986,951627.02350977784954 4848236.920728685334325,949214.952783268759958 4851137.934279235079885,948225.545149097684771 4852146.581483527086675,947297.919832317507826 4852589.484085980802774,942937.758016927633435 4853315.701302082277834,941608.269338383921422 4853355.612858886830509,941206.294657128979452 4853073.332743814215064,939783.742884282255545 4851823.269237522035837,939257.980929265730083 4851058.274228597059846,937588.299886855180375 4850211.508471842855215,934929.099890787852928 4850936.536331206560135,934619.743025870993733 4851259.819744938984513,934496.178391091874801 4851783.363831936381757,934496.178391091874801 4852468.743281346745789,934929.099890787852928 4858113.638235126622021,935918.507524956134148 4865739.418661299161613,936227.641750890645199 4868122.132754945196211,942257.484608688158914 4886791.934526039287448,941948.350382756558247 4898935.059481357224286,941453.646565669565462 4912756.01032021548599,931434.892394275637344 4937811.53019680082798,924662.993810847518034 4951197.50262882374227,924075.226899460540153 4951931.157279931008816,923209.606539050932042 4952419.899960006587207,912974.224638574873097 4955800.426560839638114,911768.300594810163602 4955922.29157180711627,909727.591689588618465 4953274.451937887817621,909232.665233522071503 4952419.899960006587207,909109.100598740042187 4951889.672445533797145,909170.882916131056845 4951279.147394481115043,909078.15378029900603 4950668.513789765536785,908521.556326332618482 4948551.964532686397433,908305.039916741894558 4948063.414605832658708,907284.57414463837631 4950343.131673512049019,907068.280374027322978 4950831.795190838165581,906635.358874331228435 4952378.413057223893702,906511.571600569761358 4954252.095652343705297,906542.518419010797516 4956696.631749966181815,906820.928465483826585 4957062.55811027251184,908335.986735180136748 4958285.687341471202672,910407.865097825299017 4958855.281473980285227,909727.591689588618465 4967048.898458839394152,907222.791827247478068 4971332.027387433685362,907130.06269141822122 4974678.834579205140471,911984.81700440379791 4999606.760737029835582,915973.839637488592416 5003699.510524909943342,915880.999182168161497 5003126.115456045605242,915942.781499559059739 5002512.379953646101058,916313.920681861345656 4999279.745014345273376,916499.490273013827391 4998788.652839280664921,921508.867358713643625 4992367.25721278320998,922931.30781206919346 4991059.054102432914078,924508.148399156518281 4989955.283870407380164,924972.128036782029085 4989750.879334655590355,930228.857031022431329 4988197.162302731536329,941484.482064619427547 4986112.930381846614182,943989.281926960684359 4985868.153931086882949,946803.216015233425424 4986358.595614289864898,951008.532418929389678 4987502.417891493998468,955090.172868354944512 4988769.679480756632984,957440.23863849346526 4989750.879334655590355,957873.160138186649419 4989995.753239088691771,958553.433546426123939 4990650.350211219862103,959326.547409986029379 4991916.990628542378545,959945.038500831811689 4994002.46357377897948,960377.960000527789816 4994943.847402790561318,961212.856181475915946 4996130.055730766616762,962047.641042935545556 4996661.510945867747068,962975.377679206896573 4997070.466989534907043,967613.615582598838955 4999115.652072818949819,969654.43580731167458 4999730.351970691233873,972963.073712668614462 4999893.276780248619616,974230.891393315512687 4999811.224794953130186,975900.795074705732986 4999402.153667942620814,976859.255890435772017 4999811.224794953130186,978498.212753384839743 5000835.230063597671688,980755.438068200135604 5002676.530148561112583,984496.997473252937198 5006401.745020342059433,985610.303700676886365 5007998.912972521968186,986105.007517761085182 5008859.375374868512154,987712.906242777826265 5011972.626422861590981,987867.640334980445914 5012546.543189222924411,1003081.229863735614344 5030221.658903826959431,1003483.315864481730387 5030467.406230424530804,1006359.032270142692141 5031493.464903459884226,1006761.006951397517696 5031617.46235082950443,1007379.498042243300006 5031658.105482559651136,1007905.037358280038461 5031535.142056891694665,1019779.042163234320469 5040653.592615447938442,1019686.535666384734213 5047270.725798390805721,1019964.611754386918619 5047558.652180196717381,1021417.999026183504611 5048668.988379723392427,1027818.981066289008595 5049984.975816012360156,1059019.273987356340513 5033998.106992928311229,1064492.408071696292609 5029729.000817683525383,1072439.506519427755848 5010743.782631517387927,1059143.061261117924005 5001980.605376528576016,1058029.86635318514891 5000875.597317012026906,1057937.137217353098094 5000262.003661028109491,1058184.489125896710902 4999852.913598751649261,1058586.35248766024597 4999566.251436783000827,1060534.443576541030779 4999443.693416274152696,1064925.329571392387152 4999525.742305035702884,1070089.55206878320314 5000711.477482918649912,1075253.440607700496912 4990608.700758517719805,1085024.842870553722605 4965621.948026306927204,1085488.59986919676885 4963460.631903587840497,1085581.440324520226568 4962238.030066214501858,1085488.59986919676885 4961626.713038412854075,1084529.916414487175643 4959182.119951448403299,1084560.97455241670832 4957918.541851487010717,1085303.030278044287115 4953396.285539698787034,1085488.59986919676885 4952908.667009911499918,1090405.247819064650685 4945947.280891880393028,1091302.037636894965544 4944848.73577840346843,1091704.012318149907514 4944360.223751781508327,1092507.850361168384552 4944075.330663150176406,1093280.964224728289992 4943505.422831780277193,1093621.045269101159647 4943180.278217161074281,1093806.614860253641382 4942691.995682896114886,1093775.668041812488809 4942040.599573181942105,1091982.311045131646097 4934233.945789236575365,1090961.956592522095889 4930454.639144494198263,1087807.830140385543928 4923469.094507829286158,1086972.933959434507415 4922291.508070710115135,1086261.71373275690712 4921641.46236689388752,1085457.653050758643076 4921154.248518590815365,1084499.192235028604046 4920789.803772863000631,1082860.235372079536319 4919774.135011625476182,1081066.767055907286704 4918191.297487592324615,1079767.891237330855802 4916852.936126994900405,1075036.924198109656572 4910849.200137553736567,1072779.698883291566744 4907038.72854448761791,1071542.716701597440988 4904201.388420439325273,1071233.582475665723905 4903148.481310289353132,1071171.68883878365159 4902540.973792779259384,1071109.906521395547315 4900555.931994060985744,1071264.529294106876478 4895006.903309548273683,1072006.585019734455273 4893104.538529629819095,1074480.438063631765544 4887035.274213382042944,1075500.792516243876889 4885336.535734356380999,1078964.053194312378764 4881494.845270287245512,1080262.817693397402763 4880120.263678282499313,1081314.118964450666681 4871836.645863584242761,1079242.463240788085386 4856540.63636137265712,1076985.015286990441382 4838208.565749828703701,1076521.258288344601169 4833942.965504664927721,1076490.311469906242564 4830684.507312792353332,1076644.822923126397654 4829557.712926625274122,1076892.174831670010462 4828471.871158952824771,1077077.744422822492197 4828030.039779900573194,1077170.584878142923117 4826822.920704463496804,1077077.744422822492197 4824291.036141080781817,1074418.65574624366127 4800642.682296162471175,1073367.131836207816377 4791583.03186391107738,1072099.425475054886192 4783493.524799268692732,1068697.947114374721423 4769450.877706284634769,1065110.899162544868886 4754750.323770856484771,1065018.170026712818071 4754151.642084226943552,1064647.253483390202746 4749961.146627390757203,1064677.977662849007174 4749362.749055639840662,1066100.529435695614666 4748165.055012539960444,1066347.881344239227474 4747766.238205512985587,1066378.716843188973144 4747287.449065466411412,1065234.686436306452379 4743259.712149412371218,1064801.764936610357836 4742343.060330395586789,1063843.081481900764629 4741345.545971967279911,1059947.010623624781147 4738635.818056019954383,1051149.43126623518765 4739509.372322049923241,1047578.190682095242664 4741864.528203593567014,1045537.259137891232967 4744177.452073590829968,1045228.124911956721917 4744496.161182151176035,1042630.595913789235055 4747128.623610292561352,1040002.231416668975726 4749521.609666111879051,1037683.001145480317064 4751197.411061375401914,1034745.502422428457066 4752354.804466783069074,1003916.126044683740474 4759901.518236458301544,1003452.369046040694229 4759701.803801893256605,1003112.176682176650502 4759381.607565020211041,1003050.394364785752259 4758782.650809430517256,1003359.528590717352927 4739791.916132025420666,1003668.662816651863977 4736244.261176694184542,1004194.424771668273024 4733575.33751439768821,1004565.563953973352909 4732618.982027354650199,1006699.224634006619453 4728119.201125808991492))
+POLYGON ((917798.032133119413629 5010292.665438856929541,915509.859999863081612 5010333.219413740560412,914520.452365692006424 5011234.446110470220447,914396.887730912887491 5012996.584893628954887,916252.138364473241381 5018652.277378890663385,922652.89776559616439 5027102.553674321621656,925528.614171257126145 5029646.696552431210876,926301.728034817031585 5030262.296185959130526,926703.591396580683067 5030098.713690760545433,928991.874849328305572 5026363.370345648378134,929208.391258919029497 5025870.908152046613395,929177.444440477993339 5025337.854118551127613,928466.335533291450702 5022097.621853058226407,928311.824080071179196 5021563.59386507794261,927353.140625358792022 5020498.13559403270483,927074.730578885762952 5020415.909573744051158,925003.074855223065242 5021072.556172548793256,922652.89776559616439 5021440.905932917259634,922158.19394850928802 5021235.838951365090907,920333.890133390086703 5020415.909573744051158,917365.333272405900061 5016807.950404336676002,917798.032133119413629 5010292.665438856929541))
+POLYGON ((1147209.13494207453914 5208574.389115321449935,1146033.935077771311626 5208699.645282902754843,1145693.854033395648003 5209035.075002564117312,1145446.502124855061993 5209494.428236635401845,1145322.826170581858605 5210037.821736492216587,1145322.826170581858605 5211878.273705241270363,1145415.666625905316323 5212505.693274946883321,1145817.641307160025463 5213552.489127269014716,1146250.562806853326038 5213803.134832025505602,1146807.048941328423098 5213928.309540370479226,1148291.383031566161662 5213426.114392094314098,1149157.226030958117917 5212925.150810859166086,1149497.418394822161645 5212548.165328990668058,1149744.770303362747654 5210289.428453990258276,1149744.770303362747654 5209744.966559316031635,1148446.005804277490824 5208658.244323135353625,1147209.13494207453914 5208574.389115321449935))
+POLYGON ((1214742.996463156305254 5209578.291588813997805,1213846.095325834816322 5210080.282724525779486,1209919.188968611648306 5214430.531328647397459,1209640.778922138735652 5214848.868976062163711,1209424.262512545101345 5215937.356578757986426,1210908.596602782839909 5219286.465100556612015,1211310.571284037781879 5219411.71235326025635,1212485.548509361455217 5219118.567052458412945,1212949.528146986849606 5218909.226173133589327,1214711.938325226772577 5216816.825460562482476,1214990.348371699685231 5216398.400829484686255,1216505.517960887169465 5211962.158167818561196,1216319.948369734687731 5211418.804848396219313,1215454.105370345525444 5210205.558805547654629,1215144.971144411014393 5209828.832129613496363,1214742.996463156305254 5209578.291588813997805))
+POLYGON ((1122471.383739521261305 5246958.623536276631057,1121574.705241182120517 5247504.175636931322515,1120925.267331892391667 5250066.077587555162609,1122069.409058266319335 5253637.271365517750382,1122316.872286300873384 5254141.609470123425126,1122935.363377146655694 5253973.090374908410013,1123182.715285690268502 5253553.015952173620462,1124512.203964233864099 5250317.542849234305322,1124203.069738302379847 5248806.432877082377672,1124017.500147149898112 5248218.172507207840681,1123028.092512978706509 5247084.389466622844338,1122471.383739521261305 5246958.623536276631057))
+POLYGON ((1159794.359973709331825 5267724.118878492154181,1152682.269026417518035 5275385.549665250815451,1151940.213300789706409 5276017.208317720331252,1151445.509483702713624 5276270.429545163176954,1150827.018392857164145 5276353.82725206296891,1146559.697032787837088 5275470.00084687769413,1139324.041450713761151 5273448.232721309177577,1136479.160544002894312 5271764.414931728504598,1131036.750639118487015 5270879.959258995018899,1129799.991096403915435 5270922.694922543130815,1128686.796188471373171 5271217.606606724672019,1127388.031689386116341 5272059.353027753531933,1126738.705099590588361 5272775.063497086055577,1126212.943144574062899 5273617.101020171307027,1124790.614010707009584 5276312.128306059166789,1124543.262102166423574 5277407.73480365332216,1124388.639329454861581 5278628.444034138694406,1124481.257145792944357 5279935.016820290125906,1125223.535510402871296 5281157.11663833912462,1125965.591236030682921 5281831.94896284211427,1127295.191234065685421 5282548.556269380263984,1129336.122778269695118 5283222.274689030833542,1133541.55050145694986 5283643.676762449555099,1136417.378226611763239 5282969.928093928843737,1137499.514996612211689 5281958.18197787925601,1138087.059269019635394 5281157.11663833912462,1138921.955449970439076 5280566.829845800995827,1139447.606085495790467 5280399.050139931961894,1152094.72475401009433 5281873.672427835874259,1152589.539890585467219 5282042.692288766615093,1153238.977799874963239 5282800.891535591334105,1155156.122070314595476 5285498.708201638422906,1155403.473978858208284 5285963.016680225729942,1156794.967613775283098 5289546.660509708337486,1157104.213159198174253 5290643.813170156441629,1158495.70679411268793 5292036.660662086680532,1158990.410611199680716 5292247.481474158354104,1159608.790382556850091 5292289.25128997117281,1161742.451062590116635 5290263.857331533916295,1162082.53210696298629 5289884.979849116876721,1162206.31938072736375 5289335.900412666611373,1162299.15983604779467 5288324.530427725985646,1161185.853608623845503 5269701.774128708057106,1161000.284017471363768 5268439.499349321238697,1160721.985290489625186 5268060.440910523757339,1160289.063790793530643 5267765.628244360908866,1159794.359973709331825 5267724.118878492154181))
+POLYGON ((1092724.478090250398964 5312647.684638892300427,1092446.068043777486309 5312774.333532541058958,1091704.012318149907514 5313451.447102219797671,1091425.60227167676203 5313874.211260602809489,1090838.169318760745227 5315354.112507400102913,1090405.247819064650685 5316962.019733565859497,1091240.032680524280295 5321150.364205220714211,1091394.655453235842288 5321701.46563699003309,1093497.480634319130331 5323775.434266922995448,1094053.966768794227391 5323775.434266922995448,1094455.941450049169362 5323479.015979854390025,1094734.351496524875984 5323055.81707516591996,1096651.384447476128116 5319965.994673990644515,1096094.898312998237088 5317681.167677925899625,1095847.546404457651079 5317215.283864062279463,1092724.478090250398964 5312647.684638892300427))
+POLYGON ((1547959.190478368662298 5296973.207952031865716,1549969.286523622926325 5288366.282772694714367,1551762.754839792149141 5282125.989551581442356,1556833.914242880186066 5268565.552543614991009,1557266.835742576280609 5267639.737265271134675,1560328.121739389607683 5261876.310809086076915,1564966.359642784344032 5254267.320022436790168,1566821.721595835871994 5251325.890682872384787,1573006.075906853657216 5242382.459166558459401,1580736.657944994280115 5233531.574488886632025,1614596.373501111287624 5200214.12224353197962,1621028.079720675479621 5194116.771688089706004,1621893.922720064641908 5193531.902650608681142,1625790.104897829005495 5191736.184565830975771,1628480.251712340163067 5190817.866451972164214,1632098.246482611168176 5189357.396138948388398,1637756.950158106628805 5187061.816483536735177,1638128.089340411592275 5186770.721155709587038,1638468.281704275636002 5185769.229097432456911,1638468.281704275636002 5185143.575426271185279,1638066.084384038113058 5182264.68772544618696,1638684.575474886689335 5177095.749307778663933,1638931.927383430302143 5176054.016860509291291,1640107.015928242122754 5174511.208078400231898,1640818.236154919955879 5173802.746009979397058,1642488.028516821796075 5172636.740987038239837,1643318.58323762868531 5172188.165579807944596,1650311.339690788649023 5167763.534203924238682,1651702.94464519713074 5167014.504129337146878,1657423.319318589521572 5164224.559410823509097,1658567.572364454623312 5163891.906727771274745,1663082.245633067330346 5163351.146137099713087,1669390.164578867144883 5161644.557721870951355,1672451.561895174672827 5159148.823506492190063,1672915.430213308893144 5158274.677171367220581,1676007.551709072198719 5154531.445670301094651,1677553.668116700835526 5153284.277646607719362,1680831.359203619416803 5151579.639301875606179,1685590.824032485950738 5150203.878475805744529,1686923.207017790526152 5149834.010106040164828,1688809.293150300625712 5149501.85897811781615,1711320.654536988586187 5146841.476119262166321,1713917.960896176518872 5146592.738894795998931,1715773.434168719453737 5146592.738894795998931,1720504.512527434621006 5146966.968975843861699,1725142.750430826563388 5147382.348632914014161,1736583.833736084867269 5149543.003197907470167,1744098.122003614204004 5148878.732747524045408,1744994.689182461937889 5148379.96184997446835,1746231.671364156296477 5148129.987797888927162,1754394.952263010432944 5148504.278133075684309,1755570.152127313660458 5148587.605356510728598,1765186.820297964382917 5149793.014251541346312,1771494.961882746545598 5151288.429525315761566,1782565.017325193854049 5152993.165516478009522,1783121.726098648505285 5153076.531938743777573,1784482.272915124660358 5152952.006420380435884,1787110.414773262338713 5152577.541636026464403,1790295.376724349102005 5151412.933337261900306,1796912.652535065542907 5148129.987797888927162,1797283.791717370739207 5147838.883236545138061,1797531.366264893906191 5147382.348632914014161,1802014.870076083112508 5137456.620890467427671,1802788.09525913419202 5135132.424639264121652,1802942.718031845754012 5134634.370704549364746,1802911.659893913427368 5131232.940412726253271,1802849.654937542742118 5130568.746688964776695,1802262.44462360907346 5128246.222982068546116,1799479.234714794903994 5124763.941258870996535,1796572.46017120173201 5122194.721453896723688,1784512.885775094851851 5112708.945433278568089,1779565.736284748185426 5109521.044011251069605,1778266.860466174548492 5108818.575520431622863,1774834.43528705323115 5107618.315157425589859,1773535.893426950555295 5106955.904836318455637,1772731.832744949497283 5106418.35380541253835,1771649.58465545787476 5105425.251965181902051,1769979.903613050002605 5103688.017569683492184,1769454.141658033709973 5102778.127605186775327,1769052.166976778768003 5100213.598106558434665,1768897.432884576031938 5098849.809853106737137,1768835.650567185133696 5096948.152169370092452,1768990.162020408082753 5095212.598503709770739,1769485.088476474629715 5091866.014409247785807,1770103.468247829237953 5089882.769502552226186,1772206.07078993297182 5085423.485796961933374,1773597.675744341453537 5083111.70893875695765,1779071.032467663986608 5077747.885341422632337,1779813.088193291565403 5077087.380500149913132,1784791.407141059171408 5074324.680039799772203,1789584.490456145023927 5072634.015206900425255,1791625.310680857859552 5071809.571094106882811,1802509.573893170105293 5066411.389156664721668,1835874.696951694320887 5049615.539575739763677,1854335.142068412387744 5040611.728297318331897,1868930.351825810270384 5035189.092132915742695,1897966.259887382853776 5024435.31815954297781,1912437.905009998707101 5016972.342068054713309,1913334.360869358293712 5016438.743359075859189,1920817.479679464129731 5010784.33848778065294,1923909.82381420978345 5008367.799629869870842,1925022.79608315997757 5007425.264511574059725,1926043.261855263495818 5006401.745020342059433,1928269.651671128813177 5003904.207925351336598,1944967.797929101157933 4987298.064753788523376,1945338.937111406354234 4986971.461715657263994,1947688.891562050674111 4985786.219916395843029,1977157.498484336771071 4972719.413300270214677,1996762.419285905314609 4965050.785760941915214,2005049.376139027066529 4960037.261989648453891,2005266.003868111874908 4959629.853561143390834,2006657.163544555427507 4955311.515269698575139,2007801.52790990867652 4950546.714084476232529,2007677.629316655918956 4949976.430176135152578,2008048.768498963909224 4947208.144485590048134,2008172.333133742911741 4946719.661484095267951,2012841.74049455835484 4942528.849704090505838,2017943.958035575924441 4938054.961575789377093,2034332.413470160681754 4925823.52057374920696,2050906.995093354023993 4908133.205422817729414,2051185.071181355975568 4907767.928504401817918,2052823.805405322695151 4904526.268971375189722,2054926.741905900184065 4899583.609860400669277,2060770.681214074371383 4885821.984633077867329,2060832.686170445056632 4885255.435765591450036,2061080.260717971017584 4881534.870356842875481,2060956.250805226853117 4880282.380157456733286,2057153.131721765501425 4872523.411136692389846,2056565.476129866903648 4871755.656355711631477,2055823.531723730498925 4871150.073553312569857,2053566.083769932854921 4870261.467739584855735,2052762.245726914145052 4869776.780788168311119,2050473.850954678375274 4865335.889044402167201,2050257.223225593566895 4864811.484903609380126,2048216.40300088073127 4856661.426643427461386,2047721.699183796532452 4853436.452394020743668,2047691.086323826340958 4852831.840847975574434,2047969.273731319699436 4851864.190583397634327,2048401.972592033213004 4850977.454027935862541,2048463.977548406692222 4850452.791642775759101,2047319.947141521144658 4839537.501882097683847,2047257.942185150692239 4839013.442208985798061,2045835.390412303851917 4837001.228078012354672,2045217.121960437856615 4836317.057725802063942,2042650.539780708495528 4835753.32622239831835,2040640.666374434018508 4837644.727224257774651,2040269.527192129055038 4837967.43429206777364,2037919.461421993328258 4839697.797764395363629,2037486.76256127981469 4839939.985676989890635,2033343.005835992284119 4841510.364267676137388,2031425.750246058683842 4841711.716484273783863,2029014.124797514406964 4841751.436552815139294,2025952.838800698285922 4842355.375071407295763,2023695.390846900641918 4843604.104419228620827,2023262.691986186895519 4843845.372402957640588,2021097.750529238954186 4845135.327377527020872,2013243.937814793083817 4851542.048373718746006,2012532.60626862407662 4852146.581483527086675,2009223.745724284555763 4855532.704514580778778,2008636.424090859713033 4856299.205378639511764,2007647.01645668852143 4857872.169024435803294,2003163.067367537179962 4865094.244126030243933,2003101.173730654874817 4865659.641429153271019,2003379.695096619194373 4866103.001710652373731,2003843.452095265034586 4866223.908378254622221,2004863.806547874351963 4865820.3590586790815,2005358.510364961344749 4865942.279503145255148,2005946.277276351349428 4866749.404473903588951,2006224.464683841913939 4867920.390106751583517,2006224.464683841913939 4868525.775716066360474,2005482.186319231754169 4879635.09430920612067,2005420.515321332029998 4880160.283208736218512,2004770.854773062746972 4881454.965890424326062,1993329.882787292823195 4903067.235041853971779,1988073.153793055098504 4907241.270574956201017,1987640.009654376655817 4907484.093015095219016,1979817.143758369144052 4908822.350372055545449,1977343.068075489485636 4909146.361462992615998,1968004.587312332121655 4910200.930725787766278,1966798.663268570089713 4910241.072268405929208,1963273.620273110922426 4910119.626356519758701,1953656.952102460199967 4909592.988795231096447,1949142.056194867705926 4909187.666344556026161,1948554.845880934037268 4909349.092735268175602,1936154.967801469145343 4914093.961294478736818,1915189.611502918414772 4925295.896553759463131,1914973.429051798535511 4925742.087145387195051,1915035.100049698259681 4926392.403772674500942,1915282.563277730252594 4926838.497880878858268,1919797.125226851785555 4932282.739173918962479,1922271.089590243063867 4934965.309146215207875,1924713.661857228493318 4934437.194369862787426,1926971.109811026137322 4934640.300822516903281,1927774.947854041820392 4935168.426515081897378,1928269.651671128813177 4936022.648326739668846,1928733.853947736788541 4937608.211798747070134,1928517.226218651980162 4938054.961575789377093,1927558.431444450980052 4938502.902788823470473,1926971.109811026137322 4938624.553096695803106,1902419.150838604895398 4941918.760495298542082,1901213.115475348895416 4941960.203185017220676,1900099.697928436566144 4941797.069368064403534,1897657.125661451369524 4941105.464811019599438,1894410.158753991359845 4939804.09757765289396,1892245.773894499288872 4938706.093316215090454,1886555.900761583354324 4934600.205988499335945,1885442.928492630133405 4933706.016632292419672,1884082.270356665598229 4932364.226780466735363,1882814.341356530319899 4930901.063826955854893,1878423.455361678963527 4925011.40944613981992,1877269.18356164265424 4922830.078899132087827,1869888.812641540309414 4912349.53581282030791,1868559.212643505306914 4910241.072268405929208,1864879.658194825751707 4902743.423524659126997,1864261.278423468582332 4900433.438631769269705,1864199.273467097897083 4899785.99895897321403,1863673.622831569751725 4897436.76185,1863333.430467705940828 4896303.530899708159268,1858509.400334178935736 4888167.443125531077385,1856901.724248144542798 4886509.72040990088135,1852506.60811264347285 4883148.379951699636877,1852046.635976685211062 4882788.537976511754096,1850438.959890651050955 4881049.63167215231806,1849820.691438782028854 4880282.380157456733286,1848769.278848240384832 4878624.813382448628545,1848429.086484376341105 4877492.57142814155668,1847810.372754548210651 4872564.417894242331386,1847872.3777109188959 4871998.626864162273705,1848800.225666681537405 4866144.127250761725008,1849170.919571021571755 4864649.621225462295115,1843821.684079934377223 4851137.934279235079885,1840852.904579967726022 4847350.507492264732718,1836802.210948980413377 4840382.345288867130876,1836555.081679422175512 4839939.985676989890635,1835843.750133253168315 4837847.015658987686038,1835503.557769389124587 4835995.418265760876238,1835287.04135979549028 4834023.647542980499566,1835287.04135979549028 4832212.442294713109732,1835720.185498471138999 4829557.712926625274122,1839894.443764237686992 4817500.206171272322536,1840327.587902913335711 4816656.141445172950625,1841564.236126136733219 4815250.730131530202925,1842801.218307830858976 4814447.767972481437027,1843759.679123560898006 4814005.544661113061011,1847563.243484987178817 4812278.473416110500693,1850841.157210885547101 4811275.006845019757748,1863642.564693640219048 4810472.363877268508077,1872795.475865645101294 4803449.600357593968511,1888318.644898294005543 4792505.188626158051193,1896234.46256911335513 4788659.462531667202711,1908015.960877218050882 4779530.377594564110041,1909252.60910044144839 4777690.547005645930767,1907861.449423997895792 4774929.416432349011302,1907273.682512607891113 4773410.052336889319122,1905449.378697488689795 4767452.736756898462772,1905232.862287895055488 4766213.326005016453564,1904552.588879658374935 4759422.152731611393392,1905356.426922677084804 4736363.466963930986822,1905480.43683542101644 4735287.796774490736425,1907891.950964473886415 4729990.438062083907425,1908541.722832234576344 4728755.617958744987845,1909097.986327729886398 4728000.092419369146228,1910984.295099219772965 4726526.041060634888709,1911262.927784675266594 4721352.435721680521965,1911262.927784675266594 4716420.699548071250319,1906562.462285930057988 4710138.747488704510033,1903965.267246233532205 4706681.125117248855531,1903686.745880269212648 4708549.554156251251698,1903037.419290470890701 4709225.088303910568357,1902604.720429757377133 4709463.152554526925087,1890019.384078633971512 4712881.220348970964551,1889462.563985685352236 4713000.294656206853688,1888256.639941920526326 4713040.654293715953827,1886123.201900869840756 4712762.290554499253631,1884576.974173749797046 4712483.791338548995554,1874779.077872087713331 4710019.849822008982301,1873321.237820661626756 4709582.043702185153961,1862467.587468316778541 4703860.680003763176501,1850253.390299495542422 4696197.718525815755129,1848892.843483022414148 4694968.145778483711183,1847346.615755902370438 4693181.772447124123573,1844965.603167325723916 4690166.719726325944066,1842337.461309187812731 4684852.740052834153175,1841100.479127490893006 4681999.099145596846938,1840543.770354036008939 4680492.615568191744387,1840327.587902913335711 4679264.936824827454984,1840482.210675627691671 4678789.368709231726825,1842213.451396443881094 4671461.518337189219892,1843636.114488781895489 4664931.313832703046501,1844563.962444544536993 4658008.686763161793351,1845120.225940037053078 4653185.623480750247836,1845305.795531189534813 4643851.216016387566924,1845244.235852780984715 4642125.775738357566297,1844718.473897764692083 4640547.13628233037889,1844223.770080680493265 4639678.760744840838015,1840420.205719254212454 4634903.368873140774667,1838502.950129323173314 4632812.214933954179287,1835720.185498471138999 4630131.190147726796567,1833493.684363114647567 4628474.197182360105217,1831081.724956096848473 4627133.666292802430689,1827216.489596773637459 4625360.232931300066411,1821681.239236568799242 4623468.075346027500927,1820351.639238533796743 4622917.065487484447658,1818279.760875888634473 4621853.291359129361808,1817506.869651311077178 4621340.239452145062387,1799541.239671165589243 4599103.148644500412047,1799046.535854081390426 4598238.261696002446115,1798737.401628149673343 4597295.757499310187995,1798366.262445844709873 4595605.126096258871257,1797283.791717370739207 4590379.6145936883986,1796851.092856657225639 4588022.477880411781371,1796572.46017120173201 4586177.018160791136324,1796572.46017120173201 4584409.621140083298087,1796448.895536419702694 4583153.375315750017762,1795954.191719335503876 4581583.741559290327132,1794098.941085775382817 4576561.466250188648701,1793387.60953960637562 4575306.312961672432721,1790883.032316247699782 4571815.193247145041823,1788780.20713516138494 4569306.045919299125671,1788068.875588992377743 4568718.26175610627979,1786553.705999807687476 4568443.644600364379585,1780678.931192683521658 4567973.171460186131299,1775236.632607290521264 4568482.451825355179608,1772515.427654847037047 4569227.578688781708479,1766269.068387455772609 4568992.745054850354791,1758260.410261315992102 4568013.105814421549439,1756745.240672128507867 4567698.715125989168882,1756157.696399721084163 4567698.715125989168882,1753962.030763314338401 4568247.776166656054556,1749973.119449720717967 4569698.108704942278564,1744963.965003003366292 4572677.87489365413785,1744252.633456834359095 4573266.024645081721246,1743665.089184429729357 4573972.667296966537833,1741067.560186259448528 4578326.535587314516306,1740634.861325543140993 4579151.053245951421559,1740109.09937052661553 4581073.817227526567876,1740170.881687917513773 4581741.146382659673691,1741624.268959714099765 4588336.354708921164274,1740727.367822392610833 4604255.192098897881806,1739861.747461986029521 4606497.201931188814342,1739552.390597068937495 4607441.67988926358521,1739552.390597068937495 4608621.973974267020822,1739737.960188224446028 4611140.537459671497345,1739799.742505612550303 4611770.841318562626839,1739985.312096765032038 4612282.283004427328706,1742644.734731817618012 4613424.155045670457184,1748489.007998462766409 4615708.137056574225426,1750344.258632025681436 4615550.213732747361064,1751395.671222567558289 4615708.137056574225426,1752354.132038297597319 4616022.85682515706867,1754426.010400942759588 4617086.17041387502104,1758074.840670163510367 4619133.996364675462246,1758445.979852468473837 4619409.963614966720343,1759930.091303723864257 4621222.370205101557076,1761167.073485417990014 4623271.0192547775805,1769485.088476474629715 4643468.265170291997492,1770660.177021286683157 4646429.470043471083045,1772276.424708114936948 4652867.628774406388402,1772670.050427561393008 4654924.880632411688566,1772793.8377013229765 4656189.773505501449108,1772206.07078993297182 4657494.962955967523158,1769392.3593406425789 4661133.719379997812212,1767413.321433320874348 4663585.865534909069538,1764599.276025556726381 4666038.742371333763003,1763238.729209080571309 4666672.426665117964149,1762001.969666369026527 4667463.732407342642546,1761878.182392607443035 4667938.773245671764016,1761939.96471 4668571.435408530756831,1762496.673483452992514 4670115.352534094825387,1763208.005029621999711 4671422.463489736430347,1764104.572208472760394 4672491.394399655982852,1765125.037980573251843 4673441.96596755925566,1779163.538964513456449 4681761.819279043003917,1779596.460464209550992 4681999.099145596846938,1783739.994550514500588 4682197.288425728678703,1786152.065277023706585 4682158.049781472422183,1788625.584362450055778 4681761.819279043003917,1790914.090454180026427 4681245.758200471289456,1792150.627357912017033 4680453.383482984267175,1792707.3361313669011 4680334.832171658985317,1795490.546040181070566 4681008.495863274671137,1800252.571217337390408 4684615.251035280525684,1800994.404303982388228 4685209.840326445177197,1801272.925669946707785 4685567.095846899785101,1802819.153397066518664 4688660.170577370561659,1804117.69525716942735 4692190.08131886087358,1804426.829483100911602 4693301.616071742959321,1805323.730620422400534 4697309.691134516149759,1805601.80670842458494 4699214.415976728312671,1805725.371343206381425 4702868.090166873298585,1805880.439393880078569 4708906.485807630233467,1805725.371343206381425 4710575.432937441393733,1805509.300211574882269 4710973.931955102831125,1805200.165985643398017 4711211.894124387763441,1802726.090302763739601 4711926.958936070092022,1799170.100488863186911 4713835.571500253863633,1798026.070081980666146 4714671.060250979848206,1792367.255086994031444 4724456.568442338146269,1792058.00954157137312 4725412.009837011806667,1788254.445180144859478 4740190.418211804702878,1787450.607137129176408 4747447.42587427329272,1787512.612093499861658 4749322.24430906958878,1787357.989320788299665 4753952.041519186459482,1787048.855094854021445 4758463.490119191817939,1785348.115914516616613 4769091.801893789321184,1784946.029913770500571 4771210.174569513648748,1784605.837549906456843 4772089.866401416249573,1779813.088193291565403 4784413.929537585005164,1778854.404738581972197 4786616.700051632709801,1778637.999648479511961 4787056.706637267023325,1773721.46301810303703 4795069.729307210072875,1772175.346610474400222 4796793.834087126888335,1770412.825112746097147 4798436.684895792044699,1764753.898798268288374 4809428.330720595084131,1759837.250848403433338 4819227.02293486520648,1759620.957077792147174 4819669.477374639362097,1758878.90135216456838 4823245.558361046947539,1758786.060896841343492 4823808.583378199487925,1757456.238259826553985 4835834.02291673514992,1756868.805306910304353 4844168.280471766367555,1757054.37489805999212 4845416.222158938646317,1756961.5344427395612 4846584.69612193480134,1756435.883807214442641 4847954.64081790857017,1753838.466128535103053 4854161.715476316399872,1753096.410402907524258 4855371.137161364778876,1750931.802904430311173 4859686.889231752604246,1749076.440951378783211 4862995.827934707514942,1744005.281548290979117 4870423.42300905007869,1743355.732319512870163 4871069.089653518982232,1741288.195417011622339 4872182.858023261651397,1739428.825962289934978 4874623.698766473680735,1737913.656373102450743 4876038.684358310885727,1735285.291875982191414 4876644.565937500447035,1734110.092011678731069 4876886.637988428585231,1732780.492013643728569 4877048.55606897175312,1731636.461606761207804 4876967.669437383301556,1727647.550293164793402 4876603.542293826118112,1726688.866838455200195 4876321.618443842977285,1725915.864294386468828 4875795.614791359752417,1720844.704891298431903 4870100.678140693344176,1716886.51775716082193 4865214.99319638684392,1716206.244348924141377 4864528.879033863544464,1715742.487350278301165 4864528.879033863544464,1710454.700218108249828 4865497.763916450552642,1709836.431766242254525 4865618.517896985635161,1709403.510266546159983 4865861.338111256249249,1707486.254676615353674 4867313.878741622902453,1704641.485089392634109 4870504.401635702699423,1699879.459912236314267 4875714.592927419580519,1698549.859914204105735 4877048.55606897175312,1686026.30588046903722 4888571.903800709173083,1684139.997108976356685 4890070.023419140838087,1682872.179428332252428 4890879.116960637271404,1681697.20220300857909 4891121.391735074110329,1680553.171796126058325 4891040.244321389123797,1671183.74421453056857 4894399.750633610412478,1663329.597541607916355 4900028.492224540561438,1661690.640678661642596 4905417.958387932740152,1665803.450585508020595 4915676.140557307749987,1668431.815082628279924 4917704.254308669827878,1668648.108853239566088 4918151.269635364413261,1668895.460761782946065 4919368.393595146946609,1669019.248035544529557 4920667.05877994466573,1668988.301217103376985 4923103.394770409911871,1668740.949308562790975 4924118.091525333933532,1665834.174764966592193 4930942.313788516446948,1659093.334319470915943 4946435.725434920750558,1657856.240818285616115 4948510.493992634117603,1651919.238415808416903 4956940.532249818556011,1651084.453554348787293 4958080.917324505746365,1650404.068826620699838 4958773.573558900505304,1644961.770241227699444 4964113.453174284659326,1644498.124562076060101 4964357.685274368152022,1643322.813378278631717 4964602.804147492162883,1641374.722289397846907 4964724.925542198121548,1634967.951635770965368 4959288.47683521732688,1628449.527532881591469 4960770.40512480866164,1627676.413669321686029 4960240.899203443899751,1622540.35500310221687 4955243.181081601418555,1614658.155818502418697 4956411.233342903666198,1609162.53519702097401 4956013.508011143654585,1603216.961193749913946 4953519.293564607389271,1594907.295164504554123 4949563.13797199819237,1594834.158259053248912 4952739.78013854753226,1596223.202865171711892 4956205.91589002776891,1597929.285381071269512 4957592.918933207169175,1598454.936016596388072 4957429.524844794534147,1599042.480289003811777 4957429.524844794534147,1600093.892879545688629 4957673.443593367002904,1601299.928242798661813 4958447.922213912941515,1602691.310558224795386 4959751.766225463710725,1610792.920459178974852 4967538.396273167803884,1611411.411550024757162 4968313.655887323431671,1611596.869821686064824 4968803.217001148499548,1611627.816640127217397 4969496.632536176592112,1611566.034322736086324 4970026.639569115824997,1611380.464731583604589 4970516.28644629381597,1611009.32554927864112 4971413.840235982090235,1609463.320461143972352 4974474.749658642336726,1608288.12059683795087 4975984.843892727047205,1593816.69811320444569 4986317.111590064130723,1592579.93857048987411 4987175.808011767454445,1590260.708299304125831 4988319.578982691280544,1588157.994437709217891 4989014.528749193064868,1587601.285664251539856 4988933.5983229232952,1583643.321169096278027 4986971.461715657263994,1582622.966716486960649 4985990.541388870216906,1581911.635170317953452 4984642.745884642936289,1577056.880857332376763 4983906.633664254099131,1566698.156961054075509 4986112.930381846614182,1563729.600100069772452 4991754.051944985054433,1563636.870964237721637 4992326.777999582700431,1561874.126827527070418 4997315.377585081383586,1561472.152146272128448 4998257.081568679772317,1560451.686374171636999 5000506.99452227819711,1557854.380014983704314 5005869.757899763062596,1556679.402789660030976 5007998.912972521968186,1547340.922026502666995 5023860.698589280247688,1540352.395713992649689 5034860.876555556431413,1536456.213536228286102 5040365.723610517568886,1535528.588219447992742 5041433.515052412636578,1533518.714813173515722 5043529.645964469760656,1529268.647974177496508 5047027.808455464430153,1527272.355545782251284 5048916.38864460028708,1526530.299820154672489 5049492.496008388698101,1525973.702366188401356 5049698.013697383925319,1519201.69246326899156 5050684.352076249197125,1518521.307735541136935 5050766.835312067531049,1516264.082420726073906 5050437.94315212033689,1514841.753286861814559 5049903.683825273998082,1510450.644653027877212 5047641.10876849014312,1510048.781291264342144 5047394.92538221180439,1479899.900960741564631 5056034.18784218467772,1477982.53405131935142 5056034.18784218467772,1476838.503644436830655 5055909.877252626232803,1470654.149333416251466 5054099.183629360049963,1466077.471108432626352 5052083.108234578743577,1463511.111567683052272 5050643.629014539532363,1461037.369843274354935 5049121.894094057381153,1459274.84834554605186 5047477.380575231276453,1450709.370126457419246 5050067.453087715432048,1450183.719490932067856 5051507.883221449330449,1448235.628402048489079 5055540.214564833790064,1447276.944947336101905 5057226.850670457817614,1445359.911996384849772 5060026.608231932856143,1444493.957677504513413 5061180.034284099005163,1441803.810862996149808 5064556.757936586625874,1439608.145226589404047 5067111.807219692505896,1437474.707185535691679 5069089.182860715314746,1435155.476914347149432 5070862.029763774015009,1431012.054147533373907 5073005.372014698572457,1410603.295302946353331 5080305.39269710239023,1409304.753442843444645 5080347.280872231349349,1407789.361214676406235 5079892.907877519726753,1399966.272679686080664 5087446.392993532121181,1393472.450184260262176 5096452.0776751274243,1388370.343962734099478 5102322.69386646617204,1386144.065466357162222 5104845.791433735750616,1385061.706057374365628 5105879.79032856784761,1375568.602521505439654 5114903.823235648684204,1374331.842978793662041 5115731.821385464631021,1360014.931948380544782 5128453.578922646120191,1359705.575083463685587 5130113.185426310636103,1359179.924447938334197 5132891.983550824224949,1358592.380175530910492 5134302.747495085932314,1355840.451043631648645 5140778.201981764286757,1355407.529543935554102 5141691.708376907743514,1354170.547362241428345 5143809.956122267991304,1352779.165046815294772 5145845.369628426618874,1350274.365184477064759 5148795.402983117848635,1348851.924731121631339 5150125.175510711036623,1338183.95528942043893 5158857.3825694154948,1326866.325299449963495 5166056.155309634283185,1325320.208891821326688 5166681.604127373546362,1323928.826576395193115 5166764.041134925559163,1322197.140577616868541 5166514.783783937804401,1320496.401397276902571 5165639.961586920544505,1317868.036900156643242 5165266.047191426157951,1317249.657128799241036 5165223.786046592518687,1316724.006493274122477 5165390.733647421002388,1316136.462220866698772 5166181.901246403343976,1314126.366175612434745 5169595.810840096324682,1307540.037183336913586 5180848.011921763420105,1306797.981457709334791 5183433.074948986060917,1306544.061699211364612 5184332.35948512237519,1306395.895456966012716 5185017.578626218251884,1305282.811868521617725 5188314.319086527451873,1302870.852461503818631 5194659.284594492055476,1295233.110878689447418 5204895.12574138212949,1294583.78428889112547 5205605.760693510062993,1293872.564062213292345 5206275.208896695636213,1283977.485845089657232 5212464.275675216689706,1279895.734076172811911 5214682.254791825078428,1274754.777352356119081 5217195.035769269801676,1267650.590088913450018 5221128.716414152644575,1266228.260955046396703 5221840.721633467823267,1265084.007909181294963 5222091.436209564097226,1254013.95246673678048 5223850.243343479931355,1253395.461375888204202 5223934.234002343378961,1250303.45119961630553 5223724.93730207812041,1247551.299428731668741 5223138.237601600587368,1247334.894338629208505 5222594.091464896686375,1246932.697018394712359 5220248.997410544194281,1247025.537473715143278 5219160.013780177570879,1245077.446384834358469 5216188.065437851473689,1244768.312158899847418 5215812.155301850289106,1244366.337477647932246 5215560.401790638454258,1243871.411021578358486 5215769.66860228870064,1236388.514850455103442 5219537.11198577657342,1235522.560531574767083 5220039.631516434252262,1235213.203666660701856 5220416.915522176772356,1234316.636487809941173 5222259.387033171020448,1233790.87453279341571 5225442.573880292475224,1234069.284579269355163 5225861.549616342410445,1235398.773257813183591 5227327.507567701861262,1236233.669438761193305 5227830.441295086406171,1237223.299711914733052 5227621.058315231464803,1238150.925028695026413 5227160.673436434939504,1239326.013573509873822 5227034.116778525523841,1241737.972980527672917 5226992.635525181889534,1242665.598297307733446 5227453.012218613177538,1243253.142569712363183 5228249.522893417626619,1243716.899568358203396 5229171.477308727800846,1244644.524885138496757 5232525.126696899533272,1245324.798293377971277 5235251.145810292102396,1245541.426022459985688 5236508.981606354936957,1245634.155158292036504 5237138.037857012823224,1245479.421066089300439 5238312.005777490325272,1244737.254020970547572 5240284.8544487869367,1242108.889523850288242 5244480.681527711451054,1233450.682168929604813 5256158.021519499830902,1221607.624182416358963 5269280.997038608416915,1219783.209047803189605 5270964.369958871975541,1216907.381322650937364 5272985.603699072264135,1215546.834506174782291 5273743.07207756396383,1212207.361101868096739 5275343.855017091147602,1209207.857422442641109 5276564.29603,1198292.424752709688619 5285329.626087565906346,1198756.181751352734864 5287016.941038453020155,1199065.315977287245914 5288872.487807004712522,1199962.217114608734846 5294863.390536140650511,1199807.594341897172853 5296087.589000712148845,1199498.237476980313659 5297142.500170947983861,1198663.341296032303944 5298366.99646352045238,1195880.465345691889524 5300477.603128615766764,1195014.62234629993327 5301027.487799968570471,1194055.938891590107232 5301491.501863869838417,1189757.893352062208578 5303560.992627472616732,1188180.94144548359327 5304109.841755610890687,1178749.62022700579837 5305504.692949242889881,1172348.638186900410801 5318780.556692740879953,1172781.559686596272513 5321235.228965300135314,1173400.162096933228895 5330762.657925860956311,1173616.455867544515058 5334194.762092789635062,1173585.73168808594346 5335509.116886302828789,1173121.752050460316241 5339536.95071707572788,1172225.073552121175453 5346069.740550464950502,1171328.283734291093424 5349973.917030206881464,1170462.552054390311241 5352521.965257641859353,1160258.228291843784973 5372756.408133405260742,1155898.177795942174271 5379355.975739465095103,1154568.577797907171771 5380804.152923504821956,1152991.403252349002287 5382039.690444423817098,1150177.691803058842197 5383487.059747753664851,1149157.226030958117917 5384595.323452513664961,1148971.656439805636182 5385106.780062098056078,1146405.074260073481128 5393548.203246452845633,1146095.940034141764045 5394614.364878811873496,1145848.588125598384067 5395766.196948881261051,1145211.172721316572279 5402411.380398472771049,1143962.279354105703533 5417464.773698929697275,1144024.061671496834606 5418875.50736443605274,1144024.061671496834606 5421356.784633309580386,1143807.767900885548443 5424522.91005699057132,1143622.198309733066708 5427091.544705638661981,1143096.436354716541246 5433386.414165782742202,1142849.084446173161268 5434500.677478602156043,1141272.132539597339928 5441229.06421360000968,1139818.745267800753936 5446032.463010535575449,1139169.307358511257917 5447447.576143579557538,1137901.489677867153659 5449678.408129567280412,1136510.107362441020086 5451825.102187506854534,1133170.41131915175356 5456890.993654573336244,1126120.214008742012084 5465442.183322738856077,1125161.530554032418877 5466602.898962718434632,1123306.279920472064987 5468322.265889196656644,1120832.426876571960747 5470085.771911464631557,1118853.611608229810372 5471031.990547205321491,1116237.714894079603255 5472280.758308938704431,1111369.93620067066513 5473783.872010364197195,1081468.407778688473627 5483211.944635030813515,1075469.845697802957147 5487262.03327033855021,1043372.65163941681385 5509695.18218650482595,1039754.879508125479333 5513195.578483929857612,1038919.983327174559236 5513799.799361262470484,1027880.763383679906838 5519203.006595519371331,1027324.27724920201581 5519376.417850414291024,981342.982340607559308 5531535.25295789167285,975282.303983857156709 5532141.781189842149615,973921.757167381118052 5532097.821734223514795,973334.212894973577932 5531968.126987632364035,972406.587578193517402 5531492.543419234454632,961800.289134392049164 5525734.979049458168447,946091.884469064418226 5515830.859540457837284,945287.823787063360214 5515182.626233979128301,940587.803566280403174 5510084.256210665218532,939412.826340956846252 5508399.632279393263161,939319.985885636298917 5507752.081683677621186,939969.312475431943312 5506975.081543704494834,940154.882066584425047 5506456.807260926812887,940216.664383975439705 5505809.394329653121531,940062.041611263994128 5505247.200427022762597,936784.350524348206818 5494935.359381960704923,935021.717707125819288 5493080.607807430438697,934093.981070854468271 5492607.04509655945003,927538.710216511273757 5490019.878882913850248,925095.692671563941985 5489631.657537028193474,923116.877403221675195 5488813.684665060602129,921756.21926725434605 5487994.69892231374979,920364.614312848658301 5486529.426226388663054,916901.464954268769361 5481447.153078906238079,916375.702999252243899 5480542.331147252582014,908150.417144027655013 5464581.491353617049754,907841.282918096054345 5463421.031195510178804,907748.553782263887115 5462089.777179732918739,908088.634826639434323 5461014.549457357265055,908583.33864372363314 5460112.977297240868211,908985.31332497857511 5459081.745380172505975,908985.31332497857511 5458523.647880590520799,898100.938793175038882 5448906.468552299775183,884866.275852253311314 5441700.138175642117858,880969.982354997773655 5440714.491300228051841,865261.689009158522822 5436900.232531908899546,861705.587875766912475 5434114.641316646710038,861272.666376073728316 5433814.676318937912583,854408.038656816468574 5431415.770272734574974,853758.600747526739724 5431330.04603192396462,852552.565384273650125 5431415.770272734574974,847574.246436506160535 5432829.872741126455367,845162.287029488245025 5433258.109033377841115,843770.682075082673691 5433258.109033377841115,843183.249122166424058 5433129.959896800108254,838451.168888035812415 5431774.556455984711647,838019.24926375807263 5432786.387129276059568,836287.674584468011744 5437799.532530904747546,834741.446857348200865 5442172.471129544079304,834154.013904431951232 5444145.263422732241452,834030.337950161658227 5445259.593940312974155,834154.013904431951232 5446547.33329422865063,834339.583495584432967 5447147.022073629312217,835019.856903824023902 5447962.525617859326303,845842.449118236545473 5459984.453628581948578,852398.053931050584652 5466258.073714859783649,852707.299476476269774 5466731.515286680310965,857623.836106852861121 5476625.205139553174376,858087.704424987081438 5477743.482703793793917,858166.963902430958115 5479583.35151132568717,853696.707110647461377 5484461.131951802410185,852892.757748137577437 5485753.295859139412642,852521.729885323788039 5486701.133015509694815,852459.836248441599309 5487865.628858491778374,852954.651385019766167 5491916.690127269364893,847666.864252847037278 5493382.67011009901762,837153.406264365999959 5489631.657537028193474,831154.621544497902505 5486917.671189052052796,826330.702730462187901 5485064.542988886125386,825866.834412327967584 5484891.781309290789068,818569.2851933746133 5485753.295859139412642,818012.57641991705168 5485883.421841571107507,782730.531729935668409 5503736.73788,776607.959736303193495 5509523.043212020769715,765754.309383961139247 5523441.47423,765537.904293858679011 5523917.883894205093384,762940.486615179572254 5545921.989374942146242,762847.646159856230952 5549522.386100337840617,773763.190149083384313 5568891.892854604870081,775958.633146507665515 5572022.133211215026677,777040.881235999171622 5573110.518941170535982,782390.450685560121201 5581422.007276556454599,782761.478548373910598 5595015.136241452768445,780349.519141356111504 5597719.632858700118959,779545.569778849137947 5598373.781873165629804,776329.661009321454912 5599944.497992424294353,775278.359738268190995 5600423.681968959979713,773484.891422098851763 5601078.026639787480235,772155.180104572558776 5601296.204413988627493,770083.413061418570578 5599812.57372566126287,768599.190290672122501 5599376.452081390656531,767238.532154707587324 5599551.400765324011445,763404.354933313792571 5600554.358637172728777,761518.046161821228452 5601732.418674577958882,754220.385623379494064 5606664.187908839434385,751530.238808868336491 5608499.027238465845585,751066.370490731205791 5608848.023700808174908,741573.266954862512648 5627819.764427215792239,736908.312373682158068 5638877.157360182143748,737120.487323131761514 5639468.044683436863124,737738.978413980337791 5640344.194073245860636,738506.97158096334897 5641064.075980572029948,738913.955639304011129 5641396.190811677835882,743150.330180932185613 5644201.432871735654771,744603.71745272888802 5644815.556234005838633,745562.178268458810635 5645210.473432439379394,752612.486898359842598 5648060.16809159796685,753849.357760565704666 5648016.905216329731047,758796.841209380538203 5646175.110267776995897,759971.929754195385613 5645122.554714355617762,772495.372468436486088 5649815.490037723444402,786441.255636038724333 5656705.234768318012357,793151.260582584538497 5661755.27549668494612,793460.506128007429652 5662194.42680343799293,793615.240220210049301 5662896.765627984888852,796892.819987637456506 5681147.420140702277422,795594.166808040696196 5689559.370667011477053,789161.570032552350312 5696908.356797621585429,779545.569778849137947 5703141.078135533258319,779174.541916035348549 5703493.769818068481982,778092.182507049641572 5705878.298872189596295,775834.957192234462127 5715992.010152684524655,758549.48930083704181 5735901.1696185041219,758054.785483752959408 5736831.935233124531806,757838.2690741593251 5737895.330790909007192,756857.878318744129501 5745270.828688966110349,756941.590575820184313 5747823.664414085447788,757776.375437279930338 5752703.724473900161684,757961.945028429618105 5753369.278529448434711,759044.193117924034595 5754612.65290523506701,764733.843611857620999 5757275.420254977419972,765321.387884265044704 5757320.653597633354366,767671.564973891945556 5756387.74251137021929,769001.164971927064471 5756254.93410968221724,770578.228197996853851 5756698.755269134417176,772990.187605014652945 5757675.495579027570784,776236.931873489404097 5759363.42670333571732,777102.774872881360352 5759895.177825654856861,777844.830598509055562 5760650.331891181878746,778865.296370609663427 5762027.61805006954819,783472.587455563363619 5769448.937399193644524,786224.850545936380513 5765804.617287534289062,787894.531588344136253 5763849.456169717013836,789378.75435909058433 5762338.828264348208904,790306.490995361935347 5761716.57865209877491,790924.982086207717657 5761494.460009311325848,792316.364401633734815 5761272.506826262921095,799614.024940078146756 5761006.586070370860398,800232.516030923929065 5761006.586070370860398,801160.141347706899978 5761494.460009311325848,804870.753934318665415 5764026.365982461720705,811642.763837235164829 5767849.502521211281419,812137.467654322157614 5768026.492041511461139,812663.229609338566661 5768159.636573953554034,816961.275148866581731 5767627.230445208959281,821414.05478059721645 5766693.396474911831319,823021.953505614073947 5766915.485166182741523,827072.869775581057183 5769049.611826782114804,830226.884908229345456 5770916.913367445580661,838977.821398979285732 5777411.830715832300484,851315.694522067788057 5777322.601085154339671,851934.185612916364335 5777144.144516784697771,858180.544880307628773 5771272.298975272104144,861983.886602751445025 5769494.072722079232335,866498.559871364268474 5768115.62824435159564,873668.759592847898602 5767339.197155674919486,874497.199243332725018 5767386.722004764713347,875682.306542316218838 5772072.288830789737403,876826.448268689913675 5775942.779918514192104,877413.99254109733738 5776788.523642092011869,879702.164674353669398 5778923.744606571272016,880660.848129066172987 5779414.046482460573316,884989.951806523604318 5779414.046482460573316,887556.422666764468886 5779859.026912304572761,890339.409936596173793 5780704.983949757181108,891514.387161919847131 5781684.36936969961971,892194.660570156527683 5782485.45918957516551,907130.06269141822122 5804329.028831167146564,907284.57414463837631 5804910.085715529508889,908243.2575993508799 5808705.409745917655528,908305.039916741894558 5809375.181189171969891,908181.475281959981658 5810670.656085169874132,906573.465237451950088 5815629.527358345687389,906140.543737755855545 5816657.03570813126862,923951.66226468142122 5847866.014556093141437,924260.796490613021888 5848314.455828784033656,924631.935672918101773 5848674.258859932422638,930321.697486342978664 5852757.147801582701504,931218.264665193622932 5853340.272219540551305,938454.14288624713663 5854866.531655132770538,939134.416294483817182 5854912.105356306768954,940371.175837198388763 5854686.501682759262621,940835.155474823899567 5854373.316487493924797,941762.780791604076512 5853115.839877008460462,941948.350382756558247 5851859.835356808267534,942443.054199840757065 5841006.434300081804395,942412.107381399604492 5839526.940069970674813,941577.211200451594777 5834061.257762528955936,940371.175837198388763 5832314.695755726657808,939907.530158043722622 5831329.686754268594086,938979.793521772371605 5827793.844951007515192,938887.06438594032079 5827122.675267956219614,940031.094792822841555 5820278.080910610035062,940154.882066584425047 5819831.06327177491039,941824.563108994974755 5817819.683413408696651,958893.625910290051252 5799955.93660254497081,959326.547409986029379 5799644.687999539077282,967582.78008364897687 5796611.470668218098581,968603.245855752495117 5796522.047478867694736,970149.139624398667365 5796789.035370232537389,971107.823079108260572 5797280.326977665536106,971691.693808319163509 5797767.79226940125227,973736.187576228519902 5799778.308349657803774,981652.339205521624535 5796477.898122441023588,982518.182204910786822 5795853.248463023453951,983538.647977014188655 5794693.48517609667033,984528.055611182469875 5793489.89982680324465,984806.35433816711884 5793044.234372034668922,985239.275837860303 5791974.215310244821012,985548.521383285871707 5790146.591843887232244,985455.68092796264682 5789478.27416699193418,985177.27088148961775 5789078.045642017386854,982239.772158437757753 5786137.762547732330859,981497.71643280738499 5785424.530495824292302,981064.79493311420083 5778523.992386957630515,982579.964522301685065 5777811.372602418065071,990248.652923560119234 5773273.129402481950819,990743.468060135492124 5772294.672244289889932,993711.913601628388278 5764471.855215387418866,994794.161691120010801 5760650.331891181878746,994825.108509561046958 5759984.232462356798351,994763.214872678858228 5759363.42670333571732,996433.118554069078527 5755589.164013448171318,1001689.847548309597187 5753058.382221064530313,1005956.946269396459684 5754390.71173145249486,1011213.675263636978343 5763627.444139027968049,1011399.244854789460078 5764204.558994263410568,1011399.244854789460078 5764648.777425896376371,1010935.487856146413833 5766338.034122814424336,1010718.971446552895941 5766871.643010417930782,1009296.64231268572621 5768204.765342131257057,1005431.406953362515196 5769405.082730820402503,1004658.404409293783829 5770071.729086371138692,1003823.508228345657699 5771405.332113275304437,1001504.277957157115452 5776076.043274521827698,1001658.900729868444614 5776655.249581840820611,1003730.667773022432812 5783955.434123713523149,1005864.105814076028764 5789523.511554550379515,1011151.892946246080101 5799778.308349657803774,1016594.191531639080495 5806070.06399183999747,1017954.293070153100416 5807320.208165261894464,1019531.69025469373446 5807900.81863880995661,1021603.568617335986346 5808749.620170827023685,1021974.707799641066231 5809106.526970790699124,1022964.226753303431906 5810312.399774529971182,1028437.249518155003898 5817372.790195073001087,1028971.694393453770317 5818363.645895052701235,1032673.846698765759356 5827346.446524394676089,1034374.363240123377182 5832270.367180626839399,1034529.097332326113246 5832852.137008135206997,1034992.854330969159491 5836435.647314595989883,1034931.072013580938801 5837107.364886010996997,1033292.115150631871074 5847911.552022943273187,1033106.54555947938934 5848449.945459634065628,1032240.925199069781229 5849256.951331281103194,1030478.18106235913001 5849751.171959038823843,1030045.259562663035467 5850064.192708505317569,1029705.289837781572714 5851186.830285984091461,1029674.343019340536557 5852442.73875443264842,1032333.654334901832044 5858863.531711880117655,1033261.279651682008989 5860165.005625654943287,1034034.170876259449869 5860884.302576385438442,1034931.072013580938801 5861467.804299912415445,1035518.504966497188434 5861602.364515618421137,1042043.051641381811351 5862231.687285590916872,1043372.65163941681385 5862052.800414891913533,1052525.785450401250273 5856393.055900792591274,1052000.023495384724811 5848988.371822570450604,1052711.132402571383864 5842709.208854768425226,1052927.760131656192243 5842216.674272446893156,1059915.9524856954813 5831732.961380750872195,1062266.240894813556224 5829673.423972892574966,1062791.891530338674784 5829449.754830258898437,1066657.126889661885798 5828063.068261316977441,1071419.15206681843847 5827256.711796850897372,1079458.757011399138719 5828107.214579149149358,1080726.574692043242976 5828286.702248344197869,1081468.630417671054602 5829002.272423130460083,1087653.207367673981935 5835359.070643681101501,1092384.285726386588067 5837958.979595701210201,1096806.118539678864181 5839796.3605413492769,1102619.444987882860005 5841947.018412406556308,1103299.718396122334525 5841992.525285633280873,1106948.548665343085304 5841454.526439026929438,1107628.822073582792655 5841320.435260448604822,1111494.168752397177741 5838540.963643821887672,1112298.006795415654778 5837869.136813011951745,1112483.576386568369344 5837331.389643575996161,1112236.224478024756536 5836077.472626405768096,1111184.811887483112514 5834151.061745003797114,1111246.594204871216789 5833613.541321155615151,1112638.199159279698506 5827212.408632332459092,1119564.60919592785649 5816970.010244192555547,1120214.158424705965444 5816120.57970158662647,1120616.133105960907415 5815852.846599481999874,1121296.406514197587967 5815719.143983705900609,1121945.621784504735842 5815763.389510984532535,1127666.330416370648891 5816836.290717949159443,1128099.251916066743433 5817103.892712489701807,1128872.365779623854905 5817819.683413408696651,1132088.27454915153794 5821217.583891655318439,1132397.40877508604899 5821664.671735699288547,1132830.330274779116735 5823453.410602651536465,1132923.05941061116755 5824125.428588450886309,1130325.753051423234865 5843113.004470694810152,1123522.796330062905326 5848449.945459634065628,1123058.928011928685009 5848584.306723592802882,1120677.915423351805657 5849929.808856029063463,1119379.262243755161762 5850872.638866139575839,1118668.042017077328637 5851635.440765372477472,1118389.631970604415983 5852084.074112302623689,1118204.062379451701418 5852622.722826115787029,1118142.280062060803175 5853295.837715988978744,1118111.555882602231577 5860525.293595851399004,1118173.3382 5862007.027957756072283,1118791.829290841706097 5867309.807847258634865,1119039.181199382292107 5867805.043999289162457,1126460.295053117442876 5878870.817192661575973,1133355.980910304235294 5882247.789267834275961,1139169.307358511257917 5883509.442457898519933,1139756.740311427274719 5883328.824589560739696,1140096.932675291318446 5882968.897018011659384,1141426.755312308901921 5880626.485985483042896,1141488.537629699800164 5879951.436530011706054,1141364.750355938216671 5879276.276938788592815,1140684.588267189916223 5876936.147314792498946,1140499.018676037434489 5875586.343792392872274,1140529.854174987412989 5874956.063754633069038,1140746.370584581047297 5874416.044837267138064,1146776.213442378444597 5869873.523135174065828,1147209.13494207453914 5869558.501449602656066,1150734.177937533939257 5868838.494297962635756,1163257.509332286426798 5867175.322064250707626,1164127.025874872226268 5867716.02890782058239,1164989.306650558952242 5868344.656602023169398,1165638.52192086330615 5869199.137986212037504,1166133.448376929853112 5870951.740405191667378,1167215.696466424269602 5875496.115887394174933,1167308.536921744700521 5876170.984770490787923,1167370.319239135598764 5879501.378385384567082,1167339.261101203272119 5880176.393220584839582,1165607.797741404734552 5882832.874181524850428,1163010.15742374304682 5903483.850762403570116,1165652.548176704905927 5921100.829666555859149,1166009.661103168269619 5920382.762147471308708,1166380.800285473465919 5919975.394967852160335,1168607.078781847376376 5918482.366077532991767,1175626.551912798546255 5917398.285085798241198,1176244.820364664774388 5917487.64343505539,1179955.655590259004384 5918889.826470982283354,1184717.680767415324226 5920699.616414674557745,1185707.088401583489031 5921196.576460282318294,1187438.663080873666331 5921648.782552178017795,1188830.156715790741146 5921648.782552178017795,1189417.70098819816485 5921467.376217443495989,1189943.462943214690313 5921241.193521786481142,1197581.204526031855494 5915815.052161823026836,1198292.424752709688619 5915046.649550860747695,1198477.771704879822209 5913781.584807644598186,1198292.424752709688619 5913194.591840097680688,1201322.763931084889919 5909714.929498679935932,1206053.84228979726322 5907366.659082536585629,1212021.791510715615004 5904793.260868625715375,1226153.132949976250529 5905018.856075410731137,1226617.001268113264814 5905289.155395154841244,1232337.487260996829718 5913058.098843742161989,1232584.839169540442526 5913555.763559863902628,1235275.208623031154275 5922779.318738023750484,1235429.831395742716268 5923368.421558274887502,1235522.560531574767083 5924860.982305553741753,1235058.692213437519968 5926581.253746844828129,1235027.856714490568265 5927259.908403181470931,1235275.208623031154275 5927803.196016415022314,1235584.342848965665326 5928209.787591485306621,1236945.000984930200502 5929839.929153327830136,1237656.221211608033627 5930654.625035401433706,1242820.221070019295439 5935909.430494053289294,1243593.334933576406911 5936633.832732361741364,1245263.015975986840203 5937223.707934216596186,1278380.675806476501748 5944385.651184423826635,1293006.609743329929188 5944205.077841812744737,1294491.055153059074655 5944114.139518273063004,1303179.986687438329682 5941846.212676409631968,1303953.100550998235121 5941121.540710750035942,1305313.647367471596226 5938809.521506185643375,1306488.624592795269564 5938447.304117489606142,1308653.343410760862753 5938401.130639228969812,1309859.267454525455832 5938627.758288027718663,1344213.686827726662159 5951781.759280477650464,1351433.2010836340487 5955928.553575082682073,1356211.36758695426397 5957503.384859363548458,1356891.64099519373849 5957548.351520949043334,1360509.635765464743599 5956504.203788704238832,1361004.339582548709586 5956231.006341747008264,1361560.937036518007517 5955276.926172877661884,1361530.101537568029016 5953870.191901532933116,1360756.987674008123577 5952371.352891006506979,1358592.380175530910492 5948468.651897044852376,1357943.053585735382512 5947606.231817622669041,1356984.48145051416941 5946972.048166031949222,1356458.719495497643948 5946790.114734231494367,1352840.947364206425846 5946063.725377027876675,1351232.937319698277861 5945474.395034133456647,1350769.069001564057544 5945202.849461250938475,1350181.524729156633839 5944249.97592759039253,1349996.177776983706281 5943660.768167781643569,1350057.960094374604523 5942345.520582800731063,1350985.585411154897884 5936679.833734239451587,1353675.732225666055456 5930338.71352715138346,1356026.02063478413038 5927350.671258931048214,1356953.645951564190909 5926761.462782397866249,1361684.724310279591009 5923956.098117461428046,1369415.195028926013038 5916177.634063296020031,1377980.673248014645651 5897571.922480093315244,1379124.592335405992344 5895768.045488107018173,1380176.116245438810438 5894595.050855925306678,1381505.604923985432833 5893693.453481604345143,1384876.136466221651062 5891754.213365165516734,1389954.531636211555451 5890381.196063704788685,1397554.201953177107498 5887022.01578124333173,1401543.224586264695972 5886571.594767960719764,1412922.525574134895578 5886707.675595275126398,1416880.490069290157408 5883913.981606365181506,1417375.193886374356225 5883688.929068332538009,1418055.467294611036777 5883554.030026430264115,1418581.229249630356207 5883734.652531616389751,1419092.964948805049062 5884238.112806749530137,1419694.424157560104504 5884860.465314764529467,1420683.831791731296107 5885310.798456043936312,1421426.110156341223046 5885266.201956855133176,1423528.824017936363816 5884319.836620754562318,1427517.73533152975142 5882247.789267834275961,1427950.656831225845963 5881932.485370380803943,1475818.149191824486479 5870862.855327591300011,1494896.974079902982339 5871041.921630823984742,1508595.394019467756152 5870008.212113135494292,1509275.667427707230672 5869873.523135174065828,1515181.945650725625455 5868613.82788628898561,1527153.688968597678468 5865144.367665428668261,1527241.520046832505614 5864523.572789241559803,1527179.515090461820364 5863130.058490800671279,1526313.894730052212253 5859671.493280951865017,1524860.507458255626261 5854417.756432486698031,1524489.368275950662792 5853295.837715988978744,1523901.935323034413159 5852352.90966123342514,1523499.960641779471189 5852038.51505540497601,1520376.669688592664897 5852711.58526014816016,1504080.943389837164432 5842216.674272446893156,1496226.574077937984839 5836031.996287107467651,1489794.867858373792842 5828107.214579149149358,1489887.596994205843657 5827436.182164571247995,1493134.452582171885297 5815003.523469381034374,1493474.644946035929024 5814602.138507105410099,1493969.348763122688979 5814333.325347594916821,1494556.893035527318716 5814289.247848195955157,1497339.768985870759934 5815048.891574122942984,1497803.748623496154323 5815316.439426437951624,1498916.720892446348444 5817193.524297099560499,1501235.95116363489069 5817685.790094697847962,1501823.495436042547226 5817506.517843868583441,1508440.771246756194159 5815360.682936813682318,1520376.669688592664897 5810446.020605336874723,1521118.948053202824667 5809732.113247328437865,1521644.710008219350129 5808839.167054362595081,1521644.710008219350129 5808169.436218553222716,1521397.135460696183145 5807677.700247274711728,1519572.83164557418786 5804195.339728902094066,1519047.069690557662398 5803213.461623244918883,1513233.854561842046678 5797234.889387219212949,1510450.644653027877212 5794872.295518704690039,1509523.019336247816682 5794381.298037350177765,1508935.475063843186945 5794291.897372752428055,1507884.285112281097099 5793846.191549910232425,1507142.00674767093733 5793088.206127466633916,1505255.92061516083777 5790504.032555452547967,1500524.730936957290396 5782485.45918957516551,1500586.735893327742815 5782129.463760108686984,1503122.259935127571225 5778835.781549809500575,1504699.211841703392565 5777455.724974877201021,1507049.388931330293417 5775408.785544328391552,1507544.204067908460274 5775142.441037106327713,1509523.019336247816682 5775986.827080307528377,1509955.940835943911225 5776254.47835486382246,1510698.219200553838164 5777010.865113094449043,1511780.467290045460686 5778923.744606571272016,1512244.224288691300899 5779146.299843342043459,1514161.479878622107208 5779324.796704498119652,1516944.46714845392853 5779102.236988009884953,1517531.900101370178163 5778923.744606571272016,1517841.034327304456383 5778523.992386957630515,1518026.603918457170948 5777989.842596611008048,1518119.444373777601868 5776298.366886912845075,1517903.039283675141633 5772695.264635243453085,1517717.469692522659898 5771316.32295782212168,1516016.730512182461098 5766159.958293042145669,1515552.862194048240781 5765093.018077117390931,1515243.72796811372973 5764694.048322720453143,1513202.796423912514001 5763094.190074193291366,1512955.444515369134024 5762604.788901153020561,1512739.15074475784786 5762027.61805006954819,1511471.110425131395459 5757009.619079410098493,1511594.897698892978951 5755765.90944635309279,1513481.206470385659486 5750529.598205229267478,1513728.558378929039463 5750086.084850848652422,1515119.940694352146238 5749243.039231339469552,1524798.502501882379875 5745828.555422958917916,1534477.175628903554752 5741350.488490627147257,1534971.879445990547538 5741085.003159157931805,1535806.998265921138227 5740420.526800279505551,1540136.101943381363526 5735236.920443259179592,1549227.008159012766555 5722889.085833868011832,1549474.582706538727507 5722446.946490606293082,1549412.57775016524829 5721872.37322176899761,1543289.894437044393271 5714755.285961385816336,1541867.565303180133924 5714136.351848170161247,1539300.983123450772837 5714004.012727280147374,1536456.213536228286102 5714313.549367372877896,1526963.221319847973064 5715859.643524307757616,1534539.18058527703397 5716654.827380261383951,1535992.345218091038987 5717317.534706059843302,1536703.565444768872112 5718069.086846118792892,1536734.623582701198757 5718644.529269199818373,1529220.446634663036093 5731296.610033622011542,1528880.254270802019164 5731694.244267485104501,1520191.322736422764137 5740952.423003669828176,1517531.900101370178163 5743434.599971846677363,1517037.196284285979345 5743699.995792209170759,1511660.019601006759331 5745476.739755330607295,1508378.988929365295917 5746315.756891110911965,1506740.03206641622819 5745074.818549583666027,1506029.034478720743209 5744320.985903737135231,1505534.108022654196247 5742548.30229636002332,1505472.325705263298005 5741794.683575135655701,1505379.485249940073118 5739844.793744533322752,1505348.761070481268689 5739091.403803232125938,1505441.490206313319504 5738648.460050696507096,1506183.54593194113113 5737939.030324744991958,1506059.758658179547638 5736343.976766265928745,1502751.120752822607756 5733908.73006200324744,1495422.736034919507802 5728950.212082599289715,1494371.323444374836981 5728596.513294658623636,1490815.222310986137018 5728020.428552349098027,1490166.007040678989142 5728109.164844336919487,1489176.376767525449395 5728640.32657225523144,1489083.536312204785645 5729215.336051075719297,1489609.298267221311107 5729260.26769726537168,1490258.513537528458983 5729127.704059341922402,1490784.275492544984445 5729304.084237006492913,1492361.450038103153929 5729880.251936238259077,1492732.366581425769255 5730189.065108028240502,1494309.541126986732706 5731517.976161592639983,1494680.457670309348032 5731871.790892866440117,1494866.027261461829767 5733244.629406725056469,1494835.191762512084097 5733908.73006200324744,1493258.017216953914613 5735946.134986658580601,1492917.936172578250989 5736300.285057056695223,1492423.232355494052172 5736565.46832615043968,1488112.607713504927233 5738373.485527486540377,1471303.475923211779445 5744675.309620556421578,1468675.111426091520116 5744853.115215347148478,1461748.367430972401053 5743877.781904123723507,1461222.939434426836669 5743699.995792209170759,1459893.116797412047163 5742857.554947594180703,1459583.982571477536112 5742459.422071952372789,1455193.096576629206538 5735236.920443259179592,1454945.74466808559373 5734750.484207047149539,1454883.739711715141311 5733997.524995472282171,1455316.661211408209056 5731783.01713805552572,1457852.185253208037466 5724702.930322032421827,1457110.129527580458671 5722446.946490606293082,1456739.212984257843345 5722137.127656619995832,1454234.413121916586533 5721872.37322176899761,1447245.9981288977433 5721252.945403352379799,1438526.008456586161628 5719396.193162002600729,1432001.461781701538712 5715771.188073347322643,1424765.583560648141429 5711530.013975550420582,1414530.535618642810732 5705524.241816928610206,1406861.735897893318906 5700935.323180567473173,1404542.728265689918771 5699699.410609594546258,1401234.090360330184922 5698024.006955681368709,1383175.619924864033237 5689824.280003686435521,1382649.857969847740605 5689647.725784155540168,1382000.420060560805723 5689779.546260248869658,1381814.96178889949806 5690308.433967448771,1381784.014970458578318 5690925.720653479918838,1382062.313697440316901 5692159.311038088984787,1382835.427561 5693658.094286494888365,1384567.00224029016681 5696788.49658642988652,1385711.143966663861647 5697979.073429070413113,1386113.118647918803617 5698288.055525898933411,1386638.769283444155008 5698641.826140682213008,1389823.73123453068547 5700626.408435072749853,1391524.470414870651439 5701023.790705783292651,1391740.986824461491778 5701067.468891063705087,1392050.121050396002829 5700096.910501285456121,1391957.391914563952014 5699744.193973142653704,1390905.868004530901089 5699390.538553238846362,1390596.733778599416837 5698949.560792960226536,1390689.574233919847757 5698508.445989167317748,1391184.278051006840542 5698244.390912932343781,1392575.883005412528291 5698244.390912932343781,1393101.533640937646851 5698420.162125693634152,1393998.212139276787639 5698949.560792960226536,1400120.784132906468585 5706628.730077524669468,1400677.381586875533685 5707555.175210346467793,1400553.705632602330297 5707996.577689937315881,1391710.040006020339206 5711573.584522604010999,1391122.495733615709469 5711573.584522604010999,1389267.245100055588409 5711043.437635013833642,1379743.194745745742694 5705833.484771220013499,1368425.564755775267258 5697185.708370835520327,1367157.747075131163001 5695509.505560465157032,1353459.438455054769292 5671072.988943821750581,1353053.010994167532772 5669679.273364440537989,1352748.106908885762095 5667994.915523500181735,1353768.572680986486375 5663160.88833929784596,1361808.288945058593526 5652666.802543873898685,1376125.311294963117689 5630358.714091095142066,1385226.792862222064286 5622818.169033823534846,1389761.948917139554396 5619291.300263643264771,1390287.599552664905787 5619509.918482333421707,1391091.437595683382824 5619640.714204238727689,1392730.394458632683381 5619465.375967753119767,1393565.290639583487064 5618985.180702562443912,1393905.483003447530791 5618591.25394815672189,1395420.541273143840954 5616580.339353838935494,1395853.462772839935496 5615400.341432969085872,1395822.515954398782924 5614657.493871530517936,1390287.599552664905787 5600685.037194169126451,1389421.756553275743499 5598591.737373092211783,1388679.700827648164704 5597108.707317903637886,1386453.199692291440442 5593532.692404269240797,1386144.065466357162222 5593096.716500352136791,1385510.100966289406642 5592560.328604126349092,1385061.706057374365628 5592312.546336263418198,1383299.184559646062553 5598198.855970585718751,1383391.9136954753194 5598809.85516042727977,1384133.969421102898195 5600293.164249338209629,1384876.136466221651062 5602561.707933638244867,1385092.65287581528537 5603827.545774286612868,1384876.136466221651062 5605006.032520085573196,1384133.969421102898195 5605703.769102424383163,1383577.483286627801135 5605878.840294533409178,1382124.207334322389215 5605966.377162630669773,1381691.174515137914568 5605703.769102424383163,1379403.002381881698966 5601514.230372644029558,1379155.650473338318989 5601034.831520568579435,1379186.597291779238731 5600380.647037318907678,1380021.493472727481276 5588738.42594544775784,1375475.873385676182806 5590700.00887639913708,1370033.46348079200834 5596715.733335105702281,1368085.483711399603635 5596760.163816282525659,1367621.72671275655739 5596497.823039858601987,1366786.830531805753708 5594405.492027342319489,1365209.655986247584224 5587606.285310071893036,1364684.005350722232834 5585122.596821637824178,1363632.815399160375819 5579419.340504639782012,1363168.835761534748599 5576894.81504534650594,1363045.271126752952114 5574719.77161415386945,1363261.564897364005446 5572196.554246256127954,1367003.235621908213943 5539418.591574959456921,1367992.643256079172716 5535605.736053942702711,1374795.488657945534214 5509955.02954685036093,1375568.602521505439654 5507277.603155229240656,1376836.420202152337879 5503694.002836186438799,1382093.149196390062571 5495797.664347818121314,1383608.318785577779636 5493771.050577757880092,1385525.574375511379912 5491441.790903420187533,1393565.290639583487064 5482479.661394861526787,1396595.629817955894396 5479164.730311054736376,1411716.490210878895596 5464065.610026260837913,1413510.069846542319283 5462948.997959485277534,1416045.593888339353725 5461874.907196897082031,1418272.095023695845157 5461144.324976924806833,1419721.363474333891645 5460955.617436963133514,1420962.241838207002729 5460843.47749740909785,1426064.459379224572331 5460112.977297240868211,1426620.945513699669391 5459940.684847366064787,1427579.517648920882493 5459468.830414902418852,1436361.512277603149414 5453799.965532219037414,1452657.461215338204056 5440756.933988732285798,1454110.625848155235872 5439385.285293327644467,1461130.09897910640575 5432486.311159324832261,1466209.38470502034761 5427460.796584993600845,1468675.111426091520116 5424652.172178206965327,1479219.516233013477176 5415968.519969736225903,1480827.526277521625161 5414728.59871931001544,1486857.36913532204926 5411308.750155470333993,1494587.617214988917112 5407249.659536902792752,1499256.913256310392171 5405328.096473288722336,1500493.895438007311895 5405242.4603635603562,1501390.573936346452683 5405583.779559140093625,1508007.849747060332447 5404474.230768864043057,1509213.885110316099599 5403534.823596091940999,1513883.069832149194553 5399138.049250357784331,1516356.922876046504825 5396662.575030981563032,1516604.274784589884803 5396321.584791301749647,1516820.679874692345038 5394528.827866432256997,1516635.221603031037375 5393974.77601421251893,1516140.295146964490414 5393078.504560767672956,1516016.730512182461098 5392482.317885842174292,1516573.32796614873223 5388644.488429551012814,1517006.249465844826773 5387024.149807943962514,1517686.522874081507325 5385576.228183223865926,1526375.677047443343326 5365483.024864223785698,1541558.431077245622873 5323902.234062903560698,1543166.329802265390754 5312943.911780398339033,1544093.955119045451283 5307912.977343989536166,1544712.557529382407665 5305208.701262459158897,1545392.830937621882185 5303180.512615978717804,1547062.511980029754341 5298789.079752064310014,1547959.190478368662298 5296973.207952031865716),(1391091.437595683382824 5453585.289285531267524,1392668.612141241552308 5456032.339174258522689,1392792.176776023581624 5456676.39981646835804,1392637.665322803426534 5462776.652309426106513,1392606.607184871099889 5463421.031195510178804,1392111.903367786901072 5463679.569022727198899,1390689.574233919847757 5463765.749915907159448,1388339.508463784120977 5463421.031195510178804,1387319.154011172009632 5463077.563113337382674,1386360.470556459389627 5462605.547529310919344,1385989.331374154426157 5462304.497489670291543,1382120.311152143403888 5458937.771847099997103,1381351.093470762483776 5458480.040692410431802,1380918.171971066389233 5457448.992007585242391,1380794.607336287386715 5454100.582523406483233,1381232.42689357791096 5452090.267730949446559,1381722.232653067447245 5450923.194803402759135,1382185.989651713287458 5450708.585703196935356,1386948.014828866813332 5449379.171511695720255,1387566.505919715389609 5449293.125406513921916,1388648.64268971583806 5449550.030257171019912,1390133.088099444750696 5450880.705203127115965,1390936.926142463227734 5452254.222979106940329,1391091.437595683382824 5453585.289285531267524))
+POLYGON ((1377944.717052487889305 5687847.00814144872129,1377454.911292998120189 5687268.62842885311693,1374269.838022420415655 5682292.490324959158897,1373249.59488930227235 5680355.545075224712491,1372383.751889910083264 5678287.206523188389838,1372198.182298757601529 5677714.196076676249504,1371857.989934893790632 5675822.903720771893859,1371053.929252895526588 5676879.063695115968585,1376001.524021201534197 5687225.176128564402461,1376836.420202152337879 5688546.442341073416173,1377393.128975607221946 5689163.60754800401628,1378073.402383846696466 5689427.394808987155557,1379310.161926558474079 5689604.103310342878103,1380609.037745134904981 5689427.394808987155557,1382897.209878391120583 5687974.044170440174639,1383237.40224225516431 5687665.57653837185353,1383391.9136954753194 5687136.84491257276386,1382804.480742559069768 5686960.185094306245446,1377944.717052487889305 5687847.00814144872129))
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/data/nl.wkt b/src/boost/libs/geometry/test/algorithms/buffer/data/nl.wkt
new file mode 100644
index 000000000..e9bd976db
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/data/nl.wkt
@@ -0,0 +1,8 @@
+POLYGON ((471871.966884626832325 6683515.683521211147308,470695.876464393688366 6681756.129975977353752,469211.542374156008009 6679924.978601523675025,464542.357652322971262 6674631.078279769048095,463243.59315323777264 6673494.345109832473099,459502.033748187706806 6670774.304660517722368,452204.484529234410729 6666030.372161027044058,439990.287360413349234 6659313.515823394991457,434547.988775020290632 6657783.034025833010674,433867.715366783668287 6657685.311832630075514,433063.65468478546245 6657783.034025833010674,423725.285241116478574 6659758.338574352674186,422581.143514745577704 6660350.880751021206379,422333.791606202081311 6660844.461689073592424,421993.599242338153999 6662622.453031159006059,421993.599242338153999 6663363.130126810632646,422612.090333183819894 6667314.244697011075914,422241.062470370030496 6667759.324870104901493,421096.80942450783914 6668303.522556710988283,408449.802075482031796 6673245.655735924839973,401646.845354124438018 6675273.665065255947411,400842.895991614612285 6675372.844085373915732,400255.351719210040756 6675224.699206517077982,392370.258227849320974 6672455.311684883199632,391968.283546594379004 6672009.975794731639326,391875.554410762328189 6671219.573235900141299,391937.336728153284639 6670527.121663697995245,392122.906319305824582 6669933.841785561293364,392339.311409408226609 6667957.501854715868831,392308.475910458364524 6665733.178529324010015,391937.336728153284639 6665289.631341196596622,387793.802641845482867 6664449.731981083750725,385814.7647345236619 6664202.740090588107705,384268.648326894966885 6664300.5401631873101,382846.319193030707538 6664646.406163938343525,382289.610419573145919 6664943.560305980034173,377186.502322628628463 6668957.888622742146254,376352.608017096004914 6669834.728738470934331,376197.985244384559337 6670428.001423852518201,375548.658654586179182 6676313.056885857135057,375243.086652359867003 6687692.866469252854586,379228.324422756850254 6689778.692146780900657,391782.713955441897269 6694388.125634397380054,393885.427817036863416 6694487.537080916576087,395215.139134563156404 6694091.147844122722745,405171.999669074953999 6689084.665672835893929,414263.128523688821588 6684478.40333267301321,415778.298112876422238 6683439.398042757064104,416396.677884233708028 6683192.009851422160864,419025.042381353967357 6682597.809754087589681,429909.63955213711597 6681508.792763692326844,430497.183824544539675 6681656.873437026515603,440979.806314075656701 6686955.330480101518333,467325.344922157470137 6687797.546342735178769,468129.294284664443694 6687698.216345063410699,468747.785375512961764 6687450.699095219373703,469211.542374156008009 6687054.651439971290529,469489.952420631831046 6686707.835750493220985,471871.966884626832325 6683515.683521211147308))
+POLYGON ((651775.618594615836628 6910615.531329743564129,641076.47969549393747 6910570.804219521582127,632170.920432032668032 6910671.440567950718105,630593.857205962878652 6910875.650077483616769,623605.55353243520949 6919587.805025231093168,623327.25480545067694 6920097.437898073345423,623265.361168571282178 6920811.565646826289594,622863.386487316340208 6935201.449006372131407,623079.791577418800443 6937551.666144162416458,623296.307987009524368 6938317.750503590330482,625522.697802874958143 6942304.410853908397257,629975.477434605592862 6949464.147566119208932,631026.890025150147267 6950948.190662933513522,631954.515341930207796 6951715.74194479547441,636564.032816697261296 6953092.028148499317467,636128.996246676309966 6953506.858369459398091,629109.634435216430575 6956271.529448029585183,628491.254663859144785 6956323.702235525473952,622832.439668875304051 6954991.835633082315326,622152.166260635829531 6953865.314060490578413,621904.814352095127106 6953200.386877841316164,621564.733307722490281 6952739.135313027538359,620575.103034568834119 6951971.670147938653827,619307.396673416020349 6951766.41102575045079,603197.017326830653474 6955606.402309623546898,602516.632599102682434 6955862.270618843846023,600908.733874083030969 6956886.194421971216798,598249.42255852452945 6959396.044058399274945,597630.931467676069587 6960421.895862255245447,597043.498514759819955 6962162.935771110467613,597321.79724174446892 6962880.823850900866091,598002.070649981033057 6963905.646472387947142,600414.030056998948567 6965700.786434393376112,601558.171783372759819 6966161.309305724687874,602547.579417543835007 6966879.556432018056512,602640.308553373091854 6967700.700297676026821,603197.017326830653474 6973651.159239649772644,603413.422416932997294 6976422.804836014285684,602392.956644832389429 6988342.651874950155616,601990.981963577447459 6989473.858503223396838,598404.045331235975027 6996058.252481586299837,597136.22765059187077 6996007.301794677041471,594353.35170025145635 6995132.482933780178428,590333.382248722715303 6992765.469048694707453,588818.212659535231069 6991736.752791685052216,585880.602616992080584 6989524.767496313899755,578673.222185580991209 6982131.554157050326467,567760.23854464374017 6973394.536373405717313,566801.666409425321035 6961906.681384002789855,570636.066269798669964 6950231.556555071845651,578088.238261463469826 6937704.509299132972956,578552.106579597690143 6938062.442223727703094,579108.70403356407769 6938267.350385984405875,580654.70912170142401 6938267.350385984405875,582293.665984650608152 6938010.57222749479115,587581.341797332162969 6937040.922623857855797,588447.184796721325256 6936172.347171620465815,588941.888613808318041 6935201.449006372131407,589158.405023399158381 6934640.477947434410453,589498.486067774705589 6933414.605105147697031,590457.058202995918691 6928972.662642612121999,590240.541793402284384 6928207.287246040068567,585017.876563346129842 6926152.746073319576681,583499.590028415317647 6920454.585592744871974,582231.77234777121339 6919180.415641265921295,578490.21294271829538 6916274.604389509186149,575274.304173190612346 6914644.192939248867333,572986.132039934396744 6913727.79363471083343,572398.587767526973039 6913523.511554286815226,571625.473903969861567 6913523.511554286815226,571409.068813867401332 6914134.90628450922668,568440.51195288321469 6917090.576447782106698,567883.914498916943558 6917447.406852015294135,562812.755095828906633 6917192.578789404593408,562163.317186542088166 6917038.658487668260932,561142.962733929976821 6916428.510036098770797,560308.066552979056723 6915612.605292757041752,559813.362735894857906 6914237.054455798119307,559720.522280574426986 6912963.871302771382034,559782.304597962531261 6912250.441571875475347,561328.532325082458556 6904563.504942306317389,561915.965277998708189 6902783.287589466199279,564142.46641335519962 6898612.494178399443626,566306.96259233832825 6894292.940797603689134,566832.613227863563225 6892413.307839044369757,566925.34236369561404 6891092.01116908621043,566647.154956202255562 6878858.980998607352376,565286.496820237720385 6875715.472913923673332,561759.227434962289408 6873256.105032159946859,559751.469099012669176 6868368.06827775016427,559102.031189725850709 6868266.50125537533313,558421.757781489286572 6868368.06827775016427,547846.51747561735101 6870242.091181426309049,546393.130203820648603 6870647.189855287782848,542741.182988856686279 6875623.668803266249597,537204.374155780300498 6877465.974288232624531,524666.125949261826463 6880262.455467365682125,519691.035266728780698 6884805.796635908074677,509843.267833192367107 6885861.807772698812187,509781.374196313030552 6886572.898058867082,510801.839968413638417 6889111.113103160634637,511883.976738413970452 6893581.167424697428942,514543.399373466556426 6908737.390477580018342,515625.647462958120741 6915612.605292757041752,516089.404461603960954 6918925.716031574644148,516058.568962654098868 6924125.539233602583408,518099.389187366934493 6937193.756036232225597,526541.191452185274102 6973394.536373405717313,527004.948450828203931 6974780.286891556344926,527808.897813338087872 6975703.699679739773273,528736.634449609438889 6976063.336574338376522,531426.892583609092981 6976475.109277882613242,533560.553263645153493 6976576.57717508263886,533900.634308017906733 6976422.804836014285684,535384.85707876435481 6974420.892511567100883,535446.639396155369468 6972368.496757010929286,535168.45198866201099 6971752.6406673733145,534982.88239750941284 6970983.34901758749038,535106.558351782616228 6969598.25660895742476,535292.127942935097963 6968982.613911346532404,535817.778578460332938 6967904.891698936931789,537271.054530765744857 6966726.155135438777506,538353.413939748541452 6966059.97354016173631,541290.912662803195417 6964520.898361743427813,542404.107570735854097 6964008.43121213465929,544074.011252123280428 6963804.339287329465151,545991.155522565823048 6964161.780380129814148,549083.388337823096663 6964982.645179284736514,550258.365563143976033 6965444.603228171356022,566152.339819626882672 6974729.471795010380447,568069.484090069425292 6976166.277760792523623,576665.797808107919991 6983562.477738646790385,577103.172087433398701 6984021.071227142587304,581582.445757972891442 6989010.694141771644354,584056.187482381705195 6991686.014863005839288,584952.977300211903639 6992508.231254843063653,590178.759476011269726 6996471.057679757475853,593023.640382725163363 6997705.153901337645948,596765.199787778081372 6998632.704716780222952,598744.237695099902339 6999970.569348660297692,599579.022556559648365 7000898.19824477378279,599857.432603032561019 7001516.306643777526915,601403.437691170023754 7005482.31315781455487,602362.121145882527344 7008987.081130541861057,603011.447735678055324 7013215.818960219621658,602795.042645575711504 7014505.064065941609442,602825.878144525573589 7015278.748407906852663,605856.217322900774889 7022297.152813855558634,607649.796958561288193 7024931.230772349983454,608484.581820020917803 7025809.32644284516573,620420.591581348679028 7036459.062683599069715,621843.032034704228863 7037699.555328891612589,623296.307987009524368 7038735.527002183720469,655764.52990821225103 7054013.049992605112493,665876.124534929520451 7057124.955283883027732,678213.997658018139191 7059354.494095638394356,687119.556921482319012 7059873.128965702839196,688325.369645752944052 7059925.797418337315321,688765.749551333254203 7059653.680838636122644,689593.298645888222381 7059199.115663656964898,700972.599633758421987 7057694.604557750746608,718288.90302410570439 7062053.55874643381685,745562.178268458810635 7068905.082907687872648,748190.542765579069965 7069425.837881463579834,750509.773036764934659 7069632.653463661670685,754467.737531920196488 7068385.857831250876188,763095.109387891017832 7064699.345445416867733,763960.952387280180119 7064284.481631927192211,764672.061294466722757 7063661.479123589582741,764919.413203010219149 7063297.865574918687344,764857.519566130824387 7061481.915560700930655,764950.360021451255307 7060340.433603593148291,768290.056064740521833 7048053.600529603660107,772526.319286877522245 7043288.733632164075971,773144.699058234808035 7042668.679420317523181,787956.4252252234146 7031442.636537296697497,789100.566951597225852 7030667.566429600119591,790491.94926702324301 7030098.175257831811905,800417.974302588030696 7027566.180380370467901,801624.009665841120295 7027462.573641837574542,802087.766664487076923 7027669.602455112151802,802431.409932565060444 7028037.170917252078652,802304.283074077800848 7015639.987778211012483,802798.986891164793633 6985926.763937522657216,802644.47543794172816 6983356.405981163494289,801531.169210520689376 6977552.50908828061074,801252.981803027330898 6976525.750653848983347,800758.166666451958008 6975089.064843827858567,799242.997077264357358 6970829.684263568371534,794048.050400414853357 6962471.04226852580905,789373.967620987328701 6952886.740292699076235,787801.802452512085438 6950589.865589384920895,786997.853090002201498 6948850.052315478213131,786688.607544579426758 6945934.755589783191681,786533.984771867981181 6943479.739347828552127,786441.255636038724333 6940310.832676274701953,786503.037953426828608 6937296.198354857042432,786317.579681765520945 6931626.505381292663515,785791.817726749111898 6921066.508683867752552,785389.843045494169928 6918873.786195711232722,784987.868364239227958 6917345.21780888363719,784585.893682987196371 6916478.773067839443684,784060.243047459167428 6915765.214261484332383,783225.235547019867226 6915357.83548819553107,782668.749412544770166 6915307.579476804472506,782019.422822746331804 6915307.579476804472506,770361.823107894393615 6916478.773067839443684,769990.683925589430146 6916784.026854607276618,769557.762425893335603 6917600.050719144754112,768722.866244945325889 6918619.096319805830717,768351.838382131536491 6918873.786195711232722,767516.942201180616394 6919078.20452397223562,754931.605850057327189 6919281.343515948392451,753416.436260869726539 6918925.716031574644148,752148.618580225622281 6918364.231043037958443,748159.707266629207879 6914746.347592758946121,747947.087039214675315 6914259.428196498192847,748747.140219545457512 6913218.565124199725688,749118.279401850420982 6912300.861791249364614,752612.486898359842598 6903342.218692814931273,752457.864125648513436 6902885.291445909999311,752086.724943343433551 6902631.1083012111485,748345.276857781806029 6901918.595977255143225,744758.22890594904311 6900545.388899485580623,744603.71745272888802 6900036.995631285011768,746118.775722425198182 6889314.775330664590001,746458.968086289125495 6888451.348726056516171,751777.590717411832884 6884237.738637372851372,753014.461579614784569 6883577.095073698088527,773237.53951355535537 6879062.383805339224637,773763.190149083384313 6879164.087136859074235,774134.21801189717371 6879417.529398015700281,775432.98251098243054 6880635.186092871241271,776329.661009321454912 6881649.553733525797725,777442.967236745287664 6883730.375623905099928,777844.830598509055562 6883932.440025738440454,778215.969780814019032 6883678.85549449827522,785791.817726749111898 6872521.743362235836685,786132.01009061303921 6871610.133388453163207,786533.984771867981181 6870190.657328464090824,787152.475862716441043 6865278.779280195012689,786997.853090002201498 6864164.956917324103415,785705.656440874328837 6861406.672263115644455,783472.698775054537691 6856877.968839676119387,782823.372185256099328 6854348.619862906634808,782452.344322442309931 6852175.466523764654994,782359.503867119085044 6850961.922468082979321,782359.503867119085044 6850355.309895443730056,782730.531729935668409 6848889.730106042698026,785146.832597091794014 6843230.573374897241592,783936.567093188758008 6842122.70097856875509,775309.306556709227152 6834603.368340478278697,768568.243472233880311 6831475.797690022736788,768228.162427858333103 6831173.943298545666039,765599.797930738073774 6827543.680441894568503,765445.175158026628196 6827039.87337779533118,765290.552385315182619 6825326.583949914202094,764981.306839892407879 6823714.664112947881222,764610.167657587327994 6822858.23583247512579,763713.489159248303622 6821902.363806513138115,762816.810660906368867 6821549.742302386090159,761703.615752973710187 6821448.763039967976511,752456.083013794384897 6820866.479953240603209,749891.281945919152349 6813998.452031110413373,749025.550266018370166 6806505.417759709991515,756354.046303412760608 6801983.881148537620902,757034.31971164944116 6801430.485762349329889,759879.200618363334797 6798066.077498474158347,760312.122118059312925 6796056.922751138918102,760404.739934397279285 6794952.606078728102148,760188.334844297729433 6793899.38985523302108,755766.502031005336903 6787127.314730651676655,754405.955214532092214 6785923.677891809493303,751004.476853851811029 6783165.807122839614749,748561.681947884149849 6781712.175924683921039,748128.760448188171722 6781662.745861535891891,746056.993405034183525 6782715.635300729423761,745129.256768762832507 6783666.889495360665023,744912.962998151662759 6784068.932611936703324,744232.578270423808135 6784619.699097042903304,743181.165679882047698 6784570.07083138730377,734121.094963197712786 6781362.744317370466888,726637.864833603496663 6777454.89918074849993,719433.044750479515642 6773698.881650594994426,707002.331172067555599 6772697.979166365228593,688201.693691482651047 6781211.214384685270488,681677.147016598028131 6779909.436419078148901,668257.025804015109316 6769444.36770489718765,663742.463854893459938 6765443.416698913089931,663989.815763436956331 6765042.475906951352954,665845.066396997193806 6761392.431272137910128,666216.205579302273691 6760542.567708348855376,666432.610669404617511 6758093.88185746781528,666339.881533572566696 6757544.913390408270061,665783.284079606295563 6756895.984118143096566,662579.509134577703662 6754603.384045966900885,671132.853529167245142 6747259.51691164355725,678275.779975409037434 6729414.292051946744323,678399.455929682240821 6728916.545924234203994,682543.101335478480905 6723193.129806969314814,683130.534288394614123 6722595.828769395127892,685573.329194362391718 6720655.932496306486428,690428.194826839142479 6713248.359249284490943,691015.739099246566184 6712006.607999907806516,692623.637824263423681 6704657.283376707695425,692654.473323213285767 6704110.657425539568067,692716.366960095474496 6686063.100847483612597,692654.473323213285767 6685518.967087414115667,683841.754515072447248 6673691.236981774680316,676698.716749342158437 6664300.5401631873101,676420.418022357509471 6663905.790672333911061,675956.661023714463226 6659954.899998827837408,675894.767386832274497 6659412.501455130986869,675863.820568391238339 6658820.027227970771492,676234.848431205027737 6654970.700426151044667,676451.364840798662044 6653392.195125944912434,676760.610386221436784 6652454.613303555175662,677224.478704358567484 6651714.922815941274166,677966.645749477436766 6651221.892127034254372,678770.595111984410323 6644517.349501308053732,668257.025804015109316 6636194.175751654431224,657929.02608719537966 6632355.287225363776088,657557.998224381590262 6632602.737515078857541,657063.183087806217372 6632453.947612538002431,653105.218592650955543 6629797.616577193140984,652857.755364619079046 6629453.041968816891313,652795.973047228064388 6629011.455181543715298,653383.517319635488093 6624634.586756318807602,655857.259044044301845 6616478.640488278120756,656815.83117926272098 6616331.556941458024085,657681.67417865479365 6616675.580997887998819,660402.879131095483899 6618148.541728066280484,661763.425947571638972 6618639.587373713031411,662227.294265705859289 6618639.587373713031411,669865.035848523140885 6617804.455944258719683,670761.714346864959225 6617461.975834362208843,671070.95989228785038 6617166.538544823415577,676853.339522053604014 6606419.037251188419759,676977.015476323897019 6606025.652477322146297,677348.154658628976904 6598966.114496985450387,677286.372341237962246 6598427.734061955474317,675894.767386832274497 6595537.452529109083116,675461.957206627586856 6594753.153016392141581,675121.764842763543129 6594508.427381386049092,674688.843343067565002 6594361.736543165519834,674194.139525983482599 6594508.427381386049092,673668.377570966957137 6595145.998728960752487,673049.997799609671347 6595145.998728960752487,670823.607983744353987 6594410.221807206049562,669462.949847776908427 6593332.858471809886396,669401.167530388804153 6592794.846682395786047,668813.623257981380448 6586382.312027862295508,669230.292112019611523 6578469.565867424942553,659722.605722858803347 6578264.212123840115964,656664.547991276951507 6577873.403077592141926,653507.193273905781098 6579095.160888321697712,645374.747874004417099 6580611.216105410829186,639252.064560883562081 6578998.546908744610846,638664.631607967312448 6578850.900411964394152,634366.363429456832819 6578558.078957350924611,633620.634160632733256 6579048.173620061948895,634675.608974879723974 6581490.810956662520766,635140.033890470163897 6582813.812666072510183,635077.694975625840016 6583496.258340136148036,634737.502611761912704 6587019.253929817117751,633846.501407453091815 6587544.732879367657006,632696.682387049077079 6587997.661707130260766,629573.502753353444859 6589955.002541372552514,629140.692573148757219 6590346.209386374801397,627934.657209892757237 6592991.220433191396296,627625.411664469866082 6594215.048321127891541,627563.629347078967839 6594851.362685392610729,627718.140800301916897 6596370.323665414005518,627903.710391454515047 6597104.865034353919327,628955.122981996159069 6599554.280731073580682,629789.907843455905095 6600142.489045863039792,640983.750559661886655 6614221.05678747035563,641664.023967901361175 6619524.675407296046615,643086.46442125691101 6625864.554084338247776,647662.920007260749117 6641660.802050296217203,651033.340230008587241 6645996.561992342583835,651373.532593872514553 6646489.455612326040864,651787.975058094598353 6647575.061716639436781,651775.618594615836628 6648066.630606294609606,651126.737282782443799 6649002.29017847776413,649487.335141871124506 6650680.249494910240173,640550.940379459992982 6654970.700426151044667,628367.578709588735364 6657388.598869441077113,619864.105446873581968 6660428.195207690820098,618688.905582567444071 6668105.337185661308467,618194.201765483361669 6669143.817844766192138,617854.120721107814461 6669637.929732556454837,614576.318314700736664 6672949.623776196502149,613463.123406768077984 6673543.122581887058914,612751.903180090361275 6673691.236981774680316,611947.953817580477335 6673839.176038899458945,610680.136136936373077 6673642.280603107064962,609535.99441056267824 6672208.255844502709806,608670.151411173515953 6671466.777171560563147,602392.956644832389429 6668648.312504703179002,601805.523691916139796 6668500.467356356792152,601125.250283676665276 6668401.371683558449149,593301.827790215727873 6667808.246031130664051,583199.917959198937751 6667820.342945166863501,583190.455802480923012 6675372.844085373915732,583035.721710278186947 6676015.489202303811908,582602.911530076293275 6676412.248521762900054,581458.65848421130795 6677005.998856753110886,578985.02807929366827 6678044.008002767339349,578242.861034174798988 6678094.415716417133808,577655.316761767375283 6677944.796556040644646,575305.362311122938991 6677103.774120018817484,573851.975039326352999 6677350.978000446222723,572614.992857629316859 6677845.764428257010877,572182.071357936132699 6678242.434510445222259,565843.094274204107933 6689827.745338121429086,565348.279137625941075 6690868.991159215569496,565193.76768440566957 6691512.678448060527444,565131.874047526274808 6692158.022346547804773,565255.550001796684228 6692950.275396405719221,565503.013229828560725 6693595.554530601017177,566152.339819626882672 6694635.853357532992959,566554.314500881824642 6695082.603269991464913,567852.967680475790985 6697214.060236595571041,568100.430908510577865 6697809.325327101163566,568224.10686278087087 6698603.555868846364319,567296.370226509519853 6700587.32728680036962,565533.84872877842281 6704309.718664849177003,564760.846184709691443 6705153.549264686182141,561204.856370812165551 6707834.658026187680662,560555.418461522553116 6707934.233513563871384,559225.818463487434201 6706841.830017799511552,558483.651418368564919 6705848.944184473715723,558298.081827216083184 6705153.549264686182141,558019.783100234344602 6702026.524319423362613,557648.755237420555204 6700637.695787316188216,556597.453966367174871 6699099.453493699431419,555422.365421555237845 6697809.325327101163566,551649.859198061167262 6694140.226961788721383,549949.120017721084878 6692603.030695979483426,549485.251699586748146 6692255.979198729619384,548804.978291347273625 6692107.527743558399379,540239.611391749931499 6694934.100385319441557,537982.274757443461567 6697709.87339807394892,539311.986074969754554 6703317.319796664640307,539466.49752819002606 6706195.323383280076087,539404.71521080180537 6706841.830017799511552,537209.2722133747302 6708827.606974888592958,535106.558351782616228 6710119.479814188554883,533034.791308628744446 6710764.867113076150417,532230.841946118860506 6710864.47840621881187,530901.130628592567518 6710715.687839202582836,529571.530630557565019 6709622.911521073430777,523819.98649974167347 6704756.820061821490526,523046.872636184561998 6703862.463100403547287,519985.69795885955682 6700239.757390116341412,519707.399231874966063 6699644.314919441007078,519954.751140418462455 6698355.529079964384437,520202.103048961958848 6697859.676676279865205,520016.533457809418906 6697310.649490186013281,517697.414506111992523 6696520.650814447551966,517048.087916316464543 6696470.30772893037647,506163.490745530463755 6696966.075689535588026,505606.893291564134415 6697115.865310021676123,505081.24265603889944 6698156.61311623826623,504864.726246445265133 6699446.796214780770242,504864.726246445265133 6700190.820166668854654,505173.97179186809808 6701729.268326397053897,505761.516064275521785 6702870.118661225773394,505946.974335936829448 6703565.318852389231324,506503.571789903158788 6705749.394165238365531,506596.412245226441883 6706543.147232828661799,506441.789472515054513 6707139.09370874427259,506008.867972819018178 6707535.938862201757729,505359.430063532199711 6707635.510700548067689,499453.374479493359104 6706791.244431678205729,498927.723843968124129 6706543.147232828661799,489527.349443928571418 6701778.393419239670038,489125.374762676481623 6701331.455293647013605,489434.731627590605058 6695379.438650756143034,489960.270943624607753 6694288.715398989617825,491784.686078234983142 6692058.639273658394814,493856.453121388913132 6688589.376254479400814,494011.187213591590989 6687945.919433905743062,493330.802485863678157 6686014.070270576514304,492928.827804608794395 6685567.816408730112016,491877.526533558324445 6685072.74028184171766,490609.708852911368012 6684825.302607020363212,488476.048172878101468 6684776.27946191187948,485229.303904400556348 6685221.063865593634546,483899.592586877115536 6685667.120491985231638,476411.130441211920697 6688181.324582676403224,473371.440425609995145 6687922.735960659570992,467820.048739241552539 6693248.460823108442128,451524.099801503645722 6696966.075689535588026,437361.922863293089904 6698603.555868846364319,437238.246909022738691 6697809.325327101163566,436990.783680988010019 6697164.962625569663942,434888.06981939583784 6692355.364674746990204,434115.06727532716468 6691463.793541227467358,426322.702919798495714 6690521.834996420890093,425580.535874679626431 6690572.141398129984736,397750.663176360132638 6700290.302348867058754,394442.025271003250964 6702075.472559181042016,393359.777181508834474 6702721.652592265978456,384330.541963777155615 6713995.075210301205516,383279.129373235453386 6715386.002728635445237,383000.830646250862628 6715882.922369535081089,383031.777464691956993 6716628.44815225340426,383650.268555540533271 6717722.164530069567263,384423.271099609206431 6718618.04394091386348,385722.035598694405053 6719761.082120044156909,388010.207731947884895 6721552.13471569865942,390824.141820220625959 6723541.50101828482002,392277.529092017270159 6724536.366483209654689,395771.625269038253464 6726726.071965947747231,397286.906177714234218 6727622.942697529681027,398554.612538869958371 6727871.862005602568388,410980.316740196140017 6728175.987576616927981,426662.895283662423026 6729315.887540238909423,427157.599100746563636 6729315.887540238909423,430682.753415697079618 6728369.544241077266634,431115.563595901825465 6727970.249058127403259,433403.847048649389762 6725333.206342491321266,433929.609003665857017 6724287.728284727782011,434547.988775020290632 6722546.757108798250556,434455.259639191091992 6721900.435720023699105,434053.284957936150022 6721452.392647816799581,430280.778734442195855 6718567.38519386947155,427860.247726633329876 6719886.226348519325256,425302.237147695035674 6719015.448576989583671,430344.453483175602742 6717135.645112561993301,432625.055891059164423 6717920.842569227330387,436527.026682345021982 6719015.448576989583671,437330.976044851995539 6718866.509072133339942,437980.302634650375694 6718618.04394091386348,446020.018898722541053 6714740.249320256523788,449761.578303775459062 6712503.321566273458302,451493.264302553783637 6711212.322722436860204,452791.917482150602154 6709324.126813971437514,452977.487073303083889 6708728.020573273301125,454399.927526658633724 6704706.426112459041178,455946.043934287270531 6701530.270068481564522,457646.783114624558948 6700140.454425781965256,459254.681839644210413 6699198.922365704551339,461512.018473950622138 6698751.946991816163063,462223.238700628397055 6698703.018693890422583,471778.124553888104856 6698553.021361322142184,472365.668826292734593 6698703.018693890422583,473416.970097345998511 6699247.853638328611851,474697.366880448476877 6700205.822787902317941,476138.17504978668876 6700438.724161761812866,476663.825685311923735 6700686.814305482432246,477127.694003449054435 6701034.224633770994842,477467.775047821749467 6701579.393962631002069,477715.23827585647814 6702174.977733274921775,477962.590184397122357 6704557.747906730510294,477807.967411685734987 6705898.094103609211743,477653.34463897428941 6706493.993424595333636,476972.959911246376578 6708131.957925477996469,474994.033323412935715 6711708.98787375818938,474530.165005278657191 6712106.055609175004065,470840.480482936603948 6713548.719037894159555,469242.600512088334654 6713150.149903920479119,467974.671511952998117 6712901.680179470218718,454492.656662487832364 6715734.04013223387301,444783.148036519531161 6724436.587850103154778,444164.76826516224537 6725382.473957089707255,444257.49740099144401 6726030.326040482148528,444628.525263805291615 6726477.366876103915274,445618.044217467599083 6727125.30611277744174,449947.147894927940797 6729065.490169101394713,452204.484529234410729 6729962.618760659359396,454090.681981235800777 6730360.577594690024853,464171.329789509123657 6729116.214282694272697,466459.501922765455674 6728269.718608728609979,467077.993013613973744 6727970.249058127403259,468377.870707605790813 6726235.478004965931177,468500.433466969465371 6726328.290810784325004,468593.162602801516186 6727125.30611277744174,468191.076602055400144 6728269.718608728609979,467665.537286021397449 6729315.887540238909423,467139.775331004930194 6730360.577594690024853,466001.978815605980344 6731175.91620625089854,463738.408289815939497 6730858.59133658092469,462408.80829178087879 6730709.434995472431183,460831.745065711147618 6730809.290560748428106,460275.147611744818278 6731007.571132538840175,457894.135023168055341 6733547.997870199382305,457584.889477745222393 6734743.893964459188282,457093.859203854750376 6737262.163697628304362,456749.993296794302296 6736687.331080910749733,455976.879433237132616 6735790.71636797580868,455142.094571777503006 6734993.031220311298966,453750.600936860253569 6733947.566869896836579,452668.241527877398767 6733448.108686688356102,447473.406170519127045 6731655.871175682172179,446267.370807266037446 6731307.152481587603688,443051.573357229586691 6730758.735166290774941,441660.079722312337253 6730709.434995472431183,434578.935593461384997 6734145.923941204324365,434053.284957936150022 6734445.620878846384585,418777.690472810470965 6741572.370338529348373,413290.975410590937827 6741514.926574288867414,412376.819752196199261 6741921.708969135768712,411480.141253857174888 6742720.253640330396593,410521.569118635903578 6744165.481415218673646,410335.999527483421843 6744764.18873658683151,410274.105890604027081 6745413.586426031775773,410490.622300197661389 6747807.790705696679652,410676.191891347349156 6748506.839547562412918,411170.895708434341941 6749805.027319742366672,412253.143797925906256 6751202.091095076873899,413459.179161181848031 6752151.095711477100849,414510.48043223231798 6752650.266304742544889,420540.323290032742079 6754348.251149994321167,421220.596698269422632 6754448.397497565485537,424405.558649356011301 6754098.519945784471929,425781.467555560055189 6753661.104309195652604,431765.001505188643932 6753949.116395185701549,432507.168550307513215 6753949.116395185701549,440361.315223227138631 6752500.709635380655527,441783.755676585482433 6752100.227690063416958,442587.705039092455991 6751251.51568235643208,445772.66699017904466 6747858.452208904549479,452730.135164759645704 6742370.880695099011064,456873.669251067447476 6739229.532591589726508,457832.35270577709889 6740824.735579328611493,458203.380568590888288 6741273.846702259965241,459131.005885373859201 6741971.077149564400315,462625.213381883280817 6743168.212657215073705,463952.253031628497411 6743470.935613225214183,459440.251430796692148 6747259.51691164355725,451926.185802249819972 6755297.623429431580007,451585.993438385834452 6756495.285398138687015,448710.277032722136937 6761642.206949398852885,448370.195988349441905 6762092.65038232319057,447473.406170519127045 6762893.180459219031036,445865.507445502327755 6763842.112430988810956,444504.849309534940403 6764292.497952505014837,443113.466994108923245 6764542.542910403572023,440361.315223227138631 6764343.262396307662129,431272.746716903173365 6761590.019753465428948,430373.50787027424667 6765343.134634239599109,430280.778734442195855 6765992.919597920030355,430311.61423339205794 6766743.054722192697227,430558.966141935496125 6767392.95179845765233,432012.353413732140325 6768343.670853907242417,443422.601220043376088 6772396.867568836547434,444721.36571912857471 6772647.162421485409141,446020.018898722541053 6772447.682745578698814,447009.53785238484852 6771746.569530131295323,448339.137850419909228 6770545.213911932893097,452080.697255469975062 6774900.704509798437357,447133.213806655199733 6794250.988753986544907,446607.563171129964758 6796108.067231423221529,446638.398670079826843 6796811.291415024548769,446947.64421550265979 6797362.744317251257598,447628.028943230572622 6797965.391000369563699,449606.955531064013485 6797864.705754549242556,450225.446621909679379 6797613.811523754149675,451864.292165370425209 6797362.744317251257598,454183.522436556231696 6797212.541525310836732,456348.018615539360326 6797262.066566329449415,457646.783114624558948 6797513.130650509148836,459254.681839644210413 6798266.188852529972792,460646.175474558607675 6799370.957642260938883,461913.993155205564108 6800576.594967762008309,485600.331767214403953 6831223.676799517124891,486311.440674403740559 6832232.026064394041896,489805.759490404394455 6837427.337965262122452,490795.278444063907955 6839043.451185440644622,492093.931623660668265 6841213.068797083571553,493021.55694044084521 6842929.733256683684886,494444.108713287569117 6845909.181217420846224,500324.783453424344771 6859508.11005649343133,502916.635157564480323 6865633.317320908419788,505266.700927700148895 6871356.936847810633481,505699.62242739618523 6872724.986073872074485,506627.247744176303968 6876374.193557461723685,508513.55651566607412 6881751.289774001576006,509503.075469328439794 6883375.039597983472049,510336.524496898986399 6884004.972518337890506,518521.512696455756668 6882474.620797081850469,523964.033920828427654 6877745.286580849438906,539370.985405091196299 6874637.068852295167744,543904.805626119719818 6871020.022674607113004,546231.8282616607612 6868062.641690432094038,551298.86884359002579 6867874.103537785820663,555700.664148536976427 6865683.446066621690989,570728.795405627926812 6860065.317734476178885,582942.992574449046515 6856826.438155461102724,584334.486209363443777 6856726.473209341056645,584952.977300211903639 6856473.744048312306404,588818.212659535231069 6854855.409194731153548,589838.678431638632901 6854147.114423211663961,590271.599931334611028 6853793.081382708624005,593382.089143077726476 6850152.812618617899716,594198.617608048836701 6850102.780382162891328,597105.392151642008685 6849295.030145579017699,598373.209832286112942 6848941.028177227824926,599331.670648016151972 6848183.232419079169631,601960.035145136411302 6845807.896826192736626,603073.341372560244054 6845302.948558202013373,603846.343916628975421 6845201.671778611838818,604526.617324865655974 6845302.948558202013373,614916.510678564663976 6848030.626860643737018,615998.647448567906395 6848587.223648309707642,617173.847312871133909 6849850.07684785220772,618163.254947042209096 6851518.721625553444028,619214.556218092679046 6854095.783219169825315,620049.563718534889631 6856927.861052793450654,620915.295398432761431 6858699.41688181553036,621719.244760942645371 6859609.566708965227008,626141.188893723418005 6864417.927434918470681,626666.83952924865298 6864822.550974307581782,631243.295115252491087 6867557.026598610915244,633127.934094382217154 6868665.665205390192568,634830.231747591169551 6869634.02544180303812,636994.727926577092148 6870647.189855287782848,638137.979097023839131 6870968.583851937204599,638357.055854904465377 6871065.989560154266655,639313.958197762956843 6871508.525462773628533,640798.292288000578992 6872420.123930553905666,641942.545333865564317 6873123.093938153237104,642777.218875834019855 6873738.357098407112062,646795.407215508748777 6877538.448507283814251,647298.348674910143018 6878089.967661938630044,647839.138761183596216 6878718.208817130886018,651218.909821161068976 6883984.144481226801872,651497.319867634098046 6884593.295492532663047,654342.089454856701195 6892767.763182668946683,653714.247526781400666 6895324.58443112205714,650940.722413667826913 6903495.87662121001631,651064.398367938119918 6907057.022029438056052,651775.618594615836628 6910615.531329743564129))
+POLYGON ((624718.74844036786817 6867253.636315573006868,620915.295398432761431 6867202.22154681943357,620389.644762907526456 6866949.163567860610783,619492.966264568502083 6866139.540842087939382,617390.252402973477729 6864013.324219234287739,617266.465129212010652 6863202.720901956781745,617328.358766091288999 6862545.076839198358357,618843.528355278889649 6859255.293650598265231,618905.421992161078379 6858597.971687586046755,616586.191720972419716 6852782.216056739911437,616060.541085447184741 6851518.721625553444028,615565.837268363102339 6851164.622024189680815,614143.396815004758537 6850557.994202722795308,604310.212234763312154 6848030.626860643737018,602887.771781407762319 6848030.626860643737018,601619.954100763658062 6848535.74592808727175,600846.840237203752622 6849446.204271980561316,597754.60742194915656 6852276.64893630053848,596425.118743402534164 6853490.390911912545562,593394.66824553895276 6856220.840738679282367,590611.680975707364269 6857787.912969232536852,587612.177296282025054 6859255.293650598265231,584272.592572484049015 6860469.904891512356699,580190.952123058377765 6861836.105926984921098,578057.40276251360774 6861734.621235017664731,577438.911671665031463 6861583.216467522084713,576356.66358217340894 6861025.721633481793106,575057.899083088268526 6860824.231357043609023,574501.190309630706906 6860975.804043037816882,573975.650993596646003 6861330.152757038362324,573511.782675462425686 6861734.621235017664731,572831.509267222951166 6862696.681903212331235,572398.587767526973039 6863810.301253801211715,571687.367540849139914 6869177.732720479369164,571934.719449392636307 6869634.02544180303812,575320.501761871273629 6871644.975898801349103,576758.526943937176839 6873788.536328140646219,579201.433169396128505 6875462.147214124910533,589591.326523095136508 6882207.017270667478442,599115.265557913808152 6888197.621671507135034,602583.090335105662234 6889820.296779514290392,606821.691266550100408 6892769.043493457138538,607198.619062376674265 6895471.136501003988087,607464.227367408806458 6896223.515795066952705,609814.29313754721079 6899985.37089054659009,620420.591581348679028 6907210.751049702987075,628243.90275531844236 6909551.313650550320745,648683.385779361356981 6903952.838604759424925,649147.142778007197194 6903546.241897705942392,650043.932595837512054 6902223.11355740018189,651837.512231498025358 6899122.261683489196002,652486.727501805173233 6897443.720290059223771,652658.159517624881119 6895108.145999730564654,651837.512231498025358 6889669.094085128046572,650940.722413667826913 6887841.905434045009315,649116.307279057335109 6884339.507416386157274,645467.477009833673947 6878351.95706673245877,645127.395965460920706 6877794.760553145781159,644168.712510748533532 6877084.445710801519454,641633.077149460325018 6875563.80505657941103,640550.940379459992982 6875056.806178122758865,636840.216473356937058 6875158.458901119418442,633840.824113422888331 6874245.272934719920158,627718.140800301916897 6870698.626624670810997,626110.242075282381848 6869076.155485482886434,624718.74844036786817 6867253.636315573006868))
+POLYGON ((529169.555949305417016 6980891.171579005196691,527499.652267915196717 6981095.885235757566988,526293.728224150487222 6981712.461949429474771,525489.778861640719697 6982585.811323672533035,524964.128226115484722 6983716.202593334950507,524129.232045167358592 6986800.759420288726687,523943.66245401481865 6989627.882342561148107,524098.285226726264227 6991222.536963094957173,524747.611816521850415 6993382.947670524939895,525613.454815913806669 6995235.670258097350597,528025.414222931722179 6998940.923794481903315,540270.558210191084072 7016620.709887278266251,540981.778436868800782 7017445.501473945565522,542002.244208972202614 7017910.506082023493946,543146.385935343103483 7017548.977978130802512,543610.142933989060111 7017136.566155183129013,543888.441660973592661 7016671.792471358552575,546826.051703516743146 7009295.700681791640818,546826.051703516743146 7001258.971952266991138,546455.023840702837333 6999765.371052864938974,545836.532749854377471 6998580.440245276317,542867.975888870190829 6993536.861748124472797,540858.102482598507777 6990245.118266388773918,534859.206443239119835 6984282.290747075341642,532941.950853305403143 6982791.863197959028184,530406.426811508485116 6981198.891291120089591,529169.555949305417016 6980891.171579005196691))
+POLYGON ((544321.363160666776821 7022091.564807342365384,543579.196115547907539 7022297.152813855558634,543239.003751683980227 7022762.254849835298955,543362.679705954273231 7023640.297281604260206,543610.142933989060111 7024260.172107204794884,544692.391023480566218 7025809.32644284516573,546826.051703516743146 7027979.132663373835385,552670.324970161775127 7033251.73728009313345,555422.365421555237845 7035579.791402135044336,556844.805874910671264 7036665.208321936428547,557896.107145961141214 7037286.098368016071618,562689.079141558613628 7039562.613101799041033,565441.119592949165963 7040701.114828187972307,567049.01831796602346 7040546.286905073560774,567698.456227255635895 7040287.50183436833322,568255.053681221907027 7039925.14235998224467,568440.51195288321469 7039303.86003131698817,568162.324545389856212 7038682.812492519617081,551835.428789213648997 7027102.099661372601986,544321.363160666776821 7022091.564807342365384))
+POLYGON ((578923.13444241147954 7047898.629384644329548,577377.018034785636701 7047949.726636526174843,576078.253535700496286 7048467.617682208307087,575367.144628513953649 7049452.393762632273138,575212.521855799714103 7050074.28301886189729,575150.628218920319341 7050800.130723227746785,575397.980127461021766 7052458.393901550211012,575645.443355495692231 7053131.835597528144717,576634.850989666767418 7053805.33436681702733,580871.225531295058317 7056190.564999433234334,581984.420439227716997 7056708.993350408039987,616678.920856804586947 7066568.743981409817934,618565.229628297151066 7067036.44279860239476,620575.103034568834119 7067191.974648762494326,621131.700488535221666 7066828.3863256406039,621379.163716569892131 7066257.894661020487547,621131.700488535221666 7065271.033392799086869,620884.348579991725273 7064647.953481527045369,620513.320717177935876 7064076.310389488935471,620111.346035922993906 7063610.093876085244119,619059.933445381233469 7062987.144270327873528,595930.303606827161275 7053805.33436681702733,591261.007565502892248 7052044.168835401535034,580314.628077328787185 7048002.316121919080615,578923.13444241147954 7047898.629384644329548))
+POLYGON ((632727.517885998939164 7062053.55874643381685,630346.505297422176227 7062260.182387406006455,628955.122981996159069 7062779.007032842375338,627594.464846028829925 7064024.922457631677389,627068.81421050359495 7065115.726056921295822,627007.031893112580292 7065841.45415199175477,627099.761028944631107 7066309.11012776568532,629356.986343759926967 7070360.290713070891798,629789.907843455905095 7070828.212971966713667,630408.398934301570989 7070983.819131521508098,631057.725524100009352 7070724.040841515175998,631676.216614945675246 7069736.811271750368178,634428.257066339021549 7069061.960253968834877,636809.269654915784486 7068853.663713132962584,646209.532735461252742 7069268.766355936415493,651744.671776177594438 7069840.970446583814919,657341.59313428204041 7070360.290713070891798,660928.529766620718874 7070515.887699528597295,662505.481673199217767 7070204.696776681579649,662969.349991333438084 7069788.236187247559428,663031.243628215626813 7069061.960253968834877,662134.453810385428369 7068283.213466011919081,646920.752962141879834 7064596.74872830696404,645467.477009833673947 7064543.862413764931262,643117.411239698063582 7064907.533021925017238,642467.973330408334732 7065218.32947981916368,639932.337969120242633 7065581.844079240225255,638664.631607967312448 7065271.033392799086869,632727.517885998939164 7062053.55874643381685))
+POLYGON ((682944.964697242132388 7067347.509545885957778,682419.425381208071485 7067347.509545885957778,681986.503881512093358 7068230.302590296603739,680873.197654088260606 7070775.472153359092772,680966.038109411485493 7071347.597836940549314,681213.390017952187918 7071763.017973368056118,683068.640651515219361 7074413.352900328114629,684027.324106224928983 7075348.580324811860919,684491.192424362059683 7075557.047399014234543,685511.54687697137706 7075868.261131060309708,701683.819860436138697 7078155.860175435431302,702951.637541083036922 7078104.381006670184433,704930.675448404974304 7077531.767976427450776,705703.677992473705672 7076960.506457528099418,705889.136264134896919 7076545.001310390420258,705796.518447794136591 7076076.741859563626349,705487.272902371245436 7075764.022820981219411,698251.394681317731738 7073114.5463876593858,694046.078277618973516 7071607.396536909975111,693025.612505518365651 7071347.597836940549314,686068.144330937764607 7070724.040841515175998,684924.113924055243842 7069892.209034128114581,682944.964697242132388 7067347.509545885957778))
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/data/no.wkt b/src/boost/libs/geometry/test/algorithms/buffer/data/no.wkt
new file mode 100644
index 000000000..331fed69d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/data/no.wkt
@@ -0,0 +1,95 @@
+POLYGON ((973334.212894973577932 8053884.146248292177916,972035.448395888437517 8053884.146248292177916,971478.962261413340457 8054532.742954319342971,971849.878804735955782 8056954.001087690703571,972252.076124973245896 8058134.837113064713776,972653.939486737013794 8059257.590725538320839,973427.053350296919234 8059906.440469287335873,974323.731848635943606 8060143.366520590148866,975313.362121789599769 8059611.250459576025605,975313.362121789599769 8056363.652912438847125,974911.164801552193239 8055241.333193119615316,974261.949531245045364 8054414.367739056237042,973334.212894973577932 8053884.146248292177916))
+POLYGON ((642622.707422611070797 8168508.759361777454615,641292.996105087571777 8168688.086103021167219,640891.021423832629807 8169766.727228626608849,640643.558195797959343 8170965.544597610831261,641571.29483206931036 8171505.658280909992754,642282.515058747143485 8171026.418760725297034,642993.735285427654162 8170245.885660168714821,643241.087193968356587 8169047.184162639081478,642622.707422611070797 8168508.759361777454615))
+POLYGON ((662752.833581742714159 8173844.87628058437258,661732.479129130486399 8174024.547566497698426,661794.372766012675129 8175523.848948497325182,662134.453810385428369 8176664.401431584730744,663340.377854147343896 8176905.06305546592921,663464.053808420430869 8176484.666408353485167,663680.570218014065176 8174385.198934731073678,662752.833581742714159 8173844.87628058437258))
+POLYGON ((636252.672200949513353 8197035.620977196842432,633902.606430810992606 8197696.782875221222639,618194.201765483361669 8207754.688487220555544,617637.604311516974121 8208658.279032220132649,619523.801763518364169 8211310.458211339078844,633284.226659456500784 8208357.142292996868491,635912.591156576760113 8206428.898080044426024,637334.920290441019461 8204861.985183708369732,638540.955653694225475 8201669.758200289681554,638788.307562237721868 8200465.766226581297815,638726.52524484670721 8198961.429616848006845,638231.71010827133432 8197997.704663413576782,637458.596244711428881 8197275.426180954091251,636252.672200949513353 8197035.620977196842432))
+POLYGON ((659939.010812961147167 8229720.160191170871258,657434.322270111297257 8230264.777509041130543,656877.72481614490971 8231232.697862201370299,657588.945042822626419 8233590.57342291995883,657156.023543129558675 8237461.481430970132351,657372.428633229108527 8238852.51390967797488,657867.132450315984897 8239881.252787824720144,661547.020857469178736 8242120.701780800707638,663680.570218014065176 8242908.820884956978261,666123.476443470222875 8243392.936655785888433,668689.947303711087443 8243695.497807884588838,669865.035848523140885 8243331.248828722164035,670885.501620626542717 8242847.355046395212412,672060.478845947305672 8241879.662159014493227,672617.076299913693219 8240970.276663227006793,673328.296526594203897 8240183.888642981648445,673730.159888357971795 8239095.198028516955674,674255.921843374380842 8238187.678507706150413,674503.273751915083267 8236976.227975433692336,674441.491434526978992 8235766.717224058695138,673823.000343678402714 8234921.222080203704536,673019.05098116863519 8234195.344563053920865,667329.289167743641883 8231049.89748075325042,666277.987896693171933 8230628.385664460249245,662660.104445910663344 8229902.927828874439001,659939.010812961147167 8229720.160191170871258))
+POLYGON ((574470.354810680844821 8211310.458211339078844,573882.810538276215084 8212214.698363776318729,571440.015632308553904 8224101.598424789495766,571192.552404273767024 8225310.949379506520927,571285.392859594314359 8228271.233170941472054,571903.883950442774221 8237521.378020780161023,572089.342222104081884 8238913.946661612018943,576418.445899564423598 8269049.81442712713033,577036.936990412999876 8269961.11941110342741,578242.861034174798988 8270204.605127209797502,579448.785077939624898 8269413.579235861077905,580160.005304617341608 8268624.168841223232448,581304.147030991036445 8266802.218379785306752,588385.291159842046909 8250177.80430403444916,588632.643068382632919 8248964.394318503327668,589220.298660281347111 8236190.263107877224684,589282.080977672245353 8233348.286932905204594,589220.298660281347111 8231837.059263065457344,588632.643068382632919 8227847.921390503644943,585540.410253128153272 8212395.299116335809231,584643.7317547891289 8212153.486124090850353,582571.964711635140702 8213119.048583812080324,581396.876166820293292 8213119.048583812080324,577778.992716040578671 8212395.299116335809231,574470.354810680844821 8211310.458211339078844))
+POLYGON ((573171.701631086878479 8307060.936651901341975,569028.056225290638395 8319285.840398147702217,564389.818321895902045 8349505.106222408823669,564296.977866575471126 8350919.12982542347163,564482.54745772795286 8352270.82161067891866,568564.187907153507695 8369618.815166511572897,568904.380271017551422 8370850.411758496426046,569832.116907288902439 8371405.517939433455467,571223.610542206093669 8371529.053045417182148,572584.157358679454774 8371342.753139815293252,573480.947176512563601 8370542.604206785559654,585324.005163025809452 8355957.768027927726507,585911.549435433233157 8355035.803404971957207,591601.199929366819561 8344164.160059821791947,592436.096110317739658 8342015.122747676447034,595033.513788996846415 8334165.527328440919518,594538.809971912764013 8333123.3837023479864,591261.007565502892248 8330366.593392915092409,589374.810113501502201 8329202.37519608438015,588323.508842451032251 8328773.255222165957093,587086.637980248080567 8328527.613997281529009,586499.093707840656862 8329447.818327486515045,586993.797524924739264 8330181.550052169710398,587766.911388484761119 8330916.898650721646845,588539.913932553376071 8331345.922566045075655,591044.602475400548428 8333369.17777940351516,589560.379704653983936 8342260.992009840905666,589282.080977672245353 8343488.251664707437158,588725.372204214683734 8344408.554069240577519,581582.445757972891442 8344838.583421535789967,580500.19766848126892 8344408.554069240577519,577995.509125631302595 8342384.040168043226004,577377.018034785636701 8341463.990038911812007,577160.612944683292881 8340114.275195159949362,575769.119309765985236 8330610.531267096288502,576861.720111902686767 8326710.916295466013253,578335.590170006849803 8325343.837148684076965,578892.187623973237351 8319406.964900879189372,578985.02807929366827 8318061.273030547425151,579015.863578243530355 8314270.606176851317286,578799.458488141186535 8312925.848813962191343,578181.078716783900745 8312009.23900003824383,576913.261036139796488 8310237.067546,575490.820582784246653 8308649.601275852881372,573913.757356714457273 8307183.400110903196037,573171.701631086878479 8307060.936651901341975))
+POLYGON ((601187.032601067679934 8344594.175177833065391,598465.938968118163757 8344654.724025002680719,597414.526377573609352 8345145.320586212910712,596517.84787923458498 8345821.601717912591994,591570.253110928577371 8351777.981728664599359,590982.708838521153666 8352701.088000318966806,590580.734157266211696 8353806.843887247145176,585942.496253874269314 8373314.444023955613375,584612.784936347976327 8379479.350803301669657,587024.744343365891837 8391146.36602265574038,587364.825387738528661 8392381.565090583637357,588168.774750248412602 8393123.139850189909339,589096.511386519763619 8393678.146403893828392,593394.66824553895276 8393555.796677067875862,594445.96951658942271 8393060.412280477583408,602454.850281711784191 8386453.20816345885396,603939.184371949522756 8384908.816815600730479,605237.837551543372683 8383181.481893667951226,605825.381823950796388 8382193.472817794419825,608330.070366800762713 8375718.051319615915418,608732.0450480527943 8374485.641529529355466,610494.566545783891343 8368756.110456235706806,611174.839954020571895 8366417.049969287589192,611422.191862564068288 8365186.193400012329221,611515.032317884499207 8363832.133859531022608,611669.54377110756468 8359585.442610097117722,611700.601909036980942 8356634.819240366108716,611453.138681005104445 8354053.327462916262448,610958.434863921022043 8353008.373284208588302,608824.774183884961531 8349014.219862466678023,604712.075596526963636 8345514.615448227152228,603784.450279746786691 8344961.674542512744665,602578.526235984871164 8344654.724025002680719,601187.032601067679934 8344594.175177833065391))
+POLYGON ((613679.52849687053822 8375965.268149510025978,612628.227225817157887 8376457.951185116544366,596826.982105166185647 8395718.349463768303394,596425.118743402534164 8396830.353418527171016,596765.199787778081372 8398005.517020201310515,606227.356505205738358 8408834.523635905236006,607000.359049274469726 8409577.75709306076169,612937.361451751668938 8412115.883129445835948,615132.915768667124212 8412983.680152548477054,628460.30784542078618 8416391.179978201165795,629851.801480335299857 8416515.471773384138942,630160.935706269694492 8412673.884275950491428,630470.181251692585647 8405613.895087666809559,630501.128070133621804 8402644.792710902169347,630377.452115860534832 8399613.880949351936579,630037.259751996491104 8398377.468654157593846,622832.439668875304051 8383551.130843658931553,615998.647448567906395 8376644.380379218608141,615040.186632837867364 8376026.296919170767069,613679.52849687053822 8375965.268149510025978))
+POLYGON ((585509.574754178291187 8400293.395026724785566,578830.293987091048621 8402644.792710902169347,577933.72680824319832 8403263.33123467490077,575738.172491327743046 8405676.952485956251621,575305.362311122938991 8406729.177174603566527,575026.952264647115953 8407967.215577473863959,574006.486492546508089 8413851.579501213505864,575336.197810072801076 8425820.108320936560631,575830.901627156999893 8426875.440652079880238,580902.17234973621089 8422035.072538206353784,581489.716622143634595 8421105.026901001110673,585509.574754178291187 8413293.266019543632865,586777.392434822395444 8410009.598158149048686,586870.121570654446259 8408647.278089808300138,586437.200070958468132 8400850.500847680494189,585509.574754178291187 8400293.395026724785566))
+POLYGON ((660279.203176825074479 8416391.179978201165795,659877.117176078958437 8417508.096297198906541,658052.702041468583047 8424701.929609199985862,657867.132450315984897 8427432.997893655672669,658454.78804221469909 8430040.334403241053224,659475.142494824016467 8432152.138536371290684,660124.46908462245483 8433022.302218748256564,660928.529766620718874 8433767.983140118420124,662814.727218622108921 8434949.060256255790591,665474.038534183404408 8435570.320320192724466,666865.53216909780167 8435631.845149155706167,667762.210667439736426 8435010.579887183383107,669803.142211643746123 8432462.755697591230273,670205.116892898688093 8431345.35554170794785,670699.932029474060982 8428861.833473129197955,670638.038392591872253 8427308.521530479192734,670421.521982998237945 8425942.995468150824308,669895.87134747300297 8424889.584097852930427,668597.10684838774614 8423089.861994924023747,667793.157485880772583 8422406.677062468603253,666834.585350659559481 8421786.527823593467474,664639.142353232484311 8420980.65756075643003,663680.570218014065176 8420421.802972020581365,662876.509536013007164 8419677.473684389144182,660279.203176825074479 8416391.179978201165795))
+POLYGON ((579510.567395327729173 8453552.101097218692303,578768.511669700033963 8454361.549572180956602,578830.293987091048621 8455857.323824422433972,579479.731896380661055 8456792.000851007178426,580407.357213160838 8457353.402691235765815,581798.850848075235263 8457478.388876119628549,582571.964711635140702 8456667.026343930512667,582355.448302041506395 8455296.036300098523498,581706.121712245978415 8454361.549572180956602,580747.549577024765313 8453801.94627894833684,579510.567395327729173 8453552.101097218692303))
+POLYGON ((568131.377726948820055 8440667.215994441881776,556040.856512400903739 8448444.696799362078309,552299.29710734798573 8452431.490738846361637,551124.208562535932288 8454300.092056877911091,550691.28706283995416 8455420.987485880032182,549330.740246363799088 8461593.574104757979512,549083.388337823096663 8462840.660601289942861,548959.71238355000969 8464274.824857203289866,550196.471926264581271 8495536.860414164140821,552948.623697146307677 8498669.432870667427778,553567.003468503709882 8498543.743230545893312,564668.005729389260523 8476950.807085178792477,566121.393001185846515 8473763.847862087190151,566554.314500881824642 8472703.559456989169121,567512.886636103037745 8469081.294536210596561,567636.562590373447165 8467707.760607615113258,567852.967680475790985 8464898.569331634789705,568997.109406849602237 8448010.369155924767256,569151.843499052221887 8444025.972340550273657,569059.003043728880584 8441227.387266619130969,568131.377726948820055 8440667.215994441881776))
+POLYGON ((572027.559904713067226 8488460.616994647309184,569059.003043728880584 8492906.172493057325482,558916.572918064659461 8510149.669313287362456,556690.183102199225686 8518943.804926730692387,566214.233456509187818 8514922.525742484256625,574006.486492546508089 8510149.669313287362456,575830.901627156999893 8508830.792141057550907,576573.068672275869176 8508015.313268365338445,577748.157217090716586 8506133.211745273321867,578768.511669700033963 8504061.899902671575546,579046.810396684682928 8502807.788358265534043,579850.759759194450453 8494597.236793134361506,579634.354669092106633 8493155.556851323693991,578335.590170006849803 8491339.033234747126698,572027.559904713067226 8488460.616994647309184))
+POLYGON ((575800.066128207137808 8513226.54072424583137,567914.861317357979715 8519384.162292718887329,565193.76768440566957 8521333.502815362066031,559906.091871726908721 8522464.688581865280867,555175.013513011741452 8525735.176008542999625,548588.573201244929805 8534675.950771888718009,548464.897246974636801 8535745.241344138979912,557803.378010131884366 8534675.950771888718009,559040.248872334952466 8534359.389083979651332,568131.377726948820055 8530770.455306090414524,569213.625816443236545 8530267.315457915887237,570141.251133223297074 8529574.081644382327795,574810.435855056392029 8524917.813547700643539,577067.772489359951578 8522528.757361479103565,577655.316761767375283 8521583.856275361031294,578521.159761159447953 8519321.931356966495514,578768.511669700033963 8518065.205885538831353,578675.782533870893531 8514986.302437208592892,578181.078716783900745 8513918.22907923348248,577222.395262074191123 8513288.719909401610494,575800.066128207137808 8513226.54072424583137))
+POLYGON ((615318.374040328431875 8495911.976630812510848,613926.880405413918197 8496099.654723631218076,612844.743635410792194 8496602.033062634989619,610432.7842283929931 8498857.181552346795797,608360.905865750624798 8501428.15221768245101,607031.305867715622298 8503185.083114022389054,596672.470651946030557 8517310.912096908316016,600661.381965542444959 8523722.395545054227114,607093.088185103726573 8529071.023991847410798,615627.619585754116997 8535745.241344138979912,618503.335991414962336 8537510.422753373160958,619307.396673416020349 8538266.800103075802326,621317.270079687703401 8540976.243378663435578,621657.462443551630713 8542238.723545519635081,622090.383943247725256 8545013.903774200007319,622368.682670229463838 8547978.694540169090033,622183.224398568156175 8550818.324475578963757,622245.006715959054418 8552396.423557344824076,622585.087760331807658 8553596.761402437463403,624347.720577554078773 8554670.412230769172311,625491.862303925096057 8555050.388683488592505,626728.621846639667638 8554734.763527067378163,631830.839387657120824 8553407.604183606803417,632573.006432775990106 8552587.145897965878248,633315.062158406362869 8551449.477800389751792,633809.765975490561686 8544381.488769957795739,632480.165977455442771 8505755.765226829797029,631985.350840880069882 8504689.036139139905572,624069.421850569546223 8497729.6334264036268,617823.062583178281784 8496414.567699441686273,615318.374040328431875 8495911.976630812510848))
+POLYGON ((574315.732037969399244 8529323.228305839002132,573078.861175766447559 8529385.54427694901824,564637.170230439398438 8533541.290183974429965,563554.810821456601843 8534170.955208657309413,557463.185646267957054 8539085.654210977256298,555948.01605708047282 8540661.224745711311698,547351.702339041978121 8550818.324475578963757,546145.77829527715221 8552712.175160458311439,542898.922707311226986 8558777.978641113266349,540394.234164461377077 8564657.775017572566867,541043.560754259699024 8565542.213346214964986,542311.378434903803281 8565225.907329149544239,551155.155380974174477 8562127.105432936921716,554371.064150501857512 8560611.308684622868896,555144.066694570588879 8559788.221577636897564,571038.040951053611934 8538140.429282853379846,572213.018176377285272 8536124.236317778006196,573944.704175155609846 8531652.393288545310497,574223.002902140142396 8530393.550450190901756,574315.732037969399244 8529323.228305839002132))
+POLYGON ((516697.208881333761383 8625823.200203359127045,515501.971508687769528 8627352.595506140962243,514605.181690857512876 8629587.099676379933953,514296.047464923060033 8630863.150678196921945,514481.505736584367696 8638141.875399263575673,514697.910826686711516 8639547.560232542455196,515192.725963264936581 8640634.155667331069708,515996.786645263142418 8641401.288832142949104,517944.877734146721195 8642616.119873970746994,519027.014504147053231 8642424.872384421527386,519800.128367707016878 8641657.631470480933785,520573.242231266980525 8640186.43019656650722,525229.959170130081475 8625823.200203359127045,525397.049725811462849 8625057.704454137012362,524871.287770794937387 8623973.427930204197764,522799.520727641065605 8622889.542107276618481,521686.325819708406925 8622761.699190378189087,516697.208881333761383 8625823.200203359127045))
+POLYGON ((534859.206443239119835 8636034.661100735887885,534271.66217083169613 8636992.640230840072036,533807.905172188649885 8638078.624805625528097,533715.064716865308583 8639547.560232542455196,533003.844490187591873 8659513.108392348513007,533344.036854051519185 8660794.411405647173524,539899.419027886004187 8667269.893092583864927,548557.626382803777233 8669579.96870612539351,549794.608564500929788 8669195.82913457415998,550567.611108569661155 8668425.763109721243382,552113.727516195503995 8666436.533454291522503,552392.026243180036545 8665154.237266402691603,555020.390740300295874 8652851.382969986647367,555144.066694570588879 8651443.129496851935983,555082.173057691194117 8649843.475520046427846,554371.064150501857512 8647348.044012269005179,553041.352832975564525 8645492.802216781303287,551433.342788467532955 8643959.596590783447027,546578.699794973246753 8640890.471323212608695,542898.922707311226986 8645429.718024102970958,542466.001207615248859 8646580.284576816484332,541847.510116769582964 8647541.26316287368536,540579.803755613858812 8647604.595942294225097,539775.743073615711182 8646836.809473570436239,536312.593715035705827 8642296.686443379148841,535972.401351171778515 8641018.63253173045814,534859.206443239119835 8636034.661100735887885))
+POLYGON ((594105.888472216785885 8763221.402761217206717,595169.54620674601756 8762571.628681134432554,595039.747680480475537 8761713.931816887110472,594353.240380760282278 8761440.92193977534771,593481.274809375870973 8761363.255197957158089,589715.002477365429513 8761440.92193977534771,587989.550370070617646 8761674.862935228273273,587414.362561141955666 8762103.930334772914648,587451.431951575446874 8762649.308366073295474,588137.939251298550516 8762922.597726603969932,589009.904822682845406 8763000.047183837741613,594569.645470862626098 8762377.199141819030046,594105.888472216785885 8763221.402761217206717))
+POLYGON ((547970.193429890437983 8805528.037937372922897,544321.363160666776821 8808013.684085886925459,543362.679705954273231 8808732.300561495125294,535230.234306052909233 8820320.066677244380116,534797.312806356931105 8821433.820105869323015,535322.963441884960048 8822612.859030725434422,541909.403753648977727 8831991.148552358150482,543610.142933989060111 8833564.594707367941737,547042.456793619086966 8834943.886084113270044,548372.056791654089466 8835207.155765391886234,549670.9326102277264 8834878.897287927567959,550938.638971383450553 8834484.014287674799562,579108.70403356407769 8824645.135241981595755,581304.147030991036445 8822612.859030725434422,581427.822985261445865 8821433.820105869323015,581056.795122447656468 8820188.701306842267513,576078.253535700496286 8817110.670371191576123,556164.532466673990712 8808471.876256538555026,549268.846609484404325 8805790.239338211715221,547970.193429890437983 8805528.037937372922897))
+POLYGON ((563183.78295864269603 8840329.587576221674681,559844.198234844719991 8852953.153467200696468,557679.702055861591361 8862370.915530567988753,567698.456227255635895 8863688.569878071546555,568657.028362476848997 8863292.109518865123391,570759.742224069079384 8857362.985682358965278,565379.225956066977233 8843022.169257597997785,564884.52213898289483 8841905.086203658953309,564173.301912305061705 8840919.679329739883542,563183.78295864269603 8840329.587576221674681))
+POLYGON ((624409.502894942183048 8903208.068589337170124,618008.632174330763519 8903340.952571718022227,616709.978994736913592 8903737.710521725937724,615751.295540024410002 8904402.203727781772614,612875.57913436065428 8911297.697582732886076,612937.361451751668938 8912558.864629279822111,614143.396815004758537 8917802.238659394904971,617081.006857550702989 8925243.468728188425303,617606.657493075937964 8926439.584894007071853,619492.966264568502083 8927836.501701008528471,620822.566262603620999 8928103.181790247559547,633067.710249862866476 8929233.928847411647439,634706.555793320760131 8929166.17000206373632,646549.725099328090437 8924179.144955152645707,646673.401053598383442 8923049.430081078782678,645343.801055563380942 8911430.730742376297712,644941.826374308438972 8910104.330354142934084,644416.064419291913509 8908976.580469056963921,642684.489740001969039 8907384.707069391384721,640674.616333730285987 8906191.987291527912021,639499.41646942414809 8905727.555434968322515,634335.527930506970733 8904467.821279974654317,628707.771073452662677 8903737.710521725937724,624409.502894942183048 8903208.068589337170124))
+POLYGON ((648683.385779361356981 8916208.415345817804337,651342.585775431478396 8924511.489971548318863,651404.479412310756743 8925510.052854109555483,649765.633868852863088 8937285.006740231066942,649487.335141871124506 8938616.420530084520578,646704.347872039536014 8938883.50003675557673,645745.775736818206497 8939615.262321623042226,645652.935281494981609 8941080.688787825405598,645993.127645358908921 8945213.353919671848416,646209.532735461252742 8946679.920287111774087,648776.114915193407796 8952549.415487254038453,650414.960458651301451 8955951.567216804251075,651126.180685329018161 8956886.719899877905846,652857.755364619079046 8958489.572057463228703,655919.04136143240612 8960358.975553579628468,658300.05395001207944 8961228.563941031694412,659784.388040246907622 8961362.522599851712584,660928.529766620718874 8961094.607776125892997,663216.701899876934476 8960024.971887607127428,664793.765125946723856 8958289.797012276947498,665412.25621679238975 8957288.360936760902405,670885.501620626542717 8943280.467361753806472,670576.256075200857595 8937151.495386043563485,661485.127220586990006 8926373.767017278820276,659939.010812961147167 8924578.965777814388275,656815.83117926272098 8921124.155267059803009,653538.028772855643183 8917802.238659394904971,652517.674320243531838 8917205.828291108831763,650167.608550107805058 8916275.813453871756792,648683.385779361356981 8916208.415345817804337))
+POLYGON ((693334.858050941140391 8952281.82855324819684,691696.012507483246736 8952347.883649010211229,684398.35196903871838 8952347.883649010211229,681244.225516902050003 8952347.883649010211229,678646.919157714117318 8953148.759839145466685,676544.093976630712859 8954417.036131804808974,674626.949706188170239 8955819.631785601377487,670947.283938014646992 8961962.601419348269701,670483.415619880426675 8963166.517662664875388,687676.154375448590145 8964836.698686137795448,688974.807555042556487 8964768.844537330791354,703322.665403896942735 8959357.251498026773334,704435.860311829601415 8958823.50446187518537,705054.351402675267309 8957821.994117161259055,704992.457765795872547 8956487.023994281888008,704281.237539118155837 8955485.83873563632369,702240.30599491414614 8954616.943975815549493,699859.404725825763308 8953749.835840472951531,696179.627638163743541 8952615.473038770258427,693334.858050941140391 8952281.82855324819684))
+POLYGON ((743366.735271034645848 9015814.731092220172286,742222.704864152125083 9016419.373320501297712,740305.449274218408391 9020998.85851551219821,740243.666956827393733 9022549.611951494589448,743088.54786354128737 9031717.637747580185533,743521.358043746091425 9033066.6579499412328,744232.578270423808135 9034011.900436030700803,745129.256768762832507 9034821.929711643606424,746489.80358523898758 9035024.086847975850105,765414.228339585592039 9037657.023309530690312,766898.451110334834084 9037386.248518185690045,767702.400472841807641 9036509.095869733020663,768290.056064740521833 9035430.119169089943171,770268.982652571168728 9029288.87486239336431,770361.823107894393615 9027738.606828320771456,769372.192834740853868 9025647.998897779732943,767300.425791586982086 9024435.511730995029211,763713.489159248303622 9023154.821657678112388,755890.177985278540291 9021269.015734620392323,751097.317309172358364 9019585.670278165489435,749922.228764360304922 9019113.86119794100523,743366.735271034645848 9015814.731092220172286))
+POLYGON ((765074.035975721664727 9045696.932462204247713,755055.281804327620193 9052662.342695903033018,754220.385623379494064 9061124.639441916719079,754282.279260258888826 9062479.446538602933288,755333.580531312152743 9063089.742131577804685,758209.296936973114498 9063428.57374738715589,769372.192834740853868 9064106.041064839810133,770887.362423928454518 9063834.265785899013281,771846.045878640958108 9063156.824153253808618,772619.04842270957306 9062209.440248070284724,773051.96992240275722 9060988.807021044194698,773330.268649387406185 9057129.266813635826111,767795.240928165148944 9046237.173159876838326,766589.316884400439449 9045763.608617439866066,765074.035975721664727 9045696.932462204247713))
+POLYGON ((836040.322675924631767 9085212.764414835721254,833102.712633381481282 9088953.060059424489737,832329.598769821575843 9089836.654196102172136,831340.079816162004136 9090583.717833237722516,830195.938089788309298 9091196.657151298597455,828897.284910194342956 9091605.883961191400886,825866.834412327967584 9092149.596690639853477,824722.692685954156332 9092762.425121016800404,823764.231870224117301 9093510.03905370645225,821073.973736224579625 9095891.55788829177618,820269.913054223521613 9096777.724302690476179,819836.991554527543485 9098002.510380929335952,819929.832009850768372 9099364.310639448463917,823671.391414903686382 9114362.713343568146229,846522.833845964400098 9123102.932957325130701,851594.104568543611094 9120166.4558509234339,858489.679106242023408 9100862.712810622528195,858087.704424987081438 9099841.185829885303974,857160.079108207020909 9099092.910512855276465,840276.585898064426146 9087591.524933168664575,836040.322675924631767 9085212.764414835721254))
+POLYGON ((865880.068780515808612 9104541.760994059965014,863777.354918920784257 9105904.560643384233117,857994.975289155030623 9110405.065800419077277,856077.719699224224314 9111905.781524712219834,855304.605835664202459 9112793.933053163811564,854871.795655459398404 9114021.708977423608303,858087.704424987081438 9120916.938165206462145,858860.818288547103293 9121873.843543892726302,860066.631012817728333 9122284.828326731920242,870518.418003398925066 9123376.967275321483612,873424.969908012542874 9123651.012093007564545,879269.354494148865342 9122352.221262881532311,880042.35703821759671 9121464.849816029891372,881124.605127709219232 9119688.224284609779716,881000.929173438809812 9118322.551286373287439,879671.329175403807312 9114158.550996148958802,878156.159586216206662 9112246.930672906339169,872559.238228111760691 9107745.267367605119944,869374.276277025230229 9105974.008049458265305,865880.068780515808612 9104541.760994059965014))
+POLYGON ((891143.470618594437838 9134866.580414947122335,888236.696075001149438 9134934.338423326611519,882577.992399508599192 9141164.905603770166636,882361.587309406255372 9142536.675210744142532,882949.020262322388589 9143701.480243461206555,883722.134125879500061 9144659.712926955893636,895874.437657818431035 9156321.264945721253753,897544.230019717360847 9157761.697677342221141,898750.154063482186757 9158174.751104362308979,900141.759017887758091 9158380.421561868861318,901502.083195381448604 9158312.440887700766325,903017.475423551513813 9157969.333757622167468,904161.505830434034579 9157418.616998018696904,906356.948827858315781 9154810.9514852296561,909418.234824674553238 9148225.842106709256768,909820.209505926584825 9147060.05268794298172,911211.814460335066542 9139042.905531378462911,911304.54359616432339 9137878.612844455987215,910222.295506672700867 9137261.907900866121054,905707.622238059877418 9136302.941273488104343,900203.541335278772749 9135345.82812025770545,897265.819973244448192 9135071.581157008185983,891143.470618594437838 9134866.580414947122335))
+POLYGON ((914767.804274235502817 9138630.956460142508149,913809.120819522999227 9139385.105096459388733,912108.381639182916842 9145824.864046489819884,910407.865097825299017 9152272.406987305730581,910531.429732607211918 9153644.334308434277773,911118.974005011841655 9154810.9514852296561,912046.599321794812568 9155565.079879296943545,913128.847411286318675 9156115.653762897476554,914520.452365692006424 9156388.979539280757308,916190.133408099762164 9156251.326824,917179.763681253301911 9155497.373094579204917,921508.867358713643625 9148155.983181226998568,924477.424219697830267 9142741.649372370913625,924879.287581461598165 9141507.206773424521089,924972.128036782029085 9140344.485309161245823,920457.45476816908922 9139315.579074922949076,914767.804274235502817 9138630.956460142508149))
+POLYGON ((934093.981070854468271 9139385.105096459388733,932548.087302208296023 9139385.105096459388733,931032.695074041024782 9139658.03825069963932,930074.345577802276239 9140412.295259222388268,929301.231714242370799 9141371.813356924802065,920797.647132033132948 9156183.613535173237324,920210.102859628503211 9157282.92176653444767,920457.45476816908922 9164425.624416215345263,920581.242041930672713 9165800.135548580437899,937897.656751769245602 9170338.271670263260603,939257.980929265730083 9170200.349846655502915,940804.097336891572922 9168413.549746599048376,952647.377962387283333 9153026.020445449277759,954255.38800689810887 9149596.9926169347018,954688.309506591293029 9146852.980196597054601,954533.464094897382893 9145139.617689225822687,953729.626051881583408 9143701.480243461206555,952059.9450094710337 9142329.487086249515414,948844.036239946144633 9140549.64320183172822,944855.124926349846646 9139658.03825069963932,934093.981070854468271 9139385.105096459388733))
+POLYGON ((953203.975416353554465 9178940.992583755403757,947545.271740861004218 9178940.992583755403757,945999.155333232367411 9178940.992583755403757,942968.816154857166111 9179493.371759297326207,939505.555476788897067 9181353.131123596802354,938546.872022076393478 9182110.067937606945634,939010.62902072223369 9183419.520072679966688,944545.768061435781419 9191899.937907146289945,945318.770605504396372 9192866.399424720555544,947143.297059606062248 9194452.613972177729011,949462.304691812256351 9195419.421368774026632,950884.745145167806186 9195626.167685238644481,956450.831004322390072 9194661.319977257400751,959110.142319883685559 9193694.615303097292781,960099.661273543140851 9192934.461530903354287,964799.681494326097891 9188107.388178516179323,965387.337086224812083 9187003.324123172089458,965789.311767479637638 9185762.945123331621289,965263.549812463228591 9183419.520072679966688,964645.058721614652313 9182248.220048721879721,962480.673862122814171 9181076.864222479984164,961243.580360934487544 9180664.467729305848479,953203.975416353554465 9178940.992583755403757))
+POLYGON ((888916.969483240623958 9176393.857850415632129,889999.328892223420553 9184040.471384260803461,889597.242891477304511 9185212.065607745200396,888638.78207574726548 9185969.411824887618423,882114.124081371468492 9188381.94141716696322,876950.124222963117063 9187898.873789299279451,868663.056050347397104 9189762.81144780293107,867642.701597735285759 9192038.279676890000701,866622.235825634677894 9194384.537381554022431,866374.772597602801397 9195764.581728642806411,865880.068780515808612 9200460.321950348094106,866127.420689059305005 9201634.864522144198418,889226.215028663515113 9215672.965294299647212,892318.44784391799476 9215811.768975213170052,899028.564109955099411 9215741.24540282972157,900760.027469753869809 9215602.692288832738996,901533.141333313775249 9214703.408490102738142,909943.996779690962285 9199424.706460217013955,910531.429732607211918 9198318.8898217510432,910995.409370232722722 9195557.831400901079178,908614.396781655959785 9189416.203343864530325,908026.85250924853608 9188245.656436743214726,905150.913464605109766 9184521.293011961504817,900914.650242465315387 9180938.734781721606851,899832.402152973692864 9180318.301214659586549,888916.969483240623958 9176393.857850415632129))
+POLYGON ((941237.01883658755105 9205573.219218233600259,937990.163248618831858 9205711.826425323262811,936444.26947997265961 9205989.048921681940556,923426.011629153275862 9208615.233878647908568,922034.406674747704528 9210621.304013704881072,921818.001584645244293 9212074.731566667556763,921725.272448813193478 9215119.771009724587202,922281.981222270755097 9219757.964191079139709,922560.057310272939503 9221281.838479291647673,923024.036947898450308 9222598.502774864435196,923642.52803874691017 9223776.698258532211185,927816.897624004632235 9228281.480740176513791,931218.264665193622932 9231750.538917848840356,938639.71247739973478 9238066.497776770964265,940835.155474823899567 9239247.003958828747272,942071.91501753567718 9239662.802724005654454,945040.471878519863822 9239941.348966374993324,958955.40822768106591 9240983.118444873020053,958986.355046119308099 9251201.833998205140233,981312.146841657697223 9258718.812858806923032,995721.78700790007133 9262411.425967779010534,997113.391962308553047 9262619.874358177185059,998659.285730954841711 9262342.446196204051375,1021510.839481506845914 9240080.62617240473628,1021170.647117642802186 9238552.726627701893449,1020243.021800862741657 9237788.024837402626872,1011801.442175026866607 9230986.566873313859105,1007595.903132345643826 9228420.530187413096428,997608.095779392751865 9223291.476656336337328,994206.617418712587096 9221696.590173365548253,987960.258151321322657 9219757.964191079139709,978158.020389520912431 9218165.862343123182654,976766.526754603721201 9217956.71660329028964,970551.336944633163512 9217819.616051115095615,969159.731990227592178 9217610.480469632893801,964026.79026974865701 9216157.668542135506868,957811.377820798545144 9214150.289431078359485,954409.89946011826396 9212557.446623453870416,951627.02350977784954 9210207.196147430688143,950853.9096462179441 9209238.382280271500349,948998.65901265759021 9207646.636265860870481,946833.940194691997021 9206471.352161223068833,945566.122514047892764 9206057.236357560381293,941237.01883658755105 9205573.219218233600259))
+POLYGON ((1190168.216995125636458 8284703.032004872336984,1188211.665624942164868 8288214.093219860456884,1186727.554173687007278 8291137.739954115822911,1186078.227583888685331 8293332.385226213373244,1184680.166099017020315 8301614.792361312545836,1184394.18632716848515 8313571.240210314281285,1182201.748955996241421 8320263.922394087538123,1175595.60509436042048 8337108.948291527107358,1175286.359548934735358 8339561.517688265070319,1175471.929140087217093 8341094.897703899070621,1178254.916409918805584 8353129.830822634510696,1180048.3847260910552 8357864.249844301491976,1183758.997312702937052 8367093.510173511691391,1184470.106219889363274 8367895.280080622062087,1185521.518810431007296 8367648.333641176111996,1186356.414991382043809 8366909.31712344661355,1187995.371854331111535 8364139.883053360506892,1190623.736351451370865 8355219.700258206576109,1190778.247804671525955 8353930.084646079689264,1195420.604529225034639 8356178.870762954466045,1197884.995416407007724 8363441.760625810362399,1196498.956436537439004 8374609.228248851373792,1195818.683028300991282 8375472.618034961633384,1193994.15657419920899 8376766.227721373550594,1190469.113578740041703 8378122.664449438452721,1189232.131397045683116 8378246.312151135876775,1187841.194359581917524 8374658.264128014445305,1187191.311172330053523 8373869.513873307034373,1186201.792218670481816 8373377.003764178603888,1178100.293637207476422 8372513.859313231892884,1175502.764639036962762 8372637.412988265044987,1173028.911595139885321 8372329.309025813825428,1171915.716687207110226 8372021.439739348366857,1169102.005237914156169 8370358.103244932368398,1168390.673691745148972 8369495.312055198475718,1165978.714284727117047 8365923.485946821980178,1165700.526877236785367 8364939.337641714140773,1165855.149649948114529 8363646.249817178584635,1166782.774966728175059 8355896.905074450187385,1166937.397739439737052 8354667.802163255400956,1168019.757148422533646 8350983.269316586665809,1167926.805373610695824 8347172.360336062498391,1167865.023056219797581 8341647.549110042862594,1168205.104100595461205 8339194.286973289214075,1170988.091370427049696 8329079.546429534442723,1171483.017826493596658 8328100.297107167541981,1172132.344416289124638 8327242.430528695695102,1175041.122710719006136 8325945.788112540729344,1177667.372137514175847 8323690.983417624607682,1178347.756865242263302 8322895.761919976212084,1179831.868316497420892 8319957.996327276341617,1180481.19490629574284 8317755.438105562701821,1181254.197450361680239 8311520.837541490793228,1181254.197450361680239 8310176.580112248659134,1181068.850498191546649 8308649.601275852881372,1180759.493633277481422 8307366.329556939192116,1179429.893635242478922 8303824.195209635421634,1178162.187274089548737 8301993.563049919903278,1175317.195047884481028 8298698.863476018421352,1170307.817962187575176 8294733.94592524971813,1167524.830692355986685 8293087.918423535302281,1165453.174968693172559 8292295.980435701087117,1164216.19279 8292113.642626120708883,1162701.023197811329737 8292295.980435701087117,1160721.985290489625186 8293454.621655784547329,1160227.2814734026324 8294429.074008265510201,1159887.089109538588673 8295527.681477443315089,1159918.147247470915318 8296869.279325398616493,1160381.792926625581458 8303519.168266501277685,1160536.638338316697627 8304984.643191265873611,1160845.772564251208678 8306327.957187492400408,1161031.342155403690413 8307854.456712753511965,1161031.342155403690413 8309198.292076102457941,1159361.438474013470113 8325099.852681935764849,1159206.815701301908121 8326324.264263962395489,1158897.681475367629901 8327425.85700552444905,1155557.985432078363374 8333000.489730575121939,1154908.770161774009466 8333859.025195124559104,1145261.043853190960363 8340481.551661839708686,1143096.436354716541246 8341463.990038911812007,1140746.370584581047297 8340971.871024956926703,1138643.768042477080598 8340174.787318889051676,1137932.436496308073401 8339315.517463223077357,1138272.628860172117129 8338212.150471033528447,1141952.405947834020481 8332877.597803191281855,1143312.952764310175553 8331529.450944238342345,1144024.061671496834606 8330979.100059797056019,1147204.125564988935366 8329996.511345787905157,1148755.140030212001875 8329508.463663742877543,1149744.770303362747654 8328833.895021919161081,1154939.494341232581064 8324977.092089437879622,1155434.420797299128026 8323997.064038683660328,1155774.613161163171753 8322956.353508682921529,1156269.316978247370571 8320569.640860165469348,1157382.511886179912835 8311948.957074985839427,1157537.134658894268796 8309320.790931625291705,1157537.134658894268796 8307916.46436027251184,1156145.529704485787079 8297294.795132456347346,1155836.395478554069996 8295953.120143852196634,1155279.686705096624792 8294978.467107569798827,1154444.790524145588279 8294306.821483101695776,1153084.243707672227174 8294306.821483101695776,1150888.800710245268419 8295038.610898490995169,1149868.33493814454414 8295588.049252193421125,1147239.97044102451764 8297722.092077150009573,1145415.666625905316323 8299003.691740701906383,1141735.889538240386173 8301566.23905233014375,1140746.370584581047297 8302115.942643615417182,1139385.823768104892224 8302115.942643615417182,1139385.823768104892224 8300711.445425292477012,1139571.393359257373959 8299796.347936762496829,1140684.588267189916223 8297539.400949654169381,1142508.892082309117541 8294918.104305221699178,1151878.430983398808166 8283950.565215631388128,1160351.068747164215893 8277074.505776195786893,1166040.719241100596264 8272635.30685,1167030.126875271787867 8270690.506650036200881,1170678.957144492538646 8247874.414420293644071,1170678.957144492538646 8246541.658895640634,1170369.822918561054394 8245209.142798563465476,1165916.931967339012772 8235464.261462231166661,1164772.901560456492007 8233529.18472315184772,1163937.894060014514253 8232864.826029441319406,1162979.433244284475222 8232380.090680210851133,1162329.884015506366268 8233167.175872694700956,1162020.749789574649185 8234314.867801863700151,1161866.238336351700127 8235525.883918495848775,1161185.853608623845503 8236311.560649147257209,1155867.342296995222569 8238609.837727922946215,1154537.519659977639094 8238609.837727922946215,1153702.734798518009484 8237945.024067861028016,1153269.813298821914941 8236795.246144124306738,1149620.983029601164162 8224887.806344782933593,1138921.955449970439076 8188735.590249897912145,1129769.044277965789661 8184650.788425982929766,1130603.829139422625303 8185310.85016795899719,1131284.102547662099823 8186152.448945162817836,1131840.922640607925132 8187112.909290679730475,1132150.056866542436182 8188435.043025740422308,1131995.43409383110702 8189636.871981224045157,1131346.107504032552242 8190478.960395676083863,1130140.18346027075313 8190599.513878800906241,1127975.464642302365974 8189939.199102500453591,1116163.464793721446767 8181843.152640882879496,1116503.545838094083592 8178124.693359077908099,1116503.545838094083592 8176745.197195158340037,1116379.7585643325001 8175543.720715305767953,1116070.62433839822188 8174286.503979259170592,1115513.915564940543845 8173266.588773526251316,1113874.958701991476119 8171947.147212847135961,1108154.472709107911214 8170006.950100851245224,1099558.158991069532931 8170665.714228374883533,1094703.293358592549339 8172645.595161084085703,1095538.412178523140028 8173304.376913759857416,1096094.898312998237088 8174324.297297744080424,1096373.197039982769638 8175644.160348477773368,1096373.197039982769638 8178345.738988350145519,1096187.627448830287904 8179545.939052617177367,1095692.923631746321917 8180505.546846997924149,1093775.668041812488809 8183509.01123983040452,1093336.957928594900295 8184074.904280018061399,1089477.511182793183252 8188195.739089679904282,1070244.06352200335823 8205886.242545313201845,1064214.220664202934131 8205644.641278378665447,1062884.509346679551527 8205585.001240779645741,1062080.671303661074489 8205222.833835712634027,1061956.884029899490997 8204079.628327452577651,1062451.810485966037959 8203115.239635395817459,1071604.721657970920205 8192885.205382134765387,1078036.427877532085404 8187294.415616703219712,1079025.835511703277007 8176725.322220095433295,1069563.790113766910508 8164553.448047610931098,1069038.139478241559118 8163893.714842210523784,1058370.058717049192637 8157066.891990075819194,1047454.403408333659172 8146182.788648740388453,1040693.525454495218582 8128412.324504864402115,1039723.821370193152688 8126725.906876810826361,1023149.796344455913641 8106903.145362290553749,1021541.786299947882071 8105595.394800359383225,1009018.232266212697141 8097931.115906058810651,1005276.672861159895547 8095971.182234183885157,1002215.386864346452057 8094725.598479961045086,1001411.437501836568117 8094072.011839110404253,996494.900871460093185 8088673.50874641072005,983074.668339385883883 8069009.876127737574279,979271.660575415706262 8065579.625146339647472,972850.641026970348321 8062180.942358937114477,969887.204862560261972 8060733.162052438594401,969985.945250893360935 8055638.589630582369864,967582.78008364897687 8046980.668542343191803,947359.702149708522484 8024308.62835927400738,935392.856889430899173 8020958.44473572075367,918169.282634915667586 8009859.422913095913827,917798.032133119413629 8009037.448659811168909,917705.525636269827373 8002527.787571116350591,915231.672592369723134 7993387.265882426872849,914706.021956844488159 7992449.691836322657764,914056.695367046166211 7991631.307281938381493,913036.229594945558347 7991571.876182373613119,911923.034687012899667 7991923.833164190873504,907831.375483415904455 7996786.320594782941043,905274.700738366693258 7988703.936146878637373,904749.050102841458283 7987709.020355594344437,903697.748831788194366 7987358.735188421793282,883289.212626186432317 7984023.313611553050578,869343.329458586988039 7981509.9328489061445,852769.081793867284432 7976601.371131798252463,849089.416025693761185 7971811.198058685287833,848316.30216213373933 7971168.241061267443001,847265.00089108326938 7970818.725884389132261,841544.403578708530404 7969592.083498089574277,838050.196082196314819 7969008.568686692044139,833102.712633381481282 7968484.347500520758331,819620.697783916373737 7970001.012109574861825,807189.984205504530109 7974614.872442333959043,804128.69820869108662 7976541.848456952720881,796088.870625127688982 7977360.273964766412973,788203.777133766910993 7973971.675658767111599,787430.663270207005553 7973270.71900865342468,787647.17967980063986 7972103.163665763102472,788018.207542614429258 7971052.644947407767177,788234.612632716773078 7969883.962953849695623,788172.830315325874835 7968716.72320478502661,787399.827771257143468 7968075.711439660750329,784709.569637257489376 7966500.201823559589684,780844.334277934278361 7964750.512557877227664,779391.058325626072474 7964808.051981281489134,772124.233286134200171 7975548.751660912297666,768413.732019010814838 7979113.110691390000284,754931.605850057327189 7990751.901457586325705,749334.684491952881217 7991806.442086434923112,748994.603447580127977 7980808.272943530231714,735605.317733944277279 7981742.921995780430734,734461.176007573259994 7982094.418839399702847,730132.07233011291828 7987826.347421145066619,729853.884922619559802 7992742.460373332723975,733286.198782249703072 7999655.66139199025929,736131.079688960686326 8004168.711907312273979,744077.955497712362558 8010974.967593573965132,753323.595805546385236 8017550.119763416238129,751715.697080529644154 8019959.456610713154078,736563.889869165490381 8021839.915782598778605,708022.796944171073847 8024426.52892289031297,706610.152606004383415 8024416.792001812718809,699550.159180402872153 8032015.858337538316846,693860.508686469285749 8035194.6210319949314,691881.582098635728471 8036195.641332347877324,684831.273468734696507 8038138.494083553552628,682852.235561412875541 8039081.795771449804306,669246.544757677358575 8047510.401468094438314,667143.830896082450636 8049752.680068468675017,666061.582806590828113 8051582.421472614631057,664917.441080217016861 8054709.565432957373559,664670.089171673636883 8055891.747987180016935,664422.737263132934459 8059848.167167673818767,664082.544899266096763 8065107.138852822594345,663680.570218014065176 8066172.403520179912448,663123.972764047794044 8067058.998129826039076,660990.423403502907604 8067887.361868102103472,659506.089313265169039 8067945.910706260241568,656877.72481614490971 8067768.775261412374675,655702.6362713300623 8067531.820580099709332,651590.049003463354893 8067413.239608043804765,643210.140375527204014 8069542.873860809952021,640891.021423832629807 8070252.886670751497149,640025.17842444346752 8070844.331504521891475,628367.578709588735364 8082626.528659483417869,626264.86484799371101 8084938.038040732033551,625708.15607453614939 8085826.860030055046082,613401.341089377179742 8108389.221411719918251,612999.255088633857667 8109400.084788913838565,607556.956503240857273 8125353.961807542480528,607545.267956706578843 8126779.768484493717551,608732.0450480527943 8128752.959324805065989,614297.90826822782401 8142836.698410353623331,617081.006857550702989 8153357.767818887718022,618255.984082871465944 8160779.588445977307856,618039.578992771916091 8173365.486140774562955,616802.708130566054024 8176544.073537944816053,616648.085357854724862 8180085.162885540165007,617513.928357243887149 8186632.663616484031081,618132.308128601172939 8187474.411960972473025,619307.396673416020349 8187112.909290679730475,620173.239672805182636 8186512.174409518018365,635603.345611151074991 8175044.350661769509315,636178.53342007973697 8174010.510591099970043,635169.978833492961712 8167853.42267526499927,639465.797983204829507 8164885.169923665933311,644956.965825056657195 8164016.210737592540681,647571.860663791536354 8164957.425998339429498,647459.87325605249498 8169047.83159064501524,649456.499642921262421 8172345.697117233648896,650817.046459394623525 8172465.957156729884446,651992.023684718296863 8172105.182866706512868,654001.897090992773883 8171085.782342465594411,655733.583089771098457 8169827.591589765623212,660742.960175468120724 8165930.902305148541927,661454.180402145953849 8165152.41305391676724,668906.352393813431263 8156350.298397602513433,674379.597797644790262 8150008.240084203891456,675090.818024322506972 8149231.628221835941076,680223.871064292616211 8145406.360164386220276,682419.425381208071485 8144569.353715144097805,686686.63542178622447 8144211.648708716034889,693211.070777179556899 8144628.506828442215919,693551.263141043600626 8145526.186049027368426,692870.989732806920074 8146302.627016363665462,690211.678417245508172 8146422.46731083188206,687521.420283245970495 8146241.954567885957658,686191.82028521085158 8146481.419976065866649,683872.590014022309333 8147198.786480580456555,682852.235561412875541 8147676.710527835413814,680131.141928460565396 8149410.491463392041624,679265.298929071403109 8150069.15846224501729,677719.182521442766301 8151443.721392393112183,675771.091432561981492 8153955.833186843432486,674657.896524629322812 8155750.317395746707916,674255.921843374380842 8156828.594348207116127,674194.139525983482599 8158145.359541978687048,674534.220570356119424 8159342.307332886382937,677997.481248427298851 8166409.813932738266885,679605.491292935330421 8169346.733534428291023,680873.197654088260606 8171026.418760725297034,681677.147016598028131 8171746.153161397203803,682573.936834428342991 8172284.812164810486138,689284.053100465447642 8175823.875074476934969,692190.716324567445554 8177325.267401888035238,696426.979546707239933 8178884.875855069607496,712908.498075594892725 8184109.719892483204603,721968.680111770518124 8186632.663616484031081,733471.657053910894319 8189577.576621572487056,735574.482234997209162 8190358.408866608515382,737306.056914284359664 8191562.2803919557482,737367.839231675257906 8192764.614842044189572,736192.862006351700984 8193124.876767247915268,724009.500336483237334 8190959.670932640321553,712382.84744006965775 8188195.739089679904282,709970.888033051742241 8187533.906902715563774,691355.820143619319424 8181526.454688332974911,687119.556921482319012 8179966.508677003905177,685140.519014157587662 8179005.241603391245008,682512.043197548948228 8177204.928822759538889,680966.038109411485493 8175764.473693327046931,679048.782519477768801 8173184.319257402792573,672648.023118354729377 8160000.12863503023982,672462.453527202247642 8159401.577840687707067,671843.962436356581748 8158564.721952884458005,670978.119436964509077 8159222.259058487601578,669865.035848523140885 8161018.228099280036986,665091.544763817917556 8172162.827854244969785,663896.196071677841246 8183183.377362267114222,660833.017643521889113 8183110.727923827245831,653692.762865058379248 8193726.146026897244155,653290.67686431214679 8194809.939196091145277,653043.324955771560781 8196012.798912043683231,653259.841365362284705 8197336.516005608253181,653599.922409737831913 8198480.41818337328732,654094.737546313204803 8199503.579808888025582,655362.443907466134988 8201247.959522259421647,656290.180543737486005 8201790.49326588679105,663000.185490283300169 8205404.782799035310745,668968.246030692826025 8211370.144219322130084,668411.648576726438478 8212274.391636410728097,668164.2966681830585 8213480.081349120475352,668380.813077776576392 8214806.913504043594003,668720.894122149329633 8216014.751757897436619,675121.764842763543129 8224705.379556931555271,684243.84051581856329 8233529.18472315184772,686593.79496646579355 8235645.428587857633829,702456.822404504870065 8246723.096719471737742,704312.184357556398027 8247814.652294090017676,706445.733718101284467 8248601.631572772748768,708857.693125119083561 8249085.900900777429342,712939.444894035928883 8249328.920037560164928,715784.214481258648448 8249026.129011893644929,718474.472615258186124 8249147.636605600826442,719711.454796955222264 8249388.912522186525166,719618.614341631997377 8250419.331924235448241,718598.148569531389512 8250965.252601576037705,713186.796802579425275 8251268.122811656445265,709754.482942949398421 8251268.122811656445265,704868.781811522785574 8250297.803493444807827,702735.232450980693102 8249510.426059810444713,700879.87049792916514 8248420.365916961804032,699302.80727185937576 8247025.793736808933318,696736.225092130131088 8243514.352004612796009,695004.650412840186618 8242120.701780800707638,682883.18237985111773 8236554.161679781973362,681677.147016598028131 8236371.447958056814969,680811.415336700039916 8236976.227975433692336,667422.129623064189218 8251995.891070691868663,667638.534713166533038 8253389.433808936737478,670978.119436964509077 8260730.316803643479943,671472.93457354279235 8261762.313746605999768,672122.26116333832033 8262610.874516508542001,676049.390159543720074 8266195.001094698905945,679358.028064900659956 8268927.980176351964474,691819.688461753539741 8283341.940624457783997,692469.015051551978104 8287421.141530956141651,693489.480823652585968 8289492.511941725388169,694138.807413451024331 8290346.010589113458991,695066.544049722375348 8290895.100675165653229,711455.110803798306733 8298211.340050421655178,714547.343619055580348 8299553.424600059166551,717639.57643431017641 8300895.752635965123773,720113.318158718990162 8301383.45298229996115,715506.02707376528997 8303153.723872282542288,696643.495956300874241 8307305.865597635507584,695561.24786680645775 8303701.787353371270001,693613.156777925789356 8297906.324837221764028,692901.936551247956231 8295832.598657839000225,686995.880967209115624 8283464.01219785399735,686501.065830633742735 8282428.98796265386045,684985.896241446142085 8279325.221062841825187,684336.458332159323618 8278472.991806040517986,682264.691289005451836 8275978.632918519899249,680038.412792631308548 8273668.744362223893404,677038.909113206085749 8270690.506650036200881,662258.129764655721374 8257210.63396127987653,661639.638673810055479 8256785.886106536723673,660557.390584315638989 8256422.522165949456394,659691.547584926476702 8257029.157735844142735,659135.061450451379642 8257938.767360270954669,655022.362863093381748 8267165.872862375341356,654218.413500583614223 8269291.739003543742001,654342.089454856701195 8272027.61135237198323,654775.010954549885355 8274702.544970967806876,655115.091998925432563 8275918.424822954460979,655640.853953941958025 8276952.539479707367718,656413.967817499069497 8277682.615468640811741,657774.514633975224569 8277438.664855912327766,658640.246313876006752 8276770.360170527361333,661485.127220586990006 8276526.43960218410939,666494.504306284012273 8277316.692562642507255,683841.754515072447248 8283584.332468495704234,684769.379831852507778 8284132.921250207349658,684367.516470088856295 8285230.001554160378873,683501.56215120840352 8285898.850946831516922,682295.749426934984513 8286263.663495570421219,681089.714063681778498 8286325.4904805701226,656259.233725296333432 8284132.921250207349658,646518.778280886937864 8282489.249010889790952,635974.373473964864388 8275370.663103073835373,630655.750842845067382 8269851.739394003525376,630266.132625068887137 8269340.956091376021504,630618.681452411576174 8268939.572936235927045,630068.317889928817749 8267651.356451342813671,632418.272340573254041 8269839.27017458807677,634119.011520913336426 8271116.052168231457472,635046.636837693513371 8271661.967684770002961,637056.621563456486911 8272635.30685,639190.282243492547423 8273425.144769687205553,641787.699922171770595 8273790.656599882058799,643148.246738647925667 8273850.847403174266219,644477.958056174218655 8273668.744362223893404,645374.747874004417099 8272999.247746773064137,651590.049003463354893 8264311.785087327472866,652146.646457429626025 8263401.39311068225652,652548.621138684567995 8262307.540581278502941,652641.461594007909298 8260972.188437905162573,651961.188185768434778 8255451.52815346326679,651033.340230008587241 8254845.021650132723153,633129.492567253881134 8247390.224186033941805,626203.082530605606735 8249934.757349522784352,626481.269938096171245 8253692.621332230046391,624762.0517222849885 8256943.989919777028263,624613.66284105705563 8257671.441931375302374,623667.335849823430181 8261057.18404793087393,623259.238596576149575 8262259.899924050085247,622832.439668875304051 8262696.107467362657189,622201.703434039256535 8263024.591315007768571,621311.147507695364766 8263061.090418994426727,620587.570817538886331 8262877.722485880367458,620290.681735591962934 8262259.899924050085247,620810.209799124859273 8261894.956423005089164,621608.036589639494196 8261785.695396965369582,622053.203233322943561 8261312.176726019009948,622294.432569871307351 8260657.123239548876882,620667.943489889381453 8251025.25832487270236,620327.751126025337726 8249874.97861891053617,619833.047308941255324 8248844.634841575287282,616277.057495040819049 8241758.273560464382172,614699.994268971029669 8240305.251485222950578,613493.95890571794007 8240062.527785854414105,610649.18931849533692 8240364.953145058825612,608299.123548359726556 8241031.726952186785638,600414.030056998948567 8243271.523294094018638,599393.564284898340702 8243755.444745782762766,588570.860750994528644 8255694.537661084905267,587426.719024620717391 8257573.818136020563543,579294.162305228179321 8274094.679878973402083,577374.791644969489425 8287471.356361660175025,576511.175035396474414 8289736.860019963234663,576418.445899564423598 8291077.408468172885478,576604.015490716905333 8292418.19974922016263,590457.058202995918691 8316410.046808616258204,604557.564143306808546 8333184.059217867441475,609505.047592121525668 8338948.298980118706822,610278.161455681547523 8339684.520873728208244,611360.40954517305363 8340051.77596745826304,613432.176588327041827 8334717.660451551899314,613679.52849687053822 8333429.855313805863261,613122.931042904150672 8326813.644809202291071,612906.525952801806852 8325466.60383363161236,610308.996954631409608 8312803.290225265547633,607093.088185103726573 8299918.69119044393301,607774.920066214748658 8293466.252875459380448,610803.812091206782497 8294673.585117329843342,611731.437407986843027 8295222.996369487605989,612535.498089987901039 8295953.120143852196634,613803.204451140831225 8297722.092077150009573,614238.90893810626585 8298635.176159449853003,615132.915768667124212 8300955.944543217308819,616678.920856804586947 8305595.050352720543742,616895.437266398104839 8306938.475220559164882,616771.761312125017866 8308342.616086570546031,616524.409403584315442 8309565.794730065390468,615720.460041074547917 8311703.874308820813894,615132.915768667124212 8312620.226242296397686,614885.563860123627819 8313842.35220495890826,614947.346177514526062 8315064.900302571244538,615349.432178260758519 8317755.438105562701821,616462.515766702126712 8322895.761919976212084,616802.708130566054024 8324059.207224760204554,617792.227084228419699 8326139.101698081940413,618441.553674023947679 8327059.229061296209693,619214.556218092679046 8327794.266967128030956,620173.239672805182636 8328344.380663487128913,621688.409261992783286 8328283.744880983605981,632047.244477759464644 8326201.483330014161766,639128.388606610358693 8328344.380663487128913,639623.092423697351478 8329385.629808701574802,646364.266827663988806 8337905.480376842431724,647168.216190173756331 8338579.332352060824633,648095.841506953933276 8339194.286973289214075,655702.6362713300623 8342200.46278855483979,660526.555085365776904 8341647.549110042862594,661423.344903198885731 8341034.157166390679777,662783.780400180956349 8340788.10788187943399,674255.921843374380842 8342507.090376737527549,675338.281252357177436 8342937.008998402394354,701219.95154230191838 8364200.592473832890391,702024.012224302976392 8364939.337641714140773,702549.55154033692088 8365985.983022426255047,702766.067949930555187 8367032.776938728988171,701529.19708772469312 8366785.859374655410647,690922.898643923341297 8362415.855451660230756,687150.392420432181098 8360200.599619137123227,685418.817741142120212 8358909.891896876506507,683006.858334124321118 8356758.107235258445144,681708.093835039180703 8354974.948054731823504,679760.002746155485511 8352638.703349508345127,674348.650979203637689 8347416.853945689275861,673390.078843982424587 8346865.317896196618676,671225.582664999295957 8346005.269152809865773,666463.557487845770083 8344900.902188607491553,664948.276579166878946 8344961.674542512744665,650167.608550107805058 8348030.776395179331303,645436.530191392521374 8350979.730571517720819,634335.527930506970733 8362599.936332741752267,635108.530474575702101 8370050.09449643176049,638417.279699423816055 8379541.962877272628248,642406.191013020230457 8383181.481893667951226,648343.193415497429669 8386266.752950662747025,654094.737546313204803 8387996.367248709313571,656568.479270722018555 8388550.987729794345796,662381.805718926014379 8388550.987729794345796,663464.053808420430869 8388983.376140877604485,664268.114490418694913 8389724.608928915113211,664917.441080217016861 8390589.771254096180201,665783.284079606295563 8392875.346818389371037,666154.311942420084961 8394049.879584979265928,665752.448580656433478 8395161.631678953766823,662752.833581742714159 8400356.184223035350442,665968.742351267486811 8406480.925945356488228,668287.972622456145473 8410382.156674740836024,670916.337119576404803 8413912.699889324605465,671720.28648208337836 8414656.446298962458968,679976.519155749119818 8423461.296442979946733,675925.714205273427069 8438491.415977092459798,675832.985069441376254 8439859.274343805387616,675894.767386832274497 8441102.677178602665663,676265.906569137354381 8442284.933248195797205,677131.638249035342596 8443964.377221945673227,690706.382234332500957 8465835.970262030139565,704868.781811522785574 8479388.523122683167458,720329.834568309714086 8492716.772316992282867,721164.730749260634184 8493406.753647042438388,724040.558474412770011 8495159.95899510756135,726266.836970789707266 8495975.588138602674007,730781.510239399736747 8495849.944663491100073,734584.851961843669415 8494846.678661836311221,736718.512641879729927 8493781.760923016816378,738511.980958049069159 8492467.402877731248736,739223.201184726785868 8491652.163771353662014,739006.796094624442048 8490274.624628817662597,737646.249278148286976 8488460.616994647309184,735543.424097064882517 8484266.836297852918506,733595.33300818130374 8479826.511208830401301,732451.191281807492487 8476200.730425897985697,727101.733151737833396 8457603.377187637612224,724566.097790449624881 8433954.079670986160636,724071.393973362632096 8425075.232712985947728,724411.586337226559408 8422406.677062468603253,725370.047152956598438 8417444.937466036528349,725926.755926414160058 8416825.206242062151432,726297.783789227949455 8418003.566004473716021,726483.353380380547605 8421105.026901001110673,726174.107834957656451 8426626.508901184424758,726421.459743501152843 8431220.812948813661933,727349.19637977250386 8436751.686992963775992,732296.679828587337397 8456730.298629367724061,736038.239233640255406 8471015.734361508861184,736811.353097200160846 8473451.479755027219653,740274.613775268546306 8482765.263552153483033,740800.264410793781281 8483766.878434067592025,750478.826218326576054 8497667.586081262677908,753849.357760565704666 8502180.81302903778851,755333.580531312152743 8503812.144341226667166,757127.160166972782463 8505066.42773274704814,760744.93229826411698 8505945.276638805866241,771196.607969351229258 8508454.788392703980207,772588.101604268536903 8508516.927104746922851,776917.205281728878617 8507889.463291959837079,780596.871049899607897 8506760.525223830714822,781648.394959932542406 8506195.104890357702971,784091.189865900203586 8505442.031835343688726,785482.572181326220743 8505505.726081192493439,787430.663270207005553 8506634.696790041401982,788265.670770649099723 8507387.892394635826349,790584.78972234367393 8509710.092550029978156,791265.06313058314845 8510589.498467607423663,790863.088449328322895 8511719.026535239070654,789657.1644055636134 8512096.780290644615889,776948.152100169914775 8513226.54072424583137,776267.767372439266182 8522338.59018255956471,780287.736823968007229 8529385.54427694901824,780844.334277934278361 8530644.213815908879042,780751.605142102227546 8531714.729085221886635,779483.787461458123289 8531778.652162408456206,776577.012917864951305 8530078.760240664705634,773948.648420744691975 8527938.590934308245778,769032.111790368100628 8521836.029260100796819,766991.180246164090931 8519133.657708553597331,765414.228339585592039 8515928.317208310589194,758302.137392296339385 8509334.043689521029592,744603.71745272888802 8498356.228221153840423,742810.1378170682583 8497041.050126710906625,740862.046728184679523 8495911.976630812510848,738202.846732114558108 8495598.889733206480742,736996.811368861468509 8495975.588138602674007,735203.343052692129277 8497290.575136639177799,734461.176007573259994 8498106.666946297511458,733904.578553606988862 8499108.573733374476433,733502.715191843220964 8500174.265384612604976,733719.008962454390712 8501615.745808402076364,731152.538102213526145 8502807.788358265534043,719896.913068616529927 8498795.124665338546038,709661.642487628967501 8493719.746971433982253,706260.275446439976804 8490964.150830034166574,703013.419858471257612 8488022.113214673474431,701374.574315013363957 8486581.724886484444141,700261.379407080588862 8486143.333396466448903,699024.508544877637178 8486206.860242202877998,696736.225092130131088 8487083.451712969690561,695839.546593791106716 8487771.100751098245382,695097.379548672237433 8488584.331177894026041,693056.559323959401809 8491151.702350065112114,692499.961869993130676 8492154.237535655498505,691603.172052162815817 8489524.762386409565806,688820.296101819491014 8477575.629518415778875,685758.898785514873452 8462528.756849925965071,684645.703877582214773 8458911.50634454190731,683377.886196938110515 8455359.296778462827206,682357.531744325882755 8453302.488677559420466,681398.959609104669653 8452679.5038390327245,680347.547018563025631 8453240.815756382420659,665937.906852317624725 8452493.156866928562522,656754.048861874616705 8433518.81799584813416,654620.388181838439777 8410382.156674740836024,654403.983091736095957 8409019.767666101455688,652888.813502548495308 8405862.11708408780396,651590.049003463354893 8404067.263951621949673,647291.892144444049336 8400726.473243188112974,645560.206145665724762 8399427.092357685789466,640829.127786950441077 8396584.21600347571075,639777.826515899971128 8396769.374666815623641,635788.915202303673141 8400478.424300361424685,635046.636837693513371 8401283.834513384848833,632727.517885998939164 8407967.215577473863959,632817.464034558739513 8409524.921283403411508,633098.657068304019049 8413293.266019543632865,628522.201482300180942 8432587.319324677810073,627563.629347078967839 8431966.311215473338962,623852.905440975911915 8431220.812948813661933,621069.918171144207008 8431034.785571010783315,619709.371354670962319 8431220.812948813661933,618627.011945685255341 8431717.207107,617730.333447346230969 8432401.25737783126533,617173.847312871133909 8433332.956137264147401,617204.682811820995994 8434575.255673166364431,627099.761028944631107 8469518.443249419331551,631583.487479116418399 8479889.983387826010585,632387.436841623391956 8480638.861501038074493,634737.502611761912704 8481265.573880368843675,636778.322836474748328 8482265.407988838851452,638108.034154001041315 8484079.460710724815726,638602.737971085123718 8485143.19598856754601,638355.386062541627325 8486394.290170058608055,637613.219017422758043 8487207.367977697402239,636376.348155219806358 8486957.960465317592025,635417.776019998593256 8486394.290170058608055,626790.515483521856368 8480827.725006695836782,626141.188893723418005 8479951.880545001477003,625120.72312162281014 8477826.293438911437988,617204.682811820995994 8457415.110146898776293,606783.953959172125906 8439734.587462406605482,602362.121145882527344 8428674.301138937473297,601310.819874829263426 8429172.311698196455836,596796.146606219233945 8432401.25737783126533,590672.350098188850097 8442045.779747545719147,581367.599140742095187 8445296.738812210038304,581419.696662432514131 8446503.419907357543707,591558.564564394415356 8457737.792484818026423,591063.304149854113348 8458526.157425314188004,575305.362311122938991 8461718.632462777197361,574470.354810680844821 8463901.322288880124688,572429.423266476835124 8477263.099153118208051,572522.263721800060011 8480389.677161674946547,572738.780131393694319 8481765.361336825415492,573233.483948477893136 8482828.761155808344483,579294.162305228179321 8487583.860960559919477,584705.625391668407246 8495662.498525235801935,582200.936848821351305 8504752.723842449486256,582108.096393498126417 8505819.462198864668608,582139.043211939162575 8507387.892394635826349,582850.263438616879284 8509835.747792230919003,585478.627935737138614 8513478.426211116835475,587581.341797332162969 8516052.721969483420253,589189.240522349020466 8517561.12812315300107,590457.058202995918691 8517498.912671010941267,592281.473337606294081 8516242.499846762046218,595280.977017031633295 8512974.663895409554243,597198.00996798009146 8510275.558106619864702,600011.944056252832524 8506886.355817701667547,607742.526094393339008 8497603.959894379600883,609999.86272869980894 8495159.95899510756135,611638.708272157702595 8493719.746971433982253,614112.449996566516347 8492967.954084601253271,615503.943631480913609 8492780.581591894850135,617050.171358600840904 8492716.772316992282867,624193.097804839839227 8492716.772316992282867,627130.70784738578368 8492780.581591894850135,627934.657209892757237 8493532.355271315202117,634799.284929152927361 8501615.745808402076364,635325.046884169336408 8502682.027754560112953,636036.267110847053118 8505128.53772646188736,636252.672200949513353 8509835.747792230919003,636747.376018033595756 8551449.477800389751792,634613.826657491619699 8555933.438329050317407,630191.993844199227169 8559409.81919433362782,626481.269938096171245 8560231.043216234073043,619214.556218092679046 8555050.388683488592505,616091.487903888337314 8543435.579684773460031,596703.306150895892642 8526616.507730970159173,592126.850564894964918 8525106.235927596688271,587241.149433468235657 8523848.517769968137145,585695.144345330772921 8523912.37222002632916,584458.273483127821237 8524288.943649772554636,582479.124256311915815 8525420.585975850000978,578706.618032820755616 8529449.447023523971438,567049.01831796602346 8545013.903774200007319,566616.0968182728393 8546148.754546973854303,566337.909410779480822 8547410.310156811028719,566987.23600057780277 8548294.255531150847673,568100.430908510577865 8548736.154666231945157,569522.871361866011284 8548862.708589235320687,570759.742224069079384 8548483.280583579093218,572584.157358679454774 8547157.254736468195915,575552.714219663641416 8542363.57609998062253,577067.772489359951578 8540787.639095697551966,578737.676170750171877 8539338.430673971772194,580562.09130536345765 8538014.287516003474593,581644.228075363789685 8537825.532673187553883,581984.420439227716997 8538708.32102920114994,572336.694130647578277 8558777.978641113266349,571161.716905323904939 8560673.664095532149076,569337.30177071352955 8562318.081694405525923,568409.676453933352605 8562950.228212632238865,566245.068955459049903 8564025.480862164869905,559596.846326301223598 8567187.726380709558725,548681.302337076980621 8579789.028084997087717,549176.006154161179438 8580549.791019462049007,556288.208420944400132 8581120.757526831701398,557957.889463352155872 8579663.534911941736937,567945.808135796221904 8572884.630996899679303,580871.225531295058317 8565225.907329149544239,587364.825387738528661 8562191.294752173125744,588261.615205568843521 8561495.030067017301917,589776.784794756444171 8559914.96686153113842,590951.873339571291581 8557955.325326573103666,591075.549293841584586 8556565.260622266680002,590704.521431027795188 8555301.898018071427941,590766.303748418809846 8552333.911357259377837,593332.885928148054518 8545644.556571155786514,594507.86315347161144 8543750.944811491295695,596023.03274265921209 8542112.284129301086068,597259.90360486228019 8541797.216595765203238,603629.938826526631601 8540725.225992927327752,604866.809688729583286 8540725.225992927327752,605299.619868934387341 8547410.310156811028719,605175.943914664094336 8548862.708589235320687,602362.121145882527344 8556756.091693751513958,601774.576873475103639 8557703.497249960899353,597136.22765059187077 8563709.468123039230704,593456.561882418347523 8565860.127206742763519,592374.202473435550928 8566365.720702240243554,585725.979844280635007 8569276.751861358061433,584643.7317547891289 8569782.581714434549212,583715.995118517661467 8570478.040979696437716,583128.56216560152825 8571427.45425040088594,582695.640665905550122 8572694.974156156182289,582912.045756007893942 8574088.337218048051,583406.860892583266832 8575165.001532079651952,595621.058061404386535 8591079.910045016556978,597259.90360486228019 8592603.869134269654751,598373.209832286112942 8593048.455211011692882,604402.941370595362969 8594700.175252972170711,605701.705869680503383 8594953.281493378803134,607247.822277306346223 8594890.404237031936646,609257.695683580939658 8593746.132759056985378,610370.890591513598338 8593555.933581445366144,611793.219725377857685 8593620.628178466111422,613865.098088023019955 8594635.699726624414325,615658.566404192359187 8595970.139067381620407,615998.647448567906395 8596605.432511284947395,607866.202048663632013 8602450.987907737493515,595868.409969947766513 8597367.949104152619839,593920.430200555478223 8596223.289333522319794,592899.96442845207639 8594000.80624227412045,592312.420156047446653 8591397.108674747869372,591910.445474792504683 8588541.674610201269388,591539.417611978715286 8587335.813508817926049,591044.602475400548428 8586194.323557266965508,590240.541793402284384 8585495.768535550683737,585416.734298857860267 8582515.5000238455832,584303.539390925201587 8582388.362244611606002,572800.562448781798594 8581818.894314724951982,569708.329633527318947 8583530.855609161779284,569936.645909143495373 8587935.178571939468384,569059.003043728880584 8587145.781196678057313,567945.808135796221904 8586701.554273208603263,566677.990455152117647 8586447.135184548795223,565100.92722908523865 8586511.53846089169383,563709.544913659221493 8587145.781196678057313,562781.808277387870476 8587842.895076951012015,562008.805733319139108 8588604.497228885069489,561421.261460911715403 8589620.699590163305402,560555.418461522553116 8591841.849837835878134,554773.038831756799482 8613586.50317738391459,554649.25155799521599 8614732.055343251675367,554834.821149147697724 8616133.234290506690741,557039.948942272458225 8625823.200203359127045,557123.104601892409846 8633161.708701770752668,557463.185646267957054 8634373.55791100114584,557988.947601284482516 8635459.382244454696774,559287.600780878448859 8637311.8412701562047,561761.453824775642715 8639612.663971547037363,562719.914640508475713 8640251.539642764255404,564822.739821591880172 8641273.120894197374582,568193.160044339718297 8642616.119873970746994,570883.418178342166357 8642359.97365490719676,574810.435855056392029 8641720.683016322553158,576078.253535700496286 8641401.288832142949104,582973.939392890082672 8638908.746265264227986,583901.564709670259617 8638269.988283429294825,584643.7317547891289 8637439.939565783366561,585973.331752824131399 8634054.485508862882853,586715.498797943000682 8633288.125137321650982,588910.941795367281884 8632202.624133555218577,590333.382248722715303 8632011.419865014031529,603289.746462662704289 8631692.450827483087778,607340.440093647222966 8633926.446691896766424,608051.771639816230163 8636417.055818937718868,609412.318456292385235 8638269.988283429294825,610370.890591513598338 8638845.719041734933853,626203.082530605606735 8646325.610803812742233,637396.813927323208191 8648244.172715365886688,644756.256783155957237 8649523.49472594819963,648930.737687904853374 8650611.578931730240583,659104.114632010227069 8654133.35848175548017,680162.088746901717968 8652659.636164044961333,681584.417880765977316 8652404.749786766245961,695623.030184197472408 8647604.595942294225097,696705.389593180269003 8647028.172796174883842,697447.445318807847798 8646197.356225118041039,698034.989591215271503 8645238.166450314223766,698467.911090911366045 8644085.970260290428996,703693.693266710732132 8641018.63253173045814,709352.508261694456451 8640060.124131008982658,713217.743621020577848 8641146.795994088053703,725029.966108583845198 8648115.884359935298562,733657.226645063492469 8660665.901813838630915,740831.211229234817438 8660731.194554628804326,758363.919709684560075 8658615.592323815450072,759631.848709819838405 8658232.030785273760557,760714.096799314254895 8657654.996702531352639,761610.775297653279267 8656951.178493097424507,774072.32437501498498 8644918.618060924112797,775216.466101388796233 8642935.797461753711104,780256.790005526854657 8629459.139291200786829,793522.399764889618382 8609194.632492987439036,793769.751673430320807 8607922.36610871553421,793646.075719159911387 8606330.398445025086403,793213.154219463933259 8602070.369585348293185,792718.450402379850857 8599273.673941873013973,792316.364401633734815 8598065.810771960765123,790801.306131937308237 8593746.132759056985378,791914.501039869966917 8593810.600431364029646,793707.858036550926045 8595080.409527448937297,795099.462990956613794 8596922.871255623176694,796181.711080448119901 8599018.816480444744229,797356.688305771793239 8602768.909823700785637,797882.450260788202286 8605566.945157723501325,797975.179396620253101 8607158.74628215841949,798098.855350890662521 8611739.83088973723352,797882.450260788202286 8613012.763080948963761,796985.660442958003841 8613714.185396766290069,795563.331309090834111 8613967.722603056579828,791852.607402987778187 8615115.168854750692844,790770.35931349627208 8615687.239941459149122,789131.402450547087938 8617216.345896419137716,787245.20499854569789 8620019.927719179540873,781339.038095018477179 8634182.526574714109302,778927.190007491852157 8644022.898246001452208,778865.296370609663427 8645429.718024102970958,778958.025506441714242 8646708.545896241441369,779329.164688746677712 8647924.262154597789049,781462.825368779944256 8648948.762501949444413,782761.478548373910598 8649140.411655722185969,785760.982227799249813 8648820.461739126592875,788482.075860751559958 8649140.411655722185969,798439.047714754589833 8650676.551201542839408,814085.558743202826008 8654259.908753069117665,826949.193821310764179 8667592.271149190142751,824104.312914596870542 8670478.837500179186463,821445.112918529543094 8671120.426498282700777,819620.697783916373737 8672532.491144159808755,819064.10032994998619 8673560.459801316261292,818074.47005679924041 8675678.560721373185515,813126.986607981612906 8692266.963425669819117,813065.092971102218144 8693746.874335961416364,819775.209237139322795 8710118.048921881243587,829917.639362803660333 8724327.35627462528646,831340.079816162004136 8726137.165742436423898,833040.818996499292552 8727625.620998840779066,837060.677128536743112 8729953.326282968744636,838204.818854910554364 8730342.320289259776473,839225.173307519871742 8730923.520821446552873,840925.912487860070542 8732413.190639510750771,841637.132714537787251 8733319.86281693354249,842750.327622470445931 8735519.322052616626024,843183.249122166424058 8736750.209930812940001,842379.299759656656533 8736943.953908730298281,841358.833987556048669 8736362.504357295110822,830907.26963595720008 8729372.203400820493698,829051.796363414498046 8728076.897641589865088,826485.325503176427446 8725879.458580426871777,815786.297923542908393 8712635.105367565527558,813652.637243509641849 8709536.652457354590297,810343.999338149907999 8700961.406565168872476,809632.779111472191289 8690142.406530635431409,812384.819562862743624 8683581.2824776917696,818631.17883025680203 8669579.96870612539351,810189.376565438578837 8662333.01114466227591,795779.736399193177931 8658680.636031227186322,775556.658465252723545 8651059.715060131624341,774288.840784608619288 8651123.078433882445097,771969.721832911251113 8652084.656472489237785,771072.932015080936253 8652724.626703476533294,770640.010515384958126 8653876.57652797177434,769990.683925589430146 8656310.836811566725373,769928.901608198415488 8657720.031831003725529,770176.253516741911881 8659192.933196667581797,768815.595380774466321 8663037.349732775241137,762012.749978908221237 8666052.559718087315559,758580.436119278194383 8667527.147783648222685,754127.656487547443248 8667463.641516607254744,750262.309808733058162 8666693.758697602897882,748809.033856427646242 8666628.643369318917394,747386.59340306930244 8666885.64448812417686,733286.198782249703072 8673881.49865042977035,731461.783647639211267 8675294.099145846441388,730719.616602520341985 8676128.242394154891372,730651.60039364581462 8677798.203343782573938,730707.26013904158026 8678761.460883058607578,731430.83682919817511 8679957.09519780986011,732142.05705587589182 8681589.757498826831579,733657.226645063492469 8683260.046826278790832,737027.646867811330594 8686281.796522589400411,739099.525230456492864 8689048.397570079192519,745098.421269812970422 8704376.503893997520208,745469.44913262675982 8705667.590494615957141,747850.46172120643314 8716055.694074962288141,747603.109812662936747 8717348.857580045238137,747201.135131407994777 8718510.855070536956191,746242.451676695491187 8718574.576137965545058,745531.34276950894855 8717671.603099035099149,733750.067100383923389 8687762.110974250361323,725848.387004897347651 8682575.038345418870449,727870.616874647908844 8672889.536642007529736,724071.393973362632096 8656757.709586584940553,723391.120565125951543 8655797.128407290205359,716186.30048200476449 8652084.656472489237785,715042.158755630953237 8651636.457289479672909,706445.733718101284467 8651188.055265879258513,703941.045175251318142 8651956.300469554960728,702858.908405250986107 8652467.894405402243137,694355.212503553368151 8656886.150230012834072,664051.709400316234678 8661820.723779480904341,639994.231606002431363 8660986.372506504878402,619307.396673416020349 8656310.836811566725373,618194.201765483361669 8655862.146947605535388,614885.563860123627819 8652788.004561016336083,612875.57913436065428 8650034.917833529412746,608762.991866493946873 8646197.356225118041039,601929.199646186549217 8642040.321325452998281,600816.004738253890537 8641592.739573219791055,592807.123973131529056 8647924.262154597789049,587519.559479941264726 8651316.397732738405466,574346.678856410551816 8656374.015302328392863,569491.924543424975127 8658423.924351498484612,562163.317186542088166 8662333.01114466227591,561544.937415184802376 8663294.454907344654202,561266.638688200269826 8664576.42355196736753,561792.289323725504801 8665666.759241154417396,563122.000641251797788 8667527.147783648222685,566028.663865356589667 8669324.489379080012441,567481.939817662001587 8669451.303945960476995,570326.820724375895225 8669067.171164097264409,574717.706719224341214 8667014.26390821300447,575490.820582784246653 8666181.164420468732715,578119.185079904505983 8664000.733080124482512,579046.810396684682928 8663359.540422081947327,580314.628077328787185 8662974.113405900076032,581582.445757972891442 8663230.985550815239549,583963.34702706115786 8667335.014156810939312,583344.96725570387207 8668297.118748780339956,580438.415351090370677 8671762.072055228054523,578737.676170750171877 8673237.817313881590962,571718.314359290292487 8677476.066670652478933,569182.678998002083972 8677541.51036810874939,566461.585365049773827 8677155.100450452417135,558761.950145353213884 8675294.099145846441388,556040.856512400903739 8675549.788105849176645,555267.742648843792267 8676385.810377150774002,551216.937698365189135 8684289.532223803922534,551402.50728951767087 8685446.256950665265322,575614.496537054656073 8702830.844234123826027,602795.042645575711504 8711472.188491672277451,606814.900777613162063 8712117.404301246628165,611112.946317141177133 8711472.188491672277451,614761.776586362044327 8710247.435125809162855,619183.720719142816961 8709084.900262476876378,626543.163574978359975 8708762.303671520203352,627192.490164773887955 8709084.900262476876378,625337.128211722359993 8710440.473403656855226,622956.115623145597056 8711344.406777333468199,606351.032459476031363 8712635.105367565527558,601867.306009304360487 8712764.53639760799706,585942.496253874269314 8710311.083762690424919,584643.7317547891289 8710052.543679069727659,575119.792719970457256 8707020.900986129418015,572831.509267222951166 8706117.505187459290028,570883.418178342166357 8704957.255572626367211,569059.003043728880584 8703538.882661705836654,565781.311956813093275 8700444.536319050937891,564791.681683659553528 8699865.768773872405291,562534.456368844374083 8698963.261716607958078,561112.015915488824248 8699156.232477720826864,556999.428647622116841 8706182.974971681833267,551031.479426703881472 8720125.682099934667349,550907.803472433588468 8721224.146376987919211,552546.649015891482122 8722775.585594380274415,553536.167969553847797 8723421.806133326143026,563647.651276777032763 8728400.353108618408442,564760.846184709691443 8728853.308124784380198,565904.987911083502695 8729242.476105473935604,577036.936990412999876 8730665.876688696444035,594044.106154825771227 8730406.37818693369627,615318.374040328431875 8724908.075574155896902,616617.138539413572289 8725231.389927670359612,625800.996529859490693 8730276.632413804531097,641725.917604780755937 8730406.37818693369627,642467.973330408334732 8729565.750586081296206,643581.168238340993412 8729048.704641422256827,645003.720011190627702 8728853.308124784380198,646147.750418073148467 8729242.476105473935604,646209.532735461252742 8730536.126278530806303,642437.137831458472647 8736362.504357295110822,641694.970786342513748 8737203.686198832467198,638881.036698069772683 8739212.378802904859185,636500.024109490099363 8740119.900648482143879,635077.694975625840016 8740377.880538776516914,632325.543204744113609 8740313.734591972082853,628274.738254268304445 8739666.008923718705773,627130.70784738578368 8739212.378802904859185,626295.811666434863582 8738498.755893170833588,625615.53825819818303 8737527.548544954508543,624100.257349519408308 8735844.741052189841866,621595.568806669441983 8733513.515265394002199,619802.211809991393238 8732153.629681499674916,618658.070083617581986 8731700.235763331875205,608299.123548359726556 8729889.272382065653801,606876.683095001266338 8730083.066279066726565,577562.587625938234851 8741285.548136126250029,572831.509267222951166 8744655.711891274899244,572058.395403662929311 8745497.855521259829402,571470.962450746796094 8746472.231216695159674,571161.716905323904939 8747768.956079060211778,571068.876450003474019 8749195.994812631979585,572491.316903359023854 8753673.220754725858569,584427.326664686668664 8753543.058366280049086,587086.526660756790079 8755036.444035874679685,584266.470000488916412 8757646.517257565632463,580283.681258887634613 8759648.248661004006863,574223.002902140142396 8761791.602314576506615,573109.807994207483716 8762310.986661938950419,573140.754812645842321 8763285.751580465584993,579634.354669092106633 8764715.846702108159661,587055.691161806927994 8764456.999875668436289,592838.070791572681628 8763612.418393967673182,594105.888472216785885 8763221.402761217206717,594569.645470862626098 8762377.199141819030046,589009.904822682845406 8763000.047183837741613,588137.939251298550516 8762922.597726603969932,587451.431951575446874 8762649.308366073295474,587414.362561141955666 8762103.930334772914648,587989.550370070617646 8761674.862935228273273,589715.002477365429513 8761440.92193977534771,593481.274809375870973 8761363.255197957158089,594353.240380760282278 8761440.92193977534771,595039.747680480475537 8761713.931816887110472,595169.54620674601756 8762571.628681134432554,594105.888472216785885 8763221.402761217206717,592256.76041064877063 8764521.359661048278213,589585.092631611507386 8765769.584400555118918,588063.689150940394029 8766238.221529725939035,586319.646688680397347 8766471.380955884233117,582757.422983296448365 8766901.902853511273861,578286.164316094713286 8766667.793158460408449,569739.27645196847152 8767251.910946689546108,582726.58748434658628 8770049.773592194542289,582448.288757364847697 8771350.72126405313611,577933.72680824319832 8771220.241185249760747,569708.329633527318947 8771286.300823897123337,556319.043919894262217 8771416.782091779634356,554680.309695924748667 8771481.203691530972719,553752.573059656191617 8771806.365812668576837,552948.623697146307677 8772651.902456713840365,552515.70219745032955 8773824.665027434006333,549825.444063450791873 8781640.037756308913231,549701.768109177588485 8782812.37884127907455,550072.795971991377883 8784051.320407550781965,552763.054105993825942 8792856.253026844933629,554185.494559349375777 8797033.991152079775929,554711.145194874610752 8798144.401987317949533,555700.664148536976427 8798797.373907249420881,564142.46641335519962 8804352.014372773468494,587890.587342755054124 8824972.929529178887606,596115.873197979759425 8836256.548490468412638,597136.22765059187077 8836847.962575476616621,602238.445191609323956 8838161.207182940095663,603846.343916628975421 8838096.189461128786206,622925.28012419573497 8834352.391413096338511,631428.864706404972821 8831268.328604243695736,632387.436841623391956 8830547.706519497558475,634706.555793320760131 8828054.308306338265538,639499.41646942414809 8821826.104042986407876,666525.339805233874358 8819010.057354129850864,674812.519297340768389 8819074.90372054092586,693767.779550637118518 8820580.917732937261462,695375.678275653976016 8820516.057866772636771,696829.065547453472391 8820253.322393847629428,700694.300906776683405 8819074.90372054092586,701776.548996268189512 8818551.433281240984797,703662.857767760870047 8817175.499716689810157,705208.862855898332782 8815474.098628239706159,706136.599492169683799 8814753.162791708484292,707249.794400102342479 8814230.00490241125226,712537.470212781103328 8812789.866481326520443,720144.264977157232352 8812069.19799399189651,724597.044608890661038 8813248.361131383106112,725617.399061500094831 8813902.696970483288169,727318.138241840177216 8815407.634718462824821,728709.743196245864965 8817306.574640529230237,728802.47233207791578 8818878.951566927134991,728709.743196245864965 8820384.688937624916434,728802.47233207791578 8821694.947214672341943,729049.824240621412173 8823136.62343423999846,729575.474876146647148 8824250.810609880834818,730286.695102824363858 8825169.046820482239127,732884.224100994761102 8827594.874408883973956,734028.254507877281867 8828054.308306338265538,736656.619004997541197 8828578.466892506927252,738140.953095235279761 8828645.051918691024184,741202.239092048606835 8828317.091173445805907,743954.279543442069553 8827661.450380336493254,747788.679403815418482 8826479.936000328511,750169.691992392181419 8825496.864851128309965,752921.732443782733753 8827922.802405828610063,744480.0414984584786 8831203.609035016968846,740460.18336642102804 8831924.532711200416088,735203.343052692129277 8831268.328604243695736,731090.644465334247798 8830677.370682213455439,729049.824240621412173 8829497.252712942659855,728214.928059670492075 8828709.984715459868312,727503.70783299265895 8827791.298896379768848,726947.110379026387818 8826678.218642549589276,726019.485062246210873 8824250.810609880834818,725617.399061500094831 8823006.858449114486575,725370.047152956598438 8821498.688200611621141,724566.097790449624881 8818943.560956517234445,723731.312928989878856 8818223.92982067912817,722556.224384177941829 8817765.355573825538158,714980.265118748764507 8818682.7689269464463,710620.325942341471091 8819402.445703979581594,706785.926081965211779 8820580.917732937261462,692345.339097281685099 8824578.587027912959456,662493.236529211630113 8828290.174969188868999,660637.763256668928079 8828251.453587887808681,658040.456897480995394 8826992.413340860977769,656834.421534227905795 8826283.783163458108902,646797.077007868676446 8825431.960893725976348,645807.669373697601259 8824776.581563053652644,644354.282101901015267 8825037.593367375433445,641694.970786342513748 8827267.197352714836597,640118.018879764014855 8828973.027536425739527,637520.489881593617611 8832448.971891494467854,637860.682245457544923 8833106.700732227414846,641354.88974196696654 8834419.265931459143758,645281.907418681192212 8835271.911177400499582,646630.097771678585559 8836230.31181601062417,649283.286515247542411 8836427.916498737409711,650155.252086629043333 8836270.96688362583518,653086.628237688564695 8836151.838727310299873,654756.420599587610923 8836348.495785761624575,656055.185098672751337 8836979.630888218060136,655888.205862482544035 8837570.39489727653563,655108.96942693029996 8837805.862914714962244,653364.926964673097245 8838081.767427522689104,649468.744786908850074 8838279.186287658289075,643674.008693664334714 8839081.211511770263314,616060.541085447184741 8841840.034801328554749,604866.809688729583286 8843746.165339693427086,600939.680692524183542 8842892.283514874055982,599764.5921477121301 8842431.905854679644108,592312.420156047446653 8838686.098933130502701,588849.048158485093154 8837307.984756756573915,574532.248447563033551 8833762.835406757891178,573078.861175766447559 8833631.461940139532089,568162.324545389856212 8837832.81456246599555,567883.914498916943558 8839212.920503525063396,568255.053681221907027 8840459.427279630675912,571872.825812510447577 8851111.385628135874867,572398.587767526973039 8852230.129592351615429,573233.483948477893136 8853018.06806218996644,574377.514355360413902 8853150.031281244009733,575150.628218920319341 8852295.03769195638597,577500.805308547220193 8848807.882354237139225,581118.57743983855471 8849993.051660731434822,600846.840237203752622 8862039.76041224040091,601527.113645440433174 8862962.81009859405458,601248.926237949868664 8864280.572444029152393,600475.812374389963225 8865138.647070020437241,587643.235434214351699 8876880.730906281620264,579603.40785065095406 8882099.888952668756247,577346.071216344600543 8883156.354403112083673,569491.924543424975127 8883751.621022421866655,567574.780272982432507 8884809.994040377438068,566956.289182136766613 8885801.407762518152595,564791.681683659553528 8895525.717217918485403,564853.575320541742258 8896849.438554175198078,565317.44363867607899 8901486.523885285481811,565688.471501492662355 8902744.067423172295094,566214.233456509187818 8903539.448107874020934,573326.213084309943952 8909572.310333408415318,574501.190309630706906 8910036.751128090545535,575800.066128207137808 8909639.646424487233162,578181.078716783900745 8907118.792474433779716,584179.8634366519982 8899961.641030279919505,606320.085641034995206 8872788.701327998191118,608175.447594086523168 8869753.495657734572887,609041.179273987305351 8867445.702720070257783,608979.396956596290693 8865797.696720067411661,608107.542704703169875 8861366.584991125389934,608299.123548359726556 8860459.866106323897839,609288.531182530801743 8861051.604085324332118,611269.572840686305426 8863945.533368345350027,612442.65763466747012 8866324.599982975050807,617637.604311516974121 8877740.304348198696971,613493.95890571794007 8880513.934854524210095,608144.500775648280978 8881902.22029372677207,603629.938826526631601 8884016.67559527605772,599950.16173886472825 8886925.301615785807371,599517.240239168633707 8888115.077577939257026,599393.564284898340702 8889570.070280013605952,602795.042645575711504 8900955.139302244409919,603629.938826526631601 8901750.322696166113019,604650.293279135948978 8902347.364136530086398,607309.604594697360881 8902944.216449748724699,610432.7842283929931 8902944.216449748724699,632665.624249116750434 8900094.465206857770681,650693.259185633040033 8906257.382463213056326,652177.593275870778598 8906323.016899770125747,654775.010954549885355 8905529.238304112106562,655733.583089771098457 8904864.64123754017055,658083.648859909619205 8902281.765876078978181,658702.139950755285099 8901286.415310340002179,659135.061450451379642 8900094.465206857770681,659413.360177433118224 8898770.148253750056028,659598.929768585599959 8895789.536423448473215,659537.036131706205197 8894135.046643389388919,659011.27417668979615 8886131.750603951513767,662381.805718926014379 8884479.711698280647397,672617.076299913693219 8882562.802086908370256,697107.252954943920486 8877080.163744458928704,698065.936409656424075 8876353.056766074150801,698839.050273216329515 8875495.312063539400697,699271.86045342113357 8874372.958867967128754,699859.404725825763308 8873316.114995278418064,700817.97686104697641 8872656.378809574991465,701962.118587420787662 8872393.641464062035084,707682.715899795526639 8872261.326185811311007,708548.558899187482893 8873053.353640556335449,708424.882944914395921 8874175.501689065247774,707497.257628134218976 8874900.48828793130815,698529.804727790644392 8879325.649054635316133,697416.498500369605608 8879853.540549458935857,695963.222548061399721 8880118.452001132071018,687490.58478429610841 8881504.758547542616725,681615.364699207013473 8882099.888952668756247,678894.271066257613711 8883223.444348786026239,677935.587611545110121 8883949.578275077044964,677162.585067476378754 8884809.994040377438068,659598.929768585599959 8906455.958298206329346,658980.438677739934064 8907517.668044602498412,658733.086769196437672 8908843.592587079852819,658794.980406078626402 8910501.460654702037573,661979.831037673982792 8919064.305309662595391,662536.428491640253924 8920193.634693099185824,665350.362579913111404 8924047.790352415293455,668875.516894863569178 8928833.849627917632461,670607.09157415071968 8930362.937658913433552,673668.377570966957137 8932226.728074623271823,699550.159180402872153 8947146.99956089630723,700725.247725217719562 8947612.188792387023568,702054.847723252838477 8947813.588088059797883,703198.989449623739347 8947278.776121420785785,703972.103313183644786 8946412.551442923024297,719494.938387361704372 8918000.893710942938924,721133.783930819598027 8914815.423239689320326,729111.71787750069052 8898504.551118262112141,730595.940648247255012 8895194.943987760692835,730843.292556790751405 8893871.526198145002127,730750.563420961494558 8892215.570557190105319,729637.368513028835878 8889966.07146736420691,727503.70783299265895 8887123.345949210226536,726947.110379026387818 8885999.183252224698663,726854.381243194337003 8884347.174691470339894,727812.953378415550105 8884016.67559527605772,732698.654509842279367 8888974.085411451756954,733409.874736519996077 8889900.585706166923046,733657.226645063492469 8891355.938554370775819,733162.522827976499684 8894069.523029506206512,731616.406420350656845 8898902.950489228591323,721968.680111770518124 8921189.686045296490192,720762.756068005692214 8923182.68033055216074,717546.847298478125595 8928169.015467956662178,715042.158755630953237 8930762.862326741218567,714454.72580271482002 8931826.482612419873476,713403.201892681885511 8934023.19630684517324,711145.976577866706066 8941413.814557243138552,710898.513349831919186 8942747.671177418902516,710805.895533491158858 8944279.716441599652171,710898.513349831919186 8945879.763426529243588,711145.976577866706066 8947346.465565644204617,711547.951259121531621 8948679.981371901929379,712104.548713087919168 8949813.724090423434973,712815.768939765635878 8950748.079586775973439,713681.611939154798165 8951547.096560303121805,715722.43216386763379 8952749.271464308723807,745469.44913262675982 8965504.927803268656135,746953.67190337611828 8965304.957883056253195,764486.491703314241022 8958957.418353701010346,765445.175158026628196 8958221.764177406206727,766218.177702095359564 8957354.461998803541064,766465.640930130146444 8956019.338269302621484,766372.800474806805141 8954351.202312037348747,765135.929612603853457 8950414.761783162131906,764888.577704060357064 8948947.434442097321153,764795.737248739809729 8947346.465565644204617,764950.360021451255307 8944345.69815238378942,765785.367521890555508 8941947.951177440583706,771011.038378198747523 8932559.205008920282125,772557.266105318674818 8930762.862326741218567,775587.605283693759702 8928768.00987465120852,777102.774872881360352 8927038.435525486245751,778123.240644981968217 8924845.525318814441562,778803.514053218648769 8922319.348573172464967,779298.217870305641554 8919662.782409502193332,780225.843187085818499 8908047.626634960994124,780380.577279288438149 8905064.849131306633353,780256.790005526854657 8903406.560467747971416,779452.840643017087132 8900824.207192406058311,777999.564690711675212 8898968.518024208024144,776267.767372439266182 8897446.074417216703296,773392.050966778304428 8893671.39051953330636,772835.453512812033296 8892546.445418436080217,772371.696514166193083 8890231.354413548484445,772278.856058845645748 8888643.612422840669751,772340.74969572504051 8887123.345949210226536,772588.101604268536903 8885801.407762518152595,773021.02310396451503 8884610.347503501921892,774350.73442148801405 8882562.802086908370256,775896.739509625476785 8880844.273582506924868,776824.476145896827802 8880118.452001132071018,779576.516597287380137 8879456.191601349040866,781215.362140748067759 8879325.649054635316133,784029.407548509305343 8879655.933401210233569,786379.361999156535603 8880513.934854524210095,787399.827771257143468 8881109.221400368958712,789286.136542749707587 8882430.300279054790735,788667.645451904041693 8885470.842060027644038,786935.959453122923151 8883949.578275077044964,785915.493681019404903 8883355.960719441995025,783565.427910883794539 8882495.718282306566834,780442.359596679336391 8882495.718282306566834,777257.397645592805929 8884347.174691470339894,775896.739509625476785 8886264.320391142740846,775649.38760108477436 8887586.343392539769411,775773.063555355067365 8889239.331886490806937,776329.661009321454912 8890363.999544491991401,778648.779961018823087 8893142.487237680703402,779514.734279899275862 8893936.809751423075795,781648.394959932542406 8896716.912476174533367,782792.425366815063171 8898968.518024208024144,783287.129183902055956 8901948.774454571306705,783503.645593492779881 8905196.096893388777971,783287.129183902055956 8909639.646424487233162,782792.425366815063171 8912360.120631596073508,781833.853231593850069 8920791.966437695547938,781772.070914205629379 8922319.348573172464967,782328.668368172016926 8923383.397655621170998,783379.969639222486876 8923980.319520125165582,790832.141630887170322 8924380.129310131072998,811859.280246828799136 8925442.568327898159623,813343.503017575247213 8925177.901073874905705,815569.781513949390501 8924047.790352415293455,816528.353649170603603 8923315.933044137433171,817301.467512730509043 8922452.585322676226497,819589.63964598684106 8919794.057105202227831,822527.249688529875129 8914682.327602095901966,823300.363552089896984 8913820.01343554072082,825402.966094193630852 8913156.562889166176319,825495.806549514061771 8914483.525050740689039,823671.391414903686382 8919064.305309662595391,823083.847142496262677 8920060.43970213457942,819589.63964598684106 8924911.329236634075642,816930.439649916719645 8926905.113951431587338,814518.480242898920551 8927902.332941845059395,811395.300609203288332 8928302.360432967543602,810065.700611168169416 8928035.672970941290259,805334.622252453002147 8926373.767017278820276,802798.986891164793633 8925709.159820565953851,799830.430030180606991 8925575.862841237336397,798346.207259434158914 8925842.459265982732177,776484.28378203290049 8933025.36926150508225,775092.790147115592845 8934622.917335338890553,774505.357194202253595 8935620.965736689046025,770083.413061418570578 8944213.975265672430396,769805.114334436831996 8945546.670949917286634,770701.904152267146856 8946279.110743328928947,771876.881377590820193 8946679.920287111774087,774721.762284301803447 8947013.305224066600204,775896.739509625476785 8947480.166089735925198,776298.825510371592827 8948412.538237916305661,775680.33441952301655 8949480.449547931551933,769001.164971927064471 8959157.211934408172965,763125.944886840879917 8966507.508209196850657,756044.800757989985868 8972927.96015409193933,754900.659031616174616 8973464.681971604004502,743706.92763489857316 8971363.071371113881469,743001.941299704369158 8971082.019981440156698,741944.294817676302046 8970158.74592805467546,739940.6553028881317 8968193.390448775142431,728895.201467907172628 8963166.517662664875388,725339.211654009530321 8961828.631588099524379,711764.356349221081473 8959291.132036617025733,710280.133578474633396 8959157.211934408172965,708795.910807728185318 8959425.054631214588881,696550.766820468823425 8966373.453721106052399,696210.685776096070185 8969851.9773901514709,709105.156353153870441 8974868.827775482088327,716526.38152637751773 8977078.961176702752709,723391.120565125951543 8977948.885922387242317,724906.290154313552193 8978014.936045298352838,733471.657053910894319 8976876.741045366972685,736805.119205716648139 8977292.274629674851894,739606.696830510627478 8977332.768745532259345,740218.842710381490178 8977694.092409946024418,740256.023420306155458 8978296.499579155817628,738264.629049505572766 8981766.083974720910192,729822.826784690143541 8985853.897129219025373,728338.60401394078508 8986122.735890431329608,723514.796519396360964 8986189.102482041344047,719000.123250786331482 8985988.31525307521224,702951.637541083036922 8984513.714555369690061,697694.908546842634678 8985787.774952884763479,695530.301048368215561 8995513.543181424960494,695406.625094095012173 8996721.398753024637699,695963.222548061399721 8997862.740568624809384,697416.498500369605608 8999744.102363292127848,700014.027498537208885 9002162.890925604850054,702085.794541691080667 9003371.86491802893579,704157.561584844952449 9004447.969686148688197,705672.842493523727171 9004985.114660678431392,728431.444469264126383 9005791.875413047149777,729915.66724001057446 9005522.299803121015429,730874.239375231787562 9004850.340728146955371,734894.097507266444154 8998938.020430382341146,746304.345313577679917 9011641.301544955000281,749829.499628528254107 9014803.553478822112083,752210.512217105017044 9015611.417949881404638,775247.524239318212494 9014938.514314906671643,789255.078404817380942 9014400.624457931146026,819682.48010130727198 8999474.753588698804379,835669.183493619551882 8989073.141677305102348,836596.808810399728827 8988334.400714036077261,837215.299901248188689 8987262.637047415599227,837617.274582503130659 8986054.680603696033359,839256.120125961024314 8978484.054009823128581,842657.598486641189083 8988872.273873772472143,843245.142759048612788 8990012.611177692189813,844265.608531149220653 8990614.844082923606038,845471.421255422756076 8991018.373191734775901,855088.312065053032711 8992494.309056343510747,866034.69155322725419 8996050.262260094285011,864457.628327160258777 8997460.760667283087969,861334.448693464626558 8997862.740568624809384,859819.279104277142324 8997796.50781681202352,846770.297073999186978 8995244.594577923417091,844234.550393216894008 8994641.73198770545423,840647.613760878215544 8993366.101337961852551,837617.274582503130659 8993231.545170499011874,834648.717721518944018 8993767.852246452122927,832051.300042839837261 8994641.73198770545423,830134.155772397294641 8996118.412260284647346,829361.041908837389201 8996990.644333219155669,825866.834412327967584 9001758.977371033281088,825434.024232123163529 9002969.334777677431703,824722.692685954156332 9007001.218321099877357,824815.533141277497634 9008345.601870270445943,825402.966094193630852 9009489.034212788566947,837431.816310841822997 9018978.821859944611788,846244.535118982661515 9025109.306112393736839,849398.661571119446307 9026862.632546117529273,866096.473870618152432 9032864.798858029767871,867302.509233871358447 9033270.466091014444828,871075.015457365312614 9034282.547916296869516,875311.278679505223408 9034821.929711643606424,889164.321391781326383 9036104.946627585217357,890679.490980968927033 9035834.230401890352368,891792.685888901585713 9035226.006692318245769,898038.933836804353632 9031245.030590787529945,899925.242608294123784 9029761.110410852357745,903357.667787415441126 9026457.327340157702565,904872.837376603041776 9024637.376512294635177,905831.186872841790318 9023896.909926295280457,906728.08801016327925 9024637.376512294635177,906697.141191722243093 9026188.673568112775683,906449.677963690366596 9027536.654812691733241,906047.814601926715113 9028749.908761706203222,904872.837376603041776 9030841.177708134055138,903357.667787415441126 9032662.70254335552454,895719.926204598275945 9040155.244796512648463,890524.979527748655528 9042587.689274804666638,856325.071607764810324 9034755.355170618742704,853758.600747526739724 9034078.711028456687927,841173.375715894741006 9026929.376616073772311,839379.796080231317319 9025379.618069352582097,837462.651809791685082 9024030.10093579813838,834308.525357655016705 9022211.007858127355576,832947.978541178861633 9022009.211294723674655,831278.297498771105893 9022077.608052125200629,822650.92564280028455 9023019.706289296969771,820177.183918391470797 9033404.074092185124755,829732.069771651178598 9040492.994463082402945,833906.661995891365223 9042925.553486179560423,839472.636535554658622 9045494.474358538165689,844914.823801456368528 9046508.282248791307211,850542.691978001967072 9047251.086041286587715,851748.6160217638826 9047657.567602682858706,855057.253927120706066 9049279.098446056246758,850573.638796440209262 9050090.853594042360783,848903.846434541163035 9050226.479713907465339,847543.188298576627858 9050023.893708642572165,830752.535543754580431 9045832.475516073405743,829701.234272701316513 9045223.403585951775312,827907.765956531977281 9043667.986331023275852,826145.244458800880238 9042114.608822843059897,825402.966094193630852 9041168.298314495012164,823300.363552089896984 9039953.186183283105493,815600.728332390426658 9037927.565241146832705,801871.361574384616688 9035698.876119151711464,777659.3723268477479 9032325.321257578209043,776144.091418168973178 9032256.826778033748269,774659.868647422408685 9032527.408070914447308,773701.296512201195583 9033270.466091014444828,776380.756655596429482 9051107.016152169555426,778344.877751152496785 9065162.256662024185061,772371.696514166193083 9077264.577229799702764,773608.567376369144768 9083447.07013762742281,783287.129183902055956 9092286.021183278411627,789286.136542749707587 9096301.05312742292881,791543.361857565003447 9097321.82993371412158,807993.933568014297634 9103179.22078412771225,809509.103157201898284 9102905.958926726132631,812415.766381303896196 9100726.124788448214531,821661.406689140712842 9089769.321905542165041,828402.581093107350171 9079845.835634749382734,829175.472317684791051 9078894.531615525484085,830505.183635211084038 9078487.986084032803774,832020.353224398684688 9078555.212406054139137,837215.299901248188689 9080049.266304900869727,842472.028895488707349 9083038.309250919148326,844141.821257387637161 9084805.860142862424254,845904.342755115940236 9088204.208185978233814,846646.62111972598359 9089223.831270849332213,848285.35534369549714 9090923.85227020457387,851470.428614270524122 9092693.350708791986108,855119.147564002894796 9093986.769428942352533,859231.846151360892691 9094667.1328563131392,862447.643601397285238 9094599.755127843469381,865261.689009158522822 9093917.438219003379345,866220.149824888445437 9093169.781749462708831,866807.694097295985557 9092080.528189927339554,866529.39537031413056 9090583.717833237722516,865941.962417397997342 9089427.528477974236012,864457.628327160258777 9087524.213748278096318,862633.213192549883388 9085961.548258410766721,860685.233423157478683 9084600.581673391163349,858706.084196344367228 9083241.830606654286385,856603.481654240633361 9082019.321731196716428,854809.902018580120057 9080457.856654841452837,854067.846292952424847 9079506.471364295110106,853449.355202103964984 9078351.824157370254397,854593.496928477659822 9077809.157808469608426,860499.663832004996948 9080049.266304900869727,878372.564676318550482 9088543.984817065298557,879454.812765810173005 9089156.749564645811915,884278.620260354597121 9092625.99155137874186,886567.015032593393698 9093646.489469578489661,888082.073302289703861 9093713.858228014782071,889597.242891477304511 9093373.591238133609295,890741.273298359825276 9092829.785561922937632,892813.151661004987545 9091469.472425974905491,896833.121112530934624 9088407.631595533341169,899677.890699753537774 9086164.907976193353534,900110.812199446721934 9085282.011400271207094,902522.548967484966852 9079573.462749324738979,902955.470467178151011 9078351.824157370254397,902708.118558637448587 9075295.584369966760278,902739.176696566981263 9073802.521360902115703,906573.465237451950088 9058280.49957288429141,907222.791827247478068 9055706.995230322703719,908552.391825282480568 9053743.914832880720496,910098.50823291123379 9051917.273372020572424,911057.191687623620965 9051173.98615163192153,914427.611910371575505 9049414.709215039387345,922467.328174443682656 9046913.018027007579803,924724.776128238532692 9045696.932462204247713,945040.471878519863822 9031245.030590787529945,945782.750243129907176 9030302.095024921,948472.897057641181163 9026390.58765952847898,949802.497055676183663 9024435.511730995029211,950389.930008592433296 9023356.407841380685568,951194.102010081871413 9020932.412067813798785,951595.965371845522895 9015881.372528620064259,954008.036098354612477 9020392.133126279339194,953946.031141981249675 9021874.11748643219471,953636.896916049532592 9027805.359044533222914,953420.491825947188772 9029155.586235366761684,952832.947553539765067 9030233.619852852076292,952059.9450094710337 9031110.005690952762961,950359.205829133745283 9032797.999566616490483,927445.869761190842837 9051850.296430770307779,926487.297625969629735 9052593.653758751228452,924044.50272000185214 9053677.164441654458642,918447.581361897406168 9055099.033401023596525,917303.328316032420844 9055706.995230322703719,912572.361276811221614 9059498.721213491633534,911026.13354969129432 9061327.539341848343611,910438.700596775161102 9062343.588443674147129,909974.94359812932089 9065122.240113692358136,909356.45250728353858 9072039.636760696768761,909665.586733215139247 9073532.332436364144087,910098.50823291123379 9074889.24300335906446,910129.566370843560435 9079303.056107304990292,908243.2575993508799 9085485.351824101060629,907841.282918096054345 9086708.207743916660547,906295.166510467301123 9088543.984817065298557,891235.977115444024093 9099227.751204712316394,886968.878394357045181 9101272.492515590041876,885175.410078187705949 9099704.617297854274511,883938.539215981960297 9099296.888689894229174,879516.706402692361735 9098956.356255257502198,878186.995085166068748 9099364.310639448463917,877073.800177233410068 9099977.756967414170504,876826.448268689913675 9101339.687835801392794,877104.858315165736713 9102838.503610523417592,886999.825212798197754 9119072.840164832770824,888515.106121476972476 9120986.285524681210518,894297.263112260261551 9125291.564552284777164,895348.78702229319606 9125905.515300273895264,897636.959155549528077 9126863.088383313268423,899183.075563175370917 9126930.524473862722516,900512.675561210373417 9126521.241487514227629,902430.042470635380596 9124949.792764101177454,903605.019695958937518 9122830.876955771818757,905212.918420975795016 9119483.664040800184011,905645.839920671773143 9118253.229745279997587,905676.675419621635228 9116751.182178223505616,904779.996921279700473 9114090.989528743550181,904687.267785450560041 9112724.66505990549922,904903.561556061729789 9111360.566116413101554,905336.483055757707916 9110133.492234770208597,924786.558445629430935 9085009.431729655712843,927662.274851293186657 9074956.435565708205104,930383.479803733876906 9071022.212262291461229,945875.479378961957991 9062615.06329114921391,948132.704693777253851 9061396.312005316838622,949647.874282964738086 9061463.378181362524629,950544.552781303878874 9062209.440248070284724,950853.9096462179441 9063700.089690122753382,950822.962827776791528 9065191.293199777603149,950235.418555369367823 9066274.757345117628574,947390.648968149558641 9068580.103832056745887,936846.244161227485165 9087524.213748278096318,936784.350524348206818 9088747.662687107920647,937681.029022687231191 9089496.571394195780158,940123.82392865489237 9090312.89519852399826,943030.598472248180769 9090583.717833237722516,948070.922376386239193 9090109.417661065235734,954193.383050524629653 9090312.89519852399826,957069.322095170849934 9090516.623387038707733,962573.402997951954603 9091400.16558588296175,963655.651087443577126 9092013.174797164276242,964397.706813074066304 9092966.223014786839485,964707.063677988131531 9094463.28654414974153,964490.435948903206736 9095824.168636130169034,963346.516861511976458 9096437.556745482608676,947916.188284183619544 9096097.160290146246552,938485.08970468537882 9095007.216304529458284,933908.634118684451096 9093033.585372969508171,932238.730437294230796 9093169.781749462708831,915757.211908406578004 9107063.659827975556254,908305.039916741894558 9128230.147071830928326,908274.204417792032473 9129804.040390964597464,909016.371462910901755 9130760.41193526238203,917272.604136573849246 9136030.382614884525537,918509.363679288420826 9136440.210282888263464,924044.50272000185214 9137331.413951335474849,925714.18376240960788 9137194.127828707918525,949771.661556726321578 9133633.496847784146667,954100.765234186663292 9134454.871922368183732,953698.67923344054725 9135688.09717408940196,953822.466507202130742 9138905.586536513641477,953946.031141981249675 9140274.949955688789487,954564.522232829709537 9141371.813356924802065,956543.560140151530504 9142741.649372370913625,960841.716999170836061 9145139.617689225822687,971014.982623787829652 9146099.770680630579591,976031.595476386719383 9147694.635199129581451,980075.164659960544668 9148361.365432646125555,995010.566781222354621 9151105.957250017672777,995412.652781968470663 9151722.129181325435638,987558.283470066380687 9151791.776004562154412,982350.869010249734856 9151311.424309551715851,960161.443590934155509 9148911.384474545717239,959017.413184051634744 9149527.367183107882738,958244.299320491612889 9150488.109934616833925,944174.851518113166094 9171713.673801463097334,943741.818698925897479 9172609.536391600966454,950049.848964219680056 9176325.705480078235269,951286.831145913922228 9176737.851380275562406,955615.934823371469975 9177220.164170030504465,960254.172726766206324 9177358.221671229228377,963037.159996597911231 9177770.427188953384757,965356.39026778365951 9178734.977004332467914,975096.734392704674974 9184040.471384260803461,975560.714030330185778 9185418.516372190788388,974230.891393315512687 9185831.187663080170751,971138.769897549413145 9185762.945123331621289,969809.058580023120157 9186245.86818048171699,968819.53962636354845 9187003.324123172089458,968046.537082294933498 9187969.122599378228188,962016.694224494392984 9195557.831400901079178,961429.149952086969279 9196593.134146392345428,961367.367634698865004 9197835.148942733183503,961676.501860630465671 9199354.344764253124595,962295.104270970216021 9200528.70521580055356,963222.729587750392966 9201289.420004641637206,965387.337086224812083 9202464.099126420915127,972632.120866543031298 9202968.800493609160185,973055.914167991839349 9203500.404821446165442,974138.162257483461872 9204052.698358841240406,998288.369187629432417 9210136.727991070598364,1000576.652640376938507 9214218.554957564920187,1001349.655184445669875 9215188.045820098370314,1002431.903273937175982 9215811.768975213170052,1003575.933680819696747 9215188.045820098370314,1008770.880357669317164 9209998.034749327227473,1010316.996765297953971 9208131.043092891573906,1013996.88517245114781 9203293.430152807384729,1015171.862397774704732 9201150.8987170252949,1018140.419258758891374 9192589.686452744528651,1027633.411475136410445 9187554.341935388743877,1043434.656595787382685 9191141.962033340707421,1047330.838773551746272 9192176.624129051342607,1049495.223633046494797 9193279.50168577209115,1053267.841176028829068 9196386.359804959967732,1055154.149947521509603 9199769.812036937102675,1054442.818401352502406 9199492.831166373565793,1045846.504683314007707 9194729.399209059774876,1026922.079928967519663 9191071.930318292230368,1025716.378524185158312 9191003.637641126289964,1024386.555887167691253 9191486.667159486562014,1020521.431847335654311 9195832.919993467628956,1019933.887574928230606 9196870.002445446327329,1018573.340758452075534 9218719.293067989870906,1018542.282620522659272 9219965.168017039075494,1018851.416846454259939 9221489.336009379476309,1019315.396484079770744 9222806.038640657439828,1020088.399028151296079 9223776.698258532211185,1028901.229155780514702 9232583.284329572692513,1029983.477245272137225 9232859.805306032299995,1038363.274553716997616 9233763.131995890289545,1048258.464090331923217 9232373.715056566521525,1054102.737356979865581 9240635.761665150523186,1056669.319536708993837 9245569.365875687450171,1057287.587988575221971 9246403.728460893034935,1060905.58275884622708 9249671.546900486573577,1061864.043574576033279 9250437.776207149028778,1073954.676108615240082 9254890.549003781750798,1081747.040464146761224 9256490.880807396024466,1108370.87779921037145 9209167.923697678372264,1108742.016981515334919 9207923.933988874778152,1108927.586572665022686 9206541.535227386280894,1108742.016981515334919 9204813.78912515938282,1108401.935937139904127 9203293.430152807384729,1106886.766347952187061 9197283.336606888100505,1110535.485297684790567 9188107.388178516179323,1117709.358562364708632 9186107.638663977384567,1130170.907639729324728 9179079.083370314911008,1141550.319947087904438 9171783.763503590598702,1141766.836356681538746 9164563.434752305969596,1142447.109764921013266 9164493.663298277184367,1143096.436354716541246 9165594.251330083236098,1143560.415992344962433 9166900.924955349415541,1143776.709762956015766 9168619.267705805599689,1144271.413580040214583 9177634.344683825969696,1144085.843988887732849 9179011.153277920559049,1142601.732537632342428 9182454.337056191638112,1141859.676812004763633 9183419.520072679966688,1139385.823768104892224 9184591.260468784719706,1137870.654178917175159 9184935.649296171963215,1131531.565775693859905 9185073.856113690882921,1126831.434235419845209 9185969.411824887618423,1122471.383739521261305 9188658.491253193467855,1120585.07496802858077 9190244.01880556344986,1118915.393925620708615 9192176.624129051342607,1118327.84965321328491 9193279.50168577209115,1117956.71047090832144 9194522.927337143570185,1117771.36351873818785 9195902.998457623645663,1117771.36351873818785 9197490.136949812993407,1118451.636926974868402 9200528.70521580055356,1120368.781197417294607 9203914.123393462970853,1121976.679922437062487 9205780.260061338543892,1123862.988693926716223 9207301.149342365562916,1127140.679780845530331 9209031.241012141108513,1129490.634231489850208 9209998.034749327227473,1142972.871719937538728 9214496.108391620218754,1144209.631262649316341 9214842.193294813856483,1145755.85898976912722 9214842.193294813856483,1147487.322349567897618 9214703.408490102738142,1162546.511744591174647 9212074.731566667556763,1171699.422916596056893 9207509.982736803591251,1174513.35700486600399 9206680.161256385967135,1177481.802546361694112 9206887.234239773824811,1195323.979211216792464 9208685.687000276520848,1208414.372092069126666 9209884.243565650656819,1212176.414283426944166 9210760.009379453957081,1214526.368734074290842 9211729.030031058937311,1215175.917962852166966 9212834.935396553948522,1215021.183870649663731 9214218.554957564920187,1214062.723054919624701 9215049.254282515496016,1211805.275101121980697 9216365.016962198540568,1210506.621921527897939 9216849.767267832532525,1208991.341012849239632 9217195.966454477980733,1204353.10310945706442 9217610.480469632893801,1202837.933520269580185 9217956.71660329028964,1200209.569023152114823 9218995.027294371277094,1199467.513297521742061 9219965.168017039075494,1198323.260251659667119 9222181.952628055587411,1197797.498296643141657 9224816.106702180579305,1197797.498296643141657 9226341.062984749674797,1198014.126025725156069 9228074.034992648288608,1198385.042569047771394 9229599.688691142946482,1199683.807068132795393 9231889.656079567968845,1200487.867750133853406 9232791.111197970807552,1201446.328565863892436 9233553.528015740215778,1202559.523473796667531 9234110.153809731826186,1203827.341154440771788 9234456.942673478275537,1212269.143419258994982 9235497.910341378301382,1214804.778780547203496 9236260.366984313353896,1215608.616823565680534 9237164.374935384839773,1215917.973688479745761 9238344.731612434610724,1215794.186414718395099 9248489.311675649136305,1214650.156007835874334 9249115.706654196605086,1213135.097738139331341 9249463.477294826880097,1211588.870011019520462 9249532.082004379481077,1210475.675103086745366 9248976.252644242718816,1195076.404663690831512 9240914.345959266647696,1193159.260393251199275 9239455.025322129949927,1189757.893352062208578 9235844.766766099259257,1188799.209897349821404 9235080.35559269413352,1187716.961807858198881 9234525.652845326811075,1186387.361809823196381 9235011.640070790424943,1186541.984582534525543 9236399.572237400338054,1193406.612301791785285 9250158.819130396470428,1195849.40720775956288 9253011.507988639175892,1216103.543279632460326 9270708.421807931736112,1219968.77863895567134 9273707.538461375981569,1221483.83690865477547 9274545.206084921956062,1228626.874674384947866 9277338.814345421269536,1230358.671992657473311 9277127.923481378704309,1231286.297309437533841 9276289.951718170195818,1232399.492217370308936 9274056.51277744397521,1233914.66180655779317 9273707.538461375981569,1241830.590796865522861 9275452.078649202361703,1243933.415977951837704 9276778.79847490042448,1245850.560248391469941 9278314.925844455137849,1248850.06392781669274 9282436.029998600482941,1249220.980471139308065 9283973.631317,1249220.980471139308065 9285511.313473926857114,1249963.258835749467835 9288587.675579592585564,1252746.246105581056327 9291036.980331042781472,1254972.635921449400485 9292155.525796784088016,1256271.17778155207634 9292505.15457552112639,1262084.726868738420308 9292995.369119964540005,1271453.931811354355887 9294885.00141778588295,1275257.384853289462626 9295934.594160355627537,1275937.658261526143178 9297124.992131199687719,1275999.663217899622396 9300277.497636087238789,1275659.4708540327847 9301537.983420707285404,1273185.729129626881331 9307987.157457392662764,1272628.909036678029224 9309108.121085286140442,1271886.853311050450429 9310090.624480068683624,1270742.822904167929664 9310791.918545523658395,1257353.425871043698862 9315705.190566468983889,1255992.87905456754379 9316194.986054824665189,1254261.304375277366489 9316407.039054710417986,1251571.157560769002885 9315915.207097187638283,1249468.332379682920873 9314581.164299977943301,1246561.780475072097033 9312335.665939591825008,1245417.638748698402196 9311774.654800731688738,1240470.043980392394587 9310160.068950299173594,1239047.60352703393437 9309949.969941569492221,1237316.140167235163972 9310160.068950299173594,1236388.514850455103442 9311002.042450424283743,1235615.400986895198002 9311984.807769482955337,1235275.208623031154275 9313247.119309654459357,1234594.935214794473723 9318933.458805881440639,1234749.557987506035715 9320339.886363493278623,1235275.208623031154275 9321673.240579877048731,1235955.482031270628795 9322798.389673167839646,1253983.005648295627907 9339824.604491263628006,1263166.863638741662726 9342853.037812685593963,1270340.736903421813622 9343698.896493069827557,1271763.288676268421113 9343840.221043236553669,1273031.106356915552169 9344264.21157824061811,1278195.106215323787183 9349692.563735766336322,1279029.891076780622825 9350678.66708118468523,1279710.164485020330176 9351806.390752989798784,1279741.22262295265682 9353430.729399494826794,1279370.08344064746052 9354702.464498601853848,1271670.559540439397097 9356606.554799109697342,1260012.848506093258038 9357948.518553284928203,1264249.111728233285248 9376830.779351525008678,1264403.73450094461441 9377892.812972687184811,1260167.359959316439927 9379308.935325650498271,1258559.461234296672046 9379379.06036539748311,1248200.514699038816616 9360916.789480423554778,1247427.512154970085248 9356183.859554167836905,1247056.484292156295851 9354702.464498601853848,1244582.742567747365683 9351806.390752989798784,1239016.879347575362772 9346872.145401289686561,1234811.340304896933958 9344264.21157824061811,1230296.667036283994094 9342009.055551314726472,1225256.454451637109742 9338416.087703865021467,1218422.550911838421598 9333135.68717266432941,1215979.756005870876834 9330250.423656506463885,1215454.105370345525444 9328913.432794604450464,1214773.720642617670819 9327719.722804516553879,1213135.097738139331341 9325819.568169759586453,1202961.720794033957645 9318864.181365046650171,1198354.207070097792894 9316757.862921211868525,1194705.488120368216187 9315843.937253646552563,1191365.79207707894966 9314089.458722351118922,1190376.384442907990888 9313387.839132014662027,1189417.70098819816485 9312617.07226936519146,1177760.212592834839597 9301537.983420707285404,1177110.663364056730643 9300416.195611160248518,1177358.015272597316653 9299646.582094499841332,1178780.678364935331047 9299856.376731524243951,1184377.488403548486531 9302729.067936910316348,1196900.931117792380974 9310651.502668805420399,1208001.822059189667925 9318372.179270146414638,1209795.401694850297645 9320127.715935844928026,1212578.277645190712065 9322587.916578887030482,1213846.095325834816322 9322939.298823880031705,1215423.269871395779774 9322939.298823880031705,1226122.297451026272029 9318794.651766141876578,1227482.955586993834004 9318231.360687954351306,1228225.011312621412799 9317319.267701461911201,1232554.114990081638098 9309740.129656309261918,1233110.601124556735158 9308617.046560660004616,1218051.634368516039103 9283554.984413959085941,1216134.378778582205996 9282017.725117657333612,1215021.183870649663731 9281459.352850893512368,1211217.73082871735096 9280411.642828598618507,1207568.900559493573382 9279084.245353544130921,1203085.285428813192993 9276849.929105840623379,1184624.840312092099339 9266731.89506009221077,1183789.832811652682722 9265757.371227150782943,1183480.698585718171671 9264572.210854638367891,1183078.723904463462532 9261158.105090210214257,1182553.073268938111141 9259834.043410439044237,1180945.063224430195987 9257883.005947109311819,1174080.435505172703415 9252803.340759346261621,1156918.532248554518446 9241122.416023021563888,1148260.43621312500909 9238274.23468004912138,1142045.023764174897224 9238274.23468004912138,1140622.583310819463804 9238134.992789037525654,1138272.628860172117129 9237164.374935384839773,1136355.484589729690924 9235637.100696366280317,1131981.853115954436362 9230725.601404765620828,1123522.796330062905326 9224469.537209134548903,1118513.419244365766644 9222944.981293391436338,1113194.907932734349743 9222731.953629590570927,1105216.973986053140834 9224745.493984090164304,1104258.401850834721699 9225509.046712869778275,1103423.505669883918017 9227380.595931645482779,1092044.093362522544339 9253846.743126543238759,1091672.95418021758087 9255099.02785000577569,1089724.86309133679606 9264572.210854638367891,1091054.46308937179856 9270637.603678392246366,1091858.523771370062605 9271614.805426606908441,1093435.475677948445082 9271614.805426606908441,1096682.331265914486721 9271126.062204549089074,1097950.148946561384946 9271474.909923881292343,1103763.586714256554842 9273987.420031163841486,1113751.39406721224077 9279153.387619558721781,1120306.998880026396364 9284883.468211377039552,1123986.553328708745539 9288169.008724492043257,1124141.064781928900629 9289567.346601998433471,1122780.740604435326532 9290057.106825178489089,1113782.452205141773447 9292226.558494191616774,1103639.79944049497135 9287260.513421131297946,1101722.766489543719217 9285722.453052096068859,1083447.779644483933225 9274267.312611654400826,1065358.251071085454896 9264292.95025971531868,1064245.056163155706599 9263735.716358089819551,1062884.509346679551527 9263875.459797931835055,1061926.048530949512497 9264641.212240654975176,1061864.043574576033279 9265895.146692672744393,1062420.752348033711314 9289988.110284514725208,1062729.886573968222365 9291246.521052319556475,1065914.959844543132931 9295094.403586408123374,1066718.909207053016871 9296005.664624473080039,1071171.68883878365159 9300277.497636087238789,1073057.997610276332125 9301818.962498802691698,1079891.678511092439294 9305112.088293496519327,1093744.832542862510309 9315423.661900037899613,1097826.584311779588461 9320901.321403600275517,1128439.44427993055433 9334401.763654790818691,1130016.39618650637567 9334401.763654790818691,1131160.537912880070508 9333769.583979016169906,1131933.651776439975947 9332783.80006462149322,1132892.112592170014977 9332008.899232398718596,1134314.664365016855299 9332149.991256069391966,1134994.93777325632982 9333346.219763269647956,1132490.137910915073007 9337640.57193055935204,1126553.135508438106626 9346025.908480364829302,1119812.183743451023474 9345390.916325867176056,1118698.98883551848121 9344827.541594479233027,1111215.870025412645191 9347366.126368956640363,1115452.13324755243957 9366639.676542995497584,1131686.29986789659597 9398104.045912761241198,1141488.537629699800164 9408125.705992599949241,1152063.777935568941757 9419726.812027115374804,1162979.433244284475222 9432562.101616529747844,1164618.167468253988773 9437346.345283566042781,1166411.635784423211589 9440701.485693810507655,1169442.197601780761033 9443704.640170279890299,1171050.096326797734946 9443704.640170279890299,1174389.569731104420498 9443131.33618912473321,1175348.1418663256336 9442346.077772380784154,1177296.232955209212378 9440630.750827562063932,1177883.777227613842115 9439488.802130654454231,1178254.916409918805584 9438201.758833423256874,1179028.030273478943855 9437275.901045873761177,1180388.577089955098927 9436703.117731988430023,1185799.928856906946748 9439987.224637942388654,1185768.870718974620104 9441274.335555799305439,1176222.445147017482668 9449433.798482529819012,1167685.130759097635746 9452352.033628346398473,1164483.582203885074705 9452800.346616121008992,1168330.449847225798294 9458212.231720490381122,1170214.977506867144257 9459376.807886581867933,1171884.992507748538628 9459664.113256677985191,1178718.673408564645797 9460163.95957732014358,1185707.088401583489031 9458590.001686220988631,1188026.318672772264108 9455651.148405473679304,1198044.850205183727667 9446921.201754033565521,1203147.067746204091236 9443276.459016947075725,1207352.60678888252005 9443991.309584433212876,1208156.444831900997087 9444992.685024941340089,1203023.50311142206192 9458444.306441627442837,1201291.817112643737346 9461884.031056765466928,1200147.786705761216581 9462600.507007770240307,1197055.442571015562862 9462384.034346783533692,1195756.678071930306032 9462025.927261678501964,1193468.394619182683527 9460880.261235155165195,1192169.852759080007672 9460522.230305703356862,1190561.954034060472623 9460522.230305703356862,1189201.295898095937446 9461022.137296225875616,1188026.318672772264108 9461738.525905858725309,1187067.635218059644103 9462529.810797268524766,1186294.632673991145566 9463533.814855961129069,1186449.144127214094624 9464967.173850817605853,1190623.736351451370865 9469844.422486986964941,1202559.523473796667531 9479463.416139900684357,1203858.399292373098433 9479893.535848628729582,1206141.45072905253619 9479218.494968203827739,1213506.014281461946666 9475297.033055119216442,1217031.168596412520856 9494926.403389679268003,1217866.064777363324538 9498815.469416026026011,1219968.77863895567134 9503933.891623500734568,1221422.054591263877228 9504147.748017447069287,1228441.305083232466131 9498384.196055322885513,1231379.026445266790688 9495863.990916170179844,1231719.218809130834416 9492909.599346693605185,1231317.132808387512341 9489743.274954035878181,1231286.297309437533841 9488162.716453520581126,1231626.489673301577568 9483631.998490884900093,1231997.406216624192894 9482265.742654789239168,1254941.689103008247912 9465396.412245471030474,1256302.235919481609017 9445491.238064089789987,1249190.144972192356363 9430492.373460557311773,1253333.679058497305959 9434989.158109061419964,1262888.564911757130176 9449282.368527960032225,1273340.240582847036421 9468839.521825321018696,1273896.726717322133482 9474362.429288195446134,1274267.865899627096951 9475944.039418777450919,1274669.840580882038921 9477521.86660654656589,1280637.901121291564777 9488735.540644824504852,1281503.744120680727065 9489743.274954035878181,1283668.128980175592005 9491039.736764572560787,1286729.414976988919079 9491181.96054526604712,1288306.589522549882531 9490751.153048364445567,1289955.787778649944812 9490559.461226016283035,1293594.154015737352893 9491328.332271473482251,1305560.999276014976203 9498526.567812358960509,1301046.326007405063137 9501122.957005435600877,1290223.733792989514768 9498237.678027246147394,1285338.143981054192409 9494206.642514800652862,1283872.288926290348172 9494234.374110294505954,1283167.30259109614417 9494667.467641578987241,1281905.607482444494963 9495428.750262508168817,1280359.491074815858155 9497446.273908399045467,1277700.291078748414293 9501768.182006075978279,1275783.035488814814016 9505086.56078390404582,1268949.354587998706847 9520244.749288337305188,1268207.298862368101254 9522845.236961467191577,1268763.784996845992282 9524219.107994912192225,1271021.010311661288142 9529209.089919881895185,1273309.293764405883849 9532683.461502306163311,1285925.576933973236009 9545869.382063386961818,1290440.250202583149076 9548335.691195508465171,1291769.850200618151575 9548698.202986754477024,1296037.171560687711462 9549351.972734749317169,1298974.670283739455044 9548479.074394909664989,1306735.976501338649541 9547901.380644848570228,1313013.17126767965965 9550149.220278855413198,1318084.553309750277549 9553996.710510956123471,1317868.036900156643242 9555085.698385795578361,1313538.933222696185112 9556609.675078619271517,1312116.492769340751693 9556829.05654582194984,1307168.898001034744084 9556609.675078619271517,1301467.002363110659644 9558193.87245356105268,1296098.953878078609705 9560608.510089734569192,1297088.361512249801308 9566495.415503894910216,1297768.63492048624903 9567658.092799441888928,1306148.543548422399908 9575666.66007125005126,1330576.937886061845347 9589955.473633432760835,1343182.423065019072965 9596761.534396087750793,1344801.231100134085864 9597475.797814585268497,1346439.965324103599414 9597403.474031148478389,1351201.990501257125288 9596159.621236972510815,1352593.595455665607005 9595650.046915028244257,1353552.16759088402614 9594771.393927253782749,1354325.28145444393158 9593752.745935287326574,1354696.197997766546905 9592364.993074264377356,1355438.253723397152498 9591342.48886095918715,1357046.263767905067652 9590977.776434736326337,1360169.554721091873944 9591049.771483473479748,1360818.769991396227852 9591851.751504458487034,1360262.283856921130791 9593022.827424675226212,1358747.002948245266452 9595136.565828956663609,1356582.50676925922744 9596673.176948200911283,1353242.810725969960913 9599008.973844232037663,1351047.367728545796126 9600253.330239551141858,1349130.334777594543993 9600835.596204418689013,1345697.909598476020619 9601200.819680778309703,1341090.618513522436842 9600911.639011770486832,1339760.795876507647336 9600546.430538782849908,1326186.051891210488975 9593897.056393254548311,1323990.608893786324188 9592509.537902468815446,1307694.659956051036716 9580184.747484851628542,1274020.513991083716974 9550511.825330477207899,1268207.298862368101254 9543475.445886068046093,1267372.180042437510565 9542535.687217408791184,1266351.825589828193188 9541735.386116173118353,1263878.195184910669923 9540795.859283959493041,1258745.030825449153781 9539128.187836211174726,1257446.266326364129782 9538765.906855866312981,1251725.780333480564877 9537822.863800935447216,1250736.15006032702513 9538694.183166673406959,1251416.42346856649965 9539852.544775301590562,1257075.349783041514456 9542969.667396035045385,1266228.260955046396703 9557335.830304669216275,1261218.772549858083948 9557990.140097845345736,1251787.56265087146312 9559443.071455433964729,1250581.527287615463138 9560097.576904563233256,1250427.015834395308048 9561622.637738049030304,1251107.2892426319886 9562788.436872601509094,1254292.362513209925964 9566203.728825146332383,1255467.339738533366472 9566787.114257078617811,1266197.202817114070058 9569552.56788431853056,1272907.319083150941879 9570859.588995466008782,1277607.561942916363478 9570571.913509979844093,1285709.060524379601702 9572606.854174703359604,1301479.247507098130882 9581421.8454674705863,1302499.713279201649129 9582150.824869554489851,1300879.458090703235939 9582953.629222484305501,1300267.200891341082752 9583258.083702672272921,1299376.756284485571086 9583127.901555696502328,1297966.560975117608905 9582473.09035350382328,1294305.48556190636009 9581129.802534068003297,1259023.329552433919162 9570495.935606628656387,1253117.16264890646562 9569768.423167187720537,1251942.07410409161821 9570495.935606628656387,1252622.458831819472834 9571663.203790688887239,1257601.000418566633016 9577779.391028996556997,1258621.466190670151263 9578579.861223395913839,1263692.625593758188188 9582442.910142483189702,1272103.481040135258809 9588275.866811184212565,1284843.217524987645447 9594771.393927253782749,1286018.417389293666929 9595357.150401378050447,1293934.34637960139662 9598499.193241242319345,1295171.328561298549175 9598133.846880834549665,1296346.305786619195715 9597403.474031148478389,1300273.434782824711874 9597022.405712559819221,1300774.372491395333782 9596584.820609252899885,1303965.457014474086463 9597505.779528114944696,1311343.490225272020325 9601421.594357799738646,1313786.28513123979792 9605884.09542821906507,1313569.880041137337685 9606980.87234221957624,1313600.938179069664329 9608588.55846942961216,1314713.91044801985845 9611370.480632830411196,1322320.927851378452033 9618547.589501794427633,1329494.689796570222825 9623971.264487341046333,1332176.153690796345472 9625304.799439823254943,1333050.679610470542684 9625731.763583429157734,1335833.889519281918183 9624559.456621043384075,1336792.350335011957213 9623677.186863742768764,1336823.297153452876955 9622505.222240658476949,1336919.254554516635835 9622001.918091053143144,1336761.514836061978713 9620818.094452481716871,1336699.509879691526294 9619135.328297652304173,1336854.132652402855456 9617666.07336113974452,1337998.385698267957196 9615251.833316037431359,1338411.492328600725159 9615456.965365834534168,1339513.443967964267358 9620890.39540040679276,1340255.611013083020225 9622138.891374867409468,1341121.454012472182512 9623093.291793281212449,1342389.160373627906665 9623093.291793281212449,1352408.025864513125271 9618692.409269304946065,1364158.466034685494378 9622360.323962019756436,1382649.857969847740605 9630649.131976159289479,1405377.624446638161317 9643652.232104629278183,1440443.264046519994736 9690056.707357162609696,1441030.808318927418441 9691463.880803050473332,1441339.942544858902693 9693314.423424726352096,1441185.319772147573531 9694799.582148475572467,1440628.610998689895496 9695983.668088838458061,1439546.362909198505804 9696203.439349273219705,1438495.172957636415958 9695389.466661293059587,1427208.601105598267168 9680073.079618250951171,1414567.493689585011452 9665555.847290793433785,1413602.79898237157613 9664271.47368591837585,1410931.131203334312886 9661353.098557103425264,1390163.812278903322294 9644092.490057153627276,1388957.888235141523182 9643579.432033076882362,1387690.070554494624957 9643579.432033076882362,1379990.546654286328703 9645268.058292534202337,1378598.941699880640954 9645785.476526819169521,1377083.772110693156719 9647919.103640267625451,1376650.85061 9648873.035975772887468,1376589.068293608957902 9650934.989387409761548,1377021.989793305052444 9652479.863565895706415,1382835.427561 9669361.754505548626184,1392637.665322803426534 9671944.825804207473993,1404573.4524451487232 9672609.881248639896512,1410906.529595867963508 9674248.865804752334952,1411518.786795230116695 9674691.045071426779032,1411073.397512566996738 9675311.95110441558063,1410572.459803996374831 9675711.646855261176825,1408036.935762199340388 9678372.077965373173356,1384659.731376122217625 9680369.526570752263069,1382990.050333711551502 9680442.708848666399717,1376774.637884761439636 9679703.735934119671583,1374579.194887337274849 9678741.351614415645599,1372661.939297403441742 9676967.525635959580541,1364714.952169163385406 9668182.149023519828916,1363539.974943839712068 9668846.848291600123048,1363570.921762280864641 9670541.558112429454923,1373218.648070861119777 9685768.167538953945041,1389050.61737097078003 9703838.360455816611648,1392516.883675290970132 9705606.971984535455704,1395724.55480249854736 9708619.150561600923538,1389236.186962123261765 9725011.374113462865353,1389390.809734834590927 9726127.177354885265231,1396224.71327463327907 9727018.126138847321272,1397739.771544329589233 9727169.486173870041966,1398729.290497991954908 9726274.232357596978545,1402779.984128976473585 9722110.473792031407356,1404326.100536605110392 9720027.513988699764013,1406428.814398200251162 9716684.080603498965502,1406861.735897893318906 9719582.469278160482645,1406150.626990706892684 9722331.064999608322978,1403460.257537215948105 9730366.759123237803578,1398389.09813412791118 9742515.320819390937686,1394956.895593989174813 9745871.36640946380794,1392853.959093414479867 9744305.799567209556699,1391338.900823718169704 9744154.337644720450044,1389483.538870666641742 9744453.504949005320668,1388308.561645342968404 9745199.330390820279717,1383206.344104322837666 9748556.661807283759117,1382216.93647015444003 9749454.497310552746058,1379866.870700015919283 9752588.282904785126448,1379279.215108117321506 9753786.470064977183938,1375414.091068285284564 9765597.529463088139892,1374981.058249098015949 9778029.735624324530363,1375414.091068285284564 9779677.083945620805025,1376001.524021201534197 9781102.093789527192712,1383855.893333103507757 9794762.777529532089829,1384597.949058731319383 9795968.203564759343863,1389978.24268775084056 9801981.391684221103787,1391060.713416224811226 9802733.36982649564743,1392421.260232700966299 9803109.253798903897405,1394276.622185752494261 9802807.840911444276571,1395698.951319616753608 9802208.574255725368857,1398110.910726634552702 9800779.261059731245041,1399100.429680296918377 9799874.550306588411331,1399873.432224365649745 9798825.427227687090635,1401017.46263124817051 9796343.9948427118361,1404048.024448602925986 9786504.594238214194775,1403460.257537215948105 9785078.484378207474947,1403398.475219825049862 9783351.548768613487482,1403738.667583688860759 9782004.381064590066671,1404326.100536605110392 9780801.357204135507345,1407882.201669996837154 9778177.883954808115959,1418921.310294002993032 9775555.663091130554676,1420622.049474343191832 9775481.481394587084651,1421982.707610307727009 9775855.904675608500838,1423034.120200849371031 9776679.274702474474907,1423621.553153765620664 9778029.735624324530363,1423714.393609088845551 9779755.088914472609758,1410015.862350030103698 9789881.788904769346118,1400646.546087925788015 9802658.899534208700061,1397554.201953177107498 9807023.92602857016027,1397183.062770872144029 9808454.515693513676524,1397461.472817347850651 9810261.937526069581509,1403645.82712836842984 9833946.553140513598919,1407604.014262503478676 9848696.824960144236684,1408191.558534910902381 9850057.174267860129476,1410139.649623794481158 9854147.723308073356748,1410881.705349422059953 9855363.431690486148,1412736.955982982413843 9857561.847345501184464,1413664.581299762474373 9858544.754200261086226,1418705.0165233919397 9862944.827744802460074,1422972.115244478685781 9866054.730412825942039,1425291.34551566443406 9867422.564328895881772,1426497.380878920434043 9868031.27506510913372,1428043.49728654907085 9868181.615927271544933,1429496.884558345889673 9867576.718654217198491,1435774.079324686899781 9863932.590181494131684,1437969.522322111064568 9862261.179079296067357,1453337.734623577678576 9849907.222979608923197,1464747.871110397623852 9835607.122907780110836,1465737.390064057195559 9834702.248463448137045,1466634.179881887510419 9835681.944889511913061,1466943.314107821788639 9837496.419083660468459,1463820.245793617563322 9851346.888210438191891,1463480.164749241899699 9852707.753630144521594,1460728.12429785146378 9860519.44747544452548,1459676.711707309586927 9861123.73380683362484,1455935.152302256785333 9860365.448834700509906,1454079.901668696431443 9860669.35366871021688,1445761.775358151411638 9864616.129265492781997,1441556.236315470188856 9868106.445091618224978,1439577.421047130832449 9870004.551399648189545,1438742.524866179795936 9871978.111999504268169,1439020.712273673154414 9873881.374743169173598,1442174.727406318765134 9886733.627992790192366,1442638.707043944159523 9888410.908469274640083,1436639.699685093481094 9891607.601467927917838,1434382.474370281212032 9890620.029536144807935,1418457.664614848326892 9887570.162020985037088,1416911.548207219690084 9887419.677173988893628,1415272.591344270622358 9887875.52740179002285,1410819.923032031161711 9893817.460458902642131,1410850.647211489733309 9895190.745483733713627,1428661.765738412505016 9911598.589367929846048,1429898.74792010942474 9912131.667799279093742,1435464.722459772834554 9913584.224452305585146,1438587.790773977059871 9913890.730547798797488,1442174.727406318765134 9913508.562991818413138,1444679.527268656995147 9913659.611596548929811,1446070.90958408289589 9914041.787429582327604,1454790.899256391683593 9917098.847168853506446,1465273.633065414149314 9922683.339055044576526,1472447.50633009430021 9926514.023557825013995,1476158.230236197356135 9930569.660911114886403,1476931.344099757261574 9931798.756797697395086,1477549.612551623256877 9933255.140795912593603,1480177.977048743516207 9936472.457990547642112,1481878.716229083715007 9937546.607559639960527,1486269.602223932044581 9938313.327503776177764,1508378.988929365295917 9941689.057894539088011,1510017.945792314363644 9941153.714783040806651,1511038.411564417881891 9940230.634553467854857,1511811.302788995439187 9939156.071280864998698,1511718.684972654562443 9937395.040573230013251,1511316.487652420066297 9933865.759412566199899,1510512.649609401356429 9932640.713243896141648,1505843.464887568261474 9929959.606716427952051,1505688.842114856932312 9910373.323587341234088,1506152.599113499978557 9907394.529057363048196,1506492.68015787540935 9906022.962648900225759,1507049.388931330293417 9904802.797574678435922,1508348.042110926937312 9904421.12759174965322,1515089.105195402400568 9928810.797862,1515707.596286250976846 9930186.853938391432166,1520067.535462661180645 9937930.095036908984184,1520871.596144659211859 9939156.071280864998698,1522819.687233542790636 9940614.269747542217374,1525633.621321815764531 9941229.400631995871663,1530179.018769884249195 9941840.718294447287917,1531725.246497004292905 9941996.525858150795102,1533456.709856803063303 9941840.718294447287917,1536549.053991548717022 9940770.049893761053681,1537322.05653561744839 9939695.403455222025514,1542362.269120264332741 9937622.530331006273627,1544867.068982602562755 9938772.792473370209336,1558349.083832067670301 9945298.034001804888248,1573531.837861872976646 9962593.768250377848744,1574799.655542517080903 9965439.638653673231602,1574706.815087193856016 9967059.718497034162283,1574150.328952718758956 9968291.109272303059697,1573129.863180618034676 9969213.477906072512269,1571707.534046750981361 9969907.692181406542659,1570439.493727124528959 9969289.746565883979201,1554824.040836608503014 9959668.741541782394052,1530333.641542598605156 9952977.851040041074157,1528014.411271410062909 9947445.074579585343599,1527241.520046832505614 9946217.639372725039721,1526004.537865138147026 9945605.937644733116031,1518335.960783371236175 9942531.933718955144286,1516913.409010524395853 9942148.469213109463453,1515212.669830184197053 9942228.586134172976017,1512769.874924216652289 9943839.131594222038984,1500834.087801871355623 9946141.622905790805817,1488032.34636064292863 9943223.494015576317906,1468860.68101724400185 9931718.75967332907021,1466510.392608125926927 9930342.40121035091579,1462954.402794225607067 9928428.087455520406365,1455471.172664628364146 9925058.771408125758171,1454512.823168389732018 9924983.260930873453617,1452657.461215338204056 9925285.858939049765468,1450801.987942795502022 9926896.628904407843947,1450183.719490932067856 9927965.16828915476799,1449843.527127065462992 9929345.193794459104538,1450431.071399472886696 9930801.341047672554851,1470128.387378399726003 9951749.440845660865307,1471210.635467891348526 9952517.725184954702854,1484476.35654674237594 9959436.376614136621356,1486053.197133829817176 9959592.578166825696826,1493196.234899562783539 9958439.151042096316814,1501854.442254480673 9958130.679735351353884,1504822.999115464976057 9958591.176486663520336,1506863.819340177811682 9960437.899819964542985,1506492.68015787540935 9961824.371881112456322,1505286.75611411081627 9962593.768250377848744,1499937.186664549866691 9963130.761411555111408,1483548.619910473935306 9964441.55325991846621,1475447.01000951952301 9959592.578166825696826,1471519.769693822832778 9958054.533175691962242,1468551.324152329936624 9957589.918747860938311,1463727.516657785512507 9958743.205249208956957,1452008.023306051269174 9963900.302115369588137,1450771.152443848317489 9964669.927855875343084,1449750.797991236206144 9965596.25209385715425,1448977.684127676300704 9966674.90154604613781,1448390.139855268877 9967905.946986429393291,1447308.003085268428549 9972142.516993649303913,1447184.215811506845057 9973683.676740776747465,1447957.218355575576425 9974916.239545719698071,1449039.466445067198947 9975767.587413879111409,1451853.400533339940012 9976458.013429500162601,1455626.018076322274283 9978157.025010127574205,1463263.759659139672294 9983714.263746079057455,1465149.845791649771854 9985796.731574719771743,1465768.336882498348132 9987188.262915391474962,1466232.316520123742521 9988885.445795023813844,1464593.359657174674794 9995768.241424631327391,1464253.167293310631067 9997157.591359168291092,1456893.835756969172508 10013266.72787781059742,1455656.742255781078711 10014041.832235952839255,1453925.278895985102281 10014118.31462568603456,1450925.775216559879482 10013654.129701651632786,1449472.38794476329349 10014271.840209314599633,1444617.633631777716801 10019082.256916288286448,1443813.68426926783286 10020169.229088250547647,1444741.420905539067462 10021179.530841154977679,1456677.208027884364128 10025372.063083849847317,1459212.843389172572643 10025372.063083849847317,1461686.58511358150281 10023819.133894523605704,1470344.792468502186239 10018306.590634029358625,1470932.336740906583145 10017066.318860976025462,1478755.647914876462892 10021021.940927919000387,1498020.153713598614559 10031509.456604544073343,1501019.657393023837358 10036720.507064299657941,1502132.852300956612453 10037498.230543710291386,1507822.280155907617882 10041230.10513773187995,1510203.292744487291202 10042632.772588927298784,1516356.922876046504825 10043334.352645,1517964.821601066039875 10043488.24443793669343,1519696.618919335771352 10043411.157959042117,1521582.705051845870912 10043022.094524966552854,1525076.912548358086497 10042868.213053835555911,1526654.087093916255981 10043022.094524966552854,1527921.793455069186166 10043569.536560162901878,1526715.869411307154223 10044348.026864368468523,1519974.695007337722927 10046213.450455036014318,1518243.23164753918536 10046371.612502647563815,1505874.189067027065903 10044891.367771724238992,1504537.01934361923486 10044339.616348292678595,1500184.538573093246669 10041153.323923345655203,1499226.077757360413671 10040144.318243550136685,1497030.634759936248884 10036173.604206819087267,1495144.325988443568349 10031821.19794443808496,1494185.753853225149214 10030809.069015311077237,1493289.075354883214459 10030185.691073540598154,1491866.746221018955112 10029797.367182921618223,1478044.316368707455695 10026225.133612379431725,1476158.230236197356135 10026536.638089412823319,1473220.508874163031578 10027778.320646982640028,1470746.767149754101411 10029332.134482402354479,1469942.817787247244269 10030420.710304075852036,1469757.248196094762534 10031663.086810441687703,1466417.663472296670079 10055805.027095451951027,1466417.663472296670079 10057206.146169777959585,1467994.838017854839563 10059627.94843315705657,1468953.410153076052666 10060721.280656160786748,1490629.652719833655283 10057986.165917914360762,1500957.65243665035814 10055256.339480351656675,1506801.814383807126433 10052763.36120599322021,1504742.62644311436452 10055710.674451110884547,1504519.876142034307122 10056599.77432794496417,1504185.917669656919315 10057347.706086425110698,1502757.354644306236878 10059362.15786330960691,1500790.784519951557741 10060952.838525848463178,1492701.531082475790754 10065873.019270127639174,1491000.791902138618752 10066340.704956831410527,1483765.025000573368743 10067512.447913892567158,1482157.126275556627661 10067358.02304607629776,1480858.250456980196759 10067748.451749756932259,1479621.490914268419147 10068607.022034415975213,1472756.863195008365437 10073378.071341678500175,1472540.235465926351026 10074628.153628138825297,1478229.885959859937429 10077051.814534058794379,1479992.407457591034472 10076974.354695884510875,1491959.252717868657783 10075801.295877804979682,1501514.361210108036175 10074237.056398851796985,1502751.120752822607756 10073378.071341678500175,1507228.613311507971957 10071483.668378744274378,1507302.863411868922412 10070547.635638983920217,1509139.52369046676904 10068810.990276554599404,1510141.510427096392959 10068529.656337182968855,1511199.156909124460071 10068482.674679815769196,1524025.499957816442475 10068139.183715563267469,1525478.775910121854395 10068452.572826879099011,1526746.593590765958652 10068997.802308555692434,1543351.899393417872488 10076583.406954267993569,1545578.177889792015776 10078147.893449118360877,1546536.750025013228878 10079166.661122929304838,1545980.26389053533785 10080495.284371735528111,1529474.032434690045193 10078616.406587718054652,1524687.294330582022667 10078289.599139209836721,1524130.808196104131639 10077679.411922795698047,1523833.919114159885794 10076647.906182136386633,1523166.002169399289414 10076177.272742131724954,1516511.545648760627955 10074628.153628138825297,1512368.011562452884391 10073378.071341678500175,1510945.571109097450972 10073064.459881857037544,1509399.454701468814164 10073296.429651878774166,1508378.988929365295917 10074237.056398851796985,1507822.280155907617882 10075487.574959356337786,1507204.011704044416547 10080104.138331368565559,1507234.847202994395047 10081514.396575391292572,1507327.576338823651895 10083235.051567228510976,1508966.533201772719622 10085898.340973667800426,1510079.728109705261886 10086763.389652404934168,1511347.545790349366143 10087310.058977592736483,1514223.262196013238281 10088016.166717937216163,1515800.214102591620758 10088171.051732767373323,1516455.885903362184763 10088722.064146596938372,1517476.240355974296108 10088439.9222696069628,1519220.282818231498823 10087684.684902453795075,1521261.103042944334447 10087122.753596734255552,1522300.159170010127127 10087030.231116881594062,1523932.770821984391659 10087592.154932415112853,1524600.799086233368143 10088063.280737401917577,1524136.930768099147826 10088767.207911189645529,1523116.464995995862409 10089049.363092042505741,1518793.59521002182737 10089990.151338495314121,1513790.340696317143738 10091387.460030145943165,1510419.920473569305614 10091228.269483527168632,1507853.338293839944527 10090052.517633499577641,1506616.467431636992842 10090836.235992223024368,1504359.019477839348838 10092563.438058108091354,1503555.1814348208718 10093739.333021886646748,1503215.100390448002145 10095148.410743234679103,1503988.102934516733512 10096406.93923450447619,1505286.75611411081627 10096954.086194,1510543.485108351334929 10099075.288678150624037,1515800.214102591620758 10101114.88757967017591,1530240.801087275380269 10097898.206802254542708,1557452.405333728762344 10094678.780511079356074,1557452.405333728762344 10095622.591608088463545,1553927.251018778188154 10098208.704213118180633,1551236.99288477585651 10099622.928663788363338,1549319.73729484481737 10100015.176228085532784,1541187.291894940659404 10099622.928663788363338,1539641.175487314816564 10099860.026666274294257,1538188.010854497784749 10100485.167746551334858,1524211.069548966130242 10107790.378239646553993,1505750.624432245036587 10126049.687474749982357,1505163.191479328786954 10127387.319343529641628,1506121.763614550000057 10130777.804417584091425,1508038.907884992659092 10135197.260163636878133,1509028.315519163617864 10136220.178955307230353,1510141.510427096392959 10137009.131113274022937,1511409.328107740497217 10137642.176017392426729,1512862.715379537083209 10137958.720148954540491,1514470.614104556618258 10138114.724324392154813,1531323.049176766769961 10138271.016180885955691,1550494.937159148044884 10133221.16195560246706,1552257.458656879141927 10133065.267858918756247,1553679.899110234808177 10133381.603074105456471,1572109.397408514749259 10150439.914511252194643,1579685.245354452636093 10148303.229459270834923,1581447.87817167211324 10148224.969901436939836,1582746.531351265963167 10148781.058802396059036,1583736.161624419502914 10149805.984370090067387,1588343.452709370292723 10160094.088385451585054,1588838.379165437072515 10161834.352684363722801,1588992.890618660021573 10165006.669851053506136,1588652.809574284590781 10166430.30688539147377,1592332.364022966707125 10171347.385464612394571,1602443.958649681182578 10173330.1036122366786,1604391.938419073587283 10173011.939496027305722,1617008.332908129319549 10168890.550573777407408,1618492.444359384477139 10168254.644664915278554,1619265.558222944382578 10167144.232632026076317,1619822.044357419479638 10165798.906299848109484,1619945.831631183857098 10164214.523994950577617,1619822.044357419479638 10162469.384309405460954,1619451.127814096864313 10160490.057031417265534,1620038.672086504288018 10159224.120132623240352,1621337.436585589544848 10159776.531612452119589,1622450.408854539738968 10160568.170149583369493,1624120.423855421133339 10163022.054623141884804,1624769.639125728281215 10164528.005528954789042,1624893.426399489864707 10166273.663957063108683,1624800.697263657813892 10167936.71360126696527,1624243.988490200368688 10169204.243796482682228,1623440.150447184452787 10170314.986144287511706,1622419.68467508116737 10171347.385464612394571,1621182.702493386808783 10172140.347501309588552,1605783.543373482069001 10176346.534260459244251,1599784.758653613971546 10176185.095236361026764,1591621.255115780280903 10176267.957274215295911,1588807.321027507539839 10177375.546461755409837,1588003.260345506481826 10178487.600188666954637,1594218.67279445938766 10196615.145881472155452,1595208.303067610133439 10197651.761069729924202,1597496.475200866349041 10199243.813635053113103,1608380.961052161175758 10203068.070409342646599,1625109.831489592324942 10202429.017835192382336,1633768.038844510214403 10200755.369845353066921,1637045.72993142879568 10199799.426996901631355,1637849.790613427059725 10198683.944978509098291,1638406.276747902156785 10197411.00717942789197,1639303.066565732471645 10194626.036136537790298,1639612.312111158156767 10193113.52628730982542,1639736.09938491974026 10191522.882912252098322,1639612.312111158156767 10189770.848846655339003,1640601.942384311696514 10188739.993031572550535,1641776.919609632343054 10189534.949384592473507,1642580.757652651052922 10190806.153184467926621,1642302.45892566931434 10195662.066919237375259,1641962.489200785057619 10197091.734579531475902,1639581.476612208178267 10200595.654549552127719,1638808.362748648272827 10201711.444749567657709,1637788.00829603895545 10202669.659521425142884,1636087.26911569875665 10203225.547991925850511,1626748.788352541392669 10205935.354765204712749,1625048.0491722014267 10206412.872714685276151,1618709.072088469285518 10205773.511206176131964,1616760.980999588500708 10206176.40538077801466,1615678.510271111736074 10206732.575622634962201,1617657.659497927641496 10208804.114736877381802,1619945.831631183857098 10210398.735295021906495,1622388.626537151634693 10211757.065308041870594,1623873.071946877753362 10212077.01523725874722,1646167.805604483699426 10216623.396219473332167,1647961.273920653155074 10216465.326026191934943,1661752.422996049746871 10215106.071431513875723,1662927.511540864827111 10213909.114006,1662309.131769507424906 10207371.738733757287264,1661969.050725134788081 10205374.944537565112114,1661288.777316895313561 10203943.564972538501024,1658289.273637472651899 10200915.088827012106776,1657608.888909742003307 10199401.204223588109016,1657701.729365065228194 10197809.115459,1658041.921728929271922 10196295.909989010542631,1666205.313947271788493 10183413.249819615855813,1667009.15199029026553 10182222.046244548633695,1668462.539262086851522 10181584.915104642510414,1669946.98467181599699 10181903.473346510902047,1670627.258080052444711 10183334.878628887236118,1670750.822714834474027 10185163.675550665706396,1670657.98225951124914 10186752.858329819515347,1668988.301217103376985 10190648.957904946058989,1667658.701219068374485 10193113.52628730982542,1665401.253265270730481 10194944.908517463132739,1662680.159632321214303 10196457.81863302923739,1662123.562178354943171 10197809.115459,1665494.093720593955368 10204976.68774339184165,1666174.36712883063592 10206412.872714685276151,1671554.883396832738072 10213672.3904,1672698.913803715258837 10214470.503200711682439,1675327.278300835518166 10215588.53313460573554,1676626.042799920542166 10216066.430395815521479,1678264.999662869842723 10216224.204088054597378,1697807.581549593945965 10209202.878973359242082,1709248.776174343423918 10202984.88697599992156,1711969.869807295734063 10201470.836378671228886,1713547.044352853903547 10199164.976343214511871,1713856.178578788414598 10197651.761069729924202,1713917.960896176518872 10196059.788065437227488,1713794.396261397516355 10194306.891965851187706,1713114.122853158041835 10188818.711680822074413,1720318.942936282139271 10176581.984822886064649,1724957.180839674081653 10174681.178687835112214,1722359.763160994974896 10195976.688819231465459,1713608.82667024503462 10209763.599312262609601,1712588.360898141516373 10210797.591443073004484,1712031.874763666419312 10212077.01523725874722,1712341.008989600930363 10213672.3904,1715105.517223958624527 10214742.307784963399172,1715699.18406836129725 10215362.671353057026863,1716496.899539384525269 10215698.018407367169857,1717331.795720335561782 10215652.040129033848643,1723565.79852424794808 10215426.17627421207726,1729224.50219974340871 10213510.365727286785841,1734821.423557847738266 10211196.183406220749021,1736274.699510153150186 10210560.974222658202052,1736831.296964119654149 10209202.878973359242082,1737820.927237273193896 10208247.77797868847847,1739521.666417610365897 10207687.180454749614,1749200.228225143160671 10204740.269479488953948,1750962.749722871463746 10204578.166963728144765,1752137.726948195137084 10205374.944537565112114,1752075.944630804238841 10206973.367007717490196,1751519.235857346560806 10208326.718809962272644,1747282.972635209560394 10215189.400709684938192,1715866.05198506009765 10223415.203058015555143,1700497.951003084890544 10225171.461058916524053,1698890.052278068149462 10225092.327784225344658,1697560.229641050565988 10224534.679686164483428,1696014.113233421929181 10222853.375210428610444,1694715.460053827846423 10222295.907582500949502,1691623.227238573366776 10221896.675611199811101,1678388.564297651639208 10226449.229077503085136,1676904.452846396481618 10227090.504330240190029,1677213.587072328198701 10228689.346155613660812,1678357.728798701893538 10229410.010942904278636,1679996.463022668613121 10229568.089290743693709,1681295.338841245044023 10230130.462868772447109,1684789.54633775446564 10232450.989449791610241,1685778.953971925424412 10233488.378707606345415,1686459.227380164898932 10234930.495942283421755,1687819.774196638260037 10241978.000275678932667,1687943.561470402637497 10243743.307628327980638,1686706.579288705717772 10244623.966096144169569,1685222.467837450327352 10244302.506983438506722,1674059.460620191413909 10240776.383572163060308,1654114.68141323258169 10234451.005409771576524,1651511.36380154080689 10229185.712894171476364,1650342.286509229801595 10227090.504330240190029,1637818.732475497527048 10218140.766401134431362,1635530.560342241311446 10216544.360671374946833,1632902.195845121052116 10215426.17627421207726,1629500.717484440887347 10215426.17627421207726,1627954.712396303424612 10215746.295928481966257,1627305.274487016489729 10216702.145263597369194,1619296.616360876709223 10226769.859271610155702,1617843.229089080123231 10226449.229077503085136,1598733.346063069533557 10223015.906481251120567,1598826.075198901584372 10226849.011741753667593,1610174.429368330631405 10240697.359931740909815,1620842.510129522997886 10256253.866400349885225,1622821.548036844702438 10268230.272134810686111,1622265.061902369605377 10269595.66825601644814,1627336.221305457642302 10275152.703357499092817,1628325.740259120007977 10276196.52225860953331,1631541.537709153490141 10278209.529292913153768,1643199.2487434996292 10276678.627943390980363,1646662.509421567898244 10275634.736195499077439,1648146.843511805636808 10274909.525773076340556,1649167.309283906128258 10273940.958179317414761,1649723.795418384252116 10272574.703085925430059,1648703.440965771907941 10269193.40581463649869,1648023.056238044053316 10267669.133473882451653,1656774.104048285167664 10272331.616232320666313,1661653.571288225473836 10277629.892449731007218,1660317.626079215668142 10280192.086781630292535,1656941.083284475374967 10279709.735819298774004,1651393.587780283065513 10282644.389216888695955,1650125.770099638961256 10283450.215591473504901,1640199.74506407417357 10295469.546540334820747,1639550.529793767025694 10296441.138361152261496,1639457.689338446594775 10298056.108997417613864,1640447.09697261499241 10299103.395752370357513,1649662.013100993121043 10308158.680849127471447,1660020.959636251209304 10315606.108443612232804,1661164.990043133730069 10316335.897901855409145,1666669.070945917628706 10318440.561220278963447,1673781.050573718501255 10320545.866661,1677244.533890769118443 10320465.925084408372641,1678728.645342024508864 10319820.299508025869727,1684603.976746601751074 10315201.448230879381299,1686644.796971314586699 10313177.628666400909424,1687201.283105792477727 10311883.721240865066648,1687294.123561113141477 10310180.737669097259641,1686459.227380164898932 10308967.490745963528752,1685438.761608061613515 10307918.706515904515982,1670565.253123681992292 10296117.25922903418541,1668246.24549147579819 10294502.741989511996508,1665222.028885095845908 10293096.960206197574735,1662253.583343602949753 10292950.498683616518974,1662698.749987283488736 10291403.252730250358582,1668209.064781551016495 10290866.664542313665152,1669192.461163218365982 10290917.794050399214029,1671400.260624121176079 10290866.664542313665152,1673750.326394259696826 10292400.714496670290828,1681913.82993209338747 10297971.774571027606726,1706156.654678580351174 10294986.127342794090509,1713825.343079838668928 10293695.624921096488833,1717505.008848009398207 10292724.419337,1718989.342938246903941 10291997.121727988123894,1721030.274482451146469 10289980.383059598505497,1722143.246751401340589 10287316.994455659762025,1728822.52751848846674 10269759.012607280164957,1735254.345057543832809 10247028.457936910912395,1739397.879143848782405 10232288.236305430531502,1741036.72468730667606 10232371.77283912524581,1742026.243640969041735 10233329.922625130042434,1745613.180273310514167 10238132.17785875312984,1746479.134592190850526 10239333.335063571110368,1747159.408000427531078 10240855.696528205648065,1747684.835996973328292 10242378.681749382987618,1747901.463726058136672 10243501.232772268354893,1747375.701771038817242 10244861.751574484631419,1738253.84873696626164 10256977.121298734098673,1727307.357929300982505 10278373.077450441196561,1728946.092153270496055 10289820.626292414963245,1730028.562881741672754 10293291.956459481269121,1731450.892015608726069 10296276.871013881638646,1735104.842981406487525 10299995.50340747833252,1735501.696966084418818 10300399.564008545130491,1738717.494416120927781 10303227.486492032185197,1747654.111817514523864 10310180.737669097259641,1748829.089042838197201 10310990.075924346223474,1753869.52426646463573 10313662.323562920093536,1755199.012945008464158 10314147.052503088489175,1758198.627943925093859 10314796.520228751003742,1764742.210251736920327 10315170.254228387027979,1768093.594841557554901 10315281.328842740505934,1769423.1948395925574 10315766.171517711132765,1769887.063157729571685 10317145.666741264984012,1769361.412522201659158 10318440.561220278963447,1767629.615203931927681 10319010.216762328520417,1764011.843072640709579 10319330.796294426545501,1762372.886209691409022 10319250.5771,1750251.418176702456549 10316980.905928533524275,1747746.840953343780711 10315686.285293521359563,1743046.59809358115308 10312528.313266254961491,1740820.20827771583572 10310750.003128761425614,1737789.869099340867251 10307674.081074446439743,1731512.67433 10302823.551352,1730337.697107675950974 10302015.46099603548646,1729008.097109640948474 10301447.206352042034268,1709867.267265192000195 10303547.333748552948236,1700838.143366948701441 10305328.44677421823144,1697838.639687523478642 10306701.19831096380949,1696570.822006879374385 10307594.288460398092866,1695797.708143319468945 10308727.488291030749679,1695241.222008844371885 10310100.916071524843574,1689860.705740842269734 10331983.552454851567745,1689520.513376978458837 10333446.385564979165792,1689891.652559283422306 10335395.753001151606441,1691128.523421486373991 10338644.363371511921287,1702724.229499459033832 10362655.67573368921876,1703095.368681763997301 10363390.167396353557706,1704239.510408137692139 10363963.548,1705754.679997325409204 10363309.727642573416233,1709558.133039257721975 10360698.587687887251377,1720411.672072111396119 10354262.431373516097665,1726410.568111470667645 10351413.223151342943311,1742366.32468534167856 10351171.739463938400149,1737016.977874763309956 10355112.438664861023426,1734419.448876593029127 10357506.45113167911768,1732898.156715413089842 10358531.41181187145412,1731989.010434103896841 10358972.36192717589438,1730949.954307038104162 10359315.049225032329559,1728964.79382772394456 10359216.466202149167657,1727165.091620068298653 10358824.788655284792185,1726163.216202927054837 10358777.847521308809519,1724178.055723612895235 10359265.757537370547652,1723547.096849794499576 10359901.588676899671555,1714505.727807566523552 10368202.994665190577507,1714567.510124954627827 10369592.726115956902504,1723324.56918769958429 10367077.899430435150862,1729725.439908314030617 10368301.706300573423505,1733528.892950246110559 10368743.281905949115753,1734512.178012422053143 10368790.290955346077681,1736757.158183252671733 10368252.350306160748005,1738130.061463204678148 10367127.247015092521906,1741692.28516858862713 10363309.727642573416233,1754271.387628231197596 10355322.68429889716208,1755291.853400331921875 10354262.431373516097665,1757580.025533588137478 10352392.432400587946177,1761228.855802808888257 10350031.546639204025269,1762156.481119589181617 10350679.713317103683949,1762744.025391996605322 10355483.671691872179508,1756745.240672128507867 10366571.519631754606962,1745922.314499245025218 10373019.185142543166876,1740139.9348694763612 10376043.514294501394033,1735378.132331302622333 10378004.965312961488962,1712000.92794522526674 10386998.074651019647717,1711289.596399056259543 10385442.841608865186572,1709558.133039257721975 10382908.681817844510078,1690571.925967520102859 10362333.07603570446372,1688531.105742807267234 10360290.979847714304924,1677893.860480564646423 10352880.183834489434958,1669915.926533883670345 10347590.626592438668013,1660732.068543440429494 10343439.941519347950816,1652413.942232892615721 10340434.560480229556561,1648950.792874315520748 10340514.733797015622258,1643261.031060887733474 10341733.834163062274456,1640478.155110547319055 10343279.235069883987308,1639674.09442854905501 10344498.531493078917265,1639797.881702310638502 10346285.856340488418937,1645147.339832380414009 10364125.030942033976316,1646167.805604483699426 10365186.801984200254083,1658567.572364454623312 10366737.469469731673598,1667998.893582932418212 10366652.291177676990628,1673812.108711647801101 10370243.028635334223509,1673533.698665174888447 10380784.251307647675276,1668215.187353543471545 10380945.834546,1655258.93445909768343 10378655.767977844923735,1652259.4307796722278 10378004.965312961488962,1644467.066424143733457 10382500.052643621340394,1643663.005742142675444 10383726.307327248156071,1642580.757652651052922 10387816.185670886188745,1642859.167699123965576 10389371.659986257553101,1645765.830923228757456 10392812.394484434276819,1647775.704329500673339 10394859.729231063276529,1670070.549306597793475 10399365.831948047503829,1675049.090893342159688 10399613.437370628118515,1676595.095981479622424 10398956.225358676165342,1677615.450434091733769 10397888.942804776132107,1678976.108570059062913 10398465.201727896928787,1681388.067977077094838 10402563.843650631606579,1680831.359203619416803 10403874.884949503466487,1676997.181982225738466 10404451.645006131380796,1675327.278300835518166 10404370.724399212747812,1670812.60503222537227 10403383.805784752592444,1663453.162176389945671 10401415.116014676168561,1659402.468545402633026 10399694.59722345136106,1656402.964865980204195 10399037.082366466522217,1654733.172504081157967 10398956.225358676165342,1653218.002914893673733 10399613.437370628118515,1653032.433323740959167 10400924.212222607806325,1656990.397818896453828 10407814.234812436625361,1657949.081273608841002 10408472.588318161666393,1666236.149446221534163 10414138.270769257098436,1668926.51889971527271 10415289.123218569904566,1672265.992304021958262 10415451.518042778596282,1674275.977029785048217 10415040.953464966267347,1690076.999511453555897 10411264.198222270235419,1694870.082826539408416 10409293.254411129280925,1695921.495417083846405 10408224.664146548137069,1698951.834595456253737 10405763.341195547953248,1706620.411677223397419 10413398.348526813089848,1728265.818745031021535 10423427.183884052559733,1748674.577589615248144 10431244.88327344506979,1751704.805448499042541 10431823.941181894391775,1755075.225671246880665 10431986.726603070273995,1756807.02298951940611 10431412.398857483640313,1759373.605169248767197 10429684.367650719359517,1760394.070941349258646 10428612.311130976304412,1761197.908984367968515 10427459.229124192148447,1761754.617757825413719 10426062.216915966942906,1762156.481119589181617 10422853.569963630288839,1766763.994843522552401 10424249.930976767092943,1770721.95933867781423 10431330.864214308559895,1776195.093423020560294 10444929.960251245647669,1776782.749014916364104 10450875.205595089122653,1764166.354525860864669 10458478.897692808881402,1759342.547031316440552 10457320.79939622245729,1754704.309127924498171 10454923.372947704046965,1740356.451279069995508 10456162.8960822802037,1736522.051418696762994 10456744.055258862674236,1727622.726046718889847 10460827.539964128285646,1719020.178437196882442 10455586.249033926054835,1718803.773347094422206 10449142.279763216152787,1718494.416482180356979 10447573.242182729765773,1715866.05198506009765 10443778.596096782013774,1714505.727807566523552 10443198.531274827197194,1706651.358495664317161 10445510.171088699251413,1705599.945905122673139 10446580.109556380659342,1703991.935860611731187 10448974.629196031019092,1702848.016773220617324 10451700.94417455047369,1701394.629501423798501 10455917.711036834865808,1701301.789046103367582 10457570.498780259862542,1702013.120592272374779 10459142.116581970825791,1707980.958493699552491 10468405.584961900487542,1709743.70263041020371 10470975.900997884571552,1717968.877166143618524 10482082.741686895489693,1723967.77320550289005 10486149.330547954887152,1725668.51238584308885 10486231.517715260386467,1726224.998520318185911 10484822.517389636486769,1725606.730068451957777 10481586.048368260264397,1725359.266840420197695 10478351.102575236931443,1727638.867372882552445 10477923.035707259550691,1727972.714525771792978 10477128.167735109105706,1728603.673399590188637 10476479.32751003280282,1729512.708361408207566 10476083.308399587869644,1735736.692411149153486 10480938.877674141898751,1738241.38095 10483477.736884746700525,1738779.276733511826023 10484225.236247651278973,1739076.388454438420013 10485070.8271,1743912.55241246172227 10490715.644636604934931,1749169.281406702240929 10489638.816529678180814,1750684.339676398551092 10488972.649135062471032,1751241.1597693443764 10487563.086774045601487,1752292.349720906466246 10475035.9225,1751550.293995278887451 10473542.70362539216876,1750344.258632025681436 10472714.338274542242289,1748489.007998462766409 10472878.094340894371271,1746726.486500734463334 10473460.668034095317125,1741475.768758998019621 10472566.394435470923781,1740455.414306385675445 10472516.285147247835994,1740158.525224438868463 10471719.9544119797647,1738470.142507577547804 10465508.758497152477503,1738562.982962900772691 10463772.141909595578909,1739119.469097375869751 10462449.640157977119088,1740170.881687917513773 10461372.763558078557253,1741438.69936856161803 10460545.565256113186479,1742644.734731817618012 10460295.75782947614789,1764630.334163489053026 10474207.377166727557778,1766269.068387455772609 10477025.793750105425715,1766980.399933624779806 10478515.291501432657242,1767722.4556592523586 10480091.406169937923551,1769732.551704506622627 10484904.688691893592477,1773752.187197561608627 10501443.196060467511415,1775020.004878205712885 10514852.300358489155769,1775174.627650917274877 10516684.127097925171256,1775916.906015527201816 10518269.323167597874999,1776813.584513869136572 10519520.024865444749594,1778019.508557630935684 10520354.0526775829494,1781761.179282175144181 10520019.768654527142644,1783523.478140923660249 10519437.738810325041413,1784822.465278988704085 10518521.246918566524982,1786399.194546584738418 10516102.37986989878118,1792645.776452958351001 10496536.30751003138721,1792861.95890408102423 10491464.230794722214341,1791408.794271264225245 10467250.284397395327687,1802571.578849540557712 10440561.679530600085855,1803901.178847575793043 10438002.405635314062238,1805045.097934966906905 10433552.509808886796236,1805849.381255950545892 10425483.643577875569463,1805694.869802727596834 10423675.952329779043794,1805261.725664051948115 10421701.452265102416277,1804117.69525716942735 10418164.876932369545102,1804179.700213539879769 10416521.52652632445097,1805292.672482492867857 10413808.815153293311596,1824959.152962467167526 10394121.87549277767539,1828268.013506806455553 10391175.082627376541495,1833308.114771962165833 10387573.423109751194715,1836307.50713189621456 10386099.060006320476532,1836987.780540132895112 10389290.91636311635375,1831576.428773183841258 10401824.868883987888694,1828577.147732740966603 10403302.602442080155015,1822547.082235957961529 10406254.590094234794378,1816795.649424633476883 10409293.254411129280925,1810456.894979883916676 10413727.784500123932958,1809683.558477341430262 10414959.612524580210447,1809126.849703883752227 10416354.372962884604931,1804210.313073510071263 10446498.692115498706698,1804210.313073510071263 10447491.51580167748034,1807828.307843781076372 10449886.352777453139424,1809034.343207034282386 10450625.749158825725317,1819949.887196261435747 10448974.629196031019092,1826536.216188534162939 10444685.175272369757295,1828731.659185961121693 10439238.883276365697384,1830277.886913078138605 10436766.446880415081978,1832349.765275723300874 10434706.613337548449636,1833617.248997896676883 10433801.34794070199132,1835349.046316166175529 10433222.123620243743062,1838874.089311625575647 10433140.567531896755099,1840080.013355390168726 10433882.911860983818769,1841131.425945931812748 10434869.466967122629285,1836678.646314201178029 10450212.783359138295054,1835411.051272539654747 10451124.671078607439995,1833679.253954267129302 10451700.94417455047369,1828174.950412503676489 10453271.221142074093223,1824340.773191109765321 10453933.938007580116391,1822578.140373890288174 10454510.44653263874352,1821557.674601789796725 10455586.249033926054835,1821712.186055009951815 10457402.345039622858167,1822145.330193685600534 10459387.118911219760776,1825113.664415690116584 10465426.818708568811417,1832442.271772573003545 10475368.3234,1833710.312092199455947 10474453.215258678421378,1836864.215905353659764 10469652.013078777119517,1838936.094267998822033 10467495.873843088746071,1841471.618309795856476 10465677.110581362619996,1854767.84092912892811 10460545.565256113186479,1856468.580109466100112 10460627.446899818256497,1857365.481246787589043 10461867.998638704419136,1860735.901469535427168 10466836.617153389379382,1841100.479127490893006 10473711.252548392862082,1838272.296144396765158 10481214.821178335696459,1830709.472578885033727 10480177.999945180490613,1826722.676335613708943 10473756.597388830035925,1819238.666969583602622 10468323.610644405707717,1814507.588610868435353 10476693.312665112316608,1815373.43161025759764 10482748.241552412509918,1826659.780823315959424 10492545.832087609916925,1834637.714769997168332 10499446.243228945881128,1835317.988178236642852 10502691.137030443176627,1832102.19072820013389 10509267.689627930521965,1827989.380821350961924 10509683.918900506570935,1819993.079158690059558 10508517.161247845739126,1816504.99423417286016 10507517.583590302616358,1813666.347218942595646 10505420.562215702608228,1808137.442069715587422 10503358.635857500135899,1806282.191436155233532 10503523.123759988695383,1802262.44462360907346 10504355.211260365322232,1800499.700486898422241 10504935.964377779513597,1799232.10544523387216 10505855.140988891944289,1798922.971219302387908 10507437.539720311760902,1799510.292852727230638 10511267.499950714409351,1800252.571217337390408 10512768.939965048804879,1801767.740806524874642 10513098.670744953677058,1803808.561031237710267 10512681.93448250181973,1805323.730620422400534 10511935.832715578377247,1808879.720434322953224 10511848.837785556912422,1815433.76677426812239 10514900.318418392911553,1816250.183919748058543 10515202.539788665249944,1816695.573202411178499 10516152.808019500225782,1816621.545741032576188 10516904.171272568404675,1816287.364629672607407 10517751.392162337899208,1814858.80160432192497 10519955.496682319790125,1813931.17628754186444 10520404.512056831270456,1812465.209913284052163 10519405.605472553521395,1811316.392768298275769 10520855.959786294028163,1809126.849703883752227 10521023.270308073610067,1793326.049861197825521 10527117.412512024864554,1792274.637270653387532 10528117.742350049316883,1792614.829634517198429 10529787.989574119448662,1795985.249857268063352 10537897.499479815363884,1796882.039675098145381 10539234.605969626456499,1800870.839669200591743 10541077.770423861220479,1802262.44462360907346 10541661.637770963832736,1838008.134992745006457 10523191.767164401710033,1839276.175312371691689 10522274.774154298007488,1841657.187900948338211 10518603.82226868160069,1843852.630898375529796 10513016.161558063700795,1844439.952531800372526 10509935.827829709276557,1844501.957488171057776 10508270.101527601480484,1851551.932159601245075 10498948.29337097145617,1860828.853244350058958 10489387.94968375004828,1862096.44828601158224 10488475.457657558843493,1866641.957053574267775 10486231.517715260386467,1869919.759459981461987 10484904.688691893592477,1870816.660597302950919 10486149.330547954887152,1870043.324094760464504 10487394.496763745322824,1862745.77487580711022 10498281.222879713401198,1853623.810522243380547 10504606.625185126438737,1851551.932159601245075 10506769.944221876561642,1847532.185347054852173 10514600.211051745340228,1847006.534711529733613 10515933.088075719773769,1846697.40048559801653 10517517.810553262010217,1847130.099346308736131 10519520.024865444749594,1832936.975589657202363 10534971.229282572865486,1827185.542778332484886 10535807.136199111118913,1809034.343207034282386 10543840.883718753233552,1807735.690027443226427 10544760.762094372883439,1805540.247030016034842 10550286.846323683857918,1806282.191436155233532 10551796.844923341646791,1813641.745611479273066 10555738.888435278087854,1816424.510242328280583 10556913.699825368821621,1842058.939943220699206 10565807.545611668378115,1846728.347304036375135 10566730.071368776261806,1859746.493835364468396 10567154.638180587440729,1861756.367241638945416 10566647.217377280816436,1863302.483649264788255 10565890.389462240040302,1875949.824956761440262 10558674.028902310878038,1876970.29072886495851 10557665.008236143738031,1878547.019996458198875 10555149.294071100652218,1879103.728769915644079 10553809.083685453981161,1878887.101040833629668 10551879.821509813889861,1877990.645181474275887 10550622.90917463041842,1876908.285772491479293 10549619.294520555064082,1874929.359184660948813 10547272.368498407304287,1874001.511228898307309 10546016.601142950356007,1873228.620004320750013 10544424.98617141507566,1873043.050413168268278 10542585.744000781327486,1874001.511228898307309 10542167.214222984388471,1879876.508675004821271 10543840.883718753233552,1881268.11362941050902 10544424.98617141507566,1890359.465123006841168 10549200.637232901528478,1891596.002026738831773 10549955.324681676924229,1893451.363979790359735 10552551.817958740517497,1895430.624526094645262 10554813.009478017687798,1898398.958748096367344 10555656.167071839794517,1906376.892694777576253 10557245.557826219126582,1908015.960877218050882 10556913.699825368821621,1909283.555918882368132 10555987.662340398877859,1910860.730464440537617 10553472.864765301346779,1928578.78589706029743 10523274.098215594887733,1929104.547852076822892 10521857.480722861364484,1929383.180537532316521 10504519.723026372492313,1929197.499626891454682 10502608.752757739275694,1928733.853947736788541 10500611.461160806939006,1927434.866809669183567 10497783.357445808127522,1927496.871766042429954 10496038.568491635844111,1928857.418582515791059 10495536.376487705856562,1930063.453945771791041 10496367.497211847454309,1931918.704579332144931 10498861.462755480781198,1932660.537665977142751 10500360.193396070972085,1938659.656344318995252 10515433.641566829755902,1938783.2209790982306 10516935.992705335840583,1938721.661300689680502 10518603.82226868160069,1938443.028615234186873 10520189.161220148205757,1936866.29934763815254 10524361.020721832290292,1936093.074164589866996 10525530.473415827378631,1930681.722397637786344 10532464.119059234857559,1928795.41362614533864 10534387.93070138245821,1927527.818584480788559 10535306.543057834729552,1924497.479406108381227 10536895.743737183511257,1923260.497224411461502 10537980.007069865241647,1922240.031452310737222 10539069.260446865111589,1917044.862136478768662 10546182.114113308489323,1916272.082231392618269 10547438.213296376168728,1914787.859460646053776 10556913.699825368821621,1915158.998642951017246 10558503.683964176103473,1919828.072045292938128 10566984.082542907446623,1921219.676999698625877 10567486.991933740675449,1928548.284356584306806 10566984.082542907446623,1930403.534990144427866 10566730.071368776261806,1935474.69439323246479 10564718.574573671445251,1938041.276572961825877 10562869.352409055456519,1940094.898539115441963 10560568.646346436813474,1946204.780110795516521 10555904.937977783381939,1952048.83073846087791 10552634.803674831986427,1953904.0813720212318 10552386.151294354349375,1955295.686326429713517 10552970.981533883139491,1956408.658595379907638 10553974.784707058221102,1956779.909097176045179 10555568.616350131109357,1955728.385187140433118 10556660.363165035843849,1950688.283921984722838 10558674.028902310878038,1946111.828335983678699 10561024.858482277020812,1934917.985619774786755 10567823.898341773077846,1933619.4437596721109 10568746.69532185792923,1933340.811074216617271 10570343.962820325046778,1934268.77034946763888 10571604.493638088926673,1937236.993251980980858 10572444.875350568443537,1946885.053519032197073 10573622.551374269649386,1955110.116735277231783 10574296.681052500382066,1956841.802734055556357 10574296.681052500382066,1956099.524369445396587 10582121.674088453873992,1953966.086328394711018 10604466.274938797578216,1952945.731875782366842 10605565.83468110114336,1951616.131877747364342 10605394.320941545069218,1950224.526923341676593 10604888.623675655573606,1931733.134988179663196 10596027.493760507553816,1929259.170624791178852 10594507.727304391562939,1928331.656627499265596 10593242.979774029925466,1926754.593401432503015 10590121.879476981237531,1926167.271768007427454 10588353.461769381538033,1924621.044040887616575 10585322.51613243855536,1921590.816182003589347 10582375.952863313257694,1917540.011231527896598 10580521.661667441949248,1912870.603870712453499 10579596.976231133565307,1905109.29765311605297 10578164.141894208267331,1898739.151111960411072 10577239.77425417676568,1895152.103160127764568 10577406.345065174624324,1893606.320710972649977 10578164.141894208267331,1892833.095527924364433 10579426.110919514670968,1892926.047302735969424 10580859.208974337205291,1893853.44998053368181 10582204.715226028114557,1896976.852253211895004 10582796.639763792976737,1898677.480114060686901 10582796.639763792976737,1901336.680110130691901 10584142.829410398378968,1902419.150838604895398 10585151.204899104312062,1903191.930743691045791 10586668.89853335916996,1903377.500334843527526 10588607.971748366951942,1903099.42424684157595 10590121.879476981237531,1899481.429476570570841 10593071.77408311329782,1893049.611937515204772 10597714.358345810323954,1891503.495529889361933 10598474.706884033977985,1888874.908393786521628 10597121.144563814625144,1886710.412214803509414 10595012.659284515306354,1885783.009537005797029 10593748.122190026566386,1885009.784353954484686 10592228.860889790579677,1883154.422400903189555 10589617.307557810097933,1882227.019723105477169 10588353.461769381538033,1877805.075590321794152 10582708.741952914744616,1875021.977000998798758 10581617.38746209256351,1854489.653521635569632 10578247.438020259141922,1839801.937267387984321 10577156.793214434757829,1837946.575314336456358 10577323.059153968468308,1836647.588176268851385 10578247.438020259141922,1832565.836407354800031 10598052.753153352066875,1832256.702181420521811 10599652.000942185521126,1832874.970633286517113 10601427.894796719774604,1834699.71972637064755 10603960.646138461306691,1840389.147581324679777 10608777.644288277253509,1841966.322126882849261 10609028.349825128912926,1845307.910601514624432 10606596.223869174718857,1847903.324529360048473 10605816.422754442319274,1849604.063709700014442 10605904.617338586598635,1850686.08916020905599 10606916.50330606661737,1851613.937115971697494 10608267.133938379585743,1852046.635976685211062 10610296.013625679537654,1851490.372481192694977 10611647.310516521334648,1846295.203165360726416 10615368.710535515099764,1845244.235852780984715 10616470.021079137921333,1844470.899350238731131 10617739.062384940683842,1843914.190576783847064 10619091.827985094860196,1843450.544897629180923 10621970.390345484018326,1843326.868943356210366 10625445.781697515398264,1843512.54985 10627307.692041978240013,1844130.818305865861475 10629090.768582826480269,1845645.987895053578541 10632225.092019917443395,1850098.76752678421326 10638927.080673882737756,1851181.238255258183926 10640032.491049649193883,1866951.536557470913976 10648357.373320732265711,1874929.359184660948813 10652439.868297422304749,1888534.716029922710732 10658651.691928224638104,1890297.460166636155918 10658735.972293926402926,1911355.434281524736434 10660522.653709033504128,1921096.112364919390529 10664528.059082863852382,1931238.431171092670411 10661799.884919904172421,1933031.676848282339051 10661205.694428611546755,1934083.200758315157145 10660096.860745389014482,1934887.038801333867013 10658820.253697272390127,1935412.689436858985573 10657459.61898035928607,1935691.32212231727317 10655841.918817646801472,1936773.347572826314718 10653032.992194715887308,1937577.185615845024586 10651757.701557075604796,1939649.063978490186855 10649548.168414195999503,1940948.051116554997861 10648614.427980091422796,1944039.949973338516429 10647082.953163217753172,1946080.770198051352054 10646574.169302294030786,1966737.103590161539614 10643769.041323933750391,1968159.210085046244785 10644277.616799278184772,1967850.075859111966565 10645892.586670201271772,1967077.18463453440927 10647166.785280195996165,1965252.435541450278834 10649464.30713670887053,1963181.002456770045683 10651673.507053013890982,1961634.886049141408876 10652439.868297422304749,1959841.195093989605084 10653117.20341837592423,1957954.886322496924549 10653290.222455380484462,1953100.243329002521932 10652692.176984755322337,1947565.326927271671593 10653117.20341837592423,1945771.635972119867802 10653799.505634197965264,1926012.648995296098292 10667341.400593062862754,1924744.719995157793164 10668278.005914626643062,1918993.175864344928414 10673478.00505006685853,1918715.099776342744008 10675015.397172410041094,1919487.879681428894401 10676553.134761702269316,1940329.337386726867408 10691248.958977736532688,1941751.889159573474899 10691845.764034189283848,1943359.676565102068707 10692104.149350091814995,1945400.496789814671502 10691676.69477734901011,1946946.613197443541139 10690905.927417322993279,1950595.666105646872893 10687829.266172967851162,1956532.668508123839274 10684580.171683851629496,1977899.776848946930841 10675015.397172410041094,1980652.039939319947734 10675699.885837137699127,1980064.273027932969853 10680563.016483040526509,1979786.085620439611375 10682186.571064617484808,1979260.434984914259985 10683552.131124876439571,1977961.447846846655011 10684495.572447882965207,1976075.584353318903595 10684749.065651010721922,1974343.787035046610981 10684749.065651010721922,1971189.549263418652117 10684152.879335140809417,1969427.250404670136049 10684152.879335140809417,1965994.713906060438603 10685176.395236460492015,1962902.481090805726126 10686716.110617579892278,1945060.415745442034677 10696725.320134593173862,1944751.170200016349554 10698267.637454470619559,1947132.182788596022874 10700149.464340411126614,1964417.650679993443191 10711978.224979430437088,1972055.392262810608372 10716702.173935705795884,1973787.078261588932946 10716787.172491924837232,1974343.787035046610981 10715325.344525415450335,1974096.212487523443997 10713439.33742468059063,1974621.974442539969459 10711978.224979430437088,1975673.387033081613481 10710866.07361176982522,1977219.503440710250288 10710093.4495485778898,1982754.419842441333458 10708548.154553912580013,1984640.728613934013993 10708378.36321104504168,1985908.768933560466394 10709151.102243458852172,1986867.118429799331352 10710437.136044023558497,1986867.118429799331352 10712152.738905167207122,1986063.280386780621484 10713439.33742468059063,1972426.531445115571842 10728644.77695638872683,1968777.923814874375239 10728814.76274392940104,1962407.777273718733341 10727699.869279757142067,1956192.587463748408481 10726320.823358952999115,1950162.521966968197376 10724601.971363851800561,1947472.375152459833771 10723312.961251338943839,1945245.985336594516411 10721165.254140168428421,1944287.524520861683413 10719877.201052552089095,1943174.106973949354142 10718848.479187810793519,1941906.511932285036892 10718074.952625546604395,1940422.289161538472399 10718159.659100892022252,1939865.580388081027195 10719617.455045038834214,1939834.63356964266859 10721340.002725888043642,1946730.542065811809152 10747677.845303978770971,1962562.288726941915229 10782093.475326305255294,1963366.126769960392267 10783650.813512980937958,1964634.167089584283531 10784431.800984885543585,1968963.048128062160686 10786080.221294980496168,1972179.402175554772839 10786685.366351060569286,1993051.80669929063879 10790331.423114443197846,2016830.429169172421098 10795887.493127845227718,2019737.203712765593082 10796927.883537355810404,2020696.109806457767263 10798235.554294461384416,2006007.836954756872728 10821648.343919919803739,2003905.457051635719836 10822084.323524612933397,2002575.411775638582185 10823128.402346055954695,2003348.636958686867729 10838407.298337319865823,2004245.538096011150628 10842167.681910343468189,2005575.13809404335916 10845838.79402563162148,2006564.545728214550763 10847150.834736462682486,2007677.629316655918956 10848203.800073623657227,2012223.472042692359537 10849602.964322980493307,2013367.502449574880302 10850651.580359263345599,2018438.661852662917227 10856959.917059557512403,2022922.499622323084623 10871876.016692353412509,2023417.203439410077408 10877585.971582598984241,2023386.256620968924835 10879343.795165061950684,2023077.122395034413785 10886384.698130134493113,2026509.102296190802008 10896071.491107646375895,2032353.598201821325347 10903565.855346573516726,2033683.198199856327847 10904360.700302038341761,2035476.889155008131638 10904360.700302038341761,2036775.431015110807493 10903391.459332110360265,2037857.90174358477816 10902242.590294275432825,2041846.590418198844418 10897480.519550895318389,2043423.764963757013902 10894836.926739117130637,2059101.00017166393809 10867747.497269945219159,2060709.121535666054115 10859767.18059766292572,2063801.465670411707833 10844353.799267657101154,2079386.083061977755278 10832029.963409546762705,2080530.113468860276043 10831329.631439093500376,2081674.143875742796808 10832379.842000115662813,2082199.905830759322271 10834476.345955947414041,2082478.427196726435795 10836396.086340943351388,2082478.427196726435795 10838143.318506632000208,2081952.665241707116365 10839631.681674271821976,2080375.602015640120953 10842254.256838468834758,2079324.078105607070029 10843388.017619784921408,2078551.298200520919636 10844704.625689677894115,2078025.536245504394174 10846189.696867398917675,2078025.536245504394174 10847939.440704131498933,2079014.943879675585777 10849252.200910182669759,2080313.597059266641736 10850040.734814422205091,2089590.518144015455619 10852402.469859475269914,2100536.674993210006505 10850742.991263309493661,2102360.978808329440653 10850127.409771727398038,2103412.391398873645812 10848901.140416037291288,2103309.420869887806475 10847061.9923181142658,2103659.965946396812797 10845487.909242546185851,2109132.877391757443547 10841730.731411337852478,2112256.168344944249839 10839977.544492438435555,2114080.472160063218325 10839367.654442261904478,2115874.163115215022117 10839281.430838337168097,2116709.05929616605863 10840856.284894095733762,2116709.05929616605863 10842691.240888260304928,2111513.889980333857238 10850213.770643319934607,2109442.456895653624088 10852493.904243754222989,2105762.457169009372592 10853893.94933951459825,2096609.545997004723176 10857311.392813665792346,2092898.933410392841324 10857576.115871738642454,2091043.571457341313362 10858274.415647445246577,2087920.280504154507071 10859940.463498679921031,2078891.379244893556461 10864854.820079637691379,2074685.617563232779503 10867747.497269945219159,2072397.668068958912045 10870120.118281064555049,2055081.253359120339155 10890432.900460179895163,2054277.415316101862118 10891753.872811414301395,2054184.463541290024295 10894923.856099270284176,2055204.817993902368471 10909220.103068646043539,2055421.445722984382883 10910893.887952284887433,2056256.230584444012493 10912485.70073302090168,2058884.817720543825999 10914077.885751320049167,2078118.154061842476949 10920974.865910409018397,2097475.388996393885463 10924688.701850512996316,2099052.563541954848915 10923896.25955893099308,2099578.214177479967475 10922389.05760283768177,2105175.135535584297031 10901893.870495822280645,2105175.135535584297031 10896511.939852107316256,2105422.264805145561695 10894836.926739117130637,2105948.026760161854327 10893428.127826618030667,2115595.64174925070256 10875915.604902934283018,2116399.92507023178041 10874597.69964637607336,2117420.390842334832996 10873458.736290952190757,2125768.907373867928982 10864151.108350489288568,2128119.418421965558082 10862045.460770463570952,2131273.322235122788697 10860292.092979207634926,2133097.626050241757184 10859675.648602891713381,2135045.828458613716066 10859328.785060293972492,2141694.162407262716442 10860114.066450837999582,2143487.519403940998018 10860114.066450837999582,2147661.77766970731318 10858977.520862855017185,2151310.830577910877764 10857576.115871738642454,2153908.359576080925763 10855559.242198949679732,2155979.792660761158913 10853282.813212890177965,2156753.129163303878158 10851964.547690620645881,2157526.020387881435454 10848814.481047291308641,2157494.962249949108809 10847064.512654455378652,2155670.658434829674661 10841730.731411337852478,2154650.303982220590115 10840414.697392696514726,2153506.273575334809721 10839454.193827109411359,2150877.686439235229045 10837884.068166168406606,2149393.574987980071455 10837356.159228879958391,2145992.096627299673855 10837096.938811667263508,2138756.441045228391886 10837447.392059769481421,2137272.329593970440328 10836919.202351056039333,2135973.342455905862153 10836132.184352125972509,2134952.876683802343905 10834821.94739892706275,2134117.98050285410136 10833339.349609948694706,2133437.707094617653638 10831506.90795860812068,2133406.760276176501065 10829670.244920225813985,2134179.985459224786609 10828447.648527158424258,2136127.853909126017243 10828102.684099484235048,2149764.714170285034925 10819900.62481896020472,2153351.650802623480558 10819206.243394799530506,2164112.349380156956613 10821298.701505795121193,2165349.331561850849539 10829411.316469773650169,2165627.852927815169096 10848290.45168038085103,2165132.703832768835127 10851526.968899289146066,2161546.212478389497846 10860027.264422060921788,2155609.098756421357393 10867221.69443142414093,2154310.111618353519589 10868186.118653045967221,2148558.678807029034942 10870207.048950435593724,2146703.31685397727415 10870819.388390323147178,2144786.061264046467841 10871171.579620629549026,2143147.327040077187121 10870911.070171810686588,2138725.494226787704974 10869328.942109471186996,2133994.415868072304875 10868364.672185681760311,2132046.102140209171921 10868625.08430852368474,2128923.256464987061918 10870293.664611183106899,2115379.45929813105613 10892547.340367514640093,2114853.80866260593757 10894042.875216022133827,2114575.175977150443941 10895630.753548514097929,2114606.234115079976618 10897480.519550895318389,2115441.018976539373398 10908686.320905772969127,2115719.651661994867027 10910631.854948265478015,2125212.643878372386098 10918764.028296191245317,2133777.899458481464535 10922389.05760283768177,2135416.967640919145197 10922656.640434231609106,2137024.755046447273344 10921859.338329188525677,2139096.633409092668444 10919468.628963915631175,2141446.58785973675549 10915490.645327925682068,2142498.000450281426311 10914340.051411706954241,2144136.734674248378724 10914606.999877879396081,2144167.79281217744574 10916374.405480718240142,2140302.557452854234725 10928409.347522938624024,2138849.058861566707492 10929027.261494578793645,2137210.324637599755079 10928764.529607187956572,2124872.56283 10925398.696334950625896,2122212.917559967376292 10923803.861758761107922,2121037.940334643702954 10922743.92568051815033,2119337.201154303736985 10919648.531919147819281,2118316.735382203012705 10918322.1379,2116678.001158233731985 10918055.043756553903222,2115100.937932166736573 10918851.582025365903974,2114049.85930009605363 10920090.508392235264182,2110122.730303890537471 10926726.151282640174031,2109071.317713348660618 10931421.330971328541636,2108823.743165822699666 10934877.904725268483162,2108329.039348738733679 10941796.004158031195402,2108854.689984263852239 10943926.459176467731595,2110246.294938672333956 10947564.919267233461142,2114513.616298741661012 10955560.830265253782272,2127129.565509832464159 10975689.745346078649163,2134860.258867464028299 10986397.164531614631414,2142529.058588210958987 10994890.904685137793422,2145373.828175433445722 10996143.75893889926374,2193766.971171557437629 11007867.892218882218003,2197415.467482307460159 11007779.185118397697806,2199549.350801323074847 11007242.773761289194226,2200878.950799358543009 11006165.240662848576903,2201930.3633898999542 11005003.72169123776257,2201991.923068311531097 11003567.414611360058188,2201095.578528443351388 10997662.240604858845472,2193828.530849966220558 10973015.603247916325927,2190582.009220471139997 10964994.351622873917222,2190396.439629318658262 10963483.14731509424746,2190365.492810880299658 10961610.553162144497037,2191416.905401421710849 10960456.940623920410872,2194848.885302578099072 10958853.869008727371693,2195622.221805118024349 10957519.812127336859703,2195869.351074678823352 10955829.720666920766234,2195807.791396270506084 10952274.503972692415118,2195158.464806474745274 10944726.350791711360216,2194570.809214576147497 10940821.418761750683188,2193272.15603498229757 10936825.832321180030704,2192560.935808304231614 10935053.109211690723896,2184923.194225487299263 10911335.296444188803434,2173976.480778839439154 10875828.601378532126546,2174224.055326362606138 10874158.349099790677428,2175677.219959179405123 10874684.687455393373966,2190674.62703681178391 10885504.820860369130969,2191540.470036201179028 10887085.956458466127515,2194508.804258205462247 10899069.199618520215154,2194787.325624169781804 10901011.987627370283008,2195096.459850101266056 10909748.839815141633153,2194601.756033017300069 10915490.645327925682068,2207248.76338204042986 10976400.26622718013823,2219679.476960452273488 10999721.991986548528075,2223359.142728625796735 10999004.197311744093895,2231522.534946968313307 11003837.887851767241955,2235078.636080359574407 11017733.861207557842135,2243304.033255072776228 11046957.965609163045883,2243922.301706939004362 11048398.934204442426562,2257775.678377691656351 11060218.559538301080465,2259228.843010505661368 11059588.604564536362886,2260249.308782609179616 11058413.36496639251709,2261826.4833281673491 11055617.138746121898293,2269494.726451460737735 11040203.993857122957706,2272525.510907800868154 11032913.109606588259339,2273514.918541969265789 11029855.840037984773517,2273700.488133121747524 11026350.979545978829265,2273112.832541225943714 11024199.393568944185972,2269958.928728068713099 11012082.652507646009326,2265536.98459528805688 10988811.836021441966295,2263650.787143286317587 10977027.371410915628076,2263341.652917354833335 10975062.763503301888704,2261702.473415423184633 10963390.210396073758602,2259074.331557285506278 10931684.165437407791615,2257930.301150402985513 10902155.567470358684659,2257620.721646506339312 10900217.215888440608978,2256476.691239623818547 10896071.491107646375895,2255023.526606809813529 10892373.226261407136917,2247601.967475112527609 10876886.006774829700589,2245530.53439042950049 10874337.059187199920416,2237459.64866893645376 10866869.707267288118601,2232759.517128662206233 10862748.955114128068089,2227440.783178051467985 10859675.648602891713381,2226265.805952727794647 10858712.427793920040131,2225245.340180627070367 10857398.160263855010271,2224379.497181234881282 10855819.165513943880796,2217391.52746617840603 10837447.392059769481421,2217081.947962281759828 10835522.638103749603033,2217051.335102314129472 10833689.609807586297393,2217298.464371875394136 10832116.095377339050174,2218566.504691502079368 10831070.639984954148531,2220483.315003470517695 10830806.943985264748335,2229017.957723609637469 10846540.617769872769713,2230904.266495102085173 10849429.943996015936136,2246241.754617107100785 10866257.722599636763334,2248467.810474501457065 10868538.173816528171301,2249797.855750498827547 10869328.942109471186996,2260527.496190099511296 10881368.037857849150896,2262413.693642101250589 10887438.989549720659852,2266031.799731863196939 10898802.859562173485756,2277936.862674749922007 10930268.041457494720817,2278678.695761397946626 10932132.02812871709466,2280317.875263329595327 10932394.890042437240481,2281616.417123432271183 10931333.615416945889592,2283688.295486077200621 10928939.576788121834397,2285203.465075261890888 10926196.094406522810459,2288264.751072078477591 10922656.640434231609106,2294448.882744116708636 10917258.280368147417903,2303261.712871748488396 10911602.445166278630495,2304838.887417306657881 10910719.304162228479981,2320176.37553931446746 10903478.497950464487076,2321351.35276463534683 10904452.834614269435406,2321413.357721008826047 10906217.606135940179229,2320671.079356398899108 10907629.053443055599928,2318104.497176669538021 10909661.403063980862498,2301128.274830694776028 10924956.056430887430906,2283224.538487431593239 10945169.958869164809585,2281183.718262718524784 10947564.919267233461142,2280410.381760179065168 10948897.025268193334341,2279915.677943092305213 10950409.790231099352241,2279977.682899462524801 10952186.519199121743441,2289377.723341028671712 10991492.199363304302096,2295438.735656252596527 10993456.732847154140472,2305395.596190764103085 10997932.478943295776844,2312198.441592633258551 11001777.211214371025562,2314826.583450771402568 11003749.233339166268706,2315877.996041312813759 11005092.392570197582245,2316403.757996329572052 11006076.555784722790122,2316898.461813416332006 11007779.185118397697806,2318321.013586263172328 11013604.700089298188686,2318352.071724192705005 11015398.022430939599872,2318166.502133040223271 11017014.48457457870245,2317671.798315955791622 11018542.483657671138644,2315383.292224228847772 11022669.798540225252509,2314888.588407142087817 11024199.393568944185972,2314424.942727987188846 11025724.158318750560284,2314486.502406398765743 11027520.682997832074761,2315537.914996940176934 11028868.550161022692919,2326793.651350028347224 11037593.445695549249649,2344326.582469460554421 11051197.058171024546027,2345841.752058648038656 11051736.9519351311028,2347697.114011699799448 11050924.69270221889019,2347913.185143328271806 11049305.009343648329377,2346985.782465530559421 11047680.845204068347812,2344851.899146514944732 11045067.421789953485131,2343646.309061221312732 11044077.594034891575575,2340894.157290342263877 11042543.840621599927545,2338451.139745391905308 11040475.929653765633702,2337369.114294880069792 11039121.220455469563603,2335389.853748575784266 11036243.846217356622219,2326082.43112335074693 11021412.044696668162942,2325865.803394268732518 11019888.570492358878255,2331617.236205593217164 11007956.60047734156251,2336688.840886643156409 11000080.5955,2337709.306658743880689 10998827.015498414635658,2339842.744699797593057 10998197.896303731948137,2342718.461105461232364 10999451.360316202044487,2343460.739470071624964 11001329.572903431952,2352953.843005940318108 11026173.083226725459099,2363034.15685574291274 11059950.707761954516172,2364642.278219741769135 11066183.274365888908505,2365260.65799109917134 11068258.705872064456344,2366837.721217166166753 11071333.319956647232175,2371908.880620254203677 11075135.136351034045219,2373269.538756221532822 11075950.623727599158883,2376361.771571476012468 11076855.496080089360476,2379732.303113715257496 11077307.814560456201434,2383845.00170107325539 11076313.600881669670343,2386998.905514227226377 11074409.653243301436305,2399491.178771047852933 11063289.533109297975898,2404717.406224811915308 11053629.678668305277824,2404933.5886759320274 11052009.349989620968699,2404562.783452100586146 11050023.270137306302786,2403913.12290383130312 11047859.305781176313758,2402367.006496202666312 11044166.452099723741412,2402831.097453319467604 11042632.678619433194399,2407191.036629729438573 11037865.276981063187122,2413375.6135797300376 11032286.006307287141681,2414952.342847325839102 11031387.054194569587708,2416931.603393630124629 11031026.470899851992726,2420580.211023871321231 11030848.452094215899706,2423981.689384551718831 11029140.032482942566276,2426022.509609264321625 11026622.361268861219287,2436907.106780047528446 11012979.053685963153839,2439844.939461573027074 11007508.554974326863885,2441019.916686896700412 11004556.193237397819757,2445070.610317881219089 10994350.680533040314913,2446554.83308863081038 10985685.919785656034946,2447018.478767782449722 10984076.890603398904204,2452893.921491851098835 10982291.81213984452188,2456666.093756874091923 10981845.455073738470674,2459418.245527755934745 10983360.745935896411538,2460346.093483516015112 10984881.19685204513371,2460438.711299856659025 10986667.27696761675179,2460253.14170870417729 10988365.050701366737485,2450729.091354394331574 11017551.667915841564536,2438422.27636923501268 11049305.009343648329377,2426455.653747939970344 11079660.487168192863464,2426980.970424994360656 11081381.668554494157434,2428063.441153468564153 11082650.581691399216652,2429300.42333516292274 11083646.050495684146881,2432237.699419234879315 11084915.387186497449875,2436845.213143168482929 11086274.698688257485628,2446987.977227306459099 11086727.6455,2450079.764764598570764 11087633.956178830936551,2451471.369719004258513 11088361.180997546762228,2452553.840447478462011 11089631.400169784203172,2459356.685849347617477 11100430.518481185659766,2460129.577073925174773 11104428.30567810125649,2459789.384710058104247 11105701.537182664498687,2458397.891075144056231 11105611.542526669800282,2455367.5518967686221 11101882.559455102309585,2454409.09108103858307 11100974.343366708606482,2447513.182584866415709 11096798.833872025832534,2444730.529273508582264 11095347.880565289407969,2421229.537613669876009 11087001.777827156707644,2419528.79843332991004 11086817.389971479773521,2417395.360392276197672 11087454.773163268342614,2391297.173692737706006 11099886.737191302701831,2390245.761102196294814 11101159.116404896602035,2389503.482737585902214 11102521.359707480296493,2389039.725738940294832 11104063.821311183273792,2385947.492923685815185 11114980.993274517357349,2374351.898165204562247 11120808.75487713329494,2372187.068027747329324 11121444.420176323503256,2370610.338760151527822 11122355.381926,2368507.513579068239778 11124818.57659668289125,2360467.574676013551652 11134851.218007907271385,2360977.195304863154888 11136596.98440008983016,2361426.480769705493003 11137409.37431213632226,2362694.075811369810253 11138508.277542013674974,2365006.62691311025992 11139978.692741697654128,2371105.042577235493809 11149566.408153776079416,2395193.355870502069592 11168349.271118042990565,2402738.145678507629782 11168439.772280419245362,2402645.527862166985869 11166605.543193183839321,2403047.279904439114034 11163124.713821977376938,2403542.428999488241971 11161654.547851493582129,2406015.948084914591163 11155700.915841195732355,2407036.413857018109411 11154418.260231705382466,2408366.013855053111911 11153321.717922914773226,2418972.534937834367156 11146456.131011806428432,2427506.732380011118948 11145998.847999421879649,2427321.05146936699748 11147646.725979257375002,2427506.732380011118948 11151396.029794635251164,2428155.947650318033993 11153502.979582592844963,2429114.853744010441005 11155152.353890301659703,2431310.296741434372962 11157713.239319959655404,2446462.215272289700806 11172755.504663920029998,2447853.374948733486235 11173491.918552033603191,2449430.549494291655719 11173950.730337522923946,2466159.642570705153048 11161473.397959884256124,2474384.705786947160959 11162938.574162218719721,2478095.207054067868739 11162757.389936938881874,2482270.021917290519923 11161745.289599666371942,2483568.563777393195778 11160647.561010390520096,2484310.842142003122717 11159182.880099181085825,2484186.832229259423912 11157351.155056118965149,2480043.520781931001693 11128009.230228086933494,2487341.181320378556848 11115891.087069125846028,2508306.0923409643583 11107974.052547382190824,2510285.464206759817898 11107519.357618857175112,2511120.249068219214678 11108703.461286161094904,2510656.158111099619418 11110247.329608488827944,2509635.6923389993608 11111521.654080778360367,2506791.034071268048137 11113615.917732389643788,2504688.542848655488342 11114675.908142536878586,2503358.497572658117861 11115345.737122235819697,2492195.712994381785393 11120263.337266068905592,2488361.647092479281127 11120718.559520553797483,2486506.285139427520335 11121534.625188875943422,2485485.819367324002087 11122811.072741845622659,2485578.437183665111661 11124633.485986739397049,2491002.479372566565871 11150365.530344313010573,2491855.631950005888939 11151672.459594612941146,2493432.806495566852391 11152130.125613067299128,2495288.057129127439111 11152039.512536257505417,2504688.542848655488342 11151215.153942765668035,2506853.039027641061693 11150481.157228203490376,2514305.21101930597797 11146551.607960447669029,2515603.752879408653826 11145360.876168923452497,2515634.699697849806398 11143989.999538987874985,2523334.557556529063731 11141519.501252338290215,2543310.060942946467549 11137499.79199886508286,2545288.876211288385093 11137133.525622420012951,2552679.488524544518441 11136677.1999,2554843.984703527763486 11135949.706568630412221,2556390.101111156400293 11135036.916467651724815,2557410.566883257124573 11133758.165221184492111,2557843.265743970870972 11132204.006984539330006,2557441.513701698277146 11130198.913574326783419,2555802.445519257802516 11126461.313085665926337,2548133.645798511337489 11114340.690789131447673,2541701.939578947145492 11106066.109569296240807,2540465.291355723515153 11105062.437369156628847,2537651.134628471452743 11103609.715589042752981,2529271.559959006030113 11100884.411408087238669,2512387.844109881203622 11096345.214223841205239,2508986.477068691980094 11095981.163910726085305,2507007.550480861216784 11096434.759215496480465,2503327.99603217933327 11096614.506379479542375,2501627.256851838901639 11096434.759215496480465,2498534.91271709324792 11095527.272168025374413,2495751.814127770252526 11094076.590768840163946,2485609.384002106264234 11086274.698688257485628,2483104.806778747588396 11084188.531570460647345,2481991.389231832232326 11082924.549365637823939,2481063.986554034519941 11081381.668554494157434,2482053.394188205711544 11080112.992654198780656,2483754.133368545677513 11080297.198413677513599,2485145.738322951365262 11081018.746293164789677,2488887.297728004399687 11084099.148060357198119,2491670.062358853407204 11085552.591725025326014,2498967.611577806994319 11088630.156421260908246,2503606.072120181284845 11089995.109898827970028,2504688.542848655488342 11090099.916769778355956,2512047.763065508101135 11090807.160596154630184,2515294.618653477169573 11091444.918727369979024,2521479.195603477302939 11093259.248831629753113,2539599.448356334585696 11099432.584061488509178,2545505.503940370399505 11101792.615454526618123,2546928.055713217239827 11102521.359707480296493,2559420.440289531834424 11097527.041808499023318,2565419.447648379486054 11076129.50322019867599,2578901.239858862012625 11054982.738298190757632,2595073.624161818064749 11049483.188057506456971,2596341.219203482381999 11050473.804159216582775,2612080.904645725153387 11062838.147839616984129,2613193.876914675347507 11064103.598415225744247,2620089.340132882352918 11074230.493334628641605,2619656.64127216860652 11075766.535912223160267,2618110.52486454276368 11076765.883244577795267,2616131.598276709672064 11077128.904007134959102,2612328.033915285952389 11077760.489100936800241,2608648.368147112429142 11078033.933491619303823,2603731.831516738981009 11077307.814560456201434,2601907.527701616752893 11077397.434552414342761,2599928.267155312467366 11077850.115071170032024,2598072.905202260706574 11078665.602824464440346,2596526.788794634863734 11079660.487168192863464,2589322.191350493580103 11084825.667851123958826,2588023.204212425742298 11085911.188333751633763,2586044.277624594978988 11088450.94709544070065,2579890.647493033204228 11097706.491047212854028,2580601.979039201978594 11099158.275913804769516,2590620.733210596255958 11103884.203814083710313,2598605.01236825203523 11106095.891482822597027,2600175.841702838428319 11116526.291515087708831,2596403.224159853067249 11131021.048398088663816,2597207.062202871777117 11140605.960852146148682,2602463.791197112295777 11140791.817035222426057,2616255.162911491468549 11145270.682726513594389,2618172.52982091344893 11146732.359384633600712,2619440.013543086592108 11147737.280338987708092,2618172.52982091344893 11148928.100417142733932,2612049.846507792826742 11150481.157228203490376,2610039.973101520910859 11150848.14564797654748,2608339.23392118094489 11150757.549711233004928,2606916.682148334104568 11150023.931957669556141,2605896.21637623058632 11158448.019864525645971,2612111.40618620114401 11170829.242106752470136,2625531.638718275353312 11194733.943593081086874,2632241.977623295038939 11202753.057331642135978,2632953.309169463813305 11204967.036581248044968,2633819.152168853208423 11206811.686743088066578,2650362.230376151856035 11227604.545933019369841,2651537.207601472735405 11228896.142025206238031,2655433.389779237098992 11231861.480906708166003,2659886.280730458907783 11233713.476851314306259,2669286.766449989750981 11236584.171909537166357,2673027.880577077623457 11236309.258297558873892,2675038.199261314235628 11235845.86731063015759,2699744.781006444245577 11227142.0838468875736,2702868.071959633845836 11225103.695769682526588,2705434.654139363206923 11222791.556534377858043,2706856.871953736059368 11219926.705475483089685,2707846.279587907250971 11218631.828600317239761,2709701.530221467837691 11217707.828679889440536,2711278.704767026007175 11218078.478242272511125,2711742.461765671614558 11220109.425858629867435,2711309.76290495833382 11221684.220723293721676,2700765.246778547763824 11236401.006137320771813,2699744.781006444245577 11237790.721011405810714,2697178.19882671488449 11240107.992091519758105,2695013.813967223279178 11240851.769723454490304,2688953.135610472876579 11256171.80159817636013,2704599.423999941442162 11289805.041028372943401,2708124.800953871570528 11293639.000848211348057,2712082.542810044251382 11296627.822355512529612,2724667.990480661857873 11292981.913329374045134,2727543.706886322703212 11290836.477892687544227,2728966.258659172337502 11287845.172994593158364,2741087.504053178709 11273947.733280839398503,2743654.086232908070087 11271618.84106707945466,2747395.645637961104512 11270498.454417018219829,2749003.767001960426569 11270871.672449627891183,2750456.931634777225554 11271618.84106707945466,2751786.531632809434086 11272642.475379282608628,2752837.944223351310939 11274224.181063793599606,2753425.711134741082788 11275903.575834164395928,2753920.414951825048774 11279350.57767672277987,2753796.850317046046257 11281123.603057811036706,2752992.566996065434068 11284296.396909140050411,2751600.962041656952351 11287286.131422678008676,2749498.470819044392556 11291672.975434610620141,2734254.045791342388839 11313573.068845316767693,2732676.871245781425387 11314608.140113942325115,2730635.939701579976827 11315076.961116617545485,2725101.134619337506592 11315262.270829161629081,2716968.577899944968522 11317137.256410067901015,2715236.891901163384318 11317699.1107038538903,2702002.228960242122412 11322487.234886536374688,2700425.054414683952928 11323611.204659102484584,2699404.699962071608752 11324926.34477218426764,2699002.502641837112606 11326525.746031370013952,2700177.479867160785943 11344860.190653402358294,2701229.003777193371207 11346463.981091493740678,2702558.492455734405667 11347499.018080536276102,2714494.613536553457379 11356551.158979911357164,2716411.869126487057656 11356458.105103727430105,2717123.200672656297684 11354944.97098178230226,2717555.899533369578421 11353344.256821678951383,2717679.4641681490466 11351552.518259746953845,2717493.894576996099204 11349667.955444918945432,2723678.47153 11339968.101434862241149,2724977.124706593342125 11338743.176956156268716,2737531.402919786982238 11328496.867206677794456,2740438.177463380154222 11326241.740983868017793,2742324.486234873067588 11326056.129851542413235,2743221.276052703149617 11328027.113969728350639,2743561.468416567426175 11331784.701465621590614,2743344.952006973791867 11335265.751394903287292,2742912.141826771665365 11336862.185175387188792,2739356.152012871112674 11353344.256821678951383,2735645.094148294534534 11379984.128752863034606,2736789.56983313895762 11388226.202389946207404,2737562.461057716514915 11389647.502708125859499,2745107.584824196062982 11392871.705255836248398,2746869.883682944346219 11393064.625936694443226,2750425.984816336072981 11393252.088661547750235,2758929.56939854240045 11390788.17199083045125,2766660.374075662810355 11379885.298602107912302,2767371.59430234041065 11378372.014888688921928,2767773.346344613004476 11376765.736178187653422,2767309.5893459697254 11374682.061328584328294,2766258.176755425520241 11373169.943771651014686,2769567.037299764808267 11370708.242527645081282,2779740.4142438727431 11371564.90256080776453,2781348.090329910162836 11371944.0867691449821,2781873.852284926455468 11383109.953007258474827,2781904.799103364814073 11384623.958677431568503,2781781.234468585811555 11386331.032371025532484,2781100.961060346104205 11387846.102219168096781,2780080.495288245845586 11389173.816421872004867,2779678.409287499729544 11390783.051859414204955,2780173.113104586489499 11392861.461834093555808,2781657.224555841647089 11393538.926956763491035,2782987.26983183901757 11392934.531916089355946,2785151.766010825056583 11391543.263240097090602,2786450.307870927732438 11390407.927469186484814,2790037.355822760146111 11386617.576577857136726,2800921.952993543352932 11373554.665711333975196,2807106.084665581583977 11362025.934871699661016,2807786.4693933124654 11360511.552408145740628,2809301.527663008775562 11355794.878675879910588,2810786.195711717475206 11351081.158569501712918,2811187.836434498429298 11349382.975528407841921,2812084.737571820151061 11344389.636903120204806,2812177.244068669620901 11342698.219502737745643,2812084.737571820151061 11339027.369450757279992,2811899.167980670463294 11337146.298524109646678,2813909.041386941913515 11335167.573724145069718,2821454.165153418667614 11339027.369450757279992,2826525.324556506238878 11358437.984103439375758,2826896.575058302842081 11362212.537368981167674,2826710.894147658720613 11365708.973892914131284,2825133.830921592190862 11372230.020727587863803,2823031.339698979631066 11376672.403208939358592,2822041.486786843277514 11378091.271802108734846,2821237.648743825033307 11381310.296752056106925,2820742.944926740601659 11384722.858254479244351,2820650.327110399957746 11386424.840146599337459,2820835.451423590071499 11388319.695300094783306,2821639.734744571149349 11390595.316391026601195,2822845.770107823889703 11391830.028892794623971,2824639.127104504965246 11391923.571753988042474,2826803.51196 11391168.437943287193775,2828411.63333 11390121.563560530543327,2832276.868687322363257 11386424.840146599337459,2834565.263459558133036 11383869.6413190420717,2839821.992453798651695 11377244.002741387113929,2841800.919041632208973 11374593.524505376815796,2842481.192449868656695 11373081.767230469733477,2843254.08367444621399 11369768.321937691420317,2853984.058072520885617 11365423.656107123941183,2878226.994138495996594 11366082.72783231921494,2879711.550867716316134 11365989.202384736388922,2883051.024272022768855 11365044.838017228990793,2884040.431906193960458 11363628.709130275994539,2885864.735721313394606 11357302.76887284591794,2886235.874903618358076 11355608.113917475566268,2885741.171086534392089 11353623.972503358498216,2884658.700358060188591 11352023.571472112089396,2878969.272503105923533 11344766.958739280700684,2877763.23713985318318 11343447.949849320575595,2869136.087922864593565 11334888.621510250493884,2859488.472933775745332 11325395.882409919053316,2855870.366844010539353 11312260.136813962832093,2855932.37180038401857 11310484.32220746576786,2855159.146617332939059 11308328.265969626605511,2854231.632620044052601 11306455.38590663485229,2853149.273211061023176 11304861.065432766452432,2841677.354406850412488 11291021.124055407941341,2822660.200516671407968 11268917.619944896548986,2807322.712394666392356 11252083.467177074402571,2805993.112396631389856 11251154.887969613075256,2794181.00122855650261 11238442.46714736148715,2792975.0771847916767 11237144.042662113904953,2791954.611412691418082 11235565.979849522933364,2791181.274910151492804 11233438.679852548986673,2792449.315229778178036 11232232.906506415456533,2794026.044497371185571 11232604.352495785802603,2799994.105037780944258 11235102.973330944776535,2803952.292171918787062 11237979.263746529817581,2811837.163024296984076 11229638.68811666034162,2812888.575614838395268 11203117.909001825377345,2813568.849023078102618 11201734.962893633171916,2813383.279431925620884 11199800.441031845286489,2812610.388207348063588 11197679.374860476702452,2811558.975616803392768 11196115.460281698033214,2810105.810983989387751 11195467.44543918967247,2808405.183123140595853 11196115.460281698033214,2805281.78085046261549 11197496.927188316360116,2803859.229077615775168 11198236.036504343152046,2798757.456814560573548 11193995.216442020609975,2793005.578725270926952 11187462.250084178522229,2792263.745638625696301 11185344.713469365611672,2794490.246773979160935 11173491.918552033603191,2795170.520182218868285 11172019.170824883505702,2796901.760903035290539 11172115.008669793605804,2798200.748041102662683 11173123.701600685715675,2797891.613815168384463 11160280.04149467125535,2785151.766010825056583 11147370.46033662930131,2781657.224555841647089 11143623.382292756810784,2780760.88001597346738 11141795.857499103993177,2778998.135879262816161 11132113.659906422719359,2777019.209291429258883 11118531.935261223465204,2776679.128247056622058 11114890.875400096178055,2776369.548743159975857 11100704.878082199022174,2776586.065152753610164 11097342.694528305903077,2777266.338560993317515 11095891.298123640939593,2781131.573920316528529 11090717.689852258190513,2782987.26983183901757 11088595.228184927254915,2783327.016917740926147 11088271.742502968758345,2785306.277464045211673 11087818.366226943209767,2786852.39387167384848 11088177.082606829702854,2788027.482416485901922 11089447.26731027290225,2789356.971095032524318 11096108.285184379667044,2789227.061249275691807 11098123.263058485463262,2788002.546850548591465 11100684.930228188633919,2786852.39387167384848 11102266.879074603319168,2786388.525553536601365 11104118.787178806960583,2786332.86580814095214 11105157.333176041021943,2786425.706263461150229 11106245.784857166931033,2786703.782351463567466 11107444.396443199366331,2787761.651472471188754 11109192.94246101565659,2790249.864730683621019 11114938.391948267817497,2793284.211410726420581 11116801.303021062165499,2792541.933046116027981 11114705.727888571098447,2792585.236328036058694 11109410.355463396757841,2792306.826281560119241 11108211.396422035992146,2792195.618110259994864 11107117.392096458002925,2793550.042354740668088 11099375.367501314729452,2793772.792655818164349 11098397.529355183243752,2795448.596270220819861 11093712.662173403427005,2798973.639265680219978 11093622.826431185007095,2800550.813811238389462 11093986.75020738504827,2809116.403349818196148 11097981.067376861348748,2811435.41098202439025 11100520.117416713386774,2812486.823572566267103 11102067.357235105708241,2827051.086511522997171 11133667.797427954152226,2840162.184817662462592 11155243.008601555600762,2841429.779859327245504 11159363.968761067837477,2841924.483676411211491 11161286.973711274564266,2842728.321719429921359 11164862.594091029837728,2842543.197406242135912 11168258.440875070169568,2841027.582539089489728 11169357.403435295447707,2837440.979865221772343 11169452.873282125219703,2833513.850869016721845 11171101.509492181241512,2831132.838280439842492 11173214.597102353349328,2830173.93218674743548 11174500.816554317250848,2830978.21550772851333 11178083.089347319677472,2833111.653548781760037 11183228.16976935043931,2834255.683955661486834 11185066.906296962872148,2835554.671093729324639 11185986.46180428750813,2840007.11676698923111 11191602.863958181813359,2847799.926400479860604 11202935.314716352149844,2871826.234737375751138 11239181.055167987942696,2888462.264719483442605 11261003.583382608368993,2889668.300082739442587 11262214.496477067470551,2890874.335445992648602 11263517.742816232144833,2894213.808850302360952 11267889.521518841385841,2895172.15834654122591 11269751.409587219357491,2895666.862163625191897 11271711.069130036979914,2897027.520299592521042 11281220.662757294252515,2897244.036709183361381 11283086.562111204490066,2921301.29186451761052 11330659.370922176167369,2933422.982536489143968 11351459.193894186988473,2935463.802761201746762 11354944.97098178230226,2952563.701061446685344 11376958.196923479437828,2955037.665424838196486 11379417.067836878821254,2957789.371917754877359 11381409.14777478761971,2969942.009408167563379 11386424.840146599337459,2971549.796813696157187 11386049.957971643656492,2974796.652401661965996 11377051.874493379145861,2975167.791583966929466 11375445.909926844760776,2976064.692721288651228 11366840.501787208020687,2971148.044771420769393 11312543.554672207683325,2970591.335997966118157 11310484.32220746576786,2968674.080408032052219 11306830.931765075773001,2966633.148863828275353 11303364.836189908906817,2964190.576596843078732 11300933.15952967479825,2961469.482963890768588 11298965.011413224041462,2957294.668100670911372 11296442.686352498829365,2954326.333878668956459 11295133.078114422038198,2947987.245475445874035 11293356.71118395216763,2945142.475888223387301 11291672.975434610620141,2935587.478715472389013 11285326.993485355749726,2933299.417901707347482 11282522.539302673190832,2932464.521720759104937 11280380.420473234727979,2933422.982536489143968 11278981.591648327186704,2935309.291307981591672 11278792.238120913505554,2939731.124121271539479 11280754.520247295498848,2943905.493706529028714 11283363.383849881589413,2949842.496109005995095 11285978.295948298648,2951450.617473005317152 11286352.705645482987165,2954944.713650026358664 11286537.229363702237606,2966045.938549894373864 11281497.408098274841905,2967004.288046133238822 11280098.683950487524271,2967066.293002503924072 11278418.246913213282824,2966818.718454980757087 11276553.971016556024551,2961809.564008263405412 11246325.122346175834537,2960850.769234062638134 11244561.195884929969907,2956150.637693788390607 11232879.11561162956059,2951543.235289346426725 11210776.695334559306502,2951326.607560261618346 11208930.632275361567736,2950461.209838834125549 11189671.234330033883452,2950522.769517245702446 11187922.009259505197406,2951821.756655310280621 11184975.851598598062992,2953058.40487853391096 11183783.644670778885484,2955161.230059617199004 11182955.414505604654551,2956769.017465145792812 11183319.200973313301802,2957974.941508907359093 11184516.292385049164295,2964128.571640469599515 11191142.523410405963659,2978692.834579426329583 11207364.116774080321193,2982743.52821041084826 11214104.203428687527776,2983578.424391361884773 11216225.433375388383865,2983794.94080095551908 11218078.478242272511125,2983763.993982514366508 11222974.354282230138779,2983176.672349089290947 11225845.825808,2988000.257204651366919 11226953.842840846627951,2997431.801062111742795 11225474.750615622848272,3002719.476874792948365 11219002.528769386932254,3008903.719866322353482 11224824.252274442464113,3004574.838827844709158 11240016.193968443199992,3002874.099647504743189 11254405.640336338430643,3002812.094691134057939 11256074.766180230304599,3006955.85141642158851 11262863.576212793588638,3012119.628635850269347 11270406.242892630398273,3013573.127227135002613 11270314.032625757157803,3015459.435998627915978 11267613.332602897658944,3016696.084221851080656 11266401.117347702383995,3031755.384936365764588 11260911.501241317018867,3035434.939385045319796 11259700.82141119427979,3035527.557201385963708 11261192.774261737242341,3034569.096385655924678 11262490.464974638074636,3031476.863570401445031 11266493.274270087480545,3029003.233165483921766 11268917.619944896548986,3021921.755078159272671 11274690.209042882546782,3015026.291859952267259 11300367.982360478490591,3015583.000633409712464 11302336.53917520865798,3017252.79299530852586 11306640.796423871070147,3020376.083948495797813 11313295.006945511326194,3021179.92199151404202 11314700.956664133816957,3022695.091580701526254 11315355.096366358920932,3034012.387612198479474 11317044.744017586112022,3036857.157199420966208 11323611.204659102484584,3037135.678565385285765 11325488.847295980900526,3039485.744335523806512 11338934.556760780513287,3040042.453108978457749 11341002.143148047849536,3041155.425377931445837 11342506.733008176088333,3042918.169514642097056 11342599.933721076697111,3044804.478286135010421 11342320.674341283738613,3052843.971911224536598 11339404.730530777946115,3062924.731038991827518 11336578.083778562024236,3068583.212075504940003 11335828.777115242555737,3062430.027221905067563 11355229.846218233928084,3056833.105863800738007 11359946.464844956994057,3048236.458187291398644 11360890.116175724193454,3040042.453108978457749 11361647.307404974475503,3036393.400200775358826 11361833.899436039850116,3034383.526794503442943 11362399.145024675875902,3028477.471210467629135 11364479.370853193104267,3025045.046031346078962 11366653.771311722695827,3023808.063849651720375 11367878.667767392471433,3020623.213218056596816 11371850.820455154404044,3019324.67135795392096 11374874.122122252359986,3019262.666401580441743 11376672.403208939358592,3020777.724671276751906 11388038.538049617782235,3030487.344616739079356 11408729.059844404459,3031600.428205180447549 11410348.102480359375477,3034383.526794503442943 11412250.032646058127284,3036022.261018470395356 11412631.167946627363563,3056709.095951059367508 11404547.361796785145998,3058564.791862581856549 11403597.586036579683423,3063481.439812449738383 11426534.548593571409583,3063759.627219940070063 11428440.706759754568338,3064749.034854111261666 11430347.747309688478708,3068552.599215534515679 11434068.286214150488377,3078169.267386185470968 11441038.530036589130759,3086981.986194326076657 11432160.536610379815102,3091063.737963242921978 11419961.167740138247609,3102474.097089045681059 11413294.86734382994473,3104267.342766232322901 11413294.86734382994473,3113142.177850235253572 11417769.864627946168184,3114533.782804640941322 11418721.638370828703046,3117842.198071017861366 11423671.176169142127037,3120377.722112817689776 11426152.283578742295504,3140075.149411233142018 11429677.217743838205934,3141930.51136428443715 11428629.498599080368876,3143167.493545978795737 11427388.031728429719806,3144095.341501741670072 11425958.757310073822737,3145362.936543403193355 11422912.136940557509661,3146012.151813710108399 11419579.275171672925353,3146043.209951642435044 11417769.864627946168184,3155196.12112364731729 11403409.493630580604076,3158999.685485071036965 11402840.802493961527944,3169018.439656464848667 11400180.252140397205949,3171151.877697518561035 11399231.091015277430415,3174553.356058198958635 11397046.511311715468764,3176996.373603146057576 11394487.287511471658945,3177923.776280946563929 11393064.625936694443226,3178263.968644810374826 11391449.72565152682364,3176377.659873317927122 11382163.190122082829475,3174893.548422062769532 11376199.286224393174052,3166327.847563991788775 11354665.200565915554762,3157515.128755850717425 11342506.733008176088333,3146290.784499165602028 11331222.012757116928697,3145022.744179539382458 11329998.673389850184321,3143631.139225133694708 11329059.328924663364887,3142023.463139096274972 11328682.54542119987309,3132282.785055704414845 11327557.3934,3118770.046026780735701 11331129.307269427925348,3117533.063845086377114 11332347.775455880910158,3094712.790871446486562 11331407.765902746468782,3093104.558187955990434 11331129.307269427925348,3091589.499918259680271 11330468.225463045760989,3090475.971051853150129 11328966.314885128289461,3090785.550555749796331 11327273.68311969935894,3097835.636546668130904 11323235.062865756452084,3104329.347722605802119 11322017.899374717846513,3108225.529900370165706 11321172.569503407925367,3129592.638241193257272 11313202.547150064259768,3131107.807830380741507 11312074.909423485398293,3131602.511647465173155 11310855.032188287004828,3130922.238239228259772 11309171.990181932225823,3129901.772467124741524 11307299.213424818590283,3126531.352244379930198 11302711.856190828606486,3125294.370062682777643 11301493.667956655845046,3121151.058615357615054 11298687.549977218732238,3099412.811092229560018 11283829.706293283030391,3078942.047291271854192 11269848.641450356692076,3077705.510387539397925 11268636.025438729673624,3079529.814202661626041 11267705.170869167894125,3084755.596378460992128 11267797.34556576795876,3088095.403741241432726 11268170.749736841768026,3094310.593551211990416 11270032.715254681184888,3098794.097362398169935 11271987.425476431846619,3131200.425646721851081 11289337.969947706907988,3135344.182372008915991 11292145.253786375746131,3136581.164553703274578 11293356.71118395216763,3137725.194960585795343 11294850.726041562855244,3138714.602594756986946 11296725.441562809050083,3139580.445594146382064 11298872.747487064450979,3140600.91136624943465 11300650.565036712214351,3147249.245314895641059 11305894.802869625389576,3148856.921400933060795 11306172.560389645397663,3149784.769356695469469 11304768.720972936600447,3150093.903582626953721 11303179.852478206157684,3150434.095946491230279 11299807.904061483219266,3150496.100902864709496 11294573.433460341766477,3149104.495948456227779 11285229.538761965930462,3148516.729037068784237 11283178.610800303518772,3147651.331315641757101 11281123.603057811036706,3144868.232726318761706 11275063.658533660694957,3143878.713772656861693 11273200.307278364896774,3141744.941773131955415 11269848.641450356692076,3138374.410230893176049 11265378.762437989935279,3133767.007826450746506 11259608.757006224244833,3131416.942056312225759 11256820.301615243777633,3116636.162707765121013 11241962.247030399739742,3114162.532302847132087 11239552.882813438773155,3110482.977854165248573 11236584.171909537166357,3107761.884221215732396 11234731.390152713283896,3103061.41872247075662 11231027.014625381678343,3101020.487178266514093 11228433.258425772190094,3100433.165544838644564 11226399.811646731570363,3103481.761119705159217 11216174.872654687613249,3105968.081946572754532 11214104.203428687527776,3114069.580528035759926 11225566.01856960915029,3124212.344612173736095 11230472.649855490773916,3128695.848423363175243 11232324.265657806769013,3133396.313922108151019 11233621.765447102487087,3136612.11137214442715 11234176.72181361541152,3137230.379824010655284 11232695.716662617400289,3136117.407555060461164 11231215.368976168334484,3131911.645873399451375 11228804.495890107005835,3129190.55224044714123 11226953.842840846627951,3126685.97501709125936 11224549.816020270809531,3123346.50161278154701 11220018.231462426483631,3122357.093978613615036 11218169.979238424450159,3121522.197797662578523 11216042.817816957831383,3121522.197797662578523 11214378.216440565884113,3121862.39016152638942 11212719.343779422342777,3122758.734701394569129 11211425.844879517331719,3130272.911649429704994 11211699.749486312270164,3131510.005150615237653 11212901.869692269712687,3132375.848150007426739 11215027.711490230634809,3133612.607692718971521 11218149.682547062635422,3134132.135756251867861 11219370.586905671283603,3136797.680963296908885 11224549.816020270809531,3142765.296225744299591 11235382.841639183461666,3150805.235128796193749 11236955.856858711689711,3152412.911214833147824 11237235.801822742447257,3153990.085760391317308 11236864.101494666188955,3154299.219986326061189 11235291.107604855671525,3153711.898352900985628 11233250.263602688908577,3152846.055353508796543 11231215.368976168334484,3150990.804719948675483 11227233.374291054904461,3145239.371908624190837 11215860.207185447216034,3138374.410230893176049 11202291.958098378032446,3135777.326510687358677 11195928.08011776022613,3134076.587330347392708 11190035.381745770573616,3134107.088870823848993 11186633.238758435472846,3134663.797644281294197 11143623.382292756810784,3135096.941782956942916 11135217.361083054915071,3136982.8052764874883 11125729.991823811084032,3137570.572187874466181 11124272.836352057754993,3137632.577144247945398 11120808.75487713329494,3137354.055778280831873 11118987.369187640026212,3135375.129190450068563 11111341.511443318799138,3134540.233009502291679 11109247.949911439791322,3131726.07628224696964 11103609.715589042752981,3128819.858336106874049 11098339.994624132290483,3126809.539651870261878 11095253.121888371184468,3121274.623250139411539 11088904.039198763668537,3124428.527063293382525 11089447.26731027290225,3125913.083792513702065 11090084.897617237642407,3128294.096381090581417 11091808.725691832602024,3130705.721829634625465 11094166.432520046830177,3131819.139376549981534 11095617.133132981136441,3134725.802600654773414 11100974.343366708606482,3138993.123960721306503 11111246.529070204123855,3142239.645590216387063 11120898.951433483511209,3142796.354363673832268 11122811.072741845622659,3142796.354363673832268 11124543.239738080650568,3140972.050548554863781 11128921.074505081400275,3139085.741777061950415 11138412.913829166442156,3138219.898777673020959 11160466.438039546832442,3138188.840639740694314 11162203.306498304009438,3141930.51136428443715 11196575.807375472038984,3142796.354363673832268 11200448.538868196308613,3153897.579263541847467 11224824.252274442464113,3170409.599332908634096 11276835.559855794534087,3173625.5081024360843 11292145.253786375746131,3175728.333283519372344 11302429.187308672815561,3175079.118013215251267 11305704.693867133930326,3175079.118013215251267 11307484.309941053390503,3175666.328327149152756 11309449.882450668141246,3177460.130601792130619 11313670.933158850297332,3199569.517307225149125 11352966.11593739874661,3200930.064123701304197 11354380.349153464660048,3206372.362709094304591 11358437.984103439375758,3209186.074158384464681 11360231.551214948296547,3211999.896927166264504 11361553.843390110880136,3215277.699333573225886 11362119.065527921542525,3217040.443470283877105 11362119.065527921542525,3222606.306690458673984 11361553.843390110880136,3232284.979817479848862 11359381.424580143764615,3255321.769200711045414 11349760.915781304240227,3256527.804563967045397 11348440.931097112596035,3257455.207241764292121 11347028.28040880151093,3263763.460146037861705 11331970.808468274772167,3266948.756055595353246 11297192.686811629682779,3266886.751099224667996 11288404.260805774480104,3292706.750391269568354 11302711.856190828606486,3297808.967932289931923 11307484.309941053390503,3301302.952789817005396 11311982.128941813483834,3302354.365380361676216 11313763.736834613606334,3303652.907240464352071 11314979.076434740796685,3305508.269193515647203 11314700.956664133816957,3313455.145002267323434 11312167.691179236397147,3315279.894095348659903 11311138.053772212937474,3315774.597912435885519 11302614.150472482666373,3315712.592956062406301 11299062.664386015385389,3315372.400592198129743 11295507.995282446965575,3314723.185321891214699 11291770.523102283477783,3313486.203140196856111 11287752.724564982578158,3312558.689142907969654 11285695.989962,3311507.276552366092801 11283829.706293283030391,3309868.542328396812081 11281313.021896736696362,3306405.059011346194893 11276835.559855794534087,3305292.086742396000773 11276087.814557500183582,3304147.72237703949213 11274597.9403,3303529.342605682089925 11272642.475379282608628,3305013.565376431681216 11271429.693630017340183,3306621.686740431003273 11271711.069130036979914,3316980.633275688625872 11276461.676869178190827,3321278.456176234409213 11278792.238120913505554,3322546.496495861094445 11280006.341399550437927,3323473.899173661600798 11282056.307018149644136,3323814.091537522617728 11283927.140837751328945,3324741.939493285026401 11285978.295948298648,3325793.352083829697222 11287845.172994593158364,3333369.088710273616016 11300275.362481161952019,3334544.177255088463426 11301776.297708852216601,3337450.840479190461338 11303272.175227764993906,3340604.744292347226292 11304115.605308853089809,3347500.652788516599685 11304300.614638423547149,3349262.951647265348583 11304300.614638423547149,3350933.077967638149858 11303549.824965547770262,3352417.189418893307447 11302336.53917520865798,3361322.526043372228742 11293546.473139677196741,3377247.781076767016202 11268728.212825199589133,3378391.811483649536967 11265654.860099107027054,3377618.474981110077351 11263983.033457800745964,3372732.885169174522161 11258771.195877948775887,3365744.470176155678928 11251618.994447479024529,3346974.890833500307053 11245488.870322870090604,3341316.07583851646632 11246788.89755491912365,3339708.288432987872511 11246508.557010317221284,3339862.911205699667335 11245208.583647551015019,3341037.888431022875011 11243913.870070613920689,3343697.088427093345672 11241498.802588760852814,3345768.855470247101039 11240571.675101073458791,3355478.475415706634521 11237699.288019308820367,3357210.272733978927135 11237699.288019308820367,3358817.948820016346872 11237979.263746529817581,3363363.457587576005608 11239644.340859413146973,3369269.847130085807294 11242242.399232380092144,3370661.006806529592723 11243078.250009249895811,3373227.588986258488148 11245488.870322870090604,3374402.677531073801219 11246972.678948326036334,3377062.211485614534467 11249017.33309138007462,3379968.986029210500419 11250409.976712968200445,3384730.565928401891142 11251522.024324046447873,3387977.421516368165612 11252083.467177074402571,3391347.841739115770906 11252267.058065976947546,3393327.213604911230505 11251618.994447479024529,3404613.562817969825119 11247161.143599,3406067.061409257818013 11246044.80102039501071,3406933.015728137921542 11244653.055701719596982,3406901.957590205594897 11242889.565119748935103,3410581.512038887944072 11230192.984564574435353,3431515.921518997754902 11210964.15455518476665,3443018.898461140692234 11217428.690389493480325,3444657.632685107644647 11216687.482720898464322,3445523.475684496574104 11215301.761891797184944,3451862.67540721129626 11198787.767189644277096,3455449.723359044175595 11182400.007526943460107,3459593.034806369338185 11163487.436822587624192,3459221.784304573200643 11161654.547851493582129,3457954.300582399591804 11160556.833962567150593,3441009.025054866448045 11153502.979582592844963,3439400.903690867125988 11153226.145545471459627,3437700.164510527160019 11153321.717922914773226,3421188.033121671993285 11153045.220839327201247,3399171.264232576824725 11148284.913032837212086,3397810.60609660949558 11147465.950167194008827,3379813.917978534474969 11127463.233106760308146,3378886.515300736762583 11125454.617951132357121,3378546.322936872486025 11123631.984014859423041,3378824.510344366077334 11121994.853441862389445,3379381.21911782072857 11120533.580797277390957,3380123.497482430655509 11119442.505785889923573,3382411.558296195697039 11116891.118491465225816,3382071.365932331886142 11115070.7846386320889,3381143.963254534173757 11113065.836544793099165,3378979.133117074612528 11109882.532403545454144,3377835.102710192091763 11108428.450574239715934,3375206.960852054413408 11106430.701553286984563,3352386.242600452154875 11091714.016435028985143,3350098.181786687113345 11091081.457821356132627,3332194.111484952736646 11089267.709937179461122,3329194.830444510094821 11089178.259491890668869,3325824.410221762023866 11089178.259491890668869,3316980.633275688625872 11090174.360016640275717,3315155.884182604495436 11090538.09885448217392,3313114.95263840071857 11091444.918727369979024,3285594.659443977754563 11100340.593732230365276,3257610.275292440783232 11106700.394410220906138,3232222.974861106835306 11110611.818944064900279,3207856.585479840636253 11123722.218135176226497,3200249.790715461596847 11126461.313085665926337,3198425.041622380260378 11126731.803769210353494,3194899.998626921325922 11127007.229522090405226,3190014.408814982976764 11126366.118689075112343,3185592.576001696288586 11124633.485986739397049,3183149.558456745930016 11122265.165993822738528,3183149.558456745930016 11120533.580797277390957,3185097.87218460906297 11119898.000876788049936,3189983.46199654461816 11120533.580797277390957,3194621.922538918908685 11121719.631223663687706,3196106.033990174531937 11122355.381926,3199383.94771607266739 11122630.62995139695704,3200868.059167330618948 11121534.625188875943422,3200868.059167330618948 11119807.817633969709277,3199755.08689837763086 11118347.016178173944354,3191406.013769391458482 11109517.7548194732517,3188684.920136441942304 11107699.398761540651321,3185443.964481486007571 11106465.721743177622557,3184819.684777115937322 11105426.975404256954789,3185128.819003050215542 11103884.203814083710313,3186891.117861798964441 11102885.761196170002222,3209649.831157027743757 11092984.863544652238488,3228481.415456053800881 11085911.188333751633763,3250652.807117860298604 11073236.404644124209881,3257548.270336067304015 11072873.917703915387392,3272205.485049835871905 11069256.948243875056505,3286676.684894489590079 11064555.067843185737729,3299540.208653106354177 11060129.166083594784141,3303034.638788598123938 11058145.584403710439801,3301828.603425344917923 11055979.030172359198332,3293634.153069070074707 11046779.853145325556397,3290758.4366634064354 11045067.421789953485131,3284141.160852689761668 11040475.929653765633702,3276410.801453534513712 11034445.013203427195549,3269638.902870106510818 11023390.097577592357993,3268958.629461870063096 11021772.117998553439975,3270288.229459905065596 11020963.434284914284945,3273751.156179502606392 11020603.403839679434896,3275328.330725060775876 11020963.434284914284945,3276657.930723095778376 11021772.117998553439975,3280739.682492012623698 11029406.671689443290234,3281914.659717336297035 11033273.793073333799839,3286738.689850860275328 11038132.25894121825695,3287975.672032557427883 11039303.9932,3289521.899759674444795 11039571.031724197790027,3306714.304556768853217 11041193.25712745077908,3308631.560146702453494 11040565.064733725041151,3309775.590553584974259 11039393.112898649647832,3310363.246145480778068 11037954.053798239678144,3314166.476548433769494 11015939.922331815585494,3314135.418410504236817 11014235.247240446507931,3310795.945006197318435 11005540.278799168765545,3305322.699602363165468 10998109.637439014390111,3303281.768058159388602 10995603.435209730640054,3300468.056608868762851 10994262.149680165573955,3299138.456610833760351 10993368.21363621391356,3283337.211490182671696 10961258.457944046705961,3282440.421672352589667 10959210.643872275948524,3282440.421672352589667 10957519.812127336859703,3283894.031583131756634 10958052.314741581678391,3287542.527893881779164 10961522.447553446516395,3289645.46439445624128 10964637.273268718272448,3290325.737802693154663 10966241.708679301664233,3290944.006254558917135 10968203.769558347761631,3291809.849253948312253 10970161.264017887413502,3292799.368207610677928 10971855.241704700514674,3301024.765382326673716 10980771.940108,3302261.413605547044426 10981933.824376666918397,3305044.512194870039821 10983272.679493283852935,3308043.793235312681645 10984165.288914171978831,3333832.845708919223398 10989076.897489430382848,3342491.05306383734569 10982022.194828158244491,3355323.963962486479431 10969358.696914780884981,3358911.011914319358766 10967665.340888483449817,3360580.692956726998091 10967665.340888483449817,3360611.751094659324735 10969358.696914780884981,3360178.606955980882049 10970518.632523795589805,3355509.533553638961166 10979345.24046703800559,3353949.168251188937575 10991632.182553065940738,3360756.132474217098206 10992481.797543875873089,3357411.315734350588173 11004876.037658,3357179.214596046600491 11020697.126265924423933,3358168.733549708966166 11027698.291095746681094,3359405.715731403324753 11028868.550161022692919,3372331.244446393568069 11030038.687245180830359,3373938.920532430522144 11029317.682926528155804,3375392.085165244527161 11028241.49659357778728,3376227.315304666291922 11026799.945880765095353,3384174.302432906348258 11012801.507150871679187,3384421.431702467612922 11011186.36956680752337,3386060.611204399261624 10993549.759732889011502,3386307.740473960060626 10978629.915161924436688,3386153.117701248731464 10971943.160397863015532,3385503.791111450176686 10968468.028883259743452,3384885.522659587208182 10966510.701030880212784,3383741.158294230699539 10965082.18166696280241,3382535.122930975165218 10964016.116996815428138,3378175.183754567522556 10962324.090446358546615,3377123.771164026111364 10961610.553162144497037,3378700.945709584280849 10960901.575658353045583,3380494.191386773716658 10960544.712096286937594,3385380.226476671174169 10960720.899127192795277,3386740.884612635709345 10961610.553162144497037,3387853.856881588697433 10963038.023044599220157,3388874.322653689421713 10964730.227229297161102,3389616.601018299348652 10966329.554832836613059,3389925.735244231298566 10968110.768112471327186,3391812.04401572374627 10984346.589409274980426,3391842.990834164898843 10986039.282083483412862,3391347.841739115770906 10989170.186144407838583,3390173.309791757259518 10992309.935035103932023,3389709.107515149284154 10993549.759732889011502,3389090.839063283056021 11005003.72169123776257,3389121.897201215382665 11006612.875092485919595,3390265.816288603935391 11008050.148622535169125,3391718.980921420734376 11008586.62371608056128,3401583.22363959485665 11008946.018,3404953.643862342461944 11008857.296797934919596,3410210.372856582980603 11008138.536673936992884,3418652.509079872164875 11005987.872063903138041,3420074.615574756637216 11004821.869398953393102,3427304.705182288773358 11000891.953581664711237,3434744.965988439973444 11001452.678556611761451,3440081.17709910357371 10982022.194828158244491,3444596.073006698861718 10968737.109304714947939,3445028.771867412608117 10957163.1259,3445492.417546567041427 10944189.777076482772827,3445368.852911785244942 10940908.937278266996145,3444874.149094698484987 10934079.169841170310974,3443853.794642088934779 10928851.893211267888546,3442029.490826969966292 10924868.424154119566083,3440885.460420087445527 10923448.938422696664929,3439648.478238390292972 10922301.776906613260508,3435752.296060628723353 10919556.191755354404449,3431391.911606253590435 10917967.500270700082183,3428300.124068961013108 10917525.343283776193857,3424991.26352462451905 10917612.881084099411964,3400377.188276341650635 10921946.931876868009567,3398490.87950484873727 10922564.25945839099586,3396512.064236506819725 10923541.331405365839601,3390049.299879013095051 10929294.786543250083923,3383339.406251955777407 10936738.366300590336323,3380834.383750637527555 10940728.790901012718678,3378051.61911978572607 10944633.669759422540665,3376938.201572873163968 10945877.298716388642788,3373567.781350125558674 10949521.59971571341157,3362250.373999134637415 10960187.867255726829171,3360549.746138285845518 10961165.551416976377368,3358787.002001575194299 10961522.447553446516395,3357117.209639676380903 10961522.447553446516395,3353994.363964451476932 10960989.673225246369839,3352479.194375263992697 10960434.837767416611314,3351087.700740346685052 10959923.929435780271888,3348922.759283401537687 10957788.459769431501627,3348087.863102450501174 10956454.931936088949442,3347778.728876519016922 10954671.967042556032538,3347686.22237966908142 10949697.501484785228968,3349386.96156000951305 10948633.525136265903711,3350963.690827605314553 10948897.025268193334341,3354255.519489854108542 10948833.707557430490851,3355478.475415706634521 10948809.084162384271622,3359900.419548490084708 10936294.988328592851758,3360178.606955980882049 10934254.672866435721517,3359869.361410557758063 10931509.047656180337071,3359220.146140250843018 10928939.576788121834397,3350468.987010518554598 10908953.047798382118344,3346572.804832756984979 10904011.872027806937695,3328297.929307185579091 10886558.976107127964497,3302292.360423988196999 10867925.723303090780973,3295427.955343713052571 10863625.898699145764112,3291933.413888730108738 10861607.234392657876015,3288191.854483677074313 10859502.372433889657259,3282100.22930848877877 10857484.613294515758753,3273720.65463902335614 10855034.694138683378696,3264072.594371969345957 10850742.991263309493661,3262774.052511866670102 10849429.943996015936136,3261908.098192986566573 10847939.440704131498933,3261320.887879052665085 10846016.448144428431988,3261042.255193597171456 10844262.473986081779003,3261011.753653118386865 10842604.975247776135802,3261289.82974112033844 10839454.193827109411359,3262124.725922071374953 10834913.146332684904337,3262959.622103019151837 10831943.518185209482908,3263516.330876477062702 10830542.943900877609849,3264072.594371969345957 10827488.828803488984704,3263915.411250971257687 10826403.250692849978805,3263400.781245032791048 10822850.572623856365681,3261475.399332272820175 10811277.799065437167883,3260887.743740374222398 10807797.512606563046575,3256589.809520337264985 10788162.545243635773659,3254889.070339997299016 10784260.425578953698277,3253930.275565793737769 10782526.935187570750713,3251054.55916013289243 10777500.304770391434431,3250096.0983444028534 10775853.954435037449002,3248055.166800198610872 10772733.837792446836829,3242705.486031146720052 10765728.589505210518837,3239304.007670466322452 10762095.642837731167674,3235315.318995855282992 10759850.487642390653491,3233800.149406667798758 10759589.217809244990349,3230491.28886232804507 10760543.21210871078074,3228796.894892963115126 10761744.37061034142971,3227746.150219365954399 10762758.099942928180099,3223516.343527691904455 10766840.054018098860979,3216081.648696083109826 10772995.610971312969923,3212433.041065841913223 10776372.449606316164136,3209062.509523602668196 10779922.533275431022048,3206248.352796350140125 10783650.813512980937958,3204547.724935501348227 10787900.502241112291813,3204269.53752800822258 10789377.944129176437855,3203991.350120514631271 10792586.624724883586168,3203960.403302076272666 10797452.673225985839963,3204238.479390078689903 10800841.947351465001702,3205630.084344484377652 10809537.43394323438406,3208134.66156784305349 10823214.735920120030642,3209000.504567231982946 10825135.70510334149003,3210052.028477265033871 10826616.520486129447818,3217442.195512556470931 10836746.503572719171643,3219576.078831572085619 10839631.681674271821976,3220658.104282083921134 10841029.402551492676139,3227337.385049174074084 10848992.52785274758935,3228543.420412427280098 10850040.734814422205091,3231975.845591545570642 10854245.267041554674506,3235407.825492704752833 10858452.39413345977664,3241870.589850198477507 10866956.596484122797847,3258228.543744304217398 10892634.557667514309287,3260052.847559425979853 10896337.724371735006571,3261630.022104984149337 10901627.102377304807305,3261630.022104984149337 10903304.10417309217155,3261073.313331526704133 10906392.392340136691928,3248735.440208435524255 10948096.962969755753875,3247869.597209046129137 10951029.705250646919012,3242458.356761585455388 10967220.263485653325915,3240139.349129379261285 10973015.603247916325927,3239273.394810498692095 10974352.703340902924538,3229316.20031751319766 10978365.260659074410796,3227399.390005544759333 10978987.407804870977998,3222266.225646086037159 10980953.1501389387995,3218215.420695607550442 10982649.818752901628613,3199785.699758348055184 10990957.071811079978943,3194281.730175055097789 10993815.006009543314576,3162030.024663446005434 11010915.280980853363872,3159215.867936190683395 11012801.507150871679187,3158350.358895272482187 11014146.456979569047689,3157762.703303376678377 11015580.157980903983116,3156834.855347614269704 11018631.331384917721152,3156834.855347614269704 11020337.109932562336326,3155319.685758426319808 11028147.670027088373899,3154701.417306560557336 11029589.183199692517519,3152938.673169849906117 11032196.979814510792494,3151485.50853703264147 11033273.793073333799839,3147681.944175609387457 11035161.380068801343441,3142177.974592316430062 11036965.586173495277762,3138900.172185909468681 11038315.005071271210909,3135406.187328382395208 11040203.993857122957706,3133921.519279670901597 11041282.40162299387157,3129190.55224044714123 11046146.277822652831674,3127428.253381701186299 11048760.441092262044549,3116729.225802067667246 11066635.207517145201564,3115245.003031321335584 11069435.976910838857293,3114626.28930149320513 11070881.39947110041976,3113976.962711694650352 11074051.663887793198228,3113884.456214845180511 11080839.411820029839873,3114162.532302847132087 11082650.581691399216652,3114131.585484406445175 11084372.848000200465322,3113482.258894607890397 11087454.773163268342614,3112554.410938848275691 11090538.09885448217392,3110730.107123726047575 11094894.031190110370517,3109833.317305895965546 11096255.343614088371396,3108769.993529840372503 11097142.990627842023969,3107916.395674435887486 11097527.041808499023318,3106091.64658135175705 11097706.491047212854028,3102814.289452909491956 11097432.252687659114599,3072355.829618487507105 11092352.186435075476766,3069449.055074894335121 11091170.93336259201169,3068799.728485098574311 11089541.944929484277964,3052534.837685293052346 11074141.240890538319945,3039021.987336877733469 11065642.230550229549408,3038527.283519793767482 11063651.833778388798237,3038743.465970913879573 11062024.234267361462116,3039454.686197591479868 11060670.095740623772144,3039794.878561455290765 11059048.086085250601172,3040166.017743760254234 11055795.483187220990658,3039362.179700742010027 11053723.857957107946277,3038125.19751904765144 11052460.340518701821566,3036857.157199420966208 11051558.714069489389658,3028570.089026808273047 11047047.185812700539827,3014624.205859206151217 11039665.016227461397648,3013294.605861173942685 11039032.104323612526059,3011686.818455645348877 11038671.114937523379922,3009769.5628657117486 11038854.199615966528654,2994896.16570082353428 11044077.594034891575575,2992824.28733817813918 11044889.034570695832372,2991401.735565331298858 11045878.98062009178102,2990721.462157094851136 11047408.620739758014679,2990628.844340754207224 11050746.151541486382484,2989732.054522923659533 11052009.349989620968699,2984094.835509151220322 11053129.251326683908701,2962922.536277216393501 11053000.334748359397054,2961314.860191179439425 11052549.6331,2948080.197250257711858 11048398.934204442426562,2946688.592295852024108 11047680.845204068347812,2944400.197523612994701 11045067.421789953485131,2942823.468256017193198 11040926.154808519408107,2941524.481117952149361 11036871.639018604531884,2940628.025258592795581 11033007.00202233158052,2939081.908850964158773 11027160.304880546405911,2938277.625529983546585 11025097.394924078136683,2936391.316758493892848 11021500.929958557710052,2935432.85594276105985 11020065.979166118428111,2913694.608419632539153 10988365.050701366737485,2911653.676875428762287 10985416.167845733463764,2909272.664286851882935 10983002.701887525618076,2905500.492021831683815 10980237.334399770945311,2895419.732894064392895 10976047.404508,2894182.750712370034307 10975151.044700119644403,2893007.77348704636097 10973906.867108706384897,2891894.801218096166849 10972388.867902034893632,2890503.196263687685132 10969001.389354392886162,2889049.586352908518165 10965351.44872473180294,2888276.69512833096087 10963214.274671671912074,2887843.9962676204741 10961258.457944046705961,2887905.5559460259974 10959655.197444805875421,2888493.322857415769249 10958321.303646204993129,2890379.631628908682615 10955653.660274090245366,2891430.598941488191485 10951029.705250646919012,2891492.603897858876735 10949428.85334132425487,2891337.981125147547573 10947477.315098745748401,2891090.406577621586621 10945789.396632052958012,2890255.621716164518148 10940377.774692103266716,2889575.348307928070426 10936650.582191245630383,2888647.834310636390001 10932750.280178872868419,2880298.872501141391695 10903565.855346573516726,2876031.551141071598977 10872841.099872088059783,2875784.421871510799974 10871171.579620629549026,2875351.277732835151255 10869242.338709475472569,2873341.404326563235372 10866257.722599636763334,2868764.948740559630096 10861607.234392657876015,2867033.15142229013145 10857922.890234859660268,2866445.941108353435993 10855997.079904347658157,2865301.465423509012908 10850391.853996580466628,2862395.136157877743244 10830542.943900877609849,2861776.42242804961279 10816851.269852729514241,2861838.42738442029804 10815195.401225965470076,2864497.62738049030304 10784779.559565896168351,2868517.374193036463112 10764864.138384869322181,2867713.424830526579171 10747422.008205072954297,2860044.736429268494248 10730279.788155807182193,2856612.645208620931953 10723398.042040545493364,2855653.850434416905046 10721769.315563512966037,2855066.528800991829485 10719707.128146512433887,2853365.789620654657483 10716357.863321816548705,2852376.38198648346588 10714896.127132585272193,2851139.399804789572954 10714038.082135833799839,2848170.620304822921753 10713265.099587013944983,2846562.944218785502017 10713180.144804762676358,2844707.582265734206885 10713693.905652198940516,2839543.471087834332138 10716183.551094556227326,2837564.544500004034489 10716956.863679338246584,2835678.235728511121124 10717386.210465075448155,2832462.438278474844992 10717216.508621115237474,2830978.21550772851333 10716872.172104880213737,2828288.068693216890097 10715584.618481121957302,2825814.104329828638583 10713783.50109395198524,2823495.096697622444481 10711723.720619,2809054.398393447510898 10696725.320134593173862,2806858.955396020784974 10694327.467040194198489,2803952.292171918787062 10689966.219903571531177,2802251.552991578355432 10686547.16808502189815,2801540.221445409581065 10684580.171683851629496,2800210.621447374578565 10679028.988404842093587,2794799.380999913904816 10651505.42730326578021,2794459.188636050093919 10648016.484764138236642,2794644.758227202575654 10644874.927748087793589,2795386.591313847340643 10641898.065558260306716,2795201.467000660020858 10640200.289421416819096,2794490.246773979160935 10638251.147641163319349,2793655.350593031384051 10636554.275219049304724,2791490.409136083442718 10634177.405457427725196,2775742.263412540778518 10621798.465528704226017,2767313.819486619904637 10623789.277735568583012,2766941.90106787905097 10625213.078481234610081,2765579.573139551561326 10629486.562234662473202,2764557.437575085088611 10632225.092019917443395,2763939.169123222120106 10633581.026732029393315,2762021.913533288054168 10637570.392829304561019,2760475.685806171037257 10640116.236899793148041,2757754.592173218727112 10643769.041323933750391,2755652.100950606167316 10646060.528695072978735,2748509.063184873200953 10650991.4167,2741675.15964507451281 10654308.826699681580067,2736109.296424902509898 10655584.899003637954593,2728811.635886458214372 10656949.757069922983646,2721792.162755506578833 10657884.941498622298241,2718081.661488386336714 10658735.972293926402926,2712113.600947976578027 10660779.85897808521986,2710784.000949941575527 10661458.3263945505023,2709330.83631712757051 10662398.726591669023037,2695663.029237527400255 10672456.544447790831327,2693560.204056444112211 10674077.8694,2685087.566292675677687 10683894.794148065149784,2682582.989069317001849 10687655.371767481788993,2681933.6624795217067 10688937.677575377747416,2681531.576478775590658 10690393.875502567738295,2680882.249888979829848 10691761.074904156848788,2679026.999255419708788 10694158.028368968516588,2677851.910710604861379 10695267.465786362066865,2676645.986666840035468 10696297.268531790003181,2674914.189348570536822 10697153.0903255995363,2669039.191902463790029 10698949.832361182197928,2660473.602363883983344 10699378.050005830824375,2655680.964326763059944 10698949.832361182197928,2652743.242964728735387 10698178.553309708833694,2651784.782148998696357 10696725.320134593173862,2651259.131513473577797 10695098.311938120052218,2649650.898829983081669 10687655.371767481788993,2648970.625421743374318 10685603.443832946941257,2647610.078605267219245 10681674.863803336396813,2645229.066016690805554 10676464.025649635121226,2642817.440568146295846 10671261.758007785305381,2639601.197840148117393 10664354.755788650363684,2638673.683842855971307 10662908.687862211838365,2637467.759799094405025 10661972.816919799894094,2636014.595166277140379 10661547.240348299965262,2634282.797848007641733 10661715.566823510453105,2625253.562630273401737 10659844.279018940404058,2617955.90209182864055 10657800.6716095097363,2612358.980733727104962 10655673.736703932285309,2605741.70492301043123 10652355.665404329076409,2597423.689931956585497 10645808.464253412559628,2592785.229389582294971 10641814.297916254028678,2591734.150757511146367 10640624.846831735223532,2589353.138168934732676 10638759.313493777066469,2583075.943402593489736 10636381.678516829386353,2581344.257403812371194 10637146.330230209976435,2578684.723449268378317 10639099.741534730419517,2575870.900680487044156 10642663.333461897447705,2571387.06291082687676 10650482.342307031154633,2568418.728688822127879 10655673.736703932285309,2567460.37919258326292 10656860.902809953317046,2545165.311576506588608 10656098.948281159624457,2538393.412993081379682 10655584.899003637954593,2510254.406068827491254 10669814.230208704248071,2504688.542848655488342 10667116.781674755737185,2493370.801539193838835 10661631.249765709042549,2490185.839588107075542 10684664.464326627552509,2489536.624317799694836 10690393.875502567738295,2487835.885137462522835 10702036.435463199391961,2487619.257408377714455 10702718.697959048673511,2480074.578919863328338 10714123.047578671947122,2470983.227426267229021 10728474.795396145433187,2470643.035062403418124 10731740.171420980244875,2471014.174244708381593 10733635.573009265586734,2471632.554016065318137 10735617.043355576694012,2472220.209607964381576 10736818.477159475907683,2453635.865897990297526 10767025.627059021964669,2448427.894840717315674 10775173.703587727621198,2413622.742849290836602 10839804.768243979662657,2373424.050209441687912 10852845.149799820035696,2343831.433374411426485 10822170.329991338774562,2342069.134515663143247 10819119.960536185652018,2341326.856151052750647 10817286.629310697317123,2340832.15233396878466 10815721.911325873807073,2342409.326879529748112 10800927.999385366216302,2343676.921921191271394 10794585.274166161194444,2345068.526875596959144 10790159.89954106323421,2346522.025466884952039 10787466.701072754338384,2350294.197731905151159 10784431.800984885543585,2350232.638053496833891 10782612.756638377904892,2349923.503827564883977 10780703.406347746029496,2348995.655871802475303 10776719.797918695956469,2347140.405238242354244 10768840.523182213306427,2345965.316693430300802 10764778.539708355441689,2345223.038328819908202 10762959.743606295436621,2344326.582469460554421 10761492.672923244535923,2341388.861107426229864 10761146.098208907991648,2335544.476521287113428 10764864.138384869322181,2330535.322074572555721 10769016.495348773896694,2319434.097174704540521 10776805.546406429260969,2317918.927585517056286 10777671.510573668405414,2312538.63395649753511 10779922.533275431022048,2308580.446822359692305 10780789.204879384487867,2306972.659416831098497 10780617.608894286677241,2304034.938054799567908 10779665.48553011752665,2301530.360831440892071 10777933.161251408979297,2294232.811612487770617 10772391.677982239052653,2291058.536332516930997 10769544.127573052421212,2285976.356299842242151 10768322.599560625851154,2237181.461261443328112 10763914.20881949365139,2252982.706382093951106 10741038.807793073356152,2261424.286007930058986 10728559.630837701261044,2265382.47314206790179 10684833.668021531775594,2261331.779511080123484 10675015.397172410041094,2252920.701425723731518 10655584.899003637954593,2248931.901431618258357 10646657.995190551504493,2246117.744704365730286 10641986.725857548415661,2233408.843718460761011 10622482.227529825642705,2221534.838913503568619 10610551.339625736698508,2236192.053627272136509 10597714.358345810323954,2249890.362247348297387 10591807.291404481977224,2249612.286159346345812 10589871.86445607803762,2248498.757292942609638 10585910.161343481391668,2245963.233251142781228 10581446.471803678199649,2245004.772435412742198 10580184.130974294617772,2234831.395491307601333 10571355.152793284505606,2231739.162676053121686 10567906.766546748578548,2229760.236088219564408 10565387.597102215513587,2227131.648952116724104 10561191.036002928391099,2223792.175547810271382 10555232.311206378042698,2222400.681912895757705 10551713.869340186938643,2221565.785731944721192 10550203.888996411114931,2220607.324916214682162 10549030.225694166496396,2219462.960550861433148 10548027.145481275394559,2217916.732823741622269 10547774.136676182970405,2215072.074556009843946 10549200.637232901528478,2210866.758152313996106 10551796.844923341646791,2194910.890258948784322 10558674.028902310878038,2175615.660280771087855 10566817.764639638364315,2161082.010201781522483 10572782.025365732610226,2109751.591121585574001 10593497.974899278953671,2071871.906113942386582 10589700.742925452068448,2043609.334554909495637 10609112.021796690300107,2020386.530302561121061 10601850.056347781792283,2014831.68771197879687 10599920.908079521730542,2013862.20626665907912 10599568.74821562319994,2012841.74049455835484 10594424.23341653123498,2010213.153358455747366 10579005.3277981672436,2008852.606541979592294 10569757.649839885532856,2009687.836681401357055 10564211.333921225741506,2011481.193678082199767 10553136.662318205460906,2013305.497493201401085 10542079.835416225716472,2015315.370899473316967 10530958.367054624482989,2021036.190850830404088 10496536.30751003138721,2018840.747853406239301 10491797.42720789462328,1997040.495373907499015 10446335.26585423015058,1990855.918423904338852 10430833.079109659418464,1987949.589158273302019 10431742.401662532240152,1984949.862839868292212 10433222.123620243743062,1983713.325936136301607 10434213.32977818697691,1981703.007251899689436 10436354.312157014384866,1975178.683215997414663 10442455.478212980553508,1968159.210085046244785 10448316.84826416708529,1964665.225227516610175 10451206.44063738361001,1958388.030461175367236 10455831.422262884676456,1922889.358042106265202 10473957.072899190708995,1920548.754428688669577 10469192.588141372427344,1918540.996092741843313 10465476.876354271546006,1913396.365825728746131 10455999.240045517683029,1862034.888607603032142 10417094.908880546689034,1857334.423108858056366 10397317.157492093741894,1850160.772483157692477 10367875.728702127933502,1846573.835850816220045 10353206.445489268749952,1845336.742349630687386 10348319.413820257410407,1844594.463985020527616 10345798.863961422815919,1837699.000766813522205 10331822.820479672402143,1826010.565553008811548 10308727.488291030749679,1823691.557920805411413 10304520.063150664791465,1804055.690300795948133 10300479.273500168696046,1802509.573893170105293 10299995.50340747833252,1790666.515906654065475 10274343.497159838676453,1790790.08054143586196 10272897.480017611756921,1791099.660045329714194 10271447.420106517150998,1792707.3361313669011 10267426.219158504158258,1793480.672633909154683 10266220.17037395387888,1796541.958630722714588 10261557.469290958717465,1799108.095532489940524 10258181.557809881865978,1803901.178847575793043 10252884.877722382545471,1805663.811664798064157 10250716.335187885910273,1810271.325388731434941 10243659.633596742525697,1818681.958196126157418 10230767.471690209582448,1821341.046872704988346 10224135.318481206893921,1825546.808554365765303 10206890.136618362739682,1826288.641641010995954 10202748.536745965480804,1820506.262011245358735 10161124.965442098677158,1782224.824961329810321 10125023.729895340278745,1751179.154812973923981 10066890.268852243199944,1739459.661461239680648 10044656.139119952917099,1728544.22879150393419 10031274.400565611198545,1710176.624130106065422 10009468.932475266978145,1711134.973626344930381 10004354.630934404209256,1714381.940533802146092 9989119.07374539040029,1719535.921638041967526 9965363.689333070069551,1721895.894842857727781 9954975.310001643374562,1672606.073348394827917 9918018.869432816281915,1667720.483536459272727 9917787.888937633484602,1638375.441248952178285 9915419.059805760160089,1614689.102636943338439 9913202.073690462857485,1615152.859635586384684 9908313.27204055339098,1616266.054543519159779 9898470.162153737619519,1617997.740542300278321 9883765.179972006008029,1618647.067132098600268 9878896.677635870873928,1621862.975901623489335 9863019.669896516948938,1623068.899945388315246 9858016.025382481515408,1626254.084535454399884 9843096.557124812155962,1629129.800941118272021 9829639.724744748324156,1628789.608577254228294 9826848.692057153210044,1627645.355531389359385 9821564.030366672202945,1625697.37576 9815082.83799853362143,1623934.854264268651605 9810638.497344335541129,1621399.21890298044309 9805064.284412518143654,1618523.502497316803783 9797619.779561853036284,1618028.798680232604966 9795968.203564759343863,1617719.441815318539739 9794164.469901159405708,1614194.398819856345654 9764401.629861794412136,1613823.259637551382184 9745646.004223981872201,1613606.854547448921949 9726944.724395589902997,1613421.284956299234182 9708219.714100124314427,1613514.125411619897932 9703545.192678760737181,1613359.502638908335939 9691463.880803050473332,1599537.406745070591569 9673644.271262964233756,1598114.854972223751247 9663534.200094819068909,1595115.46261228970252 9647919.103640267625451,1594033.103203306905925 9642695.037557613104582,1592851.892086499603465 9638790.314262561500072,1591472.198317607864738 9635323.765948571264744,1584663.786941199796274 9621256.925141338258982,1568646.248049937654287 9594992.229962659999728,1553556.111836473224685 9565185.014871262013912,1545021.691755316918716 9548335.691195508465171,1539857.691896905656904 9538475.365218427032232,1527923.574566923314705 9517367.507495742291212,1525911.808729306096211 9514102.87008067406714,1524736.720184494042769 9511434.413754407316446,1522510.33036862872541 9505807.431531732901931,1521180.73037059372291 9501122.957005435600877,1520902.320324118016288 9499318.093012718483806,1520995.160779441241175 9497877.489992089569569,1523097.763321544975042 9496295.110394144430757,1538466.086942499969155 9485499.901035340502858,1547433.65116233471781 9479822.407812174409628,1562090.643237120704725 9474796.115555953234434,1571429.124000278068706 9470274.215448152273893,1575139.736586889717728 9437915.323904098942876,1575325.306178042432293 9434989.158109061419964,1575696.445360347395763 9397109.28028049133718,1574799.655542517080903 9394055.549993343651295,1557174.106606744229794 9354349.506570963189006,1556432.050881116418168 9353077.834727058187127,1479590.544095827266574 9371803.447316305711865,1472756.863195008365437 9373432.117426691576838,1468705.835605550091714 9372654.548288013786077,1462243.293887038948014 9371026.056740304455161,1450740.205625407164916 9367843.770361484959722,1445854.615813471842557 9366146.388044336810708,1440257.694455367513001 9363319.422414608299732,1430115.153010211884975 9356183.859554167836905,1424270.879743563942611 9351597.08795028552413,1411747.54834881122224 9341443.920041412115097,1406397.978899250272661 9335246.615873033180833,1394925.837456056848168 9317529.331953763961792,1388494.13123649568297 9307565.32707360573113,1374424.572114622918889 9281248.339790008962154,1352964.734637967776507 9247654.704709874466062,1351356.724593459861353 9244943.282748540863395,1355716.663769870065153 9226963.766190230846405,1357541.190223971614614 9220242.94529127702117,1351109.150045936694369 9208131.043092891573906,1344553.879191593499854 9196109.758789097890258,1335710.102245520334691 9180111.997923541814089,1328752.63407094264403 9167312.527167487889528,1338894.173640679800883 9145128.267384476959705,1339946.36546766012907 9143014.710726240649819,1351882.263909493805841 9111360.566116413101554,1354603.468861937290058 9104133.756767921149731,1352655.37777305371128 9100114.330710548907518,1348450.061369357863441 9092216.706439400091767,1342327.378056237008423 9080321.657282073050737,1339049.798288809601218 9073938.596855945885181,1341430.810877386247739 9060852.977173902094364,1343255.114692508243024 9052121.617796681821346,1345790.638734305277467 9039075.719670344144106,1343935.388100744923577 9030907.958787282928824,1341028.613557151751593 9018642.325547033920884,1341121.454012472182512 9000415.58398000895977,1345264.988098779926077 8985719.722837155684829,1352438.972682951483876 8969115.449207130819559,1355005.554862680612132 8963700.586971076205373,1356366.101679156767204 8960358.975553579628468,1358066.61822051438503 8955751.622298583388329,1359210.871266379486769 8952215.774063680320978,1363145.458668469218537 8939732.274458054453135,1364374.871124787954614 8937151.495386043563485,1366044.552167198387906 8932559.205008920282125,1368302.000120993237942 8924047.790352415293455,1368765.757119639310986 8921456.120236549526453,1368630.503938325913623 8920631.497693592682481,1364622.223033331334591 8893009.791012628003955,1359767.35740085458383 8860590.305183036252856,1358128.623176887864247 8850453.674401260912418,1356056.744814242701977 8838424.357607623562217,1354757.980315157677978 8830416.155273076146841,1353583.003089834004641 8822351.698787517845631,1349686.820912069641054 8795075.728863907977939,1351913.322047426132485 8792465.53589890524745,1379557.513835101854056 8760362.083723049610853,1381103.741562219103798 8758672.335584718734026,1383732.106059339130297 8757764.360903795808554,1385340.004784358898178 8757568.189702777191997,1387968.369281479157507 8757828.427499026060104,1389421.756553275743499 8757764.360903795808554,1394059.994456667685881 8757243.431641850620508,1394833.108320227591321 8756984.851388642564416,1421982.707610307727009 8721676.886687468737364,1431135.618782312376425 8709536.652457354590297,1428352.631512480787933 8697868.156886765733361,1424518.231652107322589 8682295.962165551260114,1421797.138019155012444 8672083.031585583463311,1410448.78384972596541 8646005.784470098093152,1406836.243734502932057 8639047.45408190973103,1405068.378901215270162 8638015.604760028421879,1402872.824584299698472 8637248.827853871509433,1398976.642406535334885 8636864.549795839935541,1391524.470414870651439 8637503.184617269784212,1386824.338874596636742 8638206.736578034237027,1383979.457967882743105 8638334.850602285936475,1381227.306197 8638206.736578034237027,1379031.863199576735497 8637439.939565783366561,1368580.410167469177395 8632586.656510580331087,1363416.187670078361407 8630097.12567900493741,1360602.476220787968487 8628309.434411395341158,1359829.362357228063047 8627417.590429691597819,1359210.871266379486769 8626396.111771453171968,1359520.005492310971022 8625248.726463308557868,1360014.931948380544782 8624227.551538096740842,1361839.235763499746099 8621422.122815005481243,1363168.835761534748599 8619638.391907267272472,1366106.557123569073156 8613458.823192367330194,1370188.308892485918477 8599971.946606159210205,1373249.59488930227235 8588224.599966233596206,1374919.275931709911674 8581120.757526831701398,1375197.685978183057159 8579980.466368062421679,1376434.445520897628739 8575354.722481839358807,1378011.397427473217249 8570985.777144055813551,1378815.458109474275261 8568833.609876537695527,1383144.561786934733391 8559599.131709521636367,1392142.961505716433749 8541355.509303443133831,1401234.090360330184922 8517939.183193419128656,1402007.092904398916289 8515738.547468570992351,1403274.910585043020546 8507387.892394635826349,1403522.262493586633354 8504814.831178223714232,1403460.257537215948105 8503434.817312596365809,1402934.71822117920965 8498982.876565473154187,1402347.285268262960017 8494972.304949184879661,1401481.44226887379773 8489148.169780155643821,1399502.293042060686275 8484392.281522560864687,1395698.951319616753608 8476701.747936096042395,1394585.756411684211344 8474513.675523364916444,1391988.338733005104586 8446764.004795579239726,1392359.255276327487081 8442968.399813197553158,1392421.260232700966299 8440356.252046827226877,1392390.313414259813726 8438926.748295878991485,1392328.531096868915483 8437559.063402319326997,1391802.769141852390021 8432029.371224015951157,1391308.065324768424034 8427557.476363323628902,1391091.437595683382824 8426067.448725873604417,1390844.085687140002847 8424516.290414357557893,1390287.599552664905787 8421662.146963227540255,1388927.052736188750714 8416763.838507022708654,1387257.149054801324382 8413912.699889324605465,1371857.989934893790632 8394482.590844752267003,1370373.655844656052068 8392814.178366977721453,1357200.997860107803717 8379787.753713391721249,1353985.089090580120683 8376828.816756505519152,1351418.506910850759596 8374917.427494057454169,1350274.365184477064759 8374609.228248851373792,1347769.787961118388921 8374362.056881656870246,1339637.23124172585085 8374424.625510917045176,1336761.514836061978713 8374980.000836350023746,1335617.373109691077843 8375410.040511824190617,1333607.499703416600823 8376644.380379218608141,1332277.677066401811317 8377013.479701342061162,1331040.917523687239736 8376828.816756505519152,1322011.570986464386806 8370850.411758496426046,1319445.100126223405823 8368940.571344335563481,1315346.650433689588681 8365553.168395509943366,1321300.462079274933785 8357925.129026426933706,1322599.003939380636439 8356204.102126813493669,1323217.495030226185918 8355159.064688304439187,1323712.198847313178703 8354174.802199393510818,1324299.743119720602408 8351963.567031463608146,1324573.700386561220512 8349253.909844690933824,1325042.02148432796821 8341708.294693175703287,1325072.85698327771388 8337722.014291639439762,1325011.074665889609605 8334961.742044786922634,1324794.6695757873822 8333492.077884848229587,1324299.743119720602408 8332143.818895165808499,1316724.006493274122477 8322650.315984182059765,1315858.163493884727359 8321978.135495819151402,1314868.644540222594514 8321549.434801522642374,1311529.05981642450206 8320631.75523523055017,1309580.968727540923283 8319652.303156823851168,1308715.125728151760995 8319040.514304433017969,1298680.786828047363088 8310221.890652493573725,1298850.883009977871552 8309381.271366118453443,1306797.981457709334791 8273850.847403174266219,1311683.57126964465715 8250903.719964100979269,1312549.525588524993509 8246238.76357180904597,1313229.79899676470086 8240123.970556987449527,1313446.092767375754192 8236311.560649147257209,1313384.31044998485595 8233590.57342291995883,1313044.229405611986294 8232260.3809421248734,1312711.495447629597038 8231710.829193741083145,1311869.140860797138885 8230324.398451366461813,1310179.978907500160858 8227554.271180015057325,1309642.751044931821525 8226276.484207552857697,1309024.259954086272046 8223920.930215204134583,1308498.72063804930076 8221142.976216249167919,1308096.634637305978686 8218185.532240428030491,1306828.816956659080461 8207934.963925297372043,1306828.816956659080461 8206910.641090733930469,1307138.173821573145688 8205825.082415699958801,1307601.819500727811828 8204802.568275529891253,1308220.421911067562178 8202633.95935208722949,1308343.986545846797526 8201429.811207370832562,1308127.581455744337291 8199923.545861738733947,1294274.427423976827413 8160779.588445977307856,1293686.883151569403708 8159820.795442577451468,1291302.530978267081082 8158628.727439641952515,1289729.029975905548781 8158084.590585833415389,1279803.004940340761095 8155512.061863555572927,1276061.445535287726671 8155272.090666252188385,1274700.787399323191494 8155332.836683896370232,1273402.022900237934664 8155632.050360911525786,1272598.184857219457626 8156350.298397602513433,1272134.205219593830407 8157306.921009879559278,1271948.635628441348672 8158204.620526304468513,1271825.070993659552187 8159462.357542122714221,1271577.719085115939379 8163174.739063873887062,1271608.554584065917879 8164553.448047610931098,1272291.833618557313457 8177715.895086596719921,1272659.967174610355869 8178345.738988350145519,1272876.483584201196209 8179784.964916164986789,1272567.126719287130982 8180866.728591240942478,1267465.020497760968283 8196855.609686990268528,1264960.443274402292445 8202873.728426730260253,1264156.382592401234433 8203596.551084148697555,1262022.721912367967889 8204620.417210702784359,1257724.565053348662332 8205042.407319684512913,1247149.324747479520738 8203536.927479106932878,1231657.213852760149166 8205644.641278378665447,1228286.793630012311041 8207572.465052176266909,1217927.847094754455611 8216133.98268860206008,1213413.173826141515747 8211249.253421084955335,1201972.090520880417898 8220781.570806651376188,1198323.260251659667119 8228150.066953111439943,1186572.931400975678116 8259455.322734517976642,1185861.711174297844991 8275006.605679006315768,1186541.984582534525543 8274458.692485944367945,1187778.744125246303156 8274580.617725018411875,1188490.075671415310353 8275432.399209126830101,1188922.997171111172065 8276586.652640288695693,1190005.245260602794588 8280419.836683508008718,1190314.602125516859815 8281698.443937689065933,1190314.602125516859815 8283097.803514971397817,1190168.216995125636458 8284703.032004872336984))
+POLYGON ((1350274.365184477064759 9621627.432495642453432,1337194.213696775492281 9626610.329781411215663,1334411.337746435077861 9627710.342685654759407,1333793.069294569082558 9628520.474195433780551,1346099.995599219342694 9655501.685094490647316,1346811.104506408795714 9656679.428551230579615,1352871.894182647345588 9661545.513653051108122,1353892.359954750863835 9662355.572644393891096,1354943.549906310159713 9663092.722554104402661,1356273.372543327510357 9663461.193776462227106,1357664.754858750849962 9662869.737828720360994,1359210.871266379486769 9660804.280033675953746,1363663.762217601295561 9654469.962635925039649,1364993.362215636530891 9652261.456212926656008,1370930.364618113497272 9637401.849980378523469,1371084.987390825059265 9635860.285462399944663,1370497.443118420429528 9634464.46808592043817,1369322.46589309675619 9632629.095152374356985,1367559.944395365659148 9630649.131976159289479,1365488.066032720496878 9629181.697308303788304,1360200.278900550678372 9625510.224840320646763,1357974.111723667709157 9624193.018761608749628,1353242.810725969960913 9621917.201845798641443,1350274.365184477064759 9621627.432495642453432))
+POLYGON ((1342853.140011253533885 9663902.694472588598728,1344770.172962204786018 9669511.876168416813016,1346532.694459932856262 9675417.257957411929965,1348357.220914034638554 9681624.375568361952901,1349470.415821967180818 9687023.981836896389723,1355221.959952783072367 9715345.388215564191341,1358066.61822051438503 9733721.014352833852172,1360602.476220787968487 9752588.282904785126448,1363075.995306211523712 9759315.681431772187352,1363663.762217601295561 9760736.822963988408446,1364560.440715940436348 9761784.2919229157269,1366075.610305127920583 9761932.096991622820497,1367281.534348892746493 9761184.488424276933074,1368271.0533025523182 9760284.879459911957383,1379928.764336898224428 9742814.418169615790248,1384752.571831442648545 9733721.014352833852172,1385309.057965917745605 9732526.520350566133857,1391802.769141852390021 9712374.965313961729407,1390658.516095987521112 9709552.771690655499697,1389761.948917139554396 9708590.56137702986598,1377423.964474556967616 9697982.132806871086359,1363075.995306211523712 9682290.614535296335816,1362643.296445500804111 9680661.994131591171026,1356768.076360411709175 9673348.108056439086795,1352933.676500038476661 9669880.684247927740216,1351913.322047426132485 9669065.771811535581946,1345388.775372541509569 9664863.047657648101449,1344213.686827726662159 9664271.47368591837585,1342853.140011253533885 9663902.694472588598728))
+POLYGON ((1384659.731376122217625 9839768.169062402099371,1388648.64268971583806 9845062.529256554320455,1389421.756553275743499 9846272.29784850217402,1389421.756553275743499 9847636.263380769640207,1386329.41241852985695 9848617.774726154282689,1384814.354148833546788 9848468.126904606819153,1382031.366879001958296 9847785.893387477844954,1383082.779469543602318 9856121.173847468569875,1386978.961647307965904 9868256.514219172298908,1387566.505919715389609 9869699.966680895537138,1388494.13123649568297 9870688.685078291222453,1392235.690641548484564 9874182.038137258961797,1395296.976638361811638 9876766.526332007721066,1397430.637318398104981 9878366.131992070004344,1399718.920771142700687 9879732.272961664944887,1402192.439856571843848 9880872.753670552745461,1404975.649765383219346 9881558.227036850526929,1406521.54353402950801 9881712.693771917372942,1432372.600964006735012 9882548.626252112910151,1434073.340144346700981 9882473.57448841072619,1435310.099687061272562 9881712.693771917372942,1436083.213550618384033 9880647.107168124988675,1436423.294594994047657 9879201.663815243169665,1435681.238869363674894 9877986.178774433210492,1433702.200962041737512 9876386.660155469551682,1428785.553012176882476 9874106.802679454907775,1426002.565742345061153 9873422.334042947739363,1423559.770836377516389 9872282.79610625654459,1412025.847075792960823 9865295.909934263676405,1410943.487666810164228 9864462.040274240076542,1401357.654995112214237 9855134.242474310100079,1398636.450042671523988 9852104.194832559674978,1396966.769000260857865 9849907.222979608923197,1396224.71327463327907 9848696.824960144236684,1395018.677911380073056 9845819.155035289004445,1390009.300825683167204 9841430.122662622481585,1387566.505919715389609 9840295.79106717929244,1384659.731376122217625 9839768.169062402099371))
+POLYGON ((1369260.683575705857947 9879656.977670777589083,1368394.84057631669566 9880342.33166291564703,1374053.432932317955419 9898164.332833582535386,1389421.756553275743499 9912971.252667993307114,1383732.106059339130297 9921077.673478182405233,1384103.245241644326597 9922380.853969532996416,1389452.814691208070144 9928655.284759363159537,1390380.440007988130674 9929652.393486626446247,1397461.472817347850651 9935861.887003114446998,1398543.720906839473173 9936704.0583555996418,1399966.272679686080664 9936089.326725782826543,1402872.824584299698472 9929883.767362577840686,1403243.963766604894772 9928503.635251875966787,1408995.396577929379418 9905565.925372080877423,1408686.262351995101199 9903733.679695511236787,1407913.148488437989727 9900984.016023462638259,1406985.523171657696366 9899995.116281701251864,1395049.624729821225628 9891837.716752590611577,1386762.445237714331597 9887344.298916537314653,1381196.470698051154613 9885897.468256479129195,1375073.898704421473667 9883004.158465487882495,1369260.683575705857947 9879656.977670777589083))
+POLYGON ((1423281.472109392751008 9935246.953650664538145,1422261.006337292259559 9936164.957598207518458,1415458.160935423104092 9943147.510203581303358,1415519.943252814002335 9944914.417259149253368,1417839.17352 9948596.682788571342826,1420436.479883190477267 9951825.241871073842049,1422292.064475221792236 9953822.370345009490848,1424456.449334716424346 9955439.750072682276368,1429311.314967193175107 9955667.829715630039573,1432217.978191295173019 9954438.945158580318093,1432774.464325770270079 9953210.000632960349321,1433393.066736110020429 9950981.241218423470855,1432527.11241722968407 9945374.041266536340117,1431630.322599396575242 9941996.525858150795102,1430702.697282616514713 9940997.649842681363225,1424518.231652107322589 9935781.843235213309526,1423281.472109392751008 9935246.953650664538145))
+POLYGON ((1439453.633773366454989 9939080.131802428513765,1439608.145226589404047 9940230.634553467854857,1440226.747636926360428 9941613.09081101976335,1440999.750180995091796 9942839.715164288878441,1443473.603224894963205 9946373.544830292463303,1445328.853858455317095 9948369.111022921279073,1449657.957535915775225 9951517.339914852753282,1456058.939576018368825 9954206.477868774905801,1462645.268568293889984 9954286.733556365594268,1464500.519201854243875 9953978.44606402143836,1464778.929248327156529 9953210.000632960349321,1462088.55979483621195 9950905.172763876616955,1456862.777619036845863 9947141.236584667116404,1446936.86390296346508 9940230.634553467854857,1445669.046222319360822 9939619.734263449907303,1439453.633773366454989 9939080.131802428513765))
+POLYGON ((1576778.693449839018285 10155423.993298880755901,1575294.359359601279721 10162787.06454049050808,1574954.166995737235993 10164292.964358385652304,1572882.511272074654698 10169600.44807836599648,1572109.397408514749259 10170711.253969307988882,1568460.678458785172552 10174995.134292142465711,1567409.154548752121627 10175949.658166959881783,1565492.121597800869495 10176267.957274215295911,1562430.835600984515622 10175788.514107249677181,1560637.367284815292805 10175949.658166959881783,1558936.628104475094005 10176425.112138284370303,1557854.380014983704314 10176978.611394403502345,1557483.240832678508013 10178487.600188666954637,1558163.514240915188566 10179918.299456080421805,1564997.417780713876709 10189534.949384592473507,1581633.447762824594975 10195421.668748587369919,1587168.364164555445313 10194066.25438604876399,1581633.447762824594975 10158115.154511539265513,1580798.440262385178357 10156849.936361663043499,1579839.979446655139327 10155897.7556,1578386.592174858553335 10155502.334200410172343,1576778.693449839018285 10155423.993298880755901))
+POLYGON ((1583674.156668046023697 10258344.632559154182673,1582591.908578554634005 10258905.014485811814666,1583024.830078250495717 10260272.907329654321074,1587446.774211031384766 10268150.64442116767168,1588281.559072491014376 10269436.382270961999893,1591095.604480252135545 10272733.771699836477637,1595053.457655916223302 10276921.867815218865871,1597712.880290968809277 10278050.044570725411177,1599166.267562765395269 10278373.077450441196561,1600217.457514327485114 10277404.31407031416893,1600310.297969647916034 10275793.875287417322397,1599258.996698597446084 10269918.306030914187431,1598424.211837137816474 10266220.17037395387888,1597898.449882121291012 10264449.113532921299338,1597063.553701170487329 10263243.873581476509571,1594837.16388530516997 10261958.998121505603194,1586642.713529030326754 10258984.535726642236114,1583674.156668046023697 10258344.632559154182673))
+POLYGON ((1685778.953971925424412 10416851.111991845071316,1671029.121441816212609 10418575.923809131607413,1667194.721581442747265 10419068.087814293801785,1665432.311403203057125 10419646.122103929519653,1662989.51649723527953 10423178.720566095784307,1662185.344495745841414 10424412.537343766540289,1662494.701360659906641 10425976.301773423328996,1665277.688630491495132 10432068.269017525017262,1666143.53162988089025 10433389.687343910336494,1674059.460620191413909 10434543.763562148436904,1679810.893431515898556 10433222.123620243743062,1703590.072498848196119 10423346.0399,1703033.586364373099059 10422604.831238713115454,1699446.538412543246523 10420219.764791900292039,1695148.381553523940966 10418327.339611150324345,1692303.500646810047328 10417424.52179984562099,1685778.953971925424412 10416851.111991845071316))
+POLYGON ((3355633.098188420757651 10997839.069959297776222,3352448.247556825634092 10998379.893566349521279,3351891.538783368188888 10999810.271790826693177,3352509.80723523395136 11001688.583578066900373,3353623.224782146513462 11003119.658377850428224,3354952.824780181515962 11002318.025979872792959,3356096.855187064036727 11001064.03322290815413,3356653.563960521481931 10999628.558406218886375,3356900.693230082746595 10998021.057613966986537,3355633.098188420757651 10997839.069959297776222))
+POLYGON ((3316578.435955451335758 10989258.329015284776688,3309590.020962432492524 10990863.758631829172373,3307982.233556907158345 10991668.868279501795769,3308013.291694836691022 10993279.695577975362539,3313988.031404691748321 11004366.615141848102212,3318271.716729910112917 11010999.188197031617165,3318447.712844853289425 11024961.571471516042948,3319732.339768608566374 11036693.466949382796884,3320752.805540709290653 11038404.1117939427495,3321989.787722403183579 11039571.031724197790027,3325700.400309015065432 11038582.004711631685495,3327710.273715289775282 11037682.218959510326385,3337141.706253258977085 11033273.793073333799839,3339893.858024140354246 11031298.03948331810534,3344934.070608787238598 11012801.507150871679187,3344315.802156921476126 11006612.875092485919595,3335131.832846984267235 11000080.5955,3321618.648540101014078 10990863.758631829172373,3320289.048542066011578 10990063.570266602560878,3316578.435955451335758 10989258.329015284776688))
+POLYGON ((2653856.215233678929508 11237235.801822742447257,2649960.033055914565921 11237790.721011405810714,2646218.473650861531496 11238809.247956773266196,2644641.744383265729994 11239832.9353,2643775.901383876334876 11240851.769723454490304,2641332.883838926441967 11245025.184230230748653,2639879.719206111971289 11247900.684168718755245,2639168.498979434370995 11249389.701790118589997,2638735.688799229450524 11250965.977665144950151,2630788.367712515871972 11297285.264452375471592,2630942.990485227201134 11299247.872175835072994,2637035.060938380658627 11313856.541785130277276,2638055.415390990208834 11315545.477094668895006,2639075.881163093727082 11316385.376686200499535,2642724.488793332129717 11316385.376686200499535,2650300.225419778376818 11315731.137227045372128,2652341.045644491445273 11315355.096366358920932,2653516.134189306292683 11314417.785796517506242,2668730.057676532305777 11301308.398609358817339,2675099.758939723018557 11295785.32621056959033,2676120.224711823742837 11294383.642669284716249,2685242.523023860994726 11273574.009951518848538,2685675.333204065915197 11271987.425476431846619,2685366.198978131171316 11268262.595574129372835,2685180.518067490309477 11266401.117347702383995,2684469.297840809915215 11264259.07413768209517,2683417.885250268038362 11262587.592489195987582,2666410.604766364209354 11240943.245330264791846,2664957.440133546944708 11240199.791460197418928,2660504.549182325135916 11238345.685718040913343,2657319.698550729546696 11237510.753086131066084,2653856.215233678929508 11237235.801822742447257))
+POLYGON ((2676800.498120062984526 11370998.88892942853272,2674605.055122635792941 11371757.21504901535809,2661587.019910799339414 11385477.612077414989471,2658247.546506492421031 11398188.090636108070612,2658402.169279203750193 11400086.594726,2663133.136318427976221 11407590.828289208933711,2664339.171681681182235 11408922.434563044458628,2668761.00449497345835 11411110.864420393481851,2670399.738718939945102 11411487.141870975494385,2678655.860073114745319 11410442.244821835309267,2680418.492890334222466 11409872.960460346192122,2696436.365740069653839 11400467.0433,2698817.378328646533191 11385857.578845718875527,2690344.295286916196346 11376958.196923479437828,2681933.6624795217067 11372416.90553929284215,2678563.242256773635745 11371186.080006416887045,2676800.498120062984526 11370998.88892942853272))
+POLYGON ((2848140.118764343671501 11375726.542986260727048,2844429.060899769887328 11376292.953260505571961,2842975.896266953088343 11377051.874493379145861,2841677.354406850412488 11378283.770354118198156,2840687.501494716852903 11379703.318593572825193,2829370.094143729191273 11396191.393014257773757,2830607.076325423084199 11397427.130182387307286,2832091.299096169881523 11398188.090636108070612,2841058.640677021816373 11402366.188989348709583,2844181.931630209088326 11403409.493630580604076,2845418.913811902981251 11404740.274617558345199,2845294.903899159282446 11406447.314609987661242,2844027.308857497293502 11407684.589954944327474,2842141.000086004845798 11408634.941412,2834503.258503187447786 11410917.769311549142003,2831379.96755 11409872.960460346192122,2826896.575058302842081 11407778.695127060636878,2824175.370105859357864 11405784.288649288937449,2821206.59060589550063 11404359.584935,2817217.901931281201541 11405022.128799406811595,2815949.861611654981971 11406259.484850097447634,2815238.641384976916015 11407778.695127060636878,2814836.889342701993883 11409397.509624755010009,2815764.292020502500236 11416723.993808778002858,2817929.233477450441569 11426152.283578742295504,2818702.013382536824793 11427581.942233502864838,2820186.236153283156455 11428346.656070651486516,2826463.430919624399394 11430536.249195670709014,2839883.552132206968963 11433114.34393410757184,2847933.955067395232618 11433971.408712275326252,2851541.485805532895029 11439029.10665138438344,2857973.303344588261098 11449734.021185971796513,2870342.011966629419476 11455379.412517977878451,2872104.310825378168374 11454711.557405287399888,2872784.695553105790168 11453181.736319568008184,2871918.741234222427011 11445526.823153922334313,2871424.037417138461024 11443426.616597896441817,2875165.70814168266952 11436071.076632166281343,2881164.715500530321151 11433397.386544864624739,2882185.069953142665327 11433497.003882938995957,2883576.674907551147044 11434451.000312399119139,2888307.753266263287514 11438457.403806621208787,2891987.30771494563669 11441610.795755106955767,2893069.778443417046219 11443137.992563340812922,2894708.512667386326939 11443521.221920603886247,2896471.256804096978158 11442854.540700562298298,2897460.664438268169761 11441516.217240286991,2898543.023847251199186 11438362.869522949680686,2899284.968253387603909 11435022.707079326733947,2899377.920028201770037 11433303.26668812148273,2898852.26939267385751 11431206.864202568307519,2897893.363298981916159 11429299.923973079770803,2896811.337848470080644 11427770.366809776052833,2895574.355666775722057 11426435.034070542082191,2890100.998943453188986 11422530.077221,2885864.735721313394606 11419861.750177832320333,2886328.826678432989866 11403790.471696188673377,2887596.421720094513148 11402553.910367770120502,2889482.730491586960852 11401604.415224803611636,2896996.907439622562379 11401035.876238197088242,2900552.897253522649407 11401129.546833153814077,2901913.555389489978552 11402173.00213267840445,2902995.580840002279729 11403696.764144290238619,2904480.137569219339639 11407684.589954944327474,2905438.487065458204597 11409585.76908652856946,2906520.957793932408094 11411110.864420393481851,2910231.570380544289947 11415009.212629625573754,2912952.775332987774163 11416912.115226378664374,2914467.833602684084326 11417576.236072074621916,2916261.19059936190024 11417675.61994612775743,2917683.742372208740562 11416912.115226378664374,2918673.150006379932165 11415485.059241721406579,2918765.767822720576078 11413770.593009259551764,2918085.494414484128356 11407972.04260060749948,2917559.732459464576095 11405972.105176931247115,2916601.271643734537065 11404072.286192780360579,2914003.742645564489067 11401792.115405170246959,2903644.796110306400806 11393538.926956763491035,2902284.249293833039701 11392590.358257975429296,2885370.031904228962958 11389173.816421872004867,2883607.733045480679721 11389079.970420178025961,2876835.389184090308845 11389647.502708125859499,2863198.974200896453112 11386997.2663963008672,2852623.511256044730544 11377717.19297431409359,2851262.964439568575472 11376771.186318466439843,2849778.74166882224381 11376105.961088605225086,2848140.118764343671501 11375726.542986260727048))
+POLYGON ((2757259.888356134761125 11409872.960460346192122,2753765.792179113719612 11411868.576471919193864,2746004.040683552622795 11417293.856781279668212,2744705.49882344994694 11418527.982485892251134,2743685.03305134922266 11419861.750177832320333,2742973.812824668362737 11421389.51423216983676,2742850.136870398186147 11423100.774048302322626,2743035.706461550667882 11425005.961623132228851,2743808.597686128225178 11427293.995721494778991,2752528.809997419361025 11436548.411962674930692,2753889.356813895516098 11437597.362537713721395,2755528.091037862468511 11438074.462209038436413,2757445.45794728724286 11437885.749440986663103,2766134.612120646052063 11434251.738914657384157,2766691.320894103962928 11433109.191569508984685,2766011.047485864255577 11427576.794094938784838,2762361.994577661156654 11413770.593009259551764,2761589.103353083599359 11411586.436054671183228,2760661.255397320725024 11410442.244821835309267,2757259.888356134761125 11409872.960460346192122))
+POLYGON ((1424580.236608478007838 10389862.035747984424233,1423219.689792001852766 10390271.101850865408778,1423281.472109392751008 10392155.831087350845337,1435526.616096652112901 10432728.946462020277977,1440257.694455367513001 10447242.182042604312301,1440907.021045165834948 10448811.441344901919365,1453245.005487745627761 10477358.290916906669736,1454760.175076933111995 10477686.32677242718637,1458718.139572088373825 10475199.733829034492373,1463572.893885073950514 10471968.089527159929276,1464500.519201854243875 10471139.615660976618528,1462428.640839209081605 10434869.466967122629285,1462119.506613277364522 10432896.201621549203992,1448266.352581507293507 10410443.29718542098999,1429558.666875733993948 10390356.572620516642928,1424580.236608478007838 10389862.035747984424233))
+POLYGON ((1738130.061463204678148 10439736.98002047277987,1727183.570655539399013 10441055.418443609029055,1725884.806156454142183 10441961.341871770098805,1725328.320021979045123 10443366.338138582184911,1725884.806156454142183 10445097.809354327619076,1727492.816200962290168 10447904.318256407976151,1728668.01606526831165 10448729.700251799076796,1731574.456650387728587 10449555.181296611204743,1737480.734873409150168 10451124.671078607439995,1738995.904462593840435 10451455.9181346911937,1742366.32468534167856 10451619.4661003947258,1749014.658633990678936 10451537.691631454974413,1752539.701629450079054 10451455.9181346911937,1764537.493708165828139 10451043.199830440804362,1766052.663297353545204 10450380.761416561901569,1769887.063157729571685 10447736.400662133470178,1771958.718881392385811 10445591.873933916911483,1772515.427654847037047 10444272.565939104184508,1772577.20997223793529 10442536.847816679626703,1770350.82015637261793 10440724.671802366152406,1765774.364570371806622 10439818.614332517609,1744531.043503310298547 10440561.679530600085855,1738130.061463204678148 10439736.98002047277987))
+POLYGON ((1473777.217647620476782 10442622.969978429377079,1472231.101239991839975 10452113.99933335185051,1471241.693605820881203 10456412.553429031744599,1470623.202514975098893 10457733.894583595916629,1469015.192470466950908 10457983.906605677679181,1468520.488653379958123 10456244.427997538819909,1468365.754561177454889 10452526.781896026805043,1467716.427971381926909 10448480.321609936654568,1466788.802654601633549 10447822.587941873818636,1465922.959655209677294 10448974.629196031019092,1465304.579883852507919 10450380.761416561901569,1465180.792610090924427 10452032.218984808772802,1465057.005336329340935 10459055.787342699244618,1465366.362201243406162 10461122.628306576982141,1479621.490914268419147 10490300.562887400388718,1480456.387095216661692 10491632.92067595012486,1481631.364320540102199 10492463.569370616227388,1483146.533909727819264 10492879.080950897186995,1486949.875632171519101 10492048.382030932232738,1490073.166585355531424 10490715.644636604934931,1491402.766583390766755 10489885.207185162231326,1493938.401944681769237 10486318.188883678987622,1495762.817079292144626 10482333.640711711719632,1495917.439852003473788 10480592.769394971430302,1489733.085540982894599 10455504.427389269694686,1485063.789499658625573 10451124.671078607439995,1476281.79487097915262 10444023.348819373175502,1475106.817645655712113 10443198.531274827197194,1473777.217647620476782 10442622.969978429377079))
+POLYGON ((1505163.191479328786954 10458728.63912944868207,1503153.095434074755758 10459055.787342699244618,1501637.925844889832661 10459968.848349951207638,1499875.404347158735618 10461867.998638704419136,1498205.723304751096293 10464267.54982702434063,1497587.120894411345944 10465590.699262199923396,1497215.981712106382474 10467082.191823836416006,1498731.373940276214853 10472464.088360397145152,1499380.700530074769631 10474038.816079774871469,1506090.816796111874282 10484571.826287258416414,1506832.872521739453077 10507767.014665029942989,1506647.302930586971343 10515433.641566829755902,1505008.568706617457792 10515768.002578914165497,1504421.024434210034087 10517101.106280397623777,1509894.158518552780151 10524943.167470039799809,1510914.624290656298399 10526030.354230981320143,1520593.186098186299205 10532629.30556415207684,1522448.548051237827167 10532464.119059234857559,1536641.783127380767837 10527365.151199780404568,1546073.104345858562738 10522609.468421224504709,1548484.841113894013688 10520771.254756858572364,1553154.137155218282714 10518686.098332282155752,1554947.605471387505531 10518186.751839395612478,1558843.787649151869118 10517687.441651811823249,1561224.800237731542438 10519355.153432488441467,1561657.721737424610183 10521105.875749235972762,1561750.562192748067901 10523691.477745588868856,1562770.916645357385278 10524778.165780363604426,1563884.222872781334445 10525195.636746468022466,1565584.962053121300414 10525360.648468429222703,1568955.382275869138539 10524108.582130217924714,1572635.15936353104189 10521357.903581213206053,1573253.427815397270024 10520019.768654527142644,1573593.620179261080921 10518521.246918566524982,1573500.779723940650001 10516601.574826499447227,1572789.782136242603883 10515099.59695459716022,1562832.69896274828352 10499862.177296401932836,1561657.721737424610183 10499030.334340045228601,1559616.901512711774558 10499363.897857505828142,1551515.180292269214988 10498281.222879713401198,1542918.977893721777946 10494372.018839253112674,1540290.613396601518616 10487563.086774045601487,1541496.648759854724631 10484822.517389636486769,1541620.213394636753947 10483163.166134567931294,1541527.372939316323027 10481253.34663974493742,1541187.291894940659404 10479262.251356530934572,1540166.826122840167955 10478187.216085337102413,1526004.537865138147026 10466918.275718504562974,1524829.560639814706519 10466090.708070775493979,1523469.013823338551447 10465426.818708568811417,1518923.50505577865988 10466836.617153389379382,1516697.115239913342521 10471968.089527159929276,1509708.588927400298417 10468819.346614981070161,1505163.191479328786954 10458728.63912944868207))
+POLYGON ((1653836.605325230397284 10509848.858226647600532,1651826.509279976366088 10510182.947470139712095,1650775.208008925896138 10511267.499950714409351,1649940.200508486479521 10512434.724919114261866,1649600.008144622668624 10513931.919062197208405,1649507.501647772965953 10515685.761466788128018,1649631.06628255196847 10517517.810553262010217,1650002.20546485716477 10519520.024865444749594,1649909.365009536733851 10521270.789220202714205,1650435.126964553026482 10523026.507084827870131,1651331.80546289216727 10524361.020721832290292,1652506.782688215840608 10525195.636746468022466,1656681.263592961942777 10529457.456480672582984,1659093.334319470915943 10531040.791287431493402,1660453.881135947071016 10530623.265582542866468,1661288.777316895313561 10529370.239300513640046,1662339.967268457170576 10528370.027680912986398,1663174.863449405413121 10527117.412512024864554,1663514.944493780843914 10525612.832513345405459,1662649.324133371468633 10524278.376113491132855,1661288.777316895313561 10523691.477745588868856,1661195.936861574649811 10522274.774154298007488,1661783.481133982073516 10520940.966238575056195,1661659.693860220722854 10519020.617734601721168,1660948.584953031269833 10517517.810553262010217,1660082.741953642107546 10516184.926141126081347,1659031.329363100463524 10515099.59695459716022,1658165.597683199681342 10513849.399864926934242,1657454.377456521848217 10512265.223503597080708,1656588.53445713268593 10511015.842123594135046,1655382.499093876685947 10510182.947470139712095,1653836.605325230397284 10509848.858226647600532))
+POLYGON ((1579437.893445909023285 10518269.323167597874999,1577458.966858078492805 10519103.199089469388127,1576407.554267533821985 10520106.566805360838771,1564595.220460479380563 10532799.31039784103632,1564007.78750756313093 10534217.886523747816682,1563884.222872781334445 10535889.919700844213367,1563976.95200861338526 10537731.88504771515727,1566141.448187596397474 10542834.041545635089278,1571243.554409125586972 10543252.310632359236479,1573253.427815397270024 10542834.041545635089278,1582313.832490552449599 10537061.337997365742922,1583983.513532960088924 10534635.931884823367,1584942.196987672708929 10531793.785474099218845,1585313.113530995324254 10530292.692275058478117,1585653.194575370755047 10528705.019192766398191,1585776.981849132338539 10527034.734720872715116,1585251.331213607219979 10525195.636746468022466,1583179.45285096205771 10520606.353281604126096,1582313.832490552449599 10519272.569047808647156,1581138.521306757815182 10518438.672561338171363,1579437.893445909023285 10518269.323167597874999))
+POLYGON ((1553803.575064504984766 10522526.844890916720033,1546165.833481687819585 10532881.75673570483923,1545485.560073451139033 10537396.753884298726916,1549412.57775016524829 10541997.278531145304441,1550587.554975488921627 10542834.041545635089278,1554174.602927318774164 10542834.041545635089278,1555473.367426406824961 10541997.278531145304441,1556555.615515898447484 10540912.380496598780155,1557421.458515287609771 10539740.304881889373064,1558008.891468203859404 10538398.281606320291758,1558380.030650508822873 10536813.24917826987803,1558503.706604779232293 10535136.476124944165349,1558256.354696238646284 10526365.231608686968684,1557885.104194442275912 10524361.020721832290292,1556864.749741830164567 10523274.098215594887733,1555504.091605865396559 10522691.792491065338254,1553803.575064504984766 10522526.844890916720033))
+POLYGON ((1581385.984534789808095 10491464.230794722214341,1580705.59980706195347 10492381.606770183891058,1580953.174354587914422 10506769.944221876561642,1581478.71367062185891 10508517.161247845739126,1592394.368979337392375 10538232.956227257847786,1593785.751294763293117 10541330.532492619007826,1594806.105747375637293 10542415.496627528220415,1596506.844927712809294 10542498.359865786507726,1598053.072654832853004 10541831.565153019502759,1599135.209424833068624 10540825.017662659287453,1599722.753697240492329 10539404.774464206770062,1600093.892879545688629 10537897.499479815363884,1604515.725692835170776 10534553.163503492251039,1612246.307730975793675 10535471.798,1613606.854547448921949 10536059.704260462895036,1614317.963454638374969 10537649.380439905449748,1614441.750728399958462 10539487.300173494964838,1611380.464731583604589 10548027.145481275394559,1610700.191323346924037 10549030.225694166496396,1606463.816781718749553 10553555.861620835959911,1612493.659639516379684 10561273.824124421924353,1618832.636723251314834 10567154.638180587440729,1625882.945353152230382 10572361.649665651842952,1628325.740259120007977 10574042.701652424409986,1629686.287075593369082 10574633.92210896499455,1642951.896834956016392 10575557.938576832413673,1644745.476470616646111 10575054.437104016542435,1645889.395558007992804 10574379.930220676586032,1648054.114375973585993 10572278.424990544095635,1647868.544784823898226 10566815.647892309352756,1648220.982292675413191 10566010.424115564674139,1648443.73259375244379 10565101.599370280280709,1648499.392339148325846 10564045.385497279465199,1648425.030919298995286 10562936.143,1647367.495756762102246 10561375.346688168123364,1644862.807213915046304 10558807.831172162666917,1643805.383370866533369 10557197.242651278153062,1642209.841109328437597 10552298.64228449575603,1642333.405744107440114 10550539.947784766554832,1646526.365684327669442 10555651.336658073589206,1647342.782829807372764 10556006.079213790595531,1653873.563396175624803 10560485.564620168879628,1654355.910749783739448 10560987.997832218185067,1654430.272169633070007 10562147.692519901320338,1653613.855024153366685 10565825.988864094018936,1653687.882485531736165 10566933.279555626213551,1658196.433182149427012 10575641.203055556863546,1660701.233044490683824 10576652.871528109535575,1685902.741245687007904 10582458.997080186381936,1687448.635014333296567 10582796.639763792976737,1688592.888060198165476 10582204.715226028114557,1687170.558926331112161 10579093.178153246641159,1682501.262885009637102 10570260.762622762471437,1673626.539120495319366 10554647.288213811814785,1672729.860622156411409 10553307.175863390788436,1652259.4307796722278 10530458.127336513251066,1648981.73969275644049 10527452.342913087457418,1645518.479014685377479 10524778.165780363604426,1644343.279150382149965 10523943.600493943318725,1617750.388633756898344 10506852.07865015976131,1615029.295000807382166 10505685.801852939650416,1602196.495421649422497 10501690.010376501828432,1585282.278032045345753 10493458.864797094836831,1581385.984534789808095 10491464.230794722214341))
+POLYGON ((1794593.644902859581634 10559766.572072230279446,1793696.743765537859872 10560517.890845,1791625.310680857859552 10565890.389462240040302,1791810.434994048206136 10567740.728704657405615,1796758.141081845387816 10590714.487900752574205,1797531.366264893906191 10592228.860889790579677,1801148.915757202776149 10597459.510088417679071,1805107.102891340386122 10602100.508605567738414,1807271.599070323631167 10604211.175530070438981,1817506.869651311077178 10607422.35022478736937,1819238.666969583602622 10607506.002591209486127,1822578.140373890288174 10606155.21779901906848,1823876.68223399319686 10605227.068768672645092,1825639.426370703848079 10603538.354578245431185,1827247.547734705964103 10601089.637241508811712,1832504.276728946482763 10588691.394834231585264,1833060.540224438998848 10587344.615277273580432,1832874.970633286517113 10585405.596041567623615,1826257.694822572637349 10570260.762622762471437,1825021.157918840646744 10569503.838453322649002,1823474.930191720603034 10569166.849527774378657,1820042.50501260231249 10569000.781182801350951,1816146.322834837948903 10569674.456753620877862,1814445.583654497750103 10569587.029470294713974,1811353.350839240476489 10569000.781182801350951,1803746.55607486423105 10567154.638180587440729,1802386.009258388075978 10566564.062005147337914,1794593.644902859581634 10559766.572072230279446))
+POLYGON ((1836898.947586482623592 10613161.749215358868241,1821712.186055009951815 10614188.409358249977231,1820011.558194161159918 10614100.108104577288032,1807055.416619203751907 10612409.206383621320128,1805818.434437509393319 10611563.911957617849112,1795985.249857268063352 10602355.529470110312104,1790326.323542790021747 10596449.322844956070185,1789151.34631746634841 10592905.125841313973069,1786677.715912548825145 10585993.248372975736856,1776690.019879087107256 10561107.946739470586181,1775793.118741765618324 10559849.34300678409636,1773659.458061729557812 10557665.008236143738031,1771216.663155764807016 10556075.218409130349755,1768124.541659998707473 10555485.595145925879478,1766578.425252369837835 10556158.246747769415379,1766609.149431828642264 10566730.071368776261806,1765032.308844743994996 10576565.355249226093292,1757580.025533588137478 10563962.261657290160656,1747406.759908971143886 10549117.693035023286939,1735347.074193373089656 10538232.956227257847786,1729069.879427032079548 10546016.601142950356007,1727771.114927946822718 10546853.854353534057736,1717226.598801536252722 10546853.854353534057736,1710331.135583326220512 10544006.645616902038455,1708630.396402986254543 10543840.883718753233552,1707084.279995360411704 10544595.283397143706679,1706280.219313359353691 10545850.790694113820791,1705630.892723563825712 10548864.644022380933166,1705538.163587731774896 10550622.90917463041842,1712959.500080446479842 10560517.890845,1718711.044211262371391 10565138.482129037380219,1725575.671930519631132 10570934.864530785009265,1727338.193428250728175 10573539.311398327350616,1733275.195830727927387 10585322.51613243855536,1735378.132331302622333 10590631.343640085309744,1732997.119742725742981 10597881.427303075790405,1731945.595832692924887 10598979.931154182180762,1730152.127516523469239 10599485.19266365468502,1729811.935152659658343 10597881.427303075790405,1730152.127516523469239 10596361.249833844602108,1730739.671788930892944 10594929.46288151293993,1731543.732470929156989 10593748.122190026566386,1732193.059060727478936 10590631.343640085309744,1732038.436288016149774 10588774.818935122340918,1731481.72751455870457 10586923.345989802852273,1726688.866838455200195 10580859.208974337205291,1718896.613802414853126 10571438.063670266419649,1717845.089892382035032 10570343.962820325046778,1716608.330349667463452 10569503.838453322649002,1708011.905312140472233 10565470.738214641809464,1698395.125821998575702 10556241.276091100648046,1694777.242371218977496 10550539.947784766554832,1695581.414372708415613 10549366.227011807262897,1695426.568961014505476 10547525.6603,1691747.014512334950268 10542498.359865786507726,1682191.906020092777908 10531128.02969204634428,1681140.71606853348203 10530040.336286937817931,1672822.701077476842329 10521522.823104849085212,1671462.042941512307152 10520940.966238575056195,1669915.926533883670345 10520606.353281604126096,1668308.027808866696432 10520940.966238575056195,1668122.458217714214697 10525612.832513345405459,1669235.653125646989793 10535889.919700844213367,1669792.361899104434997 10537649.380439905449748,1679161.678161211777478 10556075.218409130349755,1696910.90305125224404 10589029.34455556049943,1706372.948449191404507 10591895.305930625647306,1707177.120450680842623 10592738.178112609311938,1699013.61691284715198 10603283.289702342823148,1697467.500505218515173 10603960.646138461306691,1694035.18664559116587 10603788.868534544482827,1691097.465283556841314 10602861.039871301501989,1690015.217194062424824 10603960.646138461306691,1690571.925967520102859 10605733.095121055841446,1693540.482828504173085 10614523.050988011062145,1694591.672780066262931 10615624.225613692775369,1708661.231901936000213 10623328.870045825839043,1710052.83685634448193 10623919.783026657998562,1720813.646753366105258 10645043.150679750367999,1719453.099936889950186 10651248.570228541269898,1718463.692302721785381 10656010.105063028633595,1718278.122711569303647 10659418.834753600880504,1719484.046755331102759 10665632.702308379113674,1720071.591027738526464 10667425.788020567968488,1721215.621434621047229 10667851.730261178687215,1735470.638828152092174 10667168.026052156463265,1737356.947599644772708 10666999.56543960608542,1739181.47405374632217 10666489.299303911626339,1740480.015913852024823 10665548.336985182017088,1742397.382823274005204 10663250.318767169490457,1744871.124547682935372 10659503.124564617872238,1747344.754952600458637 10657969.212425077334046,1749231.063724093139172 10657800.6716095097363,1743541.301910665351897 10667936.123981084674597,1742706.517049208516255 10669214.739424267783761,1741655.215778155252337 10670240.321123320609331,1738099.003325272351503 10670750.867002364248037,1732718.709696252830327 10670750.867002364248037,1730987.023697471711785 10670666.745577808469534,1729595.641382048372179 10670067.180116923525929,1728358.659200351452455 10669214.739424267783761,1726472.350428861565888 10669383.25456939637661,1725142.750430826563388 10670324.744301898404956,1721246.568253062199801 10674504.533062869682908,1720411.672072111396119 10675699.885837137699127,1720071.591027738526464 10677317.369865637272596,1720442.730210043722764 10690135.554776590317488,1720937.434027127688751 10691502.702546246349812,1739861.747461986029521 10732690.284969350323081,1740603.803187613608316 10734236.089367624372244,1743108.380410972284153 10735957.366165477782488,1745953.372637174557894 10737078.567653365433216,1766609.149431828642264 10739661.719852697104216,1768526.516341253416613 10739491.464066565036774,1769856.116339288651943 10738540.404583709314466,1770954.617074435111135 10737348.278619984164834,1773102.971927254460752 10717301.204461155459285,1773195.701063086511567 10715584.618481121957302,1767289.534159556496888 10686547.16808502189815,1766701.989887151867151 10684749.065651010721922,1774401.736426339717582 10684495.572447882965207,1776287.822558849817142 10684321.762754512950778,1778916.187055970076472 10682444.5918,1779256.379419836914167 10680905.529836293309927,1779720.247737971134484 10675868.560748780146241,1779782.030055362032726 10674162.339949127286673,1777463.022423155838624 10661715.566823510453105,1777122.941378783201799 10660096.860745389014482,1775947.630194985773414 10656435.643906254321337,1774463.518743730615824 10653290.222455380484462,1773566.617606409126893 10652014.577732982113957,1765959.934161524288356 10641986.725857548415661,1764877.686072032665834 10640965.061937924474478,1760177.443212267244235 10639948.44058738835156,1758940.683669552672654 10639099.741534730419517,1756807.02298951940611 10636978.301160890609026,1755910.344491180265322 10635705.996634459123015,1755168.066126570338383 10634093.426817325875163,1754580.521854162914678 10632309.047756467014551,1752261.514221956720576 10606999.845328686758876,1752106.780129753984511 10605143.748300172388554,1753158.192720295628533 10605143.748300172388554,1759064.24830433470197 10612241.782930504530668,1759806.526668944628909 10613765.487128043547273,1760394.070941349258646 10615624.225613692775369,1760795.934303113026544 10617655.285009821876884,1760950.557075827149674 10619514.774376075714827,1760301.230486028827727 10622649.59652516245842,1759899.255804773885757 10625953.303416864946485,1759837.250848403433338 10627647.551392445340753,1760239.225529658142477 10629682.178798159584403,1760981.503894265508279 10631209.767023976892233,1762960.430482098832726 10633669.274073947221041,1764042.789891081629321 10634685.269138487055898,1778483.265556277008727 10647764.65429756604135,1791223.224680111510679 10668104.607647115364671,1794067.882947843056172 10682787.199381079524755,1793233.09808638622053 10684068.285382458940148,1791841.493131977738813 10686716.110617579892278,1790975.650132588576525 10689707.915325451642275,1790821.027359877014533 10693218.182059152051806,1792181.685495841549709 10696551.199439913034439,1794346.515633298549801 10698695.812388869002461,1801025.351122423540801 10704860.617788573727012,1803839.507849676068872 10705976.42177751660347,1820599.213786059757695 10706574.513349551707506,1829690.120001691160724 10703575.323693323880434,1830772.59073016513139 10702464.537971520796418,1835689.127360541839153 10692188.842727597802877,1841718.747579356888309 10677917.570898750796914,1844347.334715459495783 10657118.276937607675791,1844007.253671086858958 10643512.474284483119845,1843790.625942002050579 10641562.389721475541592,1843357.927081288537011 10639523.925105810165405,1842770.160169901326299 10637738.130888,1840914.909536341205239 10635109.179384211078286,1839832.438807867001742 10634093.426817325875163,1837822.565401592524722 10631717.410709653049707,1835998.261586473323405 10629090.768582826480269,1835411.051272539654747 10627307.692041978240013,1835225.481681387173012 10625445.781697515398264,1836898.947586482623592 10613161.749215358868241))
+POLYGON ((1872981.045456797583029 10664270.406215300783515,1871682.503596692113206 10665206.591368276625872,1871620.498640321427956 10666915.490109354257584,1874558.220002355752513 10678344.474024813622236,1889184.48789768316783 10702549.3597327824682,1891070.796669175848365 10705204.349945763126016,1892492.903164060320705 10705717.511876832693815,1893884.508118466008455 10705204.349945763126016,1908850.857058168854564 10681074.333119096234441,1908881.915196098387241 10679366.813956806436181,1908201.530468370532617 10678259.951852912083268,1905387.373741118237376 10674330.976966388523579,1903037.419290470890701 10672456.544447790831327,1901614.867517624050379 10671945.56424599699676,1895770.816889958688989 10672798.652275109663606,1894039.019571686163545 10672798.652275109663606,1887885.500759618356824 10671345.886746346950531,1885071.677990833995864 10670240.321123320609331,1872981.045456797583029 10664270.406215300783515))
+POLYGON ((1614256.181137247476727 10628243.413730354979634,1608411.90787060232833 10628918.359840285032988,1607082.30787256732583 10629766.103373212739825,1606247.300372125115246 10631037.304940946400166,1605041.487647854490206 10633753.247513817623258,1601114.358651648974046 10645126.957827942445874,1599784.758653613971546 10653206.009103601798415,1600341.244788089068606 10655075.483001183718443,1607731.63446236285381 10678344.474024813622236,1612308.090048363897949 10684749.065651010721922,1616358.894998842384666 10689364.961028676480055,1617410.307589384028688 10690478.547708220779896,1628913.173212033463642 10696983.88984009437263,1630304.778166441945359 10697581.195491963997483,1632221.811117393197492 10697411.676202977076173,1633798.985662951366976 10696725.320134593173862,1634417.254114817362279 10695356.820145102217793,1635221.426116306800395 10690478.547708220779896,1657175.967410048935562 10674846.743288543075323,1658907.764728318434209 10674930.916109926998615,1659804.331907169194892 10676210.839194681495428,1663020.240676693851128 10685265.310218179598451,1663886.083676086040214 10688768.372350199148059,1664288.058357340749353 10690821.557837938889861,1664164.493722558952868 10692616.329305402934551,1663824.30135869490914 10694158.028368968516588,1663236.868405778892338 10695526.288514446467161,1659866.114224557299167 10700492.959789801388979,1659247.845772694097832 10701862.179508050903678,1663360.433040557894856 10706489.950272163376212,1664411.845631102332845 10707606.020163608714938,1675451.065574597101659 10704432.365269400179386,1677275.369389719096944 10703834.461006097495556,1679687.328796736896038 10701862.179508050903678,1681635.419885617680848 10699551.934370407834649,1682810.397110941354185 10696809.762563096359372,1683150.589474805165082 10695183.042395692318678,1683583.510974501259625 10694073.618669930845499,1684665.759063992882147 10692959.446648374199867,1686335.662745383102447 10692701.029024481773376,1687046.771652569528669 10694242.747179949656129,1687201.283105792477727 10696123.15873321890831,1686861.202061417046934 10697750.410754108801484,1685933.576744636986405 10700662.247106853872538,1685346.032472232356668 10702120.943489706143737,1678574.133888804353774 10717386.210465075448155,1673657.485938936471939 10726750.449130762368441,1672853.425256938207895 10728215.032106772065163,1671647.612532664788887 10730964.875022677704692,1671090.903759207110852 10732600.441385932266712,1670379.906171511858702 10735787.202642114832997,1670287.065716188633814 10737508.870205352082849,1671090.903759207110852 10741729.93758574873209,1672204.209986631060019 10745352.067129483446479,1673688.544076868798584 10748625.519573803991079,1674770.792166360421106 10749663.392329409718513,1679563.541522975312546 10753284.759395958855748,1684511.136291281320155 10754323.340267915278673,1685871.794427245855331 10753374.875358186662197,1688252.807015825528651 10747763.229963030666113,1688933.080424062209204 10744575.535347932949662,1688531.105742807267234 10742506.45628197863698,1692798.204463894246146 10719617.455045038834214,1702384.037135594990104 10713439.33742468059063,1711568.006445532198995 10704178.141588946804404,1712402.791306989034638 10702892.975739389657974,1714660.239260786678642 10660606.957112757489085,1714567.510124954627827 10656949.757069922983646,1714258.1532600405626 10653206.009103601798415,1713856.178578788414598 10651080.194776533171535,1713145.069671599194407 10649548.168414195999503,1712248.279853768879548 10648189.374954229220748,1710114.619173735613003 10646060.528695072978735,1705692.675040951929986 10641986.725857548415661,1677615.450434091733769 10620110.234512481838465,1676378.690891377162188 10619263.989611694589257,1674677.951711039990187 10619180.193589376285672,1658814.924272998003289 10621970.390345484018326,1654702.225685640005395 10622733.434990610927343,1653125.273779061390087 10623496.259725598618388,1648023.056238044053316 10631461.294731166213751,1647930.327102212002501 10633156.905716588720679,1649198.144782856106758 10637826.737349506467581,1649940.200508486479521 10639351.559160239994526,1653774.600368859944865 10641646.154282188042998,1660546.498952285153791 10644874.927748087793589,1676285.850436056731269 10652355.665404329076409,1685778.953971925424412 10656351.391855264082551,1687355.90587850403972 10656692.695662047713995,1688098.184243114199489 10658226.321771271526814,1686490.285518094431609 10673309.389050425961614,1684913.110972536262125 10674077.8694,1676378.690891377162188 10676553.134761702269316,1670812.60503222537227 10677833.053999787196517,1669421.222716799471527 10677232.860379474237561,1670503.47080629109405 10676126.343372819945216,1674987.085936971474439 10673820.163945471867919,1677151.804754937067628 10671687.939056137576699,1677275.369389719096944 10669898.341155253350735,1676533.313664091518149 10668362.097983695566654,1674183.247893952997401 10663844.686776522547007,1669390.164578867144883 10657711.806304739788175,1659402.468545402633026 10651248.570228541269898,1658010.863590996945277 10650655.294772205874324,1650063.987782248063013 10648100.634311376139522,1641282.215792548377067 10645724.342870030552149,1639952.393155530793592 10646574.169302294030786,1632345.598391154548153 10648016.484764138236642,1619667.532904199324548 10633497.05540351383388,1614256.181137247476727 10628243.413730354979634))
+POLYGON ((1919333.368228208739311 10685434.528773574158549,1917601.682229427620769 10685434.528773574158549,1915777.378414305625483 10686030.826787853613496,1914478.725234711542726 10686974.609999371692538,1913643.495095289777964 10687998.240369344130158,1901584.254657656652853 10719362.666168740019202,1901274.675153760239482 10720910.407573046162724,1901738.877430368214846 10722968.317541623488069,1902542.715473386691883 10724516.875589072704315,1903625.074882369488478 10725635.89229010604322,1925455.940221838420257 10725890.915088765323162,1929321.175581161631271 10724861.597382973879576,1931949.762717264471576 10722883.242100570350885,1933000.730029843980446 10721854.377142800018191,1940082.208117165835574 10711978.224979430437088,1940886.046160184312612 10710691.592520965263247,1941164.23356767767109 10709061.567479353398085,1940793.428343843435869 10707431.622235659509897,1939370.876570996828377 10704088.671910809352994,1938412.415755266789347 10702803.522872617468238,1926754.593401432503015 10690478.547708220779896,1920755.920001055579633 10686030.826787853613496,1919333.368228208739311 10685434.528773574158549))
+POLYGON ((1663144.027950458228588 10711035.61791012994945,1659495.197681234683841 10711120.546051546931267,1655908.261048896005377 10711549.52649325504899,1654083.957233774010092 10712063.164829397574067,1651888.514236349845305 10714212.648644030094147,1651950.296553740743548 10715754.279824070632458,1653372.625687605002895 10727954.969096,1653681.759913536719978 10729674.974229644984007,1655104.311686386121437 10730279.788155807182193,1657021.455956825753674 10730104.810883115977049,1664350.063313711434603 10727870.141158796846867,1665772.39244757569395 10727355.004323840141296,1666390.883538424270228 10725980.670521734282374,1667040.210128222592175 10719188.277314655482769,1667225.77971937507391 10715669.60314485989511,1666854.64053707011044 10713609.254485880956054,1664720.979857034049928 10711379.660608854144812,1663144.027950458228588 10711035.61791012994945))
+POLYGON ((1839152.165399627527222 10713439.33742468059063,1837668.053948372369632 10713609.254485880956054,1835843.750133253168315 10714212.648644030094147,1827742.25155178993009 10717815.275080926716328,1822980.226374636637047 10721854.377142800018191,1811322.292701310943812 10737594.127889450639486,1810487.396520359907299 10738800.560622414574027,1810178.262294428423047 10740438.003545617684722,1810611.406433104071766 10742506.45628197863698,1812312.145613444037735 10745352.067129483446479,1813239.659610733157024 10746730.302461791783571,1814322.019019715953618 10747763.229963030666113,1815929.806425244314596 10748109.126371489837766,1817847.062015175120905 10747938.34947495162487,1842182.949855967657641 10740783.219148144125938,1843759.679123560898006 10740007.206379260867834,1844842.0385325436946 10738885.834423188120127,1847285.056077493820339 10735181.901172205805779,1848088.894120512530208 10733890.8945,1848707.273891869699582 10730709.662847697734833,1846944.975033121183515 10717386.210465075448155,1846419.213078104658052 10716013.87909909337759,1843759.679123560898006 10714641.514140786603093,1840914.909536341205239 10713524.295427458360791,1839152.165399627527222 10713439.33742468059063))
+POLYGON ((1933928.577985603827983 10746038.977151216939092,1932351.403440045658499 10746815.675280181691051,1932073.327352043474093 10748369.646987298503518,1931980.264257740462199 10749919.313373783603311,1931702.188169738510624 10758293.902486350387335,1932536.973031198140234 10762010.078850565478206,1935721.823662793496624 10768322.599560625851154,1938102.947570861550048 10772995.610971312969923,1939061.742345062317327 10774379.435931613668799,1954924.547144124517217 10780355.855325825512409,1955203.179829580010846 10778713.806823421269655,1951430.562286594882607 10767110.942531559616327,1950626.724243576172739 10765552.70203511044383,1941720.942341132555157 10753374.875358186662197,1938845.225935471476987 10749487.918027132749557,1933928.577985603827983 10746038.977151216939092))
+POLYGON ((1721895.894842857727781 10711808.657307479530573,1720257.160618891008198 10712152.738905167207122,1719174.689890417037532 10713180.144804762676358,1718339.905028957407922 10714467.245665542781353,1716360.978441126877442 10718758.817348159849644,1716020.786077262833714 10720306.422035271301866,1716670.112667058361694 10742421.13728790730238,1716855.682258210843429 10744400.191663905978203,1732162.000922795152292 10780270.062239678576589,1733089.626239575445652 10781569.865053838118911,1738037.221007884247229 10787814.61429201066494,1739119.469097375869751 10788853.774869181215763,1741624.268959714099765 10790593.559452082961798,1746664.481544360984117 10793979.428398033604026,1751797.645903822500259 10794413.331047454848886,1753405.544628839241341 10794756.90898079238832,1754827.873762706294656 10795367.513719541952014,1755910.344491180265322 10796407.824864536523819,1756837.969807960558683 10797801.0958,1757610.861032537883148 10799362.022171689197421,1759961.038122164783999 10806755.463923737406731,1764228.136843251762912 10820163.89951772801578,1765928.876023591961712 10825308.424163909628987,1778297.918604104081169 10838580.353831313550472,1780493.361601531039923 10840765.32119558006525,1793573.179130758857355 10848641.480729265138507,1795181.411814249353483 10847852.793558433651924,1797592.925943302223459 10840328.145817346870899,1798242.697811062680557 10837096.938811667263508,1798366.262445844709873 10833603.143544353544712,1790975.650132588576525 10799973.039062479510903,1790202.75890801101923 10798407.280928855761886,1787574.171771908178926 10794151.047978557646275,1784296.703323972178623 10790851.01900302618742,1783028.774323836900294 10790069.29684297926724,1780833.442645903909579 10787900.502241112291813,1777710.374331699451432 10784346.268823780119419,1774927.275742376456037 10780355.855325825512409,1767073.129069456830621 10767543.452327126637101,1766671.154388201888651 10765467.406025717034936,1766980.399933624779806 10763914.20881949365139,1767073.129069456830621 10762095.642837731167674,1766887.559478304348886 10760196.685565259307623,1765959.934161524288356 10758901.255052601918578,1764877.686072032665834 10757776.467019839212298,1751673.858630060916767 10750440.502616750076413,1748983.711815549526364 10749056.860468503087759,1740820.20827771583572 10745091.661545127630234,1727956.684519099304453 10721679.615408286452293,1721895.894842857727781 10711808.657307479530573))
+POLYGON ((1897502.502888739807531 10751819.76490188203752,1897100.416887993691489 10752943.572488687932491,1896667.606707789003849 10755879.020806476473808,1896605.601751418318599 10757691.268063075840473,1897069.358750061364844 10759764.951775273308158,1901584.254657656652853 10766160.7004,1906778.978695523692295 10770917.906828468665481,1907582.816738542402163 10772477.060519,1907521.257060133852065 10774208.312650492414832,1906469.844469589414075 10775335.498632200062275,1904645.540654470212758 10776025.118962658569217,1887545.308395751519129 10771868.499546017497778,1881361.176723713288084 10767628.774268738925457,1880093.136404086835682 10766764.082617124542594,1871465.987187101272866 10766246.316436298191547,1867415.182236622786149 10770832.232241785153747,1867137.106148620601743 10772477.060519,1866549.339237233623862 10778885.043057724833488,1867013.096235876670107 10780965.173241196200252,1867786.321418927749619 10782612.756638377904892,1869363.050686523783952 10785732.396453958004713,1870321.956780218752101 10787033.239751188084483,1871744.063275100663304 10787643.153945544734597,1873506.807411814108491 10787729.039737422019243,1883433.055086358450353 10789029.951226398348808,1892926.047302735969424 10791285.035301158204675,1907675.879832845414057 10804232.90551626868546,1908634.340648575220257 10805536.966815,1910366.02664735657163 10808495.432802418246865,1911169.864690372254699 10810058.494191521778703,1911788.133142238250002 10811889.883882919326425,1910798.72550806729123 10812325.240294970571995,1909531.130466405535117 10811540.741217510774732,1906160.710243657696992 10808318.440000344067812,1904892.669924031244591 10807534.714660130441189,1901986.006699929246679 10806406.583873249590397,1900223.70784118049778 10806320.775893749669194,1896048.892977960873395 10807276.624978460371494,1885783.009537005797029 10811540.741217510774732,1878609.024952831678092 10819900.62481896020472,1879721.997221781872213 10821035.383008284494281,1882597.71362744551152 10822084.323524612933397,1885813.622396973194554 10822778.684063967317343,1892585.966258363332599 10823478.138558423146605,1896791.171342570800334 10822520.017085257917643,1900470.837110741529614 10821212.39217765070498,1904490.583923285128549 10820599.470435442402959,1905634.94828864117153 10821648.343919919803739,1906407.839513218728825 10823214.735920120030642,1908325.095103152561933 10828711.253324138000607,1900755.369729209691286 10837008.227291215211153,1900050.383394015487283 10837428.201604323461652,1899475.195585086941719 10836643.326790330931544,1896803.527806046884507 10834702.132722370326519,1882814.341356530319899 10842167.681910343468189,1881762.817446497501805 10843214.840070331469178,1880928.032585037639365 10844526.69082291610539,1880866.472906629322097 10846276.007874097675085,1881515.688176933676004 10848203.800073623657227,1882783.283218597993255 10848992.52785274758935,1884422.462720529641956 10849338.550695795565844,1894039.019571686163545 10848901.140416037291288,1901267.216747875791043 10849526.065857788547873,1902213.543739109532908 10849052.403044467791915,1903289.66925660870038 10849052.403044467791915,1903549.488948119571432 10849682.384959833696485,1902350.911990747787058 10858062.362241685390472,1901553.307839215733111 10858645.209404278546572,1900588.279173528309911 10859114.489654680714011,1897360.013940521981567 10860114.066450837999582,1896191.381926175905392 10860222.333803251385689,1895411.922851641196758 10859747.927213925868273,1894744.228545862948522 10859114.489654680714011,1894168.818097951821983 10858274.415647445246577,1889957.379122260725126 10860465.704887578263879,1888349.591716735158116 10860114.066450837999582,1882350.584357884479687 10860995.406365,1880247.759176798164845 10861520.413346344605088,1878639.971771272597834 10862310.683503799140453,1878485.460318052442744 10863625.898699145764112,1884731.596946461359039 10873806.319752441719174,1885690.057762191165239 10875123.755599541589618,1897310.588086612522602 10875809.302565472200513,1915035.100049698259681 10877499.2631791010499,1924837.671769972424954 10878551.863878866657615,1935845.83357553742826 10880136.135084182024002,1945957.205563269555569 10882421.236470056697726,1947008.618153813993558 10883126.837616482749581,1947132.182788596022874 10884625.057217601686716,1946050.268657575361431 10885765.888898871839046,1942864.972748015075922 10887351.838746560737491,1937657.669607689604163 10887612.977578811347485,1935895.370748940855265 10886928.777054443955421,1934837.724266912788153 10886878.074794501066208,1928053.580539497314021 10887878.880437837913632,1921497.753087700810283 10890258.840392500162125,1919333.368228208739311 10892547.340367514640093,1918498.472047257935628 10893781.489772908389568,1913241.743053017416969 10904981.201310561969876,1913179.738096646731719 10906833.509109189733863,1914323.768503529252484 10907895.738923888653517,1916117.459458681056276 10907983.15300508774817,1917447.059456716291606 10907008.311123207211494,1920446.340497158933431 10903391.459332110360265,1921003.049270616611466 10901893.870495822280645,1924033.388448988785967 10896599.207933656871319,1925362.988447024021298 10895630.753548514097929,1927311.302174889948219 10895364.54791684448719,1932419.419648920185864 10900425.505066372454166,1933106.038268131669611 10901062.795207435265183,1932623.579595034942031 10901857.348052678629756,1930681.722397637786344 10908245.084098238497972,1926321.783221227582544 10914519.500717388466001,1926012.648995296098292 10916199.681105718016624,1927002.167948955437168 10917525.343283776193857,1928455.221262281294912 10918055.043756553903222,1930249.023536924272776 10918142.270022071897984,1938535.980390045791864 10914252.555681832134724,1943329.063705134671181 10911777.051602318882942,1952822.167241 10903565.855346573516726,1953471.382511307718232 10902596.409869506955147,1955697.883646664209664 10896691.23730369284749,1956501.721689682686701 10895364.54791684448719,1958109.397775719873607 10893694.257785802707076,1959482.523694654460996 10899265.390016762539744,1960261.760130206821486 10899737.476482063531876,1960354.600585527252406 10900638.881073627620935,1954936.90360760060139 10911444.698939260095358,1953953.618545424658805 10912983.198674464598298,1950317.144739679759368 10918939.136880552396178,1948369.276289781322703 10919113.931577585637569,1946513.914336727000773 10919823.344831669703126,1945153.367520253639668 10920795.246371833607554,1943576.192974692676216 10928497.025398898869753,1943545.246156254550442 10930355.42436233535409,1944658.663703166879714 10939042.545443952083588,1946451.909380356548354 10939042.545443952083588,1951306.997651815647259 10934790.144610647112131,1952389.023102324921638 10933636.28414618037641,1954028.091284765163437 10931066.010220114141703,1955635.878690293524414 10928409.347522938624024,1958604.324231786653399 10924037.088963456451893,1961108.901455145329237 10916869.959659092128277,1963298.444519556825981 10912997.831517186015844,1968808.536674841772765 10910806.436496082693338,1969952.901040198048577 10911956.751425933092833,1969921.954221756896004 10913723.469098750501871,1969612.819995822617784 10915315.943631645292044,1966860.668224940774962 10922656.640434231609106,1965036.364409821573645 10936119.751868080347776,1965005.306271889247 10937892.752883555367589,1966180.283497212920338 10938954.73160682991147,1986403.472750644665211 10936294.988328592851758,1987733.072748679667711 10935320.871230071410537,1988536.910791698144749 10933991.739113885909319,1999792.647144786547869 10915223.662213483825326,2012006.844313607551157 10885944.903712172061205,2013088.869764119386673 10882952.964121570810676,2013367.502449574880302 10881368.037857849150896,2014975.17853560927324 10864676.674335174262524,2014975.17853560927324 10862922.313839143142104,2014573.426493336912245 10861255.537060715258121,2013429.0621279834304 10860205.604333246126771,2010028.029045265400782 10859853.979314360767603,2000287.350961873540655 10858187.637042596936226,1998988.809101770631969 10857398.160263855010271,1994566.976288478355855 10852667.002350330352783,1993577.012056853855029 10851353.899736758321524,1993175.371334072668105 10849689.633714823052287,1989928.515746103832498 10825658.272171031683683,1998432.100328313186765 10813018.608216,2000194.399187061702833 10813104.813944710418582,2001648.009097840869799 10813630.849228646606207,2003595.877547739073634 10813367.826517026871443,2004369.102730790385976 10812062.267909059301019,2004152.586321196751669 10810149.362650955095887,2003163.067367537179962 10808839.407166304066777,1992773.174013835377991 10803186.705651702359319,1988444.292975357500836 10801534.462306145578623,1957429.124367480399087 10799710.542256930842996,1950564.71928720572032 10810149.362650955095887,1937732.142347030108795 10801185.84906723164022,1916024.507683869451284 10778885.043057724833488,1914107.586052409373224 10776287.018348222598433,1911726.573463829932734 10771526.383090253919363,1911107.85973400156945 10769705.789287758991122,1910644.21405484713614 10767628.774268738925457,1910427.586325764888898 10765728.589505210518837,1910984.295099219772965 10764256.255390845239162,1912221.277280916692689 10763999.796664049848914,1913241.743053017416969 10764688.273175280541182,1914416.720278341090307 10765035.02767875418067,1915344.234275629976764 10764170.664332507178187,1916148.517596610588953 10762874.168793652206659,1916426.593684612773359 10761317.205609727650881,1915808.325232746778056 10759503.996239472180605,1914849.419139054603875 10758208.386108890175819,1911046.300055593252182 10755788.871804885566235,1902759.231882980326191 10751905.201341221109033,1897502.502888739807531 10751819.76490188203752))
+POLYGON ((2038760.257535957032815 10972853.859564388170838,2047845.709096537670121 10971767.003283251076937,2069336.382072142791003 10969182.285988515242934,2073077.941477195592597 10967753.526107743382454,2074129.354067740030587 10968468.028883259743452,2073850.832701773149893 10970073.047572972252965,2073077.941477195592597 10971409.569172061979771,2071748.341479160590097 10972388.867902034893632,2061884.210080477874726 10975508.675528416410089,2057616.88872040854767 10976581.359788116067648,2052329.101588238496333 10976311.968810884281993,2044227.60300677549094 10978276.937723085284233,2042898.00300874048844 10979257.226019274443388,2042094.164965721778572 10980595.232849445194006,2039867.775149856461212 10992027.369044261053205,2039589.142464400967583 10993638.281308,2039867.775149856461212 10995603.435209730640054,2040702.671330807497725 10997215.195285804569721,2043052.625781451817602 10999451.360316202044487,2046855.744864916196093 11002136.245536144822836,2048216.40300088073127 11001064.03322290815413,2057400.260991326533258 10991310.386420244351029,2074376.483337298268452 10992115.870796320959926,2075706.083335333270952 10980237.334399770945311,2075984.716020788764581 10978629.915161924436688,2076788.554063810268417 10975420.389688594266772,2078396.675427809590474 10972834.283704943954945,2082756.614604216767475 10966686.722046878188848,2084086.103282760595903 10965708.564576413482428,2086065.029870594153181 10965439.283380344510078,2087395.075146591290832 10966241.708679301664233,2088384.482780762482435 10967577.156812651082873,2089064.75619 10992832.938387040048838,2087611.14627821999602 11004285.691408837214112,2085477.70823716907762 11006612.875092485919595,2080375.602015640120953 11012707.893572989851236,2079849.840060623595491 11014146.456979569047689,2077437.880653605796397 11023656.511182302609086,2077159.693246112437919 11025363.875492909923196,2077685.343881640583277 11027431.718938458710909,2078551.298200520919636 11029051.047213055193424,2080901.252651165472344 11031204.17068786919117,2093301.019411136163399 11030665.906745862215757,2095187.328182628843933 11029949.690202092751861,2096547.986318596173078 11028957.209463987499475,2114606.234115079976618 11011993.890370480716228,2116740.006114607211202 11009659.700977101922035,2119924.968065693508834 11004285.691408837214112,2121502.031291760504246 10999810.271790826693177,2122274.922516338061541 10994797.537489807233214,2122274.922516338061541 10993009.642152119427919,2121718.213742883410305 10990863.758631829172373,2119986.973022064194083 10987736.898975294083357,2117080.198478471022099 10983449.13493587076664,2107679.712758940178901 10973103.857872055843472,2105329.646988804452121 10970964.246671488508582,2102825.069765445776284 10969182.285988515242934,2092157.100323747610673 10962769.16799608618021,2090239.733414322603494 10956899.305446814745665,2089714.082778797484934 10954852.803048079833388,2089188.320823780959472 10952718.924454759806395,2089188.320823780959472 10950854.088914830237627,2089961.212048358516768 10949521.59971571341157,2091661.951228698482737 10949165.3326117079705,2093486.589002291439101 10949165.3326117079705,2095063.318269887473434 10948277.304531125351787,2095867.601590868318453 10946945.63954315520823,2097970.092813480645418 10940996.776337221264839,2097970.092813480645418 10939222.966519648209214,2090920.006822559284046 10929912.780907733365893,2088600.553912391187623 10927879.159559627994895,2085941.465235812123865 10926283.743777563795447,2084302.731011845637113 10926016.33704562112689,2082168.847692829789594 10926551.16101505048573,2071748.341479160590097 10927081.245542803779244,2063553.891122888540849 10925753.721349975094199,2049298.762409863527864 10922476.657966962084174,2047969.273731319699436 10921679.695452082902193,2042063.218147283652797 10919556.191755354404449,2030621.800883548799902 10917612.881084099411964,2028983.06665958208032 10917345.814734613522887,2024962.985888564959168 10917438.124922145158052,2021530.894667917396873 10918939.136880552396178,2008791.046863571042195 10928497.025398898869753,2006626.550684588029981 10930798.415544642135501,2003688.829322553705424 10934434.647941635921597,2003410.641915060346946 10936031.975737955421209,2003905.457051635719836 10938155.837401131168008,2007306.824092824710533 10946852.928276408463717,2020046.337938697310165 10952098.855501854792237,2021871.087031781440601 10952098.855501854792237,2033652.140061924001202 10945877.298716388642788,2034920.180381550453603 10951205.326119776815176,2024653.851662630448118 10972212.378355819731951,2024375.664255140116438 10973813.787638397887349,2025705.264253175118938 10974617.201716162264347,2036961.000606263289228 10973461.060104463249445,2038760.257535957032815 10972853.859564388170838))
+POLYGON ((2293676.102839030325413 11002672.253968672826886,2290212.619521979242563 11003390.436159756034613,2289223.211887808516622 11006435.817315626889467,2289006.584158723708242 11008138.536673936992884,2288295.697890519630164 11018631.331384917721152,2288326.75602844869718 11020425.98113190382719,2288666.837072824593633 11022398.574665322899818,2291697.176251199562103 11032374.710227888077497,2292439.009337844792753 11034172.994946153834462,2293335.910475166514516 11035793.931346436962485,2294418.381203640252352 11037143.441415218636394,2295778.928020116407424 11037865.276981063187122,2307653.04414456197992 11039121.220455469563603,2308673.398597171530128 11037954.053798239678144,2308889.581048293970525 11036243.846217356622219,2308209.307640054728836 11011186.36956680752337,2307591.039188188500702 11009753.272570675238967,2306230.381052223965526 11008946.018,2302117.682464865967631 11006706.40474190376699,2293676.102839030325413 11002672.253968672826886))
+POLYGON ((2167823.295925242360681 11016748.331293642520905,2166215.174561240244657 11017645.34825349971652,2166740.936516256537288 11020425.98113190382719,2173203.70087375305593 11031115.158373242244124,2175275.57923639845103 11033812.587534854188561,2203909.289977733511478 11068894.34828451089561,2205733.593792852479964 11068894.34828451089561,2207867.477111868560314 11068258.705872064456344,2209196.96579041518271 11067265.491391705349088,2211330.40383146610111 11064827.980711685493588,2215010.514877601526678 11059677.990901311859488,2214979.456739669200033 11057872.940046925097704,2214515.365782552398741 11056157.384120341390371,2203167.011613123584539 11027520.682997832074761,2202270.555753767024726 11025901.719451291486621,2201064.520390511024743 11024826.0741,2196054.920665831305087 11024105.622814757749438,2178212.855320467613637 11020603.403839679434896,2167823.295925242360681 11016748.331293642520905))
+POLYGON ((2414983.289665766991675 11044527.733724154531956,2413561.183170882519335 11045245.489342330023646,2412540.717398781795055 11046418.451683597639203,2412076.626441664993763 11047948.213346313685179,2412138.631398035679013 11049844.752677660435438,2412818.904806272126734 11051197.058171024546027,2415571.056577156763524 11052727.896933808922768,2417549.871845496352762 11052366.178754663094878,2419127.046391057316214 11051375.286542983725667,2419590.803389700595289 11049844.752677660435438,2419498.185573362279683 11048042.313862167298794,2419003.036478313151747 11046329.564145602285862,2414983.289665766991675 11044527.733724154531956))
+POLYGON ((2130098.233690307941288 11000528.151603981852531,2128304.988013118039817 11000528.151603981852531,2126171.104694102425128 11001152.652715280652046,2125088.633965628221631 11002318.025979872792959,2122367.540332679171115 11010289.882141789421439,2122089.352925185579807 11011900.287918247282505,2119708.340336608700454 11015939.922331815585494,2118656.927746067289263 11017196.663461849093437,2110091.672165961004794 11026622.361268861219287,2107432.583489382173866 11028690.58789948374033,2102608.553355855401605 11031298.03948331810534,2098248.614179444964975 11033995.217471780255437,2089404.948552862973884 11039571.031724197790027,2088075.348554827971384 11040654.200983604416251,2085910.407097882824019 11042993.878651849925518,2085106.56905486411415 11044344.820337908342481,2084024.098326390143484 11047319.395787136629224,2084024.098326390143484 11049210.89132734015584,2084457.242465065792203 11050924.69270221889019,2096764.057450224878266 11070702.658246321603656,2098990.558585581369698 11073147.165272122249007,2101371.571174161043018 11075314.320143092423677,2109102.264531789813191 11077760.489100936800241,2116183.297341149765998 11077581.566613329574466,2121130.892109455540776 11075314.320143092423677,2127439.14501372911036 11088271.742502968758345,2132139.165234511718154 11095801.760305196046829,2133066.567912312224507 11096709.284074548631907,2139467.772591397631913 11100156.169976592063904,2140828.319407873786986 11099068.368028789758682,2148651.630581840872765 11088271.742502968758345,2147507.26621648715809 11084009.439516926184297,2147229.078808994032443 11082018.867439804598689,2147754.840764010325074 11078665.602824464440346,2148527.620669099502265 11077218.521636426448822,2152269.291393640916795 11072148.350616896525025,2155485.088843677192926 11068531.767694959416986,2158948.572160727810115 11065096.025007931515574,2160556.248246765229851 11064192.718963978812099,2162226.485886629205197 11064465.617264343425632,2161978.911339103244245 11066183.274365888908505,2160927.498748561367393 11069167.761179273948073,2160958.445567002519965 11071065.029237864539027,2161236.632974492851645 11073052.716120049357414,2162133.422792326193303 11074682.962650928646326,2165102.202292290050536 11078939.083689145743847,2169276.460558056365699 11084283.135838197544217,2170637.118694023694843 11085099.723361730575562,2172152.176963720005006 11085642.320672811940312,2173821.969325616490096 11085821.455830369144678,2175986.799463076051325 11085278.844194751232862,2177594.586868601385504 11084372.848000200465322,2187644.287858436815441 11075314.320143092423677,2188695.700448978226632 11074051.663887793198228,2190551.062402032781392 11071517.287561716511846,2191849.604262135457247 11068621.271874828264117,2192097.178809658624232 11066997.361413447186351,2191509.523217762820423 11063021.560135906562209,2190922.201584334950894 11060853.449467837810516,2171781.037781415041536 11036965.586173495277762,2160834.88093222072348 11015398.022430939599872,2159041.189977068919688 11012890.279838532209396,2153970.030573980882764 11009211.865811217576265,2147105.514174215029925 11005540.278799168765545,2135076.886596546042711 11001329.572903431952,2130098.233690307941288 11000528.151603981852531))
+POLYGON ((2323484.790805689059198 11047770.074906332418323,2319805.23635700950399 11047859.305781176313758,2318104.497176669538021 11048398.934204442426562,2315754.431406533811241 11050657.207333395257592,2315136.162954667583108 11051736.9519351311028,2312415.069321715738624 11059226.520680380985141,2310961.459410936571658 11063830.389426024630666,2310744.831681854557246 11065458.422110926359892,2310775.889819784089923 11067354.978875301778316,2311115.970864159520715 11069346.461987087503076,2312940.274679278489202 11075766.535912223160267,2314331.879633684176952 11079750.138235753402114,2315228.780771008692682 11081381.668554494157434,2316311.140179988462478 11082650.581691399216652,2317826.309769176412374 11083103.612787237390876,2319681.671722227707505 11083103.612787237390876,2325749.919804350938648 11078752.633084027096629,2331864.810753116384149 11069314.2369035333395,2342548.810201493091881 11070493.969985710456967,2348624.516689497511834 11071785.59615895524621,2349119.220506584271789 11070250.454199543222785,2332452.132386541459709 11051013.640414355322719,2329731.372712062671781 11049483.188057506456971,2325154.47184809949249 11047948.213346313685179,2323484.790805689059198 11047770.074906332418323))
+POLYGON ((2220174.180777539033443 11070250.454199543222785,2217020.38828387344256 11071333.319956647232175,2215659.730147908907384 11072421.568974221125245,2215165.026330821681768 11073957.202147476375103,2216215.993643401190639 11075224.7276556994766,2221411.16295923339203 11075677.263265201821923,2223544.71231977827847 11075135.136351034045219,2225152.833683777600527 11074230.493334628641605,2225956.671726795844734 11072873.917703915387392,2221843.973139438312501 11070523.596165446564555,2220174.180777539033443 11070250.454199543222785))
+POLYGON ((2336101.185294744558632 11074861.808733452111483,2334122.258706914260983 11075224.7276556994766,2332545.084161356091499 11076129.50322019867599,2332359.514570203609765 11077128.904007134959102,2332699.706934067420661 11079118.367948312312365,2339038.906656778883189 11089083.586947536095977,2340894.157290342263877 11089083.586947536095977,2342192.810469936113805 11087997.558844974264503,2343182.218104107305408 11084915.387186497449875,2343398.734513698145747 11083282.680934248492122,2343306.228016848210245 11081381.668554494157434,2342687.514287020079792 11079297.330959878861904,2341790.61314969882369 11077670.864314381033182,2340554.076245966833085 11076671.383718084543943,2337801.924475084990263 11075135.136351034045219,2336101.185294744558632 11074861.808733452111483))
+POLYGON ((2082633.049969437764958 11065547.885773820802569,2080746.741197945084423 11066272.747582886368036,2079942.791835435433313 11067628.004343258216977,2079540.705834689317271 11069798.280279,2077097.688289741752669 11083013.917404340580106,2082818.619560590246692 11109702.433298649266362,2083282.265239742118865 11111431.582163920626044,2084797.4348289296031 11111976.289867686107755,2086529.120827710954472 11111521.654080778360367,2087611.14627821999602 11110337.058319140225649,2091136.634551644325256 11105062.437369156628847,2092497.181368120247498 11102156.977794358506799,2108019.905122807249427 11107974.052547382190824,2108916.694940637331456 11107065.020492637529969,2114853.80866260593757 11097706.491047212854028,2115379.45929813105613 11096160.57226082496345,2115100.937932166736573 11094166.432520046830177,2114390.051663959864527 11092262.368706030771136,2111792.411346298176795 11087365.020243894308805,2110431.864529824815691 11086638.228518651798368,2108762.183487417176366 11086364.110861966386437,2104927.560988058336079 11086638.228518651798368,2101711.652218533679843 11085821.455830369144678,2097166.254770462401211 11084188.531570460647345,2095991.166225647320971 11083103.612787237390876,2092033.090411 11077397.434552414342761,2091167.247411611722782 11075861.022839736193419,2089745.029597238637507 11072058.799913326278329,2088879.18659784947522 11070429.183515792712569,2086838.255053642438725 11067717.496606355533004,2085632.331009880639613 11066635.207517145201564,2082633.049969437764958 11065547.885773820802569))
+POLYGON ((2325865.803394268732518 11093348.753099417313933,2322742.957719043828547 11093802.499105244874954,2318722.765628535766155 11098434.796430012211204,2317949.874403958208859 11099796.819650748744607,2317176.649220907129347 11101248.724964952096343,2316960.466769787017256 11102885.761196170002222,2317084.031404568813741 11106610.386499928310513,2317424.22376842983067 11108608.515851428732276,2318661.205950126983225 11112885.980487633496523,2320176.37553931446746 11116616.103343054652214,2321103.778217112179846 11118256.853560473769903,2322278.755442435853183 11117436.59273830242455,2323052.091944975778461 11116071.022845691069961,2323546.795762062538415 11114525.828334519639611,2326113.377941791899502 11110522.086598159745336,2328215.869164404459298 11108063.75118712708354,2329545.803120910190046 11106975.007743395864964,2330566.268893013708293 11105791.533032774925232,2331339.160117591265589 11104338.327914,2331555.676527184899896 11102700.941118441522121,2330782.451344133820385 11100794.807660581544042,2329545.803120910190046 11096524.632202154025435,2328772.577937861904502 11094619.906498856842518,2325865.803394268732518 11093348.753099417313933))
+POLYGON ((2179820.976684466935694 11100704.878082199022174,2174286.060282736085355 11100794.807660581544042,2170946.252919955644757 11102067.357235105708241,2155609.098756421357393 11108883.2065,2154526.739347438327968 11110067.220816167071462,2154000.977392422035336 11111611.399653173983097,2154310.111618353519589 11113615.917732389643788,2155021.443164522759616 11115525.986158678308129,2155763.721529132686555 11117436.59273830242455,2158825.007525948807597 11124728.65605934523046,2159690.850525338202715 11126366.118689075112343,2161082.010201781522483 11127097.508574351668358,2163092.328886018134654 11126822.07915398851037,2164421.928884053137153 11125820.253870256245136,2181274.141317283734679 11111431.582163920626044,2182325.553907825611532 11110157.274614440277219,2183129.3919508443214 11108793.169573271647096,2183655.153905860614032 11107339.648589830845594,2183902.728453383781016 11105611.542526669800282,2183593.594227452296764 11103609.715589042752981,2182696.693090130575001 11101977.410784097388387,2179820.976684466935694 11100704.878082199022174))
+POLYGON ((2294232.811612487770617 11082471.5302241332829,2289037.642296656034887 11093622.826431185007095,2285048.842302550561726 11088450.94709544070065,2283811.860120856203139 11087454.773163268342614,2281987.556305737234652 11087454.773163268342614,2278431.566491836681962 11087997.558844974264503,2276545.257720344234258 11088724.822638770565391,2274937.136356344912201 11089631.400169784203172,2273638.483176751062274 11090717.689852258190513,2270731.819952646270394 11094530.385459089651704,2269742.300998986698687 11097616.929267302155495,2269278.655319832265377 11100974.343366708606482,2269340.214998240582645 11102790.897164396941662,2271040.954178580548614 11116526.291515087708831,2271690.614726849831641 11120533.580797277390957,2273514.918541969265789 11127007.229522090405226,2274256.751628617290407 11128921.074505081400275,2288079.181480925995857 11142528.58509,2290707.323339063674212 11144356.636617459356785,2302612.38628195039928 11145908.646066572517157,2306137.874555374495685 11146089.380343526601791,2310157.621367920655757 11145360.876168923452497,2311765.297453954815865 11144446.817896716296673,2313095.342729954980314 11143442.713763017207384,2316249.13522361824289 11139692.543561415746808,2317300.659133650828153 11138412.913829166442156,2318073.439038737211376 11137043.441592760384083,2319062.957992399577051 11133938.575800597667694,2319001.398313991259784 11132113.659906422719359,2314857.641588703729212 11088177.082606829702854,2313651.60622544772923 11087091.199582692235708,2308580.446822359692305 11086458.745467964559793,2298809.267198488581926 11083919.732159499078989,2294232.811612487770617 11082471.5302241332829))
+POLYGON ((926116.15844366454985 9264013.449728954583406,924724.776128238532692 9264153.198622258380055,921199.510493796784431 9267568.741824625059962,920612.077540880534798 9268685.360105672851205,921044.999040576629341 9270011.069724455475807,922158.19394850928802 9270637.603678392246366,926827.37867034226656 9272660.969402087852359,929331.955893700942397 9273498.513806719332933,930754.618986038956791 9273707.538461375981569,935114.446842957870103 9274196.459050375968218,941144.289700755500235 9275452.078649202361703,949431.580512353684753 9278875.062662964686751,950513.717282354016788 9279502.377750024199486,965572.684038394829258 9288309.232941456139088,966840.501719038933516 9291106.238900659605861,965603.742176327155903 9290687.423736309632659,965510.901721006724983 9291805.662334172055125,966098.445993411354721 9292576.442668590694666,971757.149668906698935 9299227.263533426448703,972715.721804127912037 9299996.579483827576041,978127.073571079876274 9301957.438320659101009,979364.055752774118446 9302378.935977151617408,980539.032978097675368 9301747.581662598997355,982672.693658130941913 9281179.177157256752253,982703.529157080803998 9279642.431197402998805,982579.964522301685065 9278246.043123302981257,982147.043022605706938 9277198.80624471232295,981497.71643280738499 9276080.851177964359522,979951.600025181542151 9274127.364945009350777,978992.916570469038561 9273358.832484602928162,976797.473573044757359 9272172.405496282503009,974292.896349686081521 9271335.017171649262309,963655.651087443577126 9268825.200774434953928,943339.732698179781437 9264501.453764460980892,941793.838929536403157 9264780.973461419343948,941577.211200451594777 9266174.72113549336791,941051.449245435069315 9268336.90016183257103,931712.968482277705334 9266871.697345668449998,930476.208939565927722 9266454.3065619263798,928311.824080071179196 9265269.281068107113242,926116.15844366454985 9264013.449728954583406))
+POLYGON ((1228379.522765841567889 9285023.627658732235432,1226988.029130927054211 9285232.739617105573416,1226431.431676960783079 9286350.372390126809478,1226091.350632588146254 9287610.153319535776973,1226091.350632588146254 9289148.622065303847194,1226462.489814890315756 9290687.423736309632659,1226988.029130927054211 9292015.225710006430745,1227637.467040213989094 9293204.715639868751168,1230606.02390119805932 9298596.189079638570547,1231719.218809130834416 9299155.908718474209309,1240933.912298526614904 9301328.139146316796541,1247582.246247172821313 9302729.067936910316348,1249313.70960697135888 9302519.440750708803535,1249870.418380429036915 9301397.498046774417162,1250055.876652090344578 9299927.486414980143309,1249530.33733605640009 9298596.189079638570547,1248602.71201927610673 9298246.260632261633873,1247180.048926938092336 9298036.51350867934525,1241057.699572288198397 9296705.822279341518879,1237161.294755541253835 9293766.026500685140491,1232306.76308153825812 9289988.110284514725208,1231502.702399539994076 9289008.381295373663306,1228379.522765841567889 9285023.627658732235432))
+POLYGON ((1271052.068449590820819 9470632.740627013146877,1269846.033086337614805 9472209.640723349526525,1255992.87905456754379 9480323.681740842759609,1254632.443557582562789 9480828.871476575732231,1252993.598014124669135 9480900.009645165875554,1250395.957696462981403 9480110.545446189120412,1248076.9500642567873 9478962.203233003616333,1246623.562792460201308 9478816.087483955547214,1245232.069157545920461 9478962.203233003616333,1244056.980612731073052 9479680.41252807714045,1229461.770855335984379 9502203.554100498557091,1228905.284720858093351 9503355.940791863948107,1228719.715129708405584 9504868.522913251072168,1228750.661948146531358 9508041.8975815102458,1228812.444265537662432 9511287.884461160749197,1229338.206220553955063 9512659.507271992042661,1232739.684581234352663 9516558.356424037367105,1234192.84921404835768 9516776.495667450129986,1252344.271424329141155 9503645.040054131299257,1274484.493628712138161 9484350.682641576975584,1275040.979763187235221 9483201.651152085512877,1275009.921625254908577 9481547.270540598779917,1271052.068449590820819 9470632.740627013146877))
+POLYGON ((1259116.170007754350081 9502924.13054533675313,1259147.005506704095751 9504508.256043568253517,1258775.977643890306354 9505878.562127290293574,1253766.600558193400502 9513167.015501081943512,1252776.970285039860755 9514031.656567430123687,1250488.79815178620629 9512877.785909235477448,1249004.575381039874628 9512730.966796956956387,1247242.053883308777586 9512948.987781872972846,1244273.608341815881431 9513817.500550236552954,1244118.762930121971294 9515332.586069025099277,1246036.129839543951675 9521904.05938340164721,1246530.833656630944461 9522988.102922696620226,1248850.06392781669274 9524147.532052246853709,1252808.0284229721874 9525231.920336943119764,1255590.90437331260182 9525736.428529826924205,1257353.425871043698862 9525521.91702613979578,1261311.613005181308836 9522483.791189001873136,1262826.782594365999103 9520459.1004245467484,1263414.215547282248735 9519304.178552623838186,1263630.620637384708971 9516776.495667450129986,1262702.995320604648441 9509702.237167282029986,1262362.802956740604714 9508473.761261345818639,1260724.068732773885131 9504365.763630280271173,1260012.848506093258038 9502995.491595136001706,1259116.170007754350081 9502924.13054533675313))
+POLYGON ((1238862.033935881452635 9563587.205652138218284,1231502.702399539994076 9568533.369706314057112,1219102.82432007510215 9574138.556955654174089,1214062.723054919624701 9570208.012987587600946,1212918.470009054522961 9569624.344271223992109,1206641.275242713512853 9567294.342727608978748,1205033.376517696771771 9567658.092799441888928,1205002.318379764445126 9568968.953458333387971,1206857.902971798321232 9570715.749784510582685,1214433.639598242240027 9577631.214355556294322,1236326.509894084418193 9595285.1112947370857,1237408.869303067214787 9595136.565828956663609,1253952.170149345882237 9580400.9287926312536,1254106.792922057211399 9578943.932152401655912,1253642.81328443181701 9578071.557354055345058,1249128.140015818877146 9571371.303108425810933,1248293.355154359247535 9570423.888351650908589,1245232.069157545920461 9567877.818462470546365,1240191.856572899036109 9564022.483761169016361,1238862.033935881452635 9563587.205652138218284))
+POLYGON ((1195540.272981827845797 9568825.152838202193379,1194612.647665047785267 9571663.203790688887239,1194488.860391283407807 9573482.746107032522559,1196004.252619453473017 9581494.005290567874908,1196375.169162776088342 9583099.818222595378757,1197055.442571015562862 9584265.239410664886236,1199776.647523456253111 9587037.564404597505927,1201075.412022541277111 9587474.293928675353527,1202126.601974100572988 9586965.610365051776171,1209702.561239529633895 9589297.925777228549123,1221205.538181670242921 9595357.150401378050447,1224545.234224959509447 9597255.146850727498531,1226369.649359569884837 9598719.883201979100704,1227235.381039470667019 9599739.513294732198119,1227441.544736419105902 9601397.648259464651346,1227173.598722079768777 9603542.068037442862988,1227853.872130316216499 9604710.878178231418133,1229183.472128351451829 9605152.918000280857086,1230636.748080656863749 9604931.762981111183763,1234842.287123338086531 9603686.57931637018919,1236048.322486591059715 9602955.630129244178534,1236821.21371116861701 9601935.534104144200683,1237408.869303067214787 9600763.237894419580698,1236852.160529609769583 9599374.102558823302388,1203981.96392715210095 9572535.047397734597325,1198199.695616877637804 9569624.344271223992109,1195540.272981827845797 9568825.152838202193379))
+POLYGON ((1289327.055294650606811 9618692.409269304946065,1287749.880749092437327 9619135.328297652304173,1283977.485845089657232 9621256.925141338258982,1283668.128980175592005 9624410.555937642231584,1283884.756709257606417 9625876.995389822870493,1284657.759253326337785 9630354.775014474987984,1287719.156569633632898 9632701.78193099796772,1296037.171560687711462 9638358.588622152805328,1296779.227286315290257 9638580.532500008121133,1309519.186410152819008 9638875.234006671234965,1310539.652182253310457 9638358.588622152805328,1310044.725726186763495 9637329.379092229530215,1307911.176365641877055 9633803.012460554018617,1304200.452459538821131 9631016.170617243275046,1302005.009462114656344 9629621.050116194412112,1299654.943691978929564 9628520.474195433780551,1295387.622331909602508 9625586.798825362697244,1289327.055294650606811 9618692.409269304946065))
+POLYGON ((1324763.722757346229628 9763653.757693560793996,1325072.85698327771388 9767167.861770948395133,1324269.018940259236842 9768216.292962547391653,1320589.130533105926588 9771362.528568848967552,1314559.287675308529288 9771062.209995137527585,1313508.097723746439442 9770313.626309633255005,1312611.307905916124582 9769264.881124824285507,1311157.92063411953859 9769491.004367087036371,1309921.049771916354075 9770239.500122345983982,1309148.047227847855538 9771284.347448851913214,1308962.477636695140973 9772785.847119115293026,1310199.45981838949956 9777655.196084225550294,1311188.867452560458332 9780727.389861831441522,1312735.095179677708074 9785230.833835879340768,1313879.014267071848735 9788079.622950388118625,1315208.836904086405411 9790706.810328414663672,1316971.358401817502454 9792736.528226103633642,1324083.449349109549075 9796418.127398708835244,1325598.507618805859238 9796566.935994632542133,1335122.557973112910986 9794841.221291676163673,1335926.507335622794926 9793788.795638898387551,1336668.785700232721865 9791082.319189136847854,1336823.297153452876955 9789506.61473711207509,1336421.433791689341888 9787931.264932019636035,1332957.950474638491869 9775481.481394587084651,1324763.722757346229628 9763653.757693560793996))
+POLYGON ((2218844.580779504030943 11085821.455830369144678,2216958.383327502757311 11086638.228518651798368,2207929.03679027967155 11089083.586947536095977,2204403.993794817477465 11088814.593547947704792,2202394.120388546027243 11089083.586947536095977,2200785.999024546705186 11089995.109898827970028,2199209.269756950438023 11092715.715425936505198,2198683.507801934145391 11094255.948757287114859,2198435.933254410978407 11095981.163910726085305,2198219.750803288072348 11099522.49677399918437,2198312.368619629181921 11105062.437369156628847,2198343.426757561508566 11106884.996188746765256,2198652.560983492992818 11108883.2065,2198683.507801934145391 11110701.87997405230999,2198435.933254410978407 11112431.283714758232236,2193766.971171557437629 11126185.909508755430579,2190860.196627964265645 11131842.954415773972869,2188448.125901455059648 11135949.706568630412221,2186314.687860401812941 11138322.812795203179121,2184954.141043925657868 11139421.535246418789029,2178460.429867993574589 11142985.634015236049891,2175770.283053482417017 11145084.70368742197752,2174718.759143449366093 11148194.351355511695147,2174749.81728137889877 11150023.931957669556141,2179635.407093314453959 11156158.524326516315341,2180841.442456570453942 11157255.525830212980509,2190056.358584945555776 11163029.333109242841601,2191138.384035457856953 11161745.289599666371942,2202765.259570850990713 11137228.871337478980422,2203291.021525867283344 11135673.917271206155419,2203754.667205022182316 11132299.283389499410987,2209289.583606753032655 11125274.432996194809675,2224658.129866690374911 11115070.7846386320889,2234058.170308256521821 11109517.7548194732517,2239716.985303243156523 11107244.722245058044791,2238944.205398156773299 11102885.761196170002222,2227997.491951508913189 11088904.039198763668537,2225090.82872740412131 11087633.956178830936551,2218844.580779504030943 11085821.455830369144678))
+POLYGON ((2130809.565236476715654 11107699.398761540651321,2119615.833839759230614 11119988.185319041833282,2118811.439199287444353 11121354.216363802552223,2119522.770745456218719 11123266.466081321239471,2130129.291828240267932 11149295.004741368815303,2137581.463819905184209 11152954.595525471493602,2139436.714453465305269 11152954.595525471493602,2141075.448677431792021 11152039.512536257505417,2142683.68136092228815 11149295.004741368815303,2144105.787855807226151 11126917.279952876269817,2143796.653629875276238 11124908.826510289683938,2141539.650954039767385 11114340.690789131447673,2140982.942180585116148 11112251.116913797333837,2139931.418270552065223 11110886.918206710368395,2138725.494226787704974 11109792.482253275811672,2135695.155048412270844 11108703.461286161094904,2130809.565236476715654 11107699.398761540651321))
+POLYGON ((2557688.75429075025022 11149199.489135853946209,2551690.080890373792499 11150481.157228203490376,2545845.584984745830297 11151396.029794635251164,2542722.294031556230038 11150481.157228203490376,2537589.574950062669814 11150023.931957669556141,2535734.324316502548754 11150114.188681164756417,2520149.150327480398118 11154599.221601387485862,2512851.601108526811004 11156893.136287726461887,2501194.11271316325292 11162661.684378355741501,2497761.687534044962376 11164404.067286694422364,2495690.254449364729226 11166973.406009458005428,2490495.085133532527834 11176887.134344639256597,2490062.274953328073025 11178451.57600249350071,2491268.310316581279039 11182308.988676983863115,2501596.198713909368962 11191875.967741213738918,2503172.927981505636126 11192341.330143973231316,2522994.365192664787173 11197314.816141977906227,2524849.615826225373894 11197127.402784094214439,2525591.560232361778617 11195746.011261984705925,2526210.273962189909071 11192432.152462402358651,2526735.924597717821598 11187275.10921429656446,2541949.514126470312476 11177714.622737934812903,2548257.655711252242327 11174500.816554317250848,2549989.341710033360869 11174682.315137200057507,2554565.797296037431806 11173396.061224680393934,2561863.457834478933364 11158538.718679053708911,2562728.8555559059605 11155423.992,2562883.923606582451612 11153683.916511088609695,2562481.726286345161498 11151672.459594612941146,2561368.308739429805428 11150390.566197425127029,2557688.75429075025022 11149199.489135853946209))
+POLYGON ((2421229.537613669876009 11153960.439657110720873,2419219.664207395166159 11154327.616553461179137,2417209.790801123715937 11157074.163763903081417,2415323.482029630802572 11163306.2379,2414643.20862139435485 11166515.066530585289001,2413870.317396816797554 11173396.061224680393934,2414117.446666378062218 11178911.054681373760104,2415385.486986004281789 11194182.543123573064804,2416343.947801734320819 11195746.011261984705925,2417890.064209360163659 11196206.333237254992127,2419621.750208141282201 11195746.011261984705925,2420951.350206176750362 11194642.758817162364721,2430320.889107263181359 11184975.851598598062992,2431372.301697807852179 11183687.97262305021286,2431742.99560214811936 11180289.016016928479075,2431372.301697807852179 11178265.014723669737577,2430073.314559740014374 11173950.730337522923946,2424538.398158009164035 11157899.565265396609902,2423734.560114990454167 11156068.187062069773674,2421229.537613669876009 11153960.439657110720873))
+POLYGON ((2577757.20945197949186 11158629.088887196034193,2573737.462639436125755 11160098.928347960114479,2570583.224867808166891 11162112.558615727350116,2569562.759095704648644 11163396.67173870652914,2543773.817941592074931 11202104.738864352926612,2548783.417666271794587 11216225.433375388383865,2549927.336753659881651 11217519.849900173023343,2580230.839856897015125 11248364.567414542660117,2581498.880176523700356 11249389.701790118589997,2583106.556262560654432 11249854.021459540352225,2585271.386400017887354 11249201.175039598718286,2586570.039579611737281 11247997.602390894666314,2588610.859804324340075 11245397.333230540156364,2589353.138168934732676 11244005.721097776666284,2605618.140288231428713 11251894.530937012284994,2604968.813698432873935 11267423.962013417854905,2603515.203787653706968 11270314.032625757157803,2603360.692334433551878 11272084.689499199390411,2603638.768422435969114 11273666.264687933027744,2605247.001105926465243 11274131.918714497238398,2612482.545368506107479 11274131.918714497238398,2614647.486825454048812 11273481.756473870947957,2620305.967861967161298 11270871.672449627891183,2626242.970264444127679 11261192.774261737242341,2626676.114403119776398 11259517.028627341613173,2633045.815666310489178 11233901.906000701710582,2633757.147212482523173 11220942.546884968876839,2633478.959804988931865 11217154.553857503458858,2632025.461213701404631 11212901.869692269712687,2620429.532496746163815 11196667.018187534064054,2598784.236748429946601 11170002.594355851411819,2586013.330806154292077 11159912.541912944987416,2584591.112991778180003 11159182.880099181085825,2577757.20945197949186 11158629.088887196034193))
+POLYGON ((2467272.614839655347168 11221313.373644189909101,2465664.493475656025112 11221587.678683381527662,2464644.027703555300832 11222791.556534377858043,2464458.903390365187079 11224549.816020270809531,2464427.845252435654402 11226028.706076376140118,2466314.154023925308138 11237607.522572563961148,2466963.480613723862916 11239736.133937019854784,2467798.3767946716398 11241590.286944825202227,2474168.07805786235258 11246788.89755491912365,2477105.799419899471104 11251618.994447479024529,2478021.179592692293227 11263758.256227698177099,2478522.005981768947095 11264875.181294422596693,2478837.485418677795678 11265935.995392948389053,2474755.84496925259009 11266608.220846213400364,2473698.198487224057317 11266493.274270087480545,2464885.479679086245596 11264483.868015471845865,2459696.878213211428374 11266585.432448433712125,2458428.837893584743142 11265562.714602103456855,2450667.531675986014307 11268354.777869578450918,2443617.000407105311751 11280564.78123970888555,2443431.430815952830017 11282338.125138709321618,2443802.68131774617359 11284393.838180530816317,2444637.46617920557037 11286260.277625450864434,2446523.774950698483735 11286162.809446116909385,2465516.104594428092241 11284557.811490485444665,2467223.188985743094236 11282151.028842056170106,2468447.592064979020506 11281927.998011570423841,2472436.392059084028006 11282319.986312367022038,2479356.902162719517946 11284614.2622388638556,2491113.353585398755968 11292145.253786375746131,2490557.090089903213084 11297377.506708426401019,2491360.928132921922952 11301401.032648101449013,2492195.712994381785393 11303364.836189908906817,2493463.753314005210996 11304393.2897,2507007.550480861216784 11304485.629033412784338,2508460.715113675687462 11304485.629033412784338,2510347.023885168135166 11303647.544213494285941,2517799.195876833051443 11298220.201370380818844,2522066.5172369023785 11294948.319583809003234,2522654.172828800976276 11293731.52982347086072,2522963.307054732460529 11292514.622673694044352,2522252.086828054860234 11291021.124055407941341,2517118.92246859613806 11286911.670021733269095,2515139.995880763046443 11283645.256466927006841,2515016.431245983578265 11281779.538796940818429,2515480.188244629651308 11280190.69196479767561,2516500.654016730375588 11278884.228356581181288,2518541.474241442978382 11278515.603494280949235,2527817.950048226863146 11278884.228356581181288,2538671.600400571711361 11280472.76813398860395,2540248.774946129880846 11280938.891216207295656,2541238.182580301072448 11282522.539302673190832,2538022.273810773622245 11297377.506708426401019,2537249.493905687239021 11298780.14809775352478,2533878.517085486091673 11302521.499803146347404,2530601.159957041032612 11308137.751301895827055,2529827.823454501572996 11309547.687060423195362,2528931.367595142219216 11312728.794911148026586,2528745.798003989737481 11314510.26222413033247,2529457.129550158511847 11315262.270829161629081,2536259.529674062971026 11319105.639590360224247,2545257.929392847232521 11310201.328004954382777,2548752.359528339467943 11298497.643619289621711,2548906.982301050797105 11296725.441562809050083,2554225.716251662001014 11289245.50109894387424,2556297.149336345028132 11286629.661170732229948,2558183.458107837475836 11286537.229363702237606,2559482.445245902054012 11287563.125195924192667,2572191.346231807488948 11311982.128941813483834,2578159.406772216781974 11330375.530320858582854,2591826.76857385225594 11324740.769780449569225,2593589.512710562907159 11324173.597674366086721,2598227.527974975295365 11328682.54542119987309,2599093.370974364224821 11330561.26018781401217,2598660.672113650944084 11332161.658065838739276,2597640.206341547425836 11333478.464218402281404,2596279.659525074064732 11338272.710543941706419,2596125.036752362735569 11340061.267117250710726,2595320.753431379329413 11352494.996962506324053,2595753.8975700577721 11354566.74043489806354,2597083.4975680927746 11355608.113917475566268,2598536.662200906779617 11355608.113917475566268,2600021.218930124305189 11354851.939241368323565,2601319.760790229775012 11353722.418886246159673,2602371.284700262825936 11352401.659568784758449,2609452.317509622313082 11338365.852839905768633,2610627.29473494598642 11328682.54542119987309,2604875.861923621501774 11312728.794911148026586,2603422.697290804237127 11311982.128941813483834,2601938.140561587177217 11312636.005449879914522,2593836.641980123706162 11303457.498422654345632,2580478.414404420182109 11283927.140837751328945,2570243.032503944355994 11260538.49768421985209,2549092.55189220327884 11245488.870322870090604,2536321.534630435984582 11240016.193968443199992,2534435.33717843471095 11240107.992091519758105,2534002.52699823025614 11241687.114800680428743,2533816.957407077308744 11243450.291917540132999,2534218.70944934990257 11245488.870322870090604,2535054.050908262841403 11247344.600935250520706,2535332.12699626525864 11248925.748239934444427,2534311.66122416453436 11250226.436221936717629,2532116.218226737342775 11252359.022588513791561,2530508.096862738020718 11253379.745533183217049,2520365.77805656241253 11255334.665968952700496,2519067.236196459271014 11254308.630253819748759,2518974.173102156724781 11252450.988361448049545,2519190.800831238739192 11247069.583875318989158,2519716.45146676665172 11241962.247030399739742,2519314.365466020535678 11239924.73089550063014,2518170.335059138014913 11238534.243919584900141,2500853.920349299442023 11232044.523829262703657,2499276.745803741272539 11231581.75820985622704,2486938.984000141266733 11230192.984564574435353,2485207.298001360148191 11230101.320863962173462,2483475.945961052551866 11230564.318586461246014,2482146.012004543561488 11231678.109537653625011,2481404.178917898330837 11233158.891947662457824,2476858.670150338672101 11235474.576917251572013,2467272.614839655347168 11221313.373644189909101))
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/data/uk.wkt b/src/boost/libs/geometry/test/algorithms/buffer/data/uk.wkt
new file mode 100644
index 000000000..6aef5f452
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/data/uk.wkt
@@ -0,0 +1,48 @@
+POLYGON ((-702580.609678269247524 6430990.768781933002174,-703230.047587556065992 6431039.689706697128713,-703260.883086505928077 6431616.044759067706764,-702209.581815455458127 6433969.24533439334482,-701931.283088470925577 6434497.034421884454787,-701467.526089824968949 6434786.018295114859939,-700756.194543655961752 6434833.57794185820967,-699921.298362707952037 6434065.56607898324728,-699643.11095521459356 6433585.356836878694594,-699086.513501248206012 6432576.264011836610734,-698993.673045927775092 6432239.811620931141078,-699797.622408437659033 6431375.920790256001055,-700292.326225521741435 6431087.055115864612162,-702580.609678269247524 6430990.768781933002174))
+POLYGON ((-735358.077144894748926 7178577.384160616435111,-735605.429053435451351 7178156.504514626227319,-736935.140370961744338 7177207.711922005750239,-737491.626505436841398 7177576.599523988552392,-738326.634005878935568 7178735.125026864930987,-740893.104866117006168 7182528.682258407585323,-749705.934993749135174 7205006.614720835350454,-762724.081525077228434 7224794.096369032748044,-762600.405570804025047 7225641.074151545763016,-764765.013069281238131 7234599.530509736388922,-765445.286477517918684 7235820.532933908514678,-770021.742063518846408 7241232.352442853152752,-771103.990153013262898 7242295.362922673113644,-776391.665965692023747 7246596.846274865791202,-782050.369641187484376 7249518.358906683512032,-782668.860732035944238 7249677.338468996807933,-783287.240503390436061 7249572.308288598433137,-785730.03540935809724 7248190.211547926999629,-797140.283215669333003 7234175.642269320785999,-798779.240078618517146 7225111.440101872198284,-795377.761717938352376 7219339.847829,-795099.574310447787866 7218756.899979280307889,-794975.787036686204374 7218121.595145341940224,-795470.602173261577263 7212936.272668306715786,-810498.733430352644064 7193863.911592195741832,-811179.006838592118584 7193284.368466717191041,-814116.616881135152653 7191490.353688426315784,-816002.8143331365427 7191596.129582037217915,-841513.568079758668318 7194233.580200714059174,-847141.43625630135648 7197189.273813962936401,-848254.631164236925542 7197876.675367269665003,-848656.494526000577025 7198404.477830711752176,-848718.388162879971787 7199670.435727526433766,-848594.712208609562367 7201097.638806481845677,-848749.334981321007945 7201730.238547168672085,-849120.362844134797342 7202364.220307854004204,-856819.998063834267668 7208600.843717868439853,-857438.377835188759491 7208600.843717868439853,-862478.701739326817915 7208177.02362107951194,-870023.714186314842664 7207966.359085638076067,-870580.311640281230211 7207966.359085638076067,-874012.625499908346683 7210450.923199803568423,-875187.714044723310508 7211560.60871528275311,-875806.093816080596298 7212724.147678012028337,-875991.663407233078033 7214047.832645014859736,-876022.610225674230605 7218227.729782055132091,-876610.043178590363823 7223839.853871395811439,-876702.883633910794742 7224475.621257141232491,-876981.182360892533325 7225111.440101872198284,-879454.924085301463492 7226066.027831118553877,-884031.379671305185184 7227071.474335627630353,-893926.569207917316817 7238101.111762473359704,-895596.361569816246629 7238896.987277653068304,-896771.338795139919966 7239853.061600086279213,-897853.586884631542489 7241073.352828699164093,-907996.128329789848067 7253664.551400667987764,-908305.262555721448734 7254302.739608785137534,-909665.698052706429735 7258503.559282522648573,-895781.931160968844779 7266808.423884701915085,-885082.792261846945621 7271603.566779747605324,-872033.587592586525716 7275761.46482103690505,-862973.516875904984772 7283550.487191719934344,-865787.339644686551765 7289796.44511900562793,-873796.220409806002863 7290971.651573035866022,-874445.546999604441226 7291293.032340248115361,-880135.197493540938012 7297012.009956564754248,-880970.093674488947727 7298293.985694441013038,-882485.374583167838864 7303643.401859720237553,-882238.022674624342471 7304285.678086150437593,-873085.000183128286153 7310334.795314759016037,-871600.666092890547588 7310709.995978504419327,-871013.233139974297956 7310496.750225250609219,-870425.688867569784634 7309853.963256160728633,-861520.129604105604813 7305890.828869744203985,-840833.294671519193798 7315960.453899467363954,-832985.827168048126623 7328929.289326399564743,-830226.99622771772556 7334311.537675649859011,-828650.044321142020635 7339095.072544374503195,-824475.452096901950426 7352813.874814124777913,-815569.892833440564573 7370657.641546722501516,-807345.386214651749469 7375579.235195306129754,-807622.905705200508237 7371088.997127560898662,-807190.095524995704181 7370819.105633105151355,-789811.787178274942562 7369039.105478069745004,-787430.774589698179625 7369200.535986931994557,-786379.473318647709675 7369740.021799798123538,-785389.954364985460415 7370495.986515521071851,-784524.2226850874722 7371413.695412076078355,-782483.291140883462504 7373897.27900336496532,-781431.989869830082171 7375516.826025347225368,-778587.108963119098917 7383297.723296964541078,-775556.769784743897617 7392222.044764839112759,-766960.456066705519333 7394495.167811283841729,-759724.57784565188922 7394550.323422431945801,-749211.119857170968316 7396932.717854937538505,-736192.973325842875056 7402187.990906184539199,-725308.376155059668235 7407229.349494850263,-709816.487899322877638 7408422.401526880450547,-707249.794400102342479 7408151.405853908509016,-696303.414911925327033 7403107.887909795157611,-686655.799922836362384 7404409.001458238810301,-684553.08606124133803 7404897.267981527373195,-683749.0253792431904 7404735.094520182348788,-679481.815338665037416 7402783.423994276672602,-678894.382385748787783 7402458.973633683286607,-675338.392571848467924 7399695.354303826577961,-674688.954662558855489 7398557.071201404556632,-672091.425664388458245 7393304.252914915792644,-671658.504164695274085 7392006.556416805833578,-671627.668665745412 7391194.924285786226392,-672648.023118354729377 7381838.443037242628634,-673421.136981914751232 7378811.975986515171826,-671936.914211168303154 7373087.534717652946711,-650600.641369295073673 7341729.426462116651237,-644694.474465764942579 7333076.617546134628356,-643643.173194714472629 7333774.499370026402175,-642931.952968036755919 7333882.213487460277975,-639746.991016950109042 7333505.897395013831556,-638571.902472135261633 7332861.213045955635607,-638077.19865505117923 7332485.139554671943188,-635696.186066474416293 7329532.480891049839556,-635417.887339489767328 7328995.578204441815615,-633717.259478640975431 7325506.417759177275002,-633191.497523624449968 7324326.005681159906089,-633021.401341693941504 7317593.093180313706398,-633005.927932471968234 7316390.143963797017932,-633129.603886742261238 7315639.40769452508539,-633469.796250609098934 7314674.033359771594405,-633779.041796031873673 7313870.417450193315744,-634119.122840404626913 7313281.743146340362728,-635758.079703353811055 7311407.230682726949453,-639258.409771858365275 7308761.115459430031478,-639592.36824423877988 7308568.547962940298021,-640019.055852448334917 7308503.78158331848681,-641985.737296294188127 7308503.78158331848681,-644075.983374919276685 7307658.20552833750844,-647477.461735596647486 7305890.828869744203985,-648065.006008004071191 7305570.388923220336437,-652610.514775566756725 7302306.041605127975345,-653569.198230279260315 7301449.388351605273783,-654342.2007743450813 7300487.11356435995549,-655486.342500718892552 7298990.305958847515285,-655826.42354509443976 7298348.464695187285542,-659444.306995874154381 7291133.013455408625305,-659567.982950147357769 7290330.468121011741459,-657712.732316584209912 7285525.380799518898129,-657310.757635332178324 7285044.534679209813476,-656599.537408651551232 7284830.450430164113641,-655362.55522695730906 7285258.624785932712257,-654898.798228314262815 7285685.285017566755414,-654558.605864447541535 7286271.692514781840146,-653971.061592042911798 7288408.578886755742133,-651868.45904993917793 7291827.15753585472703,-647477.461735596647486 7295299.956990664824843,-645993.238964850082994 7296423.257006233558059,-639042.004681756021455 7298690.555295042693615,-638763.594635282992385 7298819.155970427207649,-638318.427991599426605 7298883.072063163854182,-626636.115349790081382 7299899.446665154770017,-623296.419306500814855 7299845.149397530592978,-620822.677582092001103 7299632.199924216605723,-620235.133309687371366 7299310.476234449073672,-616586.303040463710204 7295087.131279540248215,-616184.328359208768234 7294605.504606320522726,-615967.923269106424414 7293964.023176178336143,-615349.543497751932591 7290384.699359583668411,-609969.027229749946855 7272402.850899826735258,-605052.379279882181436 7263400.942685867659748,-604526.728644356946461 7262975.494991698302329,-604433.99950852477923 7262282.371353711932898,-605052.379279882181436 7257865.603547422215343,-605176.055234152474441 7257067.992521191947162,-607928.20700503711123 7243515.842901426367462,-612356.273709810222499 7239513.531062413938344,-612690.232182190637104 7239353.802024363540113,-613153.989180836477317 7239322.468001203611493,-613821.906125594396144 7239736.507536829449236,-614230.114698332850821 7240372.799149225465953,-617291.400695149088278 7246553.817851796746254,-617421.310540905804373 7246936.109753286466002,-617476.970286301686428 7247351.125055524520576,-617514.039676735061221 7248306.891271497122943,-617347.060440544853918 7249136.706325385719538,-617198.560239828657359 7249550.498919304460287,-617031.692323126830161 7249900.795335852541029,-615844.247314836131409 7251400.684768149629235,-617359.416904023615643 7254250.289068546146154,-616895.548585889395326 7255631.92278547026217,-616771.872631616191939 7256376.922925828024745,-617112.064995480119251 7261006.27972043864429,-617823.173902669572271 7265263.98572336230427,-618039.690312260296196 7265903.119205271825194,-618905.533311652368866 7268460.174703576602042,-619121.938401754712686 7269045.485060340724885,-619833.158628432429396 7270110.739406228065491,-623358.312943383003585 7273468.562051032669842,-627780.145756672602147 7276775.031683855690062,-629975.588754096766934 7278160.643995403312147,-632356.601342676440254 7279441.070262845605612,-633717.259478640975431 7279867.605481947772205,-634366.474748948123306 7279655.007129641249776,-634582.991158541757613 7278960.597823172807693,-635046.748157184803858 7271869.857851793058217,-631830.950707148294896 7269844.31633363571018,-631336.246890064212494 7269578.094122973270714,-628400.863237337209284 7264020.949493289925158,-620421.148178801988252 7241887.68653959594667,-619846.071689364616759 7239944.968565747141838,-619066.835253812256269 7235710.531812792643905,-619252.293525473563932 7235360.104490867815912,-618843.639674770180136 7225430.131716476753354,-619183.720719142816961 7223946.065778506919742,-621904.925671586417593 7220504.539058900438249,-624316.885078604216687 7217592.467723579145968,-628738.717891893815249 7213306.838673415593803,-629326.262164301238954 7212989.971284665167332,-629913.695117217488587 7213148.40338253416121,-630315.781117960694246 7213623.528398230671883,-630841.431753488839604 7214787.372753542847931,-632789.522842369507998 7216322.097633068449795,-633408.013933218084276 7216640.242434814572334,-634181.016477286815643 7216798.748124402947724,-637922.575882339733653 7217169.496270720846951,-639654.261881118058227 7217275.618050076067448,-648157.735143836122006 7215793.09134410135448,-648714.332597802393138 7215528.506309328600764,-651837.512231498025358 7213465.086724683642387,-652765.248867769376375 7212671.974185792729259,-653785.603320378810167 7210662.986864631064236,-653878.332456210860983 7209075.693994278088212,-653661.927366108517163 7207648.565089578740299,-652981.65395787183661 7205799.144700707867742,-652888.924822039785795 7205058.927608329802752,-652765.248867769376375 7202681.991035751067102,-652919.76032098964788 7200991.735133954323828,-655115.203318413812667 7192229.295435792766511,-656383.020999060827307 7189011.958430443890393,-657186.970361567800865 7188009.65743596944958,-659042.443634110502899 7186428.44533262681216,-664391.901764183072373 7182265.403044558130205,-672802.645891066174954 7176102.858493013307452,-675462.068526118760929 7175417.544330146163702,-676266.017888628528453 7175365.428019927814603,-677038.909113206085749 7175523.104603540152311,-679976.630475240410306 7177050.191182835027575,-686934.09864982101135 7183318.952110709622502,-687645.207557007553987 7184372.642110075801611,-688603.891011719941162 7186744.055035966448486,-689315.111238397774287 7187851.730732556432486,-689809.815055481856689 7188221.117140376009047,-690490.088463721331209 7188484.595525707118213,-697636.465814174502157 7189085.807243238203228,-697695.01986633380875 7189486.956981653347611,-698251.50600080890581 7190066.410480657592416,-698931.779409045586362 7190487.927040966227651,-700044.974316978245042 7190751.481293486431241,-705641.895675082691014 7192071.473987069912255,-706847.931038338690996 7192071.473987069912255,-707435.363991254824214 7191807.685633002780378,-707992.072764709591866 7191332.547052661888301,-708393.936126473243348 7190751.481293486431241,-708579.505717625725083 7190172.167244667187333,-708672.346172949066386 7189591.187116243876517,-708641.399354508030228 7189011.958430443890393,-717732.416889630607329 7181210.477632988244295,-731090.75578482542187 7179788.202057422138751,-735358.077144894748926 7178577.384160616435111))
+POLYGON ((-688882.189738701679744 7412436.509964105673134,-694015.242778671905398 7418624.028414089232683,-697169.257911317399703 7418407.806155252270401,-698839.161592707620002 7418516.698528823442757,-699364.70090874156449 7418788.056371249258518,-699241.024954471271485 7419602.577901406213641,-697169.257911317399703 7421068.971302789635956,-696025.227504434878938 7421829.946886125952005,-694510.057915247278288 7421992.673532713204622,-689191.435284124570899 7420797.533670457080007,-687768.994830769021064 7420254.491353197954595,-687367.020149514195509 7419818.833460438996553,-687150.503739920561202 7418950.719224117696285,-688078.129056703532115 7413467.81125176884234,-688480.215057446854189 7412761.377551549114287,-688882.189738701679744 7412436.509964105673134))
+POLYGON ((-698468.022410402540118 7473833.514653102494776,-701374.685634504538029 7474653.648916405625641,-703230.047587556065992 7475583.764775579795241,-704157.672904336242937 7476567.962184702046216,-704374.077994438586757 7477114.967761962674558,-703755.698223081300966 7482205.531554742716253,-703632.022268811007962 7482918.328284627757967,-699735.728771555353887 7500351.250473250634968,-696087.009821822983213 7511500.496498202905059,-695870.604731720522977 7512214.61759833805263,-695901.55155016167555 7513038.83786569070071,-696241.632594537222758 7513698.673329569399357,-696767.283230062457733 7514083.834334052167833,-697447.556638299138285 7514302.74736132659018,-704126.726085895090364 7515018.513606816530228,-704837.946312575717457 7515018.513606816530228,-705518.219720812398009 7514797.99668319709599,-706384.062720201560296 7513753.101390008814633,-706693.196946135954931 7513038.83786569070071,-707157.176583761465736 7511719.336227979511023,-707589.986763966269791 7510400.060231103561819,-708053.855082100490108 7508862.244868799112737,-708826.857626169221476 7506994.094842792488635,-710187.515762136667036 7504467.491784112527966,-711671.738532883115113 7502326.092530774883926,-713650.665120713762008 7499692.555206660181284,-717948.933299224241637 7495028.964548327960074,-719402.320571020827629 7493766.825120431371033,-720608.133295294363052 7493000.126278794370592,-721907.009113870793954 7492726.154522690922022,-722618.118021057220176 7492890.181114114820957,-723731.424248481169343 7493658.250885146670043,-724133.287610244820826 7494316.431577333249152,-724597.155928379157558 7495412.997528378851712,-724689.885064211208373 7497058.335962226614356,-723576.690156278549694 7503149.454878541640937,-723051.039520753314719 7505565.500604602508247,-717979.768798174103722 7528337.029204244725406,-717083.201619326253422 7529327.976146135479212,-709074.209534712717868 7532468.237580842338502,-702395.151406607939862 7531311.839350585825741,-689315.111238397774287 7541787.653664988465607,-686068.255650428938679 7543996.076252364553511,-683718.189880293328315 7545210.422262988984585,-683130.64560788590461 7545375.767772215418518,-682326.69624537602067 7545210.422262988984585,-681491.800064428010955 7544271.875555530190468,-681120.660882122931071 7542836.356887289322913,-681584.529200257151388 7537540.862735974602401,-681460.853245986858383 7534342.371975722722709,-679389.086202832986601 7520903.339064310304821,-679265.410248562693596 7520133.939571330323815,-678770.706431475700811 7518042.646464759483933,-678306.838113341364078 7516722.28863972146064,-677750.240659375092946 7515512.423126570880413,-676327.800206019543111 7514248.315422492101789,-674534.331889847409911 7513203.494580280035734,-673730.271207849145867 7512214.61759833805263,-673482.919299305649474 7511609.124123423360288,-671287.476301881484687 7502985.210201594978571,-670669.096530524198897 7495138.94016498234123,-670978.230756455799565 7494534.982082433998585,-672184.266119711683132 7493000.126278794370592,-676451.476160289836116 7489052.555783456191421,-693396.751687823329121 7477662.012045311741531,-698468.022410402540118 7473833.514653102494776))
+POLYGON ((-142767.246942374389619 6547139.234569259919226,-152229.403659802046604 6554104.99633458070457,-163979.843829977238784 6561516.002191687934101,-166268.015963233541697 6562638.73916320502758,-166886.507054079236696 6562882.695191740058362,-168339.783006384619512 6562930.819839452393353,-169576.765188081684755 6562687.038019890896976,-171215.61073153957841 6562003.67942014709115,-174678.871409607905662 6560930.546629772521555,-174771.600545439956477 6561467.710193186067045,-172637.939865403866861 6564053.925138529390097,-169576.765188081684755 6567567.207730176858604,-145704.856984917481896 6580905.342729836702347,-144375.256986882421188 6581051.617871415801346,-143756.765896033903118 6580953.572754107415676,-124461.424598364756093 6574990.329746156930923,-123997.556280227654497 6574599.851886772550642,-121771.166464362308034 6572010.502197095192969,-117967.713422430038918 6566199.738046816550195,-130058.345956469187513 6551181.989213441498578,-132624.816816707229009 6549719.558585209771991,-135284.128132268582704 6548599.805448189377785,-138221.738174811645877 6547771.924045508727431,-142767.246942374389619 6547139.234569259919226))
+POLYGON ((-106928.604798423839384 6581490.810956662520766,-108289.151614899994456 6581784.96900472138077,-113824.179336122222594 6583496.258340136148036,-113731.450200290171779 6584132.97693841997534,-113422.204654867309728 6584572.334444087930024,-108629.232659272704041 6591326.246577495709062,-108072.635205306374701 6591423.18161381687969,-107361.526298119846615 6591228.255228956229985,-105660.787117779749678 6589955.002541372552514,-105351.541572354064556 6589417.211600774899125,-104207.399845983134583 6582566.624939186498523,-104454.751754523793352 6582029.316535127349198,-106928.604798423839384 6581490.810956662520766))
+POLYGON ((-519150.801777908636723 6649348.930204601027071,-519769.404188248387072 6649545.241816986352205,-520233.161186891433317 6649890.662282161414623,-520356.837141164578497 6650581.369407772086561,-520016.75609678903129 6654131.859586838632822,-519800.239687198249158 6655514.048042042180896,-519367.31818750227103 6655859.720446646213531,-518625.262461874634027 6655859.720446646213531,-518346.852415401663166 6655365.019068235531449,-517233.657507469004486 6650433.672830066643655,-517295.55114434834104 6649791.791729428805411,-517821.313099364808295 6649545.241816986352205,-519150.801777908636723 6649348.930204601027071))
+POLYGON ((100094.812578116412624 6684726.008760557509959,98548.696170487746713 6684924.597660858184099,87664.098999701731373 6686905.046361476182938,86952.878773023971007 6687103.68826603423804,85283.086411124968436 6688045.252445382066071,84540.919366006113705 6688936.450240269303322,82963.96745943040878 6691364.418921520002186,82469.152322852212819 6692405.682379041798413,81819.825733056655736 6693843.436656802892685,82438.316823902350734 6697660.772802976891398,83365.942140682484023 6700140.454425781965256,84633.759821329411352 6700339.240169217810035,88066.073680956644239 6699495.907561649568379,99321.698714556463528 6696173.432659012265503,100651.410032082756516 6695726.623017131350935,101177.060667607991491 6695379.438650756143034,103588.908755134601961 6692158.022346547804773,104269.293482862500241 6691215.983681936748326,105073.242845372311422 6689679.516413123346865,105475.217526627224288 6688540.508851628750563,105506.164345068318653 6687846.587631016969681,105413.323889745035558 6687203.011030683293939,104918.620072660894948 6686856.18903929926455,100713.192349470875342 6684875.573919639922678,100094.812578116412624 6684726.008760557509959))
+POLYGON ((-484394.407723452488426 7006049.762103352695704,-490053.222718436270952 7006307.436954452656209,-498587.642799595370889 7015743.440835641697049,-500319.328798373753671 7018115.986201459541917,-508451.774198277969845 7033717.665927033871412,-508637.343789430509787 7055102.47952401265502,-508389.991880887013394 7055724.81108265183866,-507616.878017327049747 7056708.993350408039987,-498123.885800949530676 7060807.952524495311081,-493052.615078370319679 7061896.63299054838717,-492372.341670133697335 7062000.689365667290986,-491599.339126064965967 7062000.689365667290986,-480220.038138194824569 7059562.541611047461629,-477838.914230126829352 7058731.87816125806421,-476849.395276464463677 7057953.956942255608737,-476107.339550836826675 7057020.962758803740144,-475334.225687276921235 7055206.446941974572837,-470015.603056157066021 7042719.929438506253064,-459409.415931846830063 7040650.064133018255234,-458883.765296321595088 7040908.674678429029882,-458172.545069641026203 7041010.966040506958961,-457523.218479845440015 7040959.913356561213732,-451957.132620690914337 7039717.608172768726945,-450472.909849944408052 7039303.86003131698817,-450442.074350994545966 7038631.774748852476478,-455296.717344488890376 7030305.458701467141509,-456564.535025132994633 7028961.189470266923308,-462347.025974389922339 7024828.95993609726429,-469551.846057511167601 7020129.07989423815161,-481518.691317788732704 7009863.606724730692804,-484394.407723452488426 7006049.762103352695704))
+POLYGON ((-509564.969106210628524 7027153.06351625919342,-512842.771512617648114 7030511.444993272423744,-519243.642233231919818 7034647.929492488503456,-520635.13586814631708 7035010.048678809776902,-521315.409276385849807 7035993.159698629751801,-522521.444639638939407 7038941.54536,-522304.928230045363307 7039458.850060502067208,-521129.951004724542145 7041994.818992805667222,-520820.705459298857022 7042564.875849957577884,-520140.43205106217647 7042668.679420317523181,-515038.214510041929316 7042978.607297976501286,-514481.617056075599976 7042668.679420317523181,-511049.303196448367089 7038165.558255122974515,-507678.771654209238477 7030925.85271664056927,-507555.095699936093297 7030201.816304904408753,-507555.095699936093297 7029477.84574724920094,-507709.718472650332842 7028702.966924164444208,-508018.964018073223997 7028135.204441647976637,-508884.695697971154004 7027256.666226947680116,-509564.969106210628524 7027153.06351625919342))
+POLYGON ((-296666.442964075424243 6730809.290560748428106,-297748.802373058220837 6729365.000025758519769,-300438.949187566584442 6726228.490211070515215,-302201.582004788913764 6724685.40973533783108,-317013.196852286288049 6718269.704293522052467,-322022.573937983252108 6717125.443592190742493,-324929.237162088102195 6716976.538643929176033,-328918.148475681664422 6717324.822989739477634,-330216.912974766863044 6717672.943242379464209,-336308.538149958243594 6714740.249320256523788,-346822.107457927602809 6708430.698932969942689,-347533.327684605377726 6707535.938862201757729,-348182.654274403757881 6706443.588736304081976,-350841.965589965111576 6701827.518808003515005,-351800.537725186382886 6698999.985834660939872,-351614.968134033842944 6698355.529079964384437,-351553.185816642886493 6697709.87339807394892,-351614.968134033842944 6696173.432659012265503,-351955.160497897770256 6694735.267822206951678,-352202.512406438414473 6694091.147844122722745,-352480.811133423005231 6693545.229489304125309,-353624.952859796758275 6692206.911411782726645,-354614.471813456271775 6691563.169370898976922,-363829.165302852052264 6688887.402404529042542,-364416.820894750708248 6688737.763737605884671,-372487.372657772735693 6688540.508851628750563,-373971.706748007622082 6688540.508851628750563,-378857.407879434293136 6688737.763737605884671,-380310.683831742499024 6688887.402404529042542,-384175.919191065768246 6689630.464112524874508,-388350.400095811812207 6690572.141398129984736,-394349.296135171141941 6691959.257410963997245,-396328.334042495873291 6693346.430764924734831,-408759.047620907716919 6705550.476493304595351,-417386.196837896073703 6714740.249320256523788,-417866.317801685247105 6716183.200352197512984,-418684.961336981214117 6718170.002419413998723,-420973.244789725926239 6722298.000576066784561,-426972.140829085255973 6731556.184511872939765,-427497.791464610490948 6731854.351677265018225,-439681.041814990458079 6730411.309781678020954,-441443.674632209935226 6729862.773584743030369,-467572.808150189346634 6717821.860922322608531,-467789.324559782922734 6716430.338509323075414,-468160.352422596770339 6715982.596253319643438,-468809.790331883530598 6715882.922369535081089,-469459.116921681968961 6716082.271356697194278,-472303.886508904572111 6717524.207267745397985,-476200.180006160167977 6720358.175246710889041,-477900.807867009018082 6728567.765374079346657,-477900.807867009018082 6729315.887540238909423,-477684.402776906616054 6729962.618760659359396,-473169.729508293734398 6733249.768629260361195,-471097.962465139862616 6734046.027415570802987,-468809.790331883530598 6732900.802292080596089,-465377.365152765123639 6732153.964206924661994,-464697.091744525590912 6732103.221153242513537,-463367.3804270021501 6732302.967723667621613,-458234.327387031982653 6734245.821693606674671,-453967.117346453829668 6736388.986721459776163,-453627.036302081134636 6736836.417660769075155,-452575.623711539432406 6739229.532591589726508,-452390.165439875330776 6739927.844081154093146,-452513.841394148475956 6740624.779615554958582,-453085.466979371849447 6741509.361731187440455,-453595.978164148807991 6741971.077149564400315,-467263.562604766455479 6742320.253384324721992,-474468.38268788770074 6741921.708969135768712,-493825.617622439051047 6752750.391719499602914,-509224.888061835081317 6752200.346325456164777,-515223.784101194411051 6751251.51568235643208,-517171.875190077989828 6750852.533052319660783,-519552.887778654752765 6750103.864474670961499,-520511.459913876024075 6749455.349691575393081,-521253.626958994893357 6748506.839547562412918,-521655.49032075854484 6747159.459139152429998,-521717.383957637881394 6744165.481415218673646,-522119.358638892823365 6740076.990081829950213,-524160.178863605600782 6737136.213749676011503,-524685.940818622126244 6736887.190248610451818,-532478.305174153647386 6733847.67278004810214,-533189.414081340073608 6733996.707321142777801,-533746.122854797635227 6734295.143298409879208,-535137.505170220858417 6735391.23619968444109,-537425.788622968364507 6736189.139795588329434,-538167.955668087233789 6736338.217243597842753,-538817.393577374052256 6736238.293790582567453,-541229.241664903471246 6735441.820389812812209,-541723.945481987670064 6735192.669388093985617,-544383.256797548965551 6732950.115742954425514,-550072.90729148266837 6727074.773598824627697,-557185.109558265889063 6729265.162182052619755,-561328.532325082458556 6731107.430356651544571,-562318.162598233204335 6731755.738356730900705,-558966.110091468086466 6740426.264465735293925,-553325.996770935016684 6741712.211698781698942,-546022.213660498149693 6745512.365510255098343,-544816.178297242149711 6745961.735697395168245,-541136.512529071420431 6748457.431653422303498,-541816.785937308100984 6750153.282381390221417,-543733.930207750527188 6754448.397497565485537,-544352.309979107929394 6751950.860888539813459,-544414.203615990118124 6750502.810339243151248,-544630.720025580842048 6749854.263713461346924,-545403.722569649573416 6748905.707004135474563,-545929.37320517480839 6748556.068075421266258,-546949.838977278210223 6748057.148954421281815,-557048.965821025543846 6746779.897497278638184,-557791.132866144413128 6746600.27204352337867,-563839.454759415937588 6746959.347289913333952,-577871.944490852300078 6747658.323146688751876,-582046.425395598402247 6750203.958510612137616,-584087.245620314031839 6751500.979642672464252,-574532.359767054324038 6757244.543339472264051,-573419.164859121548943 6757745.286177275702357,-572769.726949831936508 6757844.215318964794278,-570419.661179696326144 6757794.750597458332777,-569090.061181661207229 6758044.595491731539369,-568595.357364577124827 6758343.735956214368343,-568224.218182272044942 6758793.81651755515486,-567945.919455287512392 6760243.346220543608069,-567945.919455287512392 6760992.950126864016056,-569368.248589154565707 6769694.571471702307463,-569492.035862916149199 6770395.507345334626734,-569955.904181050485931 6772247.126824827864766,-570172.309271152829751 6772847.908439286984503,-570759.853543560253456 6773848.829427449032664,-571749.261177731328644 6774550.124403815716505,-576820.53190031053964 6776503.111625352874398,-577562.698945429408923 6776652.930974679067731,-580345.68621526111383 6776753.352954571135342,-585416.845618349034339 6776753.352954571135342,-583221.402620921959169 6785020.345681723207235,-567945.919455287512392 6792845.046045511029661,-567389.322001321124844 6793146.918330696411431,-565688.58282098104246 6795655.729907976463437,-565472.066411390318535 6796258.249533679336309,-565131.985367014771327 6799421.942266858182847,-539281.150576019892469 6802636.429947007447481,-537920.603759543737397 6802887.660793989896774,-537487.682259850553237 6803239.650319085456431,-530746.619175372412428 6811785.067673795856535,-529788.047040151199326 6813344.804950259625912,-528334.771087845787406 6816464.09535648021847,-527314.305315742385574 6818880.651822560466826,-525737.242089675390162 6820592.574866738170385,-519800.239687198249158 6823714.664112947881222,-517295.55114434834104 6824420.292861871421337,-516646.113235061522573 6824521.309267468750477,-515038.214510041929316 6824420.292861871421337,-511018.356378007272724 6823966.369379263371229,-503968.159067597414833 6823815.671696427278221,-500937.708569731039461 6824822.915135419927537,-500412.057934205804486 6825074.83630333095789,-477777.131912735872902 6840455.998603926971555,-471067.12696619000053 6845252.946398593485355,-466830.641105070477352 6850253.969652257859707,-461202.884248016169295 6858243.560979214496911,-459842.337431542866398 6860874.330186579376459,-456224.342661269067321 6869482.472113816998899,-455853.314798455219716 6870900.36407633498311,-455513.233754082524683 6872370.135668253526092,-451926.297121741052251 6888451.348726056516171,-452080.808574961207341 6892157.992620870471001,-454245.416073438420426 6900799.506056198850274,-459069.22356798290275 6909094.032988433726132,-459347.633614455873612 6909653.403511005453765,-459471.309568726224825 6910314.727980232797563,-459316.686796014779247 6911079.864781765267253,-457121.132479099323973 6918670.84101480524987,-451215.076895063277334 6930758.700262603349984,-452328.271802995936014 6932136.903940637595952,-459811.390613101772033 6941996.895645508542657,-461542.965292391716503 6945218.38596916012466,-461790.428520423593 6945781.571193949319422,-461914.104474693944212 6946446.066549073904753,-461914.104474693944212 6947213.186286772601306,-460460.828522388532292 6960216.419862363487482,-460306.094430185912643 6961035.588551932945848,-460089.689340083510615 6961599.887974053621292,-459378.469113405735698 6962727.314738386310637,-458450.84379662561696 6963495.996900076977909,-460151.582976965699345 6967188.029320708476007,-471252.585237851249985 6967289.37938430160284,-479725.223001619451679 6965545.931195291690528,-480498.225545688124839 6965341.800027283839881,-491382.82271647133166 6961702.643085150048137,-494320.432759014423937 6959448.237225143238902,-498402.073208442889154 6956221.01618991792202,-500968.655388172133826 6951510.48938547167927,-505328.705884070775937 6944809.691843104548752,-526293.839543641777709 6942662.365329,-527747.226815438363701 6942559.854366502724588,-528489.282541065942496 6942712.97714975848794,-529447.854676287155598 6943429.122681488282979,-529976.844896538066678 6944058.264551734551787,-529015.044496082467958 6947366.213923020288348,-527778.173633879399858 6949669.347660939209163,-525644.512953843339346 6952739.135313027538359,-517759.41946248547174 6962112.20080938283354,-514172.482830143941101 6966213.362056158483028,-510523.652560920279939 6968930.54312835726887,-506812.928654817224015 6969854.57294652517885,-505421.435019902826753 6970161.867919016629457,-503906.376750206458382 6971136.832027266733348,-501587.146479017857928 6973035.204306980594993,-496763.338984473375604 6977501.6763582713902,-485847.794995249074418 6987879.368051594123244,-485074.681131689168978 6988805.777477576397359,-484765.546905757510103 6989370.745646540075541,-484301.678587620437611 6990708.354260675609112,-483683.187496774713509 6994618.048265744000673,-483590.458360942662694 6995492.810724900104105,-482044.341953313967679 7003782.804947496391833,-467139.886650493310299 7021213.69309792201966,-462347.025974389922339 7024828.95993609726429,-460646.286794049839955 7025603.647743077017367,-459873.172930489876308 7025603.647743077017367,-456997.456524828972761 7025189.331014082767069,-452668.352847368631046 7024983.668328705243766,-447349.84153574006632 7027049.4621537392959,-445618.155536958831362 7027876.822669266723096,-429074.854690680280328 7035785.728058224543929,-415530.946204332925845 7036872.662893095985055,-414943.401931928354315 7036561.483064823783934,-411047.219754163990729 7035993.159698629751801,-402203.554127581999637 7034802.828844710253179,-401492.333900904282928 7034906.344996532425284,-399575.189630461798515 7035372.370537872426212,-385351.00773587776348 7042512.322314796037972,-377156.668699094210751 7046810.186741053126752,-374342.734610824263655 7047276.723829239606857,-371405.124568278319202 7047484.455386277288198,-369889.95497909077676 7047484.455386277288198,-369024.111979701614473 7047380.588929277844727,-357521.135037561121862 7038216.779266598634422,-348491.899819826649036 7030771.214890957809985,-347471.434047726041172 7030047.192544949240983,-345337.773367689922452 7028961.189470266923308,-343821.267944613180589 7031238.301005117595196,-343266.006324535992462 7031959.453915113583207,-343049.60123443644261 7032631.161942451260984,-343142.330370265699457 7033355.419401423074305,-347997.196002742508426 7043341.292298357002437,-351120.264316946850158 7047690.887005303986371,-352264.294723829370923 7049142.213438191451132,-352821.003497286932543 7049504.993189883418381,-353594.006041355663911 7050385.992069826461375,-354799.930085120431613 7052562.326731893233955,-355171.069267422601115 7053805.33436681702733,-355356.638858575141057 7054635.296230061911047,-354799.930085120431613 7055672.170473443344235,-354026.927541051700246 7056606.499790882691741,-352975.62626999837812 7057384.102363989688456,-342389.476654030906502 7058931.31910511571914,-341664.230171511531807 7059230.489909846335649,-340829.445310054696165 7059355.054359903559089,-340031.618519537209067 7059106.487659787759185,-339345.1112198169576 7058732.438381616957486,-338899.833256642217748 7058203.234492429532111,-338510.215038866095711 7057549.341046640649438,-337285.700640141847543 7054780.693120626732707,-337063.061658553022426 7053131.835597528144717,-332783.495154498959891 7051214.290956061333418,-327557.601659208361525 7040650.064133018255234,-325975.974334017839283 7039086.469249466434121,-322795.687801543215755 7036665.208321936428547,-320878.432211612351239 7035940.649562117643654,-318621.206896797171794 7035476.080294112674892,-309066.209724046173505 7037286.098368016071618,-306685.197135469410568 7039252.818302919156849,-306283.222454214526806 7039717.608172768726945,-300840.923868821526412 7047328.003556433133781,-300655.465597160218749 7048053.600529603660107,-301057.440278415160719 7048467.617682208307087,-301892.336459363228641 7048624.278444014489651,-302510.716230720514432 7048467.617682208307087,-307829.338861843221821 7046344.982172607444227,-308757.075498114572838 7045670.810151531361043,-309097.15654248726787 7045101.835548265837133,-309344.508451027912088 7044480.335113095119596,-317662.523442084668204 7042512.322314796037972,-318497.419623032736126 7042616.125199204310775,-319888.913257949985564 7043186.226594678126276,-320940.325848491687793 7043755.064142570830882,-328825.419339852407575 7049919.08594308141619,-329938.614247785124462 7051318.207518306560814,-334712.995888417353854 7060579.139386664144695,-335436.572578573890496 7062011.524757786653936,-345925.317640097346157 7085700.327330800704658,-345832.588504268089309 7087313.046944672241807,-345554.289777283556759 7087990.95184326544404,-344379.201232468651142 7090333.421698123216629,-342091.029099215229508 7094396.894094210118055,-331979.545791989134159 7111767.019433310255408,-331577.459791243018117 7112340.795769130811095,-331082.755974158877507 7112706.477685352787375,-327526.76616025849944 7115057.962217671796679,-323073.986528527806513 7117408.640704437159002,-322702.847346222784836 7117879.349377910606563,-322548.224573511339258 7118558.370577606372535,-322888.416937375266571 7119133.956766422837973,-323290.391618630208541 7119500.140942992642522,-323970.665026866889093 7119761.33508057333529,-325547.728252933826298 7120022.726032071746886,-327217.520614832814317 7120074.290133906528354,-330185.966156328562647 7119864.648398477584124,-333154.523017312749289 7119708.267562028951943,-334669.692606500349939 7120126.042763856239617,-336370.431786837638356 7121014.923506615683436,-337700.031784872640856 7122374.880389341153204,-338473.145648432604503 7123315.599142143502831,-339679.069692197372206 7125721.840681636705995,-339988.315237620205153 7126716.260237291455269,-340421.23673731618328 7128756.906976815313101,-340606.695008977490943 7130274.97137585375458,-340606.695008977490943 7131896.797997823916376,-339864.63928334985394 7152341.757566204294562,-339771.798828026570845 7153023.746627560816705,-339215.312693551473785 7154335.924033833667636,-338380.305193112173583 7155228.472964587621391,-336741.459649651427753 7156174.62456120364368,-326444.406751275702845 7160797.369542037136853,-322486.442256120382808 7169945.318556828424335,-315436.133626219350845 7186270.550336133688688,-313642.665310047159437 7197242.865030996501446,-313209.855129845265765 7212459.856326746754348,-325795.080161477264483 7199618.158659620210528,-326753.652296698535793 7198878.522894452326,-350903.859226844448131 7185690.047750042751431,-357861.327401425049175 7188273.31856971886009,-359129.033762577921152 7188854.0116235781461,-359994.876761969935615 7189750.667588521726429,-376321.772518146142829 7216586.518875956535339,-379506.734469232673291 7222728.433353583328426,-379815.980014655564446 7224052.08843213878572,-379846.815513605426531 7225482.389983559027314,-382258.774920623283833 7236350.889832640998065,-385845.711552964756265 7242188.90248944144696,-388845.215232390037272 7246914.881450270302594,-392370.369547340553254 7251272.860581652261317,-395957.306179679173511 7255525.281166699714959,-402203.554127581999637 7263241.492915647104383,-404058.916080633527599 7266542.304833572357893,-404553.619897717668209 7267714.024951515719295,-404460.890761888469569 7268406.095154429785907,-397317.852996155328583 7292788.367029984481633,-381733.124285098048858 7326150.494656078517437,-377558.643380349094514 7337912.602693426422775,-376383.554835537099279 7339470.110255235806108,-366457.641119463543873 7349637.640190618112683,-365870.096847056120168 7350014.735777411609888,-364014.734894004592206 7350498.04940487537533,-357180.942673697136343 7352059.624750796705484,-355634.937585559731815 7352167.591818587854505,-355047.39331315230811 7351898.355364228598773,-354552.578176576935221 7351413.404316099360585,-354367.008585424395278 7350659.289809929206967,-353872.304768337402493 7350337.006128925830126,-349141.226409625029191 7348561.487261900678277,-348368.223865556297824 7348561.487261900678277,-345461.449321963067632 7349044.904518704861403,-336896.082422365667298 7351305.447698870673776,-336741.459649651427753 7352059.624750796705484,-336525.054559549025726 7356152.75904381647706,-337421.733057890902273 7357068.584705134853721,-338565.874784264655318 7357768.618098892271519,-339638.660717038204893 7357959.494313507340848,-341070.563327111769468 7357068.584705134853721,-341627.160781078098807 7356852.516171094961464,-349945.175772134854924 7355075.51196498516947,-350687.342817253665999 7355075.51196498516947,-374095.382702280767262 7356313.922588279470801,-375857.904200009012129 7356529.976181550882757,-377434.967426078801509 7356852.516171094961464,-383526.592601267329883 7359223.585368466563523,-397534.258086257730611 7360086.412351745180786,-398554.723858361190651 7356368.614224010147154,-398647.45299419038929 7355506.005076677538455,-402512.799673004890792 7337697.064591591246426,-403966.07562531309668 7338126.59883894212544,-410645.245072909106966 7338824.932717261835933,-411449.194435416080523 7338824.932717261835933,-424374.611830914916936 7332592.835868971422315,-430775.482551529130433 7324165.308827341534197,-440113.963314686494414 7316871.571559986099601,-441381.780995330598671 7316443.205670266412199,-442989.79103983863024 7316443.205670266412199,-455915.208435337408446 7316925.987287605181336,-460398.934885509195738 7318265.85299488902092,-484054.215359588561114 7334311.537675649859011,-484549.030496163934004 7334795.425965294241905,-487146.55949433427304 7338449.926035395823419,-487672.210129859508015 7339524.683809448964894,-487795.886084132653195 7340277.721741324290633,-487517.587357148120645 7342051.354405701160431,-487548.53417558921501 7342804.636432931758463,-487734.103766741696745 7343450.14339907374233,-488135.967128505406436 7343933.243720452301204,-489032.756946335663088 7344041.098261154256761,-489589.354400301992428 7343718.894512126222253,-492403.2884885747917 7339201.312046130187809,-492650.640397115435917 7338610.723905532620847,-493052.615078370319679 7337105.042650741524994,-493021.668259929225314 7335440.270208503119648,-492928.939124100026675 7334795.425965294241905,-491042.741672098636627 7328136.185612527653575,-485322.144359723839443 7317569.549566496163607,-483806.863451045064721 7305998.158957391045988,-483714.134315213013906 7305249.962116615846753,-484023.379860638699029 7303697.725519826635718,-484889.222860027861316 7301556.657458799891174,-485909.688632131321356 7300059.645056885667145,-487115.612675893178675 7299364.769788400270045,-488383.319037046050653 7299150.293194669298828,-490053.222718436270952 7299417.715993182733655,-500535.733888476155698 7303643.401859720237553,-501617.981977967720013 7304392.986129264347255,-507276.796972954354715 7311085.021844476461411,-507493.202063056756742 7311675.073280113749206,-507616.878017327049747 7313174.312944632023573,-507802.44760847958969 7313817.373221859335899,-511915.146195837529376 7319337.83392327837646,-521068.057367842353415 7323092.664823008701205,-527716.279996997211128 7327331.18275245372206,-534024.421581779490225 7333398.188474038615823,-534921.100080121308565 7334366.07514248136431,-535910.619033780880272 7335064.072351925075054,-537178.436714424868114 7335601.199460263364017,-540146.882255920674652 7336407.056212125346065,-544785.231478803907521 7333184.322026850655675,-547722.952840838232078 7330766.646752540022135,-548619.63133917725645 7329853.905758455395699,-549423.580701687023975 7328888.124796369113028,-552268.461608398123644 7323628.96839880105108,-552361.19074423017446 7322716.868718331679702,-552144.674334636540152 7321912.617706686258316,-550444.04647378763184 7316871.571559986099601,-546795.216204566881061 7307068.650113546289504,-545465.616206531762145 7304072.607596145011485,-544445.150434428360313 7303268.732998014427722,-543795.712525141541846 7302948.207929764874279,-542868.087208361364901 7302145.98976656422019,-542156.866981683648191 7301021.867218040861189,-541940.461891581304371 7300487.11356435995549,-540548.968256663996726 7290651.822543200105429,-540858.213802089681849 7289957.78275859169662,-541476.593573444173671 7289850.67265519592911,-547970.304749378818087 7292414.218013309873641,-549083.499657311476767 7293162.726325718685985,-550042.071792532806285 7294018.472015681676567,-550846.02115504257381 7294872.771997364237905,-551247.99583629751578 7295514.327984113246202,-552206.567971518728882 7298722.897780749946833,-552515.813516941620037 7300059.645056885667145,-552546.760335382656194 7300754.582100824452937,-552330.243925789021887 7301449.388351605273783,-551526.294563279254362 7302520.604807495139539,-551124.319882027222775 7303910.978432006202638,-551804.48197077261284 7308246.456182963214815,-552144.674334636540152 7308783.090430431999266,-557154.051420333562419 7316067.922434697858989,-560524.582962572691031 7319713.467393285594881,-564915.468957423930988 7324272.890369415283203,-568007.813092169701122 7327331.18275245372206,-569213.737135931616649 7328780.479610544629395,-569955.904181050485931 7329800.752807031385601,-571285.504179085488431 7331895.059750298969448,-572429.534585968009196 7334203.817629324272275,-575521.767401225399226 7340760.625508707948029,-576233.098947394406423 7342588.963054939173162,-576573.179991767043248 7344041.098261154256761,-577129.777445733430795 7346676.930690856650472,-577268.815489734522998 7349194.101471481844783,-577253.4534000037238 7349798.862792021594942,-576449.504037496750243 7359709.022922759875655,-575985.635719359619543 7361972.663485009223223,-574656.035721324617043 7363591.283731928095222,-573542.840813391958363 7364130.380906693637371,-568286.0004996630596 7366503.667702360078692,-562627.29682416759897 7370927.33313555829227,-562503.620869894511998 7371845.092905859462917,-558112.734875046066009 7387460.677369177341461,-557865.382966502569616 7388165.008409182541072,-556504.724830538034439 7389462.063602016307414,-553690.790742265176959 7392006.556416805833578,-549361.687064804835245 7396606.952183855697513,-541940.461891581304371 7404517.697624060325325,-541631.216346158413216 7405114.675504365935922,-541445.758074494311586 7405872.722054904326797,-539652.178438833681867 7414335.507664976641536,-538693.717623103759252 7422426.888743844814599,-538600.877167783211917 7424111.952176474034786,-538291.631622357526794 7424709.06969010643661,-528798.528086488833651 7441684.904928776435554,-528396.553405236685649 7442229.646578715182841,-526417.515497912070714 7443863.51296469476074,-524716.887637063162401 7444789.739348181523383,-521253.626958994893357 7446533.628684123046696,-518377.799233839905355 7447078.515201458707452,-517728.472644044319168 7447297.108467092737556,-516677.060053502616938 7448005.126135634258389,-516275.085372247733176 7448496.341611038893461,-513615.885376177611761 7456840.970185435377061,-513553.991739295423031 7458533.338777900673449,-514512.563874516694341 7461918.006979351863265,-514728.968964619038161 7462573.490716668777168,-518687.044779265590478 7471700.588330790400505,-521624.654821808682755 7478374.586902238428593,-521933.900367231515702 7479029.890653658658266,-522645.120593909290619 7480070.294541446492076,-523046.983955672942102 7480563.353016829118133,-524067.449727776402142 7481384.398671555332839,-526479.409134794259444 7482698.726267375051975,-530901.241948083858006 7484834.689691386185586,-535848.836716389865614 7488176.643866263329983,-541105.565710630384274 7493438.34338332246989,-542775.358072529314086 7495357.316498689353466,-545898.537706224946305 7496894.023328824900091,-547228.026384771568701 7498319.630848780274391,-547351.813658533152193 7499856.927407381124794,-543362.791025445563719 7544934.390616884455085,-543208.279572225292213 7545706.270700325258076,-542806.304890970466658 7546259.790543609298766,-537011.457478237571195 7548368.499267051927745,-534043.011936741764657 7549030.57165377959609,-533504.893518249387853 7548932.151884951628745,-533152.456010397872888 7548733.327907914295793,-532354.629219880443998 7547871.882943076081574,-528953.150859203073196 7547694.357338692061603,-524685.940818622126244 7545375.767772215418518,-523881.991456115094479 7545210.422262988984585,-508761.019743700802792 7542725.698945729993284,-503504.29074946034234 7542230.241054864600301,-498896.999664509494323 7542725.698945729993284,-499731.784525966329966 7543720.08813545666635,-501061.495843492622953 7544326.519961761310697,-515100.108146924118046 7547583.62955547682941,-531727.900486714672297 7554389.687835521064699,-535463.448639263631776 7553722.578452091664076,-540412.935838914941996 7555725.672143717296422,-541720.383258282323368 7564745.555126459337771,-540973.318155569024384 7572438.501751570031047,-539479.076630651252344 7575617.754917521029711,-537517.961161344312131 7580976.269996969029307,-541813.780311058973894 7579468.410673319362104,-543401.418888750602491 7572606.029016052372754,-545269.137305280892178 7554723.562679801136255,-546950.172935749171302 7550718.417979738675058,-548631.208566220244393 7545214.993064677342772,-552361.19074423017446 7534563.448695320636034,-554247.388196231564507 7531806.793846441432834,-554927.772923959419131 7531531.440487891435623,-555638.881831145961769 7531476.886775597929955,-557958.000782843329944 7531973.240597685799003,-559473.281691522221081 7532524.187135871499777,-568842.709273117827252 7539140.407703982666135,-575892.906583530362695 7544326.519961761310697,-579542.738728169584647 7542881.05758389737457,-581597.251250250265002 7538882.067436678335071,-582157.633566901553422 7533387.091829580254853,-579758.141942853690125 7527510.973899577744305,-579170.59767044626642 7525363.366828439757228,-579356.167261598748155 7524481.738518790341914,-579758.141942853690125 7523931.168386836536229,-580500.308987972559407 7523820.979806956835091,-589158.405023399158381 7528116.131043621338904,-590364.440386655041948 7528722.723845549859107,-590797.250566859846003 7529382.514647976495326,-594291.569382860558107 7537981.617792900651693,-594477.138974013039842 7538699.586336087435484,-594507.974472962901928 7539526.842141421511769,-594538.921291401144117 7543720.08813545666635,-591075.549293841584586 7558912.356045866385102,-591038.479903408209793 7559476.582404192537069,-590945.750767576158978 7559908.838847606442869,-587884.464770762715489 7565285.901066017337143,-587049.568589811795391 7566713.457715893164277,-579170.59767044626642 7581785.920701346360147,-578706.729352311929688 7582340.445887309499085,-564637.28154993057251 7595721.087023308500648,-553721.737560706329532 7605005.976090668700635,-550726.797980401781388 7608345.41353698913008,-548032.087066769832745 7611351.348925784230232,-547475.489612803445198 7612576.586978422477841,-547753.788339788094163 7613243.413629404269159,-548526.902203345205635 7613133.3411337248981,-560184.501918199937791 7604839.342786311171949,-579510.678714818903245 7585779.915176596492529,-583190.567121972097084 7582119.58950481005013,-585416.845618349034339 7579734.106230428442359,-588595.684997440432198 7575166.459459184668958,-590655.095577115542255 7572207.958295061253011,-591861.019620880368166 7569449.352184385992587,-594328.527453802758828 7565297.457551669329405,-596239.660471741226502 7563371.549912866204977,-600104.895831067347899 7558415.656081087887287,-600878.009694624459371 7558304.773934399709105,-601589.118601813795976 7558359.518062030896544,-603722.779281847062521 7559077.797101472504437,-604341.159053204348311 7559410.481763506308198,-604650.404598627239466 7559963.395279230549932,-603227.964145271689631 7539857.094129826873541,-598898.860467811347917 7508862.244868799112737,-601589.118601813795976 7506114.761325518600643,-606072.845051985583268 7500569.774275177158415,-606412.926096358336508 7499966.774242323823273,-607062.36400564503856 7496345.615726223215461,-607464.227367408806458 7495851.549033195711672,-608793.938684935099445 7492726.154522690922022,-610742.029773818678223 7487682.902154895476997,-618401.701296320999973 7442711.278729816898704,-616184.328359208768234 7439561.013606991618872,-615906.029632227029651 7439016.655554126948118,-614019.832180225639604 7433083.339628231711686,-613896.156225955346599 7432376.488223062828183,-614823.781542735523544 7430526.91470696311444,-616184.328359208768234 7428243.021260535344481,-619709.482674159342423 7423568.67778710462153,-622925.391443687025458 7421449.547549922950566,-638726.636564337997697 7418788.056371249258518,-640365.482107795891352 7418732.92382235173136,-641849.704878545133397 7419059.619217731058598,-643148.358058139099739 7419656.152405872009695,-644075.983374919276685 7420579.686417700722814,-644292.499784512910992 7421285.463312054984272,-644539.963012544787489 7422752.174891752190888,-645127.507284952211194 7432104.458681508898735,-645189.289602343109436 7434661.403974262997508,-645096.449147019884549 7437165.301079350523651,-644941.937693799613044 7437981.755427746102214,-644292.499784512910992 7439179.547310555353761,-641107.537833426264115 7443318.85254780575633,-637582.494837964186445 7446044.107228214852512,-636871.163291795179248 7447078.515201458707452,-636623.811383254476823 7447788.08279784116894,-636345.62397576123476 7449477.099506616592407,-636531.082247422426008 7462465.353702132590115,-634706.667112812050618 7476951.275682856328785,-631088.894981520716101 7491354.270671325735748,-624255.102761213318445 7510510.255065249279141,-624718.859759859158657 7510785.056579646654427,-628676.824255011626519 7515018.513606816530228,-631428.976025893469341 7519417.698436729609966,-631645.381115995813161 7520078.079878558404744,-631929.913734463974833 7536007.350790955126286,-631985.573479859740473 7536470.64765390008688,-632059.712260729516856 7538423.192292927764356,-631837.073279143543914 7540872.365110436454415,-631391.795315968687646 7541567.958599822595716,-630557.010454511852004 7542361.949484528973699,-629499.363972483784892 7543488.218076884746552,-627130.819166874163784 7551672.07160775270313,-621348.328217620030046 7560738.178193661384284,-621008.135853756102733 7561345.952535333111882,-620111.457355414284393 7565827.87908373773098,-620729.948446262744255 7565995.063099895603955,-621472.00417189032305 7565884.071637166664004,-623110.961034839507192 7564832.223102402873337,-626234.029349043848924 7562508.464686173014343,-630018.892036016681232 7555141.822048941627145,-630204.461627169162966 7554776.68951238039881,-630965.107707759132609 7553317.924112414941192,-631206.225724816205911 7552986.298489877022803,-631651.615007482236251 7552921.049299996346235,-632022.642870296025649 7553119.185745740309358,-632226.691496919607744 7553450.817094803787768,-632282.351242315489799 7556269.962215968407691,-632263.872206844273023 7556701.04339393414557,-631837.073279143543914 7557961.586897023953497,-628089.279982606996782 7566991.068953487090766,-627007.143212603870779 7568762.596210335381329,-623543.771215044311248 7573636.800906362012029,-619307.507992907194421 7581009.013770660385489,-614607.265133141889237 7590887.631769153289497,-614359.913224598392844 7591720.520872043445706,-613555.963862088508904 7594665.146241501905024,-613586.910680529661477 7595498.245223373174667,-614112.561316054896452 7595830.910002659074962,-614792.946043785661459 7595553.254940694198012,-615844.247314836131409 7594831.358770885504782,-618812.692856329027563 7592220.777580857276917,-620482.596537719247863 7590332.48918600846082,-623141.796533789369278 7590277.516861313022673,-623018.120579519076273 7608901.860625194385648,-622987.285080569214188 7610571.444131291471422,-620451.538399786921218 7623330.674066665582359,-619956.834582702838816 7624781.315124277025461,-615163.973906599450856 7633152.0074393870309,-615102.080269717262127 7634828.490606474690139,-614978.404315446852706 7635609.259099802933633,-614607.265133141889237 7636336.412542313337326,-605268.895689475699328 7642952.94020386505872,-604267.020272334688343 7644261.350667661055923,-603413.533736424287781 7645100.864074998535216,-593506.099055821774527 7645737.506128554232419,-592634.133484440273605 7645569.984806464985013,-590945.750767576158978 7644428.843352621421218,-583499.701347906608135 7645782.810000526718795,-582850.374758108169772 7645615.489033673889935,-581180.582396209123544 7645670.658238304778934,-580036.440669835428707 7646286.808491548523307,-579046.921716175857 7647125.537155777215958,-578119.29639939579647 7648187.320239240303636,-571687.478860340430401 7655576.148319902829826,-570017.686498441384174 7657705.23395178001374,-568595.357364577124827 7660170.382207037881017,-564235.195549184456468 7670151.641469822265208,-563987.843640643754043 7670825.319961459375918,-564328.03600450779777 7671273.798534438945353,-565070.203049626550637 7671161.272383457049727,-565595.74236566061154 7670655.632228289730847,-566338.020730270654894 7669590.725700140930712,-567265.646047050831839 7667626.330121235921979,-568162.324545389856212 7664542.720214109867811,-569461.089044475113042 7661178.695830713957548,-577871.944490852300078 7650929.26284159347415,-579201.544488887302577 7649363.066427187994123,-580469.362169531406835 7648915.669382249936461,-582077.260894548264332 7648691.47709843236953,-582788.48112122877501 7648748.279913015663624,-597600.207288217381574 7653426.895149675197899,-600976.861402448848821 7654300.271392790600657,-598584.71686479402706 7662862.74284540489316,-597063.424703611293808 7661618.941670041531324,-594855.513923219870776 7661719.624733040109277,-594336.097179178264923 7661786.612996293231845,-593593.930134059395641 7662122.975586210377514,-584767.519028550595976 7668749.530191938392818,-584334.597528854617849 7669253.428508706390858,-584025.351983431843109 7669871.2794329514727,-583932.622847599792294 7670768.150935323908925,-584767.519028550595976 7670768.150935323908925,-591372.438375788507983 7670610.988819666206837,-591724.98720313119702 7670342.123850058764219,-592504.22363868355751 7669466.711709210649133,-593747.217072881758213 7668557.673832669854164,-594396.654982168460265 7668120.865157462656498,-595157.301062758429907 7667784.238607918843627,-595713.898516724817455 7667784.238607918843627,-596530.315662204637192 7668120.865157462656498,-598478.406751085305586 7669938.339157398790121,-597995.948077988694422 7671183.494651835411787,-599239.052831675275229 7675371.727534723468125,-591632.258067299146205 7690264.742666048929095,-583561.594984785886481 7701524.789759248495102,-576233.098947394406423 7711221.124667644500732,-571501.909269187832251 7717824.38875053729862,-571161.828224815195426 7718446.183743549510837,-570141.362452711677179 7721947.395225546322763,-569955.904181050485931 7722738.745450126938522,-573790.192721935454756 7719179.841034766286612,-577624.592582308803685 7714549.774756929837167,-582664.805166955688037 7707837.900584533810616,-597043.609834251110442 7691334.155714453198016,-619369.401629786589183 7666785.148829350247979,-622585.199079823098145 7663477.050243326462805,-623605.66485192370601 7662524.128000586293638,-631954.626661421498284 7657369.872215985320508,-633377.067114777048118 7660450.590481691993773,-634242.798794674919918 7661347.971594003029168,-644601.745329935685731 7666281.413177256472409,-648621.603461970342323 7667122.539042044430971,-655022.474182584672235 7669365.724603548645973,-656290.291863228776492 7670094.6794743090868,-660186.474040993023664 7672676.37298505473882,-661547.132176960469224 7674079.406983571127057,-667453.076441505225375 7681099.8598617259413,-668721.00544164062012 7682729.627684254199266,-669184.873759777634405 7683966.144569303840399,-669153.81562184530776 7684753.564749932847917,-668844.681395913707092 7686384.314906713552773,-668009.785214962786995 7687508.656512294895947,-667112.99539713258855 7688409.22089565731585,-666525.45112472504843 7688801.631315667182207,-665103.121990860789083 7689195.479388226754963,-654849.372374399215914 7690264.742666048929095,-634428.368385827518068 7695555.546441029757261,-628800.611528776003979 7695048.491497926414013,-624780.642077247262932 7695385.511073506437242,-618503.447310906136408 7696118.57496915012598,-617266.576448703184724 7696681.442337614484131,-617483.092858294025064 7697412.806278294883668,-617977.907994872191921 7697862.848856411874294,-638912.094835999188945 7701411.816976265050471,-641447.618877799017355 7701467.593275864608586,-642282.626378238317557 7701243.273617564700544,-643364.874467729940079 7700622.676736250519753,-644849.097238479182124 7699327.69822081644088,-648572.177608058205806 7697333.950198668986559,-650334.699105789186433 7695340.722888273186982,-651076.754831416881643 7695002.894682557322085,-658918.767679840209894 7693753.04005048237741,-689222.270783074432984 7694935.614545814692974,-691201.308690399164334 7695837.055513458326459,-692932.994689177488908 7697920.221056290902197,-693613.268097416963428 7699046.263123655691743,-694077.136415551300161 7701130.305002639070153,-694107.971914501162246 7702088.056045098230243,-694077.136415551300161 7702933.134881153702736,-693829.784507007803768 7703609.508809051476419,-689500.680829550256021 7708739.24314549472183,-689098.594828804139979 7709191.578606426715851,-683501.673470699694008 7710770.0903161438182,-664237.278991468832828 7715340.35732904728502,-662752.944901231094263 7715622.597487321123481,-662196.347447264823131 7715284.682678516954184,-661268.722130484646186 7714380.940836710855365,-657341.704453770420514 7710543.872415549121797,-653167.112229533144273 7707724.834273269400001,-651590.049003463354893 7707555.948398451320827,-650755.264142006519251 7708570.537820348516107,-645498.535147766000591 7717146.752978748641908,-646271.537691834731959 7718219.737981867045164,-650044.043915328686126 7720082.525444759055972,-651188.18564169970341 7720931.024272168986499,-651930.241367330076173 7722003.118560726754367,-652177.70459536195267 7722567.899587706662714,-652208.651413803105243 7723528.550565794110298,-652115.81095847976394 7724376.009126185439527,-651713.836277227732353 7724998.338880441151559,-651219.021140649565496 7725336.68462157715112,-644076.094694410450757 7727395.363105571828783,-640458.211243627942167 7727994.737010321579874,-639530.585926847765222 7727881.371335107833147,-638200.874609321472235 7727316.196359654888511,-636531.082247422426008 7727371.958969076164067,-630593.968525454052724 7732517.917875823564827,-630161.047025758074597 7733367.802751677110791,-630408.510253792861477 7733933.426913038827479,-631459.922844334505498 7734837.861071958206594,-638850.31251861108467 7738404.089353817515075,-639716.044198509072885 7738460.137009683065116,-642035.274469694821164 7738177.049615713767707,-647663.031326749129221 7736762.178020962513983,-652919.76032098964788 7735517.072111464105546,-654404.094411227386445 7735347.772990231402218,-655331.719728007446975 7735517.072111464105546,-658702.251270246575586 7736875.67595265712589,-659227.901905771810561 7737272.218810765072703,-648961.684506343095563 7760288.728380650281906,-648095.952826445107348 7761366.379861513152719,-646333.320009225630201 7762445.615256890654564,-645003.831330679007806 7762901.152126068249345,-641583.762615039362572 7762207.839122603647411,-640210.859335084445775 7762514.312067833729088,-638745.115599809098057 7762616.336155550554395,-638411.15712743147742 7762377.736874705180526,-638207.108500805101357 7762072.087209036573768,-637743.240182670764625 7760845.318755277432501,-637001.073137551895343 7759448.09454869478941,-634211.963295725057833 7757904.619656637310982,-631367.082389014074579 7755974.950343560427427,-630192.105163690401241 7755236.309738078154624,-628831.558347214246169 7754555.33683823607862,-628212.955936877289787 7754329.244438827037811,-626697.897667180979624 7754612.933265920728445,-621070.029490635497496 7756031.127550091594458,-619616.753538330085576 7756484.646011273376644,-616493.573904634453356 7757960.811116668395698,-614916.621998055954464 7758869.740106554701924,-614514.535997309838422 7759379.629802050068974,-614731.052406903472729 7760061.034768319688737,-615565.948587854276411 7760004.827789269387722,-617544.986495176213793 7759153.393962802365422,-618534.505448838579468 7758300.625046527944505,-619956.834582702838816 7758017.002991831861436,-625182.728077993378974 7756995.805986277759075,-626883.467258333577774 7757051.990732721053064,-629388.155801180633716 7758472.070307844318449,-642715.547877934295684 7769435.424946879036725,-643890.525103257969022 7770230.091105907224119,-644230.717467121896334 7770742.380678739398718,-644447.122557224240154 7771481.096311684697866,-644385.228920342051424 7772277.614141278900206,-644075.983374919276685 7774041.05891159363091,-643272.034012409392744 7776087.970547989942133,-642529.978286781813949 7777169.298320417292416,-637273.24929254129529 7783260.710006340406835,-633587.349632884259336 7782827.526457522064447,-629282.958882381441072 7783853.635443524457514,-628874.750309642869979 7783920.885787840001285,-626110.35339477355592 7783169.274034139700234,-625219.797468426870182 7782349.679653075523674,-624681.790369422873482 7781290.160054587759078,-620884.459899482899345 7780072.171837758272886,-618874.586493211216293 7779048.212711897678673,-616802.708130566054024 7778250.984888242557645,-615967.923269106424414 7778080.527085988782346,-614267.184088769135997 7778136.867883553728461,-601094.414784726803191 7781779.623754463158548,-601218.090739 7782577.222001235932112,-601558.283102863933891 7783146.517718847841024,-601991.093283068737946 7783545.480658304877579,-603444.480554865323938 7784229.055805050767958,-605980.004596662241966 7784343.264369696378708,-607495.285505341133103 7784000.643827837891877,-610216.490457781823352 7783090.344763967208564,-617854.232040598988533 7783944.259522567503154,-627798.736111634876579 7792058.676603360101581,-628522.201482300180942 7792469.808084421791136,-628763.430818848544732 7792811.168813141062856,-628911.819700076361187 7793222.341050314716995,-628856.271274171769619 7793804.137522666715086,-628522.201482300180942 7808301.650428098626435,-624799.23243220965378 7809284.922472046688199,-624298.294723641942255 7809867.951911521144211,-619010.618910960271023 7812371.126348681747913,-617841.764257631846704 7812783.359992402605712,-617470.736394818057306 7812645.260254616849124,-616802.708130566054024 7811067.273704010993242,-616542.999758546706289 7810690.523438804782927,-611669.655090598738752 7809102.040678926743567,-610154.59682090242859 7807559.343907156959176,-609196.024685681215487 7806817.315674694254994,-606660.278004901716486 7805502.49158538132906,-604279.376735813450068 7804816.998059210367501,-603568.156509135616943 7805160.559507402591407,-601805.635011404636316 7807159.322441205382347,-601589.118601813795976 7807788.465960723347962,-613667.283352882950567 7817038.311246092431247,-620179.473564288811758 7818410.747884599491954,-623260.574430465232581 7827969.293726892210543,-620922.865123808383942 7828243.992341386154294,-620440.517770200152881 7828381.551621166989207,-614545.482815750874579 7833885.146406440995634,-611422.30318205524236 7836293.246456510387361,-608113.665276698418893 7839620.557572393678129,-607680.74377700232435 7840252.401793340221047,-607000.470368765760213 7841515.008862649090588,-606536.602050628629513 7844958.087682005949318,-606505.766551678767428 7845934.345557653345168,-606722.171641781111248 7846508.418343406170607,-607557.067822732031345 7846795.367694462649524,-608051.882959307404235 7846451.567277518101037,-612628.338545308448374 7842547.43750178348273,-627013.265784599003382 7836236.472041836939752,-640210.859335084445775 7830618.52940653078258,-642251.56824030878488 7829930.761168906465173,-643210.251695018494502 7829987.48834,-644385.228920342051424 7830733.438585777767003,-647539.355372478836216 7834286.78724660910666,-647786.707281022332609 7834859.977581156417727,-652332.327368073398247 7852827.956705703400075,-653105.329912142129615 7856334.561169553548098,-653600.0337292291224 7858692.871928527019918,-653507.304593397071585 7861281.007063504308462,-653352.681820685626008 7862202.403903632424772,-651342.697094922652468 7872913.17629714589566,-651188.18564169970341 7873720.426309539936483,-650074.99073376704473 7878101.743621313013136,-648281.411098106415011 7879254.827275008894503,-647601.137689869734459 7879543.22950364369899,-646859.081964242155664 7879484.468473402783275,-643086.575740748201497 7877525.267772515304387,-640118.018879764014855 7873893.049169539473951,-640056.12524288170971 7872164.716177927330136,-629573.614072841941379 7864964.159620930440724,-629017.016618875553831 7864676.313102686777711,-628151.173619486391544 7864791.740520105697215,-625615.649577689473517 7868131.609398076310754,-615689.624542124685831 7868879.877630474977195,-613555.963862088508904 7869571.194842795841396,-613215.882817715872079 7870205.545405966229737,-614236.237270328099839 7872854.674249721691012,-614669.158770024077967 7873258.18162261787802,-616184.328359208768234 7873834.539537319913507,-628244.014074806822464 7873834.539537319913507,-629357.097663251101039 7873028.72954398393631,-629666.343208673992194 7872509.687341340817511,-630346.616616910556331 7872278.598483220674098,-631088.894981520716101 7872509.687341340817511,-631645.381115995813161 7872970.226602180860937,-634026.393704575370066 7875333.732390355318785,-646797.188327359966934 7891606.597063598223031,-646920.864281630259939 7892358.649822859093547,-647601.137689869734459 7929017.73373890016228,-647508.519873528974131 7929947.43554084841162,-646055.132601732388139 7936453.750260568223894,-645560.317465157015249 7936918.208939758129418,-641973.380832815426402 7938952.122039064764977,-640643.66951528924983 7939533.311057654209435,-636407.406293152133003 7939940.400292767211795,-634143.835767362150364 7936511.073791701346636,-633494.509177563712001 7936057.727708416059613,-632919.321368635050021 7935500.026021576486528,-632659.724316104082391 7935117.022257612086833,-632566.883860783651471 7934663.760055215097964,-630563.133026504190639 7923679.39423421677202,-630253.887481081415899 7922519.503797773271799,-627965.60402833390981 7919967.704824518412352,-625027.993985790759325 7918112.336429358460009,-624193.209124331129715 7918169.729328504763544,-623667.55848880589474 7918575.874836660921574,-621410.221854499424808 7929076.672759066335857,-621255.487762296805158 7929889.952898746356368,-621224.652263346943073 7931689.053946394473314,-621472.00417189032305 7932386.14859145693481,-623110.961034839507192 7934535.337236318737268,-623574.718033485347405 7935058.663480984047055,-626234.029349043848924 7936337.221653243526816,-627248.26122966373805 7938883.478980027139187,-628287.317356726736762 7941184.408787708729506,-628361.456137596396729 7941673.234974321909249,-628324.275427668937482 7942860.157449363730848,-628231.546291839680634 7943383.224831480532885,-628336.631891147699207 7946281.064851129427552,-627347.224256976507604 7948200.796302387490869,-626512.32807602849789 7949307.226450100541115,-624626.130624027107842 7951286.842921422794461,-607526.121004290995188 7937732.33601164072752,-604959.650144052924588 7945990.308970609679818,-604526.728644356946461 7946514.431799842976034,-603908.237553508370183 7946862.819797440432012,-594291.569382860558107 7950704.746014703065157,-580809.554533395334147 7946514.431799842976034,-570790.800362001406029 7939940.400292767211795,-569059.114363220171072 7937848.886202761903405,-568038.648591119563207 7936046.640213362872601,-567543.833454544190317 7939649.889119885861874,-577686.374899699701928 7956470.265770964324474,-578552.21789908898063 7957461.056297087110579,-579201.544488887302577 7957811.629775521345437,-585849.767118042218499 7961250.465410741046071,-600908.845193574321456 7973854.564676746726036,-603011.559055169345811 7976307.548231040127575,-606474.819733237614855 7981392.704365523532033,-607155.093141477089375 7982621.27393816690892,-607278.769095747498795 7983380.784882804378867,-607124.146323036053218 7984257.854495175182819,-606598.495687510818243 7985779.179341798648238,-605918.222279271343723 7987066.176389486528933,-605423.518462187144905 7987591.695122256875038,-604093.807144660851918 7988061.007049136795104,-603259.022283204016276 7987884.274385861121118,-602052.986919948132709 7987124.097493473440409,-599362.728785948478617 7984902.142712042666972,-598002.181969472323544 7983323.103143072687089,-592157.90870282438118 7980866.145831926725805,-591199.336567603168078 7980750.610945212654769,-589715.113796856720001 7981335.0378831140697,-588787.377160585368983 7982094.418839399702847,-588323.620161942322738 7982736.83758675865829,-587921.534161196090281 7983323.103143072687089,-587736.075889534782618 7984082.895566093735397,-587086.749299736460671 7991981.79173366446048,-587148.531617127358913 7998599.807165185920894,-588972.835432246560231 7998659.504852728918195,-589715.113796856720001 7999069.807454286143184,-600723.275602421839722 8018431.190336863510311,-601001.685648897662759 8019841.626250470988452,-601032.521147847524844 8020722.754477177746594,-600692.328783983481117 8021546.010058880783617,-600259.407284287502989 8022015.968499384820461,-599641.027512930217199 8022369.356017152778804,-597909.452833640272729 8022133.833024359308183,-597352.855379673885182 8021781.726189978420734,-579263.326806278317235 8020195.122884506359696,-564575.38791304838378 8023133.11083422973752,-565008.309412744361907 8023662.854025566019118,-565750.47645786323119 8024014.837532888166606,-570667.124407730996609 8027955.937233332544565,-574934.223128817975521 8035959.68358915951103,-576047.529356241808273 8041203.385971928946674,-575398.091446952195838 8044386.261420330032706,-568780.815636238432489 8074868.760789718478918,-557123.215921383700334 8099415.407776706852019,-556411.995694705867209 8099770.971848774701357,-531241.434311947785318 8095199.95998945645988,-530777.565993813448586 8094784.357843668200076,-523387.176319536927622 8085590.826406757347286,-520604.189049705222715 8078301.782386076636612,-523418.123137978021987 8075223.372269520536065,-525180.644635709119029 8071908.709219836629927,-530004.452130253543146 8062743.239921129308641,-530282.862176726572216 8061797.166084506548941,-530375.591312558623031 8061029.459855251014233,-529509.748313169460744 8060852.488041212782264,-527809.009132829261944 8062092.442314919084311,-519645.61691448680358 8070607.066419521346688,-512502.579148753720801 8078065.986186530441046,-511915.146195837529376 8079487.698417447507381,-511729.576604684989434 8080315.733670183457434,-511853.252558955340646 8082983.001542908139527,-512224.280421769130044 8084522.79272423312068,-512038.822150107880589 8085471.958768862299621,-511513.060195091413334 8086953.777882027439773,-510801.951287904870696 8088199.561293347738683,-509657.809561531117652 8088970.061423582956195,-508173.586790784611367 8089326.836931832134724,-507183.95651763107162 8089207.909870199859142,-501679.875614849908743 8087546.545090313069522,-498278.397254169743974 8086123.299794014543295,-494351.379577455518302 8084049.108346101827919,-493392.696122745866887 8083041.455331252887845,-493021.668259929225314 8081560.624665834009647,-476138.28636927792104 8080257.087929943576455,-454245.416073438420426 8084879.356033937074244,-434517.153276070428547 8085530.645427478477359,-428394.469962949573528 8085887.256811025552452,-421375.219470980868209 8087310.45716312341392,-420787.675198573386297 8087665.445721377618611,-415252.647477351187263 8092885.275407262146473,-413459.179161181848031 8095022.391411495395005,-412902.581707215518691 8095438.006797193549573,-407460.283121822518297 8098643.829944353550673,-398090.855540224059951 8099118.654087081551552,-395555.331498427141923 8096386.850399338640273,-375548.658654586179182 8093538.971891729161143,-374590.086519364907872 8093419.977784346789122,-374126.329520721861627 8093953.009243484586477,-373848.030793737270869 8094725.598479961045086,-373105.863748618459795 8097099.417133331298828,-373013.023293297970667 8097870.835473631508648,-373445.944792991154827 8098405.894752212800086,-375517.711836145084817 8100306.16723853815347,-373353.21565716189798 8107378.280827051028609,-353594.006041355663911 8104999.482320887967944,-336803.353286533616483 8104584.832319096662104,-336153.915377246856224 8104168.707757766358554,-335720.993877550819889 8103633.235558656044304,-335473.641969007323496 8101554.178867178969085,-340142.93801033165073 8063392.604688522405922,-340668.588645856885705 8061857.156421818770468,-346172.780868132074829 8047923.385589182376862,-347533.327684605377726 8045328.65198933146894,-356500.669265457661822 8032309.962860098108649,-357180.942673697136343 8031545.272726823575795,-371528.80052255152259 8025720.170140256173909,-373291.32202027970925 8025720.170140256173909,-374002.653566448716447 8025486.023802507668734,-374497.357383535709232 8025074.274242480285466,-376476.395290857530199 8023133.11083422973752,-380743.605331435683183 8018666.808598809875548,-383186.51155689463485 8015143.24778114259243,-383650.268555540533271 8013498.231480834074318,-384701.569826591003221 8010739.590764750726521,-385443.736871709814295 8009448.530157785862684,-387762.967142895620782 8005811.684202768839896,-390855.088638661720324 8002057.570771335624158,-391318.956956795998849 8001531.038887433707714,-396977.77195178263355 7996607.69540289323777,-410150.541255822114181 7986188.989530861377716,-428023.442100135725923 7971519.453974159434438,-444937.882128722209018 7956937.639161167666316,-446576.727672180102672 7951985.754060111939907,-444412.120173702889588 7948491.847107759676874,-444288.444219432538375 7946746.13001958001405,-446947.75553499389207 7939592.332400450482965,-457152.190617031650618 7936279.690240683965385,-458636.413387778156903 7936046.640213362872601,-472334.833327345666476 7940116.01010284665972,-485198.468405450694263 7945349.345031703822315,-486064.200085351476446 7946397.747421329841018,-487362.964584436675068 7947096.204778944142163,-488939.916491012379993 7947444.619698722846806,-488816.24053674202878 7945816.028407109901309,-484703.653268875321373 7938487.328670262359083,-483745.081133654108271 7937615.787623856216669,-478395.623003584390972 7935116.185569444671273,-476818.559777514601592 7934651.837974960915744,-461945.051293135038577 7930701.857473563402891,-450089.525523651856929 7928426.070037759840488,-437083.624136311351322 7926986.500280544161797,-431332.080005495459773 7928612.697196708060801,-428641.933190984243993 7929599.82901843637228,-427652.414237321936525 7930585.417793459258974,-426879.411693253205158 7931805.510682204738259,-425982.621875422948506 7934884.844857013784349,-425271.401648745173588 7936163.164325813762844,-424281.882695082807913 7937208.614772326312959,-423261.416922982200049 7937963.764188178814948,-421715.300515353563242 7938196.873535867780447,-420231.077744607056957 7937673.119998597539961,-420014.672654504713137 7936104.169846131466329,-420540.323290032742079 7934535.337236318737268,-424776.697831661032978 7926986.500280544161797,-425580.647194168006536 7925768.64966340828687,-430311.72555288329022 7918865.57472250238061,-439062.662043633172289 7908146.58032916020602,-439928.505043022334576 7907162.461284330114722,-441783.755676585482433 7905079.811781695112586,-442804.221448686090298 7904210.457456498406827,-444041.09231088910019 7903574.702651378698647,-445401.750446856487542 7903112.293419815599918,-446613.797062613535672 7904153.170669857412577,-447615.672479751810897 7904430.651081283576787,-447819.832425866683479 7905264.19527112878859,-447560.012734356045257 7906271.404502338729799,-447077.665380747814197 7906966.153020571917295,-447102.378307705337647 7909014.929189451038837,-447442.45935207803268 7910404.995669922791421,-448741.335170654463582 7911100.124978921376169,-454771.178028454887681 7909999.498406771570444,-456162.560343878110871 7909536.69526182487607,-478302.782548263901845 7899235.835779253393412,-491630.174625014828052 7884100.57384237088263,-493794.782123489188962 7878562.623791472055018,-492836.098668779537547 7877639.230882221832871,-491444.60503386228811 7878101.743621313013136,-487393.911402877769433 7881620.299819244071841,-483528.676043551706243 7885370.315649603493512,-482044.341953313967679 7887680.542311573401093,-480065.304045992146712 7889585.410506851039827,-474159.248461956100073 7895247.137175536714494,-473046.053554023441393 7896114.002969663590193,-470634.094147005584091 7897269.840144312009215,-466583.289196526980959 7898600.708038398995996,-454270.129000393091701 7897339.77043295931071,-450472.909849944408052 7892647.344837240874767,-457677.729933065653313 7883407.926264720968902,-465253.689198494772427 7875966.906469878740609,-468747.896695004194044 7870493.602512794546783,-470757.770101275877096 7866230.690129267051816,-472056.534600361075718 7863008.511050662957132,-471438.154829003789928 7861627.139160297811031,-470355.795420020993333 7860764.220518350601196,-468995.248603544838261 7860130.661469206213951,-467170.833468934404664 7860073.707959663122892,-465222.742380053678062 7860821.179227720014751,-462965.517065238498617 7862317.793566293083131,-449885.365577536984347 7874238.099226651713252,-449545.284533164289314 7874872.841586108319461,-417908.619208186864853 7888958.786186242476106,-405141.164170125091914 7892877.601583448238671,-405419.462897109682672 7892242.800532267428935,-405481.245214497845154 7891317.733876523561776,-405048.323714804660995 7890856.074836248531938,-403471.260488734871615 7890510.264954649843276,-400533.761765683011618 7891260.54485116712749,-399946.217493275587913 7891490.759310797788203,-392092.070820355962496 7896923.736378288827837,-390329.438003136485349 7899062.84092173166573,-389989.356958760938141 7899583.711087840609252,-389278.136732083221432 7900972.041050185449421,-388906.997549778141547 7902475.17324258107692,-389030.673504051344935 7903226.851625133305788,-389308.972231033083517 7903921.319862603209913,-389463.595003744470887 7904731.891367718577385,-389339.919049474177882 7905542.549955304712057,-388288.617778423707932 7906526.457714224234223,-371776.263750583399087 7909420.581991241313517,-366179.231072987720836 7909942.167647610418499,-365468.122165801178198 7909593.814474460668862,-365127.929801937250886 7908957.605912234634161,-364695.008302241272759 7907683.890837426297367,-363025.215940342226531 7905542.549955304712057,-361355.423578443238512 7904210.457456498406827,-358819.788217155088205 7902823.19789909478277,-347687.839137828384992 7898657.744530385360122,-342956.760779113159515 7897385.76660100184381,-338627.76842114405008 7896691.899435234256089,-337854.654557584086433 7896807.817016750574112,-336463.160922669689171 7897328.739719396457076,-332783.495154498959891 7899178.794918777421117,-330340.588929040008225 7900451.075067641213536,-327557.601659208361525 7902359.168590290471911,-325454.88779761333717 7903921.319862603209913,-322610.118210390734021 7906005.108143300749362,-317569.794306252617389 7905772.992066564969718,-310643.27295011311071 7905079.811781695112586,-309715.536313844611868 7904963.767082164995372,-294532.782284039305523 7902069.893661243841052,-286091.091338712256402 7900335.101523214951158,-279411.921891116246115 7898657.744530385360122,-272114.372672162950039 7897963.760438520461321,-267197.724722298036795 7897558.931159135885537,-266300.934904467780143 7897558.931159135885537,-243356.7633375749283 7898022.66542839538306,-241872.540566828451119 7898311.577123300172389,-241254.04947597993305 7898716.65493624471128,-238254.657116045884322 7902591.179678102955222,-237265.138162383547751 7903574.702651378698647,-235997.320481739443494 7904037.348531575873494,-231049.837032924639061 7904442.525470707565546,-225112.834630444674985 7903285.589415747672319,-214815.670412577688694 7899930.14504277240485,-213547.964051424816716 7898427.519579872488976,-207054.252875490114093 7888199.172672216780484,-202817.878333859000122 7879311.92547438852489,-198303.316384740202921 7864159.294496933929622,-197499.367022230406292 7861108.671914548613131,-197406.637886398326373 7854322.990328399464488,-206590.495876844244776 7842088.746601978316903,-218062.526000543613918 7828384.026473658159375,-219515.913272343081189 7825863.601808241568506,-220165.239862138638273 7824547.326105579733849,-228668.824444345053053 7804931.516813184134662,-229503.72062529597315 7801962.811673324555159,-229967.588943430251675 7799165.990141354501247,-230987.943396042450331 7791122.989050498232245,-230833.320623331033858 7789584.147735708393157,-230122.21171614449122 7787646.418826683424413,-233028.874940246489132 7774495.652985092252493,-241223.213977030070964 7760230.884563897736371,-243820.631655709206825 7754952.597663755528629,-244500.905063948710449 7752400.481745673343539,-244624.581018219032558 7748997.49494818225503,-244531.851882386981742 7748317.080172518268228,-243758.849338318250375 7746333.734569543972611,-243264.034201742877485 7744237.296253849752247,-243387.710156016051769 7743387.828892803750932,-244253.553155405214056 7740215.758440879173577,-247098.32274262784631 7733140.913110285066068,-257766.514823308651103 7719122.511986598372459,-258725.086958529893309 7718106.517623537220061,-261384.3982740912179 7716186.905936138704419,-266053.58299592428375 7713590.457735167816281,-268867.517084197024815 7710939.047380668111145,-275855.932077215868048 7702143.837288377806544,-274155.192896875785664 7698314.539894165471196,-272519.464299161103554 7698975.094941437244415,-272516.347353417892009 7697357.262322466820478,-272609.076489249942824 7696455.641799354925752,-277030.909302539541386 7681663.037227843888104,-281329.177481049962807 7674472.698798686265945,-282225.855979389045388 7673462.630366805009544,-284019.32429555838462 7671498.855806524865329,-293976.184830072976183 7663141.435322283767164,-302881.855413025536109 7656360.649141668342054,-322300.872664967842866 7651321.164282594807446,-329351.06997537764255 7649754.887664054520428,-338009.277330298325978 7649418.262652226723731,-338937.013966566883028 7649530.469344235025346,-339740.96332907670876 7649530.469344235025346,-341781.783553789544385 7648915.669382249936461,-342956.760779113159515 7648244.119312001392245,-364911.524711834848858 7629915.075025547295809,-363427.190621597168501 7627626.573646485805511,-362066.643805121013429 7628017.48509035166353,-355449.367994407191873 7630194.177923261187971,-354861.823721999768168 7630473.090040261857212,-333463.768562735640444 7641309.289712944999337,-326413.45993283460848 7647068.746383736841381,-324960.18398052919656 7648411.699174717068672,-324372.639708121772856 7648691.47709843236953,-322919.363755816419143 7648971.06381553504616,-321094.948621203133371 7648803.471704076044261,-319486.938576695101801 7648411.699174717068672,-313395.31340150651522 7646566.307377055287361,-312684.09317482879851 7646286.808491548523307,-312158.44253930071136 7645056.168235054239631,-311601.84508533438202 7642204.428688069805503,-311478.169131064030807 7641421.377597996033728,-311663.73872221657075 7640638.40658716391772,-312034.766585030360147 7639912.252921585924923,-312745.986811708135065 7637788.110612540505826,-313395.31340150651522 7633152.0074393870309,-313178.9083114041714 7630976.081866908818483,-312158.44253930071136 7627793.702922924421728,-311756.46785804576939 7627292.526894922368228,-308509.612270079844166 7624893.161413862369955,-307891.121179231326096 7624614.251534318551421,-303995.050320958252996 7623330.674066665582359,-303160.042820518894587 7623163.642095295712352,-301026.493459974066354 7623330.674066665582359,-297810.58469044638332 7623051.821042924188077,-297099.364463768608402 7622829.789821380749345,-294285.430375495867338 7621714.912913407199085,-293759.779739970632363 7621379.5180489635095,-293172.235467563150451 7620933.953315561637282,-287853.724155934585724 7615137.349097966216505,-287451.638155188411474 7614636.999875476583838,-286956.934338104270864 7613355.091710519976914,-287513.531792070600204 7611963.141626984812319,-287946.453291763784364 7611461.596299202181399,-297594.179600343981292 7601724.446844118647277,-298119.830235872068442 7601334.873461414128542,-298676.427689838397782 7601001.970049493946135,-310364.974223131372128 7595830.910002659074962,-313920.964037031750195 7595165.594859323464334,-315528.974081539781764 7595054.181212953291833,-316920.467716457031202 7595609.665314739570022,-318126.391760218946729 7596388.050776469521224,-320043.536030661431141 7598054.913334996439517,-320631.080303068854846 7598444.320255909115076,-321465.976484016922768 7598722.07991551514715,-324681.885253544605803 7599332.866336463950574,-326351.677615443593822 7599389.304494322277606,-329165.500384225160815 7598777.112741439603269,-331299.161064261279535 7597276.358836718834937,-349048.497273792978376 7581065.317415105178952,-349821.499817861651536 7579956.491092479787767,-350780.071953082922846 7577017.498022471554577,-350965.641544235462788 7576297.541288631036878,-351120.264316946850158 7575464.726476661860943,-371961.722022244648542 7563227.131259656511247,-372549.266294652130455 7562895.874992564320564,-377651.372516181145329 7560627.262566416524351,-378393.539561300014611 7560516.348538427613676,-379537.681287673767656 7560903.85765680577606,-383062.835602624283638 7562231.811890984885395,-389339.919049474177882 7565274.543847040273249,-397565.204904698824976 7569094.105296235531569,-398802.075766901834868 7569371.005079376511276,-414077.558932536339853 7569704.135312742553651,-416025.76134091115091 7569482.046886702999473,-414881.508295046107378 7564555.486709290184081,-414696.050023384857923 7563891.280305773951113,-414263.128523688821588 7563503.819858563132584,-408140.556530059140641 7559852.490822587162256,-407645.852712975058239 7559576.132633647881448,-405883.219895752728917 7559410.481763506308198,-384577.893872320652008 7556811.902430122718215,-362314.107033155742101 7552776.826681492850184,-343760.821461114217527 7548081.022501940838993,-341472.53800836665323 7547363.769054974429309,-339864.63928334985394 7547196.98937339708209,-335968.457105585548561 7548357.166992150247097,-326722.705478257441428 7552335.223885111510754,-325547.728252933826298 7552942.334798093885183,-323970.665026866889093 7554047.272246405482292,-323537.743527170852758 7554434.455671532079577,-322331.819483408937231 7556148.364274887368083,-319023.181578049203381 7562673.983103074133396,-319301.368985542561859 7564057.027702260762453,-318961.287941169866826 7564777.432889114134014,-315467.08044466044521 7568596.747359578497708,-313951.91085547284456 7569758.761276684701443,-311045.24763136805268 7570423.474722015671432,-309715.536313844611868 7570645.590345293283463,-295800.59996468340978 7570312.419316792860627,-292893.936740581411868 7569316.182516302913427,-289492.569699392479379 7567045.675645722076297,-278546.190211218316108 7558968.498099136166275,-264414.737452466390096 7549848.399131523445249,-251612.996011237875791 7542230.241054864600301,-237141.462208113225643 7535720.335092523135245,-231513.594031567685306 7532027.797824158333242,-230740.591487498953938 7529327.976146135479212,-230245.887670414813329 7528116.131043621338904,-229441.82698841378442 7526629.099938415922225,-225050.940993565309327 7519913.474413640797138,-224154.151175735023571 7517713.327905870974064,-222731.822041867912048 7514797.99668319709599,-220412.591770682105562 7510125.272428570315242,-219701.371544004359748 7509136.78989080619067,-206095.680740268871887 7490478.097748532891273,-202570.526425318355905 7485929.910419275052845,-202106.769426672486588 7485492.119016253389418,-201302.708744671428576 7485272.44384728372097,-200560.653019043820677 7485382.280651124194264,-199787.539155486680102 7486477.579002642072737,-194469.027843855234096 7484121.519027896225452,-188129.939440631947946 7480289.821888767182827,-182347.559810866252519 7475857.32638812251389,-181883.691492731973995 7475418.529584723524749,-176039.418226084060734 7456677.510080561973155,-175946.689090251980815 7455914.676412967033684,-175142.739727745007258 7443754.263998881913722,-175390.091636285651475 7442011.196263050660491,-175853.848634931520792 7440540.640794043429196,-176472.339725780067965 7439233.453278854489326,-177338.182725169230253 7438253.991325831972063,-178049.40295184700517 7437110.037714576348662,-177956.562496526545146 7436349.128685318864882,-174307.84354679408716 7417809.609601859934628,-169267.519642655999633 7393792.016803870908916,-168649.028551810304634 7390977.905956174246967,-165309.443828012299491 7379298.831445632502437,-164845.686829366430175 7377946.876151707023382,-157269.727563940134132 7361758.011458271183074,-153775.520067430712515 7357284.659233413636684,-151951.104932817455847 7347860.924530738964677,-149786.608753834327217 7336944.275824505835772,-145210.153167830518214 7317622.426306694746017,-144437.039304273377638 7316122.332562279887497,-129718.153592605231097 7294178.357548218220472,-118153.283013582564308 7287927.555536055937409,-116205.191924698985531 7287126.684592095203698,-97497.283579946044483 7278907.789901481941342,-62864.565479760218295 7261591.033455641940236,-58040.757985212912899 7255897.863052013330162,-57391.43139541734854 7254834.347549501806498,-50928.667037923740281 7241869.529856295324862,-48547.654449344146997 7236774.895556156523526,-46939.755724327347707 7233327.934445875696838,-43785.629272190635675 7221986.62048604991287,-43878.469727511095698 7221298.633067520335317,-43723.846954799671948 7220663.122711667791009,-42517.811591546545969 7218704.495867410674691,-29221.366333233909245 7203262.226720285601914,-22322.786169283550407 7198941.059439612552524,-16883.493210142518365 7196979.093343337997794,-13018.146531328051424 7195236.483973870053887,-9183.857990445914766 7192704.678075519390404,-8719.989672308809531 7192281.523447135463357,-8348.961809494998306 7191384.579215992242098,-9060.182036172755033 7190277.925429258495569,-12523.442714243914452 7188800.477487282827497,-15151.807211364155592 7188273.31856971886009,-15739.351483768754406 7188009.65743596944958,-17934.7944811958223 7186849.767187124118209,-19357.234934551335755 7185637.863441759720445,-22573.143704079011513 7180526.04657600261271,-23222.470293874572235 7179315.115291157737374,-23748.120929402637557 7176944.610452360473573,-24026.419656384390692 7175207.944100338965654,-24057.366474825488694 7174418.487306429073215,-23933.69052055515931 7172997.436967807821929,-23624.444975129481463 7171734.243582827039063,-19047.989389128488256 7155333.763346898369491,-18615.067889432481024 7154126.883325332775712,-14193.235076142913385 7144419.583237870596349,-12554.389532685012455 7141903.851127652451396,-11070.055442447301175 7139859.807250598445535,-5998.896039359338829 7132945.150711892172694,-1453.387271796612822 7126454.647970298305154,6802.845401866325119 7114535.516876447014511,7143.037765733103697 7114013.294071231037378,14069.559121869755472 7103259.068428840488195,15708.404665330488569 7099869.971333506517112,16636.029982110634592 7097523.180019559338689,17099.89830024490584 7095647.785760648548603,17161.791937127101846 7094917.824832899495959,16914.328709092384088 7093250.666907691396773,16357.73125512605111 7091948.584406548179686,15986.703392312239885 7091374.970827462151647,15646.622347939526662 7090854.272903649136424,13141.933805089611269 7088093.851516155526042,12554.389532685012455 7087833.512305855751038,12678.065486955338201 7088511.461712021380663,13296.445258312633086 7089708.370436475612223,13729.366758005808151 7090177.622965916991234,15120.860392923057589 7092416.469308666884899,15337.376802516677344 7093146.199853925034404,15461.05275678700491 7093980.474272617138922,15399.159119904808904 7094708.848143745213747,14533.427440006860706 7096324.902930244803429,12152.414851430103226 7098357.915437852032483,9926.025035564769496 7099765.416969142854214,7514.065628546914922 7101017.156620991416276,4916.647949867770876 7102111.558406238444149,3308.637905356901229 7102269.094118965789676,1886.197452001386409 7102164.508081651292741,1236.870862202992612 7102008.476542888209224,0.0 7101431.130250592716038,-3865.235359323234661 7099556.312380300834775,-5751.54413081585426 7099088.193391886539757,-7946.987128240089078 7098983.6493452610448,-8781.883309191005537 7099139.62131068110466,-9524.050354309860268 7099348.714900440536439,-11781.275669125057902 7100703.452239817008376,-14440.586984686398864 7102529.90804523229599,-15801.133801159716313 7103780.582278254441917,-19109.883026007850276 7108896.130520159378648,-25758.105655165585631 7117618.029234312474728,-27767.979061437297787 7119133.956766422837973,-30334.561241166575201 7120230.866400840692222,-32715.5738297433345 7120440.517842062748969,-39772.005031639557274 7119290.514422331005335,-42406.492100752147962 7118537.485432622022927,-47044.8413236353299 7116844.466846497729421,-61132.990800470259273 7114691.983569264411926,-62431.643980064211064 7115265.972014978528023,-63359.380616335591185 7116102.580198654904962,-64317.952751556833391 7117618.029234312474728,-65245.578068336981232 7118558.370577606372535,-67441.021065761218779 7119133.956766422837973,-68987.13747338988469 7119185.703244997188449,-70378.631108304296504 7119029.147663258016109,-72852.372832713124808 7118297.028005286119878,-75047.927149628594634 7117147.336107071489096,-76068.281602240793291 7116520.165038150735199,-80026.357416884493432 7113489.789485096000135,-79500.706781359258457 7112237.39263603463769,-77150.641011223589885 7110930.869420263916254,-57855.188394060387509 7110774.477065208368003,-56203.986387123732129 7110994.028747262433171,-50971.970319840766024 7112811.203073807060719,-43439.314336331510276 7115037.086310275830328,-34014.338328828525846 7116102.580198654904962,-33148.495329439341731 7115946.085611619055271,-32035.300421506675775 7115162.718728709965944,-29437.771423336296721 7111818.529763979837298,-26891.22675194972544 7107538.487896650098264,-25665.376519333523902 7104772.2481803689152,-24799.533519944343425 7103103.015324712730944,-23067.847521163148485 7100547.449480059556663,-13049.093349769149427 7091374.970827462151647,-11224.678215158724925 7089708.370436475612223,2999.39235993405282 7077844.556699980981648,9493.103535868762265 7073477.113162075169384,13667.58444061767841 7071294.85356701631099,14316.911030413239132 7071190.675311959348619,15584.728711057330656 7071503.21417944226414,16357.73125512605111 7071294.85356701631099,18769.690662143904774 7068542.72491695266217,24150.095610654716438 7060495.834362633526325,26221.97397329985688 7057227.455532013438642,27551.573971334910311 7053702.691632498055696,28386.470152285826771 7051318.207518306560814,30056.262514184825704 7047328.003556433133781,37724.950915440334938 7026842.449465845711529,37879.573688154589036 7026223.675435506738722,39394.743277342167858 7017703.54502615891397,39673.042004323913716 7015691.064074957743287,39827.664777035337465 7012802.331687585450709,39703.988822765015357 7010533.268185496330261,39425.690095780431875 7008832.683048966340721,38034.196460866012785 7000744.142090866342187,37477.599006899683445 6999455.637281239032745,36642.702825948763348 6998529.473448576405644,36086.105371982434008 6998272.235094723291695,30798.429559303680435 6995389.620075249113142,22696.81965834933726 6988188.652830772101879,19295.341297669139749 6984693.007271611131728,3586.936632341484255 6967700.700297676026821,204.827863059429347 6961354.904452924616635,4.118821158642184 6960748.381152370944619,730.478498584664521 6960382.423402433283627,3123.179633695612665 6960984.860740495845675,6431.817539052513894 6962521.779506586492062,7668.688401258338672 6962830.084335071034729,8379.908627936096309 6962880.823850900866091,9616.77949013908983 6962624.546462242491543,13605.690803735482405 6960369.880792428739369,16419.624892008247116 6958730.657132527790964,17501.872981499815069 6958013.141398175619543,18398.662799330093549 6957194.282124228775501,19109.883026007850276 6956221.01618991792202,19604.586843094821234 6955145.012053399346769,20810.510886856714933 6953047.063392200507224,24242.936065978010447 6947366.213923020288348,26036.404382147335127 6945729.651186262257397,26562.055017672570102 6945371.375487064942718,27149.599290080001083 6945218.38596916012466,40446.044548392637807 6942457.344716001302004,42177.730547173829109 6942662.365329,47589.082314125742414 6950231.556555071845651,47929.274677989684278 6950795.094542960636318,48207.573404971437412 6951409.339027897454798,48640.383585176212364 6952892.452899684198201,48795.006357887636113 6954479.978540019132197,49351.603811853965453 6957809.017993129789829,49568.120221447585209 6958577.227644670754671,54391.927715992067533 6970264.733117944560945,55010.418806840592879 6971443.991594145074487,60205.254164198879153 6976475.109277882613242,60761.851618165215768 6976731.646268778480589,61473.071844842968858 6976885.424551932141185,74274.813286068630987 6978579.214623173698783,97713.799989536826615 6977039.020959897898138,98270.397443503155955 6976936.068528628908098,98981.617670183753944 6976576.57717508263886,100032.918941234223894 6975190.51514136698097,101022.437894896560465 6974317.973807644098997,101486.30621303083899 6974164.244926761835814,104887.673254219800583 6973907.790346711874008,107948.95925103603804 6973754.069356176070869,110731.946520867713843 6973959.893564954400063,111968.817383070709184 6974267.161650827154517,131789.920635759131983 6971702.029529605060816,142736.300123933295254 6969598.25660895742476,145364.66462105352548 6968520.451404427178204,150559.611297903058585 6966316.176463145762682,152816.947932209470309 6964982.645179284736514,155105.120065462950151 6963342.475979395210743,159434.223742923291866 6959857.679534072056413,163485.028693399042822 6956118.331462082453072,167381.210871166200377 6952995.096242647618055,168896.380460350948852 6951869.039928879588842,170411.550049538520398 6950743.142012432217598,183151.509173376049148 6940771.368832439184189,184450.16235297001549 6939492.494155977852643,186491.093897174054291 6936530.21165746729821,187727.964759377064183 6934435.662508975714445,189521.433075549197383 6930605.805748995393515,190047.083711074432358 6928819.802187663502991,191593.200118703127373 6923412.401603175327182,194128.835479991306784 6914339.203927177004516,194407.134206973045366 6913066.004571549594402,194437.969705922907451 6912402.986624144017696,194695.785646599862957 6896365.875638592988253,194747.215251348592574 6882968.021011236123741,192613.665890803735238 6874853.687078119255602,192922.800116735335905 6871508.525462773628533,192211.579890057590092 6869430.860741080716252,187656.942924250528449 6859341.447053607553244,181450.769993035966763 6835510.802980235777795,181203.418084492470371 6833190.392235824838281,180894.172539069637423 6831576.90237505082041,176843.367588593857363 6815608.435005615465343,176565.068861609295709 6815005.921839358285069,175853.848634931520792 6813948.643314179964364,154765.039021090226015 6794701.802072428166866,148487.844254749128595 6787326.975443679839373,147900.29998234170489 6787176.778137777000666,146694.375938579818467 6789934.75064180791378,142581.677351221849676 6797011.191011169925332,141839.621625594241777 6798015.10141293797642,140788.209035049716476 6798768.206314632669091,130274.751046571574989 6804797.740561540238559,129656.259955723042367 6804746.722058184444904,129161.556138638901757 6804345.098265840671957,128975.986547486376367 6803692.230778751894832,134511.014268708619056 6791239.58527840860188,142272.431805796193657 6778656.016567568294704,142921.869715085806092 6778606.424803573638201,143478.467169052135432 6778355.945947512984276,144004.117804577370407 6778005.216421492397785,144189.687395729910349 6776603.351461161859334,143200.168442067573778 6773949.216687950305641,142519.895033830893226 6772997.660275300033391,140942.83180776113295 6771096.503788461908698,136211.753449048701441 6765642.724229828454554,134511.014268708619056 6764042.46069797873497,133552.44213348737685 6763342.073372521437705,131511.621908774570329 6762192.892293113283813,126038.376504940461018 6759893.218902990221977,123750.093052195763448 6759244.10193270817399,121152.675373516613035 6758744.525903027504683,116885.465332938474603 6758744.525903027504683,115463.024879580130801 6759143.896425941959023,115122.943835207406664 6759643.497030454687774,111041.192066290561343 6765992.919597920030355,109835.268022525837296 6768744.954912657849491,108969.425023136645905 6768443.990007927641273,104269.293482862500241 6765443.416698913089931,103310.721347641258035 6764742.90846889000386,95969.757527279711212 6759293.39558017347008,80613.901689291917137 6750852.533052319660783,78387.511873426585225 6750054.446868528611958,77892.696736851212336 6749555.435738545842469,77954.590373733415618 6748956.375352870672941,84448.190230176885962 6744514.751922972500324,85068.573752367883571 6744607.953119589947164,96074.843126587686129 6748157.217780648730695,97157.202535570497275 6748706.989508566446602,97961.151898080308456 6749504.763654035516083,100125.648077066274709 6752040.73228117916733,100366.877413614580291 6752250.495980084873736,100700.835885994951241 6752430.785646853037179,102290.25557554065017 6753349.73194455076009,103094.204938050475903 6753299.036188274621964,103712.696028896170901 6752999.901713343337178,104609.374527238047449 6752251.214973798021674,105413.323889745035558 6750653.588224049657583,106310.113707575306762 6730660.135123359039426,106186.437753304984653 6729912.068626205436885,105815.29857 6729265.162182052619755,101300.736621878313599 6724785.191418238915503,97435.501262555073481 6721153.173774464055896,91374.711586316378089 6716579.233473189175129,89952.382452449266566 6715585.339555939659476,87880.504089804118848 6714540.933169429190457,86736.473682921583531 6714143.74676304589957,85375.815546957033803 6714044.09537436068058,75759.036056815108168 6715982.596253319643438,72914.266469595313538 6716827.815385054796934,72233.993061355824466 6716777.167771108448505,51763.563218871822755 6710764.867113076150417,50279.340448125345574 6709871.281293085776269,42610.652046867005993 6701381.828390020877123,43064.278971850289963 6701007.074296130798757,43754.682453749534034 6700735.933119462803006,45888.343133785638202 6700735.933119462803006,49413.497448736161459 6701579.393962631002069,50372.069583957403665 6702225.356040216982365,50774.044265209478908 6702671.092562440782785,51639.887264601493371 6704409.251106985844672,52103.755582735771895 6705749.394165238365531,52443.836627111311827 6706294.878847929649055,53309.679626500495942 6707039.527933859266341,54453.821352874263539 6707437.798330205492675,59679.603528673644178 6708082.794535982422531,61102.043982029157632 6708082.794535982422531,65492.929976877632726 6708082.794535982422531,66296.990658878683462 6707983.21723379381001,77645.344828307730495 6705005.041613248176873,78789.486554681498092 6704409.251106985844672,79717.111871461645933 6703664.842208075337112,80150.033371157653164 6703266.756073389202356,80737.577643565076869 6702225.356040216982365,80892.200416276507895 6701629.768590470775962,80923.03591522636998 6700983.853684328496456,80737.577643565076869 6700239.757390116341412,80459.278916580500663 6699644.314919441007078,80057.304235325587797 6699198.922365704551339,78913.1625089518202 6698801.054155276156962,76903.177783188875765 6698652.483570178970695,76161.122057561253314 6698703.018693890422583,74120.190513357214513 6699347.324320028536022,71770.124743221545941 6699694.856188350357115,71244.474107696310966 6699446.796214780770242,62122.509754129765497 6694339.045025696977973,61936.94016298007773 6693793.110086791217327,62184.292071520729223 6693248.460823108442128,62864.565479760218295 6692306.296290267258883,64379.73506894496677 6690572.141398129984736,64812.656568640974001 6690174.87198137678206,65431.147659489499347 6689927.101250694133341,68987.13747338988469 6689332.410833866335452,78387.511873426585225 6688341.831985123455524,100744.139167911984259 6681805.134995616972446,101424.412576151473331 6681756.129975977353752,109247.723750121236662 6682646.819823981262743,111226.761657443086733 6683042.475522280670702,112680.037609748454997 6683786.25318344309926,115030.103379886946641 6685567.816408730112016,117194.710878361322102 6686509.203476384282112,118307.905786293995334 6686807.153699684888124,119080.90833036271215 6686905.046361476182938,132686.599134098185459 6688540.508851628750563,154239.38838556499104 6690174.87198137678206,158908.573107398056891 6680073.208728693425655,157084.157972787623294 6656945.326190340332687,156836.806064244126901 6654675.329130974598229,156558.507337262388319 6653096.703205969184637,155661.717519429279491 6650334.795720547437668,154765.039021090226015 6648608.277859691530466,152384.026432513463078 6645355.028546360321343,151177.991069260344375 6644074.773070210590959,150683.287252173380693 6643729.597788617014885,140540.857126509043155 6639296.293064828030765,137139.378765828849282 6639148.799814297817647,135871.672404676006408 6638951.319017413072288,122482.386691042906023 6634324.468487959355116,120998.052600805196562 6633437.959523135796189,116390.65019636026409 6630043.396006690338254,114659.075517073142692 6628519.788483358919621,111443.166747545474209 6625126.020648063160479,110700.999702426619479 6624193.082307723350823,109773.374385646471637 6622570.42577913403511,108969.425023136645905 6620703.997927704825997,108289.151614899994456 6618689.453932738862932,107948.95925103603804 6617216.396156779490411,107763.389659883527202 6615693.577202288433909,107979.906069474309334 6611619.030075713992119,108536.503523440638673 6609263.162053998559713,95363.734219401172595 6608135.283868036232889,90632.655860685918014 6609705.27744260802865,88313.42558950012608 6609999.033264809288085,86983.825591465065372 6609902.055587112903595,79748.058689902740298 6604506.318826136179268,78572.970145087878336 6603231.008653108030558,75975.552466408727923 6599947.355887860059738,75171.603103898916743 6599114.122373814694583,73718.215832102301647 6598231.230456918478012,63142.864206741971429 6594410.221807206049562,55505.122623924733489 6592696.661564954556525,50403.016402395667683 6591962.337504526600242,47960.110176939553639 6591472.883293562568724,44589.689954191686411 6590297.748069609515369,41404.616683613880014 6588878.046271258033812,38899.92814076396462 6587508.443277961574495,34199.796600489811681 6582566.624939186498523,32993.872556727917981 6581296.119668211787939,31942.459966186212114 6579829.569777340628207,30829.265058253546158 6577482.788523527793586,30179.938468455151451 6576456.018076159991324,29345.042287504234992 6575674.765999062918127,28262.794198012667039 6575186.27921399101615,26964.02969892747933 6575088.303897446021438,25356.130973910676403 6575332.628715308383107,23964.637338993426965 6575723.14131180755794,13729.366758005808151 6578850.900411964394152,10946.379488174141443 6580318.332049430347979,6338.977083732052051 6582616.273160476237535,-10513.457988480968197 6587801.407104633748531,-15368.323620954943181 6589220.923139488324523,-17470.926163058717066 6589759.934726714156568,-21243.432386552722164 6590542.524695279076695,-22944.171566892819101 6590688.971212308853865,-28386.470152285826771 6590640.507876573130488,-64256.059114674637385 6585159.472424866631627,-70966.175380711734761 6583740.656668508425355,-75171.603103898916743 6582664.689267466776073,-79191.461235936410958 6581394.168864630162716,-83056.696595259636524 6579976.001811065711081,-85499.602820718588191 6577678.79729484859854,-85344.980048007171717 6576603.621645564213395,-85344.980048007171717 6575967.484960181638598,-85623.278774988924852 6574550.251970016397536,-86427.228137498736032 6573525.078012904152274,-86891.096455635837629 6573231.214819570071995,-87416.747091161072603 6572987.128166943788528,-88653.617953364067944 6572840.820325620472431,-89333.891361600733944 6573183.029993968084455,-100558.569576759458869 6580366.734645404852927,-101331.683440319407964 6581100.024778145365417,-101393.465757710378966 6581784.96900472138077,-101146.113849166882574 6582371.908209331333637,-99569.050623099945369 6584132.97693841997534,-99136.240442895170418 6584474.247388496994972,-96755.227854318422033 6585159.472424866631627,-96384.088672013371252 6585600.117579888552427,-96136.736763469889411 6586137.659118901006877,-96260.412717740211519 6586823.022658423520625,-97064.473399741269532 6587556.888169984333217,-103186.934073879703647 6592941.333300057798624,-103515.660530191918951 6593018.015060679987073,-104547.592209847076447 6593186.188597305677831,-121833.060101244511316 6594068.539018400013447,-128543.065047790369135 6593773.941569223999977,-129068.82700280683639 6593529.068775586783886,-129377.961228741289233 6592991.220433191396296,-129037.880184365742025 6592451.820838483050466,-127646.386549451330211 6591472.883293562568724,-124461.424598364756093 6588095.790763569064438,-124275.855007212230703 6587556.888169984333217,-124214.072689821274253 6586921.13770925719291,-124399.530961482552812 6586285.436356180347502,-125481.779050974131678 6583740.656668508425355,-125729.242279008845799 6583203.271636382676661,-126100.270141822649748 6582762.754763870500028,-126564.138459959765896 6582371.908209331333637,-127089.789095485000871 6582175.787695457227528,-127677.333367892424576 6582029.316535127349198,-148209.545527764566941 6584474.247388496994972,-156744.076928414899157 6580855.528804268687963,-177307.235906728135888 6572644.92663501854986,-179688.248495304898825 6573623.034739969298244,-185192.329398088855669 6574990.329746156930923,-186166.374942529248074 6575124.538797938264906,-187511.559669274662156 6575234.651658130809665,-189397.757121276052203 6574892.356760084629059,-202199.498562504537404 6572450.444328652694821,-215310.485549153061584 6570643.525758612900972,-223690.394177089154255 6571033.816158330067992,-224927.265039294987218 6571522.056796542368829,-225700.267583360866411 6572304.146016950719059,-225947.730811395595083 6572890.409951932728291,-226195.082719939062372 6574111.428835805505514,-226658.839718582108617 6574403.916367212310433,-227308.277627871750155 6574355.724682384170592,-229936.642124991980381 6571131.743272102437913,-230214.940851973718964 6570691.871539294719696,-231482.758532617823221 6568495.149817634373903,-231699.163622720196145 6567957.528215826489031,-231513.594031567685306 6567371.439354351721704,-219825.047498274681857 6563174.784509535878897,-218544.873354151844978 6562004.381892841309309,-218081.116355505975662 6562530.902009578421712,-217765.636918599542696 6562735.864060744643211,-217394.609055785724195 6562619.244068468920887,-217227.629819595545996 6562325.945052730850875,-217134.900683763495181 6561975.580561363138258,-215465.108321864478057 6557761.308958495035768,-218000.632363664277364 6550597.266470135189593,-218464.500681798526784 6550255.992734760046005,-219113.827271596936043 6550110.262977248989046,-228359.578898922220105 6548356.446687645278871,-229039.852307161694625 6548306.829031156376004,-236213.836891333077801 6552106.686331101693213,-237543.436889368109405 6553178.671854855492711,-238749.360933130024932 6553813.052549709565938,-244593.634199777938193 6555420.801462697796524,-265837.177905821881723 6558151.165546091273427,-266486.504495620261878 6558151.165546091273427,-270630.038581925269682 6556980.773494964465499,-272361.724580706446432 6555470.461906002834439,-274340.762488028325606 6550547.810717513784766,-274680.843532403872814 6549086.719835380092263,-274495.385260739712976 6548015.2655762238428,-273691.324578741507139 6546457.162318707443774,-269918.929674738727044 6543828.441959716379642,-271001.84568117489107 6540638.437151100486517,-273315.064699859532993 6541884.123367630876601,-273649.913728166953661 6544135.278570587746799,-277698.158330352860503 6550078.872668306343257,-285318.088794643525034 6556493.217642557807267,-296326.361919699877035 6563712.094287780113518,-300624.518778719124384 6566103.275158314965665,-302912.690911975398194 6567225.406906048767269,-308509.612270079844166 6569911.341610219329596,-314261.156400895735715 6571962.148679352365434,-318806.665168458421249 6573378.936479141935706,-320909.379030050593428 6573867.316104344092309,-323599.637164053041488 6574257.759243193082511,-325578.675071374920662 6574013.466301584616303,-326197.054842732206453 6573769.356472769752145,-327774.118068799143657 6572498.800712015479803,-329443.910430698131677 6570643.525758612900972,-331515.677473852061667 6569519.6981390863657,-344472.041687791934237 6567029.646647682413459,-352944.679451557283755 6566395.478597483597696,-353594.006041355663911 6566297.607741178944707,-361139.018488340836484 6563906.37051494885236,-362252.213396273553371 6563468.289369233883917,-379754.086377776169684 6553665.856445043347776,-382629.802783437073231 6551717.29062276519835,-385010.815372013836168 6549184.386712061241269,-385722.035598694405053 6548258.789605474099517,-388968.891186660330277 6541443.706014295108616,-389649.164594897010829 6539594.174469995312393,-395338.815088833507616 6522536.142785780131817,-395555.331498427141923 6520302.74285436514765,-406532.657805042341352 6486396.640423788689077,-409099.128665280411951 6484511.518305367790163,-412624.282980230927933 6482674.6582738365978,-413737.477888163586613 6482143.803335079923272,-415098.024704639741685 6482094.75488692894578,-421838.976469626708422 6483109.873329615220428,-423354.257378302689176 6483448.389705893583596,-424498.399104676442221 6483979.154119905084372,-426724.677601050527301 6485719.5549450898543,-427436.009147219534498 6486589.109140458516777,-428023.442100135725923 6487604.777498853392899,-428796.44464420445729 6489974.051361822523177,-431517.649596647999715 6494908.685639568604529,-431795.948323629738297 6495392.450353795662522,-438691.634180819382891 6500570.866543103009462,-439371.907589056005236 6500910.096333913505077,-439928.505043022334576 6501104.296821221709251,-440670.560768652823754 6501104.296821221709251,-442587.705039092455991 6500814.392381578683853,-443670.064448075252585 6500378.073065644130111,-445834.56062706123339 6499457.920769358985126,-446576.727672180102672 6498586.842099643312395,-446855.026399161841255 6498102.890965644270182,-447813.709853874344844 6497424.849231803789735,-448401.14280679053627 6497182.991171022877097,-449019.52257814782206 6497133.679478456266224,-451153.183258181088604 6497666.888605514541268,-452111.755393402301706 6498392.700584619306028,-457677.729933065653313 6503671.518000974319875,-463707.572790866077412 6510649.960448033176363,-464758.874061916547362 6511959.040496470406651,-487579.369674539077096 6509534.263965385966003,-492650.640397115435917 6507693.248393725603819,-493578.26571389840683 6507014.421545167453587,-494368.077501075400505 6506141.327188813127577,-495464.574485388176981 6504833.166214169934392,-495742.873212372767739 6504348.850203542038798,-497196.260484169353731 6503477.431723578833044,-499020.675618779787328 6502896.072000314481556,-502112.797114545945078 6502314.753060123883188,-505761.627383766754065 6502266.805657866410911,-517109.981553195801098 6502508.812107167206705,-520820.705459298857022 6502896.072000314481556,-530159.186222456162795 6500378.073065644130111,-540734.426528325304389 6486493.570313513278961,-551340.724972126772627 6479824.581098446622491,-561947.02341592812445 6475960.939383733086288,-563214.841096575022675 6470410.872026983648539,-564977.36259430332575 6460960.280055090785027,-564513.605595660279505 6460575.144991718232632,-564235.195549184456468 6460093.404303290881217,-562689.190461046993732 6457010.196175523102283,-562565.514506776700728 6456383.184055890887976,-562781.919596879044548 6454891.099132287316024,-563214.841096575022675 6453638.654831061139703,-563895.114504811703227 6452772.368365535512567,-566183.397957559325732 6450220.831181560643017,-574315.843357460689731 6447044.806310250423849,-574656.035721324617043 6446611.475240719504654,-576263.934446344268508 6443292.96242091152817,-576758.638263428350911 6442187.489177686162293,-578088.349580954643898 6438534.031668087467551,-578737.787490241462365 6438581.612711491063237,-579170.59767044626642 6438965.731449774466455,-582046.425395598402247 6441658.001116638071835,-583035.833029769477434 6443005.068239631131291,-585076.764573973487131 6446419.93000566214323,-585231.387346684932709 6446997.350089381448925,-585200.440528246690519 6447622.269735558889806,-584551.113938448252156 6449450.186481491662562,-584520.167120007215999 6450268.305782625451684,-584798.465846991748549 6451472.761152523569763,-587395.994845162145793 6456623.856791905127466,-588849.159477976267226 6458310.842138711363077,-593734.860609402996488 6462117.180380930192769,-608979.50827608758118 6467950.458242789842188,-610309.10827412258368 6468288.357299313880503,-611082.222137682605535 6468337.324283802881837,-612380.986636767745949 6468143.889012212865055,-613525.128363141557202 6467758.421016779728234,-615689.624542124685831 6466745.176903058774769,-616431.680267752264626 6465925.26185052189976,-616864.601767448242754 6464672.543397068046033,-616926.495404327637516 6463900.558754676952958,-616493.573904634453356 6461297.721606427803636,-616462.627086193417199 6460575.144991718232632,-616648.196677345898934 6459080.920400035567582,-617142.900494430097751 6457924.442343212664127,-618039.690312260296196 6456576.3459163447842,-618843.639674770180136 6455757.432849951088428,-619740.42949260037858 6455131.728706897236407,-621472.00417189032305 6454553.744026034139097,-629388.155801180633716 6452626.956167940981686,-630037.371071487781592 6452482.933003719896078,-630810.484935047687031 6452579.468110309913754,-632047.355797250755131 6452964.2331628119573,-633129.603886742261238 6453542.107436168007553,-635912.702476065140218 6455564.290002561174333,-636469.299930031527765 6456576.3459163447842,-636592.975884304614738 6457201.985316739417613,-636592.975884304614738 6457924.442343212664127,-635634.292429592227563 6468675.239070485346019,-634057.340523013612255 6472824.237013892270625,-633191.497523624449968 6473548.053110894747078,-617421.310540905804373 6481902.216440097428858,-613555.963862088508904 6483448.389705893583596,-611793.331044869148172 6483931.486574206501245,-610432.895547884167172 6483592.950494696386158,-609907.133592867758125 6483303.657479334622622,-609350.536138901370578 6482288.515339105390012,-609041.290593478479423 6481080.97792842425406,-608793.938684935099445 6480598.046920829452574,-608144.612095136661083 6480356.505004351958632,-605516.247598019195721 6479679.912037490867078,-604774.080552900326438 6479727.729056387208402,-604217.483098934055306 6479921.434270321391523,-586437.311390449642204 6493844.223917995579541,-573728.410404544440098 6505803.2786012487486,-573326.324403798324056 6506238.488184252753854,-562379.944915624218993 6519720.20072169881314,-562039.752551760175265 6520205.416675212793052,-561514.213235726230778 6521322.727169477380812,-559318.658918810775504 6527488.821786097250879,-559256.876601419760846 6528121.232661748304963,-559627.904464233550243 6529287.541945499368012,-560988.451280709705316 6532591.287030537612736,-560926.557643827516586 6533369.695484756492078,-558947.519736505695619 6540373.242878972552717,-558143.570373995928094 6541200.382869425229728,-547228.026384771568701 6546846.309976635500789,-545187.206160055939108 6547139.234569259919226,-542558.841662938590162 6547139.234569259919226,-534488.28989991650451 6548989.05411418620497,-532756.49258164409548 6549573.662943896837533,-532261.788764560013078 6549866.684325145557523,-531179.540675068390556 6551181.989213441498578,-530066.345767135731876 6553422.348272529430687,-528953.150859203073196 6558102.893244729377329,-528056.361041369964369 6562687.038019890896976,-523294.447183707670774 6566347.333722244016826,-517790.254961435333826 6571082.164228837937117,-508142.639972343517002 6581344.351981580257416,-507400.472927224647719 6582273.847368408925831,-506905.769110140507109 6583398.184105781838298,-506441.900792003434617 6586431.983269018121064,-506225.495701901032589 6588878.046271258033812,-506194.5488834627904 6590395.904560370370746,-506101.819747630739585 6595635.671564204618335,-506132.65524658060167 6596370.323665414005518,-506318.224837733083405 6596958.304241854697466,-505761.627383766754065 6608380.592144640162587,-503968.159067597414833 6623061.912984350696206,-503566.18438634253107 6623995.961339443922043,-502854.852840173523873 6624094.521231640130281,-498092.938982508436311 6623798.845106573775411,-493207.237851081765257 6623061.912984350696206,-492496.017624403990339 6622914.71142462734133,-491135.470807930687442 6621784.956587082706392,-487177.506312775367405 6619720.274169931188226,-485105.739269621495623 6619426.170381085947156,-483064.807725417427719 6619623.181615645065904,-481425.850862468301784 6620458.321240372024477,-479075.896411821013317 6622030.672990291379392,-472149.263736193126533 6629011.455181543715298,-471809.182691817637533 6629355.834175770170987,-471345.314373683359008 6629896.246198322623968,-468840.625830833392683 6633782.524461566470563,-468531.380285410559736 6634423.152573098428547,-469799.197966054663993 6640872.083747855387628,-470850.610556596366223 6654329.706740721128881,-470479.471374291344546 6654822.924639468081295,-468500.433466969465371 6656007.337314459495246,-467387.238559036806691 6656450.559190977364779,-458265.274205473077018 6658919.006890014745295,-453255.897119776112959 6659214.531389106996357,-443577.335312246053945 6659758.338574352674186,-432352.545777596067637 6661041.049209226854146,-422179.168833490635734 6663708.956490409560502,-411913.062753553153016 6662078.633214847184718,-404337.214807615324389 6659954.899998827837408,-402821.933898939343635 6659708.221498278900981,-400410.085811412718613 6660350.880751021206379,-399358.673220868164208 6660893.341508268378675,-397936.232767512672581 6661880.598626159131527,-396915.878314900444821 6662375.694086921401322,-390793.306321270763874 6660992.346255023963749,-390051.139276151894592 6660794.337959580123425,-383217.347055844496936 6658277.881592976860702,-382691.696420319261961 6657980.969461834058166,-382320.668557505472563 6657635.207451573573053,-381083.797695299610496 6655514.048042042180896,-380341.630650180799421 6654625.065564101561904,-379444.840832350484561 6653984.276538440957665,-378177.134471197612584 6653491.109167017042637,-377373.073789196612779 6653392.195125944912434,-375177.630791772331577 6653392.195125944912434,-367508.942390514013823 6653392.195125944912434,-337112.59883195644943 6657833.139312,-335009.884970364277251 6665585.386076213791966,-335442.806470057461411 6666721.197891489602625,-335535.535605889512226 6667364.408397262915969,-335442.806470057461411 6669686.862135104835033,-334731.586243379686493 6675818.363256754353642,-329505.692748089088127 6687895.450880325399339,-317569.794306252617389 6700339.240169217810035,-308416.88313424779335 6708281.95278984028846,-295367.789784478663933 6721651.878005367703736,-293821.673376852821093 6724338.243499989621341,-284204.893886710866354 6738381.983970346860588,-275144.711850538151339 6750453.570015172474086,-273753.218215620901901 6751500.979642672464252,-272794.646080402482767 6752001.548231741413474,-270382.686673384625465 6752699.519945209845901,-267877.998130534717347 6753198.904010671190917,-267321.400676568388008 6753448.427781913429499,-266270.099405517918058 6753998.557699146680534,-265466.038723516860045 6754897.003562491387129,-264940.388087991625071 6756046.59104261547327,-264816.712133718421683 6756895.984118143096566,-264909.552589041762985 6757544.913390408270061,-265095.01086070301244 6758144.787432497367263,-265713.501951551588718 6759143.896425941959023,-266146.31213175348239 6759543.286594247445464,-266795.750041043153033 6759793.005384449847043,-273907.840988335141446 6754448.397497565485537,-287080.610292374622077 6742071.071073559112847,-292677.531650479068048 6736039.885689629241824,-296666.442964075424243 6730809.290560748428106))
+POLYGON ((-575738.28381081612315 7445662.321586835198104,-581489.827941632014699 7445770.224151289090514,-582386.617759465123527 7445825.54932180698961,-582974.05071238137316 7446151.818913825787604,-588138.050570789724588 7449095.340874903835356,-589189.351841840194538 7449914.427637465298176,-594477.138974013039842 7454604.695301557891071,-594693.544064115383662 7455040.93819628842175,-596363.33642601442989 7460335.755689153447747,-601156.197102117817849 7479304.95351888705045,-601218.090739 7480946.864688076078892,-601156.197102117817849 7482698.726267375051975,-600723.275602421839722 7484888.717466448433697,-599022.536422084551305 7492726.154522690922022,-598682.455377709004097 7493328.391980407759547,-597878.394695710740052 7494370.723130863159895,-593332.99724763922859 7498868.178677287884057,-592838.1821110638557 7499308.111776672303677,-589467.761888316017576 7502216.212119600735605,-586159.012663467903621 7502326.092530774883926,-584643.843074280302972 7502107.519007111899555,-583221.402620921959169 7501613.083473240025342,-582015.36725766886957 7500954.280538686551154,-578675.893853362067603 7498759.532692191191018,-577222.506581565481611 7497496.783418680541217,-575305.362311122938991 7495797.247068158350885,-574439.519311730982736 7494809.018013304099441,-573821.139540376490913 7493658.250885146670043,-566090.668821727158502 7470661.506818084046245,-565935.934729524538852 7469951.216784494929016,-564915.468957423930988 7452313.89062871504575,-564884.633458474068902 7451494.550029558129609,-565039.25623118551448 7450732.030537662096322,-565379.33727555826772 7450131.530577892437577,-566987.347320066299289 7448060.663518562912941,-568131.489046439994127 7447460.174427123740315,-575738.28381081612315 7445662.321586835198104))
+POLYGON ((-559164.036146096535958 7503149.454878541640937,-559967.985508606303483 7503315.284277251921594,-560462.689325693296269 7503698.346019476652145,-569832.228226780076511 7514194.081799991428852,-570172.309271152829751 7514797.99668319709599,-578706.729352311929688 7533405.347008114680648,-578923.245761902770028 7534066.927990833297372,-579510.678714818903245 7536933.376830915920436,-579603.519170142244548 7537705.845121550373733,-579572.572351701091975 7538422.398071464151144,-576820.53190031053964 7542119.591822707094252,-576294.881264782510698 7542505.977118122391403,-575583.661038104793988 7542284.672319809906185,-574470.466130172018893 7541567.958599822595716,-565533.960048269596882 7533956.395961574278772,-560648.258916842984036 7526188.99375263042748,-557586.972920029540546 7515347.915080394595861,-557215.945057215751149 7513973.58844377938658,-557185.109558265889063 7512324.640469043515623,-557370.567829927196726 7504962.307895975187421,-557617.919738470693119 7504248.857614567503333,-558421.869100977666676 7503259.546227278187871,-559164.036146096535958 7503149.454878541640937))
+POLYGON ((-664793.87644543510396 7516393.02645455300808,-670947.395257505937479 7517053.148927037604153,-671534.828210422070697 7517328.183631667867303,-673823.111663169576786 7518758.957939099520445,-674936.306571102351882 7519473.553345865570009,-675771.202752050361596 7520353.222490240819752,-676111.283796425908804 7521013.684060758911073,-676327.800206019543111 7521784.558238158933818,-676729.774887271574698 7523985.668716213665903,-677719.293840933940373 7534066.927990833297372,-677688.347022492904216 7534893.487954364158213,-677317.319159678998403 7537375.685355544090271,-676698.828068833332509 7539635.865435314364731,-664360.954945741919801 7563116.179736332036555,-663000.296809774590656 7564499.303862821310759,-657496.215906993485987 7570035.684999170713127,-656970.676590956631117 7570534.531731500290334,-646673.512373089673929 7580288.483343239873648,-640643.66951528924983 7585004.002570849843323,-639530.585926847765222 7585836.253798919729888,-635789.026521794847213 7588389.706200616434216,-635139.588612508028746 7588501.023185903206468,-633902.717750302283093 7587778.390872075222433,-632851.305159760522656 7583506.137607280164957,-632789.522842369507998 7582729.056708644144237,-632789.522842369507998 7581840.832285015843809,-632974.981114030815661 7580954.108131773769855,-633500.743069047341123 7579679.409324179403484,-634799.396248641307466 7578126.099876169115305,-635417.887339489767328 7577571.679174290038645,-636407.406293152133003 7576241.073033682070673,-637891.62906389858108 7573968.719727909192443,-639654.261881118058227 7571088.245644428767264,-640303.58847091649659 7569758.761276684701443,-650755.264142006519251 7548357.166992150247097,-657248.863998449989595 7535060.199869861826301,-662010.889175603515469 7524646.441544584929943,-664793.87644543510396 7516393.02645455300808))
+POLYGON ((-638417.391018915106542 7589943.693376872688532,-639252.175880374736153 7589943.693376872688532,-639870.666971220518462 7590277.516861313022673,-640087.072061322862282 7590887.631769153289497,-639437.745471527334303 7592165.991683764383197,-638479.173336306004785 7593886.935443675145507,-633562.525386438239366 7597221.53684947360307,-632913.198796642711386 7597442.828000511974096,-632263.872206844273023 7597276.358836718834937,-631769.168389760190621 7596720.754119501449168,-631614.434297557570972 7596165.18961454834789,-631583.598798607708886 7595332.018254687078297,-631583.598798607708886 7592942.428311008028686,-631830.950707148294896 7592220.777580857276917,-632882.251978201675229 7591442.814489816315472,-634799.396248641307466 7590610.155414490960538,-636005.431611897191033 7590221.145649764686823,-638417.391018915106542 7589943.693376872688532))
+POLYGON ((-627625.522983961156569 7595664.675830494612455,-628305.796392197837122 7595887.522461829707026,-628738.717891893815249 7596276.619386740028858,-630439.457072233897634 7600834.022455751895905,-630655.862162336241454 7601501.43067863676697,-628305.796392197837122 7609568.56824900303036,-628058.444483657134697 7610404.890315341763198,-624440.561032874509692 7609848.334184383042157,-624100.36866901058238 7609235.106996960937977,-624155.360497461864725 7608345.41353698913008,-626728.73316613084171 7597720.751512590795755,-627625.522983961156569 7595664.675830494612455))
+POLYGON ((-625924.783803621074185 7611796.557586587965488,-626821.573621451272629 7611963.141626984812319,-627347.224256976507604 7612353.255114740692079,-628738.717891893815249 7616976.789130751043558,-628460.419164909282699 7618592.956253753043711,-628212.955936877289787 7619261.911602725274861,-626821.573621451272629 7621603.112994614057243,-625832.054667791817337 7622550.955020278692245,-624997.15848684089724 7622606.159089151769876,-622245.118035450344905 7622662.768765424378216,-621595.68012616073247 7622327.332423388957977,-621564.733307722490281 7621491.314706487581134,-621750.41421836335212 7620655.187471191398799,-623729.340806196792983 7614190.423153964802623,-624347.831897042458877 7613021.666281838901341,-625244.510395384393632 7612129.92975448910147,-625924.783803621074185 7611796.557586587965488))
+POLYGON ((-618132.419448092347011 7634046.193353893235326,-621657.5737630429212 7634883.582142086699605,-621904.925671586417593 7635442.160307153128088,-622028.601625856710598 7636279.701744047924876,-621781.249717313214205 7636895.096681935712695,-619802.32312948256731 7639688.122972250916064,-617359.416904023615643 7640358.922834793105721,-613370.394270936027169 7640695.149674772284925,-616308.004313481971622 7636000.578119388781488,-617112.064995480119251 7634995.576010872609913,-618132.419448092347011 7634046.193353893235326))
+POLYGON ((-680904.255792020587251 7688971.52010066434741,-675585.744480389053933 7686665.283573543652892,-674256.033162865671329 7686046.073114143684506,-672307.942073982092552 7683404.213783069513738,-667484.13457943755202 7675427.111810288392007,-667143.942215573624708 7674753.22968621738255,-665072.175172419752926 7668860.405167629942298,-664701.035990114673041 7667570.80041837412864,-651930.241367330076173 7662468.635341,-645714.940237868344411 7661347.971594003029168,-644972.773192749475129 7661178.695830713957548,-643828.631466375780292 7660395.112866367213428,-636160.05438460863661 7654344.214950532652438,-629078.910255757742561 7648748.279913015663624,-628831.558347214246169 7647293.092527548782527,-628769.664710334851407 7645670.658238304778934,-629913.695117217488587 7639074.112946587614715,-630408.510253792861477 7637565.651907510124147,-634737.613931253203191 7630249.236139095388353,-636160.05438460863661 7628799.166909535415471,-646611.730055698659271 7621881.71259197127074,-650136.88437064923346 7620153.073275551199913,-650878.940096276812255 7619986.11053389403969,-652332.327368073398247 7620488.414480175822973,-653661.927366108517163 7621212.528591925278306,-654342.2007743450813 7622215.523571524769068,-653600.0337292291224 7623442.499187578447163,-652981.65395787183661 7623832.996472912840545,-652301.38054963236209 7624893.161413862369955,-651651.942640345543623 7626232.230825208127499,-651466.373049193061888 7626956.887851038016379,-651497.431187125388533 7627960.83584485668689,-651744.783095665974542 7628351.563449664972723,-652363.162867023260333 7628799.166909535415471,-653198.05904797418043 7628909.464596371166408,-654837.015910923364572 7628799.166909535415471,-655981.046317805885337 7628239.666670273989439,-666092.64094452036079 7622103.917080283164978,-669710.413075811695307 7619317.091989553533494,-697385.774320908123627 7610126.506993626244366,-703662.969087252044119 7611183.174621448852122,-704095.890586945228279 7611684.902198633179069,-705703.789311964879744 7613633.391742840409279,-706445.845037592458539 7614692.146986456587911,-706693.196946135954931 7615249.054765250533819,-708672.346172949066386 7620153.073275551199913,-708703.181671898928471 7620988.945039283484221,-708393.936126473243348 7624390.568728152662516,-706909.713355726795271 7625784.77728309109807,-705703.789311964879744 7626232.230825208127499,-701065.440089081646875 7626566.231356265954673,-700261.49072657187935 7626399.128849901258945,-699271.971772909513675 7625617.691816330887377,-698869.997091657482088 7625060.030277065001428,-698189.723683418007568 7623889.61521156784147,-693736.944051687256433 7622048.71662861853838,-675245.552116525126621 7629412.353772726841271,-670947.395257505937479 7631477.498917982913554,-670390.797803539549932 7631923.67715513985604,-669988.823122284607962 7632371.288372591137886,-669895.982666964177042 7633375.946182304993272,-670050.60543967562262 7634101.279262903146446,-670359.850985101307742 7634659.800376047380269,-670978.230756455799565 7634995.576010872609913,-671751.344620015705004 7634883.582142086699605,-676698.828068833332509 7632650.480773424729705,-679574.655793985468335 7630976.081866908818483,-680811.526656188536435 7630416.422635478898883,-686748.640378156909719 7629636.183222243562341,-688511.050556396716274 7629748.100399234332144,-689469.622691617929377 7630695.543798666447401,-690026.220145584200509 7631980.355710376054049,-690521.035282159573399 7634046.193353893235326,-690211.789736736798659 7635777.970243732444942,-683841.86583456362132 7644105.537445853464305,-677162.696386967669241 7647068.746383736841381,-675894.878706323564984 7647740.193323238752782,-671473.045893033966422 7650426.570327147841454,-670297.957348219119012 7651210.543282280676067,-669339.38521299790591 7652050.01329306140542,-668690.058623199467547 7653392.22822152543813,-668535.43585048802197 7654121.274554605595767,-668164.407987674232572 7656585.267892703413963,-668226.19030506524723 7657425.327892462722957,-668628.276305811363272 7657817.562246053479612,-669886.297871266491711 7657906.90172603353858,-678925.217884698649868 7654793.340646311640739,-681058.878564731916413 7653224.740798816084862,-681986.615201003383845 7653337.003323202952743,-682604.994972360669635 7653616.759832798503339,-704126.726085895090364 7666561.845482900738716,-705518.219720812398009 7668019.088080644607544,-703879.374177354504354 7678797.414198820479214,-703539.293132978957146 7679414.6216089874506,-688696.620147549198009 7687508.656512294895947,-683563.567107581882738 7689476.754019965417683,-682821.400062463013455 7689589.550285588949919,-680904.255792020587251 7688971.52010066434741))
+POLYGON ((-690180.954237786936574 7564002.243011335842311,-694695.516186908585951 7564777.432889114134014,-697200.204729755641893 7565607.496649332344532,-693984.295960230752826 7573802.75852550752461,-693365.916188873467036 7574910.697228500619531,-691355.931463110493496 7577516.997658062726259,-690459.141645280295052 7578459.410190676338971,-687799.941649210173637 7580954.108131773769855,-687243.344195243786089 7581397.55724972859025,-683377.997516429401003 7582674.138776040636003,-682481.319018087466247 7582506.591582118533552,-682357.643063817173243 7581785.920701346360147,-687738.048012327984907 7566215.65591540466994,-689036.812511413125321 7564555.486709290184081,-689500.680829550256021 7564222.778670887462795,-690180.954237786936574 7564002.243011335842311))
+POLYGON ((-713558.047304375795648 7618759.888655462302268,-714485.672621155856177 7618815.065428871661425,-716124.518164613749832 7620041.296133899129927,-716495.546027427655645 7620488.414480175822973,-714269.15621156222187 7624669.470467002131045,-711764.46766871237196 7626622.870292268693447,-711084.194260475691408 7626845.011436712928116,-710434.867670677253045 7626566.231356265954673,-710311.19171640696004 7625896.638219223357737,-711238.817033187136985 7622941.607634420506656,-711702.574031832977198 7621546.310429006814957,-712568.528350713429973 7619595.809176803566515,-712970.503031968255527 7619093.563713281415403,-713558.047304375795648 7618759.888655462302268))
+POLYGON ((-690057.278283516643569 7650259.147806471213698,-693829.784507007803768 7651545.635125349275768,-694478.999777314951643 7651770.112553313374519,-696736.33641162130516 7654121.274554605595767,-696860.01236589171458 7654960.862412493675947,-696705.500912671443075 7655688.445354070514441,-694819.192141178878956 7657537.450415632687509,-694262.594687212491408 7657929.892189925536513,-692932.994689177488908 7658433.07798280287534,-691912.528917076881044 7658152.943611161783338,-690737.551691753207706 7657537.450415632687509,-686037.308831987902522 7653616.759832798503339,-685697.11646812397521 7653112.479921605437994,-685480.711378021514975 7652441.972141639329493,-685789.956923447200097 7651713.287303596735001,-686377.38987636344973 7651490.423553385771811,-690057.278283516643569 7650259.147806471213698))
+POLYGON ((-767300.537111078156158 7646229.822579452767968,-770887.47374341962859 7646509.52075425721705,-776144.20273766014725 7648356.308790065348148,-778216.081100305309519 7657480.582311796024442,-777968.617872270522639 7658210.018392446450889,-776267.878691930440255 7660225.858192201703787,-774567.250831081648357 7661235.591437997296453,-752952.679262223886326 7668356.532756946980953,-752303.352672428241931 7668524.553853807039559,-751684.972901070956141 7668187.10176074039191,-750819.018582190619782 7667122.539042044430971,-749551.312221034895629 7664822.886900007724762,-749087.443902900558896 7663532.550221493467689,-749056.497084459522739 7662691.819175361655653,-750200.638810833217576 7661795.894548932090402,-752365.246309307636693 7661458.739288401789963,-754096.820988597581163 7661795.894548932090402,-755797.560168937663548 7661683.507810477167368,-756508.780395615496673 7661571.122723654843867,-757158.10698541381862 7661235.591437997296453,-757652.810802498017438 7660898.460878128185868,-765476.233295958954841 7653561.331757863052189,-766094.613067316240631 7652329.722748726606369,-767300.537111078156158 7646229.822579452767968))
+POLYGON ((-743428.740227405214682 7669814.319526683539152,-744263.63640835613478 7670039.333828528411686,-745222.208543577347882 7672621.008641519583762,-745717.023680152720772 7674753.22968621738255,-745407.778134729946032 7675427.111810288392007,-736254.866962725063786 7685765.127228019759059,-731802.087330994429067 7689589.550285588949919,-728678.90769729600288 7692177.84197452198714,-724659.049565261346288 7695442.661990146152675,-724102.45211129495874 7695779.901643632911146,-722834.634430650854483 7696455.641799354925752,-719742.401615393580869 7696794.345111946575344,-718814.776298613403924 7696849.88497109990567,-718505.530753190512769 7696229.847941231913865,-718350.907980479067191 7695498.394679141230881,-718505.530753190512769 7694767.011507160961628,-721907.009113870793954 7686609.817758411169052,-722834.634430650854483 7684866.291269586421549,-723731.424248481169343 7683853.431334646418691,-731863.869648382533342 7675875.860524530522525,-732358.573465469526127 7675427.111810288392007,-733502.826511331717484 7674753.22968621738255,-743428.740227405214682 7669814.319526683539152))
+POLYGON ((-685635.33415073575452 7733423.813353266566992,-687738.048012327984907 7734216.356595419347286,-691448.771918431040831 7737101.250472726300359,-691696.123826974537224 7737780.663427847437561,-691788.852962806588039 7739480.276437060907483,-691819.799781244830228 7740329.307864059694111,-691634.230190092348494 7741122.570195219479501,-691015.739099246566184 7742424.670022281818092,-685573.44051385356579 7748033.625981344841421,-684584.032879682490602 7748885.448858785443008,-683223.48606320633553 7748488.300597940571606,-680564.063428156543523 7746333.734569543972611,-679883.790019917069003 7745200.684522153809667,-679945.683656799257733 7744010.082491448149085,-680687.739382426952943 7738800.711817772127688,-681244.336836393224075 7736423.324422373436391,-681646.422837139340118 7735856.089126838371158,-683377.997516429401003 7733875.986749175935984,-684027.435425716103055 7733593.069710533134639,-685635.33415073575452 7733423.813353266566992))
+POLYGON ((-703260.883086505928077 7746674.661824574694037,-704157.672904336242937 7746674.661824574694037,-704714.270358302514069 7746958.065403786487877,-708208.477854811935686 7749168.730683658272028,-717825.257344953832217 7759890.98438083473593,-718258.178844647016376 7760572.435167161747813,-718196.285207767738029 7761366.379861513152719,-714176.427075730171055 7766820.755435311235487,-711702.574031832977198 7769093.47597080655396,-710682.219579220749438 7769946.023715472780168,-706600.579129795194604 7770970.394413308240473,-704219.566541218431666 7771196.777473411522806,-698777.267955825431272 7768979.49639711342752,-698035.10091070656199 7768639.204893971793354,-697045.581957044196315 7767843.06823284458369,-696210.797095587360673 7766650.553806650452316,-695715.870639517903328 7765400.547789968550205,-695654.088322129799053 7764660.991190864704549,-695468.518730977317318 7759209.594649636186659,-696303.414911925327033 7752797.834257248789072,-696519.93132151896134 7752059.297870209440589,-697602.179411010583863 7750244.807902731001377,-698900.943910095724277 7748771.77172545157373,-701158.280544402194209 7747297.388250662945211,-702487.880542437196709 7746730.770406653173268,-703260.883086505928077 7746674.661824574694037))
+POLYGON ((-831216.515181380091235 7748033.625981344841421,-832144.14049816026818 7748033.625981344841421,-836596.920129890902899 7748488.300597940571606,-838297.659310230985284 7748714.01541240233928,-840493.213627146440558 7749394.669785051606596,-841513.568079758668318 7750188.673405687324703,-841637.244034028961323 7751039.104390075430274,-841575.350397146772593 7752003.354158555157483,-840864.241489960346371 7753251.15999866835773,-828835.502592803328298 7771481.096311684697866,-828186.176003005006351 7771254.500091983936727,-825836.110232869279571 7769093.47597080655396,-825403.077413682010956 7768581.502132853493094,-821321.436964256456122 7756484.646011273376644,-821105.031874153995886 7755747.385831134393811,-827629.578549038618803 7748885.448858785443008,-828124.282366125611588 7748430.750513812527061,-831216.515181380091235 7748033.625981344841421))
+POLYGON ((-732606.036693501402624 7769093.47597080655396,-734987.049282080959529 7769605.688940900377929,-734863.262008316582069 7770572.091220494359732,-733966.583509977557696 7771367.080928524024785,-729761.15578679041937 7773698.902661285363138,-729080.882378550828435 7774041.05891159363091,-728431.555788755300455 7773927.005116423591971,-723545.743337837397121 7772846.138599321246147,-722927.363566480111331 7772505.673939668573439,-722680.011657939408906 7771822.948017750866711,-723020.204021803452633 7771196.777473411522806,-723483.961020446498878 7770798.667095833458006,-732606.036693501402624 7769093.47597080655396))
+POLYGON ((-803139.290574520011432 7783545.480658304877579,-803201.184211399289779 7782691.405730057507753,-804376.161436722963117 7779958.027473634108901,-804870.865253809955902 7779503.106472705490887,-808797.994250012561679 7781324.593655386008322,-811209.953657030360773 7781837.631802590563893,-813003.421973202493973 7781837.631802590563893,-816373.842195950448513 7780584.920460755936801,-818878.642058288678527 7780412.975718623958528,-819651.644602357409894 7780584.920460755936801,-821692.576146561536007 7782348.859692977741361,-822280.009099477669224 7783601.862003199756145,-822929.447008764487691 7785708.979185012169182,-823331.310370530933142 7787134.629106932319701,-825712.322959107696079 7797510.903650563210249,-825866.945731819141656 7798366.647378453053534,-826083.462141412775964 7804874.976817335933447,-826547.219140055822209 7838645.113456720486283,-826238.084914124221541 7839277.082819285802543,-825124.890006191562861 7840194.151770661585033,-820208.242056323797442 7842604.052629641257226,-816590.358605543966405 7841456.542531560175121,-811055.219564827741124 7838415.263170612044632,-809509.214476693072356 7837211.605928865261376,-808983.452521676663309 7836579.80890685506165,-804221.53866401151754 7830274.01861528493464,-804066.915891300071962 7829414.666563527658582,-804963.705709130386822 7828440.53582550957799,-806633.498071029433049 7827410.028228163719177,-807313.771479265997186 7827180.312398761510849,-808055.827204893692397 7827295.169442917220294,-810993.437247439636849 7829128.168786775320768,-811302.682792862411588 7826321.517327931709588,-808086.774023334728554 7791351.615371270105243,-803139.290574520011432 7783545.480658304877579))
+POLYGON ((-661918.160039774258621 7817105.856335839256644,-664453.684081571176648 7817564.684641906991601,-665721.501762215280905 7818136.611405530944467,-667514.970078387414105 7819280.594395046122372,-668844.681395913707092 7820710.918969230726361,-669926.929485405329615 7822370.870562356896698,-670050.60543967562262 7823287.54382988344878,-669895.982666964177042 7824088.074933858588338,-669586.737121541402303 7824660.494155706837773,-668566.382668929174542 7825519.307147990912199,-666556.50926265749149 7825920.298536827787757,-663093.137265097931959 7825519.307147990912199,-662381.917038417304866 7825232.95661870483309,-660557.501903806813061 7824088.074933858588338,-660124.580404110834934 7823686.974371951073408,-659104.225951501517557 7821913.399748372845352,-658856.874042958021164 7821226.421123342588544,-658764.033587637590244 7820483.054290824569762,-658825.927224516868591 7819510.070899597369134,-659382.524678483256139 7818251.331475670449436,-659908.175314011285082 7817735.82564936298877,-661145.046176214236766 7817163.929119725711644,-661918.160039774258621 7817105.856335839256644))
+POLYGON ((-664732.094128046999685 7866173.690661360509694,-665504.985352624556981 7866289.140938958153129,-666680.185216927784495 7868016.130983558483422,-666834.696670147939585 7868764.387786168605089,-666896.590307030128315 7871473.161756099201739,-665938.018171808915213 7875966.906469878740609,-664175.496674080728553 7878101.743621313013136,-663649.734719064203091 7878562.623791472055018,-663000.296809774590656 7878331.34977791365236,-662783.891719672246836 7877639.230882221832871,-662722.109402281232178 7876947.175373092293739,-664330.008127300883643 7867728.37557050678879,-664732.094128046999685 7866173.690661360509694))
+POLYGON ((-327217.520614832814317 8122256.104975343681872,-328176.09275005402742 8122375.559478169307113,-329258.34083954844391 8123268.848108878359199,-330680.781292903935537 8124818.684129827655852,-331732.082563954405487 8126606.382706038653851,-338071.17096717772074 8141164.861373074352741,-337700.031784872640856 8141761.94906612765044,-337174.381149347405881 8142239.309600191190839,-335071.667287752439734 8144091.843954086303711,-334453.287516397947911 8144390.606614335440099,-331144.538291549833957 8144868.135515400208533,-324619.991616662417073 8145644.292800644412637,-322733.794164663879201 8145526.186049027368426,-322177.196710697549861 8145225.872028060257435,-321311.353711305535398 8144150.993278105743229,-320352.781576084264088 8142478.861494575627148,-320229.105621813971084 8141642.183674630708992,-324372.639708121772856 8123090.61079301033169,-324867.454844697145745 8122673.238983020186424,-327217.520614832814317 8122256.104975343681872))
+POLYGON ((-359716.578034985344857 8132032.177192375063896,-366117.448755599616561 8132032.177192375063896,-366890.562619156728033 8132151.788332994095981,-367447.160073123057373 8132569.476031895726919,-381949.529375200392678 8152639.808204475790262,-382166.045784794026986 8153357.767818887718022,-382166.045784794026986 8154254.776183974929154,-380496.253422892186791 8159700.954994794912636,-379846.815513605426531 8161079.020994499325752,-378269.863607026869431 8162516.637322222813964,-372827.565021636663005 8164612.760042008012533,-371312.395432449120563 8164732.89523814432323,-359902.147626137884799 8156049.54784101806581,-359376.385671121417545 8155571.301903489977121,-357861.327401425049175 8153237.815943096764386,-349141.226409625029191 8138178.420643689110875,-348955.656818472489249 8137461.921593451872468,-349203.120046504365746 8134417.890667257830501,-349728.770682032452896 8134001.603015621192753,-351800.537725186382886 8133224.938536697998643,-354088.70985843980452 8132807.21412938926369,-359716.578034985344857 8132032.177192375063896))
+POLYGON ((-650940.833733159000985 7781665.453731082379818,-652239.486912752967328 7779104.355783727020025,-655579.071636550943367 7773188.256456230767071,-656011.993136246921495 7772618.068583996966481,-659908.175314011285082 7768013.29656311031431,-661175.992994655389339 7767388.871871560811996,-665690.554943777038716 7765626.765033165924251,-667731.486487981048413 7764944.861157269217074,-669246.656077168649063 7764660.991190864704549,-669772.306712693884037 7765172.701059639453888,-671503.992711472208612 7769889.743612143211067,-671782.18011896556709 7771310.79030179977417,-671627.668665745412 7772049.561186333186924,-666896.590307030128315 7782976.155037766322494,-665041.228353978600353 7786791.882612229324877,-671318.423120319726877 7796484.590345002710819,-676111.283796425908804 7785995.482360418885946,-676513.369797169230878 7785538.559015703387558,-677440.995113952201791 7785708.979185012169182,-678677.865976155153476 7786392.749099911190569,-687583.425239616539329 7795058.826424144208431,-702920.802042133174837 7792377.440111016854644,-703353.723541826358996 7792776.683087596669793,-717670.634572242503054 7814132.382998635061085,-718289.014343596878462 7815390.438682325184345,-721257.571204581065103 7821627.391483799554408,-721504.923113124561496 7822314.40645466465503,-721443.140795733663253 7823229.424112285487354,-715351.404301053844392 7828440.53582550957799,-714856.700483969645575 7828841.888093684799969,-713898.128348748432472 7828900.050874734297395,-712259.282805290538818 7827581.597915019840002,-709538.077852847054601 7824660.494155706837773,-706415.009538642596453 7822141.513500046916306,-705240.032313319039531 7821341.187965145334601,-704590.594404032221064 7821111.656019261106849,-702889.855223692138679 7821168.31720894947648,-702456.933723996160552 7821683.850473574362695,-702395.151406607939862 7822542.32619730103761,-726576.193835703772493 7843695.11297158524394,-727287.414062381605618 7844040.441532347351313,-731771.029193062102422 7839047.006821622140706,-731771.029193062102422 7837326.615175051614642,-730750.674740449874662 7832795.704828672111034,-730626.998786179581657 7832050.995856597088277,-730657.945604620617814 7831076.732404205016792,-731059.920285875559784 7829414.666563527658582,-731369.165831298450939 7828900.050874734297395,-731987.54560265573673 7828555.411975079216063,-732791.494965162710287 7828670.289866426959634,-737491.626505436841398 7830790.171767604537308,-744634.664271169924177 7834230.027870612218976,-745840.699634423013777 7834859.977581156417727,-746922.947723914636299 7835719.947644979692996,-748159.818586120498367 7837383.19128,-748376.223676222842187 7838071.636581358499825,-748592.740085816476494 7839677.357364155352116,-748561.793267375323921 7843064.42785513214767,-753942.309535377426073 7848059.06660985108465,-754375.231035070610233 7848576.433548144996166,-754622.582943614106625 7849150.70677210111171,-755395.474168191547506 7851850.809246600605547,-755271.798213921254501 7852655.814013954252005,-751128.264127613394521 7861511.760034578852355,-738883.231459845323116 7884909.020008309744298,-737244.274596896138974 7884965.953171662986279,-736471.272052827524021 7884736.14529530890286,-735512.699917606194504 7883870.58453534077853,-733193.580965908826329 7881388.932194164954126,-732296.791148078511469 7880235.522831921465695,-731616.517739841947332 7879139.178789542987943,-730874.35069472307805 7877178.407025982625782,-730750.674740449874662 7874584.825043288059533,-730626.998786179581657 7873834.539537319913507,-729946.614058451610617 7872625.23441983666271,-719495.049706852878444 7864850.180207592435181,-715784.32580074982252 7864043.876732889562845,-709723.647443999536335 7868016.130983558483422,-711980.984078306006268 7884332.024532061070204,-714702.189030746696517 7890971.902852981351316,-714825.864985019783489 7891549.405850444920361,-714578.513076476403512 7892472.836949214339256,-713248.801758950110525 7893918.732610004022717,-706384.062720201560296 7901375.595772541128099,-701776.66031575948 7901664.844089404679835,-698746.3211373842787 7898773.692304376512766,-688109.187194633064792 7886756.034312906675041,-687336.073331073042937 7885542.997075439430773,-686068.255650428938679 7883177.958044371567667,-685511.658196462667547 7881908.584656063467264,-684181.94687893637456 7878562.623791472055018,-683934.594970395672135 7877121.324945847503841,-683130.64560788590461 7859786.254608792252839,-684243.84051581856329 7846279.776287614367902,-684367.627789580146782 7843178.079548854380846,-682914.240517783444375 7824374.176075815223157,-682079.34433683543466 7822943.366182137280703,-656692.266544483602047 7809731.345368997193873,-655300.772909566410817 7809160.052198750898242,-654558.605864447541535 7809331.209339445456862,-649363.770507089211605 7812131.781799998134375,-642189.785922917886637 7815962.201442593708634,-640148.965698205051012 7816763.400702674873173,-639314.069517254130915 7816706.772428193129599,-628862.393846164108254 7813446.109080039896071,-628522.201482300180942 7812759.69145339448005,-630222.940662640263326 7802989.866206160746515,-630501.239389624912292 7802133.600978786125779,-631212.570935793803073 7801048.712367656640708,-646055.132601732388139 7784000.643827837891877,-647477.461735596647486 7782691.405730057507753,-648652.550280411494896 7781951.804413926787674,-649332.823688648175448 7781723.46090732794255,-650940.833733159000985 7781665.453731082379818))
+POLYGON ((-673606.595253576058894 7826722.551171703264117,-674627.061025679460727 7826779.254327571950853,-675276.498934966279194 7827123.606241562403738,-675523.850843509775586 7827696.46104231197387,-676760.721705712727271 7831764.604693802073598,-676791.557204662589356 7832624.017020202241838,-676637.045751442434266 7841112.98448468837887,-676049.501479035010561 7848633.300576750189066,-675183.658479645731859 7852886.304035558365285,-674998.200207984540612 7853633.065442417748272,-671442.099074592930265 7861339.419627644121647,-671009.288894388126209 7861856.245478595606983,-668257.137123506283388 7864791.740520105697215,-665690.554943777038716 7862143.984673917293549,-665350.473899401491508 7861453.346139384433627,-665319.527080963249318 7860590.447324733249843,-666803.861171200871468 7831994.253231534734368,-667298.564988285070285 7830503.621970213018358,-667607.81053370796144 7829874.240700871683657,-668628.276305811363272 7828900.050874734297395,-670916.44843906769529 7827581.597915019840002,-673606.595253576058894 7826722.551171703264117))
+POLYGON ((-810777.032157337176614 7841801.768995887599885,-814147.563699576305225 7842260.442508837208152,-814889.61942520388402 7842604.052629641257226,-821321.436964256456122 7846508.418343406170607,-822434.631872189114802 7847254.550635058432817,-824289.993825240642764 7850989.004948856309056,-824815.644460765877739 7852310.092145320028067,-824877.538097648066469 7853115.145778425037861,-824475.452096901950426 7855587.740068238228559,-824228.100188361248001 7856334.561169553548098,-823795.178688665269874 7856852.701275755651295,-819064.211649441276677 7860590.447324733249843,-818321.933284831116907 7860821.179227720014751,-812694.176427779719234 7859612.296791811473668,-809973.082794827409089 7858980.49080272577703,-806416.981661435798742 7858117.874036064371467,-802025.984347096062265 7854897.69984695315361,-801778.632438552565873 7854207.722555309534073,-801747.796939602703787 7846221.273146128281951,-801995.14884814620018 7845416.95247514732182,-805891.331025910563767 7843064.42785513214767,-806478.763978826696984 7842777.619893736205995,-809169.022112829145044 7842088.746601978316903,-810777.032157337176614 7841801.768995887599885))
+POLYGON ((-805242.004436112125404 7863756.272446325048804,-814271.23965384659823 7863871.68582081887871,-815013.295379474293441 7864100.860148473642766,-815539.057334490702488 7864619.325350591912866,-815693.568787710857578 7868707.369213744997978,-815446.216879170271568 7872164.716177927330136,-817950.90542201732751 7873546.355086141265929,-825062.996369309374131 7877121.324945847503841,-829948.697500735986978 7876256.843609771691263,-831309.24431721214205 7875852.96857688203454,-832329.710089312749915 7875966.906469878740609,-833350.175861416268162 7876717.61126986797899,-838946.985900029423647 7880869.107799214310944,-839379.907399722607806 7881273.251038626767695,-839720.099763586535119 7881850.012926995754242,-839720.099763586535119 7882831.045429597608745,-833937.60881433240138 7893398.045141905546188,-833102.82395287277177 7894553.466540277004242,-831865.841771178529598 7895190.126447139307857,-827382.226640497916378 7894842.453549714758992,-809849.406840556999668 7895478.929752987809479,-809416.374021369847469 7896114.002969663590193,-806478.763978826696984 7899756.926077665761113,-801191.199485636432655 7901839.564606086350977,-800232.627350415103137 7901896.833832059055567,-787616.344180850777775 7892531.699111446738243,-786750.501181461615488 7891549.405850444920361,-786565.042909800307825 7890683.063944215886295,-795656.060444922884926 7866116.691623137332499,-796367.391991091892123 7864964.159620930440724,-797975.290716108749621 7864676.313102686777711,-805242.004436112125404 7863756.272446325048804))
+POLYGON ((-801995.14884814620018 7904963.767082164995372,-803695.888028486282565 7905253.152969223447144,-803633.994391604093835 7906178.26221879106015,-802922.774164926377125 7907394.620111919008195,-801345.710938856587745 7909709.930411484092474,-800356.303304688306525 7910578.459253448061645,-798593.670487466035411 7911563.024056881666183,-797789.721124959061854 7911795.318352640606463,-797047.665399328572676 7911679.170310529880226,-795346.926218991284259 7909479.368019768036902,-795408.708536379388534 7908494.866679089143872,-795934.470491395913996 7908030.69687404949218,-796491.067945362185128 7907683.890837426297367,-801129.305848757037893 7905021.060023155994713,-801995.14884814620018 7904963.767082164995372))
+POLYGON ((-954626.527189203188755 7925129.612749701365829,-955399.529733271920122 7925187.059095432050526,-958028.005549880559556 7926406.278248388320208,-958677.443459170171991 7926755.409019802697003,-959728.633410729351453 7930180.296984306536615,-959419.499184797750786 7930877.252057735808194,-955523.317007033387199 7930411.493291924707592,-953513.332281270530075 7929540.676889182068408,-952307.519556996994652 7928786.58018687646836,-952029.109510521171615 7928322.622483660466969,-952369.30187438800931 7927683.16003187559545,-954626.527189203188755 7925129.612749701365829))
+POLYGON ((-787430.774589698179625 7941686.005591202527285,-787894.642907835310325 7942150.787039836868644,-787770.966953562223352 7944826.769387821666896,-787430.774589698179625 7945525.290483676828444,-782885.265822138288058 7949598.110461056232452,-782297.721549730864353 7949889.215295192785561,-780040.496234915684909 7950471.249138521961868,-779174.653235523728654 7950530.356280679814517,-778525.215326236910187 7950239.4362448817119,-778587.108963119098917 7949249.595865544863045,-778958.136825932888314 7944419.415934576652944,-779112.759598644333892 7943662.15311617590487,-779947.767099083634093 7942441.604075786657631,-787430.774589698179625 7941686.005591202527285))
+POLYGON ((-720670.026932173641399 7956470.265770964324474,-720546.350977903348394 7955596.430923961102962,-720670.026932173641399 7954782.047788507305086,-727813.064697906840593 7949772.478599350899458,-728493.449425634695217 7949481.378279329277575,-731430.948148689349182 7948725.282594923861325,-732203.95069275808055 7948608.563946551643312,-737058.816325232037343 7949366.324453175999224,-737831.818869300768711 7949540.687222653068602,-740614.806139132473618 7950530.356280679814517,-741635.27191123587545 7951403.6031045736745,-742099.028909878921695 7951985.754060111939907,-744943.909816592815332 7958511.147151741199195,-745685.965542220394127 7960493.18645220156759,-746366.238950459868647 7964516.579434587620199,-746613.590859000571072 7967083.522040518932045,-746520.973042662604712 7968893.21587913390249,-745562.289587950101122 7971811.198058685287833,-745222.208543577347882 7972452.738553089089692,-741697.054228626890108 7976659.00130844861269,-741295.079547371948138 7977125.948228902183473,-740583.970640182611533 7977477.439571955241263,-737986.441642012214288 7977477.439571955241263,-737151.545461064088158 7977360.273964766412973,-736378.542916995356791 7977008.788100087083876,-734554.127782384981401 7976833.997837174683809,-733997.530328418593854 7977068.314472352154553,-733626.502465604804456 7977827.264450271613896,-734182.988600079901516 7978353.820502681657672,-734739.586054046289064 7978645.829930229112506,-735574.593554485589266 7978820.872719798237085,-742501.003591133863665 7979522.3471052441746,-743428.740227405214682 7979580.210092795081437,-744109.013635644689202 7979405.149618921801448,-744634.664271169924177 7978878.730307421647012,-752674.491854733321816 7966966.518283449113369,-748716.416040086769499 7957752.255619846284389,-748376.223676222842187 7957054.487044485285878,-747943.302176526864059 7956646.261589108034968,-746428.132587339263409 7956179.11605285666883,-745438.613633679808117 7955247.638482778333127,-744170.795953032793477 7953558.226918069645762,-743583.36300011666026 7952276.741598320193589,-743336.011091575957835 7951694.568137818016112,-741913.459318729233928 7946455.356179324910045,-741449.702320083393715 7943139.694544673897326,-741635.27191123587545 7942267.405625551939011,-749767.717311137239449 7930818.29895297344774,-774876.496376504423097 7910288.869033571332693,-775402.147012032568455 7909884.837324154563248,-776175.260875589679927 7909709.930411484092474,-776824.476145896827802 7909942.167647610418499,-777443.078556236578152 7910463.99785946123302,-792594.885767597937956 7928379.884186631068587,-792934.966811973485164 7929076.672759066335857,-793089.589584684814326 7929773.525763470679522,-793336.941493225516751 7932386.14859145693481,-793182.318720514071174 7933316.266112501733005,-792409.316176445339806 7933373.774899192154408,-790801.306131937308237 7933083.307736311107874,-789502.652952343341894 7932269.682881154119968,-788543.96949763095472 7930585.417793459258974,-786565.042909800307825 7929773.525763470679522,-782452.455641933600418 7932154.891689515672624,-760343.068936500465497 7946514.431799842976034,-760775.990436193649657 7947096.204778944142163,-765816.314340331708081 7953150.191064227372408,-772000.66865135228727 7956761.636528299190104,-773237.650833046529442 7957403.363244276493788,-777566.754510506871156 7958802.387116521596909,-778432.486190404859371 7958743.214971978217363,-781679.341778373578563 7957228.818228890188038,-782545.18477776274085 7957286.509943476878107,-783194.511367561179213 7957520.218359707854688,-787616.344180850777775 7959442.81896430067718,-791790.936405090964399 7963933.458247418515384,-791914.612359361257404 7964633.545086824335158,-788605.86313451314345 7969008.568686692044139,-785420.901183426496573 7971577.045209413394332,-785668.253091969992965 7974964.774416473694146,-789688.111224004649557 7982152.301632676273584,-793336.941493225516751 7993269.851930724456906,-793522.511084377998486 7994733.546959539875388,-793491.564265939756297 7995671.406169408001006,-789750.004860886838287 8005634.533295917324722,-785822.875864681438543 8013733.69486178830266,-785420.901183426496573 8014378.826290462166071,-783751.108821527566761 8016493.436841917224228,-782792.536686306237243 8017491.963440832681954,-780133.225370744941756 8016904.715584196150303,-779360.222826676210389 8016728.994247060269117,-770300.040790503495373 8012853.175760389305651,-769001.276291418238543 8012148.581277636811137,-768753.92438287474215 8011502.162412295117974,-769001.276291418238543 8010739.590764750726521,-770361.934427385684103 8010210.970614022575319,-772124.34460562269669 8006924.937914559617639,-765228.770067924284376 7990693.95237694773823,-764548.496659687603824 7989641.042755587026477,-763868.223251450923271 7989171.632117640227079,-763651.818161348579451 7990050.852953216060996,-765129.918360099894926 8004928.293826419860125,-757549.506315041217022 8008575.906596840359271,-751448.196344152209349 8006331.336906312033534,-750819.686499135103077 8008857.053096966817975,-755478.852466796874069 8015665.872785707935691,-757869.327212091651745 8022075.64115125965327,-758951.68662107444834 8026368.027222967706621,-758704.22339303966146 8027367.869473671540618,-756725.185485717840493 8031073.445495535619557,-742841.195954997790977 8041025.397063363343477,-741202.350411539897323 8041085.433374018408358,-740522.07700330321677 8040908.93223531730473,-739934.532730895793065 8039494.5276033077389,-730286.806422315654345 8043265.735036773607135,-729173.722833874169737 8044031.622158442623913,-707466.310809693066403 8064043.728160938248038,-702487.880542437196709 8068655.771978686563671,-700508.842635115375742 8070607.066419521346688,-698746.3211373842787 8074868.760789718478918,-698220.670501859043725 8075341.863987285643816,-697633.12622945162002 8075756.599782660603523,-696829.176866941852495 8075815.210241419263184,-696087.009821822983213 8075579.279300500638783,-695128.437686604564078 8074927.364291729405522,-694046.189597110147588 8073981.240246860310435,-692778.260596974869259 8072323.254703578539193,-686408.448014292865992 8057190.833712695166469,-686377.38987636344973 8056186.791365466080606,-690644.711236432776786 8042500.138387988321483,-693798.726369078271091 8034369.865505123510957,-699055.566682807169855 8028014.174757380969822,-703972.214632674935274 8022899.045259419828653,-704460.684558275504969 8017467.855133843608201,-704479.274913237779401 8016939.395131032913923,-704386.434457917348482 8016516.696220668964088,-704126.726085895090364 8016164.218642277643085,-703737.107868118910119 8015952.993764191865921,-699655.356099202064797 8014296.596428068354726,-699228.779810483800247 8014156.236996962688863,-698746.3211373842787 8014261.929095481522381,-698375.293274570489302 8014437.592656895518303,-697466.146993261412717 8015248.953785048797727,-692500.073189484304748 8016551.373973814770579,-691139.415053516975604 8018079.257272890768945,-687119.668240970699117 8021781.726189978420734,-686593.906285954173654 8022251.487790729850531,-685728.174606056301855 8022075.64115125965327,-684398.463288530008867 8021310.512920229695737,-684274.787334259599447 8020606.604641424492002,-685542.605014903703704 8013322.378551498055458,-686222.878423140384257 8012030.873532271012664,-687088.721422532456927 8010915.383174180053174,-692932.994689177488908 8005987.361221398226917,-697280.577402108930983 8004509.437592294067144,-704553.413694107555784 8005811.050759417004883,-708734.128490340081044 8000709.976081981323659,-709630.806988679105416 7995846.635207596234977,-709878.270216710981913 7995085.862977590411901,-710465.814489118405618 7994616.111959553323686,-723267.555930344038643 7987826.347421145066619,-728926.259605839499272 7986656.528964450582862,-734832.315189878339879 7985194.406691531650722,-736965.975869911606424 7984550.303966554813087,-736842.299915641313419 7983790.464284654706717,-734121.206282689003274 7983790.464284654706717,-723236.609111905796453 7985719.794519029557705,-714702.189030746696517 7988821.278751101344824,-713588.88280332274735 7989523.687346274964511,-712723.039803933585063 7989581.416708113625646,-712011.819577255868353 7989348.395068431273103,-711393.439805898582563 7988061.007049136795104,-707311.688036981737241 7974263.725174709223211,-707621.044901895802468 7973622.030144688673317,-710898.624669323209673 7969242.641570223495364,-718876.558616004302166 7960608.410512333735824,-720670.026932173641399 7956470.265770964324474))
+POLYGON ((-761301.641071718884632 8009859.422913095913827,-764672.172613957896829 8010270.549440519884229,-765105.094113653991371 8010797.694771369919181,-766867.615611384971999 8018842.575335687957704,-766991.291565655381419 8019723.797741235233843,-766960.456066705519333 8020546.943676398135722,-766063.666248875204474 8020900.473554437980056,-763682.653660298441537 8020253.088614289648831,-763002.380252058967017 8020019.112902864813805,-758054.89680324413348 8015494.831711333245039,-756354.157622904051095 8013262.775489021092653,-756013.965259040123783 8010915.383174180053174,-756354.157622904051095 8010152.8711501006037,-757219.88930280203931 8010093.293257866054773,-761301.641071718884632 8009859.422913095913827))
+POLYGON ((-314415.779173607123084 8154254.776183974929154,-319394.209440863050986 8157366.175324442796409,-330618.887656021746807 8167308.611422369256616,-334886.209016091132071 8167428.790121263824403,-340328.396281992900185 8166529.978125414811075,-346265.510003961273469 8164853.03237243834883,-347285.864456573501229 8163834.408574537374079,-347285.864456573501229 8162936.245934132486582,-353130.249042709823698 8161138.305324117653072,-354923.717358881956898 8160958.944725437089801,-355665.7730845095939 8161199.099199467338622,-367725.458800107648131 8168688.086103021167219,-368838.65370804030681 8169587.158679810352623,-372425.590340381779242 8173004.668251732364297,-374157.165019671723712 8178705.087196281179786,-374373.681429262505844 8179425.564558159559965,-374930.278883228893392 8182547.502626540139318,-374930.278883228893392 8183448.034887365996838,-373074.91693017736543 8203416.164042715914547,-372951.240975907014217 8204198.667891797609627,-369302.410706686147023 8208416.587627800181508,-364880.577893393754493 8210707.764916642569005,-364262.198122039320879 8211009.213968108408153,-360551.474215936264955 8212034.319061543792486,-358325.084400070947595 8212575.68718305695802,-356500.669265457661822 8212575.68718305695802,-355758.61353983002482 8212274.391636410728097,-342523.95059890835546 8206730.173594324849546,-342091.029099215229508 8206187.496060908772051,-333772.902788667241111 8195470.686623989604414,-333432.821744294546079 8194809.939196091145277,-333494.604061685502529 8192464.12124982662499,-328083.2522947335965 8180025.7274808306247,-317507.900669373222627 8175105.258190833032131,-310921.571677097701468 8169886.72977898735553,-306778.037590789899696 8162635.013719491660595,-314415.779173607123084 8154254.776183974929154))
+POLYGON ((-298985.56191576999845 8220299.14481211733073,-299418.594734957208857 8220841.332964950241148,-299634.999825059610885 8221565.905902008526027,-299851.404915159160737 8223196.127464422956109,-299727.728960888867732 8225974.632351393811405,-299511.323870786465704 8226880.442233521491289,-298831.050462549785152 8228271.233170941472054,-288626.726700003258884 8243452.663167920894921,-284483.192613695457112 8246179.014622961170971,-282133.126843556994572 8246601.628839157521725,-268774.67662887374172 8248480.132924028672278,-267970.727266366768163 8248541.863586600869894,-267414.241131888818927 8248298.870237618684769,-267166.77790385694243 8247752.927683857269585,-266857.643677922489587 8246238.76357180904597,-266084.529814365378115 8241818.204846530221403,-266053.58299592428375 8241091.434458050876856,-277804.023166099446826 8233529.18472315184772,-286183.931794035539497 8232924.685531720519066,-286895.040701222082134 8232924.685531720519066,-291718.959515257796738 8231594.612372771836817,-292213.663332341937348 8231049.89748075325042,-298490.85809868585784 8222834.404745955951512,-298985.56191576999845 8220299.14481211733073))
+POLYGON ((-320321.834757646021899 8229962.545864972285926,-319827.130940559029114 8235040.757009834051132,-319827.130940559029114 8235947.891733531840146,-320260.052440255065449 8236492.748460903763771,-326908.275069409923162 8241939.376489288173616,-329351.06997537764255 8242847.355046395212412,-330124.183838937606197 8242908.820884956978261,-330835.404065615381114 8242725.9506133524701,-331330.107882699521724 8242182.161599178798497,-331082.755974158877507 8241455.573480682447553,-331391.890200090478174 8239578.847143176943064,-332628.872381784720346 8237702.377562815323472,-333092.629380430560559 8237158.95658874604851,-333865.743243990524206 8237037.645195649936795,-334329.611562124802731 8237582.799753148108721,-337112.59883195644943 8242242.096309587359428,-342152.811416603333782 8250783.710969890467823,-342369.32782619696809 8251511.213470349088311,-342462.056962029018905 8252358.819893697276711,-341936.406326500931755 8252358.819893697276711,-339400.770965212781448 8251874.336800827644765,-322517.389074561477173 8245452.034945490770042,-321713.328392560419161 8244482.258162569254637,-317229.601942388690077 8238549.932351528666914,-317600.741124693711754 8234497.530896421521902,-320321.834757646021899 8229962.545864972285926))
+POLYGON ((-131418.89277294249041 8450002.481263803318143,-128852.310593213216634 8443217.661461865529418,-125358.103096703795018 8433582.114983903244138,-125296.320779312838567 8432711.885061690583825,-125636.401823688385775 8431904.8170470520854,-127646.386549451330211 8429172.311698196455836,-128357.606776129090576 8429419.541313821449876,-129470.801684061749256 8430413.908540507778525,-130305.69786500983173 8430350.862382085993886,-132160.948498572950484 8428116.649800969287753,-134943.935768404626288 8422655.466061240062118,-135871.672404676006408 8404748.748640930280089,-140293.505217965575866 8369126.588859099894762,-140540.857126509043155 8368263.941721391864121,-141221.130534745723708 8366662.403692265972495,-145488.451894815079868 8368079.497755216434598,-152724.218796377419494 8375657.247014,-153404.492204614070943 8378000.7946866620332,-153373.545386175828753 8378925.412534387782216,-148240.492346205661306 8399056.868660798296332,-148059.152895703009563 8399737.889818059280515,-147652.948073798237601 8400726.473243188112974,-147220.026574105053442 8401407.871505113318563,-146539.753165865549818 8401716.970980113372207,-145983.155711899220478 8401220.814723692834377,-145612.127849085401976 8401716.970980113372207,-145364.66462105352548 8402581.983998501673341,-141190.183716304600239 8420607.562152832746506,-140602.750763388408814 8423585.707723587751389,-140386.23435379480361 8425571.212279742583632,-140293.505217965575866 8427432.997893655672669,-140448.12799067699234 8428923.302203591912985,-143045.545669356128201 8448880.843163417652249,-143756.765896033903118 8453677.022626042366028,-156218.314973395608831 8456916.977484256029129,-156991.428836955572478 8456730.298629367724061,-157424.35033665157971 8456043.980496479198337,-156991.428836955572478 8455484.249040206894279,-154455.793475667393068 8452742.966040745377541,-151796.482160106039373 8451061.290770500898361,-150621.504934782424243 8446391.391411019489169,-151208.937887698615668 8442720.490277199074626,-161258.638877533696359 8433457.534505328163505,-161815.236331500054803 8433767.983140118420124,-165927.934918857994489 8437185.126110808923841,-169236.572824217728339 8440233.347677124664187,-170009.575368283607531 8441476.813789892941713,-170071.469005165825365 8442346.29036302678287,-169947.793050895474153 8443156.297073118388653,-169174.679187335539609 8444649.791990645229816,-176874.314407034980832 8447947.171916756778955,-183429.807900357816834 8449939.266890352591872,-184233.757262867613463 8450250.636561812832952,-185316.005352359206881 8451309.257624221965671,-186398.364761342003476 8453240.815756382420659,-186800.339442596916342 8454798.047301702201366,-188470.131804495904362 8462278.614673022180796,-188439.184986054809997 8463214.10922740213573,-188284.562213343393523 8464213.059742107987404,-185563.46858039390645 8466771.918129950761795,-184264.704081308736932 8467521.031971013173461,-181265.311721374659101 8468456.969938527792692,-177740.157406424143119 8468643.947114547714591,-176967.043542864208575 8468270.222247546538711,-164165.302101638546446 8470204.448353536427021,-160949.393332110863412 8471015.734361508861184,-158846.679470515839057 8471641.625559883192182,-149817.555572275421582 8475826.395704654976726,-146972.674665561557049 8479513.884976591914892,-160949.393332110863412 8502995.417254917323589,-167226.588098451960832 8505066.42773274704814,-172947.185410829551984 8506384.627661500126123,-173472.836046354786959 8505819.462198864668608,-174215.003091473627137 8505819.462198864668608,-179193.433358729525935 8506069.286162300035357,-179409.949768323160242 8506634.696790041401982,-179224.3801771706203 8507701.483150579035282,-177338.182725169230253 8513666.328474128618836,-172205.129685201914981 8520012.611221171915531,-157640.755426753952634 8535683.09802039526403,-157022.375655396666843 8536124.236317778006196,-144931.743121357518248 8542869.137217245995998,-144251.4697131208668 8542427.592235755175352,-144066.011441459588241 8541606.775290558114648,-143323.844396340718959 8537572.808449609205127,-144282.416531561961165 8509897.898213734850287,-143231.115260508668143 8505379.919185351580381,-129563.530819893814623 8501615.745808402076364,-115926.893197717232397 8499923.062358222901821,-115463.024879580130801 8499296.107984103262424,-115524.918516462319531 8498356.228221153840423,-118678.933649107799283 8479889.983387826010585,-122575.115826872133766 8461406.776358135044575,-129594.477638332071365 8457478.388876119628549,-129779.935909993364476 8458288.270106678828597,-132130.001680131856119 8460034.90146853774786,-133026.791497962141875 8460283.171404166147113,-133459.712997658149106 8459598.092459613457322,-133645.282588810659945 8458599.993829596787691,-133366.983861826098291 8456916.977484256029129,-131975.490226911671925 8451247.825634768232703,-131418.89277294249041 8450002.481263803318143))
+POLYGON ((-122977.090508127046633 8508642.787855675444007,-125512.725869415226043 8508830.792141057550907,-126904.219504332475481 8509522.065707895904779,-127213.46504975532298 8510211.822397004812956,-130274.751046571574989 8518065.205885538831353,-131635.297863044892438 8533415.00091053172946,-131758.973817318037618 8535179.620468446984887,-131511.621908774570329 8539904.59993626922369,-131295.216818672168301 8541923.650568814948201,-131047.753590640291804 8542869.137217245995998,-123564.634780534470337 8563139.632408041507006,-122296.817099890380632 8564088.093076413497329,-121616.54369165089156 8564404.122180635109544,-120750.700692261714721 8564468.559186037629843,-117658.579196495600627 8564277.299062002450228,-110948.462930458495975 8562886.03223080560565,-110329.971839612800977 8561811.174725892022252,-109371.399704391558771 8547157.254736468195915,-109402.346522832653136 8546210.98679587058723,-113298.528700596987619 8516304.704630665481091,-113453.151473308418645 8515300.218514567241073,-113917.019791442682617 8512598.673570608720183,-114164.371699986164458 8511656.860667657107115,-114597.18188019093941 8510965.385719021782279,-122977.090508127046633 8508642.787855675444007))
+POLYGON ((-92951.774812383315293 8551198.100884104147553,-104145.617528592178132 8551449.477800389751792,-106712.088388830219628 8553280.971615452319384,-107485.202252390168724 8554543.757799495011568,-106835.76434310337936 8559852.617919530719519,-104516.645391405982082 8578775.789309298619628,-98301.344261944264872 8589683.303010007366538,-97775.582306927783065 8590192.375558510422707,-89735.86604285564681 8589303.349632600322366,-86025.253456243823166 8587145.781196678057313,-85468.656002277493826 8586638.748019121587276,-84386.407912785929511 8584100.457003850489855,-84293.567457465469488 8583213.998386295512319,-85004.787684143229853 8578521.646073216572404,-91251.035632043218357 8554734.763527067378163,-92951.774812383315293 8551198.100884104147553))
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/test_buffer.hpp b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer.hpp
new file mode 100644
index 000000000..3b745996e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer.hpp
@@ -0,0 +1,550 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test Helper
+
+// Copyright (c) 2010-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016-2017.
+// Modifications copyright (c) 2016-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_BUFFER_HPP
+#define BOOST_GEOMETRY_TEST_BUFFER_HPP
+
+#if defined(TEST_WITH_SVG)
+ // Define before including any buffer headerfile
+ #define BOOST_GEOMETRY_BUFFER_USE_HELPER_POINTS
+#endif
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+
+#include <boost/foreach.hpp>
+#include "geometry_test_common.hpp"
+
+#include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/buffer.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/disjoint.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+#include <boost/geometry/algorithms/is_empty.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+#include <boost/geometry/algorithms/union.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/strategies/buffer.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+
+const double same_distance = -999;
+
+#if defined(TEST_WITH_SVG)
+# include "test_buffer_svg.hpp"
+# include "test_buffer_svg_per_turn.hpp"
+#endif
+
+//-----------------------------------------------------------------------------
+template <typename JoinStrategy>
+struct JoinTestProperties
+{
+ static std::string name() { return "joinunknown"; }
+};
+
+template<> struct JoinTestProperties<boost::geometry::strategy::buffer::join_round>
+{
+ static std::string name() { return "round"; }
+};
+
+template<> struct JoinTestProperties<boost::geometry::strategy::buffer::join_miter>
+{
+ static std::string name() { return "miter"; }
+};
+
+template<> struct JoinTestProperties<boost::geometry::strategy::buffer::join_round_by_divide>
+{
+ static std::string name() { return "divide"; }
+};
+
+
+//-----------------------------------------------------------------------------
+template <typename EndStrategy>
+struct EndTestProperties { };
+
+template<> struct EndTestProperties<boost::geometry::strategy::buffer::end_round>
+{
+ static std::string name() { return "round"; }
+};
+
+template<> struct EndTestProperties<boost::geometry::strategy::buffer::end_flat>
+{
+ static std::string name() { return "flat"; }
+};
+
+struct ut_settings
+{
+ double tolerance;
+ bool test_validity;
+ bool test_area;
+ bool use_ln_area;
+ int points_per_circle;
+
+ explicit ut_settings(double tol = 0.01, bool val = true, int points = 88)
+ : tolerance(tol)
+ , test_validity(val)
+ , test_area(true)
+ , use_ln_area(false)
+ , points_per_circle(points)
+ {}
+
+ static inline ut_settings ignore_validity()
+ {
+ ut_settings result;
+ result.test_validity = false;
+ return result;
+ }
+
+ static inline ut_settings assertions_only()
+ {
+ ut_settings result;
+ result.test_validity = false;
+ result.test_area = false;
+ return result;
+ }
+
+ static inline double ignore_area() { return 9999.9; }
+};
+
+template
+<
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy,
+ typename DistanceStrategy,
+ typename SideStrategy,
+ typename PointStrategy,
+ typename AreaStrategy,
+ typename Geometry
+>
+void test_buffer(std::string const& caseid,
+ bg::model::multi_polygon<GeometryOut>& buffered,
+ Geometry const& geometry,
+ JoinStrategy const& join_strategy,
+ EndStrategy const& end_strategy,
+ DistanceStrategy const& distance_strategy,
+ SideStrategy const& side_strategy,
+ PointStrategy const& point_strategy,
+ AreaStrategy const& area_strategy,
+ int expected_count,
+ int expected_holes_count,
+ double expected_area,
+ ut_settings const& settings)
+{
+ namespace bg = boost::geometry;
+
+ typedef typename bg::coordinate_type<Geometry>::type coordinate_type;
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ typedef typename bg::tag<Geometry>::type tag;
+ // TODO use something different here:
+ std::string type = boost::is_same<tag, bg::polygon_tag>::value ? "poly"
+ : boost::is_same<tag, bg::linestring_tag>::value ? "line"
+ : boost::is_same<tag, bg::point_tag>::value ? "point"
+ : boost::is_same<tag, bg::multi_polygon_tag>::value ? "multipoly"
+ : boost::is_same<tag, bg::multi_linestring_tag>::value ? "multiline"
+ : boost::is_same<tag, bg::multi_point_tag>::value ? "multipoint"
+ : ""
+ ;
+
+ bg::model::box<point_type> envelope;
+ if (bg::is_empty(geometry))
+ {
+ bg::assign_values(envelope, 0, 0, 1, 1);
+ }
+ else
+ {
+ bg::envelope(geometry, envelope);
+ }
+
+ std::string join_name = JoinTestProperties<JoinStrategy>::name();
+ std::string end_name = EndTestProperties<EndStrategy>::name();
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<tag, bg::point_tag>::value
+ || boost::is_same<tag, bg::multi_point_tag>::value )) )
+ {
+ join_name.clear();
+ }
+
+ std::ostringstream complete;
+ complete
+ << type << "_"
+ << caseid << "_"
+ << string_from_type<coordinate_type>::name()
+ << "_" << join_name
+ << (end_name.empty() ? "" : "_") << end_name
+ << (distance_strategy.negative() ? "_deflate" : "")
+ << (bg::point_order<GeometryOut>::value == bg::counterclockwise ? "_ccw" : "")
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ << "_rescaled"
+#endif
+ // << "_" << point_buffer_count
+ ;
+
+ //std::cout << complete.str() << std::endl;
+
+#if defined(TEST_WITH_SVG_PER_TURN)
+ save_turns_visitor<point_type> visitor;
+#elif defined(TEST_WITH_SVG)
+
+ buffer_svg_mapper<point_type> buffer_mapper(complete.str());
+
+ std::ostringstream filename;
+ filename << "buffer_" << complete.str() << ".svg";
+ std::ofstream svg(filename.str().c_str());
+ typedef bg::svg_mapper<point_type> mapper_type;
+ mapper_type mapper(svg, 1000, 800);
+
+ svg_visitor<mapper_type, bg::model::box<point_type> > visitor(mapper);
+
+ buffer_mapper.prepare(mapper, visitor, envelope,
+ distance_strategy.negative()
+ ? 1.0
+ : 1.1 * distance_strategy.max_distance(join_strategy, end_strategy)
+ );
+#else
+ bg::detail::buffer::visit_pieces_default_policy visitor;
+#endif
+
+ typedef typename bg::point_type<Geometry>::type point_type;
+ typedef typename bg::rescale_policy_type<point_type>::type
+ rescale_policy_type;
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type strategy_type;
+ typedef typename strategy_type::envelope_strategy_type envelope_strategy_type;
+
+ // Enlarge the box to get a proper rescale policy
+ bg::buffer(envelope, envelope, distance_strategy.max_distance(join_strategy, end_strategy));
+
+ strategy_type strategy;
+ rescale_policy_type rescale_policy
+ = bg::get_rescale_policy<rescale_policy_type>(envelope);
+
+ envelope_strategy_type envelope_strategy;
+
+ buffered.clear();
+ bg::detail::buffer::buffer_inserter<GeometryOut>(geometry,
+ std::back_inserter(buffered),
+ distance_strategy,
+ side_strategy,
+ join_strategy,
+ end_strategy,
+ point_strategy,
+ strategy,
+ rescale_policy,
+ visitor);
+
+#if defined(TEST_WITH_SVG)
+ buffer_mapper.map_input_output(mapper, geometry, buffered, distance_strategy.negative());
+#endif
+
+ //Uncomment to create simple CSV to compare/use in tests - adapt precision if necessary
+ //std::cout << complete.str() << "," << std::fixed << std::setprecision(0) << area << std::endl;
+ //return;
+
+ if (bg::is_empty(buffered) && bg::math::equals(expected_area, 0.0))
+ {
+ // As expected - don't get rescale policy for output (will be invalid)
+ return;
+ }
+
+ if (settings.test_area)
+ {
+ BOOST_CHECK_MESSAGE
+ (
+ ! bg::is_empty(buffered),
+ complete.str() << " output is empty (unexpected)."
+ );
+ }
+
+ bg::model::box<point_type> envelope_output;
+ bg::assign_values(envelope_output, 0, 0, 1, 1);
+ bg::envelope(buffered, envelope_output, envelope_strategy);
+
+ // std::cout << caseid << std::endl;
+ // std::cout << "INPUT: " << bg::wkt(geometry) << std::endl;
+ // std::cout << "OUTPUT: " << area << std::endl;
+ // std::cout << "OUTPUT env: " << bg::wkt(envelope_output) << std::endl;
+ // std::cout << bg::wkt(buffered) << std::endl;
+
+ if (expected_count >= 0)
+ {
+ BOOST_CHECK_MESSAGE
+ (
+ int(buffered.size()) == expected_count,
+ "#outputs not as expected."
+ << " Expected: " << expected_count
+ << " Detected: " << buffered.size()
+ );
+ }
+
+ if (expected_holes_count >= 0)
+ {
+ std::size_t nholes = bg::num_interior_rings(buffered);
+ BOOST_CHECK_MESSAGE
+ (
+ int(nholes) == expected_holes_count,
+ complete.str() << " #holes not as expected."
+ << " Expected: " << expected_holes_count
+ << " Detected: " << nholes
+ );
+ }
+
+ if (settings.test_area)
+ {
+ // Because areas vary hugely in buffer, the Boost.Test methods are not convenient.
+ // Use just the abs - but if areas are really small that is not convenient neither.
+ // Therefore there is a logarithmic option too.
+ typename bg::default_area_result<GeometryOut>::type area = bg::area(buffered, area_strategy);
+ double const difference = settings.use_ln_area
+ ? std::log(area) - std::log(expected_area)
+ : area - expected_area;
+ BOOST_CHECK_MESSAGE
+ (
+ bg::math::abs(difference) < settings.tolerance,
+ complete.str() << " not as expected. "
+ << std::setprecision(18)
+ << " Expected: " << expected_area
+ << " Detected: " << area
+ << " Diff: " << difference
+ << " Tol: " << settings.tolerance
+ << std::setprecision(3)
+ << " , " << 100.0 * (difference / expected_area) << "%"
+ );
+// if (settings.use_ln_area)
+// {
+// std::cout << complete.str()
+// << std::setprecision(6)
+// << " ln(detected)=" << std::log(area)
+// << " ln(expected)=" << std::log(expected_area)
+// << " diff=" << difference
+// << " detected=" << area
+// << std::endl;
+// }
+ }
+
+#if ! defined(BOOST_GEOMETRY_TEST_ALWAYS_CHECK_VALIDITY)
+ if (settings.test_validity)
+#endif
+ {
+ if (! bg::is_valid(buffered))
+ {
+ BOOST_CHECK_MESSAGE(bg::is_valid(buffered), complete.str() << " is not valid");
+ }
+ }
+
+#if defined(TEST_WITH_SVG_PER_TURN)
+ {
+ // Create a per turn visitor to map per turn, and buffer again with it
+ per_turn_visitor<point_type> ptv(complete.str(), visitor.get_points());
+ bg::detail::buffer::buffer_inserter<GeometryOut>(geometry,
+ std::back_inserter(buffered),
+ distance_strategy,
+ side_strategy,
+ join_strategy,
+ end_strategy,
+ point_strategy,
+ rescale_policy,
+ ptv);
+ ptv.map_input_output(geometry, buffered, distance_strategy.negative());
+ // self_ips NYI here
+ }
+#elif defined(TEST_WITH_SVG)
+ rescale_policy_type rescale_policy_output
+ = bg::get_rescale_policy<rescale_policy_type>(envelope_output);
+ buffer_mapper.map_self_ips(mapper, buffered, strategy, rescale_policy_output);
+#endif
+
+}
+
+template
+<
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy,
+ typename DistanceStrategy,
+ typename SideStrategy,
+ typename PointStrategy,
+ typename Geometry
+>
+void test_buffer(std::string const& caseid, bg::model::multi_polygon<GeometryOut>& buffered, Geometry const& geometry,
+ JoinStrategy const& join_strategy,
+ EndStrategy const& end_strategy,
+ DistanceStrategy const& distance_strategy,
+ SideStrategy const& side_strategy,
+ PointStrategy const& point_strategy,
+ double expected_area,
+ ut_settings const& settings = ut_settings())
+{
+ typename bg::strategy::area::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type area_strategy;
+
+ test_buffer<GeometryOut>(caseid, buffered, geometry,
+ join_strategy, end_strategy, distance_strategy, side_strategy, point_strategy,
+ area_strategy,
+ -1, -1, expected_area, settings);
+}
+
+#ifdef BOOST_GEOMETRY_CHECK_WITH_POSTGIS
+static int counter = 0;
+#endif
+
+template
+<
+ typename Geometry,
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy
+>
+void test_one(std::string const& caseid, std::string const& wkt,
+ JoinStrategy const& join_strategy, EndStrategy const& end_strategy,
+ int expected_count, int expected_holes_count, double expected_area,
+ double distance_left, ut_settings const& settings = ut_settings(),
+ double distance_right = same_distance)
+{
+ namespace bg = boost::geometry;
+ Geometry g;
+ bg::read_wkt(wkt, g);
+ bg::correct(g);
+
+#ifdef BOOST_GEOMETRY_CHECK_WITH_POSTGIS
+ std::cout
+ << (counter > 0 ? "union " : "")
+ << "select " << counter++
+ << ", '" << caseid << "' as caseid"
+ << ", ST_Area(ST_Buffer(ST_GeomFromText('" << wkt << "'), "
+ << distance_left
+ << ", 'endcap=" << end_name << " join=" << join_name << "'))"
+ << ", " << expected_area
+ << std::endl;
+#endif
+
+
+ bg::strategy::buffer::side_straight side_strategy;
+ bg::strategy::buffer::point_circle circle_strategy(settings.points_per_circle);
+
+ bg::strategy::buffer::distance_asymmetric
+ <
+ typename bg::coordinate_type<Geometry>::type
+ > distance_strategy(distance_left,
+ bg::math::equals(distance_right, same_distance)
+ ? distance_left : distance_right);
+
+ typename bg::strategy::area::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type area_strategy;
+
+ bg::model::multi_polygon<GeometryOut> buffered;
+ test_buffer<GeometryOut>
+ (caseid, buffered, g,
+ join_strategy, end_strategy,
+ distance_strategy, side_strategy, circle_strategy,
+ area_strategy,
+ expected_count, expected_holes_count, expected_area,
+ settings);
+
+#if !defined(BOOST_GEOMETRY_COMPILER_MODE_DEBUG) && defined(BOOST_GEOMETRY_COMPILER_MODE_RELEASE)
+
+ // Also test symmetric distance strategy if right-distance is not specified
+ // (only in release mode)
+ if (bg::math::equals(distance_right, same_distance))
+ {
+ bg::strategy::buffer::distance_symmetric
+ <
+ typename bg::coordinate_type<Geometry>::type
+ > sym_distance_strategy(distance_left);
+
+ test_buffer<GeometryOut>
+ (caseid + "_sym", buffered, g,
+ join_strategy, end_strategy,
+ sym_distance_strategy, side_strategy, circle_strategy,
+ area_strategy,
+ expected_count, expected_holes_count, expected_area,
+ settings);
+
+ }
+#endif
+}
+
+template
+<
+ typename Geometry,
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy
+>
+void test_one(std::string const& caseid, std::string const& wkt,
+ JoinStrategy const& join_strategy, EndStrategy const& end_strategy,
+ double expected_area,
+ double distance_left, ut_settings const& settings = ut_settings(),
+ double distance_right = same_distance)
+{
+ test_one<Geometry, GeometryOut>(caseid, wkt, join_strategy, end_strategy,
+ -1 ,-1, expected_area,
+ distance_left, settings, distance_right);
+}
+
+template
+<
+ typename Geometry,
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy,
+ typename DistanceStrategy,
+ typename SideStrategy,
+ typename PointStrategy
+>
+void test_with_custom_strategies(std::string const& caseid,
+ std::string const& wkt,
+ JoinStrategy const& join_strategy,
+ EndStrategy const& end_strategy,
+ DistanceStrategy const& distance_strategy,
+ SideStrategy const& side_strategy,
+ PointStrategy const& point_strategy,
+ double expected_area,
+ ut_settings const& settings = ut_settings())
+{
+ namespace bg = boost::geometry;
+ Geometry g;
+ bg::read_wkt(wkt, g);
+ bg::correct(g);
+
+ bg::model::multi_polygon<GeometryOut> buffered;
+
+ test_buffer<GeometryOut>
+ (caseid, buffered, g,
+ join_strategy, end_strategy,
+ distance_strategy, side_strategy, point_strategy,
+ expected_area, settings);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_geo.hpp b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_geo.hpp
new file mode 100644
index 000000000..efeeee1e2
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_geo.hpp
@@ -0,0 +1,83 @@
+// Boost.Geometry
+// Unit Test Helper
+
+// Copyright (c) 2018-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_BUFFER_GEO_HPP
+#define BOOST_GEOMETRY_TEST_BUFFER_GEO_HPP
+
+#include "test_buffer.hpp"
+
+template
+<
+ typename Geometry,
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy
+>
+void test_one_geo(std::string const& caseid,
+ std::string const& wkt,
+ JoinStrategy const& join_strategy, EndStrategy const& end_strategy,
+ int expected_count, int expected_holes_count, double expected_area,
+ double distance_left, ut_settings settings = ut_settings(),
+ double distance_right = same_distance)
+{
+ Geometry input_geometry;
+ bg::read_wkt(wkt, input_geometry);
+ bg::correct(input_geometry);
+
+ bg::strategy::buffer::side_straight side_strategy;
+ bg::strategy::buffer::distance_asymmetric
+ <
+ typename bg::coordinate_type<Geometry>::type
+ > distance_strategy(distance_left,
+ bg::math::equals(distance_right, same_distance)
+ ? distance_left : distance_right);
+
+ // Use the appropriate strategy for geographic points
+ bg::strategy::buffer::geographic_point_circle<> circle_strategy(settings.points_per_circle);
+
+ // Use Thomas strategy to calculate geographic area, because it is
+ // the most precise (unless scale of buffer is only around 1 meter)
+ bg::strategy::area::geographic
+ <
+ bg::strategy::thomas, 5,
+ bg::srs::spheroid<long double>, long double
+ > area_strategy;
+
+ bg::model::multi_polygon<GeometryOut> buffer;
+
+ test_buffer<GeometryOut>
+ (caseid, buffer, input_geometry,
+ join_strategy, end_strategy,
+ distance_strategy, side_strategy, circle_strategy,
+ area_strategy,
+ expected_count, expected_holes_count, expected_area,
+ settings);
+}
+
+template
+<
+ typename Geometry,
+ typename GeometryOut,
+ typename JoinStrategy,
+ typename EndStrategy
+>
+void test_one_geo(std::string const& caseid, std::string const& wkt,
+ JoinStrategy const& join_strategy, EndStrategy const& end_strategy,
+ double expected_area,
+ double distance_left, ut_settings const& settings = ut_settings(),
+ double distance_right = same_distance)
+{
+ test_one_geo<Geometry, GeometryOut>(caseid, wkt, join_strategy, end_strategy,
+ -1 ,-1, expected_area,
+ distance_left, settings, distance_right);
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg.hpp b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg.hpp
new file mode 100644
index 000000000..85e2cc614
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg.hpp
@@ -0,0 +1,480 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test Helper
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_BUFFER_SVG_HPP
+#define BOOST_GEOMETRY_TEST_BUFFER_SVG_HPP
+
+#include <fstream>
+#include <sstream>
+
+// Uncomment next lines if you want to have a zoomed view
+//#define BOOST_GEOMETRY_BUFFER_TEST_SVG_USE_ALTERNATE_BOX
+
+// If possible define box before including this unit with the right view
+#ifdef BOOST_GEOMETRY_BUFFER_TEST_SVG_USE_ALTERNATE_BOX
+# ifndef BOOST_GEOMETRY_BUFFER_TEST_SVG_ALTERNATE_BOX
+# define BOOST_GEOMETRY_BUFFER_TEST_SVG_ALTERNATE_BOX "BOX(0 0,100 100)"
+# endif
+#endif
+
+#include <boost/foreach.hpp>
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+
+
+inline char piece_type_char(bg::strategy::buffer::piece_type const& type)
+{
+ using namespace bg::strategy::buffer;
+ switch(type)
+ {
+ case buffered_segment : return 's';
+ case buffered_join : return 'j';
+ case buffered_round_end : return 'r';
+ case buffered_flat_end : return 'f';
+ case buffered_point : return 'p';
+ case buffered_concave : return 'c';
+ default : return '?';
+ }
+}
+
+template <typename SvgMapper, typename Box>
+class svg_visitor
+{
+public :
+ svg_visitor(SvgMapper& mapper)
+ : m_mapper(mapper)
+ , m_zoom(false)
+ {
+ bg::assign_inverse(m_alternate_box);
+ }
+
+ void set_alternate_box(Box const& box)
+ {
+ m_alternate_box = box;
+ m_zoom = true;
+ }
+
+ template <typename PieceCollection>
+ inline void apply(PieceCollection const& collection, int phase)
+ {
+ // Comment next return if you want to see pieces, turns, etc.
+ return;
+
+ if(phase == 0)
+ {
+ map_pieces(collection.m_pieces, collection.offsetted_rings, true, true);
+ }
+ if (phase == 1)
+ {
+ map_turns(collection.m_turns, true, false);
+ }
+ if (phase == 2 && ! m_zoom)
+ {
+// map_traversed_rings(collection.traversed_rings);
+// map_offsetted_rings(collection.offsetted_rings);
+ }
+ }
+
+private :
+ class si
+ {
+ private :
+ bg::segment_identifier m_id;
+
+ public :
+ inline si(bg::segment_identifier const& id)
+ : m_id(id)
+ {}
+
+ template <typename Char, typename Traits>
+ inline friend std::basic_ostream<Char, Traits>& operator<<(
+ std::basic_ostream<Char, Traits>& os,
+ si const& s)
+ {
+ os << s.m_id.multi_index << "." << s.m_id.segment_index;
+ return os;
+ }
+ };
+
+ template <typename Turns>
+ inline void map_turns(Turns const& turns, bool label_good_turns, bool label_wrong_turns)
+ {
+ namespace bgdb = boost::geometry::detail::buffer;
+ typedef typename boost::range_value<Turns const>::type turn_type;
+ typedef typename turn_type::point_type point_type;
+ typedef typename turn_type::robust_point_type robust_point_type;
+
+ std::map<robust_point_type, int, bg::less<robust_point_type> > offsets;
+
+ for (typename boost::range_iterator<Turns const>::type it =
+ boost::begin(turns); it != boost::end(turns); ++it)
+ {
+ if (m_zoom && bg::disjoint(it->point, m_alternate_box))
+ {
+ continue;
+ }
+
+ bool is_good = true;
+ char color = 'g';
+ std::string fill = "fill:rgb(0,255,0);";
+ switch(it->location)
+ {
+ case bgdb::inside_buffer :
+ fill = "fill:rgb(255,0,0);";
+ color = 'r';
+ is_good = false;
+ break;
+ case bgdb::location_discard :
+ fill = "fill:rgb(0,0,255);";
+ color = 'b';
+ is_good = false;
+ break;
+ default:
+ ; // to avoid "enumeration value not handled" warning
+ }
+ if (it->blocked())
+ {
+ fill = "fill:rgb(128,128,128);";
+ color = '-';
+ is_good = false;
+ }
+
+ fill += "fill-opacity:0.7;";
+
+ m_mapper.map(it->point, fill, 4);
+
+ if ((label_good_turns && is_good) || (label_wrong_turns && ! is_good))
+ {
+ std::ostringstream out;
+ out << it->turn_index;
+ if (it->cluster_id >= 0)
+ {
+ out << " (" << it->cluster_id << ")";
+ }
+ out
+ << " " << it->operations[0].piece_index << "/" << it->operations[1].piece_index
+ << " " << si(it->operations[0].seg_id) << "/" << si(it->operations[1].seg_id)
+
+ // If you want to see travel information
+ << std::endl
+ << " nxt " << it->operations[0].enriched.get_next_turn_index()
+ << "/" << it->operations[1].enriched.get_next_turn_index()
+ //<< " frac " << it->operations[0].fraction
+
+ // If you want to see (robust)point coordinates (e.g. to find duplicates)
+ << std::endl << std::setprecision(16) << bg::wkt(it->point)
+ << std::endl << bg::wkt(it->robust_point)
+
+ << std::endl;
+ out << " " << bg::method_char(it->method)
+ << ":" << bg::operation_char(it->operations[0].operation)
+ << "/" << bg::operation_char(it->operations[1].operation);
+ out << " "
+ << (it->count_within_near_offsetted > 0 ? "n" : "")
+ << (it->count_within > 0 ? "w" : "")
+ << (it->count_on_helper > 0 ? "h" : "")
+ ;
+
+ offsets[it->get_robust_point()] += 10;
+ int offset = offsets[it->get_robust_point()];
+
+ m_mapper.text(it->point, out.str(), "fill:rgb(0,0,0);font-family='Arial';font-size:9px;", 5, offset);
+
+ offsets[it->get_robust_point()] += 25;
+ }
+ }
+ }
+
+ template <typename Pieces, typename OffsettedRings>
+ inline void map_pieces(Pieces const& pieces,
+ OffsettedRings const& offsetted_rings,
+ bool do_pieces, bool do_indices)
+ {
+ typedef typename boost::range_value<Pieces const>::type piece_type;
+ typedef typename boost::range_value<OffsettedRings const>::type ring_type;
+
+ for(typename boost::range_iterator<Pieces const>::type it = boost::begin(pieces);
+ it != boost::end(pieces);
+ ++it)
+ {
+ const piece_type& piece = *it;
+ bg::segment_identifier seg_id = piece.first_seg_id;
+ if (seg_id.segment_index < 0)
+ {
+ continue;
+ }
+
+ ring_type corner;
+
+
+ ring_type const& ring = offsetted_rings[seg_id.multi_index];
+
+ std::copy(boost::begin(ring) + seg_id.segment_index,
+ boost::begin(ring) + piece.last_segment_index,
+ std::back_inserter(corner));
+ std::copy(boost::begin(piece.helper_points),
+ boost::end(piece.helper_points),
+ std::back_inserter(corner));
+
+ if (corner.empty())
+ {
+ continue;
+ }
+#if 0 // Does not compile (SVG is not enabled by default)
+ if (m_zoom && bg::disjoint(corner, m_alternate_box))
+ {
+ continue;
+ }
+#endif
+
+ if (m_zoom && do_pieces)
+ {
+ try
+ {
+ std::string style = "opacity:0.3;stroke:rgb(0,0,0);stroke-width:1;";
+ typedef typename bg::point_type<Box>::type point_type;
+ bg::model::multi_polygon<bg::model::polygon<point_type> > clipped;
+ bg::intersection(ring, m_alternate_box, clipped);
+ m_mapper.map(clipped,
+ piece.type == bg::strategy::buffer::buffered_segment
+ ? style + "fill:rgb(255,128,0);"
+ : style + "fill:rgb(255,0,0);");
+ }
+ catch (...)
+ {
+ std::cerr << "Error for piece " << piece.index << std::endl;
+ }
+ }
+ else if (do_pieces)
+ {
+ std::string style = "opacity:0.3;stroke:rgb(0,0,0);stroke-width:1;";
+ m_mapper.map(corner,
+ piece.type == bg::strategy::buffer::buffered_segment
+ ? style + "fill:rgb(255,128,0);"
+ : style + "fill:rgb(255,0,0);");
+ }
+
+ if (do_indices)
+ {
+ // Label starting piece_index / segment_index
+ typedef typename bg::point_type<ring_type>::type point_type;
+
+ std::ostringstream out;
+ out << piece.index
+ << (piece.is_flat_start ? " FS" : "")
+ << (piece.is_flat_end ? " FE" : "")
+ << " (" << piece_type_char(piece.type) << ") "
+ << piece.first_seg_id.segment_index
+ << ".." << piece.last_segment_index - 1;
+ point_type label_point = bg::return_centroid<point_type>(corner);
+
+ if ((piece.type == bg::strategy::buffer::buffered_concave
+ || piece.type == bg::strategy::buffer::buffered_flat_end)
+ && corner.size() >= 2u)
+ {
+ bg::set<0>(label_point, (bg::get<0>(corner[0]) + bg::get<0>(corner[1])) / 2.0);
+ bg::set<1>(label_point, (bg::get<1>(corner[0]) + bg::get<1>(corner[1])) / 2.0);
+ }
+ m_mapper.text(label_point, out.str(), "fill:rgb(255,0,0);font-family='Arial';font-size:10px;", 5, 5);
+ }
+ }
+ }
+
+ template <typename TraversedRings>
+ inline void map_traversed_rings(TraversedRings const& traversed_rings)
+ {
+ for(typename boost::range_iterator<TraversedRings const>::type it
+ = boost::begin(traversed_rings); it != boost::end(traversed_rings); ++it)
+ {
+ m_mapper.map(*it, "opacity:0.4;fill:none;stroke:rgb(0,255,0);stroke-width:2");
+ }
+ }
+
+ template <typename OffsettedRings>
+ inline void map_offsetted_rings(OffsettedRings const& offsetted_rings)
+ {
+ for(typename boost::range_iterator<OffsettedRings const>::type it
+ = boost::begin(offsetted_rings); it != boost::end(offsetted_rings); ++it)
+ {
+ if (it->discarded())
+ {
+ m_mapper.map(*it, "opacity:0.4;fill:none;stroke:rgb(255,0,0);stroke-width:2");
+ }
+ else
+ {
+ m_mapper.map(*it, "opacity:0.4;fill:none;stroke:rgb(0,0,255);stroke-width:2");
+ }
+ }
+ }
+
+
+ SvgMapper& m_mapper;
+ Box m_alternate_box;
+ bool m_zoom;
+
+};
+
+template <typename Point>
+class buffer_svg_mapper
+{
+public :
+
+ buffer_svg_mapper(std::string const& casename)
+ : m_casename(casename)
+ , m_zoom(false)
+ {
+ bg::assign_inverse(m_alternate_box);
+ }
+
+ template <typename Mapper, typename Visitor, typename Envelope>
+ void prepare(Mapper& mapper, Visitor& visitor, Envelope const& envelope, double box_buffer_distance)
+ {
+#ifdef BOOST_GEOMETRY_BUFFER_TEST_SVG_USE_ALTERNATE_BOX
+ // Create a zoomed-in view
+ bg::model::box<Point> alternate_box;
+ bg::read_wkt(BOOST_GEOMETRY_BUFFER_TEST_SVG_ALTERNATE_BOX, alternate_box);
+ mapper.add(alternate_box);
+
+ // Take care non-visible elements are skipped
+ visitor.set_alternate_box(alternate_box);
+ set_alternate_box(alternate_box);
+#else
+ bg::model::box<Point> box = envelope;
+ bg::buffer(box, box, box_buffer_distance);
+ mapper.add(box);
+#endif
+
+ boost::ignore_unused(visitor);
+ }
+
+ void set_alternate_box(bg::model::box<Point> const& box)
+ {
+ m_alternate_box = box;
+ m_zoom = true;
+ }
+
+ template <typename Mapper, typename Geometry, typename GeometryBuffer>
+ void map_input_output(Mapper& mapper, Geometry const& geometry,
+ GeometryBuffer const& buffered, bool negative)
+ {
+ bool const areal = boost::is_same
+ <
+ typename bg::tag_cast
+ <
+ typename bg::tag<Geometry>::type,
+ bg::areal_tag
+ >::type, bg::areal_tag
+ >::type::value;
+
+ if (m_zoom)
+ {
+ map_io_zoomed(mapper, geometry, buffered, negative, areal);
+ }
+ else
+ {
+ map_io(mapper, geometry, buffered, negative, areal);
+ }
+ }
+
+ template <typename Mapper, typename Geometry, typename Strategy, typename RescalePolicy>
+ void map_self_ips(Mapper& mapper, Geometry const& geometry, Strategy const& strategy, RescalePolicy const& rescale_policy)
+ {
+ typedef bg::detail::overlay::turn_info
+ <
+ Point,
+ typename bg::detail::segment_ratio_type<Point, RescalePolicy>::type
+ > turn_info;
+
+ std::vector<turn_info> turns;
+
+ bg::detail::self_get_turn_points::no_interrupt_policy policy;
+ bg::self_turns
+ <
+ bg::detail::overlay::assign_null_policy
+ >(geometry, strategy, rescale_policy, turns, policy);
+
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ mapper.map(turn.point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 3);
+ }
+ }
+
+private :
+
+ template <typename Mapper, typename Geometry, typename GeometryBuffer>
+ void map_io(Mapper& mapper, Geometry const& geometry,
+ GeometryBuffer const& buffered, bool negative, bool areal)
+ {
+ // Map input geometry in green
+ if (areal)
+ {
+ mapper.map(geometry, "opacity:0.5;fill:rgb(0,128,0);stroke:rgb(0,64,0);stroke-width:2");
+ }
+ else
+ {
+ // TODO: clip input points/linestring
+ mapper.map(geometry, "opacity:0.5;stroke:rgb(0,128,0);stroke-width:10");
+ }
+
+ {
+ // Map buffer in yellow (inflate) and with orange-dots (deflate)
+ std::string style = negative
+ ? "opacity:0.4;fill:rgb(255,255,192);stroke:rgb(255,128,0);stroke-width:3"
+ : "opacity:0.4;fill:rgb(255,255,128);stroke:rgb(0,0,0);stroke-width:3";
+
+ mapper.map(buffered, style);
+ }
+ }
+
+ template <typename Mapper, typename Geometry, typename GeometryBuffer>
+ void map_io_zoomed(Mapper& mapper, Geometry const& geometry,
+ GeometryBuffer const& buffered, bool negative, bool areal)
+ {
+ // Map input geometry in green
+ if (areal)
+ {
+ // Assuming input is areal
+ GeometryBuffer clipped;
+// TODO: the next line does NOT compile for multi-point, TODO: implement that line
+// bg::intersection(geometry, m_alternate_box, clipped);
+ mapper.map(clipped, "opacity:0.5;fill:rgb(0,128,0);stroke:rgb(0,64,0);stroke-width:2");
+ }
+ else
+ {
+ // TODO: clip input (multi)point/linestring
+ mapper.map(geometry, "opacity:0.5;stroke:rgb(0,128,0);stroke-width:10");
+ }
+
+ {
+ // Map buffer in yellow (inflate) and with orange-dots (deflate)
+ std::string style = negative
+ ? "opacity:0.4;fill:rgb(255,255,192);stroke:rgb(255,128,0);stroke-width:3"
+ : "opacity:0.4;fill:rgb(255,255,128);stroke:rgb(0,0,0);stroke-width:3";
+
+ try
+ {
+ // Clip output multi-polygon with box
+ GeometryBuffer clipped;
+ bg::intersection(buffered, m_alternate_box, clipped);
+ mapper.map(clipped, style);
+ }
+ catch (...)
+ {
+ std::cout << "Error for buffered output " << m_casename << std::endl;
+ }
+ }
+ }
+
+ bg::model::box<Point> m_alternate_box;
+ bool m_zoom;
+ std::string m_casename;
+};
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg_per_turn.hpp b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg_per_turn.hpp
new file mode 100644
index 000000000..e48d333d1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/buffer/test_buffer_svg_per_turn.hpp
@@ -0,0 +1,164 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test Helper
+
+// Copyright (c) 2010-2019 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_BUFFER_SVG_PER_TURN_HPP
+#define BOOST_GEOMETRY_TEST_BUFFER_SVG_PER_TURN_HPP
+
+#include <fstream>
+#include <vector>
+
+#include "test_buffer_svg.hpp"
+#include <boost/ptr_container/ptr_vector.hpp>
+
+template <typename Point>
+class save_turns_visitor
+{
+public :
+ typedef std::vector<std::pair<Point, int> > vector_type;
+
+ template <typename Turns>
+ inline void get_turns(Turns const& turns)
+ {
+ for (typename boost::range_iterator<Turns const>::type it =
+ boost::begin(turns); it != boost::end(turns); ++it)
+ {
+ m_points.push_back(std::make_pair(it->point, it->turn_index));
+ }
+ }
+
+ template <typename PieceCollection>
+ inline void apply(PieceCollection const& collection, int phase)
+ {
+ if (phase == 0)
+ {
+ get_turns(collection.m_turns);
+ }
+ }
+
+ vector_type const& get_points() { return m_points; }
+
+private :
+ vector_type m_points;
+};
+
+
+
+template <typename Point>
+class mapper_visitor
+{
+public :
+ mapper_visitor(std::string const& complete, int index, Point const& point)
+ : m_filename(get_filename(complete, index))
+ , m_svg(m_filename.c_str())
+ , m_mapper(m_svg, 1000, 800)
+ , m_visitor(m_mapper)
+ , m_buffer_mapper(m_filename)
+ {
+ box_type box;
+ double half_size = 75.0; // specific for multi_point buffer
+ bg::set<bg::min_corner, 0>(box, bg::get<0>(point) - half_size);
+ bg::set<bg::min_corner, 1>(box, bg::get<1>(point) - half_size);
+ bg::set<bg::max_corner, 0>(box, bg::get<0>(point) + half_size);
+ bg::set<bg::max_corner, 1>(box, bg::get<1>(point) + half_size);
+
+ m_mapper.add(box);
+ m_visitor.set_alternate_box(box);
+ m_buffer_mapper.set_alternate_box(box);
+ }
+
+ // It is used in a ptr vector
+ virtual ~mapper_visitor()
+ {
+ }
+
+ template <typename PieceCollection>
+ inline void apply(PieceCollection const& collection, int phase)
+ {
+ m_visitor.apply(collection, phase);
+ }
+
+ template <typename Geometry, typename GeometryBuffer>
+ void map_input_output(Geometry const& geometry,
+ GeometryBuffer const& buffered, bool negative)
+ {
+ m_buffer_mapper.map_input_output(m_mapper, geometry, buffered, negative);
+ }
+
+private :
+ std::string get_filename(std::string const& complete, int index)
+ {
+ std::ostringstream filename;
+ filename << "buffer_per_turn_" << complete << "_" << index << ".svg";
+ return filename.str();
+ }
+
+ typedef bg::svg_mapper<Point> mapper_type;
+ typedef bg::model::box<Point> box_type;
+
+ std::string m_filename;
+ std::ofstream m_svg;
+ mapper_type m_mapper;
+ svg_visitor<mapper_type, box_type> m_visitor;
+ buffer_svg_mapper<Point> m_buffer_mapper;
+};
+
+template <typename Point>
+class per_turn_visitor
+{
+ // Both fstreams and svg mappers are non-copyable,
+ // therefore we need to use dynamic memory
+ typedef boost::ptr_vector<mapper_visitor<Point> > container_type;
+ container_type mappers;
+
+public :
+
+ typedef std::pair<Point, int> pair_type;
+ typedef std::vector<pair_type> vector_type;
+
+ per_turn_visitor(std::string const& complete_caseid,
+ vector_type const& points)
+ {
+ namespace bg = boost::geometry;
+
+ if (points.size() > 100u)
+ {
+ // Defensive check. Too much intersections. Don't create anything
+ return;
+ }
+
+ BOOST_FOREACH(pair_type const& p, points)
+ {
+ mappers.push_back(new mapper_visitor<Point>(complete_caseid, p.second, p.first));
+ }
+ }
+
+ template <typename PieceCollection>
+ inline void apply(PieceCollection const& collection, int phase)
+ {
+ for(typename container_type::iterator it = mappers.begin();
+ it != mappers.end(); ++it)
+ {
+ it->apply(collection, phase);
+ }
+ }
+
+ template <typename Geometry, typename GeometryBuffer>
+ void map_input_output(Geometry const& geometry,
+ GeometryBuffer const& buffered, bool negative)
+ {
+ for(typename container_type::iterator it = mappers.begin();
+ it != mappers.end(); ++it)
+ {
+ it->map_input_output(geometry, buffered, negative);
+ }
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_BUFFER_SVG_PER_TURN_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/centroid.cpp b/src/boost/libs/geometry/test/algorithms/centroid.cpp
new file mode 100644
index 000000000..8f7399230
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/centroid.cpp
@@ -0,0 +1,276 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_centroid.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <test_geometries/all_custom_polygon.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+template <typename Polygon>
+void test_polygon()
+{
+ test_centroid<Polygon>(
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2"
+ ",3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 4.06923363095238, 1.65055803571429);
+
+ // with holes
+ test_centroid<Polygon>(
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2"
+ ",3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)"
+ ",(4 2,4.2 1.4,4.8 1.9,4.4 2.2,4 2))",
+ 4.0466264962959677, 1.6348996057331333);
+
+ test_centroid<Polygon>("POLYGON((0 0,0 10,10 10,10 0,0 0))", 5.0, 5.0);
+ test_centroid<Polygon>("POLYGON((-10 0,0 0,0 -10,-10 -10,-10 0))", -5.0, -5.0);
+
+ // invalid, self-intersecting polygon (area = 0)
+ test_centroid<Polygon>("POLYGON((1 1,4 -2,4 2,10 0,1 0,10 1,1 1))", 1.0, 1.0);
+ // invalid, degenerated
+ test_centroid<Polygon>("POLYGON((1 1,1 1,1 1,1 1))", 1.0, 1.0);
+ test_centroid<Polygon>("POLYGON((1 1))", 1.0, 1.0);
+
+ // should (1.5 1) be returned?
+ // if yes, then all other Polygons degenerated to Linestrings should be handled
+ test_centroid<Polygon>("POLYGON((1 1,2 1,1 1,1 1))", 1.0, 1.0);
+
+ // reported 2015.04.24
+ // input INT, result FP
+ test_centroid
+ <
+ bg::model::polygon<bg::model::d2::point_xy<int> >,
+ typename bg::point_type<Polygon>::type,
+ typename bg::coordinate_type<Polygon>::type
+ >("POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))", 1.5, 1.5);
+}
+
+
+template <typename P>
+void test_2d()
+{
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 1, 2 2, 3 3)", 2.0, 2.0);
+ test_centroid<bg::model::linestring<P> >("LINESTRING(0 0,0 4, 4 4)", 1.0, 3.0);
+ test_centroid<bg::model::linestring<P> >("LINESTRING(0 0,3 3,0 6,3 9,0 12)", 1.5, 6.0);
+
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 1,10 1,1 0,10 0,4 -2,1 1)",
+ 5.41385255923004, 0.13507358481085);
+
+ // degenerated linestring (length = 0)
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 1, 1 1)", 1.0, 1.0);
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 1)", 1.0, 1.0);
+
+ {
+ bg::model::linestring<P> ls;
+ // LINESTRING(1 -1,1e308 -1e308,0.0001 0.000)
+ bg::append(ls, P(1, -1));
+ typedef typename bg::coordinate_type<P>::type coord_type;
+ //double m = 1.0e308;
+ coord_type m = (std::numeric_limits<coord_type>::max)();
+ bg::append(ls, P(coord_type(m), coord_type(-m)));
+ bg::append(ls, P(coord_type(0.0001), coord_type(0.000)));
+ if (BOOST_GEOMETRY_CONDITION((boost::is_same<typename bg::coordinate_type<P>::type, double>::value)))
+ {
+ // for doubles the INF is detected and the calculation stopped
+ // currently for Geometries for which the centroid can't be calculated
+ // the first Point is returned
+ test_centroid<bg::model::linestring<P> >(ls, 1.0, -1.0);
+ }
+ else
+ {
+ // for floats internally the double is used to store intermediate results
+ // this type is capable to store MAX_FLT and "correctly" calculate the centroid
+ // test_centroid<bg::model::linestring<P> >(ls, m/3, -m/3);
+ // the result is around (1.7e38 -1.7e38)
+ }
+ }
+
+ test_centroid<bg::model::segment<P> >("LINESTRING(1 1, 3 3)", 2.0, 2.0);
+
+ test_centroid<bg::model::ring<P> >(
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2"
+ ",3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 4.06923363095238, 1.65055803571429);
+
+ test_polygon<bg::model::polygon<P> >();
+ test_polygon<all_custom_polygon<P> >();
+
+ // ccw
+ test_centroid<bg::model::ring<P, false> >(
+ "POLYGON((2 1.3,2.9 0.7,4.9 0.8,5.4 1.2,5.3 2.6,4.1 3,3.4 2"
+ ",3.7 1.6,3.4 1.2,2.8 1.8,2.4 1.7,2 1.3))",
+ 4.06923363095238, 1.65055803571429);
+
+ // open / closed
+ test_centroid<bg::model::ring<P, true, true> >(
+ "POLYGON((1 1,2 2,3 1,2 0,1 1))", 2.0, 1.0);
+ test_centroid<bg::model::ring<P, true, false> >(
+ "POLYGON((1 1,2 2,3 1,2 0))", 2.0, 1.0);
+
+ test_centroid<bg::model::box<P> >("POLYGON((1 2,3 4))", 2, 3);
+ test_centroid<P>("POINT(3 3)", 3, 3);
+
+ // INT -> FP
+ test_centroid
+ <
+ bg::model::ring<bg::model::d2::point_xy<int> >,
+ P, typename bg::coordinate_type<P>::type
+ >("POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))", 1.5, 1.5);
+ test_centroid
+ <
+ bg::model::linestring<bg::model::d2::point_xy<int> >,
+ P, typename bg::coordinate_type<P>::type
+ >("LINESTRING(1 1, 2 2)", 1.5, 1.5);
+ test_centroid
+ <
+ bg::model::box<bg::model::d2::point_xy<int> >,
+ P, typename bg::coordinate_type<P>::type
+ >("BOX(1 1, 2 2)", 1.5, 1.5);
+}
+
+
+template <typename P>
+void test_3d()
+{
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 2 3,4 5 -6,7 -8 9,-10 11 12,13 -14 -15, 16 17 18)",
+ 5.6748865168734692, 0.31974938587214002, 1.9915270387763671);
+ test_centroid<bg::model::box<P> >("POLYGON((1 2 3,5 6 7))", 3, 4, 5);
+ test_centroid<bg::model::segment<P> >("LINESTRING(1 1 1,3 3 3)", 2, 2, 2);
+ test_centroid<P>("POINT(1 2 3)", 1, 2, 3);
+}
+
+
+template <typename P>
+void test_5d()
+{
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 2 3 4 95,4 5 -6 24 40,7 -8 9 -5 -7,-10 11 12 -5 5,13 -14 -15 4 3, 16 17 18 5 12)",
+ 4.9202312983547678, 0.69590937869808345, 1.2632138719797417, 6.0468332057401986, 23.082402715244868);
+}
+
+template <typename P>
+void test_exceptions()
+{
+ test_centroid_exception<bg::model::linestring<P> >();
+ test_centroid_exception<bg::model::polygon<P> >();
+ test_centroid_exception<bg::model::ring<P> >();
+
+ // Empty exterior ring
+ test_centroid_exception<bg::model::polygon<P> >(
+ "POLYGON((), ())");
+ test_centroid_exception<bg::model::polygon<P> >(
+ "POLYGON((), (0 0, 1 0, 1 1, 0 1, 0 0))");
+}
+
+template <typename P>
+void test_empty()
+{
+ // Empty interior ring
+ test_centroid<bg::model::polygon<P> >(
+ "POLYGON((0 0, 1 0, 1 1, 0 1, 0 0), ())",
+ 0.5, 0.5);
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ bg::model::polygon<int_point_type> int_poly;
+ bg::model::polygon<double_point_type> double_poly;
+
+ std::string const polygon_li = "POLYGON((1872000 528000,1872000 192000,1536119 192000,1536000 528000,1200000 528000,1200000 863880,1536000 863880,1872000 863880,1872000 528000))";
+ bg::read_wkt(polygon_li, int_poly);
+ bg::read_wkt(polygon_li, double_poly);
+
+ int_point_type int_centroid;
+ double_point_type double_centroid;
+
+ bg::centroid(int_poly, int_centroid);
+ bg::centroid(double_poly, double_centroid);
+
+ int_point_type double_centroid_as_int;
+ bg::assign_zero(double_centroid_as_int);
+ bg::assign(int_centroid, double_centroid_as_int);
+
+ BOOST_CHECK_EQUAL(bg::get<0>(int_centroid), bg::get<0>(double_centroid_as_int));
+ BOOST_CHECK_EQUAL(bg::get<1>(int_centroid), bg::get<1>(double_centroid_as_int));
+}
+
+//#include <to_svg.hpp>
+
+void test_large_doubles()
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+ point pt_far, pt_near;
+ bg::model::polygon<point> poly_far, poly_near;
+
+ // related to ticket #10643
+ bg::read_wkt("POLYGON((1074699.93 703064.65, 1074703.90 703064.58, 1074704.53 703061.40, 1074702.10 703054.62, 1074699.93 703064.65))", poly_far);
+ bg::read_wkt("POLYGON((699.93 64.65, 703.90 64.58, 704.53 61.40, 702.10 54.62, 699.93 64.65))", poly_near);
+
+ bg::centroid(poly_far, pt_far);
+ bg::centroid(poly_near, pt_near);
+
+ BOOST_CHECK(bg::within(pt_far, poly_far));
+ BOOST_CHECK(bg::within(pt_near, poly_near));
+
+ point pt_near_moved;
+ bg::set<0>(pt_near_moved, bg::get<0>(pt_near) + 1074000.0);
+ bg::set<1>(pt_near_moved, bg::get<1>(pt_near) + 703000.0);
+
+ //geom_to_svg(poly_far, pt_far, "far.svg");
+ //geom_to_svg(poly_near, pt_near, "near.svg");
+
+ double d = bg::distance(pt_far, pt_near_moved);
+ BOOST_CHECK(d < 0.1);
+}
+
+int test_main(int, char* [])
+{
+ test_2d<bg::model::d2::point_xy<double> >();
+ test_2d<boost::tuple<float, float> >();
+ test_2d<bg::model::d2::point_xy<float> >();
+
+ test_3d<boost::tuple<double, double, double> >();
+
+ test_5d<boost::tuple<double, double, double, double, double> >();
+
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+ test_3d<boost::tuple<ttmath_big, ttmath_big, ttmath_big> >();
+#endif
+
+#ifndef NDEBUG
+ // The test currently fails in release mode. TODO: fix this
+ test_large_integers();
+#endif
+
+ test_large_doubles();
+
+ test_exceptions<bg::model::d2::point_xy<double> >();
+ test_empty<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/centroid_multi.cpp b/src/boost/libs/geometry/test/algorithms/centroid_multi.cpp
new file mode 100644
index 000000000..ba946693b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/centroid_multi.cpp
@@ -0,0 +1,197 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/test_centroid.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/strategies/cartesian/centroid_average.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+// #define REPORT_RESULTS
+
+
+template <typename P>
+void test_2d(bool is_integer = false)
+{
+ typedef typename bg::coordinate_type<P>::type ct;
+ boost::ignore_unused<ct>();
+
+#ifdef REPORT_RESULTS
+ std::cout << std::endl << "type: " << typeid(ct).name() << " size: " << sizeof(ct) << std::endl;
+#endif
+
+ test_centroid<bg::model::multi_point<P> >(
+ "MULTIPOINT((1 1),(3 3))",
+ 2.0, 2.0);
+
+ test_centroid<bg::model::multi_point<P> >(
+ "MULTIPOINT((-1 -1),(-3 -3))",
+ -2.0, -2.0);
+
+ if (! is_integer)
+ {
+ // Only working for floating point:
+
+ test_centroid<bg::model::multi_point<P> >(
+ "MULTIPOINT((1 1),(2 3),(5 0))",
+ 2.666666666666667, 1.33333);
+
+ test_centroid<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((0 0,0 2),(1 0,1 2))",
+ 0.5, 1.0);
+
+ // degenerated
+ test_centroid<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((1 1,1 1))",
+ 1.0, 1.0);
+
+
+ test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((1 1,1 3,3 3,3 1,1 1)),((4 1,4 3,8 3,8 1,4 1)))",
+ 4.666666666666667, 2.0);
+
+ test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2"
+ ",3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)),"
+ "((10 10,10 12,12 12,12 10,10 10)))",
+ 7.338463104108615, 6.0606722055552407);
+
+ // degenerated
+ test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((1 1,1 1,1 1,1 1,1 1)))",
+ 1.0, 1.0);
+ test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((1 1)))",
+ 1.0, 1.0);
+ }
+
+
+
+ // Test using real-world polygon with large (Y) coordinates
+ // (coordinates can be used for integer and floating point point-types)
+ // Note that this will fail (overflow) if centroid calculation uses float
+ test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((426062 4527794,426123 4527731"
+ ",426113 4527700,426113 4527693,426115 4527671"
+ ",426133 4527584,426135 4527569,426124 4527558"
+ ",426103 4527547,426072 4527538,426003 4527535"
+ ",425972 4527532,425950 4527531,425918 4527528"
+ ",425894 4527517,425876 4527504,425870 4527484"
+ ",425858 4527442,425842 4527414,425816 4527397"
+ ",425752 4527384,425692 4527369,425658 4527349"
+ ",425624 4527307,425605 4527260,425598 4527213"
+ ",425595 4527167,425582 4527125,425548 4527064"
+ ",425535 4527027,425537 4526990,425534 4526943"
+ ",425525 4526904,425500 4526856,425461 4526811"
+ ",425450 4526798,425381 4526823,425362 4526830"
+ ",425329 4526848,425298 4526883,425291 4526897"
+ ",425268 4526923,425243 4526945,425209 4526971"
+ ",425172 4526990,425118 4527028,425104 4527044"
+ ",425042 4527090,424980 4527126,424925 4527147"
+ ",424881 4527148,424821 4527147,424698 4527125"
+ ",424610 4527121,424566 4527126,424468 4527139"
+ ",424426 4527141,424410 4527142,424333 4527130"
+ ",424261 4527110,424179 4527073,424024 4527012"
+ ",423947 4526987,423902 4526973,423858 4526961"
+ ",423842 4526951,423816 4526935,423799 4526910"
+ ",423776 4526905,423765 4526911,423739 4526927"
+ ",423692 4526946,423636 4526976,423608 4527008"
+ ",423570 4527016,423537 4527011,423505 4526996"
+ ",423480 4526994,423457 4527012,423434 4527021"
+ ",423367 4527008,423263 4526998,423210 4526993"
+ ",423157 4526996,423110 4526994,423071 4526984"
+ ",423048 4526984,423032 4526994,423254 4527613"
+ ",423889 4528156,424585 4528050,425479 4527974"
+ ",425795 4527867,426062 4527794)))",
+ 424530.6059719588, 4527519.619367547);
+}
+
+template <typename P>
+void test_exceptions()
+{
+ using namespace bg::model;
+ typedef multi_polygon<polygon<P> > multi_polygon;
+ typedef multi_linestring<linestring<P> > multi_linestring;
+
+ // Empty multi-polygon
+ test_centroid_exception<multi_polygon>("MULTIPOLYGON()");
+ test_centroid_exception<multi_polygon>("MULTIPOLYGON(())");
+ test_centroid_exception<multi_polygon>("MULTIPOLYGON((), ())");
+ test_centroid_exception<multi_polygon>("MULTIPOLYGON((()), ())");
+ test_centroid_exception<multi_polygon>("MULTIPOLYGON(((), ()))");
+
+ // Empty multi-linestring
+ test_centroid_exception<multi_linestring>("MULTILINESTRING()");
+ test_centroid_exception<multi_linestring>("MULTILINESTRING(())");
+ test_centroid_exception<multi_linestring>("MULTILINESTRING((), ())");
+}
+
+template <typename P>
+void test_empty()
+{
+ using namespace bg::model;
+ typedef multi_polygon<polygon<P> > multi_polygon;
+ typedef multi_linestring<linestring<P> > multi_linestring;
+
+ // Multi-linestring with empty linestring
+ test_centroid<multi_linestring>(
+ "MULTILINESTRING((), (0 0))",
+ 0.0, 0.0);
+ test_centroid<multi_linestring>(
+ "MULTILINESTRING((0 0, 1 0), ())",
+ 0.5, 0.0);
+
+ // Multi-polygon with empty polygon
+ test_centroid<multi_polygon>(
+ "MULTIPOLYGON((()), ((0 0)))",
+ 0.0, 0.0);
+ test_centroid<multi_polygon>(
+ "MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), (()))",
+ 0.5, 0.5);
+
+ // Multi-polygon with empty interior ring
+ test_centroid<multi_polygon>(
+ "MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0), ()))",
+ 0.5, 0.5);
+ test_centroid<multi_polygon>(
+ "MULTIPOLYGON((()), ((0 0, 1 0, 1 1, 0 1, 0 0), ()))",
+ 0.5, 0.5);
+}
+
+
+
+int test_main(int, char* [])
+{
+ test_2d<bg::model::d2::point_xy<float> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+ test_2d<bg::model::d2::point_xy<long int> >(true);
+ //test_2d<bg::model::d2::point_xy<long long> >(true);
+ //test_2d<bg::model::d2::point_xy<long double> >();
+
+#ifdef HAVE_TTMATH
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ test_exceptions<bg::model::d2::point_xy<double> >();
+ test_empty<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/check_validity.hpp b/src/boost/libs/geometry/test/algorithms/check_validity.hpp
new file mode 100644
index 000000000..388ca6fad
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/check_validity.hpp
@@ -0,0 +1,79 @@
+// Boost.Geometry
+
+// Copyright (c) 2017 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_CHECK_VALIDITY_HPP
+#define BOOST_GEOMETRY_TEST_CHECK_VALIDITY_HPP
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/is_valid.hpp>
+
+template<typename Geometry, typename G1, typename G2>
+inline bool is_output_valid(Geometry const& geometry,
+ std::string const& case_id,
+ G1 const& g1, G2 const& g2,
+ std::string& message)
+{
+ bool const result = bg::is_valid(geometry, message);
+ if (! result)
+ {
+ // Check if input was valid. If not, do not report output validity
+ if (! bg::is_valid(g1) || ! bg::is_valid(g2))
+ {
+ std::cout << "WARNING: Input is not considered as valid; "
+ << "this can cause that output is invalid: " << case_id
+ << std::endl;
+ return true;
+ }
+ }
+ return result;
+}
+
+template
+<
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+>
+struct check_validity
+{
+ template <typename G1, typename G2>
+ static inline
+ bool apply(Geometry const& geometry,
+ std::string const& case_id,
+ G1 const& g1, G2 const& g2,
+ std::string& message)
+ {
+ return is_output_valid(geometry, case_id, g1, g2, message);
+ }
+};
+
+// Specialization for vector of <geometry> (e.g. rings)
+template <typename Geometry>
+struct check_validity<Geometry, void>
+{
+ template <typename G1, typename G2>
+ static inline
+ bool apply(Geometry const& geometry,
+ std::string const& case_id,
+ G1 const& g1, G2 const& g2,
+ std::string& message)
+ {
+ typedef typename boost::range_value<Geometry>::type single_type;
+ BOOST_FOREACH(single_type const& element, geometry)
+ {
+ if (! is_output_valid(element, case_id, g1, g2, message))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_CHECK_VALIDITY_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/clear_multi.cpp b/src/boost/libs/geometry/test/algorithms/clear_multi.cpp
new file mode 100644
index 000000000..44f4716e0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/clear_multi.cpp
@@ -0,0 +1,63 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/clear.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/variant/variant.hpp>
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, unsigned int expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> variant_geometry(geometry);
+
+ bg::clear(geometry);
+ BOOST_CHECK_EQUAL(bg::num_points(geometry), expected);
+
+ bg::clear(variant_geometry);
+ BOOST_CHECK_EQUAL(bg::num_points(variant_geometry), expected);
+}
+
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> poly;
+ typedef bg::model::linestring<Point> ls;
+ typedef bg::model::multi_point<Point> mpoint;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<Point>("POINT(0 0)", 1);
+ test_geometry<ls>("LINESTRING(0 0,0 1)", 0);
+ test_geometry<poly>("POLYGON((0 0,0 1,1 0,0 0))", 0);
+ test_geometry<mpoint>("MULTIPOINT((0 0),(0 1),(1 0),(0 0))", 0);
+ test_geometry<mls>("MULTILINESTRING((0 0,0 1),(1 0,0 0))", 0);
+ test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))", 0);
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/comparable_distance.cpp b/src/boost/libs/geometry/test/algorithms/comparable_distance.cpp
new file mode 100644
index 000000000..3a513387c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/comparable_distance.cpp
@@ -0,0 +1,523 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2017.
+// Modifications copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <sstream>
+
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/comparable_distance.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+template <typename P>
+void test_distance_result()
+{
+ typedef typename bg::default_distance_result<P, P>::type distance_type;
+
+ P p1 = bg::make<P>(0, 0);
+ P p2 = bg::make<P>(3, 0);
+ P p3 = bg::make<P>(0, 4);
+
+ distance_type dr12 = bg::comparable_distance(p1, p2);
+ distance_type dr13 = bg::comparable_distance(p1, p3);
+ distance_type dr23 = bg::comparable_distance(p2, p3);
+
+ BOOST_CHECK_CLOSE(dr12, 9.000, 0.001);
+ BOOST_CHECK_CLOSE(dr13, 16.000, 0.001);
+ BOOST_CHECK_CLOSE(dr23, 25.000, 0.001);
+
+}
+
+template <typename P>
+void test_distance_point()
+{
+ P p1;
+ bg::set<0>(p1, 1);
+ bg::set<1>(p1, 1);
+
+ P p2;
+ bg::set<0>(p2, 2);
+ bg::set<1>(p2, 2);
+
+ typename bg::coordinate_type<P>::type d = bg::comparable_distance(p1, p2);
+ BOOST_CHECK_CLOSE(d, 2.0, 0.001);
+}
+
+template <typename P>
+void test_distance_segment()
+{
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+
+ P s1 = bg::make<P>(2, 2);
+ P s2 = bg::make<P>(3, 3);
+
+ // Check points left, right, projected-left, projected-right, on segment
+ P p1 = bg::make<P>(0, 0);
+ P p2 = bg::make<P>(4, 4);
+ P p3 = bg::make<P>(2.4, 2.6);
+ P p4 = bg::make<P>(2.6, 2.4);
+ P p5 = bg::make<P>(2.5, 2.5);
+
+ bg::model::referring_segment<P const> const seg(s1, s2);
+
+ coordinate_type d1 = bg::comparable_distance(p1, seg); BOOST_CHECK_CLOSE(d1, 8.0, 0.001);
+ coordinate_type d2 = bg::comparable_distance(p2, seg); BOOST_CHECK_CLOSE(d2, 2.0, 0.001);
+ coordinate_type d3 = bg::comparable_distance(p3, seg); BOOST_CHECK_CLOSE(d3, 0.02, 0.001);
+ coordinate_type d4 = bg::comparable_distance(p4, seg); BOOST_CHECK_CLOSE(d4, 0.02, 0.001);
+ coordinate_type d5 = bg::comparable_distance(p5, seg); BOOST_CHECK_CLOSE(d5, 0.0, 0.001);
+
+ // Reverse case
+ coordinate_type dr1 = bg::comparable_distance(seg, p1); BOOST_CHECK_CLOSE(dr1, d1, 0.001);
+ coordinate_type dr2 = bg::comparable_distance(seg, p2); BOOST_CHECK_CLOSE(dr2, d2, 0.001);
+}
+
+template <typename P>
+void test_distance_linestring()
+{
+ bg::model::linestring<P> points;
+ points.push_back(bg::make<P>(1, 1));
+ points.push_back(bg::make<P>(3, 3));
+
+ P p = bg::make<P>(2, 1);
+
+ typename bg::coordinate_type<P>::type d = bg::comparable_distance(p, points);
+ BOOST_CHECK_CLOSE(d, 0.5, 0.001);
+
+ p = bg::make<P>(5, 5);
+ d = bg::comparable_distance(p, points);
+ BOOST_CHECK_CLOSE(d, 8.0, 0.001);
+
+
+ bg::model::linestring<P> line;
+ line.push_back(bg::make<P>(1,1));
+ line.push_back(bg::make<P>(2,2));
+ line.push_back(bg::make<P>(3,3));
+
+ p = bg::make<P>(5, 5);
+
+ d = bg::comparable_distance(p, line);
+ BOOST_CHECK_CLOSE(d, 8.0, 0.001);
+
+ // Reverse case
+ d = bg::comparable_distance(line, p);
+ BOOST_CHECK_CLOSE(d, 8.0, 0.001);
+}
+
+template <typename P>
+void test_all()
+{
+ test_distance_result<P>();
+ test_distance_point<P>();
+ test_distance_segment<P>();
+ test_distance_linestring<P>();
+}
+
+template <typename T>
+void test_double_result_from_integer()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+
+ point_type point;
+
+ // Check linestring
+ bg::model::linestring<point_type> linestring;
+ bg::read_wkt("POINT(2 2)", point);
+ bg::read_wkt("LINESTRING(4 1,1 4)", linestring);
+
+ double normal_distance = bg::distance(point, linestring);
+ double comparable_distance = bg::comparable_distance(point, linestring);
+
+ BOOST_CHECK_CLOSE(normal_distance, std::sqrt(0.5), 0.001);
+ BOOST_CHECK_CLOSE(comparable_distance, 0.5, 0.001);
+
+ // Check polygon
+ bg::model::polygon<point_type> polygon;
+ bg::read_wkt("POLYGON((0 0,1 9,8 1,0 0),(1 1,4 1,1 4,1 1))", polygon);
+
+ normal_distance = bg::distance(point, polygon);
+ comparable_distance = bg::comparable_distance(point, polygon);
+
+ BOOST_CHECK_CLOSE(normal_distance, std::sqrt(0.5), 0.001);
+ BOOST_CHECK_CLOSE(comparable_distance, 0.5, 0.001);
+}
+
+template <typename T>
+struct test_variant_different_default_strategy
+{
+ static inline void apply()
+ {
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::segment<point_type> segment_type;
+ typedef bg::model::box<point_type> box_type;
+ typedef boost::variant<point_type, segment_type, box_type> variant_type;
+
+ point_type point;
+ bg::read_wkt("POINT(1 3)", point);
+
+ segment_type seg;
+ bg::read_wkt("LINESTRING(1 1,4 4)", seg);
+
+ box_type box;
+ bg::read_wkt("BOX(-1 -1,0 0)", box);
+
+ variant_type v1, v2;
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::comparable_distance_result
+ <
+ variant_type, variant_type, bg::default_strategy
+ >::type,
+ typename bg::comparable_distance_result
+ <
+ point_type, point_type, bg::default_strategy
+ >::type
+ >
+ ));
+
+ // Default strategy
+ v1 = point;
+ v2 = point;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(point, point),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, point),
+ bg::comparable_distance(point, point),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(point, v2),
+ bg::comparable_distance(point, point),
+ 0.0001);
+ v1 = point;
+ v2 = seg;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(point, seg),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, seg),
+ bg::comparable_distance(point, seg),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(point, v2),
+ bg::comparable_distance(point, seg), 0.0001);
+ v1 = point;
+ v2 = box;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(point, box),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, box),
+ bg::comparable_distance(point, box),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(point, v2),
+ bg::comparable_distance(point, box), 0.0001);
+ }
+};
+
+template <typename T, typename ExpectedResultType = double>
+struct test_variant_same_default_strategy
+{
+ static inline void apply()
+ {
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::segment<point_type> segment_type;
+ typedef bg::model::linestring<point_type> linestring_type;
+ typedef boost::variant
+ <
+ point_type, segment_type, linestring_type
+ > variant_type;
+
+ point_type point;
+ bg::read_wkt("POINT(1 3)", point);
+
+ segment_type seg;
+ bg::read_wkt("LINESTRING(1 1,4 4)", seg);
+
+ linestring_type linestring;
+ bg::read_wkt("LINESTRING(-1 -1,-1 0,0 0,0 -1,-1 -1)", linestring);
+
+ variant_type v1, v2;
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::comparable_distance_result
+ <
+ variant_type, variant_type, bg::default_strategy
+ >::type,
+ ExpectedResultType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::comparable_distance_result
+ <
+ point_type, point_type, bg::default_strategy
+ >::type,
+ ExpectedResultType
+ >
+ ));
+
+ // Default strategy
+ v1 = point;
+ v2 = point;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(point, point),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, point),
+ bg::comparable_distance(point, point),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(point, v2),
+ bg::comparable_distance(point, point),
+ 0.0001);
+ v1 = point;
+ v2 = seg;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(point, seg),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, seg),
+ bg::comparable_distance(point, seg),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(point, v2),
+ bg::comparable_distance(point, seg),
+ 0.0001);
+ v1 = point;
+ v2 = linestring;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(point, linestring),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, linestring),
+ bg::comparable_distance(point, linestring),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(point, v2),
+ bg::comparable_distance(point, linestring),
+ 0.0001);
+ }
+};
+
+template <typename T, typename ExpectedResultType = T>
+struct test_variant_with_strategy
+{
+ static inline void apply()
+ {
+ typedef bg::strategy::distance::projected_point<T> strategy_type;
+
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::segment<point_type> segment_type;
+ typedef bg::model::linestring<point_type> linestring_type;
+ typedef bg::model::multi_linestring
+ <
+ linestring_type
+ > multi_linestring_type;
+ typedef boost::variant
+ <
+ segment_type, linestring_type, multi_linestring_type
+ > variant_type;
+
+ segment_type seg;
+ bg::read_wkt("LINESTRING(1 1,4 4)", seg);
+
+ linestring_type ls;
+ bg::read_wkt("LINESTRING(-1 -1,-1 0,0 0,0 -1,-1 -1)", ls);
+
+ multi_linestring_type mls;
+ bg::read_wkt("MULTILINESTRING((10 0,20 0),(30 0,40 0))", mls);
+
+ variant_type v1, v2;
+
+ strategy_type strategy;
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::comparable_distance_result
+ <
+ variant_type, variant_type, strategy_type
+ >::type,
+ ExpectedResultType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::comparable_distance_result
+ <
+ segment_type, linestring_type, strategy_type
+ >::type,
+ ExpectedResultType
+ >
+ ));
+
+ // Passed strategy
+ v1 = seg;
+ v2 = seg;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2, strategy),
+ bg::comparable_distance(seg, seg, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, seg, strategy),
+ bg::comparable_distance(seg, seg, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(seg, v2, strategy),
+ bg::comparable_distance(seg, seg, strategy),
+ 0.0001);
+ v1 = seg;
+ v2 = ls;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2, strategy),
+ bg::comparable_distance(seg, ls, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, ls, strategy),
+ bg::comparable_distance(seg, ls, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(seg, v2, strategy),
+ bg::comparable_distance(seg, ls, strategy),
+ 0.0001);
+ v1 = seg;
+ v2 = mls;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2, strategy),
+ bg::comparable_distance(seg, mls, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, mls, strategy),
+ bg::comparable_distance(seg, mls, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(seg, v2, strategy),
+ bg::comparable_distance(seg, mls, strategy),
+ 0.0001);
+ v1 = ls;
+ v2 = mls;
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, v2, strategy),
+ bg::comparable_distance(ls, mls, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(v1, mls, strategy),
+ bg::comparable_distance(ls, mls, strategy),
+ 0.0001);
+ BOOST_CHECK_CLOSE(bg::comparable_distance(ls, v2, strategy),
+ bg::comparable_distance(ls, mls, strategy),
+ 0.0001);
+ }
+};
+
+template <typename T, bool IsIntergral = boost::is_integral<T>::value>
+struct check_result
+{
+ template <typename ExpectedResult>
+ static inline void apply(T const& value,
+ ExpectedResult const& expected_value)
+ {
+ BOOST_CHECK_EQUAL(value, expected_value);
+ }
+};
+
+template <typename T>
+struct check_result<T, false>
+{
+ template <typename ExpectedResult>
+ static inline void apply(T const& value,
+ ExpectedResult const& expected_value)
+ {
+ BOOST_CHECK_CLOSE(value, expected_value, 0.0001);
+ }
+};
+
+template <typename T>
+struct test_variant_boxes
+{
+ static inline void apply()
+ {
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::box<point_type> box_type;
+ typedef boost::variant<box_type> variant_type;
+
+ box_type box1, box2;
+ bg::read_wkt("BOX(-1 -1,0 0)", box1);
+ bg::read_wkt("BOX(1 1,2 2)", box2);
+
+ variant_type v1 = box1, v2 = box2;
+
+ typedef typename boost::mpl::if_c
+ <
+ boost::is_float<T>::value,
+ double,
+ typename bg::util::detail::default_integral::type
+ >::type expected_result_type;
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::comparable_distance_result
+ <
+ variant_type, variant_type, bg::default_strategy
+ >::type,
+ expected_result_type
+ >
+ ));
+
+ // Default strategy
+ check_result<T>::apply(bg::comparable_distance(v1, v2),
+ bg::comparable_distance(box1, box2));
+ check_result<T>::apply(bg::comparable_distance(v1, box2),
+ bg::comparable_distance(box1, box2));
+ check_result<T>::apply(bg::comparable_distance(box1, v2),
+ bg::comparable_distance(box1, box2));
+ }
+};
+
+
+int test_main(int, char* [])
+{
+ test_double_result_from_integer<int>();
+ test_double_result_from_integer<boost::long_long_type>();
+
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ // test variant support
+ test_variant_different_default_strategy<double>::apply();
+
+ test_variant_same_default_strategy<double>::apply();
+ test_variant_same_default_strategy<int>::apply();
+ test_variant_same_default_strategy<long>::apply();
+
+ test_variant_with_strategy<double>::apply();
+ test_variant_with_strategy<float>::apply();
+ test_variant_with_strategy<long double>::apply();
+ test_variant_with_strategy<int, double>::apply();
+#ifdef HAVE_TTMATH
+ test_variant_with_strategy<ttmath_big>::apply();
+#endif
+
+ test_variant_boxes<double>::apply();
+ test_variant_boxes<int>::apply();
+ test_variant_boxes<long>::apply();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/convert.cpp b/src/boost/libs/geometry/test/algorithms/convert.cpp
new file mode 100644
index 000000000..a2758832d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/convert.cpp
@@ -0,0 +1,338 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/test_convert.hpp>
+
+
+
+template <typename Point1, typename Point2>
+void test_mixed_point_types()
+{
+ // Point
+ test_mixed_identical_result<Point1, Point2>("POINT(1 2)");
+
+ // Box
+ test_mixed_identical_result
+ <
+ bg::model::box<Point1>,
+ bg::model::box<Point2>
+ >
+ ("POLYGON((1 2,1 4,3 4,3 2,1 2))");
+
+ test_mixed_identical_result
+ <
+ bg::model::segment<Point1>,
+ bg::model::segment<Point2>
+ >
+ ("LINESTRING(1 1,2 2)");
+
+ // Linestring
+ test_mixed_identical_result
+ <
+ bg::model::linestring<Point1>,
+ bg::model::linestring<Point2>
+ >
+ ("LINESTRING(1 1,2 2)");
+
+ // Ring
+ test_mixed_identical_result
+ <
+ bg::model::ring<Point1>,
+ bg::model::ring<Point2>
+ >
+ ("POLYGON((1 1,2 2,3 0,1 1))");
+
+ test_mixed_reversible_result
+ <
+ bg::model::ring<Point1, true>,
+ bg::model::ring<Point2, false>
+ >
+ (
+ "POLYGON((1 1,2 2,3 0,1 1))",
+ "POLYGON((1 1,3 0,2 2,1 1))"
+ );
+
+ test_mixed
+ <
+ bg::model::ring<Point1, true, true>,
+ bg::model::ring<Point2, true, false>
+ >
+ (
+ "POLYGON((1 1,2 2,3 0,1 1))",
+ "POLYGON((1 1,2 2,3 0))",
+ 3
+ );
+
+ test_mixed
+ <
+ bg::model::ring<Point1, true, false>,
+ bg::model::ring<Point2, true, true>
+ >
+ (
+ "POLYGON((1 1,2 2,3 0))",
+ "POLYGON((1 1,2 2,3 0,1 1))",
+ 4
+ );
+
+ // Polygon
+ test_mixed_reversible_result
+ <
+ bg::model::polygon<Point1, true>,
+ bg::model::polygon<Point2, false>
+ >
+ (
+ "POLYGON((0 0,0 5,5 5,5 0,0 0),(1 1,3 2,2 4,1 1))",
+ "POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,2 4,3 2,1 1))"
+ );
+
+ test_mixed
+ <
+ bg::model::polygon<Point1>,
+ bg::model::polygon<Point2, false, false>
+ >
+ (
+ "POLYGON((0 0,0 5,5 5,5 0,0 0),(1 1,3 2,2 4,1 1))",
+ "POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,2 4,3 2,1 1))",
+ 7 // WKT is closed, polygon is open
+ );
+ // (polygon uses ring, so other tests omitted here)
+
+ // Combinations:
+ // ring <-> polygon
+ test_mixed_identical_result
+ <
+ bg::model::polygon<Point1>,
+ bg::model::ring<Point2>
+ >
+ ("POLYGON((1 1,2 2,3 0,1 1))");
+
+ test_mixed_reversible_result
+ <
+ bg::model::polygon<Point1, true>,
+ bg::model::ring<Point2, false>
+ >
+ (
+ "POLYGON((1 1,2 2,3 0,1 1))",
+ "POLYGON((1 1,3 0,2 2,1 1))"
+ );
+
+ // Any hole will be omitted going from polygon to ring
+ test_mixed
+ <
+ bg::model::polygon<Point1>,
+ bg::model::ring<Point2>
+ >
+ (
+ "POLYGON((0 0,0 5,5 5,5 0,0 0),(1 1,3 2,2 4,1 1))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ 5
+ );
+
+ // point -> box
+ test_mixed
+ <
+ Point1,
+ bg::model::box<Point2>
+ >
+ (
+ "POINT(0 0)",
+ "POLYGON((0 0,0 0,0 0,0 0,0 0))",
+ 4
+ );
+
+ // segment -> line
+ test_mixed
+ <
+ bg::model::segment<Point1>,
+ bg::model::linestring<Point2>
+ >
+ (
+ "LINESTRING(0 0,1 1)",
+ "LINESTRING(0 0,1 1)",
+ 2
+ );
+
+ // box -> ring ( <- is NYI)
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::ring<Point2>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,0 2,2 2,2 0,0 0))",
+ 5
+ );
+
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::ring<Point2, false>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,2 0,2 2,0 2,0 0))",
+ 5
+ );
+
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::ring<Point2, true, false>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,0 2,2 2,2 0))",
+ 4
+ );
+
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::ring<Point2, false, false>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,2 0,2 2,0 2))",
+ 4
+ );
+
+ // box -> polygon ( <- is NYI)
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::polygon<Point2>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,0 2,2 2,2 0,0 0))",
+ 5
+ );
+
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::polygon<Point2, false>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,2 0,2 2,0 2,0 0))",
+ 5
+ );
+
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::polygon<Point2, true, false>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,0 2,2 2,2 0,0 0))",
+ 4 // WKT is closed, polygon is open
+ );
+
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::polygon<Point2, false, false>
+ >
+ (
+ "BOX(0 0,2 2)",
+ "POLYGON((0 0,2 0,2 2,0 2,0 0))",
+ 4 // WKT is closed, polygon is open
+ );
+}
+
+template <typename Point1, typename Point2>
+void test_mixed_point_types_3d()
+{
+ // Point
+ test_mixed_identical_result<Point1, Point2>("POINT(1 2 3)");
+
+ test_mixed_identical_result
+ <
+ bg::model::segment<Point1>,
+ bg::model::segment<Point2>
+ >
+ ("LINESTRING(1 2 3,4 5 6)");
+
+ // Linestring
+ test_mixed_identical_result
+ <
+ bg::model::linestring<Point1>,
+ bg::model::linestring<Point2>
+ >
+ ("LINESTRING(1 2 3,4 5 6,7 8 9)");
+
+ // segment -> line
+ test_mixed
+ <
+ bg::model::segment<Point1>,
+ bg::model::linestring<Point2>
+ >
+ (
+ "LINESTRING(1 2 3,4 5 6)",
+ "LINESTRING(1 2 3,4 5 6)",
+ 2
+ );
+}
+
+
+
+template <typename Point1, typename Point2>
+void test_mixed_types()
+{
+ test_mixed_point_types<Point1, Point2>();
+ test_mixed_point_types<Point2, Point1>();
+}
+
+
+template <typename Point1, typename Point2>
+void test_mixed_types_3d()
+{
+ test_mixed_point_types_3d<Point1, Point2>();
+ test_mixed_point_types_3d<Point2, Point1>();
+}
+
+void test_array()
+{
+ int a[2] = {1, 2};
+ int b[2];
+ bg::convert(a, b);
+ BOOST_CHECK_EQUAL(b[0], 1);
+ BOOST_CHECK_EQUAL(b[1], 2);
+}
+
+int test_main(int, char* [])
+{
+ test_mixed_types
+ <
+ bg::model::point<int, 2, bg::cs::cartesian>,
+ bg::model::point<double, 2, bg::cs::cartesian>
+ >();
+ test_mixed_types
+ <
+ boost::tuple<float, float>,
+ bg::model::point<float, 2, bg::cs::cartesian>
+ >();
+ test_mixed_types_3d
+ <
+ boost::tuple<double, double, double>,
+ bg::model::point<double, 3, bg::cs::cartesian>
+ >();
+
+ test_array();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/convert_multi.cpp b/src/boost/libs/geometry/test/algorithms/convert_multi.cpp
new file mode 100644
index 000000000..ad24d3d7a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/convert_multi.cpp
@@ -0,0 +1,98 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_convert.hpp>
+
+
+template <typename Point1, typename Point2>
+void test_mixed_point_types()
+{
+ test_mixed_identical_result
+ <
+ bg::model::multi_point<Point1>,
+ bg::model::multi_point<Point2>
+ >
+ ("MULTIPOINT((1 1),(2 2),(3 3))");
+
+ test_mixed_identical_result
+ <
+ bg::model::multi_linestring<bg::model::linestring<Point1> >,
+ bg::model::multi_linestring<bg::model::linestring<Point2> >
+ >
+ ("MULTILINESTRING((1 1,2 2),(3 3,4 4))");
+
+ // Single -> multi (always possible)
+ test_mixed
+ <
+ Point1, bg::model::multi_point<Point2>
+ >
+ (
+ "POINT(1 1)",
+ "MULTIPOINT((1 1))",
+ 1
+ );
+ test_mixed
+ <
+ bg::model::linestring<Point1>,
+ bg::model::multi_linestring<bg::model::linestring<Point2> >
+ >
+ (
+ "LINESTRING(1 1,2 2)",
+ "MULTILINESTRING((1 1,2 2))",
+ 2
+ );
+ test_mixed
+ <
+ bg::model::segment<Point1>,
+ bg::model::multi_linestring<bg::model::linestring<Point2> >
+ >
+ (
+ "LINESTRING(1 1,2 2)",
+ "MULTILINESTRING((1 1,2 2))",
+ 2
+ );
+ test_mixed
+ <
+ bg::model::box<Point1>,
+ bg::model::multi_polygon<bg::model::polygon<Point2> >
+ >
+ (
+ "BOX(0 0,1 1)",
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))",
+ 5
+ );
+ test_mixed
+ <
+ bg::model::ring<Point1, true>,
+ bg::model::multi_polygon<bg::model::polygon<Point2, false> >
+ >
+ (
+ "POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)))",
+ 5
+ );
+
+ // Multi -> single: should not compile (because multi often have 0 or >1 elements)
+}
+
+template <typename Point1, typename Point2>
+void test_mixed_types()
+{
+ test_mixed_point_types<Point1, Point2>();
+ test_mixed_point_types<Point2, Point1>();
+}
+
+int test_main( int , char* [] )
+{
+ test_mixed_types
+ <
+ bg::model::point<int, 2, bg::cs::cartesian>,
+ bg::model::point<double, 2, bg::cs::cartesian>
+ >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/convex_hull.cpp b/src/boost/libs/geometry/test/algorithms/convex_hull.cpp
new file mode 100644
index 000000000..0ca1bcb7b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/convex_hull.cpp
@@ -0,0 +1,89 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <cstddef>
+#include <string>
+
+#include <algorithms/test_convex_hull.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // from sample linestring
+ test_geometry<bg::model::linestring<P> >(
+ "linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)", 5, 4, 3.8);
+
+ // rectangular, with concavity
+ test_geometry<bg::model::polygon<P> >(
+ "polygon((1 1, 1 4, 3 4, 3 3, 4 3, 4 4, 5 4, 5 1, 1 1))",
+ 9, 5, 12.0);
+
+ // from sample polygon, with concavity
+ test_geometry<bg::model::polygon<P> >(
+ "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0"
+ ", 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))",
+ 12, 8, 5.245);
+
+ test_geometry<bg::model::ring<P> >(
+ "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0"
+ ", 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))",
+ 12, 8, 5.245);
+
+ test_geometry<bg::model::box<P> >("box(0 0,2 2)", 4, 5, 4);
+
+ // https://svn.boost.org/trac/boost/ticket/6443
+ {
+ test_geometry<bg::model::ring<P> >(
+ "polygon((0 0, 2 0))", // note that this polygon is very invalid
+ 2, 4, 0, 4);
+ }
+
+ // degenerated hulls
+ test_geometry<bg::model::multi_point<P> >(
+ "multipoint(0 0)",
+ 1, 4, 0, 0);
+ test_geometry<bg::model::multi_point<P> >(
+ "multipoint(0 0, 2 0)",
+ 2, 4, 0, 4);
+ test_geometry<bg::model::linestring<P> >(
+ "linestring(0 0, 2 0)",
+ 2, 4, 0, 4);
+
+ test_empty_input<bg::model::linestring<P> >();
+ test_empty_input<bg::model::ring<P> >();
+ test_empty_input<bg::model::polygon<P> >();
+}
+
+
+int test_main(int, char* [])
+{
+ //test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/convex_hull_multi.cpp b/src/boost/libs/geometry/test/algorithms/convex_hull_multi.cpp
new file mode 100644
index 000000000..eaf0ddc8d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/convex_hull_multi.cpp
@@ -0,0 +1,91 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <cstddef>
+#include <iterator>
+#include <string>
+
+#include <algorithms/test_convex_hull.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/core/point_type.hpp>
+
+#include <boost/geometry/views/detail/range_type.hpp>
+
+#include <boost/geometry/algorithms/detail/for_each_range.hpp>
+
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::multi_point<P> mp;
+ typedef bg::model::multi_linestring<bg::model::linestring<P> > ml;
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mpoly;
+
+ // All points below in upper-points and lower-points
+ test_geometry<mp>("MULTIPOINT((0 0),(5 0),(1 1),(4 1))", 0, 5, 4.0);
+ test_geometry<mp>("MULTIPOINT((0 1),(5 1),(1 0),(4 0))", 0, 5, 4.0);
+
+ // All points in vertical line (this delivers an empty polygon with 3 points and closing point for closed)
+ test_geometry<mp>("MULTIPOINT((1 0),(5 0),(3 0),(4 0),(2 0))", 0, 4, 0.0);
+
+ // One point only
+ test_geometry<mp>("MULTIPOINT((1 0))", 0, 4, 0.0);
+
+ // Problem of 6019, reproduced by the convex hull robustness test:
+ test_geometry<mp>("MULTIPOINT((2 9),(1 3),(9 4),(1 1),(1 0),(7 9),(2 5),(3 7),(3 6),(2 4))",
+ 0, 6, 48.0);
+
+ // Ticket 6019:
+ test_geometry<mp>("MULTIPOINT((0 53),(0 103),(0 53),(0 3),(0 3),(0 0),(1 0),(1 1),(2 1),(2 0),(2 0),(2 0),(3 0),(3 1),(4 1),(4 0),(5 0),(0 3),(10 3),(10 2),(10 2),(10 2),(5 2),(5 0),(5 0),(55 0),(105 0))",
+ 0, 4, 5407.5);
+ // Ticket 6021:
+ test_geometry<mp>("multipoint((0 53), (0 103), (1 53))", 3, 4, 25);
+
+ test_geometry<mp>("multipoint((1.1 1.1), (2.5 2.1), (3.1 3.1), (4.9 1.1), (3.1 1.9))", 5, 4, 3.8);
+ test_geometry<ml>("multilinestring((2 4, 3 4, 3 5), (4 3,4 4,5 4))", 6, 5, 3.0);
+ test_geometry<mpoly>("multipolygon(((1 4,1 6,2 5,3 5,4 6,4 4,1 4)), ((4 2,4 3,6 3,6 2,4 2)))", 12, 7, 14.0);
+
+ test_empty_input<mp>();
+ test_empty_input<ml>();
+ test_empty_input<mpoly>();
+}
+
+
+int test_main(int, char* [])
+{
+ //test_all<bg::model::d2::point_xy<int> >();
+ //test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/correct.cpp b/src/boost/libs/geometry/test/algorithms/correct.cpp
new file mode 100644
index 000000000..154117634
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/correct.cpp
@@ -0,0 +1,183 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <sstream>
+
+#include <algorithms/test_correct.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+
+// Note: 3D/box test cannot be done using WKT because:
+// -> wkt-box does not exist
+// -> so it is converted to a ring
+// -> ring representation of 3d-box is not supported, nor feasible
+// -> so it uses DSV which can represent a box
+template <typename Geometry>
+void test_geometry_dsv(std::string const& wkt, std::string const& expected)
+{
+ Geometry geometry;
+
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+
+ std::ostringstream out;
+ out << bg::dsv(geometry);
+
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+
+
+
+
+
+template <typename P>
+void test_ring_polygon()
+{
+ // Define clockwise and counter clockwise polygon
+ std::string cw_ring = "POLYGON((0 0,0 1,1 1,1 0,0 0))";
+ std::string ccw_ring = "POLYGON((0 0,1 0,1 1,0 1,0 0))";
+ std::string cw_open_ring = "POLYGON((0 0,0 1,1 1,1 0))";
+ std::string ccw_open_ring = "POLYGON((0 0,1 0,1 1,0 1))";
+
+ // already cw_ring
+ test_geometry<bg::model::ring<P> >(cw_ring, cw_ring);
+
+ // wrong order
+ test_geometry<bg::model::ring<P> >(ccw_ring, cw_ring);
+
+ // ccw-ring, input ccw-ring, already correct
+ test_geometry<bg::model::ring<P, false> >(ccw_ring, ccw_ring);
+
+ // ccw-ring, input cw-ring, corrected
+ test_geometry<bg::model::ring<P, false> >(cw_ring, ccw_ring);
+
+ // open-ring, input ccw-ring, already correct
+ test_geometry<bg::model::ring<P, true, false> >(cw_open_ring, cw_open_ring);
+
+ // ccw-ring, input cw-ring, corrected
+ test_geometry<bg::model::ring<P, true, false> >(ccw_open_ring, "POLYGON((0 1,1 1,1 0,0 0))");
+
+
+
+ // not closed
+ test_geometry<bg::model::ring<P> >(
+ ccw_open_ring,
+ cw_ring);
+
+ // counter clockwise, cw_ring
+ test_geometry<bg::model::ring<P, false> >(ccw_ring, ccw_ring);
+
+ test_geometry<bg::model::ring<P, false> >(cw_ring, ccw_ring);
+
+
+ // polygon: cw_ring
+ test_geometry<bg::model::polygon<P> >(cw_ring, cw_ring);
+ // wrong order
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,1 0,1 1,0 1,0 0))",
+ cw_ring);
+ // wrong order & not closed
+ test_geometry<bg::model::polygon<P> >(
+ ccw_open_ring,
+ cw_ring);
+
+
+ std::string cw_holey_polygon =
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,2 1,2 2,1 2,1 1))";
+ std::string ccw_holey_polygon =
+ "POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1,1 2,2 2,2 1,1 1))";
+
+ // with holes: cw_ring
+ test_geometry<bg::model::polygon<P> >(
+ cw_holey_polygon,
+ cw_holey_polygon);
+ // wrong order of main
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1,2 1,2 2,1 2,1 1))",
+ cw_holey_polygon);
+ // wrong order of hole
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1))",
+ cw_holey_polygon);
+
+ // wrong order of main and hole
+ test_geometry<bg::model::polygon<P> >(ccw_holey_polygon, cw_holey_polygon);
+
+ // test the counter-clockwise
+ test_geometry<bg::model::polygon<P, false> >(
+ ccw_holey_polygon, ccw_holey_polygon);
+
+}
+
+template <typename P>
+void test_box()
+{
+ // Boxes. Reference is an open box (because in this test WKT is not
+ // explicitly closed)
+ std::string proper_box = "POLYGON((0 0,0 2,2 2,2 0))";
+ test_geometry<bg::model::box<P> >(proper_box, proper_box);
+ test_geometry<bg::model::box<P> >("BOX(0 0,2 2)", proper_box);
+ test_geometry<bg::model::box<P> >("BOX(2 2,0 0)", proper_box);
+ test_geometry<bg::model::box<P> >("BOX(0 2,2 0)", proper_box);
+
+ // Cubes
+ typedef bg::model::box<bg::model::point<double, 3, bg::cs::cartesian> > box3d;
+ std::string proper_3d_dsv_box = "((0, 0, 0), (2, 2, 2))";
+ test_geometry_dsv<box3d>("BOX(0 0 0,2 2 2)", proper_3d_dsv_box);
+ test_geometry_dsv<box3d>("BOX(2 2 2,0 0 0)", proper_3d_dsv_box);
+ test_geometry_dsv<box3d>("BOX(0 2 2,2 0 0)", proper_3d_dsv_box);
+ test_geometry_dsv<box3d>("BOX(2 0 2,0 2 0)", proper_3d_dsv_box);
+ test_geometry_dsv<box3d>("BOX(0 0 2,2 2 0)", proper_3d_dsv_box);
+}
+
+template <typename P>
+void test_all()
+{
+ test_ring_polygon<P>();
+ test_box<P>();
+}
+
+
+int test_main(int, char* [])
+{
+ //test_all<int[2]>();
+ //test_all<float[2]>(); not yet because cannot be copied, for polygon
+ //test_all<double[2]>();
+
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ test_ring_polygon<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_ring_polygon<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/correct_closure.cpp b/src/boost/libs/geometry/test/algorithms/correct_closure.cpp
new file mode 100644
index 000000000..6dec6970d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/correct_closure.cpp
@@ -0,0 +1,114 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <boost/geometry/algorithms/correct_closure.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+#include <boost/variant/variant.hpp>
+
+
+template <typename BaseGeometry, typename Geometry>
+void check_geometry(Geometry const& geometry, std::string const& expected)
+{
+ std::ostringstream out;
+ out << bg::wkt_manipulator<Geometry>(geometry, false);
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::string const& expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+
+ // Test tye type
+ bg::correct_closure(geometry);
+ check_geometry<Geometry>(geometry, expected);
+
+ // Test varianted type
+ boost::variant<Geometry> v(geometry);
+ bg::correct_closure(v);
+ check_geometry<Geometry>(v, expected);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::ring<P, true, true> cw_closed_ring_type;
+ typedef bg::model::ring<P, true, false> cw_open_ring_type;
+ typedef bg::model::ring<P, false, true> ccw_closed_ring_type;
+ typedef bg::model::ring<P, false, false> ccw_open_ring_type;
+
+ // Define clockwise and counter clockwise polygon
+ std::string cw_ring = "POLYGON((0 0,0 1,1 1,1 0,0 0))";
+ std::string cw_open_ring = "POLYGON((0 0,0 1,1 1,1 0))";
+
+ std::string ccw_ring = "POLYGON((0 0,1 0,1 1,0 1,0 0))";
+ std::string ccw_open_ring = "POLYGON((0 0,1 0,1 1,0 1))";
+
+ // Cases which should be closed or opened
+ test_geometry<cw_closed_ring_type>(cw_open_ring, cw_ring);
+ test_geometry<cw_open_ring_type>(cw_ring, cw_open_ring);
+ test_geometry<ccw_closed_ring_type>(ccw_open_ring, ccw_ring);
+ test_geometry<ccw_open_ring_type>(ccw_ring, ccw_open_ring);
+
+ // Cases which are incorrect but should still be closed or opened
+ test_geometry<cw_closed_ring_type>(ccw_open_ring, ccw_ring);
+ test_geometry<ccw_open_ring_type>(cw_ring, cw_open_ring);
+
+ // Cases where no action is necessary (even if order is incorrect)
+ test_geometry<cw_closed_ring_type>(cw_ring, cw_ring);
+ test_geometry<cw_closed_ring_type>(ccw_ring, ccw_ring);
+ test_geometry<cw_open_ring_type>(cw_open_ring, cw_open_ring);
+ test_geometry<cw_open_ring_type>(ccw_open_ring, ccw_open_ring);
+ test_geometry<ccw_closed_ring_type>(cw_ring, cw_ring);
+ test_geometry<ccw_closed_ring_type>(ccw_ring, ccw_ring);
+ test_geometry<ccw_open_ring_type>(cw_open_ring, cw_open_ring);
+ test_geometry<ccw_open_ring_type>(ccw_open_ring, ccw_open_ring);
+
+ // Polygon cases
+ std::string cw_polygon =
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,2 1,2 2,1 2,1 1))";
+
+ std::string cw_open_polygon =
+ "POLYGON((0 0,0 4,4 4,4 0),(1 1,2 1,2 2,1 2))";
+
+ typedef bg::model::polygon<P, true, true> cw_closed_polygon_type;
+ typedef bg::model::polygon<P, true, false> cw_open_polygon_type;
+
+ test_geometry<cw_closed_polygon_type>(cw_open_polygon, cw_polygon);
+ test_geometry<cw_open_polygon_type>(cw_polygon, cw_open_polygon);
+
+ test_geometry<cw_closed_polygon_type>(cw_polygon, cw_polygon);
+ test_geometry<cw_open_polygon_type>(cw_open_polygon, cw_open_polygon);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/correct_multi.cpp b/src/boost/libs/geometry/test/algorithms/correct_multi.cpp
new file mode 100644
index 000000000..be61640cd
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/correct_multi.cpp
@@ -0,0 +1,60 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::string const& expected)
+{
+ Geometry geometry;
+
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > cw_type;
+ std::string cw_mp =
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))";
+ test_geometry<cw_type>(cw_mp, cw_mp);
+
+ test_geometry<cw_type>("MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)))",
+ cw_mp);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/covered_by/Jamfile b/src/boost/libs/geometry/test/algorithms/covered_by/Jamfile
new file mode 100644
index 000000000..0a7b57359
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/covered_by/Jamfile
@@ -0,0 +1,23 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-covered_by
+ :
+ [ run covered_by.cpp : : : : algorithms_covered_by ]
+ [ run covered_by_multi.cpp : : : : algorithms_covered_by_multi ]
+ [ run covered_by_sph.cpp : : : : algorithms_covered_by_sph ]
+ [ run covered_by_sph_geo.cpp : : : : algorithms_covered_by_sph_geo ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/covered_by/covered_by.cpp b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by.cpp
new file mode 100644
index 000000000..2052ea58e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by.cpp
@@ -0,0 +1,197 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2015, 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_covered_by.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ /*
+ // trivial case
+ test_ring<P>("POINT(1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true, false);
+
+ // on border/corner
+ test_ring<P>("POINT(0 0)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false, true);
+ test_ring<P>("POINT(0 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false, true);
+
+ // aligned to segment/vertex
+ test_ring<P>("POINT(1 1)", "POLYGON((0 0,0 3,3 3,3 1,2 1,2 0,0 0))", true, false);
+ test_ring<P>("POINT(1 1)", "POLYGON((0 0,0 3,4 3,3 1,2 2,2 0,0 0))", true, false);
+
+ // same polygon, but point on border
+ test_ring<P>("POINT(3 3)", "POLYGON((0 0,0 3,3 3,3 1,2 1,2 0,0 0))", false, true);
+ test_ring<P>("POINT(3 3)", "POLYGON((0 0,0 3,4 3,3 1,2 2,2 0,0 0))", false, true);
+
+ // holes
+ test_geometry<P, bg::model::polygon<P> >("POINT(2 2)",
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,3 1,3 3,1 3,1 1))", false);
+
+ */
+
+ test_geometry<P, P>("POINT(0 0)", "POINT(0 0)", true);
+ test_geometry<P, P>("POINT(0 0)", "POINT(1 1)", false);
+
+ typedef bg::model::multi_point<P> mpt;
+ test_geometry<P, mpt>("POINT(0 0)", "MULTIPOINT(0 0, 1 1)", true);
+ test_geometry<mpt, P>("MULTIPOINT(0 0, 1 1)", "POINT(1 1)", false);
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 1)", "MULTIPOINT(1 1, 2 2)", false);
+
+ typedef bg::model::segment<P> seg;
+ test_geometry<P, seg>("POINT(1 1)", "LINESTRING(0 0, 2 2)", true);
+ test_geometry<P, seg>("POINT(0 0)", "LINESTRING(0 0, 1 1)", true);
+ test_geometry<P, seg>("POINT(1 0)", "LINESTRING(0 0, 1 1)", false);
+
+ // linestrings
+ typedef bg::model::linestring<P> ls;
+ test_geometry<P, ls>("POINT(0 0)", "LINESTRING(0 0,1 1,2 2)", true);
+ test_geometry<P, ls>("POINT(3 3)", "LINESTRING(0 0,1 1,2 2)", false);
+ test_geometry<P, ls>("POINT(1 1)", "LINESTRING(0 0,2 2,3 3)", true);
+
+ // multi_linestrings
+ typedef bg::model::multi_linestring<ls> mls;
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0,1 1,2 2),(0 0,0 1))", true);
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0,1 1,2 2),(0 0,0 1),(0 0,1 0))", true);
+
+ // multi_point/segment
+ typedef bg::model::multi_point<P> mpt;
+ test_geometry<mpt, seg>("MULTIPOINT(0 0, 1 1)", "LINESTRING(0 0, 2 2)", true);
+
+ // multi_point/linestring
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 2 2)", "LINESTRING(0 0, 2 2)", true);
+ test_geometry<mpt, ls>("MULTIPOINT(1 1, 3 3)", "LINESTRING(0 0, 2 2)", false);
+
+ // multi_point/multi_linestring
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", true);
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 2 2)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", true);
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 3 3)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", true);
+ test_geometry<mpt, mls>("MULTIPOINT(1 1, 4 4)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", false);
+
+ // point/A
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+ test_geometry<P, ring>("POINT(1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true);
+ test_geometry<P, poly>("POINT(1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true);
+ test_geometry<P, mpoly>("POINT(1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", true);
+
+ // multi_point/A
+ test_geometry<mpt, ring>("MULTIPOINT(0 0, 1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true);
+ test_geometry<mpt, poly>("MULTIPOINT(0 0, 2 2)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true);
+ test_geometry<mpt, poly>("MULTIPOINT(1 1, 3 3)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false);
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", true);
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 2 2)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", true);
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 3 3)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", true);
+ test_geometry<mpt, mpoly>("MULTIPOINT(1 1, 4 4)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", false);
+
+ typedef bg::model::box<P> box_type;
+
+ test_geometry<P, box_type>("POINT(1 1)", "BOX(0 0,2 2)", true);
+ test_geometry<P, box_type>("POINT(0 0)", "BOX(0 0,2 2)", true);
+ test_geometry<P, box_type>("POINT(2 2)", "BOX(0 0,2 2)", true);
+ test_geometry<P, box_type>("POINT(0 1)", "BOX(0 0,2 2)", true);
+ test_geometry<P, box_type>("POINT(1 0)", "BOX(0 0,2 2)", true);
+ test_geometry<P, box_type>("POINT(3 3)", "BOX(0 0,2 2)", false);
+
+ test_geometry<box_type, box_type>("BOX(1 1,2 2)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type, box_type>("BOX(0 0,3 3)", "BOX(1 1,2 2)", false);
+ test_geometry<box_type, box_type>("BOX(0 0,2 2)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type, box_type>("BOX(1 1,3 3)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type, box_type>("BOX(1 2,3 3)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type, box_type>("BOX(1 1,4 3)", "BOX(0 0,3 3)", false);
+}
+
+
+void test_3d()
+{
+ typedef boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> point_type;
+ typedef boost::geometry::model::box<point_type> box_type;
+ box_type box(point_type(0, 0, 0), point_type(4, 4, 4));
+ BOOST_CHECK_EQUAL(bg::covered_by(point_type(2, 2, 2), box), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(point_type(2, 4, 2), box), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(point_type(2, 2, 4), box), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(point_type(2, 2, 5), box), false);
+}
+
+template <typename P1, typename P2>
+void test_mixed_of()
+{
+ typedef boost::geometry::model::polygon<P1> polygon_type1;
+ typedef boost::geometry::model::polygon<P2> polygon_type2;
+ typedef boost::geometry::model::box<P1> box_type1;
+ typedef boost::geometry::model::box<P2> box_type2;
+
+ polygon_type1 poly1;
+ polygon_type2 poly2;
+ boost::geometry::read_wkt("POLYGON((0 0,0 5,5 5,5 0,0 0))", poly1);
+ boost::geometry::read_wkt("POLYGON((0 0,0 5,5 5,5 0,0 0))", poly2);
+
+ box_type1 box1(P1(1, 1), P1(4, 4));
+ box_type2 box2(P2(0, 0), P2(5, 5));
+ P1 p1(3, 3);
+ P2 p2(3, 3);
+
+ BOOST_CHECK_EQUAL(bg::covered_by(p1, poly2), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(p2, poly1), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(p2, box1), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(p1, box2), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(box1, box2), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(box2, box1), false);
+}
+
+
+void test_mixed()
+{
+ // Mixing point types and coordinate types
+ test_mixed_of
+ <
+ boost::geometry::model::d2::point_xy<double>,
+ boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>
+ >();
+ test_mixed_of
+ <
+ boost::geometry::model::d2::point_xy<float>,
+ boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>
+ >();
+ test_mixed_of
+ <
+ boost::geometry::model::d2::point_xy<int>,
+ boost::geometry::model::d2::point_xy<double>
+ >();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ //test_spherical<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+ test_mixed();
+ test_3d();
+
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_eps<bg::model::d2::point_xy<ttmath_big> >();
+ //test_spherical<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_multi.cpp b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_multi.cpp
new file mode 100644
index 000000000..720e72716
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_multi.cpp
@@ -0,0 +1,56 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/covered_by.hpp>
+
+#include <boost/geometry/geometries/box.hpp>
+
+#include <boost/geometry/core/point_order.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include "test_covered_by.hpp"
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+
+ // test multi-with-one-polygon (trivial case)
+ test_geometry<P, mp>("POINT(1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", true);
+ test_geometry<P, mp>("POINT(3 3)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
+ test_geometry<P, mp>("POINT(0 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", true);
+ test_geometry<P, mp>("POINT(4 4)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
+
+ // test if it is in one of them
+ std::string multi("MULTIPOLYGON("
+ "((0 0,0 2,2 2,2 0,0 0))"
+ "((3 3,3 6,6 6,6 3,3 3))"
+ ")");
+ test_geometry<P, mp>("POINT(4 4)", multi, true);
+ test_geometry<P, mp>("POINT(1 1)", multi, true);
+ test_geometry<P, mp>("POINT(0 1)", multi, true);
+}
+
+int test_main( int , char* [] )
+{
+ //test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph.cpp b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph.cpp
new file mode 100644
index 000000000..a80fb2390
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph.cpp
@@ -0,0 +1,320 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_covered_by.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ false);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ false);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ false);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ false);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ true);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ true);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ false);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[1], case_6_sph[0],
+ true);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ false);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ false);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ false);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[1], case_11_sph[0],
+ true);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ false);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ false);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ false);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ false);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[1], case_17_sph[0],
+ true);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ false);
+ test_geometry<poly, poly>(case_18_sph[1], case_18_sph[0],
+ true);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ false);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ false);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ false);
+}
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::polygon<P> ring;
+
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ true);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ true);
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ true);
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ false);
+
+ test_geometry<mls, ring>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ false);
+
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ true);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false);
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ false);
+}
+
+template <typename P>
+void test_point_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+
+ // https://svn.boost.org/trac/boost/ticket/9162
+ test_geometry<P, poly>("POINT(0 90)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(-120 21)",
+ "POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
+ false);
+ // extended
+ test_geometry<P, poly>("POINT(0 90)",
+ "POLYGON((0 80, 0 81, -90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(0 90)",
+ "POLYGON((0 80, -90 80, -90 81, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(0 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(-180 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(0 -90)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ true);
+ test_geometry<P, poly>("POINT(0 -89)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ true);
+ test_geometry<P, poly>("POINT(1 -90)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ true);
+ test_geometry<P, poly>("POINT(1 -89)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ true);
+ test_geometry<P, poly>("POINT(1 90)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(1 90)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+
+
+
+ // MySQL report 08.2017
+ test_geometry<P, poly>("POINT(-179 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ false);
+ // extended
+ test_geometry<P, poly>("POINT(179 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ false);
+ test_geometry<P, poly>("POINT(180 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ false);
+ test_geometry<P, poly>("POINT(-179 0)",
+ "POLYGON((-10 -10, -10 10, 10 10, 10 -10, -10 10))",
+ false);
+ test_geometry<P, poly>("POINT(179 0)",
+ "POLYGON((-10 -10, -10 10, 10 10, 10 -10, -10 10))",
+ false);
+ test_geometry<P, poly>("POINT(-179 0)",
+ "POLYGON((0 0, 0 1, 1 0, 0 -1, 0 0))",
+ false);
+ test_geometry<P, poly>("POINT(179 0)",
+ "POLYGON((0 0, 0 1, 1 0, 0 -1, 0 0))",
+ false);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+
+ test_point_polygon<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph_geo.cpp b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph_geo.cpp
new file mode 100644
index 000000000..6c8d5853b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/covered_by/covered_by_sph_geo.cpp
@@ -0,0 +1,132 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_covered_by.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_point_box()
+{
+ typedef bg::model::box<P> box_t;
+
+ test_geometry<P, box_t>("POINT(0 0)", "BOX(0 0, 1 1)", true);
+ test_geometry<P, box_t>("POINT(1 1)", "BOX(0 0, 2 2)", true);
+
+ test_geometry<P, box_t>("POINT(180 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(-180 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(180 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(-180 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(179 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(-179 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(179 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(-179 1)", "BOX(170 0, 180 2)", false);
+ test_geometry<P, box_t>("POINT(169 1)", "BOX(170 0, 180 2)", false);
+
+ // https://svn.boost.org/trac/boost/ticket/12412
+ test_geometry<P, box_t>("POINT(-0.127592 51.7)", "BOX(-2.08882 51.5034, -0.127592 51.9074)", true);
+ // and related
+ test_geometry<P, box_t>("POINT(-2.08882 51.7)", "BOX(-2.08882 51.5034, -0.127592 51.9074)", true);
+ test_geometry<P, box_t>("POINT(0.127592 51.7)", "BOX(0.127592 51.5034, 2.08882 51.9074)", true);
+ test_geometry<P, box_t>("POINT(2.08882 51.7)", "BOX(0.127592 51.5034, 2.08882 51.9074)", true);
+
+ test_geometry<P, box_t>("POINT(179.08882 1)", "BOX(179.08882 0, 538.127592 2)", true);
+ test_geometry<P, box_t>("POINT(178.127592 1)", "BOX(179.08882 0, 538.127592 2)", true);
+ test_geometry<P, box_t>("POINT(179.08882 1)", "BOX(179.08882 0, 182.127592 2)", true);
+ test_geometry<P, box_t>("POINT(-177.872408 1)", "BOX(179.08882 0, 182.127592 2)", true);
+}
+
+template <typename P>
+void test_box_box()
+{
+ typedef bg::model::box<P> box_t;
+
+ test_geometry<box_t, box_t>("BOX(0 0, 1 1)", "BOX(0 0, 1 1)", true);
+
+ test_geometry<box_t, box_t>("BOX(-170 0,-160 1)", "BOX(-180 0, 180 1)", true);
+ test_geometry<box_t, box_t>("BOX(-170 0,-160 1)", "BOX(170 0, 200 1)", true);
+ test_geometry<box_t, box_t>("BOX(-170 0,-150 1)", "BOX(170 0, 200 1)", false);
+ test_geometry<box_t, box_t>("BOX(0 0,1 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(0 0,10 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,10 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,20 1)", "BOX(170 0, 370 1)", false);
+ test_geometry<box_t, box_t>("BOX(10 0,20 1)", "BOX(170 0, 370 1)", false);
+ test_geometry<box_t, box_t>("BOX(160 0,180 1)", "BOX(170 0, 370 1)", false);
+
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 190 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 191 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(179 0, 190 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(181 0, 190 1)", false); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 189 1)", false); // invalid?
+
+ // Related to https://svn.boost.org/trac/boost/ticket/12412
+ test_geometry<box_t, box_t>("BOX(-1.346346 51.6, -0.127592 51.7)", "BOX(-2.08882 51.5034, -0.127592 51.9074)", true);
+ test_geometry<box_t, box_t>("BOX(-2.08882 51.6, -1.346346 51.7)", "BOX(-2.08882 51.5034, -0.127592 51.9074)", true);
+ test_geometry<box_t, box_t>("BOX(0.127592 51.6, 1.346346 51.7)", "BOX(0.127592 51.5034, 2.08882 51.9074)", true);
+ test_geometry<box_t, box_t>("BOX(1.346346 51.6, 2.08882 51.7)", "BOX(0.127592 51.5034, 2.08882 51.9074)", true);
+
+ test_geometry<box_t, box_t>("BOX(179.08882 1, 180.0 1)", "BOX(179.08882 0, 538.127592 2)", true);
+ test_geometry<box_t, box_t>("BOX(177.0 1, 178.127592 1)", "BOX(179.08882 0, 538.127592 2)", true);
+ test_geometry<box_t, box_t>("BOX(179.08882 1, 179.9 1)", "BOX(179.08882 0, 182.127592 2)", true);
+ test_geometry<box_t, box_t>("BOX(-179.9 1, -177.872408 1)", "BOX(179.08882 0, 182.127592 2)", true);
+}
+
+template <typename P>
+void test_point_polygon()
+{
+ typename boost::mpl::if_
+ <
+ boost::is_same<typename bg::cs_tag<P>::type, bg::geographic_tag>,
+ bg::strategy::within::geographic_winding<P>,
+ bg::strategy::within::spherical_winding<P>
+ >::type s;
+
+ typedef bg::model::polygon<P> poly;
+
+ // MySQL report 08.2017
+ test_geometry<P, poly>("POINT(-179 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ false);
+ test_geometry<P, poly>("POINT(-179 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ false,
+ s);
+
+ test_geometry<P, poly>("POINT(1 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ true);
+ test_geometry<P, poly>("POINT(1 0)",
+ "POLYGON((0 0, 0 2, 2 0, 0 -2, 0 0))",
+ true,
+ s);
+}
+
+template <typename P>
+void test_cs()
+{
+ test_point_box<P>();
+ test_box_box<P>();
+ test_point_polygon<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_cs<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();;
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/covered_by/test_covered_by.hpp b/src/boost/libs/geometry/test/algorithms/covered_by/test_covered_by.hpp
new file mode 100644
index 000000000..e22ed03fd
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/covered_by/test_covered_by.hpp
@@ -0,0 +1,184 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_COVERED_BY_HPP
+#define BOOST_GEOMETRY_TEST_COVERED_BY_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_covered_by(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::covered_by(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_covered_by(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::covered_by(geometry1, geometry2);
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void check_geometry(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_covered_by(geometry1, geometry2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "covered_by: " << wkt1
+ << " in " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2, bool expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ boost::variant<Geometry1> v1(geometry1);
+ boost::variant<Geometry2> v2(geometry2);
+
+ typedef typename bg::strategy::covered_by::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+
+ check_geometry(geometry1, geometry2, wkt1, wkt2, expected, no_strategy());
+ check_geometry(geometry1, geometry2, wkt1, wkt2, expected, strategy_type());
+ check_geometry(v1, geometry2, wkt1, wkt2, expected, no_strategy());
+ check_geometry(geometry1, v2, wkt1, wkt2, expected, no_strategy());
+ check_geometry(v1, v2, wkt1, wkt2, expected, no_strategy());
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ Strategy const& strategy)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ check_geometry(geometry1, geometry2, wkt1, wkt2, expected, strategy);
+}
+
+/*
+
+template <typename Point, bool Clockwise, bool Closed>
+void test_ordered_ring(std::string const& wkt_point,
+ std::string const& wkt_geometry, bool expected)
+{
+ typedef bg::model::ring<Point, Clockwise, Closed> ring_type;
+ ring_type ring;
+ Point point;
+
+ bg::read_wkt(wkt_geometry, ring);
+ if (! Clockwise)
+ {
+ std::reverse(boost::begin(ring), boost::end(ring));
+ }
+ if (! Closed)
+ {
+ ring.resize(ring.size() - 1);
+ }
+
+ bg::read_wkt(wkt_point, point);
+
+ bool detected = bg::covered_by(point, ring);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "covered_by: " << wkt_point
+ << " in " << wkt_geometry
+ << " -> Expected: " << expected
+ << " detected: " << detected
+ << " clockwise: " << int(Clockwise)
+ << " closed: " << int(Closed)
+ );
+
+ // other strategy (note that this one cannot detect OnBorder
+ // (without modifications)
+
+ bg::strategy::covered_by::franklin<Point> franklin;
+ detected = bg::covered_by(point, ring, franklin);
+ if (! on_border)
+ {
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "covered_by: " << wkt_point
+ << " in " << wkt_geometry
+ << " -> Expected: " << expected
+ << " detected: " << detected
+ << " clockwise: " << int(Clockwise)
+ << " closed: " << int(Closed)
+ );
+ }
+
+
+ bg::strategy::covered_by::crossings_multiply<Point> cm;
+ detected = bg::covered_by(point, ring, cm);
+ if (! on_border)
+ {
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "covered_by: " << wkt_point
+ << " in " << wkt_geometry
+ << " -> Expected: " << expected
+ << " detected: " << detected
+ << " clockwise: " << int(Clockwise)
+ << " closed: " << int(Closed)
+ );
+ }
+}
+
+template <typename Point>
+void test_ring(std::string const& wkt_point,
+ std::string const& wkt_geometry,
+ bool expected)
+{
+ test_ordered_ring<Point, true, true>(wkt_point, wkt_geometry, expected);
+ test_ordered_ring<Point, false, true>(wkt_point, wkt_geometry, expected);
+ test_ordered_ring<Point, true, false>(wkt_point, wkt_geometry, expected);
+ test_ordered_ring<Point, false, false>(wkt_point, wkt_geometry, expected);
+ test_geometry<Point, bg::model::polygon<Point> >(wkt_point, wkt_geometry, expected);
+}
+*/
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/crosses/Jamfile b/src/boost/libs/geometry/test/algorithms/crosses/Jamfile
new file mode 100644
index 000000000..d1d924f30
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/crosses/Jamfile
@@ -0,0 +1,21 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-crosses
+ :
+ [ run crosses.cpp : : : : algorithms_crosses ]
+ [ run crosses_sph.cpp : : : : algorithms_crosses_sph ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/crosses/crosses.cpp b/src/boost/libs/geometry/test/algorithms/crosses/crosses.cpp
new file mode 100644
index 000000000..21ed78d12
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/crosses/crosses.cpp
@@ -0,0 +1,107 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2017.
+// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+#include "test_crosses.hpp"
+
+template <typename P>
+void test_pl()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mpt, ls>("MULTIPOINT(1 0,1 1)", "LINESTRING(0 0,1 0,3 3)", true);
+ test_geometry<mpt, ls>("MULTIPOINT(0 0,1 1)", "LINESTRING(0 0,1 0,3 3)", false);
+ test_geometry<mpt, ls>("MULTIPOINT(0 0,1 1)", "LINESTRING(0 0,1 1,3 3)", false);
+
+ test_geometry<mpt, mls>("MULTIPOINT(0 0,3 0)", "MULTILINESTRING((0 0,0 1,1 1),(1 1,1 0,0 0))", true);
+ test_geometry<mpt, mls>("MULTIPOINT(0 0,1 1)", "MULTILINESTRING((0 0,0 1,1 1),(1 1,1 0,0 0))", false);
+}
+
+template <typename P>
+void test_pa()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpt, poly>("MULTIPOINT(1 1,6 6)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<mpt, poly>("MULTIPOINT(0 0,6 6)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+ test_geometry<mpt, poly>("MULTIPOINT(0 0,1 1)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0,1 1)", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 9,9 9,9 5,5 5)))", false);
+ test_geometry<mpt, mpoly>("MULTIPOINT(1 1,1 6)", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 9,9 9,9 5,5 5)))", true);
+}
+
+template <typename P>
+void test_ll()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,4 4)", "LINESTRING(0 1,2 1,3 1)", true);
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2)", "LINESTRING(0 1,2 1)", true);
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,4 4)", "LINESTRING(0 1,1 1,2 2,3 2)", false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,2 2,4 4)", "MULTILINESTRING((0 1,4 1),(0 2,4 2))", true);
+ test_geometry<mls, ls>("MULTILINESTRING((0 1,4 1),(0 2,4 2))", "LINESTRING(0 0,2 2,4 4)", true);
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,2 2,4 4),(3 0,3 4))", "MULTILINESTRING((0 1,4 1),(0 2,4 2))", true);
+
+ // spike - boundary and interior on the same point
+ test_geometry<ls, ls>("LINESTRING(3 7, 8 8, 2 6)", "LINESTRING(5 7, 10 7, 0 7)", true);
+}
+
+template <typename P>
+void test_la()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, ring>("LINESTRING(0 0, 10 10)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(0 0, 10 10)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<ls, mpoly>("LINESTRING(0 0, 10 10)", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)))", true);
+
+ test_geometry<ls, poly>("LINESTRING(0 0, 10 0)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(1 1, 5 5)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+
+ test_geometry<mls, ring>("MULTILINESTRING((1 1, 5 5),(6 6,7 7))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<mls, poly>("MULTILINESTRING((1 1, 5 5),(6 6,7 7))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<mls, mpoly>("MULTILINESTRING((1 1, 5 5),(6 6,7 7))", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)))", true);
+}
+
+template <typename P>
+void test_2d()
+{
+ test_pl<P>();
+ test_pa<P>();
+ test_ll<P>();
+ test_la<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_2d<bg::model::d2::point_xy<int> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ //test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/crosses/crosses_sph.cpp b/src/boost/libs/geometry/test/algorithms/crosses/crosses_sph.cpp
new file mode 100644
index 000000000..93657eb38
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/crosses/crosses_sph.cpp
@@ -0,0 +1,119 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_crosses.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::polygon<P> ring;
+
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ false);
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ true);
+
+ test_geometry<mls, ring>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ true);
+
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/crosses/test_crosses.hpp b/src/boost/libs/geometry/test/algorithms/crosses/test_crosses.hpp
new file mode 100644
index 000000000..10d4e55d0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/crosses/test_crosses.hpp
@@ -0,0 +1,110 @@
+// Generic Geometry2 Library
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2017.
+// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_CROSSES_HPP
+#define BOOST_GEOMETRY_TEST_CROSSES_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/algorithms/crosses.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/variant/variant.hpp>
+
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_crosses(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::crosses(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_crosses(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::crosses(geometry1, geometry2);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2, bool expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ bool detected = call_crosses(geometry1, geometry2, no_strategy());
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "crosses: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+
+ detected = call_crosses(geometry1, geometry2, strategy_type());
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "crosses: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ detected = bg::crosses(geometry1,
+ boost::variant<Geometry2>(geometry2));
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "crosses: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ detected = bg::crosses(boost::variant<Geometry1>(geometry1),
+ geometry2);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "crosses: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ detected = bg::crosses(boost::variant<Geometry1>(geometry1),
+ boost::variant<Geometry2>(geometry2));
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "crosses: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+#endif
+}
+
+
+#endif // BOOST_GEOMETRY_TEST_CROSSES_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/densify.cpp b/src/boost/libs/geometry/test/algorithms/densify.cpp
new file mode 100644
index 000000000..bf723bbc1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/densify.cpp
@@ -0,0 +1,227 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/densify.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/perimeter.hpp>
+
+#include <boost/geometry/iterators/segment_iterator.hpp>
+
+#include <boost/geometry/strategies/cartesian/densify.hpp>
+#include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
+#include <boost/geometry/strategies/geographic/densify.hpp>
+#include <boost/geometry/strategies/geographic/distance.hpp>
+#include <boost/geometry/strategies/spherical/densify.hpp>
+#include <boost/geometry/strategies/spherical/distance_haversine.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+struct check_lengths
+{
+ template <typename G, typename S>
+ void operator()(G const& g, G const& o, S const& s) const
+ {
+ double d1 = bg::length(g, s);
+ double d2 = bg::length(o, s);
+
+ BOOST_CHECK_CLOSE(d1, d2, 0.0001);
+ }
+};
+
+struct check_perimeters
+{
+ template <typename G, typename S>
+ void operator()(G const& g, G const& o, S const& s) const
+ {
+ double d1 = bg::perimeter(g, s);
+ double d2 = bg::perimeter(o, s);
+
+ BOOST_CHECK_CLOSE(d1, d2, 0.0001);
+ }
+};
+
+template <typename G, typename DistS>
+double inline shortest_length(G const& g, DistS const& dist_s)
+{
+ double min_len = (std::numeric_limits<double>::max)();
+ for (bg::segment_iterator<G const> it = bg::segments_begin(g);
+ it != bg::segments_end(g); ++it)
+ {
+ double len = bg::length(*it, dist_s);
+ min_len = (std::min)(min_len, len);
+ }
+ return min_len;
+}
+
+template <typename G, typename DistS>
+double inline greatest_length(G const& o, DistS const& dist_s)
+{
+ double max_len = 0.0;
+ for (bg::segment_iterator<G const> it = bg::segments_begin(o);
+ it != bg::segments_end(o); ++it)
+ {
+ double len = bg::length(*it, dist_s);
+ max_len = (std::max)(max_len, len);
+ }
+ return max_len;
+}
+
+template <typename G, typename CSTag = typename bg::cs_tag<G>::type>
+struct cs_data
+{};
+
+template <typename G>
+struct cs_data<G, bg::cartesian_tag>
+{
+ bg::strategy::densify::cartesian<> compl_s;
+ bg::strategy::distance::pythagoras<> dist_s;
+};
+
+template <typename G>
+struct cs_data<G, bg::spherical_equatorial_tag>
+{
+ cs_data()
+ : model(6378137.0)
+ , compl_s(model)
+ , dist_s(6378137.0)
+ {}
+
+ bg::srs::sphere<double> model;
+ bg::strategy::densify::spherical<> compl_s;
+ bg::strategy::distance::haversine<double> dist_s;
+};
+
+template <typename G>
+struct cs_data<G, bg::geographic_tag>
+{
+ cs_data()
+ : model(6378137.0, 6356752.3142451793)
+ , compl_s(model)
+ , dist_s(model)
+ {}
+
+ bg::srs::spheroid<double> model;
+ bg::strategy::densify::geographic<> compl_s;
+ bg::strategy::distance::geographic<> dist_s;
+};
+
+template <typename G, typename DistS, typename Check>
+inline void check_result(G const& g, G const& o, double max_distance,
+ DistS const& dist_s, Check const& check)
+{
+ // geometry was indeed densified
+ std::size_t g_count = bg::num_points(g);
+ std::size_t o_count = bg::num_points(o);
+ BOOST_CHECK(g_count < o_count);
+
+ // all segments have lengths smaller or equal to max_distance
+ double gr_len = greatest_length(o, dist_s);
+ // NOTE: Currently geographic strategies can generate segments that have
+ // lengths slightly greater than max_distance. In order to change
+ // this the generation of new points should e.g. be recursive with
+ // stop condition comparing the current distance calculated by
+ // inverse strategy.
+ // NOTE: Closeness value tweaked for Andoyer
+ bool is_close = (gr_len - max_distance) / (std::max)(gr_len, max_distance) < 0.0001;
+ BOOST_CHECK(gr_len <= max_distance || is_close);
+
+ // the overall length or perimeter didn't change
+ check(g, o, dist_s);
+}
+
+template <typename G, typename Check>
+inline void test_geometry(std::string const& wkt, Check const& check)
+{
+ cs_data<G> d;
+
+ G g;
+ bg::read_wkt(wkt, g);
+
+ {
+ bg::default_strategy def_s;
+ double max_distance = shortest_length(g, def_s) / 3.0;
+
+ G o;
+ bg::densify(g, o, max_distance);
+
+ check_result(g, o, max_distance, def_s, check);
+ }
+
+ {
+ double max_distance = shortest_length(g, d.dist_s) / 3.0;
+
+ G o;
+ bg::densify(g, o, max_distance, d.compl_s);
+
+ check_result(g, o, max_distance, d.dist_s, check);
+ }
+}
+
+template <typename G>
+inline void test_linear(std::string const& wkt)
+{
+ test_geometry<G>(wkt, check_lengths());
+}
+
+template <typename G>
+inline void test_areal(std::string const& wkt)
+{
+ test_geometry<G>(wkt, check_perimeters());
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> ls_t;
+ typedef bg::model::multi_linestring<ls_t> mls_t;
+
+ typedef bg::model::ring<P> ring_t;
+ typedef bg::model::polygon<P> poly_t;
+ typedef bg::model::multi_polygon<poly_t> mpoly_t;
+
+ typedef bg::model::ring<P, true, false> oring_t;
+ typedef bg::model::polygon<P, true, false> opoly_t;
+ typedef bg::model::multi_polygon<opoly_t> ompoly_t;
+
+ test_linear<ls_t>("LINESTRING(4 -4, 4 -1)");
+ test_linear<ls_t>("LINESTRING(4 4, 4 1)");
+ test_linear<ls_t>("LINESTRING(0 0, 180 0)");
+ test_linear<ls_t>("LINESTRING(1 1, -179 -1)");
+
+ test_linear<ls_t>("LINESTRING(1 1, 2 2, 4 2)");
+ test_linear<mls_t>("MULTILINESTRING((1 1, 2 2),(2 2, 4 2))");
+
+ test_areal<ring_t>("POLYGON((1 1, 1 2, 2 2, 1 1))");
+ test_areal<poly_t>("POLYGON((1 1, 1 4, 4 4, 4 1, 1 1),(1 1, 2 2, 2 3, 1 1))");
+ test_areal<mpoly_t>("MULTIPOLYGON(((1 1, 1 4, 4 4, 4 1, 1 1),(1 1, 2 2, 2 3, 1 1)),((4 4, 5 5, 5 4, 4 4)))");
+
+ test_areal<oring_t>("POLYGON((1 1, 1 2, 2 2))");
+ test_areal<opoly_t>("POLYGON((1 1, 1 4, 4 4, 4 1),(1 1, 2 2, 2 3))");
+ test_areal<ompoly_t>("MULTIPOLYGON(((1 1, 1 4, 4 4, 4 1),(1 1, 2 2, 2 3)),((4 4, 5 5, 5 4)))");
+
+ test_areal<ring_t>("POLYGON((0 0,0 40,40 40,40 0,0 0))");
+ test_areal<oring_t>("POLYGON((0 0,0 40,40 40,40 0))");
+}
+
+int test_main(int, char* [])
+{
+ test_all< bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_all< bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all< bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/detail/Jamfile b/src/boost/libs/geometry/test/algorithms/detail/Jamfile
new file mode 100644
index 000000000..5f55a45db
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/Jamfile
@@ -0,0 +1,24 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2015, 2019.
+# Modifications copyright (c) 2015, 2019 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-detail
+ :
+ [ run as_range.cpp : : : : algorithms_as_range ]
+ [ run calculate_point_order.cpp : : : : algorithms_calculate_point_order ]
+ [ run partition.cpp : : : : algorithms_partition ]
+ [ run tupled_output.cpp : : : : algorithms_tupled_output ]
+ ;
+
+build-project sections ;
diff --git a/src/boost/libs/geometry/test/algorithms/detail/as_range.cpp b/src/boost/libs/geometry/test/algorithms/detail/as_range.cpp
new file mode 100644
index 000000000..dd6aabf28
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/as_range.cpp
@@ -0,0 +1,79 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/views/detail/range_type.hpp>
+#include <boost/geometry/algorithms/detail/as_range.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+template <int D, typename Range>
+double sum(Range const& range)
+{
+ double s = 0.0;
+ for (typename boost::range_const_iterator<Range>::type it = boost::begin(range);
+ it != boost::end(range); ++it)
+ {
+ s += bg::get<D>(*it);
+ }
+ return s;
+}
+
+template <typename G>
+void test_geometry(std::string const& wkt, double expected_x, double expected_y)
+{
+ G geometry;
+
+ // Declare a range-type, compatible with boost::range,
+ // such that range_iterator etc could be called
+ typedef typename bg::detail::range_type<G>::type range_type;
+
+ bg::read_wkt(wkt, geometry);
+
+ double s = sum<0>(bg::detail::as_range<range_type>(geometry));
+ BOOST_CHECK_CLOSE(s, expected_x, 0.001);
+
+ s = sum<1>(bg::detail::as_range<range_type>(geometry));
+ BOOST_CHECK_CLOSE(s, expected_y, 0.001);
+}
+
+
+template <typename P>
+void test_all()
+{
+ // As-range utility should consider a geometry as a range, so
+ // linestring stays linestring
+ test_geometry<bg::model::linestring<P> >("LINESTRING(1 2,3 4)", 4, 6);
+
+ // polygon will only be outer-ring
+ test_geometry<bg::model::polygon<P> >("POLYGON((1 2,3 4))", 4, 6);
+ test_geometry<bg::model::polygon<P> >("POLYGON((1 2,3 4),(5 6,7 8,9 10))", 4, 6);
+
+ // the utility is useful for:
+ // - convex hull (holes do not count)
+ // - envelope (idem)
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/detail/calculate_point_order.cpp b/src/boost/libs/geometry/test/algorithms/detail/calculate_point_order.cpp
new file mode 100644
index 000000000..45ae3380b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/calculate_point_order.cpp
@@ -0,0 +1,148 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/calculate_point_order.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/strategies/cartesian/point_order.hpp>
+#include <boost/geometry/strategies/geographic/point_order.hpp>
+#include <boost/geometry/strategies/spherical/point_order.hpp>
+
+
+inline const char * order_str(bg::order_selector o)
+{
+ if (o == bg::clockwise)
+ return "clockwise";
+ else if (o == bg::counterclockwise)
+ return "counterclockwise";
+ else
+ return "order_undetermined";
+}
+
+inline const char * cs_str(bg::cartesian_tag)
+{
+ return "cartesian";
+}
+
+inline const char * cs_str(bg::spherical_equatorial_tag)
+{
+ return "spherical_equatorial";
+}
+
+inline const char * cs_str(bg::geographic_tag)
+{
+ return "geographic";
+}
+
+template <typename Ring>
+inline void test_one(Ring const& ring, bg::order_selector expected)
+{
+ typedef typename bg::cs_tag<Ring>::type cs_tag;
+
+ bg::order_selector result = bg::detail::calculate_point_order(ring);
+
+ BOOST_CHECK_MESSAGE(result == expected, "Expected: " << order_str(expected) << " for " << bg::wkt(ring) << " in " << cs_str(cs_tag()));
+
+ if (expected != bg::order_undetermined && result != bg::order_undetermined)
+ {
+ Ring ring_rev = ring;
+
+ std::reverse(boost::begin(ring_rev), boost::end(ring_rev));
+
+ bg::order_selector result_rev = bg::detail::calculate_point_order(ring_rev);
+
+ BOOST_CHECK_MESSAGE(result != result_rev, "Invalid order of reversed: " << bg::wkt(ring) << " in " << cs_str(cs_tag()));
+ }
+}
+
+template <typename P>
+inline void test_one(std::string const& ring_wkt, bg::order_selector expected)
+{
+ //typedef typename bg::cs_tag<P>::type cs_tag;
+
+ bg::model::ring<P> ring;
+ bg::read_wkt(ring_wkt, ring);
+
+ std::size_t n = boost::size(ring);
+ for (size_t i = 1; i < n; ++i)
+ {
+ test_one(ring, expected);
+ std::rotate(boost::begin(ring), boost::begin(ring) + 1, boost::end(ring));
+
+ // it seems that area method doesn't work for invalid "opened" polygons
+ //if (! boost::is_same<cs_tag, bg::geographic_tag>::value)
+ {
+ P p = bg::range::front(ring);
+ bg::range::push_back(ring, p);
+ }
+ }
+}
+
+template <typename P>
+void test_all()
+{
+ // From correct() test, rings rotated and reversed in test_one()
+ test_one<P>("POLYGON((0 0,0 1,1 1,1 0,0 0))", bg::clockwise);
+ test_one<P>("POLYGON((0 0,0 1,1 1,1 0))", bg::clockwise);
+ test_one<P>("POLYGON((0 0,0 4,4 4,4 0,0 0))", bg::clockwise);
+ test_one<P>("POLYGON((1 1,2 1,2 2,1 2,1 1))", bg::counterclockwise);
+
+ test_one<P>("POLYGON((0 5, 5 5, 5 0, 0 0, 0 5))", bg::clockwise);
+ test_one<P>("POLYGON((0 5, 0 5, 0 6, 0 6, 0 4, 0 5, 5 5, 5 0, 0 0, 0 6, 0 5))", bg::clockwise);
+ test_one<P>("POLYGON((2 0, 2 1, 2 -1, 2 0, 1 0, 1 -1, 0 -1, 0 1, 1 1, 1 0, 2 0))", bg::clockwise);
+ test_one<P>("POLYGON((2 0, 2 1, 2 -1, 2 0, 1 0, 1 -1, 0 -1, 0 1, 1 1, 1 0))", bg::clockwise);
+ test_one<P>("POLYGON((2 0, 2 1, 3 1, 3 -1, 2 -1, 2 0, 1 0, 1 -1, 0 -1, 0 1, 1 1, 1 0, 2 0))", bg::clockwise);
+ test_one<P>("POLYGON((0 85, 5 85, 5 84, 0 84, 0 85))", bg::clockwise);
+ test_one<P>("POLYGON((0 2, 170 2, 170 0, 0 0, 0 2))", bg::clockwise);
+ test_one<P>("POLYGON((0 2, 170 2, 170 1, 160 1, 10 1, 0 1, 0 2))", bg::clockwise);
+ test_one<P>("POLYGON((0 2, 170 2, 170 -2, 0 -2, 0 2))", bg::clockwise);
+ test_one<P>("POLYGON((5 5, 6 5, 6 6, 6 4, 6 5, 5 5, 5 4, 4 4, 4 6, 5 6, 5 5))", bg::clockwise);
+ test_one<P>("POLYGON((5 5, 6 5, 6 6, 6 4, 6 5, 5 5, 5 6, 4 6, 4 4, 5 4, 5 5))", bg::counterclockwise);
+ test_one<P>("POLYGON((5 5, 6 5, 6 5, 6 6, 6 5, 6 4, 6 5, 6 5, 5 5, 5 4, 4 4, 4 6, 5 6, 5 5))", bg::clockwise);
+
+ // https://github.com/boostorg/geometry/pull/554
+ test_one<P>("POLYGON((9.8591674311151110 54.602813224425063, 9.8591651519791412 54.602359676428932, 9.8584586199249316 54.602359676428932, 9.8591674311151110 54.602813224425063))",
+ bg::clockwise);
+}
+
+template <typename P>
+void test_cartesian()
+{
+ test_one<P>("POLYGON((0 5, 1 5, 1 6, 1 4, 2 4, 0 4, 0 3, 0 5))", bg::clockwise);
+}
+
+template <typename P>
+void test_spheroidal()
+{
+ test_one<P>("POLYGON((0 5, 1 5, 1 6, 1 4, 0 4, 0 3, 0 5))", bg::clockwise);
+
+ test_one<P>("POLYGON((0 45, 120 45, -120 45, 0 45))", bg::counterclockwise);
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+ test_cartesian<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_spheroidal<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_spheroidal<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/detail/partition.cpp b/src/boost/libs/geometry/test/algorithms/detail/partition.cpp
new file mode 100644
index 000000000..9d63668d8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/partition.cpp
@@ -0,0 +1,675 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+//
+// This file was modified by Oracle on 2017, 2018.
+// Modifications copyright (c) 2017-2018 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <algorithms/test_overlay.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+
+#include <boost/geometry/algorithms/detail/partition.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+
+
+template <typename Box>
+struct box_item
+{
+ int id;
+ Box box;
+ box_item(int i = 0, std::string const& wkt = "")
+ : id(i)
+ {
+ if (! wkt.empty())
+ {
+ bg::read_wkt(wkt, box);
+ }
+ }
+};
+
+
+struct get_box
+{
+ template <typename Box, typename InputItem>
+ static inline void apply(Box& total, InputItem const& item)
+ {
+ bg::expand(total, item.box);
+ }
+};
+
+struct ovelaps_box
+{
+ template <typename Box, typename InputItem>
+ static inline bool apply(Box const& box, InputItem const& item)
+ {
+ typename bg::strategy::disjoint::services::default_strategy
+ <
+ Box, Box
+ >::type strategy;
+
+ return ! bg::detail::disjoint::disjoint_box_box(box, item.box, strategy);
+ }
+};
+
+
+template <typename Box>
+struct box_visitor
+{
+ int count;
+ typename bg::default_area_result<Box>::type area;
+
+ box_visitor()
+ : count(0)
+ , area(0)
+ {}
+
+ template <typename Item>
+ inline bool apply(Item const& item1, Item const& item2)
+ {
+ if (bg::intersects(item1.box, item2.box))
+ {
+ Box b;
+ bg::intersection(item1.box, item2.box, b);
+ area += bg::area(b);
+ count++;
+ }
+ return true;
+ }
+};
+
+struct point_in_box_visitor
+{
+ int count;
+
+ point_in_box_visitor()
+ : count(0)
+ {}
+
+ template <typename Point, typename BoxItem>
+ inline bool apply(Point const& point, BoxItem const& box_item)
+ {
+ if (bg::within(point, box_item.box))
+ {
+ count++;
+ }
+ return true;
+ }
+};
+
+struct reversed_point_in_box_visitor
+{
+ int count;
+
+ reversed_point_in_box_visitor()
+ : count(0)
+ {}
+
+ template <typename BoxItem, typename Point>
+ inline bool apply(BoxItem const& box_item, Point const& point)
+ {
+ if (bg::within(point, box_item.box))
+ {
+ count++;
+ }
+ return true;
+ }
+};
+
+
+
+template <typename Box>
+void test_boxes(std::string const& wkt_box_list, double expected_area, int expected_count)
+{
+ std::vector<std::string> wkt_boxes;
+
+ boost::split(wkt_boxes, wkt_box_list, boost::is_any_of(";"), boost::token_compress_on);
+
+ typedef box_item<Box> sample;
+ std::vector<sample> boxes;
+
+ int index = 1;
+ BOOST_FOREACH(std::string const& wkt, wkt_boxes)
+ {
+ boxes.push_back(sample(index++, wkt));
+ }
+
+ box_visitor<Box> visitor;
+ bg::partition
+ <
+ Box
+ >::apply(boxes, visitor, get_box(), ovelaps_box(), 1);
+
+ BOOST_CHECK_CLOSE(visitor.area, expected_area, 0.001);
+ BOOST_CHECK_EQUAL(visitor.count, expected_count);
+}
+
+
+
+struct point_item
+{
+ point_item()
+ : id(0)
+ {}
+
+ int id;
+ double x;
+ double y;
+};
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(point_item, double, cs::cartesian, x, y)
+
+
+struct get_point
+{
+ template <typename Box, typename InputItem>
+ static inline void apply(Box& total, InputItem const& item)
+ {
+ bg::expand(total, item);
+ }
+};
+
+struct ovelaps_point
+{
+ template <typename Box, typename InputItem>
+ static inline bool apply(Box const& box, InputItem const& item)
+ {
+ return ! bg::disjoint(item, box);
+ }
+};
+
+
+struct point_visitor
+{
+ int count;
+
+ point_visitor()
+ : count(0)
+ {}
+
+ template <typename Item>
+ inline bool apply(Item const& item1, Item const& item2)
+ {
+ if (bg::equals(item1, item2))
+ {
+ count++;
+ }
+ return true;
+ }
+};
+
+
+
+void test_points(std::string const& wkt1, std::string const& wkt2, int expected_count)
+{
+ bg::model::multi_point<point_item> mp1, mp2;
+ bg::read_wkt(wkt1, mp1);
+ bg::read_wkt(wkt2, mp2);
+
+ int id = 1;
+ BOOST_FOREACH(point_item& p, mp1)
+ { p.id = id++; }
+ id = 1;
+ BOOST_FOREACH(point_item& p, mp2)
+ { p.id = id++; }
+
+ point_visitor visitor;
+ bg::partition
+ <
+ bg::model::box<point_item>
+ >::apply(mp1, mp2, visitor, get_point(), ovelaps_point(),
+ get_point(), ovelaps_point(), 1);
+
+ BOOST_CHECK_EQUAL(visitor.count, expected_count);
+}
+
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::box<P> box;
+
+ test_boxes<box>(
+ // 1 2 3 4 5 6 7
+ "box(0 0,1 1); box(0 0,2 2); box(9 9,10 10); box(8 8,9 9); box(4 4,6 6); box(2 4,6 8); box(7 1,8 2)",
+ 5, // Area(Intersection(1,2)) + A(I(5,6))
+ 3);
+
+ test_boxes<box>(
+ "box(0 0,10 10); box(4 4,6 6); box(3 3,7 7)",
+ 4 + 16 + 4, // A(I(1,2)) + A(I(1,3)) + A(I(2,3))
+ 3);
+
+ test_boxes<box>(
+ "box(0 2,10 3); box(3 1,4 5); box(7 1,8 5)",
+ 1 + 1, // A(I(1,2)) + A(I(1,3))
+ 2);
+
+ test_points("multipoint((1 1))", "multipoint((1 1))", 1);
+ test_points("multipoint((0 0),(1 1),(7 3),(10 10))", "multipoint((1 1),(2 2),(7 3))", 2);
+
+}
+
+//------------------- higher volumes
+
+#if defined(TEST_WITH_SVG)
+template <typename SvgMapper>
+struct svg_visitor
+{
+ SvgMapper& m_mapper;
+
+ svg_visitor(SvgMapper& mapper)
+ : m_mapper(mapper)
+ {}
+
+ template <typename Box>
+ inline void apply(Box const& box, int level)
+ {
+ /*
+ std::string color("rgb(64,64,64)");
+ switch(level)
+ {
+ case 0 : color = "rgb(255,0,0)"; break;
+ case 1 : color = "rgb(0,255,0)"; break;
+ case 2 : color = "rgb(0,0,255)"; break;
+ case 3 : color = "rgb(255,255,0)"; break;
+ case 4 : color = "rgb(255,0,255)"; break;
+ case 5 : color = "rgb(0,255,255)"; break;
+ case 6 : color = "rgb(255,128,0)"; break;
+ case 7 : color = "rgb(0,128,255)"; break;
+ }
+ std::ostringstream style;
+ style << "fill:none;stroke-width:" << (5.0 - level / 2.0) << ";stroke:" << color << ";";
+ m_mapper.map(box, style.str());
+ */
+ m_mapper.map(box, "fill:none;stroke-width:2;stroke:rgb(0,0,0);");
+
+ }
+};
+#endif
+
+
+template <typename Collection>
+void fill_points(Collection& collection, int seed, int size, int count)
+{
+ typedef boost::minstd_rand base_generator_type;
+
+ base_generator_type generator(seed);
+
+ boost::uniform_int<> random_coordinate(0, size - 1);
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ coordinate_generator(generator, random_coordinate);
+
+ std::set<std::pair<int, int> > included;
+
+ int n = 0;
+ for (int i = 0; n < count && i < count*count; i++)
+ {
+ int x = coordinate_generator();
+ int y = coordinate_generator();
+ std::pair<int, int> pair = std::make_pair(x, y);
+ if (included.find(pair) == included.end())
+ {
+ included.insert(pair);
+ typename boost::range_value<Collection>::type item;
+ item.x = x;
+ item.y = y;
+ collection.push_back(item);
+ n++;
+ }
+ }
+}
+
+void test_many_points(int seed, int size, int count)
+{
+ bg::model::multi_point<point_item> mp1, mp2;
+
+ fill_points(mp1, seed, size, count);
+ fill_points(mp2, seed * 2, size, count);
+
+ // Test equality in quadratic loop
+ int expected_count = 0;
+ BOOST_FOREACH(point_item const& item1, mp1)
+ {
+ BOOST_FOREACH(point_item const& item2, mp2)
+ {
+ if (bg::equals(item1, item2))
+ {
+ expected_count++;
+ }
+ }
+ }
+
+#if defined(TEST_WITH_SVG)
+ std::ostringstream filename;
+ filename << "partition" << seed << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_item> mapper(svg, 800, 800);
+
+ {
+ point_item p;
+ p.x = -1; p.y = -1; mapper.add(p);
+ p.x = size + 1; p.y = size + 1; mapper.add(p);
+ }
+
+ typedef svg_visitor<bg::svg_mapper<point_item> > box_visitor_type;
+ box_visitor_type box_visitor(mapper);
+#else
+ typedef bg::detail::partition::visit_no_policy box_visitor_type;
+ box_visitor_type box_visitor;
+#endif
+
+ point_visitor visitor;
+ bg::partition
+ <
+ bg::model::box<point_item>,
+ bg::detail::partition::include_all_policy,
+ bg::detail::partition::include_all_policy
+ >::apply(mp1, mp2, visitor, get_point(), ovelaps_point(),
+ get_point(), ovelaps_point(), 2, box_visitor);
+
+ BOOST_CHECK_EQUAL(visitor.count, expected_count);
+
+#if defined(TEST_WITH_SVG)
+ BOOST_FOREACH(point_item const& item, mp1)
+ {
+ mapper.map(item, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 8);
+ }
+ BOOST_FOREACH(point_item const& item, mp2)
+ {
+ mapper.map(item, "fill:rgb(0,128,255);stroke:rgb(0,0,100);stroke-width:1", 4);
+ }
+#endif
+}
+
+template <typename Collection>
+void fill_boxes(Collection& collection, int seed, int size, int count)
+{
+ typedef boost::minstd_rand base_generator_type;
+
+ base_generator_type generator(seed);
+
+ boost::uniform_int<> random_coordinate(0, size * 10 - 1);
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ coordinate_generator(generator, random_coordinate);
+
+ int n = 0;
+ for (int i = 0; n < count && i < count*count; i++)
+ {
+ int w = coordinate_generator() % 30;
+ int h = coordinate_generator() % 30;
+ if (w > 0 && h > 0)
+ {
+ int x = coordinate_generator();
+ int y = coordinate_generator();
+ if (x + w < size * 10 && y + h < size * 10)
+ {
+ typename boost::range_value<Collection>::type item(n+1);
+ bg::assign_values(item.box, x / 10.0, y / 10.0, (x + w) / 10.0, (y + h) / 10.0);
+ collection.push_back(item);
+ n++;
+ }
+ }
+ }
+}
+
+void test_many_boxes(int seed, int size, int count)
+{
+ typedef bg::model::box<point_item> box_type;
+ std::vector<box_item<box_type> > boxes;
+
+ fill_boxes(boxes, seed, size, count);
+
+ // Test equality in quadratic loop
+ int expected_count = 0;
+ double expected_area = 0.0;
+ BOOST_FOREACH(box_item<box_type> const& item1, boxes)
+ {
+ BOOST_FOREACH(box_item<box_type> const& item2, boxes)
+ {
+ if (item1.id < item2.id)
+ {
+ if (bg::intersects(item1.box, item2.box))
+ {
+ box_type b;
+ bg::intersection(item1.box, item2.box, b);
+ expected_area += bg::area(b);
+ expected_count++;
+ }
+ }
+ }
+ }
+
+
+#if defined(TEST_WITH_SVG)
+ std::ostringstream filename;
+ filename << "partition_box_" << seed << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_item> mapper(svg, 800, 800);
+
+ {
+ point_item p;
+ p.x = -1; p.y = -1; mapper.add(p);
+ p.x = size + 1; p.y = size + 1; mapper.add(p);
+ }
+
+ BOOST_FOREACH(box_item<box_type> const& item, boxes)
+ {
+ mapper.map(item.box, "opacity:0.6;fill:rgb(50,50,210);stroke:rgb(0,0,0);stroke-width:1");
+ }
+
+ typedef svg_visitor<bg::svg_mapper<point_item> > partition_box_visitor_type;
+ partition_box_visitor_type partition_box_visitor(mapper);
+
+#else
+ typedef bg::detail::partition::visit_no_policy partition_box_visitor_type;
+ partition_box_visitor_type partition_box_visitor;
+#endif
+
+ box_visitor<box_type> visitor;
+ bg::partition
+ <
+ box_type,
+ bg::detail::partition::include_all_policy,
+ bg::detail::partition::include_all_policy
+ >::apply(boxes, visitor, get_box(), ovelaps_box(),
+ 2, partition_box_visitor);
+
+ BOOST_CHECK_EQUAL(visitor.count, expected_count);
+ BOOST_CHECK_CLOSE(visitor.area, expected_area, 0.001);
+}
+
+void test_two_collections(int seed1, int seed2, int size, int count)
+{
+ typedef bg::model::box<point_item> box_type;
+ std::vector<box_item<box_type> > boxes1, boxes2;
+
+ fill_boxes(boxes1, seed1, size, count);
+ fill_boxes(boxes2, seed2, size, count);
+
+ // Get expectations in quadratic loop
+ int expected_count = 0;
+ double expected_area = 0.0;
+ BOOST_FOREACH(box_item<box_type> const& item1, boxes1)
+ {
+ BOOST_FOREACH(box_item<box_type> const& item2, boxes2)
+ {
+ if (bg::intersects(item1.box, item2.box))
+ {
+ box_type b;
+ bg::intersection(item1.box, item2.box, b);
+ expected_area += bg::area(b);
+ expected_count++;
+ }
+ }
+ }
+
+
+#if defined(TEST_WITH_SVG)
+ std::ostringstream filename;
+ filename << "partition_boxes_" << seed1 << "_" << seed2 << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_item> mapper(svg, 800, 800);
+
+ {
+ point_item p;
+ p.x = -1; p.y = -1; mapper.add(p);
+ p.x = size + 1; p.y = size + 1; mapper.add(p);
+ }
+
+ BOOST_FOREACH(box_item<box_type> const& item, boxes1)
+ {
+ mapper.map(item.box, "opacity:0.6;fill:rgb(50,50,210);stroke:rgb(0,0,0);stroke-width:1");
+ }
+ BOOST_FOREACH(box_item<box_type> const& item, boxes2)
+ {
+ mapper.map(item.box, "opacity:0.6;fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:1");
+ }
+
+ typedef svg_visitor<bg::svg_mapper<point_item> > partition_box_visitor_type;
+ partition_box_visitor_type partition_box_visitor(mapper);
+#else
+ typedef bg::detail::partition::visit_no_policy partition_box_visitor_type;
+ partition_box_visitor_type partition_box_visitor;
+#endif
+
+ box_visitor<box_type> visitor;
+ bg::partition
+ <
+ box_type,
+ bg::detail::partition::include_all_policy,
+ bg::detail::partition::include_all_policy
+ >::apply(boxes1, boxes2, visitor, get_box(), ovelaps_box(),
+ get_box(), ovelaps_box(), 2, partition_box_visitor);
+
+ BOOST_CHECK_EQUAL(visitor.count, expected_count);
+ BOOST_CHECK_CLOSE(visitor.area, expected_area, 0.001);
+}
+
+
+void test_heterogenuous_collections(int seed1, int seed2, int size, int count)
+{
+ typedef bg::model::box<point_item> box_type;
+ std::vector<point_item> points;
+ std::vector<box_item<box_type> > boxes;
+
+ fill_points(points, seed1, size, count);
+ fill_boxes(boxes, seed2, size, count);
+
+ // Get expectations in quadratic loop
+ int expected_count = 0;
+ BOOST_FOREACH(point_item const& point, points)
+ {
+ BOOST_FOREACH(box_item<box_type> const& box_item, boxes)
+ {
+ if (bg::within(point, box_item.box))
+ {
+ expected_count++;
+ }
+ }
+ }
+
+
+#if defined(TEST_WITH_SVG)
+ std::ostringstream filename;
+ filename << "partition_heterogeneous_" << seed1 << "_" << seed2 << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_item> mapper(svg, 800, 800);
+
+ {
+ point_item p;
+ p.x = -1; p.y = -1; mapper.add(p);
+ p.x = size + 1; p.y = size + 1; mapper.add(p);
+ }
+
+ BOOST_FOREACH(point_item const& point, points)
+ {
+ mapper.map(point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 8);
+ }
+ BOOST_FOREACH(box_item<box_type> const& item, boxes)
+ {
+ mapper.map(item.box, "opacity:0.6;fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:1");
+ }
+
+ typedef svg_visitor<bg::svg_mapper<point_item> > partition_box_visitor_type;
+ partition_box_visitor_type partition_box_visitor(mapper);
+#else
+ typedef bg::detail::partition::visit_no_policy partition_box_visitor_type;
+ partition_box_visitor_type partition_box_visitor;
+#endif
+
+ point_in_box_visitor visitor1;
+ bg::partition
+ <
+ box_type,
+ bg::detail::partition::include_all_policy,
+ bg::detail::partition::include_all_policy
+ >::apply(points, boxes, visitor1, get_point(), ovelaps_point(),
+ get_box(), ovelaps_box(), 2, partition_box_visitor);
+
+ reversed_point_in_box_visitor visitor2;
+ bg::partition
+ <
+ box_type,
+ bg::detail::partition::include_all_policy,
+ bg::detail::partition::include_all_policy
+ >::apply(boxes, points, visitor2, get_box(), ovelaps_box(),
+ get_point(), ovelaps_point(), 2, partition_box_visitor);
+
+ BOOST_CHECK_EQUAL(visitor1.count, expected_count);
+ BOOST_CHECK_EQUAL(visitor2.count, expected_count);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+ test_many_points(12345, 20, 40);
+ test_many_points(54321, 20, 60);
+ test_many_points(67890, 20, 80);
+ test_many_points(98765, 20, 100);
+ for (int i = 1; i < 10; i++)
+ {
+ test_many_points(i, 30, i * 20);
+ }
+
+ test_many_boxes(12345, 20, 40);
+ for (int i = 1; i < 10; i++)
+ {
+ test_many_boxes(i, 20, i * 10);
+ }
+
+ test_two_collections(12345, 54321, 20, 40);
+ test_two_collections(67890, 98765, 20, 60);
+
+ test_heterogenuous_collections(67890, 98765, 20, 60);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/detail/sections/Jamfile b/src/boost/libs/geometry/test/algorithms/detail/sections/Jamfile
new file mode 100644
index 000000000..ff2d3e1e1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/sections/Jamfile
@@ -0,0 +1,20 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2015.
+# Modifications copyright (c) 2015 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-detail-sections
+ :
+ [ run sectionalize.cpp : : : : algorithms_sectionalize ]
+ [ run range_by_section.cpp : : : : algorithms_range_by_section ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/detail/sections/range_by_section.cpp b/src/boost/libs/geometry/test/algorithms/detail/sections/range_by_section.cpp
new file mode 100644
index 000000000..1263ba5ed
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/sections/range_by_section.cpp
@@ -0,0 +1,105 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#define BOOST_GEOMETRY_UNIT_TEST_SECTIONALIZE
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
+#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
+#include <boost/geometry/views/detail/range_type.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/util/condition.hpp>
+
+
+template <int DimensionCount, bool Reverse, typename Geometry>
+void test_sectionalize(std::string const /*caseid*/, Geometry const& geometry, std::size_t section_count)
+{
+ typedef typename bg::point_type<Geometry>::type point;
+ typedef bg::model::box<point> box;
+ typedef bg::sections<box, DimensionCount> sections;
+
+ typedef boost::mpl::vector_c<std::size_t, 0> dim2;
+
+ sections s;
+ bg::sectionalize<Reverse, dim2>(geometry, bg::detail::no_rescale_policy(), s);
+
+ BOOST_CHECK_EQUAL(s.size(), section_count);
+
+ typedef typename bg::closeable_view
+ <
+ typename bg::detail::range_type<Geometry>::type const,
+ bg::closure<Geometry>::value
+ >::type cview_type;
+ typedef typename bg::reversible_view
+ <
+ cview_type const,
+ Reverse ? bg::iterate_reverse : bg::iterate_forward
+ >::type view_type;
+ typedef typename boost::range_iterator
+ <
+ view_type const
+ >::type range_iterator;
+
+ BOOST_FOREACH(typename sections::value_type const& sec, s)
+ {
+ cview_type cview(bg::range_by_section(geometry, sec));
+ view_type view(cview);
+ range_iterator it1 = boost::begin(view) + sec.begin_index;
+ range_iterator it2 = boost::begin(view) + sec.end_index;
+ int count = 0;
+ for (range_iterator it = it1; it != it2; ++it)
+ {
+ count++;
+ }
+ BOOST_CHECK_EQUAL(int(sec.count), count);
+ }
+}
+
+template <typename Geometry, bool Reverse>
+void test_sectionalize(std::string const& caseid, std::string const& wkt,
+ std::size_t count1)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ if ( BOOST_GEOMETRY_CONDITION( bg::closure<Geometry>::value == bg::open ) )
+ {
+ geometry.outer().resize(geometry.outer().size() - 1);
+ }
+ //bg::correct(geometry);
+ test_sectionalize<1, Reverse>(caseid + "_d1", geometry, count1);
+}
+
+template <typename P>
+void test_all()
+{
+ std::string const first = "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0, 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))";
+ test_sectionalize<bg::model::polygon<P>, false>("first", first, 4);
+
+ test_sectionalize<bg::model::polygon<P, false>, true>("first_reverse",
+ first, 4);
+
+ test_sectionalize<bg::model::polygon<P, false, true>, false>("first_open",
+ first, 4);
+
+ test_sectionalize<bg::model::polygon<P, true, false>, true>("first_open_reverse",
+ first, 4);
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/detail/sections/sectionalize.cpp b/src/boost/libs/geometry/test/algorithms/detail/sections/sectionalize.cpp
new file mode 100644
index 000000000..dd4050bf0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/sections/sectionalize.cpp
@@ -0,0 +1,363 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+
+#include <test_common/test_point.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+# include <boost/geometry/algorithms/buffer.hpp>
+# include <boost/geometry/algorithms/centroid.hpp>
+#endif
+
+template <int DimensionCount, typename Geometry>
+void test_sectionalize_part()
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+ typedef bg::model::box<point_type> box_type;
+
+ typedef bg::sections<box_type, DimensionCount> sections_type;
+ typedef typename boost::range_value<sections_type>::type section_type;
+
+ typedef boost::mpl::vector_c<std::size_t, 0> dimension_list;
+
+ typedef bg::detail::sectionalize::sectionalize_part
+ <
+ point_type, dimension_list
+ > sectionalize_part;
+
+ sections_type sections;
+ section_type section;
+
+
+ Geometry geometry;
+ geometry.push_back(bg::make<point_type>(1, 1));
+
+ bg::detail::no_rescale_policy rescale_policy;
+
+ bg::ring_identifier ring_id;
+ sectionalize_part::apply(sections, geometry.begin(), geometry.end(), rescale_policy, ring_id, 10);
+ // There should not yet be anything generated, because it is only ONE point
+
+ geometry.push_back(bg::make<point_type>(2, 2));
+ sectionalize_part::apply(sections, geometry.begin(), geometry.end(), rescale_policy, ring_id, 10);
+}
+
+
+template <typename DimensionVector, bool Reverse, typename G>
+void test_sectionalize(std::string const& caseid, G const& g, std::size_t section_count,
+ std::string const& index_check, std::string const& dir_check,
+ std::size_t max_count = 10)
+{
+ boost::ignore_unused(caseid);
+
+ static const std::size_t dimension_count = boost::mpl::size<DimensionVector>::value;
+
+
+ typedef typename bg::point_type<G>::type point;
+ typedef bg::model::box<point> box;
+ typedef bg::sections<box, dimension_count> sections;
+
+ sections s;
+ bg::sectionalize<Reverse, DimensionVector>(g,
+ bg::detail::no_rescale_policy(), s, 0, max_count);
+
+ BOOST_CHECK_EQUAL(s.size(), section_count);
+
+ // Check if sections are consecutive and consistent
+ int previous_index = -1;
+ BOOST_FOREACH(typename sections::value_type const& sec, s)
+ {
+ if (sec.begin_index > 0)
+ {
+ BOOST_CHECK_EQUAL(previous_index, sec.begin_index);
+ }
+ BOOST_CHECK_EQUAL(int(sec.count), int(sec.end_index - sec.begin_index));
+ previous_index = sec.end_index;
+ }
+
+ // Output streams for sections, boxes, other
+ std::ostringstream out_sections;
+ std::ostringstream out_boxes;
+ std::ostringstream out_dirs;
+
+
+ for (typename sections::size_type i = 0; i < s.size(); i++)
+ {
+ box const& b = s[i].bounding_box;
+
+ if (i > 0)
+ {
+ out_sections << "|";
+ out_dirs << "|";
+ out_boxes << "|";
+ }
+
+ out_sections << s[i].begin_index << ".." << s[i].end_index;
+ out_boxes << bg::get<0,0>(b) << " " << bg::get<0,1>(b)
+ << ".." << bg::get<1,0>(b) << " " << bg::get<1,1>(b);
+ for (std::size_t d = 0; d < dimension_count; d++)
+ {
+ out_dirs << (d == 0 ? "" : " ");
+ switch(s[i].directions[d])
+ {
+ case -99: out_dirs << "DUP"; break;
+ case -1 : out_dirs << "-"; break;
+ case 0 : out_dirs << "."; break;
+ case +1 : out_dirs << "+"; break;
+ }
+ }
+ }
+
+ if (! index_check.empty())
+ {
+ BOOST_CHECK_EQUAL(out_sections.str(), index_check);
+ }
+ if (! dir_check.empty())
+ {
+ BOOST_CHECK_EQUAL(out_dirs.str(), dir_check);
+ }
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "sectionalize_"
+ << caseid << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ typedef typename bg::point_type<G>::type point_type;
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ mapper.add(g);
+
+ static const bool is_line = bg::geometry_id<G>::type::value == 2;
+ mapper.map(g, is_line
+ ? "opacity:0.6;stroke:rgb(0,0,255);stroke-width:5"
+ : "opacity:0.6;fill:rgb(0,0,255);stroke:rgb(0,0,0);stroke-width:0.5");
+
+
+ for (typename sections::size_type i = 0; i < s.size(); i++)
+ {
+ box b = s[i].bounding_box;
+ bg::buffer(b, b, 0.01);
+ mapper.map(b, s[i].duplicate
+ ? "fill-opacity:0.4;stroke-opacity:0.6;fill:rgb(0,128,0);stroke:rgb(0,255,0);stroke-width:2.0"
+ : "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,0,0);stroke:rgb(255,0,0);stroke-width:0.5");
+
+ std::ostringstream out;
+
+ for (int d = 0; d < dimension_count; d++)
+ {
+ out << (d == 0 ? "[" : " ");
+ switch(s[i].directions[d])
+ {
+ case -99: out << "DUP"; break;
+ case -1 : out << "-"; break;
+ case 0 : out << "."; break;
+ case +1 : out << "+"; break;
+ }
+ }
+ out << "] " << s[i].begin_index << ".." << s[i].end_index;
+
+
+ point_type p;
+ bg::centroid(b, p);
+ mapper.text(p, out.str(), "");
+ }
+ }
+#endif
+
+}
+
+template <typename G, bool Reverse>
+void test_sectionalize(std::string const& caseid, std::string const& wkt,
+ std::size_t count2, std::string const& s2, std::string const d2,
+ std::size_t count1, std::string const& s1, std::string const d1,
+ std::size_t max_count = 10)
+{
+ G g;
+ bg::read_wkt(wkt, g);
+
+ typedef boost::mpl::vector_c<std::size_t, 0, 1> dim2;
+ typedef boost::mpl::vector_c<std::size_t, 0> dim1;
+
+ test_sectionalize<dim2, Reverse>(caseid + "_d2", g, count2, s2, d2, max_count);
+ test_sectionalize<dim1, Reverse>(caseid + "_d1", g, count1, s1, d1, max_count);
+}
+
+template <typename P>
+void test_all()
+{
+ test_sectionalize_part<1, bg::model::linestring<P> >();
+
+ test_sectionalize<bg::model::linestring<P>, false>("ls",
+ "LINESTRING(1 1,2 2,3 0,5 0,5 8)",
+ 4, "0..1|1..2|2..3|3..4", "+ +|+ -|+ .|. +",
+ 2, "0..3|3..4", "+|.");
+
+ // These strings mean:
+ // 0..1|1..2 -> first section: [0, 1] | second section [1, 2], etc
+ // + +|+ - -> X increases, Y increases | X increases, Y decreases
+ // +|. -> (only X considered) X increases | X constant
+
+ test_sectionalize<bg::model::polygon<P>, false>("simplex",
+ "POLYGON((0 0,0 7,4 2,2 0,0 0))",
+ 4, "0..1|1..2|2..3|3..4", ". +|+ -|- -|- .",
+ // . + - - -> 3 sections
+ 3, "0..1|1..2|2..4", ".|+|-");
+
+ // CCW polygon - orientation is not (always) relevant for sections,
+ // they are just generated in the order they come.
+ test_sectionalize<bg::model::polygon<P, false>, false>("simplex_ccw",
+ "POLYGON((0 0,2 0,4 2,0 7,0 0))",
+ 4, "0..1|1..2|2..3|3..4", "+ .|+ +|- +|. -",
+ // . + - - -> 3 sections
+ 3, "0..2|2..3|3..4", "+|-|.");
+
+ // Open polygon - closeness IS relevant for sections, the
+ // last section which is not explicit here should be included.
+ // So results are the same as the pre-previous one.
+ test_sectionalize<bg::model::polygon<P, true, false>, false>("simplex_open",
+ "POLYGON((0 0,0 7,4 2,2 0))",
+ 4, "0..1|1..2|2..3|3..4", ". +|+ -|- -|- .",
+ // . + - - -> 3 sections
+ 3, "0..1|1..2|2..4", ".|+|-");
+
+ test_sectionalize<bg::model::polygon<P>, false>("first",
+ "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0, 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))",
+ 8, "0..2|2..3|3..4|4..5|5..6|6..8|8..10|10..11", "+ +|+ -|+ +|- +|+ +|+ -|- -|- +",
+ 4, "0..4|4..5|5..8|8..11", "+|-|+|-");
+
+ test_sectionalize<bg::model::polygon<P, false>, true>("first_reverse",
+ "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0, 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))",
+ 8, "0..1|1..3|3..5|5..6|6..7|7..8|8..9|9..11", "+ -|+ +|- +|- -|+ -|- -|- +|- -",
+ 4, "0..3|3..6|6..7|7..11", "+|-|+|-");
+
+ test_sectionalize<bg::model::polygon<P>, false>("second",
+ "POLYGON((3 1,2 2,1 3,2 4,3 5,4 4,5 3,4 2,3 1))",
+ 4, "0..2|2..4|4..6|6..8", "- +|+ +|+ -|- -",
+ // - - - + + + + - - -> 3 sections
+ 3, "0..2|2..6|6..8", "-|+|-");
+
+ // With holes
+ test_sectionalize<bg::model::polygon<P>, false>("with_holes",
+ "POLYGON((3 1,2 2,1 3,2 4,3 5,4 4,5 3,4 2,3 1), (3 2,2 2,3 4,3 2))",
+ 7, "0..2|2..4|4..6|6..8|0..1|1..2|2..3", "- +|+ +|+ -|- -|- .|+ +|. -",
+ // - - - + + + + - - - + . -> 6 sections
+ 6, "0..2|2..6|6..8|0..1|1..2|2..3", "-|+|-|-|+|.");
+
+ // With duplicates
+ test_sectionalize<bg::model::linestring<P>, false>("with_dups",
+ "LINESTRING(1 1,2 2,3 0,3 0,5 0,5 8)",
+ 5, "0..1|1..2|2..3|3..4|4..5", "+ +|+ -|DUP DUP|+ .|. +",
+ 4, "0..2|2..3|3..4|4..5", "+|DUP|+|.");
+ // With two subsequent duplicate segments
+ test_sectionalize<bg::model::linestring<P>, false>("with_subseq_dups",
+ "LINESTRING(1 1,2 2,3 0,3 0,3 0,5 0,5 0,5 0,5 0,5 8)",
+ 6, "0..1|1..2|2..4|4..5|5..8|8..9", "+ +|+ -|DUP DUP|+ .|DUP DUP|. +",
+ 5, "0..2|2..4|4..5|5..8|8..9", "+|DUP|+|DUP|.");
+
+
+ typedef bg::model::box<P> B;
+ test_sectionalize<B, false>("box2", "BOX(0 0,4 4)",
+ 4, "0..1|1..2|2..3|3..4", ". +|+ .|. -|- .",
+ 4, "0..1|1..2|2..3|3..4", ".|+|.|-");
+
+ std::string horizontal("POLYGON((0 10,1 8,2 10,3 8,4 10,5 8,6 10,7 8,8 10,9 8,10 10,11 8,12 10,12 5,9 5,9 4,8 4,8 5,7 5,7 4,6 4,6 5,5 5,5 4,4 4,4 5,3 5,3 4,2 4,2 5,1 5,1 4,0 4,0 10))");
+ test_sectionalize<bg::model::polygon<P>, false>("horizontal", horizontal,
+ 33, "", "",
+ 22, "", "", 100);
+ test_sectionalize<bg::model::polygon<P>, false>("horizontal4", horizontal,
+ 33, "", "",
+ 24, "", "", 4);
+
+ std::string vertical("POLYGON((4 0,6 1,4 2,6 3,4 4,6 5,4 6,6 7,4 8,6 9,4 10,10 10,10 9,9 9,9 8,10 8,10 7,9 7,9 6,10 6,10 5,9 5,9 4,10 4,10 3,9 3,9 2,10 2,10 1,9 1,9 0,5 0))");
+ test_sectionalize<bg::model::polygon<P>, false>("vertical", vertical,
+ 31, "", "",
+ 31, "", "", 100);
+
+ {
+ typedef boost::mpl::vector_c<std::size_t, 1> only_y_dim;
+ bg::model::polygon<P> pol;
+ bg::read_wkt(vertical, pol);
+ test_sectionalize<only_y_dim, false>("vertical_y", pol, 22, "", "", 100);
+ }
+
+ return;
+ // Buffer-case
+ test_sectionalize<bg::model::polygon<P>, false>("buffer",
+ "POLYGON((-1.1713 0.937043,2.8287 5.93704,2.90334 6.02339,2.98433 6.10382,2.98433 6.10382,3.07121 6.17786,3.16346 6.24507,3.16346 6.24507,3.16346 6.24507,3.26056 6.30508,3.36193 6.35752,3.36193 6.35752,3.46701 6.40211,3.57517 6.43858,3.57517 6.43858,3.57517 6.43858,3.57517 6.43858,3.68579 6.46672,3.79822 6.48637,3.79822 6.48637,3.91183 6.49741,4.02595 6.49978,4.02595 6.49978,4.02595 6.49978,4.13991 6.49346,4.25307 6.4785,4.25307 6.4785,4.36476 6.45497,4.47434 6.42302,4.47434 6.42302,4.47434 6.42302,4.47434 6.42302,7.47434 5.42302,6.84189 3.52566,4.39043 4.68765,0.390434 -0.312348,-1.1713 0.937043))",
+ 8, "0..2|2..3|3..4|4..5|5..6|6..8|8..10|10..11", "+ +|+ -|+ +|- +|+ +|+ -|- -|- +",
+ 4, "0..4|4..5|5..8|8..11", "+|-|+|-");
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ std::string const polygon_li = "POLYGON((1872000 528000,1872000 192000,1536119 192000,1536000 528000,1200000 528000,1200000 863880,1536000 863880,1872000 863880,1872000 528000))";
+ bg::model::polygon<int_point_type> int_poly;
+ bg::model::polygon<double_point_type> double_poly;
+ bg::read_wkt(polygon_li, int_poly);
+ bg::read_wkt(polygon_li, double_poly);
+
+ typedef boost::mpl::vector_c<std::size_t, 0> dimensions;
+ bg::sections<bg::model::box<int_point_type>, 1> int_sections;
+ bg::sections<bg::model::box<double_point_type>, 1> double_sections;
+
+
+ bg::sectionalize<false, dimensions>(int_poly, bg::detail::no_rescale_policy(), int_sections);
+ bg::sectionalize<false, dimensions>(double_poly, bg::detail::no_rescale_policy(), double_sections);
+
+ bool equally_sized = int_sections.size() == double_sections.size();
+ BOOST_CHECK(equally_sized);
+ if (! equally_sized)
+ {
+ return;
+ }
+
+ for (unsigned int i = 0; i < int_sections.size(); i++)
+ {
+ BOOST_CHECK(int_sections[i].begin_index == double_sections[i].begin_index);
+ BOOST_CHECK(int_sections[i].count == double_sections[i].count);
+ }
+
+}
+
+
+
+int test_main(int, char* [])
+{
+ test_large_integers();
+
+ //test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/detail/tupled_output.cpp b/src/boost/libs/geometry/test/algorithms/detail/tupled_output.cpp
new file mode 100644
index 000000000..3c8659ea1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/detail/tupled_output.cpp
@@ -0,0 +1,116 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/tupled_output.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/util/range.hpp>
+
+namespace bgd = boost::geometry::detail;
+namespace bgt = boost::geometry::tuples;
+namespace bgr = boost::geometry::range;
+
+template <typename MultiPoint>
+void add_points(MultiPoint & mp)
+{
+ typedef typename bg::point_type<MultiPoint>::type point_type;
+
+ bg::range::push_back(mp, point_type(1, 2));
+ bg::range::push_back(mp, point_type(2, 3));
+ bg::range::push_back(mp, point_type(3, 4));
+}
+
+template <typename TupleM, typename TupleS>
+void test_range_values()
+{
+ typedef typename bgd::tupled_range_values<TupleM>::type tuple_s;
+ BOOST_CHECK_EQUAL((boost::is_same<tuple_s, TupleS>::value), true);
+}
+
+template <typename TupleM, typename TupleBI>
+void test_back_inserters()
+{
+ typedef typename bgd::tupled_back_inserters<TupleM>::type tuple_bi;
+ BOOST_CHECK_EQUAL((boost::is_same<tuple_bi, TupleBI>::value), true);
+
+ TupleM tup;
+ bgd::tupled_back_inserters<TupleM>::apply(tup);
+}
+
+template <typename TuplePoLs, typename TupleLsMPt>
+void test_all()
+{
+ BOOST_CHECK_EQUAL((bgd::is_tupled_output<TuplePoLs>::value), false);
+ BOOST_CHECK_EQUAL((bgd::is_tupled_output<TupleLsMPt>::value), true);
+
+ BOOST_CHECK_EQUAL((bgd::tupled_output_has<TuplePoLs, bg::multi_point_tag>::value), false);
+ BOOST_CHECK_EQUAL((bgd::tupled_output_has<TupleLsMPt, bg::multi_point_tag>::value), true);
+
+ BOOST_CHECK_EQUAL((bgd::tupled_output_has<TuplePoLs, bg::multi_polygon_tag>::value), false);
+ BOOST_CHECK_EQUAL((bgd::tupled_output_has<TupleLsMPt, bg::multi_polygon_tag>::value), false);
+
+ TupleLsMPt tup;
+ add_points(bgd::tupled_output_get<bg::multi_point_tag>(tup));
+ BOOST_CHECK_EQUAL((boost::size(bgt::get<1>(tup))), 3u);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+ typedef bg::model::linestring<point> linestring;
+ typedef bg::model::polygon<point> polygon;
+ typedef bg::model::multi_point<point> multi_point;
+ typedef bg::model::multi_linestring<linestring> multi_linestring;
+ //typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ BOOST_CHECK_EQUAL((bgd::is_range<int>::value), false);
+ BOOST_CHECK_EQUAL((bgd::is_range<linestring>::value), true);
+ BOOST_CHECK_EQUAL((bgd::is_range<multi_point>::value), true);
+
+ BOOST_CHECK_EQUAL((bgd::is_tupled_output_element<int>::value), false);
+ BOOST_CHECK_EQUAL((bgd::is_tupled_output_element<linestring>::value), false);
+ BOOST_CHECK_EQUAL((bgd::is_tupled_output_element<multi_point>::value), true);
+
+ test_all<boost::tuple<polygon, linestring>, boost::tuple<linestring, multi_point> >();
+ test_all<std::pair<polygon, linestring>, std::pair<linestring, multi_point> >();
+
+ test_range_values<boost::tuple<multi_linestring, multi_point>,
+ boost::tuples::cons<linestring,
+ boost::tuples::cons<point,
+ boost::tuples::null_type> > >();
+ test_range_values<std::pair<multi_linestring, multi_point>,
+ std::pair<linestring, point> >();
+
+ test_back_inserters<boost::tuple<multi_linestring, multi_point>,
+ boost::tuples::cons<bgr::back_insert_iterator<multi_linestring>,
+ boost::tuples::cons<bgr::back_insert_iterator<multi_point>,
+ boost::tuples::null_type> > >();
+ test_back_inserters<std::pair<multi_linestring, multi_point>,
+ std::pair<bgr::back_insert_iterator<multi_linestring>,
+ bgr::back_insert_iterator<multi_point> > >();
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+
+ test_all<std::tuple<polygon, linestring>, std::tuple<linestring, multi_point> >();
+
+ test_range_values<std::tuple<multi_linestring, multi_point>,
+ std::tuple<linestring, point> >();
+
+ test_back_inserters<std::tuple<multi_linestring, multi_point>,
+ std::tuple<bgr::back_insert_iterator<multi_linestring>,
+ bgr::back_insert_iterator<multi_point> > >();
+
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/Jamfile b/src/boost/libs/geometry/test/algorithms/disjoint/Jamfile
new file mode 100644
index 000000000..6f1c08d9e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/Jamfile
@@ -0,0 +1,30 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016, 2017.
+# Modifications copyright (c) 2014-2017, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-disjoint
+ :
+ [ run disjoint.cpp : : : : algorithms_disjoint ]
+ [ run disjoint_coverage_a_a.cpp : : : : algorithms_disjoint_coverage_a_a ]
+ [ run disjoint_coverage_l_a.cpp : : : : algorithms_disjoint_coverage_l_a ]
+ [ run disjoint_coverage_l_l.cpp : : : : algorithms_disjoint_coverage_l_l ]
+ [ run disjoint_coverage_p_a.cpp : : : : algorithms_disjoint_coverage_p_a ]
+ [ run disjoint_coverage_p_l.cpp : : : : algorithms_disjoint_coverage_p_l ]
+ [ run disjoint_coverage_p_p.cpp : : : : algorithms_disjoint_coverage_p_p ]
+ [ run disjoint_multi.cpp : : : : algorithms_disjoint_multi ]
+ [ run disjoint_point_box_geometry.cpp : : : : algorithms_disjoint_point_box_geometry ]
+ [ run disjoint_seg_box.cpp : : : : algorithms_disjoint_seg_box ]
+ [ run disjoint_sph.cpp : : : : algorithms_disjoint_sph ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint.cpp
new file mode 100644
index 000000000..2d0225daf
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint.cpp
@@ -0,0 +1,165 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_disjoint.hpp"
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <test_common/test_point.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+#include <algorithms/predef_relop.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // Test triangles for polygons/rings, boxes
+ // Note that intersections are tested elsewhere, they don't need
+ // thorough test at this place
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::ring<P> ring;
+
+ // Four times same test with other types
+ test_disjoint<polygon, polygon>("disjoint_simplex_pp", disjoint_simplex[0], disjoint_simplex[1], true);
+ test_disjoint<ring, polygon>("disjoint_simplex_rp", disjoint_simplex[0], disjoint_simplex[1], true);
+ test_disjoint<ring, ring>("disjoint_simplex_rr", disjoint_simplex[0], disjoint_simplex[1], true);
+ test_disjoint<polygon, ring>("disjoint_simplex_pr", disjoint_simplex[0], disjoint_simplex[1], true);
+
+ test_disjoint<polygon, polygon>("ticket_8310a", ticket_8310a[0], ticket_8310a[1], false);
+ test_disjoint<polygon, polygon>("ticket_8310b", ticket_8310b[0], ticket_8310b[1], false);
+ test_disjoint<polygon, polygon>("ticket_8310c", ticket_8310c[0], ticket_8310c[1], false);
+
+ // Testing touch
+ test_disjoint<polygon, polygon>("touch_simplex_pp", touch_simplex[0], touch_simplex[1], false);
+
+ // Test if within(a,b) returns false for disjoint
+ test_disjoint<ring, ring>("within_simplex_rr1", within_simplex[0], within_simplex[1], false);
+ test_disjoint<ring, ring>("within_simplex_rr2", within_simplex[1], within_simplex[0], false);
+
+ // Linear
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::segment<P> segment;
+ test_disjoint<ls, ls>("ls/ls 1", "linestring(0 0,1 1)", "linestring(1 0,0 1)", false);
+ test_disjoint<ls, ls>("ls/ls 2", "linestring(0 0,1 1)", "linestring(1 0,2 1)", true);
+ test_disjoint<segment, segment>("s/s 1", "linestring(0 0,1 1)", "linestring(1 0,0 1)", false);
+ test_disjoint<segment, segment>("s/s 2", "linestring(0 0,1 1)", "linestring(1 0,2 1)", true);
+
+ // Test degenerate segments (patched by Karsten Ahnert on 2012-07-25)
+ test_disjoint<segment, segment>("s/s 3", "linestring(0 0,0 0)", "linestring(1 0,0 1)", true);
+ test_disjoint<segment, segment>("s/s 4", "linestring(0 0,0 0)", "linestring(0 0,0 0)", false);
+ test_disjoint<segment, segment>("s/s 5", "linestring(0 0,0 0)", "linestring(1 0,1 0)", true);
+ test_disjoint<segment, segment>("s/s 6", "linestring(0 0,0 0)", "linestring(0 1,0 1)", true);
+
+ // Collinear opposite
+ test_disjoint<ls, ls>("ls/ls co", "linestring(0 0,2 2)", "linestring(1 1,0 0)", false);
+ // Collinear opposite and equal
+ test_disjoint<ls, ls>("ls/ls co-e", "linestring(0 0,1 1)", "linestring(1 1,0 0)", false);
+
+
+ // Degenerate linestrings
+ {
+ // Submitted by Zachary on the Boost.Geometry Mailing List, on 2012-01-29
+ std::string const a = "linestring(100 10, 0 10)";
+ std::string const b = "linestring(50 10, 50 10)"; // one point only, with same y-coordinate
+ std::string const c = "linestring(100 10, 100 10)"; // idem, at left side
+ test_disjoint<ls, ls>("dls/dls 1", a, b, false);
+ test_disjoint<ls, ls>("dls/dls 2", b, a, false);
+ test_disjoint<segment, segment>("ds/ds 1", a, b, false);
+ test_disjoint<segment, segment>("ds/ds 2", b, a, false);
+ test_disjoint<ls, ls>("dls/dls 1", a, c, false);
+ }
+
+ // Linestrings making angles normally ignored
+ {
+ // These (non-disjoint) cases
+ // correspond to the test "segment_intersection_collinear"
+
+ // Collinear ('a')
+ // a1---------->a2
+ // b1--->b2
+ test_disjoint<ls, ls>("n1", "linestring(2 0,0 6)", "linestring(0 0,2 0)", false);
+
+ // a1---------->a2
+ // b1--->b2
+ test_disjoint<ls, ls>("n7", "linestring(2 0,6 0)", "linestring(6 0,8 0)", false);
+
+ // Collinear - opposite ('f')
+ // a1---------->a2
+ // b2<---b1
+ test_disjoint<ls, ls>("o1", "linestring(2 0,6 0)", "linestring(2 0,0 0)", false);
+ }
+
+ {
+ // Starting in the middle ('s')
+ // b2
+ // ^
+ // |
+ // |
+ // a1--------b1----->a2
+ test_disjoint<ls, ls>("case_s", "linestring(0 0,4 0)", "linestring(2 0,2 2)", false);
+
+ // Collinear, but disjoint
+ test_disjoint<ls, ls>("c-d", "linestring(2 0,6 0)", "linestring(7 0,8 0)", true);
+
+ // Parallel, disjoint
+ test_disjoint<ls, ls>("c-d", "linestring(2 0,6 0)", "linestring(2 1,6 1)", true);
+
+ // Error still there until 1.48 (reported "error", was reported to disjoint, so that's why it did no harm)
+ test_disjoint<ls, ls>("case_recursive_boxes_1",
+ "linestring(10 7,10 6)", "linestring(10 10,10 9)", true);
+
+ }
+
+ // TODO test_disjoint<segment, ls>("s/ls 1", "linestring(0 0,1 1)", "linestring(1 0,0 1)", false);
+ // TODO test_disjoint<segment, ls>("s/ls 2", "linestring(0 0,1 1)", "linestring(1 0,2 1)", true);
+ // TODO test_disjoint<ls, segment>("ls/s 1", "linestring(0 0,1 1)", "linestring(1 0,0 1)", false);
+ // TODO test_disjoint<ls, segment>("ls/s 2", "linestring(0 0,1 1)", "linestring(1 0,2 1)", true);
+
+ // 22.01.2015
+ test_disjoint<ls, ls>("col-op", "LINESTRING(5 5,10 10)", "LINESTRING(6 6,3 3)", false);
+ test_disjoint<ls, ls>("col-op", "LINESTRING(5 5,2 8)", "LINESTRING(4 6,7 3)", false);
+
+ test_disjoint<ls, polygon>("col-op", "LINESTRING(10 10,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_disjoint<ls, polygon>("col-op", "LINESTRING(9 10,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ // assertion failure in 1.57
+ test_disjoint<ls, ls>("point_ll_assert_1_57",
+ "LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ "LINESTRING(31 -97, -46 57, -20 -4)",
+ false);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_a_a.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_a_a.cpp
new file mode 100644
index 000000000..25d6c5d77
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_a_a.cpp
@@ -0,0 +1,387 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_disjoint_coverage
+#endif
+
+// unit test to test disjoint for all geometry combinations
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <from_wkt.hpp>
+
+
+#ifdef HAVE_TTMATH
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+//============================================================================
+
+struct test_disjoint
+{
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ bool expected_result)
+ {
+ bool result = bg::disjoint(geometry1, geometry2);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry1)
+ << ", G2: " << bg::wkt(geometry2) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+ result = bg::disjoint(geometry2, geometry1);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry2)
+ << ", G2: " << bg::wkt(geometry1) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; G1 - G2: ";
+ std::cout << bg::wkt(geometry1) << " - ";
+ std::cout << bg::wkt(geometry2) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "expected/computed result: "
+ << expected_result << " / " << result << std::endl;
+ std::cout << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+};
+
+//============================================================================
+
+// areal-areal geometries
+template <typename P>
+inline void test_box_box()
+{
+ typedef bg::model::box<P> B;
+
+ typedef test_disjoint tester;
+
+ tester::apply("b-b-01",
+ from_wkt<B>("BOX(2 2,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("b-b-02",
+ from_wkt<B>("BOX(1 1,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("b-b-03",
+ from_wkt<B>("BOX(3 3,4 4)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+}
+
+template <typename P>
+inline void test_ring_box()
+{
+ typedef bg::model::box<P> B;
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("r-b-01",
+ from_wkt<B>("BOX(2 2,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("r-b-02",
+ from_wkt<B>("BOX(1 1,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("r-b-03",
+ from_wkt<B>("BOX(3 3,4 4)"),
+ from_wkt<R>("POLYGON((0 0,2 0,2 2,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_polygon_box()
+{
+ typedef bg::model::box<P> B;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("pg-b-01",
+ from_wkt<B>("BOX(2 2,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("pg-b-02",
+ from_wkt<B>("BOX(1 1,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("pg-b-03",
+ from_wkt<B>("BOX(3 3,4 4)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_multipolygon_box()
+{
+ typedef bg::model::box<P> B;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mpg-b-01",
+ from_wkt<B>("BOX(2 2,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("mpg-b-02",
+ from_wkt<B>("BOX(1 1,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("mpg-b-03",
+ from_wkt<B>("BOX(3 3,4 4)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ true);
+}
+
+template <typename P>
+inline void test_ring_ring()
+{
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("r-r-01",
+ from_wkt<R>("POLYGON((2 2,2 3,3 3,3 2))"),
+ from_wkt<R>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("r-r-02",
+ from_wkt<R>("POLYGON((1 1,1 3,3 3,3 1))"),
+ from_wkt<R>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("r-r-03",
+ from_wkt<R>("POLYGON((3 3,3 4,4 4,4 3))"),
+ from_wkt<R>("POLYGON((0 0,2 0,2 2,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_polygon_ring()
+{
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("pg-r-01",
+ from_wkt<R>("POLYGON((2 2,2 3,3 3,3 2))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("pg-r-02",
+ from_wkt<R>("POLYGON((1 1,1 3,3 3,3 1))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("pg-r-03",
+ from_wkt<R>("POLYGON((3 3,3 4,4 4,4 3))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_multipolygon_ring()
+{
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mpg-r-01",
+ from_wkt<R>("POLYGON((2 2,2 3,3 3,3 2))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("mpg-r-02",
+ from_wkt<R>("POLYGON((1 1,1 3,3 3,3 1))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("mpg-r-03",
+ from_wkt<R>("POLYGON((3 3,3 4,4 4,4 3))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ true);
+}
+
+template <typename P>
+inline void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("pg-pg-01",
+ from_wkt<PL>("POLYGON((2 2,2 3,3 3,3 2))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("pg-pg-02",
+ from_wkt<PL>("POLYGON((1 1,1 3,3 3,3 1))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ false);
+
+ tester::apply("pg-pg-03",
+ from_wkt<PL>("POLYGON((3 3,3 4,4 4,4 3))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,2 2,0 2))"),
+ true);
+
+ tester::apply("pg-pg-04",
+ from_wkt<PL>("POLYGON((0 0,9 0,9 9,0 9))"),
+ from_wkt<PL>("POLYGON((3 3,6 3,6 6,3 6))"),
+ false);
+ // polygon with a hole which entirely contains the other polygon
+ tester::apply("pg-pg-05",
+ from_wkt<PL>("POLYGON((0 0,9 0,9 9,0 9),(2 2,2 7,7 7,7 2))"),
+ from_wkt<PL>("POLYGON((3 3,6 3,6 6,3 6))"),
+ true);
+ // polygon with a hole, but the inner ring intersects the other polygon
+ tester::apply("pg-pg-06",
+ from_wkt<PL>("POLYGON((0 0,9 0,9 9,0 9),(3 2,3 7,7 7,7 2))"),
+ from_wkt<PL>("POLYGON((2 3,6 3,6 6,2 6))"),
+ false);
+ // polygon with a hole, but the other polygon is entirely contained
+ // between the inner and outer rings.
+ tester::apply("pg-pg-07",
+ from_wkt<PL>("POLYGON((0 0,9 0,9 9,0 9),(6 2,6 7,7 7,7 2))"),
+ from_wkt<PL>("POLYGON((3 3,5 3,5 6,3 6))"),
+ false);
+ // polygon with a hole and the outer ring of the other polygon lies
+ // between the inner and outer, but without touching either.
+ tester::apply("pg-pg-08",
+ from_wkt<PL>("POLYGON((0 0,9 0,9 9,0 9),(3 3,3 6,6 6,6 3))"),
+ from_wkt<PL>("POLYGON((2 2,7 2,7 7,2 7))"),
+ false);
+
+ {
+ typedef bg::model::polygon<P> PL; // cw, closed
+
+ // https://svn.boost.org/trac/boost/ticket/10647
+ tester::apply("ticket-10647",
+ from_wkt<PL>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0)(1 1, 4 1, 4 4, 1 4, 1 1))"),
+ from_wkt<PL>("POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))"),
+ true);
+ }
+}
+
+template <typename P>
+inline void test_polygon_multipolygon()
+{
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("pg-mpg-01",
+ from_wkt<PL>("POLYGON((2 2,2 3,3 3,3 2))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("pg-mpg-02",
+ from_wkt<PL>("POLYGON((1 1,1 3,3 3,3 1))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("pg-mpg-03",
+ from_wkt<PL>("POLYGON((3 3,3 4,4 4,4 3))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ true);
+}
+
+template <typename P>
+inline void test_multipolygon_multipolygon()
+{
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mpg-mpg-01",
+ from_wkt<MPL>("MULTIPOLYGON(((2 2,2 3,3 3,3 2)))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("mpg-mpg-02",
+ from_wkt<MPL>("MULTIPOLYGON(((1 1,1 3,3 3,3 1)))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ false);
+
+ tester::apply("mpg-mpg-03",
+ from_wkt<MPL>("MULTIPOLYGON(((3 3,3 4,4 4,4 3)))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,2 2,0 2)))"),
+ true);
+}
+
+//============================================================================
+
+template <typename CoordinateType>
+inline void test_areal_areal()
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ test_polygon_polygon<point_type>();
+ test_polygon_multipolygon<point_type>();
+ test_polygon_ring<point_type>();
+ test_polygon_box<point_type>();
+
+ test_multipolygon_multipolygon<point_type>();
+ test_multipolygon_ring<point_type>();
+ test_multipolygon_box<point_type>();
+
+ test_ring_ring<point_type>();
+ test_ring_box<point_type>();
+
+ test_box_box<point_type>();
+}
+
+//============================================================================
+
+BOOST_AUTO_TEST_CASE( test_areal_areal_all )
+{
+ test_areal_areal<double>();
+ test_areal_areal<int>();
+#ifdef HAVE_TTMATH
+ test_areal_areal<ttmath_big>();
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_a.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_a.cpp
new file mode 100644
index 000000000..cb55aaa8d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_a.cpp
@@ -0,0 +1,538 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_disjoint_coverage
+#endif
+
+// unit test to test disjoint for all geometry combinations
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <from_wkt.hpp>
+
+
+#ifdef HAVE_TTMATH
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+//============================================================================
+
+struct test_disjoint
+{
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ bool expected_result)
+ {
+ bool result = bg::disjoint(geometry1, geometry2);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry1)
+ << ", G2: " << bg::wkt(geometry2) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+ result = bg::disjoint(geometry2, geometry1);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry2)
+ << ", G2: " << bg::wkt(geometry1) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; G1 - G2: ";
+ std::cout << bg::wkt(geometry1) << " - ";
+ std::cout << bg::wkt(geometry2) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "expected/computed result: "
+ << expected_result << " / " << result << std::endl;
+ std::cout << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+};
+
+//============================================================================
+
+// linear-areal geometries
+template <typename P>
+inline void test_segment_box()
+{
+ typedef bg::model::segment<P> S;
+ typedef bg::model::box<P> B;
+
+ typedef test_disjoint tester;
+
+ tester::apply("s-b-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-02",
+ from_wkt<S>("SEGMENT(1 1,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-03",
+ from_wkt<S>("SEGMENT(2 2,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-04",
+ from_wkt<S>("SEGMENT(4 4,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+
+ tester::apply("s-b-05",
+ from_wkt<S>("SEGMENT(0 4,4 4)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+
+ tester::apply("s-b-06",
+ from_wkt<S>("SEGMENT(4 0,4 4)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+
+ tester::apply("s-b-07",
+ from_wkt<S>("SEGMENT(0 -2,0 -1)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+
+ tester::apply("s-b-08",
+ from_wkt<S>("SEGMENT(-2 -2,-2 -1)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+
+ tester::apply("s-b-09",
+ from_wkt<S>("SEGMENT(-2 -2,-2 -2)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+
+ tester::apply("s-b-10",
+ from_wkt<S>("SEGMENT(-2 0,-2 0)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+
+ tester::apply("s-b-11",
+ from_wkt<S>("SEGMENT(0 -2,0 -2)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+
+ tester::apply("s-b-12",
+ from_wkt<S>("SEGMENT(-2 0,-1 0)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+
+ // segment degenerates to a point
+ tester::apply("s-b-13",
+ from_wkt<S>("SEGMENT(0 0,0 0)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ false);
+
+ tester::apply("s-b-14",
+ from_wkt<S>("SEGMENT(1 1,1 1)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-15",
+ from_wkt<S>("SEGMENT(2 2,2 2)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-16",
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-17",
+ from_wkt<S>("SEGMENT(0 2,0 2)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("s-b-18",
+ from_wkt<S>("SEGMENT(2 2,2 2)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ true);
+}
+
+template <typename P>
+inline void test_segment_ring()
+{
+ typedef bg::model::segment<P> S;
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("s-r-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("s-r-02",
+ from_wkt<S>("SEGMENT(1 0,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("s-r-03",
+ from_wkt<S>("SEGMENT(1 1,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("s-r-04",
+ from_wkt<S>("SEGMENT(2 2,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_segment_polygon()
+{
+ typedef bg::model::segment<P> S;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("s-pg-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("s-pg-02",
+ from_wkt<S>("SEGMENT(1 0,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("s-pg-03",
+ from_wkt<S>("SEGMENT(1 1,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("s-pg-04",
+ from_wkt<S>("SEGMENT(2 2,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_segment_multipolygon()
+{
+ typedef bg::model::segment<P> S;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("s-mpg-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("s-mpg-02",
+ from_wkt<S>("SEGMENT(1 0,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("s-mpg-03",
+ from_wkt<S>("SEGMENT(1 1,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("s-mpg-04",
+ from_wkt<S>("SEGMENT(2 2,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_box()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::box<P> B;
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-b-01",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("l-b-02",
+ from_wkt<L>("LINESTRING(1 1,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("l-b-03",
+ from_wkt<L>("LINESTRING(2 2,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("l-b-04",
+ from_wkt<L>("LINESTRING(4 4,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_ring()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-r-01",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("l-r-02",
+ from_wkt<L>("LINESTRING(1 0,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("l-r-03",
+ from_wkt<L>("LINESTRING(1 1,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("l-r-04",
+ from_wkt<L>("LINESTRING(2 2,3 3)"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-pg-01",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("l-pg-02",
+ from_wkt<L>("LINESTRING(1 0,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("l-pg-03",
+ from_wkt<L>("LINESTRING(1 1,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("l-pg-04",
+ from_wkt<L>("LINESTRING(2 2,3 3)"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_multipolygon()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-mpg-01",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("l-mpg-02",
+ from_wkt<L>("LINESTRING(1 0,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("l-mpg-03",
+ from_wkt<L>("LINESTRING(1 1,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("l-mpg-04",
+ from_wkt<L>("LINESTRING(2 2,3 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ true);
+}
+
+template <typename P>
+inline void test_multilinestring_box()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+ typedef bg::model::box<P> B;
+
+ typedef test_disjoint tester;
+
+ tester::apply("ml-b-01",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("ml-b-02",
+ from_wkt<ML>("MULTILINESTRING((1 1,3 3))"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("ml-b-03",
+ from_wkt<ML>("MULTILINESTRING((2 2,3 3))"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("ml-b-04",
+ from_wkt<ML>("MULTILINESTRING((4 4,3 3))"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+}
+
+template <typename P>
+inline void test_multilinestring_ring()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("ml-r-01",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("ml-r-02",
+ from_wkt<ML>("MULTILINESTRING((1 0,3 3))"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("ml-r-03",
+ from_wkt<ML>("MULTILINESTRING((1 1,3 3))"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("ml-r-04",
+ from_wkt<ML>("MULTILINESTRING((2 2,3 3))"),
+ from_wkt<R>("POLYGON((0 0,2 0,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_multilinestring_polygon()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("ml-pg-01",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("ml-pg-02",
+ from_wkt<ML>("MULTILINESTRING((1 0,3 3))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("ml-pg-03",
+ from_wkt<ML>("MULTILINESTRING((1 1,3 3))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ false);
+
+ tester::apply("ml-pg-04",
+ from_wkt<ML>("MULTILINESTRING((2 2,3 3))"),
+ from_wkt<PL>("POLYGON((0 0,2 0,0 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_multilinestring_multipolygon()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("ml-mpg-01",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("ml-mpg-02",
+ from_wkt<ML>("MULTILINESTRING((1 0,3 3))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("ml-mpg-03",
+ from_wkt<ML>("MULTILINESTRING((1 1,3 3))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ false);
+
+ tester::apply("ml-mpg-04",
+ from_wkt<ML>("MULTILINESTRING((2 2,3 3))"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,2 0,0 2)))"),
+ true);
+}
+
+//============================================================================
+
+template <typename CoordinateType>
+inline void test_linear_areal()
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ test_segment_polygon<point_type>();
+ test_segment_multipolygon<point_type>();
+ test_segment_ring<point_type>();
+ test_segment_box<point_type>();
+
+ test_linestring_polygon<point_type>();
+ test_linestring_multipolygon<point_type>();
+ test_linestring_ring<point_type>();
+ test_linestring_box<point_type>();
+
+ test_multilinestring_polygon<point_type>();
+ test_multilinestring_multipolygon<point_type>();
+ test_multilinestring_ring<point_type>();
+ test_multilinestring_box<point_type>();
+}
+
+//============================================================================
+
+BOOST_AUTO_TEST_CASE( test_linear_areal_all )
+{
+ test_linear_areal<double>();
+ test_linear_areal<int>();
+#ifdef HAVE_TTMATH
+ test_linear_areal<ttmath_big>();
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_l.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_l.cpp
new file mode 100644
index 000000000..1d1161e1c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_l_l.cpp
@@ -0,0 +1,379 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_disjoint_coverage
+#endif
+
+// unit test to test disjoint for all geometry combinations
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <from_wkt.hpp>
+
+
+#ifdef HAVE_TTMATH
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+//============================================================================
+
+struct test_disjoint
+{
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ bool expected_result)
+ {
+ bool result = bg::disjoint(geometry1, geometry2);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry1)
+ << ", G2: " << bg::wkt(geometry2) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+ result = bg::disjoint(geometry2, geometry1);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry2)
+ << ", G2: " << bg::wkt(geometry1) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; G1 - G2: ";
+ std::cout << bg::wkt(geometry1) << " - ";
+ std::cout << bg::wkt(geometry2) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "expected/computed result: "
+ << expected_result << " / " << result << std::endl;
+ std::cout << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+};
+
+//============================================================================
+
+// linear-linear geometries
+template <typename P>
+inline void test_segment_segment()
+{
+ typedef bg::model::segment<P> S;
+
+ typedef test_disjoint tester;
+
+ tester::apply("s-s-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<S>("SEGMENT(0 0,0 2)"),
+ false);
+
+ tester::apply("s-s-02",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<S>("SEGMENT(2 0,3 0)"),
+ false);
+
+ tester::apply("s-s-03",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<S>("SEGMENT(1 0,3 0)"),
+ false);
+
+ tester::apply("s-s-04",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<S>("SEGMENT(1 0,1 1)"),
+ false);
+
+ tester::apply("s-s-05",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ true);
+
+ tester::apply("s-s-06",
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<S>("SEGMENT(1 1,1 1)"),
+ false);
+
+ tester::apply("s-s-07",
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<S>("SEGMENT(2 2,2 2)"),
+ true);
+
+ tester::apply("s-s-08",
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<S>("SEGMENT(2 2,3 3)"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_segment()
+{
+ typedef bg::model::segment<P> S;
+ typedef bg::model::linestring<P> L;
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-s-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,0 2)"),
+ false);
+
+ tester::apply("l-s-02",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,3 0)"),
+ false);
+
+ tester::apply("l-s-03",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ false);
+
+ tester::apply("l-s-04",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,1 1)"),
+ false);
+
+ tester::apply("l-s-05",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ true);
+
+ tester::apply("l-s-06",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 1,1 1,2 2)"),
+ true);
+
+ tester::apply("l-s-07",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,1 0,1 1,2 2)"),
+ false);
+
+ tester::apply("l-s-08",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,1 0,3 0)"),
+ false);
+
+ tester::apply("l-s-09",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(3 0,3 0,4 0)"),
+ true);
+
+ tester::apply("l-s-10",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(3 0,3 0)"),
+ true);
+
+ tester::apply("l-s-11",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(-1 0,-1 0)"),
+ true);
+
+ tester::apply("l-s-12",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,1 0)"),
+ false);
+
+ tester::apply("l-s-13",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 1,1 1)"),
+ true);
+}
+
+template <typename P>
+inline void test_multilinestring_segment()
+{
+ typedef bg::model::segment<P> S;
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+
+ typedef test_disjoint tester;
+
+ tester::apply("s-ml-01",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 2))"),
+ false);
+
+ tester::apply("s-ml-02",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 0,3 0))"),
+ false);
+
+ tester::apply("s-ml-03",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,3 0))"),
+ false);
+
+ tester::apply("s-ml-04",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1))"),
+ false);
+
+ tester::apply("s-ml-05",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2))"),
+ true);
+
+ tester::apply("s-ml-06",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2),(3 3,3 3))"),
+ true);
+
+ tester::apply("s-ml-07",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2),(1 0,1 0))"),
+ false);
+
+ tester::apply("s-ml-08",
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2),(3 0,3 0))"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> L;
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-l-01",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,0 2)"),
+ false);
+
+ tester::apply("l-l-02",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,3 0)"),
+ false);
+
+ tester::apply("l-l-03",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ false);
+
+ tester::apply("l-l-04",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,1 1)"),
+ false);
+
+ tester::apply("l-l-05",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ true);
+}
+
+template <typename P>
+inline void test_linestring_multilinestring()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+
+ typedef test_disjoint tester;
+
+ tester::apply("l-ml-01",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 2))"),
+ false);
+
+ tester::apply("l-ml-02",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 0,3 0))"),
+ false);
+
+ tester::apply("l-ml-03",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,3 0))"),
+ false);
+
+ tester::apply("l-ml-04",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1))"),
+ false);
+
+ tester::apply("l-ml-05",
+ from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2))"),
+ true);
+}
+
+template <typename P>
+inline void test_multilinestring_multilinestring()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+
+ typedef test_disjoint tester;
+
+ tester::apply("ml-ml-01",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 2))"),
+ false);
+
+ tester::apply("ml-ml-02",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,3 0))"),
+ false);
+
+ tester::apply("ml-ml-03",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,3 0))"),
+ false);
+
+ tester::apply("ml-ml-04",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1))"),
+ false);
+
+ tester::apply("ml-ml-05",
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2))"),
+ true);
+}
+
+//============================================================================
+
+template <typename CoordinateType>
+inline void test_linear_linear()
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ test_linestring_linestring<point_type>();
+ test_linestring_multilinestring<point_type>();
+ test_linestring_segment<point_type>();
+
+ test_multilinestring_multilinestring<point_type>();
+ test_multilinestring_segment<point_type>();
+
+ test_segment_segment<point_type>();
+}
+
+//============================================================================
+
+BOOST_AUTO_TEST_CASE( test_linear_linear_all )
+{
+ test_linear_linear<double>();
+ test_linear_linear<int>();
+#ifdef HAVE_TTMATH
+ test_linear_linear<ttmath_big>();
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_a.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_a.cpp
new file mode 100644
index 000000000..9c8437b17
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_a.cpp
@@ -0,0 +1,292 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_disjoint_coverage
+#endif
+
+// unit test to test disjoint for all geometry combinations
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <from_wkt.hpp>
+
+
+#ifdef HAVE_TTMATH
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+//============================================================================
+
+struct test_disjoint
+{
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ bool expected_result)
+ {
+ bool result = bg::disjoint(geometry1, geometry2);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry1)
+ << ", G2: " << bg::wkt(geometry2) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+ result = bg::disjoint(geometry2, geometry1);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry2)
+ << ", G2: " << bg::wkt(geometry1) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; G1 - G2: ";
+ std::cout << bg::wkt(geometry1) << " - ";
+ std::cout << bg::wkt(geometry2) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "expected/computed result: "
+ << expected_result << " / " << result << std::endl;
+ std::cout << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+};
+
+//============================================================================
+
+// pointlike-areal geometries
+template <typename P>
+inline void test_point_box()
+{
+ typedef test_disjoint tester;
+ typedef bg::model::box<P> B;
+
+ tester::apply("p-b-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<B>("BOX(0 0,1 1)"),
+ false);
+
+ tester::apply("p-b-02",
+ from_wkt<P>("POINT(2 2)"),
+ from_wkt<B>("BOX(0 0,1 0)"),
+ true);
+}
+
+template <typename P>
+inline void test_point_ring()
+{
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("p-r-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<R>("POLYGON((0 0,1 0,0 1))"),
+ false);
+
+ tester::apply("p-r-02",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<R>("POLYGON((0 0,1 0,0 1))"),
+ true);
+}
+
+template <typename P>
+inline void test_point_polygon()
+{
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("p-pg-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<PL>("POLYGON((0 0,1 0,0 1))"),
+ false);
+
+ tester::apply("p-pg-02",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<PL>("POLYGON((0 0,1 0,0 1))"),
+ true);
+}
+
+template <typename P>
+inline void test_point_multipolygon()
+{
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("p-mpg-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,1 0,0 1)),((2 0,3 0,2 1)))"),
+ false);
+
+ tester::apply("p-mpg-02",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,1 0,0 1)),((2 0,3 0,2 1)))"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_box()
+{
+ typedef test_disjoint tester;
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::box<P> B;
+
+ tester::apply("mp-b-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("mp-b-02",
+ from_wkt<MP>("MULTIPOINT(1 1,3 3)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ false);
+
+ tester::apply("mp-b-03",
+ from_wkt<MP>("MULTIPOINT(3 3,4 4)"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+
+ tester::apply("mp-b-04",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<B>("BOX(0 0,2 2)"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_ring()
+{
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::ring<P, false, false> R; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-r-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<R>("POLYGON((0 0,1 0,0 1))"),
+ false);
+
+ tester::apply("mp-r-02",
+ from_wkt<MP>("MULTIPOINT(1 0,1 1)"),
+ from_wkt<R>("POLYGON((0 0,1 0,0 1))"),
+ false);
+
+ tester::apply("mp-r-03",
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ from_wkt<R>("POLYGON((0 0,1 0,0 1))"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_polygon()
+{
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-pg-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<PL>("POLYGON((0 0,1 0,0 1))"),
+ false);
+
+ tester::apply("mp-pg-02",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0)"),
+ from_wkt<PL>("POLYGON((0 0,1 0,0 1))"),
+ false);
+
+ tester::apply("mp-pg-03",
+ from_wkt<MP>("MULTIPOINT(1 1,2 0)"),
+ from_wkt<PL>("POLYGON((0 0,1 0,0 1))"),
+ true);
+
+ tester::apply("mp-pg-04",
+ from_wkt<MP>("MULTIPOINT(1 1,2 3)"),
+ from_wkt<PL>("POLYGON((0 0,1 0,0 1))"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_multipolygon()
+{
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::polygon<P, false, false> PL; // ccw, open
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-mp-01",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,1 0,0 1)),((2 0,3 0,2 1)))"),
+ false);
+
+ tester::apply("mp-mp-02",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,1 0,0 1)),((2 0,3 0,2 1)))"),
+ false);
+
+ tester::apply("mp-mp-03",
+ from_wkt<MP>("MULTIPOINT(1 1,2 0)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,1 0,0 1)),((2 0,3 0,2 1)))"),
+ false);
+
+ tester::apply("mp-mp-04",
+ from_wkt<MP>("MULTIPOINT(1 1,2 3)"),
+ from_wkt<MPL>("MULTIPOLYGON(((0 0,1 0,0 1)),((2 0,3 0,2 1)))"),
+ true);
+}
+
+//============================================================================
+
+template <typename CoordinateType>
+inline void test_pointlike_areal()
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ test_point_polygon<point_type>();
+ test_point_multipolygon<point_type>();
+ test_point_ring<point_type>();
+ test_point_box<point_type>();
+
+ test_multipoint_polygon<point_type>();
+ test_multipoint_multipolygon<point_type>();
+ test_multipoint_ring<point_type>();
+
+ test_multipoint_box<point_type>();
+}
+
+//============================================================================
+
+BOOST_AUTO_TEST_CASE( test_pointlike_areal_all )
+{
+ test_pointlike_areal<double>();
+ test_pointlike_areal<int>();
+#ifdef HAVE_TTMATH
+ test_pointlike_areal<ttmath_big>();
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_l.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_l.cpp
new file mode 100644
index 000000000..ab4b8839a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_l.cpp
@@ -0,0 +1,391 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_disjoint_coverage
+#endif
+
+// unit test to test disjoint for all geometry combinations
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <from_wkt.hpp>
+
+
+#ifdef HAVE_TTMATH
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+//============================================================================
+
+struct test_disjoint
+{
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ bool expected_result)
+ {
+ bool result = bg::disjoint(geometry1, geometry2);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry1)
+ << ", G2: " << bg::wkt(geometry2) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+ result = bg::disjoint(geometry2, geometry1);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry2)
+ << ", G2: " << bg::wkt(geometry1) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; G1 - G2: ";
+ std::cout << bg::wkt(geometry1) << " - ";
+ std::cout << bg::wkt(geometry2) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "expected/computed result: "
+ << expected_result << " / " << result << std::endl;
+ std::cout << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+};
+
+//============================================================================
+
+// pointlike-linear geometries
+template <typename P>
+inline void test_point_segment()
+{
+ typedef test_disjoint tester;
+ typedef bg::model::segment<P> S;
+
+ tester::apply("p-s-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ false);
+
+ tester::apply("p-s-02",
+ from_wkt<P>("POINT(2 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ false);
+
+ tester::apply("p-s-03",
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ false);
+
+ tester::apply("p-s-04",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ true);
+
+ tester::apply("p-s-05",
+ from_wkt<P>("POINT(3 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ true);
+
+ tester::apply("p-s-06",
+ from_wkt<P>("POINT(-1 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ true);
+
+ // degenerate segment
+ tester::apply("p-s-07",
+ from_wkt<P>("POINT(-1 0)"),
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ true);
+
+ // degenerate segment
+ tester::apply("p-s-08",
+ from_wkt<P>("POINT(2 0)"),
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ false);
+
+ // degenerate segment
+ tester::apply("p-s-09",
+ from_wkt<P>("POINT(3 0)"),
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ true);
+
+ // degenerate segment
+ tester::apply("p-s-10",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ true);
+}
+
+template <typename P>
+inline void test_point_linestring()
+{
+ typedef bg::model::linestring<P> L;
+
+ typedef test_disjoint tester;
+
+ tester::apply("p-l-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ false);
+
+ tester::apply("p-l-02",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ false);
+
+ tester::apply("p-l-03",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ false);
+
+ tester::apply("p-l-04",
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ true);
+
+ tester::apply("p-l-05",
+ from_wkt<P>("POINT(5 5)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ true);
+
+ tester::apply("p-l-06",
+ from_wkt<P>("POINT(5 5)"),
+ from_wkt<L>("LINESTRING(0 0,2 2)"),
+ true);
+}
+
+template <typename P>
+inline void test_point_multilinestring()
+{
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+
+ typedef test_disjoint tester;
+
+ tester::apply("p-ml-01",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ true);
+
+ tester::apply("p-ml-02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("p-ml-03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("p-ml-04",
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("p-ml-05",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 4),(3 0,4 0))"),
+ true);
+
+ tester::apply("p-ml-06",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 4),(0 0,4 0))"),
+ false);
+
+ tester::apply("p-ml-07",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 4),(-1 0,4 0))"),
+ false);
+}
+
+template <typename P>
+inline void test_multipoint_segment()
+{
+ typedef test_disjoint tester;
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::segment<P> S;
+
+ tester::apply("mp-s-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ false);
+
+ tester::apply("mp-s-02",
+ from_wkt<MP>("MULTIPOINT(1 0,1 1)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ false);
+
+ tester::apply("mp-s-03",
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ true);
+
+ tester::apply("mp-s-04",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ true);
+
+ tester::apply("mp-s-05",
+ from_wkt<MP>("MULTIPOINT(3 0,4 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ true);
+
+ tester::apply("mp-s-06",
+ from_wkt<MP>("MULTIPOINT(1 0,4 0)"),
+ from_wkt<S>("SEGMENT(0 0,2 0)"),
+ false);
+
+ // segments that degenerate to a point
+ tester::apply("mp-s-07",
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ from_wkt<S>("SEGMENT(0 0,0 0)"),
+ true);
+
+ tester::apply("mp-s-08",
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ from_wkt<S>("SEGMENT(1 1,1 1)"),
+ false);
+}
+
+template <typename P>
+inline void test_multipoint_linestring()
+{
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::linestring<P> L;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-l-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ false);
+
+ tester::apply("mp-l-02",
+ from_wkt<MP>("MULTIPOINT(1 0,1 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ false);
+
+ tester::apply("mp-l-03",
+ from_wkt<MP>("MULTIPOINT(1 0,3 3)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ false);
+
+ tester::apply("mp-l-04",
+ from_wkt<MP>("MULTIPOINT(1 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ true);
+
+ tester::apply("mp-l-05",
+ from_wkt<MP>("MULTIPOINT(-1 -1,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,2 2,4 4)"),
+ true);
+
+ tester::apply("mp-l-06",
+ from_wkt<MP>("MULTIPOINT(-1 -1,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ false);
+
+ tester::apply("mp-l-07",
+ from_wkt<MP>("MULTIPOINT(-1 -1,2 0,-1 -1,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ false);
+
+ tester::apply("mp-l-08",
+ from_wkt<MP>("MULTIPOINT(2 0)"),
+ from_wkt<L>("LINESTRING(1 0)"),
+ true);
+
+ tester::apply("mp-l-09",
+ from_wkt<MP>("MULTIPOINT(3 0,0 0,3 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 0)"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_multilinestring()
+{
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::linestring<P> L;
+ typedef bg::model::multi_linestring<L> ML;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-ml-01",
+ from_wkt<MP>("MULTIPOINT(0 1,0 2)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ true);
+
+ tester::apply("mp-ml-02",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("mp-ml-03",
+ from_wkt<MP>("MULTIPOINT(0 1,1 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("mp-ml-04",
+ from_wkt<MP>("MULTIPOINT(0 1,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("mp-ml-05",
+ from_wkt<MP>("MULTIPOINT(0 0,10 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+
+ tester::apply("mp-ml-06",
+ from_wkt<MP>("MULTIPOINT(-1 0,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"),
+ false);
+}
+
+//============================================================================
+
+template <typename CoordinateType>
+inline void test_pointlike_linear()
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ test_point_linestring<point_type>();
+ test_point_multilinestring<point_type>();
+ test_point_segment<point_type>();
+
+ test_multipoint_linestring<point_type>();
+ test_multipoint_multilinestring<point_type>();
+ test_multipoint_segment<point_type>();
+}
+
+//============================================================================
+
+BOOST_AUTO_TEST_CASE( test_pointlike_linear_all )
+{
+ test_pointlike_linear<double>();
+ test_pointlike_linear<int>();
+#ifdef HAVE_TTMATH
+ test_pointlike_linear<ttmath_big>();
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_p.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_p.cpp
new file mode 100644
index 000000000..a634e9291
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_coverage_p_p.cpp
@@ -0,0 +1,187 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_disjoint_coverage
+#endif
+
+// unit test to test disjoint for all geometry combinations
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <from_wkt.hpp>
+
+
+#ifdef HAVE_TTMATH
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+//============================================================================
+
+struct test_disjoint
+{
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ bool expected_result)
+ {
+ bool result = bg::disjoint(geometry1, geometry2);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry1)
+ << ", G2: " << bg::wkt(geometry2) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+ result = bg::disjoint(geometry2, geometry1);
+ BOOST_CHECK_MESSAGE(result == expected_result,
+ "case ID: " << case_id << ", G1: " << bg::wkt(geometry2)
+ << ", G2: " << bg::wkt(geometry1) << " -> Expected: "
+ << expected_result << ", detected: " << result);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; G1 - G2: ";
+ std::cout << bg::wkt(geometry1) << " - ";
+ std::cout << bg::wkt(geometry2) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "expected/computed result: "
+ << expected_result << " / " << result << std::endl;
+ std::cout << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+};
+
+//============================================================================
+
+// pointlike-pointlike geometries
+template <typename P>
+inline void test_point_point()
+{
+ typedef test_disjoint tester;
+
+ tester::apply("p-p-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ false);
+
+ tester::apply("p-p-02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ true);
+}
+
+template <typename P>
+inline void test_point_multipoint()
+{
+ typedef bg::model::multi_point<P> MP;
+
+ typedef test_disjoint tester;
+
+ tester::apply("p-mp-01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
+ false);
+
+ tester::apply("p-mp-02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ true);
+
+ tester::apply("p-mp-03",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_point()
+{
+ typedef bg::model::multi_point<P> MP;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-p-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
+ from_wkt<P>("POINT(0 0)"),
+ false);
+
+ tester::apply("mp-p-02",
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ from_wkt<P>("POINT(0 0)"),
+ true);
+}
+
+template <typename P>
+inline void test_multipoint_multipoint()
+{
+ typedef bg::model::multi_point<P> MP;
+
+ typedef test_disjoint tester;
+
+ tester::apply("mp-mp-01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
+ false);
+
+ tester::apply("mp-mp-02",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ true);
+
+ tester::apply("mp-mp-03",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
+ true);
+
+ tester::apply("mp-mp-04",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ true);
+}
+
+//============================================================================
+
+template <typename CoordinateType>
+inline void test_pointlike_pointlike()
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ test_point_point<point_type>();
+ test_point_multipoint<point_type>();
+ test_multipoint_point<point_type>();
+ test_multipoint_multipoint<point_type>();
+}
+
+//============================================================================
+
+BOOST_AUTO_TEST_CASE( test_pointlike_pointlike_all )
+{
+ test_pointlike_pointlike<double>();
+ test_pointlike_pointlike<int>();
+#ifdef HAVE_TTMATH
+ test_pointlike_pointlike<ttmath_big>();
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_multi.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_multi.cpp
new file mode 100644
index 000000000..8bc8a6b55
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_multi.cpp
@@ -0,0 +1,129 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_disjoint.hpp"
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <test_common/test_point.hpp>
+
+#include <algorithms/predef_relop.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+
+ test_disjoint<mp, mp>("",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ // True disjoint
+ test_disjoint<mp, mp>("",
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0)))",
+ "MULTIPOLYGON(((6 6,6 10,10 10,10 6,6 6)))",
+ true);
+
+ // Touch -> not disjoint
+ test_disjoint<mp, mp>("",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)))",
+ "MULTIPOLYGON(((5 5,5 10,10 10,10 5,5 5)))",
+ false);
+
+ // Not disjoint but no IP's
+ test_disjoint<mp, mp>("no_ips",
+ "MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((22 2,28 2,28 8,22 8,22 2)))",
+ false);
+
+ // Not disjoint and not inside each other (in first ring) but wrapped (in second rings)
+ test_disjoint<mp, mp>("no_ips2",
+ "MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTIPOLYGON(((2 12,2 18,8 18,8 12,2 12)),((22 2,28 2,28 8,22 8,22 2)))",
+ false);
+
+ test_disjoint<mp, mp>("no_ips2_rev",
+ "MULTIPOLYGON(((2 12,2 18,8 18,8 12,2 12)),((22 2,28 2,28 8,22 8,22 2)))",
+ "MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))",
+ false);
+
+
+ test_disjoint<P, mp>("point_mp1",
+ "POINT(0 0)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ test_disjoint<P, mp>("point_mp2",
+ "POINT(5 5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ test_disjoint<P, mp>("point_mp1",
+ "POINT(11 11)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ true);
+
+ std::string polygon_inside_hole("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0), (2 2,8 2,8 8,2 8,2 2)),((4 4,4 6,6 6,6 4,4 4)))");
+ test_disjoint<P, mp>("point_mp_pih1",
+ "POINT(5 5)",
+ polygon_inside_hole,
+ false);
+
+ test_disjoint<P, mp>("point_mp_pih2",
+ "POINT(3 3)",
+ polygon_inside_hole,
+ true);
+
+ test_disjoint<mp, P>("point_mp1rev",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "POINT(0 0)",
+ false);
+
+ // assertion failure in 1.57
+ test_disjoint<ls, mls>("point_l_ml_assert_1_57",
+ "LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ "MULTILINESTRING((20 100, 31 -97, -46 57, -20 -4))",
+ false);
+ test_disjoint<ls, mls>("point_l_ml_assert_1_57",
+ "LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ "MULTILINESTRING((20 100, 31 -97, -46 57, -20 -4),(-71 -4))",
+ false);
+}
+
+int test_main(int, char* [])
+{
+ //test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
+
+
+/*
+with viewy as
+(
+select geometry::STGeomFromText('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))',0) as p
+ , geometry::STGeomFromText('MULTIPOLYGON(((2 12,2 18,8 18,8 12,2 12)),((22 2,28 2,28 8,22 8,22 2)))',0) as q
+)
+ select p from viewy union all select q from viewy
+-- select p.STDisjoint(q) from viewy
+*/
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_point_box_geometry.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_point_box_geometry.cpp
new file mode 100644
index 000000000..37fb8b15a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_point_box_geometry.cpp
@@ -0,0 +1,128 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_disjoint.hpp"
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <test_common/test_point.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+#include <algorithms/predef_relop.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::box<P> box;
+
+ test_disjoint<P, P>("pp1", "point(1 1)", "point(1 1)", false);
+ test_disjoint<P, P>("pp2", "point(1 1)", "point(1.001 1)", true);
+
+ // left-right
+ test_disjoint<box, box>("bb1", "box(1 1, 2 2)", "box(3 1, 4 2)", true);
+ test_disjoint<box, box>("bb2", "box(1 1, 2 2)", "box(2 1, 3 2)", false);
+ test_disjoint<box, box>("bb3", "box(1 1, 2 2)", "box(2 2, 3 3)", false);
+ test_disjoint<box, box>("bb4", "box(1 1, 2 2)", "box(2.001 2, 3 3)", true);
+
+ // up-down
+ test_disjoint<box, box>("bb5", "box(1 1, 2 2)", "box(1 3, 2 4)", true);
+ test_disjoint<box, box>("bb6", "box(1 1, 2 2)", "box(1 2, 2 3)", false);
+ // right-left
+ test_disjoint<box, box>("bb7", "box(1 1, 2 2)", "box(0 1, 1 2)", false);
+ test_disjoint<box, box>("bb8", "box(1 1, 2 2)", "box(0 1, 1 2)", false);
+
+ // point-box
+ test_disjoint<P, box>("pb1", "point(1 1)", "box(0 0, 2 2)", false);
+ test_disjoint<P, box>("pb2", "point(2 2)", "box(0 0, 2 2)", false);
+ test_disjoint<P, box>("pb3", "point(2.0001 2)", "box(1 1, 2 2)", true);
+ test_disjoint<P, box>("pb4", "point(0.9999 2)", "box(1 1, 2 2)", true);
+
+ // box-point (to test reverse compiling)
+ test_disjoint<box, P>("bp1", "box(1 1, 2 2)", "point(2 2)", false);
+
+ // Test triangles for polygons/rings, boxes
+ // Note that intersections are tested elsewhere, they don't need
+ // thorough test at this place
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::ring<P> ring;
+
+ // Testing overlap (and test compiling with box)
+ test_disjoint<polygon, polygon>("overlaps_box_pp", overlaps_box[0], overlaps_box[1], false);
+ test_disjoint<box, polygon>("overlaps_box_bp", overlaps_box[0], overlaps_box[1], false);
+ test_disjoint<box, ring>("overlaps_box_br", overlaps_box[0], overlaps_box[1], false);
+ test_disjoint<polygon, box>("overlaps_box_pb", overlaps_box[1], overlaps_box[0], false);
+ test_disjoint<ring, box>("overlaps_box_rb", overlaps_box[1], overlaps_box[0], false);
+
+ test_disjoint<P, ring>("point_ring1", "POINT(0 0)", "POLYGON((0 0,3 3,6 0,0 0))", false);
+ test_disjoint<P, ring>("point_ring2", "POINT(3 1)", "POLYGON((0 0,3 3,6 0,0 0))", false);
+ test_disjoint<P, ring>("point_ring3", "POINT(0 3)", "POLYGON((0 0,3 3,6 0,0 0))", true);
+ test_disjoint<P, polygon>("point_polygon1", "POINT(0 0)", "POLYGON((0 0,3 3,6 0,0 0))", false);
+ test_disjoint<P, polygon>("point_polygon2", "POINT(3 1)", "POLYGON((0 0,3 3,6 0,0 0))", false);
+ test_disjoint<P, polygon>("point_polygon3", "POINT(0 3)", "POLYGON((0 0,3 3,6 0,0 0))", true);
+
+ test_disjoint<ring, P>("point_ring2", "POLYGON((0 0,3 3,6 0,0 0))", "POINT(0 0)", false);
+ test_disjoint<polygon, P>("point_polygon2", "POLYGON((0 0,3 3,6 0,0 0))", "POINT(0 0)", false);
+
+
+ // Problem described by Volker/Albert 2012-06-01
+ test_disjoint<polygon, box>("volker_albert_1",
+ "POLYGON((1992 3240,1992 1440,3792 1800,3792 3240,1992 3240))",
+ "BOX(1941 2066, 2055 2166)", false);
+
+ test_disjoint<polygon, box>("volker_albert_2",
+ "POLYGON((1941 2066,2055 2066,2055 2166,1941 2166))",
+ "BOX(1941 2066, 2055 2166)", false);
+}
+
+
+template <typename P>
+void test_3d()
+{
+ typedef bg::model::box<P> box;
+
+ test_disjoint<P, P>("pp 3d 1", "point(1 1 1)", "point(1 1 1)", false);
+ test_disjoint<P, P>("pp 3d 2", "point(1 1 1)", "point(1.001 1 1)", true);
+
+ test_disjoint<box, box>("bb1", "box(1 1 1, 2 2 2)", "box(3 1 1, 4 2 1)", true);
+ test_disjoint<box, box>("bb2", "box(1 1 1, 2 2 2)", "box(2 1 1, 3 2 1)", false);
+ test_disjoint<box, box>("bb3", "box(1 1 1, 2 2 2)", "box(2 2 1, 3 3 1)", false);
+ test_disjoint<box, box>("bb4", "box(1 1 1, 2 2 2)", "box(2.001 2 1, 3 3 1)", true);
+
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<float> >();
+
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_seg_box.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_seg_box.cpp
new file mode 100644
index 000000000..2aa8c3f23
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_seg_box.cpp
@@ -0,0 +1,301 @@
+// Boost.Geometry
+
+// Copyright (c) 2016-2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+#include <boost/geometry/formulas/andoyer_inverse.hpp>
+#include <boost/geometry/formulas/thomas_inverse.hpp>
+#include <boost/geometry/formulas/vincenty_inverse.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include "test_disjoint_seg_box.hpp"
+
+
+namespace bg = boost::geometry;
+
+//Tests for disjoint(point, box), disjoint(box, box) and disjoint(segment, box)
+
+template <typename P>
+void disjoint_tests_1()
+{
+ test_disjoint<bg::model::box<P>, P>("BOX(1 1,3 3)", "POINT(4 4)", true);
+ test_disjoint<bg::model::box<P>, P>("BOX(1 1,3 3)", "POINT(2 2)", false);
+ test_disjoint<bg::model::box<P>, P>("BOX(1 1,3 3)", "POINT(3 3)", false);
+ test_disjoint<bg::model::box<P>, P>("BOX(1 1,3 3)", "POINT(2 3)", false);
+
+ test_disjoint<bg::model::box<P>, bg::model::box<P> >("BOX(1 1,3 3)",
+ "BOX(1 4,5 5)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::box<P> >("BOX(1 1,3 3)",
+ "BOX(2 2,4 4)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::box<P> >("BOX(1 1,3 3)",
+ "BOX(3 3,4 4)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::box<P> >("BOX(1 1,3 3)",
+ "BOX(2 3,4 4)",
+ false);
+
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(1 4, 5 5)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(3 3, 5 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(1 1, 4 1)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(1 2, 5 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(1 2, 3 2)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(0 0, 4 0)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(2 2, 4 4)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(4 4, 2 2)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(1.5 1.5, 2 2)",
+ false);
+}
+
+template <typename P>
+void disjoint_tests_2(bool expected_result)
+{
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(1 0.999, 10 0.999)",
+ expected_result);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(10 0.999, 1 0.999)",
+ expected_result);
+}
+
+template <typename P>
+void disjoint_tests_3(bool expected_result)
+{
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(3 4.42, 100 5)",
+ "SEGMENT(2 2.9, 100 2.9)",
+ expected_result);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(3 4.42, 100 5)",
+ "SEGMENT(100 2.9, 2 2.9)",
+ expected_result);
+}
+
+template <typename P>
+void disjoint_tests_4(bool expected_result)
+{
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(0 0.99999999, 2 0.99999999)",
+ expected_result);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(1 1,3 3)",
+ "SEGMENT(2 0.99999999, 0 0.99999999)",
+ expected_result);
+}
+
+template <typename P, typename CT>
+void disjoint_tests_with_strategy(bool expected_result)
+{
+ bg::strategy::disjoint::segment_box_geographic
+ <
+ bg::strategy::andoyer,
+ bg::srs::spheroid<CT>,
+ CT
+ > geographic_andoyer;
+
+ bg::strategy::disjoint::segment_box_geographic
+ <
+ bg::strategy::thomas,
+ bg::srs::spheroid<CT>,
+ CT
+ > geographic_thomas;
+
+ bg::strategy::disjoint::segment_box_geographic
+ <
+ bg::strategy::vincenty,
+ bg::srs::spheroid<CT>,
+ CT
+ > geographic_vincenty;
+
+ test_disjoint_strategy<bg::model::box<P>, bg::model::segment<P> >
+ ("BOX(1 1,3 3)", "SEGMENT(1 0.999, 10 0.999)",
+ expected_result, geographic_andoyer);
+ test_disjoint_strategy<bg::model::box<P>, bg::model::segment<P> >
+ ("BOX(1 1,3 3)", "SEGMENT(1 0.999, 10 0.999)",
+ expected_result, geographic_thomas);
+ test_disjoint_strategy<bg::model::box<P>, bg::model::segment<P> >
+ ("BOX(1 1,3 3)", "SEGMENT(1 0.999, 10 0.999)",
+ expected_result, geographic_vincenty);
+}
+
+template <typename P>
+void disjoint_tests_sph_geo()
+{
+ //Case A: box intersects without containing the vertex
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 6, 120 7)",
+ "SEGMENT(0 5, 120 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 -6, 120 -7)",
+ "SEGMENT(0 -5, 120 -5)",
+ false);
+
+ //Case B: box intersects and contains the vertex
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 9, 120 10)",
+ "SEGMENT(0 5, 120 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 -10, 120 -9)",
+ "SEGMENT(0 -5, 120 -5)",
+ false);
+
+ //Case C: bounding boxes disjoint
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 10, 10 20)",
+ "SEGMENT(0 5, 120 5)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 -20, 10 -10)",
+ "SEGMENT(0 -5, 120 -5)",
+ true);
+
+ //Case D: bounding boxes intersect but box segment are disjoint
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 9, 0.1 20)",
+ "SEGMENT(0 5, 120 5)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 -20, 0.1 -9)",
+ "SEGMENT(0 -5, 120 -5)",
+ true);
+
+ //Case E: geodesic intersects box but box segment are disjoint
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(121 0, 122 10)",
+ "SEGMENT(0 5, 120 5)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(121 -10, 122 0)",
+ "SEGMENT(0 -5, 120 -5)",
+ true);
+
+ //Case F: segment crosses box
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(100 0, 110 20)",
+ "SEGMENT(0 5, 120 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(100 -20, 110 0)",
+ "SEGMENT(0 -5, 120 -5)",
+ false);
+
+ //Case G: box contains one segment endpoint
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(110 0, 130 10)",
+ "SEGMENT(0 5, 120 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(110 -10, 130 0)",
+ "SEGMENT(0 -5, 120 -5)",
+ false);
+
+ //Case H: box below segment
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(50 0, 70 6)",
+ "SEGMENT(0 5, 120 5)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(50 -6, 70 0)",
+ "SEGMENT(0 -5, 120 -5)",
+ true);
+
+ //Case I: box contains segment
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(-10 0, 130 10)",
+ "SEGMENT(0 5, 120 5)",
+ false);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(-10 -10, 130 0)",
+ "SEGMENT(0 -5, 120 -5)",
+ false);
+
+ //ascending segment
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 10, 120 10.1)",
+ "SEGMENT(0 5, 120 5.1)",
+ false);
+
+ //descending segment
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 9.8, 120 10)",
+ "SEGMENT(0 5, 120 4.9)",
+ false);
+
+ //ascending segment both hemispheres
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(100 5, 120 6)",
+ "SEGMENT(0 -1, 120 4.9)",
+ false);
+
+ //descending segment both hemispheres
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(0 5, 20 6)",
+ "SEGMENT(0 4.9, 120 -1)",
+ false);
+
+ //https://github.com/boostorg/geometry/issues/579
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(10 10,20 20)",
+ "SEGMENT(12 2,12 1)",
+ true);
+ test_disjoint<bg::model::box<P>, bg::model::segment<P> >("BOX(10 10,20 20)",
+ "SEGMENT(12 1,12 2)",
+ true);
+}
+
+template <typename CT>
+void test_all()
+{
+ typedef bg::model::d2::point_xy<CT> point;
+ typedef bg::model::point<CT, 2,
+ bg::cs::spherical_equatorial<bg::degree> > sph_point;
+ typedef bg::model::point<CT, 2,
+ bg::cs::geographic<bg::degree> > geo_point;
+
+ disjoint_tests_1<point>();
+ disjoint_tests_1<sph_point>();
+ disjoint_tests_1<geo_point>();
+
+ disjoint_tests_2<point>(true);
+ disjoint_tests_2<sph_point>(false);
+ disjoint_tests_2<geo_point>(false);
+
+ //illustrate difference between spherical and geographic computation on same data
+ disjoint_tests_3<point>(true);
+ disjoint_tests_3<sph_point>(true);
+ disjoint_tests_3<geo_point>(false);
+
+ disjoint_tests_4<sph_point>(false);
+ disjoint_tests_4<geo_point>(false);
+
+ disjoint_tests_with_strategy<geo_point, CT>(false);
+
+ disjoint_tests_sph_geo<sph_point>();
+ disjoint_tests_sph_geo<geo_point>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<float>();
+ test_all<double>();
+
+#ifdef HAVE_TTMATH
+ common_tests<bg::model::d2::point_xy<ttmath_big> >();
+ common_tests<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_sph.cpp b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_sph.cpp
new file mode 100644
index 000000000..b6f6f4adb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/disjoint_sph.cpp
@@ -0,0 +1,327 @@
+// Boost.Geometry
+
+// Copyright (c) 2016, 2019 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_disjoint.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ false);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ false);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ false);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ false);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ false);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ false);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ false);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ false);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ false);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ false);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ false);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ false);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ false);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ false);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ false);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ false);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[1], case_17_sph[0],
+ false);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ false);
+ test_geometry<poly, poly>(case_18_sph[1], case_18_sph[0],
+ false);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ false);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ false);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ false);
+}
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::polygon<P> ring;
+
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ false);
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ false);
+
+ test_geometry<mls, ring>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ false);
+
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", false);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false);
+}
+
+//https://svn.boost.org/trac10/ticket/13057
+template <typename P>
+void test_linestring_linestring_radians()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 -0.31415926535897897853,\
+ 0.26179938779914918578 0,\
+ -0.034906585039886556254 0.13962634015954622502,\
+ -0.12217304763960294689 0.12217304763960294689)",\
+ "LINESTRING(-0.034906585039886556254 0.13962634015954622502,\
+ -0.26179938779914918578 0)", false);
+
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ false);
+}
+
+template <typename P>
+void test_point_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+
+ // https://svn.boost.org/trac/boost/ticket/9162
+ test_geometry<P, poly>("POINT(0 90)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ false);
+ test_geometry<P, poly>("POINT(-120 21)",
+ "POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
+ true);
+ // extended
+ test_geometry<P, poly>("POINT(0 -90)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ false);
+ test_geometry<P, poly>("POINT(0 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ false);
+ test_geometry<P, poly>("POINT(-180 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ false);
+}
+
+template <typename P>
+void test_box_polygon()
+{
+ typedef bg::model::box<P> box;
+ typedef bg::model::polygon<P> poly;
+
+ // https://github.com/boostorg/geometry/issues/466
+ test_geometry<box, poly>("BOX(2.2 48.88, 2.5 48.9021)",
+ "POLYGON((2.4 48.90205, 2.4 48.89, 2.3 48.89, 2.3 48.90205, 2.4 48.90205))",
+ false);
+ test_geometry<box, poly>("BOX(2.2 48.88, 2.5 48.9021)",
+ "POLYGON((2.4 48.9021, 2.4 48.89, 2.3 48.89, 2.3 48.9021, 2.4 48.9021))",
+ false);
+ test_geometry<box, poly>("BOX(2.2 48.88, 2.5 48.9021)",
+ "POLYGON((2.4 48.90215, 2.4 48.89, 2.3 48.89, 2.3 48.90215, 2.4 48.90215))",
+ false);
+ // extended
+ test_geometry<box, poly>("BOX(2.2 48.88, 2.5 48.9021)",
+ "POLYGON((2.4 48.9022, 2.4 48.89, 2.3 48.89, 2.3 48.9022, 2.4 48.9022))",
+ false);
+ // box within poly
+ test_geometry<box, poly>("BOX(2.2 48.88, 2.5 48.9021)",
+ "POLYGON((2.6 48.9021, 2.6 48.8, 2.1 48.8, 2.1 48.9021, 2.6 48.9021))",
+ false);
+ test_geometry<box, poly>("BOX(2.2 48.88, 2.5 48.9021)",
+ "POLYGON((2.6 48.9022, 2.6 48.8, 2.1 48.8, 2.1 48.9022, 2.6 48.9022))",
+ false);
+
+ // related to https://github.com/boostorg/geometry/issues/579
+ test_geometry<box, poly>("BOX(10 10,20 20)",
+ "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0),"
+ "(12 1,11 1,12 2,12 1))",
+ true);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+
+ test_point_polygon<P>();
+ test_box_polygon<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > point_deg;
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::radian> > point_rad;
+
+ test_all<point_deg>();
+
+ test_linestring_linestring_radians<point_rad>();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint.hpp b/src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint.hpp
new file mode 100644
index 000000000..bf6c46f9b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint.hpp
@@ -0,0 +1,112 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DISJOINT_HPP
+#define BOOST_GEOMETRY_TEST_DISJOINT_HPP
+
+#include <iostream>
+#include <string>
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_disjoint(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::disjoint(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_disjoint(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::disjoint(geometry1, geometry2);
+}
+
+template <typename G1, typename G2, typename Strategy>
+void check_disjoint(std::string const& id,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ G1 const& g1,
+ G2 const& g2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_disjoint(g1, g2, strategy);
+ if (id.empty())
+ {
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "disjoint: " << wkt1 << " and " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+ }
+ else
+ {
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "disjoint: " << id
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+ }
+}
+
+template <typename G1, typename G2>
+void test_disjoint(std::string const& id,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected)
+{
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ boost::variant<G1> v1(g1);
+ boost::variant<G2> v2(g2);
+
+ typedef typename bg::strategy::disjoint::services::default_strategy
+ <
+ G1, G2
+ >::type strategy_type;
+
+ check_disjoint(id, wkt1, wkt2, g1, g2, expected, no_strategy());
+ check_disjoint(id, wkt1, wkt2, g1, g2, expected, strategy_type());
+ check_disjoint(id, wkt1, wkt2, g1, g2, expected, no_strategy());
+ check_disjoint(id, wkt1, wkt2, v1, g2, expected, no_strategy());
+ check_disjoint(id, wkt1, wkt2, g1, v2, expected, no_strategy());
+ check_disjoint(id, wkt1, wkt2, v1, v2, expected, no_strategy());
+}
+
+template <typename G1, typename G2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected)
+{
+ test_disjoint<G1, G2>("", wkt1, wkt2, expected);
+}
+
+#endif // BOOST_GEOMETRY_TEST_DISJOINT_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint_seg_box.hpp b/src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint_seg_box.hpp
new file mode 100644
index 000000000..dbed11321
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/disjoint/test_disjoint_seg_box.hpp
@@ -0,0 +1,62 @@
+// Boost.Geometry
+
+// Copyright (c) 2016-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry/algorithms/disjoint.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Geometry1, typename Geometry2>
+inline void test_disjoint_check(bool result, bool expected_result,
+ Geometry1 const& geometry1, Geometry2 const& geometry2)
+{
+ BOOST_CHECK_MESSAGE((result == expected_result),
+ "result {" << result << "} different than expected result {"
+ << expected_result << "} for geometries "
+ << bg::wkt(geometry1) << " and " << bg::wkt(geometry2));
+}
+
+template <typename Geometry1, typename Geometry2>
+inline void test_disjoint(std::string const& wkt1,
+ std::string const& wkt2,
+ bool const expected_result)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+
+ test_disjoint_check(bg::disjoint(geometry1, geometry2), expected_result,
+ geometry1, geometry2);
+ //reverse
+ test_disjoint_check(bg::disjoint(geometry2, geometry1), expected_result,
+ geometry2, geometry1);
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+inline void test_disjoint_strategy(std::string const& wkt1,
+ std::string const& wkt2,
+ bool const expected_result,
+ Strategy strategy)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+
+ test_disjoint_check(bg::disjoint(geometry1, geometry2, strategy), expected_result,
+ geometry1, geometry2);
+ //reverse
+ test_disjoint_check(bg::disjoint(geometry2, geometry1, strategy), expected_result,
+ geometry2, geometry1);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/Jamfile b/src/boost/libs/geometry/test/algorithms/distance/Jamfile
new file mode 100644
index 000000000..beebe9d41
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/Jamfile
@@ -0,0 +1,35 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014-2018.
+# Modifications copyright (c) 2014-2018, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-distance
+ :
+ [ run distance.cpp : : : : algorithms_distance ]
+ [ run distance_ca_ar_ar.cpp : : : : algorithms_distance_ca_ar_ar ]
+ [ run distance_ca_l_ar.cpp : : : : algorithms_distance_ca_l_ar ]
+ [ run distance_ca_l_l.cpp : : : : algorithms_distance_ca_l_l ]
+ [ run distance_ca_pl_ar.cpp : : : : algorithms_distance_ca_pl_ar ]
+ [ run distance_ca_pl_l.cpp : : : : algorithms_distance_ca_pl_l ]
+ [ run distance_ca_pl_pl.cpp : : : : algorithms_distance_ca_pl_pl ]
+ [ run distance_se_geo_ar_ar.cpp : : : : algorithms_distance_se_geo_ar_ar ]
+ [ run distance_se_geo_l_ar.cpp : : : : algorithms_distance_se_geo_l_ar ]
+ [ run distance_se_geo_l_l.cpp : : : : algorithms_distance_se_geo_l_l ]
+ [ run distance_se_geo_pl_ar.cpp : : : : algorithms_distance_se_geo_pl_ar ]
+ [ run distance_geo_pl_l.cpp : : : : algorithms_distance_geo_pl_l ]
+ [ run distance_se_geo_pl_pl.cpp : : : : algorithms_distance_se_geo_pl_pl ]
+ [ run distance_se_pl_l.cpp : : : : algorithms_distance_se_pl_l ]
+ [ run distance_se_pl_pl.cpp : : : : algorithms_distance_se_pl_pl ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance.cpp
new file mode 100644
index 000000000..f86969209
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance.cpp
@@ -0,0 +1,536 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+//#include <boost/geometry/geometry.hpp>
+
+#include <string>
+#include <sstream>
+
+#include "test_distance.hpp"
+
+#include <boost/array.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/typeof/typeof.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <test_common/test_point.hpp>
+#include <test_geometries/custom_segment.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+#include <boost/variant/variant.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+// Register boost array as a linestring
+namespace boost { namespace geometry { namespace traits
+{
+template <typename Point, std::size_t PointCount>
+struct tag< boost::array<Point, PointCount> >
+{
+ typedef linestring_tag type;
+};
+
+}}}
+
+template <typename P>
+void test_distance_point()
+{
+ namespace services = bg::strategy::distance::services;
+ typedef typename bg::default_distance_result<P>::type return_type;
+
+ // Basic, trivial test
+
+ P p1;
+ bg::set<0>(p1, 1);
+ bg::set<1>(p1, 1);
+
+ P p2;
+ bg::set<0>(p2, 2);
+ bg::set<1>(p2, 2);
+
+ return_type d = bg::distance(p1, p2);
+ BOOST_CHECK_CLOSE(d, return_type(1.4142135), 0.001);
+
+ // Test specifying strategy manually
+ typename services::default_strategy
+ <
+ bg::point_tag, bg::point_tag, P
+ >::type strategy;
+
+ d = bg::distance(p1, p2, strategy);
+ BOOST_CHECK_CLOSE(d, return_type(1.4142135), 0.001);
+
+ {
+ // Test custom strategy
+ BOOST_CONCEPT_ASSERT( (bg::concepts::PointDistanceStrategy<taxicab_distance, P, P>) );
+
+ typedef typename services::return_type<taxicab_distance, P, P>::type cab_return_type;
+ BOOST_MPL_ASSERT((boost::is_same<cab_return_type, typename bg::coordinate_type<P>::type>));
+
+ taxicab_distance tcd;
+ cab_return_type d = bg::distance(p1, p2, tcd);
+
+ BOOST_CHECK( bg::math::abs(d - cab_return_type(2)) <= cab_return_type(0.01) );
+ }
+
+ {
+ // test comparability
+
+ typedef typename services::default_strategy
+ <
+ bg::point_tag, bg::point_tag, P
+ >::type strategy_type;
+ typedef typename services::comparable_type<strategy_type>::type comparable_strategy_type;
+
+ strategy_type strategy;
+ comparable_strategy_type comparable_strategy = services::get_comparable<strategy_type>::apply(strategy);
+ return_type comparable = services::result_from_distance<comparable_strategy_type, P, P>::apply(comparable_strategy, 3);
+
+ BOOST_CHECK_CLOSE(comparable, return_type(9), 0.001);
+ }
+}
+
+template <typename P>
+void test_distance_segment()
+{
+ typedef typename bg::default_distance_result<P>::type return_type;
+
+ P s1; bg::set<0>(s1, 1); bg::set<1>(s1, 1);
+ P s2; bg::set<0>(s2, 4); bg::set<1>(s2, 4);
+
+ // Check points left, right, projected-left, projected-right, on segment
+ P p1; bg::set<0>(p1, 0); bg::set<1>(p1, 1);
+ P p2; bg::set<0>(p2, 1); bg::set<1>(p2, 0);
+ P p3; bg::set<0>(p3, 3); bg::set<1>(p3, 1);
+ P p4; bg::set<0>(p4, 1); bg::set<1>(p4, 3);
+ P p5; bg::set<0>(p5, 3); bg::set<1>(p5, 3);
+
+ bg::model::referring_segment<P const> const seg(s1, s2);
+
+ return_type d1 = bg::distance(p1, seg);
+ return_type d2 = bg::distance(p2, seg);
+ return_type d3 = bg::distance(p3, seg);
+ return_type d4 = bg::distance(p4, seg);
+ return_type d5 = bg::distance(p5, seg);
+
+ BOOST_CHECK_CLOSE(d1, return_type(1), 0.001);
+ BOOST_CHECK_CLOSE(d2, return_type(1), 0.001);
+ BOOST_CHECK_CLOSE(d3, return_type(1.4142135), 0.001);
+ BOOST_CHECK_CLOSE(d4, return_type(1.4142135), 0.001);
+ BOOST_CHECK_CLOSE(d5, return_type(0), 0.001);
+
+ // Reverse case: segment/point instead of point/segment
+ return_type dr1 = bg::distance(seg, p1);
+ return_type dr2 = bg::distance(seg, p2);
+
+ BOOST_CHECK_CLOSE(dr1, d1, 0.001);
+ BOOST_CHECK_CLOSE(dr2, d2, 0.001);
+
+ // Test specifying strategy manually:
+ // 1) point-point-distance
+ typename bg::strategy::distance::services::default_strategy
+ <
+ bg::point_tag, bg::point_tag, P
+ >::type pp_strategy;
+ d1 = bg::distance(p1, seg, pp_strategy);
+ BOOST_CHECK_CLOSE(d1, return_type(1), 0.001);
+
+ // 2) point-segment-distance
+ typename bg::strategy::distance::services::default_strategy
+ <
+ bg::point_tag, bg::segment_tag, P
+ >::type ps_strategy;
+ d1 = bg::distance(p1, seg, ps_strategy);
+ BOOST_CHECK_CLOSE(d1, return_type(1), 0.001);
+
+ // 3) custom point strategy
+ taxicab_distance tcd;
+ d1 = bg::distance(p1, seg, tcd);
+ BOOST_CHECK_CLOSE(d1, return_type(1), 0.001);
+}
+
+template <typename Point, typename Geometry, typename T>
+void test_distance_linear(std::string const& wkt_point, std::string const& wkt_geometry, T const& expected)
+{
+ Point p;
+ bg::read_wkt(wkt_point, p);
+
+ Geometry g;
+ bg::read_wkt(wkt_geometry, g);
+
+ typedef typename bg::default_distance_result<Point>::type return_type;
+ return_type d = bg::distance(p, g);
+
+ // For point-to-linestring (or point-to-polygon), both a point-strategy and a point-segment-strategy can be specified.
+ // Test this.
+ return_type ds1 = bg::distance(p, g, bg::strategy::distance::pythagoras<>());
+ return_type ds2 = bg::distance(p, g, bg::strategy::distance::projected_point<>());
+
+ BOOST_CHECK_CLOSE(d, return_type(expected), 0.001);
+ BOOST_CHECK_CLOSE(ds1, return_type(expected), 0.001);
+ BOOST_CHECK_CLOSE(ds2, return_type(expected), 0.001);
+}
+
+template <typename P>
+void test_distance_array_as_linestring()
+{
+ typedef typename bg::default_distance_result<P>::type return_type;
+
+ // Normal array does not have
+ boost::array<P, 2> points;
+ bg::set<0>(points[0], 1);
+ bg::set<1>(points[0], 1);
+ bg::set<0>(points[1], 3);
+ bg::set<1>(points[1], 3);
+
+ P p;
+ bg::set<0>(p, 2);
+ bg::set<1>(p, 1);
+
+ return_type d = bg::distance(p, points);
+ BOOST_CHECK_CLOSE(d, return_type(0.70710678), 0.001);
+
+ bg::set<0>(p, 5); bg::set<1>(p, 5);
+ d = bg::distance(p, points);
+ BOOST_CHECK_CLOSE(d, return_type(2.828427), 0.001);
+}
+
+
+// code moved from the distance unit test in multi/algorithms -- start
+template <typename Geometry1, typename Geometry2>
+void test_distance(std::string const& wkt1, std::string const& wkt2, double expected)
+{
+ Geometry1 g1;
+ Geometry2 g2;
+ bg::read_wkt(wkt1, g1);
+ bg::read_wkt(wkt2, g2);
+ typename bg::default_distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2);
+
+ BOOST_CHECK_CLOSE(d, expected, 0.0001);
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void test_distance(Strategy const& strategy, std::string const& wkt1,
+ std::string const& wkt2, double expected)
+{
+ Geometry1 g1;
+ Geometry2 g2;
+ bg::read_wkt(wkt1, g1);
+ bg::read_wkt(wkt2, g2);
+ typename bg::default_distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2, strategy);
+
+ BOOST_CHECK_CLOSE(d, expected, 0.0001);
+}
+
+
+template <typename P>
+void test_2d()
+{
+ typedef bg::model::multi_point<P> mp;
+ typedef bg::model::multi_linestring<bg::model::linestring<P> > ml;
+ test_distance<P, P>("POINT(0 0)", "POINT(1 1)", sqrt(2.0));
+ test_distance<P, mp>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<mp, P>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp, mp>("MULTIPOINT((1 1),(1 0),(0 2))", "MULTIPOINT((2 2),(2 3))", sqrt(2.0));
+ test_distance<P, ml>("POINT(0 0)", "MULTILINESTRING((1 1,2 2),(1 0,2 0),(0 2,0 3))", 1.0);
+ test_distance<ml, P>("MULTILINESTRING((1 1,2 2),(1 0,2 0),(0 2,0 3))", "POINT(0 0)", 1.0);
+ test_distance<ml, mp>("MULTILINESTRING((1 1,2 2),(1 0,2 0),(0 2,0 3))", "MULTIPOINT((0 0),(1 1))", 0.0);
+
+ // Test with a strategy
+ bg::strategy::distance::pythagoras<> pyth;
+ test_distance<P, P>(pyth, "POINT(0 0)", "POINT(1 1)", sqrt(2.0));
+ test_distance<P, mp>(pyth, "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<mp, P>(pyth, "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+}
+
+
+template <typename P>
+void test_3d()
+{
+ typedef bg::model::multi_point<P> mp;
+ test_distance<P, P>("POINT(0 0 0)", "POINT(1 1 1)", sqrt(3.0));
+ test_distance<P, mp>("POINT(0 0 0)", "MULTIPOINT((1 1 1),(1 0 0),(0 1 2))", 1.0);
+ test_distance<mp, mp>("MULTIPOINT((1 1 1),(1 0 0),(0 0 2))", "MULTIPOINT((2 2 2),(2 3 4))", sqrt(3.0));
+}
+
+
+template <typename P1, typename P2>
+void test_mixed()
+{
+ typedef bg::model::multi_point<P1> mp1;
+ typedef bg::model::multi_point<P2> mp2;
+
+ test_distance<P1, P2>("POINT(0 0)", "POINT(1 1)", sqrt(2.0));
+
+ test_distance<P1, mp1>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<P1, mp2>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<P2, mp1>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<P2, mp2>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+
+ // Test automatic reversal
+ test_distance<mp1, P1>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp1, P2>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp2, P1>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp2, P2>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+
+ // Test multi-multi using different point types for each
+ test_distance<mp1, mp2>("MULTIPOINT((1 1),(1 0),(0 2))", "MULTIPOINT((2 2),(2 3))", sqrt(2.0));
+
+ // Test with a strategy
+ using namespace bg::strategy::distance;
+
+ test_distance<P1, P2>(pythagoras<>(), "POINT(0 0)", "POINT(1 1)", sqrt(2.0));
+
+ test_distance<P1, mp1>(pythagoras<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<P1, mp2>(pythagoras<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<P2, mp1>(pythagoras<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+ test_distance<P2, mp2>(pythagoras<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
+
+ // Most interesting: reversal AND a strategy (note that the stategy must be reversed automatically
+ test_distance<mp1, P1>(pythagoras<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp1, P2>(pythagoras<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp2, P1>(pythagoras<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+ test_distance<mp2, P2>(pythagoras<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
+}
+// code moved from the distance unit test in multi/algorithms -- end
+
+
+
+
+template <typename P>
+void test_all()
+{
+ test_distance_point<P>();
+ test_distance_segment<P>();
+ test_distance_array_as_linestring<P>();
+
+ test_geometry<P, bg::model::segment<P> >("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+ test_geometry<P, bg::model::segment<P> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+
+ test_geometry<P, P>("POINT(1 1)", "POINT(2 2)", sqrt(2.0));
+ test_geometry<P, P>("POINT(0 0)", "POINT(0 3)", 3.0);
+ test_geometry<P, P>("POINT(0 0)", "POINT(4 0)", 4.0);
+ test_geometry<P, P>("POINT(0 3)", "POINT(4 0)", 5.0);
+ test_geometry<P, bg::model::linestring<P> >("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+ test_geometry<P, bg::model::linestring<P> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+ test_geometry<P, bg::model::linestring<P> >("POINT(50 50)", "LINESTRING(50 40, 40 50)", sqrt(50.0));
+ test_geometry<P, bg::model::linestring<P> >("POINT(50 50)", "LINESTRING(50 40, 40 50, 0 90)", sqrt(50.0));
+ test_geometry<bg::model::linestring<P>, P>("LINESTRING(1 1,4 4)", "POINT(1 3)", sqrt(2.0));
+ test_geometry<bg::model::linestring<P>, P>("LINESTRING(50 40, 40 50)", "POINT(50 50)", sqrt(50.0));
+ test_geometry<bg::model::linestring<P>, P>("LINESTRING(50 40, 40 50, 0 90)", "POINT(50 50)", sqrt(50.0));
+
+ // Rings
+ test_geometry<P, bg::model::ring<P> >("POINT(1 3)", "POLYGON((1 1,4 4,5 0,1 1))", sqrt(2.0));
+ test_geometry<P, bg::model::ring<P> >("POINT(3 1)", "POLYGON((1 1,4 4,5 0,1 1))", 0.0);
+ // other way round
+ test_geometry<bg::model::ring<P>, P>("POLYGON((1 1,4 4,5 0,1 1))", "POINT(3 1)", 0.0);
+ // open ring
+ test_geometry<P, bg::model::ring<P, true, false> >("POINT(1 3)", "POLYGON((4 4,5 0,1 1))", sqrt(2.0));
+
+ // Polygons
+ test_geometry<P, bg::model::polygon<P> >("POINT(1 3)", "POLYGON((1 1,4 4,5 0,1 1))", sqrt(2.0));
+ test_geometry<P, bg::model::polygon<P> >("POINT(3 1)", "POLYGON((1 1,4 4,5 0,1 1))", 0.0);
+ // other way round
+ test_geometry<bg::model::polygon<P>, P>("POLYGON((1 1,4 4,5 0,1 1))", "POINT(3 1)", 0.0);
+ // open polygon
+ test_geometry<P, bg::model::polygon<P, true, false> >("POINT(1 3)", "POLYGON((4 4,5 0,1 1))", sqrt(2.0));
+
+ // Polygons with holes
+ std::string donut = "POLYGON ((0 0,1 9,8 1,0 0),(1 1,4 1,1 4,1 1))";
+ test_geometry<P, bg::model::polygon<P> >("POINT(2 2)", donut, 0.5 * sqrt(2.0));
+ test_geometry<P, bg::model::polygon<P> >("POINT(3 3)", donut, 0.0);
+ // other way round
+ test_geometry<bg::model::polygon<P>, P>(donut, "POINT(2 2)", 0.5 * sqrt(2.0));
+ // open
+ test_geometry<P, bg::model::polygon<P, true, false> >("POINT(2 2)", "POLYGON ((0 0,1 9,8 1),(1 1,4 1,1 4))", 0.5 * sqrt(2.0));
+
+ // Should (currently) give compiler assertion
+ // test_geometry<bg::model::polygon<P>, bg::model::polygon<P> >(donut, donut, 0.5 * sqrt(2.0));
+
+ // DOES NOT COMPILE - cannot do read_wkt (because boost::array is not variably sized)
+ // test_geometry<P, boost::array<P, 2> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+
+ test_geometry<P, test::wrapped_boost_array<P, 2> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+
+ test_distance_linear<P, bg::model::linestring<P> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+}
+
+template <typename P>
+void test_empty_input()
+{
+ P p;
+ bg::model::linestring<P> line_empty;
+ bg::model::polygon<P> poly_empty;
+ bg::model::ring<P> ring_empty;
+ bg::model::multi_point<P> mp_empty;
+ bg::model::multi_linestring<bg::model::linestring<P> > ml_empty;
+
+ test_empty_input(p, line_empty);
+ test_empty_input(p, poly_empty);
+ test_empty_input(p, ring_empty);
+
+ test_empty_input(p, mp_empty);
+ test_empty_input(p, ml_empty);
+ test_empty_input(mp_empty, mp_empty);
+
+ // Test behaviour if one of the inputs is empty
+ bg::model::multi_point<P> mp;
+ mp.push_back(p);
+ test_empty_input(mp_empty, mp);
+ test_empty_input(mp, mp_empty);
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ // point-point
+ {
+ std::string const a = "POINT(2544000 528000)";
+ std::string const b = "POINT(2768040 528000)";
+ int_point_type ia, ib;
+ double_point_type da, db;
+ bg::read_wkt(a, ia);
+ bg::read_wkt(b, ib);
+ bg::read_wkt(a, da);
+ bg::read_wkt(b, db);
+
+ BOOST_AUTO(idist, bg::distance(ia, ib));
+ BOOST_AUTO(ddist, bg::distance(da, db));
+
+ BOOST_CHECK_MESSAGE(std::abs(idist - ddist) < 0.1,
+ "within<a double> different from within<an int>");
+ }
+ // Point-segment
+ {
+ std::string const a = "POINT(2600000 529000)";
+ std::string const b = "LINESTRING(2544000 528000, 2768040 528000)";
+ int_point_type ia;
+ double_point_type da;
+ bg::model::segment<int_point_type> ib;
+ bg::model::segment<double_point_type> db;
+ bg::read_wkt(a, ia);
+ bg::read_wkt(b, ib);
+ bg::read_wkt(a, da);
+ bg::read_wkt(b, db);
+
+ BOOST_AUTO(idist, bg::distance(ia, ib));
+ BOOST_AUTO(ddist, bg::distance(da, db));
+
+ BOOST_CHECK_MESSAGE(std::abs(idist - ddist) < 0.1,
+ "within<a double> different from within<an int>");
+ }
+}
+
+template <typename T>
+void test_variant()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::segment<point_type> segment_type;
+ typedef bg::model::box<point_type> box_type;
+ typedef boost::variant<point_type, segment_type, box_type> variant_type;
+
+ point_type point;
+ std::string const point_li = "POINT(1 3)";
+ bg::read_wkt(point_li, point);
+
+ segment_type seg;
+ std::string const seg_li = "LINESTRING(1 1,4 4)";
+ bg::read_wkt(seg_li, seg);
+
+ variant_type v1, v2;
+
+ BOOST_MPL_ASSERT((
+ boost::is_same
+ <
+ typename bg::distance_result
+ <
+ variant_type, variant_type, bg::default_strategy
+ >::type,
+ double
+ >
+ ));
+
+ // Default strategy
+ v1 = point;
+ v2 = point;
+ BOOST_CHECK_CLOSE(bg::distance(v1, v2), bg::distance(point, point), 0.0001);
+ BOOST_CHECK_CLOSE(bg::distance(v1, point), bg::distance(point, point), 0.0001);
+ BOOST_CHECK_CLOSE(bg::distance(point, v2), bg::distance(point, point), 0.0001);
+ v1 = point;
+ v2 = seg;
+ BOOST_CHECK_CLOSE(bg::distance(v1, v2), bg::distance(point, seg), 0.0001);
+ BOOST_CHECK_CLOSE(bg::distance(v1, seg), bg::distance(point, seg), 0.0001);
+ BOOST_CHECK_CLOSE(bg::distance(point, v2), bg::distance(point, seg), 0.0001);
+
+ // User defined strategy
+ v1 = point;
+ v2 = point;
+ bg::strategy::distance::haversine<double> s;
+ //BOOST_CHECK_CLOSE(bg::distance(v1, v2, s), bg::distance(point, point, s), 0.0001);
+ //BOOST_CHECK_CLOSE(bg::distance(v1, point, s), bg::distance(point, point, s), 0.0001);
+ //BOOST_CHECK_CLOSE(bg::distance(point, v2, s), bg::distance(point, point, s), 0.0001);
+}
+
+int test_main(int, char* [])
+{
+#ifdef TEST_ARRAY
+ //test_all<int[2]>();
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+ //test_all<test::test_point>(); // located here because of 3D
+#endif
+
+ test_large_integers();
+
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<boost::tuple<float, float> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ test_empty_input<bg::model::d2::point_xy<int> >();
+
+ // below are the test cases moved here from the distance unit test
+ // in test/multi/algorithms
+ test_2d<boost::tuple<float, float> >();
+ test_2d<bg::model::d2::point_xy<float> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+ test_3d<boost::tuple<float, float, float> >();
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ test_mixed<bg::model::d2::point_xy<float>, bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+ test_mixed<bg::model::d2::point_xy<ttmath_big>, bg::model::d2::point_xy<double> >();
+#endif
+
+ test_empty_input<bg::model::d2::point_xy<int> >();
+
+ test_variant<double>();
+ test_variant<int>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_all.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_all.cpp
new file mode 100644
index 000000000..74a46fffb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_all.cpp
@@ -0,0 +1,20 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_all
+#endif
+
+#include "distance_pointlike_pointlike.cpp"
+#include "distance_pointlike_linear.cpp"
+#include "distance_pointlike_areal.cpp"
+#include "distance_linear_linear.cpp"
+#include "distance_linear_areal.cpp"
+#include "distance_areal_areal.cpp"
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_brute_force.hpp b/src/boost/libs/geometry/test/algorithms/distance/distance_brute_force.hpp
new file mode 100644
index 000000000..82d0015b8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_brute_force.hpp
@@ -0,0 +1,1356 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_BRUTE_FORCE_HPP
+#define BOOST_GEOMETRY_TEST_DISTANCE_BRUTE_FORCE_HPP
+
+#include <iterator>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/range.hpp>
+
+#include <boost/geometry/core/reverse_dispatch.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tag_cast.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/iterators/segment_iterator.hpp>
+
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+namespace unit_test
+{
+
+namespace detail { namespace distance_brute_force
+{
+
+struct distance_from_bg
+{
+ template <typename G>
+ struct use_distance_from_bg
+ {
+ typedef typename boost::mpl::or_
+ <
+ boost::is_same<typename tag<G>::type, point_tag>,
+ typename boost::mpl::or_
+ <
+ boost::is_same<typename tag<G>::type, segment_tag>,
+ boost::is_same<typename tag<G>::type, box_tag>
+ >::type
+ >::type type;
+ };
+
+ template <typename Geometry1, typename Geometry2, typename Strategy>
+ static inline
+ typename distance_result<Geometry1, Geometry2, Strategy>::type
+ apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+ {
+ BOOST_MPL_ASSERT((typename use_distance_from_bg<Geometry1>::type));
+ BOOST_MPL_ASSERT((typename use_distance_from_bg<Geometry2>::type));
+
+ return geometry::distance(geometry1, geometry2, strategy);
+ }
+};
+
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+inline
+typename distance_result<Geometry1, Geometry2, Strategy>::type
+bg_distance(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return distance_from_bg::apply(geometry1, geometry2, strategy);
+}
+
+
+template <typename Policy>
+struct one_to_many
+{
+ template <typename Geometry, typename Iterator, typename Strategy>
+ static inline typename distance_result
+ <
+ Geometry,
+ typename std::iterator_traits<Iterator>::value_type,
+ Strategy
+ >::type
+ apply(Geometry const& geometry, Iterator begin, Iterator end,
+ Strategy const& strategy)
+ {
+ typedef typename distance_result
+ <
+ Geometry,
+ typename std::iterator_traits<Iterator>::value_type,
+ Strategy
+ >::type distance_type;
+
+ bool first = true;
+ distance_type d_min(0);
+ for (Iterator it = begin; it != end; ++it, first = false)
+ {
+ distance_type d = Policy::apply(geometry, *it, strategy);
+
+ if ( first || d < d_min )
+ {
+ d_min = d;
+ }
+ }
+ return d_min;
+ }
+};
+
+
+
+}} // namespace detail::distance_brute_force
+
+
+namespace dispatch
+{
+
+template
+<
+ typename Geometry1,
+ typename Geometry2,
+ typename Strategy,
+ typename Tag1 = typename tag_cast
+ <
+ typename tag<Geometry1>::type,
+ segment_tag,
+ linear_tag
+ >::type,
+ typename Tag2 = typename tag_cast
+ <
+ typename tag<Geometry2>::type,
+ segment_tag,
+ linear_tag
+ >::type,
+ bool Reverse = reverse_dispatch<Geometry1, Geometry2>::type::value
+>
+struct distance_brute_force
+ : not_implemented<Geometry1, Geometry2>
+{};
+
+template
+<
+ typename Geometry1,
+ typename Geometry2,
+ typename Strategy,
+ typename Tag1,
+ typename Tag2
+>
+struct distance_brute_force<Geometry1, Geometry2, Strategy, Tag1, Tag2, true>
+{
+ static inline typename distance_result<Geometry1, Geometry2, Strategy>::type
+ apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+ {
+ return distance_brute_force
+ <
+ Geometry2, Geometry1, Strategy
+ >::apply(geometry2, geometry1, strategy);
+ }
+};
+
+//===================================================================
+
+template
+<
+ typename Point1,
+ typename Point2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point1, Point2, Strategy,
+ point_tag, point_tag, false
+> : detail::distance_brute_force::distance_from_bg
+{};
+
+
+template
+<
+ typename Point,
+ typename Segment,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, Segment, Strategy,
+ point_tag, segment_tag, false
+> : detail::distance_brute_force::distance_from_bg
+{};
+
+template
+<
+ typename Point,
+ typename Linear,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, Linear, Strategy,
+ point_tag, linear_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Point, Linear, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Point const& point,
+ Linear const& linear,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ detail::distance_brute_force::distance_from_bg
+ >::apply(point,
+ geometry::segments_begin(linear),
+ geometry::segments_end(linear),
+ strategy);
+ }
+};
+
+template
+<
+ typename Point,
+ typename Ring,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, Ring, Strategy,
+ point_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Point, Ring, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Point const& point,
+ Ring const& ring,
+ Strategy const& strategy)
+ {
+
+ if (geometry::covered_by(point, ring))
+ {
+ return 0;
+ }
+
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Point,
+ typename std::iterator_traits
+ <
+ segment_iterator<Ring const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(point,
+ geometry::segments_begin(ring),
+ geometry::segments_end(ring),
+ strategy);
+ }
+};
+
+//TODO do it more brute force (also in all polygon-geometry cases)
+template
+<
+ typename Point,
+ typename Polygon,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, Polygon, Strategy,
+ point_tag, polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Point, Polygon, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Point const& point,
+ Polygon const& polygon,
+ Strategy const& strategy)
+ {
+ return geometry::distance(point, polygon, strategy);
+ }
+};
+
+template
+<
+ typename Point,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, Box, Strategy,
+ point_tag, box_tag, false
+> : detail::distance_brute_force::distance_from_bg
+{};
+
+template
+<
+ typename Point,
+ typename MultiPoint,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, MultiPoint, Strategy,
+ point_tag, multi_point_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Point, MultiPoint, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Point const& p,
+ MultiPoint const& mp,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ detail::distance_brute_force::distance_from_bg
+ >::apply(p, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename Point,
+ typename MultiPolygon,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Point, MultiPolygon, Strategy,
+ point_tag, multi_polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Point, MultiPolygon, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Point const& p,
+ MultiPolygon const& mp,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Point,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(p, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+//=======================================================================
+
+template
+<
+ typename Linear,
+ typename Segment,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear, Segment, Strategy,
+ linear_tag, segment_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear, Segment, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear const& linear,
+ Segment const& segment,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ detail::distance_brute_force::distance_from_bg
+ >::apply(segment,
+ geometry::segments_begin(linear),
+ geometry::segments_end(linear),
+ strategy);
+ }
+};
+
+
+template
+<
+ typename Linear1,
+ typename Linear2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear1, Linear2, Strategy,
+ linear_tag, linear_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear1, Linear2, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear1 const& linear1,
+ Linear2 const& linear2,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Linear1,
+ typename std::iterator_traits
+ <
+ segment_iterator<Linear2 const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(linear1,
+ geometry::segments_begin(linear2),
+ geometry::segments_end(linear2),
+ strategy);
+ }
+};
+
+template
+<
+ typename Linear,
+ typename Ring,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear, Ring, Strategy,
+ linear_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear, Ring, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear const& linear,
+ Ring const& ring,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Linear,
+ typename std::iterator_traits
+ <
+ segment_iterator<Ring const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(linear,
+ geometry::segments_begin(ring),
+ geometry::segments_end(ring),
+ strategy);
+ }
+};
+
+template
+<
+ typename Linear,
+ typename Polygon,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear, Polygon, Strategy,
+ linear_tag, polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear, Polygon, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear const& linear,
+ Polygon const& polygon,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Polygon,
+ typename std::iterator_traits
+ <
+ segment_iterator<Linear const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(polygon,
+ geometry::segments_begin(linear),
+ geometry::segments_end(linear),
+ strategy);
+ }
+};
+
+
+template
+<
+ typename Linear,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear, Box, Strategy,
+ linear_tag, box_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear, Box, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear const& linear,
+ Box const& box,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ detail::distance_brute_force::distance_from_bg
+ >::apply(box,
+ geometry::segments_begin(linear),
+ geometry::segments_end(linear),
+ strategy);
+ }
+};
+
+template
+<
+ typename Linear,
+ typename MultiPoint,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear, MultiPoint, Strategy,
+ linear_tag, multi_point_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear, MultiPoint, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear const& linear,
+ MultiPoint const& mp,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Linear,
+ typename boost::range_value<MultiPoint>::type,
+ Strategy
+ >
+ >::apply(linear, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename Linear,
+ typename MultiPolygon,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Linear, MultiPolygon, Strategy,
+ linear_tag, multi_polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Linear, MultiPolygon, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Linear const& linear,
+ MultiPolygon const& mp,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Linear,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(linear, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+//=================================================================
+
+template
+<
+ typename Polygon,
+ typename Segment,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon, Segment, Strategy,
+ polygon_tag, segment_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon, Segment, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon const& polygon,
+ Segment const& segment,
+ Strategy const& strategy)
+ {
+ return geometry::distance(segment, polygon, strategy);
+ }
+};
+
+template
+<
+ typename Polygon,
+ typename Linear,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon, Linear, Strategy,
+ polygon_tag, linear_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon, Linear, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon const& polygon,
+ Linear const& linear,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Polygon,
+ typename std::iterator_traits
+ <
+ segment_iterator<Linear const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(polygon,
+ geometry::segments_begin(linear),
+ geometry::segments_end(linear),
+ strategy);
+ }
+};
+
+template
+<
+ typename Polygon1,
+ typename Polygon2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon1, Polygon2, Strategy,
+ polygon_tag, polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon1, Polygon2, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon1 const& polygon1,
+ Polygon2 const& polygon2,
+ Strategy const& strategy)
+ {
+ return geometry::distance(polygon1, polygon2, strategy);
+ }
+};
+
+
+template
+<
+ typename Polygon,
+ typename MultiPoint,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon, MultiPoint, Strategy,
+ polygon_tag, multi_point_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon, MultiPoint, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon const& polygon,
+ MultiPoint const& mp,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Polygon,
+ typename boost::range_value<MultiPoint>::type,
+ Strategy
+ >
+ >::apply(polygon, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename Polygon,
+ typename MultiPolygon,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon, MultiPolygon, Strategy,
+ polygon_tag, multi_polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon, MultiPolygon, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon const& poly,
+ MultiPolygon const& mp,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Polygon,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(poly, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename Polygon,
+ typename Ring,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon, Ring, Strategy,
+ polygon_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon, Ring, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon const& polygon,
+ Ring const& ring,
+ Strategy const& strategy)
+ {
+ return geometry::distance(ring, polygon, strategy);
+ }
+};
+
+template
+<
+ typename Polygon,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Polygon, Box, Strategy,
+ polygon_tag, box_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Polygon, Box, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Polygon const& polygon,
+ Box const& box,
+ Strategy const& strategy)
+ {
+ return geometry::distance(box, polygon, strategy);
+ }
+};
+
+//========================================================================
+
+template
+<
+ typename MultiPoint1,
+ typename MultiPoint2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPoint1, MultiPoint2, Strategy,
+ multi_point_tag, multi_point_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPoint1, MultiPoint2, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPoint1 const& mp1,
+ MultiPoint2 const& mp2,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ MultiPoint1,
+ typename boost::range_value<MultiPoint2>::type,
+ Strategy
+ >
+ >::apply(mp1, boost::begin(mp2), boost::end(mp2), strategy);
+ }
+};
+
+template
+<
+ typename MultiPoint,
+ typename Linear,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPoint, Linear, Strategy,
+ multi_point_tag, linear_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPoint, Linear, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPoint const& mp,
+ Linear const& l,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ MultiPoint,
+ typename boost::range_value<Linear>::type,
+ Strategy
+ >
+ >::apply(mp, boost::begin(l), boost::end(l), strategy);
+ }
+};
+
+template
+<
+ typename MultiPoint,
+ typename MultiPolygon,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPoint, MultiPolygon, Strategy,
+ multi_point_tag, multi_polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPoint, MultiPolygon, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPoint const& mp,
+ MultiPolygon const& mpl,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ MultiPoint,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(mp, boost::begin(mpl), boost::end(mpl), strategy);
+ }
+};
+
+template
+<
+ typename MultiPoint,
+ typename Segment,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPoint, Segment, Strategy,
+ multi_point_tag, segment_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPoint, Segment, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPoint const& mp,
+ Segment const& segment,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ detail::distance_brute_force::distance_from_bg
+ >::apply(segment, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename MultiPoint,
+ typename Ring,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPoint, Ring, Strategy,
+ multi_point_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPoint, Ring, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPoint const& mp,
+ Ring const& ring,
+ Strategy const& strategy)
+ {
+
+
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ MultiPoint,
+ typename std::iterator_traits
+ <
+ segment_iterator<Ring const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(mp,
+ geometry::segments_begin(ring),
+ geometry::segments_end(ring),
+ strategy);
+ }
+};
+
+template
+<
+ typename MultiPoint,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPoint, Box, Strategy,
+ multi_point_tag, box_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPoint, Box, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPoint const& mp,
+ Box const& box,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Box,
+ typename boost::range_value<MultiPoint>::type,
+ Strategy
+ >
+ >::apply(box, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+//=====================================================================
+
+template
+<
+ typename MultiPolygon1,
+ typename MultiPolygon2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPolygon1, MultiPolygon2, Strategy,
+ multi_polygon_tag, multi_polygon_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPolygon1, MultiPolygon2, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPolygon1 const& mp1,
+ MultiPolygon2 const& mp2,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ MultiPolygon1,
+ typename boost::range_value<MultiPolygon2>::type,
+ Strategy
+ >
+ >::apply(mp1, boost::begin(mp2), boost::end(mp2), strategy);
+ }
+};
+
+template
+<
+ typename MultiPolygon,
+ typename Segment,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPolygon, Segment, Strategy,
+ multi_polygon_tag, segment_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPolygon, Segment, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPolygon const& mp,
+ Segment const& segment,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Segment,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(segment, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename MultiPolygon,
+ typename Ring,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPolygon, Ring, Strategy,
+ multi_polygon_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPolygon, Ring, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPolygon const& mp,
+ Ring const& ring,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Ring,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(ring, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+template
+<
+ typename MultiPolygon,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ MultiPolygon, Box, Strategy,
+ multi_polygon_tag, box_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ MultiPolygon, Box, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(MultiPolygon const& mp,
+ Box const& box,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Box,
+ typename boost::range_value<MultiPolygon>::type,
+ Strategy
+ >
+ >::apply(box, boost::begin(mp), boost::end(mp), strategy);
+ }
+};
+
+
+//========================================================================
+
+template
+<
+ typename Ring,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Ring, Box, Strategy,
+ ring_tag, box_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Ring, Box, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Ring const& ring,
+ Box const& box,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Box,
+ typename std::iterator_traits
+ <
+ segment_iterator<Ring const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(box,
+ geometry::segments_begin(ring),
+ geometry::segments_end(ring),
+ strategy);
+ }
+};
+
+template
+<
+ typename Ring1,
+ typename Ring2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Ring1, Ring2, Strategy,
+ ring_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Ring1, Ring2, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Ring1 const& ring1,
+ Ring2 const& ring2,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Ring1,
+ typename std::iterator_traits
+ <
+ segment_iterator<Ring2 const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(ring1,
+ geometry::segments_begin(ring2),
+ geometry::segments_end(ring2),
+ strategy);
+ }
+};
+
+//========================================================================
+
+template
+<
+ typename Segment1,
+ typename Segment2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Segment1, Segment2, Strategy,
+ segment_tag, segment_tag, false
+> : detail::distance_brute_force::distance_from_bg
+{};
+
+template
+<
+ typename Segment,
+ typename Ring,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Segment, Ring, Strategy,
+ segment_tag, ring_tag, false
+>
+{
+ typedef typename distance_result
+ <
+ Segment, Ring, Strategy
+ >::type distance_type;
+
+ static inline distance_type apply(Segment const& segment,
+ Ring const& ring,
+ Strategy const& strategy)
+ {
+ return detail::distance_brute_force::one_to_many
+ <
+ distance_brute_force
+ <
+ Segment,
+ typename std::iterator_traits
+ <
+ segment_iterator<Ring const>
+ >::value_type,
+ Strategy
+ >
+ >::apply(segment,
+ geometry::segments_begin(ring),
+ geometry::segments_end(ring),
+ strategy);
+ }
+};
+
+template
+<
+ typename Segment,
+ typename Box,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Segment, Box, Strategy,
+ segment_tag, box_tag, false
+> : detail::distance_brute_force::distance_from_bg
+{};
+
+//====================================================================
+
+template
+<
+ typename Box1,
+ typename Box2,
+ typename Strategy
+>
+struct distance_brute_force
+<
+ Box1, Box2, Strategy,
+ box_tag, box_tag, false
+> : detail::distance_brute_force::distance_from_bg
+{};
+
+} // namespace dispatch
+
+
+
+
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+inline typename distance_result<Geometry1, Geometry2, Strategy>::type
+distance_brute_force(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return dispatch::distance_brute_force
+ <
+ Geometry1, Geometry2, Strategy
+ >::apply(geometry1, geometry2, strategy);
+}
+
+} // namespace unit_test
+
+
+}} // namespace boost::geometry
+#endif // BOOST_GEOMETRY_TEST_DISTANCE_BRUTE_FORCE_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_ca_ar_ar.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_ar_ar.cpp
new file mode 100644
index 000000000..1971d8c35
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_ar_ar.cpp
@@ -0,0 +1,437 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_cartesian_areal_areal
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_common.hpp"
+
+
+typedef bg::model::point<int,2,bg::cs::cartesian> int_point_type;
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::polygon<point_type, false> polygon_type;
+typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+typedef bg::model::ring<point_type, false> ring_type;
+typedef bg::model::box<int_point_type> int_box_type;
+typedef bg::model::box<point_type> box_type;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::projected_point<> point_segment_strategy;
+typedef bg::strategy::distance::pythagoras_box_box<> box_box_strategy;
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_polygon_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<polygon_type, polygon_type> tester;
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,5 20,5 25,-5 25,-5 20))",
+ 10, 100, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,-5 5,5 5,5 20,-5 20))",
+ 0, 0, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,-5 -20,5 -20,5 20,-5 20))",
+ 0, 0, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10),\
+ (-5 -5,-5 5,5 5,5 -5,-5 -5))",
+ "polygon((-1 -1,0 0,-1 0,-1 -1))",
+ 4, 16, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_polygon_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ polygon_type, multi_polygon_type
+ > tester;
+
+ tester::apply("polygon((12 0,14 0,19 0,19.9 -1,12 0))",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0.1, 0.01, strategy);
+
+ tester::apply("polygon((19 0,19.9 -1,12 0,20.5 0.5,19 0))",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_polygon_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<polygon_type, ring_type> tester;
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,5 20,5 25,-5 25,-5 20))",
+ 10, 100, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,-5 5,5 5,5 20,-5 20))",
+ 0, 0, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,-5 -20,5 -20,5 20,-5 20))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipolygon_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipolygon/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_polygon_type, multi_polygon_type
+ > tester;
+
+ tester::apply("multipolygon(((12 0,14 0,14 1,12 0)),\
+ ((18 0,19 0,19.9 -1,18 0)))",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0.1, 0.01, strategy);
+
+ tester::apply("multipolygon(((18 0,19 0,19.9 -1,18 0)),\
+ ((12 0,14 0,20.5 0.5,12 0)))",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipolygon_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipolygon/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_polygon_type, ring_type
+ > tester;
+
+ tester::apply("multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ "polygon((12 0,14 0,19 0,19.9 -1,12 0))",
+ 0.1, 0.01, strategy);
+
+ tester::apply("multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ "polygon((19 0,19.9 -1,12 0,20.5 0.5,19 0))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_ring_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "ring/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<ring_type, ring_type> tester;
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,5 20,5 25,-5 25,-5 20))",
+ 10, 100, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,-5 5,5 5,5 20,-5 20))",
+ 0, 0, strategy);
+
+ tester::apply("polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ "polygon((-5 20,-5 -20,5 -20,5 20,-5 20))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_box_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "box/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<int_box_type, int_box_type> int_tester;
+ typedef test_distance_of_geometries<box_type, box_type> tester;
+
+ int_tester::apply("box(5 5,10 10)",
+ "box(0 0,1 1)",
+ sqrt(32.0), 32, strategy);
+
+ tester::apply("box(5 5,10 10)",
+ "box(0 0,1 1)",
+ sqrt(32.0), 32, strategy);
+
+ tester::apply("box(3 8,13 18)",
+ "box(0 0,5 5)",
+ 3, 9, strategy);
+
+ tester::apply("box(5 5,10 10)",
+ "box(0 0,5 5)",
+ 0, 0, strategy);
+
+ tester::apply("box(5 5,10 10)",
+ "box(0 0,6 6)",
+ 0, 0, strategy);
+
+ tester::apply("box(3 5,13 15)",
+ "box(0 0,5 5)",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_polygon_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<polygon_type, box_type> tester;
+
+ tester::apply("polygon((10 10,10 5,5 5,5 10,10 10))",
+ "box(0 0,1 1)",
+ sqrt(32.0), 32, strategy);
+
+ tester::apply("polygon((10 10,10 5,5 5,5 10,10 10))",
+ "box(0 0,5 5)",
+ 0, 0, strategy);
+
+ tester::apply("polygon((10 10,10 5,5 5,5 10,10 10))",
+ "box(0 0,6 6)",
+ 0, 0, strategy);
+
+ tester::apply("polygon((10 10,15 5,10 0,5 5,10 10))",
+ "box(5 0,7.5 2.5)",
+ 0, 0, strategy);
+
+ tester::apply("polygon((10 10,15 5,10 0,5 5,10 10))",
+ "box(5 0,6 1)",
+ sqrt(4.5), 4.5, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipolygon_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipolygon/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_polygon_type, box_type> tester;
+
+ tester::apply("multipolygon(((-10 -10,-10 -9,-9 -9,-9 -10,-10 -10)),\
+ ((2 2,2 3,3 3,3 2,2 2)))",
+ "box(0 0,1 1)",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("multipolygon(((-10 -10,-10 -9,-9 -9,-9 -10,-10 -10)),\
+ ((2 2,2 3,3 3,3 2,2 2)))",
+ "box(0 0,2 2)",
+ 0, 0, strategy);
+
+ tester::apply("multipolygon(((-10 -10,-10 -9,-9 -9,-9 -10,-10 -10)),\
+ ((2 2,2 3,3 3,3 2,2 2)))",
+ "box(0 0,2.5 2)",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_ring_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "ring/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<ring_type, box_type> tester;
+
+ tester::apply("polygon((10 10,10 5,5 5,5 10,10 10))",
+ "box(0 0,1 1)",
+ sqrt(32.0), 32, strategy);
+
+ tester::apply("polygon((10 10,10 5,5 5,5 10,10 10))",
+ "box(0 0,5 5)",
+ 0, 0, strategy);
+
+ tester::apply("polygon((10 10,10 5,5 5,5 10,10 10))",
+ "box(0 0,6 6)",
+ 0, 0, strategy);
+
+ tester::apply("polygon((10 10,15 5,10 0,5 5,10 10))",
+ "box(5 0,7.5 2.5)",
+ 0, 0, strategy);
+
+ tester::apply("polygon((10 10,15 5,10 0,5 5,10 10))",
+ "box(5 0,6 1)",
+ sqrt(4.5), 4.5, strategy);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_areal_areal(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::polygon<Point> polygon_empty;
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon_empty;
+ bg::model::ring<Point> ring_empty;
+
+ bg::model::polygon<Point> polygon =
+ from_wkt<bg::model::polygon<Point> >("polygon((0 0,1 0,0 1))");
+
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon =
+ from_wkt
+ <
+ bg::model::multi_polygon<bg::model::polygon<Point> >
+ >("multipolygon(((0 0,1 0,0 1)))");
+
+ bg::model::ring<Point> ring =
+ from_wkt<bg::model::ring<Point> >("polygon((0 0,1 0,0 1))");
+
+ // 1st geometry is empty
+ test_empty_input(polygon_empty, polygon, strategy);
+ test_empty_input(polygon_empty, multipolygon, strategy);
+ test_empty_input(polygon_empty, ring, strategy);
+ test_empty_input(multipolygon_empty, polygon, strategy);
+ test_empty_input(multipolygon_empty, multipolygon, strategy);
+ test_empty_input(multipolygon_empty, ring, strategy);
+ test_empty_input(ring_empty, polygon, strategy);
+ test_empty_input(ring_empty, multipolygon, strategy);
+ test_empty_input(ring_empty, ring, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(polygon, polygon_empty, strategy);
+ test_empty_input(polygon, multipolygon_empty, strategy);
+ test_empty_input(polygon, ring_empty, strategy);
+ test_empty_input(multipolygon, polygon_empty, strategy);
+ test_empty_input(multipolygon, multipolygon_empty, strategy);
+ test_empty_input(multipolygon, ring_empty, strategy);
+ test_empty_input(ring, polygon_empty, strategy);
+ test_empty_input(ring, multipolygon_empty, strategy);
+ test_empty_input(ring, ring_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(polygon_empty, polygon_empty, strategy);
+ test_empty_input(polygon_empty, multipolygon_empty, strategy);
+ test_empty_input(polygon_empty, ring_empty, strategy);
+ test_empty_input(multipolygon_empty, polygon_empty, strategy);
+ test_empty_input(multipolygon_empty, multipolygon_empty, strategy);
+ test_empty_input(multipolygon_empty, ring_empty, strategy);
+ test_empty_input(ring_empty, polygon_empty, strategy);
+ test_empty_input(ring_empty, multipolygon_empty, strategy);
+ test_empty_input(ring_empty, ring_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_polygon_polygon )
+{
+ test_distance_polygon_polygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_polygon_multipolygon )
+{
+ test_distance_polygon_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_polygon_ring )
+{
+ test_distance_polygon_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipolygon_multipolygon )
+{
+ test_distance_multipolygon_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipolygon_ring )
+{
+ test_distance_multipolygon_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_ring_ring )
+{
+ test_distance_ring_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_box_box )
+{
+ test_distance_box_box(box_box_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_polygon_box )
+{
+ test_distance_polygon_box(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipolygon_box )
+{
+ test_distance_multipolygon_box(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_ring_box )
+{
+ test_distance_ring_box(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_areal_areal )
+{
+ test_more_empty_input_areal_areal<point_type>(point_segment_strategy());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_ar.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_ar.cpp
new file mode 100644
index 000000000..60a1e1c5b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_ar.cpp
@@ -0,0 +1,972 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_cartesian_linear_areal
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_common.hpp"
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::point<int,2,bg::cs::cartesian> int_point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::segment<int_point_type> int_segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+typedef bg::model::polygon<point_type, false> polygon_type;
+typedef bg::model::polygon<point_type, false, false> open_polygon_type;
+typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+typedef bg::model::multi_polygon<open_polygon_type> open_multipolygon_type;
+typedef bg::model::ring<point_type, false> ring_type;
+typedef bg::model::box<point_type> box_type;
+typedef bg::model::box<int_point_type> int_box_type;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::pythagoras<> point_point_strategy;
+typedef bg::strategy::distance::projected_point<> point_segment_strategy;
+typedef bg::strategy::distance::cartesian_segment_box<> segment_box_strategy;
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<segment_type, polygon_type> tester;
+
+ tester::apply("segment(-1 20,1 20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("segment(1 20,2 40)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("segment(-1 20,-1 5)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("segment(-1 20,-1 -20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("segment(0 0,1 1)",
+ "polygon((2 2))",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<linestring_type, polygon_type> tester;
+
+ tester::apply("linestring(-1 20,1 20,1 30)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("linestring(-5 1,-2 1)",
+ "polygon((0 0,10 0,10 10,0 10,0 0))",
+ 2, 4, strategy);
+
+ tester::apply("linestring(-1 20,1 20,1 5)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("linestring(-1 20,1 20,1 -20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("linestring(-2 1)",
+ "polygon((0 0,10 0,10 10,0 10,0 0))",
+ 2, 4, strategy);
+
+ tester::apply("linestring(-5 1,-2 1)",
+ "polygon((0 0))",
+ sqrt(5.0), 5, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_open_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/open polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, open_polygon_type
+ > tester;
+
+ tester::apply("linestring(-5 1,-2 1)",
+ "polygon((0 0,10 0,10 10,0 10))",
+ 2, 4, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multilinestring_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_linestring_type, polygon_type
+ > tester;
+
+ tester::apply("multilinestring((-100 -100,-90 -90),(-1 20,1 20,1 30))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("multilinestring((-1 20,1 20,1 30),(-1 20,1 20,1 5))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("multilinestring((-1 20,1 20,1 30),(-1 20,1 20,1 -20))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("multilinestring((-100 -100,-90 -90),(1 20))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("multilinestring((-100 -100,-90 -90),(-1 20,1 20,1 30))",
+ "polygon((-110 -110))",
+ sqrt(200.0), 200, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ segment_type, multi_polygon_type
+ > tester;
+
+ tester::apply("segment(-1 20,1 20)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((0 22,-1 30, 2 40,0 22)))",
+ 2, 4, strategy);
+
+ tester::apply("segment(12 0,14 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 2, 4, strategy);
+
+ tester::apply("segment(12 0,20.5 0.5)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+
+ tester::apply("segment(12 0,50 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, multi_polygon_type
+ > tester;
+
+ tester::apply("linestring(-1 20,1 20)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((0 22,-1 30, 2 40,0 22)))",
+ 2, 4, strategy);
+
+ tester::apply("linestring(12 0,14 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 2, 4, strategy);
+
+ tester::apply("linestring(12 0,20.5 0.5)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+
+ tester::apply("linestring(12 0,50 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_open_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/open multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, open_multipolygon_type
+ > tester;
+
+ tester::apply("linestring(-5 1,-2 1)",
+ "multipolygon(((0 0,10 0,10 10,0 10)))",
+ 2, 4, strategy);
+
+ tester::apply("linestring(-5 1,-3 1)",
+ "multipolygon(((20 20,21 20,21 21,20 21)),((0 0,10 0,10 10,0 10)))",
+ 3, 9, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multilinestring_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_linestring_type, multi_polygon_type
+ > tester;
+
+ tester::apply("multilinestring((12 0,14 0),(19 0,19.9 -1))",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10)))",
+ 0.1, 0.01, strategy);
+
+ tester::apply("multilinestring((19 0,19.9 -1),(12 0,20.5 0.5))",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<segment_type, ring_type> tester;
+
+ tester::apply("segment(-1 20,1 20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("segment(1 20,2 40)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("segment(-1 20,-1 5)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("segment(-1 20,-1 -20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<linestring_type, ring_type> tester;
+
+ tester::apply("linestring(-1 20,1 20,1 30)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("linestring(-1 20,1 20,1 5)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("linestring(-1 20,1 20,1 -20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multilinestring_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_linestring_type, ring_type
+ > tester;
+
+ tester::apply("multilinestring((-100 -100,-90 -90),(-1 20,1 20,1 30))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("multilinestring((-1 20,1 20,1 30),(-1 20,1 20,1 5))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("multilinestring((-1 20,1 20,1 30),(-1 20,1 20,1 -20))",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "2D segment/box distance tests" << std::endl;
+#endif
+ typedef int_box_type B;
+ typedef segment_type S;
+ typedef int_segment_type IS;
+
+ typedef test_distance_of_geometries<B, S> tester;
+ typedef test_distance_of_geometries<B, IS> itester;
+
+ // 1st example by Adam Wulkiewicz
+ tester::apply("BOX(5 51,42 96)",
+ "SEGMENT(6.6799994 95.260002,35.119999 56.340004)",
+ 0, 0, strategy);
+
+ // 2nd example by Adam Wulkiewicz
+ tester::apply("BOX(51 55,94 100)",
+ "SEGMENT(92.439995 50.130001,59.959999 80.870003)",
+ 0, 0, strategy);
+
+ // segments that intersect the box
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 0.5,0.5 0.75)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 0.5,1.5 0.75)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -1,0.5 2)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 1,1.5 0.75)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(2 0,0 2)",
+ 0, 0, strategy);
+
+ // segment that has closest point on box boundary
+ tester::apply("box(0 0,1 1)",
+ "segment(4 0.5,5 0.75)",
+ 3, 9, strategy);
+
+ // segment that has closest point on box corner
+ tester::apply("box(0 0,1 1)",
+ "segment(4 0,0 4)",
+ sqrt(2.0), 2, strategy);
+ itester::apply("box(0 0,1 1)",
+ "segment(-4 0,0 -4)",
+ sqrt(8.0), 8, strategy);
+ itester::apply("box(0 0,1 1)",
+ "segment(-8 4,4 -8)",
+ sqrt(8.0), 8, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-4 0,0 4)",
+ 1.5 * sqrt(2.0), 4.5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-4 0,1 5)",
+ 1.5 * sqrt(2.0), 4.5, strategy);
+ itester::apply("box(0 0,1 1)",
+ "segment(0 -2,3 1)",
+ 0.5 * sqrt(2.0), 0.5, strategy);
+ itester::apply("box(0 0,1 1)",
+ "segment(0 -2,2 2)",
+ 0, 0, strategy);
+
+ // horizontal segments
+ itester::apply("box(0 0,1 1)",
+ "segment(-2 -1,-1 -1)",
+ sqrt(2.0), 2, strategy);
+ itester::apply("box(0 0,1 1)",
+ "segment(-1 -1,0 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-0.5 -1,0.5 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -1,0.75 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -1,1.25 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 -1,2 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(2 -1,3 -1)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -1,2 -1)",
+ 1, 1, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 0,-1 0)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 0,0 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-0.5 0,0.5 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 0,0.75 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 0,1.25 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 0,2 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(2 0,3 0)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 0,2 0)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 0.5,-1 0.5)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 0.5,0 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-0.5 0.5,0.5 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 0.5,0.75 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 0.5,1.25 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 0.5,2 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(2 0.5,3 0.5)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 0.5,2 0.5)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 1,-1 1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 1,0 1)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-0.5 1,0.5 1)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 1,0.75 1)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 1,1.25 1)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 1,2 1)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(2 1,3 1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 1,2 1)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 3,-1 3)",
+ sqrt(5.0), 5, strategy);
+ itester::apply("box(0 0,1 1)",
+ "segment(-1 3,0 3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-0.5 3,0.5 3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 3,0.75 3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 3,1.25 3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 3,2 3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(2 3,3 3)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 3,2 3)",
+ 2, 4, strategy);
+
+ // vertical segments
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -2,-1 -1)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -1,-1 0)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -0.5,-1 0.5)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 0.5,-1 0.75)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 0.5,-1 1.25)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 1,-1 2)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 2,-1 3)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -2,-1 2)",
+ 1, 1, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(0 -2,0 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 -1,0 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 -0.5,0 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 0.5,0 0.75)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 0.5,0 1.25)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 1,0 2)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 2,0 3)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 -2,0 2)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -2,0.5 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -1,0.5 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -0.5,0.5 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 0.5,0.5 0.75)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 0.5,0.5 1.25)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 1,0.5 2)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 2,0.5 3)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -2,0.5 2)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(1 -2,1 -1)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 -1,1 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 -0.5,1 0.5)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 0.5,1 0.75)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 0.5,1 1.25)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 1,1 2)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 2,1 3)",
+ 1, 1, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 -2,1 2)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,1 1)",
+ "segment(3 -2,3 -1)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 -1,3 0)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 -0.5,3 0.5)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 0.5,3 0.75)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 0.5,3 1.25)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 1,3 2)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 2,3 3)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 -2,3 2)",
+ 2, 4, strategy);
+
+ // positive slope
+ itester::apply("box(0 0,1 1)",
+ "segment(-2 -2,-1 -1)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,0 -0.5)",
+ 0.5, 0.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,0.5 -0.5)",
+ 0.5, 0.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,1 -0.5)",
+ 0.5, 0.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,2 0)",
+ sqrt(0.2), 0.2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,4 1)",
+ sqrt(0.2), 0.2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,-1.5 0)",
+ 1.5, 2.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,-1.5 0.5)",
+ 1.5, 2.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,-1.5 1)",
+ 1.5, 2.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,0 2)",
+ sqrt(0.2), 0.2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,1 4)",
+ sqrt(0.2), 0.2, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,4 2)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,2 4)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,4 3)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,3 4)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,3 3)",
+ 0, 0, strategy);
+
+ // negative slope
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 -2,-1 -3)",
+ sqrt(8.0), 8, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-3 -1,0 -4)",
+ sqrt(8.0), 8, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 0.75,-1.5 0.5)",
+ 1.5, 2.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 1.5,-1.5 0.5)",
+ 1.5, 2.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 2,0.75 1.5)",
+ 0.5, 0.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 2,0.75 1.5)",
+ 0.5, 0.25, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 2,2 0)",
+ 0, 0, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0 3,3 0)",
+ sqrt(0.5), 0.5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 4,4 -1)",
+ sqrt(0.5), 0.5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 4,0 3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-2 5,-1 4)",
+ sqrt(10.0), 10, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(3 -1,4 -4)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(1 2,2 1)",
+ sqrt(0.5), 0.5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 -2,2 -3)",
+ 2, 4, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -2,0 -3)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -2,0.5 -3.5)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(-1 -2,0.5 -3.5)",
+ sqrt(5.0), 5, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 3,2.5 2)",
+ sqrt(2.45), 2.45, strategy);
+ tester::apply("box(0 0,1 1)",
+ "segment(0.5 1.5,1.5 -1.5)",
+ 0, 0, strategy);
+
+ // test degenerate segment
+ tester::apply("box(0 0,2 2)",
+ "segment(4 1,4 1)",
+ 2, 4, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<linestring_type, box_type> tester;
+
+ // linestrings that intersect the box
+ tester::apply("linestring(-1 0.5,0.5 0.75)",
+ "box(0 0,1 1)",
+ 0, 0, strategy);
+ tester::apply("linestring(-1 0.5,1.5 0.75)",
+ "box(0 0,1 1)",
+ 0, 0, strategy);
+
+ // linestring that has closest point on box boundary
+ tester::apply("linestring(4 0.5,5 0.75)",
+ "box(0 0,1 1)",
+ 3, 9, strategy);
+
+ // linestring that has closest point on box corner
+ tester::apply("linestring(4 0,0 4)",
+ "box(0 0,1 1)",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multilinestring_box(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_linestring_type, box_type> tester;
+
+ // multilinestring that intersects the box
+ tester::apply("multilinestring((-1 0.5,0.5 0.75),(4 0.5,5 0.75))",
+ "box(0 0,1 1)",
+ 0, 0, strategy);
+
+ // multilinestring that has closest point on box boundary
+ tester::apply("multilinestring((4 0.5,5 0.75))",
+ "box(0 0,1 1)",
+ 3, 9, strategy);
+
+ // multilinestring that has closest point on box corner
+ tester::apply("multilinestring((5 0,0 5),(4 0,0 4))",
+ "box(0 0,1 1)",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_linear_areal(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::linestring<Point> line_empty;
+ bg::model::polygon<Point> polygon_empty;
+ bg::model::multi_linestring<bg::model::linestring<Point> > multiline_empty;
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon_empty;
+ bg::model::ring<Point> ring_empty;
+
+ bg::model::linestring<Point> line =
+ from_wkt<bg::model::linestring<Point> >("linestring(0 0,1 1)");
+
+ bg::model::polygon<Point> polygon =
+ from_wkt<bg::model::polygon<Point> >("polygon((0 0,1 0,0 1))");
+
+ bg::model::ring<Point> ring =
+ from_wkt<bg::model::ring<Point> >("polygon((0 0,1 0,0 1))");
+
+ // 1st geometry is empty
+ test_empty_input(line_empty, polygon, strategy);
+ test_empty_input(line_empty, ring, strategy);
+ test_empty_input(multiline_empty, polygon, strategy);
+ test_empty_input(multiline_empty, ring, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(line, polygon_empty, strategy);
+ test_empty_input(line, multipolygon_empty, strategy);
+ test_empty_input(line, ring_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(line_empty, polygon_empty, strategy);
+ test_empty_input(line_empty, multipolygon_empty, strategy);
+ test_empty_input(line_empty, ring_empty, strategy);
+ test_empty_input(multiline_empty, polygon_empty, strategy);
+ test_empty_input(multiline_empty, multipolygon_empty, strategy);
+ test_empty_input(multiline_empty, ring_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_segment_polygon )
+{
+ test_distance_segment_polygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_polygon )
+{
+ test_distance_linestring_polygon(point_segment_strategy());
+ test_distance_linestring_open_polygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multilinestring_polygon )
+{
+ test_distance_multilinestring_polygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_segment_multipolygon )
+{
+ test_distance_segment_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_multipolygon )
+{
+ test_distance_linestring_multipolygon(point_segment_strategy());
+ test_distance_linestring_open_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multilinestring_multipolygon )
+{
+ test_distance_multilinestring_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_segment_ring )
+{
+ test_distance_segment_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_ring )
+{
+ test_distance_linestring_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multilinestring_ring )
+{
+ test_distance_multilinestring_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_segment_box )
+{
+ test_distance_segment_box(segment_box_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_box )
+{
+ test_distance_linestring_box(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multilinestring_box )
+{
+ test_distance_multilinestring_box(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_linear_areal )
+{
+ test_more_empty_input_linear_areal<point_type>(point_segment_strategy());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_l.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_l.cpp
new file mode 100644
index 000000000..62a5de869
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_l_l.cpp
@@ -0,0 +1,321 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_cartesian_linear_linear
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_common.hpp"
+
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::projected_point<> point_segment_strategy;
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_segment(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<segment_type, segment_type> tester;
+
+ tester::apply("segment(0 0,10 0)",
+ "segment(4 2,4 0.5)",
+ return_type(0.5), return_type(0.25), strategy);
+
+ tester::apply("segment(0 0,10 0)",
+ "segment(4 2,4 -0.5)",
+ return_type(0), return_type(0), strategy);
+
+ tester::apply("segment(0 0,10 0)",
+ "segment(4 2,0 0)",
+ return_type(0), return_type(0), strategy);
+
+ tester::apply("segment(0 0,10 0)",
+ "segment(-2 3,1 2)",
+ return_type(2), return_type(4), strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_linestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/linestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<segment_type, linestring_type> tester;
+
+ tester::apply("segment(-1 -1,-2 -2)",
+ "linestring(2 1,1 2,4 0)",
+ sqrt(12.5), 12.5, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "linestring(2 1,1 2,4 0)",
+ 0, 0, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "linestring(3 3,3 3)",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "linestring(3 3)",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_linestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/linestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, linestring_type
+ > tester;
+
+ // It is not obvious that linestrings with only one point are valid
+ tester::apply("linestring(1 1)", "linestring(2 1)",
+ 1, 1, strategy);
+
+ tester::apply("linestring(1 1,3 1)", "linestring(2 1)",
+ 0, 0, strategy);
+
+ tester::apply("linestring(1 1)", "linestring(0 0,-2 0,2 -2,2 0)",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("linestring(1 1,1 1)", "linestring(2 1,2 1)",
+ 1, 1, strategy);
+
+ tester::apply("linestring(1 1,1 1,1 1)", "linestring(2 1,2 1,2 1,2 1)",
+ 1, 1, strategy);
+
+ tester::apply("linestring(1 1,3 1)", "linestring(2 1,2 1)",
+ 0, 0, strategy);
+
+ tester::apply("linestring(1 1,1 1)", "linestring(0 0,-2 0,2 -2,2 0)",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("linestring(1 1,3 1)", "linestring(2 1, 4 1)",
+ 0, 0, strategy);
+
+ tester::apply("linestring(1 1,2 2,3 3)", "linestring(2 1,1 2,4 0)",
+ 0, 0, strategy);
+
+ tester::apply("linestring(1 1,2 2,3 3)", "linestring(1 0,2 -1,4 0)",
+ 1, 1, strategy);
+
+ tester::apply("linestring(1 1,2 2,3 3)",
+ "linestring(1 -10,2 0,2.1 -10,4 0)",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("linestring(1 1,2 2,3 3)",
+ "linestring(1 -10,2 1.9,2.1 -10,4 0)",
+ sqrt(0.005), 0.005, strategy);
+
+ tester::apply("linestring(1 1,1 2)", "linestring(0 0,-2 0,2 -2,2 0)",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_segment_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ segment_type, multi_linestring_type
+ > tester;
+
+ tester::apply("segment(-1 -1,-2 -2)",
+ "multilinestring((2 1,1 2),(4 0,4 10))",
+ sqrt(12.5), 12.5, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "multilinestring((2 1,1 2),(4 0,4 10))",
+ 0, 0, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "multilinestring((2.5 0,4 0,5 0),(3 3,3 3))",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "multilinestring((2.5 0),(3 3,3 3))",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("segment(1 1,2 2)",
+ "multilinestring((2.5 0,4 0,5 0),(3 3))",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multilinestring distance tests" << std::endl;
+#endif
+
+ typedef test_distance_of_geometries
+ <
+ linestring_type, multi_linestring_type
+ > tester;
+
+ tester::apply("linestring(1 1,2 2,3 3)",
+ "multilinestring((2 1,1 2,4 0),(1 -10,2 1.9,2.1 -10,4 0))",
+ 0, 0, strategy);
+
+ tester::apply("linestring(1 1,2 2,3 3)",
+ "multilinestring((1 -10,2 0,2.1 -10,4 0),(1 -10,2 1.9,2.1 -10,4 0))",
+ sqrt(0.005), 0.005, strategy);
+
+ tester::apply("linestring(1 1,2 2)",
+ "multilinestring((2.5 0,4 0,5 0),(3 3,3 3))",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("linestring(2 2)",
+ "multilinestring((2.5 0,4 0,5 0),(3 3,3 3))",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("linestring(1 1,2 2)",
+ "multilinestring((2.5 0,4 0,5 0),(3 3))",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("linestring(1 1,2 2,3 3,4 4,5 5,6 6,7 7,8 8,9 9)",
+ "multilinestring((2.5 0,4 0,5 0),(10 10,10 10))",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multilinestring_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/multilinestring distance tests" << std::endl;
+#endif
+
+ typedef test_distance_of_geometries
+ <
+ multi_linestring_type, multi_linestring_type
+ > tester;
+
+ tester::apply("multilinestring((0 0,0 1,1 1),(10 0,11 1,12 2))",
+ "multilinestring((0.5 0.5,0.75 0.75),(11 0,11 7))",
+ 0, 0, strategy);
+
+ tester::apply("multilinestring((0 0,0 1,1 1),(10 0,11 1,12 2))",
+ "multilinestring((0.5 0.5,0.75 0.75),(11 0,11 0.9))",
+ sqrt(0.005), 0.005, strategy);
+
+ tester::apply("multilinestring((0 0,0 1,1 1),(10 0,11 1,12 2))",
+ "multilinestring((0.5 0.5,0.75 0.75),(11.1 0,11.1 0.9))",
+ sqrt(0.02), 0.02, strategy);
+
+ tester::apply("multilinestring((0 0),(1 1))",
+ "multilinestring((2 2),(3 3))",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_linear_linear(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::linestring<Point> line_empty;
+ bg::model::multi_linestring<bg::model::linestring<Point> > multiline_empty;
+
+ bg::model::linestring<Point> line =
+ from_wkt<bg::model::linestring<Point> >("linestring(0 0,1 1)");
+
+ // 1st geometry is empty
+ test_empty_input(line_empty, line, strategy);
+ test_empty_input(multiline_empty, line, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(line, line_empty, strategy);
+ test_empty_input(line, multiline_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(line_empty, line_empty, strategy);
+ test_empty_input(line_empty, multiline_empty, strategy);
+ test_empty_input(multiline_empty, multiline_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_segment_segment )
+{
+ test_distance_segment_segment(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_segment_linestring )
+{
+ test_distance_segment_linestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_linestring )
+{
+ test_distance_linestring_linestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_segment_multilinestring )
+{
+ test_distance_segment_multilinestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_multilinestring )
+{
+ test_distance_linestring_multilinestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multilinestring_multilinestring )
+{
+ test_distance_multilinestring_multilinestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_linear_linear )
+{
+ test_more_empty_input_linear_linear<point_type>(point_segment_strategy());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_ar.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_ar.cpp
new file mode 100644
index 000000000..2eb132bc8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_ar.cpp
@@ -0,0 +1,671 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_cartesian_pointlike_areal
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_common.hpp"
+
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::point<double,3,bg::cs::cartesian> point_type_3d;
+typedef bg::model::multi_point<point_type_3d> multi_point_type_3d;
+typedef bg::model::polygon<point_type, false> polygon_type;
+typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+typedef bg::model::ring<point_type, false> ring_type;
+typedef bg::model::box<point_type> box_type;
+typedef bg::model::box<point_type_3d> box_type_3d;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::pythagoras<> point_point_strategy;
+typedef bg::strategy::distance::projected_point<> point_segment_strategy;
+typedef bg::strategy::distance::pythagoras_point_box<> point_box_strategy;
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, polygon_type> tester;
+
+ tester::apply("point(0 -20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("point(12 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 2, 4, strategy);
+
+ tester::apply("point(0 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("point(0 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10),\
+ (-5 -5,-5 5,5 5,5 -5,-5 -5))",
+ 5, 25, strategy);
+
+ // polygons with single-point rings
+ tester::apply("point(0 0)",
+ "polygon((-5 5))",
+ sqrt(50.0), 50, strategy);
+
+ tester::apply("point(0 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10),(-5 5))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, ring_type> tester;
+
+ tester::apply("point(0 -20)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 10, 100, strategy);
+
+ tester::apply("point(12 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 2, 4, strategy);
+
+ tester::apply("point(0 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ // single-point rings
+ tester::apply("point(0 0)",
+ "polygon((-10 -10))",
+ sqrt(200.0), 200, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, multi_polygon_type> tester;
+
+ tester::apply("point(0 -20)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((0 22,-1 30,2 40,0 22)))",
+ 10, 100, strategy);
+
+ tester::apply("point(12 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 2, 4, strategy);
+
+ tester::apply("point(0 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+
+ tester::apply("point(0 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10),\
+ (-5 -5,-5 5,5 5,5 -5,-5 -5)),\
+ ((100 0,101 0,101 1,100 1,100 0)))",
+ 5, 25, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_polygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/polygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_point_type, polygon_type> tester;
+
+ tester::apply("multipoint(0 -20,0 -15)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 5, 25, strategy);
+
+ tester::apply("multipoint(16 0,12 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 2, 4, strategy);
+
+ tester::apply("multipoint(0 0,5 5,4 4)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ tester::apply("multipoint(0 0,2 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10),\
+ (-5 -5,-5 5,5 5,5 -5,-5 -5))",
+ 3, 9, strategy);
+
+ tester::apply("multipoint(4 4,11 11)",
+ "polygon((0 0,0 10,10 10,10 0,0 0))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_ring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/ring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_point_type, ring_type> tester;
+
+ tester::apply("multipoint(0 -20,0 -15)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 5, 25, strategy);
+
+ tester::apply("multipoint(16 0,12 0)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 2, 4, strategy);
+
+ tester::apply("multipoint(0 0,5 5,4 4)",
+ "polygon((-10 -10,10 -10,10 10,-10 10,-10 -10))",
+ 0, 0, strategy);
+
+ // single-point ring
+ tester::apply("multipoint(0 0,5 5,4 4)",
+ "polygon((10 10))",
+ sqrt(50.0), 50, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_multipolygon(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multipolygon distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_point_type, multi_polygon_type
+ > tester;
+
+ tester::apply("multipoint(0 -20,0 -15)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((0 22,-1 30,2 40,0 22)))",
+ 5, 25, strategy);
+
+ tester::apply("multipoint(16 0,12 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 2, 4, strategy);
+
+ tester::apply("multipoint(0 0,4 4,5 5)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10)),\
+ ((20 -1,21 2,30 -10,20 -1)))",
+ 0, 0, strategy);
+
+ tester::apply("multipoint(0 0,2 0)",
+ "multipolygon(((-10 -10,10 -10,10 10,-10 10,-10 -10),\
+ (-5 -5,-5 5,5 5,5 -5,-5 -5)),\
+ ((100 0,101 0,101 1,100 1,100 0)))",
+ 3, 9, strategy);
+
+ tester::apply("MULTIPOINT(19 19,100 100)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),\
+ (4 4,4 6,6 6,6 4,4 4)), ((10 10,10 20,20 20,20 10,10 10),\
+ (14 14,14 16,16 16,16 14,14 14)))",
+ 0, 0, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_box_2d(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "2D point/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<box_type, point_type> tester;
+
+ // point inside box
+ tester::apply("box(-1 -1,1 1)",
+ "point(0 0)", 0, 0, strategy);
+
+ // points on box corners
+ tester::apply("box(-1 -1,1 1)",
+ "point(-1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(-1 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(1 1)", 0, 0, strategy);
+
+ // points on box boundary edges
+ tester::apply("box(-1 -1,1 1)",
+ "point(0 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(-1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(0 1)", 0, 0, strategy);
+
+ // points outside box
+ tester::apply("box(-1 -1,1 1)",
+ "point(0 4)", 3, 9, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(0.5 4)", 3, 9, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(-0.5 5)", 4, 16, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(3 0.25)", 2, 4, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(-3 -0.25)", 2, 4, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(3 5)", sqrt(20.0), 20, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(-5 -4)", 5, 25, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(2 -2)", sqrt(2.0), 2, strategy);
+ tester::apply("box(-1 -1,1 1)",
+ "point(-3 4)", sqrt(13.0), 13, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_box_different_point_types(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "2D point/box distance tests with different points"
+ << std::endl;
+#endif
+ typedef point_type double_point;
+ typedef box_type double_box;
+ typedef bg::model::point<int,2,bg::cs::cartesian> int_point;
+ typedef bg::model::box<int_point> int_box;
+
+ test_distance_of_geometries
+ <
+ int_point, int_box
+ >::apply("point(0 0)",
+ "box(1 1, 2 2)",
+ sqrt(2.0), 2, strategy);
+
+ test_distance_of_geometries
+ <
+ double_point, int_box
+ >::apply("point(0.5 0)",
+ "box(1 -1,2 1)",
+ 0.5, 0.25, strategy);
+
+ test_distance_of_geometries
+ <
+ double_point, double_box
+ >::apply("point(1.5 0)",
+ "box(1 -1,2 1)",
+ 0, 0, strategy);
+
+ test_distance_of_geometries
+ <
+ double_point, int_box
+ >::apply("point(1.5 0)",
+ "box(1 -1,2 1)",
+ 0, 0, strategy);
+
+ test_distance_of_geometries
+ <
+ int_point, double_box
+ >::apply("point(1 0)",
+ "box(0.5 -1,1.5 1)",
+ 0, 0, strategy);
+
+ test_distance_of_geometries
+ <
+ int_point, double_box
+ >::apply("point(0 0)",
+ "box(0.5, -1,1.5, 1)",
+ 0.5, 0.25, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_box_3d(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "3D point/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<box_type_3d, point_type_3d> tester;
+
+ // point inside box
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 0 0)", 0, 0, strategy);
+
+ // points on box corners
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 -1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 -1 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 1 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 -1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 -1 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 1 1)", 0, 0, strategy);
+
+ // points on box boundary edges
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 -1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 -1 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 1 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 1 1)", 0, 0, strategy);
+
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 0 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 0 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 0 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 0 1)", 0, 0, strategy);
+
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 -1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 -1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 1 0)", 0, 0, strategy);
+
+ // point on box faces
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 0 -1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 0 1)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 -1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 1 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-1 0 0)", 0, 0, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(1 0 0)", 0, 0, strategy);
+
+ // points outside box -- closer to box corners
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-2 -3 -4)", sqrt(14.0), 14, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-2 -3 3)", 3, 9, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-2 5 -2)", sqrt(18.0), 18, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-2 5 3)", sqrt(21.0), 21, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(4 -6 -3)", sqrt(38.0), 38, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(4 -6 4)", sqrt(43.0), 43, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(4 7 -2)", sqrt(46.0), 46, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(4 7 8)", sqrt(94.0), 94, strategy);
+
+
+ // points closer to box facets
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 0 10)", 9, 81, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 0 -5)", 4, 16, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 7 0)", 6, 36, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 -6 0)", 5, 25, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(4 0 0)", 3, 9, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-3 0 0)", 2, 4, strategy);
+
+ // points closer to box edges
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 -4 -5)", 5, 25, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 -3 6)", sqrt(29.0), 29, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 2 -7)", sqrt(37.0), 37, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(0 8 7)", sqrt(85.0), 85, strategy);
+
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-4 0 -4)", sqrt(18.0), 18, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-3 0 5)", sqrt(20.0), 20, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(2 0 -6)", sqrt(26.0), 26, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(8 0 6)", sqrt(74.0), 74, strategy);
+
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-5 -5 0)", sqrt(32.0), 32, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(-4 6 0)", sqrt(34.0), 34, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(3 -7 0)", sqrt(40.0), 40, strategy);
+ tester::apply("box(-1 -1 -1,1 1 1)",
+ "point(9 7 0)", 10, 100, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_box_2d(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "2D multipoint/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<box_type, multi_point_type> tester;
+
+ // at least one point inside the box
+ tester::apply("box(0 0,10 10)",
+ "multipoint(0 0,-1 -1,20 20)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,10 10)",
+ "multipoint(1 1,-1 -1,20 20)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0,10 10)",
+ "multipoint(1 1,2 2,3 3)",
+ 0, 0, strategy);
+
+ // all points outside the box
+ tester::apply("box(0 0,10 10)",
+ "multipoint(-1 -1,20 20)",
+ sqrt(2.0), 2, strategy);
+
+ tester::apply("box(0 0,10 10)",
+ "multipoint(5 13, 50 50)",
+ 3, 9, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_box_3d(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "3D multipoint/box distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ box_type_3d, multi_point_type_3d
+ > tester;
+
+ // at least one point inside the box
+ tester::apply("box(0 0 0,10 10 10)",
+ "multipoint(0 0 0,-1 -1 -1,20 20 20)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0 0,10 10 10)",
+ "multipoint(1 1 1,-1 -1 -1,20 20 20)",
+ 0, 0, strategy);
+
+ tester::apply("box(0 0 0,10 10 10)",
+ "multipoint(1 1 1,2 2 2,3 3 3)",
+ 0, 0, strategy);
+
+ // all points outside the box
+ tester::apply("box(0 0 0,10 10 10)",
+ "multipoint(-1 -1 -1,20 20 20)",
+ sqrt(3.0), 3, strategy);
+
+ tester::apply("box(0 0 0,10 10 10)",
+ "multipoint(5 5 13,50 50 50)",
+ 3, 9, strategy);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_pointlike_areal(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::multi_point<Point> multipoint_empty;
+ bg::model::polygon<Point> polygon_empty;
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon_empty;
+ bg::model::ring<Point> ring_empty;
+
+ Point point = from_wkt<Point>("point(0 0)");
+ bg::model::polygon<Point> polygon =
+ from_wkt<bg::model::polygon<Point> >("polygon((0 0,1 0,0 1))");
+ bg::model::ring<Point> ring =
+ from_wkt<bg::model::ring<Point> >("polygon((0 0,1 0,0 1))");
+
+ // 1st geometry is empty
+ test_empty_input(multipoint_empty, polygon, strategy);
+ test_empty_input(multipoint_empty, ring, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(point, polygon_empty, strategy);
+ test_empty_input(point, multipolygon_empty, strategy);
+ test_empty_input(point, ring_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(multipoint_empty, polygon_empty, strategy);
+ test_empty_input(multipoint_empty, multipolygon_empty, strategy);
+ test_empty_input(multipoint_empty, ring_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_pointlike_polygon )
+{
+ test_distance_point_polygon(point_point_strategy()); // back-compatibility
+ test_distance_point_polygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_multipolygon )
+{
+ test_distance_point_multipolygon(point_point_strategy()); // back-compatibility
+ test_distance_point_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_ring )
+{
+ test_distance_point_ring(point_point_strategy()); // back-compatibility
+ test_distance_point_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_polygon )
+{
+ test_distance_multipoint_polygon(point_point_strategy()); // back-compatibility
+ test_distance_multipoint_polygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_multipolygon )
+{
+ test_distance_multipoint_multipolygon(point_point_strategy()); // back-compatibility
+ test_distance_multipoint_multipolygon(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_ring )
+{
+ test_distance_multipoint_ring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_box_2d )
+{
+ point_box_strategy pb_strategy;
+
+ test_distance_point_box_2d(pb_strategy);
+ test_distance_point_box_different_point_types(pb_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_box_3d )
+{
+ test_distance_point_box_3d(point_box_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_box_2d )
+{
+ test_distance_multipoint_box_2d(point_box_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_box_3d )
+{
+ test_distance_multipoint_box_3d(point_box_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_pointlike_areal )
+{
+ test_more_empty_input_pointlike_areal
+ <
+ point_type
+ >(point_segment_strategy());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_l.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_l.cpp
new file mode 100644
index 000000000..bd505fcaf
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_l.cpp
@@ -0,0 +1,318 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_cartesian_pointlike_linear
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_common.hpp"
+#include "test_empty_geometry.hpp"
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::pythagoras<> point_point_strategy;
+typedef bg::strategy::distance::projected_point<> point_segment_strategy;
+
+
+//===========================================================================
+
+
+template <typename Strategy>
+void test_distance_point_segment(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, segment_type> tester;
+
+ tester::apply("point(0 0)", "segment(2 0,3 0)", 2, 4, strategy);
+ tester::apply("point(2.5 3)", "segment(2 0,3 0)", 3, 9, strategy);
+ tester::apply("point(2 0)", "segment(2 0,3 0)", 0, 0, strategy);
+ tester::apply("point(3 0)", "segment(2 0,3 0)", 0, 0, strategy);
+ tester::apply("point(2.5 0)", "segment(2 0,3 0)", 0, 0, strategy);
+
+ // distance is a NaN
+ tester::apply("POINT(4.297374e+307 8.433875e+307)",
+ "SEGMENT(26 87,13 95)",
+ 0, 0, strategy, false);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_linestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/linestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, linestring_type> tester;
+
+ tester::apply("point(0 0)", "linestring(2 0,3 0)", 2, 4, strategy);
+ tester::apply("point(2.5 3)", "linestring(2 0,3 0)", 3, 9, strategy);
+ tester::apply("point(2 0)", "linestring(2 0,3 0)", 0, 0, strategy);
+ tester::apply("point(3 0)", "linestring(2 0,3 0)", 0, 0, strategy);
+ tester::apply("point(2.5 0)", "linestring(2 0,3 0)", 0, 0, strategy);
+
+ // linestring with a single point
+ tester::apply("point(0 0)", "linestring(2 0)", 2, 4, strategy);
+
+ // distance is a NaN
+ tester::apply("POINT(4.297374e+307 8.433875e+307)",
+ "LINESTRING(26 87,13 95)",
+ 0, 0, strategy, false);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ point_type, multi_linestring_type
+ > tester;
+
+ tester::apply("point(0 0)",
+ "multilinestring((-5 0,-3 0),(2 0,3 0))",
+ 2, 4, strategy);
+ tester::apply("point(2.5 3)",
+ "multilinestring((-5 0,-3 0),(2 0,3 0))",
+ 3, 9, strategy);
+ tester::apply("point(2 0)",
+ "multilinestring((-5 0,-3 0),(2 0,3 0))",
+ 0, 0, strategy);
+ tester::apply("point(3 0)",
+ "multilinestring((-5 0,-3 0),(2 0,3 0))",
+ 0, 0, strategy);
+ tester::apply("point(2.5 0)",
+ "multilinestring((-5 0,-3 0),(2 0,3 0))",
+ 0, 0, strategy);
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((10 10,10 0),(0.0 -0.0,0.0 -0.0))",
+ 0, 0, strategy);
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((10 10,10 0),(1 1,1 1))",
+ sqrt(2.0), 2, strategy);
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((10 10,10 0),(1 1,2 2))",
+ sqrt(2.0), 2, strategy);
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((10 10,10 0),(20 20,20 20))",
+ 10, 100, strategy);
+
+ // multilinestrings containing an empty linestring
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((),(10 0),(20 20,20 20))",
+ 10, 100, strategy);
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((),(10 0),(),(20 20,20 20))",
+ 10, 100, strategy);
+
+ // multilinestrings containing a linestring with a single point
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((10 0),(20 20,20 20))",
+ 10, 100, strategy);
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((20 20,20 20),(10 0))",
+ 10, 100, strategy);
+
+ // multilinestring with a single-point linestring and empty linestrings
+ tester::apply("POINT(0 0)",
+ "MULTILINESTRING((),(20 20,20 20),(),(10 0))",
+ 10, 100, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_multipoint(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, multi_point_type
+ > tester;
+
+ tester::apply("linestring(2 0,0 2,100 100)",
+ "multipoint(0 0,1 0,0 1,1 1)",
+ 0, 0, strategy);
+ tester::apply("linestring(4 0,0 4,100 100)",
+ "multipoint(0 0,1 0,0 1,1 1)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("linestring(1 1,2 2,100 100)",
+ "multipoint(0 0,1 0,0 1,1 1)",
+ 0, 0, strategy);
+ tester::apply("linestring(3 3,4 4,100 100)",
+ "multipoint(0 0,1 0,0 1,1 1)",
+ sqrt(8.0), 8, strategy);
+
+ // linestring with a single point
+ tester::apply("linestring(1 8)",
+ "multipoint(0 0,3 0,4 -7,10 100)",
+ sqrt(65.0), 65, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_point_type, multi_linestring_type
+ > tester;
+
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((2 0,0 2),(2 2,3 3))",
+ 0, 0, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((3 0,0 3),(4 4,5 5))",
+ 0.5 * sqrt(2.0), 0.5, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((4 4,5 5),(1 1,2 2))",
+ 0, 0, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((3 3,4 4),(4 4,5 5))",
+ sqrt(8.0), 8, strategy);
+
+ // multilinestring with empty linestring
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((),(3 3,4 4),(4 4,5 5))",
+ sqrt(8.0), 8, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((3 3,4 4),(),(4 4,5 5))",
+ sqrt(8.0), 8, strategy);
+
+ // multilinestrings with a single-point linestrings
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((3 3),(4 4,5 5))",
+ sqrt(8.0), 8, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((4 4,5 5),(3 3))",
+ sqrt(8.0), 8, strategy);
+
+ // multilinestring with a single-point linestring and empty linestring
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multilinestring((4 4,5 5),(),(3 3))",
+ sqrt(8.0), 8, strategy);
+
+ // 21890717 - assertion failure in distance(Pt, Box)
+ {
+ multi_point_type mpt;
+ bg::read_wkt("multipoint(1 1,1 1,1 1,1 1,1 1,1 1,1 1,1 1,1 1)", mpt);
+ multi_linestring_type mls;
+ linestring_type ls;
+ point_type pt(std::numeric_limits<double>::quiet_NaN(), 1.0);
+ ls.push_back(pt);
+ ls.push_back(pt);
+ mls.push_back(ls);
+ bg::distance(mpt, mls);
+ }
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_segment(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_point_type, segment_type> tester;
+
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "segment(2 0,0 2)",
+ 0, 0, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "segment(4 0,0 4)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "segment(1 1,2 2)",
+ 0, 0, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "segment(3 3,4 4)",
+ sqrt(8.0), 8, strategy);
+ tester::apply("multipoint(4 4,5 5,2 2,3 3)",
+ "segment(0 0,1 1)",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_point_segment )
+{
+ test_distance_point_segment(point_point_strategy()); // back-compatibility
+ test_distance_point_segment(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_linestring )
+{
+ test_distance_point_linestring(point_point_strategy()); // back-compatibility
+ test_distance_point_linestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_multilinestring )
+{
+ test_distance_point_multilinestring(point_point_strategy()); // back-compatibility
+ test_distance_point_multilinestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_multipoint )
+{
+ test_distance_linestring_multipoint(point_point_strategy()); // back-compatibility
+ test_distance_linestring_multipoint(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_multilinestring )
+{
+ test_distance_multipoint_multilinestring(point_point_strategy()); // back-compatibility
+ test_distance_multipoint_multilinestring(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_segment )
+{
+ test_distance_multipoint_segment(point_segment_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_pointlike_linear )
+{
+ test_more_empty_input_pointlike_linear
+ <
+ point_type
+ >(point_segment_strategy());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_pl.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_pl.cpp
new file mode 100644
index 000000000..8726562a4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_ca_pl_pl.cpp
@@ -0,0 +1,123 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_cartesian_pointlike_pointlike
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_common.hpp"
+#include "test_empty_geometry.hpp"
+
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::pythagoras<> point_point_strategy;
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_point(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/point distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, point_type> tester;
+
+ tester::apply("point(1 1)",
+ "point(0 0)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("point(1 1)",
+ "point(1 1)",
+ 0, 0, strategy);
+
+ // distance overflows
+ tester::apply("point(0 0)",
+ "point(4.297374e+307 8.433875e+307)",
+ 0, 0, strategy, false);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_multipoint(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, multi_point_type> tester;
+
+ tester::apply("point(1 1)",
+ "multipoint(1 1,2 1,2 2,1 2)",
+ 0, 0, strategy);
+ tester::apply("point(1 1)",
+ "multipoint(2 2,2 3,3 2,3 3)",
+ sqrt(2.0), 2, strategy);
+ tester::apply("point(3 0)",
+ "multipoint(2 2,2 4,4 2,4 4)",
+ sqrt(5.0), 5, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_multipoint(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_point_type, multi_point_type
+ > tester;
+
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multipoint(1 1,2 1,2 2,1 2)",
+ 0, 0, strategy);
+ tester::apply("multipoint(0 0,1 0,0 1,1 1)",
+ "multipoint(2 2,2 3,3 2,3 3)",
+ sqrt(2.0), 2, strategy);
+}
+
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_point_point )
+{
+ test_distance_point_point(point_point_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_multipoint )
+{
+ test_distance_point_multipoint(point_point_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_multipoint )
+{
+ test_distance_multipoint_multipoint(point_point_strategy());
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_pointlike_pointlike )
+{
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(point_point_strategy());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_geo_linear_box.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_geo_linear_box.cpp
new file mode 100644
index 000000000..4b6aacf30
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_geo_linear_box.cpp
@@ -0,0 +1,567 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017, 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_linear_areal
+#endif
+
+#include <boost/range.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include "test_distance_geo_common.hpp"
+//#include "test_empty_geometry.hpp"
+
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_segment_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<segment_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("s-r-1", "SEGMENT(0 0, 0 10)", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_linestring_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<linestring_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("l-r-1", "LINESTRING(0 0, 0 10)", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_multi_linestring_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<multi_linestring_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("ml-r-1", "MULTILINESTRING((0 0, 0 10)(0 0, 10 0))", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+//=====================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_segment_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+ typedef test_distance_of_geometries<segment_type, multi_polygon_type> tester;
+
+ std::string const mp = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("s-r-1", "SEGMENT(0 0, 0 10)", mp,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_linestring_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+ typedef test_distance_of_geometries<linestring_type, multi_polygon_type> tester;
+
+ std::string const mp = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("l-r-1", "LINESTRING(0 0, 0 10)", mp,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_multi_linestring_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+ typedef test_distance_of_geometries<multi_linestring_type, multi_polygon_type> tester;
+
+ std::string const polygon = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("ml-r-1", "MULTILINESTRING((0 0, 0 10)(0 0, 10 0))", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+//=====================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_segment_ring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<segment_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("s-r-1", "SEGMENT(0 0, 0 10)", ring,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_linestring_ring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<linestring_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("l-r-1", "LINESTRING(0 0, 0 10)", ring,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_multi_linestring_ring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<multi_linestring_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("ml-r-1", "MULTILINESTRING((0 0, 0 10)(0 0, 10 0))", ring,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+//======================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps, typename Strategy_sb>
+void test_distance_segment_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/box distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<segment_type, box_type> tester;
+
+ std::string const box_north = "BOX(10 10,20 20)";
+
+ tester::apply("sb1-1a", "SEGMENT(0 0, 0 20)", box_north,
+ pp_distance<Point>("POINT(0 20)", "POINT(10 20)", strategy_pp),
+ strategy_sb);
+ //segment with slope
+ tester::apply("sb1-1b", "SEGMENT(10 5, 20 6)", box_north,
+ pp_distance<Point>("POINT(20 6)", "POINT(20 10)", strategy_pp),
+ strategy_sb);
+ tester::apply("sb1-2", "SEGMENT(0 0, 0 10)", box_north,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb1-3", "SEGMENT(0 0, 0 15)", box_north,
+ ps_distance<Point>("POINT(0 15)", "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb1-4", "SEGMENT(0 0, 0 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 0,0 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb1-5", "SEGMENT(0 10, 0 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 0,0 25)", strategy_ps),
+ strategy_sb);
+
+ tester::apply("sb2-2", "SEGMENT(0 5, 15 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5,15 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb2-3a", "SEGMENT(0 5, 20 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5,20 5)", strategy_ps),
+ strategy_sb);
+
+ // Test segments below box
+ tester::apply("test_b1", "SEGMENT(0 5, 9 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 9 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b2", "SEGMENT(0 5, 10 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 10 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b3", "SEGMENT(0 5, 11 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 11 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b4", "SEGMENT(0 5, 20 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5,20 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b5", "SEGMENT(0 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(11 10)", "SEGMENT(0 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b6", "SEGMENT(10 5, 20 5)", box_north,
+ ps_distance<Point>("POINT(15 10)", "SEGMENT(10 5,20 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b7", "SEGMENT(10 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(16 10)", "SEGMENT(10 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b8", "SEGMENT(12 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(17 10)", "SEGMENT(12 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b9", "SEGMENT(18 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(18 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b10", "SEGMENT(18 5, 24 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(18 5,24 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b11", "SEGMENT(20 5, 24 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(20 5,24 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b12", "SEGMENT(22 5, 24 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(22 5,24 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b13", "SEGMENT(0 5, 125 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(0 5, 125 5)", strategy_ps),
+ strategy_sb);
+
+ // Test segments above box
+ tester::apply("test_a1", "SEGMENT(0 25, 9 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 25, 9 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a2", "SEGMENT(0 25, 10 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 25, 10 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a3", "SEGMENT(0 25, 11 25)", box_north,
+ ps_distance<Point>("POINT(11 20)", "SEGMENT(0 25, 11 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a4", "SEGMENT(0 25, 20 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(0 25, 20 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a5", "SEGMENT(0 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(0 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a6", "SEGMENT(10 25, 20 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(10 25, 20 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a7", "SEGMENT(10 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(10 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a8", "SEGMENT(12 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(12 20)", "SEGMENT(12 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a9", "SEGMENT(18 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(18 20)", "SEGMENT(18 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a10", "SEGMENT(18 25, 24 25)", box_north,
+ ps_distance<Point>("POINT(18 20)", "SEGMENT(18 25, 24 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a11", "SEGMENT(20 25, 24 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(20 25, 24 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a12", "SEGMENT(22 25, 24 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(22 25, 24 25)", strategy_ps),
+ strategy_sb);
+
+ // Segments left-right of box
+ tester::apply("test_l1", "SEGMENT(0 5, 9 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 9 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l2", "SEGMENT(0 10, 9 10)", box_north,
+ ps_distance<Point>("POINT(9 10)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l3", "SEGMENT(0 10, 9 15)", box_north,
+ ps_distance<Point>("POINT(9 15)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l4", "SEGMENT(0 10, 0 15)", box_north,
+ ps_distance<Point>("POINT(0 15)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l5", "SEGMENT(1 10, 0 15)", box_north,
+ ps_distance<Point>("POINT(1 10)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l6", "SEGMENT(0 20, 9 21)", box_north,
+ ps_distance<Point>("POINT(9 21)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r1", "SEGMENT(21 5, 29 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(21 5, 29 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r2", "SEGMENT(21 10, 29 10)", box_north,
+ ps_distance<Point>("POINT(21 10)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r3", "SEGMENT(21 10, 29 15)", box_north,
+ ps_distance<Point>("POINT(21 10)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r4", "SEGMENT(21 10, 21 15)", box_north,
+ ps_distance<Point>("POINT(21 15)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r5", "SEGMENT(21 10, 22 15)", box_north,
+ ps_distance<Point>("POINT(21 10)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r6", "SEGMENT(29 20, 21 21)", box_north,
+ ps_distance<Point>("POINT(21 21)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+
+ //Segments on corners of box
+ //left-top corner
+ //generic
+ tester::apply("test_c1", "SEGMENT(9 19.5, 11 21)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(9 19.5, 11 21)", strategy_ps),
+ strategy_sb);
+ //degenerate
+ tester::apply("test_c2", "SEGMENT(9 19, 11 21)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(9 19, 11 21)", strategy_ps),
+ strategy_sb);
+ //left-bottom corner
+ //generic
+ tester::apply("test_c3", "SEGMENT(8.5 11, 11 9)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(8.5 11, 11 9)", strategy_ps),
+ strategy_sb);
+ //degenerate
+ tester::apply("test_c4", "SEGMENT(9 11, 11 9)", box_north,
+ 0,
+ strategy_sb);
+ //right-top corner
+ //generic
+ tester::apply("test_c5", "SEGMENT(19 21, 21 19.5)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(19 21, 21 19.5)", strategy_ps),
+ strategy_sb);
+ //degenerate
+ tester::apply("test_c6", "SEGMENT(19 21, 21 19)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(19 21, 21 19)", strategy_ps),
+ strategy_sb);
+ //right-bottom corner
+ //generic
+ tester::apply("test_c7", "SEGMENT(19 9, 21 10.5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(19 9, 21 10.5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_c7", "SEGMENT(19 9, 21 11)", box_north,
+ 0,
+ strategy_sb);
+
+ //Segment and box on different hemispheres
+ std::string const box_south = "BOX(10 -20,20 -10)";
+
+ tester::apply("test_ns1", "SEGMENT(10 20, 15 30)", box_south,
+ ps_distance<Point>("POINT(10 -10)", "SEGMENT(10 20, 15 30)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_ns2", "SEGMENT(0 10, 12 10)", box_south,
+ pp_distance<Point>("POINT(12 10)", "POINT(12 -10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_ns3", "SEGMENT(10 10, 20 10)", box_south,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 -10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_ns4", "SEGMENT(0 -10, 12 -10)", box_north,
+ pp_distance<Point>("POINT(12 10)", "POINT(12 -10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_ns5", "SEGMENT(10 -10, 20 -10)", box_north,
+ pp_distance<Point>("POINT(10 -10)", "POINT(10 10)", strategy_pp),
+ strategy_sb);
+
+ //Box crossing equator
+ std::string const box_crossing_eq = "BOX(10 -10,20 10)";
+
+ tester::apply("test_cr1", "SEGMENT(10 20, 15 30)", box_crossing_eq,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 20)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_cr2", "SEGMENT(10 -20, 15 -30)", box_crossing_eq,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 20)", strategy_pp),
+ strategy_sb);
+
+ //Box crossing prime meridian
+
+ std::string const box_crossing_mer = "BOX(-10 10,15 20)";
+
+ tester::apply("test_cr3", "SEGMENT(-5 25, 10 30)", box_crossing_mer,
+ pp_distance<Point>("POINT(-5 25)", "POINT(-5 20)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_cr4", "SEGMENT(-5 5, 10 7)", box_crossing_mer,
+ pp_distance<Point>("POINT(10 7)", "POINT(10 10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_cr5", "SEGMENT(-5 5, 10 5)", box_crossing_mer,
+ ps_distance<Point>("POINT(2.5 10)", "SEGMENT(-5 5, 10 5)", strategy_ps),
+ strategy_sb);
+
+
+ //Geometries in south hemisphere
+ tester::apply("test_south1", "SEGMENT(10 -30, 15 -30)", box_south,
+ ps_distance<Point>("POINT(10 -20)", "SEGMENT(10 -30, 15 -30)", strategy_ps),
+ strategy_sb);
+
+ //Segments in boxes corner
+ tester::apply("corner1", "SEGMENT(17 21, 25 20)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(17 21, 25 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("corner2", "SEGMENT(17 21, 0 20)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(17 21, 0 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("corner3", "SEGMENT(17 5, 0 10)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(17 5, 0 10)", strategy_ps),
+ strategy_sb);
+ tester::apply("corner4", "SEGMENT(17 5, 25 9)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(17 5, 25 9)", strategy_ps),
+ strategy_sb);
+}
+
+template <typename Point, typename Strategy_ps, typename Strategy_sb>
+void test_distance_linestring_box(Strategy_ps const& strategy_ps, Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/box distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<linestring_type, box_type> tester;
+
+ std::string const box_north = "BOX(10 10,20 20)";
+
+ tester::apply("sl1", "LINESTRING(0 20, 15 21, 25 19.9, 21 5, 15 5, 0 10)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(15 21, 25 19.9)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("sl2", "LINESTRING(0 20, 15 21, 25 19.9, 21 5, 15 5, 15 15)", box_north,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("sl3", "LINESTRING(0 20, 15 21, 25 19.9, 21 5, 15 5, 2 20)", box_north,
+ 0, strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_ps, typename Strategy_sb>
+void test_distance_multi_linestring_box(Strategy_ps const& strategy_ps, Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multi_linestring/box distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<multi_linestring_type, box_type> tester;
+
+ std::string const box_north = "BOX(10 10,20 20)";
+
+ tester::apply("sl1", "MULTILINESTRING((0 20, 15 21, 25 19.9, 21 5, 15 5, 0 10)(25 20, 22 4, 0 0))", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(15 21, 25 19.9)", strategy_ps),
+ strategy_sb, true, false, false);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps, typename Strategy_sb>
+void test_all_l_ar(Strategy_pp pp_strategy, Strategy_ps ps_strategy, Strategy_sb sb_strategy)
+{
+ test_distance_segment_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_linestring_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multi_linestring_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_segment_multi_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_linestring_multi_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multi_linestring_multi_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_segment_ring<Point>(pp_strategy, ps_strategy);
+ test_distance_linestring_ring<Point>(pp_strategy, ps_strategy);
+ test_distance_multi_linestring_ring<Point>(pp_strategy, ps_strategy);
+
+ test_distance_segment_box<Point>(pp_strategy, ps_strategy, sb_strategy);
+ //test_distance_linestring_box<Point>(ps_strategy, sb_strategy);
+ //test_distance_multi_linestring_box<Point>(ps_strategy, sb_strategy);
+
+ //test_more_empty_input_linear_areal<Point>(ps_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linear_areal )
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> >
+ sph_point;
+ test_all_l_ar<sph_point>(spherical_pp(), spherical_ps(), spherical_sb());
+
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > geo_point;
+
+ test_all_l_ar<geo_point>(vincenty_pp(), vincenty_ps(), vincenty_sb());
+ test_all_l_ar<geo_point>(thomas_pp(), thomas_ps(), thomas_sb());
+ test_all_l_ar<geo_point>(andoyer_pp(), andoyer_ps(), andoyer_sb());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_geo_pl_l.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_geo_pl_l.cpp
new file mode 100644
index 000000000..76e300e66
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_geo_pl_l.cpp
@@ -0,0 +1,728 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_pointlike_linear
+#endif
+
+#include <sstream>
+
+#include <boost/geometry/srs/spheroid.hpp>
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_geo_common.hpp"
+#include "test_empty_geometry.hpp"
+
+typedef bg::cs::geographic<bg::degree> cs_type;
+typedef bg::model::point<double, 2, cs_type> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+typedef bg::cs::geographic<bg::radian> cs_type_rad;
+typedef bg::model::point<double, 2, cs_type_rad> point_type_rad;
+typedef bg::model::segment<point_type_rad> segment_type_rad;
+
+//===========================================================================
+
+template <typename Strategy>
+inline bg::default_distance_result<point_type>::type
+pp_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ point_type p1, p2;
+ bg::read_wkt(wkt1, p1);
+ bg::read_wkt(wkt2, p2);
+ return bg::distance(p1, p2, strategy);
+}
+
+template <typename Strategy>
+inline bg::default_distance_result<point_type>::type
+ps_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ point_type p;
+ segment_type s;
+ bg::read_wkt(wkt1, p);
+ bg::read_wkt(wkt2, s);
+ return bg::distance(p, s, strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_point_segment(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ bool WGS84)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, segment_type> tester;
+
+ tester::apply("p-s-01",
+ "POINT(0 0)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(0 0)", "POINT(2 0)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-02",
+ "POINT(2.5 3)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(2.5 3)", "POINT(2.5 0)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-03",
+ "POINT(2 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy_ps, true, true);
+ tester::apply("p-s-04",
+ "POINT(3 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy_ps, true, true);
+ tester::apply("p-s-05",
+ "POINT(2.5 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy_ps, true, true);
+ tester::apply("p-s-06",
+ "POINT(3.5 3)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(3 0)", "POINT(3.5 3)", strategy_pp),
+ strategy_ps, true, true);
+ if(WGS84)
+ {
+ tester::apply("p-s-07",
+ "POINT(15 80)",
+ "SEGMENT(10 15,30 15)",
+ 7204174.8264546748,
+ strategy_ps, true, true);
+ tester::apply("p-s-08",
+ "POINT(15 10)",
+ "SEGMENT(10 15,30 15)",
+ 571412.71247283253,
+ strategy_ps, true, true);
+ }
+ tester::apply("p-s-09",
+ "POINT(5 10)",
+ "SEGMENT(10 15,30 15)",
+ pp_distance("POINT(5 10)", "POINT(10 15)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-10",
+ "POINT(35 10)",
+ "SEGMENT(10 15,30 15)",
+ pp_distance("POINT(35 10)", "POINT(30 15)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-11",
+ "POINT(5 10)",
+ "SEGMENT(30 15,10 15)",
+ pp_distance("POINT(5 10)", "POINT(10 15)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-12",
+ "POINT(35 10)",
+ "SEGMENT(30 15,10 15)",
+ pp_distance("POINT(35 10)", "POINT(30 15)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-right-up",
+ "POINT(3.5 3)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(3 2)", "POINT(3.5 3)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-left-up",
+ "POINT(1.5 3)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(2 2)", "POINT(1.5 3)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-up-1",
+ "POINT(2 3)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(2.0003 2)", "POINT(2 3)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-up-2",
+ "POINT(3 3)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(2.9997 2)", "POINT(3 3)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-right-down",
+ "POINT(3.5 1)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(3 2)", "POINT(3.5 1)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-left-down",
+ "POINT(1.5 1)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(2 2)", "POINT(1.5 1)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-down-1",
+ "POINT(2 1)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(2 2)", "POINT(2 1)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-down-2",
+ "POINT(3 1)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(3 2)", "POINT(3 1)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-south",
+ "POINT(3 -1)",
+ "SEGMENT(2 -2,3 -2)",
+ pp_distance("POINT(3 -2)", "POINT(3 -1)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-antimeridian-1",
+ "POINT(3 1)",
+ "SEGMENT(220 2,3 2)",
+ pp_distance("POINT(3 2)", "POINT(3 1)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-antimeridian-2",
+ "POINT(220 1)",
+ "SEGMENT(220 2,3 2)",
+ pp_distance("POINT(220 2)", "POINT(220 1)", strategy_pp),
+ strategy_ps, true, true);
+
+ // equator special case
+ tester::apply("p-s-eq1",
+ "POINT(2.5 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy_ps, true, true);
+ tester::apply("p-s-eq2",
+ "POINT(2.5 2)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(2.5 0)", "POINT(2.5 2)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-eq3",
+ "POINT(2 2)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(2 0)", "POINT(2 2)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-eq4",
+ "POINT(3 2)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(3 0)", "POINT(3 2)", strategy_pp),
+ strategy_ps, true, true);
+
+ // meridian special case
+ tester::apply("p-s-mer1",
+ "POINT(2.5 2)",
+ "SEGMENT(2 2,2 4)",
+ pp_distance("POINT(2.5 2)", "POINT(2 2.000076608014728)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-mer3",
+ "POINT(2.5 5)",
+ "SEGMENT(2 2,2 4)",
+ pp_distance("POINT(2.5 5)", "POINT(2 4)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-mer4",
+ "POINT(0 20)",
+ "SEGMENT(0 40,180 80)",
+ pp_distance("POINT(0 20)", "POINT(0 40)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-mer5",
+ "POINT(0 20)",
+ "SEGMENT(0 40,0 80)",
+ pp_distance("POINT(0 20)", "POINT(0 40)", strategy_pp),
+ strategy_ps, true, true);
+
+ //degenerate segment
+ tester::apply("p-s-deg",
+ "POINT(1 80)",
+ "SEGMENT(0 0,0 0)",
+ pp_distance("POINT(0 0)", "POINT(1 80)", strategy_pp),
+ strategy_ps, true, true);
+
+ //point on segment
+ tester::apply("p-s-deg",
+ "POINT(0 80)",
+ "SEGMENT(0 0,0 90)",
+ 0,
+ strategy_ps, true, true);
+
+ // very small distances to segment
+ tester::apply("p-s-07",
+ "POINT(90 1e-3)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 1e-3)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-08",
+ "POINT(90 1e-4)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 1e-4)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-09",
+ "POINT(90 1e-5)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 1e-5)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-10",
+ "POINT(90 1e-6)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 1e-6)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-11",
+ "POINT(90 1e-7)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 1e-7)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-12",
+ "POINT(90 1e-8)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 1e-8)", strategy_pp),
+ strategy_ps, true, true);
+
+ // very large distance to segment
+ tester::apply("p-s-13",
+ "POINT(90 90)",
+ "SEGMENT(0.5 0,175.5 0)",
+ pp_distance("POINT(90 0)", "POINT(90 90)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-14",
+ "POINT(90 90)",
+ "SEGMENT(0.5 -89,175.5 -89)",
+ pp_distance("POINT(90 -89)", "POINT(90 90)", strategy_pp),
+ strategy_ps, true, true);
+ // degenerate segment
+ tester::apply("p-s-15",
+ "POINT(90 90)",
+ "SEGMENT(0.5 -90,175.5 -90)",
+ pp_distance("POINT(0.5 -90)", "POINT(90 90)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-16",
+ "POINT(90 90)",
+ "SEGMENT(0.5 -90,175.5 -90)",
+ pp_distance("POINT(90 -90)", "POINT(90 90)", strategy_pp),
+ strategy_ps, true, true);
+ // equatorial segment
+ tester::apply("p-s-17",
+ "POINT(90 90)",
+ "SEGMENT(0 0,175.5 0)",
+ pp_distance("POINT(90 90)", "POINT(0 0)", strategy_pp),
+ strategy_ps, true, true);
+ // segment pass by pole
+ tester::apply("p-s-18",
+ "POINT(90 90)",
+ "SEGMENT(0 0,180 0)",
+ 0,
+ strategy_ps, true, true);
+
+ tester::apply("p-s-20",
+ "POINT(80 89)",
+ "SEGMENT(0 0,180 0)",
+ pp_distance("POINT(80 89)", "POINT(0 89.82633489283377)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-21",
+ "POINT(80 89)",
+ "SEGMENT(0 -1,180 1)",
+ pp_distance("POINT(80 89)", "POINT(0 89.82633489283377)", strategy_pp),
+ strategy_ps, true, true);
+
+ // meridian special case
+ tester::apply("p-s-mer1",
+ "POINT(2.5 3)",
+ "SEGMENT(2 2,2 4)",
+ pp_distance("POINT(2.5 3)", "POINT(2 3.000114792872075)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-mer2",
+ "POINT(1 80)",
+ "SEGMENT(0 0,0 90)",
+ pp_distance("POINT(1 80)", "POINT(0 80.00149225834545)", strategy_pp),
+ strategy_ps, true, true);
+ tester::apply("p-s-mer3",
+ "POINT(2 0)",
+ "SEGMENT(1 -1,1 0)",
+ pp_distance("POINT(2 0)", "POINT(1 0)", strategy_pp),
+ strategy_ps, true, true);
+
+ tester::apply("p-s-acos",
+ "POINT(0 90)",
+ "SEGMENT(90 0,0 1.000005)",
+ pp_distance("POINT(0 90)", "POINT(0.3017072304435489 1.000018955050697)",
+ strategy_pp),
+ strategy_ps, true, true);
+}
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_point_segment_no_thomas(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, segment_type> tester;
+
+ // thomas strategy is failing for those test cases
+ // this is because of inaccurate results for points close to poles
+
+ tester::apply("p-s-19",
+ "POINT(90 89)",
+ "SEGMENT(0 0,180 0)",
+ pp_distance("POINT(90 89)", "POINT(90 90)", strategy_pp),
+ strategy_ps, true, true);
+}
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_point_segment_rad_mix(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, segment_type> tester1;
+ typedef test_distance_of_geometries<point_type_rad, segment_type> tester2;
+ typedef test_distance_of_geometries<point_type, segment_type_rad> tester3;
+ typedef test_distance_of_geometries<point_type_rad, segment_type_rad> tester4;
+
+ const double d2r = bg::math::d2r<double>();
+
+ std::ostringstream s1;
+ s1 << 1*d2r;
+ std::ostringstream s2;
+ s2 << 2*d2r;
+ std::ostringstream s3;
+ s3 << 3*d2r;
+
+ tester1::apply("p-s-mix1",
+ "POINT(3 1)",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(3 2)", "POINT(3 1)", strategy_pp),
+ strategy_ps, true, true);
+ tester2::apply("p-s-mix2",
+ "POINT(" + s3.str() + " " + s1.str() + ")",
+ "SEGMENT(2 2,3 2)",
+ pp_distance("POINT(3 2)", "POINT(3 1)", strategy_pp),
+ strategy_ps, true, true);
+ tester3::apply("p-s-mix3",
+ "POINT(3 1)",
+ "SEGMENT(" + s2.str() + " " + s2.str() + ","
+ + s3.str() + " " + s2.str() + ")",
+ pp_distance("POINT(3 2)", "POINT(3 1)", strategy_pp),
+ strategy_ps, true, true);
+ tester4::apply("p-s-mix4",
+ "POINT(" + s3.str() + " " + s1.str() + ")",
+ "SEGMENT(" + s2.str() + " " + s2.str() + ","
+ + s3.str() + " " + s2.str() + ")",
+ pp_distance("POINT(3 2)", "POINT(3 1)", strategy_pp),
+ strategy_ps, true, true);
+}
+
+//===========================================================================
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_point_linestring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/linestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, linestring_type> tester;
+
+ tester::apply("p-l-01",
+ "POINT(0 0)",
+ "LINESTRING(2 0,2 0)",
+ pp_distance("POINT(0 0)", "POINT(2 0)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("p-l-02",
+ "POINT(0 0)",
+ "LINESTRING(2 0,3 0)",
+ pp_distance("POINT(0 0)", "POINT(2 0)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("p-l-03",
+ "POINT(2.5 3)",
+ "LINESTRING(2 0,3 0)",
+ pp_distance("POINT(2.5 3)", "POINT(2.5 0)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("p-l-04",
+ "POINT(2 0)",
+ "LINESTRING(2 0,3 0)",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("p-l-05",
+ "POINT(3 0)",
+ "LINESTRING(2 0,3 0)",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("p-l-06",
+ "POINT(2.5 0)",
+ "LINESTRING(2 0,3 0)",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("p-l-07",
+ "POINT(7.5 10)",
+ "LINESTRING(1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 0)",
+ ps_distance("POINT(7.5 10)", "SEGMENT(7 0,8 0)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("p-l-08",
+ "POINT(7.5 10)",
+ "LINESTRING(1 1,2 1,3 1,4 1,5 1,6 1,7 1,20 2,21 2)",
+ ps_distance("POINT(7.5 10)", "SEGMENT(7 1,20 2)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+void test_distance_point_linestring_strategies()
+{
+ typedef test_distance_of_geometries<point_type, linestring_type> tester;
+
+ tester::apply("p-l-s-01",
+ "POINT(2.5 3)",
+ "LINESTRING(2 1,3 1)",
+ 221147.24332788656,
+ vincenty_ps(),
+ true, false, false);
+
+ tester::apply("p-l-s-02",
+ "POINT(2.5 3)",
+ "LINESTRING(2 1,3 1)",
+ 221147.36682199029,
+ thomas_ps(),
+ true, false, false);
+
+ tester::apply("p-l-s-03",
+ "POINT(2.5 3)",
+ "LINESTRING(2 1,3 1)",
+ 221144.76527049288,
+ andoyer_ps(),
+ true, false, false);
+}
+
+//===========================================================================
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_point_multilinestring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ point_type, multi_linestring_type
+ > tester;
+
+ tester::apply("p-ml-01",
+ "POINT(0 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ pp_distance("POINT(0 0)", "POINT(2 0)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("p-ml-02",
+ "POINT(2.5 3)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ pp_distance("POINT(2.5 3)", "POINT(2.5 0)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("p-ml-03",
+ "POINT(2 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("p-ml-04",
+ "POINT(3 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("p-ml-05",
+ "POINT(2.5 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("p-ml-06",
+ "POINT(7.5 10)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0,4 0,5 0,6 0,20 1,21 1))",
+ ps_distance("POINT(7.5 10)", "SEGMENT(6 0,20 1)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("p-ml-07",
+ "POINT(-8 10)",
+ "MULTILINESTRING((-20 10,-19 11,-18 10,-6 0,-5 0,-3 0),(2 0,6 0,20 1,21 1))",
+ ps_distance("POINT(-8 10)", "SEGMENT(-6 0,-18 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+//===========================================================================
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_linestring_multipoint(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, multi_point_type
+ > tester;
+
+ tester::apply("l-mp-01",
+ "LINESTRING(2 0,0 2,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ ps_distance("POINT(1 1)", "SEGMENT(2 0,0 2)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("l-mp-02",
+ "LINESTRING(4 0,0 4,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ ps_distance("POINT(1 1)", "SEGMENT(0 4,4 0)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("l-mp-03",
+ "LINESTRING(1 1,2 2,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("l-mp-04",
+ "LINESTRING(3 3,4 4,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ pp_distance("POINT(1 1)", "POINT(3 3)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("l-mp-05",
+ "LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "MULTIPOINT(1 -1,80 80,5 0,150 90)",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("l-mp-06",
+ "LINESTRING(90 0,0 1.00005)",
+ "MULTIPOINT((0 0),(0 0),(0 0),(0 0),(0 0),(0 0),(0 0 ),(0 0),\
+ (0 0),(0 0 ),(0 0),(0 0),(69.35235 155.0205),\
+ (75.72081 37.97683),(0 0),(0 0),(0 0))",
+ pp_distance("POINT(0 0)", "POINT(0 1.00005)", strategy_pp),
+ strategy_ps, true, false, false);
+}
+
+//===========================================================================
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_multipoint_multilinestring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_point_type, multi_linestring_type
+ > tester;
+
+ tester::apply("mp-ml-01",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((2 0,0 2),(2 2,3 3))",
+ ps_distance("POINT(1 1)", "SEGMENT(2 0,0 2)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("mp-ml-02",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((3 0,0 3),(4 4,5 5))",
+ ps_distance("POINT(1 1)", "SEGMENT(3 0,0 3)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("mp-ml-03",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((4 4,5 5),(1 1,2 2))",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("mp-ml-04",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((4 4,3 3),(4 4,5 5))",
+ pp_distance("POINT(1 1)", "POINT(3 3)", strategy_pp),
+ strategy_ps, true, false, false);
+}
+
+//===========================================================================
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_distance_multipoint_segment(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_point_type, segment_type> tester;
+
+ tester::apply("mp-s-01",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(2 0,0 2)",
+ ps_distance("POINT(1 1)", "SEGMENT(2 0,0 2)", strategy_ps),
+ strategy_ps, true, false, false);
+ tester::apply("mp-s-02",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(0 -3,1 -10)",
+ pp_distance("POINT(0 0)", "POINT(0 -3)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("mp-s-03",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(1 1,2 2)",
+ 0,
+ strategy_ps, true, false, false);
+ tester::apply("mp-s-04",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(3 3,4 4)",
+ pp_distance("POINT(1 1)", "POINT(3 3)", strategy_pp),
+ strategy_ps, true, false, false);
+ tester::apply("mp-s-05",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(0.5 -3,1 -10)",
+ pp_distance("POINT(1 0)", "POINT(0.5 -3)", strategy_pp),
+ strategy_ps, true, false, false);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+template <typename Strategy_pp, typename Strategy_ps>
+void test_all_pl_l(Strategy_pp pp_strategy, Strategy_ps ps_strategy,
+ bool WGS84 = true)
+{
+ test_distance_point_segment(pp_strategy, ps_strategy, WGS84);
+ test_distance_point_linestring(pp_strategy, ps_strategy);
+ test_distance_point_multilinestring(pp_strategy, ps_strategy);
+ test_distance_linestring_multipoint(pp_strategy, ps_strategy);
+ test_distance_multipoint_multilinestring(pp_strategy, ps_strategy);
+ test_distance_multipoint_segment(pp_strategy, ps_strategy);
+
+ test_more_empty_input_pointlike_linear<point_type>(ps_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_pointlike_linear )
+{
+ test_all_pl_l(vincenty_pp(), vincenty_ps_bisection());
+ test_all_pl_l(vincenty_pp(), vincenty_ps());
+ test_all_pl_l(thomas_pp(), thomas_ps());
+ test_all_pl_l(andoyer_pp(), andoyer_ps());
+
+ // test with different spheroid
+ stype spheroid(6372000, 6370000);
+ test_all_pl_l(andoyer_pp(spheroid), andoyer_ps(spheroid), false);
+
+ test_distance_point_segment_no_thomas(vincenty_pp(), vincenty_ps());
+ //test_distance_point_segment_no_thomas(thomas_pp(), thomas_ps());
+ test_distance_point_segment_no_thomas(andoyer_pp(), andoyer_ps());
+
+ test_distance_point_segment_rad_mix(vincenty_pp(), vincenty_ps());
+ test_distance_point_segment_rad_mix(thomas_pp(), thomas_ps());
+ test_distance_point_segment_rad_mix(andoyer_pp(), andoyer_ps());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_ar_ar.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_ar_ar.cpp
new file mode 100644
index 000000000..4e25d7eac
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_ar_ar.cpp
@@ -0,0 +1,943 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017, 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_areal_areal
+#endif
+
+#include <boost/range.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include "test_distance_geo_common.hpp"
+#include "test_empty_geometry.hpp"
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_ring_ring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "ring/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::ring<Point> ring_type;
+
+ typedef test_distance_of_geometries<ring_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("rr1", ring, "POLYGON((16 0,13 0,15 1,16 0))",
+ ps_distance<Point>("POINT(13 1)",
+ "SEGMENT(13 0,15 1)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("rr2", ring, "POLYGON((16 0,14 1,15 1,16 0))",
+ pp_distance<Point>("POINT(13 1)", "POINT(14 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("rr3", ring, ring,
+ 0, strategy_ps, true, false, false);
+
+}
+
+//============================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_ring_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "ring/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::ring<Point> ring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+
+ typedef test_distance_of_geometries<ring_type, polygon_type> tester;
+
+ std::string const ring = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("rp1", ring, "POLYGON((16 0,13 0,15 1,16 0))",
+ ps_distance<Point>("POINT(13 1)",
+ "SEGMENT(13 0,15 1)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("rp2", ring, "POLYGON((16 0,14 1,15 1,16 0))",
+ pp_distance<Point>("POINT(13 1)", "POINT(14 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("rp3", ring, "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))",
+ 0, strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_polygon_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+
+ typedef test_distance_of_geometries<polygon_type, polygon_type> tester;
+
+ std::string const poly = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("pp1", poly, "POLYGON((16 0,13 0,15 1,16 0))",
+ ps_distance<Point>("POINT(13 1)",
+ "SEGMENT(13 0,15 1)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("pp2", poly, "POLYGON((16 0,14 1,15 1,16 0))",
+ pp_distance<Point>("POINT(13 1)", "POINT(14 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("pp3", poly, "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))",
+ 0, strategy_ps, true, false, false);
+
+}
+
+//============================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_ring_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "ring/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::ring<Point> ring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+ typedef test_distance_of_geometries<ring_type, multi_polygon_type> tester;
+
+ std::string const ring = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("rmp1", ring, "MULTIPOLYGON(((16 0,13 0,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ ps_distance<Point>("POINT(12.5 2.5)", "SEGMENT(12 3,13 1)",
+ strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("rmp2", ring, "MULTIPOLYGON(((16 0,13.1 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ pp_distance<Point>("POINT(13 1)", "POINT(13.1 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("rmp3", ring, "MULTIPOLYGON(((16 0,13 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("rmp4", ring, "MULTIPOLYGON(((16 0,12 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_polygon_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+ typedef test_distance_of_geometries<polygon_type, multi_polygon_type> tester;
+
+ std::string const poly = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("pmp1", poly, "MULTIPOLYGON(((16 0,13 0,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ ps_distance<Point>("POINT(12.5 2.5)", "SEGMENT(12 3,13 1)",
+ strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("pmp2", poly, "MULTIPOLYGON(((16 0,13.1 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ pp_distance<Point>("POINT(13 1)", "POINT(13.1 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("pmp3", poly, "MULTIPOLYGON(((16 0,13 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("pmp4", poly, "MULTIPOLYGON(((16 0,12 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+ // w/ interior ring
+ std::string const poly_interior = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0),\
+ (12 1,11 1,12 2,12 1))";
+
+ tester::apply("pmp1", poly_interior, "MULTIPOLYGON(((16 0,13 0,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ ps_distance<Point>("POINT(12.5 2.5)", "SEGMENT(12 3,13 1)",
+ strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("pmp2", poly_interior, "MULTIPOLYGON(((16 0,13.1 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ pp_distance<Point>("POINT(13 1)", "POINT(13.1 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("pmp3", poly_interior, "MULTIPOLYGON(((16 0,13 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("pmp4", poly_interior, "MULTIPOLYGON(((16 0,12 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+}
+
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_multi_polygon_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multi_polygon/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+ typedef test_distance_of_geometries<multi_polygon_type, multi_polygon_type>
+ tester;
+
+ std::string const mpoly = "MULTIPOLYGON(((11 0,10 1,11 2,12 3,13 1,11 0)),\
+ ((0 0,0 1,1 1,1 0,0 0)))";
+
+ tester::apply("mpmp1", mpoly, "MULTIPOLYGON(((16 0,13 0,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ ps_distance<Point>("POINT(12.5 2.5)", "SEGMENT(12 3,13 1)",
+ strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("mpmp2", mpoly, "MULTIPOLYGON(((16 0,13.1 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ pp_distance<Point>("POINT(13 1)", "POINT(13.1 1)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("mpmp3", mpoly, "MULTIPOLYGON(((16 0,13 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("mpmp4", mpoly, "MULTIPOLYGON(((16 0,12 1,15 1,16 0)),\
+ ((12.5 2.5,12.5 4,14 2.5,12.5 2.5)))",
+ 0, strategy_ps, true, false, false);
+
+}
+
+//============================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_sb
+>
+void test_distance_ring_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "ring/box distance tests" << std::endl;
+#endif
+ typedef bg::model::box<Point> box_type;
+ typedef bg::model::ring<Point> ring_type;
+
+ typedef test_distance_of_geometries<ring_type, box_type> tester;
+
+ std::string const ring = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("rb1", ring, "BOX(10 10,20 20)",
+ sb_distance<Point>("SEGMENT(11 2,12 3)",
+ "BOX(10 10,20 20)", strategy_sb),
+ strategy_sb, true, false, false);
+
+ tester::apply("rb2", ring, "BOX(17 0,20 3)",
+ ps_distance<Point>("POINT(13 1)",
+ "SEGMENT(17 0,17 3)", strategy_ps),
+ strategy_sb, true, false, false);
+
+ tester::apply("rb3", ring, "BOX(17 0,20 1)",
+ pp_distance<Point>("POINT(17 1)", "POINT(13 1)", strategy_pp),
+ strategy_sb, true, false, false);
+
+ tester::apply("rb4", ring, "BOX(12 0,20 1)",
+ 0, strategy_sb, true, false, false);
+}
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_sb
+>
+void test_distance_polygon_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "polygon/box distance tests" << std::endl;
+#endif
+ typedef bg::model::box<Point> box_type;
+ typedef bg::model::polygon<Point> polygon_type;
+
+ typedef test_distance_of_geometries<polygon_type, box_type> tester;
+
+ std::string const polygon = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0))";
+
+ tester::apply("pb1", polygon, "BOX(10 10,20 20)",
+ sb_distance<Point>("SEGMENT(11 2,12 3)",
+ "BOX(10 10,20 20)", strategy_sb),
+ strategy_sb, true, false, false);
+
+ tester::apply("pb2", polygon, "BOX(17 0,20 3)",
+ ps_distance<Point>("POINT(13 1)",
+ "SEGMENT(17 0,17 3)", strategy_ps),
+ strategy_sb, true, false, false);
+
+ tester::apply("pb3", polygon, "BOX(17 0,20 1)",
+ pp_distance<Point>("POINT(17 1)", "POINT(13 1)", strategy_pp),
+ strategy_sb, true, false, false);
+
+ tester::apply("pb4", polygon, "BOX(12 0,20 1)",
+ 0, strategy_sb, true, false, false);
+
+ // w/ interior ring
+ std::string const poly_interior = "POLYGON((11 0,10 1,11 2,12 3,13 1,11 0),\
+ (12 1,11 1,12 2,12 1))";
+
+ tester::apply("pb5", poly_interior, "BOX(10 10,20 20)",
+ sb_distance<Point>("SEGMENT(11 2,12 3)",
+ "BOX(10 10,20 20)", strategy_sb),
+ strategy_sb, true, false, false);
+}
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_sb
+>
+void test_distance_multi_polygon_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multi_polygon/box distance tests" << std::endl;
+#endif
+ typedef bg::model::box<Point> box_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+ typedef test_distance_of_geometries<multi_polygon_type, box_type> tester;
+
+ std::string const multi_polygon = "MULTIPOLYGON(((20 20,20 30,30 40,20 20)),\
+ ((10 10,0 20,15 30,20 15,15 10,10 10)))";
+
+ tester::apply("mpb1", multi_polygon, "BOX(0 0,5 5)",
+ sb_distance<Point>("SEGMENT(10 10,0 20)",
+ "BOX(0 0,5 5)", strategy_sb),
+ strategy_sb, true, false, false);
+
+ tester::apply("mpb2", multi_polygon, "BOX(27 0,30 16)",
+ ps_distance<Point>("POINT(20 15)",
+ "SEGMENT(27 0,27 16)", strategy_ps),
+ strategy_sb, true, false, false);
+
+ tester::apply("mpb3", multi_polygon, "BOX(27 0,30 15)",
+ pp_distance<Point>("POINT(20 15)",
+ "POINT(27 15)", strategy_pp),
+ strategy_sb, true, false, false);
+
+ tester::apply("mpb4", multi_polygon, "BOX(17 0,20 14)",
+ 0, strategy_sb, true, false, false);
+}
+
+
+//===========================================================================
+// Cases for relative location of box2 wrt to box1
+//
+// | |
+// 11 | 7 | 4
+// | |
+// --10---+---------+---3---
+// | |
+// 9 | 6 | 2
+// | |
+// -------+---------+-------
+// | |
+// 8 | 5 | 1
+// | |
+//
+// case 6 includes all possible intersections
+// The picture assumes northern hemisphere location
+// southern hemisphere picture is mirrored wrt the equator
+
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_bb
+>
+void test_distance_box_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_bb const& strategy_bb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "box/box distance tests" << std::endl;
+#endif
+ typedef bg::model::box<Point> box_type;
+
+ typedef test_distance_of_geometries<box_type, box_type> tester;
+
+ std::string const box1 = "BOX(10 10,20 20)";
+
+ // case 1
+ tester::apply("bb1", box1, "BOX(30 0,40 5)",
+ pp_distance<Point>("POINT(20 10)", "POINT(30 5)", strategy_pp),
+ strategy_bb);
+
+ // case 2
+ tester::apply("bb2-a", box1, "BOX(30 12, 40 17)",
+ ps_distance<Point>("POINT(30 17)",
+ "SEGMENT(20 10,20 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb2-b", box1, "BOX(30 10, 40 17)",
+ ps_distance<Point>("POINT(30 17)",
+ "SEGMENT(20 10,20 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb2-c", box1, "BOX(30 8, 40 17)",
+ ps_distance<Point>("POINT(30 17)",
+ "SEGMENT(20 10,20 20)", strategy_ps),
+ strategy_bb);
+
+
+ // case 3
+ tester::apply("bb3-a", box1, "BOX(30 15, 40 25)",
+ ps_distance<Point>("POINT(20 20)",
+ "SEGMENT(30 15,30 25)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb3-b", box1, "BOX(30 20, 40 40)",
+ ps_distance<Point>("POINT(20 20)",
+ "SEGMENT(30 20,30 40)", strategy_ps),
+ strategy_bb);
+
+ // case 4
+ tester::apply("bb4", box1, "BOX(30 25, 40 40)",
+ pp_distance<Point>("POINT(20 20)",
+ "POINT(30 25)", strategy_pp),
+ strategy_bb);
+
+ // case 5
+ tester::apply("bb5", box1, "BOX(12 2, 17 7)",
+ pp_distance<Point>("POINT(17 7)", "POINT(17 10)", strategy_pp),
+ strategy_bb);
+
+ // case 6, boxes intersect thus distance is 0
+ tester::apply("bb6-a", box1, "BOX(12 2, 17 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-b", box1, "BOX(12 2, 17 17)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-c", box1, "BOX(20 2, 30 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-d", box1, "BOX(20 11, 30 15)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-e", box1, "BOX(20 20, 30 30)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-f", box1, "BOX(15 20, 17 30)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-g", box1, "BOX(8 20, 10 25)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-h", box1, "BOX(8 15 , 10 17)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-i", box1, "BOX(8 8, 10 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-j", box1, "BOX(15 8, 17 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ // case 7
+ tester::apply("bb7", box1, "BOX(12 22, 17 27)",
+ pp_distance<Point>("POINT(17 20)",
+ "POINT(17 22)", strategy_pp),
+ strategy_bb);
+
+ // case 8
+ tester::apply("bb8", box1, "BOX(4 4, 8 8)",
+ pp_distance<Point>("POINT(8 8)", "POINT(10 10)", strategy_pp),
+ strategy_bb);
+
+ // case 9
+ tester::apply("bb9-a", box1, "BOX(4 14, 8 18)",
+ ps_distance<Point>("POINT(8 18)",
+ "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb9-b", box1, "BOX(4 10, 8 18)",
+ ps_distance<Point>("POINT(8 18)",
+ "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb9-c", box1, "BOX(4 8, 8 18)",
+ ps_distance<Point>("POINT(8 18)",
+ "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_bb);
+
+ // case 10
+ tester::apply("bb10a", box1, "BOX(4 18, 8 22)",
+ ps_distance<Point>("POINT(10 20)",
+ "SEGMENT(8 18, 8 22)", strategy_ps),
+ strategy_bb);
+
+ std::string const box1m = "BOX(10 -20,20 -10)";
+ tester::apply("bb10am", box1m, "BOX(4 -22, 8 -18)",
+ ps_distance<Point>("POINT(10 20)",
+ "SEGMENT(8 18, 8 22)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb10b", box1, "BOX(4 20, 8 22)",
+ ps_distance<Point>("POINT(10 20)",
+ "SEGMENT(8 20, 8 22)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb10bm", box1m, "BOX(4 -22, 8 -20)",
+ ps_distance<Point>("POINT(10 20)",
+ "SEGMENT(8 22, 8 20)", strategy_ps),
+ strategy_bb);
+
+ // case 11
+ tester::apply("bb11", box1, "BOX(4 22, 8 24)",
+ pp_distance<Point>("POINT(8 22)", "POINT(10 20)", strategy_pp),
+ strategy_bb);
+
+ // far away boxes
+ tester::apply("bb-far", "BOX(150 15, 170 25)", box1,
+ ps_distance<Point>("POINT(20 20)",
+ "SEGMENT(150 15, 150 25)", strategy_ps),
+ strategy_bb);
+
+ // crosses antimeridian
+ tester::apply("bb-anti1", "BOX(170 15, -160 25)", box1,
+ ps_distance<Point>("POINT(20 20)",
+ "SEGMENT(170 15, 170 25)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-anti2", "BOX(170 15, -160 25)", "BOX(160 10, -170 20)",
+ pp_distance<Point>("POINT(20 20)",
+ "POINT(20 20)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-anti3", "BOX(170 15, -160 25)", "BOX(160 10, 170 20)",
+ pp_distance<Point>("POINT(20 20)",
+ "POINT(20 20)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-anti4", "BOX(170 10, -160 20)", "BOX(160 30, -170 40)",
+ pp_distance<Point>("POINT(180 20)",
+ "POINT(180 30)", strategy_pp),
+ strategy_bb);
+
+ // South hemisphere
+
+ tester::apply("bb-south1", "BOX(10 -20, 20 -10)", "BOX(30 -15, 40 -12)",
+ ps_distance<Point>("POINT(30 -15)",
+ "SEGMENT(20 -10, 20 -20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-south2", "BOX(10 -20, 20 -10)", "BOX(30 -30, 40 -25)",
+ pp_distance<Point>("POINT(30 -25)",
+ "POINT(20 -20)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-south3", "BOX(10 -20, 20 -10)", "BOX(30 -25, 40 -15)",
+ ps_distance<Point>("POINT(20 -20)",
+ "SEGMENT(30 -15, 30 -25)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-south4", "BOX(10 -20, 20 -10)", "BOX(5 -30, 30 -25)",
+ pp_distance<Point>("POINT(10 -25)",
+ "POINT(10 -20)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-south4", "BOX(10 -20, 20 -10)", "BOX(5 -7, 30 -5)",
+ pp_distance<Point>("POINT(10 -7)",
+ "POINT(10 -10)", strategy_pp),
+ strategy_bb);
+
+
+ // Crosses equator
+
+ tester::apply("bb-eq1", "BOX(30 -15, 40 30)", "BOX(10 -20, 20 25)",
+ ps_distance<Point>("POINT(20 25)",
+ "SEGMENT(30 -15, 30 30)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-eq1b", "BOX(30 -15, 40 30)", "BOX(10 -20, 20 10)",
+ ps_distance<Point>("POINT(30 -15)",
+ "SEGMENT(20 10, 20 -20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-eq1bm", "BOX(30 -30, 40 15)", "BOX(10 -10, 20 20)",
+ ps_distance<Point>("POINT(30 15)",
+ "SEGMENT(20 -10, 20 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-eq2", "BOX(30 -15, 40 20)", "BOX(10 -20, 20 25)",
+ ps_distance<Point>("POINT(30 20)",
+ "SEGMENT(20 -20, 20 25)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-eq3", "BOX(30 5, 40 20)", "BOX(10 -20, 20 25)",
+ ps_distance<Point>("POINT(30 20)",
+ "SEGMENT(20 -20, 20 25)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb-eq4", "BOX(5 -30, 40 -25)", "BOX(10 -20, 20 25)",
+ pp_distance<Point>("POINT(10 -25)",
+ "POINT(10 -20)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-eq5", "BOX(30 5, 40 20)", "BOX(10 -20, 50 25)",
+ pp_distance<Point>("POINT(30 20)",
+ "POINT(30 20)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-eq6", "BOX(30 5, 40 20)", "BOX(10 -20, 35 25)",
+ pp_distance<Point>("POINT(30 20)",
+ "POINT(30 20)", strategy_pp),
+ strategy_bb);
+
+ // One box in the north and one in the south hemisphere
+
+ tester::apply("bb-ns1", "BOX(30 15, 40 20)", "BOX(10 -20, 20 -15)",
+ pp_distance<Point>("POINT(30 15)",
+ "POINT(20 -15)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb-ns2", "BOX(30 15, 40 20)", "BOX(25 -20, 50 -15)",
+ pp_distance<Point>("POINT(30 15)",
+ "POINT(30 -15)", strategy_pp),
+ strategy_bb);
+
+ //negative coordinates
+
+ std::string const box1neg = "BOX(-20 10,-10 20)";
+
+ // case 1
+ tester::apply("bb1", box1neg, "BOX(-40 0,-30 5)",
+ pp_distance<Point>("POINT(-20 10)",
+ "POINT(-30 5)", strategy_pp),
+ strategy_bb);
+
+ // case 2
+ tester::apply("bb2-a", box1neg, "BOX(-40 12, -30 17)",
+ ps_distance<Point>("POINT(-30 17)",
+ "SEGMENT(-20 10,-20 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb2-b", box1neg, "BOX(-40 10, -30 17)",
+ ps_distance<Point>("POINT(-30 17)",
+ "SEGMENT(-20 10,-20 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb2-c", box1neg, "BOX(-40 8, -30 17)",
+ ps_distance<Point>("POINT(-30 17)",
+ "SEGMENT(-20 10,-20 20)", strategy_ps),
+ strategy_bb);
+
+
+ // case 3
+ tester::apply("bb3-a", box1neg, "BOX(-40 15, -30 25)",
+ ps_distance<Point>("POINT(-20 20)",
+ "SEGMENT(-30 15,-30 25)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb3-b", box1neg, "BOX(-40 20, -30 40)",
+ ps_distance<Point>("POINT(-20 20)",
+ "SEGMENT(-30 20,-30 40)", strategy_ps),
+ strategy_bb);
+
+ // case 4
+ tester::apply("bb4", box1neg, "BOX(-40 25, -30 40)",
+ pp_distance<Point>("POINT(-20 20)",
+ "POINT(-30 25)", strategy_pp),
+ strategy_bb);
+
+ // case 5
+ tester::apply("bb5", box1neg, "BOX(-17 2,-12 7)",
+ pp_distance<Point>("POINT(-17 7)",
+ "POINT(-17 10)", strategy_pp),
+ strategy_bb);
+
+ // case 6, boxes intersect thus distance is 0
+ tester::apply("bb6-a", box1neg, "BOX(-17 2, -12 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-b", box1neg, "BOX(-17 2, -12 17)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-c", box1neg, "BOX(-30 2, -20 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-d", box1neg, "BOX(-30 11, -20 15)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-e", box1neg, "BOX(-30 20, -20 30)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-f", box1neg, "BOX(-17 20, -15 30)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-g", box1neg, "BOX(-10 20, -8 25)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-h", box1neg, "BOX(-10 15 , -8 17)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-i", box1neg, "BOX(-10 8, -8 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ tester::apply("bb6-j", box1neg, "BOX(-17 8, -15 10)",
+ pp_distance<Point>("POINT(0 0)", "POINT(0 0)", strategy_pp),
+ strategy_bb);
+
+ // case 7
+ tester::apply("bb7", box1neg, "BOX(-17 22, -12 27)",
+ pp_distance<Point>("POINT(-17 20)",
+ "POINT(-17 22)", strategy_pp),
+ strategy_bb);
+
+ // case 8
+ tester::apply("bb8", box1neg, "BOX(-8 4, -4 8)",
+ pp_distance<Point>("POINT(-8 8)",
+ "POINT(-10 10)", strategy_pp),
+ strategy_bb);
+
+ // case 9
+ tester::apply("bb9-a", box1neg, "BOX(-8 14, -4 18)",
+ ps_distance<Point>("POINT(-8 18)",
+ "SEGMENT(-10 10, -10 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb9-b", box1neg, "BOX(-8 10, -4 18)",
+ ps_distance<Point>("POINT(-8 18)",
+ "SEGMENT(-10 10, -10 20)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb9-c", box1neg, "BOX(-8 8, -4 18)",
+ ps_distance<Point>("POINT(-8 18)",
+ "SEGMENT(-10 10, -10 20)", strategy_ps),
+ strategy_bb);
+
+ // case 10
+ tester::apply("bb10", box1neg, "BOX(-8 18, -4 22)",
+ ps_distance<Point>("POINT(-10 20)",
+ "SEGMENT(-8 18, -8 22)", strategy_ps),
+ strategy_bb);
+
+ tester::apply("bb10", box1neg, "BOX(-8 20, -4 22)",
+ ps_distance<Point>("POINT(-10 20)",
+ "SEGMENT(-8 20, -8 22)", strategy_ps),
+ strategy_bb);
+
+ // case 11
+ tester::apply("bb11", box1neg, "BOX(-8 22, -4 24)",
+ pp_distance<Point>("POINT(-8 22)",
+ "POINT(-10 20)", strategy_pp),
+ strategy_bb);
+
+
+ //Degenerate cases
+
+ //1st box degenerates to a meridian segment
+ std::string const box1deg = "BOX(0 10,0 20)";
+
+ //2nd box generic
+ tester::apply("pbd1", box1deg, "BOX(1 15, 2 25)",
+ ps_distance<Point>("POINT(0 20)",
+ "SEGMENT(1 15, 1 25)", strategy_ps),
+ strategy_bb);
+
+ //2nd box degenerates to a meridian segment
+ tester::apply("pbd2", box1deg, "BOX(1 15, 1 25)",
+ ps_distance<Point>("POINT(0 20)",
+ "SEGMENT(1 15, 1 25)", strategy_ps),
+ strategy_bb);
+
+ //2nd box degenerates to a horizontal line
+ //test fails for thomas strategy; test only for andoyer
+ tester::apply("pbd3", box1deg, "BOX(1 15, 2 15)",
+ pp_distance<Point>("POINT(1 15)",
+ "POINT(0 15)", andoyer_pp()),
+ andoyer_bb());
+
+ //2nd box degenerates to a point
+ tester::apply("pbd4", box1deg, "BOX(1 15, 1 15)",
+ ps_distance<Point>("POINT(1 15)",
+ "SEGMENT(0 10, 0 20)", strategy_ps),
+ strategy_bb);
+
+ //---
+ //1st box degenerates to a horizontal line; that is not a geodesic segment
+ std::string const box2deg = "BOX(10 10,20 10)";
+
+ //2nd box generic
+ tester::apply("pbd5", box2deg, "BOX(15 15, 25 20)",
+ pp_distance<Point>("POINT(15 15)",
+ "POINT(15 10)", strategy_pp),
+ strategy_bb);
+
+ //2nd box degenerates to a horizontal line
+ tester::apply("pbd6", box2deg, "BOX(15 15, 25 15)",
+ pp_distance<Point>("POINT(15 15)",
+ "POINT(15 10)", strategy_pp),
+ strategy_bb);
+
+ //2nd box degenerates to a point
+ tester::apply("pbd7", box2deg, "BOX(15 15, 15 15)",
+ pp_distance<Point>("POINT(15 15)",
+ "POINT(15 10)", strategy_pp),
+ strategy_bb);
+
+ //---
+ //1st box degenerates to a point
+ std::string const box3deg = "BOX(0 6,0 6)";
+
+ //2nd box generic
+ tester::apply("pbd8", box3deg, "BOX(15 15, 25 20)",
+ ps_distance<Point>("POINT(0 6)",
+ "SEGMENT(15 15, 15 20)", strategy_ps),
+ strategy_bb);
+
+ //2nd box degenerates to a point
+ tester::apply("pbd9", box3deg, "BOX(15 15, 15 15)",
+ pp_distance<Point>("POINT(0 6)",
+ "POINT(15 15)", strategy_pp),
+ strategy_bb);
+}
+
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_bb,
+ typename Strategy_sb
+>
+void test_all_ar_ar(Strategy_pp pp_strategy,
+ Strategy_ps ps_strategy,
+ Strategy_bb bb_strategy,
+ Strategy_sb sb_strategy)
+{
+ test_distance_ring_ring<Point>(pp_strategy, ps_strategy);
+
+ test_distance_ring_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_polygon_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_ring_multi_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_polygon_multi_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multi_polygon_multi_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_polygon_box<Point>(pp_strategy, ps_strategy, sb_strategy);
+ test_distance_multi_polygon_box<Point>(pp_strategy, ps_strategy, sb_strategy);
+ test_distance_ring_box<Point>(pp_strategy, ps_strategy, sb_strategy);
+ test_distance_box_box<Point>(pp_strategy, ps_strategy, bb_strategy);
+
+ test_more_empty_input_areal_areal<Point>(ps_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_areal_areal )
+{
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::spherical_equatorial<bg::degree>
+ > sph_point;
+
+ test_all_ar_ar<sph_point>(spherical_pp(), spherical_ps(), spherical_bb(), spherical_sb());
+
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::geographic<bg::degree>
+ > geo_point;
+
+ test_all_ar_ar<geo_point>(vincenty_pp(), vincenty_ps(), vincenty_bb(), vincenty_sb());
+ test_all_ar_ar<geo_point>(thomas_pp(), thomas_ps(), thomas_bb(), thomas_sb());
+ test_all_ar_ar<geo_point>(andoyer_pp(), andoyer_ps(), andoyer_bb(), andoyer_sb());
+
+ // test with different spheroid
+ stype spheroid(6372000, 6370000);
+ test_all_ar_ar<geo_point>(andoyer_pp(spheroid), andoyer_ps(spheroid),
+ andoyer_bb(spheroid), andoyer_sb(spheroid));
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_ar.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_ar.cpp
new file mode 100644
index 000000000..ae332a0da
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_ar.cpp
@@ -0,0 +1,651 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017, 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_linear_areal
+#endif
+
+#include <boost/range.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include "test_distance_geo_common.hpp"
+#include "test_empty_geometry.hpp"
+
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_segment_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<segment_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20,15 30,20 15,15 10,10 10))";
+
+ tester::apply("s-p-1", "SEGMENT(0 0, 0 10)", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("s-p-2", "SEGMENT(9 0, 10 9)", polygon,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 9)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("s-p-3", "SEGMENT(9 0, 10 10)", polygon,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("s-p-4", "SEGMENT(9 0, 10 11)", polygon,
+ 0, strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_linestring_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<linestring_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("l-p-1", "LINESTRING(0 0,0 10)", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("l-p-2", "LINESTRING(9 0,10 9,11 8,15 8,20 9)", polygon,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 9)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("l-p-3", "LINESTRING(9 0,10 1,10 10,11 9)", polygon,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("l-p-4", "LINESTRING(9 0,10 11,10 9,11 9)", polygon,
+ 0, strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_multi_linestring_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<multi_linestring_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("ml-p-1", "MULTILINESTRING((0 0,0 10)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", polygon,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("ml-p-2", "MULTILINESTRING((9 0,10 9,11 8,15 8,20 9)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", polygon,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 9)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("ml-p-3", "MULTILINESTRING((9 0,10 1,10 10,11 9)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", polygon,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("ml-p-4", "MULTILINESTRING((9 0,10 11,10 9,11 9)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", polygon,
+ 0, strategy_ps, true, false, false);
+}
+
+//=====================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_segment_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+ typedef test_distance_of_geometries<segment_type, multi_polygon_type> tester;
+
+ std::string const mp = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("s-mp-1", "SEGMENT(0 0, 0 10)", mp,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("s-mp-2", "SEGMENT(9 0, 10 9)", mp,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 9)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("s-mp-3", "SEGMENT(9 0, 10 10)", mp,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("s-mp-4", "SEGMENT(9 0, 10 11)", mp,
+ 0, strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_linestring_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+ typedef test_distance_of_geometries<linestring_type, multi_polygon_type> tester;
+
+ std::string const mp = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("l-mp-1", "LINESTRING(0 0, 0 10)", mp,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("l-mp-2", "LINESTRING(9 0,10 9,11 8,15 8,20 9)", mp,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 9)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("l-mp-3", "LINESTRING(9 0,10 1,10 10,11 9)", mp,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("l-mp-4", "LINESTRING(9 0,10 11,10 9,11 9)", mp,
+ 0, strategy_ps, true, false, false);
+
+}
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps>
+void test_distance_multi_linestring_multi_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/multi_polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+ typedef test_distance_of_geometries<multi_linestring_type, multi_polygon_type> tester;
+
+ std::string const mp = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("ml-mp-1", "MULTILINESTRING((0 0, 0 10)(0 0, 10 0))", mp,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+
+ tester::apply("ml-mp-2", "MULTILINESTRING((9 0,10 9,11 8,15 8,20 9)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", mp,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 9)", strategy_pp),
+ strategy_ps, true, false, false);
+
+ tester::apply("ml-mp-3", "MULTILINESTRING((9 0,10 1,10 10,11 9)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", mp,
+ 0, strategy_ps, true, false, false);
+
+ tester::apply("ml-mp-4", "MULTILINESTRING((9 0,10 11,10 9,11 9)\
+ (0 0,1 0,2 0,3 0,4 0,10 0,15 0,20 0))", mp,
+ 0, strategy_ps, true, false, false);
+}
+
+//=====================================================================
+
+template <typename Point, typename Strategy_ps>
+void test_distance_segment_ring(Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<segment_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("s-r-1", "SEGMENT(0 0, 0 10)", ring,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_ps>
+void test_distance_linestring_ring(Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<linestring_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("l-r-1", "LINESTRING(0 0, 0 10)", ring,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+template <typename Point, typename Strategy_ps>
+void test_distance_multi_linestring_ring(Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<multi_linestring_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("ml-r-1", "MULTILINESTRING((0 0, 0 10)(0 0, 10 0))", ring,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, false, false);
+}
+
+//======================================================================
+
+template <typename Point, typename Strategy_pp, typename Strategy_ps, typename Strategy_sb>
+void test_distance_segment_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/box distance tests" << std::endl;
+#endif
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<segment_type, box_type> tester;
+
+ std::string const box_north = "BOX(10 10,20 20)";
+
+ tester::apply("sb1-1a", "SEGMENT(0 0, 0 20)", box_north,
+ pp_distance<Point>("POINT(0 20)", "POINT(10 20)", strategy_pp),
+ strategy_sb);
+ //segment with slope
+ tester::apply("sb1-1b", "SEGMENT(10 5, 20 6)", box_north,
+ pp_distance<Point>("POINT(20 6)", "POINT(20 10)", strategy_pp),
+ strategy_sb);
+ tester::apply("sb1-2", "SEGMENT(0 0, 0 10)", box_north,
+ ps_distance<Point>("POINT(0 10)", "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb1-3", "SEGMENT(0 0, 0 15)", box_north,
+ ps_distance<Point>("POINT(0 15)", "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb1-4", "SEGMENT(0 0, 0 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 0,0 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb1-5", "SEGMENT(0 10, 0 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 0,0 25)", strategy_ps),
+ strategy_sb);
+
+ tester::apply("sb2-2", "SEGMENT(0 5, 15 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5,15 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("sb2-3a", "SEGMENT(0 5, 20 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5,20 5)", strategy_ps),
+ strategy_sb);
+
+ // Test segments below box
+ tester::apply("test_b1", "SEGMENT(0 5, 9 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 9 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b2", "SEGMENT(0 5, 10 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 10 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b3", "SEGMENT(0 5, 11 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 11 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b4", "SEGMENT(0 5, 20 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5,20 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b5", "SEGMENT(0 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(11 10)", "SEGMENT(0 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b6", "SEGMENT(10 5, 20 5)", box_north,
+ ps_distance<Point>("POINT(15 10)", "SEGMENT(10 5,20 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b7", "SEGMENT(10 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(16 10)", "SEGMENT(10 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b8", "SEGMENT(12 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(17 10)", "SEGMENT(12 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b9", "SEGMENT(18 5, 22 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(18 5,22 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b10", "SEGMENT(18 5, 24 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(18 5,24 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b11", "SEGMENT(20 5, 24 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(20 5,24 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b12", "SEGMENT(22 5, 24 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(22 5,24 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_b13", "SEGMENT(0 5, 125 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(0 5, 125 5)", strategy_ps),
+ strategy_sb);
+
+ // Test segments above box
+ tester::apply("test_a1", "SEGMENT(0 25, 9 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 25, 9 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a2", "SEGMENT(0 25, 10 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(0 25, 10 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a3", "SEGMENT(0 25, 11 25)", box_north,
+ ps_distance<Point>("POINT(11 20)", "SEGMENT(0 25, 11 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a4", "SEGMENT(0 25, 20 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(0 25, 20 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a5", "SEGMENT(0 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(0 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a6", "SEGMENT(10 25, 20 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(10 25, 20 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a7", "SEGMENT(10 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(10 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a8", "SEGMENT(12 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(12 20)", "SEGMENT(12 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a9", "SEGMENT(18 25, 22 25)", box_north,
+ ps_distance<Point>("POINT(18 20)", "SEGMENT(18 25, 22 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a10", "SEGMENT(18 25, 24 25)", box_north,
+ ps_distance<Point>("POINT(18 20)", "SEGMENT(18 25, 24 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a11", "SEGMENT(20 25, 24 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(20 25, 24 25)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_a12", "SEGMENT(22 25, 24 25)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(22 25, 24 25)", strategy_ps),
+ strategy_sb);
+
+ // Segments left-right of box
+ tester::apply("test_l1", "SEGMENT(0 5, 9 5)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(0 5, 9 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l2", "SEGMENT(0 10, 9 10)", box_north,
+ ps_distance<Point>("POINT(9 10)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l3", "SEGMENT(0 10, 9 15)", box_north,
+ ps_distance<Point>("POINT(9 15)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l4", "SEGMENT(0 10, 0 15)", box_north,
+ ps_distance<Point>("POINT(0 15)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l5", "SEGMENT(1 10, 0 15)", box_north,
+ ps_distance<Point>("POINT(1 10)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_l6", "SEGMENT(0 20, 9 21)", box_north,
+ ps_distance<Point>("POINT(9 21)", "SEGMENT(10 10, 10 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r1", "SEGMENT(21 5, 29 5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(21 5, 29 5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r2", "SEGMENT(21 10, 29 10)", box_north,
+ ps_distance<Point>("POINT(21 10)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r3", "SEGMENT(21 10, 29 15)", box_north,
+ ps_distance<Point>("POINT(21 10)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r4", "SEGMENT(21 10, 21 15)", box_north,
+ ps_distance<Point>("POINT(21 15)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r5", "SEGMENT(21 10, 22 15)", box_north,
+ ps_distance<Point>("POINT(21 10)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_r6", "SEGMENT(29 20, 21 21)", box_north,
+ ps_distance<Point>("POINT(21 21)", "SEGMENT(20 10, 20 20)", strategy_ps),
+ strategy_sb);
+
+ //Segments on corners of box
+ //left-top corner
+ //generic
+ tester::apply("test_c1", "SEGMENT(9 19.5, 11 21)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(9 19.5, 11 21)", strategy_ps),
+ strategy_sb);
+ //degenerate
+ tester::apply("test_c2", "SEGMENT(9 19, 11 21)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(9 19, 11 21)", strategy_ps),
+ strategy_sb);
+ //left-bottom corner
+ //generic
+ tester::apply("test_c3", "SEGMENT(8.5 11, 11 9)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(8.5 11, 11 9)", strategy_ps),
+ strategy_sb);
+ //degenerate
+ tester::apply("test_c4", "SEGMENT(9 11, 11 9)", box_north,
+ 0,
+ strategy_sb);
+ //right-top corner
+ //generic
+ tester::apply("test_c5", "SEGMENT(19 21, 21 19.5)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(19 21, 21 19.5)", strategy_ps),
+ strategy_sb);
+ //degenerate
+ tester::apply("test_c6", "SEGMENT(19 21, 21 19)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(19 21, 21 19)", strategy_ps),
+ strategy_sb);
+ //right-bottom corner
+ //generic
+ tester::apply("test_c7", "SEGMENT(19 9, 21 10.5)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(19 9, 21 10.5)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_c7", "SEGMENT(19 9, 21 11)", box_north,
+ 0,
+ strategy_sb);
+
+ //Segment and box on different hemispheres
+ std::string const box_south = "BOX(10 -20,20 -10)";
+
+ tester::apply("test_ns1", "SEGMENT(10 20, 15 30)", box_south,
+ ps_distance<Point>("POINT(10 -10)", "SEGMENT(10 20, 15 30)", strategy_ps),
+ strategy_sb);
+ tester::apply("test_ns2", "SEGMENT(0 10, 12 10)", box_south,
+ pp_distance<Point>("POINT(12 10)", "POINT(12 -10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_ns3", "SEGMENT(10 10, 20 10)", box_south,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 -10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_ns4", "SEGMENT(0 -10, 12 -10)", box_north,
+ pp_distance<Point>("POINT(12 10)", "POINT(12 -10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_ns5", "SEGMENT(10 -10, 20 -10)", box_north,
+ pp_distance<Point>("POINT(10 -10)", "POINT(10 10)", strategy_pp),
+ strategy_sb);
+
+ //Box crossing equator
+ std::string const box_crossing_eq = "BOX(10 -10,20 10)";
+
+ tester::apply("test_cr1", "SEGMENT(10 20, 15 30)", box_crossing_eq,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 20)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_cr2", "SEGMENT(10 -20, 15 -30)", box_crossing_eq,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 20)", strategy_pp),
+ strategy_sb);
+
+ //Box crossing prime meridian
+
+ std::string const box_crossing_mer = "BOX(-10 10,15 20)";
+
+ tester::apply("test_cr3", "SEGMENT(-5 25, 10 30)", box_crossing_mer,
+ pp_distance<Point>("POINT(-5 25)", "POINT(-5 20)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_cr4", "SEGMENT(-5 5, 10 7)", box_crossing_mer,
+ pp_distance<Point>("POINT(10 7)", "POINT(10 10)", strategy_pp),
+ strategy_sb);
+ tester::apply("test_cr5", "SEGMENT(-5 5, 10 5)", box_crossing_mer,
+ ps_distance<Point>("POINT(2.5 10)", "SEGMENT(-5 5, 10 5)", strategy_ps),
+ strategy_sb);
+
+
+ //Geometries in south hemisphere
+ tester::apply("test_south1", "SEGMENT(10 -30, 15 -30)", box_south,
+ ps_distance<Point>("POINT(10 -20)", "SEGMENT(10 -30, 15 -30)", strategy_ps),
+ strategy_sb);
+
+ //Segments in boxes corner
+ tester::apply("corner1", "SEGMENT(17 21, 25 20)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(17 21, 25 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("corner2", "SEGMENT(17 21, 0 20)", box_north,
+ ps_distance<Point>("POINT(10 20)", "SEGMENT(17 21, 0 20)", strategy_ps),
+ strategy_sb);
+ tester::apply("corner3", "SEGMENT(17 5, 0 10)", box_north,
+ ps_distance<Point>("POINT(10 10)", "SEGMENT(17 5, 0 10)", strategy_ps),
+ strategy_sb);
+ tester::apply("corner4", "SEGMENT(17 5, 25 9)", box_north,
+ ps_distance<Point>("POINT(20 10)", "SEGMENT(17 5, 25 9)", strategy_ps),
+ strategy_sb);
+}
+
+template <typename Point, typename Strategy_ps, typename Strategy_sb>
+void test_distance_linestring_box(Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/box distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<linestring_type, box_type> tester;
+
+ std::string const box_north = "BOX(10 10,20 20)";
+
+ tester::apply("sl1", "LINESTRING(0 20, 15 21, 25 19.9, 21 5, 15 5, 0 10)", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(15 21, 25 19.9)", strategy_ps),
+ strategy_sb, true, false, false);
+
+ tester::apply("sl2", "LINESTRING(0 20, 15 21, 25 19.9, 21 5, 15 5, 15 15)", box_north,
+ 0, strategy_sb, true, false, false);
+
+ tester::apply("sl3", "LINESTRING(0 20, 15 21, 25 19.9, 21 5, 15 5, 2 20)", box_north,
+ 0, strategy_sb, true, false, false);
+}
+
+template <typename Point, typename Strategy_ps, typename Strategy_sb>
+void test_distance_multi_linestring_box(Strategy_ps const& strategy_ps,
+ Strategy_sb const& strategy_sb)
+{
+
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multi_linestring/box distance tests" << std::endl;
+#endif
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<multi_linestring_type, box_type> tester;
+
+ std::string const box_north = "BOX(10 10,20 20)";
+
+ tester::apply("sl1", "MULTILINESTRING((0 20, 15 21, 25 19.9, 21 5, 15 5, 0 10)(25 20, 22 4, 0 0))", box_north,
+ ps_distance<Point>("POINT(20 20)", "SEGMENT(15 21, 25 19.9)", strategy_ps),
+ strategy_sb, true, false, false);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_sb
+>
+void test_all_l_ar(Strategy_pp pp_strategy,
+ Strategy_ps ps_strategy,
+ Strategy_sb sb_strategy)
+{
+ test_distance_segment_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_linestring_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multi_linestring_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_segment_multi_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_linestring_multi_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multi_linestring_multi_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_segment_ring<Point>(ps_strategy);
+ test_distance_linestring_ring<Point>(ps_strategy);
+ test_distance_multi_linestring_ring<Point>(ps_strategy);
+
+ test_distance_segment_box<Point>(pp_strategy, ps_strategy, sb_strategy);
+ test_distance_linestring_box<Point>(ps_strategy, sb_strategy);
+ test_distance_multi_linestring_box<Point>(ps_strategy, sb_strategy);
+
+ test_more_empty_input_linear_areal<Point>(ps_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linear_areal )
+{
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::spherical_equatorial<bg::degree>
+ > sph_point;
+
+ test_all_l_ar<sph_point>(spherical_pp(), spherical_ps(), spherical_sb());
+
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::geographic<bg::degree>
+ > geo_point;
+
+ test_all_l_ar<geo_point>(vincenty_pp(), vincenty_ps(), vincenty_sb());
+ test_all_l_ar<geo_point>(thomas_pp(), thomas_ps(), thomas_sb());
+ test_all_l_ar<geo_point>(andoyer_pp(), andoyer_ps(), andoyer_sb());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_l.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_l.cpp
new file mode 100644
index 000000000..f287f5264
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_l_l.cpp
@@ -0,0 +1,286 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_linear_linear
+#endif
+
+#include <boost/range.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include "test_distance_geo_common.hpp"
+#include "test_empty_geometry.hpp"
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_segment_segment(Strategy const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/segment distance tests" << std::endl;
+#endif
+
+ typedef bg::model::segment<Point> segment_type;
+
+ typedef test_distance_of_geometries<segment_type, segment_type> tester;
+
+ tester::apply("s-s-01",
+ "SEGMENT(0 0,1 1)",
+ "SEGMENT(2 0,3 0)",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(0 0,1 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-s-02",
+ "SEGMENT(2 1,3 1)",
+ "SEGMENT(2 0,3 0)",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(2 1,3 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-s-03",
+ "SEGMENT(2.5 1,3.5 1)",
+ "SEGMENT(2 0,3 0)",
+ ps_distance<Point>("POINT(2.5 0)",
+ "SEGMENT(2.5 1,3.5 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-s-04",
+ "SEGMENT(2.5 1,3.5 1)",
+ "SEGMENT(2 2,3 2)",
+ ps_distance<Point>("POINT(3 2)",
+ "SEGMENT(2.5 1,3.5 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-s-05",
+ "SEGMENT(2.5 2.1,3.5 1)",
+ "SEGMENT(2 2,3 2)",
+ 0, strategy_ps, true, true, false);
+ tester::apply("s-s-06",
+ "SEGMENT(2.5 2.1,3.5 1)",
+ "SEGMENT(2 2,3.5 1)",
+ 0, strategy_ps, true, true, false);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_segment_linestring(Strategy const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/linestring distance tests" << std::endl;
+#endif
+
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::linestring<Point> linestring_type;
+
+ typedef test_distance_of_geometries<segment_type, linestring_type> tester;
+
+ tester::apply("s-l-01",
+ "SEGMENT(0 0,1 1)",
+ "LINESTRING(2 0,3 0)",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(0 0,1 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-l-02",
+ "SEGMENT(0 0,1 1)",
+ "LINESTRING(2 0,3 0,2 2,0.5 0.7)",
+ ps_distance<Point>("POINT(1 1)",
+ "SEGMENT(0.5 0.7,2 2)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-l-03",
+ "SEGMENT(0 0,2 2)",
+ "LINESTRING(2 0,3 0,2 2,0.5 0.7)",
+ 0, strategy_ps, true, true, false);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_linestring_linestring(Strategy const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/linestring distance tests" << std::endl;
+#endif
+
+ typedef bg::model::linestring<Point> linestring_type;
+
+ typedef test_distance_of_geometries
+ <
+ linestring_type, linestring_type
+ > tester;
+
+ tester::apply("l-l-01",
+ "LINESTRING(0 0,1 1)",
+ "LINESTRING(2 0,3 0)",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(0 0,1 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("l-l-02",
+ "LINESTRING(0 0,1 1,2 2)",
+ "LINESTRING(2 0,3 0,4 1)",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(1 1,2 2)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("l-l-03",
+ "LINESTRING(0 0,1 1,2 2)",
+ "LINESTRING(2 0)",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(1 1,2 2)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("l-l-04",
+ "LINESTRING(0 0,1 1,2 2)",
+ "LINESTRING(3 3,1 1)",
+ 0, strategy_ps, true, true, false);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_segment_multilinestring(Strategy const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "segment/multilinestring distance tests" << std::endl;
+#endif
+
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+ typedef test_distance_of_geometries
+ <
+ segment_type, multi_linestring_type
+ > tester;
+
+ tester::apply("s-ml-01",
+ "SEGMENT(0 0,1 1)",
+ "MULTILINESTRING((2 0,3 0)(2 5, 5 5, 2 -1))",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(0 0,1 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-ml-02",
+ "SEGMENT(0 0,1 1)",
+ "MULTILINESTRING((2 0,3 0))",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(0 0,1 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-ml-03",
+ "SEGMENT(0 0,2 0)",
+ "MULTILINESTRING((2 0,3 0)(2 5, 5 5, 2 -1))",
+ 0, strategy_ps, true, true, false);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_linestring_multilinestring(Strategy const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multilinestring distance tests" << std::endl;
+#endif
+
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+ typedef test_distance_of_geometries
+ <
+ linestring_type, multi_linestring_type
+ > tester;
+
+ tester::apply("l-ml-01",
+ "LINESTRING(0 0,1 1,2 2,3 3,4 4,6 6)",
+ "MULTILINESTRING((2 0,3 0)(2 1, 5 5))",
+ ps_distance<Point>("POINT(5 5)",
+ "SEGMENT(4 4,6 6)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("l-ml-02",
+ "LINESTRING(0 0,1 1,2 2,3 3,4 4,6 6)",
+ "MULTILINESTRING((2 0,3 0)(2 5, 5 5))",
+ 0,
+ strategy_ps, true, true, false);
+
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_multilinestring_multilinestring(Strategy const& strategy_ps)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multilinestring/multilinestring distance tests" << std::endl;
+#endif
+
+ typedef bg::model::linestring<Point> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+ typedef test_distance_of_geometries
+ <
+ multi_linestring_type, multi_linestring_type
+ > tester;
+
+ tester::apply("s-ml-01",
+ "MULTILINESTRING((0 0,1 1)(-1 0, -1 -1))",
+ "MULTILINESTRING((2 0,3 0)(2 5, 5 5))",
+ ps_distance<Point>("POINT(2 0)",
+ "SEGMENT(0 0,1 1)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("s-ml-02",
+ "MULTILINESTRING((0 0,1 1)(-1 0, -1 -1)(5 0, 5 6))",
+ "MULTILINESTRING((2 0,3 0)(2 5, 5 5))",
+ 0,
+ strategy_ps, true, true, false);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_all_l_l(Strategy ps_strategy)
+{
+ test_distance_segment_segment<Point>(ps_strategy);
+ test_distance_segment_linestring<Point>(ps_strategy);
+ test_distance_linestring_linestring<Point>(ps_strategy);
+ test_distance_segment_multilinestring<Point>(ps_strategy);
+ test_distance_linestring_multilinestring<Point>(ps_strategy);
+ test_distance_multilinestring_multilinestring<Point>(ps_strategy);
+
+ test_more_empty_input_linear_linear<Point>(ps_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linear_linear )
+{
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::spherical_equatorial<bg::degree>
+ > sph_point;
+
+ test_all_l_l<sph_point>(spherical_ps());
+
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::geographic<bg::degree>
+ > geo_point;
+
+ test_all_l_l<geo_point>(vincenty_ps());
+ test_all_l_l<geo_point>(thomas_ps());
+ test_all_l_l<geo_point>(andoyer_ps());
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_ar.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_ar.cpp
new file mode 100644
index 000000000..3a9d5f277
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_ar.cpp
@@ -0,0 +1,687 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_pointlike_areal
+#endif
+
+#include <boost/range.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include "test_distance_geo_common.hpp"
+#include "test_empty_geometry.hpp"
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps
+>
+void test_distance_point_ring(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::ring<Point> ring_type;
+ typedef test_distance_of_geometries<Point, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("pr1", "POINT(0 10)", ring,
+ ps_distance<Point>("POINT(0 10)",
+ "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("pr2", "POINT(10 0)", ring,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 0)", strategy_pp),
+ strategy_ps, true, true, false);
+ tester::apply("pr3", "POINT(0 20)", ring,
+ 0, strategy_ps, true, true, false);
+ tester::apply("pr4", "POINT(10 10)", ring,
+ 0, strategy_ps, true, true, false);
+ tester::apply("pr4", "POINT(10 11)", ring,
+ 0, strategy_ps, true, true, false);
+}
+
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_ps
+>
+void test_distance_multipoint_ring(Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/ring distance tests" << std::endl;
+#endif
+ typedef bg::model::ring<Point> ring_type;
+ typedef bg::model::multi_point<Point> multi_point_type;
+ typedef test_distance_of_geometries<multi_point_type, ring_type> tester;
+
+ std::string const ring = "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("pr1", "MULTIPOINT(0 10,10 0,0 0)", ring,
+ ps_distance<Point>("POINT(0 10)",
+ "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, true, false);
+}
+
+
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps
+>
+void test_distance_point_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef test_distance_of_geometries<Point, polygon_type> tester;
+
+ std::string const polygon =
+ "POLYGON((10 10,0 20, 15 30, 20 15, 15 10, 10 10))";
+
+ tester::apply("pr1", "POINT(0 10)", polygon,
+ ps_distance<Point>("POINT(0 10)",
+ "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, true, false);
+ tester::apply("pr2", "POINT(10 0)", polygon,
+ pp_distance<Point>("POINT(10 10)", "POINT(10 0)", strategy_pp),
+ strategy_ps, true, true, false);
+ tester::apply("pr3", "POINT(0 20)", polygon,
+ 0, strategy_ps, true, true, false);
+ tester::apply("pr4", "POINT(10 10)", polygon,
+ 0, strategy_ps, true, true, false);
+ tester::apply("pr5", "POINT(10 10.1)", polygon,
+ 0, strategy_ps, false, false, false);
+}
+
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps
+>
+void test_distance_multipoint_polygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/polygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_point<Point> multi_point_type;
+ typedef test_distance_of_geometries<multi_point_type, polygon_type> tester;
+
+ std::string const polygon = "POLYGON((10 10,0 20,15 30,20 15,15 10,10 10))";
+
+ tester::apply("mpp1", "MULTIPOINT(0 10,10 0,0 0)", polygon,
+ ps_distance<Point>("POINT(0 10)",
+ "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, true, false);
+
+ tester::apply("mpp2", "MULTIPOINT(0 10,10 0,0 0,20.1 15)", polygon,
+ pp_distance<Point>("POINT(20 15)",
+ "POINT(20.1 15)", strategy_pp),
+ strategy_ps, true, true, false);
+
+ tester::apply("mpp3", "MULTIPOINT(0 10,10 0,0 0,20.1 15,10 10)", polygon,
+ 0, strategy_ps, true, true, false);
+
+ tester::apply("mpp4", "MULTIPOINT(0 10,10 0,0 0,20.1 15,10 11)", polygon,
+ 0, strategy_ps, true, true, false);
+}
+
+
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps
+>
+void test_distance_point_multipolygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multipolygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multipolygon_type;
+ typedef test_distance_of_geometries<Point, multipolygon_type> tester;
+
+ std::string const mpoly = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("pmp1", "POINT(0 10)", mpoly,
+ ps_distance<Point>("POINT(0 10)",
+ "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, true, false);
+
+
+ tester::apply("pmp2", "POINT(10 9.9)", mpoly,
+ pp_distance<Point>("POINT(10 9.9)",
+ "POINT(10 10)", strategy_pp),
+ strategy_ps, true, true, false);
+
+ tester::apply("pmp3", "POINT(10 11)", mpoly,
+ 0, strategy_ps, true, true, false);
+}
+
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps
+>
+void test_distance_multipoint_multipolygon(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multipolygon distance tests" << std::endl;
+#endif
+ typedef bg::model::polygon<Point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multipolygon_type;
+ typedef bg::model::multi_point<Point> multi_point_type;
+ typedef test_distance_of_geometries<multi_point_type, multipolygon_type> tester;
+
+ std::string const mpoly = "MULTIPOLYGON(((20 20, 20 30, 30 40, 20 20)),\
+ ((10 10,0 20, 15 30, 20 15, 15 10, 10 10)))";
+
+ tester::apply("pr1", "MULTIPOINT(0 10,10 0,0 0)", mpoly,
+ ps_distance<Point>("POINT(0 10)",
+ "SEGMENT(0 20, 10 10)", strategy_ps),
+ strategy_ps, true, true, false);
+
+ tester::apply("pmp2", "MULTIPOINT(0 10,10 0,0 0,10 9.9)", mpoly,
+ pp_distance<Point>("POINT(10 9.9)",
+ "POINT(10 10)", strategy_pp),
+ strategy_ps, true, true, false);
+
+ tester::apply("pmp3", "MULTIPOINT(0 10,10 0,0 0,10 9.9,10 11)", mpoly,
+ 0, strategy_ps, true, true, false);
+}
+
+
+//===========================================================================
+// Cases for relative location of a point wrt to a box
+//
+// | |
+// | 3 |
+// | |
+// +---------+
+// | |
+// 1 | 5 | 2
+// | |
+// +---------+
+// | |
+// | 4 |
+// | |
+//
+// and also the following cases
+//
+// | |
+// A B
+// | |
+// +----C----+
+// | |
+// D E
+// | |
+// +----F----+
+// | |
+// G H
+// | |
+//
+// and finally we have the corners
+//
+// | |
+// | |
+// | |
+// a---------b
+// | |
+// | |
+// | |
+// c---------d
+// | |
+// | |
+// | |
+//
+// for each relative position we also have to test the shifted point
+// (this is due to the fact that boxes have longitudes in the
+// range [-180, 540)
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_pb
+>
+void test_distance_point_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_pb const& strategy_pb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/box distance tests" << std::endl;
+#endif
+ typedef bg::model::box<Point> box_type;
+ typedef test_distance_of_geometries<Point, box_type> tester;
+
+ std::string const box1 = "BOX(10 10,20 20)";
+
+ // case 1
+ tester::apply("pb1-1a", "POINT(5 25)", box1,
+ pp_distance<Point>("POINT(5 25)", "POINT(10 20)", strategy_pp),
+ strategy_pb);
+
+ // case 1
+ tester::apply("pb1-1b", "POINT(3 12)", box1,
+ ps_distance<Point>("POINT(3 12)",
+ "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_pb);
+
+ // case 1
+ tester::apply("pb1-1c", "POINT(3 17)", box1,
+ ps_distance<Point>("POINT(3 17)",
+ "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_pb);
+
+ // case 1
+ tester::apply("pb1-1d", "POINT(5 4)", box1,
+ pp_distance<Point>("POINT(5 4)", "POINT(10 10)", strategy_pp),
+ strategy_pb);
+
+ // case 1
+ tester::apply("pb1-1e", "POINT(-100 20)", box1,
+ pp_distance<Point>("POINT(-100 20)",
+ "POINT(10 20)", strategy_pp),
+ strategy_pb);
+
+ // case 1
+ tester::apply("pb1-1g", "POINT(-100 10)", box1,
+ ps_distance<Point>("POINT(-100 10)",
+ "SEGMENT(10 10,10 20)", strategy_ps),
+ strategy_pb);
+
+ // case 2
+ tester::apply("pb1-2a", "POINT(31 25)", box1,
+ pp_distance<Point>("POINT(31 25)",
+ "POINT(20 20)", strategy_pp),
+ strategy_pb);
+
+ // case 2
+ tester::apply("pb1-2b", "POINT(23 17)", box1,
+ ps_distance<Point>("POINT(23 17)",
+ "SEGMENT(20 10,20 20)", strategy_ps),
+ strategy_pb);
+
+ // case 2
+ tester::apply("pb1-2c", "POINT(29 3)", box1,
+ pp_distance<Point>("POINT(29 3)",
+ "POINT(20 10)", strategy_pp),
+ strategy_pb);
+
+ // case 2
+ tester::apply("pb1-2d", "POINT(131 65)", box1,
+ pp_distance<Point>("POINT(131 65)",
+ "POINT(20 20)", strategy_pp),
+ strategy_pb);
+
+ // case 2
+ tester::apply("pb1-2e", "POINT(110 10)", box1,
+ ps_distance<Point>("POINT(110 10)",
+ "SEGMENT(20 10,20 20)", strategy_ps),
+ strategy_pb);
+
+ // case 2
+ tester::apply("pb1-2f", "POINT(150 20)", box1,
+ pp_distance<Point>("POINT(150 20)",
+ "POINT(20 20)", strategy_pp),
+ strategy_pb);
+
+ // case 3
+ tester::apply("pb1-3a", "POINT(11 25)", box1,
+ pp_distance<Point>("POINT(11 25)",
+ "POINT(11 20)", strategy_pp),
+ strategy_pb);
+
+ // case 3
+ tester::apply("pb1-3b", "POINT(15 25)", box1,
+ pp_distance<Point>("POINT(15 25)",
+ "POINT(15 20)", strategy_pp),
+ strategy_pb);
+
+ // case 3
+ tester::apply("pb1-3c", "POINT(18 25)", box1,
+ pp_distance<Point>("POINT(18 25)",
+ "POINT(18 20)", strategy_pp),
+ strategy_pb);
+
+ // case 4
+ tester::apply("pb1-4a", "POINT(13 4)", box1,
+ pp_distance<Point>("POINT(13 4)",
+ "POINT(13 10)", strategy_pp),
+ strategy_pb);
+
+ // case 4
+ tester::apply("pb1-4b", "POINT(19 4)", box1,
+ pp_distance<Point>("POINT(19 4)",
+ "POINT(19 10)", strategy_pp),
+ strategy_pb);
+
+ // case 5
+ tester::apply("pb1-5", "POINT(15 14)", box1, 0, strategy_pb);
+
+ // case A
+ tester::apply("pb1-A", "POINT(10 28)", box1,
+ pp_distance<Point>("POINT(10 28)",
+ "POINT(10 20)", strategy_pp),
+ strategy_pb);
+
+ // case B
+ tester::apply("pb1-B", "POINT(20 28)", box1,
+ pp_distance<Point>("POINT(20 28)",
+ "POINT(20 20)", strategy_pp),
+ strategy_pb);
+
+
+ // case C
+ tester::apply("pb1-C", "POINT(14 20)", box1, 0, strategy_pb);
+
+ // case D
+ tester::apply("pb1-D", "POINT(10 17)", box1, 0, strategy_pb);
+
+ // case E
+ tester::apply("pb1-E", "POINT(20 11)", box1, 0, strategy_pb);
+
+ // case F
+ tester::apply("pb1-F", "POINT(19 10)", box1, 0, strategy_pb);
+
+ // case G
+ tester::apply("pb1-G", "POINT(10 -40)", box1,
+ pp_distance<Point>("POINT(10 -40)",
+ "POINT(10 10)", strategy_pp),
+ strategy_pb);
+
+ // case H
+ tester::apply("pb1-H", "POINT(20 -50)", box1,
+ pp_distance<Point>("POINT(20 -50)",
+ "POINT(20 10)", strategy_pp),
+ strategy_pb);
+
+ // case a
+ tester::apply("pb1-a", "POINT(10 20)", box1, 0, strategy_pb);
+ // case b
+ tester::apply("pb1-b", "POINT(20 20)", box1, 0, strategy_pb);
+ // case c
+ tester::apply("pb1-c", "POINT(10 10)", box1, 0, strategy_pb);
+ // case d
+ tester::apply("pb1-d", "POINT(20 10)", box1, 0, strategy_pb);
+
+
+ std::string const box2 = "BOX(170 -60,400 80)";
+
+ // case 1 - point is closer to western meridian
+ tester::apply("pb2-1a", "POINT(160 0)", box2,
+ ps_distance<Point>("POINT(160 0)",
+ "SEGMENT(170 -60,170 80)", strategy_ps),
+ strategy_pb);
+
+ // case 1 - point is closer to eastern meridian
+ tester::apply("pb2-1b", "POINT(50 0)", box2,
+ ps_distance<Point>("POINT(50 0)",
+ "SEGMENT(40 -60,40 80)", strategy_ps),
+ strategy_pb);
+
+ // case 3 - equivalent point POINT(390 85) is above the box
+ tester::apply("pb2-3", "POINT(30 85)", box2,
+ pp_distance<Point>("POINT(30 85)",
+ "POINT(30 80)", strategy_pp),
+ strategy_pb);
+
+ // case 4 - equivalent point POINT(390 -75) is below the box
+ tester::apply("pb2-4", "POINT(30 -75)", box2,
+ pp_distance<Point>("POINT(30 -75)",
+ "POINT(30 -60)", strategy_pp),
+ strategy_pb);
+
+ // case 5 - equivalent point POINT(390 0) is inside box
+ tester::apply("pb2-5", "POINT(30 0)", box2, 0, strategy_pb);
+
+
+ std::string const box3 = "BOX(-150 -50,-40 70)";
+
+ // case 1 - point is closer to western meridian
+ tester::apply("pb3-1a", "POINT(-170 10)", box3,
+ ps_distance<Point>("POINT(-170 10)",
+ "SEGMENT(-150 -50,-150 70)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is closer to eastern meridian
+ tester::apply("pb3-2a", "POINT(5 10)", box3,
+ ps_distance<Point>("POINT(5 10)",
+ "SEGMENT(-40 -50,-40 70)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is closer to western meridian
+ tester::apply("pb3-2a", "POINT(160 10)", box3,
+ ps_distance<Point>("POINT(160 10)",
+ "SEGMENT(-150 -50,-150 70)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is at equal distance from eastern and western meridian
+ tester::apply("pb3-2c1", "POINT(85 20)", box3,
+ ps_distance<Point>("POINT(85 20)",
+ "SEGMENT(-150 -50,-150 70)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is at equal distance from eastern and western meridian
+ tester::apply("pb3-2c2", "POINT(85 20)", box3,
+ ps_distance<Point>("POINT(85 20)",
+ "SEGMENT(-40 -50,-40 70)", strategy_ps),
+ strategy_pb);
+
+ // box that is symmetric wrt the prime meridian
+ std::string const box4 = "BOX(-75 -45,75 65)";
+
+ // case 1 - point is closer to western meridian
+ tester::apply("pb4-1a", "POINT(-100 10)", box4,
+ ps_distance<Point>("POINT(-100 10)",
+ "SEGMENT(-75 -45,-75 65)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is closer to eastern meridian
+ tester::apply("pb4-2a", "POINT(90 15)", box4,
+ ps_distance<Point>("POINT(90 15)",
+ "SEGMENT(75 -45,75 65)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is at equal distance from eastern and western meridian
+ tester::apply("pb4-2c1", "POINT(-180 20)", box4,
+ ps_distance<Point>("POINT(-180 20)",
+ "SEGMENT(-75 -45,-75 65)", strategy_ps),
+ strategy_pb);
+
+ // case 2 - point is at equal distance from eastern and western meridian
+ tester::apply("pb4-2c2", "POINT(-180 20)", box4,
+ ps_distance<Point>("POINT(-180 20)",
+ "SEGMENT(75 -45,75 65)", strategy_ps),
+ strategy_pb);
+
+
+ //box degenerates to a meridian segment
+ std::string const boxdeg1 = "BOX(0 10,0 20)";
+
+ tester::apply("pbd1", "POINT(1 10)", boxdeg1,
+ ps_distance<Point>("POINT(1 10)",
+ "SEGMENT(0 10, 0 20)", strategy_ps),
+ strategy_pb);
+ tester::apply("pbd2", "POINT(1 5)", boxdeg1,
+ ps_distance<Point>("POINT(1 5)",
+ "SEGMENT(0 10, 0 20)", strategy_ps),
+ strategy_pb);
+ tester::apply("pbd3", "POINT(1 15)", boxdeg1,
+ ps_distance<Point>("POINT(1 15)",
+ "SEGMENT(0 10, 0 20)", strategy_ps),
+ strategy_pb);
+ tester::apply("pbd4", "POINT(1 25)", boxdeg1,
+ ps_distance<Point>("POINT(1 25)",
+ "SEGMENT(0 10, 0 20)", strategy_ps),
+ strategy_pb);
+
+ //box degenerates to a horizontal line; that is not a geodesic segment
+ std::string const boxdeg2 = "BOX(10 10,20 10)";
+
+ tester::apply("pbd5", "POINT(15 15)", boxdeg2,
+ pp_distance<Point>("POINT(15 15)",
+ "POINT(15 10)", strategy_pp),
+ strategy_pb);
+ tester::apply("pbd6", "POINT(5 15)", boxdeg2,
+ pp_distance<Point>("POINT(5 15)",
+ "POINT(10 10)", strategy_pp),
+ strategy_pb);
+ tester::apply("pbd7", "POINT(25 15)", boxdeg2,
+ pp_distance<Point>("POINT(25 15)",
+ "POINT(20 10)", strategy_pp),
+ strategy_pb);
+
+ //box degenerates to a point
+ std::string const boxdeg3 = "BOX(0 10,0 10)";
+
+ tester::apply("pbd8", "POINT(1 11)", boxdeg3,
+ pp_distance<Point>("POINT(1 11)",
+ "POINT(0 10)", strategy_pp),
+ strategy_pb);
+}
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_pb
+>
+void test_distance_multipoint_box(Strategy_pp const& strategy_pp,
+ Strategy_ps const& strategy_ps,
+ Strategy_pb const& strategy_pb)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/box distance tests" << std::endl;
+#endif
+ typedef bg::model::box<Point> box_type;
+ typedef bg::model::multi_point<Point> multi_point_type;
+ typedef test_distance_of_geometries<multi_point_type, box_type> tester;
+
+ std::string const box1 = "BOX(10 10,20 20)";
+
+ tester::apply("mpb1", "MULTIPOINT(5 25,25 26)", box1,
+ pp_distance<Point>("POINT(5 25)", "POINT(10 20)", strategy_pp),
+ strategy_pb, true, false, false);
+
+ tester::apply("mpb2", "MULTIPOINT(110 10,110 9,110 0)", box1,
+ ps_distance<Point>("POINT(110 10)",
+ "SEGMENT(20 10,20 20)", strategy_ps),
+ strategy_pb, true, false, false);
+
+ tester::apply("mpb3", "MULTIPOINT(110 10,110 9,110 0,10 20)", box1,
+ 0, strategy_pb, true, false, false);
+
+ tester::apply("mpb3", "MULTIPOINT(110 10,110 9,110 0,15 15)", box1,
+ 0, strategy_pb, true, false, false);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+template
+<
+ typename Point,
+ typename Strategy_pp,
+ typename Strategy_ps,
+ typename Strategy_pb
+>
+void test_all_pl_ar(Strategy_pp pp_strategy,
+ Strategy_ps ps_strategy,
+ Strategy_pb pb_strategy)
+{
+ test_distance_point_ring<Point>(pp_strategy, ps_strategy);
+ test_distance_multipoint_ring<Point>(ps_strategy);
+
+ test_distance_point_polygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multipoint_polygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_point_multipolygon<Point>(pp_strategy, ps_strategy);
+ test_distance_multipoint_multipolygon<Point>(pp_strategy, ps_strategy);
+
+ test_distance_point_box<Point>(pp_strategy, ps_strategy, pb_strategy);
+ test_distance_multipoint_box<Point>(pp_strategy, ps_strategy, pb_strategy);
+
+ test_more_empty_input_pointlike_areal<Point>(ps_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_pointlike_areal )
+{
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::spherical_equatorial<bg::degree>
+ > sph_point;
+
+ test_all_pl_ar<sph_point>(spherical_pp(), spherical_ps(), spherical_pb());
+
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::geographic<bg::degree>
+ > geo_point;
+
+ test_all_pl_ar<geo_point>(vincenty_pp(), vincenty_ps(), vincenty_pb());
+ test_all_pl_ar<geo_point>(thomas_pp(), thomas_ps(), thomas_pb());
+ test_all_pl_ar<geo_point>(andoyer_pp(), andoyer_ps(), andoyer_pb());
+
+ // test with different spheroid
+ stype spheroid(6372000, 6370000);
+ test_all_pl_ar<geo_point>(andoyer_pp(spheroid), andoyer_ps(spheroid), andoyer_pb(spheroid));
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_pl.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_pl.cpp
new file mode 100644
index 000000000..3027bf4d5
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_geo_pl_pl.cpp
@@ -0,0 +1,122 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017, 2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_geographic_pointlike_pointlike
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_geo_common.hpp"
+#include "test_empty_geometry.hpp"
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_point_point(Strategy const& strategy)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/point distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<Point, Point> tester;
+
+ tester::apply("p-p-01",
+ "POINT(1 1)",
+ "POINT(0 0)",
+ strategy.apply(Point(1,1), Point(0,0)),
+ strategy, true, false, false);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_multipoint_point(Strategy const& strategy)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/point distance tests" << std::endl;
+#endif
+ typedef bg::model::multi_point<Point> multi_point_type;
+
+ typedef test_distance_of_geometries<multi_point_type, Point> tester;
+
+ tester::apply("mp-p-01",
+ "MULTIPOINT(1 1,1 2,2 3)",
+ "POINT(0 0)",
+ pp_distance<Point>("POINT(0 0)","POINT(1 1)",strategy),
+ strategy, true, false, false);
+
+ tester::apply("mp-p-01",
+ "MULTIPOINT(0 0,0 2,2 0,2 2)",
+ "POINT(1.1 1.1)",
+ pp_distance<Point>("POINT(1.1 1.1)","POINT(2 2)",strategy),
+ strategy, true, false, false);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_distance_multipoint_multipoint(Strategy const& strategy)
+{
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multipoint distance tests" << std::endl;
+#endif
+ typedef bg::model::multi_point<Point> multi_point_type;
+
+ typedef test_distance_of_geometries<multi_point_type, multi_point_type> tester;
+
+ tester::apply("mp-mp-01",
+ "MULTIPOINT(1 1,1 2,2 3)",
+ "MULTIPOINT(0 0, 0 -1)",
+ pp_distance<Point>("POINT(0 0)","POINT(1 1)",strategy),
+ strategy, true, false, false);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+template <typename Point, typename Strategy>
+void test_all_pl_pl(Strategy pp_strategy)
+{
+ test_distance_point_point<Point>(pp_strategy);
+ test_distance_multipoint_point<Point>(pp_strategy);
+ test_distance_multipoint_multipoint<Point>(pp_strategy);
+
+ test_more_empty_input_pointlike_pointlike<Point>(pp_strategy);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_pointlike_pointlike )
+{
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::spherical_equatorial<bg::degree>
+ > sph_point;
+
+ test_all_pl_pl<sph_point>(spherical_pp());
+
+ typedef bg::model::point
+ <
+ double, 2,
+ bg::cs::geographic<bg::degree>
+ > geo_point;
+
+ test_all_pl_pl<geo_point>(vincenty_pp());
+ test_all_pl_pl<geo_point>(thomas_pp());
+ test_all_pl_pl<geo_point>(andoyer_pp());
+
+ test_all_pl_pl<geo_point>(andoyer_pp(stype(5000000,6000000)));
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_l.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_l.cpp
new file mode 100644
index 000000000..948e35a6a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_l.cpp
@@ -0,0 +1,556 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_spherical_equatorial_pointlike_linear
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_distance_se_common.hpp"
+#include "test_empty_geometry.hpp"
+
+typedef bg::cs::spherical_equatorial<bg::degree> cs_type;
+typedef bg::model::point<double, 2, cs_type> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+namespace services = bg::strategy::distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef bg::strategy::distance::haversine<double> point_point_strategy;
+typedef bg::strategy::distance::cross_track<> point_segment_strategy;
+
+
+//===========================================================================
+
+template <typename Strategy>
+inline bg::default_distance_result<point_type>::type
+pp_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ point_type p1, p2;
+ bg::read_wkt(wkt1, p1);
+ bg::read_wkt(wkt2, p2);
+ return bg::distance(p1, p2) * strategy.radius();
+}
+
+template <typename Strategy>
+inline bg::default_comparable_distance_result<point_type>::type
+pp_comparable_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const&)
+{
+ point_type p1, p2;
+ bg::read_wkt(wkt1, p1);
+ bg::read_wkt(wkt2, p2);
+ return bg::comparable_distance(p1, p2);
+}
+
+template <typename Strategy>
+inline bg::default_distance_result<point_type>::type
+ps_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ point_type p;
+ segment_type s;
+ bg::read_wkt(wkt1, p);
+ bg::read_wkt(wkt2, s);
+ return bg::distance(p, s, strategy);
+}
+
+template <typename Strategy>
+inline bg::default_comparable_distance_result<point_type>::type
+ps_comparable_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ point_type p;
+ segment_type s;
+ bg::read_wkt(wkt1, p);
+ bg::read_wkt(wkt2, s);
+ return bg::comparable_distance(p, s, strategy);
+}
+
+template <typename Strategy, typename T>
+T to_comparable(Strategy const& strategy, T const& distance)
+{
+ namespace services = bg::strategy::distance::services;
+
+ typedef typename services::comparable_type
+ <
+ Strategy
+ >::type comparable_strategy;
+
+ typedef typename services::result_from_distance
+ <
+ comparable_strategy,
+ point_type,
+ bg::point_type<segment_type>::type
+ > get_comparable_distance;
+
+ comparable_strategy cstrategy = services::get_comparable
+ <
+ Strategy
+ >::apply(strategy);
+
+ return get_comparable_distance::apply(cstrategy, distance);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_segment(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, segment_type> tester;
+
+ double const d2r = bg::math::d2r<double>();
+
+ tester::apply("p-s-01",
+ "POINT(0 0)",
+ "SEGMENT(2 0,3 0)",
+ 2.0 * d2r * strategy.radius(),
+ to_comparable(strategy, 2.0 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-02",
+ "POINT(2.5 3)",
+ "SEGMENT(2 0,3 0)",
+ 3.0 * d2r * strategy.radius(),
+ to_comparable(strategy, 3.0 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-03",
+ "POINT(2 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy);
+ tester::apply("p-s-04",
+ "POINT(3 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy);
+ tester::apply("p-s-05",
+ "POINT(2.5 0)",
+ "SEGMENT(2 0,3 0)",
+ 0,
+ strategy);
+ tester::apply("p-s-06",
+ "POINT(3.5 3)",
+ "SEGMENT(2 0,3 0)",
+ pp_distance("POINT(3 0)", "POINT(3.5 3)", strategy),
+ pp_comparable_distance("POINT(3 0)",
+ "POINT(3.5 3)",
+ strategy),
+ strategy);
+ tester::apply("p-s-07",
+ "POINT(0 0)",
+ "SEGMENT(0 10,10 10)",
+ ps_distance("POINT(0 0)", "SEGMENT(10 10,0 10)", strategy),
+ pp_comparable_distance("POINT(0 0)",
+ "POINT(0 10)",
+ strategy),
+ strategy);
+ // very small distances to segment
+ tester::apply("p-s-07",
+ "POINT(90 1e-3)",
+ "SEGMENT(0.5 0,175.5 0)",
+ 1e-3 * d2r * strategy.radius(),
+ to_comparable(strategy, 1e-3 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-08",
+ "POINT(90 1e-4)",
+ "SEGMENT(0.5 0,175.5 0)",
+ 1e-4 * d2r * strategy.radius(),
+ to_comparable(strategy, 1e-4 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-09",
+ "POINT(90 1e-5)",
+ "SEGMENT(0.5 0,175.5 0)",
+ 1e-5 * d2r * strategy.radius(),
+ to_comparable(strategy, 1e-5 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-10",
+ "POINT(90 1e-6)",
+ "SEGMENT(0.5 0,175.5 0)",
+ 1e-6 * d2r * strategy.radius(),
+ to_comparable(strategy, 1e-6 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-11",
+ "POINT(90 1e-7)",
+ "SEGMENT(0.5 0,175.5 0)",
+ 1e-7 * d2r * strategy.radius(),
+ to_comparable(strategy, 1e-7 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-s-12",
+ "POINT(90 1e-8)",
+ "SEGMENT(0.5 0,175.5 0)",
+ 1e-8 * d2r * strategy.radius(),
+ to_comparable(strategy, 1e-8 * d2r * strategy.radius()),
+ strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_linestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/linestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, linestring_type> tester;
+
+ double const r = strategy.radius();
+ double const d2r = bg::math::d2r<double>();
+
+ tester::apply("p-l-01",
+ "POINT(0 0)",
+ "LINESTRING(2 0,2 0)",
+ 2.0 * d2r * r,
+ to_comparable(strategy, 2.0 * d2r * r),
+ strategy);
+ tester::apply("p-l-02",
+ "POINT(0 0)",
+ "LINESTRING(2 0,3 0)",
+ 2.0 * d2r * r,
+ to_comparable(strategy, 2.0 * d2r * r),
+ strategy);
+ tester::apply("p-l-03",
+ "POINT(2.5 3)",
+ "LINESTRING(2 0,3 0)",
+ 3.0 * d2r * r,
+ to_comparable(strategy, 3.0 * d2r * r),
+ strategy);
+ tester::apply("p-l-04",
+ "POINT(2 0)",
+ "LINESTRING(2 0,3 0)",
+ 0,
+ strategy);
+ tester::apply("p-l-05",
+ "POINT(3 0)",
+ "LINESTRING(2 0,3 0)",
+ 0,
+ strategy);
+ tester::apply("p-l-06",
+ "POINT(2.5 0)",
+ "LINESTRING(2 0,3 0)",
+ 0,
+ strategy);
+ tester::apply("p-l-07",
+ "POINT(7.5 10)",
+ "LINESTRING(1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 0)",
+ 10.0 * d2r * r,
+ to_comparable(strategy, 10.0 * d2r * r),
+ strategy);
+ tester::apply("p-l-08",
+ "POINT(7.5 10)",
+ "LINESTRING(1 1,2 1,3 1,4 1,5 1,6 1,7 1,20 2,21 2)",
+ ps_distance("POINT(7.5 10)", "SEGMENT(7 1,20 2)", strategy),
+ ps_comparable_distance("POINT(7.5 10)",
+ "SEGMENT(7 1,20 2)",
+ strategy),
+ strategy);
+
+ // https://svn.boost.org/trac/boost/ticket/11982
+ tester::apply("p-l-09",
+ "POINT(10.4 63.43)",
+ "LINESTRING(10.733557 59.911923, 10.521812 59.887214)",
+ 0.06146397739758279 * r,
+ 0.000944156107132969,
+ strategy);
+
+ //https://github.com/boostorg/geometry/issues/557
+ tester::apply("p-l-issue557",
+ "POINT(51.99999790563572 43.71656981636763)",
+ "LINESTRING(52.0000243071011 43.716569742012496,\
+ 52.0000121532845 43.71656942616241,\
+ 52.0 43.7165690998572,\
+ 51.999987847203 43.7165687638793)",
+ 1.35062e-08 * r,
+ 4.5604e-17,
+ strategy);
+
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ point_type, multi_linestring_type
+ > tester;
+
+ double const d2r = bg::math::d2r<double>();
+
+ tester::apply("p-ml-01",
+ "POINT(0 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 2.0 * d2r * strategy.radius(),
+ to_comparable(strategy, 2.0 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-ml-02",
+ "POINT(2.5 3)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 3.0 * d2r * strategy.radius(),
+ to_comparable(strategy, 3.0 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("p-ml-03",
+ "POINT(2 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 0,
+ strategy);
+ tester::apply("p-ml-04",
+ "POINT(3 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 0,
+ strategy);
+ tester::apply("p-ml-05",
+ "POINT(2.5 0)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0))",
+ 0,
+ strategy);
+ tester::apply("p-ml-06",
+ "POINT(7.5 10)",
+ "MULTILINESTRING((-5 0,-3 0),(2 0,3 0,4 0,5 0,6 0,20 1,21 1))",
+ ps_distance("POINT(7.5 10)", "SEGMENT(6 0,20 1)", strategy),
+ ps_comparable_distance("POINT(7.5 10)",
+ "SEGMENT(6 0,20 1)",
+ strategy),
+ strategy);
+ tester::apply("p-ml-07",
+ "POINT(-8 10)",
+ "MULTILINESTRING((-20 10,-19 11,-18 10,-6 0,-5 0,-3 0),(2 0,6 0,20 1,21 1))",
+ ps_distance("POINT(-8 10)", "SEGMENT(-6 0,-18 10)", strategy),
+ ps_comparable_distance("POINT(-8 10)",
+ "SEGMENT(-6 0,-18 10)",
+ strategy),
+ strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_linestring_multipoint(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "linestring/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ linestring_type, multi_point_type
+ > tester;
+
+ tester::apply("l-mp-01",
+ "LINESTRING(2 0,0 2,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ ps_distance("POINT(1 1)", "SEGMENT(2 0,0 2)", strategy),
+ ps_comparable_distance("POINT(1 1)",
+ "SEGMENT(2 0,0 2)",
+ strategy),
+ strategy);
+ tester::apply("l-mp-02",
+ "LINESTRING(4 0,0 4,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ ps_distance("POINT(1 1)", "SEGMENT(0 4,4 0)", strategy),
+ ps_comparable_distance("POINT(1 1)",
+ "SEGMENT(0 4,4 0)",
+ strategy),
+ strategy);
+ tester::apply("l-mp-03",
+ "LINESTRING(1 1,2 2,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ 0,
+ strategy);
+ tester::apply("l-mp-04",
+ "LINESTRING(3 3,4 4,100 80)",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ pp_distance("POINT(1 1)", "POINT(3 3)", strategy),
+ pp_comparable_distance("POINT(1 1)", "POINT(3 3)", strategy),
+ strategy);
+ tester::apply("l-mp-05",
+ "LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "MULTIPOINT(1 -1,80 80,5 0,150 90)",
+ 0,
+ strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_multilinestring(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multilinestring distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_point_type, multi_linestring_type
+ > tester;
+
+ tester::apply("mp-ml-01",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((2 0,0 2),(2 2,3 3))",
+ ps_distance("POINT(1 1)", "SEGMENT(2 0,0 2)", strategy),
+ ps_comparable_distance("POINT(1 1)",
+ "SEGMENT(2 0,0 2)",
+ strategy),
+ strategy);
+ tester::apply("mp-ml-02",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((3 0,0 3),(4 4,5 5))",
+ ps_distance("POINT(1 1)", "SEGMENT(3 0,0 3)", strategy),
+ ps_comparable_distance("POINT(1 1)",
+ "SEGMENT(3 0,0 3)",
+ strategy),
+ strategy);
+ tester::apply("mp-ml-03",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((4 4,5 5),(1 1,2 2))",
+ 0,
+ strategy);
+ tester::apply("mp-ml-04",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "MULTILINESTRING((4 4,3 3),(4 4,5 5))",
+ pp_distance("POINT(1 1)", "POINT(3 3)", strategy),
+ pp_comparable_distance("POINT(1 1)", "POINT(3 3)", strategy),
+ strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_segment(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/segment distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<multi_point_type, segment_type> tester;
+
+ double d2r = bg::math::d2r<double>();
+
+ tester::apply("mp-s-01",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(2 0,0 2)",
+ ps_distance("POINT(1 1)", "SEGMENT(2 0,0 2)", strategy),
+ ps_comparable_distance("POINT(1 1)",
+ "SEGMENT(2 0,0 2)",
+ strategy),
+ strategy);
+ tester::apply("mp-s-02",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(0 -3,1 -10)",
+ 3.0 * d2r * strategy.radius(),
+ to_comparable(strategy, 3.0 * d2r * strategy.radius()),
+ strategy);
+ tester::apply("mp-s-03",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(1 1,2 2)",
+ 0,
+ strategy);
+ tester::apply("mp-s-04",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(3 3,4 4)",
+ pp_distance("POINT(1 1)", "POINT(3 3)", strategy),
+ pp_comparable_distance("POINT(1 1)", "POINT(3 3)", strategy),
+ strategy);
+ tester::apply("mp-s-05",
+ "MULTIPOINT(0 0,1 0,0 1,1 1)",
+ "SEGMENT(0.5 -3,1 -10)",
+ pp_distance("POINT(1 0)", "POINT(0.5 -3)", strategy),
+ pp_comparable_distance("POINT(1 0)",
+ "POINT(0.5 -3)",
+ strategy),
+ strategy);
+}
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_pointlike_linear )
+{
+ test_distance_point_segment(point_segment_strategy());
+ test_distance_point_segment(point_segment_strategy(earth_radius_km));
+ test_distance_point_segment(point_segment_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_linestring )
+{
+ test_distance_point_linestring(point_segment_strategy());
+ test_distance_point_linestring(point_segment_strategy(earth_radius_km));
+ test_distance_point_linestring(point_segment_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_multilinestring )
+{
+ test_distance_point_multilinestring(point_segment_strategy());
+ test_distance_point_multilinestring(point_segment_strategy(earth_radius_km));
+ test_distance_point_multilinestring(point_segment_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_linestring_multipoint )
+{
+ test_distance_linestring_multipoint(point_segment_strategy());
+ test_distance_linestring_multipoint(point_segment_strategy(earth_radius_km));
+ test_distance_linestring_multipoint(point_segment_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_multilinestring )
+{
+ test_distance_multipoint_multilinestring(point_segment_strategy());
+ test_distance_multipoint_multilinestring(point_segment_strategy(earth_radius_km));
+ test_distance_multipoint_multilinestring(point_segment_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_segment )
+{
+ test_distance_multipoint_segment(point_segment_strategy());
+ test_distance_multipoint_segment(point_segment_strategy(earth_radius_km));
+ test_distance_multipoint_segment(point_segment_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_pointlike_linear )
+{
+ test_more_empty_input_pointlike_linear
+ <
+ point_type
+ >(point_segment_strategy());
+
+ test_more_empty_input_pointlike_linear
+ <
+ point_type
+ >(point_segment_strategy(earth_radius_km));
+
+ test_more_empty_input_pointlike_linear
+ <
+ point_type
+ >(point_segment_strategy(earth_radius_miles));
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_pl.cpp b/src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_pl.cpp
new file mode 100644
index 000000000..56c0a6e46
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/distance_se_pl_pl.cpp
@@ -0,0 +1,299 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_spherical_equatorial_pointlike_pointlike
+#endif
+
+#include <boost/range.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include "test_distance_se_common.hpp"
+#include "test_empty_geometry.hpp"
+
+typedef bg::cs::spherical_equatorial<bg::degree> cs_type;
+typedef bg::model::point<double, 2, cs_type> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+namespace distance = bg::strategy::distance;
+namespace services = distance::services;
+typedef bg::default_distance_result<point_type>::type return_type;
+
+typedef distance::haversine<double> point_point_strategy;
+typedef distance::comparable::haversine<double> comparable_point_point_strategy;
+
+//===========================================================================
+
+template <typename Strategy>
+inline typename bg::distance_result<point_type, point_type, Strategy>::type
+distance_from_wkt(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ point_type p1, p2;
+ bg::read_wkt(wkt1, p1);
+ bg::read_wkt(wkt2, p2);
+ return bg::distance(p1, p2, strategy);
+}
+
+inline bg::default_comparable_distance_result<point_type>::type
+comparable_distance_from_wkt(std::string const& wkt1,
+ std::string const& wkt2)
+{
+ point_type p1, p2;
+ bg::read_wkt(wkt1, p1);
+ bg::read_wkt(wkt2, p2);
+ return bg::comparable_distance(p1, p2);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_point(Strategy const& strategy,
+ bool is_comparable_strategy = false)
+{
+ double pi = bg::math::pi<double>();
+ double r = strategy.radius();
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/point distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, point_type> tester;
+
+ tester::apply("p-p-01",
+ "POINT(10 10)",
+ "POINT(0 0)",
+ (is_comparable_strategy
+ ? 0.0150768448035229
+ : (0.24619691677893202 * r)),
+ 0.0150768448035229,
+ strategy);
+ tester::apply("p-p-02",
+ "POINT(10 10)",
+ "POINT(10 10)",
+ 0,
+ strategy);
+
+ // antipodal points
+ tester::apply("p-p-03",
+ "POINT(0 10)",
+ "POINT(180 -10)",
+ (is_comparable_strategy
+ ? 1.0
+ : (pi * r)),
+ 1.0,
+ strategy);
+ tester::apply("p-p-04",
+ "POINT(0 0)",
+ "POINT(180 0)",
+ (is_comparable_strategy
+ ? 1.0
+ : (pi * r)),
+ 1.0,
+ strategy);
+
+ // https://svn.boost.org/trac/boost/ticket/11982
+ tester::apply("p-p-05",
+ "POINT(10.521812 59.887214)",
+ "POINT(10.4 63.43)",
+ (is_comparable_strategy
+ ? 0.00095578716185788
+ : (0.06184146915711819 * r)),
+ 0.00095578716185788,
+ strategy);
+ tester::apply("p-p-06",
+ "POINT(10.733557 59.911923)",
+ "POINT(10.4 63.43)",
+ (is_comparable_strategy
+ ? 0.0009441561071329
+ : (0.0614639773975828 * r)),
+ 0.000944156107132969,
+ strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_point_multipoint(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "point/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries<point_type, multi_point_type> tester;
+
+ tester::apply("p-mp-01",
+ "POINT(10 10)",
+ "MULTIPOINT(10 10,20 10,20 20,10 20)",
+ 0,
+ strategy);
+ tester::apply("p-mp-02",
+ "POINT(10 10)",
+ "MULTIPOINT(20 20,20 30,30 20,30 30)",
+ distance_from_wkt("POINT(10 10)", "POINT(20 20)", strategy),
+ comparable_distance_from_wkt("POINT(10 10)", "POINT(20 20)"),
+ strategy);
+ tester::apply("p-mp-03",
+ "POINT(3 0)",
+ "MULTIPOINT(20 20,20 40,40 20,40 40)",
+ distance_from_wkt("POINT(3 0)", "POINT(20 20)", strategy),
+ comparable_distance_from_wkt("POINT(3 0)", "POINT(20 20)"),
+ strategy);
+
+ // almost antipodal points
+ tester::apply("p-mp-04",
+ "POINT(179 2)",
+ "MULTIPOINT(3 3,4 3,4 4,3 4)",
+ distance_from_wkt("POINT(179 2)", "POINT(4 4)", strategy),
+ comparable_distance_from_wkt("POINT(179 2)", "POINT(4 4)"),
+ strategy);
+
+ // minimum distance across the dateline
+ tester::apply("p-mp-05",
+ "POINT(355 5)",
+ "MULTIPOINT(10 10,20 10,20 20,10 20)",
+ distance_from_wkt("POINT(355 5)", "POINT(10 10)", strategy),
+ comparable_distance_from_wkt("POINT(355 5)", "POINT(10 10)"),
+ strategy);
+ tester::apply("p-mp-06",
+ "POINT(-5 5)",
+ "MULTIPOINT(10 10,20 10,20 20,10 20)",
+ distance_from_wkt("POINT(-5 5)", "POINT(10 10)", strategy),
+ comparable_distance_from_wkt("POINT(-5 5)", "POINT(10 10)"),
+ strategy);
+}
+
+//===========================================================================
+
+template <typename Strategy>
+void test_distance_multipoint_multipoint(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "multipoint/multipoint distance tests" << std::endl;
+#endif
+ typedef test_distance_of_geometries
+ <
+ multi_point_type, multi_point_type
+ > tester;
+
+ tester::apply("mp-mp-01",
+ "MULTIPOINT(10 10,11 10,10 11,11 11)",
+ "MULTIPOINT(11 11,12 11,12 12,11 12)",
+ 0,
+ strategy);
+ tester::apply("mp-mp-02",
+ "MULTIPOINT(10 10,11 10,10 11,11 11)",
+ "MULTIPOINT(12 12,12 13,13 12,13 13)",
+ distance_from_wkt("POINT(11 11)", "POINT(12 12)", strategy),
+ comparable_distance_from_wkt("POINT(11 11)", "POINT(12 12)"),
+ strategy);
+
+ // example with many points in each multi-point so that the r-tree
+ // does some splitting.
+ tester::apply("mp-mp-03",
+ "MULTIPOINT(1 1,1 2,1 3,1 4,1 5,1 6,1 7,1 8,1 9,1 10,\
+ 2 1,2 2,2 3,2 4,2 5,2 6,2 7,2 8,2 9,2 10,\
+ 3 1,3 2,3 3,3 4,3 5,3 6,3 7,3 8,3 9,3 10,\
+ 10 1,10 10)",
+ "MULTIPOINT(11 11,11 12,11 13,11 14,11 15,\
+ 11 16,11 17,11 18,11 19,11 20,\
+ 12 11,12 12,12 13,12 24,12 15,\
+ 12 16,12 17,12 18,12 29,12 20,\
+ 13 11,13 12,13 13,13 24,13 15,\
+ 13 16,13 17,13 18,13 29,13 20,\
+ 20 11,20 20)",
+ distance_from_wkt("POINT(10 10)", "POINT(11 11)", strategy),
+ comparable_distance_from_wkt("POINT(10 10)", "POINT(11 11)"),
+ strategy);
+
+}
+
+//===========================================================================
+
+BOOST_AUTO_TEST_CASE( test_all_pointlike_pointlike )
+{
+ test_distance_point_point(point_point_strategy());
+ test_distance_point_point(point_point_strategy(earth_radius_km));
+ test_distance_point_point(point_point_strategy(earth_radius_miles));
+
+ test_distance_point_point(comparable_point_point_strategy(), true);
+ test_distance_point_point
+ (comparable_point_point_strategy(earth_radius_km), true);
+ test_distance_point_point
+ (comparable_point_point_strategy(earth_radius_miles), true);
+}
+
+BOOST_AUTO_TEST_CASE( test_all_point_multipoint )
+{
+ test_distance_point_multipoint(point_point_strategy());
+ test_distance_point_multipoint(point_point_strategy(earth_radius_km));
+ test_distance_point_multipoint(point_point_strategy(earth_radius_miles));
+
+ test_distance_point_multipoint(comparable_point_point_strategy());
+ test_distance_point_multipoint
+ (comparable_point_point_strategy(earth_radius_km));
+ test_distance_point_multipoint
+ (comparable_point_point_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_multipoint_multipoint )
+{
+ test_distance_multipoint_multipoint(point_point_strategy());
+ test_distance_multipoint_multipoint(point_point_strategy(earth_radius_km));
+ test_distance_multipoint_multipoint
+ (point_point_strategy(earth_radius_miles));
+
+ test_distance_multipoint_multipoint(comparable_point_point_strategy());
+ test_distance_multipoint_multipoint
+ (comparable_point_point_strategy(earth_radius_km));
+ test_distance_multipoint_multipoint
+ (comparable_point_point_strategy(earth_radius_miles));
+}
+
+BOOST_AUTO_TEST_CASE( test_all_empty_input_pointlike_pointlike )
+{
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(point_point_strategy());
+
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(point_point_strategy(earth_radius_km));
+
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(point_point_strategy(earth_radius_miles));
+
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(comparable_point_point_strategy());
+
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(comparable_point_point_strategy(earth_radius_km));
+
+ test_more_empty_input_pointlike_pointlike
+ <
+ point_type
+ >(comparable_point_point_strategy(earth_radius_miles));
+}
diff --git a/src/boost/libs/geometry/test/algorithms/distance/test_distance.hpp b/src/boost/libs/geometry/test/algorithms/distance/test_distance.hpp
new file mode 100644
index 000000000..cfda00e29
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/test_distance.hpp
@@ -0,0 +1,138 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_HPP
+#define BOOST_GEOMETRY_TEST_DISTANCE_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+// Define a custom distance strategy
+// For this one, the "taxicab" distance,
+// see http://en.wikipedia.org/wiki/Taxicab_geometry
+
+// For a point-point-distance operation, one typename Point is enough.
+// For a point-segment-distance operation, there is some magic inside
+// using another point type and casting if necessary. Therefore,
+// two point-types are necessary.
+struct taxicab_distance
+{
+ template <typename P1, typename P2>
+ static inline typename bg::coordinate_type<P1>::type apply(
+ P1 const& p1, P2 const& p2)
+ {
+ using bg::get;
+ using bg::math::abs;
+ return abs(get<0>(p1) - get<1>(p2))
+ + abs(get<1>(p1) - get<1>(p2));
+ }
+};
+
+
+
+namespace boost { namespace geometry { namespace strategy { namespace distance { namespace services
+{
+
+template <>
+struct tag<taxicab_distance>
+{
+ typedef strategy_tag_distance_point_point type;
+};
+
+
+template <typename P1, typename P2>
+struct return_type<taxicab_distance, P1, P2>
+{
+ typedef typename coordinate_type<P1>::type type;
+};
+
+
+template <>
+struct comparable_type<taxicab_distance>
+{
+ typedef taxicab_distance type;
+};
+
+template <>
+struct get_comparable<taxicab_distance>
+{
+ static inline taxicab_distance apply(taxicab_distance const& input)
+ {
+ return input;
+ }
+};
+
+template <typename P1, typename P2>
+struct result_from_distance<taxicab_distance, P1, P2>
+{
+ template <typename T>
+ static inline typename coordinate_type<P1>::type apply(taxicab_distance const& , T const& value)
+ {
+ return value;
+ }
+};
+
+
+}}}}} // namespace bg::strategy::distance::services
+
+
+
+
+
+template <typename Geometry1, typename Geometry2>
+void test_distance(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ long double expected_distance)
+{
+ typename bg::default_distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
+ << std::endl
+ << typeid(typename bg::default_distance_result<Geometry1>::type).name()
+ << std::endl
+ << "distance : " << bg::distance(geometry1, geometry2)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(distance, expected_distance, 0.0001);
+}
+
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1, std::string const& wkt2, double expected_distance)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+
+ test_distance(geometry1, geometry2, expected_distance);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_empty_input(Geometry1 const& geometry1, Geometry2 const& geometry2)
+{
+ try
+ {
+ bg::distance(geometry1, geometry2);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/distance/test_distance_common.hpp b/src/boost/libs/geometry/test/algorithms/distance/test_distance_common.hpp
new file mode 100644
index 000000000..bed7afe5f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/test_distance_common.hpp
@@ -0,0 +1,611 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_COMMON_HPP
+#define BOOST_GEOMETRY_TEST_DISTANCE_COMMON_HPP
+
+#include <iostream>
+#include <string>
+
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/write.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/algorithms/comparable_distance.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <from_wkt.hpp>
+#include <string_from_type.hpp>
+
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_HPP
+
+namespace bg = ::boost::geometry;
+
+// function copied from BG's test_distance.hpp
+
+template <typename Geometry1, typename Geometry2>
+void test_empty_input(Geometry1 const& geometry1, Geometry2 const& geometry2)
+{
+ try
+ {
+ bg::distance(geometry1, geometry2);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+#endif // BOOST_GEOMETRY_TEST_DISTANCE_HPP
+
+//========================================================================
+
+
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+// pretty print geometry -- START
+template <typename Geometry, typename GeometryTag>
+struct pretty_print_geometry_dispatch
+{
+ template <typename Stream>
+ static inline Stream& apply(Geometry const& geometry, Stream& os)
+ {
+ os << bg::wkt(geometry);
+ return os;
+ }
+};
+
+template <typename Geometry>
+struct pretty_print_geometry_dispatch<Geometry, bg::segment_tag>
+{
+ template <typename Stream>
+ static inline Stream& apply(Geometry const& geometry, Stream& os)
+ {
+ os << "SEGMENT" << bg::dsv(geometry);
+ return os;
+ }
+};
+
+template <typename Geometry>
+struct pretty_print_geometry_dispatch<Geometry, bg::box_tag>
+{
+ template <typename Stream>
+ static inline Stream& apply(Geometry const& geometry, Stream& os)
+ {
+ os << "BOX" << bg::dsv(geometry);
+ return os;
+ }
+};
+
+
+template <typename Geometry>
+struct pretty_print_geometry
+{
+ template <typename Stream>
+ static inline Stream& apply(Geometry const& geometry, Stream& os)
+ {
+ return pretty_print_geometry_dispatch
+ <
+ Geometry, typename bg::tag<Geometry>::type
+ >::apply(geometry, os);
+ }
+};
+// pretty print geometry -- END
+#endif // BOOST_GEOMETRY_TEST_DEBUG
+
+
+//========================================================================
+
+
+template <typename T>
+struct check_equal
+{
+ static inline void apply(T const& detected, T const& expected,
+ bool is_finite)
+ {
+ if (is_finite)
+ {
+ BOOST_CHECK(detected == expected);
+ }
+ else
+ {
+ BOOST_CHECK(! boost::math::isfinite(detected));
+ }
+ }
+};
+
+template <>
+struct check_equal<double>
+{
+ static inline void apply(double detected, double expected,
+ bool is_finite)
+ {
+ if (is_finite)
+ {
+ BOOST_CHECK_CLOSE(detected, expected, 0.0001);
+ }
+ else
+ {
+ BOOST_CHECK(! boost::math::isfinite(detected));
+ }
+ }
+};
+
+
+//========================================================================
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ int id1 = bg::geometry_id<Geometry1>::value,
+ int id2 = bg::geometry_id<Geometry2>::value
+>
+struct test_distance_of_geometries
+ : public test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
+{};
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define ENABLE_IF_DEBUG(ID) ID
+#else
+#define ENABLE_IF_DEBUG(ID)
+#endif
+
+template <typename Geometry1, typename Geometry2>
+class test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
+{
+private:
+ template
+ <
+ typename G1,
+ typename G2,
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void base_test(std::string const& ENABLE_IF_DEBUG(header),
+ G1 const& g1, G2 const& g2,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite)
+ {
+ typedef typename bg::default_distance_result
+ <
+ G1, G2
+ >::type default_distance_result;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ Strategy, G1, G2
+ >::type distance_result_from_strategy;
+
+ static const bool same_regular = boost::is_same
+ <
+ default_distance_result,
+ distance_result_from_strategy
+ >::type::value;
+
+ BOOST_CHECK( same_regular );
+
+
+ typedef typename bg::default_comparable_distance_result
+ <
+ G1, G2
+ >::type default_comparable_distance_result;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ typename bg::strategy::distance::services::comparable_type
+ <
+ Strategy
+ >::type,
+ G1,
+ G2
+ >::type comparable_distance_result_from_strategy;
+
+ static const bool same_comparable = boost::is_same
+ <
+ default_comparable_distance_result,
+ comparable_distance_result_from_strategy
+ >::type::value;
+
+ BOOST_CHECK( same_comparable );
+
+
+ // check distance with default strategy
+ default_distance_result dist_def = bg::distance(g1, g2);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(dist_def, expected_distance, is_finite);
+
+
+ // check distance with passed strategy
+ distance_result_from_strategy dist = bg::distance(g1, g2, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(dist, expected_distance, is_finite);
+
+
+ // check comparable distance with default strategy
+ default_comparable_distance_result cdist_def =
+ bg::comparable_distance(g1, g2);
+
+ check_equal
+ <
+ default_comparable_distance_result
+ >::apply(cdist_def, expected_comparable_distance, is_finite);
+
+
+ // check comparable distance with passed strategy
+ comparable_distance_result_from_strategy cdist =
+ bg::comparable_distance(g1, g2, strategy);
+
+ check_equal
+ <
+ default_comparable_distance_result
+ >::apply(cdist, expected_comparable_distance, is_finite);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << string_from_type<typename bg::coordinate_type<Geometry1>::type>::name()
+ << string_from_type<typename bg::coordinate_type<Geometry2>::type>::name()
+ << " -> "
+ << string_from_type<default_distance_result>::name()
+ << string_from_type<default_comparable_distance_result>::name()
+ << std::endl;
+
+ std::cout << "distance" << header
+ << " (def. strategy) = " << dist_def << " ; "
+ << "distance" << header
+ <<" (passed strategy) = " << dist << " ; "
+ << "comp. distance" << header <<" (def. strategy) = "
+ << cdist_def << " ; "
+ << "comp. distance" << header <<" (passed strategy) = "
+ << cdist << std::endl;
+#endif
+ }
+
+public:
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& wkt1,
+ std::string const& wkt2,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+ Geometry1 geometry1 = from_wkt<Geometry1>(wkt1);
+ Geometry2 geometry2 = from_wkt<Geometry2>(wkt2);
+
+ apply(geometry1, geometry2,
+ expected_distance, expected_comparable_distance,
+ strategy, is_finite);
+ }
+
+
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef pretty_print_geometry<Geometry1> PPG1;
+ typedef pretty_print_geometry<Geometry2> PPG2;
+ PPG1::apply(geometry1, std::cout);
+ std::cout << " - ";
+ PPG2::apply(geometry2, std::cout);
+ std::cout << std::endl;
+#endif
+
+ base_test("", geometry1, geometry2,
+ expected_distance, expected_comparable_distance,
+ strategy, is_finite);
+
+ base_test("[reversed args]", geometry2, geometry1,
+ expected_distance, expected_comparable_distance,
+ strategy, is_finite);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+#endif
+ }
+};
+
+
+//========================================================================
+
+template <typename Segment, typename Polygon>
+struct test_distance_of_geometries
+<
+ Segment, Polygon,
+ 92 /* segment */, 3 /* polygon */
+>
+ : public test_distance_of_geometries<Segment, Polygon, 0, 0>
+{
+ typedef test_distance_of_geometries<Segment, Polygon, 0, 0> base;
+
+ typedef typename bg::ring_type<Polygon>::type ring_type;
+
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& wkt_segment,
+ std::string const& wkt_polygon,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+ Segment segment = from_wkt<Segment>(wkt_segment);
+ Polygon polygon = from_wkt<Polygon>(wkt_polygon);
+ apply(segment,
+ polygon,
+ expected_distance,
+ expected_comparable_distance,
+ strategy,
+ is_finite);
+ }
+
+
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(Segment const& segment,
+ Polygon const& polygon,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+ base::apply(segment, polygon, expected_distance,
+ expected_comparable_distance, strategy, is_finite);
+
+ if ( bg::num_interior_rings(polygon) == 0 ) {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "... testing also exterior ring ..." << std::endl;
+#endif
+ test_distance_of_geometries
+ <
+ Segment, ring_type
+ >::apply(segment,
+ bg::exterior_ring(polygon),
+ expected_distance,
+ expected_comparable_distance,
+ strategy,
+ is_finite);
+ }
+ }
+};
+
+//========================================================================
+
+template <typename Box, typename Segment>
+struct test_distance_of_geometries
+<
+ Box, Segment,
+ 94 /* box */, 92 /* segment */
+>
+{
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& wkt_box,
+ std::string const& wkt_segment,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+ test_distance_of_geometries
+ <
+ Segment, Box, 92, 94
+ >::apply(wkt_segment,
+ wkt_box,
+ expected_distance,
+ expected_comparable_distance,
+ strategy,
+ is_finite);
+ }
+};
+
+
+template <typename Segment, typename Box>
+struct test_distance_of_geometries
+<
+ Segment, Box,
+ 92 /* segment */, 94 /* box */
+>
+ : public test_distance_of_geometries<Segment, Box, 0, 0>
+{
+ typedef test_distance_of_geometries<Segment, Box, 0, 0> base;
+
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& wkt_segment,
+ std::string const& wkt_box,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+ Segment segment = from_wkt<Segment>(wkt_segment);
+ Box box = from_wkt<Box>(wkt_box);
+ apply(segment,
+ box,
+ expected_distance,
+ expected_comparable_distance,
+ strategy,
+ is_finite);
+ }
+
+
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(Segment const& segment,
+ Box const& box,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool is_finite = true)
+ {
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ Strategy, Segment, Box
+ >::type distance_result_type;
+
+ typedef typename bg::strategy::distance::services::comparable_type
+ <
+ Strategy
+ >::type comparable_strategy;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ comparable_strategy, Segment, Box
+ >::type comparable_distance_result_type;
+
+
+ base::apply(segment, box, expected_distance,
+ expected_comparable_distance, strategy, is_finite);
+
+ comparable_strategy cstrategy =
+ bg::strategy::distance::services::get_comparable
+ <
+ Strategy
+ >::apply(strategy);
+
+ distance_result_type distance_generic =
+ bg::detail::distance::segment_to_box_2D_generic
+ <
+ Segment, Box, Strategy
+ >::apply(segment, box, strategy);
+
+ comparable_distance_result_type comparable_distance_generic =
+ bg::detail::distance::segment_to_box_2D_generic
+ <
+ Segment, Box, comparable_strategy
+ >::apply(segment, box, cstrategy);
+
+
+ check_equal
+ <
+ distance_result_type
+ >::apply(distance_generic, expected_distance, is_finite);
+
+ check_equal
+ <
+ comparable_distance_result_type
+ >::apply(comparable_distance_generic,
+ expected_comparable_distance,
+ is_finite);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "... testing with naive seg-box distance algorithm..."
+ << std::endl;
+ std::cout << "distance (generic algorithm) = "
+ << distance_generic << " ; "
+ << "comp. distance (generic algorithm) = "
+ << comparable_distance_generic
+ << std::endl;
+ std::cout << std::endl << std::endl;
+#endif
+ }
+};
+
+//========================================================================
+
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void test_empty_input(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ try
+ {
+ bg::distance(geometry1, geometry2, strategy);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+
+ try
+ {
+ bg::distance(geometry2, geometry1, strategy);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+#endif // BOOST_GEOMETRY_TEST_DISTANCE_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/distance/test_distance_geo_common.hpp b/src/boost/libs/geometry/test/algorithms/distance/test_distance_geo_common.hpp
new file mode 100644
index 000000000..dfb4c7e64
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/test_distance_geo_common.hpp
@@ -0,0 +1,577 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_GEO_COMMON_HPP
+#define BOOST_GEOMETRY_TEST_DISTANCE_GEO_COMMON_HPP
+
+#include <iostream>
+#include <string>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/write.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <from_wkt.hpp>
+#include <string_from_type.hpp>
+
+#include "distance_brute_force.hpp"
+
+namespace bg = ::boost::geometry;
+
+typedef bg::srs::spheroid<double> stype;
+
+// Spherical strategy for point-point distance
+
+typedef bg::strategy::distance::haversine<double> spherical_pp;
+
+// Geo strategies for point-point distance
+
+typedef bg::strategy::distance::andoyer<stype> andoyer_pp;
+typedef bg::strategy::distance::thomas<stype> thomas_pp;
+typedef bg::strategy::distance::vincenty<stype> vincenty_pp;
+
+// Spherical strategy for point-segment distance
+
+typedef bg::strategy::distance::cross_track<> spherical_ps;
+
+// Geo strategies for point-segment distance
+
+typedef bg::strategy::distance::geographic_cross_track<bg::strategy::andoyer, stype, double>
+ andoyer_ps;
+
+typedef bg::strategy::distance::geographic_cross_track<bg::strategy::thomas, stype, double>
+ thomas_ps;
+
+typedef bg::strategy::distance::geographic_cross_track<bg::strategy::vincenty, stype, double>
+ vincenty_ps;
+
+typedef bg::strategy::distance::detail::geographic_cross_track<bg::strategy::vincenty, stype, double, true>
+ vincenty_ps_bisection;
+
+// Spherical strategy for point-box distance
+
+typedef bg::strategy::distance::cross_track_point_box<> spherical_pb;
+
+// Geo strategies for point-box distance
+
+typedef bg::strategy::distance::geographic_cross_track_point_box
+<
+ bg::strategy::andoyer,
+ stype,
+ double
+> andoyer_pb;
+
+typedef bg::strategy::distance::geographic_cross_track_point_box
+<
+ bg::strategy::thomas,
+ stype,
+ double
+> thomas_pb;
+
+typedef bg::strategy::distance::geographic_cross_track_point_box
+<
+ bg::strategy::vincenty,
+ stype,
+ double
+> vincenty_pb;
+
+// Spherical strategy for segment-box distance
+
+typedef bg::strategy::distance::spherical_segment_box<> spherical_sb;
+
+// Geo strategies for segment-box distance
+
+typedef bg::strategy::distance::geographic_segment_box<bg::strategy::andoyer, stype, double>
+ andoyer_sb;
+
+typedef bg::strategy::distance::geographic_segment_box<bg::strategy::thomas, stype, double>
+ thomas_sb;
+
+typedef bg::strategy::distance::geographic_segment_box<bg::strategy::vincenty, stype, double>
+ vincenty_sb;
+
+// Strategies for box-box distance
+
+typedef bg::strategy::distance::cross_track_box_box<> spherical_bb;
+
+typedef bg::strategy::distance::geographic_cross_track_box_box
+ <
+ bg::strategy::andoyer,
+ stype,
+ double
+ > andoyer_bb;
+
+typedef bg::strategy::distance::geographic_cross_track_box_box
+ <
+ bg::strategy::thomas,
+ stype,
+ double
+ > thomas_bb;
+
+typedef bg::strategy::distance::geographic_cross_track_box_box
+ <
+ bg::strategy::vincenty,
+ stype,
+ double
+ > vincenty_bb;
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+inline typename bg::default_distance_result<Point>::type
+pp_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ Point p1, p2;
+ bg::read_wkt(wkt1, p1);
+ bg::read_wkt(wkt2, p2);
+ return bg::distance(p1, p2, strategy);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+inline typename bg::default_distance_result<Point>::type
+ps_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ Point p;
+ typedef bg::model::segment<Point> segment_type;
+ segment_type s;
+ bg::read_wkt(wkt1, p);
+ bg::read_wkt(wkt2, s);
+ return bg::distance(p, s, strategy);
+}
+
+//===========================================================================
+
+template <typename Point, typename Strategy>
+inline typename bg::default_distance_result<Point>::type
+sb_distance(std::string const& wkt1,
+ std::string const& wkt2,
+ Strategy const& strategy)
+{
+ typedef bg::model::segment<Point> segment_type;
+ typedef bg::model::box<Point> box_type;
+ segment_type s;
+ box_type b;
+ bg::read_wkt(wkt1, s);
+ bg::read_wkt(wkt2, b);
+ return bg::distance(s, b, strategy);
+}
+
+//===================================================================
+
+template <typename Tag> struct dispatch
+{
+ //tag dispatching for swaping arguments in segments
+ template <typename T>
+ static inline T swap(T const& t)
+ {
+ return t;
+ }
+
+ // mirror geometry w.r.t. equator
+ template <typename T>
+ static inline T mirror(T const& t)
+ {
+ return t;
+ }
+};
+
+// Specialization for segments
+template <> struct dispatch<boost::geometry::segment_tag>
+{
+ template <typename Segment>
+ static inline Segment swap(Segment const& s)
+ {
+ Segment s_swaped;
+
+ bg::set<0, 0>(s_swaped, bg::get<1, 0>(s));
+ bg::set<0, 1>(s_swaped, bg::get<1, 1>(s));
+ bg::set<1, 0>(s_swaped, bg::get<0, 0>(s));
+ bg::set<1, 1>(s_swaped, bg::get<0, 1>(s));
+
+ return s_swaped;
+ }
+
+ template <typename Segment>
+ static inline Segment mirror(Segment const& s)
+ {
+ Segment s_mirror;
+
+ bg::set<0, 0>(s_mirror, bg::get<0, 0>(s));
+ bg::set<0, 1>(s_mirror, bg::get<0, 1>(s) * -1);
+ bg::set<1, 0>(s_mirror, bg::get<1, 0>(s));
+ bg::set<1, 1>(s_mirror, bg::get<1, 1>(s) * -1);
+
+ return s_mirror;
+ }
+};
+
+// Specialization for boxes
+template <> struct dispatch<boost::geometry::box_tag>
+{
+ template <typename T>
+ static inline T swap(T const& t)
+ {
+ return t;
+ }
+
+ template <typename Box>
+ static inline Box mirror(Box const& b)
+ {
+ Box b_mirror;
+
+ bg::set<0, 0>(b_mirror, bg::get<bg::min_corner, 0>(b));
+ bg::set<0, 1>(b_mirror, bg::get<bg::max_corner, 1>(b) * -1);
+ bg::set<1, 0>(b_mirror, bg::get<bg::max_corner, 0>(b));
+ bg::set<1, 1>(b_mirror, bg::get<bg::min_corner, 1>(b) * -1);
+
+ return b_mirror;
+ }
+};
+
+
+// Specialization for points
+template <> struct dispatch<boost::geometry::point_tag>
+{
+ template <typename T>
+ static inline T swap(T const& t)
+ {
+ return t;
+ }
+
+ template <typename Point>
+ static inline Point mirror(Point const& p)
+ {
+ Point p_mirror;
+
+ bg::set<0>(p_mirror, bg::get<0>(p));
+ bg::set<1>(p_mirror, bg::get<1>(p) * -1);
+
+ return p_mirror;
+ }
+};
+
+//========================================================================
+
+
+template <typename T>
+struct check_equal
+{
+ template <typename Value, typename = void>
+ struct equal_to
+ {
+ static inline void apply(Value const& x, Value const& y)
+ {
+ BOOST_CHECK(x == y);
+ }
+ };
+
+ template <typename Dummy>
+ struct equal_to<double, Dummy>
+ {
+ static inline void apply(double x, double y)
+ {
+ BOOST_CHECK_CLOSE(x, y, 0.001);
+ }
+ };
+
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& /*case_id*/,
+ std::string const& /*subcase_id*/,
+ Geometry1 const& /*geometry1*/,
+ Geometry2 const& /*geometry2*/,
+ T const& detected,
+ T const& expected)
+ {
+ equal_to<T>::apply(expected, detected);
+ }
+};
+
+//========================================================================
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ int id1 = bg::geometry_id<Geometry1>::value,
+ int id2 = bg::geometry_id<Geometry2>::value
+>
+struct test_distance_of_geometries
+ : public test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
+{};
+
+
+template <typename Geometry1, typename Geometry2>
+struct test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
+{
+ template <typename DistanceType, typename Strategy>
+ static inline
+ void apply(std::string const& case_id,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ DistanceType const& expected_distance,
+ Strategy const& strategy,
+ bool test_reversed = true,
+ bool swap_geometry_args = false,
+ bool mirror_geometry = true)
+ {
+ Geometry1 geometry1 = from_wkt<Geometry1>(wkt1);
+ Geometry2 geometry2 = from_wkt<Geometry2>(wkt2);
+
+ apply(case_id, geometry1, geometry2,
+ expected_distance,
+ strategy, test_reversed, swap_geometry_args,
+ mirror_geometry);
+ }
+
+
+ template
+ <
+ typename DistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ DistanceType const& expected_distance,
+ Strategy const& strategy,
+ bool test_reversed = true,
+ bool swap_geometry_args = false,
+ bool mirror_geometry = true)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; "
+ << "G1: " << bg::wkt(geometry1)
+ << " - "
+ << "G2: " << bg::wkt(geometry2)
+ << std::endl;
+#endif
+ namespace services = bg::strategy::distance::services;
+
+ using bg::unit_test::distance_brute_force;
+
+ typedef typename bg::default_distance_result
+ <
+ Geometry1, Geometry2
+ >::type default_distance_result;
+
+ typedef typename services::return_type
+ <
+ Strategy, Geometry1, Geometry2
+ >::type distance_result_from_strategy;
+
+ static const bool same_regular = boost::is_same
+ <
+ default_distance_result,
+ distance_result_from_strategy
+ >::type::value;
+
+ BOOST_CHECK(same_regular);
+
+ // check distance with passed strategy
+ distance_result_from_strategy dist =
+ bg::distance(geometry1, geometry2, strategy);
+
+ check_equal
+ <
+ distance_result_from_strategy
+ >::apply(case_id, "a", geometry1, geometry2,
+ dist, expected_distance);
+
+ // check against the comparable distance computed in a
+ // brute-force manner
+ default_distance_result dist_brute_force
+ = distance_brute_force(geometry1, geometry2, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(case_id, "b", geometry1, geometry2,
+ dist_brute_force, expected_distance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << string_from_type<typename bg::coordinate_type<Geometry1>::type>::name()
+ << string_from_type<typename bg::coordinate_type<Geometry2>::type>::name()
+ << " -> "
+ << string_from_type<default_distance_result>::name()
+ << std::endl;
+ std::cout << "expected distance = " << std::setprecision(10)
+ << expected_distance << " ; "
+ << std::endl;
+ std::cout << "distance = " << std::setprecision(10)
+ << dist << " ; "
+ << std::endl;
+
+ if ( !test_reversed )
+ {
+ std::cout << std::endl;
+ }
+#endif
+
+ if ( test_reversed )
+ {
+ // check distance with given strategy
+ dist = bg::distance(geometry2, geometry1, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(case_id, "ra", geometry2, geometry1,
+ dist, expected_distance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "distance[reversed args] = " << std::setprecision(10)
+ << dist
+ << std::endl;
+#endif
+ }
+
+ if (swap_geometry_args)
+ {
+ Geometry1 g1 = dispatch
+ <
+ typename boost::geometry::tag<Geometry1>::type
+ >::swap(geometry1);
+
+ Geometry2 g2 = dispatch
+ <
+ typename boost::geometry::tag<Geometry2>::type
+ >::swap(geometry2);
+
+ // check distance with given strategy
+ dist = bg::distance(g1, g2, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(case_id, "swap", g1, g2,
+ dist, expected_distance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "distance[swap geometry args] = " << std::setprecision(10)
+ << dist
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+ if (mirror_geometry)
+ {
+ Geometry1 g1 = dispatch
+ <
+ typename boost::geometry::tag<Geometry1>::type
+ >::mirror(geometry1);
+
+ Geometry2 g2 = dispatch
+ <
+ typename boost::geometry::tag<Geometry2>::type
+ >::mirror(geometry2);
+
+ // check distance with given strategy
+ dist = bg::distance(g1, g2, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(case_id, "mirror", g1, g2,
+ dist, expected_distance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "distance[mirror geometries] = " << std::setprecision(10)
+ << dist
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+#endif
+
+ }
+};
+
+
+//========================================================================
+
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void test_empty_input(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ try
+ {
+ bg::distance(geometry1, geometry2);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+
+ try
+ {
+ bg::distance(geometry2, geometry1);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+
+ try
+ {
+ bg::distance(geometry1, geometry2, strategy);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+
+ try
+ {
+ bg::distance(geometry2, geometry1, strategy);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+}
+
+#endif // BOOST_GEOMETRY_TEST_DISTANCE_GEO_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/distance/test_distance_se_common.hpp b/src/boost/libs/geometry/test/algorithms/distance/test_distance_se_common.hpp
new file mode 100644
index 000000000..1909c27f9
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/test_distance_se_common.hpp
@@ -0,0 +1,381 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_SE_COMMON_HPP
+#define BOOST_GEOMETRY_TEST_DISTANCE_SE_COMMON_HPP
+
+#include <iostream>
+#include <string>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/write.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/algorithms/comparable_distance.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <from_wkt.hpp>
+#include <string_from_type.hpp>
+
+#include "distance_brute_force.hpp"
+
+namespace bg = ::boost::geometry;
+
+static const double earth_radius_km = 6371.0;
+static const double earth_radius_miles = 3959.0;
+
+
+//========================================================================
+
+
+template <typename T>
+struct check_equal
+{
+ template <typename Value, typename = void>
+ struct equal_to
+ {
+ static inline void apply(Value const& x, Value const& y)
+ {
+ BOOST_CHECK(x == y);
+ }
+ };
+
+ template <typename Dummy>
+ struct equal_to<double, Dummy>
+ {
+ static inline void apply(double x, double y)
+ {
+ BOOST_CHECK_CLOSE(x, y, 0.001);
+ }
+ };
+
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(std::string const& /*case_id*/,
+ std::string const& /*subcase_id*/,
+ Geometry1 const& /*geometry1*/,
+ Geometry2 const& /*geometry2*/,
+ T const& detected,
+ T const& expected)
+ {
+ equal_to<T>::apply(expected, detected);
+ /*
+ TODO:
+ Ideally we would want the following, but it does not work well
+ approximate equality test.
+
+ BOOST_CHECK_MESSAGE(equal_to<T>::apply(expected, detected),
+ "case ID: " << case_id << "-" << subcase_id << "; "
+ << "G1: " << bg::wkt(geometry1)
+ << " - "
+ << "G2: " << bg::wkt(geometry2)
+ << " -> Detected: " << detected
+ << "; Expected: " << expected);
+ */
+ }
+};
+
+//========================================================================
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ int id1 = bg::geometry_id<Geometry1>::value,
+ int id2 = bg::geometry_id<Geometry2>::value
+>
+struct test_distance_of_geometries
+ : public test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
+{};
+
+
+template <typename Geometry1, typename Geometry2>
+struct test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
+{
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& case_id,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool test_reversed = true)
+ {
+ Geometry1 geometry1 = from_wkt<Geometry1>(wkt1);
+ Geometry2 geometry2 = from_wkt<Geometry2>(wkt2);
+
+ apply(case_id, geometry1, geometry2,
+ expected_distance, expected_comparable_distance,
+ strategy, test_reversed);
+ }
+
+ template <typename DistanceType, typename Strategy>
+ static inline
+ void apply(std::string const& case_id,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ DistanceType const& expected_distance,
+ Strategy const& strategy,
+ bool test_reversed = true)
+ {
+ Geometry1 geometry1 = from_wkt<Geometry1>(wkt1);
+ Geometry2 geometry2 = from_wkt<Geometry2>(wkt2);
+
+ apply(case_id, geometry1, geometry2,
+ expected_distance, expected_distance,
+ strategy, test_reversed);
+ }
+
+
+ template
+ <
+ typename DistanceType,
+ typename ComparableDistanceType,
+ typename Strategy
+ >
+ static inline
+ void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ DistanceType const& expected_distance,
+ ComparableDistanceType const& expected_comparable_distance,
+ Strategy const& strategy,
+ bool test_reversed = true)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << "; "
+ << "G1: " << bg::wkt(geometry1)
+ << " - "
+ << "G2: " << bg::wkt(geometry2)
+ << std::endl;
+#endif
+ namespace services = bg::strategy::distance::services;
+
+ using bg::unit_test::distance_brute_force;
+
+ typedef typename bg::default_distance_result
+ <
+ Geometry1, Geometry2
+ >::type default_distance_result;
+
+ typedef typename services::return_type
+ <
+ Strategy, Geometry1, Geometry2
+ >::type distance_result_from_strategy;
+
+ static const bool same_regular = boost::is_same
+ <
+ default_distance_result,
+ distance_result_from_strategy
+ >::type::value;
+
+ BOOST_CHECK(same_regular);
+
+ typedef typename bg::default_comparable_distance_result
+ <
+ Geometry1, Geometry2
+ >::type default_comparable_distance_result;
+
+ typedef typename services::return_type
+ <
+ typename services::comparable_type<Strategy>::type,
+ Geometry1,
+ Geometry2
+ >::type comparable_distance_result_from_strategy;
+
+ static const bool same_comparable = boost::is_same
+ <
+ default_comparable_distance_result,
+ comparable_distance_result_from_strategy
+ >::type::value;
+
+ BOOST_CHECK( same_comparable );
+
+ // check distance with passed strategy
+ distance_result_from_strategy dist =
+ bg::distance(geometry1, geometry2, strategy);
+
+ check_equal
+ <
+ distance_result_from_strategy
+ >::apply(case_id, "a", geometry1, geometry2,
+ dist, expected_distance);
+
+ // check against the comparable distance computed in a
+ // brute-force manner
+ default_distance_result dist_brute_force
+ = distance_brute_force(geometry1, geometry2, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(case_id, "b", geometry1, geometry2,
+ dist_brute_force, expected_distance);
+
+ // check comparable distance with passed strategy
+ comparable_distance_result_from_strategy cdist =
+ bg::comparable_distance(geometry1, geometry2, strategy);
+
+ check_equal
+ <
+ default_comparable_distance_result
+ >::apply(case_id, "c", geometry1, geometry2,
+ cdist, expected_comparable_distance);
+
+ // check against the comparable distance computed in a
+ // brute-force manner
+ default_comparable_distance_result cdist_brute_force
+ = distance_brute_force(geometry1,
+ geometry2,
+ services::get_comparable
+ <
+ Strategy
+ >::apply(strategy));
+
+ check_equal
+ <
+ default_comparable_distance_result
+ >::apply(case_id, "d", geometry1, geometry2,
+ cdist_brute_force, expected_comparable_distance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << string_from_type<typename bg::coordinate_type<Geometry1>::type>::name()
+ << string_from_type<typename bg::coordinate_type<Geometry2>::type>::name()
+ << " -> "
+ << string_from_type<default_distance_result>::name()
+ << string_from_type<default_comparable_distance_result>::name()
+ << std::endl;
+ std::cout << "strategy radius: " << strategy.radius() << std::endl;
+ std::cout << "expected distance = "
+ << expected_distance << " ; "
+ << "expected comp. distance = "
+ << expected_comparable_distance
+ << std::endl;
+ std::cout << "distance = "
+ << dist << " ; "
+ << "comp. distance = "
+ << cdist
+ << std::endl;
+
+ if ( !test_reversed )
+ {
+ std::cout << std::endl;
+ }
+#endif
+
+ if ( test_reversed )
+ {
+ // check distance with given strategy
+ dist = bg::distance(geometry2, geometry1, strategy);
+
+ check_equal
+ <
+ default_distance_result
+ >::apply(case_id, "ra", geometry2, geometry1,
+ dist, expected_distance);
+
+ // check comparable distance with given strategy
+ cdist = bg::comparable_distance(geometry2, geometry1, strategy);
+
+ check_equal
+ <
+ default_comparable_distance_result
+ >::apply(case_id, "rc", geometry2, geometry1,
+ cdist, expected_comparable_distance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "distance[reversed args] = "
+ << dist << " ; "
+ << "comp. distance[reversed args] = "
+ << cdist
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+ }
+};
+
+
+//========================================================================
+
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void test_empty_input(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ try
+ {
+ bg::distance(geometry1, geometry2);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+
+ try
+ {
+ bg::distance(geometry2, geometry1);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+
+ try
+ {
+ bg::distance(geometry1, geometry2, strategy);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+
+ try
+ {
+ bg::distance(geometry2, geometry1, strategy);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false,
+ "A empty_input_exception should have been thrown");
+}
+
+#endif // BOOST_GEOMETRY_TEST_DISTANCE_SE_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/distance/test_empty_geometry.hpp b/src/boost/libs/geometry/test/algorithms/distance/test_empty_geometry.hpp
new file mode 100644
index 000000000..5aa0a43e1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/distance/test_empty_geometry.hpp
@@ -0,0 +1,213 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_GEOMETRY_TEST_EMPTY_GEOMETRY_HPP
+#define BOOST_GEOMETRY_TEST_EMPTY_GEOMETRY_HPP
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_pointlike_pointlike(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::multi_point<Point> multipoint_empty;
+
+ Point point = from_wkt<Point>("point(0 0)");
+
+ // 1st geometry is empty
+ test_empty_input(multipoint_empty, point, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(point, multipoint_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(multipoint_empty, multipoint_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_pointlike_linear(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::linestring<Point> line_empty;
+ bg::model::multi_point<Point> multipoint_empty;
+ bg::model::multi_linestring<bg::model::linestring<Point> > multiline_empty;
+
+ Point point = from_wkt<Point>("POINT(0 0)");
+ bg::model::linestring<Point> line =
+ from_wkt<bg::model::linestring<Point> >("LINESTRING(0 0,1 1,2 2)");
+
+ // 1st geometry is empty
+ test_empty_input(multipoint_empty, line, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(line, multipoint_empty, strategy);
+ test_empty_input(point, line_empty, strategy);
+ test_empty_input(point, multiline_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(multipoint_empty, line_empty, strategy);
+ test_empty_input(multipoint_empty, multiline_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_pointlike_areal(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::multi_point<Point> multipoint_empty;
+
+ bg::model::polygon<Point> polygon_empty;
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon_empty;
+
+ Point point = from_wkt<Point>("POINT(0 0)");
+ bg::model::polygon<Point> polygon =
+ from_wkt<bg::model::polygon<Point> >("POLYGON((0 0,1 0,1 1,0 1,0 0))");
+
+ // 1st geometry is empty
+ test_empty_input(multipoint_empty, polygon, strategy);
+ test_empty_input(polygon_empty, point, strategy);
+ test_empty_input(multipolygon_empty, point, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(point, polygon_empty, strategy);
+ test_empty_input(point, multipolygon_empty, strategy);
+ test_empty_input(polygon, multipoint_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(multipoint_empty, polygon_empty, strategy);
+ test_empty_input(multipoint_empty, multipolygon_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_linear_linear(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::linestring<Point> line_empty;
+ bg::model::multi_linestring<bg::model::linestring<Point> > multiline_empty;
+
+ bg::model::linestring<Point> line =
+ from_wkt<bg::model::linestring<Point> >("LINESTRING(0 0,1 1)");
+
+ // 1st geometry is empty
+ test_empty_input(line_empty, line, strategy);
+ test_empty_input(multiline_empty, line, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(line, line_empty, strategy);
+ test_empty_input(line, multiline_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(line_empty, line_empty, strategy);
+ test_empty_input(multiline_empty, line_empty, strategy);
+ test_empty_input(multiline_empty, multiline_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_linear_areal(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::linestring<Point> line_empty;
+ bg::model::multi_linestring<bg::model::linestring<Point> > multiline_empty;
+
+ bg::model::polygon<Point> polygon_empty;
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon_empty;
+
+ bg::model::linestring<Point> line =
+ from_wkt<bg::model::linestring<Point> >("LINESTRING(0 0,1 1)");
+ bg::model::polygon<Point> polygon =
+ from_wkt<bg::model::polygon<Point> >("POLYGON((0 0,1 0,1 1,0 1,0 0))");
+
+ // 1st geometry is empty
+ test_empty_input(line_empty, polygon, strategy);
+ test_empty_input(multiline_empty, polygon, strategy);
+ test_empty_input(polygon_empty, line, strategy);
+ test_empty_input(multipolygon_empty, line, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(line, polygon_empty, strategy);
+ test_empty_input(line, multipolygon_empty, strategy);
+ test_empty_input(polygon, line_empty, strategy);
+ test_empty_input(polygon, multiline_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(line_empty, polygon_empty, strategy);
+ test_empty_input(line_empty, multipolygon_empty, strategy);
+ test_empty_input(multiline_empty, polygon_empty, strategy);
+ test_empty_input(multiline_empty, multipolygon_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+
+template <typename Point, typename Strategy>
+void test_more_empty_input_areal_areal(Strategy const& strategy)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "testing on empty inputs... " << std::flush;
+#endif
+ bg::model::polygon<Point> polygon_empty;
+ bg::model::multi_polygon<bg::model::polygon<Point> > multipolygon_empty;
+
+ bg::model::polygon<Point> polygon =
+ from_wkt<bg::model::polygon<Point> >("POLYGON((0 0,1 0,1 1,0 1,0 0))");
+
+ // 1st geometry is empty
+ test_empty_input(polygon_empty, polygon, strategy);
+ test_empty_input(multipolygon_empty, polygon, strategy);
+
+ // 2nd geometry is empty
+ test_empty_input(polygon, polygon_empty, strategy);
+ test_empty_input(polygon, multipolygon_empty, strategy);
+
+ // both geometries are empty
+ test_empty_input(polygon_empty, multipolygon_empty, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "done!" << std::endl;
+#endif
+}
+
+#endif // BOOST_GEOMETRY_TEST_EMPTY_GEOMETRY_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/Jamfile b/src/boost/libs/geometry/test/algorithms/envelope_expand/Jamfile
new file mode 100644
index 000000000..da8382806
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/Jamfile
@@ -0,0 +1,24 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-envelope_expand
+ :
+ [ run envelope.cpp : : : : algorithms_envelope ]
+ [ run envelope_multi.cpp : : : : algorithms_envelope_multi ]
+ [ run envelope_on_spheroid.cpp : : : : algorithms_envelope_on_spheroid ]
+ [ run expand.cpp : : : : algorithms_expand ]
+ [ run expand_on_spheroid.cpp : : : : algorithms_expand_on_spheroid ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope.cpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope.cpp
new file mode 100644
index 000000000..7418b27c6
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope.cpp
@@ -0,0 +1,235 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015, 2016.
+// Modifications copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/numeric/conversion/bounds.hpp>
+
+#include "test_envelope.hpp"
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/adapted/std_pair_as_segment.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+void test_2d()
+{
+ test_envelope<P>("POINT(1 1)", 1, 1, 1, 1);
+ test_envelope<bg::model::linestring<P> >("LINESTRING(1 1,2 2)", 1, 2, 1, 2);
+ test_envelope<bg::model::polygon<P> >("POLYGON((1 1,1 3,3 3,3 1,1 1))", 1, 3, 1, 3);
+
+ test_envelope<bg::model::ring<P> >("POLYGON((1 1,1 3,3 3,3 1,1 1))", 1, 3, 1, 3);
+ test_envelope<bg::model::box<P> >("BOX(1 1,3 3)", 1, 3, 1, 3);
+
+ // Triangle, closed and open, and CCW.
+ // Note that for the envelope algorithm,
+ // these combinations should theoretically not differ
+ test_envelope<bg::model::ring<P> >("POLYGON((4 1,0 7,7 9,4 1))", 0, 7, 1, 9);
+ test_envelope<bg::model::ring<P, true, false> >("POLYGON((4 1,0 7,7 9))", 0, 7, 1, 9);
+ test_envelope<bg::model::ring<P, false> >("POLYGON((4 1,7 9,0 7,4 1))", 0, 7, 1, 9);
+ test_envelope<bg::model::ring<P, false, false> >("POLYGON((4 1,7 9,0 7))", 0, 7, 1, 9);
+
+ typedef std::pair<P, P> segment_type;
+ test_envelope<segment_type>("SEGMENT(1 1,3 3)", 1, 3, 1, 3);
+}
+
+template <typename P>
+void test_3d()
+{
+ test_envelope<P>("POINT(1 2 3)", 1, 1, 2, 2, 3, 3);
+ test_envelope<P>("POINT(3 2 1)", 3, 3, 2, 2, 1, 1);
+ test_envelope<bg::model::linestring<P> >("LINESTRING(1 1 1,2 2 2)", 1, 2, 1, 2, 1, 2);
+ test_envelope<bg::model::box<P> >("BOX(1 1 1,3 3 3)", 1, 3, 1, 3, 1, 3);
+}
+
+template <typename Geometry>
+void test_empty_geometry(std::string const& wkt)
+{
+ typedef typename bg::coordinate_type<Geometry>::type ct;
+ ct high_val = boost::numeric::bounds<ct>::highest();
+ ct low_val = boost::numeric::bounds<ct>::lowest();
+
+ test_envelope<Geometry>(wkt, high_val, low_val, high_val, low_val);
+}
+
+template <typename P>
+void test_empty()
+{
+ test_empty_geometry<bg::model::linestring<P> >("LINESTRING()");
+ test_empty_geometry<bg::model::ring<P> >("POLYGON(())");
+
+ test_empty_geometry<bg::model::polygon<P> >("POLYGON(())");
+
+ test_empty_geometry<bg::model::multi_point<P> >("MULTIPOINT()");
+
+ test_empty_geometry
+ <
+ bg::model::multi_linestring<bg::model::linestring<P> >
+ >("MULTILINESTRING()");
+
+ test_empty_geometry
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON()");
+}
+
+template <typename P>
+void test_invalid()
+{
+ // polygon with empty exterior and interior rings
+ test_empty_geometry<bg::model::polygon<P> >("POLYGON((),(),())");
+
+ // polygon with empty interior rings
+ test_envelope
+ <
+ bg::model::polygon<P>
+ >("POLYGON((1 2,1 20,22 20,22 2,1 2),(),())",
+ 1, 22, 2, 20);
+
+ // another polygon with empty interior rings
+ test_envelope
+ <
+ bg::model::polygon<P>
+ >("POLYGON((1 2,1 20,22 20,22 2,1 2),(),(3 4,19 4,19 18,3 18,3 4),())",
+ 1, 22, 2, 20);
+
+ // polygon with empty exterior ring
+ test_envelope
+ <
+ bg::model::polygon<P>
+ >("POLYGON((),(),(3 4,19 4,19 18,3 18,3 4),())",
+ 3, 19, 4, 18);
+
+ // another polygon with empty exterior ring
+ test_envelope
+ <
+ bg::model::polygon<P>
+ >("POLYGON((),(),(3 4,19 4,19 18,3 18,3 4),(4 5,18 5,18 17,4 17,4 5))",
+ 3, 19, 4, 18);
+
+ // yet one more polygon with empty exterior ring
+ test_envelope
+ <
+ bg::model::polygon<P>
+ >("POLYGON((),(),(4 5,18 5,18 17,4 17,4 5),(3 4,19 4,19 18,3 18,3 4))",
+ 3, 19, 4, 18);
+
+ // multilinestring with empty linestrings
+ test_empty_geometry
+ <
+ bg::model::multi_linestring<bg::model::linestring<P> >
+ >("MULTILINESTRING((),(),())");
+
+ // multilinestring with empty and non-empty linestrings
+ test_envelope
+ <
+ bg::model::multi_linestring<bg::model::linestring<P> >
+ >("MULTILINESTRING((),(10 20),())", 10, 10, 20, 20);
+
+ // multipolygon with empty polygon
+ test_empty_geometry
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON((()))");
+
+ // multipolygon with many empty polygons
+ test_empty_geometry
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON(((),(),()),(()),((),(),(),(),()))");
+
+ // multipolygon with empty polygons and non-empty (valid) polygon
+ test_envelope
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON(((),(),()),((10 30,10 40,20 30,10 30)),\
+ ((),(),()),(()))", 10, 20, 30, 40);
+
+ // multipolygon with empty polygons and non-empty (valid) polygon
+ // that has an interior ring
+ test_envelope
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON(((),(),()),(()),\
+ ((1 2,1 20,22 20,22 2,1 2),(3 4,19 4,19 18,3 18,3 4)),(()))",
+ 1, 22, 2, 20);
+
+ // multipolygon with empty polygons and non-empty (invalid) polygon
+ // that has an interior ring but empty exterior ring
+ test_envelope
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON(((),(),()),(()),((),(3 4,19 4,19 18,3 18,3 4)),(()))",
+ 3, 19, 4, 18);
+
+ // multipolygon with empty polygons and non-empty (invalid) polygon
+ // that has an interior ring but empty exterior ring
+ test_envelope
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON(((),(),()),((),(),(3 4,19 4,19 18,3 18,3 4),()),(()))",
+ 3, 19, 4, 18);
+
+ // multipolygon with empty polygons and non-empty (invalid) polygon
+ // that has two non-empty interior rings but empty exterior ring
+ test_envelope
+ <
+ bg::model::multi_polygon<bg::model::polygon<P> >
+ >("MULTIPOLYGON(((),(),()),\
+ ((),(),(3 4,19 4,19 18,3 18,3 4),(4 5,18 5,18 17,4 17,4 5),()),\
+ (()))",
+ 3, 19, 4, 18);
+}
+
+int test_main(int, char* [])
+{
+ //test_2d<int[2]>();
+ //test_2d<float[2]>();
+ //test_2d<double[2]>();
+ test_2d<boost::tuple<float, float> >();
+ test_2d<bg::model::d2::point_xy<int> >();
+ test_2d<bg::model::d2::point_xy<float> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+ test_3d<test::test_point>();
+ test_3d<boost::tuple<int, int, int> >();
+
+ test_empty<boost::tuple<float, float> >();
+ test_empty<bg::model::d2::point_xy<int> >();
+ test_empty<bg::model::d2::point_xy<float> >();
+ test_empty<bg::model::d2::point_xy<double> >();
+
+ test_invalid<boost::tuple<float, float> >();
+ test_invalid<bg::model::d2::point_xy<int> >();
+ test_invalid<bg::model::d2::point_xy<float> >();
+ test_invalid<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+ test_3d<boost::tuple<ttmath_big, ttmath_big, ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_multi.cpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_multi.cpp
new file mode 100644
index 000000000..7efebb96b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_multi.cpp
@@ -0,0 +1,63 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_envelope.hpp"
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+void test_2d()
+{
+ /*test_envelope<bg::model::multi_point<P> >(
+ "MULTIPOINT((1 1),(1 0),(1 2))", 1, 1, 0, 2);
+ test_envelope<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((0 0,1 1),(1 1,2 2),(2 2,3 3))", 0, 3, 0, 3);
+*/
+ test_envelope<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((1 1,1 3,3 3,3 1,1 1)),((4 4,4 6,6 6,6 4,4 4)))", 1, 6, 1, 6);
+}
+
+
+template <typename P>
+void test_3d()
+{
+ //typedef bg::model::multi_point<P> mp;
+}
+
+
+int test_main( int , char* [] )
+{
+ test_2d<boost::tuple<float, float> >();
+ test_2d<bg::model::d2::point_xy<float> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+ test_3d<boost::tuple<float, float, float> >();
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+#ifdef HAVE_TTMATH
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+ test_2d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_on_spheroid.cpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_on_spheroid.cpp
new file mode 100644
index 000000000..cbc5e536e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/envelope_on_spheroid.cpp
@@ -0,0 +1,2709 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_envelope_on_sphere_or_spheroid
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <cstddef>
+#include <limits>
+#include <iostream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+#include <from_wkt.hpp>
+
+#include <boost/numeric/conversion/bounds.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/core/coordinate_dimension.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/algorithms/convert.hpp>
+#include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/algorithms/reverse.hpp>
+
+#include <boost/geometry/index/detail/algorithms/is_valid.hpp>
+
+#include "test_envelope_expand_on_spheroid.hpp"
+
+
+template <typename FormulaPolicy, typename CS_Tag>
+struct test_envelope
+{
+ template <typename Geometry, typename Box>
+ static inline void apply(Geometry& geometry, Box& detected)
+ {
+ bg::envelope(geometry, detected);
+ }
+};
+
+template <typename FormulaPolicy>
+struct test_envelope<FormulaPolicy, bg::geographic_tag>
+{
+ template <typename Geometry, typename Box>
+ static inline void apply(Geometry& geometry,
+ Box& detected)
+ {
+ typedef bg::strategy::envelope::spherical_point point_strategy_t;
+ typedef bg::strategy::envelope::spherical_multipoint multi_point_strategy_t;
+ typedef bg::strategy::envelope::spherical_box box_strategy_t;
+ typedef bg::strategy::envelope::geographic<FormulaPolicy, bg::srs::spheroid<double>, double> strategy_t;
+
+ typename boost::mpl::if_c
+ <
+ boost::is_same<typename bg::tag<Geometry>::type, bg::point_tag>::value,
+ point_strategy_t,
+ typename boost::mpl::if_c
+ <
+ boost::is_same<typename bg::tag<Geometry>::type, bg::multi_point_tag>::value,
+ multi_point_strategy_t,
+ typename boost::mpl::if_c
+ <
+ boost::is_same<typename bg::tag<Geometry>::type, bg::box_tag>::value,
+ box_strategy_t,
+ strategy_t
+ >::type
+ >::type
+ >::type strategy;
+
+ bg::envelope(geometry, detected, strategy);
+ }
+};
+
+template <typename MBR, typename FormulaPolicy = bg::strategy::thomas>
+class envelope_on_spheroid_basic_tester
+{
+private:
+ template
+ <
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+ >
+ struct write_geometry
+ {
+ template <typename OutputStream>
+ static inline OutputStream& apply(OutputStream& os,
+ Geometry const& geometry)
+ {
+ os << bg::wkt(geometry);
+ return os;
+ }
+ };
+
+ template <typename Segment>
+ struct write_geometry<Segment, bg::segment_tag>
+ {
+ template <typename OutputStream>
+ static inline OutputStream& apply(OutputStream& os,
+ Segment const& segment)
+ {
+ os << "SEGMENT" << bg::dsv(segment);
+ return os;
+ }
+ };
+
+ template <typename Box>
+ struct write_geometry<Box, bg::box_tag>
+ {
+ template <typename OutputStream>
+ static inline OutputStream& apply(OutputStream& os,
+ Box const& box)
+ {
+ os << "BOX" << bg::dsv(box);
+ return os;
+ }
+ };
+
+ template <typename Geometry, typename Box>
+ static inline void check_message(bool same_boxes,
+ std::string const& case_id,
+ std::string const& units_str,
+ Geometry const& geometry,
+ Box const& expected,
+ Box const& detected)
+ {
+ std::ostringstream stream;
+ stream << "case ID: " << case_id << ", "
+ << "MBR units: " << units_str << "; "
+ << "geometry: ";
+
+ write_geometry<Geometry>::apply(stream, geometry);
+
+ stream << std::setprecision(17);
+
+ stream << "; " << "expected: " << bg::dsv(expected)
+ << ", " << "detected: " << bg::dsv(detected);
+
+ BOOST_CHECK_MESSAGE(same_boxes, stream.str());
+ }
+
+ template
+ <
+ typename Geometry, typename Box,
+ typename T1, typename T2, typename T3, typename T4
+ >
+ static inline void check_message(bool same_boxes,
+ std::string const& case_id,
+ std::string const& units_str,
+ Geometry const& geometry,
+ T1 const& lon_min, T2 const& lat_min, double height_min,
+ T3 const& lon_max, T4 const& lat_max, double height_max,
+ Box const& detected)
+ {
+ std::ostringstream stream;
+ stream << "case ID: " << case_id << ", "
+ << "MBR units: " << units_str << "; "
+ << "geometry: ";
+
+ write_geometry<Geometry>::apply(stream, geometry);
+
+ stream << std::setprecision(17);
+
+ stream << "; " << "expected: ";
+
+ if (BOOST_GEOMETRY_CONDITION(bg::dimension<Box>::value == 2))
+ {
+ stream << "(" << lon_min << " " << lat_min
+ << ", " << lon_max << " " << lat_max << ")";
+ }
+ else
+ {
+ stream << "(" << lon_min << " " << lat_min << " " << height_min
+ << ", " << lon_max << " " << lat_max << " " << height_max << ")";
+ }
+ stream << ", " << "detected: " << bg::dsv(detected);
+
+ BOOST_CHECK_MESSAGE(same_boxes, stream.str());
+ }
+
+ template
+ <
+ typename Box, typename Geometry,
+ typename T1, typename T2, typename T3, typename T4
+ >
+ static inline void base_test(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min, T2 const& lat_min, double height_min,
+ T3 const& lon_max, T4 const& lat_max, double height_max,
+ double tolerance)
+ {
+ typedef typename bg::coordinate_system<Box>::type::units box_units_type;
+
+ std::string const units_str = units2string<box_units_type>();
+
+ Box detected;
+ test_envelope<FormulaPolicy, typename bg::cs_tag<Geometry>::type>
+ ::apply(geometry, detected);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "geometry: ";
+ write_geometry<Geometry>::apply(std::cout, geometry);
+
+ std::cout << std::endl
+ << "MBR units: " << units_str
+ << std::endl;
+ std::cout << "expected: ";
+ if (BOOST_GEOMETRY_CONDITION(bg::dimension<Box>::value == 2))
+ {
+ std::cout << "(" << lon_min << " " << lat_min
+ << ", " << lon_max << " " << lat_max << ")";
+ }
+ else
+ {
+ std::cout << "(" << lon_min << " " << lat_min << " " << height_min
+ << ", " << lon_max << " " << lat_max << " " << height_max << ")";
+ }
+ std::cout << std::endl
+ << "detected: " << bg::dsv(detected)
+ << std::endl << std::endl;
+#endif
+
+ bool check = box_check_equals<Box>::apply(detected,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ tolerance);
+
+ check_message(check,
+ case_id, units_str,
+ geometry,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ detected);
+
+ // if valid box is expected, check the validity
+ if (lon_min <= lon_max && lat_min <= lat_max && height_min <= height_max)
+ {
+ BOOST_CHECK_MESSAGE(bg::index::detail::is_valid(detected),
+ "Case ID: " << case_id << ", "
+ << "MBR units: " << units_str << "; "
+ << "Invalid Box: " << bg::dsv(detected));
+ }
+ }
+
+public:
+ template
+ <
+ typename Geometry,
+ typename T1, typename T2, typename T3, typename T4
+ >
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min, T2 const& lat_min, double height_min,
+ T3 const& lon_max, T4 const& lat_max, double height_max,
+ double tolerance)
+ {
+ typedef other_system_info
+ <
+ typename bg::coordinate_system<MBR>::type
+ > other;
+
+ typedef bg::model::box
+ <
+ bg::model::point
+ <
+ typename bg::coordinate_type<MBR>::type,
+ bg::dimension<MBR>::value,
+ typename other::type
+ >
+ > other_mbr_type;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "case ID: " << case_id << std::endl << std::endl;
+#endif
+
+ base_test<MBR>(case_id, geometry,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ tolerance);
+
+ if (lon_max < lon_min)
+ {
+ // we are in the case were a special MBR is returned;
+ // makes no sense to change units
+ base_test<other_mbr_type>(case_id, geometry,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ tolerance);
+ }
+ else
+ {
+ base_test<other_mbr_type>(case_id, geometry,
+ other::convert(lon_min),
+ other::convert(lat_min),
+ height_min,
+ other::convert(lon_max),
+ other::convert(lat_max),
+ height_max,
+ tolerance);
+ }
+ }
+};
+
+
+// test the reverse of a geometry if it is either linear or ring
+template <typename Geometry, typename Tag = typename bg::tag<Geometry>::type>
+struct test_reverse_geometry
+{
+ static bool const is_linear =
+ boost::is_same<Tag, bg::segment_tag>::value
+ || boost::is_same<Tag, bg::linestring_tag>::value
+ || boost::is_same<Tag, bg::multi_linestring_tag>::value;
+
+ // currently disable rings
+ static bool const is_ring = false;
+ // static bool const is_ring = boost::is_same<Tag, bg::ring_tag>::value;
+
+ typedef typename boost::mpl::if_c
+ <
+ is_linear || is_ring,
+ boost::true_type,
+ boost::false_type
+ >::type type;
+
+ static bool const value = type::value;
+};
+
+template
+<
+ typename Geometry,
+ typename MBR,
+ typename Tag = typename bg::tag<Geometry>::type,
+ bool TestReverse = test_reverse_geometry<Geometry>::value,
+ typename FormulaPolicy = bg::strategy::thomas
+>
+struct test_envelope_on_sphere_or_spheroid
+{
+ template <typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min1, T2 const& lat_min1, double height_min1,
+ T3 const& lon_max1, T4 const& lat_max1, double height_max1,
+ T5 const& lon_min2, T6 const& lat_min2, double height_min2,
+ T7 const& lon_max2, T8 const& lat_max2, double height_max2,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ envelope_on_spheroid_basic_tester
+ <
+ MBR, FormulaPolicy
+ >::apply(case_id, geometry,
+ lon_min1, lat_min1, height_min1,
+ lon_max1, lat_max1, height_max1,
+ tolerance);
+
+ if (BOOST_GEOMETRY_CONDITION(TestReverse))
+ {
+ std::string reversed_case_id = case_id + "-reverse";
+
+ Geometry reversed_geometry = geometry;
+ bg::reverse(reversed_geometry);
+ envelope_on_spheroid_basic_tester
+ <
+ MBR, FormulaPolicy
+ >::apply(reversed_case_id, reversed_geometry,
+ lon_min2, lat_min2, height_min2,
+ lon_max2, lat_max2, height_max2,
+ tolerance);
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "=================="
+ << std::endl << std::endl;
+#endif
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min1, T2 const& lat_min1,
+ T3 const& lon_max1, T4 const& lat_max1,
+ T5 const& lon_min2, T6 const& lat_min2,
+ T7 const& lon_max2, T8 const& lat_max2,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, geometry,
+ lon_min1, lat_min1, 0, lon_max1, lat_max1, 0,
+ lon_min2, lat_min2, 0, lon_max2, lat_max2, 0,
+ tolerance);
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4>
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min, T2 const& lat_min, double height_min,
+ T3 const& lon_max, T4 const& lat_max, double height_max,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, geometry,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ tolerance);
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4>
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min, T2 const& lat_min,
+ T3 const& lon_max, T4 const& lat_max,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, geometry,
+ lon_min, lat_min, 0, lon_max, lat_max, 0,
+ tolerance);
+ }
+};
+
+
+// special tester for rings
+template <typename Geometry, typename MBR, bool TestReverse>
+struct test_envelope_on_sphere_or_spheroid<Geometry, MBR, bg::ring_tag, TestReverse>
+{
+ template <typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min1, T2 const& lat_min1,
+ T3 const& lon_max1, T4 const& lat_max1,
+ T5 const& lon_min2, T6 const& lat_min2,
+ T7 const& lon_max2, T8 const& lat_max2,
+ double const& tolerance = std::numeric_limits<double>::epsilon())
+ {
+ envelope_on_spheroid_basic_tester
+ <
+ MBR
+ >::apply(case_id, geometry,
+ lon_min1, lat_min1, 0,
+ lon_max1, lat_max1, 0,
+ tolerance);
+
+ std::string ccw_case_id = case_id + "-2ccw";
+
+ bg::model::ring
+ <
+ typename bg::point_type<Geometry>::type, false
+ > ccw_ring;
+ bg::convert(geometry, ccw_ring);
+
+ envelope_on_spheroid_basic_tester
+ <
+ MBR
+ >::apply(ccw_case_id, ccw_ring,
+ lon_min2, lat_min2, 0,
+ lon_max2, lat_max2, 0,
+ tolerance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "=================="
+ << std::endl << std::endl;
+#endif
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4>
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ T1 const& lon_min, T2 const& lat_min,
+ T3 const& lon_max, T4 const& lat_max,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, geometry,
+ lon_min, lat_min, lon_max, lat_max,
+ lon_min, lat_min, lon_max, lat_max,
+ tolerance);
+ }
+};
+
+
+template <typename CoordinateSystem, typename Geometry>
+void test_empty_geometry(std::string const& case_id, std::string const& wkt)
+{
+ std::size_t const dim = bg::dimension<Geometry>::value;
+
+ typedef bg::model::point<double, dim, CoordinateSystem> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<Geometry, B> tester;
+
+ typedef typename bg::coordinate_type<Geometry>::type ct;
+ ct high_val = boost::numeric::bounds<ct>::highest();
+ ct low_val = boost::numeric::bounds<ct>::lowest();
+
+ if (BOOST_GEOMETRY_CONDITION(dim == 2))
+ {
+ tester::apply(case_id,
+ from_wkt<Geometry>(wkt),
+ high_val, high_val, low_val, low_val);
+ }
+ else
+ {
+ tester::apply(case_id,
+ from_wkt<Geometry>(wkt),
+ high_val, high_val, high_val, low_val, low_val, low_val);
+ }
+}
+
+
+template <typename CoordinateSystem>
+void test_envelope_point()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> point_type;
+ typedef point_type G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("p01",
+ from_wkt<G>("POINT(10 10)"),
+ 10, 10, 10, 10);
+
+ tester::apply("p02",
+ from_wkt<G>("POINT(370 10)"),
+ 10, 10, 10, 10);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ tester::apply("p03",
+ from_wkt<G>("POINT(370 -350)"),
+ 10, 10, 10, 10);
+#endif
+
+ // north and south poles
+ tester::apply("p04",
+ from_wkt<G>("POINT(0 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("p04a",
+ from_wkt<G>("POINT(10 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("p04b",
+ from_wkt<G>("POINT(270 90)"),
+ 0, 90, 0, 90);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ tester::apply("p04c",
+ from_wkt<G>("POINT(270 450)"),
+ 0, 90, 0, 90);
+#endif
+
+ tester::apply("p04d",
+ from_wkt<G>("POINT(190 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("p04e",
+ from_wkt<G>("POINT(-100 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("p05",
+ from_wkt<G>("POINT(0 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("p05a",
+ from_wkt<G>("POINT(10 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("p05b",
+ from_wkt<G>("POINT(270 -90)"),
+ 0, -90, 0, -90);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ tester::apply("p05c",
+ from_wkt<G>("POINT(270 -450)"),
+ 0, -90, 0, -90);
+#endif
+
+ tester::apply("p05d",
+ from_wkt<G>("POINT(190 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("p05e",
+ from_wkt<G>("POINT(-100 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("p05f",
+ from_wkt<G>("POINT(-100 -90)"),
+ 0, -90, 0, -90);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_point )
+{
+ test_envelope_point<bg::cs::spherical_equatorial<bg::degree> >();
+ test_envelope_point<bg::cs::geographic<bg::degree> >();
+}
+
+
+template <typename CoordinateSystem>
+void test_envelope_point_with_height()
+{
+ typedef bg::model::point<double, 3, CoordinateSystem> point_type;
+ typedef point_type G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("ph01",
+ from_wkt<G>("POINT(10 10 1256)"),
+ 10, 10, 1256, 10, 10, 1256);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_point_with_height )
+{
+ test_envelope_point_with_height
+ <
+ bg::cs::spherical_equatorial<bg::degree>
+ >();
+ test_envelope_point_with_height<bg::cs::geographic<bg::degree> >();
+}
+
+
+BOOST_AUTO_TEST_CASE( envelope_segment_sphere )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::segment<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ double const eps = std::numeric_limits<double>::epsilon();
+
+ tester::apply("s01",
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 40, 40);
+
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 40, 10.345270046149988);
+/*
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(1 2,70 1)"),
+ 1, 1, 70, 2.01);
+*/
+ tester::apply("s02a",
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 10, 10, 40, 10.34527004614999);
+
+ tester::apply("s03",
+ from_wkt<G>("SEGMENT(160 10,-170 10)"),
+ 160, 10, 190, 10.34527004614999);
+
+ tester::apply("s03a",
+ from_wkt<G>("SEGMENT(-170 10,160 10)"),
+ 160, 10, 190, 10.34527004614999);
+
+ tester::apply("s03b",
+ from_wkt<G>("SEGMENT(-170 -10,160 -10)"),
+ 160, -10.34527004614999, 190, -10);
+
+ tester::apply("s04",
+ from_wkt<G>("SEGMENT(-40 45,140 60)"),
+ -40, 45, 140, 90);
+
+ tester::apply("s04a",
+ from_wkt<G>("SEGMENT(-40 45,140 25)"),
+ -40, 25, 140, 90);
+
+ // segment ending at the north pole
+ tester::apply("s05",
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 40, 45, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 40, 45, 40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s06",
+ from_wkt<G>("SEGMENT(-40 45,80 90)"),
+ -40, 45, -40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s06a",
+ from_wkt<G>("SEGMENT(70 90,-40 45)"),
+ -40, 45, -40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s07",
+ from_wkt<G>("SEGMENT(40 -45,80 90)"),
+ 40, -45, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s08",
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 10, -30);
+
+ tester::apply("s09",
+ from_wkt<G>("SEGMENT(1 -45,179 30)"),
+ 1, -85.28884376852969, 179, 30,
+ 3 * eps);
+
+ tester::apply("s09a",
+ from_wkt<G>("SEGMENT(2 -45,181 30)"),
+ 2, -87.63659983704832, 181, 30);
+
+ // very long segment
+ tester::apply("s10",
+ from_wkt<G>("SEGMENT(0 -45,181 30)"),
+ -179, -87.636599837048323, 0, 30,
+ 2.0 * eps);
+
+ tester::apply("s11",
+ from_wkt<G>("SEGMENT(260 30,20 45)"),
+ -100, 30, 20, 57.93195594009233);
+
+ tester::apply("s11a",
+ from_wkt<G>("SEGMENT(260 45,20 30)"),
+ -100, 30, 20, 57.931955940092337);
+
+ // segment degenerating to the north pole
+ tester::apply("s12",
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 0, 90, 0, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s13",
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("s14",
+ from_wkt<G>("SEGMENT(20 20,10 30)"),
+ 10, 20, 20, 30);//48.87458730907602);
+
+ tester::apply("s15",
+ from_wkt<G>("SEGMENT(50 45,185 45)"),
+ 50, 45, 185, 69.05897952775615);
+
+ // segment that lies on the equator
+ tester::apply("s16",
+ from_wkt<G>("SEGMENT(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // segment that lies on the equator
+ tester::apply("s16a",
+ from_wkt<G>("SEGMENT(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // segment that lies on the equator and touches antimeridian
+ tester::apply("s16b",
+ from_wkt<G>("SEGMENT(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // segment that lies on the equator and crosses antimeridian
+ tester::apply("s16c",
+ from_wkt<G>("SEGMENT(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ tester::apply("s17",
+ from_wkt<G>("SEGMENT(140 10, -140 80)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s17-r",
+ from_wkt<G>("SEGMENT(-140 80, 140 10)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s18",
+ from_wkt<G>("SEGMENT(20 10, 100 80)"),
+ 20, 10, 100, 80);
+
+ tester::apply("s18-r",
+ from_wkt<G>("SEGMENT(100 80, 20 10)"),
+ 20, 10, 100, 80);
+
+ // segment connecting the north and south pole
+ //
+ // this should be forbidden actually, as it is not well-defined
+ // with this test we demonstrate that the algorithm still returns
+ // something meaningful
+ tester::apply("s99",
+ from_wkt<G>("SEGMENT(10 90,20 -90)"),
+ 0, -90, 0, 90);
+
+ // https://svn.boost.org/trac/boost/ticket/12106
+ tester::apply("s100_ticket_12106",
+ G(P(11.488323611111111, 53.687086666666673), P(11.488324166666667, 53.687086666666673)),
+ 11.488323611111111, 53.687086666666673, 11.488324166666667, 53.687086666666673);
+
+ double const heps = eps / 2;
+
+ tester::apply("s101",
+ G(P(1, 1), P(1-heps, 1-heps)),
+ 1-heps, 1-heps, 1, 1);
+ tester::apply("s102",
+ G(P(1, 1), P(1, 1-heps)),
+ 1, 1-heps, 1, 1);
+ tester::apply("s103",
+ G(P(1, 1), P(1-heps, 1)),
+ 1-heps, 1, 1, 1);
+ tester::apply("s104",
+ G(P(2, 1), P(1, 1-heps)),
+ 1, 1-heps, 2, 1.000038070652770505);
+ tester::apply("s105",
+ G(P(1, 2), P(1-heps, 1)),
+ 1-heps, 1, 1, 2);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_segment_spherical_polar )
+{
+ typedef bg::cs::spherical<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::segment<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("s01",
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 40, 40);
+
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(10 80,40 80)"),
+ 10, 90 - 10.345270046149988, 40, 80);
+
+ tester::apply("s03",
+ from_wkt<G>("SEGMENT(160 80,-170 80)"),
+ 160, 90 - 10.34527004614999, 190, 80);
+
+ // segment ending at the north pole
+ tester::apply("s05",
+ from_wkt<G>("SEGMENT(40 45,80 0)"),
+ 40, 0, 40, 45);
+}
+
+
+BOOST_AUTO_TEST_CASE( envelope_segment_spheroid )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::segment<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ double const eps = std::numeric_limits<double>::epsilon();
+
+ tester::apply("s01",
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 40, 40);
+
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 40, 10.347587605817942);
+
+ tester::apply("s02a",
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 10, 10, 40, 10.347587605817942);
+
+ tester::apply("s03",
+ from_wkt<G>("SEGMENT(160 10,-170 10)"),
+ 160, 10, 190, 10.347587605817942);
+
+ tester::apply("s03a",
+ from_wkt<G>("SEGMENT(-170 10,160 10)"),
+ 160, 10, 190, 10.347587605817942);
+
+ tester::apply("s03b",
+ from_wkt<G>("SEGMENT(-170 -10,160 -10)"),
+ 160, -10.347587605817942, 190, -10);
+
+ tester::apply("s04",
+ from_wkt<G>("SEGMENT(-40 45,140 60)"),
+ -40, 45, 140, 90);
+
+ tester::apply("s04a",
+ from_wkt<G>("SEGMENT(-40 45,140 25)"),
+ -40, 25, 140, 90);
+
+ // segment ending at the north pole
+ tester::apply("s05",
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 40, 45, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 40, 45, 40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s06",
+ from_wkt<G>("SEGMENT(-40 45,80 90)"),
+ -40, 45, -40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s06a",
+ from_wkt<G>("SEGMENT(70 90,-40 45)"),
+ -40, 45, -40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s07",
+ from_wkt<G>("SEGMENT(40 -45,80 90)"),
+ 40, -45, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s08",
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 10, -30);
+
+ tester::apply("s09",
+ from_wkt<G>("SEGMENT(1 -45,179 30)"),
+ 1, rng(-85.392785243526134, -85.392785243525253), 179, 30);
+
+ tester::apply("s09a",
+ from_wkt<G>("SEGMENT(2 -45,181 30)"),
+ 2, rng(-87.689300911353811, -87.689300911353371), 181, 30);
+
+ // very long segment
+ tester::apply("s10",
+ from_wkt<G>("SEGMENT(0 -45,181 30)"),
+ -179, rng(-87.689300911353797, -87.689300911353385), 0, 30);
+
+ tester::apply("s11",
+ from_wkt<G>("SEGMENT(260 30,20 45)"),
+ -100, 30, 20, rng(57.990810958016482, 57.990810958016965));
+
+ tester::apply("s11a",
+ from_wkt<G>("SEGMENT(260 45,20 30)"),
+ -100, 30, 20, rng(57.990810958016453, 57.990810958016965));
+
+ // segment degenerating to the north pole
+ tester::apply("s12",
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 0, 90, 0, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s13",
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("s14",
+ from_wkt<G>("SEGMENT(20 20,10 30)"),
+ 10, 20, 20, 30);//48.87458730907602);
+
+ tester::apply("s15",
+ from_wkt<G>("SEGMENT(50 45,185 45)"),
+ 50, 45, 185, rng(69.098479073902851, 69.098479073903178));
+
+ // segment that lies on the equator
+ tester::apply("s16",
+ from_wkt<G>("SEGMENT(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // segment that lies on the equator
+ tester::apply("s16a",
+ from_wkt<G>("SEGMENT(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // segment that lies on the equator and touches antimeridian
+ tester::apply("s16b",
+ from_wkt<G>("SEGMENT(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // segment that lies on the equator and crosses antimeridian
+ tester::apply("s16c",
+ from_wkt<G>("SEGMENT(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ tester::apply("s17",
+ from_wkt<G>("SEGMENT(140 10, -140 80)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s17-r",
+ from_wkt<G>("SEGMENT(-140 80, 140 10)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s18",
+ from_wkt<G>("SEGMENT(20 10, 100 80)"),
+ 20, 10, 100, 80);
+
+ tester::apply("s18-r",
+ from_wkt<G>("SEGMENT(100 80, 20 10)"),
+ 20, 10, 100, 80);
+
+ // segment connecting the north and south pole
+ //
+ // this should be forbidden actually, as it is not well-defined
+ // with this test we demonstrate that the algorithm still returns
+ // something meaningful
+ tester::apply("s99",
+ from_wkt<G>("SEGMENT(10 90,20 -90)"),
+ 0, -90, 0, 90);
+
+ // https://svn.boost.org/trac/boost/ticket/12106
+ tester::apply("s100_ticket_12106",
+ G(P(11.488323611111111, 53.687086666666673), P(11.488324166666667, 53.687086666666673)),
+ 11.488323611111111, 53.687086666666673, 11.488324166666667, 53.687086666666673);
+
+ double const heps = eps / 2;
+
+ tester::apply("s101",
+ G(P(1, 1), P(1-heps, 1-heps)),
+ 1-heps, 1-heps, 1, 1);
+ tester::apply("s102",
+ G(P(1, 1), P(1, 1-heps)),
+ 1, 1-heps, 1, 1);
+ tester::apply("s103",
+ G(P(1, 1), P(1-heps, 1)),
+ 1-heps, 1, 1, 1);
+ tester::apply("s104",
+ G(P(2, 1), P(1, 1-heps)),
+ 1, 1-heps, 2, rng(1.0000383271568751, 1.0000383271569036));
+ tester::apply("s105",
+ G(P(1, 2), P(1-heps, 1)),
+ 1-heps, 1, 1, 2);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_segment_spheroid_with_strategy_thomas )
+{
+
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::segment<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid
+ <
+ G, B,
+ bg::tag<G>::type,
+ test_reverse_geometry<G>::value,
+ bg::strategy::thomas
+ > tester;
+
+ tester::apply("s01",
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 40, 40);
+
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 40, 10.347587605817942);
+
+ tester::apply("s02a",
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 10, 10, 40, 10.347587605817942);
+
+ tester::apply("s03",
+ from_wkt<G>("SEGMENT(160 10,-170 10)"),
+ 160, 10, 190, 10.347587605817942);
+
+ tester::apply("s03a",
+ from_wkt<G>("SEGMENT(-170 10,160 10)"),
+ 160, 10, 190, 10.347587605817942);
+
+ tester::apply("s03b",
+ from_wkt<G>("SEGMENT(-170 -10,160 -10)"),
+ 160, -10.347587605817942, 190, -10);
+
+ tester::apply("s04",
+ from_wkt<G>("SEGMENT(-40 45,140 60)"),
+ -40, 45, 140, 90);
+
+ tester::apply("s04a",
+ from_wkt<G>("SEGMENT(-40 45,140 25)"),
+ -40, 25, 140, 90);
+
+ // segment ending at the north pole
+ tester::apply("s05",
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 40, 45, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 40, 45, 40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s06",
+ from_wkt<G>("SEGMENT(-40 45,80 90)"),
+ -40, 45, -40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s06a",
+ from_wkt<G>("SEGMENT(70 90,-40 45)"),
+ -40, 45, -40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s07",
+ from_wkt<G>("SEGMENT(40 -45,80 90)"),
+ 40, -45, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s08",
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 10, -30);
+
+ tester::apply("s09",
+ from_wkt<G>("SEGMENT(1 -45,179 30)"),
+ 1, rng(-85.392785243526134, -85.392785243525253), 179, 30);
+
+ tester::apply("s09a",
+ from_wkt<G>("SEGMENT(2 -45,181 30)"),
+ 2, rng(-87.689300911353811, -87.689300911353371), 181, 30);
+
+ // very long segment
+ tester::apply("s10",
+ from_wkt<G>("SEGMENT(0 -45,181 30)"),
+ -179, rng(-87.689300911353797, -87.689300911353385), 0, 30);
+
+ tester::apply("s11",
+ from_wkt<G>("SEGMENT(260 30,20 45)"),
+ -100, 30, 20, rng(57.990810958016482, 57.990810958016965));
+
+ tester::apply("s11a",
+ from_wkt<G>("SEGMENT(260 45,20 30)"),
+ -100, 30, 20, rng(57.990810958016453, 57.990810958016965));
+
+ // segment degenerating to the north pole
+ tester::apply("s12",
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 0, 90, 0, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s13",
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("s14",
+ from_wkt<G>("SEGMENT(20 20,10 30)"),
+ 10, 20, 20, 30);//48.87458730907602);
+
+ tester::apply("s15",
+ from_wkt<G>("SEGMENT(50 45,185 45)"),
+ 50, 45, 185, rng(69.098479073902851, 69.098479073903178));
+
+ // segment that lies on the equator
+ tester::apply("s16",
+ from_wkt<G>("SEGMENT(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // segment that lies on the equator
+ tester::apply("s16a",
+ from_wkt<G>("SEGMENT(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // segment that lies on the equator and touches antimeridian
+ tester::apply("s16b",
+ from_wkt<G>("SEGMENT(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // segment that lies on the equator and crosses antimeridian
+ tester::apply("s16c",
+ from_wkt<G>("SEGMENT(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ tester::apply("s17",
+ from_wkt<G>("SEGMENT(140 10, -140 80)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s17-r",
+ from_wkt<G>("SEGMENT(-140 80, 140 10)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s18",
+ from_wkt<G>("SEGMENT(20 10, 100 80)"),
+ 20, 10, 100, 80);
+
+ tester::apply("s18-r",
+ from_wkt<G>("SEGMENT(100 80, 20 10)"),
+ 20, 10, 100, 80);
+
+}
+
+BOOST_AUTO_TEST_CASE( envelope_segment_spheroid_with_strategy_andoyer )
+{
+
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::segment<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid
+ <
+ G, B,
+ bg::tag<G>::type,
+ test_reverse_geometry<G>::value,
+ bg::strategy::andoyer
+ > tester;
+
+ tester::apply("s01",
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 40, 40);
+
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 40, 10.34758709960203);
+
+ tester::apply("s02a",
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 10, 10, 40, 10.34758709960203);
+
+ tester::apply("s03",
+ from_wkt<G>("SEGMENT(160 10,-170 10)"),
+ 160, 10, 190, 10.34758709960203);
+
+ tester::apply("s03a",
+ from_wkt<G>("SEGMENT(-170 10,160 10)"),
+ 160, 10, 190, 10.34758709960203);
+
+ tester::apply("s03b",
+ from_wkt<G>("SEGMENT(-170 -10,160 -10)"),
+ 160, -10.34758709960203, 190, -10);
+
+ tester::apply("s04",
+ from_wkt<G>("SEGMENT(-40 45,140 60)"),
+ -40, 45, 140, 90);
+
+ tester::apply("s04a",
+ from_wkt<G>("SEGMENT(-40 45,140 25)"),
+ -40, 25, 140, 90);
+
+ // segment ending at the north pole
+ tester::apply("s05",
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 40, 45, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 40, 45, 40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s06",
+ from_wkt<G>("SEGMENT(-40 45,80 90)"),
+ -40, 45, -40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s06a",
+ from_wkt<G>("SEGMENT(70 90,-40 45)"),
+ -40, 45, -40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s07",
+ from_wkt<G>("SEGMENT(40 -45,80 90)"),
+ 40, -45, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s08",
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 10, -30);
+
+ tester::apply("s09",
+ from_wkt<G>("SEGMENT(1 -45,179 30)"),
+ 1, rng(-85.394745211091248, -85.394745211090353), 179, 30);
+
+ tester::apply("s09a",
+ from_wkt<G>("SEGMENT(2 -45,181 30)"),
+ 2, rng(-87.690317839849726, -87.690317839849271), 181, 30);
+
+ // very long segment
+ tester::apply("s10",
+ from_wkt<G>("SEGMENT(0 -45,181 30)"),
+ -179, rng(-87.69031783984974, -87.690317839849271), 0, 30);
+
+ tester::apply("s11",
+ from_wkt<G>("SEGMENT(260 30,20 45)"),
+ -100, 30, 20, rng(57.990742552279649, 57.990742552280153));
+
+ tester::apply("s11a",
+ from_wkt<G>("SEGMENT(260 45,20 30)"),
+ -100, 30, 20, rng(57.99074255227962, 57.990742552280118));
+
+ // segment degenerating to the north pole
+ tester::apply("s12",
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 0, 90, 0, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s13",
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("s14",
+ from_wkt<G>("SEGMENT(20 20,10 30)"),
+ 10, 20, 20, 30);//48.87458730907602);
+
+ tester::apply("s15",
+ from_wkt<G>("SEGMENT(50 45,185 45)"),
+ 50, 45, 185, rng(69.098446893408124, 69.09844689340845));
+
+ // segment that lies on the equator
+ tester::apply("s16",
+ from_wkt<G>("SEGMENT(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // segment that lies on the equator
+ tester::apply("s16a",
+ from_wkt<G>("SEGMENT(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // segment that lies on the equator and touches antimeridian
+ tester::apply("s16b",
+ from_wkt<G>("SEGMENT(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // segment that lies on the equator and crosses antimeridian
+ tester::apply("s16c",
+ from_wkt<G>("SEGMENT(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ tester::apply("s17",
+ from_wkt<G>("SEGMENT(140 10, -140 80)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s17-r",
+ from_wkt<G>("SEGMENT(-140 80, 140 10)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s18",
+ from_wkt<G>("SEGMENT(20 10, 100 80)"),
+ 20, 10, 100, 80);
+
+ tester::apply("s18-r",
+ from_wkt<G>("SEGMENT(100 80, 20 10)"),
+ 20, 10, 100, 80);
+
+ // segments intersecting pole
+ tester::apply("s19",
+ from_wkt<G>("SEGMENT(0 0, 180 0)"),
+ 0, 0, 180, 90);
+ tester::apply("s20",
+ from_wkt<G>("SEGMENT(0 0, -180 0)"),
+ 0, 0, 180, 90);
+ tester::apply("s21",
+ from_wkt<G>("SEGMENT(0 1, 180 1)"),
+ 0, 1, 180, 90,
+ std::numeric_limits<double>::epsilon() * 10);
+ tester::apply("s22",
+ from_wkt<G>("SEGMENT(0 -1, 180 -1)"),
+ 0, -90, 180, -1,
+ std::numeric_limits<double>::epsilon() * 10);
+
+}
+
+BOOST_AUTO_TEST_CASE( envelope_segment_spheroid_with_strategy_vincenty )
+{
+
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::segment<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid
+ <
+ G, B,
+ bg::tag<G>::type,
+ test_reverse_geometry<G>::value,
+ bg::strategy::vincenty
+ > tester;
+
+ tester::apply("s01",
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 40, 40);
+
+ tester::apply("s02",
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 40, rng(10.347587628821937, 10.347587628821941));
+
+ tester::apply("s02a",
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 10, 10, 40, rng(10.347587628821937, 10.347587628821941));
+
+ tester::apply("s03",
+ from_wkt<G>("SEGMENT(160 10,-170 10)"),
+ 160, 10, 190, rng(10.347587628821937, 10.347587628821941));
+
+ tester::apply("s03a",
+ from_wkt<G>("SEGMENT(-170 10,160 10)"),
+ 160, 10, 190, rng(10.347587628821937, 10.347587628821941));
+
+ tester::apply("s03b",
+ from_wkt<G>("SEGMENT(-170 -10,160 -10)"),
+ 160, rng(-10.347587628821941, -10.347587628821937), 190, -10);
+
+ tester::apply("s04",
+ from_wkt<G>("SEGMENT(-40 45,140 60)"),
+ -40, 45, 140, 90);
+
+ tester::apply("s04a",
+ from_wkt<G>("SEGMENT(-40 45,140 25)"),
+ -40, 25, 140, 90);
+
+ // segment ending at the north pole
+ tester::apply("s05",
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 40, 45, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 40, 45, 40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s06",
+ from_wkt<G>("SEGMENT(-40 45,80 90)"),
+ -40, 45, -40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s06a",
+ from_wkt<G>("SEGMENT(70 90,-40 45)"),
+ -40, 45, -40, 90);
+
+ // segment ending at the north pole
+ tester::apply("s07",
+ from_wkt<G>("SEGMENT(40 -45,80 90)"),
+ 40, -45, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s08",
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 10, -30);
+
+ tester::apply("s09",
+ from_wkt<G>("SEGMENT(1 -45,179 30)"),
+ 1, rng(-85.392840929577218, -85.392840929576352), 179, 30);
+
+ tester::apply("s09a",
+ from_wkt<G>("SEGMENT(2 -45,181 30)"),
+ 2, rng(-87.689330275867817, -87.689330275867405), 181, 30);
+
+ // very long segment
+ tester::apply("s10",
+ from_wkt<G>("SEGMENT(0 -45,181 30)"),
+ -179, rng(-87.689330275867832, -87.689330275867405), 0, 30);
+
+ tester::apply("s11",
+ from_wkt<G>("SEGMENT(260 30,20 45)"),
+ -100, 30, 20, rng(57.990810647056549, 57.990810647057032));
+
+ tester::apply("s11a",
+ from_wkt<G>("SEGMENT(260 45,20 30)"),
+ -100, 30, 20, rng(57.990810647056541, 57.990810647057032));
+
+ // segment degenerating to the north pole
+ tester::apply("s12",
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 0, 90, 0, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s13",
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 0, -90, 0, -90);
+
+ tester::apply("s14",
+ from_wkt<G>("SEGMENT(20 20,10 30)"),
+ 10, 20, 20, 30);//48.87458730907602);
+
+ tester::apply("s15",
+ from_wkt<G>("SEGMENT(50 45,185 45)"),
+ 50, 45, 185, rng(69.098479136978156, 69.098479136978497));
+
+ // segment that lies on the equator
+ tester::apply("s16",
+ from_wkt<G>("SEGMENT(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // segment that lies on the equator
+ tester::apply("s16a",
+ from_wkt<G>("SEGMENT(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // segment that lies on the equator and touches antimeridian
+ tester::apply("s16b",
+ from_wkt<G>("SEGMENT(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // segment that lies on the equator and crosses antimeridian
+ tester::apply("s16c",
+ from_wkt<G>("SEGMENT(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ tester::apply("s17",
+ from_wkt<G>("SEGMENT(140 10, -140 80)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s17-r",
+ from_wkt<G>("SEGMENT(-140 80, 140 10)"),
+ 140, 10, 220, 80);
+
+ tester::apply("s18",
+ from_wkt<G>("SEGMENT(20 10, 100 80)"),
+ 20, 10, 100, 80);
+
+ tester::apply("s18-r",
+ from_wkt<G>("SEGMENT(100 80, 20 10)"),
+ 20, 10, 100, 80);
+
+}
+
+BOOST_AUTO_TEST_CASE( envelope_segment_sphere_with_height )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::segment<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("sh01",
+ from_wkt<G>("SEGMENT(10 10 567,40 40 1356)"),
+ 10, 10, 567, 40, 40, 1356);
+
+ tester::apply("sh02",
+ from_wkt<G>("SEGMENT(10 10 1356,40 40 567)"),
+ 10, 10, 567, 40, 40, 1356);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_segment_spheroid_with_height )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::segment<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("sh01",
+ from_wkt<G>("SEGMENT(10 10 567,40 40 1356)"),
+ 10, 10, 567, 40, 40, 1356);
+
+ tester::apply("sh02",
+ from_wkt<G>("SEGMENT(10 10 1356,40 40 567)"),
+ 10, 10, 567, 40, 40, 1356);
+}
+
+template <typename CoordinateSystem>
+void test_envelope_multipoint()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> P;
+ typedef bg::model::multi_point<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty multipoint
+ test_empty_geometry<CoordinateSystem, G>("mp00", "MULTIPOINT()");
+
+ tester::apply("mp01",
+ from_wkt<G>("MULTIPOINT(0 0,10 10)"),
+ 0, 0, 10, 10);
+
+ tester::apply("mp02",
+ from_wkt<G>("MULTIPOINT(0 10,10 0)"),
+ 0, 0, 10, 10);
+
+ tester::apply("mp03",
+ from_wkt<G>("MULTIPOINT(-10 20,0 10,10 0)"),
+ -10, 0, 10, 20);
+
+ tester::apply("mp04",
+ from_wkt<G>("MULTIPOINT(-10 20,0 10,10 -15)"),
+ -10, -15, 10, 20);
+
+ tester::apply("mp05",
+ from_wkt<G>("MULTIPOINT(-85 10,85 -20)"),
+ -85, -20, 85, 10);
+
+ tester::apply("mp06",
+ from_wkt<G>("MULTIPOINT(-95 10,85 -20)"),
+ -95, -20, 85, 10);
+
+ tester::apply("mp07",
+ from_wkt<G>("MULTIPOINT(-96 10,85 -20)"),
+ 85, -20, -96+360, 10);
+
+ tester::apply("mp08",
+ from_wkt<G>("MULTIPOINT(175 15,-175 -20)"),
+ 175, -20, -175+360, 15);
+
+ tester::apply("mp09",
+ from_wkt<G>("MULTIPOINT(170 15,170 20,-175 10,-90 10,10 10)"),
+ 170, 10, 10+360, 20);
+
+ // this should fail
+ tester::apply("mp09a",
+ from_wkt<G>("MULTIPOINT(10 10,170 15,170 20,-175 10,-90 10)"),
+ 170, 10, 10+360, 20);
+
+
+ tester::apply("mp10",
+ from_wkt<G>("MULTIPOINT(10 10,20 90,30 -90)"),
+ 10, -90, 10, 90);
+
+ // this should fail
+ tester::apply("mp11",
+ from_wkt<G>("MULTIPOINT(179 90,-179 -90,10 10)"),
+ 10, -90, 10, 90);
+
+ tester::apply("mp11a",
+ from_wkt<G>("MULTIPOINT(10 10,179 90,-179 -90)"),
+ 10, -90, 10, 90);
+
+ // this should fail
+ tester::apply("mp11b",
+ from_wkt<G>("MULTIPOINT(179 90,-179 -90,-90 0)"),
+ -90, -90, -90, 90);
+
+ tester::apply("mp11c",
+ from_wkt<G>("MULTIPOINT(-90 0,179 90,-179 -90,-90 0)"),
+ -90, -90, -90, 90);
+
+ tester::apply("mp12",
+ from_wkt<G>("MULTIPOINT(170 -30,175 60,-178 10)"),
+ 170, -30, -178+360, 60);
+
+ tester::apply("mp13",
+ from_wkt<G>("MULTIPOINT(-170 -30,-175 40,178 50)"),
+ 178, -30, -170+360, 50);
+
+ tester::apply("mp13a",
+ from_wkt<G>("MULTIPOINT(-170 -30,178 50)"),
+ 178, -30, -170+360, 50);
+
+ tester::apply("mp13b",
+ from_wkt<G>("MULTIPOINT(-170 -30,178 50,-175 40)"),
+ 178, -30, -170+360, 50);
+
+ tester::apply("mp15",
+ from_wkt<G>("MULTIPOINT(10 -20)"),
+ 10, -20, 10, -20);
+
+ tester::apply("mp16",
+ from_wkt<G>("MULTIPOINT(0 90,10 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("mp17",
+ from_wkt<G>("MULTIPOINT(179 80,-179 -80,10 10)"),
+ 10, -80, -179+360, 80);
+
+ tester::apply("mp17a",
+ from_wkt<G>("MULTIPOINT(10 10,179 80,-179 -80)"),
+ 10, -80, -179+360, 80);
+
+ tester::apply("mp17b",
+ from_wkt<G>("MULTIPOINT(179 80,-179 -80,-90 0)"),
+ 179, -80, -90+360, 80);
+
+ tester::apply("mp17c",
+ from_wkt<G>("MULTIPOINT(-90 0,179 80,-179 -80,-90 0)"),
+ 179, -80, -90+360, 80);
+
+ tester::apply("mp18",
+ from_wkt<G>("MULTIPOINT(-170 45,20 25,40 40)"),
+ 20, 25, 190, 45);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ tester::apply("mp18a",
+ from_wkt<G>("MULTIPOINT(10 135,20 25,40 40)"),
+ 20, 25, 190, 45);
+#endif
+
+ tester::apply("mp19",
+ from_wkt<G>("MULTIPOINT(350 45,20 25,40 40)"),
+ -10, 25, 40, 45);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ tester::apply("mp19a",
+ from_wkt<G>("MULTIPOINT(170 135,20 25,40 40)"),
+ -10, 25, 40, 45);
+#endif
+
+ double eps = std::numeric_limits<double>::epsilon();
+ double heps = eps / 2;
+ {
+ G mp;
+ mp.push_back(P(1, 1));
+ mp.push_back(P(1-heps, 1-heps));
+ tester::apply("mp20", mp, 1-heps, 1-heps, 1, 1);
+ }
+}
+
+BOOST_AUTO_TEST_CASE( envelope_multipoint )
+{
+ test_envelope_multipoint<bg::cs::spherical_equatorial<bg::degree> >();
+ test_envelope_multipoint<bg::cs::geographic<bg::degree> >();
+}
+
+
+template <typename CoordinateSystem>
+void test_envelope_multipoint_with_height()
+{
+ typedef bg::model::point<double, 3, CoordinateSystem> point_type;
+ typedef bg::model::multi_point<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty multipoint
+ test_empty_geometry<CoordinateSystem, G>("mph00", "MULTIPOINT()");
+
+ tester::apply("mph01",
+ from_wkt<G>("MULTIPOINT(0 0 567,10 10 1456)"),
+ 0, 0, 567, 10, 10, 1456);
+
+ tester::apply("mph02",
+ from_wkt<G>("MULTIPOINT(0 0 567,10 10 1456,20 90 967)"),
+ 0, 0, 567, 10, 90, 1456);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_multipoint_with_height )
+{
+ test_envelope_multipoint_with_height
+ <
+ bg::cs::spherical_equatorial<bg::degree>
+ >();
+ test_envelope_multipoint_with_height<bg::cs::geographic<bg::degree> >();
+}
+
+
+template <typename CoordinateSystem>
+void test_envelope_box()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> P;
+ typedef bg::model::box<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("b01",
+ from_wkt<G>("BOX(10 10,20 20)"),
+ 10, 10, 20, 20);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ tester::apply("b02",
+ from_wkt<G>("BOX(10 370,20 20)"),
+ 10, 10, 20, 20);
+#endif
+
+ // box crosses anti-meridian
+ tester::apply("b02a",
+ from_wkt<G>("BOX(170 10,-170 20)"),
+ 170, 10, 190, 20);
+
+ tester::apply("b03",
+ from_wkt<G>("BOX(-170 10,170 20)"),
+ -170, 10, 170, 20);
+
+ tester::apply("b04",
+ from_wkt<G>("BOX(10 10,350 20)"),
+ 10, 10, 350, 20);
+
+ tester::apply("b04a",
+ from_wkt<G>("BOX(10 10,-10 20)"),
+ 10, 10, 350, 20);
+
+ // box is a band
+ tester::apply("b05",
+ from_wkt<G>("BOX(0 10,360 20)"),
+ -180, 10, 180, 20);
+
+ tester::apply("b05a",
+ from_wkt<G>("BOX(0 10,0 20)"),
+ 0, 10, 0, 20);
+
+ // box is almost a band
+ tester::apply("b06",
+ from_wkt<G>("BOX(10 10,5 20)"),
+ 10, 10, 365, 20);
+
+ // initial box is a band that crosses itself
+ tester::apply("b07",
+ from_wkt<G>("BOX(0 10,540 20)"),
+ -180, 10, 180, 20);
+
+ // initial box is a band that crosses itself
+ tester::apply("b08",
+ from_wkt<G>("BOX(0 10,720 20)"),
+ -180, 10, 180, 20);
+
+ tester::apply("b09",
+ from_wkt<G>("BOX(10 10,10 10)"),
+ 10, 10, 10, 10);
+
+ tester::apply("b09a",
+ from_wkt<G>("BOX(370 10,370 10)"),
+ 10, 10, 10, 10);
+
+ // box contains north and south pole
+ tester::apply("b10",
+ from_wkt<G>("BOX(0 -90,0 90)"),
+ 0, -90, 0, 90);
+
+ // box contains north and south pole
+ tester::apply("b10a",
+ from_wkt<G>("BOX(10 -90,10 90)"),
+ 10, -90, 10, 90);
+
+ // box contains north and south pole
+ tester::apply("b10b",
+ from_wkt<G>("BOX(0 -90,10 90)"),
+ 0, -90, 10, 90);
+
+ // box contains north and south pole
+ tester::apply("b11",
+ from_wkt<G>("BOX(0 -90,180 90)"),
+ 0, -90, 180, 90);
+
+ // box contains north and south pole
+ tester::apply("b11a",
+ from_wkt<G>("BOX(10 -90,190 90)"),
+ 10, -90, 190, 90);
+
+ // box contains north and south pole
+ tester::apply("b11b",
+ from_wkt<G>("BOX(10 -90,110 90)"),
+ 10, -90, 110, 90);
+
+ // box contains north and south pole and is a band
+ // (box covers the entire spheroid)
+ tester::apply("b12",
+ from_wkt<G>("BOX(0 -90,360 90)"),
+ -180, -90, 180, 90);
+
+ // box contains north and south pole and is a band
+ // (box covers the entire spheroid)
+ tester::apply("b12a",
+ from_wkt<G>("BOX(10 -90,370 90)"),
+ -180, -90, 180, 90);
+
+ // box contains north and south pole and is a band
+ // (box covers the entire spheroid)
+ tester::apply("b12b",
+ from_wkt<G>("BOX(-175 -90,185 90)"),
+ -180, -90, 180, 90);
+
+ // box contains north and south pole and is a band
+ // (box covers the entire spheroid)
+ tester::apply("b12c",
+ from_wkt<G>("BOX(-175 -90,185 90)"),
+ -180, -90, 180, 90);
+
+ // box contains north and south pole and is a band and is self-intersecting
+ // (box covers the entire spheroid)
+ tester::apply("b12d",
+ from_wkt<G>("BOX(-175 -90,186 90)"),
+ -180, -90, 180, 90);
+
+ // box contains north and south pole and is a band and is self-intersecting
+ // (box covers the entire spheroid)
+ tester::apply("b12e",
+ from_wkt<G>("BOX(0 -90,540 90)"),
+ -180, -90, 180, 90);
+
+ // box contains north and south pole and is a band and is self-intersecting
+ // (box covers the entire spheroid)
+ tester::apply("b12f",
+ from_wkt<G>("BOX(10 -90,540 90)"),
+ -180, -90, 180, 90);
+
+ // box is a band
+ tester::apply("b13",
+ from_wkt<G>("BOX(180 -10,-180 10)"),
+ -180, -10, 180, 10);
+
+ // box contains north and south pole and is a band
+ // (box covers the entire spheroid)
+ tester::apply("b13a",
+ from_wkt<G>("BOX(180 -90,-180 90)"),
+ -180, -90, 180, 90);
+
+ tester::apply("b14",
+ from_wkt<G>("BOX(0 10,30 90)"),
+ 0, 10, 30, 90);
+
+ tester::apply("b15",
+ from_wkt<G>("BOX(179 10,178 70)"),
+ 179, 10, 538, 70);
+
+ // box contains north pole
+ tester::apply("b16",
+ from_wkt<G>("BOX(10 40,20 90)"),
+ 10, 40, 20, 90);
+
+ tester::apply("b16a",
+ from_wkt<G>("BOX(170 40,-170 90)"),
+ 170, 40, 190, 90);
+
+ // box contains south pole
+ tester::apply("b17",
+ from_wkt<G>("BOX(10 -90,20 40)"),
+ 10, -90, 20, 40);
+
+ tester::apply("b17a",
+ from_wkt<G>("BOX(150 -90,-150 40)"),
+ 150, -90, 210, 40);
+
+ // box degenerates to the north pole
+ tester::apply("b98",
+ from_wkt<G>("BOX(10 90,20 90)"),
+ 0, 90, 0, 90);
+
+ // box degenerates to the south pole
+ tester::apply("b99",
+ from_wkt<G>("BOX(10 -90,20 -90)"),
+ 0, -90, 0, -90);
+
+ double eps = std::numeric_limits<double>::epsilon();
+ double heps = eps / 2;
+
+ tester::apply("b100", G(P(1-heps, 1-heps), P(1, 1)), 1-heps, 1-heps, 1, 1);
+}
+
+template <typename CoordinateSystem>
+void test_envelope_box_polar()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> P;
+ typedef bg::model::box<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("b01",
+ from_wkt<G>("BOX(10 10,20 20)"),
+ 10, 10, 20, 20);
+
+ tester::apply("b02a",
+ from_wkt<G>("BOX(170 10,-170 20)"),
+ 170, 10, 190, 20);
+
+ tester::apply("b10b",
+ from_wkt<G>("BOX(0 0,10 180)"),
+ 0, 0, 10, 180);
+
+ tester::apply("b16a",
+ from_wkt<G>("BOX(170 40,-170 180)"),
+ 170, 40, 190, 180);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_box )
+{
+ test_envelope_box<bg::cs::spherical_equatorial<bg::degree> >();
+ test_envelope_box<bg::cs::geographic<bg::degree> >();
+ test_envelope_box_polar<bg::cs::spherical<bg::degree> >();
+}
+
+
+template <typename CoordinateSystem>
+void test_envelope_box_with_height()
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::box<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("bh01",
+ from_wkt<G>("BOX(10 10 567,20 20 2834)"),
+ 10, 10, 567, 20, 20, 2834);
+
+ tester::apply("bh02",
+ from_wkt<G>("BOX(10 10 567,20 20 567)"),
+ 10, 10, 567, 20, 20, 567);
+
+ tester::apply("bh03",
+ from_wkt<G>("BOX(0 10 567,170 90 1567)"),
+ 0, 10, 567, 170, 90, 1567);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_box_with_height )
+{
+ test_envelope_box_with_height<bg::cs::spherical_equatorial<bg::degree> >();
+ test_envelope_box_with_height<bg::cs::geographic<bg::degree> >();
+}
+
+
+BOOST_AUTO_TEST_CASE( envelope_sphere_linestring )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::linestring<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty linestring
+ test_empty_geometry<coordinate_system_type, G>("l00", "LINESTRING()");
+
+ tester::apply("l01",
+ from_wkt<G>("LINESTRING(10 15)"),
+ 10, 15, 10, 15);
+
+ tester::apply("l01a",
+ from_wkt<G>("LINESTRING(370 15)"),
+ 10, 15, 10, 15);
+
+ tester::apply("l01b",
+ from_wkt<G>("LINESTRING(370 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("l02",
+ from_wkt<G>("LINESTRING(10 10,20 20,10 30)"),
+ 10, 10, 20, 30);
+
+ // linestring that circles the entire globe
+ tester::apply("l03",
+ from_wkt<G>("LINESTRING(-185 0,-170 25,-50 10,10 10,20 20,100 5,180 15)"),
+ -180, 0, 180, 33.587539971516854,
+ 4.0 * std::numeric_limits<double>::epsilon());
+
+ // linestring that crosses the antimeridian but staying close to it
+ tester::apply("l04",
+ from_wkt<G>("LINESTRING(-170 10,170 45,160 5,-160 25)"),
+ 160, 5, 200, 45);
+
+ // linestring that goes through the north pole (twice)
+ tester::apply("l05",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30)"),
+ -170, 30, 20, 90);
+
+ // linestring that goes through the north pole (three times)
+ tester::apply("l05a",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70)"),
+ -170, 30, 30, 90);
+
+ // linestring that goes through the north pole (four times)
+ tester::apply("l05b",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70,40 85,-140 25)"),
+ -170, 25, 40, 90);
+
+ // linestring that goes through the north pole (five times)
+ tester::apply("l05c",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70,40 85,-140 25,-130 25,50 45)"),
+ -170, 25, 50, 90);
+
+ // linestring that goes through the north pole (five times)
+ tester::apply("l05d",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70,40 85,-140 25,-130 25,50 45,185 45)"),
+ -170, 25, 185, 90);
+
+ // linestring that crosses the antimeridian
+ tester::apply("l06",
+ from_wkt<G>("LINESTRING(-160 85,-170 80,170 40,160 80)"),
+ 160, 40, 200, 85);
+
+ // linestring that crosses the antimeridian
+ tester::apply("l06a",
+ from_wkt<G>("LINESTRING(-130 85,-170 84,170 40,160 80)"),
+ 160, 40, 230, 85.02629680862029);
+
+ // linestring that goes through the north pole
+ tester::apply("l07",
+ from_wkt<G>("LINESTRING(-160 40,-170 90,-140 40,-50 30)"),
+ -160, 30, -50, 90);
+
+ // linestring that degenerates to the north pole
+ tester::apply("l08",
+ from_wkt<G>("LINESTRING(-40 90,-30 90,-140 90,10 90)"),
+ 0, 90, 0, 90);
+
+ // linestring with duplicate points
+ tester::apply("l09",
+ from_wkt<G>("LINESTRING(-40 20,-40 20,-140 85,-10 5,-10 5)"),
+ -140, 5, -10, 86.184540574427757);
+
+ // linestring with duplicate points
+ tester::apply("l09a",
+ from_wkt<G>("LINESTRING(-40 20,320 20,-140 85,-10 5,350 5)"),
+ -140, 5, -10, 86.184540574427757);
+
+ // linestring that lies on the equator
+ tester::apply("l10",
+ from_wkt<G>("LINESTRING(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // linestring that lies on the equator
+ tester::apply("l10a",
+ from_wkt<G>("LINESTRING(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // linestring that lies on the equator and touches antimeridian
+ tester::apply("l10b",
+ from_wkt<G>("LINESTRING(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // linestring that lies on the equator and crosses antimeridian
+ tester::apply("l10c",
+ from_wkt<G>("LINESTRING(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ double eps = std::numeric_limits<double>::epsilon();
+ double heps = eps / 2;
+
+ {
+ G l;
+ l.push_back(P(1, 1));
+ l.push_back(P(1-heps, 1-heps));
+ tester::apply("l11", l, 1-heps, 1-heps, 1, 1);
+ }
+
+ {
+ G l;
+ l.push_back(P(0, 0));
+ l.push_back(P(1-heps, 1-heps));
+ l.push_back(P(0, 0));
+ l.push_back(P(1, 1));
+ tester::apply("l12", l, 0, 0, 1, 1);
+ }
+}
+
+BOOST_AUTO_TEST_CASE( envelope_spheroid_linestring )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> P;
+ typedef bg::model::linestring<P> G;
+ typedef bg::model::box<P> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty linestring
+ test_empty_geometry<coordinate_system_type, G>("l00", "LINESTRING()");
+
+ tester::apply("l01",
+ from_wkt<G>("LINESTRING(10 15)"),
+ 10, 15, 10, 15);
+
+ tester::apply("l01a",
+ from_wkt<G>("LINESTRING(370 15)"),
+ 10, 15, 10, 15);
+
+ tester::apply("l01b",
+ from_wkt<G>("LINESTRING(370 90)"),
+ 0, 90, 0, 90);
+
+ tester::apply("l02",
+ from_wkt<G>("LINESTRING(10 10,20 20,10 30)"),
+ 10, 10, 20, 30);
+
+ // linestring that circles the entire globe
+ tester::apply("l03",
+ from_wkt<G>("LINESTRING(-185 0,-170 25,-50 10,10 10,20 20,100 5,180 15)"),
+ -180, 0, 180, rng(33.702476580412359, 33.702476580413318));
+
+ // linestring that crosses the antimeridian but staying close to it
+ tester::apply("l04",
+ from_wkt<G>("LINESTRING(-170 10,170 45,160 5,-160 25)"),
+ 160, 5, 200, 45);
+
+ // linestring that goes through the north pole (twice)
+ tester::apply("l05",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30)"),
+ -170, 30, 20, 90);
+
+ // linestring that goes through the north pole (three times)
+ tester::apply("l05a",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70)"),
+ -170, 30, 30, 90);
+
+ // linestring that goes through the north pole (four times)
+ tester::apply("l05b",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70,40 85,-140 25)"),
+ -170, 25, 40, 90);
+
+ // linestring that goes through the north pole (five times)
+ tester::apply("l05c",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70,40 85,-140 25,-130 25,50 45)"),
+ -170, 25, 50, 90);
+
+ // linestring that goes through the north pole (five times)
+ tester::apply("l05d",
+ from_wkt<G>("LINESTRING(-170 80,10 60,20 80,-160 30,-150 30,30 70,40 85,-140 25,-130 25,50 45,185 45)"),
+ -170, 25, 185, 90);
+
+ // linestring that crosses the antimeridian
+ tester::apply("l06",
+ from_wkt<G>("LINESTRING(-160 85,-170 80,170 40,160 80)"),
+ 160, 40, 200, 85);
+
+ // linestring that crosses the antimeridian
+ tester::apply("l06a",
+ from_wkt<G>("LINESTRING(-130 85,-170 84,170 40,160 80)"),
+ 160, 40, 230, 85.02630556315151);
+
+ // linestring that goes through the north pole
+ tester::apply("l07",
+ from_wkt<G>("LINESTRING(-160 40,-170 90,-140 40,-50 30)"),
+ -160, 30, -50, 90);
+
+ // linestring that degenerates to the north pole
+ tester::apply("l08",
+ from_wkt<G>("LINESTRING(-40 90,-30 90,-140 90,10 90)"),
+ 0, 90, 0, 90);
+
+ // linestring with duplicate points
+ tester::apply("l09",
+ from_wkt<G>("LINESTRING(-40 20,-40 20,-140 85,-10 5,-10 5)"),
+ -140, 5, -10, 86.18564770636192);
+
+ // linestring with duplicate points
+ tester::apply("l09a",
+ from_wkt<G>("LINESTRING(-40 20,320 20,-140 85,-10 5,350 5)"),
+ -140, 5, -10, 86.18564770636192);
+
+ // linestring that lies on the equator
+ tester::apply("l10",
+ from_wkt<G>("LINESTRING(0 0,50 0)"),
+ 0, 0, 50, 0);
+
+ // linestring that lies on the equator
+ tester::apply("l10a",
+ from_wkt<G>("LINESTRING(-50 0,50 0)"),
+ -50, 0, 50, 0);
+
+ // linestring that lies on the equator and touches antimeridian
+ tester::apply("l10b",
+ from_wkt<G>("LINESTRING(50 0,180 0)"),
+ 50, 0, 180, 0);
+
+ // linestring that lies on the equator and crosses antimeridian
+ tester::apply("l10c",
+ from_wkt<G>("LINESTRING(-170 0,160 0)"),
+ 160, 0, 190, 0);
+
+ double eps = std::numeric_limits<double>::epsilon();
+ double heps = eps / 2;
+
+ {
+ G l;
+ l.push_back(P(1, 1));
+ l.push_back(P(1-heps, 1-heps));
+ tester::apply("l11", l, 1-heps, 1-heps, 1, 1);
+ }
+
+ {
+ G l;
+ l.push_back(P(0, 0));
+ l.push_back(P(1-heps, 1-heps));
+ l.push_back(P(0, 0));
+ l.push_back(P(1, 1));
+ tester::apply("l12", l, 0, 0, 1, 1);
+ }
+}
+
+
+BOOST_AUTO_TEST_CASE( envelope_linestring_sphere_with_height )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::linestring<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty linestring
+ test_empty_geometry<coordinate_system_type, G>("lh00", "LINESTRING()");
+
+ tester::apply("lh01",
+ from_wkt<G>("LINESTRING(10 15 30,20 25 434,30 35 186)"),
+ 10, 15, 30, 30, 35, 434);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_linestring_spheroid_with_height )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::linestring<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty linestring
+ test_empty_geometry<coordinate_system_type, G>("lh00", "LINESTRING()");
+
+ tester::apply("lh01",
+ from_wkt<G>("LINESTRING(10 15 30,20 25 434,30 35 186)"),
+ 10, 15, 30, 30, 35, 434);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_sphere_multilinestring )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::multi_linestring<bg::model::linestring<point_type> > G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty multilinestring
+ test_empty_geometry<coordinate_system_type, G>("ml00", "MULTILINESTRING()");
+
+ // invalid multilinestring
+ test_empty_geometry<coordinate_system_type, G>("ml00a",
+ "MULTILINESTRING(())");
+
+ // invalid multilinestring
+ test_empty_geometry<coordinate_system_type, G>("ml00b",
+ "MULTILINESTRING((),())");
+
+ // invalid multilinestring
+ tester::apply("ml00c",
+ from_wkt<G>("MULTILINESTRING((10 15),(),())"),
+ 10, 15, 10, 15);
+
+ // invalid multilinestring
+ tester::apply("ml00d",
+ from_wkt<G>("MULTILINESTRING((),(10 15),())"),
+ 10, 15, 10, 15);
+
+ tester::apply("ml01",
+ from_wkt<G>("MULTILINESTRING((10 15))"),
+ 10, 15, 10, 15);
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ tester::apply("ml01a",
+ from_wkt<G>("MULTILINESTRING((),(),(10 15),())"),
+ 10, 15, 10, 15);
+#endif
+
+ tester::apply("ml02",
+ from_wkt<G>("MULTILINESTRING((-170 40,-100 80,10 40),(-10 25,10 35,100 45),(50 30,150 45,-160 30))"),
+ -180, 25, 180, 81.113793608034072);
+
+ tester::apply("ml03",
+ from_wkt<G>("MULTILINESTRING((-150 40,-100 80,10 40),(-10 25,10 35,100 45),(50 30,150 45,-160 30))"),
+ -150, 25, 200, 81.113793608034072);
+
+ tester::apply("ml04",
+ from_wkt<G>("MULTILINESTRING((-150 40,-100 80),(10 35,100 80))"),
+ -150, 35, 100, 80.07385383411011);
+
+ tester::apply("ml04a",
+ from_wkt<G>("MULTILINESTRING((-150 40,-100 80),(10 35,100 80),(170 25,-160 80))"),
+ 10, 25, 260, 80.07385383411011);
+
+ tester::apply("ml05",
+ from_wkt<G>("MULTILINESTRING((-140 40,-100 80),(10 35,100 80))"),
+ -140, 35, 100, 80.07385383411011);
+
+ tester::apply("ml05a",
+ from_wkt<G>("MULTILINESTRING((-140 40,-100 80),(10 35,100 80),(170 25,-160 80))"),
+ 10, 25, 260, 80.07385383411011);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_spheroid_multilinestring )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::multi_linestring<bg::model::linestring<point_type> > G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ // empty multilinestring
+ test_empty_geometry<coordinate_system_type, G>("ml00", "MULTILINESTRING()");
+
+ // invalid multilinestring
+ test_empty_geometry<coordinate_system_type, G>("ml00a",
+ "MULTILINESTRING(())");
+
+ // invalid multilinestring
+ test_empty_geometry<coordinate_system_type, G>("ml00b",
+ "MULTILINESTRING((),())");
+
+ // invalid multilinestring
+ tester::apply("ml00c",
+ from_wkt<G>("MULTILINESTRING((10 15),(),())"),
+ 10, 15, 10, 15);
+
+ // invalid multilinestring
+ tester::apply("ml00d",
+ from_wkt<G>("MULTILINESTRING((),(10 15),())"),
+ 10, 15, 10, 15);
+
+ tester::apply("ml01",
+ from_wkt<G>("MULTILINESTRING((10 15))"),
+ 10, 15, 10, 15);
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ tester::apply("ml01a",
+ from_wkt<G>("MULTILINESTRING((),(),(10 15),())"),
+ 10, 15, 10, 15);
+#endif
+
+ tester::apply("ml02",
+ from_wkt<G>("MULTILINESTRING((-170 40,-100 80,10 40),(-10 25,10 35,100 45),(50 30,150 45,-160 30))"),
+ -180, 25, 180, 81.115885076701147);
+
+ tester::apply("ml03",
+ from_wkt<G>("MULTILINESTRING((-150 40,-100 80,10 40),(-10 25,10 35,100 45),(50 30,150 45,-160 30))"),
+ -150, 25, 200, 81.115885076701147);
+
+ tester::apply("ml04",
+ from_wkt<G>("MULTILINESTRING((-150 40,-100 80),(10 35,100 80))"),
+ -150, 35, 100, rng(80.07385383411011, 80.082544902477267));
+
+ tester::apply("ml04a",
+ from_wkt<G>("MULTILINESTRING((-150 40,-100 80),(10 35,100 80),(170 25,-160 80))"),
+ 10, 25, 260, rng(80.07385383411011, 80.082544902477267));
+
+ tester::apply("ml05",
+ from_wkt<G>("MULTILINESTRING((-140 40,-100 80),(10 35,100 80))"),
+ -140, 35, 100, rng(80.07385383411011, 80.082544902477267));
+
+ tester::apply("ml05a",
+ from_wkt<G>("MULTILINESTRING((-140 40,-100 80),(10 35,100 80),(170 25,-160 80))"),
+ 10, 25, 260, rng(80.07385383411011, 80.082544902477267));
+}
+
+
+BOOST_AUTO_TEST_CASE( envelope_multilinestring_sphere_with_height )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::multi_linestring<bg::model::linestring<point_type> > G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("mlh01",
+ from_wkt<G>("MULTILINESTRING((10 15 1000))"),
+ 10, 15, 1000, 10, 15, 1000);
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ tester::apply("mlh01a",
+ from_wkt<G>("MULTILINESTRING((),(),(10 15 1000),())"),
+ 10, 15, 1000, 10, 15, 1000);
+#endif
+
+ tester::apply("mlh02",
+ from_wkt<G>("MULTILINESTRING((-170 40 400,-100 80 300),(-10 25 600,10 35 700,120 45 450))"),
+ -10, 25, 300, 260, 80, 700);
+}
+
+BOOST_AUTO_TEST_CASE( envelope_multilinestring_spheroid_with_height )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::multi_linestring<bg::model::linestring<point_type> > G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ tester::apply("mlh01",
+ from_wkt<G>("MULTILINESTRING((10 15 1000))"),
+ 10, 15, 1000, 10, 15, 1000);
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ tester::apply("mlh01a",
+ from_wkt<G>("MULTILINESTRING((),(),(10 15 1000),())"),
+ 10, 15, 1000, 10, 15, 1000);
+#endif
+
+ tester::apply("mlh02",
+ from_wkt<G>("MULTILINESTRING((-170 40 400,-100 80 300),(-10 25 600,10 35 700,120 45 450))"),
+ -10, 25, 300, 260, 80, 700);
+}
+
+//Test spherical polygons and rings (geographic should be similar)
+BOOST_AUTO_TEST_CASE( envelope_polygon )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::polygon<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ typedef bg::model::ring<point_type> R;
+ typedef test_envelope_on_sphere_or_spheroid<R, B> testerR;
+ R ring1;
+ bg::append(ring1, point_type(0.0, 0.0));
+ bg::append(ring1, point_type(0.0, 5.0));
+ bg::append(ring1, point_type(5.0, 5.0));
+ bg::append(ring1, point_type(5.0, 0.0));
+ bg::append(ring1, point_type(0.0, 0.0));
+
+ testerR::apply("r01",
+ ring1,
+ 0, 0, 5, 5.0047392446083938);
+ tester::apply("p01",
+ from_wkt<G>("POLYGON((0 0,1 0,1 1,0 1,0 0))"),
+ 0, 0, 1, 1.0000380706527705);
+ tester::apply("p02",
+ from_wkt<G>("POLYGON((0 0,1 0,1 1,0 1,0 0),(0.5 0.5,0.7 0.5,0.7 0.7,0.5 0.5))"),
+ 0, 0, 1, 1.0000380706527705);
+ tester::apply("p03",
+ from_wkt<G>("POLYGON((),(0.5 0.5,0.5 0.7,0.7 0.7,0.5 0.5))"),
+ 0.5, 0.5, 0.7, 0.70000106605644807);
+ tester::apply("p04",
+ from_wkt<G>("POLYGON((),(0.5 0.5,0.5 0.7,0.7 0.7,0.5 0.5),\
+ (0.7 0.5,0.9 0.5,0.9 0.7,0.7 0.5))"),
+ 0.5, 0.5, 0.9, 0.70000106605644807);
+
+ // https://github.com/boostorg/geometry/issues/466
+ tester::apply("p5-issue466",
+ from_wkt<G>("POLYGON((2.4 48.9021,2.4 48.89,2.3 48.89,2.3 48.9021,2.4 48.9021))"),
+ 2.3, 48.89, 2.4, 48.902110807274966);
+ tester::apply("p6-issue466",
+ from_wkt<G>("POLYGON((2.4 48.90215,2.4 48.89,2.3 48.89,2.3 48.90215,2.4 48.90215))"),
+ 2.3, 48.89, 2.4, 48.902160807272381);
+ tester::apply("p7-issue466",
+ from_wkt<G>("POLYGON((2.4 48.9022,2.4 48.89,2.3 48.89,2.3 48.9022,2.4 48.9022))"),
+ 2.3, 48.89, 2.4, 48.902210807269796);
+}
+
+// unit test for rings de-activated for now (current implementation
+// for area on the spherical equatorial coordinate system is not complete)
+// TODO: re-activate once implementation is done
+// right now implementation does not distinguish between ccw and cw rings
+BOOST_AUTO_TEST_CASE( envelope_cw_ring )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::polygon<point_type> G;
+ typedef bg::model::box<point_type> B;
+ typedef test_envelope_on_sphere_or_spheroid<G, B> tester;
+
+ //double const eps = std::numeric_limits<double>::epsilon();
+
+ tester::apply("r01cw",
+ from_wkt<G>("POLYGON((0 10,0 45,50 10,0 10))"),
+ 0, 10, 50, 45);
+#if 0
+ // ring that contains both the north and south poles in its interior
+ tester::apply("r01cw-r",
+ from_wkt<G>("POLYGON((0 10,50 10,0 45,0 10))"),
+ -180, -90, 180, 90);
+
+ // ring that contains the north pole in its interior
+ tester::apply("r02cw",
+ from_wkt<G>("POLYGON((0 0,-50 0,-170 0,180 0,100 0,0 0))"),
+ -180, 0, 180, 90);
+ // -180, -90, 180, 0);
+
+ // ring that contains the south pole in its interior
+ tester::apply("r02cw-r",
+ from_wkt<G>("POLYGON((0 0,100 0,180 0,-170 0,-50 0,0 0))"),
+ -180, -90, 180, 0);
+ // -180, 0, 180, 90);
+
+ // ring that contains the north pole in its interior
+ tester::apply("r03cw",
+ from_wkt<G>("POLYGON((0 -10,-50 -10,-170 -10,180 -10,100 -10,0 -10))"),
+ -180, -19.42540014068282, 180, 90);
+ // -180, -90, 180, -10);
+
+ // ring that contains both the south and north poles in its interior
+ tester::apply("r03cw-r",
+ from_wkt<G>("POLYGON((0 -10,100 -10,180 -10,-170 -10,-50 -10,0 -10))"),
+ -180, -90, 180, -10);
+ // -180, -19.42540014068282, 180, 90);
+
+ // ring that has the north pole as vertex and contains the south pole
+ tester::apply("r04cw",
+ from_wkt<G>("POLYGON((0 0,-50 90,-50 0,0 0))"),
+ -180, -90, 180, 90);
+
+ // ring that has the north pole as vertex
+ tester::apply("r04cw-r",
+ from_wkt<G>("POLYGON((0 0,-50 0,-50 90,0 0))"),
+ -50, 0, 0, 90);
+
+ // ring that crosses antimeridian but does not contain any pole
+ tester::apply("r05cw",
+ from_wkt<G>("POLYGON((-140 0,140 10,-140 80,-140 0))"),
+ 140, 0, 220, 80);
+
+ // ring that crosses antimeridian multiple times but does not
+ // contain any pole
+ tester::apply("r06cw",
+ from_wkt<G>("POLYGON((-140 10,140 10,140 80,-140 80,-140 10))"),
+ 140, 10, 220, 82.30737118075496,
+ 2 * eps);
+
+ // ring that crosses antimeridian multiple times but does not
+ // contain any pole
+ tester::apply("r07cw",
+ from_wkt<G>("POLYGON((-140 10,140 10,180 80,-140 10))"),
+ 140, 10, 220, 80);
+
+ // ring that goes through the north pole
+ tester::apply("r08cw",
+ from_wkt<G>("POLYGON((0 0,-50 0,-50 90,0 0))"),
+ -50, 0, 0, 90);
+
+ // ring that goes through the south pole and contains the north pole
+ tester::apply("r09cw",
+ from_wkt<G>("POLYGON((0 0,0 -90,50 0,0 0))"),
+ -180, -90, 180, 90);
+
+ // ring that goes through the south pole
+ tester::apply("r09cw-r",
+ from_wkt<G>("POLYGON((0 0,50 0,50 -90,0 0))"),
+ 0, -90, 50, 0);
+
+ // ring that goes through both south and north pole
+ tester::apply("r10cw",
+ from_wkt<G>("POLYGON((50 0,50 -90,40 0,40 90,50 0))"),
+ 40, -90, 50, 90);
+
+ // ring that goes through both south and north pole and crosses antimeridian
+ tester::apply("r11cw",
+ from_wkt<G>("POLYGON((-170 0,-170 -90,160 0,160 90,-170 0))"),
+ 160, -90, 190, 90);
+
+ // ring with edge that goes through the north pole and contains
+ // south pole (the bounding box is the entire globe)
+ tester::apply("r12cw",
+ from_wkt<G>("POLYGON((-50 40,130 10,170 80,-50 40))"),
+ -180, -90, 180, 90);
+ // -180, 10, 180, 90);
+
+ // ring with edge that goes through the north pole
+ tester::apply("r12cw-r",
+ from_wkt<G>("POLYGON((-50 40,170 80,130 10,-50 40))"),
+ -180, 10, 180, 90);
+ // -180, -90, 180, 90);
+
+ // ring that represents a spherical cap near the north pole
+ tester::apply("r13cw",
+ from_wkt<G>("POLYGON((100 45,0 45,-100 45,-100 90,100 45))"),
+ -100, 45, 100, 90);
+
+ // ring that represents the complement of a spherical cap
+ // near the north pole
+ tester::apply("r13cw-r",
+ from_wkt<G>("POLYGON((-100 45,0 45,100 45,100 90,-100 45))"),
+ -180, -90, 180, 90);
+
+ // ring that represents the complement of a spherical cap
+ // that touches the south pole
+ tester::apply("r14cw",
+ from_wkt<G>("POLYGON((-100 45,0 45,100 45,100 -90,-100 45))"),
+ -100, -90, 100, 57.26759279038765);
+
+ // ring that represents a spherical cap that touches the south pole
+ tester::apply("r14cw-r",
+ from_wkt<G>("POLYGON((100 45,0 45,-100 45,-100 -90,100 45))"),
+ -180, -90, 180, 90);
+
+ // ring with edge that goes through the south pole
+ tester::apply("r15cw",
+ from_wkt<G>("POLYGON((-50 -40,130 -10,170 -80,-50 -40))"),
+ -180, -90, 180, -10);
+
+ // ring with edge that goes through the south pole and contains
+ // north pole (the bounding box is the entire globe)
+ tester::apply("r15cw-r",
+ from_wkt<G>("POLYGON((-50 -40,170 -80,130 -10,-50 -40))"),
+ -180, -90, 180, 90);
+
+ // ring that does not contain any pole and lies in the lower hemisphere
+ tester::apply("r16",
+ from_wkt<G>("POLYGON((-50 -80,-50 -40,-30 -40,-30 -80,-50 -80))"),
+ -50, -80.14892388341609, -30, -40);
+
+ // ring that lies in the lower hemisphere and contains both poles
+ tester::apply("r16-r",
+ from_wkt<G>("POLYGON((-50 -80,-30 -80,-30 -40,-50 -40,-50 -80))"),
+ -180, -90, 180, 90);
+
+ // ring that goes through the south pole and contains the north pole
+ tester::apply("r17cw",
+ from_wkt<G>("POLYGON((50 0,50 -90,100 0,50 0))"),
+ -180, -90, 180, 90);
+
+ // ring that goes through the south pole
+ tester::apply("r17cw-r",
+ from_wkt<G>("POLYGON((50 0,100 0,100 -90,50 0))"),
+ 50, -90, 100, 0);
+
+ // ring that goes through the south pole and contains the north pole
+ tester::apply("r18cw",
+ from_wkt<G>("POLYGON((50 0,50 -90,460 0,50 0))"),
+ -180, -90, 180, 90);
+
+ // ring that goes through the south pole
+ tester::apply("r18cw-r",
+ from_wkt<G>("POLYGON((50 0,460 0,100 -90,50 0))"),
+ 50, -90, 100, 0);
+
+ // ring that goes through the south pole and contains the north pole
+ tester::apply("r19cw",
+ from_wkt<G>("POLYGON((50 0,50 -90,-260 0,50 0))"),
+ -180, -90, 180, 90);
+
+ // ring that goes through the south pole
+ tester::apply("r19cw-r",
+ from_wkt<G>("POLYGON((50 0,-260 0,100 -90,50 0))"),
+ 50, -90, 100, 0);
+
+ // ring that goes through both poles
+ tester::apply("r20cw",
+ from_wkt<G>("POLYGON((10 0,10 90,20 0,20 -90,10 0))"),
+ 10, -90, 20, 90); // SUCCEEDS FOR WRONG REASON
+
+ // ring that goes through both poles
+ tester::apply("r20cw-r",
+ from_wkt<G>("POLYGON((10 0,10 -90,20 0,20 90,10 0))"),
+ -180, -90, 180, 90); // FAILS NOW
+
+ // ring that goes through both poles and its boundary forms
+ // a great circle
+ tester::apply("r21cw",
+ from_wkt<G>("POLYGON((-10 0,-10 90,170 0,170 -90,-10 0))"),
+ -10, -90, 170, 90); // SUCCEEDS FOR WRONG REASON
+
+ // ring that goes through both poles and its boundary forms
+ // a great circle
+ tester::apply("r21cw-r",
+ from_wkt<G>("POLYGON((-10 0,-10 -90,170 0,170 90,-10 0))"),
+ 170, -90, 350, 90); // FAILS NOW
+#endif
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/expand.cpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/expand.cpp
new file mode 100644
index 000000000..9ed205027
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/expand.cpp
@@ -0,0 +1,164 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_expand.hpp"
+
+
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/adapted/std_pair_as_segment.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename Point>
+void test_point_3d()
+{
+ bg::model::box<Point> b = bg::make_inverse<bg::model::box<Point> >();
+
+ test_expand<Point>(b, "POINT(1 2 5)", "(1,2,5),(1,2,5)");
+ test_expand<Point>(b, "POINT(3 4 6)", "(1,2,5),(3,4,6)");
+
+ test_expand<Point>(b, "POINT(4 4 5)", "(1,2,5),(4,4,6)");
+ test_expand<Point>(b, "POINT(4 5 5)", "(1,2,5),(4,5,6)");
+ test_expand<Point>(b, "POINT(10 10 4)", "(1,2,4),(10,10,6)");
+ test_expand<Point>(b, "POINT(9 9 4)", "(1,2,4),(10,10,6)");
+
+ test_expand<Point>(b, "POINT(0 2 7)", "(0,2,4),(10,10,7)");
+ test_expand<Point>(b, "POINT(0 0 7)", "(0,0,4),(10,10,7)");
+ test_expand<Point>(b, "POINT(-1 -1 5)", "(-1,-1,4),(10,10,7)");
+ test_expand<Point>(b, "POINT(0 0 5)", "(-1,-1,4),(10,10,7)");
+
+ test_expand<Point>(b, "POINT(15 -1 0)", "(-1,-1,0),(15,10,7)");
+ test_expand<Point>(b, "POINT(-1 15 10)", "(-1,-1,0),(15,15,10)");
+}
+
+template <typename Point>
+void test_box_3d()
+{
+ typedef bg::model::box<Point> box_type;
+ box_type b = bg::make_inverse<box_type>();
+
+ test_expand<box_type>(b, "BOX(0 2 5,4 4 6)", "(0,2,5),(4,4,6)");
+ test_expand<box_type>(b, "BOX(0 1 5,4 6 6)", "(0,1,5),(4,6,6)");
+ test_expand<box_type>(b, "BOX(-1 -1 6,10 10 5)", "(-1,-1,5),(10,10,6)");
+ test_expand<box_type>(b, "BOX(3 3 6,3 3 5)", "(-1,-1,5),(10,10,6)");
+
+ test_expand<box_type>(b, "BOX(3 15 7,-1 3 4)", "(-1,-1,4),(10,15,7)");
+ test_expand<box_type>(b, "BOX(-15 3 7,3 20 4)", "(-15,-1,4),(10,20,7)");
+ test_expand<box_type>(b, "BOX(3 -20 8,3 20 3)", "(-15,-20,3),(10,20,8)");
+ test_expand<box_type>(b, "BOX(-20 3 8,20 3 3)", "(-20,-20,3),(20,20,8)");
+}
+
+
+
+template <typename P>
+void test_3d()
+{
+ test_point_3d<P>();
+ test_box_3d<P>();
+}
+
+template <typename Point>
+void test_2d()
+{
+ typedef bg::model::box<Point> box_type;
+ typedef std::pair<Point, Point> segment_type;
+
+ box_type b = bg::make_inverse<box_type>();
+
+ test_expand<box_type>(b, "BOX(1 1,2 2)", "(1,1),(2,2)");
+
+ // Test an 'incorrect' box -> should also correctly update the bbox
+ test_expand<box_type>(b, "BOX(3 4,0 1)", "(0,1),(3,4)");
+
+ // Test a segment
+ test_expand<segment_type>(b, "SEGMENT(5 6,7 8)", "(0,1),(7,8)");
+}
+
+template <typename Point>
+void test_spherical_degree()
+{
+ // it doesn't work with normalization of input enabled
+ //bg::model::box<Point> b = bg::make_inverse<bg::model::box<Point> >();
+ Point p;
+ bg::read_wkt("POINT(179.73 71.56)", p);
+ bg::model::box<Point> b(p, p);
+
+ test_expand<Point>(b, "POINT(179.73 71.56)",
+ "(179.73,71.56),(179.73,71.56)");
+ test_expand<Point>(b, "POINT(177.47 71.23)",
+ "(177.47,71.23),(179.73,71.56)");
+
+ // It detects that this point is lying RIGHT of the others,
+ // and then it "expands" it.
+ test_expand<Point>(b, "POINT(-178.78 70.78)",
+ "(177.47,70.78),(181.22,71.56)");
+}
+
+
+template <typename Point>
+void test_spherical_radian()
+{
+ // it doesn't work with normalization of input enabled
+ //bg::model::box<Point> b = bg::make_inverse<bg::model::box<Point> >();
+ Point p;
+ bg::read_wkt("POINT(3.128 1.249)", p);
+ bg::model::box<Point> b(p, p);
+
+ test_expand<Point>(b, "POINT(3.128 1.249)",
+ "(3.128,1.249),(3.128,1.249)");
+ test_expand<Point>(b, "POINT(3.097 1.243)",
+ "(3.097,1.243),(3.128,1.249)");
+
+ // It detects that this point is lying RIGHT of the others,
+ // and then it "expands" it.
+ test_expand<Point>(b, "POINT(-3.121 1.235)",
+ "(3.097,1.235),(3.16219,1.249)");
+}
+
+int test_main(int, char* [])
+{
+ test_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+
+
+ test_3d<test::test_point>();
+ test_3d<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_3d<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ test_spherical_degree<bg::model::point<double, 2, bg::cs::spherical<bg::degree> > >();
+ test_spherical_radian<bg::model::point<double, 2, bg::cs::spherical<bg::radian> > >();
+ test_spherical_degree<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_spherical_radian<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::radian> > >();
+
+
+#if defined(HAVE_TTMATH)
+ test_3d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+ test_spherical_degree<bg::model::point<ttmath_big, 2, bg::cs::spherical<bg::degree> > >();
+ test_spherical_radian<bg::model::point<ttmath_big, 2, bg::cs::spherical<bg::radian> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/expand_on_spheroid.cpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/expand_on_spheroid.cpp
new file mode 100644
index 000000000..b192cf7e7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/expand_on_spheroid.cpp
@@ -0,0 +1,1126 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_expand_on_spheroid
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <cstddef>
+
+#include <iostream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+#include <from_wkt.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/core/coordinate_dimension.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/views/detail/indexed_point_view.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/algorithms/expand.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/transform.hpp>
+
+#include "test_envelope_expand_on_spheroid.hpp"
+
+
+class test_expand_on_spheroid
+{
+private:
+ template
+ <
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+ >
+ struct write_geometry
+ {
+ template <typename OutputStream>
+ static inline OutputStream& apply(OutputStream& os,
+ Geometry const& geometry)
+ {
+ os << bg::wkt(geometry);
+ return os;
+ }
+ };
+
+ template <typename Segment>
+ struct write_geometry<Segment, bg::segment_tag>
+ {
+ template <typename OutputStream>
+ static inline OutputStream& apply(OutputStream& os,
+ Segment const& segment)
+ {
+ os << "SEGMENT" << bg::dsv(segment);
+ return os;
+ }
+ };
+
+ template <typename Box>
+ struct write_geometry<Box, bg::box_tag>
+ {
+ template <typename OutputStream>
+ static inline OutputStream& apply(OutputStream& os,
+ Box const& box)
+ {
+ os << "BOX" << bg::dsv(box);
+ return os;
+ }
+ };
+
+ template <typename Box, typename Geometry>
+ static inline void check_message(bool same_boxes,
+ std::string const& case_id,
+ std::string const& units_str,
+ Box const& box,
+ Geometry const& geometry,
+ bool expected_are_different,
+ Box const& expected1,
+ Box const& expected2,
+ Box const& detected)
+ {
+ std::ostringstream stream;
+ stream << "case ID: " << case_id << ", "
+ << "MBR units: " << units_str << "; "
+ << "input box: BOX" << bg::dsv(box) << ", "
+ << "geometry: ";
+
+ write_geometry<Geometry>::apply(stream, geometry);
+
+ stream << std::setprecision(17);
+
+ stream << "; " << "expected: " << bg::dsv(expected1);
+
+ if (expected_are_different)
+ {
+ stream << " or: " << bg::dsv(expected2);
+ }
+ stream << ", " << "detected: " << bg::dsv(detected);
+
+ BOOST_CHECK_MESSAGE(same_boxes, stream.str());
+ }
+
+
+ template <bool Reverse = false, typename = void>
+ struct basic_tester
+ {
+ template <typename Box, typename Geometry>
+ static inline void base_test(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min1, double lat_min1,
+ double height_min1,
+ double lon_max1, double lat_max1,
+ double height_max1,
+ double lon_min2, double lat_min2,
+ double height_min2,
+ double lon_max2, double lat_max2,
+ double height_max2,
+ double tolerance)
+ {
+ typedef typename bg::coordinate_system
+ <
+ Box
+ >::type::units box_units_type;
+
+ std::string const units_str = units2string<box_units_type>();
+
+ Box detected;
+ bg::convert(box, detected);
+ bg::expand(detected, geometry);
+
+ bool expected_are_different =
+ (lon_min1 != lon_min2) || (lat_min1 != lat_min2)
+ || (lon_max1 != lon_max2) || (lat_max1 != lat_max2);
+
+ Box expected1;
+ initialize_box<Box>::apply(expected1,
+ lon_min1, lat_min1, height_min1,
+ lon_max1, lat_max1, height_max1);
+
+ Box expected2;
+ initialize_box<Box>::apply(expected2,
+ lon_min2, lat_min2, height_min2,
+ lon_max2, lat_max2, height_max2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "input box: BOX" << bg::dsv(box) << std::endl;
+
+ std::cout << "geometry: ";
+ write_geometry<Geometry>::apply(std::cout, geometry);
+
+ std::cout << std::endl
+ << "MBR units: " << units_str
+ << std::endl
+ << "expected: " << bg::dsv(expected1);
+
+ if (expected_are_different)
+ {
+ std::cout << " or: " << bg::dsv(expected2);
+ }
+
+ std::cout << std::endl
+ << "detected: " << bg::dsv(detected)
+ << std::endl << std::endl;
+#endif
+ bool same_boxes
+ = box_equals<Box>::apply(detected, expected1, tolerance);
+
+ if (expected_are_different)
+ {
+ same_boxes = same_boxes
+ || box_equals<Box>::apply(detected, expected2, tolerance);
+ }
+
+ check_message(same_boxes, case_id, units_str,
+ box, geometry, expected_are_different,
+ expected1, expected2, detected);
+ }
+
+ template <typename Box, typename Geometry>
+ static inline void apply(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min1, double lat_min1,
+ double height_min1,
+ double lon_max1, double lat_max1,
+ double height_max1,
+ double lon_min2, double lat_min2,
+ double height_min2,
+ double lon_max2, double lat_max2,
+ double height_max2,
+ double tolerance)
+ {
+ typedef other_system_info
+ <
+ typename bg::coordinate_system<Box>::type
+ > other;
+
+ typedef bg::model::box
+ <
+ bg::model::point
+ <
+ typename bg::coordinate_type<Box>::type,
+ bg::dimension<Box>::value,
+ typename other::type
+ >
+ > other_mbr_type;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id
+ << std::endl << std::endl;
+#endif
+
+ base_test(case_id, box, geometry,
+ lon_min1, lat_min1, height_min1,
+ lon_max1, lat_max1, height_max1,
+ lon_min2, lat_min2, height_min2,
+ lon_max2, lat_max2, height_max2,
+ tolerance);
+
+ other_mbr_type other_box;
+
+ //if the input box is the special one made from make_inverse
+ //do not convert coordinates
+ if (!is_inverse_spheroidal_coordinates(box))
+ {
+ bg::detail::indexed_point_view<Box const, 0> p_min(box);
+ bg::detail::indexed_point_view<Box const, 1> p_max(box);
+
+ bg::detail::indexed_point_view
+ <
+ other_mbr_type, 0
+ > other_min(other_box);
+
+ bg::detail::indexed_point_view
+ <
+ other_mbr_type, 1
+ > other_max(other_box);
+
+ bg::transform(p_min, other_min);
+ bg::transform(p_max, other_max);
+ } else {
+ bg::set<bg::min_corner, 0>(other_box, bg::get<0, 0>(box));
+ bg::set<bg::min_corner, 1>(other_box, bg::get<0, 1>(box));
+ bg::set<bg::max_corner, 0>(other_box, bg::get<1, 0>(box));
+ bg::set<bg::max_corner, 1>(other_box, bg::get<1, 1>(box));
+ }
+
+ base_test(case_id, other_box, geometry,
+ other::convert(lon_min1),
+ other::convert(lat_min1),
+ height_min1,
+ other::convert(lon_max1),
+ other::convert(lat_max1),
+ height_max1,
+ other::convert(lon_min2),
+ other::convert(lat_min2),
+ height_min2,
+ other::convert(lon_max2),
+ other::convert(lat_max2),
+ height_max2,
+ tolerance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "=================="
+ << std::endl << std::endl;
+#endif
+ }
+ };
+
+ template <typename Dummy>
+ struct basic_tester<true, Dummy>
+ {
+ template <typename Box, typename Geometry>
+ static inline void apply(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min1, double lat_min1,
+ double height_min1,
+ double lon_max1, double lat_max1,
+ double height_max1,
+ double lon_min2, double lat_min2,
+ double height_min2,
+ double lon_max2, double lat_max2,
+ double height_max2,
+ double tolerance)
+ {
+ basic_tester
+ <
+ false
+ >::apply(case_id, box, geometry,
+ lon_min1, lat_min1, height_min1,
+ lon_max1, lat_max1, height_max1,
+ lon_min2, lat_min2, height_min1,
+ lon_max2, lat_max2, height_max2,
+ tolerance);
+
+ std::string case_id_r = case_id + "[R]";
+
+ basic_tester
+ <
+ false
+ >::apply(case_id_r, geometry, box,
+ lon_min1, lat_min1, height_min1,
+ lon_max1, lat_max1, height_max1,
+ lon_min2, lat_min2, height_min2,
+ lon_max2, lat_max2, height_max2,
+ tolerance);
+ }
+ };
+
+
+public:
+ template <typename Box, typename Geometry>
+ static inline void apply(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min1, double lat_min1, double height_min1,
+ double lon_max1, double lat_max1, double height_max1,
+ double lon_min2, double lat_min2, double height_min2,
+ double lon_max2, double lat_max2, double height_max2,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+
+ basic_tester
+ <
+ boost::is_same
+ <
+ typename bg::tag<Geometry>::type,
+ bg::box_tag
+ >::value
+ >::apply(case_id, box, geometry,
+ lon_min1, lat_min1, height_min1,
+ lon_max1, lat_max1, height_max1,
+ lon_min2, lat_min2, height_min2,
+ lon_max2, lat_max2, height_max2,
+ tolerance);
+ }
+
+ template <typename Box, typename Geometry>
+ static inline void apply(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min1, double lat_min1,
+ double lon_max1, double lat_max1,
+ double lon_min2, double lat_min2,
+ double lon_max2, double lat_max2,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, box, geometry,
+ lon_min1, lat_min1, 0, lon_max1, lat_max1, 0,
+ lon_min2, lat_min2, 0, lon_max2, lat_max2, 0,
+ tolerance);
+ }
+
+ template <typename Box, typename Geometry>
+ static inline void apply(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min, double lat_min,
+ double lon_max, double lat_max,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, box, geometry,
+ lon_min, lat_min, 0, lon_max, lat_max, 0,
+ lon_min, lat_min, 0, lon_max, lat_max, 0,
+ tolerance);
+ }
+
+ template <typename Box, typename Geometry>
+ static inline void apply(std::string const& case_id,
+ Box const& box,
+ Geometry const& geometry,
+ double lon_min, double lat_min, double height_min,
+ double lon_max, double lat_max, double height_max,
+ double tolerance = std::numeric_limits<double>::epsilon())
+ {
+ apply(case_id, box, geometry,
+ lon_min, lat_min, height_min, lon_max, lat_max, height_max,
+ lon_min, lat_min, height_min, lon_max, lat_max, height_max,
+ tolerance);
+ }
+};
+
+
+template <typename CoordinateSystem>
+void test_expand_point()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef point_type G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("p01",
+ from_wkt<B>("BOX(0 0,5 5)"),
+ from_wkt<G>("POINT(10 10)"),
+ 0, 0, 10, 10);
+
+ tester::apply("p02",
+ from_wkt<B>("BOX(0 0,5 5)"),
+ from_wkt<G>("POINT(370 10)"),
+ 0, 0, 10, 10);
+
+ tester::apply("p03",
+ from_wkt<B>("BOX(10 10,10 10)"),
+ from_wkt<G>("POINT(20 20)"),
+ 10, 10, 20, 20);
+
+ tester::apply("p04",
+ from_wkt<B>("BOX(10 10,10 10)"),
+ from_wkt<G>("POINT(10 20)"),
+ 10, 10, 10, 20);
+
+ // there are two possible valid longitude ranges:
+ // [10, 190] and [-170, 10]
+ tester::apply("p05",
+ from_wkt<B>("BOX(10 10,10 10)"),
+ from_wkt<G>("POINT(190 20)"),
+ 10, 10, 190, 20);
+
+ // there are two possible valid longitude ranges:
+ // [10, 190] and [-170, 10]
+ tester::apply("p05a",
+ from_wkt<B>("BOX(10 10,10 10)"),
+ from_wkt<G>("POINT(-170 20)"),
+ 10, 10, 190, 20,
+ -170, 10, 10, 20);
+
+ tester::apply("p06",
+ from_wkt<B>("BOX(170 10,175 20)"),
+ from_wkt<G>("POINT(-170 15)"),
+ 170, 10, 190, 20);
+
+ tester::apply("p06a",
+ from_wkt<B>("BOX(170 10,175 20)"),
+ from_wkt<G>("POINT(-170 -6)"),
+ 170, -6, 190, 20);
+
+ tester::apply("p06b",
+ from_wkt<B>("BOX(170 10,175 20)"),
+ from_wkt<G>("POINT(-170 36)"),
+ 170, 10, 190, 36);
+
+ // point is inside box
+ tester::apply("p07",
+ from_wkt<B>("BOX(-30 -45,60 55)"),
+ from_wkt<G>("POINT(0 0)"),
+ -30, -45, 60, 55);
+
+ // point is inside box
+ tester::apply("p07a",
+ from_wkt<B>("BOX(-30 -45,60 55)"),
+ from_wkt<G>("POINT(360 0)"),
+ -30, -45, 60, 55);
+
+ tester::apply("p08",
+ from_wkt<B>("BOX(-100 -45,-90 55)"),
+ from_wkt<G>("POINT(80 60)"),
+ -100, -45, 80, 60);
+
+ tester::apply("p09",
+ from_wkt<B>("BOX(-100 -45,-90 55)"),
+ from_wkt<G>("POINT(170 60)"),
+ 170, -45, 270, 60);
+
+ // point is north pole
+ tester::apply("p10",
+ from_wkt<B>("BOX(-100 -45,-90 55)"),
+ from_wkt<G>("POINT(-80 90)"),
+ -100, -45, -90, 90);
+
+ // point is north pole
+ tester::apply("p10a",
+ from_wkt<B>("BOX(-100 -45,-90 55)"),
+ from_wkt<G>("POINT(170 90)"),
+ -100, -45, -90, 90);
+
+ tester::apply("p10b",
+ from_wkt<B>("BOX(-100 -45,-90 55)"),
+ from_wkt<G>("POINT(170 80)"),
+ 170, -45, 270, 80);
+
+ // box is north pole
+ tester::apply("p11",
+ from_wkt<B>("BOX(10 90,20 90)"),
+ from_wkt<G>("POINT(15 89)"),
+ 15, 89, 15, 90);
+
+ // box is south pole
+ tester::apply("p11a",
+ from_wkt<B>("BOX(10 -90,20 -90)"),
+ from_wkt<G>("POINT(15 89)"),
+ 15, -90, 15, 89);
+
+ // point is south pole
+ tester::apply("p12",
+ from_wkt<B>("BOX(10 80,20 85)"),
+ from_wkt<G>("POINT(15 -90)"),
+ 10, -90, 20, 85);
+
+ // point is south pole
+ tester::apply("p12a",
+ from_wkt<B>("BOX(10 80,20 85)"),
+ from_wkt<G>("POINT(25 -90)"),
+ 10, -90, 20, 85);
+
+ // box is north pole and point is south pole
+ tester::apply("p13",
+ from_wkt<B>("BOX(10 90,20 90)"),
+ from_wkt<G>("POINT(25 -90)"),
+ 0, -90, 0, 90);
+
+ // box contains north pole and point is south pole
+ tester::apply("p14",
+ from_wkt<B>("BOX(10 80,20 90)"),
+ from_wkt<G>("POINT(25 -90)"),
+ 10, -90, 20, 90);
+
+ // box contains south pole and point is north pole
+ tester::apply("p15",
+ from_wkt<B>("BOX(10 -90,30 0)"),
+ from_wkt<G>("POINT(25 90)"),
+ 10, -90, 30, 90);
+
+ // box and point are north pole
+ tester::apply("p15",
+ from_wkt<B>("BOX(10 90,20 90)"),
+ from_wkt<G>("POINT(25 90)"),
+ 0, 90, 0, 90);
+
+ // box and point are south pole
+ tester::apply("p16",
+ from_wkt<B>("BOX(10 -90,20 -90)"),
+ from_wkt<G>("POINT(-25 -90)"),
+ 0, -90, 0, -90);
+
+ // box contains both poles
+ tester::apply("p17",
+ from_wkt<B>("BOX(10 -90,10 90)"),
+ from_wkt<G>("POINT(10 80)"),
+ 10, -90, 10, 90);
+
+ // box contains both poles
+ tester::apply("p17a",
+ from_wkt<B>("BOX(10 -90,10 90)"),
+ from_wkt<G>("POINT(25 80)"),
+ 10, -90, 25, 90);
+
+ // box contains both poles
+ tester::apply("p18",
+ from_wkt<B>("BOX(10 -90,100 90)"),
+ from_wkt<G>("POINT(25 80)"),
+ 10, -90, 100, 90);
+
+ // box contains both poles
+ tester::apply("p18a",
+ from_wkt<B>("BOX(10 -90,100 90)"),
+ from_wkt<G>("POINT(-175 80)"),
+ 10, -90, 185, 90);
+
+ // box contains both poles
+ tester::apply("p18b",
+ from_wkt<B>("BOX(10 -90,100 90)"),
+ from_wkt<G>("POINT(-95 80)"),
+ -95, -90, 100, 90);
+
+ // box contains both poles and point is north pole
+ tester::apply("p19",
+ from_wkt<B>("BOX(10 -90,100 90)"),
+ from_wkt<G>("POINT(-95 90)"),
+ 10, -90, 100, 90);
+
+ // box contains both poles and point is south pole
+ tester::apply("p20",
+ from_wkt<B>("BOX(10 -90,100 90)"),
+ from_wkt<G>("POINT(-95 -90)"),
+ 10, -90, 100, 90);
+}
+
+BOOST_AUTO_TEST_CASE( expand_point )
+{
+ test_expand_point<bg::cs::spherical_equatorial<bg::degree> >();
+ test_expand_point<bg::cs::geographic<bg::degree> >();
+}
+
+
+template <typename CoordinateSystem>
+void test_expand_point_with_height()
+{
+ typedef bg::model::point<double, 3, CoordinateSystem> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef point_type G;
+ typedef test_expand_on_spheroid tester;
+
+ // deactivate this for now
+ tester::apply("ph01",
+ from_wkt<B>("BOX(0 0 20,5 5 100)"),
+ from_wkt<G>("POINT(10 10 80)"),
+ 0, 0, 20, 10, 10, 100);
+
+ tester::apply("ph02",
+ from_wkt<B>("BOX(0 0 20,5 5 100)"),
+ from_wkt<G>("POINT(10 10 120)"),
+ 0, 0, 20, 10, 10, 120);
+
+ tester::apply("ph03",
+ from_wkt<B>("BOX(0 0 20,5 5 100)"),
+ from_wkt<G>("POINT(10 10 5)"),
+ 0, 0, 5, 10, 10, 100);
+}
+
+BOOST_AUTO_TEST_CASE( expand_point_with_height )
+{
+ test_expand_point_with_height<bg::cs::spherical_equatorial<bg::degree> >();
+ test_expand_point_with_height<bg::cs::geographic<bg::degree> >();
+}
+
+
+BOOST_AUTO_TEST_CASE( expand_segment_sphere )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::segment<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("s01",
+ from_wkt<B>("BOX(20 20,50 50)"),
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 50, 50);
+
+ tester::apply("s02",
+ from_wkt<B>("BOX(20 20,50 50)"),
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 50, 50);
+
+ tester::apply("s03",
+ from_wkt<B>("BOX(5 5,50 10)"),
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 5, 5, 50, 10.34527004614999,
+ 4.0 * std::numeric_limits<double>::epsilon());
+
+ // segment ending at the north pole
+ tester::apply("s04",
+ from_wkt<B>("BOX(5 15,50 50)"),
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 5, 15, 50, 90);
+
+ // segment ending at the north pole
+ tester::apply("s04a",
+ from_wkt<B>("BOX(5 15,30 30)"),
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 5, 15, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05",
+ from_wkt<B>("BOX(5 15,50 50)"),
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 5, 15, 50, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<B>("BOX(5 15,30 30)"),
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 5, 15, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s06",
+ from_wkt<B>("BOX(5 15,30 40)"),
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 30, 40);
+
+ // segment degenerating to the north pole
+ tester::apply("s07",
+ from_wkt<B>("BOX(5 15,30 40)"),
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 5, 15, 30, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s08",
+ from_wkt<B>("BOX(5 15,30 40)"),
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 5, -90, 30, 40);
+
+ // box degenerating to the south pole
+ tester::apply("s09",
+ from_wkt<B>("BOX(10 -90,30 -90)"),
+ from_wkt<G>("SEGMENT(10 -30,100 45)"),
+ 10, -90, 100, 45);
+
+ // box degenerating to the south pole
+ tester::apply("s09a",
+ from_wkt<B>("BOX(10 -90,130 -90)"),
+ from_wkt<G>("SEGMENT(10 -30,100 45)"),
+ 10, -90, 100, 45);
+}
+
+BOOST_AUTO_TEST_CASE( expand_segment_spherical_polar )
+{
+ typedef bg::cs::spherical<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::segment<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("s02",
+ from_wkt<B>("BOX(20 20,50 50)"),
+ from_wkt<G>("SEGMENT(10 10,40 20)"),
+ 10, 10, 50, 50);
+
+ // segment ending at the north pole
+ tester::apply("s04",
+ from_wkt<B>("BOX(5 15,50 50)"),
+ from_wkt<G>("SEGMENT(40 45,80 0)"),
+ 5, 0, 50, 50);
+}
+
+BOOST_AUTO_TEST_CASE( expand_segment_spheroid )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 2, coordinate_system_type> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::segment<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("s01",
+ from_wkt<B>("BOX(20 20,50 50)"),
+ from_wkt<G>("SEGMENT(10 10,40 40)"),
+ 10, 10, 50, 50);
+
+ tester::apply("s02",
+ from_wkt<B>("BOX(20 20,50 50)"),
+ from_wkt<G>("SEGMENT(10 10,40 10)"),
+ 10, 10, 50, 50);
+
+ tester::apply("s03",
+ from_wkt<B>("BOX(5 5,50 10)"),
+ from_wkt<G>("SEGMENT(40 10,10 10)"),
+ 5, 5, 50, 10.347587099602029,
+ 4.0 * std::numeric_limits<double>::epsilon());
+
+ // segment ending at the north pole
+ tester::apply("s04",
+ from_wkt<B>("BOX(5 15,50 50)"),
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 5, 15, 50, 90);
+
+ // segment ending at the north pole
+ tester::apply("s04a",
+ from_wkt<B>("BOX(5 15,30 30)"),
+ from_wkt<G>("SEGMENT(40 45,80 90)"),
+ 5, 15, 40, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05",
+ from_wkt<B>("BOX(5 15,50 50)"),
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 5, 15, 50, 90);
+
+ // segment starting at the north pole
+ tester::apply("s05a",
+ from_wkt<B>("BOX(5 15,30 30)"),
+ from_wkt<G>("SEGMENT(80 90,40 45)"),
+ 5, 15, 40, 90);
+
+ // segment passing through the south pole
+ tester::apply("s06",
+ from_wkt<B>("BOX(5 15,30 40)"),
+ from_wkt<G>("SEGMENT(-170 -45,10 -30)"),
+ -170, -90, 30, 40);
+
+ // segment degenerating to the north pole
+ tester::apply("s07",
+ from_wkt<B>("BOX(5 15,30 40)"),
+ from_wkt<G>("SEGMENT(10 90,20 90)"),
+ 5, 15, 30, 90);
+
+ // segment degenerating to the south pole
+ tester::apply("s08",
+ from_wkt<B>("BOX(5 15,30 40)"),
+ from_wkt<G>("SEGMENT(10 -90,20 -90)"),
+ 5, -90, 30, 40);
+
+ // box degenerating to the south pole
+ tester::apply("s09",
+ from_wkt<B>("BOX(10 -90,30 -90)"),
+ from_wkt<G>("SEGMENT(10 -30,100 45)"),
+ 10, -90, 100, 45);
+
+ // box degenerating to the south pole
+ tester::apply("s09a",
+ from_wkt<B>("BOX(10 -90,130 -90)"),
+ from_wkt<G>("SEGMENT(10 -30,100 45)"),
+ 10, -90, 100, 45);
+}
+
+BOOST_AUTO_TEST_CASE( expand_segment_sphere_with_height )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::segment<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("sh01",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 150,40 40 500)"),
+ 10, 10, 100, 50, 50, 1000);
+
+ tester::apply("sh02",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 60,40 40 1500)"),
+ 10, 10, 60, 50, 50, 1500);
+
+ tester::apply("sh03",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 150,40 40 1500)"),
+ 10, 10, 100, 50, 50, 1500);
+
+ tester::apply("sh04",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 60,40 40 800)"),
+ 10, 10, 60, 50, 50, 1000);
+}
+
+BOOST_AUTO_TEST_CASE( expand_segment_spheroid_with_height )
+{
+ typedef bg::cs::geographic<bg::degree> coordinate_system_type;
+ typedef bg::model::point<double, 3, coordinate_system_type> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::segment<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("sh01",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 150,40 40 500)"),
+ 10, 10, 100, 50, 50, 1000);
+
+ tester::apply("sh02",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 60,40 40 1500)"),
+ 10, 10, 60, 50, 50, 1500);
+
+ tester::apply("sh03",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 150,40 40 1500)"),
+ 10, 10, 100, 50, 50, 1500);
+
+ tester::apply("sh04",
+ from_wkt<B>("BOX(20 20 100,50 50 1000)"),
+ from_wkt<G>("SEGMENT(10 10 60,40 40 800)"),
+ 10, 10, 60, 50, 50, 1000);
+}
+
+
+template <typename CoordinateSystem>
+void test_expand_box()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::box<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("b01",
+ from_wkt<B>("BOX(11 11,19 19)"),
+ from_wkt<G>("BOX(10 10,20 20)"),
+ 10, 10, 20, 20);
+
+ tester::apply("b02",
+ from_wkt<B>("BOX(11 11,29 29)"),
+ from_wkt<G>("BOX(10 10,20 20)"),
+ 10, 10, 29, 29);
+
+ tester::apply("b03",
+ from_wkt<B>("BOX(21 21,29 29)"),
+ from_wkt<G>("BOX(10 10,20 20)"),
+ 10, 10, 29, 29);
+
+ tester::apply("b04",
+ from_wkt<B>("BOX(150 -10,200 60)"),
+ from_wkt<G>("BOX(-175 -20,-150 55)"),
+ 150, -20, 210, 60);
+
+ tester::apply("b04a",
+ from_wkt<B>("BOX(150 -10,200 60)"),
+ from_wkt<G>("BOX(-175 -20,-170 55)"),
+ 150, -20, 200, 60);
+
+ tester::apply("b04b",
+ from_wkt<B>("BOX(150 -10,200 60)"),
+ from_wkt<G>("BOX(-175 -20,-140 55)"),
+ 150, -20, 220, 60);
+
+ tester::apply("b05",
+ from_wkt<B>("BOX(150 -10,170 60)"),
+ from_wkt<G>("BOX(179 -20,535 55)"),
+ 179, -20, 535, 60);
+
+ tester::apply("b06",
+ from_wkt<B>("BOX(150 -10,170 60)"),
+ from_wkt<G>("BOX(179 -20,520 55)"),
+ 179, -20, 530, 60);
+
+ tester::apply("b07",
+ from_wkt<B>("BOX(-100 -10,170 60)"),
+ from_wkt<G>("BOX(100 -20,400 55)"),
+ -180, -20, 180, 60);
+
+ tester::apply("b08",
+ from_wkt<B>("BOX(-100 -10,100 60)"),
+ from_wkt<G>("BOX(150 -20,150 55)"),
+ -100, -20, 150, 60);
+
+ tester::apply("b09",
+ from_wkt<B>("BOX(100 -10,400 60)"),
+ from_wkt<G>("BOX(0 -20,0 55)"),
+ 100, -20, 400, 60);
+
+ // this is a border case:
+ // there are two possible MBRs with longitude intervals:
+ // [100, 430] and [70, 400]
+ tester::apply("b10",
+ from_wkt<B>("BOX(100 -10,400 60)"),
+ from_wkt<G>("BOX(70 -20,70 55)"),
+ 70, -20, 400, 60,
+ 100, -20, 430, 60);
+
+ tester::apply("b10a",
+ from_wkt<B>("BOX(100 -10,400 60)"),
+ from_wkt<G>("BOX(71 -20,71 55)"),
+ 71, -20, 400, 60);
+
+ tester::apply("b10b",
+ from_wkt<B>("BOX(100 -10,400 60)"),
+ from_wkt<G>("BOX(69 -20,69 55)"),
+ 100, -20, 429, 60);
+
+ tester::apply("b11",
+ from_wkt<B>("BOX(-90 -10,-90 60)"),
+ from_wkt<G>("BOX(90 -20,90 55)"),
+ -90, -20, 90, 60);
+
+ // first box is the south pole
+ tester::apply("b12",
+ from_wkt<B>("BOX(-90 -90,80 -90)"),
+ from_wkt<G>("BOX(90 -20,90 55)"),
+ 90, -90, 90, 55);
+
+ // first box is the south pole
+ tester::apply("b12a",
+ from_wkt<B>("BOX(-90 -90,80 -90)"),
+ from_wkt<G>("BOX(90 -20,130 55)"),
+ 90, -90, 130, 55);
+
+ // first box is the north pole
+ tester::apply("b13",
+ from_wkt<B>("BOX(-90 90,80 90)"),
+ from_wkt<G>("BOX(90 -20,90 55)"),
+ 90, -20, 90, 90);
+
+ // first box is the north pole
+ tester::apply("b13a",
+ from_wkt<B>("BOX(-90 90,80 90)"),
+ from_wkt<G>("BOX(90 -20,190 55)"),
+ 90, -20, 190, 90);
+
+ // both boxes are the north pole
+ tester::apply("b14",
+ from_wkt<B>("BOX(-90 90,80 90)"),
+ from_wkt<G>("BOX(90 90,190 90)"),
+ 0, 90, 0, 90);
+
+ // both boxes are the south pole
+ tester::apply("b15",
+ from_wkt<B>("BOX(-90 -90,80 -90)"),
+ from_wkt<G>("BOX(90 -90,190 -90)"),
+ 0, -90, 0, -90);
+
+ // one box is the south pole and the other the north pole
+ tester::apply("b16",
+ from_wkt<B>("BOX(-90 -90,80 -90)"),
+ from_wkt<G>("BOX(90 90,190 90)"),
+ 0, -90, 0, 90);
+
+ // both boxes contain both poles but at different longitudes
+ tester::apply("b17",
+ from_wkt<B>("BOX(10 -90,10 90)"),
+ from_wkt<G>("BOX(20 -90,20 90)"),
+ 10, -90, 20, 90);
+
+ // both boxes contain both poles but at different longitude ranges
+ tester::apply("b17",
+ from_wkt<B>("BOX(10 -90,20 90)"),
+ from_wkt<G>("BOX(40 -90,60 90)"),
+ 10, -90, 60, 90);
+
+
+ // first box is a band
+ tester::apply("b18",
+ from_wkt<B>("BOX(0 10,360 20)"),
+ from_wkt<G>("BOX(-10 -40,20 10)"),
+ -180, -40, 180, 20);
+
+ // first box contains south and north pole and is a band
+ // (box covers the entire spheroid)
+ tester::apply("b19",
+ from_wkt<B>("BOX(0 -90,360 90)"),
+ from_wkt<G>("BOX(-10 -40,20 10)"),
+ -180, -90, 180, 90);
+
+ // the envelope of the two boxes is a band
+ tester::apply("b20",
+ from_wkt<B>("BOX(-180 -40,0 -30)"),
+ from_wkt<G>("BOX(0 -10,180 50)"),
+ -180, -40, 180, 50);
+
+ // the envelope of the two boxes is a band
+ tester::apply("b20a",
+ from_wkt<B>("BOX(-180 -40,0 -30)"),
+ from_wkt<G>("BOX(0 -10,185 50)"),
+ -180, -40, 180, 50);
+
+ // the envelope of the two boxes is a band
+ tester::apply("b20b",
+ from_wkt<B>("BOX(-179 -40,0 -30)"),
+ from_wkt<G>("BOX(0 -10,185 50)"),
+ -180, -40, 180, 50);
+}
+
+BOOST_AUTO_TEST_CASE( expand_box )
+{
+ test_expand_box<bg::cs::spherical_equatorial<bg::degree> >();
+ test_expand_box<bg::cs::geographic<bg::degree> >();
+}
+
+template <typename CoordinateSystem>
+void test_expand_make_inverse()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> point_type;
+ typedef bg::model::box<point_type> box_type;
+ typedef bg::model::segment<point_type> segment_type;
+ typedef test_expand_on_spheroid tester;
+
+ box_type box = boost::geometry::make_inverse<box_type>();
+
+ tester::apply("bi01",
+ box,
+ from_wkt<box_type>("BOX(10 10,20 20)"),
+ 10, 10, 20, 20);
+ tester::apply("bi02",
+ box,
+ from_wkt<point_type>("POINT(0 0)"),
+ 0, 0, 0, 0);
+ tester::apply("bi03",
+ box,
+ from_wkt<point_type>("POINT(5 0)"),
+ 5, 0, 5, 0);
+ tester::apply("bi04",
+ box,
+ from_wkt<segment_type>("SEGMENT(5 0,0 5)"),
+ 0, 0, 5, 5);
+}
+
+BOOST_AUTO_TEST_CASE( expand_make_inverse )
+{
+ test_expand_make_inverse<bg::cs::spherical_equatorial<bg::degree> >();
+ test_expand_make_inverse<bg::cs::geographic<bg::degree> >();
+}
+
+template <typename CoordinateSystem>
+void test_expand_box_with_height()
+{
+ typedef bg::model::point<double, 3, CoordinateSystem> point_type;
+ typedef bg::model::box<point_type> B;
+ typedef bg::model::box<point_type> G;
+ typedef test_expand_on_spheroid tester;
+
+ tester::apply("bh01",
+ from_wkt<B>("BOX(11 11 100,19 19 1000)"),
+ from_wkt<G>("BOX(10 10 200,20 20 800)"),
+ 10, 10, 100, 20, 20, 1000);
+
+ tester::apply("bh02",
+ from_wkt<B>("BOX(11 11 200,19 19 1000)"),
+ from_wkt<G>("BOX(10 10 100,20 20 800)"),
+ 10, 10, 100, 20, 20, 1000);
+
+ tester::apply("bh03",
+ from_wkt<B>("BOX(11 11 100,19 19 800)"),
+ from_wkt<G>("BOX(10 10 200,20 20 1000)"),
+ 10, 10, 100, 20, 20, 1000);
+
+ tester::apply("bh04",
+ from_wkt<B>("BOX(11 11 200,19 19 1000)"),
+ from_wkt<G>("BOX(10 10 100,20 20 800)"),
+ 10, 10, 100, 20, 20, 1000);
+}
+
+BOOST_AUTO_TEST_CASE( expand_box_with_height )
+{
+ test_expand_box_with_height<bg::cs::spherical_equatorial<bg::degree> >();
+ test_expand_box_with_height<bg::cs::geographic<bg::degree> >();
+}
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope.hpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope.hpp
new file mode 100644
index 000000000..c0dc91639
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope.hpp
@@ -0,0 +1,98 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_ENVELOPE_HPP
+#define BOOST_GEOMETRY_TEST_ENVELOPE_HPP
+
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+template<typename Box, std::size_t DimensionCount>
+struct check_result
+{};
+
+template <typename Box>
+struct check_result<Box, 2>
+{
+ typedef typename bg::coordinate_type<Box>::type ctype;
+ typedef typename boost::mpl::if_
+ <
+ boost::is_arithmetic<ctype>,
+ double,
+ ctype
+ >::type type;
+
+ static void apply(Box const& b, const type& x1, const type& y1, const type& /*z1*/,
+ const type& x2, const type& y2, const type& /*z2*/)
+ {
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 0>(b)), x1, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 1>(b)), y1, 0.001);
+
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 0>(b)), x2, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 1>(b)), y2, 0.001);
+ }
+};
+
+template <typename Box>
+struct check_result<Box, 3>
+{
+ typedef typename bg::coordinate_type<Box>::type ctype;
+ typedef typename boost::mpl::if_
+ <
+ boost::is_arithmetic<ctype>,
+ double,
+ ctype
+ >::type type;
+
+ static void apply(Box const& b, const type& x1, const type& y1, const type& z1,
+ const type& x2, const type& y2, const type& z2)
+ {
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 0>(b)), x1, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 1>(b)), y1, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 2>(b)), z1, 0.001);
+
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 0>(b)), x2, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 1>(b)), y2, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 2>(b)), z2, 0.001);
+ }
+};
+
+
+template <typename Geometry, typename T>
+void test_envelope(std::string const& wkt,
+ const T& x1, const T& x2,
+ const T& y1, const T& y2,
+ const T& z1 = 0, const T& z2 = 0)
+{
+ typedef bg::model::box<typename bg::point_type<Geometry>::type > box_type;
+ box_type b;
+
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ bg::envelope(geometry, b);
+ check_result<box_type, bg::dimension<Geometry>::type::value>
+ ::apply(b, x1, y1, z1, x2, y2, z2);
+
+ boost::variant<Geometry> v(geometry);
+ bg::envelope(v, b);
+ check_result<box_type, bg::dimension<Geometry>::type::value>
+ ::apply(b, x1, y1, z1, x2, y2, z2);
+
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope_expand_on_spheroid.hpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope_expand_on_spheroid.hpp
new file mode 100644
index 000000000..cd6c0e2a8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/test_envelope_expand_on_spheroid.hpp
@@ -0,0 +1,360 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_ENVELOPE_EXPAND_ON_SPHEROID_HPP
+#define BOOST_GEOMETRY_TEST_ENVELOPE_EXPAND_ON_SPHEROID_HPP
+
+
+#include <algorithm>
+#include <cmath>
+#include <cstddef>
+#include <iostream>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/coordinate_dimension.hpp>
+#include <boost/geometry/core/cs.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/util/math.hpp>
+
+#include <boost/geometry/views/detail/indexed_point_view.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+
+struct rng
+{
+ typedef double type;
+
+ rng(double l, double h)
+ : lo(l), hi(h)
+ {
+ BOOST_GEOMETRY_ASSERT(lo <= hi);
+ }
+
+ friend rng operator*(rng const& l, double v) { return rng(l.lo * v, l.hi * v); }
+
+ friend bool operator<=(rng const& l, rng const& r) { return l.lo <= r.hi; }
+ friend bool operator<=(double l, rng const& r) { return l <= r.hi; }
+ friend bool operator<=(rng const& l, double r) { return l.lo <= r; }
+
+ friend bool operator<(rng const& l, rng const& r) { return !operator<=(r, l); }
+ friend bool operator<(double l, rng const& r) { return !operator<=(r, l); }
+ friend bool operator<(rng const& l, double r) { return !operator<=(r, l); }
+
+ friend bool operator==(double l, rng const& r) { return r.lo <= l && l <= r.hi; }
+
+ friend std::ostream & operator<<(std::ostream & os, rng const& v)
+ {
+ return (os << "[" << v.lo << ", " << v.hi << "]");
+ }
+
+ double lo, hi;
+};
+
+
+template <typename Units>
+char const* units2string()
+{
+ if (BOOST_GEOMETRY_CONDITION((boost::is_same<Units, bg::degree>::value)))
+ {
+ return "degrees";
+ }
+ return "radians";
+}
+
+template <typename CoordinateSystem>
+struct other_system_info
+{};
+
+template <>
+struct other_system_info<bg::cs::spherical_equatorial<bg::radian> >
+{
+ typedef bg::degree units;
+ typedef bg::cs::spherical_equatorial<units> type;
+
+ static inline double convert(double value)
+ {
+ return value * bg::math::r2d<double>();
+ }
+
+ static inline rng convert(rng const& value)
+ {
+ return value * bg::math::r2d<double>();
+ }
+};
+
+template <>
+struct other_system_info<bg::cs::spherical_equatorial<bg::degree> >
+{
+ typedef bg::radian units;
+ typedef bg::cs::spherical_equatorial<units> type;
+
+ static inline double convert(double value)
+ {
+ return value * bg::math::d2r<double>();
+ }
+
+ static inline rng convert(rng const& value)
+ {
+ return value * bg::math::d2r<double>();
+ }
+};
+
+template <>
+struct other_system_info<bg::cs::spherical<bg::radian> >
+{
+ typedef bg::degree units;
+ typedef bg::cs::spherical<units> type;
+
+ static inline double convert(double value)
+ {
+ return value * bg::math::r2d<double>();
+ }
+
+ static inline rng convert(rng const& value)
+ {
+ return value * bg::math::r2d<double>();
+ }
+};
+
+template <>
+struct other_system_info<bg::cs::spherical<bg::degree> >
+{
+ typedef bg::radian units;
+ typedef bg::cs::spherical<units> type;
+
+ static inline double convert(double value)
+ {
+ return value * bg::math::d2r<double>();
+ }
+
+ static inline rng convert(rng const& value)
+ {
+ return value * bg::math::d2r<double>();
+ }
+};
+
+template <>
+struct other_system_info<bg::cs::geographic<bg::radian> >
+{
+ typedef bg::degree units;
+ typedef bg::cs::geographic<units> type;
+
+ static inline double convert(double value)
+ {
+ return value * bg::math::r2d<double>();
+ }
+
+ static inline rng convert(rng const& value)
+ {
+ return value * bg::math::r2d<double>();
+ }
+};
+
+template <>
+struct other_system_info<bg::cs::geographic<bg::degree> >
+{
+ typedef bg::radian units;
+ typedef bg::cs::geographic<units> type;
+
+ static inline double convert(double value)
+ {
+ return value * bg::math::d2r<double>();
+ }
+
+ static inline rng convert(rng const& value)
+ {
+ return value * bg::math::d2r<double>();
+ }
+};
+
+
+class equals_with_tolerance
+{
+private:
+ double m_tolerence;
+
+ template <typename T>
+ static inline T const& get_max(T const& a, T const& b, T const& c)
+ {
+ return (std::max)((std::max)(a, b), c);
+ }
+
+ template <typename T>
+ static inline bool check_close(T const& a, T const& b, double tol)
+ {
+ return (a == b)
+ || (std::abs(a - b) <= tol * get_max(std::abs(a), std::abs(b), 1.0));
+ }
+
+public:
+ equals_with_tolerance(double tolerence) : m_tolerence(tolerence) {}
+
+ inline bool operator()(double value1, double value2) const
+ {
+ return check_close(value1, value2, m_tolerence);
+ }
+
+ inline bool operator()(double l, rng const& r) const
+ {
+ return (r.lo < l && l < r.hi)
+ || check_close(l, r.lo, m_tolerence)
+ || check_close(l, r.hi, m_tolerence);
+ }
+};
+
+
+bool equals_with_eps(double l, double r)
+{
+ return bg::math::equals(l, r);
+}
+
+bool equals_with_eps(double l, rng r)
+{
+ return (r.lo < l && l < r.hi)
+ || bg::math::equals(l, r.lo)
+ || bg::math::equals(l, r.hi);
+}
+
+
+template
+<
+ typename Box,
+ std::size_t DimensionCount = bg::dimension<Box>::value
+>
+struct box_check_equals
+{
+ template <typename T1, typename T2, typename T3, typename T4>
+ static inline bool apply(Box const& box,
+ T1 const& lon_min, T2 const& lat_min, double,
+ T3 const& lon_max, T4 const& lat_max, double,
+ double tol)
+ {
+ equals_with_tolerance equals(tol);
+
+#ifndef BOOST_GEOMETRY_TEST_FAILURES
+ // check latitude with tolerance when necessary
+ return equals_with_eps(bg::get<0, 0>(box), lon_min)
+ && (bg::get<0, 1>(box) < 0
+ ? equals(bg::get<0, 1>(box), lat_min)
+ : equals_with_eps(bg::get<0, 1>(box), lat_min))
+ && equals_with_eps(bg::get<1, 0>(box), lon_max)
+ && (bg::get<1, 1>(box) > 0
+ ? equals(bg::get<1, 1>(box), lat_max)
+ : equals_with_eps(bg::get<1, 1>(box), lat_max));
+#else
+ // check latitude with tolerance when necessary
+ return bg::get<0, 0>(box) == lon_min
+ && (bg::get<0, 1>(box) < 0
+ ? equals(bg::get<0, 1>(box), lat_min)
+ : bg::get<0, 1>(box) == lat_min)
+ && bg::get<1, 0>(box) == lon_max
+ && (bg::get<1, 1>(box) > 0
+ ? equals(bg::get<1, 1>(box), lat_max)
+ : bg::get<1, 1>(box) == lat_max);
+#endif
+ }
+};
+
+template <typename Box>
+struct box_check_equals<Box, 3>
+{
+ template <typename T1, typename T2, typename T3, typename T4>
+ static inline bool apply(Box const& box,
+ T1 const& lon_min, T2 const& lat_min, double height_min,
+ T3 const& lon_max, T4 const& lat_max, double height_max,
+ double tol)
+ {
+#ifndef BOOST_GEOMETRY_TEST_FAILURES
+ equals_with_tolerance equals(tol);
+
+ return box_check_equals<Box, 2>::apply(box,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ tol)
+ && equals(bg::get<0, 2>(box), height_min)
+ && equals(bg::get<1, 2>(box), height_max);
+#else
+ return box_equals<Box, 2>::apply(box,
+ lon_min, lat_min, height_min,
+ lon_max, lat_max, height_max,
+ tol)
+ && bg::get<0, 2>(box) == height_min
+ && bg::get<1, 2>(box) == height_max;
+#endif
+ }
+};
+
+
+template
+<
+ typename Box1,
+ typename Box2 = Box1,
+ std::size_t DimensionCount = bg::dimension<Box1>::value
+>
+struct box_equals
+{
+ static inline bool apply(Box1 const& box1, Box2 const& box2, double tol)
+ {
+ return box_check_equals<Box1>::apply(box1,
+ bg::get<0, 0>(box2), bg::get<0, 1>(box2), 0.0,
+ bg::get<1, 0>(box2), bg::get<1, 1>(box2), 0.0,
+ tol);
+ }
+};
+
+template<typename Box1, typename Box2>
+struct box_equals<Box1, Box2, 3>
+{
+ static inline bool apply(Box1 const& box1, Box2 const& box2, double tol)
+ {
+ return box_check_equals<Box1>::apply(box1,
+ bg::get<0, 0>(box2), bg::get<0, 1>(box2), bg::get<0, 2>(box2),
+ bg::get<1, 0>(box2), bg::get<1, 1>(box2), bg::get<1, 2>(box2),
+ tol);
+ }
+};
+
+
+template <typename Box, std::size_t Dimension = bg::dimension<Box>::value>
+struct initialize_box
+{
+ static inline void apply(Box& box,
+ double lon_min, double lat_min, double,
+ double lon_max, double lat_max, double)
+ {
+ bg::detail::indexed_point_view<Box, bg::min_corner> p_min(box);
+ bg::detail::indexed_point_view<Box, bg::max_corner> p_max(box);
+
+ bg::assign_values(p_min, lon_min, lat_min);
+ bg::assign_values(p_max, lon_max, lat_max);
+ }
+};
+
+template <typename Box>
+struct initialize_box<Box, 3>
+{
+ static inline void apply(Box& box,
+ double lon_min, double lat_min, double height_min,
+ double lon_max, double lat_max, double height_max)
+ {
+ bg::detail::indexed_point_view<Box, bg::min_corner> p_min(box);
+ bg::detail::indexed_point_view<Box, bg::max_corner> p_max(box);
+
+ bg::assign_values(p_min, lon_min, lat_min, height_min);
+ bg::assign_values(p_max, lon_max, lat_max, height_max);
+ }
+};
+
+#endif // BOOST_GEOMETRY_TEST_ENVELOPE_EXPAND_ON_SPHEROID_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/envelope_expand/test_expand.hpp b/src/boost/libs/geometry/test/algorithms/envelope_expand/test_expand.hpp
new file mode 100644
index 000000000..2e42d436d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/envelope_expand/test_expand.hpp
@@ -0,0 +1,71 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_EXPAND_HPP
+#define BOOST_GEOMETRY_TEST_EXPAND_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/expand.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/variant/variant.hpp>
+
+
+template <typename Box>
+inline std::string to_dsv(const Box& box)
+{
+ std::ostringstream out;
+ out << bg::dsv(box, ",", "(", ")", ",", "", "");
+ return out.str();
+}
+
+
+template <typename Geometry, typename Box>
+void test_expand(Box& box,
+ std::string const& wkt,
+ std::string const& expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+
+ bg::expand(box, geometry);
+
+ BOOST_CHECK_EQUAL(to_dsv(box), expected);
+
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ bg::expand(box, boost::variant<Geometry>(geometry));
+
+ BOOST_CHECK_EQUAL(to_dsv(box), expected);
+#endif
+}
+
+template <typename Geometry, typename Box>
+void test_expand_other_strategy(Box& box,
+ std::string const& wkt,
+ std::string const& expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+
+ bg::expand(box, geometry);
+
+ BOOST_CHECK_EQUAL(to_dsv(box), expected);
+
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ bg::expand(box, boost::variant<Geometry>(geometry));
+
+ BOOST_CHECK_EQUAL(to_dsv(box), expected);
+#endif
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/equals/Jamfile b/src/boost/libs/geometry/test/algorithms/equals/Jamfile
new file mode 100644
index 000000000..f128597e2
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/equals/Jamfile
@@ -0,0 +1,22 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-equals
+ :
+ [ run equals.cpp : : : : algorithms_equals ]
+ [ run equals_multi.cpp : : : : algorithms_equals_multi ]
+ [ run equals_on_spheroid.cpp : : : : algorithms_equals_on_spheroid ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/equals/equals.cpp b/src/boost/libs/geometry/test/algorithms/equals/equals.cpp
new file mode 100644
index 000000000..c96b6015f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/equals/equals.cpp
@@ -0,0 +1,318 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2013, 2014.
+// Modifications copyright (c) 2013-2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_equals.hpp"
+
+#include <boost/type_traits/is_floating_point.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+namespace bgm = bg::model;
+
+template <typename P>
+void test_pointlike()
+{
+ typedef bgm::multi_point<P> mpt;
+
+ test_geometry<P, P>("ptpt2d_1", "POINT(0 0)", "POINT(0 0)", true);
+ test_geometry<P, P>("ptpt2d_2", "POINT(0 0)", "POINT(1 1)", false);
+
+ test_geometry<P, mpt>("ptmpt2d_1", "POINT(0 0)", "MULTIPOINT(0 0)", true);
+ test_geometry<P, mpt>("ptmpt2d_1", "POINT(0 0)", "MULTIPOINT(0 0, 1 1)", false);
+
+ test_geometry<mpt, P>("mptpt2d_1", "MULTIPOINT(0 0)", "POINT(0 0)", true);
+ test_geometry<mpt, P>("mptpt2d_1", "MULTIPOINT(0 0, 1 1)", "POINT(0 0)", false);
+
+ test_geometry<mpt, mpt>("mptmpt2d_1", "MULTIPOINT(0 0, 1 1)", "MULTIPOINT(0 0, 1 1)", true);
+ test_geometry<mpt, mpt>("mptmpt2d_1", "MULTIPOINT(0 0, 1 1)", "MULTIPOINT(0 0, 2 2)", false);
+ test_geometry<mpt, mpt>("mptmpt2d_1", "MULTIPOINT(0 0, 1 1)", "MULTIPOINT(2 2, 3 3)", false);
+}
+
+template <typename P>
+void test_segment_segment()
+{
+ typedef bgm::segment<P> seg;
+
+ test_geometry<seg, seg>("seg2d_1", "LINESTRING(0 0, 3 3)", "LINESTRING(0 0, 3 3)", true);
+ test_geometry<seg, seg>("seg2d_1", "LINESTRING(0 0, 3 3)", "LINESTRING(3 3, 0 0)", true);
+
+ test_geometry<seg, seg>("seg2d_1", "LINESTRING(0 0, 3 3)", "LINESTRING(0 0, 1 1)", false);
+ test_geometry<seg, seg>("seg2d_1", "LINESTRING(0 0, 3 3)", "LINESTRING(3 3, 2 2)", false);
+
+ test_geometry<seg, seg>("seg2d_1", "LINESTRING(0 0, 3 3)", "LINESTRING(1 1, 4 4)", false);
+ test_geometry<seg, seg>("seg2d_1", "LINESTRING(0 0, 3 3)", "LINESTRING(1 0, 2 0)", false);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bgm::linestring<P> ls;
+
+ test_geometry<ls, ls>("ls2d_1", "LINESTRING(1 1, 3 3)", "LINESTRING(3 3, 1 1)", true);
+ test_geometry<ls, ls>("ls2d_2", "LINESTRING(1 1, 3 3, 2 5)", "LINESTRING(1 1, 2 2, 3 3, 2 5)", true);
+ test_geometry<ls, ls>("ls2d_3", "LINESTRING(1 0, 3 3, 2 5)", "LINESTRING(1 1, 2 2, 3 3, 2 5)", false);
+ test_geometry<ls, ls>("ls2d_4", "LINESTRING(1 0, 3 3, 2 5)", "LINESTRING(1 1, 3 3, 2 5)", false);
+ test_geometry<ls, ls>("ls2d_5", "LINESTRING(0 5,5 5,10 5,10 0,5 0,5 5,5 10,10 10,15 10,15 5,10 5,10 10,10 15)",
+ "LINESTRING(0 5,15 5,15 10,5 10,5 0,10 0,10 15)", true);
+ test_geometry<ls, ls>("ls2d_6", "LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,5 0)", "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", true);
+ test_geometry<ls, ls>("ls2d_7", "LINESTRING(0 5,10 5,10 10,5 10,5 0)", "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", true);
+ test_geometry<ls, ls>("ls2d_8", "LINESTRING(0 0,5 0,5 0,6 0)", "LINESTRING(0 0,6 0)", true);
+
+ test_geometry<ls, ls>("ls2d_seg", "LINESTRING(1 1,2 2)", "LINESTRING(1 1,2 2)", true);
+ test_geometry<ls, ls>("ls2d_rev", "LINESTRING(1 1,2 2)", "LINESTRING(2 2,1 1)", true);
+
+ test_geometry<ls, ls>("ls2d_spike", "LINESTRING(0 0,5 0,3 0,6 0)", "LINESTRING(0 0,6 0)", true);
+
+ test_geometry<ls, ls>("ls2d_ring1", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "LINESTRING(5 5,0 5,0 0,5 0,5 5)", true);
+ test_geometry<ls, ls>("ls2d_ring2", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "LINESTRING(5 5,5 0,0 0,0 5,5 5)", true);
+ test_geometry<ls, ls>("ls2d_overl_ring1", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "LINESTRING(5 5,0 5,0 0,5 0,5 5,0 5)", true);
+ test_geometry<ls, ls>("ls2d_overl_ring2", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "LINESTRING(5 5,5 0,0 0,0 5,5 5,5 0)", true);
+
+ // https://svn.boost.org/trac/boost/ticket/10904
+ if ( BOOST_GEOMETRY_CONDITION(
+ boost::is_floating_point<typename bg::coordinate_type<ls>::type>::value ) )
+ {
+ test_geometry<ls, ls>("ls2d_small1",
+ "LINESTRING(5.6956521739130430148634331999347 -0.60869565217391330413931882503675,5.5 -0.50000000000000066613381477509392)",
+ "LINESTRING(5.5 -0.50000000000000066613381477509392,5.5 -0.5)",
+ false);
+
+ test_geometry<ls, ls>("ls2d_small2",
+ "LINESTRING(-3.2333333333333333925452279800083 5.5999999999999978683717927196994,-3.2333333333333333925452279800083 5.5999999999999996447286321199499)",
+ "LINESTRING(-3.2333333333333325043668082798831 5.5999999999999996447286321199499,-3.2333333333333333925452279800083 5.5999999999999996447286321199499)",
+ false);
+ }
+}
+
+template <typename P>
+void test_linestring_multilinestring()
+{
+ typedef bgm::linestring<P> ls;
+ typedef bgm::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("ls_mls_1", "LINESTRING(0 0,1 0,2 0)", "MULTILINESTRING((0 0,2 0))", true);
+ test_geometry<ls, mls>("ls_mls_1", "LINESTRING(0 0,1 0,2 0)", "MULTILINESTRING((0 0,1 0),(1 0,2 0))", true);
+ test_geometry<ls, mls>("ls_mls_1", "LINESTRING(0 0,2 0,4 0)", "MULTILINESTRING((0 0,2 0),(2 0,3 0),(3 0,4 0))", true);
+ test_geometry<ls, mls>("ls_mls_1", "LINESTRING(0 0,2 0,4 0)", "MULTILINESTRING((0 0,2 0),(2 0,3 0),(2 0,3 0),(3 0,4 0))", true);
+ test_geometry<ls, mls>("ls_mls_1", "LINESTRING(0 0,2 0,4 0)", "MULTILINESTRING((0 0,2 0),(3 0,4 0))", false);
+
+ test_geometry<ls, mls>("ls_mls_spike", "LINESTRING(0 0,2 0,2 2,2 0,4 0)", "MULTILINESTRING((0 0,4 0),(2 2,2 0))", true);
+ test_geometry<ls, mls>("ls_mls_spike", "LINESTRING(0 0,2 0,2 2,2 0,4 0)", "MULTILINESTRING((0 0,4 0),(2 2,2 -1))", false);
+
+ test_geometry<ls, mls>("ls_mls_ring1", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))", true);
+ test_geometry<ls, mls>("ls_mls_ring2", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "MULTILINESTRING((5 5,5 0,0 0),(0 0,0 5,5 5))", true);
+ test_geometry<ls, mls>("ls_mls_overl_ring1", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5,0 5))", true);
+ test_geometry<ls, mls>("ls_mls_overl_ring2", "LINESTRING(0 0,5 0,5 5,0 5,0 0)", "MULTILINESTRING((5 5,5 0,0 0),(0 0,0 5,5 5,5 0))", true);
+}
+
+template <typename P>
+void test_multilinestring_multilinestring()
+{
+ typedef bgm::linestring<P> ls;
+ typedef bgm::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("ls_mls_mls",
+ "MULTILINESTRING((0 5,10 5,10 10,5 10),(5 10,5 0,5 2),(5 2,5 5,0 5))",
+ "MULTILINESTRING((5 5,0 5),(5 5,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ true);
+}
+
+template <typename P>
+void test_polygons()
+{
+ typedef bg::model::polygon<P, true, true> poly_cw_c;
+ typedef bg::model::polygon<P, true, false> poly_cw_o;
+ typedef bg::model::polygon<P, false, true> poly_ccw_c;
+ typedef bg::model::polygon<P, false, false> poly_ccw_o;
+ typedef bg::model::box<P> box;
+
+ std::string wkt1 = "POLYGON((-18 1, -23 1, -23 -3, -18 -3))";
+ std::string wkt2 = "POLYGON((-23 1, -23 -3, -18 -3, -18 1))";
+
+ test_geometry<poly_cw_c, poly_cw_c>("polys_cw_c_cw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_c, poly_cw_o>("polys_cw_c_cw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_c, poly_ccw_c>("polys_cw_c_ccw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_c, poly_ccw_o>("polys_cw_c_ccw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_c, box>("polys_cw_c_box", wkt1, wkt2, true, true);
+
+ test_geometry<poly_cw_o, poly_cw_c>("polys_cw_o_cw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_o, poly_cw_o>("polys_cw_o_cw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_o, poly_ccw_c>("polys_cw_o_ccw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_o, poly_ccw_o>("polys_cw_o_ccw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_cw_o, box>("polys_cw_o_box", wkt1, wkt2, true, true);
+
+ test_geometry<poly_ccw_c, poly_cw_c>("polys_ccw_c_cw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_c, poly_cw_o>("polys_ccw_c_cw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_c, poly_ccw_c>("polys_ccw_c_ccw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_c, poly_ccw_o>("polys_ccw_c_ccw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_c, box>("polys_cw_o_box", wkt1, wkt2, true, true);
+
+ test_geometry<poly_ccw_o, poly_cw_c>("polys_ccw_o_cw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_o, poly_cw_o>("polys_ccw_o_cw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_o, poly_ccw_c>("polys_ccw_o_ccw_c", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_o, poly_ccw_o>("polys_ccw_o_ccw_o", wkt1, wkt2, true, true);
+ test_geometry<poly_ccw_o, box>("polys_ccw_o_box", wkt1, wkt2, true, true);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::box<P> box;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> polygon;
+ //typedef bg::model::linestring<P> linestring;
+
+ std::string case_p1 = "POLYGON((0 0,0 2,2 2,0 0))";
+
+ test_geometry<P, P>("p1", "POINT(1 1)", "POINT(1 1)", true);
+ test_geometry<P, P>("p2", "POINT(1 1)", "POINT(1 2)", false);
+ test_geometry<box, box>("b1", "BOX(1 1,2 2)", "BOX(1 2,2 2)", false);
+ test_geometry<box, box>("b1", "BOX(1 2,3 4)", "BOX(1 2,3 4)", true);
+
+ // Completely equal
+ test_geometry<ring, ring>("poly_eq", case_p1, case_p1, true);
+
+ // Shifted
+ test_geometry<ring, ring>("poly_sh", "POLYGON((2 2,0 0,0 2,2 2))", case_p1, true);
+ test_geometry<polygon, polygon>("poly_sh2", case_p1, "POLYGON((0 2,2 2,0 0,0 2))", true);
+
+ // Extra coordinate
+ test_geometry<ring, ring>("poly_extra", case_p1, "POLYGON((0 0,0 2,2 2,1 1,0 0))", true);
+
+ // Shifted + extra (redundant) coordinate
+ test_geometry<ring, ring>("poly_shifted_extra1", "POLYGON((2 2,1 1,0 0,0 2,2 2))", case_p1, true);
+
+ // Shifted + extra (redundant) coordinate being first/last point
+ test_geometry<ring, ring>("poly_shifted_extra2", "POLYGON((1 1,0 0,0 2,2 2,1 1))", case_p1, true);
+
+ // Degenerate (duplicate) points
+ test_geometry<ring, ring>("poly_degenerate", "POLYGON((0 0,0 2,2 2,2 2,0 0))", "POLYGON((0 0,0 2,0 2,2 2,0 0))", true);
+
+ // Two different bends, same area, unequal
+ test_geometry<ring, ring>("poly_bends",
+ "POLYGON((4 0,5 3,8 4,7 7,4 8,0 4,4 0))",
+ "POLYGON((4 0,7 1,8 4,5 5,4 8,0 4,4 0))", false);
+
+ // Unequal (but same area)
+ test_geometry<ring, ring>("poly_uneq", case_p1, "POLYGON((1 1,1 3,3 3,1 1))", false);
+
+ // One having hole
+ test_geometry<polygon, polygon>("poly_hole", "POLYGON((0 0,0 4,4 4,0 0))", "POLYGON((0 0,0 4,4 4,0 0),(1 1,2 1,2 2,1 2,1 1))", false);
+
+ // Both having holes
+ test_geometry<polygon, polygon>("poly_holes",
+ "POLYGON((0 0,0 4,4 4,0 0),(1 1,2 1,2 2,1 2,1 1))",
+ "POLYGON((0 0,0 4,4 4,0 0),(1 1,2 1,2 2,1 2,1 1))", true);
+
+ // Both having holes, outer equal, inner not equal
+ test_geometry<polygon, polygon>("poly_uneq_holes",
+ "POLYGON((0 0,0 4,4 4,0 0),(1 1,2 1,2 2,1 2,1 1))",
+ "POLYGON((0 0,0 4,4 4,0 0),(2 2,3 2,3 3,2 3,2 2))", false);
+
+ // Both having 2 holes, equal but in different order
+ test_geometry<polygon, polygon>("poly_holes_diff_order",
+ "POLYGON((0 0,0 4,4 4,0 0),(1 1,2 1,2 2,1 2,1 1),(2 2,3 2,3 3,2 3,2 2))",
+ "POLYGON((0 0,0 4,4 4,0 0),(2 2,3 2,3 3,2 3,2 2),(1 1,2 1,2 2,1 2,1 1))", true);
+
+ // Both having 3 holes, equal but in different order
+ test_geometry<polygon, polygon>("poly_holes_diff_order_3",
+ "POLYGON((0 0,0 10,10 10,0 0),(1 1,2 1,2 2,1 2,1 1),(4 1,5 1,5 2,4 2,4 1),(2 2,3 2,3 3,2 3,2 2))",
+ "POLYGON((0 0,0 10,10 10,0 0),(4 1,5 1,5 2,4 2,4 1),(2 2,3 2,3 3,2 3,2 2),(1 1,2 1,2 2,1 2,1 1))", true);
+
+ // polygon/ring vv
+ test_geometry<polygon, ring>("poly_sh2_pr", case_p1, case_p1, true);
+ test_geometry<ring, polygon>("poly_sh2_rp", case_p1, case_p1, true);
+
+ // box/ring/poly
+ test_geometry<box, ring>("boxring1", "BOX(1 1,2 2)", "POLYGON((1 1,1 2,2 2,2 1,1 1))", true);
+ test_geometry<ring, box>("boxring2", "POLYGON((1 1,1 2,2 2,2 1,1 1))", "BOX(1 1,2 2)", true);
+ test_geometry<box, polygon>("boxpoly1", "BOX(1 1,2 2)", "POLYGON((1 1,1 2,2 2,2 1,1 1))", true);
+ test_geometry<polygon, box>("boxpoly2", "POLYGON((1 1,1 2,2 2,2 1,1 1))", "BOX(1 1,2 2)", true);
+
+ test_geometry<polygon, box>("boxpoly2", "POLYGON((1 1,1 2,2 2,2 1,1 1))", "BOX(1 1,2 3)", false);
+
+ test_geometry<polygon, polygon>("poly_holes_shifted_points",
+ "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,2 1,2 2,1 2,1 1))",
+ "POLYGON((0 0,0 3,3 3,3 0,0 0),(2 2,1 2,1 1,2 1,2 2))", true);
+
+ test_pointlike<P>();
+ test_segment_segment<P>();
+ test_linestring_linestring<P>();
+ test_linestring_multilinestring<P>();
+ test_multilinestring_multilinestring<P>();
+ test_polygons<P>();
+}
+
+
+template <typename T>
+void verify()
+{
+ T dxn1, dyn1, dxn2, dyn2;
+
+ {
+ T x1 = "0", y1 = "0", x2 = "3", y2 = "3";
+ T dx = x2 - x1, dy = y2 - y1;
+ T mag = sqrt(dx * dx + dy * dy);
+ dxn1 = dx / mag;
+ dyn1 = dy / mag;
+ }
+
+ {
+ T x1 = "0", y1 = "0", x2 = "1", y2 = "1";
+ T dx = x2 - x1, dy = y2 - y1;
+ T mag = sqrt(dx * dx + dy * dy);
+ dxn2 = dx / mag;
+ dyn2 = dy / mag;
+ }
+
+ if (dxn1 == dxn2 && dyn1 == dyn2)
+ {
+ //std::cout << "vectors are equal, using ==" << std::endl;
+ }
+ if (boost::geometry::math::equals(dxn1, dxn2)
+ && boost::geometry::math::equals(dyn1, dyn2))
+ {
+ //std::cout << "vectors are equal, using bg::math::equals" << std::endl;
+ }
+
+ bool equals = boost::geometry::math::equals_with_epsilon(dxn1, dxn2)
+ && boost::geometry::math::equals_with_epsilon(dyn1, dyn2);
+
+ if (equals)
+ {
+ //std::cout << "vectors are equal, using bg::math::equals_with_epsilon" << std::endl;
+ }
+
+ BOOST_CHECK_EQUAL(equals, true);
+}
+
+
+int test_main( int , char* [] )
+{
+ //verify<double>();
+#if defined(HAVE_TTMATH)
+ verify<ttmath_big>();
+#endif
+
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/equals/equals_multi.cpp b/src/boost/libs/geometry/test/algorithms/equals/equals_multi.cpp
new file mode 100644
index 000000000..6984f29e5
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/equals/equals_multi.cpp
@@ -0,0 +1,52 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_equals.hpp"
+
+#include <boost/geometry/algorithms/area.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ std::string case1 = "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)))";
+ std::string case1_p = "POLYGON((0 0,0 7,4 2,2 0,0 0))";
+
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+ test_geometry<mp, mp>("c1", case1, case1, true);
+
+ test_geometry<mp, mp>("c2",
+ "MULTIPOLYGON(((0 0,0 7.01,4 2,2 0,0 0)))",
+ case1, false);
+
+ // Different order == equal
+ test_geometry<mp, mp>("c3",
+ "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)),((10 10,10 12,12 10,10 10)))",
+ "MULTIPOLYGON(((10 10,10 12,12 10,10 10)),((0 0,0 7,4 2,2 0,0 0)))",
+ true);
+
+ // check different types
+ test_geometry<polygon, mp>("c1_p_mp", case1_p, case1, true);
+ test_geometry<mp, polygon>("c1_mp_p", case1, case1_p, true);
+
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/equals/equals_on_spheroid.cpp b/src/boost/libs/geometry/test/algorithms/equals/equals_on_spheroid.cpp
new file mode 100644
index 000000000..5e24fdfab
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/equals/equals_on_spheroid.cpp
@@ -0,0 +1,255 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_equals_on_spheroid
+#endif
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_equals.hpp"
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+
+namespace bgm = bg::model;
+
+template <typename P1, typename P2 = P1>
+struct test_point_point
+{
+ static inline void apply(std::string const& header)
+ {
+ std::string const str = header + "-";
+
+ test_geometry<P1, P2>(str + "pp_01", "POINT(0 0)", "POINT(0 0)", true);
+ test_geometry<P1, P2>(str + "pp_02", "POINT(0 0)", "POINT(10 0)", false);
+
+ // points whose longitudes differ by 360 degrees
+ test_geometry<P1, P2>(str + "pp_03", "POINT(0 0)", "POINT(360 0)", true);
+ test_geometry<P1, P2>(str + "pp_04", "POINT(10 0)", "POINT(370 0)", true);
+ test_geometry<P1, P2>(str + "pp_05", "POINT(10 0)", "POINT(-350 0)", true);
+ test_geometry<P1, P2>(str + "pp_06", "POINT(180 10)", "POINT(-180 10)", true);
+ test_geometry<P1, P2>(str + "pp_06a", "POINT(540 10)", "POINT(-540 10)", true);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ test_geometry<P1, P2>(str + "pp_06b", "POINT(540 370)", "POINT(-540 -350)", true);
+ test_geometry<P1, P2>(str + "pp_06c", "POINT(1260 370)", "POINT(-1260 -350)", true);
+ test_geometry<P1, P2>(str + "pp_06d", "POINT(2340 370)", "POINT(-2340 -350)", true);
+#endif
+
+ test_geometry<P1, P2>(str + "pp_06e", "POINT(-180 10)", "POINT(-540 10)", true);
+ test_geometry<P1, P2>(str + "pp_06f", "POINT(180 10)", "POINT(-540 10)", true);
+
+ // north & south pole
+ test_geometry<P1, P2>(str + "pp_07", "POINT(0 90)", "POINT(0 90)", true);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ test_geometry<P1, P2>(str + "pp_07a", "POINT(0 450)", "POINT(10 -270)", true);
+ test_geometry<P1, P2>(str + "pp_07b", "POINT(0 270)", "POINT(10 90)", false);
+ test_geometry<P1, P2>(str + "pp_07c", "POINT(0 -450)", "POINT(10 90)", false);
+#endif
+
+ test_geometry<P1, P2>(str + "pp_08", "POINT(0 90)", "POINT(10 90)", true);
+ test_geometry<P1, P2>(str + "pp_09", "POINT(0 90)", "POINT(0 -90)", false);
+ test_geometry<P1, P2>(str + "pp_10", "POINT(0 -90)", "POINT(0 -90)", true);
+ test_geometry<P1, P2>(str + "pp_11", "POINT(0 -90)", "POINT(10 -90)", true);
+ test_geometry<P1, P2>(str + "pp_11a", "POINT(0 -90)", "POINT(10 90)", false);
+ test_geometry<P1, P2>(str + "pp_12", "POINT(0 -90)", "POINT(0 -85)", false);
+ test_geometry<P1, P2>(str + "pp_13", "POINT(0 90)", "POINT(0 85)", false);
+ test_geometry<P1, P2>(str + "pp_14", "POINT(0 90)", "POINT(10 85)", false);
+
+ // symmetric wrt prime meridian
+ test_geometry<P1, P2>(str + "pp_15", "POINT(-10 45)", "POINT(10 45)", false);
+ test_geometry<P1, P2>(str + "pp_16", "POINT(-170 45)", "POINT(170 45)", false);
+
+ // other points
+ test_geometry<P1, P2>(str + "pp_17", "POINT(-10 45)", "POINT(10 -45)", false);
+ test_geometry<P1, P2>(str + "pp_18", "POINT(-10 -45)", "POINT(10 45)", false);
+ test_geometry<P1, P2>(str + "pp_19", "POINT(10 -135)", "POINT(10 45)", false);
+
+#ifdef BOOST_GEOMETRY_NORMALIZE_LATITUDE
+ test_geometry<P1, P2>(str + "pp_20", "POINT(190 135)", "POINT(10 45)", true);
+ test_geometry<P1, P2>(str + "pp_21", "POINT(190 150)", "POINT(10 30)", true);
+ test_geometry<P1, P2>(str + "pp_21a", "POINT(-170 150)", "POINT(10 30)", true);
+ test_geometry<P1, P2>(str + "pp_22", "POINT(190 -135)", "POINT(10 -45)", true);
+ test_geometry<P1, P2>(str + "pp_23", "POINT(190 -150)", "POINT(10 -30)", true);
+ test_geometry<P1, P2>(str + "pp_23a", "POINT(-170 -150)", "POINT(10 -30)", true);
+#endif
+ }
+};
+
+
+template <typename P1, typename P2 = P1>
+struct test_point_point_with_height
+{
+ static inline void apply(std::string const& header)
+ {
+ std::string const str = header + "-";
+
+ test_geometry<P1, P2>(str + "pp_01",
+ "POINT(0 0 10)",
+ "POINT(0 0 20)",
+ true);
+
+ test_geometry<P1, P2>(str + "pp_02",
+ "POINT(0 0 10)",
+ "POINT(10 0 10)",
+ false);
+
+ // points whose longitudes differ by 360 degrees
+ test_geometry<P1, P2>(str + "pp_03",
+ "POINT(0 0 10)",
+ "POINT(360 0 10)",
+ true);
+
+ // points whose longitudes differ by 360 degrees
+ test_geometry<P1, P2>(str + "pp_04",
+ "POINT(10 0 10)",
+ "POINT(370 0 10)",
+ true);
+
+ test_geometry<P1, P2>(str + "pp_05",
+ "POINT(10 0 10)",
+ "POINT(10 0 370)",
+ false);
+ }
+};
+
+
+template <typename P>
+void test_segment_segment(std::string const& header)
+{
+ typedef bgm::segment<P> seg;
+
+ std::string const str = header + "-";
+
+ test_geometry<seg, seg>(str + "ss_01",
+ "SEGMENT(10 0,180 0)",
+ "SEGMENT(10 0,-180 0)",
+ true);
+ test_geometry<seg, seg>(str + "ss_02",
+ "SEGMENT(0 90,180 0)",
+ "SEGMENT(10 90,-180 0)",
+ true);
+ test_geometry<seg, seg>(str + "ss_03",
+ "SEGMENT(0 90,0 -90)",
+ "SEGMENT(10 90,20 -90)",
+ true);
+ test_geometry<seg, seg>(str + "ss_04",
+ "SEGMENT(10 80,10 -80)",
+ "SEGMENT(10 80,20 -80)",
+ false);
+ test_geometry<seg, seg>(str + "ss_05",
+ "SEGMENT(170 10,-170 10)",
+ "SEGMENT(170 10,350 10)",
+ false);
+}
+
+
+BOOST_AUTO_TEST_CASE( equals_point_point_se )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> cs_type;
+
+ test_point_point<bgm::point<int, 2, cs_type> >::apply("se");
+ test_point_point<bgm::point<double, 2, cs_type> >::apply("se");
+ test_point_point<bgm::point<long double, 2, cs_type> >::apply("se");
+
+ // mixed point types
+ test_point_point
+ <
+ bgm::point<double, 2, cs_type>, bgm::point<int, 2, cs_type>
+ >::apply("se");
+
+ test_point_point
+ <
+ bgm::point<double, 2, cs_type>, bgm::point<long double, 2, cs_type>
+ >::apply("se");
+
+#if defined(HAVE_TTMATH)
+ test_point_point<bgm::point<ttmath_big, 2, cs_type> >::apply("se");
+#endif
+}
+
+BOOST_AUTO_TEST_CASE( equals_point_point_with_height_se )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> cs_type;
+
+ test_point_point<bgm::point<int, 3, cs_type> >::apply("seh");
+ test_point_point<bgm::point<double, 3, cs_type> >::apply("seh");
+ test_point_point<bgm::point<long double, 3, cs_type> >::apply("seh");
+
+ // mixed point types
+ test_point_point
+ <
+ bgm::point<double, 3, cs_type>, bgm::point<int, 3, cs_type>
+ >::apply("seh");
+
+ test_point_point
+ <
+ bgm::point<double, 3, cs_type>, bgm::point<long double, 3, cs_type>
+ >::apply("seh");
+
+#if defined(HAVE_TTMATH)
+ test_point_point<bgm::point<ttmath_big, 3, cs_type> >::apply("seh");
+#endif
+}
+
+BOOST_AUTO_TEST_CASE( equals_point_point_geo )
+{
+ typedef bg::cs::geographic<bg::degree> cs_type;
+
+ test_point_point<bgm::point<int, 2, cs_type> >::apply("geo");
+ test_point_point<bgm::point<double, 2, cs_type> >::apply("geo");
+ test_point_point<bgm::point<long double, 2, cs_type> >::apply("geo");
+
+ // mixed point types
+ test_point_point
+ <
+ bgm::point<double, 2, cs_type>, bgm::point<int, 2, cs_type>
+ >::apply("se");
+
+ test_point_point
+ <
+ bgm::point<double, 2, cs_type>, bgm::point<long double, 2, cs_type>
+ >::apply("se");
+
+#if defined(HAVE_TTMATH)
+ test_point_point<bgm::point<ttmath_big, 2, cs_type> >::apply("geo");
+#endif
+}
+
+BOOST_AUTO_TEST_CASE( equals_segment_segment_se )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> cs_type;
+
+ test_segment_segment<bgm::point<int, 2, cs_type> >("se");
+ test_segment_segment<bgm::point<double, 2, cs_type> >("se");
+ test_segment_segment<bgm::point<long double, 2, cs_type> >("se");
+
+#if defined(HAVE_TTMATH)
+ test_segment_segment<bgm::point<ttmath_big, 2, cs_type> >("se");
+#endif
+}
+
+BOOST_AUTO_TEST_CASE( equals_segment_segment_geo )
+{
+ typedef bg::cs::geographic<bg::degree> cs_type;
+
+ test_segment_segment<bgm::point<int, 2, cs_type> >("geo");
+ test_segment_segment<bgm::point<double, 2, cs_type> >("geo");
+ test_segment_segment<bgm::point<long double, 2, cs_type> >("geo");
+
+#if defined(HAVE_TTMATH)
+ test_segment_segment<bgm::point<ttmath_big, 2, cs_type> >("geo");
+#endif
+}
diff --git a/src/boost/libs/geometry/test/algorithms/equals/equals_sph.cpp b/src/boost/libs/geometry/test/algorithms/equals/equals_sph.cpp
new file mode 100644
index 000000000..05e8b8344
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/equals/equals_sph.cpp
@@ -0,0 +1,155 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_equals.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<poly, ring>(case_1[0], case_1[0],
+ true);
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ false);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ false);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ false);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ false);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ false);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ true);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ false);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ false);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ false);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ false);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ false);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ false);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ false);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ false);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ false);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ false);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ false);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ false);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ false);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ false);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ false);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false);
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ false);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/equals/test_equals.hpp b/src/boost/libs/geometry/test/algorithms/equals/test_equals.hpp
new file mode 100644
index 000000000..5eced7f90
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/equals/test_equals.hpp
@@ -0,0 +1,115 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2014-2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2016-2017.
+// Modifications copyright (c) 2016-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_EQUALS_HPP
+#define BOOST_GEOMETRY_TEST_EQUALS_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/variant/variant.hpp>
+
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_equals(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::equals(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_equals(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::equals(geometry1, geometry2);
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void check_geometry(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& caseid,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_equals(geometry1, geometry2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "case: " << caseid
+ << " equals: " << wkt1
+ << " to " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ detected = call_equals(geometry2, geometry1, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "case: " << caseid
+ << " equals: " << wkt2
+ << " to " << wkt1
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& caseid,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ bool correct_geometries = false)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ if (correct_geometries)
+ {
+ bg::correct(geometry1);
+ bg::correct(geometry2);
+ }
+
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+
+ check_geometry(geometry1, geometry2, caseid, wkt1, wkt2, expected, no_strategy());
+ check_geometry(geometry1, geometry2, caseid, wkt1, wkt2, expected, strategy_type());
+ check_geometry(boost::variant<Geometry1>(geometry1), geometry2, caseid, wkt1, wkt2, expected, no_strategy());
+ check_geometry(geometry1, boost::variant<Geometry2>(geometry2), caseid, wkt1, wkt2, expected, no_strategy());
+ check_geometry(boost::variant<Geometry1>(geometry1), boost::variant<Geometry2>(geometry2), caseid, wkt1, wkt2, expected, no_strategy());
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected)
+{
+ test_geometry<Geometry1, Geometry2>("", wkt1, wkt2, expected);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/for_each.cpp b/src/boost/libs/geometry/test/algorithms/for_each.cpp
new file mode 100644
index 000000000..5e8be1227
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/for_each.cpp
@@ -0,0 +1,130 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/test_for_each.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<P>
+ (
+ "POINT(1 1)"
+
+ // per point
+ , 1
+ , "POINT(101 1)"
+ , "POINT(101 100)"
+ // per segment
+ , ""
+ , 0
+ , "POINT(1 1)"
+ );
+ test_geometry<bg::model::linestring<P> >
+ (
+ "LINESTRING(1 1,2 2)"
+
+ , 3
+ , "LINESTRING(101 1,102 2)"
+ , "LINESTRING(101 100,102 200)"
+
+ , "((1, 1), (2, 2))"
+ , std::sqrt(2.0)
+ , "LINESTRING(10 1,2 2)"
+ );
+ test_geometry<bg::model::linestring<P> >
+ (
+ "LINESTRING EMPTY"
+
+ , 0
+ , "LINESTRING()"
+ , "LINESTRING()"
+
+ , ""
+ , 0
+ , "LINESTRING()"
+ );
+ test_geometry<bg::model::ring<P> >
+ (
+ "POLYGON((1 1,1 4,4 4,4 1,1 1))"
+
+ , 11
+ , "POLYGON((101 1,101 4,104 4,104 1,101 1))"
+ , "POLYGON((101 100,101 400,104 400,104 100,101 100))"
+
+ , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
+ , 4 * 3.0
+ , "POLYGON((10 1,10 4,4 4,4 1,1 1))"
+ );
+ test_geometry<bg::model::ring<P> >
+ (
+ "POLYGON EMPTY"
+
+ , 0
+ , "POLYGON(())"
+ , "POLYGON(())"
+
+ , ""
+ , 0
+ , "POLYGON(())"
+ );
+ test_geometry<bg::model::ring<P, true, false> > // open ring
+ (
+ "POLYGON((1 1,1 4,4 4,4 1))"
+
+ , 10
+ , "POLYGON((101 1,101 4,104 4,104 1))"
+ , "POLYGON((101 100,101 400,104 400,104 100))"
+
+ , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
+ , 4 * 3.0
+ , "POLYGON((10 1,10 4,4 4,4 1))"
+ );
+ test_geometry<bg::model::polygon<P> >
+ (
+ "POLYGON((1 1,1 4,4 4,4 1,1 1),(2 2,3 2,3 3,2 3,2 2))"
+
+ , 23
+ , "POLYGON((101 1,101 4,104 4,104 1,101 1),(102 2,103 2,103 3,102 3,102 2))"
+ , "POLYGON((101 100,101 400,104 400,104 100,101 100),(102 200,103 200,103 300,102 300,102 200))"
+
+ , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1)) "
+ "((2, 2), (3, 2)) ((3, 2), (3, 3)) ((3, 3), (2, 3)) ((2, 3), (2, 2))"
+ , 4 * 3.0 + 4 * 1.0
+ , "POLYGON((10 1,10 4,4 4,4 1,1 1,10 1),(2 2,3 2,3 3,2 3,2 2))"
+ );
+ test_geometry<bg::model::polygon<P, true, false> > // open polygon
+ (
+ "POLYGON((1 1,1 4,4 4,4 1),(2 2,3 2,3 3,2 3))"
+
+ , 20
+ , "POLYGON((101 1,101 4,104 4,104 1,101 1),(102 2,103 2,103 3,102 3,102 2))"
+ , "POLYGON((101 100,101 400,104 400,104 100,101 100),(102 200,103 200,103 300,102 300,102 200))"
+
+ , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1)) "
+ "((2, 2), (3, 2)) ((3, 2), (3, 3)) ((3, 3), (2, 3)) ((2, 3), (2, 2))"
+ , 4 * 3.0 + 4 * 1.0
+ , "POLYGON((10 1,10 4,4 4,4 1,10 1),(2 2,3 2,3 3,2 3,2 2))"
+ );
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/for_each_multi.cpp b/src/boost/libs/geometry/test/algorithms/for_each_multi.cpp
new file mode 100644
index 000000000..e9c02b685
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/for_each_multi.cpp
@@ -0,0 +1,97 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/for_each.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <algorithms/test_for_each.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::multi_point<P> >
+ (
+ "MULTIPOINT((1 1))"
+
+ // per point
+ , 1
+ , "MULTIPOINT((101 1))"
+ , "MULTIPOINT((101 100))"
+ // per segment
+ , ""
+ , 0
+ , "MULTIPOINT((1 1))"
+ );
+
+ test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >
+ (
+ "MULTILINESTRING((1 1,2 2))"
+
+ , 3
+ , "MULTILINESTRING((101 1,102 2))"
+ , "MULTILINESTRING((101 100,102 200))"
+
+ , "((1, 1), (2, 2))"
+ , std::sqrt(2.0)
+ , "MULTILINESTRING((10 1,2 2))"
+ );
+
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+ test_geometry<mp>
+ (
+ "MULTIPOLYGON(((1 1,1 4,4 4,4 1,1 1)))"
+
+ , 11
+ , "MULTIPOLYGON(((101 1,101 4,104 4,104 1,101 1)))"
+ , "MULTIPOLYGON(((101 100,101 400,104 400,104 100,101 100)))"
+
+ , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
+ , 4 * 3.0
+ , "MULTIPOLYGON(((10 1,10 4,4 4,4 1,1 1,10 1)))"
+ );
+
+ // open multipolygon
+ typedef bg::model::multi_polygon<bg::model::polygon<P, true, false> > omp;
+ test_geometry<omp>
+ (
+ "MULTIPOLYGON(((1 1,1 4,4 4,4 1)))"
+
+ , 10
+ , "MULTIPOLYGON(((101 1,101 4,104 4,104 1,101 1)))"
+ , "MULTIPOLYGON(((101 100,101 400,104 400,104 100,101 100)))"
+
+ , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
+ , 4 * 3.0
+ , "MULTIPOLYGON(((10 1,10 4,4 4,4 1,10 1)))"
+ );
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/Jamfile b/src/boost/libs/geometry/test/algorithms/intersects/Jamfile
new file mode 100644
index 000000000..cf8800bb7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/Jamfile
@@ -0,0 +1,26 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-intersects
+ :
+ [ run intersects.cpp : : : : algorithms_intersects ]
+ [ run intersects_box_geometry.cpp : : : : algorithms_intersects_box_geometry ]
+ [ run intersects_multi.cpp : : : : algorithms_intersects_multi ]
+ [ run intersects_self.cpp : : : : algorithms_intersects_self ]
+ [ run intersects_sph_geo.cpp : : : : algorithms_intersects_sph_geo ]
+ [ run intersects_sph.cpp : : : : algorithms_intersects_sph ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/intersects.cpp b/src/boost/libs/geometry/test/algorithms/intersects/intersects.cpp
new file mode 100644
index 000000000..a24872493
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/intersects.cpp
@@ -0,0 +1,227 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2013, 2015, 2016.
+// Modifications copyright (c) 2013-2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_intersects.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/util/rational.hpp>
+
+template <typename P1, typename P2>
+void test_intersects_polygon_polygon()
+{
+ typedef bg::model::polygon<P1, false, false> poly_ccw_o1;
+ typedef bg::model::polygon<P2, false, false> poly_ccw_o2;
+ test_geometry<poly_ccw_o1, poly_ccw_o2>("POLYGON((1 1, 3 3, 2 5))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", true);
+ test_geometry<poly_ccw_o1, poly_ccw_o2>("POLYGON((6 6, 7 6, 7 7, 6 7))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", false);
+ test_geometry<poly_ccw_o1, poly_ccw_o2>("POLYGON((7 7, 9 7, 9 9, 7 9))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", true);
+}
+
+template <typename P1, typename P2>
+void test_intersects_linestring_segment()
+{
+ typedef bg::model::linestring<P1> ls;
+ typedef bg::model::segment<P2> seg;
+
+ test_geometry<ls, seg>("LINESTRING(1 1, 3 3, 2 5)", "SEGMENT(2 0, 2 6)", true);
+ test_geometry<ls, seg>("LINESTRING(1 1, 3 3)", "SEGMENT(1 0, 1 1)", true);
+ test_geometry<ls, seg>("LINESTRING(1 1, 3 3)", "SEGMENT(2 0, 2 2)", true);
+ test_geometry<ls, seg>("LINESTRING(1 1, 3 3)", "SEGMENT(3 0, 4 1)", false);
+}
+
+template <typename P1, typename P2>
+void test_intersects_linestring_linestring()
+{
+ typedef bg::model::linestring<P1> ls1;
+ typedef bg::model::linestring<P2> ls2;
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0,2 0,3 0)", "LINESTRING(0 0,1 1,2 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(0 0,2 0,3 0)", "LINESTRING(2 2,1 1,0 0)", true);
+ test_geometry<ls1, ls2>("LINESTRING(3 0,2 0,0 0)", "LINESTRING(0 0,1 1,2 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(3 0,2 0,0 0)", "LINESTRING(2 2,1 1,0 0)", true);
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0,2 0,3 0)", "LINESTRING(1 0,4 0,5 0)", true);
+ test_geometry<ls1, ls2>("LINESTRING(1 0,2 0)", "LINESTRING(1 0,0 0)", true);
+}
+
+template <typename P1, typename P2>
+void test_intersects_linestring_polygon()
+{
+ typedef bg::model::linestring<P1> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P2> poly_cw_c;
+ typedef bg::model::polygon<P2, false> poly_ccw_c;
+ typedef bg::model::polygon<P2, false, false> poly_ccw_o;
+ typedef bg::model::multi_polygon<poly_ccw_c> mpoly_ccw_c;
+
+ test_geometry<ls, poly_ccw_c>("LINESTRING(1 1,2 2)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", true);
+ test_geometry<ls, poly_ccw_c>("LINESTRING(1 0,2 2)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", true);
+ test_geometry<ls, poly_ccw_c>("LINESTRING(11 0,12 12)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", false);
+
+ test_geometry<ls, poly_ccw_o>("LINESTRING(1 1, 3 3, 2 5)", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", true);
+ test_geometry<ls, poly_ccw_o>("LINESTRING(6 6, 7 6, 7 7, 6 7)", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", false);
+ test_geometry<ls, poly_ccw_o>("LINESTRING(7 7, 9 7, 9 9, 7 9)", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", true);
+
+ test_geometry<poly_cw_c, ls>("POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))", "LINESTRING(-2 -2, 12 7)", true);
+ test_geometry<poly_cw_c, ls>("POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))", "LINESTRING(5 5, 15 4)", true);
+ test_geometry<poly_cw_c, ls>("POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))", "LINESTRING(7 6, 15 4)", true);
+ test_geometry<poly_cw_c, ls>("POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))", "LINESTRING(6 2, 12 1)", true);
+
+ // MULTI
+ test_geometry<ls, mpoly_ccw_c>("LINESTRING(1 1,2 2)", "MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))", true);
+ test_geometry<mls, mpoly_ccw_c>("MULTILINESTRING((1 1,2 2))", "MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))", true);
+}
+
+template <typename P1, typename P2>
+void test_intersects_linestring_ring()
+{
+ typedef bg::model::linestring<P1> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::ring<P2, false> ring_ccw_c;
+
+ test_geometry<ls, ring_ccw_c>("LINESTRING(1 1,2 2)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", true);
+ test_geometry<ls, ring_ccw_c>("LINESTRING(1 0,2 2)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", true);
+ test_geometry<ls, ring_ccw_c>("LINESTRING(11 0,12 12)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", false);
+
+ // MULTI
+ test_geometry<mls, ring_ccw_c>("MULTILINESTRING((1 1,2 2))", "POLYGON((0 0,10 0,10 10,0 10,0 0))", true);
+}
+
+template <typename P1, typename P2>
+void test_intersects_ring_polygon()
+{
+ typedef bg::model::ring<P1, false, false> ring_ccw_o;
+ typedef bg::model::polygon<P2, false, false> poly_ccw_o;
+
+ test_geometry<ring_ccw_o, poly_ccw_o>("POLYGON((1 1, 3 3, 2 5))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", true);
+ test_geometry<ring_ccw_o, poly_ccw_o>("POLYGON((6 6, 7 6, 7 7, 6 7))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", false);
+ test_geometry<ring_ccw_o, poly_ccw_o>("POLYGON((7 7, 9 7, 9 9, 7 9))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", true);
+
+ test_geometry<ring_ccw_o, poly_ccw_o>("POLYGON((6 6,7 6,7 7,6 7))", "POLYGON((0 0, 9 0, 9 9, 0 9),(5 5,5 8,8 8,8 5))", false);
+}
+
+template <typename P1, typename P2>
+void test_intersects_point_linestring()
+{
+ typedef bg::model::linestring<P2> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<P1, ls>("POINT(0 0)", "LINESTRING(0 0,2 2,4 0)", true);
+ test_geometry<P1, ls>("POINT(1 1)", "LINESTRING(0 0,2 2,4 0)", true);
+ test_geometry<P1, ls>("POINT(1 0)", "LINESTRING(0 0,2 2,4 0)", false);
+
+ // MULTI
+ test_geometry<P1, mls>("POINT(0 0)", "MULTILINESTRING((0 0,2 2,4 0))", true);
+}
+
+template <typename P1, typename P2>
+void test_intersects_point_segment()
+{
+ typedef bg::model::segment<P2> seg;
+
+ test_geometry<P1, seg>("POINT(0 0)", "LINESTRING(0 0,2 2)", true);
+ test_geometry<P1, seg>("POINT(1 1)", "LINESTRING(0 0,2 2)", true);
+ test_geometry<P1, seg>("POINT(1 0)", "LINESTRING(0 0,2 2)", false);
+}
+
+template <typename P1, typename P2>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P1> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P2> poly;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ true);
+ test_geometry<mls, poly>("MULTILINESTRING((10 0, 18 12),(2 2,2 1))",
+ "POLYGON((5 0,0 -5,-5 0,0 5,5 0))",
+ true);
+}
+
+template <typename P1, typename P2>
+void test_multi_polygon_polygon()
+{
+ typedef bg::model::polygon<P1> poly1;
+ typedef bg::model::multi_polygon<poly1> mpoly;
+ typedef bg::model::polygon<P2> poly2;
+
+ test_geometry<mpoly, poly2>("MULTIPOLYGON(((11 11,11 20,20 20,20 11,11 11)),((5 5,5 6,6 6,6 5,5 5)))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ true);
+}
+
+template <typename P1, typename P2>
+void test_point_polygon()
+{
+ typedef bg::model::ring<P2> ring;
+ typedef bg::model::polygon<P2> poly;
+
+ test_geometry<P1, ring>(
+ "POINT(0 0)",
+ "POLYGON((0 0,3 3,3 3,4 1))",
+ true);
+ test_geometry<P1, poly>(
+ "POINT(0 0)",
+ "POLYGON((0 0,3 3,3 3,4 1))",
+ true);
+
+ test_geometry<ring, P1>(
+ "POLYGON((0 0,3 3,3 3,4 1))",
+ "POINT(0 0)",
+ true);
+ test_geometry<poly, P1>(
+ "POLYGON((0 0,3 3,3 3,4 1))",
+ "POINT(0 0)",
+ true);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ test_intersects_point_segment<P1, P2>();
+ test_intersects_point_linestring<P1, P2>();
+ test_intersects_polygon_polygon<P1, P2>();
+ test_intersects_linestring_polygon<P1, P2>();
+ test_intersects_linestring_ring<P1, P2>();
+ test_intersects_linestring_segment<P1, P2>();
+ test_intersects_linestring_linestring<P1, P2>();
+ test_intersects_ring_polygon<P1, P2>();
+ test_multi_linestring_polygon<P1, P2>();
+ test_multi_polygon_polygon<P1, P2>();
+ test_point_polygon<P1, P2>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::d2::point_xy<double>, bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if ! defined(BOOST_GEOMETRY_RESCALE_TO_ROBUST)
+ test_all<bg::model::d2::point_xy<boost::rational<int> > >();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/intersects_box_geometry.cpp b/src/boost/libs/geometry/test/algorithms/intersects/intersects_box_geometry.cpp
new file mode 100644
index 000000000..692a0f691
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/intersects_box_geometry.cpp
@@ -0,0 +1,172 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2013, 2015, 2016.
+// Modifications copyright (c) 2013-2016, Oracle and/or its affiliates.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_intersects.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/util/rational.hpp>
+
+
+template <typename P1, typename P2>
+void test_all()
+{
+ typedef bg::model::polygon<P1> polygon;
+ typedef bg::model::ring<P1> ring;
+
+ // intersect <=> ! disjoint (in most cases)
+ // so most tests are done in disjoint test.
+ // We only test compilation of a few cases.
+ test_geometry<P1, bg::model::box<P2> >("POINT(1 1)", "BOX(0 0,2 2)", true);
+
+ test_geometry<polygon, bg::model::box<P2> >(
+ "POLYGON((1992 3240,1992 1440,3792 1800,3792 3240,1992 3240))",
+ "BOX(1941 2066, 2055 2166)", true);
+
+ test_geometry<ring, bg::model::box<P2> >(
+ "POLYGON((1992 3240,1992 1440,3792 1800,3792 3240,1992 3240))",
+ "BOX(1941 2066, 2055 2166)", true);
+
+ test_geometry<polygon, bg::model::box<P2> >(
+ "POLYGON((1941 2066,2055 2066,2055 2166,1941 2166))",
+ "BOX(1941 2066, 2055 2166)", true);
+
+ test_geometry<P1, bg::model::box<P2> >(
+ "POINT(0 0)",
+ "BOX(0 0,4 4)",
+ true);
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+// Those tests won't pass for rational<> because numeric_limits<> isn't specialized for this type
+template <typename P>
+void test_additional()
+{
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(0 0,3 3)",
+ "BOX(1 2,3 5)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(1 1,2 3)",
+ "BOX(0 0,4 4)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(1 1,1 1)",
+ "BOX(1 0,3 5)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(0 1,0 1)",
+ "BOX(1 0,3 5)",
+ false);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(2 1,2 1)",
+ "BOX(1 0,3 5)",
+ true);
+ test_geometry<bg::model::linestring<P>, bg::model::box<P> >(
+ "LINESTRING(0 0,1 0,10 10)",
+ "BOX(1 2,3 5)",
+ true);
+ test_geometry<bg::model::linestring<P>, bg::model::box<P> >(
+ "LINESTRING(1 2)",
+ "BOX(0 0,3 5)",
+ true);
+
+ // http://stackoverflow.com/questions/32457920/boost-rtree-of-box-gives-wrong-intersection-with-segment
+ // http://lists.boost.org/geometry/2015/09/3476.php
+ typedef bg::model::point<typename bg::coordinate_type<P>::type, 3, bg::cs::cartesian> point3d_t;
+ test_geometry<bg::model::segment<point3d_t>, bg::model::box<point3d_t> >(
+ "SEGMENT(2 1 0,2 1 10)",
+ "BOX(0 0 0,10 0 10)",
+ false);
+ test_geometry<bg::model::segment<point3d_t>, bg::model::box<point3d_t> >(
+ "SEGMENT(2 1 0,2 1 10)",
+ "BOX(0 -5 0,10 0 10)",
+ false);
+ // and derived from the cases above
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(12 0,20 10)",
+ "BOX(0 0,10 10)",
+ false);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(2 0,8 6)",
+ "BOX(0 0,10 10)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(2 0,18 8)",
+ "BOX(0 0,10 10)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(1 0,1 10)",
+ "BOX(0 0,0 10)",
+ false);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(-1 0,-1 10)",
+ "BOX(0 0,0 10)",
+ false);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(2 1,2 1)",
+ "BOX(0 0,10 0)",
+ false);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(2 3,2 3)",
+ "BOX(0 0,10 0)",
+ false);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(0 0,10 0)",
+ "BOX(0 0,10 0)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(10 0,10 0)",
+ "BOX(0 0,10 0)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(1 0,1 0)",
+ "BOX(0 0,10 0)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(0 0,0 10)",
+ "BOX(0 0,0 10)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(0 10,0 10)",
+ "BOX(0 0,0 10)",
+ true);
+ test_geometry<bg::model::segment<P>, bg::model::box<P> >(
+ "SEGMENT(0 1,0 1)",
+ "BOX(0 0,0 10)",
+ true);
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<float>, bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_all<bg::model::d2::point_xy<double> >();
+ test_additional<bg::model::d2::point_xy<double> >();
+
+#if ! defined(BOOST_GEOMETRY_RESCALE_TO_ROBUST)
+ test_all<bg::model::d2::point_xy<boost::rational<int> > >();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/intersects_multi.cpp b/src/boost/libs/geometry/test/algorithms/intersects/intersects_multi.cpp
new file mode 100644
index 000000000..d2c70d1f8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/intersects_multi.cpp
@@ -0,0 +1,63 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+
+#include <geometry_test_common.hpp>
+
+#include "test_intersects.hpp"
+
+#include <boost/geometry.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename P1, typename P2>
+void test_all()
+{
+ typedef bg::model::polygon<P1> polygon1;
+ typedef bg::model::multi_polygon<polygon1> mp1;
+ typedef bg::model::polygon<P2> polygon2;
+ typedef bg::model::multi_polygon<polygon2> mp2;
+
+ test_geometry<mp1, mp2>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ true);
+
+ test_geometry<P1, mp2>("POINT(0 0)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ true);
+
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+int test_main(int, char* [])
+{
+ //test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::d2::point_xy<double>, bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/intersects_self.cpp b/src/boost/libs/geometry/test/algorithms/intersects/intersects_self.cpp
new file mode 100644
index 000000000..6d6c4172a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/intersects_self.cpp
@@ -0,0 +1,133 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2013, 2015.
+// Modifications copyright (c) 2013-2015, Oracle and/or its affiliates.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_intersects.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/util/rational.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::ring<P, true, false> ring_open;
+
+ // self-intersecting is not tested in disjoint, so that is done here.
+
+ // Just a normal polygon
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))", false);
+
+ // Self intersecting
+ test_self_intersects<polygon>("POLYGON((1 2,1 1,2 1,2 2.25,3 2.25,3 0,0 0,0 3,3 3,2.75 2,1 2))", true);
+
+ // Self intersecting in last segment
+ test_self_intersects<polygon>("POLYGON((0 2,2 4,2 0,4 2,0 2))", true);
+
+ // Self tangent
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,4 4,4 0,2 4,0 0))", true);
+
+ // Self tangent in corner
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,4 4,4 0,0 4,2 0,0 0))", true);
+
+ // With spike
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,4 4,4 2,6 2,4 2,4 0,0 0))", true);
+
+ // Non intersection, but with duplicate
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,4 0,4 0,0 0))", false);
+
+ // With many duplicates
+ test_self_intersects<polygon>(
+ "POLYGON((0 0,0 1,0 1,0 1,0 2,0 2,0 3,0 3,0 3,0 3,0 4,2 4,2 4,4 4,4 0,4 0,3 0,3 0,3 0,3 0,3 0,0 0))",
+ false);
+
+ // Hole: interior tangent to exterior
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,4 4,4 0,0 0),(1 2,2 4,3 2,1 2))", true);
+
+ // Hole: interior intersecting exterior
+ test_self_intersects<polygon>("POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 3,5 4,1 1))", true);
+
+ // Hole: two intersecting holes
+ test_self_intersects<polygon>(
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 3,3 3,3 1,1 1),(2 2,2 3.5,3.5 3.5,3.5 2,2 2))", true);
+
+ // Mail Akira T on [Boost-users] at 27-7-2011 3:17
+ test_self_intersects<linestring>(
+ "LINESTRING(0 0,0 4,4 4,2 2,2 5)", true);
+
+ test_self_intersects<linestring>(
+ "LINESTRING(0 4,4 4,2 2,2 5)", true);
+
+ // Test self-intersections at last segment in close/open rings:
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,4 1,0 0))", false);
+
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,3 3,4 1))", false);
+
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,4 1,0 1,0 0))", true);
+
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,3 3,4 1,0 1))", true);
+
+ // Duplicates in first or last
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,4 1,0 1,0 1,0 0))", true);
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,4 1,0 1,0 0,0 0))", true);
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,3 3,4 1,0 1,0 1))", true);
+ test_self_intersects<ring>(
+ "POLYGON((0 0,0 0,3 3,4 1,0 1,0 1,0 0))", true);
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,0 0,3 3,4 1,0 1,0 1))", true);
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,3 3,4 1,0 1,0 1,0 0))", true);
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,3 3,3 3,4 1,0 1,0 1))", true);
+
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,4 1,0 0,0 0))", false);
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,4 1,4 1,0 0))", false);
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,3 3,4 1,4 1))", false);
+ test_self_intersects<ring>(
+ "POLYGON((0 0,0 0,3 3,4 1,0 0))", false);
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,0 0,3 3,4 1))", false);
+ test_self_intersects<ring>(
+ "POLYGON((0 0,3 3,3 3,4 1,0 0))", false);
+ test_self_intersects<ring_open>(
+ "POLYGON((0 0,3 3,3 3,4 1))", false);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if ! defined(BOOST_GEOMETRY_RESCALE_TO_ROBUST)
+ test_all<bg::model::d2::point_xy<boost::rational<int> > >();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/intersects_sph.cpp b/src/boost/libs/geometry/test/algorithms/intersects/intersects_sph.cpp
new file mode 100644
index 000000000..0981c0af4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/intersects_sph.cpp
@@ -0,0 +1,269 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_intersects.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ true);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ true);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ true);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ true);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ true);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ true);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ true);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ true);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ true);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ true);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ true);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ true);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ true);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ true);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ true);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ true);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ true);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ true);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ true);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ true);
+ test_geometry<poly, poly>(case_17_sph[1], case_17_sph[0],
+ true);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ true);
+ test_geometry<poly, poly>(case_18_sph[1], case_18_sph[0],
+ true);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ true);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ true);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ true);
+}
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::polygon<P> ring;
+
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ true);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ true);
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ true);
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ true);
+
+ test_geometry<mls, ring>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ true);
+
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ true);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ true);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", true);
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ true);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ true);
+}
+
+template <typename P>
+void test_point_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+
+ // https://svn.boost.org/trac/boost/ticket/9162
+ test_geometry<P, poly>("POINT(0 90)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(-120 21)",
+ "POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
+ false);
+ // extended
+ test_geometry<P, poly>("POINT(0 -90)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ true);
+ test_geometry<P, poly>("POINT(0 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(-180 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+
+ test_point_polygon<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/intersects_sph_geo.cpp b/src/boost/libs/geometry/test/algorithms/intersects/intersects_sph_geo.cpp
new file mode 100644
index 000000000..c4cd283da
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/intersects_sph_geo.cpp
@@ -0,0 +1,86 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_intersects.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_point_box()
+{
+ typedef bg::model::box<P> box_t;
+
+ test_geometry<P, box_t>("POINT(0 0)", "BOX(0 0, 1 1)", true);
+ test_geometry<P, box_t>("POINT(1 1)", "BOX(0 0, 2 2)", true);
+
+ test_geometry<P, box_t>("POINT(180 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(-180 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(180 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(-180 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(179 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(-179 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(179 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(-179 1)", "BOX(170 0, 180 2)", false);
+ test_geometry<P, box_t>("POINT(169 1)", "BOX(170 0, 180 2)", false);
+}
+
+template <typename P>
+void test_box_box()
+{
+ typedef bg::model::box<P> box_t;
+
+ test_geometry<box_t, box_t>("BOX(0 0, 1 1)", "BOX(0 0, 1 1)", true);
+
+ test_geometry<box_t, box_t>("BOX(-170 0,-160 1)", "BOX(-180 0, 180 1)", true);
+ test_geometry<box_t, box_t>("BOX(-170 0,-160 1)", "BOX(170 0, 200 1)", true);
+ test_geometry<box_t, box_t>("BOX(-170 0,-150 1)", "BOX(170 0, 200 1)", true);
+ test_geometry<box_t, box_t>("BOX(201 0,202 1)", "BOX(170 0, 200 1)", false); // invalid g1?
+ test_geometry<box_t, box_t>("BOX(-159 0,-158 1)", "BOX(170 0, 200 1)", false);
+ test_geometry<box_t, box_t>("BOX(160 0,169 1)", "BOX(170 0, 200 1)", false);
+ test_geometry<box_t, box_t>("BOX(-159 0,169 1)", "BOX(170 0, 200 1)", false);
+ test_geometry<box_t, box_t>("BOX(0 0,1 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(0 0,10 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,10 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,20 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(10 0,20 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(160 0,180 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(160 0,165 1)", "BOX(170 0, 370 1)", false);
+ test_geometry<box_t, box_t>("BOX(15 0,20 1)", "BOX(170 0, 370 1)", false);
+ test_geometry<box_t, box_t>("BOX(375 0,380 1)", "BOX(170 0, 370 1)", false); // invalid g1?
+
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 190 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 191 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(179 0, 190 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(181 0, 190 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 189 1)", true); // invalid?
+}
+
+
+template <typename P>
+void test_cs()
+{
+ test_point_box<P>();
+ test_box_box<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_cs<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();;
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/intersects/test_intersects.hpp b/src/boost/libs/geometry/test/algorithms/intersects/test_intersects.hpp
new file mode 100644
index 000000000..c9ffe5579
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/intersects/test_intersects.hpp
@@ -0,0 +1,115 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_INTERSECTS_HPP
+#define BOOST_GEOMETRY_TEST_INTERSECTS_HPP
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/core/geometry_id.hpp>
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_intersects(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::intersects(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_intersects(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::intersects(geometry1, geometry2);
+}
+
+template <typename G1, typename G2, typename Strategy>
+void check_intersects(std::string const& wkt1,
+ std::string const& wkt2,
+ G1 const& g1,
+ G2 const& g2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_intersects(g1, g2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "intersects: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2, bool expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ check_intersects(wkt1, wkt2, geometry1, geometry2, expected, no_strategy());
+ check_intersects(wkt2, wkt1, geometry2, geometry1, expected, no_strategy());
+
+ typedef typename bg::strategy::disjoint::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy12_type;
+ typedef typename bg::strategy::disjoint::services::default_strategy
+ <
+ Geometry2, Geometry1
+ >::type strategy21_type;
+
+ check_intersects(wkt1, wkt2, geometry1, geometry2, expected, strategy12_type());
+ check_intersects(wkt2, wkt1, geometry2, geometry1, expected, strategy21_type());
+}
+
+
+template <typename Geometry>
+void test_self_intersects(std::string const& wkt, bool expected)
+{
+ Geometry geometry;
+
+ bg::read_wkt(wkt, geometry);
+
+ bool detected = bg::intersects(geometry);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "intersects: " << wkt
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/is_convex.cpp b/src/boost/libs/geometry/test/algorithms/is_convex.cpp
new file mode 100644
index 000000000..7fcc8a913
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_convex.cpp
@@ -0,0 +1,61 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <cstddef>
+#include <string>
+
+#include <boost/geometry/algorithms/is_convex.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+
+
+template <typename Geometry>
+void test_one(std::string const& case_id, std::string const& wkt, bool expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+
+ bool detected = bg::is_convex(geometry);
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "Not as expected, case: " << case_id
+ << " / expected: " << expected
+ << " / detected: " << detected);
+}
+
+
+template <typename P>
+void test_all()
+{
+ // rectangular, with concavity
+ std::string const concave1 = "polygon((1 1, 1 4, 3 4, 3 3, 4 3, 4 4, 5 4, 5 1, 1 1))";
+ std::string const triangle = "polygon((1 1, 1 4, 5 1, 1 1))";
+
+ test_one<bg::model::ring<P> >("triangle", triangle, true);
+ test_one<bg::model::ring<P> >("concave1", concave1, false);
+ test_one<bg::model::ring<P, false, false> >("triangle", triangle, true);
+ test_one<bg::model::ring<P, false, false> >("concave1", concave1, false);
+
+ test_one<bg::model::box<P> >("box", "box(0 0,2 2)", true);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/is_empty.cpp b/src/boost/libs/geometry/test/algorithms/is_empty.cpp
new file mode 100644
index 000000000..089f09067
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_empty.cpp
@@ -0,0 +1,335 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_is_empty
+#endif
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/algorithms/is_empty.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+namespace bg = boost::geometry;
+
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+typedef bg::model::linestring<point> linestring;
+typedef bg::model::segment<point> segment;
+typedef bg::model::box<point> box;
+typedef bg::model::ring<point, true, true> ring_cw_closed;
+typedef bg::model::ring<point, true, false> ring_cw_open;
+typedef bg::model::ring<point, false, true> ring_ccw_closed;
+typedef bg::model::ring<point, false, false> ring_ccw_open;
+typedef bg::model::polygon<point, true, true> polygon_cw_closed;
+typedef bg::model::polygon<point, true, false> polygon_cw_open;
+typedef bg::model::polygon<point, false, true> polygon_ccw_closed;
+typedef bg::model::polygon<point, false, false> polygon_ccw_open;
+typedef bg::model::multi_point<point> multi_point;
+typedef bg::model::multi_linestring<linestring> multi_linestring;
+typedef bg::model::multi_polygon<polygon_cw_closed> multi_polygon_cw_closed;
+typedef bg::model::multi_polygon<polygon_cw_open> multi_polygon_cw_open;
+typedef bg::model::multi_polygon<polygon_ccw_closed> multi_polygon_ccw_closed;
+typedef bg::model::multi_polygon<polygon_ccw_open> multi_polygon_ccw_open;
+
+template <std::size_t D, typename T = double>
+struct box_dD
+{
+ typedef boost::geometry::model::box
+ <
+ boost::geometry::model::point<T, D, boost::geometry::cs::cartesian>
+ > type;
+};
+
+template <typename Geometry, typename Tag = typename bg::tag<Geometry>::type>
+struct test_is_empty
+{
+ static inline void apply(Geometry const& geometry, bool expected)
+ {
+ bool detected = bg::is_empty(geometry);
+ BOOST_CHECK_MESSAGE( detected == expected,
+ std::boolalpha
+ << "Expected: " << expected
+ << " detected: " << detected
+ << " wkt: " << bg::wkt(geometry)
+ << std::noboolalpha );
+ BOOST_CHECK_EQUAL(detected, bg::num_points(geometry) == 0);
+ }
+
+ static inline void apply(std::string const& wkt, bool expected)
+ {
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ apply(geometry, expected);
+ }
+};
+
+template <typename Box>
+struct test_is_empty<Box, bg::box_tag>
+{
+ static inline void apply(Box const& box, bool expected)
+ {
+ bool detected = bg::is_empty(box);
+ BOOST_CHECK_MESSAGE( detected == expected,
+ std::boolalpha
+ << "Expected: " << expected
+ << " detected: " << detected
+ << " dsv: " << bg::dsv(box)
+ << std::noboolalpha );
+ BOOST_CHECK_EQUAL(detected, bg::num_points(box) == 0);
+ }
+
+ static inline void apply(std::string const& wkt, bool expected)
+ {
+ Box box;
+ bg::read_wkt(wkt, box);
+ apply(box, expected);
+ }
+};
+
+BOOST_AUTO_TEST_CASE( test_point )
+{
+ test_is_empty<point>::apply("POINT(0 0)", false);
+ test_is_empty<point>::apply("POINT(1 1)", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_segment )
+{
+ test_is_empty<segment>::apply("SEGMENT(0 0,0 0)", false);
+ test_is_empty<segment>::apply("SEGMENT(0 0,1 1)", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_box )
+{
+ test_is_empty<box>::apply("BOX(0 0,1 1)", false);
+
+ // test higher-dimensional boxes
+ test_is_empty<box_dD<3>::type>::apply("BOX(0 0 0,1 1 1)", false);
+ test_is_empty<box_dD<4>::type>::apply("BOX(0 0 0 0,1 1 1 1)", false);
+ test_is_empty<box_dD<5>::type>::apply("BOX(0 0 0 0 0,1 1 1 1 1)", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_linestring )
+{
+ typedef test_is_empty<linestring> tester;
+
+ tester::apply("LINESTRING()", true);
+ tester::apply("LINESTRING(0 0)", false);
+ tester::apply("LINESTRING(0 0,0 0)", false);
+ tester::apply("LINESTRING(0 0,0 0,1 1)", false);
+ tester::apply("LINESTRING(0 0,0 0,0 0,1 1)", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipoint )
+{
+ typedef test_is_empty<multi_point> tester;
+
+ tester::apply("MULTIPOINT()", true);
+ tester::apply("MULTIPOINT(0 0)", false);
+ tester::apply("MULTIPOINT(0 0,0 0)", false);
+ tester::apply("MULTIPOINT(0 0,0 0,1 1)", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_multilinestring )
+{
+ typedef test_is_empty<multi_linestring> tester;
+
+ tester::apply("MULTILINESTRING()", true);
+ tester::apply("MULTILINESTRING(())", true);
+ tester::apply("MULTILINESTRING((),())", true);
+ tester::apply("MULTILINESTRING((),(0 0))", false);
+ tester::apply("MULTILINESTRING((),(0 0),())", false);
+ tester::apply("MULTILINESTRING((0 0))", false);
+ tester::apply("MULTILINESTRING((0 0,1 0))", false);
+ tester::apply("MULTILINESTRING((),(),(0 0,1 0))", false);
+ tester::apply("MULTILINESTRING((0 0,1 0,0 1),(0 0,1 0,0 1,0 0))", false);
+}
+
+template <typename OpenRing>
+void test_open_ring()
+{
+ typedef test_is_empty<OpenRing> tester;
+
+ tester::apply("POLYGON(())", true);
+ tester::apply("POLYGON((0 0))", false);
+ tester::apply("POLYGON((0 0,1 0))", false);
+ tester::apply("POLYGON((0 0,1 0,0 1))", false);
+ tester::apply("POLYGON((0 0,0 0,1 0,0 1))", false);
+}
+
+template <typename ClosedRing>
+void test_closed_ring()
+{
+ typedef test_is_empty<ClosedRing> tester;
+
+ tester::apply("POLYGON(())", true);
+ tester::apply("POLYGON((0 0))", false);
+ tester::apply("POLYGON((0 0,0 0))", false);
+ tester::apply("POLYGON((0 0,1 0,0 0))", false);
+ tester::apply("POLYGON((0 0,1 0,0 1,0 0))", false);
+ tester::apply("POLYGON((0 0,1 0,1 0,0 1,0 0))", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_ring )
+{
+ test_open_ring<ring_ccw_open>();
+ test_open_ring<ring_cw_open>();
+ test_closed_ring<ring_ccw_closed>();
+ test_closed_ring<ring_cw_closed>();
+}
+
+template <typename OpenPolygon>
+void test_open_polygon()
+{
+ typedef test_is_empty<OpenPolygon> tester;
+
+ tester::apply("POLYGON(())", true);
+ tester::apply("POLYGON((),())", true);
+ tester::apply("POLYGON((),(),())", true);
+ tester::apply("POLYGON((),(0 0,0 1,1 0))", false);
+ tester::apply("POLYGON((),(0 0,0 1,1 0),())", false);
+ tester::apply("POLYGON((),(),(0 0,0 1,1 0))", false);
+ tester::apply("POLYGON((0 0))", false);
+ tester::apply("POLYGON((0 0,10 0),(0 0))", false);
+ tester::apply("POLYGON((0 0,10 0),(1 1,2 1))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10),())", false);
+ tester::apply("POLYGON((0 0,10 0,0 10),(1 1))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10),(1 1,2 1))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10),(1 1,2 1,1 2))", false);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,1 2))", false);
+}
+
+template <typename ClosedPolygon>
+void test_closed_polygon()
+{
+ typedef test_is_empty<ClosedPolygon> tester;
+
+ tester::apply("POLYGON(())", true);
+ tester::apply("POLYGON((),())", true);
+ tester::apply("POLYGON((),(),())", true);
+ tester::apply("POLYGON((),(0 0,0 1,1 0,0 0))", false);
+ tester::apply("POLYGON((),(0 0,0 1,1 0,0 0),())", false);
+ tester::apply("POLYGON((),(),(0 0,0 1,1 0,0 0))", false);
+ tester::apply("POLYGON((0 0))", false);
+ tester::apply("POLYGON((0 0,10 0,0 0),(0 0))", false);
+ tester::apply("POLYGON((0 0,10 0,0 0),(1 1,2 1,1 1))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),())", false);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1,2 1,1 1))", false);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1,2 1,1 2,1 1))", false);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1))", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_polygon )
+{
+ test_open_polygon<polygon_ccw_open>();
+ test_open_polygon<polygon_cw_open>();
+ test_closed_polygon<polygon_ccw_closed>();
+ test_closed_polygon<polygon_cw_closed>();
+}
+
+template <typename OpenMultiPolygon>
+void test_open_multipolygon()
+{
+ typedef test_is_empty<OpenMultiPolygon> tester;
+
+ tester::apply("MULTIPOLYGON()", true);
+ tester::apply("MULTIPOLYGON((()))", true);
+ tester::apply("MULTIPOLYGON(((),()))", true);
+ tester::apply("MULTIPOLYGON(((),()),((),(),()))", true);
+ tester::apply("MULTIPOLYGON(((),()),((),(0 0,10 0,10 10,0 10),()))", false);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,1 2)))", false);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,2 2,1 2),(5 5,6 5,6 6,5 6)))", false);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,1 2)),((100 100,110 100,110 110),(101 101,102 101,102 102)))", false);
+}
+
+template <typename ClosedMultiPolygon>
+void test_closed_multipolygon()
+{
+ typedef test_is_empty<ClosedMultiPolygon> tester;
+
+ tester::apply("MULTIPOLYGON()", true);
+ tester::apply("MULTIPOLYGON((()))", true);
+ tester::apply("MULTIPOLYGON(((),()))", true);
+ tester::apply("MULTIPOLYGON(((),()),((),(),()))", true);
+ tester::apply("MULTIPOLYGON(((),()),((),(0 0,10 0,10 10,0 10,0 0),()))", false);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)))", false);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)))", false);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101)))", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipolygon )
+{
+ test_open_multipolygon<multi_polygon_ccw_open>();
+ test_open_multipolygon<multi_polygon_cw_open>();
+ test_closed_multipolygon<multi_polygon_ccw_closed>();
+ test_closed_multipolygon<multi_polygon_cw_closed>();
+}
+
+BOOST_AUTO_TEST_CASE( test_variant )
+{
+ typedef boost::variant
+ <
+ linestring, polygon_cw_open, polygon_cw_closed, multi_point
+ > variant_geometry_type;
+
+ typedef test_is_empty<variant_geometry_type> tester;
+
+ linestring ls_empty;
+ bg::read_wkt("LINESTRING()", ls_empty);
+
+ linestring ls;
+ bg::read_wkt("LINESTRING(1 1,2 2,5 6)", ls);
+
+ polygon_cw_open p_open;
+ bg::read_wkt("POLYGON((0 0,0 1,1 0))", p_open);
+
+ polygon_cw_closed p_closed;
+ bg::read_wkt("POLYGON(())", p_closed);
+
+ multi_point mp;
+ bg::read_wkt("MULTIPOINT((1 10))", mp);
+
+ multi_point mp_empty;
+ bg::read_wkt("MULTIPOINT((1 10))", mp);
+
+ variant_geometry_type variant_geometry;
+
+ variant_geometry = ls_empty;
+ tester::apply(variant_geometry, true);
+
+ variant_geometry = p_open;
+ tester::apply(variant_geometry, false);
+
+ variant_geometry = p_closed;
+ tester::apply(variant_geometry, true);
+
+ variant_geometry = mp;
+ tester::apply(variant_geometry, false);
+
+ variant_geometry = mp_empty;
+ tester::apply(variant_geometry, true);
+
+ variant_geometry = ls;
+ tester::apply(variant_geometry, false);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/is_simple.cpp b/src/boost/libs/geometry/test/algorithms/is_simple.cpp
new file mode 100644
index 000000000..41cef5ed5
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_simple.cpp
@@ -0,0 +1,314 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_is_simple
+#endif
+
+#include "test_is_simple.hpp"
+
+
+namespace bg = ::boost::geometry;
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+// ccw open and closed polygons
+typedef bg::model::polygon<point_type,false,false> open_ccw_polygon_type;
+typedef bg::model::polygon<point_type,false,true> closed_ccw_polygon_type;
+// multi-geometries
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::multi_polygon<open_ccw_polygon_type> multi_polygon_type;
+// box
+typedef bg::model::box<point_type> box_type;
+
+
+BOOST_AUTO_TEST_CASE( test_is_simple_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_simple: POINT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef point_type G;
+
+ test_simple(from_wkt<G>("POINT(0 0)"), true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_simple: MULTIPOINT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef multi_point_type G;
+
+ test_simple(from_wkt<G>("MULTIPOINT(0 0)"), true);
+ test_simple(from_wkt<G>("MULTIPOINT(0 0,1 0,1 1,0 1)"), true);
+ test_simple(from_wkt<G>("MULTIPOINT(0 0,1 0,1 1,1 0,0 1)"), false);
+
+ // empty multipoint
+ test_simple(from_wkt<G>("MULTIPOINT()"), true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_simple: SEGMENT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef segment_type G;
+
+ test_simple(from_wkt<G>("SEGMENT(0 0,1 0)"), true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_simple: LINESTRING " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef linestring_type G;
+
+ // valid linestrings with multiple points
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 0,1 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 0,1 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 0,1 0,1 0,1 1,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 0,1 1,1 0,1 -1)"), false);
+
+ // simple open linestrings
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 2)"), true);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 2,2 3)"), true);
+
+ // simple closed linestrings
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,1 1,0 0)"), true);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,1 1,0 1,0 0)"), true);
+ test_simple(from_wkt<G>("LINESTRING(0 0,10 0,10 10,0 10,0 0)"), true);
+
+ // non-simple linestrings
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 10,0.5 -1)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 1,1 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 1,0.5 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,2 0,1 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,3 0,5 0,1 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,3 0,5 0,4 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,3 0,5 0,4 0,2 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,3 0,2 0,5 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,2 0,2 2,1 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 0,2 2,1 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,10 0,10 10,0 10,0 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 10,5 10,0 0,10 10,10 5,10 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 0,10 0,10 10,0 10,0 0,0 0)"),
+ false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 0,0 0,10 0,10 10,0 10,0 0,0 0,0 0,0 0)"),
+ false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,0 0,10 0,10 10,10 10,10 10,10 10,10 10,0 10,0 0,0 0)"),
+ false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 0,2 2,1 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(1 0,2 2,2 0,1 0,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(0 0,1 0,2 0,2 2,1 0,1 4,0 0)"), false);
+ test_simple(from_wkt<G>("LINESTRING(4 1,10 8,4 6,4 1,10 5,10 3)"),
+ false);
+ test_simple(from_wkt<G>("LINESTRING(10 3,10 5,4 1,4 6,10 8,4 1)"),
+ false);
+
+ // empty linestring
+ // the simplicity result is irrelevant since an empty linestring
+ // is considered as invalid
+ test_simple(from_wkt<G>("LINESTRING()"), false, false);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_simple: MULTILINESTRING " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef multi_linestring_type G;
+
+ // multilinestrings with linestrings with spikes
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,0 0),(5 0,6 0,7 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,0 0),(5 0,1 0,4 1))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,0 0),(5 0,1 0,4 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,0 0),(1 0,2 0))"),
+ false);
+
+ // simple multilinestrings
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 1),(1 1,1 0))"), true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 1),(1 1,1 0),(0 1,1 1))"),
+ true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2),(0 0,1 0,2 0,2 2))"), true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2),(2 2,2 0,1 0,0 0))"), true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0),(0 0,-1 0),(1 0,2 0))"),
+ true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0),(-1 0,0 0),(2 0,1 0))"),
+ true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0),(0 0,0 1),(0 0,-1 0),(0 0,0 -1))"),
+ true);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0))"), true);
+
+ // non-simple multilinestrings
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2),(0 0,2 2))"), false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2),(2 2,0 0))"), false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2),(0 0,1 0,1 1,2 0,2 2))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 1,2 2),(0 0,1 0,1 1,2 0,2 2))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 1,2 2),(2 2,0 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(0 0,1 1))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(0 0,3 3))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(1 1,3 3))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(1 1,2 2))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(2 2,3 3))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(2 2,4 4))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 2,4 4),(4 4,2 2))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 1),(0 1,1 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,2 0),(1 0,0 1))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 1),(1 1,1 0),(1 1,0 1,0.5,0.5))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,1 1,0 1,0 0),(1 0,1 -1))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,1 1,0 1,0 0),(-1 0,0 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,1 1,0 1,0 0),(0 0,-1 0,-1 -1,0 -1,0 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,1 0,1 1,0 1,0 0),(-1 -1,-1 0,0 0,0 -1,-1 -1))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((0 0,0 10,5 10,0 0,10 10,10 5,10 0,0 0))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((4 1,10 8,4 6,4 1,10 5,10 3))"),
+ false);
+ test_simple(from_wkt<G>("MULTILINESTRING((10 3,10 5,4 1,4 6,10 8,4 1))"),
+ false);
+
+ // empty multilinestring
+ test_simple(from_wkt<G>("MULTILINESTRING()"), true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_areal )
+{
+ typedef box_type b;
+ typedef open_ccw_polygon_type o_ccw_p;
+ typedef multi_polygon_type mpl;
+
+ // check that is_simple compiles for boxes
+ test_simple(from_wkt<b>("BOX(0 0,1 1)"), true);
+
+ // simple polygons and multi-polygons
+ test_simple(from_wkt<o_ccw_p>("POLYGON((0 0,1 0,1 1))"), true);
+ test_simple(from_wkt<o_ccw_p>("POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1))"),
+ true);
+ test_simple(from_wkt<mpl>("MULTIPOLYGON(((0 0,1 0,1 1)),((10 0,20 0,20 10,10 10)))"),
+ true);
+
+ // non-simple polygons & multi-polygons (have duplicate points)
+ test_simple(from_wkt<o_ccw_p>("POLYGON((0 0,1 0,1 0,1 1))"), false);
+ test_simple(from_wkt<o_ccw_p>("POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 9,9 1))"),
+ false);
+ test_simple(from_wkt<mpl>("MULTIPOLYGON(((0 0,1 0,1 1,1 1)),((10 0,20 0,20 0,20 10,10 10)))"),
+ false);
+
+ // empty polygon
+ // the simplicity result is irrelevant since an empty polygon
+ // is considered as invalid
+ test_simple(from_wkt<o_ccw_p>("POLYGON(())"), false, false);
+
+ // empty multipolygon
+ test_simple(from_wkt<mpl>("MULTIPOLYGON()"), true);
+}
+
+BOOST_AUTO_TEST_CASE( test_geometry_with_NaN_coordinates )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: geometry with NaN coordinates" << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ linestring_type ls1, ls2;
+ bg::read_wkt("LINESTRING(1 1,1.115235e+308 1.738137e+308)", ls1);
+ bg::read_wkt("LINESTRING(-1 1,1.115235e+308 1.738137e+308)", ls2);
+
+ // the intersection of the two linestrings is a new linestring
+ // (multilinestring with a single element) that has NaN coordinates
+ multi_linestring_type mls;
+ bg::intersection(ls1, ls2, mls);
+
+ test_simple(mls, true, false);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_variant )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_simple: variant support" << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<point_type> polygon_type; // cw, closed
+ typedef boost::variant
+ <
+ linestring_type, multi_linestring_type, polygon_type
+ > variant_geometry;
+
+ variant_geometry vg;
+
+ linestring_type simple_linestring =
+ from_wkt<linestring_type>("LINESTRING(0 0,1 0)");
+ multi_linestring_type non_simple_multi_linestring = from_wkt
+ <
+ multi_linestring_type
+ >("MULTILINESTRING((0 0,1 0,1 1,0 0),(10 0,1 1))");
+ polygon_type simple_polygon =
+ from_wkt<polygon_type>("POLYGON((0 0,1 1,1 0,0 0))");
+ polygon_type non_simple_polygon =
+ from_wkt<polygon_type>("POLYGON((0 0,1 1,1 0,1 0,0 0))");
+
+ vg = simple_linestring;
+ test_simple(vg, true);
+ vg = non_simple_multi_linestring;
+ test_simple(vg, false);
+ vg = simple_polygon;
+ test_simple(vg, true);
+ vg = non_simple_polygon;
+ test_simple(vg, false);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/is_simple_geo.cpp b/src/boost/libs/geometry/test/algorithms/is_simple_geo.cpp
new file mode 100644
index 000000000..28405c030
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_simple_geo.cpp
@@ -0,0 +1,128 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_is_simple_geo
+#endif
+
+#include "test_is_simple.hpp"
+
+
+inline bg::srs::spheroid<double> sph(double a, double rf)
+{
+ double b = a - a / rf;
+ return bg::srs::spheroid<double>(a, b);
+}
+
+typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+// ccw open and closed polygons
+typedef bg::model::polygon<point_type,false,false> open_ccw_polygon_type;
+typedef bg::model::polygon<point_type,false,true> closed_ccw_polygon_type;
+// multi-geometries
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::multi_polygon<open_ccw_polygon_type> multi_polygon_type;
+// box
+typedef bg::model::box<point_type> box_type;
+
+
+BOOST_AUTO_TEST_CASE( test_is_simple_geo_multipoint )
+{
+ typedef multi_point_type G;
+
+ bg::strategy::intersection::geographic_segments<> s;
+
+ test_simple_s(from_wkt<G>("MULTIPOINT(0 90, 0 90)"), s, false);
+ test_simple_s(from_wkt<G>("MULTIPOINT(0 90, 1 90)"), s, false);
+ test_simple_s(from_wkt<G>("MULTIPOINT(0 -90, 0 -90)"), s, false);
+ test_simple_s(from_wkt<G>("MULTIPOINT(0 -90, 1 -90)"), s, false);
+ test_simple_s(from_wkt<G>("MULTIPOINT(0 80, 1 80)"), s, true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_geo_linestring )
+{
+ typedef linestring_type G;
+
+ bg::srs::spheroid<double> sph_wgs84;
+ bg::srs::spheroid<double> sph_4053(6371228, 6371228);
+ bg::srs::spheroid<double> sph_near_4053(6371228, 6371227);
+
+ bg::strategy::intersection::geographic_segments<> s(sph_wgs84);
+ bg::strategy::intersection::geographic_segments<> s_4053(sph_4053);
+ bg::strategy::intersection::geographic_segments<> s_near_4053(sph_near_4053);
+
+ // Two cases which in Cartesian would be a spike, but in Geographic
+ // they go over the equator (first segment) and then over the pole
+ // (second segment)
+ test_simple_s(from_wkt<G>("LINESTRING(0 0, -90 0, 90 0)"), s, true);
+ test_simple_s(from_wkt<G>("LINESTRING(0 0, 90 0, -90 0)"), s, true);
+
+ // Two similar cases, but these do not go over the pole back, but
+ // over the equator, and therefore make a spike
+ test_simple_s(from_wkt<G>("LINESTRING(0 0, -80 0, 80 0)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(0 0, 80 0, -80 0)"), s, false);
+
+ // Going over the equator in a normal way, eastwards and westwards
+ test_simple_s(from_wkt<G>("LINESTRING(-90 0, 0 0, 90 0)"), s, true);
+ test_simple_s(from_wkt<G>("LINESTRING(90 0, 0 0, -90 0)"), s, true);
+
+ test_simple_s(from_wkt<G>("LINESTRING(0 90, -90 0, 90 0)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(0 90, -90 50, 90 0)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(0 90, -90 -50, 90 0)"), s, true);
+
+ // invalid linestrings
+ test_simple_s(from_wkt<G>("LINESTRING(0 90, 0 90)"), s, false, false);
+ test_simple_s(from_wkt<G>("LINESTRING(0 -90, 0 -90)"), s, false, false);
+ test_simple_s(from_wkt<G>("LINESTRING(0 90, 1 90)"), s, false, false);
+ test_simple_s(from_wkt<G>("LINESTRING(0 -90, 1 -90)"), s, false, false);
+
+ // FAILING
+ //test_simple_s(from_wkt<G>("LINESTRING(0 90, 0 80, 1 80, 0 90)"), s, false);
+ //test_simple_s(from_wkt<G>("LINESTRING(0 -90, 0 -80, 1 -80, 0 -90)"), s, false);
+ //test_simple_s(from_wkt<G>("LINESTRING(0 90, 0 80, 1 80, 1 90)"), s, false);
+ //test_simple_s(from_wkt<G>("LINESTRING(0 -90, 0 -80, 1 -80, 1 -90)"), s, false);
+
+ test_simple_s(from_wkt<G>("LINESTRING(35 0, 110 36, 159 0, 82 30)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(135 0, -150 36, -101 0, -178 30)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(45 0, 120 36, 169 0, 92 30)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(179 0, -179 1, -179 0, 179 1)"), s, false);
+
+ test_simple_s(from_wkt<G>("LINESTRING(-121 -19,37 8,-19 -15,-104 -58)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(-121 -19,37 8,-19 -15,-104 -58)"), s_4053, false);
+ test_simple_s(from_wkt<G>("LINESTRING(-121 -19,37 8,-19 -15,-104 -58)"), s_near_4053, false);
+
+ // The segments are very close to each other, in WGS84 they cross,
+ // in spherical or nearly spherical they don't cross
+ test_simple_s(from_wkt<G>("LINESTRING(106 22,21 39,40 -12,-91 68)"), s, false);
+ test_simple_s(from_wkt<G>("LINESTRING(106 22,21 39,40 -12,-91 68)"), s_4053, true);
+ test_simple_s(from_wkt<G>("LINESTRING(106 22,21 39,40 -12,-91 68)"), s_near_4053, true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_simple_geo_multilinestring )
+{
+ typedef multi_linestring_type G;
+
+ bg::strategy::intersection::geographic_segments<> s_wgs84; // EPSG 4326
+ bg::strategy::intersection::geographic_segments<> s_bessel((sph(6377397.155,299.1528128))); // EPSG 4804, 4813, 4820
+
+ // FAILING
+ //test_simple_s(from_wkt<G>("MULTILINESTRING((0 90, 0 80),(1 90, 1 80))"), s_wgs84, false);
+ //test_simple_s(from_wkt<G>("MULTILINESTRING((0 -90, 0 -80),(1 -90, 1 -80))"), s_wgs84, false);
+
+ test_simple_s(from_wkt<G>("MULTILINESTRING((35 0, 110 36),(159 0, 82 30))"), s_wgs84, false);
+ test_simple_s(from_wkt<G>("MULTILINESTRING((135 0, -150 36),(-101 0, -178 30))"), s_wgs84, false);
+ test_simple_s(from_wkt<G>("MULTILINESTRING((45 0, 120 36),(169 0, 92 30))"), s_wgs84, false);
+ test_simple_s(from_wkt<G>("MULTILINESTRING((179 0, -179 1),(-179 0, 179 1))"), s_wgs84, false);
+
+ test_simple_s(from_wkt<G>("MULTILINESTRING((35 2,110 36),(72 51,67 28,16 53,159 3,82 30))"), s_wgs84, false);
+ test_simple_s(from_wkt<G>("MULTILINESTRING((35 2,110 36),(72 51,67 28,16 53,159 3,82 30))"), s_bessel, false);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/is_valid.cpp b/src/boost/libs/geometry/test/algorithms/is_valid.cpp
new file mode 100644
index 000000000..9c9ca4dde
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_valid.cpp
@@ -0,0 +1,1416 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_is_valid
+#endif
+
+#include <limits>
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_is_valid.hpp"
+#include "overlay/overlay_cases.hpp"
+
+#include <boost/geometry/core/coordinate_type.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/reverse.hpp>
+
+BOOST_AUTO_TEST_CASE( test_is_valid_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: POINT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef point_type G;
+ typedef default_validity_tester tester;
+ typedef test_valid<tester, G> test;
+
+ test::apply("p01", "POINT(0 0)", true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: MULTIPOINT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef multi_point_type G;
+ typedef default_validity_tester tester;
+ typedef test_valid<tester, G> test;
+
+ test::apply("mp01", "MULTIPOINT()", true);
+ test::apply("mp02", "MULTIPOINT(0 0,0 0)", true);
+ test::apply("mp03", "MULTIPOINT(0 0,1 0,1 1,0 1)", true);
+ test::apply("mp04", "MULTIPOINT(0 0,1 0,1 1,1 0,0 1)", true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: SEGMENT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef segment_type G;
+ typedef default_validity_tester tester;
+ typedef test_valid<tester, G> test;
+
+ test::apply("s01", "SEGMENT(0 0,0 0)", false);
+ test::apply("s02", "SEGMENT(0 0,1 0)", true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_box )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: BOX " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef box_type G;
+ typedef default_validity_tester tester;
+ typedef test_valid<tester, G> test;
+
+ // boxes where the max corner and below and/or to the left of min corner
+ test::apply("b01", "BOX(0 0,-1 0)", false);
+ test::apply("b02", "BOX(0 0,0 -1)", false);
+ test::apply("b03", "BOX(0 0,-1 -1)", false);
+
+ // boxes of zero area; they are not 2-dimensional, so invalid
+ test::apply("b04", "BOX(0 0,0 0)", false);
+ test::apply("b05", "BOX(0 0,1 0)", false);
+ test::apply("b06", "BOX(0 0,0 1)", false);
+
+ test::apply("b07", "BOX(0 0,1 1)", true);
+}
+
+template <typename G, bool AllowSpikes>
+void test_linestrings()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "SPIKES ALLOWED? "
+ << std::boolalpha
+ << AllowSpikes
+ << std::noboolalpha
+ << std::endl;
+#endif
+
+ typedef validity_tester_linear<AllowSpikes> tester;
+ typedef test_valid<tester, G> test;
+
+ // empty linestring
+ test::apply("l01", "LINESTRING()", false);
+
+ // 1-point linestrings
+ test::apply("l02", "LINESTRING(0 0)", false);
+ test::apply("l03", "LINESTRING(0 0,0 0)", false);
+ test::apply("l04", "LINESTRING(0 0,0 0,0 0)", false);
+
+ // 2-point linestrings
+ test::apply("l05", "LINESTRING(0 0,1 2)", true);
+ test::apply("l06", "LINESTRING(0 0,1 2,1 2)", true);
+ test::apply("l07", "LINESTRING(0 0,0 0,1 2,1 2)", true);
+ test::apply("l08", "LINESTRING(0 0,0 0,0 0,1 2,1 2)", true);
+
+ // 3-point linestrings
+ test::apply("l09", "LINESTRING(0 0,1 0,2 10)", true);
+ test::apply("l10", "LINESTRING(0 0,1 0,2 10,0 0)", true);
+ test::apply("l11", "LINESTRING(0 0,10 0,10 10,5 0)", true);
+
+ // linestrings with spikes
+ test::apply("l12", "LINESTRING(0 0,1 2,0 0)", AllowSpikes);
+ test::apply("l13", "LINESTRING(0 0,1 2,1 2,0 0)", AllowSpikes);
+ test::apply("l14", "LINESTRING(0 0,0 0,1 2,1 2,0 0)", AllowSpikes);
+ test::apply("l15", "LINESTRING(0 0,0 0,0 0,1 2,1 2,0 0,0 0)", AllowSpikes);
+ test::apply("l16", "LINESTRING(0 0,10 0,5 0)", AllowSpikes);
+ test::apply("l17", "LINESTRING(0 0,10 0,10 10,5 0,0 0)", AllowSpikes);
+ test::apply("l18", "LINESTRING(0 0,10 0,10 10,5 0,4 0,6 0)", AllowSpikes);
+ test::apply("l19", "LINESTRING(0 0,1 0,1 1,5 5,4 4)", AllowSpikes);
+ test::apply("l20", "LINESTRING(0 0,1 0,1 1,5 5,4 4,6 6)", AllowSpikes);
+ test::apply("l21", "LINESTRING(0 0,1 0,1 1,5 5,4 4,4 0)", AllowSpikes);
+ test::apply("l22",
+ "LINESTRING(0 0,0 0,1 0,1 0,1 0,0 0,0 0,2 0)",
+ AllowSpikes);
+ test::apply("l23",
+ "LINESTRING(0 0,1 0,0 0,2 0,0 0,3 0,0 0,4 0)",
+ AllowSpikes);
+ test::apply("l24",
+ "LINESTRING(0 0,1 0,0 0,2 0,0 0,3 0,0 0,4 0,0 0)",
+ AllowSpikes);
+
+ // other examples
+ test::apply("l25", "LINESTRING(0 0,10 0,10 10,5 0,4 0)", true);
+ test::apply("l26", "LINESTRING(0 0,10 0,10 10,5 0,4 0,3 0)", true);
+ test::apply("l27", "LINESTRING(0 0,10 0,10 10,5 0,4 0,-1 0)", true);
+ test::apply("l28", "LINESTRING(0 0,1 0,1 1,-1 1,-1 0,0 0)", true);
+ test::apply("l29", "LINESTRING(0 0,1 0,1 1,-1 1,-1 0,0.5 0)", true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: LINESTRING " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ bool const allow_spikes = true;
+ bool const do_not_allow_spikes = !allow_spikes;
+
+ test_linestrings<linestring_type, allow_spikes>();
+ test_linestrings<linestring_type, do_not_allow_spikes>();
+}
+
+template <typename G, bool AllowSpikes>
+void test_multilinestrings()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "SPIKES ALLOWED? "
+ << std::boolalpha
+ << AllowSpikes
+ << std::noboolalpha
+ << std::endl;
+#endif
+
+ typedef validity_tester_linear<AllowSpikes> tester;
+ typedef test_valid<tester, G> test;
+
+ // empty multilinestring
+ test::apply("mls01", "MULTILINESTRING()", true);
+
+ // multilinestring with empty linestring(s)
+ test::apply("mls02", "MULTILINESTRING(())", false);
+ test::apply("mls03", "MULTILINESTRING((),(),())", false);
+ test::apply("mls04", "MULTILINESTRING((),(0 1,1 0))", false);
+
+ // multilinestring with invalid linestrings
+ test::apply("mls05", "MULTILINESTRING((0 0),(0 1,1 0))", false);
+ test::apply("mls06", "MULTILINESTRING((0 0,0 0),(0 1,1 0))", false);
+ test::apply("mls07", "MULTILINESTRING((0 0),(1 0))", false);
+ test::apply("mls08", "MULTILINESTRING((0 0,0 0),(1 0,1 0))", false);
+ test::apply("mls09", "MULTILINESTRING((0 0),(0 0))", false);
+ test::apply("mls10", "MULTILINESTRING((0 0,1 0,0 0),(5 0))", false);
+
+ // multilinstring that has linestrings with spikes
+ test::apply("mls11",
+ "MULTILINESTRING((0 0,1 0,0 0),(5 0,1 0,4 1))",
+ AllowSpikes);
+ test::apply("mls12",
+ "MULTILINESTRING((0 0,1 0,0 0),(1 0,2 0))",
+ AllowSpikes);
+
+ // valid multilinestrings
+ test::apply("mls13", "MULTILINESTRING((0 0,1 0,2 0),(5 0,1 0,4 1))", true);
+ test::apply("mls14", "MULTILINESTRING((0 0,1 0,2 0),(1 0,2 0))", true);
+ test::apply("mls15", "MULTILINESTRING((0 0,1 1),(0 1,1 0))", true);
+ test::apply("mls16", "MULTILINESTRING((0 0,1 1,2 2),(0 1,1 0,2 2))", true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: MULTILINESTRING " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ bool const allow_spikes = true;
+ bool const do_not_allow_spikes = !allow_spikes;
+
+ test_multilinestrings<multi_linestring_type, allow_spikes>();
+ test_multilinestrings<multi_linestring_type, do_not_allow_spikes>();
+}
+
+template <typename Point, bool AllowDuplicates>
+inline void test_open_rings()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: RING (open) " << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << "DUPLICATES ALLOWED? "
+ << std::boolalpha
+ << AllowDuplicates
+ << std::noboolalpha
+ << std::endl;
+#endif
+
+ typedef bg::model::ring<Point, false, false> OG; // ccw, open ring
+ typedef bg::model::ring<Point, false, true> CG; // ccw, closed ring
+ typedef bg::model::ring<Point, true, false> CW_OG; // cw, open ring
+ typedef bg::model::ring<Point, true, true> CW_CG; // cw, closed ring
+
+ typedef validity_tester_areal<AllowDuplicates> tester;
+ typedef test_valid<tester, OG, CG, CW_OG, CW_CG> test;
+
+ // not enough points
+ test::apply("r01", "POLYGON(())", false);
+ test::apply("r02", "POLYGON((0 0))", false);
+ test::apply("r03", "POLYGON((0 0,1 0))", false);
+
+ // duplicate points
+ test::apply("r04", "POLYGON((0 0,0 0,0 0))", false);
+ test::apply("r05", "POLYGON((0 0,1 0,1 0))", false);
+ test::apply("r06", "POLYGON((0 0,1 0,0 0))", false);
+ test::apply("r07", "POLYGON((0 0,1 0,1 1,0 0,0 0))", AllowDuplicates);
+ test::apply("r08", "POLYGON((0 0,1 0,1 0,1 1))", AllowDuplicates);
+ test::apply("r09", "POLYGON((0 0,1 0,1 0,1 1,0 0))", AllowDuplicates);
+
+ // with spikes
+ test::apply("r10", "POLYGON((0 0,2 0,2 2,0 2,1 2))", false);
+ test::apply("r11", "POLYGON((0 0,2 0,1 0,2 2))", false);
+ test::apply("r12", "POLYGON((0 0,1 0,2 0,1 0,4 0,4 4))", false);
+ test::apply("r13", "POLYGON((0 0,2 0,2 2,1 0))", false);
+ test::apply("r14", "POLYGON((0 0,2 0,1 0))", false);
+ test::apply("r15", "POLYGON((0 0,5 0,5 5,4 4,5 5,0 5))", false);
+ test::apply("r16", "POLYGON((0 0,5 0,5 5,4 4,3 3,5 5,0 5))", false);
+
+ // with spikes and duplicate points
+ test::apply("r17", "POLYGON((0 0,0 0,2 0,2 0,1 0,1 0))", false);
+
+ // with self-crossings
+ test::apply("r18", "POLYGON((0 0,5 0,5 5,3 -1,0 5))", false);
+
+ // with self-crossings and duplicate points
+ test::apply("r19", "POLYGON((0 0,5 0,5 5,5 5,3 -1,0 5,0 5))", false);
+
+ // with self-intersections
+ test::apply("r20", "POLYGON((0 0,5 0,5 5,3 5,3 0,2 0,2 5,0 5))", false);
+
+ test::apply("r21", "POLYGON((0 0,5 0,5 5,3 5,3 0,2 5,0 5))", false);
+
+ test::apply("r22",
+ "POLYGON((0 0,5 0,5 1,1 1,1 2,2 2,3 1,4 2,5 2,5 5,0 5))",
+ false);
+
+ // with self-intersections and duplicate points
+ test::apply("r23",
+ "POLYGON((0 0,5 0,5 5,3 5,3 5,3 0,3 0,2 0,2 0,2 5,2 5,0 5))",
+ false);
+
+ // next two suggested by Adam Wulkiewicz
+ test::apply("r24",
+ "POLYGON((0 0,5 0,5 5,0 5,4 4,2 2,0 5))",
+ false);
+ test::apply("r25",
+ "POLYGON((0 0,5 0,5 5,1 4,4 4,4 1,0 5))",
+ false);
+
+ // and a few more
+ test::apply("r26",
+ "POLYGON((0 0,5 0,5 5,4 4,1 4,1 1,4 1,4 4,0 5))",
+ false);
+ test::apply("r27",
+ "POLYGON((0 0,5 0,5 5,4 4,4 1,1 1,1 4,4 4,0 5))",
+ false);
+
+ // valid rings
+ test::apply("r28", "POLYGON((0 0,1 0,1 1))", true);
+ test::apply("r29", "POLYGON((1 0,1 1,0 0))", true);
+ test::apply("r30", "POLYGON((0 0,1 0,1 1,0 1))", true);
+ test::apply("r31", "POLYGON((1 0,1 1,0 1,0 0))", true);
+
+ // test cases coming from buffer
+ test::apply("r32",
+ "POLYGON((1.1713032141645456 -0.9370425713316364,\
+ 5.1713032141645456 4.0629574286683638,\
+ 4.7808688094430307 4.3753049524455756,\
+ 4.7808688094430307 4.3753049524455756,\
+ 0.7808688094430304 -0.6246950475544243,\
+ 0.7808688094430304 -0.6246950475544243))",
+ AllowDuplicates);
+
+ // wrong orientation
+ test::apply("r33", "POLYGON((0 0,0 1,1 1))", false);
+
+ // Normal case, plus spikes formed in two different ways
+ test::apply("r34", "POLYGON((0 0,4 0,4 4,0 4,0 0))", true);
+ test::apply("r35", "POLYGON((0 0,5 0,4 0,4 4,0 4,0 0))", false);
+ test::apply("r36", "POLYGON((0 0,4 0,4 -1,4 4,0 4,0 0))", false);
+}
+
+
+template <typename Point, bool AllowDuplicates>
+inline void test_closed_rings()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: RING (closed) " << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << "DUPLICATES ALLOWED? "
+ << std::boolalpha
+ << AllowDuplicates
+ << std::noboolalpha
+ << std::endl;
+#endif
+
+ typedef bg::model::ring<Point, false, true> CG; // ccw, closed ring
+ typedef bg::model::ring<Point, true, true> CW_CG; // cw, closed ring
+
+ typedef validity_tester_areal<AllowDuplicates> tester;
+ typedef test_valid<tester, CG, CG, CW_CG> test;
+
+ // not enough points
+ test::apply("r01c", "POLYGON(())", false);
+ test::apply("r02c", "POLYGON((0 0))", false);
+ test::apply("r03c", "POLYGON((0 0,0 0))", false);
+ test::apply("r04c", "POLYGON((0 0,1 0))", false);
+ test::apply("r05c", "POLYGON((0 0,1 0,1 0))", false);
+ test::apply("r06c", "POLYGON((0 0,1 0,2 0))", false);
+ test::apply("r07c", "POLYGON((0 0,1 0,1 0,2 0))", false);
+ test::apply("r08c", "POLYGON((0 0,1 0,2 0,2 0))", false);
+
+ // boundary not closed
+ test::apply("r09c", "POLYGON((0 0,1 0,1 1,1 2))", false);
+ test::apply("r10c", "POLYGON((0 0,1 0,1 0,1 1,1 1,1 2))", false);
+
+ // with spikes
+ test::apply("r11c", "POLYGON((0 0,1 0,1 0,2 0,0 0))", false);
+ test::apply("r12c", "POLYGON((0 0,1 0,1 1,2 2,0.5 0.5,0 1,0 0))", false);
+
+ // wrong orientation
+ test::apply("r13c", "POLYGON((0 0,0 1,1 1,2 0,0 0))", false);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_ring )
+{
+ bool const allow_duplicates = true;
+ bool const do_not_allow_duplicates = !allow_duplicates;
+
+ test_open_rings<point_type, allow_duplicates>();
+ test_open_rings<point_type, do_not_allow_duplicates>();
+
+ test_closed_rings<point_type, allow_duplicates>();
+ test_closed_rings<point_type, do_not_allow_duplicates>();
+}
+
+template <typename Point, bool AllowDuplicates>
+inline void test_open_polygons()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: POLYGON (open) " << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << "DUPLICATES ALLOWED? "
+ << std::boolalpha
+ << AllowDuplicates
+ << std::noboolalpha
+ << std::endl;
+#endif
+
+ typedef bg::model::polygon<Point, false, false> OG; // ccw, open
+ typedef bg::model::polygon<Point, false, true> CG; // ccw, closed
+ typedef bg::model::polygon<Point, true, false> CW_OG; // cw, open
+ typedef bg::model::polygon<Point, true, true> CW_CG; // cw, closed
+
+ typedef validity_tester_areal<AllowDuplicates> tester;
+ typedef test_valid<tester, OG, CG, CW_OG, CW_CG> test;
+
+ // not enough points in exterior ring
+ test::apply("pg001", "POLYGON(())", false);
+ test::apply("pg002", "POLYGON((0 0))", false);
+ test::apply("pg003", "POLYGON((0 0,1 0))", false);
+
+ // not enough points in interior ring
+ test::apply("pg004", "POLYGON((0 0,10 0,10 10,0 10),())", false);
+ test::apply("pg005", "POLYGON((0 0,10 0,10 10,0 10),(1 1))", false);
+ test::apply("pg006", "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2))", false);
+
+ // duplicate points in exterior ring
+ test::apply("pg007", "POLYGON((0 0,0 0,0 0))", false);
+ test::apply("pg008", "POLYGON((0 0,1 0,1 0))", false);
+ test::apply("pg009", "POLYGON((0 0,1 0,0 0))", false);
+ test::apply("pg010", "POLYGON((0 0,1 0,1 1,0 0,0 0))", AllowDuplicates);
+ test::apply("pg011", "POLYGON((0 0,1 0,1 0,1 1))", AllowDuplicates);
+ test::apply("pg012", "POLYGON((0 0,1 0,1 0,1 1,0 0))", AllowDuplicates);
+
+ // duplicate points in interior ring
+ test::apply("pg013", "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 1,1 1))", false);
+ test::apply("pg014", "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,2 1))", false);
+ test::apply("pg015", "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,1 1))", false);
+ test::apply("pg016",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2,2 1,1 1,1 1))",
+ AllowDuplicates);
+ test::apply("pg017",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2,2 2,2 1))",
+ AllowDuplicates);
+ test::apply("pg018",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2,2 1,2 1,1 1))",
+ AllowDuplicates);
+
+ // with spikes in exterior ring
+ test::apply("pg019", "POLYGON((0 0,2 0,2 2,0 2,1 2))", false);
+ test::apply("pg020", "POLYGON((0 0,2 0,1 0,2 2))", false);
+ test::apply("pg021", "POLYGON((0 0,1 0,2 0,1 0,4 0,4 4))", false);
+ test::apply("pg022", "POLYGON((0 0,2 0,2 2,1 0))", false);
+ test::apply("pg023", "POLYGON((0 0,2 0,1 0))", false);
+ test::apply("pg024", "POLYGON((0 0,5 0,5 5,4 4,5 5,0 5))", false);
+ test::apply("pg025", "POLYGON((0 0,5 0,5 5,4 4,3 3,5 5,0 5))", false);
+
+ // with spikes in interior ring
+ test::apply("pg026",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,3 3,1 3,2 3))",
+ false);
+ test::apply("pg027",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,2 1,3 3))",
+ false);
+ test::apply("pg028",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,3 1,2 1,4 1,4 4))",
+ false);
+ test::apply("pg029",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,3 3,2 1))",
+ false);
+ test::apply("pg030", "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,2 1))", false);
+
+ // with self-crossings in exterior ring
+ test::apply("pg031", "POLYGON((0 0,5 0,5 5,3 -1,0 5))", false);
+
+ // example from Norvald Ryeng
+ test::apply("pg032",
+ "POLYGON((100 1300,140 1300,140 170,100 1700))",
+ false);
+ // and with point order reversed
+ test::apply("pg033",
+ "POLYGON((100 1300,100 1700,140 170,140 1300))",
+ false);
+
+ // with self-crossings in interior ring
+ test::apply("pg034",
+ "POLYGON((0 0,10 0,10 10,0 10),(3 3,3 7,4 6,2 6))",
+ false);
+
+ // with self-crossings between rings
+ test::apply("pg035", "POLYGON((0 0,5 0,5 5,0 5),(1 1,2 1,1 -1))", false);
+
+ // with self-intersections in exterior ring
+ test::apply("pg036", "POLYGON((0 0,5 0,5 5,3 5,3 0,2 0,2 5,0 5))", false);
+ test::apply("pg037", "POLYGON((0 0,5 0,5 5,3 5,3 0,2 5,0 5))", false);
+ test::apply("pg038",
+ "POLYGON((0 0,5 0,5 1,1 1,1 2,2 2,3 1,4 2,5 2,5 5,0 5))",
+ false);
+
+ // next two suggested by Adam Wulkiewicz
+ test::apply("pg039", "POLYGON((0 0,5 0,5 5,0 5,4 4,2 2,0 5))", false);
+ test::apply("pg040", "POLYGON((0 0,5 0,5 5,1 4,4 4,4 1,0 5))", false);
+ test::apply("pg041",
+ "POLYGON((0 0,5 0,5 5,4 4,1 4,1 1,4 1,4 4,0 5))",
+ false);
+ test::apply("pg042",
+ "POLYGON((0 0,5 0,5 5,4 4,4 1,1 1,1 4,4 4,0 5))",
+ false);
+
+ // with self-intersections in interior ring
+ test::apply("pg043",
+ "POLYGON((-10 -10,10 -10,10 10,-10 10),(0 0,5 0,5 5,3 5,3 0,2 0,2 5,0 5))",
+ false);
+ test::apply("pg044",
+ "POLYGON((-10 -10,10 -10,10 10,-10 10),(0 0,5 0,5 5,3 5,3 0,2 5,0 5))",
+ false);
+
+ test::apply("pg045",
+ "POLYGON((-10 -10,10 -10,10 10,-10 10),(0 0,5 0,5 1,1 1,1 2,2 2,3 1,4 2,5 2,5 5,0 5))",
+ false);
+
+ // with self-intersections between rings
+ // hole has common segment with exterior ring
+ test::apply("pg046",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 10,2 10,2 1))",
+ false);
+ test::apply("pg047",
+ "POLYGON((0 0,0 0,10 0,10 10,0 10,0 10),(1 1,1 10,1 10,2 10,2 10,2 1))",
+ false);
+ // hole touches exterior ring at one point
+ test::apply("pg048", "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 10,2 1))", true);
+
+ // "hole" is outside the exterior ring, but touches it
+ test::apply("pg049",
+ "POLYGON((0 0,10 0,10 10,0 10),(5 10,4 11,6 11))",
+ false);
+
+ // hole touches exterior ring at vertex
+ test::apply("pg050", "POLYGON((0 0,10 0,10 10,0 10),(0 0,1 4,4 1))", true);
+
+ // "hole" is completely outside the exterior ring
+ test::apply("pg051",
+ "POLYGON((0 0,10 0,10 10,0 10),(20 20,20 21,21 21,21 20))",
+ false);
+
+ // two "holes" completely outside the exterior ring, that touch
+ // each other
+ test::apply("pg052",
+ "POLYGON((0 0,10 0,10 10,0 10),(20 0,25 10,21 0),(30 0,25 10,31 0))",
+ false);
+
+ // example from Norvald Ryeng
+ test::apply("pg053",
+ "POLYGON((58 31,56.57 30,62 33),(35 9,28 14,31 16),(23 11,29 5,26 4))",
+ false);
+ // and with points reversed
+ test::apply("pg054",
+ "POLYGON((58 31,62 33,56.57 30),(35 9,31 16,28 14),(23 11,26 4,29 5))",
+ false);
+
+ // "hole" is completely inside another "hole"
+ test::apply("pg055",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,8 2))",
+ false);
+ test::apply("pg056",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,8 2,8 8,2 8))",
+ false);
+
+ // "hole" is inside another "hole" (touching)
+ test::apply("pg057",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ false);
+ test::apply("pg058",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ false);
+ test::apply("pg058a",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,8 2,9 6,8 8,2 8))",
+ false);
+ test::apply("pg059",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ false);
+ test::apply("pg059a",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,9 1,9 9,1 9),(2 2,2 8,8 8,9 6,8 2))",
+ false);
+ test::apply("pg060",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ false);
+ test::apply("pg060a",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,9 1,9 9,1 9),(2 2,8 2,9 6,8 8,2 8))",
+ false);
+ // hole touches exterior ring at two points
+ test::apply("pg061", "POLYGON((0 0,10 0,10 10,0 10),(5 0,0 5,5 5))", false);
+
+ // cases with more holes
+ // two holes, touching the exterior at the same point
+ test::apply("pg062",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 0,1 9,2 9),(0 0,9 2,9 1))",
+ true);
+ test::apply("pg063",
+ "POLYGON((0 0,0 0,10 0,10 10,0 10,0 0),(0 0,0 0,1 9,2 9),(0 0,0 0,9 2,9 1))",
+ AllowDuplicates);
+ test::apply("pg063",
+ "POLYGON((0 10,0 0,0 0,0 0,10 0,10 10),(2 9,0 0,0 0,1 9),(9 1,0 0,0 0,9 2))",
+ AllowDuplicates);
+ // two holes, one inside the other
+ test::apply("pg064",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 0,1 9,9 1),(0 0,4 5,5 4))",
+ false);
+ // 1st hole touches has common segment with 2nd hole
+ test::apply("pg066",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 5,5 5,5 1),(5 4,5 8,8 8,8 4))",
+ false);
+ // 1st hole touches 2nd hole at two points
+ test::apply("pg067",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 8,2 8,2 1),(2 5,5 8,5 5))",
+ false);
+ // polygon with many holes, where the last two touch at two points
+ test::apply("pg068",
+ "POLYGON((0 0,20 0,20 20,0 20),(1 18,1 19,2 19,2 18),(3 18,3 19,4 19,4 18),(5 18,5 19,6 19,6 18),(7 18,7 19,8 19,8 18),(9 18,9 19,10 19,10 18),(11 18,11 19,12 19,12 18),(13 18,13 19,14 19,14 18),(15 18,15 19,16 19,16 18),(17 18,17 19,18 19,18 18),(1 1,1 9,9 9,9 8,2 8,2 1),(2 5,5 8,5 5))",
+ false);
+ // two holes completely inside exterior ring but touching each
+ // other at a point
+ test::apply("pg069",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,2 9),(1 1,9 2,9 1))",
+ true);
+ // four holes, each two touching at different points
+ test::apply("pg070",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 10,2 1,1 1),(0 10,4 1,3 1),(10 10,9 1,8 1),(10 10,7 1,6 1))",
+ true);
+ // five holes, with two pairs touching each at some point, and
+ // fifth hole creating a disconnected component for the interior
+ test::apply("pg071",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 10,2 1,1 1),(0 10,4 1,3 1),(10 10,9 1,8 1),(10 10,7 1,6 1),(4 1,4 4,6 4,6 1))",
+ false);
+ // five holes, with two pairs touching each at some point, and
+ // fifth hole creating three disconnected components for the interior
+ test::apply("pg072",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 10,2 1,1 1),(0 10,4 1,3 1),(10 10,9 1,8 1),(10 10,7 1,6 1),(4 1,4 4,6 4,6 1,5 0))",
+ false);
+
+ // both examples: a polygon with one hole, where the hole contains
+ // the exterior ring
+ test::apply("pg073",
+ "POLYGON((0 0,1 0,1 1,0 1),(-10 -10,-10 10,10 10,10 -10))",
+ false);
+ test::apply("pg074",
+ "POLYGON((-10 -10,1 0,1 1,0 1),(-10 -10,-10 10,10 10,10 -10))",
+ false);
+
+ test::apply
+ ("pg075",
+ "POLYGON((-6 -10,-6.6923076923076925 -6.711538461538462,\
+ -9 -7,-8.824742268041238 -6.123711340206185,\
+ -10 -6,-8.583333333333332 -4.916666666666667,\
+ -8.094117647058823 -2.4705882352941173,-10 -3,\
+ -8.526315789473683 -0.05263157894736803,-10 1,\
+ -10 10,-7.764705882352941 8.509803921568627,\
+ -7.65090909090909 7.789090909090909,-10 10,\
+ -7.574468085106383 7.304964539007091,-7.4375 6.4375,\
+ -6.5 5.5,-6.4 6,-7.574468085106383 7.304964539007091,\
+ -7.65090909090909 7.789090909090909,\
+ -6.297029702970297 6.514851485148515,\
+ 0 0,-6.297029702970297 6.514851485148515,\
+ -4.848484848484849 5.151515151515151,-4 6,\
+ -6.117647058823529 7.411764705882352,\
+ 0 0,-6.11764705882353 7.411764705882353,\
+ -7.764705882352941 8.509803921568627,-8 10,\
+ -2.9473684210526314 7.052631578947368,-2 8,\
+ -0.17821782178217824 6.633663366336634,1 10,\
+ 1.8095238095238098 5.142857142857142,\
+ 3.2038834951456314 4.097087378640777,7 7,\
+ 3.7142857142857144 3.7142857142857144,\
+ 4.4 3.1999999999999997,8 2,\
+ 6.540540540540541 1.5945945945945947,10 -1,\
+ 7.454545454545455 -4.393939393939394,8 -5,\
+ 7.320754716981132 -4.716981132075472,7 -6,\
+ 6.062068965517241 -5.117241379310345,\
+ 4.9504132231404965 -5.256198347107438,\
+ 6.1506849315068495 -7.123287671232877,9 -8,\
+ 6.548387096774194 -7.741935483870968,8 -10,\
+ 5.906976744186046 -7.674418604651163,\
+ 3.9107142857142856 -7.464285714285714,4 -8,\
+ 2.8043478260869565 -7.3478260869565215,\
+ 1.7829457364341086 -7.24031007751938,2 -8,\
+ 1.0728476821192054 -7.1655629139072845,\
+ -4.3583617747440275 -6.593856655290103,-5 -9,\
+ -5.2020725388601035 -7.720207253886011,-6 -10),\
+ (5.127659574468085 -6.808510638297872,\
+ 3.72972972972973 -6.378378378378379,\
+ 3.571428571428571 -5.428571428571429,\
+ 3.8539325842696632 -5.393258426966292,\
+ 5.127659574468085 -6.808510638297872),\
+ (-5.5 4.5,-6.5 5.5,-6.4 6,\
+ -5.263157894736842 4.736842105263158,-5.5 4.5))",
+ false);
+
+ // test cases coming from buffer
+ test::apply
+ ("pg076",
+ "POLYGON((1.1713032141645456 -0.9370425713316364,\
+ 5.1713032141645456 4.0629574286683638,\
+ 4.7808688094430307 4.3753049524455756,\
+ 4.7808688094430307 4.3753049524455756,\
+ 0.7808688094430304 -0.6246950475544243,\
+ 0.7808688094430304 -0.6246950475544243))",
+ AllowDuplicates);
+
+
+ // MySQL report on Sep 30, 2015
+ test::apply
+ ("pg077",
+ "POLYGON((72.8714768817168 -167.0048853643874,9274.40641550926 3433.5957427942167,-58.09039811390054 187.50989457746405,-81.09039811390053 179.50989457746405,-207.99999999999997 135.36742435621204,-208 1,-208 0,-208 -276.9111154485375,49.8714768817168 -176.0048853643874))",
+ true);
+
+ test::apply("pg077-simplified",
+ "POLYGON((-200 0,-207.99999999999997 135.36742435621204,-208 1,-208 0,-208 -276.9111154485375))",
+ true);
+
+ test::apply
+ ("pg078",
+ "POLYGON((0 10,-10 0,0 0,10 0))",
+ true);
+
+ test::apply
+ ("pg078spike1",
+ "POLYGON((0 10,-10 0,0 0,-10 0,10 0))",
+ false);
+
+ test::apply
+ ("pg078spike2",
+ "POLYGON((0 10,-10 0,0 0,-8 0,10 0))",
+ false);
+
+ test::apply
+ ("pg078spike3",
+ "POLYGON((0 10,-10 0,0 0,-11 0,10 0))",
+ false);
+
+ test::apply
+ ("pg078reversed",
+ "POLYGON((0 10,10 0,0 0,-10 0))",
+ false);
+
+ test::apply
+ ("pg079",
+ "POLYGON((10 0,0 10,0 0,0 -10))",
+ true);
+
+ test::apply
+ ("pg079spike1",
+ "POLYGON((10 0,0 10,0 0,0 10,0 -10))",
+ false);
+
+ test::apply
+ ("pg079spike2",
+ "POLYGON((10 0,0 10,0 0,0 8,0 -10))",
+ false);
+
+ test::apply
+ ("pg079spike3",
+ "POLYGON((10 0,0 10,0 0,0 11,0 -10))",
+ false);
+
+ test::apply
+ ("pg079reversed",
+ "POLYGON((10 0,0 -10,0 0,0 10))",
+ false);
+}
+
+
+template <typename Point>
+inline void test_doc_example_polygon()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: doc example polygon " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<Point> ClockwiseClosedPolygon;
+ typedef validity_tester_areal<true> tester;
+ typedef test_valid<tester, ClockwiseClosedPolygon> test;
+
+ test::apply("pg-doc",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 2,0 0),(0 0,2 9,1 9,0 0),(2 9,9 2,9 9,2 9))",
+ false);
+
+ // Containing a self touching point, which should be valid
+ test::apply("ggl_list_20190307_matthieu_2", ggl_list_20190307_matthieu_2[1], true);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_polygon )
+{
+ bool const allow_duplicates = true;
+ bool const do_not_allow_duplicates = !allow_duplicates;
+
+ test_open_polygons<point_type, allow_duplicates>();
+ test_open_polygons<point_type, do_not_allow_duplicates>();
+ test_doc_example_polygon<point_type>();
+}
+
+template <typename Point, bool AllowDuplicates>
+inline void test_open_multipolygons()
+{
+ // WKT of multipolygons should be defined as ccw, open
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: MULTIPOLYGON (open) " << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << "DUPLICATES ALLOWED? "
+ << std::boolalpha
+ << AllowDuplicates
+ << std::noboolalpha
+ << std::endl;
+#endif
+
+ // cw, ccw, open and closed polygons
+ typedef bg::model::polygon<point_type,false,false> ccw_open_polygon_type;
+ typedef bg::model::polygon<point_type,false,true> ccw_closed_polygon_type;
+ typedef bg::model::polygon<point_type,true,false> cw_open_polygon_type;
+ typedef bg::model::polygon<point_type,true,true> cw_closed_polygon_type;
+
+ typedef bg::model::multi_polygon<ccw_open_polygon_type> OG;
+ typedef bg::model::multi_polygon<ccw_closed_polygon_type> CG;
+ typedef bg::model::multi_polygon<cw_open_polygon_type> CW_OG;
+ typedef bg::model::multi_polygon<cw_closed_polygon_type> CW_CG;
+
+ typedef validity_tester_areal<AllowDuplicates> tester;
+ typedef test_valid<tester, OG, CG, CW_OG, CW_CG> test;
+
+ // not enough points
+ test::apply("mpg01", "MULTIPOLYGON()", true);
+ test::apply("mpg02", "MULTIPOLYGON((()))", false);
+ test::apply("mpg03", "MULTIPOLYGON(((0 0)),(()))", false);
+ test::apply("mpg04", "MULTIPOLYGON(((0 0,1 0)))", false);
+
+ // two disjoint polygons
+ test::apply("mpg05",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1)),((2 2,3 2,3 3,2 3)))",
+ true);
+
+ // two disjoint polygons with multiple points
+ test::apply("mpg06",
+ "MULTIPOLYGON(((0 0,1 0,1 0,1 1,0 1)),((2 2,3 2,3 3,3 3,2 3)))",
+ AllowDuplicates);
+
+ // two polygons touch at a point
+ test::apply("mpg07",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1)),((1 1,2 1,2 2,1 2)))",
+ true);
+
+ // two polygons share a segment at a point
+ test::apply("mpg08",
+ "MULTIPOLYGON(((0 0,1.5 0,1.5 1,0 1)),((1 1,2 1,2 2,1 2)))",
+ false);
+
+ // one polygon inside another and boundaries touching
+ test::apply("mpg09",
+ "MULTIPOLYGON(((0 0,10 0,10 10,0 10)),((0 0,9 1,9 2)))",
+ false);
+ test::apply("mpg09_2",
+ "MULTIPOLYGON(((0 0,5 1,10 0,10 10,0 10)),((1 1,9 1,9 2)))",
+ false);
+
+ // one polygon inside another and boundaries not touching
+ test::apply("mpg10",
+ "MULTIPOLYGON(((0 0,10 0,10 10,0 10)),((1 1,9 1,9 2)))",
+ false);
+
+ // free space is disconnected
+ test::apply("mpg11",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1)),((1 1,2 1,2 2,1 2)),((0 1,0 2,-1 2,-1 -1)),((1 2,1 3,0 3,0 2)))",
+ true);
+
+ // multi-polygon with a polygon inside the hole of another polygon
+ test::apply("mpg12",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(1 1,1 99,99 99,99 1)),((2 2,98 2,98 98,2 98)))",
+ true);
+ test::apply("mpg13",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(1 1,1 99,99 99,99 1)),((1 1,98 2,98 98,2 98)))",
+ true);
+
+ // test case suggested by Barend Gehrels: take two valid polygons P1 and
+ // P2 with holes H1 and H2, respectively, and consider P2 to be
+ // fully inside H1; now invalidate the multi-polygon by
+ // considering H2 as a hole of P1 and H1 as a hole of P2; this
+ // should be invalid
+ //
+ // first the valid case:
+ test::apply("mpg14",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(1 1,1 99,99 99,99 1)),((2 2,98 2,98 98,2 98),(3 3,3 97,97 97,97 3)))",
+ true);
+ // and the invalid case:
+ test::apply("mpg15",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(3 3,3 97,97 97,97 3)),((2 2,98 2,98 98,2 98),(1 1,1 99,99 99,99 1)))",
+ false);
+
+ test::apply
+ ("mpg16",
+ "MULTIPOLYGON(((-1 4,8 -10,-10 10,7 -6,8 -2,\
+ -10 10,-10 1,-3 -4,4 1,-1 2,4 3,-8 10,-5 -9,-1 6,-5 0)),\
+ ((-10 -3,-8 1,2 -8,-2 6,-4 0,8 -5,-1 5,8 2)),\
+ ((-6 -10,1 10,4 -8,-7 -2,2 0,-4 3,-10 9)),\
+ ((10 -1,-2 8,-7 3,-6 8,-9 -7,7 -5)),\
+ ((7 7,-4 -4,9 -8,-10 -6)))",
+ false);
+
+ test::apply
+ ("mpg17",
+ "MULTIPOLYGON(((-1 4,8 -10,-10 10,7 -6,8 -2,\
+ -10 10,-10 1,-3 -4,4 1,-1 2,4 3,-8 10,-5 -9,-1 6,-5 0)),\
+ ((-10 -3,-8 1,2 -8,-2 6,-4 0,8 -5,-1 5,8 2)),\
+ ((-6 -10,-10 9,-4 3,2 0,-7 -2,4 -8,1 10)),\
+ ((10 -1,-2 8,-7 3,-6 8,-9 -7,7 -5)),\
+ ((7 7,-10 -6,9 -8,-4 -4)))",
+ false);
+
+ // test cases coming from buffer
+ {
+ std::string wkt = "MULTIPOLYGON(((1.1713032141645456 -0.9370425713316364,5.1713032141645456 4.0629574286683638,4.7808688094430307 4.3753049524455756,4.7808688094430307 4.3753049524455756,0.7808688094430304 -0.6246950475544243,0.7808688094430304 -0.6246950475544243,1.1713032141645456 -0.9370425713316364)))";
+
+ OG open_mpgn = from_wkt<OG>(wkt);
+ bg::reverse(open_mpgn);
+
+ test::apply("mpg18", open_mpgn, false);
+ }
+ {
+ std::string wkt = "MULTIPOLYGON(((5.2811206375710933 9.9800205994776228,5.2446420208654896 10.0415020265598844,5.1807360092909640 10.1691699739962242,5.1261005500004773 10.3010716408018013,5.0810140527710059 10.4365348863171388,5.0457062680576819 10.5748694208940446,5.0203571162381344 10.7153703234534277,5.0050957707794934 10.8573216336015328,5.0000000000000000 10.9999999999999964,5.0050957707794925 11.1426783663984619,5.0203571162381344 11.2846296765465670,5.0457062680576801 11.4251305791059501,5.0810140527710042 11.5634651136828559,5.1261005500004755 11.6989283591981934,5.1807360092909622 11.8308300260037704,5.2446420208654869 11.9584979734401102,5.3174929343376363 12.0812816349111927,5.3989175181512774 12.1985553330226910,5.4885008512914810 12.3097214678905669,5.5857864376269024 12.4142135623730923,5.6902785321094269 12.5114991487085145,5.8014446669773028 12.6010824818487190,5.9187183650888020 12.6825070656623602,6.0415020265598844 12.7553579791345104,6.1691699739962260 12.8192639907090360,6.3010716408018030 12.8738994499995236,6.4365348863171405 12.9189859472289950,6.5748694208940472 12.9542937319423199,6.7153703234534312 12.9796428837618656,6.8573216336015381 12.9949042292205075,7.0000000000000036 13.0000000000000000,7.1426783663984690 12.9949042292205075,7.2846296765465750 12.9796428837618656,7.4251305791059590 12.9542937319423181,7.5634651136828657 12.9189859472289932,7.6989283591982032 12.8738994499995201,7.8308300260037802 12.8192639907090324,7.9584979734401209 12.7553579791345069,8.0812816349112033 12.6825070656623566,8.1985553330227017 12.6010824818487137,8.3097214678905793 12.5114991487085092,8.4142135623731029 12.4142135623730869,8.5114991487085252 12.3097214678905598,8.6010824818487297 12.1985553330226821,8.6825070656623708 12.0812816349111838,8.7553579791345193 11.9584979734400996,8.8192639907090431 11.8308300260037580,8.8738994499995290 11.6989283591981810,8.9189859472290003 11.5634651136828417,8.9542937319423235 11.4251305791059359,8.9796428837618691 11.2846296765465510,8.9949042292205093 11.1426783663984441,9.0000000000000000 11.0000000000000000,8.9949042292205075 10.8573216336015346,8.9796428837618656 10.7153703234534294,8.9542937319423181 10.5748694208940464,8.9189859472289950 10.4365348863171405,8.8738994499995236 10.3010716408018030,8.8192639907090360 10.1691699739962278,8.7553579791345122 10.0415020265598862,8.7188787869375428 9.9800200826281831,8.8573216336015381 9.9949042292205075,9.0000000000000036 10.0000000000000000,9.1426783663984690 9.9949042292205075,9.2846296765465759 9.9796428837618656,9.4251305791059590 9.9542937319423181,9.5634651136828648 9.9189859472289932,9.6989283591982041 9.8738994499995201,9.8308300260037793 9.8192639907090324,9.9584979734401209 9.7553579791345069,10.0812816349112033 9.6825070656623566,10.1985553330227017 9.6010824818487137,10.3097214678905793 9.5114991487085092,10.4142135623731029 9.4142135623730869,10.5114991487085252 9.3097214678905598,10.6010824818487297 9.1985553330226821,10.6825070656623708 9.0812816349111838,10.7553579791345193 8.9584979734400996,10.8192639907090431 8.8308300260037580,10.8738994499995290 8.6989283591981810,10.9189859472290003 8.5634651136828417,10.9542937319423235 8.4251305791059359,10.9796428837618691 8.2846296765465510,10.9949042292205093 8.1426783663984441,11.0000000000000000 8.0000000000000000,10.9949042292205075 7.8573216336015355,10.9796428837618656 7.7153703234534294,10.9542937319423181 7.5748694208940464,10.9189859472289950 7.4365348863171405,10.8738994499995236 7.3010716408018030,10.8192639907090360 7.1691699739962269,10.7553579791345122 7.0415020265598862,10.6825070656623620 6.9187183650888047,10.6010824818487208 6.8014446669773063,10.5114991487085163 6.6902785321094296,10.4142135623730958 6.5857864376269051,10.3097214678905704 6.4885008512914837,10.1985553330226946 6.3989175181512792,10.0812816349111962 6.3174929343376380,9.9584979734401138 6.2446420208654887,9.8308300260037740 6.1807360092909640,9.6989283591981970 6.1261005500004764,9.5634651136828595 6.0810140527710050,9.4251305791059536 6.0457062680576810,9.2846296765465706 6.0203571162381344,9.1426783663984654 6.0050957707794925,9.0000000000000018 6.0000000000000000,8.8573216336015363 6.0050957707794925,8.7153703234534312 6.0203571162381344,8.5748694208940481 6.0457062680576810,8.4365348863171423 6.0810140527710050,8.3010716408018048 6.1261005500004764,8.1691699739962278 6.1807360092909622,8.0415020265598880 6.2446420208654878,7.9187183650888064 6.3174929343376363,7.8014446669773072 6.3989175181512783,7.6902785321094314 6.4885008512914819,7.5857864376269060 6.5857864376269033,7.4885008512914846 6.6902785321094278,7.3989175181512810 6.8014446669773045,7.3174929343376389 6.9187183650888029,7.2446420208654896 7.0415020265598844,7.1807360092909640 7.1691699739962251,7.1261005500004773 7.3010716408018013,7.0810140527710059 7.4365348863171379,7.0457062680576819 7.5748694208940437,7.0203571162381344 7.7153703234534268,7.0050957707794934 7.8573216336015328,7.0000000000000000 7.9999999999999973,7.0050957707794925 8.1426783663984619,7.0203571162381344 8.2846296765465670,7.0457062680576801 8.4251305791059501,7.0810140527710042 8.5634651136828559,7.1261005500004755 8.6989283591981934,7.1807360092909622 8.8308300260037704,7.2446420208654869 8.9584979734401102,7.2811219724467575 9.0199799990140797,7.1426783663984654 9.0050957707794925,7.0000000000000009 9.0000000000000000,6.8573216336015363 9.0050957707794925,6.7188786030357956 9.0199806804111571,6.7553579791345184 8.9584979734400996,6.8192639907090431 8.8308300260037580,6.8738994499995290 8.6989283591981810,6.9189859472290003 8.5634651136828417,6.9542937319423235 8.4251305791059359,6.9796428837618683 8.2846296765465510,6.9949042292205084 8.1426783663984441,7.0000000000000000 8.0000000000000000,6.9949042292205075 7.8573216336015355,6.9796428837618656 7.7153703234534294,6.9542937319423190 7.5748694208940464,6.9189859472289950 7.4365348863171405,6.8738994499995236 7.3010716408018030,6.8192639907090369 7.1691699739962269,6.7553579791345113 7.0415020265598862,6.6825070656623620 6.9187183650888047,6.6010824818487208 6.8014446669773063,6.5114991487085163 6.6902785321094296,6.4142135623730949 6.5857864376269051,6.3097214678905704 6.4885008512914837,6.1985553330226946 6.3989175181512792,6.0812816349111953 6.3174929343376380,5.9584979734401138 6.2446420208654887,5.8308300260037731 6.1807360092909640,5.6989283591981970 6.1261005500004764,5.5634651136828603 6.0810140527710050,5.4251305791059536 6.0457062680576810,5.2846296765465715 6.0203571162381344,5.1426783663984654 6.0050957707794925,5.0000000000000009 6.0000000000000000,4.8573216336015363 6.0050957707794925,4.7153703234534312 6.0203571162381344,4.5748694208940481 6.0457062680576810,4.4365348863171423 6.0810140527710050,4.3010716408018048 6.1261005500004764,4.1691699739962287 6.1807360092909622,4.0415020265598880 6.2446420208654878,3.9187183650888064 6.3174929343376363,3.8014446669773077 6.3989175181512783,3.6902785321094314 6.4885008512914819,3.5857864376269064 6.5857864376269033,3.4885008512914846 6.6902785321094278,3.3989175181512805 6.8014446669773045,3.3174929343376389 6.9187183650888029,3.2446420208654896 7.0415020265598844,3.1807360092909640 7.1691699739962251,3.1261005500004773 7.3010716408018013,3.0810140527710059 7.4365348863171379,3.0457062680576819 7.5748694208940437,3.0203571162381349 7.7153703234534268,3.0050957707794934 7.8573216336015328,3.0000000000000000 7.9999999999999973,3.0050957707794925 8.1426783663984619,3.0203571162381344 8.2846296765465670,3.0457062680576801 8.4251305791059501,3.0810140527710042 8.5634651136828559,3.1261005500004755 8.6989283591981934,3.1807360092909618 8.8308300260037704,3.2446420208654869 8.9584979734401102,3.3174929343376358 9.0812816349111927,3.3989175181512770 9.1985553330226910,3.4885008512914810 9.3097214678905669,3.5857864376269024 9.4142135623730923,3.6902785321094269 9.5114991487085145,3.8014446669773028 9.6010824818487190,3.9187183650888020 9.6825070656623602,4.0415020265598844 9.7553579791345104,4.1691699739962260 9.8192639907090360,4.3010716408018030 9.8738994499995236,4.4365348863171405 9.9189859472289950,4.5748694208940472 9.9542937319423199,4.7153703234534312 9.9796428837618656,4.8573216336015381 9.9949042292205075,5.0000000000000036 10.0000000000000000,5.1426783663984690 9.9949042292205075)))";
+
+ OG open_mpgn = from_wkt<OG>(wkt);
+ bg::reverse(open_mpgn);
+
+ // polygon has a self-touching point
+ test::apply("mpg19", open_mpgn, false);
+ }
+ {
+ std::string wkt = "MULTIPOLYGON(((-1.1713032141645421 0.9370425713316406,-1.2278293047051545 0.8616467945203863,-1.2795097139219473 0.7828504914601357,-1.3261404828502752 0.7009646351604617,-1.3675375811487496 0.6163123916860891,-1.4035376333829217 0.5292278447680804,-1.4339985637934827 0.4400546773279756,-1.4588001570043776 0.3491448151183161,-1.4778445324579732 0.2568570378324778,-1.4910565307049013 0.1635555631651331,-1.4983840100240693 0.0696086094114048,-1.4997980522022116 -0.0246130577225216,-1.4952930766608652 -0.1187375883622537,-1.4848868624803642 -0.2123935159867641,-1.4686204782339323 -0.3052112234370423,-1.4465581199087858 -0.3968244016261590,-1.4187868575539013 -0.4868714951938814,-1.3854162916543107 -0.5749971294005020,-1.3465781205880585 -0.6608535126285795,-1.3024256208728704 -0.7441018089575634,-1.2531330422537639 -0.8244134753943718,-1.1988949200189114 -0.9014715584824893,-1.1399253072577331 -0.9749719451724563,-1.0764569300911435 -1.0446245630171400,-1.0087402692078766 -1.1101545249551616,-0.9370425713316382 -1.1713032141645441,-0.8616467945203836 -1.2278293047051563,-0.7828504914601331 -1.2795097139219491,-0.7009646351604588 -1.3261404828502767,-0.6163123916860862 -1.3675375811487509,-0.5292278447680773 -1.4035376333829228,-0.4400546773279725 -1.4339985637934838,-0.3491448151183129 -1.4588001570043785,-0.2568570378324746 -1.4778445324579736,-0.1635555631651299 -1.4910565307049017,-0.0696086094114016 -1.4983840100240695,0.0246130577225248 -1.4997980522022114,0.1187375883622569 -1.4952930766608650,0.2123935159867673 -1.4848868624803639,0.3052112234370455 -1.4686204782339316,0.3968244016261621 -1.4465581199087849,0.4868714951938845 -1.4187868575539002,0.5749971294005050 -1.3854162916543096,0.6608535126285824 -1.3465781205880569,0.7441018089575662 -1.3024256208728686,0.8244134753943745 -1.2531330422537621,0.9014715584824917 -1.1988949200189096,0.9749719451724583 -1.1399253072577313,1.0446245630171418 -1.0764569300911420,1.1101545249551634 -1.0087402692078746,1.1713032141645456 -0.9370425713316364,5.1713032141645456 4.0629574286683638,5.1713032141645439 4.0629574286683621,5.2278293047051561 4.1383532054796159,5.2795097139219491 4.2171495085398671,5.3261404828502767 4.2990353648395407,5.3675375811487509 4.3836876083139131,5.4035376333829230 4.4707721552319217,5.4339985637934838 4.5599453226720268,5.4588001570043785 4.6508551848816859,5.4778445324579739 4.7431429621675241,5.4910565307049017 4.8364444368348689,5.4983840100240693 4.9303913905885972,5.4997980522022116 5.0246130577225232,5.4952930766608645 5.1187375883622552,5.4848868624803639 5.2123935159867658,5.4686204782339320 5.3052112234370439,5.4465581199087856 5.3968244016261604,5.4187868575539007 5.4868714951938822,5.3854162916543107 5.5749971294005025,5.3465781205880578 5.6608535126285799,5.3024256208728699 5.7441018089575637,5.2531330422537632 5.8244134753943726,5.1988949200189110 5.9014715584824895,5.1399253072577329 5.9749719451724559,5.0764569300911440 6.0446245630171394,5.0087402692078768 6.1101545249551616,4.9370425713316379 6.1713032141645439,4.8616467945203841 6.2278293047051561,4.7828504914601337 6.2795097139219482,4.7009646351604593 6.3261404828502759,4.6163123916860869 6.3675375811487509,4.5292278447680783 6.4035376333829230,4.4400546773279732 6.4339985637934838,4.3491448151183141 6.4588001570043785,4.2568570378324750 6.4778445324579739,4.1635555631651311 6.4910565307049017,4.0696086094114028 6.4983840100240693,3.9753869422774759 6.4997980522022116,3.8812624116377439 6.4952930766608645,3.7876064840132333 6.4848868624803639,3.6947887765629552 6.4686204782339320,3.6031755983738387 6.4465581199087847,3.5131285048061165 6.4187868575539007,3.4250028705994957 6.3854162916543098,3.3391464873714183 6.3465781205880578,3.2558981910424345 6.3024256208728691,3.1755865246056261 6.2531330422537623,3.0985284415175087 6.1988949200189101,3.0250280548275423 6.1399253072577320,2.9553754369828584 6.0764569300911422,2.8898454750448366 6.0087402692078751,2.8286967858354544 5.9370425713316362,-1.1713032141645456 0.9370425713316364,-1.1713032141645421 0.9370425713316406)))";
+
+ OG open_mpgn = from_wkt<OG>(wkt);
+ bg::reverse(open_mpgn);
+
+ // polygon contains a spike
+ test::apply("mpg20", open_mpgn, false);
+ }
+
+ // Interior ring touches exterior ring, which at that same point touches another exterior ring in (1 2)
+ test::apply
+ ("mpg21",
+ "MULTIPOLYGON(((2 3,1 2,1 0,2 0,2 1,4 3),(2 2,1.5 1.5,1 2)),((0 3,0 2,1 2)))",
+ true);
+
+ // Two interior rings touch each other in (10 5)
+ test::apply
+ ("mpg22",
+ "MULTIPOLYGON(((10 5,5 10,0 5,5 0),(10 5,5 4,4 6)),((10 5,10 0,20 0,20 10,10 10),(10 5,18 8,15 3)))",
+ true);
+
+ // Two polygons, one inside interior of other one, touching all at same point (0,0)
+ test::apply
+ ("mpg23",
+ "MULTIPOLYGON(((0 0,10 0,10 10,0 10),(0 0,1 9,9 9,9 1)),((0 0,8 2,8 8,2 8)))",
+ true);
+
+ test::apply
+ ("ticket_12503",
+ "MULTIPOLYGON(((15 20,12 23,15 17,15 20)),((36 25,35 25,34 24,34 23,35 23,36 25)),((15 15,10 13,11 23,12 23,12 25,10 25,7 24,8 6,15 15)),((12 29,11 30,12 30,11 31,13 31,13 34,6 38,6 32,8 31,12 27,12 29)),((9 26,6 31,7 26,7 24,9 26)),((15 48,15 45,18 44,15 48)),((38 39,18 44,26 34,38 39)),((15 45,13 34,15 33,15 45)),((17 32,15 33,15 32,17 32)),((21 31,16 38,18 32,17 32,19 30,21 31)),((15 32,13 31,13 30,15 29,15 32)),((17 29,15 29,15 28,17 29)),((15 28,13 30,12 29,14 27,15 28)),((26 27,28 30,31 27,26 34,21 31,22 29,19 30,18 30,17 29,19 29,19 28,23 28,24 27,25 27,24 26,25 24,30 24,26 27)),((17 26,15 28,15 26,17 26)),((32 26,34 27,31 27,27 27,32 26)),((19 26,17 26,19 25,19 26)),((35 23,33 18,41 15,35 23)),((24 26,24 27,19 26,20 25,23 24,24 26)),((32 13,49 1,48 4,46 5,33 15,32 13)),((33 25,32 26,32 25,31 24,32 23,33 25)),((42 15,43 22,44 22,44 23,43 23,35 23,42 15)),((44 42,38 39,40 39,39 34,34 27,33 25,35 25,38 31,36 25,43 23,44 42)),((48 46,44 23,48 22,48 46)),((15 3,23 2,18 11,15 3)),((30 19,28 20,27 21,25 24,23 24,22 23,26 20,29 17,30 19)),((24 19,21 21,21 20,22 19,24 19)),((31 24,30 24,27 21,31 22,30 19,31 19,34 23,31 23,31 24)),((21 20,20 21,21 18,21 20)),((14 26,12 26,12 25,15 25,15 20,17 17,20 21,21 21,22 23,20 24,19 25,16 25,15 26,14 27,14 26),(17 24,20 22,20 21,17 24)),((23 18,22 19,22 17,23 18)),((28 13,31 10,32 13,30 15,28 13)),((18 17,17 17,16 16,18 17)),((16 16,15 17,15 15,16 16)),((30 17,29 17,29 16,30 15,30 17)),((33 18,31 19,30 17,33 15,33 18)),((42 13,47 7,48 4,48 22,44 22,43 14,42 13)),((42 15,41 15,42 14,43 14,42 15)),((24 2,49 1,27 11,23 13,25 6,27 10,24 2)),((29 16,24 19,23 18,28 13,29 16)),((17 13,16 15,15 15,15 11,17 13)),((20 14,23 13,22 17,20 15,21 17,21 18,18 17,19 15,17 13,18 11,20 14)),((5 3,15 3,15 11,8 5,8 6,5 3)))",
+ true);
+
+ // MySQL report 12.06.2015
+ {
+ std::string wkt = "MULTIPOLYGON("
+ "((-40.314872143936725 -85.6567579487603,-53.1473643859603 -98.48925019078388,-41.29168745244485 -90.56754012573627,-40.314872143936725 -85.6567579487603)),"
+ "((-186.91433298215597 -88.80210078879976,-192.54783347494038 -75.53420159905284,-192.7944062150986 -78.03769664281869,-186.91433298215597 -88.80210078879976)),"
+ "((170.89089207158912 -44.35600339378721,191.8949969913326 -31.3460752560506,169.32805525181837 -43.07341636227523,170.89089207158912 -44.35600339378721)),"
+ "((-2.6035109435630504 -13.058121512403435,26.839412016794036 43.97610638055074,26.974733141577826 43.72289807427111,26.97470368529088 43.722907009738066,-2.6035109435630504 -13.058121512403435))"
+ ")";
+
+ std::string msg;
+ CG mpoly = from_wkt<CG>(wkt);
+ BOOST_CHECK_MESSAGE(! bg::is_valid(mpoly, msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[0], msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[1], msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[2], msg), msg);
+ BOOST_CHECK_MESSAGE(! bg::is_valid(mpoly[3], msg), msg);
+
+ // The last Polygon has wrong orientation, so correct it
+ bg::reverse(mpoly[3]);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly, msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[0], msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[1], msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[2], msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[3], msg), msg);
+ }
+
+ // MySQL report 30.06.2015
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ {
+ std::string wkt = "MULTIPOLYGON(((153.60036248974487 -86.4072234353084,134.8924761503673 -92.0821987136617,151.87887755950274 -92.0821987136617,153.60036248974487 -86.4072234353084)),((-162.3619975827558 -20.37135271519032,-170.42498886764488 -34.35970444494861,-168.21072335866987 -37.67358696575207,-162.3619975827558 -20.37135271519032)),((25.982352329146433 -1.793573272167862,25.81900562736861 -2.0992322130216032,24.216310496207715 -2.737558757030656,25.9822948153016 -1.7936204725604972,25.982352329146433 -1.793573272167862)))";
+
+ std::string msg;
+ CG mpoly = from_wkt<CG>(wkt);
+ bg::correct(mpoly);
+
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly, msg), msg);
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly[2], msg), msg);
+ }
+ {
+ std::string wkt = "MULTIPOLYGON(("
+ "(176.37937452790632 33.81070321484654,165.31874654406195 30.429623478264823,164.22653456196667 40.57205841516082,169.96584109309163 43.760662373477935,169.96717084197783 43.76157019827226,169.96831223949295 43.76270579928938,169.96922682269394 43.76403090891733,169.96988377185227 43.76550087346144,169.97026094902066 43.767066157889666,169.97034564404004 43.768674015069664,169.97013500284808 43.77027026324768,169.96963612365553 43.77180111187144,169.9688658177501 43.773214974230235,169.9678500429876 43.77446420582984,169.96662302906125 43.775506709921984,169.96522612402566 43.77630735608547,169.96370640094523 43.77683916405498,169.96211507162087 43.777084212905194,169.96050576084875 43.777034244952155,163.96123663641703 43.03565247280777,161.69252016076334 64.10327452950632,161.69220086043657 64.10485513588213,161.69159759286657 64.10635057476519,161.6907307489143 64.1077102992874,161.68962962850455 64.10888834981994,161.68833145026844 64.10984490744038,161.6868800935278 64.11054763983988,161.68532461514377 64.11097279417753,161.68371759136113 64.11110599994278,161.68211334069463 64.1109427546887,161.68056608792585 64.11048857621772,161.67912813126807 64.10975881607614,127.83620579794024 42.81253476817878,91.03182023020634 47.701488147167275,136.39039242955064 83.14688773021612,136.39163693720113 83.14807413530517,136.39262607583518 83.14948053535137,136.39332183340986 83.15105288318968,136.39369747235173 83.15273075437446,136.3937385570669 83.15444966925705,136.39344350869288 83.15614357090246,136.39282366577314 83.15774736362043,136.39190284852347 83.15919941455623,136.39071644343446 83.1604439222067,136.38931004338824 83.16143306084076,136.38773769554993 83.16212881841544,136.38605982436513 83.16250445735731,136.38434090948257 83.16254554207251,136.38264700783714 83.16225049369845,136.38104321511918 83.1616306507787,136.37959116418338 83.16070983352907,91.00745759860087 47.70471273777429,-11.691678619246499 61.34689554994591,-33.79755445921219 85.09421525362518,-33.7987816906185 85.09530774427819,-33.80019114476049 85.09615218005024,-33.80173336063651 85.09671892773947,-33.80335421832898 85.0969880988603,-33.8049968381973 85.09695024757627,-33.80660357691587 85.09660670217643,-33.808118050311506 85.09596951846243,-33.80948711201435 85.09506105668265,-33.81066271848674 85.0939131968595,-33.81160361498191 85.09256622004571,-33.812276783268395 85.09106739476917,-33.81265860031601 85.08946931827111,-33.812735667282574 85.08782807074738,-32.830674277011205 64.15491927762633,-166.9120300852194 81.96578933819151,-166.91372994506622 81.96584876974394,-166.9154093128506 81.96557899307163,-166.91700503326308 81.96499015355748,-166.91845709668723 81.96410439545254,-166.91971089595725 81.96295502910593,-166.92071927994778 81.96158527827609,-166.92144432676722 81.96004665463211,-166.9218587698712 81.95839702057518,-166.92194702346433 81.95669841323047,-166.9217057686293 81.95501471144192,-135.70224400417752 -45.9322191166313,-138.57126185553517 -49.74180297177792,-161.44988958707904 -54.37476978072864,-161.45143808151082 -54.37523543008462,-161.45287478035848 -54.37597742789392,-161.45415085337137 -54.37697055527431,-161.4552229296195 -54.37818105799885,-161.45605457157663 -54.3795677937282,-161.45661751355206 -54.381083630348755,-161.4568926223796 -54.382677047890056,-161.4568705477121 -54.384293889575865,-161.45655203981923 -54.38587920249453,-161.4559479240874 -54.38737910532821,-161.45507873308873 -54.388742619660995,-161.45397400872366 -54.38992340262376,-161.4526712981565 -54.39088132198683,-161.45121487766946 -54.391583820166765,-161.44965424780858 -54.39200702078731,-161.44804245096856 -54.392136540185234,-141.89488089543744 -54.15502243957519,-153.27347396169714 -69.26392265746459,-153.2743589702193 -69.26537072588309,-153.2749485381606 -69.26696212522691,-153.2752205928412 -69.26863727551263,-153.27516494887718 -69.27033346122717,-153.27478368950827 -69.27198717931759,-153.27409108860425 -69.27353651666519,-153.27311307626903 -69.27492346803459,-153.2718862680504 -69.27609610771653,-153.27045659410012 -69.27701053356093,-153.268877579607 -69.27763251061793,-153.2672083408813 -69.27793875285136,-153.26551137211467 -69.27791779493838,-153.26385020567662 -69.27757042151681,-107.17294666067983 -54.86628398298008,-106.1185414985015 -57.820838687964276,-161.49299710582102 -75.80397143603332,-161.49452500826962 -75.80463385281091,-161.49590016714416 -75.80557311845463,-161.4970730084222 -75.80675537274882,-161.49800125156384 -75.8081379958174,-161.49865143371088 -75.80967114455622,-161.4990001160121 -75.81129954946056,-161.4990347285859 -75.81296450707245,-161.49875402366052 -75.81460599622092,-161.49816812055553 -75.81616484176531,-161.49729814088408 -75.81758484783957,-161.4961754471254 -75.81881482369457,-161.49484051201802 -75.81981042910776,-161.49334145953082 -75.82053577283341,-161.49173233000997 -75.82096470647024,-161.49007113204223 -75.82108176710256,-100.22898834625123 -74.30605444452195,-100.22734583448315 -74.30585777708335,-100.22576946346221 -74.30535620216963,-100.22431530761126 -74.30456756172502,-100.22303509393429 -74.30351990914377,-100.22197436199151 -74.30225051135928,-100.22117084397333 -74.30080452319054,-100.22065312249669 -74.299233381102,-100.22043961386883 -74.29759297351377,-100.2205379129852 -74.2959416527474,-100.220944523165 -74.29433815932634,-106.0959583598649 -57.83192845601232,-92.94623645293606 -53.56150642974892,0.5168968571681063 -52.42819495175221,42.552398940491486 -80.15392826171708,42.553823957605765 -80.15468988561345,42.55536450400553 -80.15517718585528,42.55696829838054 -80.15537362500162,42.55858091298275 -80.15527253652432,42.56014762073331 -80.15487735104905,42.56161525248782 -80.15420147993068,42.56293400143029 -80.15326786011391,42.56405911336014 -80.15210817572546,42.564952405509295 -80.15076178281409,42.56558356234557 -80.14927437372997,42.56593116438665 -80.14769642646958,42.56598341511011 -80.14608149161101,42.565738541290365 -80.14448437497535,42.5652048531764 -80.1429592776891,42.56440046246796 -80.14155795676808,22.856549024752262 -52.14358082479128,22.85544171929926 -52.14229333196901,22.854107064023683 -52.14124335176489,22.852595089554377 -52.14047024353326,22.850962473473096 -52.14000298785936,22.849270415709668 -52.13985910019877,0.5220842171561202 -52.41060241052812,-8.41778896463083 -46.51405003506674,2.082503817262605 -45.5265842190059,82.16974873985578 -55.61946094607285,82.17129108418781 -55.61951844683097,82.17281962817947 -55.61930470483393,82.17428704023979 -55.6188263386343,82.17564788173712 -55.61809816091227,82.17686001401307 -55.61714271979877,82.17788590321227 -55.61598960066932,87.42894995498656 -48.54817950299798,90.86025690382013 -48.842320647346625,90.86187779422266 -48.842309257891365,90.86346890919046 -48.841999792907956,90.8649759064788 -48.84140282172809,90.86634731676145 -48.84053873304434,90.86753630149138 -48.839437038563695,90.86850225260417 -48.838135365077605,90.86921217942799 -48.836678169372995,90.86964183543259 -48.83511521987464,90.8697765463347 -48.83349989687612,90.8696117112771 -48.831887369412634,90.86915295996427 -48.83033271104191,90.86841596038786 -48.82888901888599,90.8674258837091 -48.827605600175325,88.83971158165615 -46.64932716144001,92.40269805720794 -41.853630224309256,126.8456757419591 -63.47440298320586,126.84713519537095 -63.47513926788542,126.84870592800237 -63.475591947011644,126.85033338098 -63.4757452969263,126.85196102526822 -63.47559399107129,126.8535323251863 -63.47514328500498,126.85499270215635 -63.47440883385204,126.85629143047208 -63.47341614852797,126.85738339923923 -63.472199709625954,126.85823067928733 -63.47080176974498,126.85880384062692 -63.46927088585993,126.8590829746903 -63.46766023271123,126.85905838584898 -63.466025755798086,126.85873092818818 -63.46442422813017,126.85811197584037 -63.46291127823613,126.85722302790863 -63.461539457925234,126.85609496170247 -63.46035641691782,97.38483049679773 -37.827161184361024,99.87187230030216 -36.330501626203954,171.77091226660818 -29.569125763297997,171.77242885150693 -29.568846999536735,171.7738731802143 -29.568306949932698,171.77520061136264 -29.567522306359965,171.7763701166585 -29.566517320612498,171.777345548987 -29.565323054828713,171.77809675964784 -29.56397642142174,171.77860053019282 -29.562519042189095,171.77884129006245 -29.56099596186458,171.77881159784133 -29.559454255873884,165.32871350322802 30.33706888582541,176.38762884933539 33.794883447557986,176.38920864287232 33.79555326659214,176.3906277904606 33.79651785214075,176.39183197552205 33.79774028557272,176.39277510897307 33.799173779364644,176.39342109324193 33.80076346785056,176.3937452038706 33.80244850715521,176.39373503582075 33.80416440393784,176.3933909782652 33.80584548381587,176.39272619969265 33.80742740499197,176.39176614389606 33.80884962087758,176.39054755613435 33.810057697458305,176.38911707674143 33.811005396706115,176.3875294560099 33.81165644629765,176.38584545867357 33.81198592790426,176.38412953819284 33.81198123091831,176.3824473698573 33.81164253511265,176.38239992262746 33.811606862577534,176.38239393445264 33.81162601425782,176.37937452790632 33.81070321484654),"
+ "(31.940896057402718 -11.516674682385004,31.735090184010808 -11.433768531594366,34.28637780994461 -10.636047228893936,31.940896057402718 -11.516674682385004),"
+ "(30.28283959927952 -10.848748755534567,-3.4172969820295727 2.7269017301769836,-13.569154489871252 9.18584944133385,-12.274858999116972 9.628378040430327,21.92730276845213 2.385649455001494,38.84218041215776 -8.23228345814529,30.28283959927952 -10.848748755534567),"
+ "(-3.506381078742539 2.7627880702187406,-16.750651901766318 8.098065902036172,-13.590409501346059 9.178582205591375,-3.506381078742539 2.7627880702187406),"
+ "(31.709407405831065 -11.423422566994818,30.308715440626955 -10.859172493055892,38.861820878026606 -8.244612297573639,39.53325186684806 -8.666087271928937,34.579078645088416 -10.526151567651766,31.709407405831065 -11.423422566994818),"
+ "(31.96495469130859 -11.526366382128769,34.5846215239078 -10.542808015164859,39.883544951634676 -8.885975497800693,42.787058225913796 -10.708574699971027,37.770908594399415 -13.865217464656103,31.96495469130859 -11.526366382128769),"
+ "(48.77877229519879 -5.194821637047497,38.86437999888012 -8.225507106217272,21.97711163867511 2.3751018026608763,48.385785409894076 -3.2172657509225715,49.85165664674822 -4.7920077720156655,48.77877229519879 -5.194821637047497),"
+ "(52.035281286546805 -3.9721613339210506,48.39482899889053 -3.201249949645277,24.68775090776513 22.266150556743217,27.256969910296846 23.144584341056124,56.359252044298216 -2.1676440520591687,55.64595593834196 -2.6165186152963713,52.035281286546805 -3.9721613339210506),"
+ "(21.0523618078348 -15.604823171775074,20.044774220126357 -15.088996753249816,23.066991360577624 -14.144024584675869,23.763240995171685 -14.58700084866993,21.0523618078348 -15.604823171775074),"
+ "(49.86941225561311 -4.785336300805852,48.41562983381898 -3.2235856816187862,52.00474175020747 -3.9836250990190427,49.86941225561311 -4.785336300805852),"
+ "(56.52330868895917 -2.287118069864981,56.3885724075448 -2.1699191303695926,106.52503218338835 29.380766897799347,127.67871416131852 24.428460971650335,56.52330868895917 -2.287118069864981),"
+ "(23.783784057718577 -14.579279673235199,23.088894501216046 -14.137168734379976,31.708657690867156 -11.442032284077861,31.91659602271336 -11.525797467311321,23.783784057718577 -14.579279673235199),"
+ "(39.55390791690693 -8.65834200124904,38.88402046337834 -8.237835944785246,48.51602741760274 -5.293470218105426,39.55390791690693 -8.65834200124904),(56.50463609360271 -2.2941260112243,55.727564043439656 -2.5858892138401472,56.373071028355454 -2.1796740901332754,56.50463609360271 -2.2941260112243),(21.03014957321752 -15.613158799416311,10.569260752810493 -19.54075189827794,-2.9464639789869125 -22.277697151591028,20.02087042017853 -15.096466397529603,21.03014957321752 -15.613158799416311),"
+ "(52.47436796255111 -4.065143439019163,52.0671665340097 -3.978913434571549,55.572196226218196 -2.6629353253941694,54.16542157313718 -3.5482133364501145,52.47436796255111 -4.065143439019163),"
+ "(18.686422690099135 -14.3935995357972,-39.497151641780675 15.393047282556093,-15.306368432221959 10.270345844048258,-13.609365014952653 9.190640067582622,-16.778642869828406 8.10704200262427,-16.78013527405983 8.106370378455987,-16.78147692731812 8.10543319333665,-16.78262111907359 8.104263075974965,-16.78352801354702 8.10290076476696,-16.784166036618227 8.101393689462272,-16.78451297509954 8.099794319866595,-16.784556750102364 8.098158339071315,-16.784295837571545 8.09654270481052,-16.783739321346324 8.095003666440478,-16.782906576900587 8.093594806581768,-16.78182659677314 8.092365175605535,-16.780536981173654 8.091357583912956,-16.779082628906927 8.090607111463319,-3.4253378182903305 2.711229144049957,21.910296697427533 -13.408098481443034,18.686422690099135 -14.3935995357972),"
+ "(49.92455499029387 -4.844573589537546,49.88232772450034 -4.7992107915072495,52.03662700043225 -3.990377200254404,52.43970998904547 -4.075735073446003,49.92455499029387 -4.844573589537546),"
+ "(56.98298842344176 -2.6869329990186017,56.53834480149721 -2.3001960061283953,127.709423817281 24.421271512588014,132.92279324817048 23.20076594437462,122.22155101611108 17.25548653666155,56.98298842344176 -2.6869329990186017),"
+ "(21.93236247547395 -13.401346106262679,-3.336253671995941 2.6753427840349797,30.256146438987056 -10.856907501734277,21.93236247547395 -13.401346106262679),"
+ "(56.963208077106145 -2.6929774535282007,54.22943361944536 -3.5286570687708547,55.65380423765296 -2.6323059828796573,56.51967220394539 -2.3072039455782374,56.963208077106145 -2.6929774535282007),"
+ "(49.905901657492095 -4.850280677454471,49.047142136266274 -5.112798684502387,49.86457211628575 -4.805882263415661,49.905901657492095 -4.850280677454471),"
+ "(18.66231459031522 -14.40096459040753,-15.242813984693981 -24.76524114901455,-41.871025640976086 15.895732417477603,-39.56283173369286 15.406955864944898,18.66231459031522 -14.40096459040753),"
+ "(54.16010295741377 -4.422118945281966,57.68433962274301 -3.3201949186482835,60.493211425450355 -5.763234012884148,54.16010295741377 -4.422118945281966),"
+ "(50.57482090609503 -5.543124178834603,51.410616916152094 -5.2818015712411075,50.73017482548689 -5.7100012259218005,50.57482090609503 -5.543124178834603),"
+ "(57.7040033134621 -3.3140490007641716,120.5880728282652 16.347976841903872,68.42035360394682 -12.634786014512635,63.952222521971656 -8.748552923366702,69.34888739490755 -7.655727627757562,69.35052190979452 -7.65522664740267,69.35202819378684 -7.654418112452161,69.35334902179036 -7.65333273988165,69.35443421435205 -7.652011763978858,69.3552425440229 -7.650505369815648,69.35574330162603 -7.648870786671658,69.35591746292623 -7.647170113842091,69.35575841137785 -7.645467961429212,69.35527218949336 -7.643828995745994,69.35447726928288 -7.642315482584282,69.35340385048569 -7.640984921680917,69.35209271325485 -7.639887862250621,69.35059366888214 -7.639065982575512,69.348963667422 -7.638550506609389,60.528528122163166 -5.770712765907017,57.7040033134621 -3.3140490007641716),"
+ "(39.90557971777995 -8.879095683641047,50.55626153776256 -5.548932208433719,50.71506487635533 -5.719509860218734,42.803538516251564 -10.698203715094458,39.90557971777995 -8.879095683641047),"
+ "(54.125906762225966 -4.432808367053374,60.520474886872016 -5.78693828698986,63.91384251004383 -8.738419975604259,55.19312990789962 -10.504359876990208,50.74233508921979 -5.723075090472591,51.47603824555935 -5.261358446995118,54.125906762225966 -4.432808367053374),"
+ "(-39.55690832500143 15.42363240349549,-42.57305175099324 16.967718229775315,-54.529804271814804 35.22554209214185,-30.764086064128595 20.105022802970012,-30.710857834915476 18.970448449090075,-30.710636768905257 18.968861050497278,-30.71013054093483 18.96734038034394,-30.709356054150412 18.965937214390088,-30.70833916896296 18.964698404885425,-30.707113839559156 18.963665316154746,-30.70572098015804 18.962872443427244,-30.70420709886957 18.962346261027584,-30.70262274477097 18.962104338388023,-30.70102082005363 18.962154753398345,-29.249644048343924 19.141511936326765,-15.348629077210006 10.297225959678553,-39.55690832500143 15.42363240349549),"
+ "(21.884178079339662 2.412712542801014,-12.242463797063095 9.639454184544832,2.3975468904970114 14.644975309050857,21.884178079339662 2.412712542801014),"
+ "(-15.299650033147174 10.286854033424495,-29.22228439323044 19.144892967884317,-8.792850447899582 21.669506695125158,2.3784269745719975 14.656976960749958,-12.275968322130971 9.646537638677753,-15.299650033147174 10.286854033424495),"
+ "(21.933986962464473 2.402164887728272,2.4189169499386907 14.652281880490598,24.669574614144935 22.25993595597394,48.36498457496562 -3.1949300189490657,21.933986962464473 2.402164887728272),"
+ "(-39.62258841691361 15.437540985884295,-41.88466302451252 15.91655654561091,-42.55362818185854 16.938058662646,-39.62258841691361 15.437540985884295),"
+ "(54.12505697116883 -4.414697518592483,53.149660304654546 -4.208154364528738,54.17278878474252 -3.5643034507215816,56.978802584973195 -2.7065410644301977,57.66879568091532 -3.3066752884918813,54.12505697116883 -4.414697518592483),"
+ "(52.5097940270921 -4.072645352049953,54.108776779744645 -3.583859692404417,53.12503062771869 -4.202927454922124,52.5097940270921 -4.072645352049953),"
+ "(43.28546691270277 -26.986883767640755,42.97679823939298 -26.79048854796605,56.466941170357856 -19.295797633524103,64.08900802970163 -24.08037950217483,45.2669261914462 -28.001268064806617,43.28546691270277 -26.986883767640755),"
+ "(43.11812854048746 -26.90121622441705,42.940870464815944 -26.810470368231712,42.959363702902145 -26.800187467000804,43.11812854048746 -26.90121622441705),"
+ "(20.022491497341747 -15.077589291279075,18.708847193281812 -14.40507958111042,21.92976181239232 -13.420482809530107,23.04762685262098 -14.13170426598196,20.022491497341747 -15.077589291279075),"
+ "(21.073463079609297 -15.61562579933674,23.781749745311217 -14.598776706897553,26.48393818926334 -16.317995334865266,23.590120811873746 -16.904008626322792,21.073463079609297 -15.61562579933674),"
+ "(9.350288473315587 38.74248379268954,-6.585012056625516 55.86103593692023,70.2680521039453 37.868910337863355,40.90146758060325 27.828271548502038,24.262734733742946 25.772111264832496,9.350288473315587 38.74248379268954),"
+ "(73.09089007444824 -29.731095597924465,85.69919539743492 -37.64566996857491,80.88024981899486 -38.09884440280534,73.09089007444824 -29.731095597924465),"
+ "(73.04450471090416 -29.681265947851927,69.3379197794863 -25.699470542214453,79.58321142449617 -22.367138852695543,96.03221445150848 -36.67396648552466,85.72790431968778 -37.64297969856965,73.04450471090416 -29.681265947851927),"
+ "(9.46387079270287 38.62046756176968,24.239338321979417 25.769211949937343,21.716979498625832 25.45751975956489,9.46387079270287 38.62046756176968),"
+ "(50.56156943063165 -5.528888731813538,49.937839204058804 -4.858844205801361,52.475136061040715 -4.083236988055326,53.10370484197959 -4.216347691874761,51.46866317625423 -5.24527327754466,50.56156943063165 -5.528888731813538),"
+ "(9.224408992818482 38.851964794507175,-11.711265479809555 57.06114671556529,-6.615650355906411 55.86820869061986,9.224408992818482 38.851964794507175),"
+ "(60.55579159384646 -5.794417042185758,69.30386052897589 -7.646930246489353,63.93552683381575 -8.734031540594103,60.55579159384646 -5.794417042185758),"
+ "(57.688459366105995 -3.3005293657993064,56.99858293272367 -2.7004966111511806,122.14822367585627 17.214748146233596,120.66377698176358 16.39003571587255,57.688459366105995 -3.3005293657993064),"
+ "(73.03324406984439 -29.694914662490135,80.85821729038376 -38.100921377000205,63.342896321792594 -39.748050882541506,50.75959180753584 -31.74216343806383,67.57943285376581 -26.271427096622276,73.03324406984439 -29.694914662490135),"
+ "(39.86400285729009 -8.873708408777603,34.87732280230907 -10.432912187499966,39.551916707235804 -8.677803685461726,39.86400285729009 -8.873708408777603),"
+ "(43.44410013402389 -27.087801782144677,45.239552804641725 -28.00697030328185,44.975318735147916 -28.06201375436441,43.44410013402389 -27.087801782144677),"
+ "(-15.257389373944136 10.259973914784002,-12.30836353977779 9.635461489231913,-13.588110003575826 9.197907303291592,-15.257389373944136 10.259973914784002),"
+ "(23.069529991534154 -14.124848414588413,21.951827586412705 -13.413730431788267,30.282022284527198 -10.86733124094458,31.682974917738175 -11.431686321512942,23.069529991534154 -14.124848414588413),"
+ "(23.80229280523764 -14.591055529795597,31.94065465827722 -11.53548916772298,37.76851162339057 -13.883163606614682,37.770097848105024 -13.883634342409975,37.771744254525196 -13.883798801928782,37.77339225172808 -13.883651132524463,37.774983192179256 -13.883196589331225,37.77646045883184 -13.882451348248843,42.80353701408153 -10.718930933297813,45.567034652447205 -12.45365217013186,26.508719800762194 -16.312970859703256,23.80229280523764 -14.591055529795597),"
+ "(43.276761579565346 -27.002134145623014,44.95069160862587 -28.067143910504445,38.11630436469161 -29.49083715589638,42.92240688088259 -26.820725087652352,43.276761579565346 -27.002134145623014),"
+ "(126.75959213687518 -63.39967008039708,92.41319098322936 -41.83950698990248,93.78447601919933 -39.99379341951623,97.3690323884615 -37.83666821790139,126.75959213687518 -63.39967008039708),"
+ "(72.98685869023261 -29.645084995156807,67.60116781362723 -26.264357693619786,69.31952721664192 -25.70545281408542,72.98685869023261 -29.645084995156807),"
+ "(39.886037618944634 -8.866828591799006,39.57257275758669 -8.67005841496514,48.78439784949424 -5.211447043733159,49.91918587276122 -4.864551295334174,50.543010064128545 -5.534696763377852,39.886037618944634 -8.866828591799006),"
+ "(9.337991159717035 38.729948727398885,21.695490271536684 25.454859141680437,-8.788846562680476 21.687676810037537,-31.489294946971892 35.93737116944357,-32.81216829744508 64.1347806843964,-11.700243714994912 61.33035113568702,-6.637054435703233 55.89123580798307,-11.741701242558069 57.08628824654891,-11.743347393206076 57.086512042263855,-11.745006213819227 57.08642142961937,-11.746618193091077 57.08601965940509,-11.748125500179835 57.08532114539797,-11.749474059428762 57.084350947258365,-11.75061549036676 57.0831438714978,-11.751508843390358 57.08174322277196,-11.752122068858302 57.08019925029701,-11.752433166894022 57.07856734512509,-11.752430976646009 57.076906052953085,-11.752115576690887 57.07527497375627,-11.751498282214417 57.07373262359911,-11.750601239071592 57.07233433533203,-11.749456629289176 57.07113027348812,9.337991159717035 38.729948727398885),"
+ "(19.998587701357646 -15.085058937588059,-3.1132193245213102 -22.311465244718235,-15.089019545185295 -24.73657453178888,18.684739096779687 -14.412444637400831,19.998587701357646 -15.085058937588059),"
+ "(21.051250846321395 -15.623961427658536,23.562530114275848 -16.909590792795676,10.677531366771717 -19.518827010871995,21.051250846321395 -15.623961427658536),"
+ "(54.09086078489642 -4.42538694225184,51.53408460058219 -5.224830093565444,53.128334513377965 -4.221574604966094,54.09086078489642 -4.42538694225184),"
+ "(173.75757156169772 32.99091541934996,165.3267971738516 30.354864191440612,165.32065635283269 30.411888723916427,173.75757156169772 32.99091541934996),"
+ "(10.465747395220248 -19.57961137948609,-12.894911802992752 -28.350460831776864,-14.505090251111184 -25.891736822767676,-3.10897552967657 -22.328503814897203,10.465747395220248 -19.57961137948609),"
+ "(-27.610965806972345 -33.8756481721416,-38.00614396293315 -37.7785591589894,-43.02265457370873 -37.34856959661485,-29.167463128681774 -32.849015266607424,-27.610965806972345 -33.8756481721416),"
+ "(-38.04432250117674 -37.79289279162382,-43.34682819058996 -39.783739126387225,-48.515464191322366 -39.13238742407438,-43.065536969219835 -37.36249587240486,-38.04432250117674 -37.79289279162382),"
+ "(-43.38210310004821 -39.796974297919405,-78.87353889947534 -53.12237586126752,-78.87504724430607 -53.12311387651708,-78.87638729989119 -53.124125816073466,-78.87750994786981 -53.125374588331766,-78.87837403873353 -53.126814420827664,-78.87894790011936 -53.128392537980105,-78.87921049772773 -53.130051095526014,-78.87915220631305 -53.1317293007423,-78.87877516248726 -53.13336564074071,-78.87809318640446 -53.13490013715957,-78.87713127519739 -53.136276544608954,-78.87592468673323 -53.13744441228774,-78.87451764727265 -53.13836093320586,-78.87296173040167 -53.138992513230576,-78.87131396665488 -53.13931600244487,-78.86963475311974 -53.1393195436839,-8.445695735047487 -46.516657330884335,0.49077562272833575 -52.4109659347568,-92.89011328794561 -53.543280146805785,-48.55468477896229 -39.14512450915579,-43.38210310004821 -39.796974297919405),"
+ "(-27.590643470202913 -33.86803834336524,-29.146094667189693 -32.84209543970167,-19.625029335662298 -29.750071937783378,-19.62345393418427 -29.749383122488545,-19.62204318480157 -29.748400197004802,-19.620851301821823 -29.747160934607262,-19.61992408863952 -29.745712959454867,-19.619297177537277 -29.7441119164207,-19.61899466035717 -29.742419332690684,-19.619028162664783 -29.74070025330835,-19.61939639698522 -29.739020741530297,-19.620085212280053 -29.73744534005227,-19.621068137763796 -29.73603459066957,-19.622307400161336 -29.734842707689822,-19.62375537531373 -29.73391549450752,-19.6253564183479 -29.733288583405276,-19.627049002077914 -29.73298606622517,-19.628768081460247 -29.733019568532782,-19.6304475932383 -29.73338780285322,-29.164834804336436 -32.82973483928127,-31.586344616113706 -31.2325578835804,-14.522499048949383 -25.897172872851705,-12.911746604589299 -28.356773367533684,-27.590643470202913 -33.86803834336524),"
+ "(-15.440268307843084 -24.82560063405746,-33.11063724365916 -30.227166517161177,-35.22563117058885 -28.832160994115174,-15.440268307843084 -24.82560063405746),"
+ "(-110.06713343754421 -53.75156377977681,-133.70536993886762 -54.03818707453698,-134.92982691302475 -49.02232991848598,-110.98866705210969 -44.17423216097226,-107.81630674108442 -53.06352104066732,-110.06713343754421 -53.75156377977681),"
+ "(-33.13242765496227 -30.23380803484376,-53.47598660261661 -36.452516973556065,-67.09295594277563 -35.28529916770173,-35.25002833910638 -28.837083149550402,-33.13242765496227 -30.23380803484376),"
+ "(-53.520970953712265 -36.466267226310144,-58.2354762927896 -37.90741924457058,-71.67669094887043 -36.21351002448205,-67.15404194693704 -35.29766922081722,-53.520970953712265 -36.466267226310144),"
+ "(-58.27645089887022 -37.919936120256196,-107.79952065899286 -53.05836684358259,-110.97130478081613 -44.1706925069293,-71.73052957001556 -36.22440573167339,-58.27645089887022 -37.919936120256196),"
+ "(-110.1268958664014 -53.769831619846144,-132.12902100408343 -60.495532046101545,-133.70109935980145 -54.05568104535152,-110.1268958664014 -53.769831619846144),"
+ "(-15.266747577272781 -24.772564602869423,-35.24640100751268 -28.818461646399513,-76.15530720021192 -1.8358005614142456,-86.14108983925057 19.847703882307872,-83.40496813166878 23.48084268412572,-64.0088883758489 6.425625058377867,-64.00760096344138 6.424685804640387,-64.00616485098435 6.4239950012666585,-64.00462744803231 6.423575453351113,-64.00303950798461 6.423441011187763,-64.00145345259266 6.42359611303842,-63.99992164139084 6.4240356386149005,-63.998494643181274 6.424745078112161,-63.99721956663504 6.4257010112121415,-63.996138505120754 6.42687188024526,-63.995287147100356 6.428219031985601,-63.994693597966496 6.429697993687634,-63.99437745221531 6.431259941239379,-63.99434914658464 6.432853310964729,-65.04832015933097 20.80381197052364,-41.89536979911647 15.900886582972497,-15.260289088462184 -24.770575950704515,-15.266747577272781 -24.772564602869423),"
+ "(-103.34718678997828 -53.67007971050907,-54.4974791531819 -38.39617545176479,-48.5956002477636 -39.13996827390118,-92.94911174811018 -53.54399645486019,-103.34718678997828 -53.67007971050907),"
+ "(-31.60797852622848 -31.239302626156118,-29.186203265828524 -32.836654666187016,-43.067588267658635 -37.344718300390326,-49.39887467327895 -36.801998383222546,-31.60797852622848 -31.239302626156118),"
+ "(-49.44306980595738 -36.81581628610981,-43.11047066152018 -37.358644575644625,-48.55637966222821 -39.12723118950323,-54.45715723826972 -38.38357632163891,-49.44306980595738 -36.81581628610981),"
+ "(-103.40555982520841 -53.68833070320558,-93.00523491310064 -53.562222737803324,-106.10185774557723 -57.815397753737585,-107.15619821197518 -54.861024333167755,-103.40555982520841 -53.68833070320558),"
+ "(23.61518017648848 -16.91683756790308,26.50528396128093 -16.33157619705981,42.94251839317316 -26.78946994271238,42.92206386339187 -26.800842478829786,23.61518017648848 -16.91683756790308),"
+ "(45.291790447718896 -28.01400696853263,64.11042508815196 -24.093836502795284,67.31540237012506 -26.10568053911328,51.48947303426359 -31.186856314772136,45.291790447718896 -28.01400696853263),"
+ "(80.89532917461274 -38.11504345691095,85.72360464810268 -37.66099230023744,91.54967590863684 -41.31818491465435,86.63190829943045 -44.27761401903968,80.89532917461274 -38.11504345691095),"
+ "(55.207151814658104 -10.519422962708234,63.930538194951616 -8.75294135555174,68.40404830643757 -12.643844730861389,61.009133000867436 -16.752229759599903,55.207151814658104 -10.519422962708234),"
+ "(67.23698237538382 -23.44253327219278,78.19510992588658 -21.159810385859345,79.41506647143727 -22.220883708516908,69.16366426579913 -25.51226555715126,67.23698237538382 -23.44253327219278),"
+ "(67.22302522687737 -23.42752227367621,61.02145616510926 -16.765450706696242,68.4181386751373 -12.656083874105,78.17850565684051 -21.14535081755846,67.22302522687737 -23.42752227367621),"
+ "(96.07462679974704 -36.687606632181144,96.22981908999839 -36.67300010138628,96.16231350114971 -36.76386105410172,96.07462679974704 -36.687606632181144),"
+ "(78.21666949675688 -21.155319242128968,91.07942965547718 -18.475847420826167,79.43458494021817 -22.214616982017457,78.21666949675688 -21.155319242128968),"
+ "(78.20006522772039 -21.140859673826085,68.43444397509445 -12.647025156396275,120.67073097659974 16.373831825187075,138.40226861975972 21.917962128038926,139.5590597714433 21.64715021353345,115.5981191196391 -10.603717556458868,91.2383062237693 -18.424837476765795,78.20006522772039 -21.140859673826085),"
+ "(96.05634598878443 -36.67170655960538,79.60266151961639 -22.360812613230724,92.37994996465073 -18.204936463794787,113.16809212086675 -13.874478509513061,96.24389265779745 -36.65405740641633,96.05634598878443 -36.67170655960538),"
+ "(45.58859841303463 -12.467188312478434,56.44996967273963 -19.285159155930536,42.959952931426386 -26.779771024798904,26.53006557073263 -16.326551720595333,45.58859841303463 -12.467188312478434),"
+ "(63.3670170846453 -39.76339728257143,80.8732966434185 -38.11712042833085,86.61655030813772 -44.286856197611016,80.54514164778 -47.94052691203084,75.54588157567393 -47.51198000904026,63.3670170846453 -39.76339728257143),"
+ "(75.57785867637746 -47.53232486223543,80.5195359645405 -47.95593597773675,78.32209776055991 -49.27831700358555,75.57785867637746 -47.53232486223543),"
+ "(44.99652318342139 -28.0755150444964,45.2644170651957 -28.01970920611602,51.48470250967003 -31.204123952853422,51.48629912522756 -31.20475275015989,51.48798761440433 -31.205058644898525,51.489703348260264 -31.20502992858282,51.49138065503266 -31.20466770036407,67.3348255051565 -26.117868279807055,67.56007186320271 -26.259277902547574,50.7404020749334 -31.72995854149191,44.99652318342139 -28.0755150444964),"
+ "(63.338554000982406 -39.76607948751283,75.50811715621062 -47.508744406950505,26.068801349075883 -43.27092792395031,63.338554000982406 -39.76607948751283),"
+ "(75.54009425476244 -47.5290892587767,78.31727689644644 -49.29602159154496,78.31871625003048 -49.29676048598416,78.32026683409454 -49.297222430561355,78.32187588641662 -49.29739170654002,78.32348865525648 -49.29726255391205,78.32505026241076 -49.29683936739541,78.32650757057118 -49.296136546893635,80.54932723087974 -47.95848139128968,87.408400175649 -48.54642481376636,82.1668571223638 -55.601419868886786,2.1628596589493014 -45.519030305358946,10.670127334892323 -44.719016219466,10.478355937853271 -44.825558445303535,10.477022945408265 -44.82646895355328,10.475879396234872 -44.82760833470957,10.474964026699563 -44.82893799359257,10.474307843855296 -44.830412889591,10.473933075114516 -44.83198306235927,10.473852415322028 -44.83359532416468,10.474068596732254 -44.835195061558494,10.474574296457355 -44.83672808534152,10.475352384521349 -44.838142466158686,10.47637650411764 -44.8393902935441,10.47761196441446 -44.84042929883103,10.47901691566548 -44.841224286952674,10.480543766820137 -44.8417483286331,10.482140797613786 -44.84198367258443,10.483753910530092 -44.84192234681058,10.485328463289965 -44.841566428649095,10.940150803529534 -44.693633216985006,25.970875452212482 -43.28014013939624,75.54009425476244 -47.5290892587767),"
+ "(44.97189605739587 -28.080645200533002,50.71876939527397 -31.736994677353735,17.512462576017413 -42.53750991301251,15.017806026020082 -42.32364842620168,38.064721701858005 -29.51950096385712,44.97189605739587 -28.080645200533002),"
+ "(63.31443324277529 -39.750733090438565,25.97083832848871 -43.262530741061205,17.557355750597907 -42.54135463818072,50.737959125026705 -31.74919957485254,63.31443324277529 -39.750733090438565),"
+ "(85.75231357643165 -37.6583020340463,96.05049525434477 -36.68986655103241,96.15182157912969 -36.77798293714598,93.77244835997257 -39.980558168609235,91.56652005301999 -41.308048394369706,85.75231357643165 -37.6583020340463),"
+ "(45.61355673842014 -12.462143693709407,55.186990966922515 -10.523510597075763,60.993339532379515 -16.76100411965765,56.46747536013181 -19.27543354028412,45.61355673842014 -12.462143693709407),"
+ "(64.13520076257863 -24.088675402162217,67.2169128156077 -23.446714026907344,69.14521649458379 -25.51818851852844,67.33723331195878 -26.098671354979363,64.13520076257863 -24.088675402162217),"
+ "(64.11378371141129 -24.075218400024625,56.48444685596549 -19.286072018869127,61.00566269662134 -16.774225066753985,67.20295566340234 -23.431703029161305,64.11378371141129 -24.075218400024625),"
+ "(45.591992977695206 -12.448607551276503,42.82001730414031 -10.708559948596815,50.72722514027072 -5.7325837246547025,55.17296905968835 -10.508447510846764,45.591992977695206 -12.448607551276503),"
+ "(90.83906500907895 -48.82288432501792,87.44124588861607 -48.531629462280534,88.82907600317388 -46.66364240274166,90.83906500907895 -48.82288432501792),"
+ "(23.58758948005409 -16.922419734971612,42.90360027945853 -26.81109719825043,38.05849031533148 -29.502880586949516,-6.114132515913077 -38.70463297488126,-12.88506814740878 -28.365491980870296,10.5740180759243 -19.557686478564662,23.58758948005409 -16.922419734971612),"
+ "(-3.2757307439501204 -22.362271881443974,-14.515075742325166 -25.876489092295138,-15.231034498305647 -24.783228289527237,-3.2757307439501204 -22.362271881443974),"
+ "(-103.408268267121 -53.67082036628739,-107.56298077416507 -53.72117660087794,-107.79361648076426 -53.07491097499442,-58.233960524270685 -37.92529090694332,-54.5393407101279 -38.390899910893495,-103.408268267121 -53.67082036628739),"
+ "(-31.626870337402607 -31.22684198473644,-49.444973181371616 -36.79804691662782,-53.42912203896892 -36.45653410481242,-33.113427002687885 -30.246340465564593,-31.626870337402607 -31.22684198473644),"
+ "(-49.48916830524817 -36.811864820269555,-54.49901880228574 -38.378300779876625,-58.192985934280664 -37.912774029229915,-53.47410637084559 -36.47028435921391,-49.48916830524817 -36.811864820269555),"
+ "(-31.605236430328155 -31.220097240155404,-33.0916365938955 -30.239698946225996,-15.262540010301606 -24.789610509222257,-15.249551258319446 -24.786972494086065,-14.532484538870866 -25.881925144352813,-31.605236430328155 -31.220097240155404),"
+ "(-103.46664127579638 -53.6890713586619,-107.16209180873788 -54.84450985214174,-107.55674612108137 -53.73864675776175,-103.46664127579638 -53.6890713586619),"
+ "(-110.00462741884331 -53.750805850432336,-107.81040256225506 -53.08006517376252,-107.58151701429983 -53.72142667015059,-110.00462741884331 -53.750805850432336),"
+ "(-110.06438982504433 -53.76907369022695,-107.57528236121614 -53.738896827034395,-107.1788402567078 -54.84976950401287,-153.2430747370277 -69.25271687255216,-141.87272856231922 -54.15476717032229,-133.71910155050836 -54.055905624595034,-132.14385744166628 -60.508724794743074,-132.14334419803262 -60.51022379344769,-132.14256964852405 -60.511605997919794,-132.14155906878108 -60.51282630309763,-132.14034543674777 -60.513844887130325,-132.1389683565123 -60.514628510872285,-132.1374727659187 -60.51515160256623,-132.13590747012384 -60.51539709231865,-132.13432354895338 -60.51535696913649,-132.13277269002927 -60.51503254234744,-110.06438982504433 -53.76907369022695),"
+ "(-27.592871920864 -33.887582518965544,-19.25708965943322 -39.38568922534542,-37.965533667372725 -37.78204018761589,-27.592871920864 -33.887582518965544),"
+ "(-38.0037121954104 -37.796373821125144,-19.22641600937537 -39.405920919960636,-12.821155357361697 -43.63069616509796,-43.309481338204634 -39.78844570828592,-38.0037121954104 -37.796373821125144),"
+ "(-43.34475623878629 -39.801680880936765,-12.788017983898143 -43.65255287986782,-8.469056186486533 -46.50124926830628,-78.80591177161446 -53.11570776137347,-43.34475623878629 -39.801680880936765),"
+ "(-27.572549585136507 -33.87997268950195,-12.901902948535914 -28.37180451734392,-6.125539187747014 -38.71923420248274,-6.124615012752566 -38.72041215386896,-6.1235039573952275 -38.72141575980836,-6.12223839702193 -38.72221577595208,-6.120855209143663 -38.72278889041018,-6.119394698851558 -38.7231184030432,-6.11789942435578 -38.723194712092116,-6.116412956870168 -38.72301559396661,38.006907672851085 -29.531544390670412,14.986494714540797 -42.320976703350695,-19.220444896885056 -39.3888453254074,-27.572549585136507 -33.87997268950195),"
+ "(163.85356981584565 38.01045640606598,150.78183751989167 33.1026264373484,160.43346758187292 38.46477202131451,163.85356981584565 38.01045640606598),"
+ "(127.70830325425007 24.439550041637304,106.54590505913245 29.393902120191427,119.4559466211646 37.51814283753344,144.37633145980607 40.59773643801638,160.4042990486444 38.46863420514055,150.67036889056672 33.060765246572494,127.70830325425007 24.439550041637304),"
+ "(137.87665775262624 22.04101325621122,122.3018982810747 17.280057664991475,132.94821653533805 23.194814080812744,137.87665775262624 22.04101325621122),"
+ "(137.91007347628613 22.051206470998714,132.97106197457936 23.207481912287477,150.67791335246926 33.044889401030915,163.89246423334544 38.00632192281352,163.89395437188944 38.00704878327708,163.89528110506717 38.00804307603519,163.89639702613067 38.00926927308045,163.89726226105742 38.01068356001573,163.89784589332643 38.0122354016276,163.8981270686255 38.01386934760742,163.89809574001623 38.01552701389832,163.8977530269305 38.01714916887077,163.8971111751712 38.018677849783465,163.8961931193457 38.020058433904424,163.8950316633681 38.02124159028708,163.89366830831162 38.02218504246065,163.892151769495 38.02285507905031,163.8905362357896 38.02322775835002,160.45914599302486 38.479038148184,164.20988616119448 40.562819558817196,165.3016644430351 30.424412023824377,137.91007347628613 22.051206470998714),"
+ "(138.43525780056368 21.928255201073114,165.3116438348011 30.33174198050335,171.7604175947424 -29.552483202131402,99.90657434057331 -36.30961852717998,149.90557033770168 -6.2210711003068075,149.90688874767233 -6.220099211525472,149.9080034680365 -6.2188991402094,149.90887562498716 -6.217512736621926,149.90947480366685 -6.215988349019058,149.9097801088294 -6.214379137593647,149.90978089352305 -6.212741220612166,149.90947713038307 -6.211131717394169,149.90887941258603 -6.209606756381856,149.9080085844325 -6.20821951776467,149.90689501444066 -6.207018378918731,149.90557753630043 -6.206045227335496,149.90410209462055 -6.205333999873108,149.90252014269552 -6.204909499271364,149.90088684816726 -6.204786529202118,149.89925916915584 -6.204969378018662,113.2096851912215 -13.847909418407404,115.57854716414471 -10.659476291875812,122.98695766373115 -8.24983286863276,122.99248836987037 -8.24805714415804,122.99248165360493 -8.248036225546489,122.99252002096307 -8.24804691580876,122.99409329720051 -8.247358404482963,122.99550225424824 -8.246376525670339,122.99669287690277 -8.24513892167087,122.99761952024896 -8.243693038524139,122.99824665954954 -8.242094307069925,122.99855025215751 -8.240404017895434,122.9985186592394 -8.238686971637309,122.99815309197326 -8.237008994718828,122.99746756511585 -8.235434415761524,122.99648835971863 -8.234023599418036,122.99525301559079 -8.232830632171684,122.99380889213523 -8.231901248822297,122.99221135273041 -8.231271079150648,122.99052164226393 -8.230964281979102,122.98880453918649 -8.230992618994556,122.98712587209964 -8.231355003840502,122.98709746667338 -8.231375211028098,122.98709422100694 -8.23136523218978,122.98445994390397 -8.232210944081352,115.62680134884883 -10.59450865345169,139.5811057192091 21.647409332212078,139.58192836390296 21.648754158529584,139.58249698017912 21.650224525030524,139.58279319818183 21.651772929697092,139.58280744822028 21.653349349391526,139.58253926992927 21.65490285591575,139.58199732714186 21.65638326131015,139.58119912799356 21.65774273923798,139.5801704593002 21.65893737007465,139.5789445534828 21.659928559785786,139.5775610149529 21.660684286755505,139.57606454064265 21.661180136284507,138.43525780056368 21.928255201073114),"
+ "(-11.672901457713799 61.32672411402214,90.98812319335303 47.68960389094599,84.7626026713778 42.82467865599619,70.29932468799596 37.879602651101656,-6.606416144696235 55.884063056220455,-11.672901457713799 61.32672411402214),"
+ "(21.731752401457072 25.441649913510176,24.257151920623585 25.753718243894582,27.241673724801043 23.15789335269138,24.67466474051967 22.280215188935983,21.731752401457072 25.441649913510176),"
+ "(27.27614200608447 23.151139413488384,40.90533858676494 27.81105618886412,88.24260741703002 33.66087553733939,106.50102688198155 29.386386724583776,56.37475342083092 -2.1578890939673077,27.27614200608447 23.151139413488384),"
+ "(24.280548333299286 25.756617557996357,40.820431510930504 27.800564754617064,27.26084581815643 23.16444842429204,24.280548333299286 25.756617557996357),"
+ "(-8.816428652507156 21.684268290604805,-29.245606398615163 19.15968622376516,-30.746990152471433 20.114940195264964,-31.488293120007164 35.91601695199151,-8.816428652507156 21.684268290604805),"
+ "(-29.272966059430175 19.15630519150303,-30.693779343676994 18.980737162403244,-30.745984888163573 20.09351270989812,-29.272966059430175 19.15630519150303),"
+ "(-8.765268372199529 21.672915212812164,21.710263177057982 25.43898929273592,24.6564884472217 22.274000588276877,2.399797039244074 14.664283533978011,-8.765268372199529 21.672915212812164),"
+ "(-11.719020876527594 61.35052257161079,-32.813002816538585 64.15256868853093,-33.794092220123524 85.06475931794377,-11.719020876527594 61.35052257161079),"
+ "(138.36863398834245 21.92583635515323,120.74643517661659 16.41589072499998,122.22857097659741 17.23931929444039,137.91059951928324 22.033067125450867,138.36863398834245 21.92583635515323),"
+ "(138.40162314694612 21.936129433384743,137.94401525032401 22.043260338510414,165.30357425200395 30.40667726763579,165.30972750566778 30.349537283861128,138.40162314694612 21.936129433384743),"
+ "(127.7390129190668 24.432360580502113,150.56644469028546 33.00302819199967,132.94563868010746 23.21343377755938,127.7390129190668 24.432360580502113),"
+ "(-161.35503387993074 -54.37346556730929,-138.5871756703948 -49.76293390065463,-141.88154531641396 -54.13731498386075,-161.35503387993074 -54.37346556730929),"
+ "(-35.27079817688228 -28.823383801272726,-67.15508315200245 -35.279973754753655,-104.45438672212283 -32.08275635744238,-104.45608427388785 -32.08277574513043,-104.45774629244461 -32.083121797430444,-104.45931051252892 -32.08378154996377,-104.46071833276328 -32.084730285999285,-104.46191701107783 -32.08593246243208,-104.46286164062022 -32.08734304135757,-104.46351683212971 -32.088909177355255,-104.46385803974773 -32.09057219727058,-104.46387248059507 -32.0922697983248,-104.46355961366501 -32.09393838220386,-104.46293116009147 -32.09551543768267,-104.46201066403262 -32.096941882523176,-104.46083261062104 -32.09816427690997,-104.4594411340252 -32.0991368255003,-104.45788836402274 -32.099823093084304,-104.45623247302943 -32.10019736958055,-71.78503500133692 -36.217536765212955,-110.97726480920838 -44.153991877456086,-118.48907838644061 -23.105096307062404,-86.1530711337859 19.831784241114434,-76.17018886097277 -1.845422238170359,-76.16937610532348 -1.846827817505229,-76.16831819663724 -1.848059505056384,-76.1670513874113 -1.8490750932589226,-35.27079817688228 -28.823383801272726),"
+ "(-104.01746970265641 -32.1378111596404,-67.21616917021902 -35.29234380666436,-71.7311963690772 -36.20664105942231,-104.01746970265641 -32.1378111596404),"
+ "(-19.189771245865394 -39.40907702065701,14.959045315399937 -42.33622673608511,10.708277693154 -44.69782106654718,2.082853933046394 -45.50894770194591,-12.781743251109447 -43.63567754687929,-19.189771245865394 -39.40907702065701),"
+ "(25.87291249723667 -43.271742962131206,11.016303004296148 -44.66886433771501,17.514523291044114 -42.55528610711852,25.87291249723667 -43.271742962131206),"
+ "(-12.74860587593394 -43.65753426277832,2.0024981350794633 -45.51650162110258,-8.441149421139997 -46.49864196914455,-12.74860587593394 -43.65753426277832),"
+ "(0.5482054515958907 -52.42783142752352,22.844877876175584 -52.15747591132524,42.52338780560707 -80.11376900277862,0.5482054515958907 -52.42783142752352),"
+ "(70.30021875120347 37.86136945403442,88.19316357634735 33.672450869505475,40.98637445712528 27.838762914602786,70.30021875120347 37.86136945403442),"
+ "(70.33149133386337 37.8720617667972,84.7697194975705 42.80859204783613,84.77105909891975 42.80917893165259,84.77228255716334 42.80998025200993,91.0124858249585 47.68637930033897,127.81301147359562 42.79793866689235,119.44990642462011 37.5350680374038,88.24355226977912 33.67867053045407,70.33149133386337 37.8720617667972),"
+ "(144.3073988767456 40.60689326310742,119.4909083116505 37.540144098182196,127.84021527260577 42.79433164264914,144.3073988767456 40.60689326310742),"
+ "(88.29299612070747 33.66709519588936,119.4149447434929 37.5130667826444,106.52189974628405 29.399521939775685,88.29299612070747 33.66709519588936),"
+ "(144.44527145744826 40.60625585489642,163.9457022420348 43.01606879557336,164.20784624646586 40.58176249549163,160.4299774597963 38.482900332010054,144.44527145744826 40.60625585489642),"
+ "(144.37633892649745 40.61541268642703,127.86340960426224 42.808927748536924,161.67658544228874 64.08740831841152,163.94382395897412 43.0335107977197,144.37633892649745 40.61541268642703),"
+ "(-41.90900718265291 15.92171071110581,-65.04965636135107 20.822031166079725,-65.63127790159731 28.752476130223627,-42.58516701826829 16.9541990192793,-41.90900718265291 15.92171071110581),"
+ "(-42.60459058740299 16.983858586408623,-65.63278027468877 28.772961078412454,-66.67261586220584 42.95118235795973,-54.565741638677004 35.24839895429071,-42.60459058740299 16.983858586408623),"
+ "(-54.58907517986818 35.28402900387246,-66.6742146811002 42.97298235051845,-66.98910868886206 47.26628926429717,-62.12011091968531 46.783833855102905,-54.58907517986818 35.28402900387246),"
+ "(-54.55313781876444 35.261172150516714,-62.097702142309025 46.78161343185131,-46.30482922656958 45.2167417013382,-31.506387108397742 35.92737383993618,-30.76509132865387 20.12645029297113,-54.55313781876444 35.261172150516714),"
+ "(-97.83416987317577 45.238498178710174,-65.64955249400556 28.76182418273821,-65.06752232404301 20.825807527637693,-82.6206997737451 24.54292980246981,-82.62234422414674 24.543118386846405,-82.62399482199257 24.54299466157833,-82.62559278256681 24.54256303304157,-82.62708119578785 24.541838873339582,-82.62840705301502 24.540847972838158,-82.62952313490874 24.539625621662307,-83.40757403122092 23.506493075556897,-90.83289438322406 30.035664942125123,-97.83416987317577 45.238498178710174),"
+ "(-82.61888709171882 24.52458915191082,-65.06618612106601 20.80758831903435,-64.01341032562904 6.452926519952804,-83.39437198775232 23.49488435218103,-82.61888709171882 24.52458915191082),"
+ "(-65.65105486819753 28.782309145932423,-97.84873506427972 45.26564377964443,-97.85028505214999 45.266259170730656,-97.8519235011197 45.266570062288324,-97.85359117767403 45.26656521490745,-97.85522779165703 45.26624480383146,-97.85677417589265 45.26562041262175,-97.85817442520765 45.26471461438658,-97.85937791752582 45.263560155713826,-97.86034114396688 45.26219877281023,-97.86102928178767 45.260679682646156,-97.86141745330046 45.259057803654485,-97.86149162525584 45.25739177030908,-97.86124911617533 45.255741813360295,-97.86069869329278 45.254167582361575,-90.86536170723733 30.064229436755205,-122.87031432291771 58.20657846684874,-122.87160397462488 58.20751906037725,-122.87304273757687 58.20821034821862,-122.87458295968815 58.20862943479625,-122.87617362852775 58.20876243988797,-122.87776206086001 58.208604958341404,-122.87929564752282 58.20816220597348,-122.88072359585243 58.20744884682156,-122.88199861194552 58.20648850746798,-122.88307846704171 58.20531299452339,-122.88392739614764 58.203961241186136,-122.88451728257994 58.20247801776782,-122.88482858919475 58.20091244889254,-128.50870223166575 4.921332760433136,-128.50874214078485 4.920024935850124,-128.5085870504444 4.918725726527491,-128.508240412044 4.917464045229747,-118.50876745117507 -23.102116039964123,-135.68859242632564 -45.914092066443295,-166.90162006241783 81.94670439205376,-32.82983975785978 64.13713127225718,-31.507388935807747 35.94872806687944,-46.297243998766895 45.232694686742164,-46.298438120776574 45.23332182175007,-46.29971427817714 45.23375845429706,-46.30104229243783 45.233994258910144,-62.110046067823596 46.80046435131626,-67.56717234515712 55.133453500144235,-67.56820100882734 55.134741527678834,-67.56945250271089 55.1358143403073,-67.5708826237989 55.13663404607767,-67.5724408599347 55.13717169282173,-67.5740721739131 55.13740829075129,-67.57571894740512 55.137335483181175,-67.57732301604885 55.136955841689016,-67.57882772382588 55.13628277528659,-67.5801799241631 55.13534005681094,-67.58133185708003 55.13416098326309,-67.58224283608062 55.13278719975146,-67.58288068520834 55.1312672285785,-67.58322287550715 55.12965475542346,-67.58325732074876 55.12800673315368,-67.00809756718309 47.28579861360277,-74.64384103040652 48.042403137098944,-74.64551355318005 48.04240861420995,-74.64715670691223 48.04209651127949,-74.6487107421129 48.04147817720973,-74.6501191498815 48.04057609629091,-74.65133071672265 48.039423070612024,-74.65230138680663 48.03806102728863,-74.6529958639579 48.03653949388014,-74.65338889511892 48.03491379743455,-74.65346618861936 48.03324305264807,-74.6532249338596 48.0315880122958,-74.65267390351174 48.03000885809735,-74.65183313452161 48.028563012347625,-74.65073319951154 48.02730304988773,-74.64941409507755 48.02627478634224,-66.69106576546662 42.962920784577285,-65.65105486819753 28.782309145932423),"
+ "(-74.60894342391143 48.02131743628841,-67.00680717272054 47.268042957701205,-66.69266458534088 42.98472079049692,-74.60894342391143 48.02131743628841),"
+ "(-138.56127670492663 -49.7577037198288,-134.94703094520807 -49.02582406883465,-133.72337212957453 -54.038411653780486,-141.85939298329575 -54.13705971460783,-138.56127670492663 -49.7577037198288),"
+ "(-134.93399269617888 -49.00526523292734,-135.68321498734667 -45.93611109773349,-118.50171193441933 -23.121886343614484,-110.99462708067594 -44.15753153101153,-134.93399269617888 -49.00526523292734),"
+ "(-138.54536289076012 -49.736572791872405,-135.69686656519858 -45.95423814792149,-134.95119672848287 -49.00875938278158,-138.54536289076012 -49.736572791872405),"
+ "(88.82755353245742 -46.63627739859524,86.64413783102847 -44.29072778657896,91.56634116238342 -41.32862933986829,92.38779164183632 -41.84427969841862,88.82755353245742 -46.63627739859524),"
+ "(96.17559112847069 -36.775403890830276,96.2533145203432 -36.670790012864686,99.8315395547437 -36.33429989598129,97.37090375596762 -37.815068768540016,96.17559112847069 -36.775403890830276),"
+ "(92.39828457197696 -41.83015645846746,91.58318530508117 -41.31849282059788,93.74495703397014 -40.01757527428385,92.39828457197696 -41.83015645846746),"
+ "(96.16509920779882 -36.78952577205994,97.35510564997305 -37.824575800671205,93.81196732309566 -39.95677632714469,96.16509920779882 -36.78952577205994),"
+ "(88.81691795134695 -46.65059264343438,87.42069611419876 -48.52987476642635,80.5749329147718 -47.94307232519108,86.62877983973574 -44.29996996515029,88.81691795134695 -46.65059264343438),"
+ "(69.32473564139825 -25.685312296376537,69.17686596344828 -25.526450792983923,79.43054197209301 -22.234338902371594,79.56777154519035 -22.35371429782551,69.32473564139825 -25.685312296376537),"
+ "(79.58722163711042 -22.347388059401556,79.45006045094098 -22.22807217263994,91.24299727724733 -18.441755195353803,92.22218393874856 -18.237804190782946,79.58722163711042 -22.347388059401556),"
+ "(67.58180682559251 -26.252208498722716,67.35665645137476 -26.110859094265415,69.15841818541341 -25.532373756550623,69.30634307855388 -25.691294568247503,67.58180682559251 -26.252208498722716),"
+ "(10.713631867610786 -44.714913767695485,10.86035670084666 -44.70114019099129,10.566326319189315 -44.7967750242813,10.713631867610786 -44.714913767695485),"
+ "(14.990356626143694 -42.338898459344726,17.469630118109404 -42.551441381415,10.93650885434335 -44.676371327096064,10.75178223878234 -44.69371860760433,14.990356626143694 -42.338898459344726),"
+ "(113.19393813942808 -13.869104583916076,149.85225961536605 -6.232679296303189,99.86624158413852 -36.31341680350249,96.26738808398915 -36.65184732348474,113.19393813942808 -13.869104583916076),"
+ "(113.18383917989723 -13.853283334263445,92.53313651295461 -18.155111782662388,115.54974201699517 -10.668833135736556,113.18383917989723 -13.853283334263445),"
+ "(163.96311491920022 43.01821047323797,169.91789145903348 43.754090361605556,164.22449464723803 40.59100135183526,163.96311491920022 43.01821047323797),"
+ "(92.37537042521268 -18.187979529764235,91.40187377110232 -18.3907452751927,115.58013059889898 -10.627916926612096,115.56781674564326 -10.64450497131272,92.37537042521268 -18.187979529764235),"
+ "(-86.16139825386244 19.849866063211905,-118.49613390319635 -23.085326003412035,-128.4910459077906 4.921493651135869,-122.86916414947727 58.18220258298618,-90.8472856693717 30.0249784474685,-86.16139825386244 19.849866063211905),"
+ "(-86.14941695432584 19.865785693545394,-90.81481832588861 29.996413910560918,-83.41817017513736 23.49245140750158,-86.14941695432584 19.865785693545394),"
+ "(-106.11264211278916 -57.83736939023901,-100.24152662041178 -74.28881727173125,-161.4303237477923 -75.80205692190154,-106.11264211278916 -57.83736939023901),"
+ "(-67.56328532753739 55.095514517777545,-62.132454845199874 46.802684774567844,-66.99039908239888 47.28404492010701,-67.56328532753739 55.095514517777545),"
+ "(115.59662188220229 -10.635148141706566,115.6088128566935 -10.618708014427298,118.58211270640945 -9.664081031738045,115.59662188220229 -10.635148141706566)))";
+ std::string msg;
+ CG mpoly = from_wkt<CG>(wkt);
+ bg::correct(mpoly);
+
+ BOOST_CHECK_MESSAGE(bg::is_valid(mpoly, msg), msg);
+ }
+#endif // BOOST_GEOMETRY_TEST_FAILURES
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_multipolygon )
+{
+ test_open_multipolygons<point_type, true>();
+ test_open_multipolygons<point_type, false>();
+}
+
+
+template <typename CoordinateType, typename Geometry>
+inline void check_one(Geometry const& geometry)
+{
+ bool const is_fp = boost::is_floating_point<CoordinateType>::value;
+
+ bg::validity_failure_type failure;
+ bool validity = bg::is_valid(geometry, failure);
+ if (BOOST_GEOMETRY_CONDITION(is_fp))
+ {
+ BOOST_CHECK(! validity);
+ BOOST_CHECK(failure == bg::failure_invalid_coordinate);
+ }
+ else
+ {
+ BOOST_CHECK(failure == bg::no_failure
+ || failure != bg::failure_invalid_coordinate);
+ }
+}
+
+template <typename P, typename CoordinateType>
+inline void test_with_invalid_coordinate(CoordinateType invalid_value)
+{
+ typedef bg::model::segment<P> segment_t;
+ typedef bg::model::box<P> box_t;
+ typedef bg::model::linestring<P> linestring_t;
+ typedef bg::model::ring<P> ring_t; // cw, closed
+ typedef bg::model::polygon<P> polygon_t; // cw, closed
+ typedef bg::model::multi_point<P> multi_point_t;
+ typedef bg::model::multi_linestring<linestring_t> multi_linestring_t;
+ typedef bg::model::multi_polygon<polygon_t> multi_polygon_t;
+
+ typedef typename bg::coordinate_type<P>::type coord_t;
+
+ std::string wkt_point = "POINT(1 1)";
+ std::string wkt_segment = "LINESTRING(1 1,10 20)";
+ std::string wkt_box = "BOX(1 1,10 20)";
+ std::string wkt_linestring = "LINESTRING(1 1,2 3,4 -5)";
+ std::string wkt_ring = "POLYGON((1 1,2 2,2 1,1 1))";
+ std::string wkt_polygon = "POLYGON((1 1,1 200,200 200,200 1,1 1),(50 50,50 51,49 50,50 50))";
+ std::string wkt_multipoint = "MULTIPOINT(1 1,2 3,4 -5,-5 2)";
+ std::string wkt_multilinestring =
+ "MULTILINESTRING((1 1,2 3,4 -5),(-4 -2,-8 9))";
+ std::string wkt_multipolygon = "MULTIPOLYGON(((1 1,1 200,200 200,200 1,1 1),(50 50,50 51,49 50,50 50)),((500 500,550 550,550 500,500 500)))";
+
+ {
+ P p;
+ bg::read_wkt(wkt_point, p);
+ BOOST_CHECK(bg::is_valid(p));
+ bg::set<1>(p, invalid_value);
+ check_one<coord_t>(p);
+ }
+ {
+ segment_t s;
+ bg::read_wkt(wkt_segment, s);
+ BOOST_CHECK(bg::is_valid(s));
+ bg::set<1, 1>(s, invalid_value);
+ check_one<coord_t>(s);
+ }
+ {
+ box_t b;
+ bg::read_wkt(wkt_box, b);
+ BOOST_CHECK(bg::is_valid(b));
+ bg::set<1, 0>(b, invalid_value);
+ check_one<coord_t>(b);
+ }
+ {
+ linestring_t ls;
+ bg::read_wkt(wkt_linestring, ls);
+ BOOST_CHECK(bg::is_valid(ls));
+ bg::set<1>(ls[1], invalid_value);
+ check_one<coord_t>(ls);
+ }
+ {
+ ring_t r;
+ bg::read_wkt(wkt_ring, r);
+ BOOST_CHECK(bg::is_valid(r));
+ bg::set<0>(r[1], invalid_value);
+ check_one<coord_t>(r);
+ }
+ {
+ polygon_t pgn;
+ bg::read_wkt(wkt_polygon, pgn);
+ BOOST_CHECK(bg::is_valid(pgn));
+ bg::set<0>(bg::interior_rings(pgn)[0][1], invalid_value);
+ check_one<coord_t>(pgn);
+ }
+ {
+ multi_point_t mp;
+ bg::read_wkt(wkt_multipoint, mp);
+ BOOST_CHECK(bg::is_valid(mp));
+ bg::set<0>(mp[2], invalid_value);
+ check_one<coord_t>(mp);
+ }
+ {
+ multi_linestring_t mls;
+ bg::read_wkt(wkt_multilinestring, mls);
+ BOOST_CHECK(bg::is_valid(mls));
+ bg::set<0>(mls[1][1], invalid_value);
+ check_one<coord_t>(mls);
+ }
+ {
+ multi_polygon_t mpgn;
+ bg::read_wkt(wkt_multipolygon, mpgn);
+ BOOST_CHECK(bg::is_valid(mpgn));
+ bg::set<0>(bg::exterior_ring(mpgn[1])[1], invalid_value);
+ check_one<coord_t>(mpgn);
+ }
+}
+
+template <typename P>
+inline void test_with_invalid_coordinate()
+{
+ typedef typename bg::coordinate_type<P>::type coord_t;
+
+ coord_t const q_nan = std::numeric_limits<coord_t>::quiet_NaN();
+ coord_t const inf = std::numeric_limits<coord_t>::infinity();
+
+ test_with_invalid_coordinate<P, coord_t>(q_nan);
+ test_with_invalid_coordinate<P, coord_t>(inf);
+}
+
+BOOST_AUTO_TEST_CASE( test_geometries_with_invalid_coordinates )
+{
+ typedef point_type fp_point_type;
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+
+ test_with_invalid_coordinate<fp_point_type>();
+ test_with_invalid_coordinate<int_point_type>();
+}
+
+BOOST_AUTO_TEST_CASE( test_with_NaN_coordinates )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: geometry with NaN coordinates" << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ linestring_type ls1, ls2;
+ bg::read_wkt("LINESTRING(1 1,1.115235e+308 1.738137e+308)", ls1);
+ bg::read_wkt("LINESTRING(-1 1,1.115235e+308 1.738137e+308)", ls2);
+
+ // the intersection of the two linestrings is a new linestring
+ // (multilinestring with a single element) that has NaN coordinates
+ multi_linestring_type mls;
+ bg::intersection(ls1, ls2, mls);
+
+ typedef validity_tester_linear<true> tester_allow_spikes;
+ typedef validity_tester_linear<false> tester_disallow_spikes;
+
+ test_valid
+ <
+ tester_allow_spikes, multi_linestring_type
+ >::apply("mls-NaN", mls, false);
+
+ test_valid
+ <
+ tester_disallow_spikes, multi_linestring_type
+ >::apply("mls-NaN", mls, false);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_variant )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid: variant support" << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<point_type> polygon_type; // cw, closed
+
+ typedef boost::variant
+ <
+ linestring_type, multi_linestring_type, polygon_type
+ > variant_geometry;
+ typedef test_valid_variant<variant_geometry> test;
+
+ variant_geometry vg;
+
+ linestring_type valid_linestring =
+ from_wkt<linestring_type>("LINESTRING(0 0,1 0)");
+ multi_linestring_type invalid_multi_linestring =
+ from_wkt<multi_linestring_type>("MULTILINESTRING((0 0,1 0),(0 0))");
+ polygon_type valid_polygon =
+ from_wkt<polygon_type>("POLYGON((0 0,1 1,1 0,0 0))");
+ polygon_type invalid_polygon =
+ from_wkt<polygon_type>("POLYGON((0 0,2 2,2 0,1 0))");
+
+ vg = valid_linestring;
+ test::apply("v01", vg, true);
+ vg = invalid_multi_linestring;
+ test::apply("v02", vg, false);
+ vg = valid_polygon;
+ test::apply("v03", vg, true);
+ vg = invalid_polygon;
+ test::apply("v04", vg, false);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/is_valid_failure.cpp b/src/boost/libs/geometry/test/algorithms/is_valid_failure.cpp
new file mode 100644
index 000000000..96a2af0e6
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_valid_failure.cpp
@@ -0,0 +1,982 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_is_valid_failure
+#endif
+
+#include <iostream>
+#include <string>
+
+#include <boost/variant/variant.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+#include <boost/geometry/algorithms/reverse.hpp>
+#include <boost/geometry/algorithms/validity_failure_type.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <from_wkt.hpp>
+
+
+namespace bg = ::boost::geometry;
+
+typedef bg::validity_failure_type failure_type;
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::box<point_type> box_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+
+char const* to_string(failure_type failure)
+{
+ switch (failure)
+ {
+ case bg::no_failure:
+ return "no_failure";
+ case bg::failure_few_points:
+ return "failure_few_points";
+ case bg::failure_wrong_topological_dimension:
+ return "failure_wrong_topological_dimension";
+ case bg::failure_spikes:
+ return "failure_spikes";
+ case bg::failure_duplicate_points:
+ return "failure_duplicate_points";
+ case bg::failure_not_closed:
+ return "failure_not_closed";
+ case bg::failure_self_intersections:
+ return "failure_self_intersections";
+ case bg::failure_wrong_orientation:
+ return "failure_wrong_orientation";
+ case bg::failure_interior_rings_outside:
+ return "failure_interior_rings_outside";
+ case bg::failure_nested_interior_rings:
+ return "failure_nested_interior_rings";
+ case bg::failure_disconnected_interior:
+ return "failure_disconnected_interior";
+ case bg::failure_intersecting_interiors:
+ return "failure_intersecting_interiors";
+ case bg::failure_wrong_corner_order:
+ return "failure_wrong_corner_order";
+ default:
+ return ""; // to avoid warnings (-Wreturn-type)
+ }
+}
+
+
+template <typename Geometry>
+struct test_failure
+{
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ failure_type expected)
+ {
+ failure_type detected;
+ bg::is_valid(geometry, detected);
+ std::string expected_msg = bg::validity_failure_type_message(expected);
+ std::string detected_msg;
+ bg::is_valid(geometry, detected_msg);
+ std::string detected_msg_short
+ = detected_msg.substr(0, expected_msg.length());
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "----------------------" << std::endl;
+ std::cout << "case id: " << case_id << std::endl;
+ std::cout << "Geometry: " << bg::wkt(geometry) << std::endl;
+ std::cout << "Expected reason: " << expected_msg << std::endl;
+ std::cout << "Detected reason: " << detected_msg << std::endl;
+ std::cout << "Expected: " << to_string(expected) << std::endl;
+ std::cout << "Detected: " << to_string(detected) << std::endl;
+ std::cout << std::endl;
+#endif
+
+ BOOST_CHECK_MESSAGE(expected == detected,
+ "case id: " << case_id
+ << ", Geometry: " << bg::wkt(geometry)
+ << ", expected: " << to_string(expected)
+ << ", detected: " << to_string(detected));
+
+ BOOST_CHECK(detected_msg_short == expected_msg);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "----------------------" << std::endl;
+ std::cout << std::endl << std::endl;
+#endif
+ }
+
+ static inline void apply(std::string const& case_id,
+ std::string const& wkt,
+ failure_type expected)
+ {
+ Geometry geometry = from_wkt<Geometry>(wkt);
+ apply(case_id, geometry, expected);
+ }
+};
+
+
+BOOST_AUTO_TEST_CASE( test_failure_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: POINT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef point_type G;
+ typedef test_failure<G> test;
+
+ test::apply("p01", "POINT(0 0)", bg::no_failure);
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: MULTIPOINT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef multi_point_type G;
+ typedef test_failure<G> test;
+
+ test::apply("mp01", "MULTIPOINT()", bg::no_failure);
+ test::apply("mp02", "MULTIPOINT(0 0,0 0)", bg::no_failure);
+ test::apply("mp03", "MULTIPOINT(0 0,1 0,1 1,0 1)", bg::no_failure);
+ test::apply("mp04", "MULTIPOINT(0 0,1 0,1 1,1 0,0 1)", bg::no_failure);
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: SEGMENT " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef segment_type G;
+ typedef test_failure<G> test;
+
+ test::apply("s01",
+ "SEGMENT(0 0,0 0)",
+ bg::failure_wrong_topological_dimension);
+ test::apply("s02", "SEGMENT(0 0,1 0)", bg::no_failure);
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_box )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: BOX " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef box_type G;
+ typedef test_failure<G> test;
+
+ // boxes where the max corner and below and/or to the left of min corner
+ test::apply("b01",
+ "BOX(0 0,-1 0)",
+ bg::failure_wrong_topological_dimension);
+ test::apply("b02", "BOX(0 0,0 -1)", bg::failure_wrong_corner_order);
+ test::apply("b03", "BOX(0 0,-1 -1)", bg::failure_wrong_corner_order);
+
+ // boxes of zero area; they are not 2-dimensional, so invalid
+ test::apply("b04", "BOX(0 0,0 0)", bg::failure_wrong_topological_dimension);
+ test::apply("b05", "BOX(0 0,1 0)", bg::failure_wrong_topological_dimension);
+ test::apply("b06", "BOX(0 0,0 1)", bg::failure_wrong_topological_dimension);
+
+ test::apply("b07", "BOX(0 0,1 1)", bg::no_failure);
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: LINESTRING " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef linestring_type G;
+ typedef test_failure<G> test;
+
+ // empty linestring
+ test::apply("l01", "LINESTRING()", bg::failure_few_points);
+
+ // 1-point linestrings
+ test::apply("l02", "LINESTRING(0 0)", bg::failure_few_points);
+ test::apply("l03",
+ "LINESTRING(0 0,0 0)",
+ bg::failure_wrong_topological_dimension);
+ test::apply("l04",
+ "LINESTRING(0 0,0 0,0 0)",
+ bg::failure_wrong_topological_dimension);
+
+ // 2-point linestrings
+ test::apply("l05", "LINESTRING(0 0,1 2)", bg::no_failure);
+ test::apply("l06", "LINESTRING(0 0,1 2,1 2)", bg::no_failure);
+ test::apply("l07", "LINESTRING(0 0,0 0,1 2,1 2)", bg::no_failure);
+ test::apply("l08", "LINESTRING(0 0,0 0,0 0,1 2,1 2)", bg::no_failure);
+
+ // 3-point linestring
+ test::apply("l09", "LINESTRING(0 0,1 0,2 10)", bg::no_failure);
+
+ // linestrings with spikes
+ test::apply("l10", "LINESTRING(0 0,1 2,0 0)", bg::no_failure);
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: MULTILINESTRING " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef multi_linestring_type G;
+ typedef test_failure<G> test;
+
+ // empty multilinestring
+ test::apply("mls01", "MULTILINESTRING()", bg::no_failure);
+
+ // multilinestring with empty linestring(s)
+ test::apply("mls02", "MULTILINESTRING(())", bg::failure_few_points);
+ test::apply("mls03", "MULTILINESTRING((),(),())", bg::failure_few_points);
+ test::apply("mls04",
+ "MULTILINESTRING((),(0 1,1 0))",
+ bg::failure_few_points);
+
+ // multilinestring with invalid linestrings
+ test::apply("mls05",
+ "MULTILINESTRING((0 0),(0 1,1 0))",
+ bg::failure_few_points);
+ test::apply("mls06",
+ "MULTILINESTRING((0 0,0 0),(0 1,1 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("mls07", "MULTILINESTRING((0 0),(1 0))",
+ bg::failure_few_points);
+ test::apply("mls08",
+ "MULTILINESTRING((0 0,0 0),(1 0,1 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("mls09",
+ "MULTILINESTRING((0 0),(0 0))",
+ bg::failure_few_points);
+ test::apply("mls10",
+ "MULTILINESTRING((0 0,1 0,0 0),(5 0))",
+ bg::failure_few_points);
+
+ // multilinstring that has linestrings with spikes
+ test::apply("mls11",
+ "MULTILINESTRING((0 0,1 0,0 0),(5 0,1 0,4 1))",
+ bg::no_failure);
+ test::apply("mls12",
+ "MULTILINESTRING((0 0,1 0,0 0),(1 0,2 0))",
+ bg::no_failure);
+
+ // valid multilinestrings
+ test::apply("mls13",
+ "MULTILINESTRING((0 0,1 0,2 0),(5 0,1 0,4 1))",
+ bg::no_failure);
+ test::apply("mls14",
+ "MULTILINESTRING((0 0,1 0,2 0),(1 0,2 0))",
+ bg::no_failure);
+ test::apply("mls15",
+ "MULTILINESTRING((0 0,1 1),(0 1,1 0))",
+ bg::no_failure);
+ test::apply("mls16",
+ "MULTILINESTRING((0 0,1 1,2 2),(0 1,1 0,2 2))",
+ bg::no_failure);
+}
+
+template <typename Point>
+inline void test_open_rings()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: RING (open) " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::ring<Point, false, false> G; // ccw, open ring
+ typedef test_failure<G> test;
+
+ // not enough points
+ test::apply("r01", "POLYGON(())", bg::failure_few_points);
+ test::apply("r02", "POLYGON((0 0))", bg::failure_few_points);
+ test::apply("r03", "POLYGON((0 0,1 0))", bg::failure_few_points);
+
+ // duplicate points
+ test::apply("r04",
+ "POLYGON((0 0,0 0,0 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("r05",
+ "POLYGON((0 0,1 0,1 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("r06",
+ "POLYGON((0 0,1 0,0 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("r07", "POLYGON((0 0,1 0,1 1,0 0,0 0))", bg::no_failure);
+ test::apply("r08", "POLYGON((0 0,1 0,1 0,1 1))", bg::no_failure);
+ test::apply("r09", "POLYGON((0 0,1 0,1 0,1 1,0 0))", bg::no_failure);
+
+ // with spikes
+ test::apply("r10", "POLYGON((0 0,2 0,2 2,0 2,1 2))", bg::failure_spikes);
+ test::apply("r11", "POLYGON((0 0,2 0,1 0,2 2))", bg::failure_spikes);
+ test::apply("r12",
+ "POLYGON((0 0,1 0,2 0,1 0,4 0,4 4))",
+ bg::failure_spikes);
+ test::apply("r13", "POLYGON((0 0,2 0,2 2,1 0))", bg::failure_spikes);
+ test::apply("r14", "POLYGON((0 0,2 0,1 0))", bg::failure_spikes);
+ test::apply("r15",
+ "POLYGON((0 0,5 0,5 5,4 4,5 5,0 5))",
+ bg::failure_spikes);
+ test::apply("r16",
+ "POLYGON((0 0,5 0,5 5,4 4,3 3,5 5,0 5))",
+ bg::failure_spikes);
+
+ // with spikes and duplicate points
+ test::apply("r17",
+ "POLYGON((0 0,0 0,2 0,2 0,1 0,1 0))",
+ bg::failure_spikes);
+
+ // with self-crossings
+ test::apply("r18",
+ "POLYGON((0 0,5 0,5 5,3 -1,0 5))",
+ bg::failure_self_intersections);
+
+ // with self-crossings and duplicate points
+ test::apply("r19",
+ "POLYGON((0 0,5 0,5 5,5 5,3 -1,0 5,0 5))",
+ bg::failure_self_intersections);
+
+ // with self-intersections
+ test::apply("r20",
+ "POLYGON((0 0,5 0,5 5,3 5,3 0,2 0,2 5,0 5))",
+ bg::failure_self_intersections);
+ test::apply("r21",
+ "POLYGON((0 0,5 0,5 5,3 5,3 0,2 5,0 5))",
+ bg::failure_self_intersections);
+ test::apply("r22",
+ "POLYGON((0 0,5 0,5 1,1 1,1 2,2 2,3 1,4 2,5 2,5 5,0 5))",
+ bg::failure_self_intersections);
+
+ // with self-intersections and duplicate points
+ test::apply("r23",
+ "POLYGON((0 0,5 0,5 5,3 5,3 5,3 0,3 0,2 0,2 0,2 5,2 5,0 5))",
+ bg::failure_self_intersections);
+
+ // next two suggested by Adam Wulkiewicz
+ test::apply("r24",
+ "POLYGON((0 0,5 0,5 5,0 5,4 4,2 2,0 5))",
+ bg::failure_self_intersections);
+ test::apply("r25",
+ "POLYGON((0 0,5 0,5 5,1 4,4 4,4 1,0 5))",
+ bg::failure_self_intersections);
+
+ // and a few more
+ test::apply("r26",
+ "POLYGON((0 0,5 0,5 5,4 4,1 4,1 1,4 1,4 4,0 5))",
+ bg::failure_self_intersections);
+ test::apply("r27",
+ "POLYGON((0 0,5 0,5 5,4 4,4 1,1 1,1 4,4 4,0 5))",
+ bg::failure_self_intersections);
+
+ // valid rings
+ test::apply("r28", "POLYGON((0 0,1 0,1 1))", bg::no_failure);
+ test::apply("r29", "POLYGON((1 0,1 1,0 0))", bg::no_failure);
+ test::apply("r30", "POLYGON((0 0,1 0,1 1,0 1))", bg::no_failure);
+ test::apply("r31", "POLYGON((1 0,1 1,0 1,0 0))", bg::no_failure);
+
+ // test cases coming from buffer
+ test::apply("r32",
+ "POLYGON((1.1713032141645456 -0.9370425713316364,\
+ 5.1713032141645456 4.0629574286683638,\
+ 4.7808688094430307 4.3753049524455756,\
+ 4.7808688094430307 4.3753049524455756,\
+ 0.7808688094430304 -0.6246950475544243,\
+ 0.7808688094430304 -0.6246950475544243))",
+ bg::no_failure);
+
+ // wrong orientation
+ test::apply("r33",
+ "POLYGON((0 0,0 1,1 1,0 0))",
+ bg::failure_wrong_orientation);
+}
+
+template <typename Point>
+void test_closed_rings()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: RING (closed) " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::ring<Point, false, true> G; // ccw, closed ring
+ typedef test_failure<G> test;
+
+ // not enough points
+ test::apply("r01c", "POLYGON(())", bg::failure_few_points);
+ test::apply("r02c", "POLYGON((0 0))", bg::failure_few_points);
+ test::apply("r03c", "POLYGON((0 0,0 0))", bg::failure_few_points);
+ test::apply("r04c", "POLYGON((0 0,1 0))", bg::failure_few_points);
+ test::apply("r05c", "POLYGON((0 0,1 0,1 0))", bg::failure_few_points);
+ test::apply("r06c", "POLYGON((0 0,1 0,2 0))", bg::failure_few_points);
+ test::apply("r07c",
+ "POLYGON((0 0,1 0,1 0,2 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("r08c",
+ "POLYGON((0 0,1 0,2 0,2 0))",
+ bg::failure_wrong_topological_dimension);
+
+ // boundary not closed
+ test::apply("r09c", "POLYGON((0 0,1 0,1 1,1 2))", bg::failure_not_closed);
+ test::apply("r10c",
+ "POLYGON((0 0,1 0,1 0,1 1,1 1,1 2))",
+ bg::failure_not_closed);
+
+ // with spikes
+ test::apply("r11c", "POLYGON((0 0,1 0,1 0,2 0,0 0))", bg::failure_spikes);
+ test::apply("r12c",
+ "POLYGON((0 0,1 0,1 1,2 2,0.5 0.5,0 1,0 0))",
+ bg::failure_spikes);
+
+ // wrong orientation
+ test::apply("r13c",
+ "POLYGON((0 0,0 1,1 1,2 0,0 0))",
+ bg::failure_wrong_orientation);
+
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_ring )
+{
+ test_open_rings<point_type>();
+ test_closed_rings<point_type>();
+}
+
+
+template <typename Point>
+void test_open_polygons()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: POLYGON (open) " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<Point, false, false> G; // ccw, open
+ typedef test_failure<G> test;
+
+ // not enough points in exterior ring
+ test::apply("pg001", "POLYGON(())", bg::failure_few_points);
+ test::apply("pg002", "POLYGON((0 0))", bg::failure_few_points);
+ test::apply("pg003", "POLYGON((0 0,1 0))", bg::failure_few_points);
+
+ // not enough points in interior ring
+ test::apply("pg004",
+ "POLYGON((0 0,10 0,10 10,0 10),())",
+ bg::failure_few_points);
+ test::apply("pg005",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1))",
+ bg::failure_few_points);
+ test::apply("pg006",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2))",
+ bg::failure_few_points);
+
+ // duplicate points in exterior ring
+ test::apply("pg007",
+ "POLYGON((0 0,0 0,0 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("pg008",
+ "POLYGON((0 0,1 0,1 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("pg009",
+ "POLYGON((0 0,1 0,0 0))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("pg010", "POLYGON((0 0,1 0,1 1,0 0,0 0))", bg::no_failure);
+ test::apply("pg011", "POLYGON((0 0,1 0,1 0,1 1))", bg::no_failure);
+ test::apply("pg012", "POLYGON((0 0,1 0,1 0,1 1,0 0))", bg::no_failure);
+
+ test::apply("pg013",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 1,1 1))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("pg014",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,2 1))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("pg015",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,1 1))",
+ bg::failure_wrong_topological_dimension);
+ test::apply("pg016",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2,2 1,1 1,1 1))",
+ bg::no_failure);
+ test::apply("pg017",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2,2 2,2 1))",
+ bg::no_failure);
+ test::apply("pg018",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 2,2 1,2 1,1 1))",
+ bg::no_failure);
+
+ // with spikes in exterior ring
+ test::apply("pg019", "POLYGON((0 0,2 0,2 2,0 2,1 2))", bg::failure_spikes);
+ test::apply("pg020", "POLYGON((0 0,2 0,1 0,2 2))", bg::failure_spikes);
+ test::apply("pg021",
+ "POLYGON((0 0,1 0,2 0,1 0,4 0,4 4))",
+ bg::failure_spikes);
+ test::apply("pg022", "POLYGON((0 0,2 0,2 2,1 0))", bg::failure_spikes);
+ test::apply("pg023", "POLYGON((0 0,2 0,1 0))", bg::failure_spikes);
+ test::apply("pg024",
+ "POLYGON((0 0,5 0,5 5,4 4,5 5,0 5))",
+ bg::failure_spikes);
+ test::apply("pg025",
+ "POLYGON((0 0,5 0,5 5,4 4,3 3,5 5,0 5))",
+ bg::failure_spikes);
+
+ // with spikes in interior ring
+ test::apply("pg026",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,3 3,1 3,2 3))",
+ bg::failure_spikes);
+ test::apply("pg027",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,2 1,3 3))",
+ bg::failure_spikes);
+ test::apply("pg028",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,3 1,2 1,4 1,4 4))",
+ bg::failure_spikes);
+ test::apply("pg029",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,3 3,2 1))",
+ bg::failure_spikes);
+ test::apply("pg030",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,3 1,2 1))",
+ bg::failure_spikes);
+
+ // with self-crossings in exterior ring
+ test::apply("pg031",
+ "POLYGON((0 0,5 0,5 5,3 -1,0 5))",
+ bg::failure_self_intersections);
+
+ // example from Norvald Ryeng
+ test::apply("pg032",
+ "POLYGON((100 1300,140 1300,140 170,100 1700))",
+ bg::failure_wrong_orientation);
+ // and with point order reversed
+ test::apply("pg033",
+ "POLYGON((100 1300,100 1700,140 170,140 1300))",
+ bg::failure_self_intersections);
+
+ // with self-crossings in interior ring
+ // the self-crossing causes the area of the interior ring to have
+ // the wrong sign, hence the "wrong orientation" failure
+ test::apply("pg034",
+ "POLYGON((0 0,10 0,10 10,0 10),(3 3,3 7,4 6,2 6))",
+ bg::failure_wrong_orientation);
+
+ // with self-crossings between rings
+ test::apply("pg035",
+ "POLYGON((0 0,5 0,5 5,0 5),(1 1,2 1,1 -1))",
+ bg::failure_self_intersections);
+
+ // with self-intersections in exterior ring
+ test::apply("pg036",
+ "POLYGON((0 0,5 0,5 5,3 5,3 0,2 0,2 5,0 5))",
+ bg::failure_self_intersections);
+ test::apply("pg037",
+ "POLYGON((0 0,5 0,5 5,3 5,3 0,2 5,0 5))",
+ bg::failure_self_intersections);
+ test::apply("pg038",
+ "POLYGON((0 0,5 0,5 1,1 1,1 2,2 2,3 1,4 2,5 2,5 5,0 5))",
+ bg::failure_self_intersections);
+
+ // next two suggested by Adam Wulkiewicz
+ test::apply("pg039",
+ "POLYGON((0 0,5 0,5 5,0 5,4 4,2 2,0 5))",
+ bg::failure_self_intersections);
+ test::apply("pg040",
+ "POLYGON((0 0,5 0,5 5,1 4,4 4,4 1,0 5))",
+ bg::failure_self_intersections);
+ test::apply("pg041",
+ "POLYGON((0 0,5 0,5 5,4 4,1 4,1 1,4 1,4 4,0 5))",
+ bg::failure_self_intersections);
+ test::apply("pg042",
+ "POLYGON((0 0,5 0,5 5,4 4,4 1,1 1,1 4,4 4,0 5))",
+ bg::failure_self_intersections);
+
+ // with self-intersections in interior ring
+
+ // same comment as for pg034
+ test::apply("pg043",
+ "POLYGON((-10 -10,10 -10,10 10,-10 10),(0 0,5 0,5 5,3 5,3 0,2 0,2 5,0 5))",
+ bg::failure_wrong_orientation);
+
+ // same comment as for pg034
+ test::apply("pg044",
+ "POLYGON((-10 -10,10 -10,10 10,-10 10),(0 0,5 0,5 5,3 5,3 0,2 5,0 5))",
+ bg::failure_wrong_orientation);
+
+ // same comment as for pg034
+ test::apply("pg045",
+ "POLYGON((-10 -10,10 -10,10 10,-10 10),(0 0,5 0,5 1,1 1,1 2,2 2,3 1,4 2,5 2,5 5,0 5))",
+ bg::failure_wrong_orientation);
+
+ // with self-intersections between rings
+ // hole has common segment with exterior ring
+ test::apply("pg046",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 10,2 10,2 1))",
+ bg::failure_self_intersections);
+ test::apply("pg047",
+ "POLYGON((0 0,0 0,10 0,10 10,0 10,0 10),(1 1,1 10,1 10,2 10,2 10,2 1))",
+ bg::failure_self_intersections);
+ // hole touches exterior ring at one point
+ test::apply("pg048",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 10,2 1))",
+ bg::no_failure);
+
+ // "hole" is outside the exterior ring, but touches it
+ // TODO: return the failure value failure_interior_rings_outside
+ test::apply("pg049",
+ "POLYGON((0 0,10 0,10 10,0 10),(5 10,4 11,6 11))",
+ bg::failure_self_intersections);
+
+ // hole touches exterior ring at vertex
+ test::apply("pg050",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 0,1 4,4 1))",
+ bg::no_failure);
+
+ // "hole" is completely outside the exterior ring
+ test::apply("pg051",
+ "POLYGON((0 0,10 0,10 10,0 10),(20 20,20 21,21 21,21 20))",
+ bg::failure_interior_rings_outside);
+
+ // two "holes" completely outside the exterior ring, that touch
+ // each other
+ test::apply("pg052",
+ "POLYGON((0 0,10 0,10 10,0 10),(20 0,25 10,21 0),(30 0,25 10,31 0))",
+ bg::failure_interior_rings_outside);
+
+ // example from Norvald Ryeng
+ test::apply("pg053",
+ "POLYGON((58 31,56.57 30,62 33),(35 9,28 14,31 16),(23 11,29 5,26 4))",
+ bg::failure_interior_rings_outside);
+ // and with points reversed
+ test::apply("pg054",
+ "POLYGON((58 31,62 33,56.57 30),(35 9,31 16,28 14),(23 11,26 4,29 5))",
+ bg::failure_wrong_orientation);
+
+ // "hole" is completely inside another "hole"
+ test::apply("pg055",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,8 2))",
+ bg::failure_nested_interior_rings);
+ test::apply("pg056",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,8 2,8 8,2 8))",
+ bg::failure_wrong_orientation);
+
+ // "hole" is inside another "hole" (touching)
+ // TODO: return the failure value failure_nested_interior_rings
+ test::apply("pg057",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ bg::failure_self_intersections);
+ // TODO: return the failure value failure_nested_interior_rings
+ test::apply("pg058",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ bg::failure_self_intersections);
+ test::apply("pg058a",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,8 2,9 6,8 8,2 8))",
+ bg::failure_wrong_orientation);
+ // TODO: return the failure value failure_nested_interior_rings
+ test::apply("pg059",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ bg::failure_self_intersections);
+ test::apply("pg059a",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,9 1,9 9,1 9),(2 2,2 8,8 8,9 6,8 2))",
+ bg::failure_wrong_orientation);
+ // TODO: return the failure value failure_nested_interior_rings
+ test::apply("pg060",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 1),(2 2,2 8,8 8,9 6,8 2))",
+ bg::failure_self_intersections);
+ test::apply("pg060a",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,9 1,9 9,1 9),(2 2,8 2,9 6,8 8,2 8))",
+ bg::failure_wrong_orientation);
+ // hole touches exterior ring at two points
+ test::apply("pg061",
+ "POLYGON((0 0,10 0,10 10,0 10),(5 0,0 5,5 5))",
+ bg::failure_disconnected_interior);
+
+ // cases with more holes
+ // two holes, touching the exterior at the same point
+ test::apply("pg062",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 0,1 9,2 9),(0 0,9 2,9 1))",
+ bg::no_failure);
+ test::apply("pg063",
+ "POLYGON((0 0,0 0,10 0,10 10,0 10,0 0),(0 0,0 0,1 9,2 9),(0 0,0 0,9 2,9 1))",
+ bg::no_failure);
+ test::apply("pg063",
+ "POLYGON((0 10,0 0,0 0,0 0,10 0,10 10),(2 9,0 0,0 0,1 9),(9 1,0 0,0 0,9 2))",
+ bg::no_failure);
+ // two holes, one inside the other
+ // TODO: return the failure value failure_nested_interior_rings
+ test::apply("pg064",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 0,1 9,9 1),(0 0,4 5,5 4))",
+ bg::failure_self_intersections);
+ // 1st hole touches has common segment with 2nd hole
+ test::apply("pg066",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 5,5 5,5 1),(5 4,5 8,8 8,8 4))",
+ bg::failure_self_intersections);
+ // 1st hole touches 2nd hole at two points
+ test::apply("pg067",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,9 9,9 8,2 8,2 1),(2 5,5 8,5 5))",
+ bg::failure_disconnected_interior);
+ // polygon with many holes, where the last two touch at two points
+ test::apply("pg068",
+ "POLYGON((0 0,20 0,20 20,0 20),(1 18,1 19,2 19,2 18),(3 18,3 19,4 19,4 18),(5 18,5 19,6 19,6 18),(7 18,7 19,8 19,8 18),(9 18,9 19,10 19,10 18),(11 18,11 19,12 19,12 18),(13 18,13 19,14 19,14 18),(15 18,15 19,16 19,16 18),(17 18,17 19,18 19,18 18),(1 1,1 9,9 9,9 8,2 8,2 1),(2 5,5 8,5 5))",
+ bg::failure_disconnected_interior);
+ // two holes completely inside exterior ring but touching each
+ // other at a point
+ test::apply("pg069",
+ "POLYGON((0 0,10 0,10 10,0 10),(1 1,1 9,2 9),(1 1,9 2,9 1))",
+ bg::no_failure);
+ // four holes, each two touching at different points
+ test::apply("pg070",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 10,2 1,1 1),(0 10,4 1,3 1),(10 10,9 1,8 1),(10 10,7 1,6 1))",
+ bg::no_failure);
+ // five holes, with two pairs touching each at some point, and
+ // fifth hole creating a disconnected component for the interior
+ test::apply("pg071",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 10,2 1,1 1),(0 10,4 1,3 1),(10 10,9 1,8 1),(10 10,7 1,6 1),(4 1,4 4,6 4,6 1))",
+ bg::failure_disconnected_interior);
+ // five holes, with two pairs touching each at some point, and
+ // fifth hole creating three disconnected components for the interior
+ test::apply("pg072",
+ "POLYGON((0 0,10 0,10 10,0 10),(0 10,2 1,1 1),(0 10,4 1,3 1),(10 10,9 1,8 1),(10 10,7 1,6 1),(4 1,4 4,6 4,6 1,5 0))",
+ bg::failure_disconnected_interior);
+
+ // both examples: a polygon with one hole, where the hole contains
+ // the exterior ring
+ test::apply("pg073",
+ "POLYGON((0 0,1 0,1 1,0 1),(-10 -10,-10 10,10 10,10 -10))",
+ bg::failure_interior_rings_outside);
+ // TODO: return the failure value failure_interior_rings_outside
+ test::apply("pg074",
+ "POLYGON((-10 -10,1 0,1 1,0 1),(-10 -10,-10 10,10 10,10 -10))",
+ bg::failure_self_intersections);
+}
+
+template <typename Point>
+inline void test_doc_example_polygon()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: doc example polygon " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<Point> CCW_CG;
+ typedef test_failure<CCW_CG> test;
+
+ test::apply("pg-doc",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 2,0 0),(0 0,2 9,1 9,0 0),(2 9,9 2,9 9,2 9))",
+ bg::failure_disconnected_interior);
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_polygon )
+{
+ test_open_polygons<point_type>();
+ test_doc_example_polygon<point_type>();
+}
+
+
+template <typename Point>
+void test_open_multipolygons()
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: MULTIPOLYGON (open) " << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<point_type,false,false> ccw_open_polygon_type;
+ typedef bg::model::multi_polygon<ccw_open_polygon_type> G;
+
+ typedef test_failure<G> test;
+
+ // not enough points
+ test::apply("mpg01", "MULTIPOLYGON()", bg::no_failure);
+ test::apply("mpg02", "MULTIPOLYGON((()))", bg::failure_few_points);
+ test::apply("mpg03", "MULTIPOLYGON(((0 0)),(()))", bg::failure_few_points);
+ test::apply("mpg04", "MULTIPOLYGON(((0 0,1 0)))", bg::failure_few_points);
+
+ // two disjoint polygons
+ test::apply("mpg05",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1)),((2 2,3 2,3 3,2 3)))",
+ bg::no_failure);
+
+ // two disjoint polygons with multiple points
+ test::apply("mpg06",
+ "MULTIPOLYGON(((0 0,1 0,1 0,1 1,0 1)),((2 2,3 2,3 3,3 3,2 3)))",
+ bg::no_failure);
+
+ // two polygons touch at a point
+ test::apply("mpg07",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1)),((1 1,2 1,2 2,1 2)))",
+ bg::no_failure);
+
+ // two polygons share a segment at a point
+ test::apply("mpg08",
+ "MULTIPOLYGON(((0 0,1.5 0,1.5 1,0 1)),((1 1,2 1,2 2,1 2)))",
+ bg::failure_self_intersections);
+
+ // one polygon inside another and boundaries touching
+ test::apply("mpg09",
+ "MULTIPOLYGON(((0 0,10 0,10 10,0 10)),((0 0,9 1,9 2)))",
+ bg::failure_intersecting_interiors);
+ test::apply("mpg09_2",
+ "MULTIPOLYGON(((0 0,5 1,10 0,10 10,0 10)),((1 1,9 1,9 2)))",
+ bg::failure_intersecting_interiors);
+
+ // one polygon inside another and boundaries not touching
+ test::apply("mpg10",
+ "MULTIPOLYGON(((0 0,10 0,10 10,0 10)),((1 1,9 1,9 2)))",
+ bg::failure_intersecting_interiors);
+
+ // free space is disconnected
+ test::apply("mpg11",
+ "MULTIPOLYGON(((0 0,1 0,1 1,0 1)),((1 1,2 1,2 2,1 2)),((0 1,0 2,-1 2,-1 -1)),((1 2,1 3,0 3,0 2)))",
+ bg::no_failure);
+
+ // multi-polygon with a polygon inside the hole of another polygon
+ test::apply("mpg12",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(1 1,1 99,99 99,99 1)),((2 2,98 2,98 98,2 98)))",
+ bg::no_failure);
+ test::apply("mpg13",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(1 1,1 99,99 99,99 1)),((1 1,98 2,98 98,2 98)))",
+ bg::no_failure);
+
+ // test case suggested by Barend Gehrels: take two valid polygons P1 and
+ // P2 with holes H1 and H2, respectively, and consider P2 to be
+ // fully inside H1; now invalidate the multi-polygon by
+ // considering H2 as a hole of P1 and H1 as a hole of P2; this
+ // should be invalid
+ //
+ // first the valid case:
+ test::apply("mpg14",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(1 1,1 99,99 99,99 1)),((2 2,98 2,98 98,2 98),(3 3,3 97,97 97,97 3)))",
+ bg::no_failure);
+ // and the invalid case:
+ test::apply("mpg15",
+ "MULTIPOLYGON(((0 0,100 0,100 100,0 100),(3 3,3 97,97 97,97 3)),((2 2,98 2,98 98,2 98),(1 1,1 99,99 99,99 1)))",
+ bg::failure_interior_rings_outside);
+
+ test::apply
+ ("mpg16",
+ "MULTIPOLYGON(((-1 4,8 -10,-10 10,7 -6,8 -2,\
+ -10 10,-10 1,-3 -4,4 1,-1 2,4 3,-8 10,-5 -9,-1 6,-5 0)),\
+ ((-10 -3,-8 1,2 -8,-2 6,-4 0,8 -5,-1 5,8 2)),\
+ ((-6 -10,1 10,4 -8,-7 -2,2 0,-4 3,-10 9)),\
+ ((10 -1,-2 8,-7 3,-6 8,-9 -7,7 -5)),\
+ ((7 7,-4 -4,9 -8,-10 -6)))",
+ bg::failure_wrong_orientation);
+
+ test::apply
+ ("mpg17",
+ "MULTIPOLYGON(((-1 4,8 -10,-10 10,7 -6,8 -2,\
+ -10 10,-10 1,-3 -4,4 1,-1 2,4 3,-8 10,-5 -9,-1 6,-5 0)),\
+ ((-10 -3,-8 1,2 -8,-2 6,-4 0,8 -5,-1 5,8 2)),\
+ ((-6 -10,-10 9,-4 3,2 0,-7 -2,4 -8,1 10)),\
+ ((10 -1,-2 8,-7 3,-6 8,-9 -7,7 -5)),\
+ ((7 7,-10 -6,9 -8,-4 -4)))",
+ bg::failure_spikes);
+
+ // test cases coming from buffer
+ {
+ std::string wkt = "MULTIPOLYGON(((1.1713032141645456 -0.9370425713316364,5.1713032141645456 4.0629574286683638,4.7808688094430307 4.3753049524455756,4.7808688094430307 4.3753049524455756,0.7808688094430304 -0.6246950475544243,0.7808688094430304 -0.6246950475544243,1.1713032141645456 -0.9370425713316364)))";
+
+ G open_mpgn = from_wkt<G>(wkt);
+ bg::reverse(open_mpgn);
+
+ test::apply("mpg18", open_mpgn, bg::failure_wrong_orientation);
+ }
+ {
+ std::string wkt = "MULTIPOLYGON(((5.2811206375710933 9.9800205994776228,5.2446420208654896 10.0415020265598844,5.1807360092909640 10.1691699739962242,5.1261005500004773 10.3010716408018013,5.0810140527710059 10.4365348863171388,5.0457062680576819 10.5748694208940446,5.0203571162381344 10.7153703234534277,5.0050957707794934 10.8573216336015328,5.0000000000000000 10.9999999999999964,5.0050957707794925 11.1426783663984619,5.0203571162381344 11.2846296765465670,5.0457062680576801 11.4251305791059501,5.0810140527710042 11.5634651136828559,5.1261005500004755 11.6989283591981934,5.1807360092909622 11.8308300260037704,5.2446420208654869 11.9584979734401102,5.3174929343376363 12.0812816349111927,5.3989175181512774 12.1985553330226910,5.4885008512914810 12.3097214678905669,5.5857864376269024 12.4142135623730923,5.6902785321094269 12.5114991487085145,5.8014446669773028 12.6010824818487190,5.9187183650888020 12.6825070656623602,6.0415020265598844 12.7553579791345104,6.1691699739962260 12.8192639907090360,6.3010716408018030 12.8738994499995236,6.4365348863171405 12.9189859472289950,6.5748694208940472 12.9542937319423199,6.7153703234534312 12.9796428837618656,6.8573216336015381 12.9949042292205075,7.0000000000000036 13.0000000000000000,7.1426783663984690 12.9949042292205075,7.2846296765465750 12.9796428837618656,7.4251305791059590 12.9542937319423181,7.5634651136828657 12.9189859472289932,7.6989283591982032 12.8738994499995201,7.8308300260037802 12.8192639907090324,7.9584979734401209 12.7553579791345069,8.0812816349112033 12.6825070656623566,8.1985553330227017 12.6010824818487137,8.3097214678905793 12.5114991487085092,8.4142135623731029 12.4142135623730869,8.5114991487085252 12.3097214678905598,8.6010824818487297 12.1985553330226821,8.6825070656623708 12.0812816349111838,8.7553579791345193 11.9584979734400996,8.8192639907090431 11.8308300260037580,8.8738994499995290 11.6989283591981810,8.9189859472290003 11.5634651136828417,8.9542937319423235 11.4251305791059359,8.9796428837618691 11.2846296765465510,8.9949042292205093 11.1426783663984441,9.0000000000000000 11.0000000000000000,8.9949042292205075 10.8573216336015346,8.9796428837618656 10.7153703234534294,8.9542937319423181 10.5748694208940464,8.9189859472289950 10.4365348863171405,8.8738994499995236 10.3010716408018030,8.8192639907090360 10.1691699739962278,8.7553579791345122 10.0415020265598862,8.7188787869375428 9.9800200826281831,8.8573216336015381 9.9949042292205075,9.0000000000000036 10.0000000000000000,9.1426783663984690 9.9949042292205075,9.2846296765465759 9.9796428837618656,9.4251305791059590 9.9542937319423181,9.5634651136828648 9.9189859472289932,9.6989283591982041 9.8738994499995201,9.8308300260037793 9.8192639907090324,9.9584979734401209 9.7553579791345069,10.0812816349112033 9.6825070656623566,10.1985553330227017 9.6010824818487137,10.3097214678905793 9.5114991487085092,10.4142135623731029 9.4142135623730869,10.5114991487085252 9.3097214678905598,10.6010824818487297 9.1985553330226821,10.6825070656623708 9.0812816349111838,10.7553579791345193 8.9584979734400996,10.8192639907090431 8.8308300260037580,10.8738994499995290 8.6989283591981810,10.9189859472290003 8.5634651136828417,10.9542937319423235 8.4251305791059359,10.9796428837618691 8.2846296765465510,10.9949042292205093 8.1426783663984441,11.0000000000000000 8.0000000000000000,10.9949042292205075 7.8573216336015355,10.9796428837618656 7.7153703234534294,10.9542937319423181 7.5748694208940464,10.9189859472289950 7.4365348863171405,10.8738994499995236 7.3010716408018030,10.8192639907090360 7.1691699739962269,10.7553579791345122 7.0415020265598862,10.6825070656623620 6.9187183650888047,10.6010824818487208 6.8014446669773063,10.5114991487085163 6.6902785321094296,10.4142135623730958 6.5857864376269051,10.3097214678905704 6.4885008512914837,10.1985553330226946 6.3989175181512792,10.0812816349111962 6.3174929343376380,9.9584979734401138 6.2446420208654887,9.8308300260037740 6.1807360092909640,9.6989283591981970 6.1261005500004764,9.5634651136828595 6.0810140527710050,9.4251305791059536 6.0457062680576810,9.2846296765465706 6.0203571162381344,9.1426783663984654 6.0050957707794925,9.0000000000000018 6.0000000000000000,8.8573216336015363 6.0050957707794925,8.7153703234534312 6.0203571162381344,8.5748694208940481 6.0457062680576810,8.4365348863171423 6.0810140527710050,8.3010716408018048 6.1261005500004764,8.1691699739962278 6.1807360092909622,8.0415020265598880 6.2446420208654878,7.9187183650888064 6.3174929343376363,7.8014446669773072 6.3989175181512783,7.6902785321094314 6.4885008512914819,7.5857864376269060 6.5857864376269033,7.4885008512914846 6.6902785321094278,7.3989175181512810 6.8014446669773045,7.3174929343376389 6.9187183650888029,7.2446420208654896 7.0415020265598844,7.1807360092909640 7.1691699739962251,7.1261005500004773 7.3010716408018013,7.0810140527710059 7.4365348863171379,7.0457062680576819 7.5748694208940437,7.0203571162381344 7.7153703234534268,7.0050957707794934 7.8573216336015328,7.0000000000000000 7.9999999999999973,7.0050957707794925 8.1426783663984619,7.0203571162381344 8.2846296765465670,7.0457062680576801 8.4251305791059501,7.0810140527710042 8.5634651136828559,7.1261005500004755 8.6989283591981934,7.1807360092909622 8.8308300260037704,7.2446420208654869 8.9584979734401102,7.2811219724467575 9.0199799990140797,7.1426783663984654 9.0050957707794925,7.0000000000000009 9.0000000000000000,6.8573216336015363 9.0050957707794925,6.7188786030357956 9.0199806804111571,6.7553579791345184 8.9584979734400996,6.8192639907090431 8.8308300260037580,6.8738994499995290 8.6989283591981810,6.9189859472290003 8.5634651136828417,6.9542937319423235 8.4251305791059359,6.9796428837618683 8.2846296765465510,6.9949042292205084 8.1426783663984441,7.0000000000000000 8.0000000000000000,6.9949042292205075 7.8573216336015355,6.9796428837618656 7.7153703234534294,6.9542937319423190 7.5748694208940464,6.9189859472289950 7.4365348863171405,6.8738994499995236 7.3010716408018030,6.8192639907090369 7.1691699739962269,6.7553579791345113 7.0415020265598862,6.6825070656623620 6.9187183650888047,6.6010824818487208 6.8014446669773063,6.5114991487085163 6.6902785321094296,6.4142135623730949 6.5857864376269051,6.3097214678905704 6.4885008512914837,6.1985553330226946 6.3989175181512792,6.0812816349111953 6.3174929343376380,5.9584979734401138 6.2446420208654887,5.8308300260037731 6.1807360092909640,5.6989283591981970 6.1261005500004764,5.5634651136828603 6.0810140527710050,5.4251305791059536 6.0457062680576810,5.2846296765465715 6.0203571162381344,5.1426783663984654 6.0050957707794925,5.0000000000000009 6.0000000000000000,4.8573216336015363 6.0050957707794925,4.7153703234534312 6.0203571162381344,4.5748694208940481 6.0457062680576810,4.4365348863171423 6.0810140527710050,4.3010716408018048 6.1261005500004764,4.1691699739962287 6.1807360092909622,4.0415020265598880 6.2446420208654878,3.9187183650888064 6.3174929343376363,3.8014446669773077 6.3989175181512783,3.6902785321094314 6.4885008512914819,3.5857864376269064 6.5857864376269033,3.4885008512914846 6.6902785321094278,3.3989175181512805 6.8014446669773045,3.3174929343376389 6.9187183650888029,3.2446420208654896 7.0415020265598844,3.1807360092909640 7.1691699739962251,3.1261005500004773 7.3010716408018013,3.0810140527710059 7.4365348863171379,3.0457062680576819 7.5748694208940437,3.0203571162381349 7.7153703234534268,3.0050957707794934 7.8573216336015328,3.0000000000000000 7.9999999999999973,3.0050957707794925 8.1426783663984619,3.0203571162381344 8.2846296765465670,3.0457062680576801 8.4251305791059501,3.0810140527710042 8.5634651136828559,3.1261005500004755 8.6989283591981934,3.1807360092909618 8.8308300260037704,3.2446420208654869 8.9584979734401102,3.3174929343376358 9.0812816349111927,3.3989175181512770 9.1985553330226910,3.4885008512914810 9.3097214678905669,3.5857864376269024 9.4142135623730923,3.6902785321094269 9.5114991487085145,3.8014446669773028 9.6010824818487190,3.9187183650888020 9.6825070656623602,4.0415020265598844 9.7553579791345104,4.1691699739962260 9.8192639907090360,4.3010716408018030 9.8738994499995236,4.4365348863171405 9.9189859472289950,4.5748694208940472 9.9542937319423199,4.7153703234534312 9.9796428837618656,4.8573216336015381 9.9949042292205075,5.0000000000000036 10.0000000000000000,5.1426783663984690 9.9949042292205075)))";
+
+ G open_mpgn = from_wkt<G>(wkt);
+ bg::reverse(open_mpgn);
+
+ // polygon has a self-touching point
+ test::apply("mpg19", open_mpgn, bg::failure_self_intersections);
+ }
+ {
+ std::string wkt = "MULTIPOLYGON(((-1.1713032141645421 0.9370425713316406,-1.2278293047051545 0.8616467945203863,-1.2795097139219473 0.7828504914601357,-1.3261404828502752 0.7009646351604617,-1.3675375811487496 0.6163123916860891,-1.4035376333829217 0.5292278447680804,-1.4339985637934827 0.4400546773279756,-1.4588001570043776 0.3491448151183161,-1.4778445324579732 0.2568570378324778,-1.4910565307049013 0.1635555631651331,-1.4983840100240693 0.0696086094114048,-1.4997980522022116 -0.0246130577225216,-1.4952930766608652 -0.1187375883622537,-1.4848868624803642 -0.2123935159867641,-1.4686204782339323 -0.3052112234370423,-1.4465581199087858 -0.3968244016261590,-1.4187868575539013 -0.4868714951938814,-1.3854162916543107 -0.5749971294005020,-1.3465781205880585 -0.6608535126285795,-1.3024256208728704 -0.7441018089575634,-1.2531330422537639 -0.8244134753943718,-1.1988949200189114 -0.9014715584824893,-1.1399253072577331 -0.9749719451724563,-1.0764569300911435 -1.0446245630171400,-1.0087402692078766 -1.1101545249551616,-0.9370425713316382 -1.1713032141645441,-0.8616467945203836 -1.2278293047051563,-0.7828504914601331 -1.2795097139219491,-0.7009646351604588 -1.3261404828502767,-0.6163123916860862 -1.3675375811487509,-0.5292278447680773 -1.4035376333829228,-0.4400546773279725 -1.4339985637934838,-0.3491448151183129 -1.4588001570043785,-0.2568570378324746 -1.4778445324579736,-0.1635555631651299 -1.4910565307049017,-0.0696086094114016 -1.4983840100240695,0.0246130577225248 -1.4997980522022114,0.1187375883622569 -1.4952930766608650,0.2123935159867673 -1.4848868624803639,0.3052112234370455 -1.4686204782339316,0.3968244016261621 -1.4465581199087849,0.4868714951938845 -1.4187868575539002,0.5749971294005050 -1.3854162916543096,0.6608535126285824 -1.3465781205880569,0.7441018089575662 -1.3024256208728686,0.8244134753943745 -1.2531330422537621,0.9014715584824917 -1.1988949200189096,0.9749719451724583 -1.1399253072577313,1.0446245630171418 -1.0764569300911420,1.1101545249551634 -1.0087402692078746,1.1713032141645456 -0.9370425713316364,5.1713032141645456 4.0629574286683638,5.1713032141645439 4.0629574286683621,5.2278293047051561 4.1383532054796159,5.2795097139219491 4.2171495085398671,5.3261404828502767 4.2990353648395407,5.3675375811487509 4.3836876083139131,5.4035376333829230 4.4707721552319217,5.4339985637934838 4.5599453226720268,5.4588001570043785 4.6508551848816859,5.4778445324579739 4.7431429621675241,5.4910565307049017 4.8364444368348689,5.4983840100240693 4.9303913905885972,5.4997980522022116 5.0246130577225232,5.4952930766608645 5.1187375883622552,5.4848868624803639 5.2123935159867658,5.4686204782339320 5.3052112234370439,5.4465581199087856 5.3968244016261604,5.4187868575539007 5.4868714951938822,5.3854162916543107 5.5749971294005025,5.3465781205880578 5.6608535126285799,5.3024256208728699 5.7441018089575637,5.2531330422537632 5.8244134753943726,5.1988949200189110 5.9014715584824895,5.1399253072577329 5.9749719451724559,5.0764569300911440 6.0446245630171394,5.0087402692078768 6.1101545249551616,4.9370425713316379 6.1713032141645439,4.8616467945203841 6.2278293047051561,4.7828504914601337 6.2795097139219482,4.7009646351604593 6.3261404828502759,4.6163123916860869 6.3675375811487509,4.5292278447680783 6.4035376333829230,4.4400546773279732 6.4339985637934838,4.3491448151183141 6.4588001570043785,4.2568570378324750 6.4778445324579739,4.1635555631651311 6.4910565307049017,4.0696086094114028 6.4983840100240693,3.9753869422774759 6.4997980522022116,3.8812624116377439 6.4952930766608645,3.7876064840132333 6.4848868624803639,3.6947887765629552 6.4686204782339320,3.6031755983738387 6.4465581199087847,3.5131285048061165 6.4187868575539007,3.4250028705994957 6.3854162916543098,3.3391464873714183 6.3465781205880578,3.2558981910424345 6.3024256208728691,3.1755865246056261 6.2531330422537623,3.0985284415175087 6.1988949200189101,3.0250280548275423 6.1399253072577320,2.9553754369828584 6.0764569300911422,2.8898454750448366 6.0087402692078751,2.8286967858354544 5.9370425713316362,-1.1713032141645456 0.9370425713316364,-1.1713032141645421 0.9370425713316406)))";
+
+ G open_mpgn = from_wkt<G>(wkt);
+ bg::reverse(open_mpgn);
+
+ // polygon contains a spike
+ test::apply("mpg20", open_mpgn, bg::failure_spikes);
+ }
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_multipolygon )
+{
+ test_open_multipolygons<point_type>();
+}
+
+BOOST_AUTO_TEST_CASE( test_failure_variant )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << " is_valid_failure: variant support" << std::endl;
+ std::cout << "************************************" << std::endl;
+#endif
+
+ typedef bg::model::polygon<point_type> polygon_type; // cw, closed
+
+ typedef boost::variant
+ <
+ linestring_type, multi_linestring_type, polygon_type
+ > variant_geometry;
+ typedef test_failure<variant_geometry> test;
+
+ variant_geometry vg;
+
+ linestring_type valid_linestring =
+ from_wkt<linestring_type>("LINESTRING(0 0,1 0)");
+ multi_linestring_type invalid_multi_linestring =
+ from_wkt<multi_linestring_type>("MULTILINESTRING((0 0,1 0),(0 0))");
+ polygon_type valid_polygon =
+ from_wkt<polygon_type>("POLYGON((0 0,1 1,1 0,0 0))");
+ polygon_type invalid_polygon =
+ from_wkt<polygon_type>("POLYGON((0 0,2 2,2 0,1 0))");
+
+ vg = valid_linestring;
+ test::apply("v01", vg, bg::no_failure);
+ vg = invalid_multi_linestring;
+ test::apply("v02", vg, bg::failure_few_points);
+ vg = valid_polygon;
+ test::apply("v03", vg, bg::no_failure);
+ vg = invalid_polygon;
+ test::apply("v04", vg, bg::failure_not_closed);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/is_valid_geo.cpp b/src/boost/libs/geometry/test/algorithms/is_valid_geo.cpp
new file mode 100644
index 000000000..67a82b2e4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/is_valid_geo.cpp
@@ -0,0 +1,76 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2014-2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_is_valid_geo
+#endif
+
+#include <limits>
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_is_valid.hpp"
+
+#include <boost/geometry/core/coordinate_type.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/reverse.hpp>
+
+
+BOOST_AUTO_TEST_CASE( test_is_valid_geo_polygon )
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > pt;
+ typedef bg::model::polygon<pt, false> G;
+
+ typedef validity_tester_geo_areal<false> tester;
+ typedef test_valid<tester, G> test;
+
+ test::apply("p01", "POLYGON((-1 -1, 1 -1, 1 1, -1 1, -1 -1),(-0.5 -0.5, -0.5 0.5, 0.0 0.0, -0.5 -0.5),(0.0 0.0, 0.5 0.5, 0.5 -0.5, 0.0 0.0))", true);
+}
+
+template <typename Poly, typename Spheroid>
+void test_valid_s(std::string const& wkt,
+ Spheroid const& sph,
+ bool expected_result)
+{
+ bg::strategy::intersection::geographic_segments<> is(sph);
+ bg::strategy::area::geographic<> as(sph);
+
+ Poly p;
+ bg::read_wkt(wkt, p);
+ bg::correct(p, as);
+
+ BOOST_CHECK(bg::is_valid(p, is) == expected_result);
+}
+
+BOOST_AUTO_TEST_CASE( test_is_valid_epsg4053_polygon )
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > pt;
+ typedef bg::model::polygon<pt, false> po;
+
+ bg::srs::spheroid<double> epsg4053(6371228, 6371228);
+ bg::srs::spheroid<double> wgs84;
+
+ // NOTE: the orientation is different in these CSes,
+ // in one of them the polygon is corrected before passing it into is_valid()
+
+ test_valid_s<po>("POLYGON((-148 -68,178 -74,76 0,-148 -68))", wgs84, true);
+ test_valid_s<po>("POLYGON((-148 -68,178 -74,76 0,-148 -68))", epsg4053, true);
+
+ test_valid_s<po>("POLYGON((-152 -54,-56 43,142 -52,-152 -54))", wgs84, true);
+ test_valid_s<po>("POLYGON((-152 -54,-56 43,142 -52,-152 -54))", epsg4053, true);
+
+ return;
+} \ No newline at end of file
diff --git a/src/boost/libs/geometry/test/algorithms/length/Jamfile b/src/boost/libs/geometry/test/algorithms/length/Jamfile
new file mode 100644
index 000000000..8fe1bb13f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/length/Jamfile
@@ -0,0 +1,17 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2016 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-length
+ :
+ [ run length.cpp : : : : algorithms_length ]
+ [ run length_multi.cpp : : : : algorithms_length_multi ]
+ [ run length_sph.cpp : : : : algorithms_length_sph ]
+ [ run length_geo.cpp : : : : algorithms_length_geo ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/length/length.cpp b/src/boost/libs/geometry/test/algorithms/length/length.cpp
new file mode 100644
index 000000000..11e18d396
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/length/length.cpp
@@ -0,0 +1,55 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_length.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/std_pair_as_segment.hpp>
+
+#include <test_geometries/all_custom_linestring.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // 3-4-5 triangle
+ test_geometry<std::pair<P, P> >("LINESTRING(0 0,3 4)", 5);
+
+ // 3-4-5 plus 1-1
+ test_geometry<bg::model::linestring<P> >("LINESTRING(0 0,3 4,4 3)", 5 + sqrt(2.0));
+ test_geometry<all_custom_linestring<P> >("LINESTRING(0 0,3 4,4 3)", 5 + sqrt(2.0));
+ test_geometry<test::wrapped_boost_array<P, 3> >("LINESTRING(0 0,3 4,4 3)", 5 + sqrt(2.0));
+
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0);
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 0);
+}
+
+template <typename P>
+void test_empty_input()
+{
+ test_empty_input(bg::model::linestring<P>());
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ // test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/length/length_geo.cpp b/src/boost/libs/geometry/test/algorithms/length/length_geo.cpp
new file mode 100644
index 000000000..66754eaf0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/length/length_geo.cpp
@@ -0,0 +1,121 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_length.hpp>
+#include <algorithms/length/linestring_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/std_pair_as_segment.hpp>
+
+#include <test_geometries/all_custom_linestring.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+template <typename P>
+struct geo_strategies
+{
+ // Set radius type, but for integer coordinates we want to have floating
+ // point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<P>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+ typedef bg::strategy::distance::andoyer<stype> andoyer_type;
+ typedef bg::strategy::distance::thomas<stype> thomas_type;
+ typedef bg::strategy::distance::vincenty<stype> vincenty_type;
+};
+
+template <typename P>
+void test_default() //this should use andoyer strategy
+{
+ for(std::size_t i = 0; i < 2; ++i)
+ {
+ test_geometry<bg::model::linestring<P> >(Ls_data_geo[i],
+ 1116814.237 + 1116152.605);
+ }
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0);
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 0);
+}
+
+template <typename P, typename N, typename Strategy>
+void test_with_strategy(N exp_length, Strategy strategy)
+{
+ for(std::size_t i = 0; i < 2; ++i)
+ {
+ test_geometry<bg::model::linestring<P> >(Ls_data_geo[i],
+ exp_length,
+ strategy);
+ }
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0, strategy);
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 0,
+ strategy);
+}
+
+template <typename P>
+void test_andoyer()
+{
+ typename geo_strategies<P>::andoyer_type andoyer;
+ test_with_strategy<P>(1116814.237 + 1116152.605, andoyer);
+}
+
+template <typename P>
+void test_thomas()
+{
+ typename geo_strategies<P>::thomas_type thomas;
+ test_with_strategy<P>(1116825.795 + 1116158.7417, thomas);
+}
+
+template <typename P>
+void test_vincenty()
+{
+ typename geo_strategies<P>::vincenty_type vincenty;
+ test_with_strategy<P>(1116825.857 + 1116159.144, vincenty);
+}
+
+template <typename P>
+void test_all()
+{
+ test_default<P>();
+ test_andoyer<P>();
+ test_thomas<P>();
+ test_vincenty<P>();
+}
+
+template <typename P>
+void test_empty_input()
+{
+ test_empty_input(bg::model::linestring<P>());
+ test_empty_input(bg::model::multi_linestring<P>());
+}
+
+int test_main(int, char* [])
+{
+ // Works only for double(?!)
+ //test_all<bg::model::d2::point_xy<int,
+ // bg::cs::geographic<bg::degree> > >();
+ //test_all<bg::model::d2::point_xy<float,
+ // bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::d2::point_xy<double,
+ bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ //test_empty_input<bg::model::d2::point_xy<double,
+ // bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/length/length_multi.cpp b/src/boost/libs/geometry/test/algorithms/length/length_multi.cpp
new file mode 100644
index 000000000..083349f57
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/length/length_multi.cpp
@@ -0,0 +1,38 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/test_length.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >
+ ("MULTILINESTRING((0 0,3 4,4 3))", 5 + sqrt(2.0));
+}
+
+template <typename P>
+void test_empty_input()
+{
+ test_empty_input(bg::model::multi_linestring<P>());
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ // test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/length/length_sph.cpp b/src/boost/libs/geometry/test/algorithms/length/length_sph.cpp
new file mode 100644
index 000000000..6b2f8944f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/length/length_sph.cpp
@@ -0,0 +1,87 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_length.hpp>
+#include <algorithms/length/linestring_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/std_pair_as_segment.hpp>
+
+#include <test_geometries/all_custom_linestring.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+template <typename P>
+void test_all_default() //test the default strategy
+{
+ double const pi = boost::math::constants::pi<double>();
+
+ for(std::size_t i = 0; i < 2; ++i)
+ {
+ test_geometry<bg::model::linestring<P> >(Ls_data_sph[i], 2 * pi);
+ }
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0);
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 0);
+}
+
+template <typename P>
+void test_all_haversine(double const mean_radius)
+{
+ double const pi = boost::math::constants::pi<double>();
+ bg::strategy::distance::haversine<float> haversine_strategy(mean_radius);
+
+ for(std::size_t i = 0; i < 2; ++i)
+ {
+ test_geometry<bg::model::linestring<P> >(Ls_data_sph[i],
+ 2 * pi * mean_radius,
+ haversine_strategy);
+ }
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0, haversine_strategy);
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ 0, haversine_strategy);
+}
+
+template <typename P>
+void test_empty_input()
+{
+ test_empty_input(bg::model::linestring<P>());
+ test_empty_input(bg::model::multi_linestring<P>());
+}
+
+int test_main(int, char* [])
+{
+ //Earth radius estimation in Km
+ //(see https://en.wikipedia.org/wiki/Earth_radius)
+ double const mean_radius = 6371.0;
+
+ test_all_default<bg::model::d2::point_xy<int,
+ bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all_default<bg::model::d2::point_xy<float,
+ bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all_default<bg::model::d2::point_xy<double,
+ bg::cs::spherical_equatorial<bg::degree> > >();
+
+ test_all_haversine<bg::model::d2::point_xy<int,
+ bg::cs::spherical_equatorial<bg::degree> > >(mean_radius);
+ test_all_haversine<bg::model::d2::point_xy<float,
+ bg::cs::spherical_equatorial<bg::degree> > >(mean_radius);
+ test_all_haversine<bg::model::d2::point_xy<double,
+ bg::cs::spherical_equatorial<bg::degree> > >(mean_radius);
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ //test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/length/linestring_cases.hpp b/src/boost/libs/geometry/test/algorithms/length/linestring_cases.hpp
new file mode 100644
index 000000000..9c7774f86
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/length/linestring_cases.hpp
@@ -0,0 +1,28 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef LINESTRING_CASES_HPP
+#define LINESTRING_CASES_HPP
+
+#include <string>
+
+static std::string Ls_data_geo[] = {"LINESTRING(0 90,1 80,1 70)",
+ "LINESTRING(0 90,1 80,1 80,1 80,1 70,1 70)",
+ "LINESTRING(0 90,1 80,1 79,1 78,1 77,1 76,1 75,1 74,\
+ 1 73,1 72,1 71,1 70)"};
+
+static std::string Ls_data_sph[] = {"LINESTRING(0 0,180 0,180 180)",
+ "LINESTRING(0 0,180 0,180 0,180 0,180 180,180 180)",
+ "LINESTRING(0 0,180 0,180 10,180 20,180 30,180 40,180 50,180 60,\
+ 180 70,180 80,180 90,180 100,180 110,180 120,180 130,\
+ 180 140,180 150,180 160,180 170,180 180)"};
+
+#endif // LINESTRING_CASES_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/line_interpolate.cpp b/src/boost/libs/geometry/test/algorithms/line_interpolate.cpp
new file mode 100644
index 000000000..45a169905
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/line_interpolate.cpp
@@ -0,0 +1,370 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/line_interpolate.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+
+#include <boost/geometry/iterators/segment_iterator.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+template <typename P, typename Tag = typename bg::tag<P>::type>
+struct check_points: bg::not_implemented<Tag>
+{};
+
+template <typename P>
+struct check_points<P, bg::point_tag>
+{
+ static void apply(P const& p0, P const& p1)
+ {
+ double p00 = bg::get<0>(p0);
+ double p10 = bg::get<0>(p1);
+
+ BOOST_CHECK_CLOSE(p00, p10, 0.001);
+
+ double p01 = bg::get<1>(p0);
+ double p11 = bg::get<1>(p1);
+
+ BOOST_CHECK_CLOSE(p01, p11, 0.001);
+ }
+};
+
+template <typename P>
+struct check_points<P, bg::multi_point_tag>
+{
+ template <typename Range>
+ static void apply(Range const& r0, Range const& r1)
+ {
+
+ typedef typename boost::range_iterator<Range const>::type iterator_t;
+ typedef typename boost::range_value<Range const>::type point_t;
+
+ std::size_t count0 = boost::size(r0);
+ std::size_t count1 = boost::size(r1);
+
+ BOOST_CHECK_MESSAGE(count0 == count1, bg::wkt(r0) << " != " << bg::wkt(r1));
+
+ if (count0 == count1)
+ {
+ for (iterator_t it0 = boost::begin(r0), it1 = boost::begin(r1);
+ it0 < boost::end(r0); it0++, it1++)
+ {
+ check_points<point_t>::apply(*it0, *it1);
+ }
+ }
+ }
+};
+
+template <typename G, typename P, typename S>
+inline void test(std::string const& wkt1,
+ double fraction,
+ std::string const& wkt2,
+ S str)
+{
+ G g;
+ bg::read_wkt(wkt1, g);
+
+ P o;
+ bg::read_wkt(wkt2, o);
+
+ P p1;
+ bg::line_interpolate(g, fraction * bg::length(g), p1, str);
+ check_points<P>::apply(p1, o);
+
+}
+
+template <typename G, typename P>
+inline void test(std::string const& wkt1,
+ double fraction,
+ std::string const& wkt2)
+{
+ G g;
+ bg::read_wkt(wkt1, g);
+
+ P o;
+ bg::read_wkt(wkt2, o);
+
+ P p1;
+ bg::line_interpolate(g, fraction * bg::length(g), p1);
+ check_points<P>::apply(p1, o);
+}
+
+template <typename G, typename P>
+inline void test_distance(std::string const& wkt1,
+ double distance,
+ std::string const& wkt2)
+{
+ G g;
+ bg::read_wkt(wkt1, g);
+
+ P o;
+ bg::read_wkt(wkt2, o);
+
+ P p1;
+ bg::line_interpolate(g, distance, p1);
+ check_points<P>::apply(p1, o);
+}
+
+template <typename G, typename P, typename S>
+inline void test_distance(std::string const& wkt1,
+ double distance,
+ std::string const& wkt2,
+ S str)
+{
+ G g;
+ bg::read_wkt(wkt1, g);
+
+ P o;
+ bg::read_wkt(wkt2, o);
+
+ P p1;
+ bg::line_interpolate(g, distance, p1, str);
+ check_points<P>::apply(p1, o);
+}
+
+std::string const s = "SEGMENT(1 1, 2 2)";
+std::string const l1 = "LINESTRING(1 1, 2 1, 2 2, 1 2, 1 3)";
+std::string const l2 = "LINESTRING(0 2, 5 2, 5 1, 20 1)";
+std::string const l00 = "LINESTRING()";
+std::string const l01 = "LINESTRING(1 1)";
+std::string const l02 = "LINESTRING(1 1, 1 1)";
+
+void test_car_edge_cases()
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::linestring<P> LS;
+
+ //negative input distance
+ test_distance<LS,P>(l1, -1, "POINT(1 1)");
+ test_distance<LS,MP>(l1, -1, "MULTIPOINT((1 1))");
+
+ //input distance longer than total length
+ test_distance<LS,P>(l1, 5, "POINT(1 3)");
+ test_distance<LS,MP>(l1, 5, "MULTIPOINT((1 3))");
+
+ //linestring with only one point
+ test_distance<LS,P>(l01, 1, "POINT(1 1)");
+ test_distance<LS,MP>(l01, 1, "MULTIPOINT((1 1))");
+
+ //linestring with two same points
+ test_distance<LS,P>(l02, 1, "POINT(1 1)");
+ test_distance<LS,MP>(l02, 1, "MULTIPOINT((1 1))");
+
+ //empty linestring
+ try
+ {
+ test_distance<LS,P>(l00, 1, "POINT(1 1)");
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+void test_car()
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P;
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::segment<P> S;
+ typedef bg::model::linestring<P> LS;
+
+ test<S,P>(s, 0, "POINT(1 1)");
+ test<S,P>(s, 0.5, "POINT(1.5 1.5)");
+ test<S,P>(s, 1, "POINT(2 2)");
+
+ test<LS,P>(l1, 0, "POINT(1 1)");
+ test<LS,P>(l1, 0.1, "POINT(1.4 1)");
+ test<LS,P>(l1, 0.2, "POINT(1.8 1)");
+ test<LS,P>(l1, 0.3, "POINT(2 1.2)");
+ test<LS,P>(l1, 0.4, "POINT(2 1.6)");
+ test<LS,P>(l1, 0.5, "POINT(2 2)");
+ test<LS,P>(l1, 0.6, "POINT(1.6 2)");
+ test<LS,P>(l1, 0.7, "POINT(1.2 2)");
+ test<LS,P>(l1, 0.8, "POINT(1 2.2)");
+ test<LS,P>(l1, 0.9, "POINT(1 2.6)");
+ test<LS,P>(l1, 1, "POINT(1 3)");
+
+ test<LS,MP>(l1, 0, "MULTIPOINT((1 1))");
+ //(1 3) missing due to floating point round off errors
+ test<LS,MP>(l1, 0.1, "MULTIPOINT((1.4 1)(1.8 1)(2 1.2)(2 1.6)(2 2)(1.6 2)\
+ (1.2 2)(1 2.2)(1 2.6))");
+ //(1 3) is not missing if you directly pass the distance
+ test_distance<LS,MP>(l1, 0.4, "MULTIPOINT((1.4 1)(1.8 1)(2 1.2)(2 1.6)(2 2)(1.6 2)\
+ (1.2 2)(1 2.2)(1 2.6)(1 3))");
+ test<LS,MP>(l1, 0.2, "MULTIPOINT((1.8 1)(2 1.6)(1.6 2)(1 2.2))");//(1 3) missing
+ test<LS,MP>(l1, 0.4, "MULTIPOINT((2 1.6)(1 2.2))");
+ test<LS,MP>(l1, 0.5, "MULTIPOINT((2 2)(1 3))");
+ test<LS,MP>(l1, 0.6, "MULTIPOINT((1.6 2))");
+ test<LS,MP>(l1, 1, "MULTIPOINT((1 3))");
+}
+
+void test_sph()
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > P;
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::segment<P> S;
+ typedef bg::model::linestring<P> LS;
+
+ test<S,P>(s, 0, "POINT(1 1)");
+ test<S,P>(s, 0.5, "POINT(1.4998857365615981 1.5000570914791198)");
+ test<S,P>(s, 1, "POINT(2 2)");
+
+ test<LS,P>(l1, 0, "POINT(1 1)");
+ test<LS,P>(l1, 0.1, "POINT(1.39998476912905323 1.0000365473536286)");
+ test<LS,P>(l1, 0.2, "POINT(1.79996953825810646 1.0000243679448551)");
+ test<LS,P>(l1, 0.3, "POINT(2 1.1999238595669637)");
+ test<LS,P>(l1, 0.4, "POINT(2 1.5998477098527744)");
+ test<LS,P>(l1, 0.5, "POINT(2 1.9997715601390484)");
+ test<LS,P>(l1, 0.6, "POINT(1.6000609543036084 2.0000730473928678)");
+ test<LS,P>(l1, 0.7, "POINT(1.1998933176222553 2.0000486811516014)");
+ test<LS,P>(l1, 0.8, "POINT(1 2.2001522994279883)");
+ test<LS,P>(l1, 0.9, "POINT(1 2.6000761497139444)");
+ test<LS,P>(l1, 1, "POINT(1 3)");
+
+ test<LS,MP>(l1, 0, "MULTIPOINT((1 1))");
+ test<LS,MP>(l1, 0.1, "MULTIPOINT((1.39998476912905323 1.0000365473536286)\
+ (1.79996953825810646 1.0000243679448551)\
+ (2 1.1999238595669637)\
+ (2 1.5998477098527744)\
+ (2 1.9997715601385837)\
+ (1.6000609543036084 2.0000730473928678)\
+ (1.1998933176222553 2.0000486811516014)\
+ (1 2.2001522994279883)\
+ (1 2.6000761497139444)\
+ )");//(1,3)
+ test<LS,MP>(l1, 0.2, "MULTIPOINT((1.79996953825810646 1.0000243679448551)\
+ (2 1.5998477098527744)\
+ (1.6000609543036084 2.0000730473928678)\
+ (1 2.2001522994279883)\
+ )");//(1,3)
+ test<LS,MP>(l1, 0.4, "MULTIPOINT((2 1.5998477098527744)(1 2.2001522994279883))");
+ test<LS,MP>(l1, 0.5, "MULTIPOINT((2 1.9997715601385837)(1 3))");
+ test<LS,MP>(l1, 0.6, "MULTIPOINT((1.6000609543036084 2.0000730473928678))");
+ test<LS,MP>(l1, 1, "MULTIPOINT((1 3))");
+
+ test<LS,MP>(l2, 0.3, "MULTIPOINT((5.3014893312120446 1.0006787676128222)\
+ (11.600850053156366 1.0085030143490989)\
+ (17.9002174825842 1.0041514208039872))");
+
+}
+
+template <typename Strategy>
+void test_sph(Strategy str)
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > P;
+ typedef bg::model::segment<P> S;
+
+ test_distance<S,P>(s, 0, "POINT(1 1)", str);
+ test_distance<S,P>(s, 0.01, "POINT(1.4051065077123643 1.405268220524982)");
+ test_distance<S,P>(s, 0.01, "POINT(1.0040505023484179 1.0040529633262307)", str);
+ test_distance<S,P>(s, 1, "POINT(1.4051065077123015 1.405268220524919)", str);
+ test_distance<S,P>(s, 1, "POINT(2 2)");
+ test_distance<S,P>(s, 10, "POINT(2 2)");
+}
+
+template <typename Strategy>
+void test_geo(Strategy str)
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > P;
+ typedef bg::model::multi_point<P> MP;
+ typedef bg::model::segment<P> S;
+ typedef bg::model::linestring<P> LS;
+
+ test<S,P>(s, 0, "POINT(1 1)", str);
+ test<S,P>(s, 0.5, "POINT(1.4998780900539985 1.5000558288006378)", str);
+ test<S,P>(s, 1, "POINT(2 2)", str);
+
+ test<LS,P>(l1, 0, "POINT(1 1)", str);
+ test<LS,P>(l1, 0.1, "POINT(1.3986445638301882 1.0000367522730751)", str);
+ test<LS,P>(l1, 0.2, "POINT(1.79728912766037641 1.0000247772611039)", str);
+ test<LS,P>(l1, 0.3, "POINT(2 1.1972285554368427)", str);
+ test<LS,P>(l1, 0.4, "POINT(2 1.598498298996567)", str);
+ test<LS,P>(l1, 0.5, "POINT(2 1.9997664696834965)", str);
+ test<LS,P>(l1, 0.6, "POINT(1.6013936980010324 2.0000734568388099)", str);
+ test<LS,P>(l1, 0.7, "POINT(1.2025664628960846 2.0000494983098767)", str);
+ test<LS,P>(l1, 0.8, "POINT(1 2.1974612279909937)", str);
+ test<LS,P>(l1, 0.9, "POINT(1 2.5987263175375022)", str);
+ test<LS,P>(l1, 1, "POINT(1 3)", str);
+
+ test<LS,MP>(l1, 0, "MULTIPOINT((1 1))", str);
+
+ //adnoyer is missing the last point in the following cases
+ // of linestrings due to inaccuracy
+ if (!boost::is_same<Strategy, bg::strategy::line_interpolate::geographic
+ <bg::strategy::andoyer> >::value)
+ {
+ test<LS,MP>(l1, 0.1, "MULTIPOINT((1.3986445638301882 1.0000367522730751)\
+ (1.79728912766037641 1.0000247772582571)\
+ (2 1.1972285554368427)\
+ (2 1.598498298996567)\
+ (2 1.9997664696834965)\
+ (1.6013936980010324 2.0000734568388099)\
+ (1.2025664628960846 2.0000495003440779)\
+ (1 2.1974612279909937)\
+ (1 2.5987263175375022)\
+ (1 3))", str);
+
+ test<LS,MP>(l1, 0.2, "MULTIPOINT((1.79728912766037641 1.0000247772613331)\
+ (2 1.598498298996567)\
+ (1.6013936980010324 2.0000734568388099)\
+ (1 2.1974612279909937)\
+ (1 3))", str);
+ }
+ test<LS,MP>(l1, 0.4, "MULTIPOINT((2 1.598498298996567)(1 2.1974612279909937))", str);
+ test<LS,MP>(l1, 0.5, "MULTIPOINT((2 1.9997664696834965)(1 3))", str);
+ test<LS,MP>(l1, 0.6, "MULTIPOINT((1.6013936980010324 2.0000734568388099))", str);
+ test<LS,MP>(l1, 1, "MULTIPOINT((1 3))", str);
+
+ test<LS,MP>(l2, 0.3, "MULTIPOINT((5.306157814 1.0006937303)\
+ (11.60351281 1.0085614548123072)\
+ (17.90073492 1.004178475142552))", str);
+}
+
+template <typename Strategy>
+void test_geo_non_standard_spheroid(Strategy str)
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > P;
+ typedef bg::model::segment<P> S;
+
+ test<S,P>(s, 0, "POINT(1 1)", str);
+ test<S,P>(s, 0.5, "POINT(1.5127731436886724 1.5129021873759412)", str);
+ test<S,P>(s, 1, "POINT(2 2)", str);
+}
+
+int test_main(int, char* [])
+{
+ test_car();
+ test_car_edge_cases();
+
+ test_sph();
+ test_sph(bg::strategy::line_interpolate::spherical<>(100));
+
+ typedef bg::srs::spheroid<double> stype;
+
+ test_geo(bg::strategy::line_interpolate::geographic<bg::strategy::andoyer>());
+ test_geo(bg::strategy::line_interpolate::geographic<bg::strategy::thomas>());
+ test_geo(bg::strategy::line_interpolate::geographic<bg::strategy::vincenty>());
+
+ test_geo_non_standard_spheroid(bg::strategy::line_interpolate::geographic
+ <bg::strategy::vincenty>(stype(5000000,6000000)));
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/make.cpp b/src/boost/libs/geometry/test/algorithms/make.cpp
new file mode 100644
index 000000000..fae968a8c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/make.cpp
@@ -0,0 +1,137 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/io/wkt/write.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename T, typename P>
+void test_point_2d()
+{
+ P p = bg::make<P>((T) 123, (T) 456);
+ BOOST_CHECK_CLOSE(bg::get<0>(p), 123.0, 1.0e-6);
+ BOOST_CHECK_CLOSE(bg::get<1>(p), 456.0, 1.0e-6);
+}
+
+template <typename T, typename P>
+void test_point_3d()
+{
+ P p = bg::make<P>((T) 123, (T) 456, (T) 789);
+ BOOST_CHECK_CLOSE( bg::get<0>(p), 123.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( bg::get<1>(p), 456.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( bg::get<2>(p), 789.0, 1.0e-6);
+}
+
+template <typename T, typename P>
+void test_box_2d()
+{
+ typedef bg::model::box<P> B;
+ B b = bg::make<B>((T) 123, (T) 456, (T) 789, (T) 1011);
+ BOOST_CHECK_CLOSE( (bg::get<bg::min_corner, 0>(b)), 123.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::min_corner, 1>(b)), 456.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::max_corner, 0>(b)), 789.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::max_corner, 1>(b)), 1011.0, 1.0e-6);
+
+ b = bg::make_inverse<B>();
+}
+
+template <typename T, typename P>
+void test_linestring_2d()
+{
+ typedef bg::model::linestring<P> L;
+
+ T coors[][2] = {{1,2}, {3,4}};
+
+ L line = bg::detail::make::make_points<L>(coors);
+
+ BOOST_CHECK_EQUAL(line.size(), 2u);
+}
+
+template <typename T, typename P>
+void test_linestring_3d()
+{
+ typedef bg::model::linestring<P> L;
+
+ T coors[][3] = {{1,2,3}, {4,5,6}};
+
+ L line = bg::detail::make::make_points<L>(coors);
+
+ BOOST_CHECK_EQUAL(line.size(), 2u);
+ //std::cout << dsv(line) << std::endl;
+
+}
+
+template <typename T, typename P>
+void test_2d_t()
+{
+ test_point_2d<T, P>();
+ test_box_2d<T, P>();
+ test_linestring_2d<T, P>();
+}
+
+template <typename P>
+void test_2d()
+{
+ test_2d_t<int, P>();
+ test_2d_t<float, P>();
+ test_2d_t<double, P>();
+}
+
+template <typename T, typename P>
+void test_3d_t()
+{
+ test_linestring_3d<T, P>();
+// test_point_3d<T, test_point>();
+}
+
+template <typename P>
+void test_3d()
+{
+ test_3d_t<int, P>();
+ test_3d_t<float, P>();
+ test_3d_t<double, P>();
+}
+
+int test_main(int, char* [])
+{
+ //test_2d<int[2]>();
+ //test_2d<float[2]>();
+ //test_2d<double[2]>();
+ test_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_3d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+#endif
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/maximum_gap.cpp b/src/boost/libs/geometry/test/algorithms/maximum_gap.cpp
new file mode 100644
index 000000000..d73e4b04a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/maximum_gap.cpp
@@ -0,0 +1,139 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_maximum_gap
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <cstddef>
+
+#include <iostream>
+#include <sstream>
+#include <vector>
+
+#include <boost/geometry/algorithms/detail/max_interval_gap.hpp>
+
+namespace bg = boost::geometry;
+
+class uint_interval
+{
+public:
+ typedef unsigned value_type;
+ typedef int difference_type;
+
+ uint_interval(unsigned left, unsigned right)
+ : m_left(left)
+ , m_right(right)
+ {}
+
+ template <std::size_t Index>
+ value_type get() const
+ {
+ return (Index == 0) ? m_left : m_right;
+ }
+
+ difference_type length() const
+ {
+ return static_cast<int>(m_right) - static_cast<int>(m_left);
+ }
+
+private:
+ unsigned m_left, m_right;
+};
+
+struct uint_intervals
+ : public std::vector<uint_interval>
+{
+ uint_intervals()
+ {}
+
+ uint_intervals(unsigned left, unsigned right)
+ {
+ this->push_back(uint_interval(left, right));
+ }
+
+ uint_intervals & operator()(unsigned left, unsigned right)
+ {
+ this->push_back(uint_interval(left, right));
+ return *this;
+ }
+};
+
+std::ostream& operator<<(std::ostream& os, uint_interval const& interval)
+{
+ os << "[" << interval.get<0>() << ", " << interval.get<1>() << "]";
+ return os;
+}
+
+
+template <typename RangeOfIntervals>
+inline void test_one(std::string const& case_id,
+ RangeOfIntervals const& intervals,
+ typename boost::range_value
+ <
+ RangeOfIntervals
+ >::type::difference_type expected_gap)
+{
+ typedef typename boost::range_value<RangeOfIntervals>::type interval_type;
+ typedef typename interval_type::difference_type gap_type;
+
+ gap_type gap = bg::maximum_gap(intervals);
+
+ std::ostringstream stream;
+ for (typename boost::range_const_iterator<RangeOfIntervals>::type
+ it = boost::const_begin(intervals);
+ it != boost::const_end(intervals);
+ ++it)
+ {
+ stream << " " << *it;
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "intervals:" << stream.str() << std::endl;
+ std::cout << "gap found? " << ((gap > 0) ? "yes" : "no") << std::endl;
+ std::cout << "max gap length: " << gap << std::endl;
+ std::cout << std::endl << std::endl;
+#endif
+
+ BOOST_CHECK_MESSAGE(gap == expected_gap,
+ case_id << "; intervals: "
+ << stream.str()
+ << "; expected: " << expected_gap
+ << ", detected: " << gap);
+}
+
+BOOST_AUTO_TEST_CASE( test_maximum_gap )
+{
+ uint_intervals intervals;
+
+ intervals = uint_intervals(3,4)(1,10)(5,11)(20,35)(12,14)(36,40)(39,41)(35,36)(37,37)(50,50)(50,51);
+ test_one("case_01", intervals, 9);
+
+ intervals = uint_intervals(3,4)(1,10)(5,11)(20,35)(52,60)(12,14)(36,40)(39,41)(35,36)(37,37)(55,56);
+ test_one("case_02", intervals, 11);
+
+ intervals = uint_intervals(3,4);
+ test_one("case_03", intervals, 0);
+
+ intervals = uint_intervals(3,4)(15,15);
+ test_one("case_04", intervals, 11);
+
+ intervals = uint_intervals(3,14)(5,5)(5,6);
+ test_one("case_05", intervals, 0);
+
+ intervals = uint_intervals(3,10)(15,15)(15,18)(15,16);
+ test_one("case_06", intervals, 5);
+
+ intervals = uint_intervals(38,41)(3,10)(15,15)(15,18)(15,16)(20,30)(22,30)(23,30);
+ test_one("case_07", intervals, 8);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/num_geometries.cpp b/src/boost/libs/geometry/test/algorithms/num_geometries.cpp
new file mode 100644
index 000000000..7c8589f87
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_geometries.cpp
@@ -0,0 +1,151 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_num_geometries
+#endif
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/algorithms/num_geometries.hpp>
+
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+namespace bg = boost::geometry;
+
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+typedef bg::model::linestring<point> linestring;
+typedef bg::model::segment<point> segment;
+typedef bg::model::box<point> box;
+typedef bg::model::ring<point> ring;
+typedef bg::model::polygon<point> polygon;
+typedef bg::model::multi_point<point> multi_point;
+typedef bg::model::multi_linestring<linestring> multi_linestring;
+typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+
+template <typename Geometry>
+struct test_num_geometries
+{
+ static inline void apply(Geometry const& geometry,
+ std::size_t expected)
+ {
+ std::size_t detected = bg::num_geometries(geometry);
+ BOOST_CHECK_MESSAGE( detected == expected,
+ "Expected: " << expected
+ << " detected: " << detected
+ << " wkt: " << bg::wkt(geometry) );
+ }
+
+ static inline void apply(std::string const& wkt,
+ std::size_t expected)
+ {
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ apply(geometry, expected);
+ }
+};
+
+BOOST_AUTO_TEST_CASE( test_point )
+{
+ test_num_geometries<point>::apply("POINT(0 0)", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_segment )
+{
+ test_num_geometries<segment>::apply("SEGMENT(0 0,1 1)", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_box )
+{
+ test_num_geometries<box>::apply("BOX(0 0,1 1)", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_linestring )
+{
+ test_num_geometries<linestring>::apply("LINESTRING(0 0,1 1,2 2)", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipoint )
+{
+ typedef test_num_geometries<multi_point> tester;
+
+ tester::apply("MULTIPOINT()", 0);
+ tester::apply("MULTIPOINT(0 0)", 1);
+ tester::apply("MULTIPOINT(0 0,0 0)", 2);
+ tester::apply("MULTIPOINT(0 0,0 0,1 1)", 3);
+}
+
+BOOST_AUTO_TEST_CASE( test_multilinestring )
+{
+ typedef test_num_geometries<multi_linestring> tester;
+
+ tester::apply("MULTILINESTRING()", 0);
+ tester::apply("MULTILINESTRING((0 0,1 0))", 1);
+ tester::apply("MULTILINESTRING((0 0,1 0,0 1),(0 0,1 0,0 1,0 0))", 2);
+ tester::apply("MULTILINESTRING((),(),(0 0,1 0))", 3);
+}
+
+BOOST_AUTO_TEST_CASE( test_ring )
+{
+ test_num_geometries<ring>::apply("POLYGON((0 0,1 0,0 1,0 0))", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_polygon )
+{
+ typedef test_num_geometries<polygon> tester;
+
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0))", 1);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1,2 1,1 1))", 1);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5))", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipolygon )
+{
+ typedef test_num_geometries<multi_polygon> tester;
+
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)))", 1);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)))", 1);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101)))", 2);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101),(105 105,106 105,106 106,105 106,105 105)))", 2);
+}
+
+BOOST_AUTO_TEST_CASE( test_variant )
+{
+ typedef boost::variant
+ <
+ linestring, multi_linestring
+ > variant_geometry_type;
+
+ typedef test_num_geometries<variant_geometry_type> tester;
+
+ linestring ls;
+ bg::read_wkt("LINESTRING(0 0,1 1,2 2)", ls);
+
+ multi_linestring mls;
+ bg::read_wkt("MULTILINESTRING((0 0,1 1,2 2),(3 3,4 4),(5 5,6 6,7 7,8 8))",
+ mls);
+
+ variant_geometry_type variant_geometry;
+
+ variant_geometry = ls;
+ tester::apply(variant_geometry, 1);
+
+ variant_geometry = mls;
+ tester::apply(variant_geometry, 3);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/num_geometries_multi.cpp b/src/boost/libs/geometry/test/algorithms/num_geometries_multi.cpp
new file mode 100644
index 000000000..9c18a9618
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_geometries_multi.cpp
@@ -0,0 +1,57 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/num_geometries.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::size_t expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ std::size_t detected = bg::num_geometries(geometry);
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "num_geometries: " << wkt
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> poly;
+ typedef bg::model::linestring<Point> ls;
+ typedef bg::model::multi_point<Point> mpoint;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<Point>("POINT(0 0)", 1);
+ test_geometry<ls>("LINESTRING(0 0,0 1)", 1);
+ test_geometry<poly>("POLYGON((0 0,0 1,1 0,0 0))", 1);
+ test_geometry<mpoint>("MULTIPOINT((0 0),(0 1),(1 0),(0 0))", 4);
+ test_geometry<mls>("MULTILINESTRING((0 0,0 1),(1 0,0 0))", 2);
+ test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))", 2);
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/num_interior_rings.cpp b/src/boost/libs/geometry/test/algorithms/num_interior_rings.cpp
new file mode 100644
index 000000000..8b78ed7de
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_interior_rings.cpp
@@ -0,0 +1,153 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_num_interior_rings
+#endif
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+namespace bg = boost::geometry;
+
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+typedef bg::model::linestring<point> linestring;
+typedef bg::model::segment<point> segment;
+typedef bg::model::box<point> box;
+typedef bg::model::ring<point> ring;
+typedef bg::model::polygon<point> polygon;
+typedef bg::model::multi_point<point> multi_point;
+typedef bg::model::multi_linestring<linestring> multi_linestring;
+typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+
+template <typename Geometry>
+struct test_num_interior_rings
+{
+ static inline void apply(Geometry const& geometry,
+ std::size_t expected)
+ {
+ std::size_t detected = bg::num_interior_rings(geometry);
+ BOOST_CHECK_MESSAGE( detected == expected,
+ "Expected: " << expected
+ << " detected: " << detected
+ << " wkt: " << bg::wkt(geometry) );
+ }
+
+ static inline void apply(std::string const& wkt,
+ std::size_t expected)
+ {
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ apply(geometry, expected);
+ }
+};
+
+BOOST_AUTO_TEST_CASE( test_point )
+{
+ test_num_interior_rings<point>::apply("POINT(0 0)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_segment )
+{
+ test_num_interior_rings<segment>::apply("SEGMENT(0 0,1 1)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_box )
+{
+ test_num_interior_rings<box>::apply("BOX(0 0,1 1)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_linestring )
+{
+ test_num_interior_rings<linestring>::apply("LINESTRING(0 0,1 1)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipoint )
+{
+ test_num_interior_rings<multi_point>::apply("MULTIPOINT(0 0,1 1)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_multilinestring )
+{
+ test_num_interior_rings
+ <
+ multi_linestring
+ >::apply("MULTILINESTRING((0 0,1 0,0 1),(0 0,1 0,0 1,0 0))", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_ring )
+{
+ typedef test_num_interior_rings<ring> tester;
+
+ tester::apply("POLYGON((0 0,1 0,0 1,0 0))", 0);
+ tester::apply("POLYGON((0 0,1 0,1 0,0 1,0 0))", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_polygon )
+{
+ typedef test_num_interior_rings<polygon> tester;
+
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0))", 0);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1,2 1,1 2,1 1))", 1);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5))", 2);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipolygon )
+{
+ typedef test_num_interior_rings<multi_polygon> tester;
+
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))", 0);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)))", 1);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)))", 2);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101)))", 2);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101),(105 105,106 105,106 106,105 106,105 105)))", 4);
+}
+
+BOOST_AUTO_TEST_CASE( test_variant )
+{
+ typedef boost::variant
+ <
+ linestring, polygon, multi_polygon
+ > variant_geometry_type;
+
+ typedef test_num_interior_rings<variant_geometry_type> tester;
+
+ linestring ls;
+ bg::read_wkt("LINESTRING(0 0,1 1,2 2)", ls);
+
+ polygon poly;
+ bg::read_wkt("POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1))", poly);
+
+ multi_polygon mpoly;
+ bg::read_wkt("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,2 1,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)))", mpoly);
+
+ variant_geometry_type variant_geometry;
+
+ variant_geometry = ls;
+ tester::apply(variant_geometry, 0);
+
+ variant_geometry = poly;
+ tester::apply(variant_geometry, 1);
+
+ variant_geometry = mpoly;
+ tester::apply(variant_geometry, 2);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/num_interior_rings_multi.cpp b/src/boost/libs/geometry/test/algorithms/num_interior_rings_multi.cpp
new file mode 100644
index 000000000..2ad958d81
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_interior_rings_multi.cpp
@@ -0,0 +1,50 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::size_t expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ std::size_t detected = bg::num_interior_rings(geometry);
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "num_interior_rings: " << wkt
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<poly>("POLYGON((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1))", 1);
+ test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1)),((0 0,0 10,10 0,0 0),(1 1,1 4,4 1,1 1),(5 1,5 4,9 1,5 1)))", 3);
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/num_points.cpp b/src/boost/libs/geometry/test/algorithms/num_points.cpp
new file mode 100644
index 000000000..6d24f43f0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_points.cpp
@@ -0,0 +1,94 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+template <std::size_t D, typename T = double>
+struct box_dD
+{
+ typedef boost::geometry::model::box
+ <
+ boost::geometry::model::point<T, D, boost::geometry::cs::cartesian>
+ > type;
+};
+
+template <typename Geometry>
+inline void test_num_points(std::string const& wkt,
+ std::size_t expected,
+ std::size_t expected_add_for_open)
+{
+ namespace bg = boost::geometry;
+ Geometry geometry;
+ boost::geometry::read_wkt(wkt, geometry);
+ std::size_t detected = bg::num_points(geometry);
+ BOOST_CHECK_EQUAL(expected, detected);
+ detected = bg::num_points(geometry, false);
+ BOOST_CHECK_EQUAL(expected, detected);
+ detected = bg::num_points(geometry, true);
+ BOOST_CHECK_EQUAL(expected_add_for_open, detected);
+}
+
+template <typename Geometry>
+inline void test_num_points(std::string const& wkt, std::size_t expected)
+{
+ test_num_points<Geometry>(wkt, expected, expected);
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double,2,bg::cs::cartesian> point;
+ typedef bg::model::linestring<point> linestring;
+ typedef bg::model::segment<point> segment;
+ typedef bg::model::box<point> box;
+ typedef bg::model::ring<point> ring;
+ typedef bg::model::polygon<point> polygon;
+ typedef bg::model::multi_point<point> multi_point;
+ typedef bg::model::multi_linestring<linestring> multi_linestring;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ // open geometries
+ typedef bg::model::ring<point, true, false> open_ring;
+ typedef bg::model::polygon<point, true, false> open_polygon;
+ typedef bg::model::multi_polygon<open_polygon> open_multi_polygon;
+
+ test_num_points<point>("POINT(0 0)", 1u);
+ test_num_points<linestring>("LINESTRING(0 0,1 1)", 2u);
+ test_num_points<segment>("LINESTRING(0 0,1 1)", 2u);
+ test_num_points<box>("POLYGON((0 0,10 10))", 4u);
+ test_num_points<box_dD<3>::type>("BOX(0 0 0,1 1 1)", 8u);
+ test_num_points<box_dD<4>::type>("BOX(0 0 0 0,1 1 1 1)", 16u);
+ test_num_points<box_dD<5>::type>("BOX(0 0 0 0 0,1 1 1 1 1)", 32u);
+ test_num_points<ring>("POLYGON((0 0,1 1,0 1,0 0))", 4u);
+ test_num_points<polygon>("POLYGON((0 0,10 10,0 10,0 0))", 4u);
+ test_num_points<polygon>("POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))", 10u);
+ test_num_points<multi_point>("MULTIPOINT((0 0),(1 1))", 2u);
+ test_num_points<multi_linestring>("MULTILINESTRING((0 0,1 1),(2 2,3 3,4 4))", 5u);
+ test_num_points<multi_polygon>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 10,1 10,1 9,0 10)))", 9u);
+
+ // test open geometries
+ test_num_points<open_ring>("POLYGON((0 0,1 1,0 1))", 3u, 4u);
+ test_num_points<open_ring>("POLYGON((0 0,1 1,0 1,0 0))", 3u, 4u);
+ test_num_points<open_polygon>("POLYGON((0 0,10 10,0 10))", 3u, 4u);
+ test_num_points<open_polygon>("POLYGON((0 0,10 10,0 10,0 0))", 3u, 4u);
+ test_num_points<open_multi_polygon>("MULTIPOLYGON(((0 0,0 10,10 10,10 0)),((0 10,1 10,1 9)))", 7u, 9u);
+ test_num_points<open_multi_polygon>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 10,1 10,1 9,0 10)))", 7u, 9u);
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/num_points_multi.cpp b/src/boost/libs/geometry/test/algorithms/num_points_multi.cpp
new file mode 100644
index 000000000..dd96bf3a4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_points_multi.cpp
@@ -0,0 +1,70 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/num_points.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/variant/variant.hpp>
+
+
+template <typename Geometry>
+void check_geometry(Geometry const& geometry, std::string const& wkt, std::size_t expected)
+{
+ std::size_t detected = bg::num_points(geometry);
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "num_points: " << wkt
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, int expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ check_geometry(geometry, wkt, expected);
+ check_geometry(boost::variant<Geometry>(geometry), wkt, expected);
+}
+
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> poly;
+ typedef bg::model::linestring<Point> ls;
+ typedef bg::model::multi_point<Point> mpoint;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<Point>("POINT(0 0)", 1);
+ test_geometry<ls>("LINESTRING(0 0,0 1)", 2);
+ test_geometry<poly>("POLYGON((0 0,0 1,1 0,0 0))", 4);
+ test_geometry<mpoint>("MULTIPOINT((0 0),(0 1),(1 0),(0 0))", 4);
+ test_geometry<mls>("MULTILINESTRING((0 0,0 1),(1 0,0 0))", 4);
+ test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))", 8);
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/num_segments.cpp b/src/boost/libs/geometry/test/algorithms/num_segments.cpp
new file mode 100644
index 000000000..f6f0ddbf1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/num_segments.cpp
@@ -0,0 +1,291 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_num_segments
+#endif
+
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/algorithms/num_segments.hpp>
+
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+namespace bg = boost::geometry;
+
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+typedef bg::model::linestring<point> linestring;
+typedef bg::model::segment<point> segment;
+typedef bg::model::box<point> box;
+typedef bg::model::ring<point, true, true> ring_cw_closed;
+typedef bg::model::ring<point, true, false> ring_cw_open;
+typedef bg::model::ring<point, false, true> ring_ccw_closed;
+typedef bg::model::ring<point, false, false> ring_ccw_open;
+typedef bg::model::polygon<point, true, true> polygon_cw_closed;
+typedef bg::model::polygon<point, true, false> polygon_cw_open;
+typedef bg::model::polygon<point, false, true> polygon_ccw_closed;
+typedef bg::model::polygon<point, false, false> polygon_ccw_open;
+typedef bg::model::multi_point<point> multi_point;
+typedef bg::model::multi_linestring<linestring> multi_linestring;
+typedef bg::model::multi_polygon<polygon_cw_closed> multi_polygon_cw_closed;
+typedef bg::model::multi_polygon<polygon_cw_open> multi_polygon_cw_open;
+typedef bg::model::multi_polygon<polygon_ccw_closed> multi_polygon_ccw_closed;
+typedef bg::model::multi_polygon<polygon_ccw_open> multi_polygon_ccw_open;
+
+template <std::size_t D, typename T = double>
+struct box_dD
+{
+ typedef boost::geometry::model::box
+ <
+ boost::geometry::model::point<T, D, boost::geometry::cs::cartesian>
+ > type;
+};
+
+template <typename Geometry, typename Tag = typename bg::tag<Geometry>::type>
+struct test_num_segments
+{
+ static inline void apply(Geometry const& geometry, std::size_t expected)
+ {
+ std::size_t detected = bg::num_segments(geometry);
+ BOOST_CHECK_MESSAGE( detected == expected,
+ "Expected: " << expected
+ << " detected: " << detected
+ << " wkt: " << bg::wkt(geometry) );
+ }
+
+ static inline void apply(std::string const& wkt, std::size_t expected)
+ {
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ apply(geometry, expected);
+ }
+};
+
+template <typename Box>
+struct test_num_segments<Box, bg::box_tag>
+{
+ static inline void apply(Box const& box, std::size_t expected)
+ {
+ std::size_t detected = bg::num_segments(box);
+ BOOST_CHECK_MESSAGE( detected == expected,
+ "Expected: " << expected
+ << " detected: " << detected
+ << " dsv: " << bg::dsv(box) );
+ }
+
+ static inline void apply(std::string const& wkt, std::size_t expected)
+ {
+ Box box;
+ bg::read_wkt(wkt, box);
+ apply(box, expected);
+ }
+};
+
+BOOST_AUTO_TEST_CASE( test_point )
+{
+ test_num_segments<point>::apply("POINT(0 0)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_segment )
+{
+ test_num_segments<segment>::apply("SEGMENT(0 0,1 1)", 1);
+}
+
+BOOST_AUTO_TEST_CASE( test_box )
+{
+ test_num_segments<box>::apply("BOX(0 0,1 1)", 4);
+
+ // test higher-dimensional boxes
+ test_num_segments<box_dD<3>::type>::apply("BOX(0 0 0,1 1 1)", 12);
+ test_num_segments<box_dD<4>::type>::apply("BOX(0 0 0 0,1 1 1 1)", 32);
+ test_num_segments<box_dD<5>::type>::apply("BOX(0 0 0 0 0,1 1 1 1 1)", 80);
+}
+
+BOOST_AUTO_TEST_CASE( test_linestring )
+{
+ typedef test_num_segments<linestring> tester;
+
+ tester::apply("LINESTRING()", 0);
+ tester::apply("LINESTRING(0 0)", 0);
+ tester::apply("LINESTRING(0 0,0 0)", 1);
+ tester::apply("LINESTRING(0 0,0 0,1 1)", 2);
+ tester::apply("LINESTRING(0 0,0 0,0 0,1 1)", 3);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipoint )
+{
+ typedef test_num_segments<multi_point> tester;
+
+ tester::apply("MULTIPOINT()", 0);
+ tester::apply("MULTIPOINT(0 0)", 0);
+ tester::apply("MULTIPOINT(0 0,0 0)", 0);
+ tester::apply("MULTIPOINT(0 0,0 0,1 1)", 0);
+}
+
+BOOST_AUTO_TEST_CASE( test_multilinestring )
+{
+ typedef test_num_segments<multi_linestring> tester;
+
+ tester::apply("MULTILINESTRING()", 0);
+ tester::apply("MULTILINESTRING((),(0 0))", 0);
+ tester::apply("MULTILINESTRING((0 0))", 0);
+ tester::apply("MULTILINESTRING((0 0,1 0))", 1);
+ tester::apply("MULTILINESTRING((),(),(0 0,1 0))", 1);
+ tester::apply("MULTILINESTRING((0 0,1 0,0 1),(0 0,1 0,0 1,0 0))", 5);
+}
+
+template <typename OpenRing>
+void test_open_ring()
+{
+ typedef test_num_segments<OpenRing> tester;
+
+ tester::apply("POLYGON(())", 0);
+ tester::apply("POLYGON((0 0))", 0);
+ tester::apply("POLYGON((0 0,1 0))", 2);
+ tester::apply("POLYGON((0 0,1 0,0 1))", 3);
+ tester::apply("POLYGON((0 0,0 0,1 0,0 1))", 4);
+}
+
+template <typename ClosedRing>
+void test_closed_ring()
+{
+ typedef test_num_segments<ClosedRing> tester;
+
+ tester::apply("POLYGON(())", 0);
+ tester::apply("POLYGON((0 0))", 0);
+ tester::apply("POLYGON((0 0,0 0))", 1);
+ tester::apply("POLYGON((0 0,1 0,0 0))", 2);
+ tester::apply("POLYGON((0 0,1 0,0 1,0 0))", 3);
+ tester::apply("POLYGON((0 0,1 0,1 0,0 1,0 0))", 4);
+}
+
+BOOST_AUTO_TEST_CASE( test_ring )
+{
+ test_open_ring<ring_ccw_open>();
+ test_open_ring<ring_cw_open>();
+ test_closed_ring<ring_ccw_closed>();
+ test_closed_ring<ring_cw_closed>();
+}
+
+template <typename OpenPolygon>
+void test_open_polygon()
+{
+ typedef test_num_segments<OpenPolygon> tester;
+
+ tester::apply("POLYGON(())", 0);
+ tester::apply("POLYGON((0 0))", 0);
+ tester::apply("POLYGON((0 0,10 0),(0 0))", 2);
+ tester::apply("POLYGON((0 0,10 0),(1 1,2 1))", 4);
+ tester::apply("POLYGON((0 0,10 0,0 10))", 3);
+ tester::apply("POLYGON((0 0,10 0,0 10),())", 3);
+ tester::apply("POLYGON((0 0,10 0,0 10),(1 1))", 3);
+ tester::apply("POLYGON((0 0,10 0,0 10),(1 1,2 1))", 5);
+ tester::apply("POLYGON((0 0,10 0,0 10),(1 1,2 1,1 2))", 6);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,1 2))", 7);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,2 2,1 2))", 8);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10),(1 1,2 1,2 2,1 2),(5 5,6 5,6 6,5 6))", 12);
+}
+
+template <typename ClosedPolygon>
+void test_closed_polygon()
+{
+ typedef test_num_segments<ClosedPolygon> tester;
+
+ tester::apply("POLYGON(())", 0);
+ tester::apply("POLYGON((0 0))", 0);
+ tester::apply("POLYGON((0 0,10 0,0 0),(0 0))", 2);
+ tester::apply("POLYGON((0 0,10 0,0 0),(1 1,2 1,1 1))", 4);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0))", 3);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),())", 3);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1))", 3);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1,2 1,1 1))", 5);
+ tester::apply("POLYGON((0 0,10 0,0 10,0 0),(1 1,2 1,1 2,1 1))", 6);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1))", 7);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1))", 8);
+ tester::apply("POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5))", 12);
+}
+
+BOOST_AUTO_TEST_CASE( test_polygon )
+{
+ test_open_polygon<polygon_ccw_open>();
+ test_open_polygon<polygon_cw_open>();
+ test_closed_polygon<polygon_ccw_closed>();
+ test_closed_polygon<polygon_cw_closed>();
+}
+
+template <typename OpenMultiPolygon>
+void test_open_multipolygon()
+{
+ typedef test_num_segments<OpenMultiPolygon> tester;
+
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,1 2)))", 7);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,2 2,1 2),(5 5,6 5,6 6,5 6)))", 12);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,1 2)),((100 100,110 100,110 110),(101 101,102 101,102 102)))", 13);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10),(1 1,2 1,2 2,1 2),(5 5,6 5,6 6,5 6)),((100 100,110 100,110 110),(101 101,102 101,102 102),(105 105,106 105,106 106,105 106)))", 22);
+}
+
+template <typename ClosedMultiPolygon>
+void test_closed_multipolygon()
+{
+ typedef test_num_segments<ClosedMultiPolygon> tester;
+
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)))", 7);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)))", 12);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101)))", 13);
+ tester::apply("MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,2 2,1 2,1 1),(5 5,6 5,6 6,5 6,5 5)),((100 100,110 100,110 110,100 100),(101 101,102 101,102 102,101 101),(105 105,106 105,106 106,105 106,105 105)))", 22);
+}
+
+BOOST_AUTO_TEST_CASE( test_multipolygon )
+{
+ test_open_multipolygon<multi_polygon_ccw_open>();
+ test_open_multipolygon<multi_polygon_cw_open>();
+ test_closed_multipolygon<multi_polygon_ccw_closed>();
+ test_closed_multipolygon<multi_polygon_cw_closed>();
+}
+
+BOOST_AUTO_TEST_CASE( test_variant )
+{
+ typedef boost::variant
+ <
+ linestring, polygon_cw_open, polygon_cw_closed
+ > variant_geometry_type;
+
+ typedef test_num_segments<variant_geometry_type> tester;
+
+ linestring ls;
+ bg::read_wkt("LINESTRING(0 0,1 1,2 2)", ls);
+
+ polygon_cw_open p_open;
+ bg::read_wkt("POLYGON((0 0,0 1,1 0))", p_open);
+
+ polygon_cw_closed p_closed;
+ bg::read_wkt("POLYGON((0 0,0 1,1 1,1 0,0 0))", p_closed);
+
+ variant_geometry_type variant_geometry;
+
+ variant_geometry = ls;
+ tester::apply(variant_geometry, 2);
+
+ variant_geometry = p_open;
+ tester::apply(variant_geometry, 3);
+
+ variant_geometry = p_closed;
+ tester::apply(variant_geometry, 4);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlaps/Jamfile b/src/boost/libs/geometry/test/algorithms/overlaps/Jamfile
new file mode 100644
index 000000000..ec744c76c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlaps/Jamfile
@@ -0,0 +1,24 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-overlaps
+ :
+ [ run overlaps.cpp : : : : algorithms_overlaps ]
+ [ run overlaps_areal.cpp : : : : algorithms_overlaps_areal ]
+ [ run overlaps_box.cpp : : : : algorithms_overlaps_box ]
+ [ run overlaps_sph.cpp : : : : algorithms_overlaps_sph ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/algorithms/overlaps/overlaps.cpp b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps.cpp
new file mode 100644
index 000000000..b305edb5b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps.cpp
@@ -0,0 +1,63 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2015, 2017.
+// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_overlaps.hpp"
+
+template <typename P>
+void test_pp()
+{
+ typedef bg::model::multi_point<P> mpt;
+
+ test_geometry<P, P>("POINT(0 0)", "POINT(0 0)", false);
+ test_geometry<P, P>("POINT(0 0)", "POINT(1 1)", false);
+
+ test_geometry<P, mpt>("POINT(0 0)", "MULTIPOINT(0 0, 1 1)", false);
+
+ test_geometry<mpt, P>("MULTIPOINT(0 0, 1 1)", "POINT(0 0)", false);
+
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0,1 1,2 2)", "MULTIPOINT(1 1,3 3,4 4)", true);
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0,1 1,2 2)", "MULTIPOINT(1 1,2 2)", false);
+}
+
+template <typename P>
+void test_ll()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 1)", "LINESTRING(1 1,2 2,4 4)", true);
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,4 0)", "LINESTRING(0 1,2 1,3 2)", false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,2 2,3 1)", "MULTILINESTRING((1 1,2 2),(2 2,4 4))", true);
+ test_geometry<ls, mls>("LINESTRING(0 0,2 2,3 1)", "MULTILINESTRING((1 1,2 2),(3 3,4 4))", true);
+ test_geometry<ls, mls>("LINESTRING(0 0,3 3,3 1)", "MULTILINESTRING((3 3,2 2),(0 0,1 1))", false);
+}
+
+template <typename P>
+void test_2d()
+{
+ test_pp<P>();
+ test_ll<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_2d<bg::model::d2::point_xy<int> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_areal.cpp b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_areal.cpp
new file mode 100644
index 000000000..c7361f203
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_areal.cpp
@@ -0,0 +1,73 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_overlaps.hpp"
+
+template <typename P>
+void test_aa()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<poly, poly>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((3 3,3 9,9 9,9 3,3 3))", true);
+ test_geometry<poly, poly>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((5 5,5 9,9 9,9 5,5 5))", false);
+ test_geometry<poly, poly>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((3 3,3 5,5 5,5 3,3 3))", false);
+
+ test_geometry<poly, mpoly>("POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "MULTIPOLYGON(((3 3,3 5,5 5,5 3,3 3)),((5 5,5 6,6 6,6 5,5 5)))",
+ true);
+ test_geometry<mpoly, mpoly>("MULTIPOLYGON(((3 3,3 5,5 5,5 3,3 3)),((0 0,0 3,3 3,3 0,0,0)))",
+ "MULTIPOLYGON(((3 3,3 5,5 5,5 3,3 3)),((5 5,5 6,6 6,6 5,5 5)))",
+ true);
+
+ // related to https://svn.boost.org/trac/boost/ticket/10912
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ "POLYGON((3 3,3 9,9 9,9 3,3 3))",
+ true);
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2),(6 6,8 6,8 8,6 8,6 6))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ true);
+
+ test_geometry<mpoly, poly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ false);
+ test_geometry<mpoly, poly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+
+ // mysql 21872795
+ test_geometry<poly, poly>("POLYGON((2 2,2 8,8 8,8 2,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 8,4 6,4 4,8 8))",
+ true);
+ test_geometry<poly, poly>("POLYGON((2 2,2 8,8 8,8 2,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 4,4 6,2 2))",
+ true);
+}
+
+template <typename P>
+void test_2d()
+{
+ test_aa<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_2d<bg::model::d2::point_xy<int> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_box.cpp b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_box.cpp
new file mode 100644
index 000000000..b58cfa967
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_box.cpp
@@ -0,0 +1,65 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_overlaps.hpp"
+
+template <typename P>
+void test_box_box_2d()
+{
+#if defined(BOOST_GEOMETRY_COMPILE_FAIL)
+ test_geometry<P, P>("POINT(1 1)", "POINT(1 1)", true);
+#endif
+
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1, 3 3)", "BOX(0 0,2 2)", true);
+
+ // touch -> false
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1, 3 3)", "BOX(3 3,5 5)", false);
+
+ // disjoint -> false
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1, 3 3)", "BOX(4 4,6 6)", false);
+
+ // within -> false
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1, 5 5)", "BOX(2 2,3 3)", false);
+
+ // within+touch -> false
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1, 5 5)", "BOX(2 2,5 5)", false);
+}
+
+template <typename P>
+void test_3d()
+{
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1 1, 3 3 3)", "BOX(0 0 0,2 2 2)", true);
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1 1, 3 3 3)", "BOX(3 3 3,5 5 5)", false);
+ test_geometry<bg::model::box<P>, bg::model::box<P> >("BOX(1 1 1, 3 3 3)", "BOX(4 4 4,6 6 6)", false);
+}
+
+
+template <typename P>
+void test_2d()
+{
+ test_box_box_2d<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_2d<bg::model::d2::point_xy<int> >();
+ test_2d<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ //test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_sph.cpp b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_sph.cpp
new file mode 100644
index 000000000..79478ad3d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlaps/overlaps_sph.cpp
@@ -0,0 +1,153 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_overlaps.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ true);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ true);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ true);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ true);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ false);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ false);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ true);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ true);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ false);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ false);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ false);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ false);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ false);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ true);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ false);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ false);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ false);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ false);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ false);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ true);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ true);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ true);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", false);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false);
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ true);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ true);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlaps/test_overlaps.hpp b/src/boost/libs/geometry/test/algorithms/overlaps/test_overlaps.hpp
new file mode 100644
index 000000000..7d6686986
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlaps/test_overlaps.hpp
@@ -0,0 +1,94 @@
+// Generic Geometry2 Library
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015, 2017.
+// Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_OVERLAPS_HPP
+#define BOOST_GEOMETRY_TEST_OVERLAPS_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/algorithms/overlaps.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_overlaps(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::overlaps(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_overlaps(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::overlaps(geometry1, geometry2);
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void test_geometry(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_overlaps(geometry1, geometry2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "overlaps: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ detected = call_overlaps(geometry2, geometry1, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "overlaps: " << wkt2
+ << " with " << wkt1
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ test_geometry(geometry1, geometry2, wkt1, wkt2, expected, no_strategy());
+
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+
+ test_geometry(geometry1, geometry2, wkt1, wkt2, expected, strategy_type());
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/Jamfile b/src/boost/libs/geometry/test/algorithms/overlay/Jamfile
new file mode 100644
index 000000000..be413b335
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/Jamfile
@@ -0,0 +1,38 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016, 2017.
+# Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-overlay
+ :
+ [ run assemble.cpp : : : : algorithms_assemble ]
+ [ run get_turn_info.cpp : : : : algorithms_get_turn_info ]
+ [ run get_turns.cpp : : : : algorithms_get_turns ]
+ [ run get_turns_areal_areal.cpp : : : : algorithms_get_turns_areal_areal ]
+ [ run get_turns_areal_areal_sph.cpp : : : : algorithms_get_turns_areal_areal_sph ]
+ [ run get_turns_linear_areal.cpp : : : : algorithms_get_turns_linear_areal ]
+ [ run get_turns_linear_areal_sph.cpp : : : : algorithms_get_turns_linear_areal_sph ]
+ [ run get_turns_linear_linear.cpp : : : : algorithms_get_turns_linear_linear ]
+ [ run get_turns_linear_linear_geo.cpp : : : : algorithms_get_turns_linear_linear_geo ]
+ [ run get_turns_linear_linear_sph.cpp : : : : algorithms_get_turns_linear_linear_sph ]
+ [ run overlay.cpp : : : : algorithms_overlay ]
+ [ run sort_by_side_basic.cpp : : : : algorithms_sort_by_side_basic ]
+ [ run sort_by_side.cpp : : : : algorithms_sort_by_side ]
+ #[ run handle_touch.cpp : : : : algorithms_handle_touch ]
+ [ run relative_order.cpp : : : : algorithms_relative_order ]
+ [ run select_rings.cpp : : : : algorithms_select_rings ]
+ [ run self_intersection_points.cpp : : : : algorithms_self_intersection_points ]
+ #[ run traverse.cpp : : : : algorithms_traverse ]
+ #[ run traverse_ccw.cpp : : : : algorithms_traverse_ccw ]
+ #[ run traverse_multi.cpp : : : : algorithms_traverse_multi ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/assemble.cpp b/src/boost/libs/geometry/test/algorithms/overlay/assemble.cpp
new file mode 100644
index 000000000..78965692a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/assemble.cpp
@@ -0,0 +1,196 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2019.
+// Modifications copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/union.hpp>
+#include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+template <typename Geometry>
+inline void test_assemble(std::string const& id, Geometry const& p, Geometry const& q, char operation = 'i')
+{
+ std::vector<Geometry> u, i, d1, d2;
+ bg::detail::union_::union_insert<Geometry>(p, q, std::back_inserter(u));
+ bg::detail::intersection::intersection_insert<Geometry>(p, q, std::back_inserter(i));
+ bg::detail::difference::difference_insert<Geometry>(p, q, std::back_inserter(d1));
+ bg::detail::difference::difference_insert<Geometry>(q, p, std::back_inserter(d2));
+
+ if (operation == 'i')
+ {
+ typedef typename bg::default_area_result<Geometry>::type type;
+ type area_p = bg::area(p);
+ type area_q = bg::area(q);
+
+ type area_i = 0, area_u = 0, area_d1 = 0, area_d2 = 0;
+
+ BOOST_FOREACH(Geometry const& g, u)
+ {
+ area_u += bg::area(g);
+ }
+ BOOST_FOREACH(Geometry const& g, i)
+ {
+ area_i += bg::area(g);
+ }
+ BOOST_FOREACH(Geometry const& g, d1)
+ {
+ area_d1 += bg::area(g);
+ }
+ BOOST_FOREACH(Geometry const& g, d2)
+ {
+ area_d2 += bg::area(g);
+ }
+
+ type diff = (area_p + area_q) - area_u - area_i;
+ type diff_d1 = (area_u - area_q) - area_d1;
+ type diff_d2 = (area_u - area_p) - area_d2;
+
+ bool ok = bg::math::abs(diff) < 0.001
+ && bg::math::abs(diff_d1) < 0.001
+ && bg::math::abs(diff_d2) < 0.001;
+
+ BOOST_CHECK_MESSAGE(ok,
+ id << " diff: "
+ << diff << " d1: "
+ << diff_d1 << " d2: "
+ << diff_d2);
+ }
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "assemble_" << id << "_" << operation << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<Geometry>::type> mapper(svg, 500, 500);
+ mapper.add(p);
+ mapper.add(q);
+ mapper.map(p, "fill-opacity:0.3;fill:rgb(51,51,153);stroke:rgb(51,51,153);stroke-width:3");
+ mapper.map(q, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:3");
+ std::string linestyle = "opacity:0.7;fill:none;stroke-opacity:1;stroke-miterlimit:4;";
+
+ std::vector<Geometry> const& v = operation == 'i' ? i
+ : operation == 'u' ? u
+ : operation == 'd' ? d1
+ : d2
+ ;
+
+ BOOST_FOREACH(Geometry const& geometry, v)
+ {
+ mapper.map(geometry,
+ linestyle + "stroke-width:3;stroke-linejoin:round;stroke-linecap:square;stroke-dasharray:12,12;stroke:rgb(255,0,0);");
+ }
+ }
+#endif
+}
+
+template <typename Polygon>
+inline bool int_ok(Polygon const& poly)
+{
+
+ typename bg::point_type<Polygon>::type const& pi =
+ bg::interior_rings(poly)[0].front();
+
+ return bg::within(pi, bg::exterior_ring(poly));
+}
+
+
+template <typename T>
+void generate()
+{
+
+ static std::string exteriors[4] = {
+ "(0 0,0 10,10 10,10 0,0 0)",
+ "(1 1,1 9,8 9,8 1,1 1)",
+ "(2 0.5, 0.5 2,0.5 8,2 9.5,6 9.5,8.5 8,8.5 2,7 0.5,2 0.5)",
+ "(3 3,3 7,6 7,6 3,3 3)"
+ };
+ static std::string interiors[4] = {
+ "(2 2,2 8,7 8,7 2,2 2)",
+ "(8.5 1,8.5 2,9.5 2,9.5 1,8.5 1)",
+ "(4 4,4 5,5 5,5 4,4 4)",
+ "(6 4,6 5,9 5,9 4,6 4)"
+ };
+ for (int pe = 0; pe < 4; pe++)
+ {
+ for (int qe = 0; qe < 4; qe++)
+ {
+ for (int pi = 0; pi < 4; pi++)
+ {
+ for (int qi = 0; qi < 4; qi++)
+ {
+ std::string ps = "POLYGON(" + exteriors[pe] + "," + interiors[pi] + ")";
+ std::string qs = "POLYGON(" + exteriors[qe] + "," + interiors[qi] + ")";
+
+ typedef bg::model::d2::point_xy<T> point_type;
+ bg::model::polygon<point_type> p, q;
+ bg::read_wkt(ps, p);
+ bg::read_wkt(qs, q);
+ bg::correct(p);
+ bg::correct(q);
+ if (! bg::intersects(p)
+ && ! bg::intersects(q)
+ && int_ok(p)
+ && int_ok(q)
+ )
+ {
+ std::ostringstream out;
+ out << pe << qe << pi << qi;
+ test_assemble(out.str(), p, q);
+
+#if defined(TEST_WITH_SVG)
+ test_assemble(out.str(), p, q, 'u');
+ test_assemble(out.str(), p, q, 'd');
+ test_assemble(out.str(), p, q, 'r');
+#endif
+ }
+ }
+ }
+ }
+ }
+}
+
+
+#if ! defined(GEOMETRY_TEST_MULTI)
+int test_main(int, char* [])
+{
+ generate<double>();
+ return 0;
+}
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/debug_sort_by_side_svg.hpp b/src/boost/libs/geometry/test/algorithms/overlay/debug_sort_by_side_svg.hpp
new file mode 100644
index 000000000..71ac7204b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/debug_sort_by_side_svg.hpp
@@ -0,0 +1,123 @@
+// Boost.Geometry
+
+// Copyright (c) 2017 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DEBUG_SORT_BY_SIDE_SVG_HPP
+#define BOOST_GEOMETRY_TEST_DEBUG_SORT_BY_SIDE_SVG_HPP
+
+#include <fstream>
+#include <sstream>
+#include <set>
+
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp>
+
+namespace boost { namespace geometry { namespace debug
+{
+
+
+template <typename Sbs, typename Point, typename Geometry1, typename Geometry2>
+inline void sorted_side_map(std::string const& case_id,
+ Sbs const& sbs, Point const& point,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ int take_turn_index = -1, int take_operation_index = -1)
+{
+
+ // Check number of sources (buffer has only one source)
+ std::set<signed_size_type> sources;
+ for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
+ {
+ const typename Sbs::rp& er = sbs.m_ranked_points[i];
+ sources.insert(er.seg_id.source_index);
+ }
+ std::size_t const source_count = sources.size();
+
+ std::ostringstream filename;
+ filename << "sort_by_side_" << case_id << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ typedef geometry::svg_mapper<Point> mapper_type;
+ typedef geometry::model::referring_segment<Point const> seg;
+
+ mapper_type mapper(svg, 500, 500);
+
+ for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
+ {
+ const typename Sbs::rp& er = sbs.m_ranked_points[i];
+ mapper.add(er.point);
+ }
+
+ if (sources.count(0) > 0)
+ {
+ mapper.map(geometry1, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:0");
+ }
+ if (sources.count(1) > 0)
+ {
+ mapper.map(geometry2, "fill-opacity:0.3;fill:rgb(51,51,153);stroke:rgb(51,51,153);stroke-width:0");
+ }
+
+ const std::string style = "fill:rgb(0,0,0);font-family:Arial;font-size:10px;";
+ for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
+ {
+ const typename Sbs::rp& er = sbs.m_ranked_points[i];
+
+ std::ostringstream out;
+ out << er.rank
+ << " (" << i << ")"
+ << " z=" << er.zone
+ << " " << (er.direction == detail::overlay::sort_by_side::dir_to ? "t" : "f")
+ << " " << er.turn_index
+ << "[" << er.operation_index << "]";
+
+ if (er.direction == detail::overlay::sort_by_side::dir_to)
+ {
+ out << " L=" << er.count_left << " R=" << er.count_right;
+ }
+ else
+ {
+ out << " l=" << er.count_left << " r=" << er.count_right;
+ }
+ out << " " << operation_char(er.operation);
+ if (source_count > 1)
+ {
+ out << " s=" << er.seg_id.source_index;
+ }
+
+ bool left = (i / 2) % 2 == 1;
+ int x_offset = left ? -6 : 6;
+ int y_offset = i % 2 == 0 ? 0 : 10;
+ const std::string align = left ? "text-anchor:end;" : "";
+
+ std::string const source_style
+ = er.seg_id.source_index == 0
+ ? "opacity:0.7;stroke:rgb(0,255,0);stroke-width:4;"
+ : "opacity:0.7;stroke:rgb(0,0,255);stroke-width:4;";
+ mapper.map(seg(point, er.point), source_style);
+
+ if (er.direction == detail::overlay::sort_by_side::dir_to)
+ {
+ if (er.turn_index == take_turn_index
+ && er.operation_index == take_operation_index)
+ {
+ mapper.map(er.point, "opacity:0.7;fill:rgb(255,0,255);", 3);
+ }
+ else
+ {
+ mapper.map(er.point, "opacity:0.7;fill:rgb(0,0,0);", 3);
+ }
+ }
+
+ mapper.text(er.point, out.str(), style + align, x_offset, y_offset);
+ }
+ mapper.map(sbs.m_origin, "opacity:0.9;fill:rgb(255,0,0);", 5);
+}
+
+}}} // namespace boost::geometry::debug
+
+#endif // BOOST_GEOMETRY_TEST_DEBUG_SORT_BY_SIDE_SVG_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/dissolver.cpp b/src/boost/libs/geometry/test/algorithms/overlay/dissolver.cpp
new file mode 100644
index 000000000..c928fa7b3
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/dissolver.cpp
@@ -0,0 +1,217 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/dissolver.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+#include <test_common/test_point.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+# include <boost/geometry/io/svg/write_svg_multi.hpp>
+#endif
+
+// Collection might be a multi-geometry, or std::vector<ring>
+template <typename GeometryOut, typename Collection, typename T>
+void test_dissolve_plusmin(std::string const& caseid, Collection const& input,
+ T const& expected_positive_area,
+ T const& expected_negative_area)
+{
+ typedef typename boost::range_value<GeometryOut>::type geometry_type;
+ typedef typename bg::point_type<geometry_type>::type point_type;
+
+
+ GeometryOut output;
+ bg::dissolver(input, output);
+
+ T zero = T();
+ T positive_area = T();
+ T negative_area = T();
+
+ BOOST_FOREACH(geometry_type const& geometry, output)
+ {
+ T a = bg::area(geometry);
+ if (a > zero)
+ {
+ positive_area += a;
+ }
+ else
+ {
+ negative_area += a;
+ }
+ }
+
+ BOOST_CHECK_CLOSE(positive_area, expected_positive_area, 0.001);
+ BOOST_CHECK_CLOSE(negative_area, expected_negative_area, 0.001);
+
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "dissolve_plusmin_"
+ << caseid << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ typedef typename boost::range_value<Collection>::type value_type;
+ BOOST_FOREACH(value_type const& geometry, input)
+ {
+ mapper.add(geometry);
+ }
+
+ BOOST_FOREACH(value_type const& geometry, input)
+ {
+ mapper.map(geometry,
+ "opacity:0.6;fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:0.5");
+ }
+ BOOST_FOREACH(geometry_type const& geometry, output)
+ {
+ mapper.map(geometry,
+ bg::area(geometry) > 0
+ ? "opacity:0.5;fill:none;stroke:rgb(255,0,0);stroke-width:5"
+ : "opacity:0.5;fill:none;stroke:rgb(0,0,255);stroke-width:5"
+ );
+ }
+ }
+#endif
+
+}
+
+template <typename MultiPolygon, typename T>
+void test_geometry(std::string const& caseid, std::string const& wkt,
+ T const& expected_positive_area,
+ T const& expected_negative_area = T())
+{
+
+ MultiPolygon multi_polygon;
+ bg::read_wkt(wkt, multi_polygon);
+
+ // Test std::vector<Polygon> (= multi_polygon)
+ test_dissolve_plusmin<MultiPolygon>(caseid, multi_polygon,
+ expected_positive_area,
+ expected_negative_area);
+
+ // Test std::vector<ring>
+ {
+ typedef typename boost::range_value<MultiPolygon>::type polygon_type;
+ typedef typename bg::ring_type<MultiPolygon>::type ring_type;
+ std::vector<ring_type> rings;
+ BOOST_FOREACH(polygon_type const& polygon, multi_polygon)
+ {
+ rings.push_back(bg::exterior_ring(polygon));
+ }
+
+ test_dissolve_plusmin<MultiPolygon>(caseid + "_rings", rings,
+ expected_positive_area,
+ expected_negative_area);
+ }
+
+ // Test different combinations
+#define BOOST_GEOMETRY_TEST_PERMUTATIONS
+#ifdef BOOST_GEOMETRY_TEST_PERMUTATIONS
+
+ int n = multi_polygon.size();
+
+ // test them in all orders
+ std::vector<int> indices;
+ for (int i = 0; i < n; i++)
+ {
+ indices.push_back(i);
+ }
+ int permutation = 0;
+ do
+ {
+ std::ostringstream out;
+ out << caseid;
+ MultiPolygon multi_polygon2;
+ for (int i = 0; i < n; i++)
+ {
+ int index = indices[i];
+ out << "_" << index;
+ multi_polygon2.push_back(multi_polygon[index]);
+ }
+ test_dissolve_plusmin<MultiPolygon>(out.str(), multi_polygon2, expected_positive_area,
+ expected_negative_area);
+ } while (std::next_permutation(indices.begin(), indices.end()));
+#endif
+}
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ test_geometry<multi_polygon>("simplex_one",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)))",
+ 7.5);
+
+ test_geometry<multi_polygon>("simplex_two",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((2 2,3 6,6 3,2 2)))",
+ 14.7);
+ test_geometry<multi_polygon>("simplex_three",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((2 2,3 6,6 3,2 2)),((3 4,5 6,6 2,3 4)))",
+ 16.7945);
+ test_geometry<multi_polygon>("simplex_four",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((2 2,3 6,6 3,2 2)),((3 4,5 6,6 2,3 4)),((5 5,7 7,8 4,5 5)))",
+ 20.7581);
+
+ // disjoint
+ test_geometry<multi_polygon>("simplex_disjoint",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((1 6,2 10,5 7,1 6)),((3 4,5 6,6 2,3 4)),((6 5,8 7,9 4,6 5)))",
+ 24.0);
+
+ // new hole of four
+ test_geometry<multi_polygon>("new_hole",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((2 2,3 6,6 3,2 2)),((3 4,5 6,6 2,3 4)),((3 1,5 4,8 4,3 1)))",
+ 19.5206);
+
+ // intersection of positive/negative ring
+ test_geometry<multi_polygon>("plus_min_one",
+ "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((2 2,6 3,3 6,2 2)))",
+ 7.5, -7.2);
+
+ // negative ring within a positive ring
+ test_geometry<multi_polygon>("plus_min_one_within",
+ "MULTIPOLYGON(((0 0,1 7,7 3,0 0)),((1 2,4 4,2 5,1 2)))",
+ 23.0, -3.5);
+
+ // from buffer
+ test_geometry<multi_polygon>("from_buffer_1",
+ "MULTIPOLYGON(((2.4 3.03431,1.71716 3.71716,2.4 4,2.4 3.03431))"
+ ",((2.4 1.96569,2.4 1,1.71716 1.28284,2.4 1.96569))"
+ ",((2.93431 2.5,2.4 3.03431,2.4 1.96569,2.93431 2.5))"
+ ",((3.06569 2.5,3 2.43431,2.93431 2.5,3 2.56569,3.06569 2.5))"
+ ",((-0.4 5.4,4.4 5.4,4.4 3.83431,3.06569 2.5,4.4 1.16569,4.4 -0.4,-0.4 -0.4,-0.4 5.4)))"
+ ,
+ 26.0596168239, -0.2854871761);
+
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}
+
+
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/enrich_intersection_points.cpp b/src/boost/libs/geometry/test/algorithms/overlay/enrich_intersection_points.cpp
new file mode 100644
index 000000000..c0078a9e1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/enrich_intersection_points.cpp
@@ -0,0 +1,187 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#error This unit test is not updated for several years
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+
+//#include <boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp>
+//#include <boost/geometry/algorithms/detail/overlay/merge_intersection_points.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#define GEOMETRY_TEST_OVERLAY_NOT_REVERSED
+
+
+#include <boost/algorithm/string/replace.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+struct test_enrich_intersection_points
+{
+ static inline std::string dir(int d)
+ {
+ return d == 0 ? "-" : (d == 1 ? "L" : "R");
+ }
+
+ template <typename G1, typename G2>
+ static void apply(std::string const& id,
+ boost::tuple<int, std::string> const& expected_count_and_center,
+ G1 const& g1, G2 const& g2, double precision)
+ {
+ //std::cout << "#" << id << std::endl;
+
+ typedef bg::detail::intersection::intersection_point
+ <typename bg::point_type<G2>::type> ip;
+ typedef typename boost::range_const_iterator<std::vector<ip> >::type iterator;
+ std::vector<ip> ips;
+
+ bg::get_intersection_points(g1, g2, ips);
+ bg::merge_intersection_points(ips);
+ bg::enrich_intersection_points(ips, true);
+
+ std::ostringstream out;
+ out << std::setprecision(2);
+
+ bool first = true;
+ for (iterator it = boost::begin(ips); it != boost::end(ips); ++it, first = false)
+ {
+ out << (first ? "" : ",");
+ for (unsigned int i = 0; i < it->info.size(); i++)
+ {
+ out << dir(it->info[i].direction);
+ }
+ }
+ int n = boost::size(ips);
+ //std::cout << n << " " << out.str() << std::endl;
+ BOOST_CHECK_EQUAL(expected_count_and_center.get<0>(), n);
+ BOOST_CHECK_EQUAL(expected_count_and_center.get<1>(), out.str());
+
+
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "enrich_ip" << id << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<G2>::type> mapper(svg, 500, 500);
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g1, "fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:1");
+ mapper.map(g2, "opacity:0.8;fill:rgb(0,0,255);stroke:rgb(0,0,0);stroke-width:1");
+
+ for (iterator it = boost::begin(ips); it != boost::end(ips); ++it)
+ {
+ mapper.map(it->point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1");
+ }
+ }
+#endif
+ }
+};
+
+
+int test_main(int, char* [])
+{
+ std::vector<boost::tuple<int, std::string> > expected;
+
+ /*
+ TODO Will be refactored
+
+ // NOTE: the order is sometimes not really important, in GCC it is sometimes
+ // different from here...
+
+
+ // 1-6
+ expected.push_back(boost::make_tuple(6, "RL,LR,LR,RL,RL,LR"));
+ expected.push_back(boost::make_tuple(8, "RL,LR,LR,RL,RL,LR,LR,RL"));
+ expected.push_back(boost::make_tuple(4, "RLRR,RRRL,RRRL,RRRL"));
+ expected.push_back(boost::make_tuple(12, "RL,LR,RL,LR,LR,RL,RL,LR,LR,RL,LR,RL"));
+ expected.push_back(boost::make_tuple(17, "LR,RL,LR,RRLR,RL,LR,RL,RL,LR,LR,RL,LR,RL,RL,LR,RL,LR"));
+ expected.push_back(boost::make_tuple(2, "--RR,LR"));
+
+ // 7-12
+ expected.push_back(boost::make_tuple(2, "LL,LL"));
+ expected.push_back(boost::make_tuple(2, "RL--,LL--"));
+ expected.push_back(boost::make_tuple(1, "RLLL"));
+ expected.push_back(boost::make_tuple(2, "RL--,LL--"));
+ expected.push_back(boost::make_tuple(1, "RRLR"));
+ expected.push_back(boost::make_tuple(8, "RL,LR,RL,LR,RL,LR,RL,LR"));
+
+ // 13-18
+ expected.push_back(boost::make_tuple(2, "LL--,LL--"));
+ expected.push_back(boost::make_tuple(2, "RL--,LL--"));
+ expected.push_back(boost::make_tuple(2, "RL--,LL--"));
+ expected.push_back(boost::make_tuple(2, "LL,--RL"));
+ expected.push_back(boost::make_tuple(2, "RR--,--LR"));
+ expected.push_back(boost::make_tuple(2, "RR--,--LR"));
+
+ // 19-24
+ expected.push_back(boost::make_tuple(2, "LL,LL"));
+ expected.push_back(boost::make_tuple(0, ""));
+ expected.push_back(boost::make_tuple(0, ""));
+ expected.push_back(boost::make_tuple(1, "RLLLRRLR"));
+ expected.push_back(boost::make_tuple(2, "RL,RLRRRRLR"));
+ expected.push_back(boost::make_tuple(1, "LRRRRRLR"));
+
+ // 25-30
+ expected.push_back(boost::make_tuple(1, "LRRRLLRL"));
+ expected.push_back(boost::make_tuple(1, "LRLLLLLR"));
+ expected.push_back(boost::make_tuple(2, "LR,LRRRRRRL"));
+ expected.push_back(boost::make_tuple(2, "LR,LRLLRRLR"));
+ expected.push_back(boost::make_tuple(2, "RL,LRRRLLLR"));
+ expected.push_back(boost::make_tuple(2, "LR,LRLLLLRL"));
+
+ // 31-36
+ expected.push_back(boost::make_tuple(1, "--LLLL--"));
+ expected.push_back(boost::make_tuple(1, "LR--LLRL"));
+ expected.push_back(boost::make_tuple(1, "LRLLLL--"));
+ expected.push_back(boost::make_tuple(2, "LR,LRLLRR--"));
+ expected.push_back(boost::make_tuple(1, "LRLLRRLR"));
+ expected.push_back(boost::make_tuple(3, "RL,LR,RLLLRRLR"));
+
+ // 37-42
+ expected.push_back(boost::make_tuple(3, "LRRRRRLR,RL,LR"));
+ expected.push_back(boost::make_tuple(3, "LR--RRRL,LR,RL"));
+ expected.push_back(boost::make_tuple(3, "RL,LR,LRRRRRRL"));
+
+ // 43-48
+ expected.push_back(boost::make_tuple(4, "LR,RL,RL,LR"));
+
+ // 49
+ expected.push_back(boost::make_tuple(16, "--RL,RRLR,RRLR,RL,LLRL,RLLLRRLR,RR--,--LR,RLRR,--LL,RL--,RL,RRRL,RL,LR,RRRLRRRL"));
+
+ // 101
+ expected.push_back(boost::make_tuple(3, "RL,LR,RL"));
+
+ // ticket#17
+ expected.push_back(boost::make_tuple(6, "LR,RL,LR,RL,RL,LR"));
+
+ //test_all<bg::model::d2::point_xy<float>, test_enrich_intersection_points>(expected);
+ test_all<bg::model::d2::point_xy<double>, test_enrich_intersection_points>(expected);
+ //test_all<boost::tuple<double, double>, test_enrich_intersection_points>(expected);
+
+ */
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.cpp
new file mode 100644
index 000000000..3835f6f47
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.cpp
@@ -0,0 +1,901 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/array.hpp>
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+
+// For test purposes, returns the point specified in the constructor
+template <typename Point>
+struct sub_range_from_points
+{
+ typedef Point point_type;
+
+ sub_range_from_points(Point const& i, Point const& j, Point const& k)
+ {
+ m_points[0] = i;
+ m_points[1] = j;
+ m_points[2] = k;
+ }
+
+ static inline bool is_first_segment() { return false; }
+ static inline bool is_last_segment() { return false; }
+
+ static inline std::size_t size() { return 3; }
+
+ inline Point const& at(std::size_t index) const
+ {
+ return m_points[index % 3];
+ }
+
+private :
+ boost::array<Point, 3> m_points;
+};
+
+template <typename P, typename T>
+void test_with_point(std::string const& caseid,
+ T pi_x, T pi_y, T pj_x, T pj_y, T pk_x, T pk_y,
+ T qi_x, T qi_y, T qj_x, T qj_y, T qk_x, T qk_y,
+ bg::detail::overlay::method_type expected_method,
+ bool expected_touch_only,
+ T ip_x, T ip_y,
+ std::string const& expected,
+ T ip_x2, T ip_y2)
+{
+ P pi = bg::make<P>(pi_x, pi_y);
+ P pj = bg::make<P>(pj_x, pj_y);
+ P pk = bg::make<P>(pk_x, pk_y);
+ P qi = bg::make<P>(qi_x, qi_y);
+ P qj = bg::make<P>(qj_x, qj_y);
+ P qk = bg::make<P>(qk_x, qk_y);
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<P>::type
+ >::type strategy_type;
+
+ typedef typename bg::detail::no_rescale_policy rescale_policy_type;
+
+ typedef bg::detail::overlay::turn_info
+ <
+ P,
+ typename bg::detail::segment_ratio_type<P, rescale_policy_type>::type
+ > turn_info;
+ typedef std::vector<turn_info> tp_vector;
+ turn_info model;
+ tp_vector info;
+ strategy_type strategy;
+ rescale_policy_type rescale_policy;
+ sub_range_from_points<P> sub_range_p(pi, pj, pk);
+ sub_range_from_points<P> sub_range_q(qi, qj, qk);
+ bg::detail::overlay::get_turn_info
+ <
+ bg::detail::overlay::assign_null_policy
+ >::apply(sub_range_p, sub_range_q, model, strategy, rescale_policy, std::back_inserter(info));
+
+ if (info.size() == 0)
+ {
+ BOOST_CHECK_EQUAL(expected_method,
+ bg::detail::overlay::method_none);
+ }
+
+ std::string detected;
+ std::string method;
+ for (typename tp_vector::const_iterator it = info.begin(); it != info.end(); ++it)
+ {
+ for (int t = 0; t < 2; t++)
+ {
+ detected += bg::operation_char(it->operations[t].operation);
+ method += bg::method_char(it->method);
+ }
+ }
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ caseid
+ << (caseid.find("_") == std::string::npos ? " " : "")
+ << " method: " << method
+ << " detected: " << detected
+ << " expected: " << expected);
+
+
+ if (! info.empty())
+ {
+ BOOST_CHECK_EQUAL(info[0].method, expected_method);
+ BOOST_CHECK_MESSAGE(info[0].touch_only == expected_touch_only,
+ caseid
+ << " detected: " << info[0].touch_only
+ << " expected: " << expected_touch_only);
+ BOOST_CHECK_CLOSE(bg::get<0>(info[0].point), ip_x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(info[0].point), ip_y, 0.001);
+
+ if (info.size() > 1)
+ {
+ BOOST_CHECK_EQUAL(info.size(), 2u);
+ BOOST_CHECK_EQUAL(info[1].method, expected_method);
+ BOOST_CHECK_CLOSE(bg::get<0>(info[1].point), ip_x2, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(info[1].point), ip_y2, 0.001);
+ }
+ }
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "get_turn_info_" << caseid
+ << "_" << string_from_type<typename bg::coordinate_type<P>::type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<P> mapper(svg, 500, 500);
+ mapper.add(bg::make<P>(0, 0));
+ mapper.add(bg::make<P>(10, 10));
+
+ bg::model::linestring<P> p; p.push_back(pi); p.push_back(pj); p.push_back(pk);
+ bg::model::linestring<P> q; q.push_back(qi); q.push_back(qj); q.push_back(qk);
+ mapper.map(p, "opacity:0.8;stroke:rgb(0,192,0);stroke-width:3");
+ mapper.map(q, "opacity:0.8;stroke:rgb(0,0,255);stroke-width:3");
+
+ std::string style = ";font-family='Verdana';font-weight:bold";
+ std::string align = ";text-anchor:end;text-align:end";
+ int offset = 8;
+
+ mapper.text(pi, "pi", "fill:rgb(0,192,0)" + style, offset, offset);
+ mapper.text(pj, "pj", "fill:rgb(0,192,0)" + style, offset, offset);
+ mapper.text(pk, "pk", "fill:rgb(0,192,0)" + style, offset, offset);
+
+ mapper.text(qi, "qi", "fill:rgb(0,0,255)" + style + align, -offset, offset);
+ mapper.text(qj, "qj", "fill:rgb(0,0,255)" + style + align, -offset, offset);
+ mapper.text(qk, "qk", "fill:rgb(0,0,255)" + style + align, -offset, offset);
+
+
+ int factor = 1; // second info, if any, will go left by factor -1
+ int ch = '1';
+ for (typename tp_vector::const_iterator it = info.begin();
+ it != info.end();
+ ++it, factor *= -1, ch++)
+ {
+ bool at_j = it->method == bg::detail::overlay::method_crosses;
+ std::string op;
+ op += bg::operation_char(it->operations[0].operation);
+ align = ";text-anchor:middle;text-align:center";
+ mapper.text(at_j ? pj : pk, op, "fill:rgb(255,128,0)" + style + align, offset * factor, -offset);
+
+ op.clear();
+ op += bg::operation_char(it->operations[1].operation);
+ mapper.text(at_j ? qj : qk, op, "fill:rgb(255,128,0)" + style + align, offset * factor, -offset);
+
+ // Map intersection point + method
+ mapper.map(it->point, "opacity:0.8;fill:rgb(255,0,0);stroke:rgb(0,0,100);stroke-width:1");
+
+ op.clear();
+ op += bg::method_char(it->method);
+ op += ' ';
+ op += (it->touch_only ? 'o' : '*');
+ if (info.size() != 1)
+ {
+ op += ch;
+ op += " p:"; op += bg::operation_char(it->operations[0].operation);
+ op += " q:"; op += bg::operation_char(it->operations[1].operation);
+ }
+ mapper.text(it->point, op, "fill:rgb(255,0,0)" + style, offset, -offset);
+ }
+ }
+#endif
+
+}
+
+template <typename P, typename T>
+void test_both(std::string const& caseid,
+ T pi_x, T pi_y, T pj_x, T pj_y, T pk_x, T pk_y,
+ T qi_x, T qi_y, T qj_x, T qj_y, T qk_x, T qk_y,
+ bg::detail::overlay::method_type method
+ = bg::detail::overlay::method_none,
+ bool expected_touch_only = false,
+ T ip_x = -1, T ip_y = -1,
+ std::string const& expected = "",
+ T ip_x2 = -1, T ip_y2 = -1)
+{
+ test_with_point<P, double>(caseid,
+ pi_x, pi_y, pj_x, pj_y, pk_x, pk_y,
+ qi_x, qi_y, qj_x, qj_y, qk_x, qk_y,
+ method, expected_touch_only, ip_x, ip_y, expected, ip_x2, ip_y2);
+
+ std::string reversed(expected.rbegin(), expected.rend());
+
+ if (ip_x2 >= 0 && ip_y2 >= 0)
+ {
+ std::swap(ip_x, ip_x2);
+ std::swap(ip_y, ip_y2);
+ }
+
+ test_with_point<P, double>(caseid + "_r",
+ qi_x, qi_y, qj_x, qj_y, qk_x, qk_y, // q
+ pi_x, pi_y, pj_x, pj_y, pk_x, pk_y, // p
+ method, expected_touch_only, ip_x, ip_y, reversed, ip_x2, ip_y2);
+}
+
+
+template <typename P>
+void test_all()
+{
+ using namespace bg::detail::overlay;
+
+ // See powerpoint "doc/testcases/get_turn_info.ppt"
+
+
+ // ------------------------------------------------------------------------
+ // "Real" intersections ("i"), or, crossing
+ // ------------------------------------------------------------------------
+ test_both<P, double>("il1",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 3, 7, 5, 8, 3, // q
+ method_crosses, false, 5, 4, "ui");
+
+ test_both<P, double>("il2",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 5, 7, 5, 3, 3, // q
+ method_crosses, false, 5, 5, "ui");
+
+ test_both<P, double>("il3",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 3, 7, 5, 3, 5, // q
+ method_crosses, false, 5, 4, "ui");
+
+ test_both<P, double>("il4",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 3, 7, 5, 4, 8, // q
+ method_crosses, false, 5, 4, "ui");
+
+ test_both<P, double>("ir1",
+ 5, 1, 5, 6, 7, 8, // p
+ 7, 5, 3, 3, 2, 5, // q
+ method_crosses, false, 5, 4, "iu");
+
+
+ // ------------------------------------------------------------------------
+ // TOUCH INTERIOR or touch in the middle ("m")
+ // ------------------------------------------------------------------------
+ test_both<P, double>("ml1",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 3, 5, 4, 7, 3, // q
+ method_touch_interior, false, 5, 4, "ui");
+
+ test_both<P, double>("ml2",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 3, 5, 4, 3, 6, // q
+ method_touch_interior, true, 5, 4, "iu");
+
+ test_both<P, double>("ml3",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 6, 5, 4, 3, 3, // q
+ method_touch_interior, true, 5, 4, "uu");
+
+ test_both<P, double>("mr1",
+ 5, 1, 5, 6, 7, 8, // p
+ 7, 3, 5, 4, 3, 3, // q
+ method_touch_interior, false, 5, 4, "iu");
+
+ test_both<P, double>("mr2",
+ 5, 1, 5, 6, 7, 8, // p
+ 7, 3, 5, 4, 7, 6, // q
+ method_touch_interior, true, 5, 4, "ui");
+
+ test_both<P, double>("mr3",
+ 5, 1, 5, 6, 7, 8, // p
+ 7, 6, 5, 4, 7, 3, // q
+ method_touch_interior, true, 5, 4, "ii");
+
+ test_both<P, double>("mcl",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 2, 5, 3, 5, 5, // q
+ method_touch_interior, false, 5, 3, "cc");
+
+ test_both<P, double>("mcr",
+ 5, 1, 5, 6, 7, 8, // p
+ 7, 2, 5, 3, 5, 5, // q
+ method_touch_interior, false, 5, 3, "cc");
+
+ test_both<P, double>("mclo",
+ 5, 1, 5, 6, 7, 8, // p
+ 3, 4, 5, 5, 5, 3, // q
+ method_touch_interior, false, 5, 5, "ux");
+
+ test_both<P, double>("mcro",
+ 5, 1, 5, 6, 7, 8, // p
+ 7, 4, 5, 5, 5, 3, // q
+ method_touch_interior, false, 5, 5, "ix");
+
+ // ------------------------------------------------------------------------
+ // COLLINEAR
+ // ------------------------------------------------------------------------
+ test_both<P, double>("cll1",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 5, 5, 7, 3, 8, // q
+ method_collinear, false, 5, 6, "ui");
+ test_both<P, double>("cll2",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 3, 5, 5, 3, 6, // q
+ method_collinear, false, 5, 5, "iu");
+ test_both<P, double>("clr1",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 5, 5, 7, 6, 8, // q
+ method_collinear, false, 5, 6, "ui");
+ test_both<P, double>("clr2",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 3, 5, 5, 6, 6, // q
+ method_collinear, false, 5, 5, "ui");
+
+ test_both<P, double>("crl1",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 5, 5, 7, 3, 8, // q
+ method_collinear, false, 5, 6, "iu");
+ test_both<P, double>("crl2",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 3, 5, 5, 3, 6, // q
+ method_collinear, false, 5, 5, "iu");
+ test_both<P, double>("crr1",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 5, 5, 7, 6, 8, // q
+ method_collinear, false, 5, 6, "iu");
+ test_both<P, double>("crr2",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 3, 5, 5, 6, 6, // q
+ method_collinear, false, 5, 5, "ui");
+
+ // The next two cases are changed (BSG 2013-09-24), they contain turn info (#buffer_rt_g)
+ // In new approach they are changed back (BSG 2013-10-20)
+ test_both<P, double>("ccx1",
+ 5, 1, 5, 6, 5, 8, // p
+ 5, 5, 5, 7, 3, 8, // q
+ method_collinear, false, 5, 6, "cc"); // "iu");
+ test_both<P, double>("cxc1",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 3, 5, 5, 5, 7, // q
+ method_collinear, false, 5, 5, "cc"); // "iu");
+
+ // Bug in case #54 of "overlay_cases.hpp"
+ test_both<P, double>("c_bug1",
+ 5, 0, 2, 0, 2, 2, // p
+ 4, 0, 1, 0, 1, 2, // q
+ method_collinear, false, 2, 0, "iu");
+
+
+ // ------------------------------------------------------------------------
+ // COLLINEAR OPPOSITE
+ // ------------------------------------------------------------------------
+
+ test_both<P, double>("clo1",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 7, 5, 5, 3, 3, // q
+ method_collinear, false, 5, 6, "ixxu", 5, 5);
+ test_both<P, double>("clo2",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 7, 5, 5, 5, 2, // q
+ method_collinear, false, 5, 6, "ix");
+ // actually "xxix", xx is skipped everywhere
+ test_both<P, double>("clo3",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 7, 5, 5, 7, 3, // q
+ method_collinear, false, 5, 6, "ixxi", 5, 5);
+
+ test_both<P, double>("cco1",
+ 5, 2, 5, 6, 5, 8, // p
+ 5, 7, 5, 5, 3, 3, // q
+ method_collinear, false, 5, 5, "xu"); // "xuxx"
+ test_both<P, double>("cco2",
+ 5, 2, 5, 6, 5, 8, // p
+ 5, 7, 5, 5, 5, 2); // q "xxxx"
+ test_both<P, double>("cco3",
+ 5, 2, 5, 6, 5, 8, // p
+ 5, 7, 5, 5, 7, 3, // q
+ method_collinear, false, 5, 5, "xi"); // "xixx"
+
+
+ test_both<P, double>("cro1",
+ 5, 2, 5, 6, 7, 8, // p
+ 5, 7, 5, 5, 3, 3, // q
+ method_collinear, false, 5, 6, "uxxu", 5, 5);
+ test_both<P, double>("cro2",
+ 5, 2, 5, 6, 7, 8, // p
+ 5, 7, 5, 5, 5, 2, // q
+ method_collinear, false, 5, 6, "ux"); // "xxux"
+ test_both<P, double>("cro3",
+ 5, 2, 5, 6, 7, 8, // p
+ 5, 7, 5, 5, 7, 3, // q
+ method_collinear, false, 5, 6, "uxxi", 5, 5);
+
+ test_both<P, double>("cxo1",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 5, 5, 3, 3, 1, // q
+ method_collinear, false, 5, 3, "xu");
+ test_both<P, double>("cxo2",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 5, 5, 3, 5, 0); // q "xx"
+ test_both<P, double>("cxo3",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 5, 5, 3, 7, 1, // q
+ method_collinear, false, 5, 3, "xi");
+
+ test_both<P, double>("cxo4",
+ 5, 2, 5, 6, 3, 8, // p
+ 5, 7, 5, 1, 3, 0, // q
+ method_collinear, false, 5, 6, "ix");
+ test_both<P, double>("cxo5",
+ 5, 2, 5, 6, 5, 8, // p
+ 5, 7, 5, 1, 3, 0); // q "xx"
+ test_both<P, double>("cxo6",
+ 5, 2, 5, 6, 7, 8, // p
+ 5, 7, 5, 1, 3, 0, // q
+ method_collinear, false, 5, 6, "ux");
+
+
+ // Verify
+ test_both<P, double>("cvo1",
+ 5, 3, 5, 7, 7, 9, // p
+ 5, 5, 5, 3, 3, 1 // q
+ );
+ test_both<P, double>("cvo2",
+ 5, 3, 5, 7, 7, 9, // p
+ 5, 4, 5, 2, 3, 0 // q
+ );
+
+
+ // ------------------------------------------------------------------------
+ // TOUCH - both same
+ // ------------------------------------------------------------------------
+ // Both left, Q turns right
+ test_both<P, double>("blr1",
+ 5, 1, 5, 6, 4, 4, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "ui");
+ test_both<P, double>("blr2",
+ 5, 1, 5, 6, 1, 4, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("blr3",
+ 5, 1, 5, 6, 3, 6, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, false, 5, 6, "iu");
+ test_both<P, double>("blr4",
+ 5, 1, 5, 6, 1, 8, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, false, 5, 6, "xu");
+ test_both<P, double>("blr5",
+ 5, 1, 5, 6, 4, 8, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "uu");
+ test_both<P, double>("blr6",
+ 5, 1, 5, 6, 6, 4, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "uu");
+
+ test_both<P, double>("blr7",
+ 5, 1, 5, 6, 3, 6, // p
+ 3, 7, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ix");
+ test_both<P, double>("blr8",
+ 5, 1, 5, 6, 3, 6, // p
+ 3, 6, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "xx");
+ test_both<P, double>("blr9",
+ 5, 1, 5, 6, 3, 6, // p
+ 3, 5, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ux");
+
+ // Variants
+ test_both<P, double>("blr7-a",
+ 5, 1, 5, 6, 3, 6, // p
+ 5, 8, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ix");
+ test_both<P, double>("blr7-b", // in fact NOT "both-left"
+ 5, 1, 5, 6, 3, 6, // p
+ 6, 8, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ix");
+
+ // To check if "collinear-check" on other side
+ // does not apply to this side
+ test_both<P, double>("blr6-c1",
+ 5, 1, 5, 6, 7, 5, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "uu");
+ test_both<P, double>("blr6-c2",
+ 5, 1, 5, 6, 7, 7, // p
+ 3, 7, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "uu");
+
+
+
+ // Both right, Q turns right
+ test_both<P, double>("brr1",
+ 5, 1, 5, 6, 6, 4, // p
+ 7, 5, 5, 6, 7, 7, // q
+ method_touch, true, 5, 6, "uu");
+ test_both<P, double>("brr2",
+ 5, 1, 5, 6, 9, 4, // p
+ 7, 5, 5, 6, 7, 7, // q
+ method_touch, false, 5, 6, "xu");
+ test_both<P, double>("brr3",
+ 5, 1, 5, 6, 7, 6, // p
+ 7, 5, 5, 6, 7, 7, // q
+ method_touch, false, 5, 6, "iu");
+ test_both<P, double>("brr4",
+ 5, 1, 5, 6, 9, 8, // p
+ 7, 5, 5, 6, 7, 7, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("brr5",
+ 5, 1, 5, 6, 6, 8, // p
+ 7, 5, 5, 6, 7, 7, // q
+ method_touch, true, 5, 6, "ui");
+ test_both<P, double>("brr6",
+ 5, 1, 5, 6, 4, 4, // p
+ 7, 5, 5, 6, 7, 7, // q
+ method_touch, true, 5, 6, "ui");
+
+ // Both right, Q turns left
+ test_both<P, double>("brl1",
+ 5, 1, 5, 6, 6, 4, // p
+ 7, 7, 5, 6, 7, 5, // q
+ method_touch, true, 5, 6, "iu");
+ test_both<P, double>("brl2",
+ 5, 1, 5, 6, 9, 4, // p
+ 7, 7, 5, 6, 7, 5, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("brl3",
+ 5, 1, 5, 6, 7, 6, // p
+ 7, 7, 5, 6, 7, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("brl4",
+ 5, 1, 5, 6, 9, 8, // p
+ 7, 7, 5, 6, 7, 5, // q
+ method_touch, false, 5, 6, "xi");
+ test_both<P, double>("brl5",
+ 5, 1, 5, 6, 6, 8, // p
+ 7, 7, 5, 6, 7, 5, // q
+ method_touch, true, 5, 6, "ii");
+ test_both<P, double>("brl6",
+ 5, 1, 5, 6, 4, 4, // p
+ 7, 7, 5, 6, 7, 5, // q
+ method_touch, true, 5, 6, "ii");
+ test_both<P, double>("brl7",
+ 5, 1, 5, 6, 7, 6, // p
+ 7, 7, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ux");
+ test_both<P, double>("brl8",
+ 5, 1, 5, 6, 7, 6, // p
+ 7, 6, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "xx");
+ test_both<P, double>("brl9",
+ 5, 1, 5, 6, 7, 6, // p
+ 7, 5, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ix");
+
+ // Variants
+ test_both<P, double>("brl7-a",
+ 5, 1, 5, 6, 7, 6, // p
+ 5, 8, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ux");
+ test_both<P, double>("brl7-b", // in fact NOT "both right"
+ 5, 1, 5, 6, 7, 6, // p
+ 4, 8, 5, 6, 5, 3, // q
+ method_touch, false, 5, 6, "ux");
+
+
+
+ // Both left, Q turns left
+ test_both<P, double>("bll1",
+ 5, 1, 5, 6, 4, 4, // p
+ 3, 5, 5, 6, 3, 7, // q
+ method_touch, true, 5, 6, "ii");
+ test_both<P, double>("bll2",
+ 5, 1, 5, 6, 1, 4, // p
+ 3, 5, 5, 6, 3, 7, // q
+ method_touch, false, 5, 6, "xi");
+ test_both<P, double>("bll3",
+ 5, 1, 5, 6, 3, 6, // p
+ 3, 5, 5, 6, 3, 7, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("bll4",
+ 5, 1, 5, 6, 1, 8, // p
+ 3, 5, 5, 6, 3, 7, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("bll5",
+ 5, 1, 5, 6, 4, 8, // p
+ 3, 5, 5, 6, 3, 7, // q
+ method_touch, true, 5, 6, "iu");
+ test_both<P, double>("bll6",
+ 5, 1, 5, 6, 6, 4, // p
+ 3, 5, 5, 6, 3, 7, // q
+ method_touch, true, 5, 6, "iu");
+
+ // TOUCH - COLLINEAR + one side
+ // Collinear/left, Q turns right
+ test_both<P, double>("t-clr1",
+ 5, 1, 5, 6, 4, 4, // p
+ 5, 8, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "ui");
+ test_both<P, double>("t-clr2",
+ 5, 1, 5, 6, 1, 4, // p
+ 5, 8, 5, 6, 3, 5, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("t-clr3",
+ 5, 1, 5, 6, 3, 6, // p
+ 5, 8, 5, 6, 3, 5, // q
+ method_touch, false, 5, 6, "iu");
+ test_both<P, double>("t-clr4",
+ 5, 1, 5, 6, 5, 8, // p
+ 5, 8, 5, 6, 3, 5, // q
+ method_touch, false, 5, 6, "xu");
+ // 5 n.a.
+ test_both<P, double>("t-clr6",
+ 5, 1, 5, 6, 6, 4, // p
+ 5, 8, 5, 6, 3, 5, // q
+ method_touch, true, 5, 6, "uu");
+
+ // Collinear/right, Q turns right
+ test_both<P, double>("t-crr1",
+ 5, 1, 5, 6, 6, 4, // p
+ 7, 5, 5, 6, 5, 8, // q
+ method_touch, true, 5, 6, "uu");
+ test_both<P, double>("t-crr2",
+ 5, 1, 5, 6, 9, 4, // p
+ 7, 5, 5, 6, 5, 8, // q
+ method_touch, false, 5, 6, "xu");
+ test_both<P, double>("t-crr3",
+ 5, 1, 5, 6, 7, 6, // p
+ 7, 5, 5, 6, 5, 8, // q
+ method_touch, false, 5, 6, "iu");
+ test_both<P, double>("t-crr4",
+ 5, 1, 5, 6, 5, 9, // p
+ 7, 5, 5, 6, 5, 8, // q
+ method_touch, false, 5, 6, "cc");
+ // 5 n.a.
+ test_both<P, double>("t-crr6",
+ 5, 1, 5, 6, 4, 4, // p
+ 7, 5, 5, 6, 5, 8, // q
+ method_touch, true, 5, 6, "ui");
+
+ // Collinear/right, Q turns left
+ test_both<P, double>("t-crl1",
+ 5, 1, 5, 6, 6, 4, // p
+ 5, 7, 5, 6, 7, 5, // q
+ method_touch, true, 5, 6, "iu");
+ test_both<P, double>("t-crl2",
+ 5, 1, 5, 6, 9, 4, // p
+ 5, 7, 5, 6, 7, 5, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("t-crl3",
+ 5, 1, 5, 6, 7, 6, // p
+ 5, 7, 5, 6, 7, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("t-crl4",
+ 5, 1, 5, 6, 5, 8, // p
+ 5, 7, 5, 6, 7, 5, // q
+ method_touch, false, 5, 6, "xi");
+ // 5 n.a.
+ test_both<P, double>("t-crl6",
+ 5, 1, 5, 6, 4, 4, // p
+ 5, 7, 5, 6, 7, 5, // q
+ method_touch, true, 5, 6, "ii");
+
+ // Collinear/left, Q turns left
+ test_both<P, double>("t-cll1",
+ 5, 1, 5, 6, 4, 4, // p
+ 3, 5, 5, 6, 5, 8, // q
+ method_touch, true, 5, 6, "ii");
+ test_both<P, double>("t-cll2",
+ 5, 1, 5, 6, 1, 4, // p
+ 3, 5, 5, 6, 5, 8, // q
+ method_touch, false, 5, 6, "xi");
+ test_both<P, double>("t-cll3",
+ 5, 1, 5, 6, 3, 6, // p
+ 3, 5, 5, 6, 5, 8, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("t-cll4",
+ 5, 1, 5, 6, 5, 9, // p
+ 3, 5, 5, 6, 5, 8, // q
+ method_touch, false, 5, 6, "cc");
+ // 5 n.a.
+ test_both<P, double>("t-cll6",
+ 5, 1, 5, 6, 6, 4, // p
+ 3, 5, 5, 6, 5, 8, // q
+ method_touch, true, 5, 6, "iu");
+
+ // Left to right
+ test_both<P, double>("lr1",
+ 5, 1, 5, 6, 3, 3, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, true, 5, 6, "ii");
+ test_both<P, double>("lr2",
+ 5, 1, 5, 6, 1, 5, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "xi");
+ test_both<P, double>("lr3",
+ 5, 1, 5, 6, 4, 8, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("lr4",
+ 5, 1, 5, 6, 9, 5, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("lr5",
+ 5, 1, 5, 6, 7, 3, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, true, 5, 6, "iu");
+ // otherwise case more thoroughly
+ test_both<P, double>("lr3a",
+ 5, 1, 5, 6, 1, 6, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("lr3b",
+ 5, 1, 5, 6, 5, 10, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("lr3c",
+ 5, 1, 5, 6, 8, 9, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("lr3d",
+ 5, 1, 5, 6, 9, 7, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "ui");
+ test_both<P, double>("lr3e",
+ 5, 1, 5, 6, 9, 6, // p
+ 1, 5, 5, 6, 9, 5, // q
+ method_touch, false, 5, 6, "ui");
+
+ // Right to left
+ test_both<P, double>("rl1",
+ 5, 1, 5, 6, 3, 3, // p
+ 9, 5, 5, 6, 1, 5, // q
+ method_touch, true, 5, 6, "ui");
+ test_both<P, double>("rl2",
+ 5, 1, 5, 6, 1, 5, // p
+ 9, 5, 5, 6, 1, 5, // q
+ method_touch, false, 5, 6, "cc");
+ test_both<P, double>("rl3",
+ 5, 1, 5, 6, 4, 8, // p
+ 9, 5, 5, 6, 1, 5, // q
+ method_touch, false, 5, 6, "iu");
+ test_both<P, double>("rl4",
+ 5, 1, 5, 6, 9, 5, // p
+ 9, 5, 5, 6, 1, 5, // q
+ method_touch, false, 5, 6, "xu");
+ test_both<P, double>("rl5",
+ 5, 1, 5, 6, 7, 3, // p
+ 9, 5, 5, 6, 1, 5, // q
+ method_touch, true, 5, 6, "uu");
+
+ // Equal (p1/q1 are equal)
+ test_both<P, double>("ebl1",
+ 5, 1, 5, 6, 3, 4, // p
+ 5, 1, 5, 6, 3, 8, // q
+ method_equal, false, 5, 6, "ui");
+ test_both<P, double>("ebl2",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 1, 5, 6, 3, 4, // q
+ method_equal, false, 5, 6, "iu");
+ test_both<P, double>("ebl3",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 1, 5, 6, 3, 8, // q
+ method_equal, false, 5, 6, "cc");
+
+ test_both<P, double>("ebl3-c1",
+ 5, 1, 5, 6, 10, 1, // p
+ 5, 1, 5, 6, 3, 8, // q
+ method_equal, false, 5, 6, "iu");
+
+ test_both<P, double>("ebr1",
+ 5, 1, 5, 6, 7, 4, // p
+ 5, 1, 5, 6, 7, 8, // q
+ method_equal, false, 5, 6, "iu");
+ test_both<P, double>("ebr2",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 1, 5, 6, 7, 4, // q
+ method_equal, false, 5, 6, "ui");
+ test_both<P, double>("ebr3",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 1, 5, 6, 7, 8, // q
+ method_equal, false, 5, 6, "cc");
+
+ test_both<P, double>("ebr3-c1",
+ 5, 1, 5, 6, 0, 1, // p
+ 5, 1, 5, 6, 7, 8, // q
+ method_equal, false, 5, 6, "ui");
+
+ test_both<P, double>("elr1",
+ 5, 1, 5, 6, 7, 8, // p
+ 5, 1, 5, 6, 3, 8, // q
+ method_equal, false, 5, 6, "iu");
+ test_both<P, double>("elr2",
+ 5, 1, 5, 6, 3, 8, // p
+ 5, 1, 5, 6, 7, 8, // q
+ method_equal, false, 5, 6, "ui");
+ test_both<P, double>("ec1",
+ 5, 1, 5, 6, 5, 8, // p
+ 5, 1, 5, 6, 5, 8, // q
+ method_equal, false, 5, 6, "cc");
+ test_both<P, double>("ec2",
+ 5, 1, 5, 6, 5, 8, // p
+ 5, 1, 5, 6, 5, 7, // q
+ method_equal, false, 5, 6, "cc");
+
+ test_both<P, double>("snl-1",
+ 0, 3, 2, 3, 4, 3, // p
+ 4, 3, 2, 3, 0, 3, // q
+ method_touch, false, 2, 3, "xx");
+
+ // BSG 2012-05-26 to be decided what's the problem here and what it tests...
+ // Anyway, test results are not filled out.
+ //test_both<P, double>("issue_buffer_mill",
+ // 5.1983614873206241 , 6.7259025813913107 , 5.0499999999999998 , 6.4291796067500622 , 5.1983614873206241 , 6.7259025813913107, // p
+ // 5.0499999999999998 , 6.4291796067500622 , 5.0499999999999998 , 6.4291796067500622 , 5.1983614873206241 , 6.7259025813913107, // q
+ // method_collinear, false, 2, 0, "tt");
+
+}
+
+
+/***
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+
+template <typename G>
+void test2(G const& geometry)
+{
+ typedef typename bg::point_type<G>::type P;
+ typedef typename bg::tag<G>::type T;
+ typedef typename bg::tag<P>::type PT;
+ std::cout << typeid(G).name() << std::endl;
+ std::cout << typeid(T).name() << std::endl;
+ std::cout << typeid(P).name() << std::endl;
+ std::cout << typeid(PT).name() << std::endl;
+
+
+ std::cout << bg::length(geometry) << std::endl;
+
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P2;
+ bg::model::linestring<P2> out;
+ bg::strategy::transform::scale_transformer<float[3], P2> scaler(5);
+ bg::transform(geometry, out, scaler);
+ std::cout << bg::dsv(out) << std::endl;
+}
+
+void test_f3()
+{
+ float vertices[][3] = {
+ {-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1},
+ {-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}
+ };
+ test2(vertices);
+}
+***/
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.xls b/src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.xls
new file mode 100644
index 000000000..facd118e4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turn_info.xls
Binary files differ
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns.cpp
new file mode 100644
index 000000000..b32e2eba3
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns.cpp
@@ -0,0 +1,404 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <iomanip>
+
+#include <geometry_test_common.hpp>
+
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
+#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+
+
+
+// To test that "get_turns" can be called using additional information
+template <typename Point, typename SegmentRatio>
+struct my_turn_op : public bg::detail::overlay::turn_operation<Point, SegmentRatio>
+{
+};
+
+namespace detail
+{
+
+struct test_get_turns
+{
+ template<typename G1, typename G2>
+ static void apply(std::string const& id,
+ std::size_t expected_count,
+ G1 const& g1, G2 const& g2, double /*precision*/)
+ {
+ typedef typename bg::point_type<G2>::type point_type;
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<G1>::type
+ >::type strategy_type;
+
+ typedef typename bg::rescale_policy_type<point_type>::type
+ rescale_policy_type;
+
+ strategy_type strategy;
+
+ rescale_policy_type rescale_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+ typedef bg::detail::overlay::turn_info
+ <
+ point_type,
+ typename bg::detail::segment_ratio_type<point_type, rescale_policy_type>::type
+ > turn_info;
+ std::vector<turn_info> turns;
+
+
+ bg::detail::get_turns::no_interrupt_policy policy;
+ bg::get_turns
+ <
+ false, false, bg::detail::overlay::assign_null_policy
+ >(g1, g2, strategy, rescale_policy, turns, policy);
+
+ BOOST_CHECK_MESSAGE(
+ expected_count == boost::size(turns),
+ "get_turns: " << id
+ << " #turns expected: " << expected_count
+ << " detected: " << boost::size(turns)
+ << " type: " << string_from_type
+ <typename bg::coordinate_type<G1>::type>::name()
+ );
+
+#if defined(TEST_WITH_SVG)
+ {
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ std::map<std::pair<coordinate_type, coordinate_type>, int> offsets;
+ std::ostringstream filename;
+ filename << "get_turns_" << id
+ << "_" << string_from_type<typename bg::coordinate_type<G1>::type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<G2>::type> mapper(svg, 500, 500);
+ mapper.add(g1);
+ mapper.add(g2);
+
+ // Input shapes in green/blue
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+
+ int index = 0;
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ mapper.map(turn.point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1");
+
+ // Map characteristics
+ std::pair<coordinate_type, coordinate_type> p
+ = std::make_pair(bg::get<0>(turn.point), bg::get<1>(turn.point));
+
+ {
+ std::ostringstream out;
+ out << index
+ << ": " << bg::operation_char(turn.operations[0].operation)
+ << " " << bg::operation_char(turn.operations[1].operation)
+ << " (" << bg::method_char(turn.method) << ")"
+ << (turn.discarded ? " (discarded) " : turn.blocked() ? " (blocked)" : "")
+ ;
+
+ offsets[p] += 10;
+ int offset = offsets[p];
+ mapper.text(turn.point, out.str(),
+ "fill:rgb(0,0,0);font-family:Arial;font-size:8px",
+ 5, offset);
+ }
+
+ ++index;
+ }
+ }
+#endif
+ }
+};
+
+}
+
+template<typename G1, typename G2>
+struct test_get_turns
+{
+ inline static void apply(std::string const& id, std::size_t expected_count,
+ std::string const& wkt1, std::string const& wkt2,
+ double precision = 0.001)
+ {
+ if (wkt1.empty() || wkt2.empty())
+ {
+ return;
+ }
+
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ bg::correct(g1);
+ bg::correct(g2);
+
+ // Try the overlay-function in both ways
+ std::string caseid = id;
+ //goto case_reversed;
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << caseid << std::endl;
+#endif
+ detail::test_get_turns::apply(caseid, expected_count, g1, g2, precision);
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ return;
+#endif
+
+ //case_reversed:
+#if ! defined(BOOST_GEOMETRY_TEST_OVERLAY_NOT_EXCHANGED)
+ caseid = id + "_rev";
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << caseid << std::endl;
+#endif
+
+ detail::test_get_turns::apply(caseid, expected_count, g2, g1, precision);
+#endif
+ }
+};
+
+#if ! defined(GEOMETRY_TEST_MULTI)
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> P;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::box<P> box;
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << string_from_type<T>::name() << std::endl;
+#endif
+
+
+ // snl
+ /*
+ test_get_turns<polygon, polygon>::apply("snl_2",
+ 5,
+ //snl-1
+ //"POLYGON((182467 605842,182480 605954,182557 605958,182571 605958,182585 605958,182579 605843,182559 605838,182467 605842))",
+ //"POLYGON((182499 605955,182511 605960,182536 605974,182536 605981,182536 606006,182563 606006,182610 605985,182613 605976,182620 605948,182628 605937,182631 605924,182639 605889,182634 605885,182603 605848,182579 605843,182585 605958,182571 605958,182557 605958,182499 605955))");
+ //snl-2
+ //"POLYGON((120812 525783,120845 525792,120821 525842,120789 525826,120818 525849,120831 525854,120875 525875,120887 525881,120887 525881,120920 525834,120920 525834,120811 525772,120789 525826,120812 525783))",
+ //"POLYGON((120789 525826,120812 525783,120845 525792,120821 525842,120789 525826,120818 525849,120831 525854,120875 525875,120923 525836,120811 525772,120789 525826))"
+ //snl-4
+ "POLYGON((184913.4512400339881423860788345336914 606985.779408219968900084495544433594,184912.8999999999941792339086532592773 606987.145999999949708580970764160156,184904.4135310589917935431003570556641 606987.651360383024439215660095214844,184901.847619076987029984593391418457 607014.593436188995838165283203125,184916.3977574919990729540586471557617 607021.060164373018778860569000244141,184927.7147701499925460666418075561523 607008.126435620011761784553527832031,184926.0980706939881201833486557006836 606998.426238880958408117294311523438,184913.4512400339881423860788345336914 606985.779408219968900084495544433594),(184907.5560000000114087015390396118164 607013.300999999977648258209228515625,184905.7820000000065192580223083496094 607009.971999999950639903545379638672,184906.0039999999862629920244216918945 607005.978000000002793967723846435547,184908.4439999999885912984609603881836 606998.876999999978579580783843994141,184912.2149999999965075403451919555664 606994.217999999993480741977691650391,184919.3140000000130385160446166992188 606993.996000000042840838432312011719,184922.4200000000128056854009628295898 606995.770999999949708580970764160156,184925.7470000000030267983675003051758 606998.876999999978579580783843994141,184926.4130000000004656612873077392578 607002.871999999973922967910766601563,184925.7470000000030267983675003051758 607007.753000000026077032089233398438,184922.4200000000128056854009628295898 607012.190999999991618096828460693359,184917.0959999999904539436101913452148 607015.297999999951571226119995117188,184911.7710000000079162418842315673828 607015.297999999951571226119995117188,184907.5560000000114087015390396118164 607013.300999999977648258209228515625))",
+ "POLYGON((184861.1180000010062940418720245361328 606901.158000000054016709327697753906,184893.7870000000111758708953857421875 606898.482999998959712684154510498047,184925.0430000009946525096893310546875 606913.399999998975545167922973632813,184927.1739999990095384418964385986328 606951.758999999961815774440765380859,184912.8999999990046489983797073364258 606987.146000002045184373855590820313,184877.8700000010139774531126022338867 606989.232000001007691025733947753906,184885.1030000000027939677238464355469 607023.773999999975785613059997558594,184899.0579999980109278112649917602539 607022.743000000948086380958557128906,184906.0080000009911600500345230102539 607044.947999999043531715869903564453,184966.4649999999965075403451919555664 607025.020000000018626451492309570313,184968.4420000019890721887350082397461 606961.300000000977888703346252441406,185024.7679999989923089742660522460938 606947.401999998954124748706817626953,185024.5439999999944120645523071289063 606941.354999999981373548507690429688,185027.0069999989937059581279754638672 606937.322999999043531715869903564453,185030.3660000000090803951025009155273 606934.186999998986721038818359375,185035.5159999990137293934822082519531 606933.962999999988824129104614257813,185040.4420000019890721887350082397461 606935.530999999027699232101440429688,185042.905000000988366082310676574707 606939.114999998011626303195953369141,185088.3640000000013969838619232177734 606931.385000001988373696804046630859,185089.1389999990060459822416305541992 607015.508999999961815774440765380859,185095.1999999989930074661970138549805 607011.300000000977888703346252441406,185118.8269999999902211129665374755859 606995.545000002020969986915588378906,185126.813000001013278961181640625 606991.9950000010430812835693359375,185177.7270000019925646483898162841797 606973.798999998951330780982971191406,185181.4820000010076910257339477539063 606966.67599999904632568359375,185193.5709999990067444741725921630859 606977.795000002020969986915588378906,185193.710999998991610482335090637207 606960.300000000977888703346252441406,185189.3520000019925646483898162841797 606779.020000000018626451492309570313,185167.5150000010035000741481781005859 606783.844000000972300767898559570313,185086.9600000010104849934577941894531 606801.241000000038184225559234619141,185011.7069999990053474903106689453125 606817.809000000008381903171539306641,185000 606819.304000001051463186740875244141,184994.0340000019932631403207778930664 606819.793999999994412064552307128906,184976.3979999980074353516101837158203 606819.572000000975094735622406005859,184956.6539999989909119904041290283203 606817.1310000009834766387939453125,184934.9129999990109354257583618164063 606813.136999998008832335472106933594,184893.0969999989902134984731674194336 606804.927000000956468284130096435547,184884.4450000000069849193096160888672 606831.555000000051222741603851318359,184866.9189999999944120645523071289063 606883.480999998981133103370666503906,184861.1180000010062940418720245361328 606901.158000000054016709327697753906),(184907.5560000019904691725969314575195 607013.30099999904632568359375,184905.7820000019855797290802001953125 607009.971999999019317328929901123047,184906.0040000010048970580101013183594 607005.978000000002793967723846435547,184908.4439999980095308274030685424805 606998.876999999978579580783843994141,184912.2149999999965075403451919555664 606994.217999998014420270919799804688,184919.3139999989944044500589370727539 606993.995999998995102941989898681641,184922.420000001991866156458854675293 606995.771000002045184373855590820313,184925.7470000009925570338964462280273 606998.876999999978579580783843994141,184926.4129999990109354257583618164063 607002.872000001021660864353179931641,184925.7470000009925570338964462280273 607007.752999998978339135646820068359,184922.420000001991866156458854675293 607012.190999999991618096828460693359,184917.0960000010090880095958709716797 607015.297999999951571226119995117188,184911.7710000019869767129421234130859 607015.297999999951571226119995117188,184907.5560000019904691725969314575195 607013.30099999904632568359375))"
+ );
+
+
+ return;
+ */
+
+ // 1-6
+ test_get_turns<polygon, polygon>::apply("1", 6, case_1[0], case_1[1]);
+ test_get_turns<polygon, polygon>::apply("2", 8, case_2[0], case_2[1]);
+ test_get_turns<polygon, polygon>::apply("3", 4, case_3[0], case_3[1]);
+ test_get_turns<polygon, polygon>::apply("4", 12, case_4[0], case_4[1]);
+ test_get_turns<polygon, polygon>::apply("5", 17, case_5[0], case_5[1]);
+ test_get_turns<polygon, polygon>::apply("6", 3, case_6[0], case_6[1]);
+
+ // 7-12
+ test_get_turns<polygon, polygon>::apply("7", 2, case_7[0], case_7[1]);
+ test_get_turns<polygon, polygon>::apply("8", 2, case_8[0], case_8[1]);
+ test_get_turns<polygon, polygon>::apply("9", 1, case_9[0], case_9[1]);
+ test_get_turns<polygon, polygon>::apply("10", 3, case_10[0], case_10[1]);
+ test_get_turns<polygon, polygon>::apply("11", 1, case_11[0], case_11[1]);
+ test_get_turns<polygon, polygon>::apply("12", 8, case_12[0], case_12[1]);
+
+ // 13-18
+ test_get_turns<polygon, polygon>::apply("13", 2, case_13[0], case_13[1]);
+ test_get_turns<polygon, polygon>::apply("14", 2, case_14[0], case_14[1]);
+ test_get_turns<polygon, polygon>::apply("15", 2, case_15[0], case_15[1]);
+ test_get_turns<polygon, polygon>::apply("16", 4, case_16[0], case_16[1]);
+ test_get_turns<polygon, polygon>::apply("17", 2, case_17[0], case_17[1]);
+ ///test_get_turns<polygon, polygon>::apply("18", 4, case_18[0], case_18[1]);
+
+ // 19-24
+ test_get_turns<polygon, polygon>::apply("19", 2, case_19[0], case_19[1]);
+ test_get_turns<polygon, polygon>::apply("20", 3, case_20[0], case_20[1]);
+ test_get_turns<polygon, polygon>::apply("21", 3, case_21[0], case_21[1]);
+ test_get_turns<polygon, polygon>::apply("22", 1, case_22[0], case_22[1]);
+ test_get_turns<polygon, polygon>::apply("23", 2, case_23[0], case_23[1]);
+ test_get_turns<polygon, polygon>::apply("24", 1, case_24[0], case_24[1]);
+
+ // 25-30
+ test_get_turns<polygon, polygon>::apply("25", 1, case_25[0], case_25[1]);
+ test_get_turns<polygon, polygon>::apply("26", 1, case_26[0], case_26[1]);
+ test_get_turns<polygon, polygon>::apply("27", 2, case_27[0], case_27[1]);
+ test_get_turns<polygon, polygon>::apply("28", 2, case_28[0], case_28[1]);
+ test_get_turns<polygon, polygon>::apply("29", 2, case_29[0], case_29[1]);
+ test_get_turns<polygon, polygon>::apply("30", 2, case_30[0], case_30[1]);
+
+ // 31-36
+ test_get_turns<polygon, polygon>::apply("31", 1, case_31[0], case_31[1]);
+ test_get_turns<polygon, polygon>::apply("32", 1, case_32[0], case_32[1]);
+ test_get_turns<polygon, polygon>::apply("33", 1, case_33[0], case_33[1]);
+ test_get_turns<polygon, polygon>::apply("34", 2, case_34[0], case_34[1]);
+ test_get_turns<polygon, polygon>::apply("35", 1, case_35[0], case_35[1]);
+ test_get_turns<polygon, polygon>::apply("36", 3, case_36[0], case_36[1]);
+
+ // 37-42
+ test_get_turns<polygon, polygon>::apply("37", 3, case_37[0], case_37[1]);
+ test_get_turns<polygon, polygon>::apply("38", 3, case_38[0], case_38[1]);
+ test_get_turns<polygon, polygon>::apply("39", 4, case_39[0], case_39[1]);
+ test_get_turns<polygon, polygon>::apply("40", 3, case_40[0], case_40[1]);
+ test_get_turns<polygon, polygon>::apply("41", 5, case_41[0], case_41[1]);
+ test_get_turns<polygon, polygon>::apply("42", 5, case_42[0], case_42[1]);
+
+ // 43-48
+ test_get_turns<polygon, polygon>::apply("43", 4, case_43[0], case_43[1]);
+ test_get_turns<polygon, polygon>::apply("44", 4, case_44[0], case_44[1]);
+ test_get_turns<polygon, polygon>::apply("45", 4, case_45[0], case_45[1]);
+ test_get_turns<polygon, polygon>::apply("46", 4, case_46[0], case_46[1]);
+ test_get_turns<polygon, polygon>::apply("47", 5, case_47[0], case_47[1]);
+
+ // 49-54
+ test_get_turns<polygon, polygon>::apply("50", 4, case_50[0], case_50[1]);
+ test_get_turns<polygon, polygon>::apply("51", 3, case_51[0], case_51[1]);
+ test_get_turns<polygon, polygon>::apply("52", 8, case_52[0], case_52[1]);
+ // A touching point interior/ring exterior/ring can be represented in two ways:
+ test_get_turns<polygon, polygon>::apply("53a", 4, case_53[0], case_53[1]);
+ test_get_turns<polygon, polygon>::apply("53b", 4, case_53[0], case_53[2]);
+ test_get_turns<polygon, polygon>::apply("54aa", 13, case_54[0], case_54[2]);
+ test_get_turns<polygon, polygon>::apply("54ab", 13, case_54[0], case_54[3]);
+ test_get_turns<polygon, polygon>::apply("54ba", 13, case_54[1], case_54[2]);
+ test_get_turns<polygon, polygon>::apply("54bb", 13, case_54[1], case_54[3]);
+
+ test_get_turns<polygon, polygon>::apply("55", 12, case_55[0], case_55[1]);
+ test_get_turns<polygon, polygon>::apply("56", 9, case_56[0], case_56[1]);
+
+
+ // other
+ test_get_turns<polygon, polygon>::apply("many_situations", 31, case_many_situations[0], case_many_situations[1]);
+
+
+ // ticket#17
+ test_get_turns<polygon, box>::apply("ticket_17", 6, ticket_17[0], ticket_17[1]);
+
+ // GGL-mailing list
+ test_get_turns<polygon, polygon>::apply("ggl_list_20110306_javier",
+ 4,
+ ggl_list_20110306_javier[0], ggl_list_20110306_javier[1]);
+
+#ifdef _MSC_VER // gcc returns 14 for float
+ // test_get_turns<polygon, polygon>::apply("ggl_list_20110716_enrico",
+ // 13,
+ // ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1]);
+
+#endif
+
+ // pies
+ test_get_turns<polygon, polygon>::apply("pie_23_16_16", 3, pie_23_16_16[0], pie_23_16_16[1]);
+ test_get_turns<polygon, polygon>::apply("pie_16_4_12", 2, pie_16_4_12[0], pie_16_4_12[1]);
+ test_get_turns<polygon, polygon>::apply("pie_4_13_15", 3, pie_4_13_15[0], pie_4_13_15[1]);
+ test_get_turns<polygon, polygon>::apply("pie_16_2_15_0", 2, pie_16_2_15_0[0], pie_16_2_15_0[1]);
+ test_get_turns<polygon, polygon>::apply("pie_20_20_7_100", 3, pie_20_20_7_100[0], pie_20_20_7_100[1]);
+ test_get_turns<polygon, polygon>::apply("pie_23_23_3_2000", 5, pie_23_23_3_2000[0], pie_23_23_3_2000[1]);
+
+
+ // line-line
+ test_get_turns<linestring, linestring>::apply("lineline1", 3, line_line1[0], line_line1[1]);
+
+ // line-polygon
+ test_get_turns<linestring, polygon>::apply("line_poly1", 4, line_line1[0], case_1[1]);
+ test_get_turns<linestring, polygon>::apply("line_poly2", 4, line_line1[1], case_1[0]);
+ test_get_turns<polygon, linestring>::apply("poly_line", 4, case_1[1], line_line1[0]);
+}
+
+
+template <typename T>
+void test_ccw()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> P;
+ typedef bg::model::polygon<P, false, true> polygon;
+
+ test_get_turns<polygon, polygon>::apply("ccw_1",
+ 6,
+ ccw_case_1[0], ccw_case_1[1]);
+
+ test_get_turns<polygon, polygon>::apply("ccw_9",
+ 1,
+ case_9[0], case_9[1]);
+
+}
+
+template <typename T>
+void test_open()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> P;
+ typedef bg::model::polygon<P, true, false> polygon;
+
+ test_get_turns<polygon, polygon>::apply("open_1",
+ 6,
+ open_case_1[0], open_case_1[1]);
+
+ test_get_turns<polygon, polygon>::apply("open_9",
+ 1,
+ open_case_9[0], open_case_9[1]);
+}
+
+
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+ test_ccw<double>();
+ test_open<double>();
+
+#if ! defined(_MSC_VER)
+ test_all<long double>();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<ttmath_big>();
+#endif
+ return 0;
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal.cpp
new file mode 100644
index 000000000..a1a93abab
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal.cpp
@@ -0,0 +1,62 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+//TEST
+//#include <to_svg.hpp>
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> pt;
+ //typedef bg::model::ring<pt> ring;
+ typedef bg::model::polygon<pt> poly;
+ //typedef bg::model::multi_polygon<polygon> mpoly;
+
+ // mailing list report 17.03.2015
+ // operations ok but wrong IPs for int
+ // (the coordinates are generates at endpoints only)
+ {
+ // cw(duplicated point)
+ test_geometry<poly, poly>("POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
+ "POLYGON((-7901 -1485,-7901 529,-7901 529, 15802 544, 15802 -1485, -7901 -1485))",
+ expected("iiu")("iui")("mcc")("cui"));
+ //to_svg<poly, poly>("POLYGON((-8042 -1485,-8042 250,15943 254,15943 -1485,-8042 -1485))",
+ // "POLYGON((-7901 -1485,-7901 529,15802 544, 15802 -1485, -7901 -1485))",
+ // "poly_poly_1.svg");
+ test_geometry<poly, poly>("POLYGON((-7901 -1485,-7901 529,-7901 529, 15802 544, 15802 -1485, -7901 -1485))",
+ "POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
+ expected("iui")("iiu")("mcc")("ciu"));
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_all<int>();
+ test_all<float>();
+ test_all<double>();
+
+#if ! defined(_MSC_VER)
+ test_all<long double>();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<ttmath_big>();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal_sph.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal_sph.cpp
new file mode 100644
index 000000000..4905e4b53
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal_sph.cpp
@@ -0,0 +1,84 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::degree> > pt;
+ //typedef bg::model::ring<pt> ring;
+ typedef bg::model::polygon<pt> poly;
+ //typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ expected("iiu")("iui")("iiu")("iui")("iiu")("iui"));
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ expected("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu"));
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ expected("miu")("miu")("miu")("miu"));
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ expected("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui"));
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ expected("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui"));
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ expected("ccc")("eui")("mcc"));
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ expected("txu")("tux"));
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ expected("mux")("cxu"));
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ expected("muu"));
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ expected("cxu")("mux")("txx"));
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ expected("mui"));
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ expected("iiu")("iui")("iiu")("iui")("iiu")("iui")("iiu")("iui"));
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ expected("mxu")("mux"));
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ expected("cxu")("mux"));
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ expected("cxu")("mux"));
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ expected("txx")("txx")("tux")("cxu"));
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ expected("mcc")("cui"));
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ expected("mcc")("ccc")("ccc")("cui"));
+
+ test_geometry<poly, poly>("POLYGON((16 15,-132 10,-56 89,67 5,16 15))",
+ "POLYGON((101 49,12 40,-164 10,117 0,101 49))",
+ expected("iiu")("iui"));
+}
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+
+//#if ! defined(_MSC_VER)
+// test_all<long double>();
+//#endif
+
+//#if defined(HAVE_TTMATH)
+// test_all<ttmath_big>();
+//#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal.cpp
new file mode 100644
index 000000000..1ac88bff1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal.cpp
@@ -0,0 +1,234 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+//TEST
+//#include <to_svg.hpp>
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> pt;
+ typedef bg::model::linestring<pt> ls;
+ typedef bg::model::polygon<pt> poly;
+
+ test_geometry<ls, poly>("LINESTRING(15 5,24 5,20 2,19 0,13 -4,1 0,10 0,13 3,15 7,16 10,10 10,8 10,4 6,2 8,1 10)",
+ "POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
+ expected("miu+")("iuu+")("tcc+")("tuu=")("mcu+")("mic=")("muu+")
+ ("tiu+")("mcu+")("mic=")("mcc+")("miu=")("mxu+"));
+
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "miu+", "mxu+");
+ test_geometry<ls, poly>("LINESTRING(0 0,5 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tiu+", "txu+");
+ test_geometry<ls, poly>("LINESTRING(0 0,5 0,5 5,10 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("tcu+")("mic=")("mcc+")("txu="));
+ test_geometry<ls, poly>("LINESTRING(10 0,5 0,5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("tcc+")("miu=")("mcu+")("txc="));
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10)",
+ "POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
+ expected("tcu+")("mic=")("mcu+")("mic=")("mxu+"));
+
+ test_geometry<ls, poly>("LINESTRING(11 1,10 0,0 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tcc+", "txu=");
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,11 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tcu+", "tuc=");
+ test_geometry<ls, poly>("LINESTRING(10 0,0 0,-1 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tcc+", "tuu=");
+
+ // true hole
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,10 0,0 0)(2 2,10 5,2 8,2 2))",
+ expected("tiu+")("tiu+"));
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,10 0,0 0)(2 2,10 5,2 8,2 2))",
+ expected("mcu+")("ecc=")("tiu+")("mxc="));
+
+ // fake hole
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ expected("tuu+")("tiu+"));
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ expected("mcu+")("tuc=")("tcu+")("mxc="));
+
+ // true hole
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ expected("mcu+")("mic=")("tcu+")("txc="));
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 8)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ expected("mcu+")("mic=")("tcc+")("txu="));
+
+ // SPIKE - NON-ENDPOINT - NON-OPPOSITE
+
+ // spike - neq eq
+ test_geometry<ls, poly>("LINESTRING(2 2,4 4,1 1)", "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("mcc+")("txu=")("tcu=")("mxc="));
+ // spike - eq eq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,1 1)", "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("tcc+")("txu=")("tcu=")("mxc="));
+ // spike - eq neq
+ test_geometry<ls, poly>("LINESTRING(0 0,3 3,1 1)", "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("tcc+")("mxu=")("mcu=")("mxc="));
+ // spike - neq neq
+ test_geometry<ls, poly>("LINESTRING(1 1,3 3,2 2)", "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("mcc+")("mxu=")("mcu=")("mxc="));
+ // spike - out neq
+ test_geometry<ls, poly>("LINESTRING(0 0,3 3,2 2)", "POLYGON((1 1,4 4,6 3,6 0,1 1))",
+ expected("mcc+")("mxu=")("mcu=")("mxc="));
+ // spike - out eq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2)", "POLYGON((1 1,4 4,6 3,6 0,1 1))",
+ expected("mcc+")("txu=")("tcu=")("mxc="));
+ // spike - out out/eq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2)", "POLYGON((1 0,4 4,6 3,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2)", "POLYGON((0 1,4 4,6 3,6 0,-1 -1,0 1))",
+ expected("tiu+"));
+ // spike - out out/neq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2)", "POLYGON((4 0,4 5,6 3,4 0))",
+ expected("muu+"));
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2)", "POLYGON((0 4,5 4,6 3,6 0,-1 -1,0 4))",
+ expected("miu+"));
+
+ test_geometry<ls, poly>("LINESTRING(0 1,1 1,0 1)", "POLYGON((0 0,3 3,3 0,0 0))",
+ expected("muu+"));
+ test_geometry<ls, poly>("LINESTRING(0 1,3 3,0 1)", "POLYGON((0 0,3 3,3 0,0 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(0 1,0 0,0 1)", "POLYGON((0 0,3 3,3 0,0 0))",
+ expected("tuu+"));
+
+ // SPIKE - NON-ENDPOINT - OPPOSITE
+
+ // opposite - eq eq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2)", "POLYGON((-1 -1,0 0,4 4,6 3,-1 -1))",
+ expected("tcu+")("txc=")("tcc=")("mxu="));
+ // opposite - neq eq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2)", "POLYGON((-1 -1,0 0,5 5,6 3,-1 -1))",
+ expected("mcu+")("txc=")("tcc=")("mxu="));
+ // opposite - eq, neq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2)", "POLYGON((-2 -2,-1 -1,4 4,6 3,-2 -2))",
+ expected("tcu+")("mxc=")("mcc=")("mxu="));
+ // opposite - neq neq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2)", "POLYGON((-2 -2,-1 -1,3 3,6 3,-2 -2))",
+ expected("mcu+")("mxc=")("mcc=")("mxu="));
+ // opposite - neq neq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2)", "POLYGON((-2 -2,-1 -1,3 3,5 5,6 3,-2 -2))",
+ expected("mcu+")("mxc=")("mcc=")("mxu="));
+
+ // spike vs internal
+ test_geometry<ls, poly>("LINESTRING(0 1,1 1,0 1)", // --
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(1 2,1 1,1 2)", // |
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(0 2,1 1,0 2)",
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(2 0,1 1,2 0)",
+ "POLYGON((1 0,1 1,2 1,2 0,1 0))",
+ expected("tiu+")("tiu+")("txu+")); // TODO: should spike point be duplicated?
+ test_geometry<ls, poly>("LINESTRING(0 0,1 1,0 0)", // /
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(2 2,1 1,2 2)", // /
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+
+ test_geometry<ls, poly>("LINESTRING(2 1,1 1,2 1)",
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tcu+")("txc=")("tcc=")("txu="));
+
+ // 21.01.2015
+ test_geometry<ls, poly>("LINESTRING(1 3,3 1)",
+ "POLYGON((0 0,0 4,4 4,4 0,2 2,0 0))",
+ expected("mcu+")("mxc="));
+ // extended
+ test_geometry<ls, poly>("LINESTRING(1 7,4 4,7 1)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("tcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(1 7,3 5,7 1)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(1 7,5 3,7 1)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(4 4,7 1)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("tcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(5 3,7 1)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcu+")("mxc="));
+ // reversed
+ test_geometry<ls, poly>("LINESTRING(7 1,4 4,1 7)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("tiu="));
+ test_geometry<ls, poly>("LINESTRING(7 1,3 5,1 7)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("miu="));
+ test_geometry<ls, poly>("LINESTRING(7 1,5 3,1 7)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("ccc=")("miu="));
+ test_geometry<ls, poly>("LINESTRING(7 1,4 4)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("txu="));
+ test_geometry<ls, poly>("LINESTRING(7 1,5 3)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("mxu="));
+ test_geometry<ls, poly>("LINESTRING(7 1,3 5)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("miu="));
+
+ // 23.01.2015 - spikes
+ test_geometry<ls, poly>("LINESTRING(3 10, 1 5, 1 10, 3 4, 7 8, 6 10, 10 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("miu+")("miu+")("miu+")("mxu+"));
+ // extended
+ test_geometry<ls, poly>("LINESTRING(7 8, 6 10, 11 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("miu+")("iuu+"));
+
+ // 25.01.2015
+ test_geometry<ls, poly>("LINESTRING(2 3, 4 5, 0 6, 5 6)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))",
+ expected("miu+")("miu+")("mcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(0 6, 5 6)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))",
+ expected("miu+")("mcu+")("mxc="));
+
+}
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+
+#if ! defined(_MSC_VER)
+ test_all<long double>();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<ttmath_big>();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal_sph.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal_sph.cpp
new file mode 100644
index 000000000..be893b34a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_areal_sph.cpp
@@ -0,0 +1,241 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::degree> > pt;
+ typedef bg::model::linestring<pt> ls;
+ typedef bg::model::polygon<pt> poly;
+
+ test_geometry<ls, poly>("LINESTRING(15 5,24 5,20 2,19 0,13 -4,1 0,10 0,13 3.0027386970408236,15 7,16 10.096620161421658,10 10.151081711048134,8 10.145026423873857,4 6.0128694190616088,2 8.0210217579873273,1 10.028657322246225)",
+ "POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
+ expected("miu+")("iuu+")("tcc+")("tuu=")("mcu+")("mic=")("muu+")
+ ("tiu+")("mcu+")("mic=")("mcc+")("miu=")("mxu+"));
+
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "miu+", "mxu+");
+ test_geometry<ls, poly>("LINESTRING(0 0,5 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tiu+", "txu+");
+ test_geometry<ls, poly>("LINESTRING(0 0,5 0,5 5,10 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("tcu+")("mic=")("mcc+")("txu="));
+ test_geometry<ls, poly>("LINESTRING(10 0,5 0,5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("tcc+")("miu=")("mcu+")("txc="));
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10.151081711048134)",
+ "POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
+ expected("tcu+")("mic=")("mcu+")("mic=")("mxu+"));
+
+ test_geometry<ls, poly>("LINESTRING(11 1,10 0,0 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tcc+", "txu=");
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,11 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tcu+", "tuc=");
+ test_geometry<ls, poly>("LINESTRING(10 0,0 0,-1 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "tcc+", "tuu=");
+
+ // true hole
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,10 0,0 0)(2 2,10 5,2 8,2 2))",
+ expected("tiu+")("tiu+"));
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,10 0,0 0)(2 2,10 5,2 8,2 2))",
+ expected("mcu+")("ecc=")("tiu+")("mxc="));
+
+ // fake hole
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ expected("tuu+")("tiu+"));
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ expected("mcu+")("tuc=")("tcu+")("mxc="));
+
+ // true hole
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ expected("mcu+")("mic=")("tcu+")("txc="));
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 8)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ expected("mcu+")("mic=")("tcc+")("txu="));
+
+ // SPIKE - NON-ENDPOINT - NON-OPPOSITE
+
+ // spike - neq eq
+ test_geometry<ls, poly>("LINESTRING(2 2.0036594926050877,4 4,1 1.0022887548647630)",
+ "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("mcc+")("txu=")("tcu=")("mxc="));
+ // spike - eq eq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,1 1.0022887548647630)",
+ "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("tcc+")("txu=")("tcu=")("mxc="));
+ // spike - eq neq
+ test_geometry<ls, poly>("LINESTRING(0 0,3 3.0031983963093536,1 1.0022887548647630)",
+ "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("tcc+")("mxu=")("mcu=")("mxc="));
+ // spike - neq neq
+ test_geometry<ls, poly>("LINESTRING(1 1.0022887548647630,3 3.0031983963093536,2 2.0036594926050877)",
+ "POLYGON((0 0,4 4,6 3,6 0,0 0))",
+ expected("mcc+")("mxu=")("mcu=")("mxc="));
+ // spike - out neq
+ test_geometry<ls, poly>("LINESTRING(0 -0.0030515201230775146,3 3.0024370300767784,2 2.0021346673827409)",
+ "POLYGON((1 1,4 4,6 3,6 0,1 1))",
+ expected("mcc+")("mxu=")("mcu=")("mxc="));
+ // spike - out eq
+ test_geometry<ls, poly>("LINESTRING(0 -0.0030515201230775146,4 4,2 2.0021346673827409)",
+ "POLYGON((1 1,4 4,6 3,6 0,1 1))",
+ expected("mcc+")("txu=")("tcu=")("mxc="));
+ // spike - out out/eq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2.0036594926050877)",
+ "POLYGON((1 0,4 4,6 3,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2.0036594926050877)",
+ "POLYGON((0 1,4 4,6 3,6 0,-1 -1,0 1))",
+ expected("tiu+"));
+ // spike - out out/neq
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4,2 2.0036594926050877)",
+ "POLYGON((4 0,4 5,6 3,4 0))",
+ expected("muu+"));
+ test_geometry<ls, poly>("LINESTRING(0 0,4 4.0024308111527205,2 2.0048800944714089)",
+ "POLYGON((0 4,5 4,6 3,6 0,-1 -1,0 4))",
+ expected("miu+"));
+
+ test_geometry<ls, poly>("LINESTRING(0 1,1 1.0012195839797347,0 1)",
+ "POLYGON((0 0,3 3,3 0,0 0))",
+ expected("muu+"));
+ test_geometry<ls, poly>("LINESTRING(0 1,3 3,0 1)",
+ "POLYGON((0 0,3 3,3 0,0 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(0 1,0 0,0 1)",
+ "POLYGON((0 0,3 3,3 0,0 0))",
+ expected("tuu+"));
+
+ // SPIKE - NON-ENDPOINT - OPPOSITE
+
+ // opposite - eq eq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2.0036594926050877)",
+ "POLYGON((-1 -1,0 0,4 4,6 3,-1 -1))",
+ expected("tcu+")("txc=")("tcc=")("mxu="));
+ // opposite - neq eq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2.0036594926050877)",
+ "POLYGON((-1 -1,0 0,5 4.9931712414532354,6 3,-1 -1))",
+ expected("mcu+")("txc=")("tcc=")("mxu="));
+ // opposite - eq, neq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2.0036594926050877)",
+ "POLYGON((-2 -2,-1 -1.0022887548647628,4 4,6 3,-2 -2))",
+ expected("tcu+")("mxc=")("mcc=")("mxu="));
+ // opposite - neq neq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2.0036594926050877)",
+ "POLYGON((-2 -2,-1 -1.0022887548647628,3 3.0031983963093536,6 3,-2 -2))",
+ expected("mcu+")("mxc=")("mcc=")("mxu="));
+ // opposite - neq neq
+ test_geometry<ls, poly>("LINESTRING(6 6,4 4,0 0,2 2.0036594926050877)",
+ "POLYGON((-2 -2,-1 -1.0022887548647628,3 3.0031983963093536,5 4.9931712414532354,6 3,-2 -2))",
+ expected("mcu+")("mxc=")("mcc=")("mxu="));
+
+ // spike vs internal
+ test_geometry<ls, poly>("LINESTRING(0 1,1 1,0 1)", // --
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(1 2,1 1,1 2)", // |
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(0 2,1 1,0 2)", // \ (avoid multi-line comment)
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(2 0,1 1,2 0)", // \ (avoid multi-line comment)
+ "POLYGON((1 0,1 1,2 1,2 0,1 0))",
+ expected("tiu+")("tiu+")("txu+")); // TODO: should spike point be duplicated?
+ test_geometry<ls, poly>("LINESTRING(0 0,1 1,0 0)", // /
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+ test_geometry<ls, poly>("LINESTRING(2 2,1 1,2 2)", // /
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tuu+"));
+
+ test_geometry<ls, poly>("LINESTRING(2 1,1 1,2 1)", // --
+ "POLYGON((1 0,1 1,2 1,1 0))",
+ expected("tcu+")("txc=")("tcc=")("txu="));
+
+ // 21.01.2015
+ test_geometry<ls, poly>("LINESTRING(1 2.9977189008308085,3 1.0004570537241195)",
+ "POLYGON((0 0,0 4,4 4,4 0,2 2,0 0))",
+ expected("mcu+")("mxc="));
+
+ // extended
+ test_geometry<ls, poly>("LINESTRING(1 6.9651356719477091,4 4,7 1.0022887548647630)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("tcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(1 6.9651356719477091,3 4.9931712414532363,7 1.0022887548647630)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(1 6.9651356719477091,5 3.0031983963093536,7 1.0022887548647630)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(4 4,7 1.0022887548647630)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("tcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(5 3.0031983963093536,7 1.0022887548647630)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcu+")("mxc="));
+ // reversed
+ test_geometry<ls, poly>("LINESTRING(7 1.0022887548647630,4 4,1 6.9651356719477091)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("tiu="));
+ test_geometry<ls, poly>("LINESTRING(7 1.0022887548647630,3 4.9931712414532363,1 6.9651356719477091)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("miu="));
+ test_geometry<ls, poly>("LINESTRING(7 1.0022887548647630,5 3.0031983963093536,1 6.9651356719477091)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("ccc=")("miu="));
+ test_geometry<ls, poly>("LINESTRING(7 1.0022887548647630,4 4)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("txu="));
+ test_geometry<ls, poly>("LINESTRING(7 1.0022887548647630,5 3.0031983963093536)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("mxu="));
+ test_geometry<ls, poly>("LINESTRING(7 1.0022887548647630,3 4.9931712414532363)",
+ "POLYGON((0 0,0 8,8 8,8 0,4 4,0 0))",
+ expected("mcc+")("miu="));
+
+ // 23.01.2015 - spikes
+ test_geometry<ls, poly>("LINESTRING(3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 1.7773315888299086)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("miu+")("miu+")("miu+")("mxu+"));
+ test_geometry<ls, poly>("LINESTRING(7 8, 6 10.035925377760330, 11 -0.31552621163523403)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ expected("miu+")("iuu+"));
+
+ // 25.01.2015
+ test_geometry<ls, poly>("LINESTRING(2 3, 4 5, 0 5.9782377228588262, 5 6.0009072995372446)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))",
+ expected("miu+")("miu+")("mcu+")("mxc="));
+ test_geometry<ls, poly>("LINESTRING(0 5.9782377228588262, 5 6.0009072995372446)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))",
+ expected("miu+")("mcu+")("mxc="));
+}
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+
+//#if ! defined(_MSC_VER)
+// test_all<long double>();
+//#endif
+
+//#if defined(HAVE_TTMATH)
+// test_all<ttmath_big>();
+//#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear.cpp
new file mode 100644
index 000000000..df543bf2d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear.cpp
@@ -0,0 +1,687 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+//TEST
+//#include <to_svg.hpp>
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> pt;
+ typedef bg::model::linestring<pt> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ // NOTE: currently for the first endpoint of the Linestring on collinear segment
+ // is_collinear flags are set to FALSE!
+ // E.g. in the first test tii++, NOT tii==
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,2 0)", "tii++", "txx==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(2 0,0 0)", "tix+=", "txi=+");
+
+ test_geometry<ls, ls>("LINESTRING(1 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
+ test_geometry<ls, ls>("LINESTRING(1 0,0 0)", "LINESTRING(0 0,1 0,2 0)", "txi=+", "tiu+=");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 0)", "LINESTRING(0 0,1 0,2 0)", "tii++", "txx==");
+ test_geometry<ls, ls>("LINESTRING(1 1,1 0)", "LINESTRING(0 0,1 0,2 0)", "txu++");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "tii++", "txu==");
+ test_geometry<ls, ls>("LINESTRING(2 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "txi=+", "tix+=");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,1 1)", "tuu++");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,0 0)", "tix+=", "tui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,2 0)", "tii++", "txx==");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 1,1 0)", "tux++");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(0 0,1 0)", "tii++", "tux==");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(2 0,1 0)", "tix+=", "txi=+");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 1,1 0,3 0,3 1)", "mii++", "ccc==", "muu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 -1,1 0,3 0,3 -1)", "mii++", "ccc==", "muu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 1,3 0,1 0,1 1)", "miu+=", "mui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 -1,3 0,1 0,1 -1)", "miu+=", "mui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 1,2 0,4 0,4 1)", "tii++", "ccc==", "tuu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 -1,2 0,4 0,4 -1)", "tii++", "ccc==", "tuu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 1,4 0,2 0,2 1)", "tiu+=", "tui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 -1,4 0,2 0,2 -1)", "tiu+=", "tui=+");
+
+ // same as above - TODO: reverse manually or automatically for all tests
+ /*test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 1,1 0,2 0,3 0,3 1)", "mii", "ecc", "muu");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 -1,1 0,2 0,3 0,3 -1)", "mii", "ecc", "muu");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 1,3 0,2 0,1 0,1 1)", "miu", "ecc", "mui");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 -1,3 0,2 0,1 0,1 -1)", "miu", "ecc", "mui");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 1,2 0,3 0,4 0,4 1)", "tii", "ecc", "tuu");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 -1,2 0,3 0,4 0,4 -1)", "tii", "ecc", "tuu");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 1,4 0,3 0,2 0,2 1)", "tiu", "ecc", "tui");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 -1,4 0,3 0,2 0,2 -1)", "tiu", "ecc", "tui");*/
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(1 0,2 1,3 5)", "tii++", "ecc==", "tux==");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(3 5,2 1,1 0)", "tix+=", "ecc==", "tui=+");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 1,3 5)", "LINESTRING(0 0,1 0,2 1,3 5,4 0)", "txu==", "ecc==", "tii++");
+ test_geometry<ls, ls>("LINESTRING(3 5,2 1,1 0)", "LINESTRING(0 0,1 0,2 1,3 5,4 0)", "tiu+=", "ecc==", "txi=+");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(-1 -1,1 0,10 0,20 -1)", "mii++", "txu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(20 -1,10 0,1 0,-1 -1)", "miu+=", "txi=+");
+ test_geometry<ls, ls>("LINESTRING(-1 -1,1 0,10 0,20 -1)", "LINESTRING(0 0,10 0)", "mii++", "tux==");
+ test_geometry<ls, ls>("LINESTRING(20 -1,10 0,1 0,-1 -1)", "LINESTRING(0 0,10 0)", "mui=+", "tix+=");
+
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)",
+ expected("tii++")("ecc==")("muu==")("mii++")("muu==")("mii++")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)",
+ expected("tiu+=")("ecc==")("mui=+")("miu+=")("mui=+")("miu+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)",
+ expected("tui=+")("ecc==")("miu+=")("mui=+")("miu+=")("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)",
+ "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)",
+ expected("tuu==")("ecc==")("mii++")("muu==")("mii++")("muu==")("mii++"));
+
+ test_geometry<ls, ls>("LINESTRING(-1 0,1 0,2 1,3 2)", "LINESTRING(4 5,3 2,1 0,0 0)", "mix+=", "txi=+", "ecc==");
+ test_geometry<ls, ls>("LINESTRING(4 5,3 2,1 0,0 0)", "LINESTRING(-1 0,1 0,2 1,3 2)", "mxi=+", "tix+=", "ecc==");
+
+ test_geometry<ls, ls>("LINESTRING(30 1,20 1,10 0,0 0)", "LINESTRING(1 1,2 0,3 1,20 1,25 1)", "mix+=", "tui=+", "muu++");
+ test_geometry<ls, ls>("LINESTRING(1 1,2 0,3 1,20 1,25 1)", "LINESTRING(30 1,20 1,10 0,0 0)", "mxi=+", "tiu+=", "muu++");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,30 0)", "LINESTRING(4 0,4 1,20 1,5 0,1 0)", "muu++", "mui=+", "mix+=");
+ test_geometry<ls, ls>("LINESTRING(4 0,4 1,20 1,5 0,1 0)", "LINESTRING(0 0,30 0)", "muu++", "miu+=", "mxi=+");
+
+ test_geometry<ls, ls>("LINESTRING(30 0,0 0)", "LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)",
+ expected("mui=+")("miu+=")("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)", "LINESTRING(30 0,0 0)",
+ expected("miu+=")("mui=+")("miu+=")("mxi=+"));
+
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ expected("mii++")("iuu++")("muu=="));
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,5 0,4 1)",
+ expected("mii++")("muu++")("muu=="));
+
+ // non-collinear
+ test_geometry<ls, ls>("LINESTRING(0 1,0 0)", "LINESTRING(0 0,1 0,2 0)", "txu++");
+ test_geometry<ls, ls>("LINESTRING(0 1,0 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
+ test_geometry<ls, ls>("LINESTRING(0 1,1 0,2 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
+
+ // SPIKE - NON-ENDPOINT - NON-OPPOSITE
+
+ // spike - neq eq
+ test_geometry<ls, ls>("LINESTRING(2 2,4 4,1 1)", "LINESTRING(0 0,4 4,6 3)",
+ expected("mii++")("txu==")("tiu==")("mxi=+"));
+ // spike - eq eq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,1 1)", "LINESTRING(0 0,4 4,6 3)",
+ expected("tii++")("txu==")("tiu==")("mxi=+"));
+ // spike - eq neq
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)",
+ expected("tii++")("mxu==")("miu==")("mxi=+"));
+ // spike - neq neq
+ test_geometry<ls, ls>("LINESTRING(1 1,3 3,2 2)", "LINESTRING(0 0,4 4,6 3)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ // spike - out neq
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,2 2)", "LINESTRING(1 1,4 4,6 3)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ // spike - out eq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(1 1,4 4,6 3)",
+ expected("mii++")("txu==")("tiu==")("mxi=+"));
+ // spike - out out/eq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(1 0,4 4,6 3)",
+ expected("tuu++"));
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(0 1,4 4,6 3)",
+ expected("tuu++"));
+ // spike - out out/neq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(4 0,4 5,6 3)",
+ expected("muu++"));
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(0 4,5 4,6 3)",
+ expected("muu++"));
+
+ // SPIKE - NON-ENDPOINT - OPPOSITE
+
+ // opposite - eq eq
+ test_geometry<ls, ls>("LINESTRING(6 6,4 4,0 0,2 2)", "LINESTRING(-1 -1,0 0,4 4,6 3)",
+ expected("tiu+=")("txi=+")("tii=+")("mxu=="));
+ test_geometry<ls, ls>("LINESTRING(-1 -1,0 0,4 4,6 3)", "LINESTRING(6 6,4 4,0 0,2 2)",
+ expected("tui=+")("tix+=")("tii+=")("mux=="));
+ // opposite - neq eq
+ test_geometry<ls, ls>("LINESTRING(6 6,4 4,0 0,2 2)", "LINESTRING(-1 -1,0 0,5 5,6 3)",
+ expected("miu+=")("txi=+")("tii=+")("mxu=="));
+ // opposite - eq neq
+ test_geometry<ls, ls>("LINESTRING(6 6,4 4,0 0,2 2)", "LINESTRING(-2 -2,-1 -1,4 4,6 3)",
+ expected("tiu+=")("mxi=+")("mii=+")("mxu=="));
+ // opposite - neq neq
+ test_geometry<ls, ls>("LINESTRING(6 6,4 4,0 0,2 2)", "LINESTRING(-2 -2,-1 -1,3 3,6 3)",
+ expected("miu+=")("mxi=+")("mii=+")("mxu=="));
+ // opposite - neq neq
+ test_geometry<ls, ls>("LINESTRING(6 6,4 4,0 0,2 2)", "LINESTRING(-2 -2,-1 -1,3 3,5 5,6 3)",
+ expected("miu+=")("mxi=+")("mii=+")("mxu=="));
+ // opposite - neq eq
+ test_geometry<ls, ls>("LINESTRING(6 3,3 3,0 0)", "LINESTRING(0 0,2 2,3 3,1 1)",
+ expected("txi=+")("tix+=")("tii+=")("mux=="));
+
+ // SPIKE - ENDPOINT - NON-OPPOSITE
+
+ // spike - neq eq
+ test_geometry<ls, ls>("LINESTRING(2 2,4 4,1 1)", "LINESTRING(0 0,4 4)",
+ expected("mii++")("txx==")("tix==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(2 2,4 4,1 1)", "LINESTRING(4 4,0 0)",
+ expected("miu+=")("txi=+")("tii=+")("mxu=="));
+ // spike - eq eq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,1 1)", "LINESTRING(0 0,4 4)",
+ expected("tii++")("txx==")("tix==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,1 1)", "LINESTRING(4 4,0 0)",
+ expected("tix+=")("txi=+")("tii=+")("mxu=="));
+ // spike - eq neq
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(0 0,4 4)",
+ expected("tii++")("mxu==")("miu==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(4 4,0 0)",
+ expected("tix+=")("mxi=+")("mii=+")("mxu=="));
+ // spike - neq neq
+ test_geometry<ls, ls>("LINESTRING(1 1,3 3,2 2)", "LINESTRING(0 0,4 4)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(1 1,3 3,2 2)", "LINESTRING(4 4,0 0)",
+ expected("miu+=")("mxi=+")("mii=+")("mxu=="));
+ // spike - out neq
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,2 2)", "LINESTRING(1 1,4 4)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,2 2)", "LINESTRING(4 4,1 1)",
+ expected("mix+=")("mxi=+")("mii=+")("mxu=="));
+ // spike - out eq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(1 1,4 4)",
+ expected("mii++")("txx==")("tix==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(4 4,1 1)",
+ expected("mix+=")("txi=+")("tii=+")("mxu=="));
+ // spike - out out/eq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(1 0,4 4)",
+ expected("tux++"));
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(0 1,4 4)",
+ expected("tux++"));
+ // spike - out out/neq
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(4 0,4 5)",
+ expected("muu++"));
+ test_geometry<ls, ls>("LINESTRING(0 0,4 4,2 2)", "LINESTRING(0 4,5 4)",
+ expected("muu++"));
+
+ // 29.01.2015
+ if ( BOOST_GEOMETRY_CONDITION((boost::is_same<T, double>::value)) )
+ {
+ // FAILING - possibly wrong IPs
+ test_geometry<ls, ls>("LINESTRING(3 -0.6,0 -0.9)",
+ "LINESTRING(4 2.232432,1 -0.8,9 0)",
+ expected("mui=+")("miu+="));
+
+ test_geometry<ls, ls>("LINESTRING(3 -0.6,1 -0.8,0 -0.9)",
+ "LINESTRING(4 2.232432,1 -0.8,9 0)",
+ expected("tui=+")("miu+="));
+
+ test_geometry<ls, ls>("LINESTRING(3 -0.6, 0 -0.9, -1 -1)",
+ "LINESTRING(4 2.232432, 0 -0.9, 9 0)",
+ expected("tui=+")("miu+="));
+
+ test_geometry<ls, ls>("LINESTRING(3 -0.6, 0 -0.9, -1 -1, -2 -2)",
+ "LINESTRING(4 2.232432,-1 -1, 0 -0.9, 9 0)",
+ expected("tui=+")("ecc==")("miu+="));
+ }
+
+ test_geometry<ls, ls>("LINESTRING(3 0,0 0)",
+ "LINESTRING(4 2,1 0,9 0)",
+ expected("mui=+")("miu+="));
+
+
+ // 01.02.2015
+ test_geometry<ls, ls>("LINESTRING(6 0,0 0,5 0)",
+ "LINESTRING(2 0,0 0,-10 0)",
+ expected("mii++")("txu==")("tiu==")("mui=+"));
+ // the reversal could be automatic...
+ test_geometry<ls, ls>("LINESTRING(2 0,0 0,-10 0)",
+ "LINESTRING(6 0,0 0,5 0)",
+ expected("mii++")("tux==")("tui==")("miu+="));
+ // sanity check
+ test_geometry<ls, ls>("LINESTRING(6 0,0 0)",
+ "LINESTRING(2 0,0 0,-10 0)",
+ expected("mii++")("txu=="));
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)",
+ "LINESTRING(2 0,0 0,-10 0)",
+ expected("tiu+=")("mui=+"));
+
+ // 03.02.2015
+ test_geometry<ls, ls>("LINESTRING(-7 -8,3 0,4 -1,-7 10)",
+ "LINESTRING(-5 -4,3 0,4 -1,7 -4,2 -1)",
+ expected("tii++")("txu==")("tiu==")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(-7 -8,3 0,4 -1,-7 10)",
+ "LINESTRING(-5 -4,3 0,7 -4,2 -1)",
+ expected("tii++")("mxu==")("miu==")("mui=+"));
+
+ if ( BOOST_GEOMETRY_CONDITION((boost::is_same<T, double>::value)) )
+ {
+ // BUG - the operations are correct but IP coordinates are wrong
+ // ok now also the 3rd turn is wrong
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ test_geometry<ls, ls>("LINESTRING(8 5,5 1,-2 3,1 10)",
+ "LINESTRING(1.9375 1.875, 1.7441860465116283 1.9302325581395348, -0.7692307692307692 2.6483516483516487, -2 3, -1.0071942446043165 5.316546762589928)",
+ expected("mii++")("ccc==")("ccc==")("mux=="));
+ // Now tii++ is generated instead of ccc==
+
+ test_geometry<ls, ls>("LINESTRING(8 5,5 1,-2 3,1 10)",
+ "LINESTRING(1.9375 1.875, 1.7441860465116283 1.9302325581395348, -0.7692307692307692 2.6483516483516487, -2 3, -0.5 6.5)",
+ expected("mii++")("ccc==")("ccc==")("mux=="));
+ // Now tii++ is generated instead of ccc==
+
+#endif
+
+ test_geometry<ls, ls>("LINESTRING(-0.5 7,8 1,0 -0.2)",
+ "LINESTRING(2 8,4 0.4,8 1,0 5)",
+ expected("iuu++")("mui=+")("tiu+="));
+
+#if ! ( defined(BOOST_CLANG) && defined(BOOST_GEOMETRY_COMPILER_MODE_RELEASE) )
+
+ // In clang/release mode this testcase gives other results
+
+ // assertion failure in 1.57
+ // FAILING - no assertion failure but the result is not very good
+ test_geometry<ls, ls>("LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ "LINESTRING(31 -97, -46 57, -20 -4)",
+ expected("")(""));
+ test_geometry<ls, ls>("LINESTRING(31 -97, -46 57, -20 -4)",
+ "LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ expected("")(""));
+
+#endif
+
+ }
+
+ // In 1.57 the results of those combinations was different for MinGW
+ // (probably also QCC and GCC5.0) and MSVC/GCC. The results was depending
+ // on the instructions generated by the compiler when calculating the
+ // determinants.
+ // See also: https://svn.boost.org/trac/boost/ticket/8379
+ // https://github.com/boostorg/geometry/pull/259
+ if ( BOOST_GEOMETRY_CONDITION((boost::is_same<T, double>::value)) )
+ {
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 20 1)",
+ "LINESTRING(12 10, 13 0.3, 14 0.4, 15 0.5)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 110 1)",
+ "LINESTRING(12 10, 13 0.03, 14 0.04, 15 0.05)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 110 1)",
+ "LINESTRING(102 10, 103 0.93, 104 0.94, 105 0.95)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(100 0, 110 0, 120 1)",
+ "LINESTRING(112 10, 113 0.3, 114 0.4, 115 0.5)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 20 1)",
+ "LINESTRING(15 0.5, 14 0.4, 13 0.3, 12 10)",
+ expected("miu+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 0, 0 0)",
+ "LINESTRING(12 10, 13 0.3, 14 0.4, 15 0.5)",
+ expected("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 0, 0 0)",
+ "LINESTRING(15 0.5, 14 0.4, 13 0.3, 12 10)",
+ expected("muu==")("ccc==")("mii++"));
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 20 1)",
+ "LINESTRING(13 0.3, 14 0.4, 15 0.5)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 20 1)",
+ "LINESTRING(15 0.5, 14 0.4, 13 0.3)",
+ expected("mix+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 0, 0 0)",
+ "LINESTRING(13 0.3, 14 0.4, 15 0.5)",
+ expected("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 0, 0 0)",
+ "LINESTRING(15 0.5, 14 0.4, 13 0.3)",
+ expected("mux==")("ccc==")("mii++"));
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 20 1)",
+ "LINESTRING(12 10, 13 0.3, 14 0.4)",
+ expected("mii++")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 0, 10 0, 20 1)",
+ "LINESTRING(14 0.4, 13 0.3, 12 10)",
+ expected("miu+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 0, 0 0)",
+ "LINESTRING(12 10, 13 0.3, 14 0.4)",
+ expected("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 0, 0 0)",
+ "LINESTRING(14 0.4, 13 0.3, 12 10)",
+ expected("muu==")("mii++"));
+ }
+
+ // TODO:
+ //test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+ //test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+
+ //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
+ //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
+ //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
+
+ //test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");
+
+
+ //if ( boost::is_same<T, double>::value )
+ //{
+ // to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)", "LINESTRING(0 0,2 0,2.5 0,3 1)", "test11.svg");
+ // to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)", "LINESTRING(3 1,2.5 0,2 0,0 0)", "test12.svg");
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,30 0,31 1)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test21.svg");
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,30 0,31 1)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test22.svg");
+
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test31.svg");
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test32.svg");
+ // to_svg<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test33.svg");
+ // to_svg<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test34.svg");
+ //}
+
+ // duplicated
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(2 0,2 0),(3 0,3 0,3 0))",
+ expected("mii++")("ccc==")("ccc==")("txx=="));
+
+ // spike
+ test_geometry<ls, ls>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)",
+ "LINESTRING(30 0,19 0,18 0,0 0)",
+ expected("iuu++")("iuu++")("tiu+=")("mxi=+"));
+ // spike
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,5 0))",
+ "MULTILINESTRING((1 0,8 0,4 0))",
+ expected("mii++")("mix+=")("mux==")("mui==")("mix+=")("mii+=")("mxu==")("mxi=+"));
+
+ /*test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,5 0))",
+ "MULTILINESTRING((1 0,8 0,4 0),(2 0,9 0,5 0))",
+ expected("mii")("ccc")("ccc")("txx"));*/
+
+ // spike vs endpoint
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((-1 0,0 0,-2 0),(11 0,10 0,12 0))",
+ expected("tuu++")("txu++"));
+ // internal turning R vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((1 2,1 1,1 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 0,0 0))",
+ "MULTILINESTRING((2 0,1 0,2 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((0 2,1 1,0 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((2 0,1 1,2 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((2 1,1 1,2 1))",
+ expected("txi=+")("tix+=")("tii+=")("txx=="));
+ // internal turning L vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((2 1,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((1 2,1 1,1 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((2 2,1 1,2 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((0 0,1 1,0 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("txi=+")("tix+=")("tii+=")("txx=="));
+ // spike vs internal turning R
+ test_geometry<mls, mls>("MULTILINESTRING((0 1,1 1,0 1))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 2,1 1,1 2))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 0,1 0,2 0))",
+ "MULTILINESTRING((0 0,1 0,0 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 2,1 1,0 2))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 0,1 1,2 0))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 1,1 1,2 1))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tix+=")("txi=+")("tii=+")("txx=="));
+ // spike vs internal turning L
+ test_geometry<mls, mls>("MULTILINESTRING((2 1,1 1,2 1))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 2,1 1,1 2))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 2,1 1,2 2))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 1,1 1,0 1))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tix+=")("txi=+")("tii=+")("txx=="));
+ // spike vs internal collinear
+ test_geometry<mls, mls>("MULTILINESTRING((0 1,1 1,0 1))",
+ "MULTILINESTRING((2 1,1 1,0 1))",
+ expected("tix+=")("txi=+")("tii=+")("txx=="));
+ // internal collinear vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((2 1,1 1,0 1))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("txi=+")("tix+=")("tii+=")("txx=="));
+ // spike vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((2 2,1 1,2 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((2 0,1 1,2 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((2 1,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("tuu++"));
+ // collinear spikes
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((0 0,1 1,0 0))",
+ expected("tii++")("tix+=")("txi=+")("txx==")
+ ("ecc=="));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((1 1,0 0,1 1))",
+ expected("tix+=")("tii+=")("txx==")("txi==")
+ ("txi=+")("tii=+")("txx==")("tix=="));
+ // non-spike similar
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((-1 0,0 0,2 0))",
+ expected("tii++")("mux=="));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((-1 -1,0 0,2 0))",
+ expected("tii++")("mux=="));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((2 0,0 0,-1 0))",
+ expected("tiu+=")("mui=+"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((2 0,0 0,-1 -1))",
+ expected("tiu+=")("mui=+"));
+
+ // parts of boundaries taken from union A/A buffer_mp1
+ if ( BOOST_GEOMETRY_CONDITION((boost::is_same<T, double>::value)) )
+ {
+ test_geometry<ls, ls>("LINESTRING(6.95629520146761 5.415823381635526,6.989043790736545 5.209056926535316,7 5,6.989043790736547 4.790943073464693,6.956295201467611 4.584176618364482)",
+ "LINESTRING(7.415823381635519 5.043704798532389,7.209056926535308 5.010956209263453,7.000000000000001 5,6.790943073464693 5.010956209263453,6.584176618364483 5.043704798532389)",
+ expected("tuu++"));
+ // the above should give the same result as this:
+ test_geometry<ls, ls>("LINESTRING(6.95629520146761 5.415823381635526,6.989043790736545 5.209056926535316,7 5,6.989043790736547 4.790943073464693,6.956295201467611 4.584176618364482)",
+ "LINESTRING(7.415823381635519 5.043704798532389,7.209056926535308 5.010956209263453,7 5,6.790943073464693 5.010956209263453,6.584176618364483 5.043704798532389)",
+ expected("tuu++"));
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+
+#if ! defined(_MSC_VER)
+ test_all<long double>();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<ttmath_big>();
+#endif
+ return 0;
+}
+
+/*
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(1 0,3 0)", "lsls0000.svg");
+to_svg<ls, ls>("LINESTRING(1 0,3 0)", "LINESTRING(2 0,0 0)", "lsls0001.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(3 0,1 0)", "lsls0002.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(1 0,2 0)", "lsls0003.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(2 0,1 0)", "lsls0004.svg");
+to_svg<ls, ls>("LINESTRING(1 0,2 0)", "LINESTRING(1 0,0 0)", "lsls0005.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,2 0)", "lsls0006.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(2 0,0 0)", "lsls0007.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,3 0)", "LINESTRING(1 0,2 0)", "lsls0008.svg");
+to_svg<ls, ls>("LINESTRING(0 0,3 0)", "LINESTRING(2 0,1 0)", "lsls0009.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(1 0,1 1)", "lsls00010.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(1 1,1 0)", "lsls00011.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(0 0,0 1)", "lsls00012.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(0 1,0 0)", "lsls00013.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(1 0,1 1)", "lsls00014.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(1 1,1 0)", "lsls00015.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(1 0,3 1)", "lsls00016.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(2 0,1 0)", "lsls00017.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,1 0)", "lsls00018.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(1 0,0 0)", "lsls00019.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(1 0,2 0)", "lsls00020.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,2 0)", "lsls000.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,2 0,3 0)", "LINESTRING(0 0,2 0)", "lsls001.svg");
+to_svg<ls, ls>("LINESTRING(1 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "lsls0020.svg");
+to_svg<ls, ls>("LINESTRING(1 0,0 0)", "LINESTRING(0 0,1 0,2 0)", "lsls0021.svg");
+to_svg<ls, ls>("LINESTRING(1 0,2 0)", "LINESTRING(0 0,1 0,2 0)", "lsls0022.svg");
+to_svg<ls, ls>("LINESTRING(1 1,1 0)", "LINESTRING(0 0,1 0,2 0)", "lsls0023.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "lsls0024.svg");
+to_svg<ls, ls>("LINESTRING(2 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "lsls0025.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,1 1)", "lsls00200.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,0 0)", "lsls00211.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,2 0)", "lsls00222.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 1,1 0)", "lsls00233.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(0 0,1 0)", "lsls00244.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(2 0,1 0)", "lsls00255.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,6 0,8 0)", "LINESTRING(1 0,3 0,5 0,6 0,9 0)", "lsls01.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(1 0,3 0,4 0,4 2,4 5)", "lsls02.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(1 0,4 0,4 4)", "lsls031.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(4 0,2 0,0 0)", "lsls032.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(4 0,2 2,0 2)", "lsls0321.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(4 0,2 0)", "lsls033.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(4 0,4 4)", "lsls034.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(4 0,3 1)", "lsls035.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(4 0,4 -1)", "lsls036.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0,4 4)", "LINESTRING(1 0,4 0,4 3)", "lsls04.svg");
+to_svg<ls, ls>("LINESTRING(1 0,2 0,4 0,6 0,8 0)", "LINESTRING(0 0,3 0,5 0,6 0,9 0)", "lsls05.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,10 9)", "lsls061.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,10 -9)", "lsls062.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,-10 9)", "lsls063.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,-10 -9)", "lsls064.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,10 9,10 10)", "LINESTRING(1 0,10 9)", "lsls065.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,9 9)", "lsls071.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,9 -9)", "lsls072.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,-9 9)", "lsls073.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 0,-9 -9)", "lsls074.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,10 0,10 10)", "LINESTRING(1 0,9 9)", "lsls081.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0,10 0,10 10)", "LINESTRING(0 0,9 9)", "lsls082.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(1 0,9 9)", "lsls083.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(9 9,1 0)", "lsls084.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(1 0,2 0)", "lsls085.svg");
+to_svg<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(2 0,1 0)", "lsls086.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(1 1,10 5)", "lsls091.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 5,10 10)", "LINESTRING(1 1,10 5)", "lsls092.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10)", "LINESTRING(19 1,10 5)", "lsls093.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 5,10 10)", "LINESTRING(19 1,10 5)", "lsls094.svg");
+
+to_svg<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(0 0,3 3,6 3)", "1F100F10T.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 1,1 0,3 0,3 1)", "lsls_01.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 -1,1 0,3 0,3 -1)", "lsls_02.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 1,3 0,1 0,1 1)", "lsls_03.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 -1,3 0,1 0,1 -1)", "lsls_04.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 1,2 0,4 0,4 1)", "lsls_05.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 -1,2 0,4 0,4 -1)", "lsls_06.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 1,4 0,2 0,2 1)", "lsls_07.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 -1,4 0,2 0,2 -1)", "lsls_08.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 1,1 0,2 0,3 0,3 1)", "lsls_11.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 -1,1 0,2 0,3 0,3 -1)", "lsls_12.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 1,3 0,2 0,1 0,1 1)", "lsls_13.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 -1,3 0,2 0,1 0,1 -1)", "lsls_14.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 1,2 0,3 0,4 0,4 1)", "lsls_15.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 -1,2 0,3 0,4 0,4 -1)", "lsls_16.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 1,4 0,3 0,2 0,2 1)", "lsls_17.svg");
+to_svg<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 -1,4 0,3 0,2 0,2 -1)", "lsls_18.svg");
+
+to_svg<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,5 0)", "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "lsls11.svg");
+to_svg<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,5 0)", "LINESTRING(5 0,5 5,10 5,10 10,5 10,5 5,0 5)", "lsls12.svg");
+to_svg<ls, ls>("LINESTRING(5 0,5 5,5 10,10 10,10 5,5 5,0 5)", "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "lsls13.svg");
+to_svg<ls, ls>("LINESTRING(5 0,5 5,5 10,10 10,10 5,5 5,0 5)", "LINESTRING(5 0,5 5,10 5,10 10,5 10,5 5,0 5)", "lsls14.svg");
+
+to_svg<ls, ls>("LINESTRING(0 5,10 5,10 10,5 10,5 0)", "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "lsls15.svg");
+to_svg<ls, ls>("LINESTRING(0 5,10 5,10 10,5 10,5 0)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls16.svg");
+to_svg<ls, ls>("LINESTRING(0 5,10 5)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls161.svg");
+to_svg<ls, ls>("LINESTRING(0 5,8 5,10 5)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls162.svg");
+to_svg<ls, ls>("LINESTRING(0 5,8 5)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls1631.svg");
+to_svg<ls, ls>("LINESTRING(0 5,1 5,7 5,8 5)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls1632.svg");
+to_svg<ls, ls>("LINESTRING(0 5,1 5,7 5,8 5)", "LINESTRING(5 10,10 10,10 5,0 5)", "lsls1633.svg");
+to_svg<ls, ls>("LINESTRING(0 5,8 4)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls1641.svg");
+to_svg<ls, ls>("LINESTRING(0 5,8 6)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls1642.svg");
+to_svg<ls, ls>("LINESTRING(1 5,8 4)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls1643.svg");
+to_svg<ls, ls>("LINESTRING(1 5,8 5)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls1644.svg");
+to_svg<ls, ls>("LINESTRING(0 5,5 5,8 4)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls165.svg");
+to_svg<ls, ls>("LINESTRING(0 5,5 5,8 5)", "LINESTRING(5 0,5 10,10 10,10 5,0 5)", "lsls166.svg");
+to_svg<ls, ls>("LINESTRING(0 5,5 5,8 5)", "LINESTRING(0 10,10 0,5 0,5 10,10 10,10 5,0 5)", "lsls167.svg");
+to_svg<ls, ls>("LINESTRING(0 5,5 5,8 5)", "LINESTRING(0 10,5 5,10 0,5 0,5 5,5 10,10 10,10 5,0 5)", "lsls168.svg");
+
+to_svg<ls, ls>("LINESTRING(0 0,0 10,10 10,10 0,0 0)", "LINESTRING(0 2,0 0,10 0,10 10,0 10,0 8,0 2)", "lsls1690.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10,0 10,0 0)", "LINESTRING(0 8,0 0,10 0,10 10,0 10,0 8)", "lsls1691.svg");
+to_svg<ls, ls>("LINESTRING(0 0,10 0,10 10,0 10,0 0)", "LINESTRING(0 2,0 0,10 0,10 10,0 10,0 8)", "lsls1692.svg");
+to_svg<ls, ls>("LINESTRING(0 0,0 10,10 10,10 0,0 0)", "LINESTRING(0 2,0 0,10 0,10 10,0 10,0 8)", "lsls1693.svg");
+to_svg<ls, ls>("LINESTRING(0 2,0 0,10 0,10 10,0 10,0 8)", "LINESTRING(0 0,10 0,10 10,0 10,0 0)", "lsls1694.svg");
+to_svg<ls, ls>("LINESTRING(0 2,0 0,10 0,10 10,0 10,0 8)", "LINESTRING(0 0,0 10,10 10,10 0,0 0)", "lsls1695.svg");
+
+to_svg<ls>("LINESTRING(0 8,0 0,10 0,10 10,0 10,0 2)", "ls1.svg");
+to_svg<ls>("LINESTRING(8 8,0 0,10 0,10 10,0 10,8 2)", "ls2.svg");
+
+typedef bg::model::multi_linestring<ls> mls;
+to_svg<ls, mls>("LINESTRING(0 5,10 5,10 10,5 10,5 0)", "MULTILINESTRING((5 0,5 7),(5 8,5 10,10 10,10 5,0 5))", "lsls17.svg");
+to_svg<ls, mls>("LINESTRING(0 5,10 5,10 10,5 10,5 0)", "MULTILINESTRING((5 0,5 4,5 6,5 7),(5 8,5 10,10 10,10 5,0 5))", "lsls18.svg");
+to_svg<ls, mls>("LINESTRING(0 5,10 5,10 10,5 10,5 0)", "MULTILINESTRING((5 0,5 8),(5 7,5 10,10 10,10 5,0 5))", "lsls19.svg");
+to_svg<mls, ls>("MULTILINESTRING((5 0,5 7),(5 8,5 10,10 10,10 5,0 5))", "LINESTRING(0 5,10 5,10 10,5 10,5 0)", "lsls20.svg");
+to_svg<mls, ls>("MULTILINESTRING((5 0,5 8),(5 7,5 10,10 10,10 5,0 5))", "LINESTRING(0 5,10 5,10 10,5 10,5 0)", "lsls21.svg");
+
+to_svg<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,5 0)", "LINESTRING(0 5,5 5,0 10,10 10,10 5,5 5,5 0)", "lsls100.svg");
+
+to_svg<ls, ls>("LINESTRING(5 0,5 5,5 0)", "LINESTRING(0 5,5 5,0 10,2 10,5 5,5 10,10 10,10 5,5 5,10 2,10 0,8 0,5 5,5 0)", "lsls101.svg");
+*/
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_geo.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_geo.cpp
new file mode 100644
index 000000000..4b3a22d47
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_geo.cpp
@@ -0,0 +1,50 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename T>
+void test_radian()
+{
+ typedef bg::model::point<T, 2, bg::cs::geographic<bg::radian> > pt;
+ typedef bg::model::linestring<pt> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ bg::srs::spheroid<double> sph_wgs84(6378137.0, 6356752.3142451793);
+ boost::geometry::strategy::intersection::geographic_segments<> wgs84(sph_wgs84);
+
+ test_geometry<ls, mls>(
+ "LINESTRING(0 0, -3.14159265358979 0)",
+ "MULTILINESTRING((-2.1467549799530232 -0.12217304763960295,"
+ "-2.5481807079117185 -0.90757121103705041,"
+ "-2.6529004630313784 0.85521133347722067,"
+ " 0.92502450355699373 0.62831853071795796,"
+ "-2.5307274153917754 0,"
+ " 2.8099800957108676 1.0646508437165401,"
+ "-1.6057029118347816 -1.5009831567151219,"
+ " 0.2268928027592626 1.0646508437165401,"
+ "-2.199114857512853 -0.017453292519943278,"
+ " 0 0.31415926535897898,"
+ " 0 0.57595865315812822,"
+ " 1.0471975511965967 -0.73303828583761765,"
+ " 2.1118483949131366 -0.54105206811824158))",
+ expected("mii++")("muu==")("iuu++")("iuu++")("iuu++")("iuu++"),
+ wgs84);
+}
+
+int test_main(int, char* [])
+{
+ test_radian<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_sph.cpp b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_sph.cpp
new file mode 100644
index 000000000..962bc8c38
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_sph.cpp
@@ -0,0 +1,442 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_get_turns.hpp"
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::degree> > pt;
+ typedef bg::model::linestring<pt> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ // NOTE: currently for the first endpoint of the Linestring on collinear segment
+ // is_collinear flags are set to FALSE!
+ // E.g. in the first test tii++, NOT tii==
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,2 0)", "tii++", "txx==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0)", "LINESTRING(2 0,0 0)", "tix+=", "txi=+");
+
+ test_geometry<ls, ls>("LINESTRING(1 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
+ test_geometry<ls, ls>("LINESTRING(1 0,0 0)", "LINESTRING(0 0,1 0,2 0)", "txi=+", "tiu+=");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 0)", "LINESTRING(0 0,1 0,2 0)", "tii++", "txx==");
+ test_geometry<ls, ls>("LINESTRING(1 1,1 0)", "LINESTRING(0 0,1 0,2 0)", "txu++");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "tii++", "txu==");
+ test_geometry<ls, ls>("LINESTRING(2 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "txi=+", "tix+=");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,1 1)", "tuu++");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,0 0)", "tix+=", "tui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,2 0)", "tii++", "txx==");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 1,1 0)", "tux++");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(0 0,1 0)", "tii++", "tux==");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(2 0,1 0)", "tix+=", "txi=+");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 1,1 0,3 0,3 1)", "mii++", "ccc==", "muu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 -1,1 0,3 0,3 -1)", "mii++", "ccc==", "muu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 1,3 0,1 0,1 1)", "miu+=", "mui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 -1,3 0,1 0,1 -1)", "miu+=", "mui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 1,2 0,4 0,4 1)", "tii++", "ccc==", "tuu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 -1,2 0,4 0,4 -1)", "tii++", "ccc==", "tuu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 1,4 0,2 0,2 1)", "tiu+=", "tui=+");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 -1,4 0,2 0,2 -1)", "tiu+=", "tui=+");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(1 0,2 1,3 5)", "tii++", "ecc==", "tux==");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(3 5,2 1,1 0)", "tix+=", "ecc==", "tui=+");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 1,3 5)", "LINESTRING(0 0,1 0,2 1,3 5,4 0)", "txu==", "ecc==", "tii++");
+ test_geometry<ls, ls>("LINESTRING(3 5,2 1,1 0)", "LINESTRING(0 0,1 0,2 1,3 5,4 0)", "tiu+=", "ecc==", "txi=+");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(-1 -1,1 0,10 0,20 -1)", "mii++", "txu==");
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(20 -1,10 0,1 0,-1 -1)", "miu+=", "txi=+");
+ test_geometry<ls, ls>("LINESTRING(-1 -1,1 0,10 0,20 -1)", "LINESTRING(0 0,10 0)", "mii++", "tux==");
+ test_geometry<ls, ls>("LINESTRING(20 -1,10 0,1 0,-1 -1)", "LINESTRING(0 0,10 0)", "mui=+", "tix+=");
+
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)",
+ expected("tii++")("ecc==")("muu==")("mii++")("muu==")("mii++")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)",
+ expected("tiu+=")("ecc==")("mui=+")("miu+=")("mui=+")("miu+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)",
+ expected("tui=+")("ecc==")("miu+=")("mui=+")("miu+=")("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)",
+ "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)",
+ expected("tuu==")("ecc==")("mii++")("muu==")("mii++")("muu==")("mii++"));
+
+ if (BOOST_GEOMETRY_CONDITION((boost::is_same<T, double>::value)))
+ {
+ test_geometry<ls, ls>("LINESTRING(-1 0,1 0,2 1.0004570537241201524198894179384922,3 2)",
+ "LINESTRING(4 5,3 2,1 0,0 0)",
+ "mix+=", "txi=+", "ecc==");
+ test_geometry<ls, ls>("LINESTRING(4 5,3 2,1 0,0 0)",
+ "LINESTRING(-1 0,1 0,2 1.0004570537241201524198894179384922,3 2)",
+ "mxi=+", "tix+=", "ecc==");
+ }
+
+ test_geometry<ls, ls>("LINESTRING(30 0,20 0,1 1,-1 -1)", "LINESTRING(0 -1,0 0,1 -1,20 0,25 0)", "mix+=", "tui=+", "muu++");
+ test_geometry<ls, ls>("LINESTRING(0 -1,0 0,1 -1,20 0,25 0)", "LINESTRING(30 0,20 0,1 1,-1 -1)", "mxi=+", "tiu+=", "muu++");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,30 0)", "LINESTRING(4 0,4 1,20 1,5 0,1 0)", "muu++", "mui=+", "mix+=");
+ test_geometry<ls, ls>("LINESTRING(4 0,4 1,20 1,5 0,1 0)", "LINESTRING(0 0,30 0)", "muu++", "miu+=", "mxi=+");
+
+ test_geometry<ls, ls>("LINESTRING(30 0,0 0)", "LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)",
+ expected("mui=+")("miu+=")("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)", "LINESTRING(30 0,0 0)",
+ expected("miu+=")("mui=+")("miu+=")("mxi=+"));
+
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ expected("mii++")("iuu++")("muu=="));
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,5 0,4 1)",
+ expected("mii++")("muu++")("muu=="));
+
+ // non-collinear
+ test_geometry<ls, ls>("LINESTRING(0 1,0 0)", "LINESTRING(0 0,1 0,2 0)", "txu++");
+ test_geometry<ls, ls>("LINESTRING(0 1,0 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
+ test_geometry<ls, ls>("LINESTRING(0 1,1 0,2 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
+
+ // SPIKE - NON-ENDPOINT - NON-OPPOSITE
+
+ // spike - neq eq
+ test_geometry<ls, ls>("LINESTRING(0 2,0 4,0 1)", "LINESTRING(0 0,0 4,6 3)",
+ expected("mii++")("txu==")("tiu==")("mxi=+"));
+ // spike - eq eq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 1)", "LINESTRING(0 0,0 4,6 3)",
+ expected("tii++")("txu==")("tiu==")("mxi=+"));
+ // spike - eq neq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 3,0 1)", "LINESTRING(0 0,0 4,6 3)",
+ expected("tii++")("mxu==")("miu==")("mxi=+"));
+ // spike - neq neq
+ test_geometry<ls, ls>("LINESTRING(0 1,0 3,0 2)", "LINESTRING(0 0,0 4,6 3)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ // spike - out neq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 3,0 2)", "LINESTRING(0 1,0 4,6 3)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ // spike - out eq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(0 1,0 4,6 3)",
+ expected("mii++")("txu==")("tiu==")("mxi=+"));
+ // spike - out out/eq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(1 0,0 4,6 3)",
+ expected("tuu++"));
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(-1 0,0 4,6 3)",
+ expected("tuu++"));
+ // spike - out out/neq
+ test_geometry<ls, ls>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(-1 0,1 0,6 3)",
+ expected("muu++"));
+ test_geometry<ls, ls>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(-1 0,1 0,6 3)",
+ expected("muu++"));
+
+ // SPIKE - NON-ENDPOINT - OPPOSITE
+
+ // opposite - eq eq
+ test_geometry<ls, ls>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -1,0 0,0 4,6 3)",
+ expected("tiu+=")("txi=+")("tii=+")("mxu=="));
+ test_geometry<ls, ls>("LINESTRING(0 -1,0 0,0 4,6 3)", "LINESTRING(0 6,0 4,0 0,0 2)",
+ expected("tui=+")("tix+=")("tii+=")("mux=="));
+ // opposite - neq eq
+ test_geometry<ls, ls>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -1,0 0,0 5,6 3)",
+ expected("miu+=")("txi=+")("tii=+")("mxu=="));
+ // opposite - eq neq
+ test_geometry<ls, ls>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -2,0 -1,0 4,6 3)",
+ expected("tiu+=")("mxi=+")("mii=+")("mxu=="));
+ // opposite - neq neq
+ test_geometry<ls, ls>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -2,0 -1,0 3,6 3)",
+ expected("miu+=")("mxi=+")("mii=+")("mxu=="));
+ // opposite - neq neq
+ test_geometry<ls, ls>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -2,0 -1,0 3,0 5,6 3)",
+ expected("miu+=")("mxi=+")("mii=+")("mxu=="));
+ // opposite - neq eq
+ test_geometry<ls, ls>("LINESTRING(6 3,0 3,0 0)", "LINESTRING(0 0,0 2,0 3,0 1)",
+ expected("txi=+")("tix+=")("tii+=")("mux=="));
+
+ // SPIKE - ENDPOINT - NON-OPPOSITE
+
+ // spike - neq eq
+ test_geometry<ls, ls>("LINESTRING(0 2,0 4,0 1)", "LINESTRING(0 0,0 4)",
+ expected("mii++")("txx==")("tix==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 2,0 4,0 1)", "LINESTRING(0 4,0 0)",
+ expected("miu+=")("txi=+")("tii=+")("mxu=="));
+ // spike - eq eq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 1)", "LINESTRING(0 0,0 4)",
+ expected("tii++")("txx==")("tix==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 1)", "LINESTRING(0 4,0 0)",
+ expected("tix+=")("txi=+")("tii=+")("mxu=="));
+ // spike - eq neq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 3,0 1)", "LINESTRING(0 0,0 4)",
+ expected("tii++")("mxu==")("miu==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,0 3,0 1)", "LINESTRING(0 4,0 0)",
+ expected("tix+=")("mxi=+")("mii=+")("mxu=="));
+ // spike - neq neq
+ test_geometry<ls, ls>("LINESTRING(0 1,0 3,0 2)", "LINESTRING(0 0,0 4)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 1,0 3,0 2)", "LINESTRING(0 4,0 0)",
+ expected("miu+=")("mxi=+")("mii=+")("mxu=="));
+ // spike - out neq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 3,0 2)", "LINESTRING(0 1,0 4)",
+ expected("mii++")("mxu==")("miu==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,0 3,0 2)", "LINESTRING(0 4,0 1)",
+ expected("mix+=")("mxi=+")("mii=+")("mxu=="));
+ // spike - out eq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(0 1,0 4)",
+ expected("mii++")("txx==")("tix==")("mxi=+"));
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(0 4,0 1)",
+ expected("mix+=")("txi=+")("tii=+")("mxu=="));
+ // spike - out out/eq
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(1 0,0 4)",
+ expected("tux++"));
+ test_geometry<ls, ls>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(-1 0,0 4)",
+ expected("tux++"));
+ // spike - out out/neq
+ test_geometry<ls, ls>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(-1 0,1 0)",
+ expected("muu++"));
+ test_geometry<ls, ls>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(1 0,-1 0)",
+ expected("muu++"));
+
+
+ test_geometry<ls, ls>("LINESTRING(3 0,0 0)",
+ "LINESTRING(4 2,1 0,9 0)",
+ expected("mui=+")("miu+="));
+
+
+ // 01.02.2015
+ test_geometry<ls, ls>("LINESTRING(6 0,0 0,5 0)",
+ "LINESTRING(2 0,0 0,-10 0)",
+ expected("mii++")("txu==")("tiu==")("mui=+"));
+ // the reversal could be automatic...
+ test_geometry<ls, ls>("LINESTRING(2 0,0 0,-10 0)",
+ "LINESTRING(6 0,0 0,5 0)",
+ expected("mii++")("tux==")("tui==")("miu+="));
+ // sanity check
+ test_geometry<ls, ls>("LINESTRING(6 0,0 0)",
+ "LINESTRING(2 0,0 0,-10 0)",
+ expected("mii++")("txu=="));
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)",
+ "LINESTRING(2 0,0 0,-10 0)",
+ expected("tiu+=")("mui=+"));
+
+ if ( BOOST_GEOMETRY_CONDITION((boost::is_same<T, double>::value)) )
+ {
+ test_geometry<ls, ls>("LINESTRING(0 -1, 10 -1, 20 1)",
+ "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 -1, 10 -1, 20 1)",
+ "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392, 12 10)",
+ expected("miu+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 -1, 0 -1)",
+ "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
+ expected("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 -1, 0 0)",
+ "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392, 12 10)",
+ expected("muu==")("ccc==")("mii++"));
+
+ test_geometry<ls, ls>("LINESTRING(0 -1, 10 -1, 20 1)",
+ "LINESTRING(12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
+ expected("mii++")("ccc==")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 -1, 10 -1, 20 1)",
+ "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392)",
+ expected("mix+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 -1, 0 -1)",
+ "LINESTRING(12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
+ expected("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 -1, 0 -1)",
+ "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392)",
+ expected("mux==")("ccc==")("mii++"));
+
+ test_geometry<ls, ls>("LINESTRING(0 -1, 10 -1, 20 1)",
+ "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0)",
+ expected("mii++")("mux=="));
+ test_geometry<ls, ls>("LINESTRING(0 -1, 10 -1, 20 1)",
+ "LINESTRING(15 0, 12.5 -0.50051443471392, 12 10)",
+ expected("miu+=")("mui=+"));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 -1, 0 -1)",
+ "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0)",
+ expected("mui=+")("mix+="));
+ test_geometry<ls, ls>("LINESTRING(20 1, 10 -1, 0 -1)",
+ "LINESTRING(15 0, 12.5 -0.50051443471392, 12 10)",
+ expected("muu==")("mii++"));
+ }
+
+ // TODO:
+ //test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+ //test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+
+ //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
+ //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
+ //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
+
+ //test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");
+
+
+ //if ( boost::is_same<T, double>::value )
+ //{
+ // to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)", "LINESTRING(0 0,2 0,2.5 0,3 1)", "test11.svg");
+ // to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)", "LINESTRING(3 1,2.5 0,2 0,0 0)", "test12.svg");
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,30 0,31 1)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test21.svg");
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,30 0,31 1)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test22.svg");
+
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test31.svg");
+ // to_svg<ls, ls>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test32.svg");
+ // to_svg<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test33.svg");
+ // to_svg<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test34.svg");
+ //}
+
+ // duplicated
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(2 0,2 0),(3 0,3 0,3 0))",
+ expected("mii++")("ccc==")("ccc==")("txx=="));
+
+ // spike
+ test_geometry<ls, ls>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)",
+ "LINESTRING(30 0,19 0,18 0,0 0)",
+ expected("iuu++")("iuu++")("tiu+=")("mxi=+"));
+ // spike
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,5 0))",
+ "MULTILINESTRING((1 0,8 0,4 0))",
+ expected("mii++")("mix+=")("mux==")("mui==")("mix+=")("mii+=")("mxu==")("mxi=+"));
+
+ /*test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,5 0))",
+ "MULTILINESTRING((1 0,8 0,4 0),(2 0,9 0,5 0))",
+ expected("mii")("ccc")("ccc")("txx"));*/
+
+ // spike vs endpoint
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((-1 0,0 0,-2 0),(11 0,10 0,12 0))",
+ expected("tuu++")("txu++"));
+ // internal turning R vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((1 2,1 1,1 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 0,0 0))",
+ "MULTILINESTRING((2 0,1 0,2 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((0 2,1 1,0 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((2 0,1 1,2 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,2 1))",
+ "MULTILINESTRING((2 1,1 1,2 1))",
+ expected("txi=+")("tix+=")("tii+=")("txx=="));
+ // internal turning L vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((2 1,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((1 2,1 1,1 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((2 2,1 1,2 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((0 0,1 1,0 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 0,1 1,0 1))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("txi=+")("tix+=")("tii+=")("txx=="));
+ // spike vs internal turning R
+ test_geometry<mls, mls>("MULTILINESTRING((0 1,1 1,0 1))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 2,1 1,1 2))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 0,1 0,2 0))",
+ "MULTILINESTRING((0 0,1 0,0 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 2,1 1,0 2))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 0,1 1,2 0))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 1,1 1,2 1))",
+ "MULTILINESTRING((1 0,1 1,2 1))",
+ expected("tix+=")("txi=+")("tii=+")("txx=="));
+ // spike vs internal turning L
+ test_geometry<mls, mls>("MULTILINESTRING((2 1,1 1,2 1))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((1 2,1 1,1 2))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((2 2,1 1,2 2))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 1,1 1,0 1))",
+ "MULTILINESTRING((1 0,1 1,0 1))",
+ expected("tix+=")("txi=+")("tii=+")("txx=="));
+ // spike vs internal collinear
+ test_geometry<mls, mls>("MULTILINESTRING((0 1,1 1,0 1))",
+ "MULTILINESTRING((2 1,1 1,0 1))",
+ expected("tix+=")("txi=+")("tii=+")("txx=="));
+ // internal collinear vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((2 1,1 1,0 1))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("txi=+")("tix+=")("tii+=")("txx=="));
+ // spike vs spike
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((2 2,1 1,2 2))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((2 0,1 1,2 0))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((2 1,1 1,2 1))",
+ expected("tuu++"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((0 1,1 1,0 1))",
+ expected("tuu++"));
+ // collinear spikes
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((0 0,1 1,0 0))",
+ expected("tii++")("tix+=")("txi=+")("txx==")
+ ("ecc=="));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,1 1,0 0))",
+ "MULTILINESTRING((1 1,0 0,1 1))",
+ expected("tix+=")("tii+=")("txx==")("txi==")
+ ("txi=+")("tii=+")("txx==")("tix=="));
+ // non-spike similar
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((-1 0,0 0,2 0))",
+ expected("tii++")("mux=="));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((-1 -1,0 0,2 0))",
+ expected("tii++")("mux=="));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((2 0,0 0,-1 0))",
+ expected("tiu+=")("mui=+"));
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0))",
+ "MULTILINESTRING((2 0,0 0,-1 -1))",
+ expected("tiu+=")("mui=+"));
+}
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+
+#if ! defined(_MSC_VER)
+ test_all<long double>();
+#endif
+
+#if defined(HAVE_TTMATH)
+ test_all<ttmath_big>();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_cases.hpp b/src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_cases.hpp
new file mode 100644
index 000000000..865e2bef7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_cases.hpp
@@ -0,0 +1,1549 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP
+#define BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP
+
+
+#include <string>
+
+// See powerpoint doc/other/test_cases/overlay_cases.ppt
+// Note that there are some duplicates with single (80 and on)
+
+static std::string case_multi_simplex[2] =
+{
+ "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))",
+ "MULTIPOLYGON(((3 0,0 3,4 5,3 0)))"
+};
+
+// To mix multi/single
+static std::string case_single_simplex = "POLYGON((3 0,0 3,4 5,3 0))";
+
+static std::string case_multi_no_ip[2] =
+{
+ "MULTIPOLYGON(((4 1,0 7,7 9,4 1)),((8 1,6 3,10 4,8 1)),((12 6,10 7,13 8,12 6)))",
+ "MULTIPOLYGON(((14 4,8 8,15 10,14 4)),((15 3,18 9,20 2,15 3)),((3 4,1 7,5 7,3 4)))"
+};
+
+static std::string case_multi_2[2] =
+{
+ "MULTIPOLYGON(((4 3,2 7,10 9,4 3)),((8 1,6 3,10 4,8 1)),((12 6,10 7,13 8,12 6)))",
+ "MULTIPOLYGON(((14 4,8 8,15 10,14 4)),((15 3,18 9,20 2,15 3)),((5 5,4 7,7 7,5 5)))"
+};
+
+// Case 58, same as case_58 IET (single) but here the second polygon is inverted
+// To check behaviour of difference, but in an intersection operation
+static std::string case_58_multi[8] =
+{
+ /* a */ "MULTIPOLYGON(((3 3,3 4,4 4,4 3,3 3)))",
+ /* b */ "MULTIPOLYGON(((0 2,0 5,4 4,5 0,0 2),(4 4,1 4,1 3,4 4),(4 4,2 3,2 2,4 4),(4 4,3 2,4 2,4 4)))",
+ /* a inv */ "MULTIPOLYGON(((-1 -1,-1 6,6 6,6 -1,-1 -1),(3 3,4 3,4 4,3 4,3 3)))",
+ /* b inv */ "MULTIPOLYGON(((6 6,6 0,5 0,4 4,0 5,0 6,6 6)),((4 4,1 3,1 4,4 4)),((4 4,2 2,2 3,4 4)),((4 4,4 2,3 2,4 4)))",
+
+ // simpler versions of b
+ /* b */ "MULTIPOLYGON(((0 2,0 5,4 4,5 0,0 2),(4 4,1 4,1 3,4 4)))",
+ /* b */ "MULTIPOLYGON(((0 2,0 5,4 4,5 0,0 2),(4 4,3 2,4 2,4 4)))",
+ /* b */ "MULTIPOLYGON(((0 2,0 5,4 4,5 0,0 2),(4 4,2 3,2 2,4 4)))",
+ /* b */ "MULTIPOLYGON(((0 2,0 5,4 4,5 0,0 2),(4 4,2 3,2 2,4 4),(4 4,3 2,4 2,4 4)))",
+};
+
+static std::string case_61_multi[2] =
+{
+ // extracted from recursive boxes
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((2 2,2 3,3 3,3 2,2 2)))",
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 3,2 4,3 4,3 3,2 3)))"
+};
+
+static std::string case_62_multi[2] =
+{
+ // extracted from recursive boxes
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)))",
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 3,2 4,3 4,3 3,2 3)))"
+};
+
+static std::string case_63_multi[2] =
+{
+ // extracted from recursive boxes
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)))",
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)))"
+};
+
+static std::string case_64_multi[3] =
+{
+ // extracted from recursive boxes
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((2 2,2 3,3 3,3 2,2 2)))",
+ "MULTIPOLYGON(((1 1,1 2,2 2,3 2,3 1,2 1,1 1)))" ,
+ // same but omitting not-necessary form-points at x=2 (==simplified)
+ "MULTIPOLYGON(((1 1,1 2,3 2,3 1,1 1)))"
+};
+
+static std::string case_65_multi[4] =
+{
+ "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 2)))",
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((2 2,2 3,3 3,3 2,2 2)),((3 1,3 2,5 2,5 1,3 1)))",
+
+ // Inverse versions
+ "MULTIPOLYGON(((0 0,0 4,6 4,6 0,0 0),(2 2,3 2,3 3,2 3,2 2)))",
+ "MULTIPOLYGON(((0 0,0 4,6 4,6 0,0 0),(1 1,2 1,2 2,1 2,1 1),(2 2,3 2,3 3,2 3,2 2),(3 1,5 1,5 2,3 2,3 1)))"
+};
+
+static std::string case_66_multi[2] =
+{
+ "MULTIPOLYGON(((3 5,2 5,2 6,3 6,4 6,4 5,3 5)),((1 6,0 6,0 7,1 7,2 7,2 6,1 6)))",
+ "MULTIPOLYGON(((1 4,1 5,2 5,2 4,1 4)),((1 7,2 7,2 6,1 6,1 7)),((0 8,0 9,1 9,1 8,1 7,0 7,0 8)))"
+};
+
+static std::string case_67_multi[2] =
+{
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)))",
+ "MULTIPOLYGON(((1 1,1 2,3 2,3 1,1 1)))"
+};
+
+static std::string case_68_multi[2] =
+{
+ "MULTIPOLYGON(((2 1,2 2,4 2,4 1,2 1)),((4 2,4 3,5 3,5 2,4 2)))",
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)),((3 2,3 3,5 3,5 2,3 2)))"
+};
+
+static std::string case_69_multi[2] =
+{
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((3 2,3 3,4 3,4 2,3 2)))",
+ "MULTIPOLYGON(((2 0,2 1,3 1,3 0,2 0)),((1 1,1 3,2 3,2 1,1 1)),((2 3,2 4,3 4,3 3,2 3)))"
+};
+
+static std::string case_71_multi[2] =
+{
+ "MULTIPOLYGON(((0 0,0 3,1 3,1 1,3 1,3 2,4 2,4 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))",
+ "MULTIPOLYGON(((0 2,0 3,3 3,3 2,0 2)))"
+};
+
+static std::string case_72_multi[3] =
+{
+ // cluster with ii, done by both traverse and assemble
+ "MULTIPOLYGON(((0 3,4 4,3 0,3 3,0 3)),((3 3,2 1,1 2,3 3)))",
+ "MULTIPOLYGON(((0 0,1 4,3 3,4 1,0 0)))",
+
+ // Inverse version of a
+ "MULTIPOLYGON(((-1 -1,-1 5,5 5,5 -1,-1 -1),(0 3,3 3,3 0,4 4,0 3),(3 3,1 2,2 1,3 3)))"
+};
+
+static std::string case_73_multi[2] =
+{
+ "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 2)),((1 1,1 2,2 2,2 1,1 1)))",
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 3,3 3,3 1,1 1)))"
+};
+
+static std::string case_74_multi[2] =
+{
+ "MULTIPOLYGON(((3 0,2 0,2 1,3 1,3 3,1 3,1 2,2 2,2 1,0 1,0 5,4 5,4 0,3 0)))",
+ "MULTIPOLYGON(((0 2,0 3,1 3,1 1,2 1,2 0,0 0,0 2)),((2 3,1 3,1 4,2 4,2 3)))"
+};
+
+static std::string case_75_multi[2] =
+{
+ // cc/uu turns on all corners of second box
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((1 3,1 4,2 4,2 3,1 3)),((2 2,2 3,3 3,3 2,2 2)),((3 1,3 2,4 2,4 1,3 1)),((3 3,3 4,4 4,4 3,3 3)))",
+ "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 2)))"
+};
+
+static std::string case_76_multi[2] =
+{
+ // cc/uu turns on all corners of second box, might generate TWO OVERLAPPING union polygons!
+ // therefore, don't follow uu.
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 0,1 0)),((3 2,4 2,4 1,3 1,3 2)),((2 2,2 3,3 3,3 2,2 2)),((2 3,1 3,1 4,2 4,2 3)),((3 3,3 4,4 4,4 3,3 3)))",
+ "MULTIPOLYGON(((0 2,0 3,1 3,1 2,2 2,2 0,1 0,1 1,0 1,0 2)),((2 2,2 3,3 3,3 2,2 2)))"
+};
+
+static std::string case_77_multi[2] =
+{
+ // with a point on interior-ring-border of enclosing
+ // -> went wrong in the assemble phase for intersection (traversal is OK)
+ // -> fixed
+ "MULTIPOLYGON(((3 3,3 4,4 4,4 3,3 3)),((5 3,5 4,4 4,4 5,3 5,3 6,5 6,5 5,7 5,7 6,8 6,8 5,9 5,9 2,8 2,8 1,7 1,7 2,5 2,5 3),(6 3,8 3,8 4,6 4,6 3)))",
+ "MULTIPOLYGON(((6 3,6 4,7 4,7 3,6 3)),((2 3,1 3,1 4,3 4,3 5,4 5,4 6,5 6,5 7,9 7,9 4,7 4,7 5,8 5,8 6,7 6,7 5,6 5,6 4,4 4,4 3,3 3,3 2,2 2,2 3)),((5 2,4 2,4 3,6 3,6 2,5 2)),((7 2,7 3,8 3,8 2,8 1,7 1,7 2)))"
+};
+
+static std::string case_78_multi[2] =
+{
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 2,4 2,4 3,2 3,2 2)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(3 2,4 2,4 3,3 3,3 2),(1 1,2 1,2 2,1 2,1 1)))"
+
+};
+
+static std::string case_80_multi[2] =
+{
+ // Many ux-clusters -> needs correct cluster-sorting
+ // Fixed now
+ "MULTIPOLYGON(((3 1,3 2,4 2,3 1)),((1 5,0 4,0 5,1 6,1 5)),((3 3,4 3,3 2,2 2,2 3,3 3)),((4 5,5 6,5 5,4 5)),((4 2,4 3,5 3,4 2)),((2.5 5.5,3 5,2 5,2 7,3 6,2.5 5.5)),((1 6,0 6,0 7,1 7,2 6,1 6)))",
+ "MULTIPOLYGON(((3 5,3 6,4 6,4 5,3 5)),((4 4,5 5,5 4,4 4)),((3 3,4 4,4 3,3 3)),((1 5,1 6,2 6,2 5,1 5)),((0 6,1 7,1 6,0 6)),((1 4,1 3,0 3,0 4,1 4)),((3 5,4 4,3 4,3 3,2 3,2 5,3 5)))"
+};
+
+static std::string case_81_multi[2] =
+{
+ "MULTIPOLYGON(((1 1,2 2,2 1,1 1)),((2 2,2 3,3 2,2 2)),((3 1,4 2,4 1,3 1)))",
+ "MULTIPOLYGON(((2 1,2 2,3 3,3 2,4 2,3 1,2 1)))"
+};
+
+static std::string case_82_multi[2] =
+{
+ "MULTIPOLYGON(((4 0,5 1,5 0,4 0)),((2 1,3 2,3 1,2 1)),((3 0,4 1,4 0,3 0)),((1 0,1 1,2 1,2 0,1 0)))",
+ "MULTIPOLYGON(((3 2,4 3,4 2,3 2)),((3 1,3 2,4 1,3 1)),((0 0,1 1,1 0,0 0)),((5 1,5 0,4 0,4 1,5 1)))"
+};
+
+static std::string case_83_multi[2] =
+{
+ // iu/iu
+ "MULTIPOLYGON(((1 0,1 1,2 1,1 0)),((0 1,0 4,1 4,1 1,0 1)),((2 1,2 2,3 2,3 1,2 1)),((2 3,3 4,3 3,2 3)))",
+ "MULTIPOLYGON(((1 0,2 1,2 0,1 0)),((0 3,1 4,1 3,0 3)),((2 3,2 4,3 3,2 3)),((1 3,2 3,2 2,0 2,1 3)))"
+};
+
+static std::string case_84_multi[2] =
+{
+ // iu/ux
+ "MULTIPOLYGON(((2 2,3 3,3 2,2 2)),((2 1,2 2,3 1,2 1)),((2 3,3 4,3 3,2 3)),((1 3,2 4,2 2,1 2,1 3)))",
+ "MULTIPOLYGON(((2 3,3 3,3 1,2 1,2 2,1 2,1 3,2 3)))"
+};
+
+static std::string case_85_multi[2] =
+{
+ // iu/ux (and ux/ux)
+ "MULTIPOLYGON(((0 1,0 2,1 2,0 1)),((1 1,1 2,2 1,1 1)),((0 3,1 3,0 2,0 3)))",
+ "MULTIPOLYGON(((1 3,2 3,2 1,1 1,1 2,0 2,1 3)))"
+};
+
+static std::string case_86_multi[2] =
+{
+ // iu/ux
+ "MULTIPOLYGON(((4 2,4 3,5 3,4 2)),((5 2,6 3,6 2,5 2)),((5 1,4 1,4 2,5 2,6 1,5 1)))",
+ "MULTIPOLYGON(((5 1,5 2,6 2,6 1,5 1)),((4 2,5 3,5 2,4 2)),((3 2,4 3,4 2,3 2)))"
+};
+
+static std::string case_87_multi[2] =
+{
+ // iu/ux where iu crosses, no touch
+ "MULTIPOLYGON(((5 0,5 1,6 0,5 0)),((6 2,7 3,7 2,6 2)),((5 1,5 3,6 3,6 1,5 1)))",
+ "MULTIPOLYGON(((5 1,5 2,7 2,7 1,6 1,6 0,5 0,5 1)),((4 3,5 3,5 2,3 2,4 3)))"
+};
+
+
+static std::string case_88_multi[2] =
+{
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((1 1,1 2,2 1,1 1)),((0 2,0 3,1 3,2 3,2 2,1 2,0 1,0 2)))",
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((0 1,1 2,1 1,0 1)),((0 2,0 3,1 3,1 2,0 2)))"
+};
+
+static std::string case_89_multi[2] =
+{
+ // Extract from rec.boxes_3
+ "MULTIPOLYGON(((8 1,7 1,8 2,8 3,9 4,9 2,8.5 1.5,9 1,8 0,8 1)),((9 1,9 2,10 2,10 1,9 0,9 1)))",
+ "MULTIPOLYGON(((8 3,9 4,9 3,8 3)),((7 0,7 1,8 1,8 0,7 0)),((9 2,9 1,8 1,8 3,8.5 2.5,9 3,9 2)))"
+};
+
+static std::string case_90_multi[2] =
+{
+ // iu/iu for Union; see ppt
+ "MULTIPOLYGON(((1 8,0 8,0 10,1 10,1 9,2 8,2 7,1 7,1 8)),((2 9,2 10,4 10,4 9,3 9,3 8,2 8,2 9)))",
+ "MULTIPOLYGON(((2 8,1 8,1 9,2 9,2 10,3 10,3 8,2 8)),((0 10,2 10,0 8,0 10)))"
+};
+
+static std::string case_91_multi[2] =
+{
+ // iu/xi for Intersection
+ "MULTIPOLYGON(((3 3,3 4,4 4,3 3)),((2 2,1 2,1 4,2 4,2 3,3 3,2 2)))",
+ "MULTIPOLYGON(((2 2,2 3,3 2,2 2)),((2 3,1 3,1 4,1.5 3.5,2 4,2.5 3.5,3 4,3 3,2 3)))"
+};
+
+static std::string case_92_multi[2] =
+{
+ // iu/iu all aligned (for union)
+ "MULTIPOLYGON(((7 2,7 3,8 2,7 2)),((8 4,9 5,9 4,8 4)),((8 2,8 3,9 2,8 2)),((7 3,7 4,8 4,8 3,7 3)),((9 3,9 4,10 4,10 3,9 3)))",
+ "MULTIPOLYGON(((9 2,8 2,8 3,9 3,10 2,9 2)),((7 5,8 5,9 6,9 4,8 4,7 3,6 3,6 4,6.5 3.5,7 4,6 4,7 5)))"
+};
+
+static std::string case_93_multi[2] =
+{
+ // iu/xi for intersection
+ "MULTIPOLYGON(((6 2,7 2,7 1,5 1,6 2)),((7 3,8 3,7.5 2.5,8 2,7 2,7 3)))",
+ "MULTIPOLYGON(((7 1,6 0,6 2,7 3,7 2,8 3,8 2,7 1)))"
+};
+
+
+static std::string case_94_multi[2] =
+{
+ // iu/iu for union
+ "MULTIPOLYGON(((9 2,9 3,10 3,10 2,9 2)),((7 3,8 4,9 3,8 3,9 2,7 2,7 3)),((8 6,9 5,9 4,8 4,8 6)))",
+ "MULTIPOLYGON(((6 2,6 3,7 3,8 2,6 2)),((9 3,10 3,9 2,9 1,8 0,7 0,8 1,8 3,8.5 2.5,9 3)),((7 4,7 5,8 5,9 6,9 4,8 4,8 3,7 3,7 4)))"
+};
+
+static std::string case_95_multi[2] =
+{
+ // iu/iu for union
+ "MULTIPOLYGON(((0 8,1 8,1 7,0 7,0 8)),((2 8,2 9,2.5 8.5,3 9,3 7,2 7,2 8)),((1 9,1 10,2 9,1 8,1 9)))",
+ "MULTIPOLYGON(((1 7,0 7,0 8,1 8,2 7,1 7)),((2 9,1 9,1 10,2 10,3 9,4 9,4 8,2 8,2 9)))"
+};
+
+static std::string case_96_multi[2] =
+{
+ // iu/iu all collinear, for intersection/union
+ "MULTIPOLYGON(((8 2,9 3,9 2,8 2)),((8 1,9 2,9 1,10 1,10 0,8 0,8 1)))",
+ "MULTIPOLYGON(((9 0,9 1,10 0,9 0)),((8 1,8 2,9 2,9 1,8 1)))"
+};
+
+static std::string case_97_multi[2] =
+{
+ // ux/ux for union
+ "MULTIPOLYGON(((4 4,4 5,4.5 4.5,5 5,6 5,5 4,5 3,4 3,4 4)))",
+ "MULTIPOLYGON(((5 3,5 4,6 3,5 3)),((6 5,7 5,6 4,5 4,6 5)))"
+};
+
+
+static std::string case_98_multi[2] =
+{
+ // ii/iu for intersection, solved by discarding iu (ordering not possible)
+ "MULTIPOLYGON(((2 0,3 1,3 0,2 0)),((2 2,2 3,1 3,1 4,2 4,3 3,3 4,5 2,4 2,4 1,3 1,3 2,2.5 1.5,3 1,2 1,2 2)))",
+ "MULTIPOLYGON(((4 2,4 3,5 2,4 2)),((1 0,0 0,0 2,4 2,4 1,2 1,2 0,1 0)),((3 3,4 4,4 3,3 2,3 3)))"
+};
+
+static std::string case_99_multi[2] =
+{
+ // iu/iu for intersection
+ "MULTIPOLYGON(((1 0,2 1,2 0,1 0)),((1 2,2 2,1.5 1.5,2 1,1 1,1 0,0 0,0 1,1 2)))",
+ "MULTIPOLYGON(((1 1,2 0,0 0,1 1)),((1 1,0 1,0 2,1 2,2 3,2 2,1 1)))"
+};
+
+static std::string case_100_multi[2] =
+{
+ // for intersection
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((2 2,2 1,0 1,0 2,1 2,2 3,2 2)))",
+ "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((1 2,0 1,0 3,1 4,1 2)))"
+};
+
+static std::string case_101_multi[4] =
+{
+ // interior ring / union
+ "MULTIPOLYGON(((7 2,7 3,8 2,7 2)),((9 3,9 4,10 3,9 3)),((10 1,10 0,8 0,8 1,9 2,10 2,10 1)),((9 3,9 2,8 2,8 3,7 3,7 4,8 4,9 3)),((8 4,8 7,9 6,9 4,8 4)))",
+ "MULTIPOLYGON(((5 1,5 2,6 3,6 4,7 5,6 5,7 6,8 6,8 5,9 5,10 5,10 1,8 1,7 0,5 0,5 1),(9 5,8 4,9 4,9 5),(8 1,8 3,7 3,7 2,6 2,7 1,8 1),(5 1,5.5 0.5,6 1,5 1),(8.5 2.5,9 2,9 3,8.5 2.5)))",
+
+ // inverse versions
+ "MULTIPOLYGON(((4 -1,4 8,11 8,11 -1,4 -1),(7 2,8 2,7 3,7 2),(9 3,10 3,9 4,9 3),(10 1,10 2,9 2,8 1,8 0,10 0,10 1),(9 3,8 4,7 4,7 3,8 3,8 2,9 2,9 3),(8 4,9 4,9 6,8 7,8 4)))",
+ "MULTIPOLYGON(((4 -1,4 8,11 8,11 -1,4 -1),(5 1,5 0,7 0,8 1,10 1,10 5,9 5,8 5,8 6,7 6,6 5,7 5,6 4,6 3,5 2,5 1)),((9 5,9 4,8 4,9 5)),((8 1,7 1,6 2,7 2,7 3,8 3,8 1)),((5 1,6 1,5.5 0.5,5 1)),((8.5 2.5,9 3,9 2,8.5 2.5)))"
+};
+
+static std::string case_102_multi[4] =
+{
+ // interior ring 'fit' / union
+ "MULTIPOLYGON(((0 2,0 7,5 7,5 2,0 2),(4 3,4 6,1 6,2 5,1 5,1 4,3 4,4 3)),((3 4,3 5,4 5,3 4)),((2 5,3 6,3 5,2 4,2 5)))",
+ "MULTIPOLYGON(((0 2,0 7,5 7,5 2,0 2),(2 4,3 5,2 5,2 4),(4 4,3 4,3 3,4 4),(4 5,4 6,3 6,4 5)))",
+
+ // inverse versions (first was already having an interior, so outer ring is just removed
+ "MULTIPOLYGON(((4 3,3 4,1 4,1 5,2 5,1 6,4 6,4 3),(3 4,4 5,3 5,3 4),(2 5,2 4,3 5,3 6,2 5)))",
+ "MULTIPOLYGON(((-1 1,-1 8,6 8,6 1,-1 1),(0 2,5 2,5 7,0 7,0 2)),((2 4,2 5,3 5,2 4)),((4 4,3 3,3 4,4 4)),((4 5,3 6,4 6,4 5)))"
+};
+
+static std::string case_103_multi[2] =
+{
+ // interior ring 'fit' (ix) / union / assemble
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,2 0,2 1,1 0,0 0),(2 1,3 1,3 2,2 2,2 1),(2 2,2 3,1 2,2 2)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 1,2 2,1 1,2 1)))"
+};
+
+static std::string case_104_multi[2] =
+{
+ // interior ring 'fit' (ii) / union / assemble
+ "MULTIPOLYGON(((1 0,1 1,0 1,0 5,5 5,5 0,2 0,2 1,1 0),(2 2,3 3,2 3,2 2)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(1 1,3 1,3 2,1 2,1 1)))"
+};
+
+static std::string case_105_multi[2] =
+{
+ // interior ring 'fit' () / union / assemble
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 2,3 2,3 3,1 3,2 2)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(1 1,2 1,2 2,1 1),(2 1,3 1,3 2,2 1),(1 3,2 3,2 4,1 4,1 3),(2 3,3 3,3 4,2 3)))"
+};
+
+static std::string case_106_multi[2] =
+{
+ // interior ring 'fit' () / union / assemble
+ // [1] is reported as invalid by BG, but not by postgis
+ "MULTIPOLYGON(((0 0,0 3,0 5,5 5,5 0,0 0),(0 3,1 2,1 3,0 3),(1 3,2 3,3 4,1 4,1 3),(2 3,2 2,3 3,2 3),(2 2,2 1,3 2,2 2)))",
+ "MULTIPOLYGON(((0 0,0 5,1 5,1 4,2 4,2 5,3 5,3 3,4 4,5 4,5 0,2 0,3 1,2 1,1 1,0 0),(2 1,2 2,1.5 1.5,2 1),(2 2,2 3,1 3,2 2)),((2 0,1 0,2 1,2 0)))"
+};
+
+static std::string case_107_multi[4] =
+{
+ // For CCW polygon reports a iu/iu problem.
+ "MULTIPOLYGON(((6 8,7 9,7 7,8 7,7 6,6 6,6 8)),((6.5 9.5,7 10,7 9,6 9,6 10,6.5 9.5)))",
+ "MULTIPOLYGON(((5 7,6 8,6 10,7 9,8 10,8 8,7 8,6 7,6 6,5 7)))",
+
+ // inverse versions
+ "MULTIPOLYGON(((5 5,5 11,9 11,9 5,5 5),(6 8,6 6,7 6,8 7,7 7,7 9,6 8),(6.5 9.5,6 10,6 9,7 9,7 10,6.5 9.5)))",
+ "MULTIPOLYGON(((4 5,4 11,9 11,9 5,4 5),(5 7,6 6,6 7,7 8,8 8,8 10,7 9,6 10,6 8,5 7)))"
+};
+
+static std::string case_108_multi[2] =
+{
+ // Missing intersection point in [0] / [1], [0] / [2] is OK
+ "MULTIPOLYGON(((1 2,0 1,0 6,1 6,2 5,2 4,3 4,4 4,4 2,4 1,1 1,1 2),(1 2,2 2,3 3,1 3,1 2),(2 2,2.5 1.5,3 2,2 2),(2 4,1 4,1.5 3.5,2 4)))",
+ "MULTIPOLYGON(((1 2,2 3,2 4,1 3,1 4,1 5,2 6,3 6,3 5,5 5,5 0,4 0,4 1,1 1,1 2),(2 4,2.5 3.5,3 4,2 4),(3 4,4 3,4 4,3 4),(4 3,3 3,3 2,4 2,4 3)),((0 3,1 3,1 2,0 2,0 3)),((0 3,0 4,1 4,0 3)))"
+};
+
+static std::string case_109_multi[2] =
+ {
+ "MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))",
+ "MULTIPOLYGON(((10 10,10 20,20 10,10 10)),((20 10,30 20,30 10,20 10)),((10 20,10 30,20 20,10 20)),((20 20,30 30,30 20,20 20)))"
+ };
+
+static std::string case_110_multi[2] =
+ {
+ "MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))",
+ "MULTIPOLYGON(((15 10,10 15,10 17,15 10)),((15 10,10 20,10 22,15 10)),((15 10,10 25,10 27,15 10)),((25 10,30 17,30 15,25 10)),((25 10,30 22,30 20,25 10)),((25 10,30 27,30 25,25 10)),((18 10,20 30,19 10,18 10)),((21 10,20 30,22 10,21 10)))"
+ };
+
+
+// Cases 111 to 122 are for testing uu-cases, validity, touch, interior rings
+static std::string case_111_multi[2] =
+{
+ "MULTIPOLYGON(((4 0,2 2,4 4,6 2,4 0)))",
+ "MULTIPOLYGON(((4 4,2 6,4 8,6 6,4 4)))"
+};
+
+static std::string case_112_multi[2] =
+{
+ "MULTIPOLYGON(((0 0,0 2,2 4,4 2,6 4,8 2,8 0,0 0)))",
+ "MULTIPOLYGON(((0 8,8 8,8 6,6 4,4 6,2 4,0 6,0 8)))"
+};
+
+// Provided by Menelaos (1)
+static std::string case_113_multi[2] =
+{
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((15 5,15 10,20 10,20 5,15 5)))",
+ "MULTIPOLYGON(((10 0,15 5,15 0,10 0)),((10 5,10 10,15 10,15 5,10 5)))"
+};
+
+// Provided by Menelaos (2)
+static std::string case_114_multi[2] =
+{
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((15 5,15 10,20 10,20 5,15 5)))",
+ "MULTIPOLYGON(((10 0,15 5,20 5,20 0,10 0)),((10 5,10 10,15 10,15 5,10 5)))"
+};
+
+// Mailed by Barend
+static std::string case_115_multi[2] =
+{
+ "MULTIPOLYGON(((4 0,2 2,4 4,6 2,4 0)),((4 6,6 8,8 6,6 4,4 6)))",
+ "MULTIPOLYGON(((4 4,2 6,4 8,6 6,4 4)),((4 2,7 6,8 3,4 2)))"
+};
+
+// Formerly referred to as a
+// Should result in 1 polygon with 2 holes
+// "POLYGON((4 9,4 10,6 10,6 12,8 12,8 11,10 11,10 9,11 9,11 2,3 2,3 9,4 9),(6 10,6 8,7 8,7 10,6 10),(6 8,5 8,5 3,9 3,9 7,8 7,8 6,6 6,6 8))"
+static std::string case_116_multi[2] =
+{
+ "MULTIPOLYGON(((4 8,4 10,6 10,6 8,4 8)),((7 7,7 11,10 11,10 7,7 7)))",
+ "MULTIPOLYGON(((6 6,6 8,8 8,8 6,6 6)),((6 10,6 12,8 12,8 10,6 10)),((9 9,11 9,11 2,3 2,3 9,5 9,5 3,9 3,9 9)))"
+};
+
+// Formerly referred to as b
+// Should result in 2 polygons
+// "MULTIPOLYGON(((4 8,4 10,6 10,6 8,4 8)),((7 8,7 10,6 10,6 12,8 12,8 11,10 11,10 7,8 7,8 6,6 6,6 8,7 8)))"
+static std::string case_117_multi[2] =
+{
+ "MULTIPOLYGON(((4 8,4 10,6 10,6 8,4 8)),((7 7,7 11,10 11,10 7,7 7)))",
+ "MULTIPOLYGON(((6 6,6 8,8 8,8 6,6 6)),((6 10,6 12,8 12,8 10,6 10)))"
+};
+
+// Formerly referred to as c
+// Shoud result in 3 polygons:
+// "MULTIPOLYGON(((4 8,4 10,6 10,6 8,4 8)),((8 8,8 10,10 10,10 8,8 8)),((7 12,7 13,13 13,13 5,7 5,7 6,6 6,6 8,8 8,8 7,11 7,11 11,8 11,8 10,6 10,6 12,7 12)))"
+static std::string case_118_multi[2] =
+{
+ "MULTIPOLYGON(((4 8,4 10,6 10,6 8,4 8)),((8 8,8 10,10 10,10 8,8 8)),((7 11,7 13,13 13,13 5,7 5,7 7,11 7,11 11,7 11)))",
+ "MULTIPOLYGON(((6 6,6 8,8 8,8 6,6 6)),((6 10,6 12,8 12,8 10,6 10)))"
+};
+
+// Formerly referred to as d
+// Should result in 2 polygons:
+// "MULTIPOLYGON(((2 4,2 6,3 6,3 7,7 7,7 6,8 6,8 4,6 4,6 5,4 5,4 4,2 4)),((1 0,1 2,0 2,0 4,2 4,2 3,8 3,8 4,10 4,10 2,9 2,9 0,1 0)))"
+static std::string case_119_multi[2] =
+{
+ "MULTIPOLYGON(((2 4,2 6,4 6,4 4,2 4)),((6 4,6 6,8 6,8 4,6 4)),((1 0,1 3,9 3,9 0,1 0)))",
+ "MULTIPOLYGON(((0 2,0 4,2 4,2 2,0 2)),((8 2,8 4,10 4,10 2,8 2)),((3 5,3 7,7 7,7 5,3 5)))"
+};
+
+// With a c/c turn
+static std::string case_120_multi[2] =
+{
+ "MULTIPOLYGON(((6 4,6 9,9 9,9 6,11 6,11 4,6 4)),((10 7,10 10,12 10,12 7,10 7)))",
+ "MULTIPOLYGON(((10 5,10 8,12 8,12 5,10 5)),((6 10,8 12,10 10,8 8,6 10)))"
+};
+
+// With c/c turns in both involved polygons
+static std::string case_121_multi[2] =
+{
+ "MULTIPOLYGON(((7 4,7 8,9 8,9 6,11 6,11 4,7 4)),((10 7,10 10,12 10,12 7,10 7)))",
+ "MULTIPOLYGON(((10 5,10 8,12 8,12 5,10 5)),((7 7,7 10,10 10,9 9,9 7,7 7)))"
+};
+
+// Same but here c/c not directly involved in the turns itself
+// (This one breaks if continue is not checked in handle_touch)
+static std::string case_122_multi[2] =
+{
+ "MULTIPOLYGON(((10 8,10 10,12 10,12 8,10 8)),((10 4,10 7,12 7,12 4,10 4)),((7 5,7 8,9 8,9 5,7 5)))",
+ "MULTIPOLYGON(((7 3,7 6,9 6,9 5,11 5,11 3,7 3)),((10 6,10 9,12 9,12 6,10 6)),((7 7,7 10,10 10,9 9,9 7,7 7)))"
+};
+
+static std::string case_123_multi[2] =
+{
+ // Intersection: one cluster with 3 zones, intersection -> no holes
+ "MULTIPOLYGON(((1 0,1 1,1.5 0.5,2 0.5,2 0,1 0)),((0 1,1 2,2 2,2 1,0 1)))",
+ "MULTIPOLYGON(((1 0,1 2,2 2,2 0,1 0)),((0 1,0 2,1 1,0 1)))"
+};
+
+static std::string case_124_multi[2] =
+{
+ // Intersection: one cluster with 3 zones, intersection -> one hole
+ "MULTIPOLYGON(((1 0,1 1,0 1,1 2,2 2,2 0,1 0),(1.5 0.5,1.75 1,1 1,1.5 0.5)))",
+ "MULTIPOLYGON(((1 0,1 2,2 2,2 0,1 0)),((0 1,0 2,1 1,0 1)))"
+};
+
+static std::string case_125_multi[2] =
+{
+ // Intersection: one cluster with 3 zones, intersection -> one hole (filled with other polygon)
+ "MULTIPOLYGON(((1 0,1 1,0 1,1 2,2 2,2 0,1 0),(1.5 0.5,1.75 1,1 1,1.5 0.5)),((1 1,1.5 0.9,1.25 0.8,1 1)))",
+ "MULTIPOLYGON(((1 0,1 2,2 2,2 0,1 0)),((0 1,0 2,1 1,0 1)))"
+};
+
+static std::string case_126_multi[2] =
+{
+ // Intersection: should result in multi-polygon of 5 (needs self-intersections)
+ "MULTIPOLYGON(((5 5,5 10,10 10,10 5,5 5),(9 8,7 9,5 8,7 7,9 8)),((3 3,3 5,5 5,5 3,3 3)))",
+ "MULTIPOLYGON(((0 3,6 3,6 9,0 9,0 3),(2 6,4 7,6 6,4 5,2 6)),((6 9,6 11,8 11,8 9,6 9)))"
+};
+
+static std::string case_127_multi[2] =
+{
+ // Intersection/validity with ii at (4 4), and both have self intersections at (5 5)
+ "MULTIPOLYGON(((0 0,0 5,3 5,3 4,4 4,4 5,5 5,5 0,0 0)),((5 5,5 6,6 6,6 5,5 5)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 4,4 4,4 3,5 3,5 0,0 0)),((5 5,5 7,7 7,7 5,5 5)))"
+};
+
+static std::string case_128_multi[2] =
+{
+ // Contains isolated areas of two types
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 8,6 7,8 8,6 9,4 8),(1 2,2 0,3 2,2 4,1 2)))",
+ "MULTIPOLYGON(((0 0,0 10,11 10,11 0,0 0),(2 9,0 8,2 7,4 8,2 9),(5 5,5 0,10 5,5 5)))"
+};
+
+static std::string case_129_multi[2] =
+{
+ // Extract from rec.box #6
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 4,4 4,4 2,5 1,5 0,0 0),(3 4,3 3,4 4,3 4),(2 1,3 2,3 3,2 2,2 1)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(4 4,4 3,5 4,4 4),(2 1,3 1,3 3,2 2,2 1)))"
+};
+
+static std::string case_130_multi[2] =
+{
+ // For validity
+ "MULTIPOLYGON(((0 0,0 7,7 7,7 0,0 0),(1 4,2 3,3 4,2 5,1 4),(5 4,6 3,7 4,6 5,5 4),(3 6,4 5,5 6,4 7,3 6)))",
+ "MULTIPOLYGON(((0 0,0 7,7 7,7 0,0 0),(4 3,5 4,4 5,3 4,4 3),(1 2,2 1,3 2,2 3,1 2)))"
+};
+
+static std::string case_131_multi[2] =
+{
+ // For validity, interior ring connections
+ "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)))",
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0),(3 3,1 3,1 1,3 1,3 3)))"
+};
+
+static std::string case_132_multi[2] =
+{
+ // For validity, interior ring connections including cluster
+ "MULTIPOLYGON(((2 4,2 6,4 6,4 4,2 4)),((4 2,4 4,6 4,6 2,4 2)))",
+ "MULTIPOLYGON(((0 0,0 8,8 8,8 0,0 0),(6 6,2 6,2 2,6 2,6 6)),((2 2,2.5 3.5,4 4,3.5 2.5,2 2)),((4 4,4.5 5.5,6 6,5.5 4.5,4 4)))"
+};
+
+static std::string case_133_multi[2] =
+{
+ // Zoomed in version of case_recursive_boxes_49 with in both interiors an extra polygon (same for both)
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 6,4 6,4 8,10 8,10 4,8 4,8 0,0 0),(4 4,4 6,6 6,6 4,4 4)),((5 4.5,4 6,5.5 5, 5 4.5)))",
+ "MULTIPOLYGON(((2 0,2 8,8 8,8 6,10 6,10 2,6 2,6 0,2 0),(6 6,6 4,4 4,4 6,6 6)),((5 4.5,4 6,5.5 5, 5 4.5)))"
+};
+
+static std::string case_134_multi[2] =
+{
+ // Zoomed in version of case_recursive_boxes_49 with two interior rings
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 6,4 6,4 8,10 8,10 4,8 4,8 0,0 0),(3 4,4 6,4 4,3 4),(6 6,4 6,6 7,6 6)))",
+ "MULTIPOLYGON(((2 0,2 8,8 8,8 6,10 6,10 2,6 2,6 0,2 0),(3 4,4 6,4 4,3 4),(6 6,4 6,6 7,6 6)))"
+};
+
+static std::string case_135_multi[2] =
+{
+ // Contains two equal interior rings, both touching to their exterior rings
+ // Needs detection of isolated interior ring pattern
+ "MULTIPOLYGON(((5 8,4 8,4 7,3 7,3 6,2 6,2 7,1 7,1 10,3 10,3 9,5 9,5 8),(3 8,3 9,2 9,2 8,3 8)))",
+ "MULTIPOLYGON(((5 4,4 4,3 4,3 7,1 7,1 8,0 8,0 9,1 9,1 10,3 10,3 9,4 9,4 8,6 8,6 9,7 9,7 5,6 5,6 4,5 4),(5 5,5 6,6 6,6 7,4 7,4 5,5 5),(3 8,3 9,2 9,2 8,3 8)))"
+};
+
+static std::string case_136_multi[2] =
+{
+ // Variant of 135, but approaching cluster is non equal
+ "MULTIPOLYGON(((5 8,4 8,4 7,3 7,3 6,2 6,2 7,1 7,1 10,2 10,3 9,5 9,5 8),(3 8,3 9,2 9,2 8,3 8)))",
+ "MULTIPOLYGON(((5 4,4 4,3 4,3 7,1 7,1 8,0 8,0 9,1 9,1 10,3 10,3 9,4 9,4 8,6 8,6 9,7 9,7 5,6 5,6 4,5 4),(5 5,5 6,6 6,6 7,4 7,4 5,5 5),(3 8,3 9,2 9,2 8,3 8)))"
+};
+
+static std::string case_137_multi[2] =
+{
+ // Variant of 135, but leaving cluster is non equal
+ "MULTIPOLYGON(((5 8,4 8,4 7,3 7,3 6,2 6,2 7,1 7,1 10,3 10,3 9,5 9,5 8),(3 8,3 9,2 9,2 8,3 8)))",
+ "MULTIPOLYGON(((5 4,4 4,3 4,3 7,1 7,1 8,0 8,0 9,1 9,1 10,3 10,3 9,4 8,6 8,6 9,7 9,7 5,6 5,6 4,5 4),(5 5,5 6,6 6,6 7,4 7,4 5,5 5),(3 8,3 9,2 9,2 8,3 8)))"
+};
+
+static std::string case_138_multi[2] =
+{
+ // Zoomed in version of case_recursive_boxes_49 with in both interiors an extra polygon (different for both)
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 6,4 6,4 8,10 8,10 4,8 4,8 0,0 0),(4 4,4 6,6 6,6 4,4 4)),((4.5 4.5,4 6,5.5 5.5,4.5 4.5)))",
+ "MULTIPOLYGON(((2 0,2 8,8 8,8 6,10 6,10 2,6 2,6 0,2 0),(6 6,6 4,4 4,4 6,6 6)),((5 4.5,4 6,5.5 5, 5 4.5)))"
+};
+
+static std::string case_139_multi[2] =
+{
+ // Another zoomed in version of case_recursive_boxes_49 with different interior polygons
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 6,4 6,4 8,10 8,10 4,8 4,8 0,0 0),(4 4,4 6,6 6,6 4,4 4)),((4.5 4.5,4 6,5.5 5,4.5 4.5)))",
+ "MULTIPOLYGON(((2 0,2 8,8 8,8 6,10 6,10 2,6 2,6 0,2 0),(6 6,6 4,4 4,4 6,6 6)),((5 4.5,4 6,5.5 5, 5 4.5)))"
+};
+
+static std::string case_140_multi[2] =
+{
+ // Another zoomed in version of case_recursive_boxes_49 with different interior polygons
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 6,4 6,4 8,10 8,10 4,8 4,8 0,0 0),(4 4,4 6,6 6,6 4,4 4)),((5 4.5,4 6,5.5 5.5,5 4.5)))",
+ "MULTIPOLYGON(((2 0,2 8,8 8,8 6,10 6,10 2,6 2,6 0,2 0),(6 6,6 4,4 4,4 6,6 6)),((5 4.5,4 6,5.5 5, 5 4.5)))"
+};
+
+static std::string case_141_multi[2] =
+{
+ // Version to test more isolation/validity cases
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 3,1 2,2 1,3 2,2 3),(2 7,3 8,2 9,1 8,2 7),(10 3,9 4,8 3,9 2,10 3),(7 10,6 9,7 8,8 9,7 10),(10 7,9 8,8 7,9 6,10 7)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 5,2 3,4 5,2 7),(3 2,4 1,5 2,4 3,3 2),(3 8,4 7,5 8,4 9,3 8),(7 2,8 1,9 2,8 2,8 3,7 2),(8 7,7 8,6 7,7 6,8 7)))"
+};
+
+static std::string case_recursive_boxes_1[2] =
+{
+ "MULTIPOLYGON(((1 0,0 0,0 1,1 1,1 2,0 2,0 4,2 4,2 5,3 5,3 6,1 6,1 5,0 5,0 10,9 10,9 9,7 9,7 8,6 8,6 7,8 7,8 6,9 6,9 4,8 4,8 3,10 3,10 0,6 0,6 1,5 1,5 0,1 0),(8 4,8 5,7 5,7 6,6 6,6 5,5 5,5 4,4 4,4 3,5 3,5 2,7 2,7 3,6 3,6 4,8 4),(8 1,9 1,9 2,8 2,8 1),(4 7,4 9,3 9,3 7,4 7)),((9 9,10 9,10 7,10 6,9 6,9 7,8 7,8 8,9 8,9 9)))",
+ "MULTIPOLYGON(((5 6,5 7,3 7,3 9,2 9,2 8,1 8,1 10,4 10,4 9,6 9,6 10,10 10,10 9,9 9,9 8,10 8,10 6,9 6,9 5,10 5,10 3,7 3,7 4,6 4,6 6,5 6),(5 7,6 7,6 8,5 8,5 7),(7 7,7 6,8 6,8 7,7 7)),((1 0,0 0,0 7,2 7,2 6,5 6,5 5,4 5,4 4,5 4,5 3,7 3,7 2,6 2,6 0,1 0),(2 1,2 2,3 2,3 3,1 3,1 1,2 1)),((7 2,10 2,10 0,9 0,9 1,8 1,8 0,7 0,7 2)))"
+};
+
+static std::string case_recursive_boxes_2[2] =
+{
+ // Traversal problem; Many ii-cases -> formerly caused "Endless loop"
+ // So it appears that there might be more decisions than intersection points
+ "MULTIPOLYGON(((1 0,0 0,0 4,1 4,1 5,0 5,0 10,3 10,3 9,4 9,4 10,6 10,6 9,7 9,7 10,10 10,10 0,1 0),(6 9,5 9,5 8,6 8,6 9),(7 6,8 6,8 7,7 7,7 6),(8 7,9 7,9 8,8 8,8 7),(9 1,9 2,8 2,8 1,9 1)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,8 0,8 1,7 1,7 0,0 0),(7 3,6 3,6 2,7 2,7 3),(6 7,7 7,7 8,6 8,6 7)))"
+};
+
+
+static std::string case_recursive_boxes_3[2] =
+{
+ // Previously a iu/ux problem causing union to fail.
+ // For CCW polygon it also reports a iu/iu problem.
+ "MULTIPOLYGON(((8 3,9 4,9 3,8 3)),((5 9,5 10,6 10,5 9)),((2 0,2 1,3 0,2 0)),((2 5,2 6,3 6,3 5,2 5)),((2 2,1 2,1 3,2 3,3 2,3 1,2 1,2 2)),((6 8,7 9,7 7,8 7,7 6,6 6,6 8)),((4 6,5 7,5 6,4 6)),((4 8,4 9,5 9,5 8,4 8)),((0 3,1 4,1 3,0 3)),((8 7,9 8,9 7,8 7)),((9 6,9 7,10 7,9 6)),((7 0,8 1,8 0,7 0)),((0 4,0 5,1 5,1 4,0 4)),((4 2,5 3,5 2,4 1,4 2)),((4 10,4 9,2 9,3 10,4 10)),((5 2,6 3,7 3,7 2,6 2,6 1,5 0,5 2)),((5 3,4 3,4 4,2 4,4 6,4 5,4.5 4.5,6 6,6 5,7 4,5 4,5 3)),((10 2,9 1,9 3,10 2)),((8 4,7 4,8 5,7 5,7 6,9 6,9 5,10 5,10 4,8 4)),((1 7,0 7,0 8,1 8,1 7)),((1 10,2 10,1 9,0 9,0 10,1 10)),((6.5 9.5,7 10,7 9,6 9,6 10,6.5 9.5)),((8 8,8 9,10 9,9 8,8 8)))",
+ "MULTIPOLYGON(((7 3,7 4,8 5,8.5 4.5,9 5,9 4,10 3,8 3,7 3),(9 4,8 4,8.5 3.5,9 4)),((0 2,1 1,0 1,0 2)),((1 1,2 2,2 1,1 1)),((2 2,1 2,1 3,2 3,2 2)),((2 1,3 1,2 0,1 0,2 1)),((3 1,4 2,5 2,6 1,5 1,5 0,4 0,4 1,3 1)),((5 2,5 3,4 3,4 4,6 4,6 3,7 3,6 2,5 2)),((6 1,7 1,7 0,6 0,6 1)),((6 4,6 5,7 6,8 6,8 5,7 5,6 4)),((8 3,9 2,8 2,8 3)),((9 2,10 2,10 1,9 1,9 2)),((9 1,9 0,8 0,9 1)),((1 3,0 3,0 4,1 4,1 3)),((2 3,3 4,3 3,2 3)),((9 7,9 8,10 8,10 7,9 7)),((0 7,0 8,1 8,1 7,0 7)),((1 8,1 9,2 8,1 8)),((1 7,3 7,3 8,4 7,5 7,6 8,6 10,7 9,8 10,9 10,9 9,8 9,8 8,7 8,6 7,6 6,3 6,1 6,1 7)),((1 6,1 5,0 5,1 6)),((3 6,4 5,2 5,3 6)),((1 9,1 10,2 10,2 9,1 9)))"
+};
+
+
+static std::string case_recursive_boxes_4[2] =
+{
+ // Occurred after refactoring assemble
+ "MULTIPOLYGON(((0 1,0 3,1 4,0 4,0 5,1 6,0 6,0 8,1 9,0 9,0 10,6 10,7 10,7.5 9.5,8 10,8 9,9 9,9.5 8.5,10 9,10 8,9.5 7.5,10 7,10 5,9 5,9 3,10 2,10 1,9 1,10 0,4 0,4 1,3 1,3 0,1 0,1 1,0 0,0 1),(1 9,1 8,2 9,1 9),(2 9,2 8,3 9,2 9),(2 8,2 7,3 8,2 8),(2 7,1.5 6.5,2 6,2 7),(2 6,2.5 5.5,3 6,2 6),(3 6,3 5,4 6,3 6),(6 10,5.5 9.5,6 9,6 10),(8 9,7 9,7 8,8 8,8 9),(7 8,6 8,6.5 7.5,7 8),(9 5,8 5,8 4,9 5),(8 4,7 3,7 2,8 3,8 4),(9 1,8 1,8.5 0.5,9 1),(6 4,6.5 3.5,7 4,6 4),(4 2,4.5 1.5,5 2,5 3,4 3,4 2),(5 3,5 4,4.5 3.5,5 3),(5 7,5 9,4 9,4 8,5 7),(3 3,4 4,3 4,3 3),(3 4,2 4,2.5 3.5,3 4)),((9 3,10 4,10 3,9 3)),((10 9,9 9,10 10,10 9)))",
+ "MULTIPOLYGON(((1 0,0 0,0 3,1 3,1 4,0 4,0 8,1 7,1 9,0 9,0 10,7 10,6 9,6.5 8.5,7 9,8 9,9 8,8 8,9 7,9 6,10 7,10 5,10 0,7 0,8 1,7 1,6 0,3 0,3 1,2 1,1 1,1 0),(1 3,2 2,2 3,1 3),(1 4,2 4,2 5,1 4),(1 7,1 6,2 7,1 7),(10 5,9 5,9 4,10 5),(5 1,5.5 0.5,6 1,5 1),(6 1,6 2,5 2,6 1),(6 2,6.5 1.5,7 2,8 2,8 4,7 3,6 3,6 2),(6 5,7 6,7 7,6 7,6 5),(6 5,6.5 4.5,7 5,6 5),(4 4,5 4,5 5,4 4),(3 7,2 6,3 6,3 7),(3 7,4 6,4 7,3 7),(3.5 7.5,4 8,4 9,3 8,3.5 7.5)),((1 0,2 1,2 0,1 0)),((7 10,8 10,7 9,7 10)),((8 9,9 10,10 10,10 8,9 8,9 9,8 9)))"
+};
+
+static std::string case_recursive_boxes_5[2] =
+{
+ // Occurs after refactoring uu / handle_touch (not yet integrated)
+ "MULTIPOLYGON(((0 9,0 10,1 10,1 9,0 9)),((9 0,9 1,10 1,10 0,9 0)),((5 6,5 7,6 7,6 6,7 6,7 4,6 4,6 5,5 5,5 6)),((5 3,7 3,7 2,4 2,4 3,5 3)),((5 8,5 9,7 9,7 8,5 8)),((4 0,1 0,1 1,5 1,5 0,4 0)),((3 5,3 4,4 4,4 3,2 3,2 2,1 2,1 3,0 3,0 4,2 4,2 5,1 5,1 6,4 6,4 5,3 5)),((0 2,1 2,1 1,0 1,0 2)),((4 10,4 7,1 7,1 6,0 6,0 8,1 8,1 9,2 9,2 10,4 10)),((9 4,9 3,8 3,8 5,9 5,9 4)),((7 2,8 2,8 0,7 0,7 2)),((8 7,10 7,10 6,7 6,7 8,8 8,8 7)))",
+ "MULTIPOLYGON(((2 6,2 8,3 8,3 7,5 7,5 6,6 6,6 5,8 5,8 6,9 6,9 4,8 4,8 3,7 3,7 4,6 4,6 3,5 3,5 4,3 4,3 6,2 6),(5 6,4 6,4 5,5 5,5 6)),((1 1,2 1,2 0,1 0,1 1)),((2 1,2 2,3 2,3 1,2 1)),((2 2,1 2,1 3,2 3,2 2)),((1 3,0 3,0 5,1 5,1 4,1 3)),((1 5,1 6,2 6,2 5,1 5)),((2 8,0 8,0 10,3 10,4 10,4 9,2 9,2 8)),((8 6,7 6,7 7,8 7,8 6)),((8 7,8 10,9 10,9 9,10 9,10 8,9 8,9 7,8 7)),((9 7,10 7,10 6,9 6,9 7)),((9 4,10 4,10 3,10 1,9 1,9 2,8 2,8 3,9 3,9 4)),((8 2,8 1,7 1,7 2,8 2)),((8 1,9 1,9 0,8 0,8 1)),((7 1,7 0,5 0,3 0,3 1,4 1,4 2,6 2,6 1,7 1)),((6 2,6 3,7 3,7 2,6 2)),((3 4,3 3,2 3,2 4,3 4)),((6 8,6 9,7 9,7 8,6 8)))"
+};
+
+static std::string case_recursive_boxes_6[2] =
+{
+ // [1] is reported as invalid by BG, but not by postgis
+ // Fixed by replacing handle_tangencies
+ "MULTIPOLYGON(((0 3,1 3,1 4,2 4,2 5,5 5,5 0,2 0,0 0,0 3),(2 0,2 1,1 1,2 0),(2 1,2 2,1.5 1.5,2 1),(2 2,3 1,3 2,2 2),(3 2,3.5 1.5,4 2,3 2)),((0 3,0 5,1 5,2 5,1 4,0 3)))",
+ "MULTIPOLYGON(((1 2,2 3,1 3,1 4,0 4,0 5,5 5,5 2,4 2,3 2,3 1,2 1,2 2,1 2),(4 2,4 3,3 3,4 2)),((1 2,2 1,3 0,2 0,0 0,0 3,1 3,1 2)),((3 0,3 1,4 2,4 1,5 1,5 0,4 0,3 0)))"
+};
+
+static std::string case_recursive_boxes_7[2] =
+{
+ "MULTIPOLYGON(((3 1,3 2,4 2,4 1,3 1)),((2.5 2.5,3 3,3 2,2 2,2 3,2.5 2.5)),((2 1,3 0,1 0,1 2,2 2,2 1)))",
+ "MULTIPOLYGON(((0 0,1 1,1 0,0 0)),((0 1,0 2,1 2,0 1)),((3.5 2.5,4 3,4 2,3 2,3 3,3.5 2.5)),((3 2,4 1,1 1,1 2,3 2)))"
+};
+
+static std::string case_recursive_boxes_8[2] =
+{
+ // Having colocated IP halfway segment
+ "MULTIPOLYGON(((3 4,3 3,2 3,2 2,0 2,0 3,1 3,1 4,1.5 3.5,2 4,3 4)),((2 5,2 4,1 4,0 3,0 5,2 5)))",
+ "MULTIPOLYGON(((0 2,0 4,3 4,4 4,4 3,3 3,3 1,0 1,0 2),(0 2,1 2,1 3,0 2)))"
+};
+
+static std::string case_recursive_boxes_9[2] =
+{
+ // Needs ii turn skipping
+ "MULTIPOLYGON(((2 2,3 2,3 0,2 0,2 1,1 1,2 2)),((1 1,1 0,0 0,0 3,0.5 2.5,1 3,2 2,1 2,1 1)))",
+ "MULTIPOLYGON(((2 1,2 2,0 2,0 3,2 3,3 2,3 1,2 1)),((2.5 0.5,3 1,3 0,0 0,0 1,1 1,1 2,2.5 0.5)))"
+};
+
+static std::string case_recursive_boxes_10[4] =
+{
+ // Requires skipping ux for difference (a) and switching a->b
+ "MULTIPOLYGON(((2 2,2 3,3 2,2 2)),((2 2,3 1,1 1,1 2,2 2)))",
+ "MULTIPOLYGON(((3 2,2 1,2 3,3 3,3 2)))",
+
+ // Inverse versions
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0),(2 2,3 2,2 3,2 2),(2 2,1 2,1 1,3 1,2 2)))",
+ "MULTIPOLYGON(((1 0,1 4,4 4,4 0,1 0),(3 2,3 3,2 3,2 1,3 2)))"
+};
+
+static std::string case_recursive_boxes_11[4] =
+{
+ // Requires switching a->b
+ "MULTIPOLYGON(((3 2,5 2,5 1,4 1,4 0,3 0,3 1,2 1,3 2)))",
+ "MULTIPOLYGON(((5 2,4 1,4 3,5 2)),((3 1,3 2,4 2,3 1)),((4 1,5 1,5 0,4 0,4 1)),((3 2,2 1,3 1,2 0,1 1,2 2,2 3,3 3,3 2)))",
+
+ // Inverse versions
+ "MULTIPOLYGON(((0 -1,0 4,6 4,6 -1,0 -1),(3 2,2 1,3 1,3 0,4 0,4 1,5 1,5 2,3 2)))",
+ "MULTIPOLYGON(((0 -1,0 4,6 4,6 -1,0 -1),(5 2,4 3,4 1,5 2),(3 1,4 2,3 2,3 1),(4 1,4 0,5 0,5 1,4 1),(3 2,3 3,2 3,2 2,1 1,2 0,3 1,2 1,3 2)))"
+};
+
+static std::string case_recursive_boxes_12[2] =
+{
+ "MULTIPOLYGON(((0 3,1 3,0.5 2.5,1 2,0 2,0 3)),((1 2,2 2,2 1,1 1,1 2)),((2 1,3 2,3 1,2 1)),((2 2,2 3,3 3,2 2)),((0 0,0 1,1 0,0 0)))",
+ "MULTIPOLYGON(((0 1,0 2,1 2,0 1)),((0 1,1 1,1.5 0.5,2 1,2 0,0 0,0 1)),((1 3,1 4,2 3,1 2,1 3)))"
+};
+
+static std::string case_recursive_boxes_13[2] =
+{
+ "MULTIPOLYGON(((1 3,1 5,2 5,2 4,1.5 3.5,2 3,1 3)),((1 3,2 2,0 2,1 3)),((2 2,3 2,3 1,2 1,2 2)),((3 2,3 3,4 3,4 2,3 2)))",
+ "MULTIPOLYGON(((1 4,1 3,0 3,0 4,1 5,1 4)),((3 5,4 5,4 4,2 4,2 5,3 5)),((3 1,3 2,5 2,5 1,3 1)))"
+};
+
+static std::string case_recursive_boxes_14[2] =
+{
+ "MULTIPOLYGON(((2 2,2 3,3 2,2 2)),((2 3,3 4,3 3,2 3)),((2 3,1 3,1 4,2 4,2 3)))",
+ "MULTIPOLYGON(((3 3,4 4,4 3,3 3)),((1 2,2 3,2 2,1 2)),((2 1,2 2,3 1,2 1)),((1 4,1 5,2 5,2 4,1 4)))"
+};
+
+static std::string case_recursive_boxes_12_invalid[2] =
+{
+ // One of them is invalid requiring discarding turns colocated with uu in these clusters
+ "MULTIPOLYGON(((2 2,2 3,3 3,2 2)),((0 0,0 1,1 0,0 0)),((0 3,1 3,0.5 2.5,1 2,0 2,0 3)),((3 2,3 1,1 1,1 2,2 2,2 1,3 2)))",
+ "MULTIPOLYGON(((0 1,0 2,1 2,0 1)),((0 1,1 1,1.5 0.5,2 1,2 0,0 0,0 1)),((1 3,1 4,2 3,1 2,1 3)))"
+};
+
+static std::string case_recursive_boxes_13_invalid[2] =
+{
+ // Strictly invalid, requires checking seg_id while considering skipping to next turn
+ "MULTIPOLYGON(((2 1,2 2,3 2,3 1,2 1)),((3 2,3 3,4 3,4 2,3 2)),((2 4,1.5 3.5,2 3,1 3,2 2,0 2,1 3,1 5,2 5,2 4)))",
+ "MULTIPOLYGON(((1 4,1 3,0 3,0 4,1 5,1 4)),((3 5,4 5,4 4,2 4,2 5,3 5)),((3 1,3 2,5 2,5 1,3 1)))"
+};
+
+static std::string case_recursive_boxes_14_invalid[2] =
+{
+ // Strictly invalid, requires skipping assignment of discarded turns for clusters
+ "MULTIPOLYGON(((2 2,2 3,3 2,2 2)),((2 4,2 3,3 4,3 3,1 3,1 4,2 4)))",
+ "MULTIPOLYGON(((3 3,4 4,4 3,3 3)),((1 2,2 3,2 2,1 2)),((2 1,2 2,3 1,2 1)),((1 4,1 5,2 5,2 4,1 4)))"
+};
+
+
+static std::string case_recursive_boxes_15[2] =
+{
+ // Requires inspecting blocked operations in traversing cluster
+ "MULTIPOLYGON(((3 2,3 3,4 3,3 2)),((4 1,4 2,5 2,5 1,4 1)),((4 2,4 3,5 3,4 2)),((3 5,4 4,2 4,2 5,3 5)))",
+ "MULTIPOLYGON(((3 4,4 3,3 2,3 3,2 3,2 4,3 4)),((4 3,4 4,5 4,5 3,4 3)))"
+};
+
+static std::string case_recursive_boxes_16[2] =
+{
+ // Requires inspecting if traverse is possible in selecting continue operation
+ "MULTIPOLYGON(((2 4,1 3,0 3,0 5,3 5,3 4,2 4)),((3 4,4 4,4 5,5 5,5 4,4 3,2 3,3 4)),((2.5 1.5,3 1,2.5 0.5,3 0,0 0,0 2,3 2,2.5 1.5)),((3 1,3 2,4 2,4 1,5 2,5 0,3 0,3 1)))",
+ "MULTIPOLYGON(((0 1,1 1,1 0,0 0,0 1)),((0 1,0 5,1 5,1 3,2 3,2 2,1 1,1 2,0 1)),((2 2,3 1,2 1,2 2)),((3 1,3 2,4 1,5 1,5 0,3 0,3 1)),((4 1,4 2,3 2,3 4,2 4,2 5,3 5,5 5,5 4,4 4,4 3,5 3,5 2,4 1)))"
+};
+
+static std::string case_recursive_boxes_17[2] =
+{
+ // Requires including uu turns, at least in clusters
+ "MULTIPOLYGON(((0 4,0 5,1 5,0 4)),((1 5,1.5 4.5,2 5,2 4,1 3,1 5)),((2 4,3 4,3 3,2 2,1 2,1 3,2 3,2 4)),((1 2,1 1,2 1,3 0,0 0,0 2,1 2)),((2 1,2 2,2.5 1.5,4 3,5 3,5 1,4 1,4 0,3 0,3 1,2 1)),((4 0,5 1,5 0,4 0)),((3 4,3 5,4 5,5 5,5 4,3 4)))",
+ "MULTIPOLYGON(((2 5,3 5,2 4,2 5)),((3 1,4 2,4 0,3 0,3 1)),((2 0,0 0,0 1,1 2,0 2,1 3,2 2,2 3,3 2,3 1,2 0)),((1 4,0.5 3.5,1 3,0 3,0 4,1 4)),((4 3,3 3,3 5,4 5,4 4,5 4,5 2,4 2,4 3)))"
+};
+
+static std::string case_recursive_boxes_18[2] =
+{
+ // Simple case having two colocated uu turns
+ "MULTIPOLYGON(((2 1,3 0,2 0,2 1)),((2 1,1 1,1 2,2 1)))",
+ "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 1,2 2)))"
+};
+
+static std::string case_recursive_boxes_19[2] =
+{
+ // Simple case having two colocated uu and ux turns
+ "MULTIPOLYGON(((1 4,2 3,1 3,1 4)),((1 4,0 4,0 5,1 4)))",
+ "MULTIPOLYGON(((3 4,1 4,2 5,3 4)),((1 4,1 3,0 3,1 4)))"
+};
+
+static std::string case_recursive_boxes_20[2] =
+{
+ // Simple case having two colocated uu and (discarded) cc turns
+ "MULTIPOLYGON(((4 4,4 5,5 5,5 4,4 4)),((4 4,4 3,3 3,3 4,4 4)))",
+ "MULTIPOLYGON(((4 4,4 3,3 3,4 4)),((4 4,4 5,5 4,4 4)))"
+};
+
+static std::string case_recursive_boxes_21[2] =
+{
+ // Having colocated uu/ux/cc turns requiring traversing through arcs to
+ // find first open outgoing arc for union
+ "MULTIPOLYGON(((3 1,3 2,4 1,3 1)),((3 1,3 0,2 0,2 1,3 1)))",
+ "MULTIPOLYGON(((3 1,3 0,2 0,3 1)),((3 1,2 1,2 2,3 2,3 1)))"
+};
+
+static std::string case_recursive_boxes_22[2] =
+{
+ // Requires including ux turns for intersections to block paths
+ "MULTIPOLYGON(((2 2,3 2,2.5 1.5,3 1,2 1,2 2)),((2 2,2 3,3 3,2 2)))",
+ "MULTIPOLYGON(((1 2,0 2,0 3,1 2)),((1 2,2 3,2 1,1 1,1 2)))"
+};
+
+static std::string case_recursive_boxes_23[2] =
+{
+ // Requires discarding turns with uu for intersection/difference too
+ "MULTIPOLYGON(((4 3,4 4,4.5 3.5,5 4,5 3,4 3)),((4 3,5 2,4 2,4 3)))",
+ "MULTIPOLYGON(((4 3,5 4,5 3,4 3)),((3 3,3 4,4 3,3 3)))"
+};
+
+static std::string case_recursive_boxes_24[2] =
+{
+ // Requires including all combinations in clusters having uu
+ "MULTIPOLYGON(((0 2,0 3,1 2,0 2)),((2 3,1 3,1 4,2 4,2 3)),((2 3,4 3,3 2,2 2,2 3)))",
+ "MULTIPOLYGON(((3 2,4 1,2 1,3 2)),((3 2,2 2,2 3,3 2)),((2 2,2 1,1 1,1 2,2 2)))"
+};
+
+static std::string case_recursive_boxes_25[2] =
+{
+ // Requires startable flag per operation, assigned per cluster
+ "MULTIPOLYGON(((4 1,4 2,5 2,5 1,4 0,4 1)),((3 2,3 3,4 3,4 2,3 2)),((3 2,3 1,2 1,3 2)))",
+ "MULTIPOLYGON(((4 2,4 1,3 1,4 2)),((4 2,4 3,5 2,4 2)),((3 1,1 1,1 2,3 2,3 1)))"
+};
+
+static std::string case_recursive_boxes_26[2] =
+{
+ // Requires not including uu outside clusters (or travel through them)
+ "MULTIPOLYGON(((2 4,3 4,3 3,0 3,1 4,1 5,2 5,2 4)),((1 3,1 2,0 2,1 3)))",
+ "MULTIPOLYGON(((2 3,0 3,0 4,1 4,1 5,3 5,3 4,2 4,2 3)),((2 3,3 2,2 2,2 3)))"
+};
+
+static std::string case_recursive_boxes_27[2] =
+{
+ // Combination of lonely uu-turn (which is discarded) and a cluster containing it
+ "MULTIPOLYGON(((2 2,3 1,3 0,2 0,2 2)),((2 2,1 2,1 3,2 2)))",
+ "MULTIPOLYGON(((1 2,0 1,0 2,1 2)),((2 1,2 0,1 0,1 1,2 2,2 1)),((1 3,2 2,1 2,1 3)),((1 3,0 3,1 4,1 3)))"
+};
+
+static std::string case_recursive_boxes_28[2] =
+{
+ // Requires startable flag per operation, assigned per cluster (as #25 but in a different configuration)
+ "MULTIPOLYGON(((5 1,5 0,4 0,4 2,5 3,5 1)),((4 2,3 2,3 3,4 3,4 2)))",
+ "MULTIPOLYGON(((2 2,2 3,3 3,4 2,3 1,2 1,2 2)),((3 4,4 3,3 3,3 4)),((4 2,5 2,4 1,4 2)))"
+};
+
+static std::string case_recursive_boxes_29[2] =
+{
+ // Requires not discarding colocated cc turns
+ "MULTIPOLYGON(((2 3,2 4,1 4,2 5,4 5,4 4,3 4,3 3,2 3)),((3 3,4 3,4 1,5 1,5 0,3 0,3 2,2 2,3 3)),((1 2,0 2,0 3,1 3,1 2)),((1 1,0 1,1 2,2 2,2 1,1 1)),((2 1,2 0,1 0,2 1)))",
+ "MULTIPOLYGON(((0 4,0 5,1 4,0 4)),((2 3,2 4,4 4,4 3,2 3)),((2 2,1 2,1 3,2 3,2 2)),((1 2,0 2,0 3,1 3,0.5 2.5,1 2)),((1 0,0 0,1 1,4 1,4 0,1 0)),((4 0,5 1,5 0,4 0)))"
+};
+
+static std::string case_recursive_boxes_30[2] =
+{
+ // Requires not discarding turns colocated with uu/invalid polygons (now not necessary anymore because of startable)
+ "MULTIPOLYGON(((2 2,2 3,4 3,4 4,4.5 3.5,5 4,5 0,3 0,3 1,4 1,4 2,2 2)),((1 5,3 5,4 4,0 4,0 5,1 5)))",
+ "MULTIPOLYGON(((2 1,2 3,1 3,1 4,2 5,2 4,3 4,3 5,5 5,5 4,4 4,5 3,4.5 2.5,5 2,5 0,4 0,4 1,3 1,3 0,1 0,2 1),(4 4,3.5 3.5,4 3,4 4),(4 1,4 2,3 2,4 1),(3 2,3 3,2.5 2.5,3 2)))"
+};
+
+static std::string case_recursive_boxes_31[2] =
+{
+ // Requires allowing traverse through clusters having only uu/cc for intersection
+ "MULTIPOLYGON(((1 4,1 1,0 1,0 4,1 4)),((1 1,2 1,2 0,1 0,1 1)),((2 2,1 2,2 3,2 2)))",
+ "MULTIPOLYGON(((2 3,2 2,1 2,2 3)),((0 1,0 3,1 3,1 1,0 1)),((1 1,1 0,0 0,1 1)))"
+};
+
+static std::string case_recursive_boxes_32[2] =
+{
+ // Similar to #31 but here uu/ux/cc
+ "MULTIPOLYGON(((1 3,2 3,2 2,1 1,1 3)),((2 2,3 1,3 0,2 0,2 2)),((1 1,2 1,1 0,0 0,0 1,1 1)))",
+ "MULTIPOLYGON(((3 1,3 0,2 0,2 2,3 1)),((1 1,0 1,0 2,1 2,2 1,1 1)))"
+};
+
+static std::string case_recursive_boxes_33[2] =
+{
+ // Similar to #31 but here also a ui
+ "MULTIPOLYGON(((4 3,5 3,5 2,3 2,4 3)),((4 2,5 1,3 1,4 2)),((2 1,3 1,3 0,2 0,2 1)),((3 2,1 2,1 3,2 3,3 2)))",
+ "MULTIPOLYGON(((3 1,2 1,2 4,4 4,4 3,5 2,3 2,3 1)),((3 1,4 2,4 1,5 1,5 0,3 0,3 1)))"
+};
+
+static std::string case_recursive_boxes_34[2] =
+{
+ // Requires detecting finished arcs during cluster traversal
+ "MULTIPOLYGON(((2 0,0 0,0 5,2 5,2 4,3 5,5 5,5 0,2 0)))",
+ "MULTIPOLYGON(((1 0,0 0,0 5,1 4,1 5,4 5,5 4,5 1,4 1,4 3,3 3,2 3,2 2,3 2,3 1,2 0,1 0),(1 0,2 1,1 1,1 0),(4 5,3 4,3.5 3.5,4 4,4 5)),((4 1,3 0,3 1,4 1)))"
+};
+
+static std::string case_recursive_boxes_35[2] =
+{
+ // Requires detecting finished arcs during cluster traversal
+ "MULTIPOLYGON(((0 2,0 5,4 5,4 4,5 4,5 1,4 1,5 0,3 0,0 0,0 2),(0 2,1 2,1 3,0 2),(3 0,3 1,2 1,3 0),(2.5 1.5,3 2,2 2,2.5 1.5),(2 4,1 4,2 3,2 4)))",
+ "MULTIPOLYGON(((1 0,0 0,0 5,3 5,5 5,5 0,1 0),(1 0,2 1,1 1,1 0),(2 1,2 2,1.5 1.5,2 1),(3 5,2.5 4.5,3 4,3 5),(3 2,3 3,2.5 2.5,3 2),(2 3,2 4,1 4,1 3,2 3)))"
+};
+
+static std::string case_recursive_boxes_36[2] =
+{
+ // Requires increasing target rank while skipping finished arcs to avoid duplicate output
+ "MULTIPOLYGON(((5 3,4 3,4 4,5 3)),((5 2,4 2,5 3,5 2)),((5 2,5 1,4 1,5 2)))",
+ "MULTIPOLYGON(((4 2,4 3,5 3,5 2,4 2)),((4 2,4 1,3 1,3 2,4 2)))"
+};
+
+static std::string case_recursive_boxes_37[2] =
+{
+ // [1] is reported as invalid by BG, but not by postgis
+ // Requires skipping arc for union too, to avoid duplicate hole
+ "MULTIPOLYGON(((4 0,5 1,5 0,4 0)),((2 0,3 1,3 0,2 0)),((2 3,2 2,1 2,1 3,2 3)),((2 1,2 2,4 2,3 1,2 1)))",
+ "MULTIPOLYGON(((3 1,4 2,4 3,5 3,5 0,3 0,3 1),(3 1,3.5 0.5,4 1,3 1)),((3 1,2 0,2 1,3 1)),((2 3,1 2,1 3,2 3)))"
+};
+
+static std::string case_recursive_boxes_38[2] =
+{
+ // Smaller version of 29, removing generated lower interior in a union
+ "MULTIPOLYGON(((2 3,2 4,1 4,2 5,4 5,4 4,3 4,3 3,2 3)),((3 3,4 3,4 1,5 1,5 0,3 0,3 2,2 2,3 3)),((1 2,0 2,0 3,1 3,1 2)),((1 1,0 1,1 2,2 2,2 1,1 1)))",
+ "MULTIPOLYGON(((2 2,4 2,4 1,2 1,2 2)),((0 4,0 5,1 4,0 4)),((2 3,2 4,4 4,4 3,2 3)),((2 2,1 2,1 3,2 3,2 2)),((1 2,0 2,0 3,1 3,0.5 2.5,1 2)))"
+};
+
+static std::string case_recursive_boxes_39[2] =
+{
+ // Needs check for back at start during traversal
+ "MULTIPOLYGON(((3 8,2 8,2 9,3 9,3 8)),((4 8,4 9,5 9,5 8,4 8)),((6 9,6 10,7 10,7 9,6 9)),((5 6,4 6,4 7,6 7,6 5,5 5,5 6)),((4 7,3 7,3 8,4 8,4 7)),((7 8,8 8,8 7,6 7,6 8,7 8)))",
+ "MULTIPOLYGON(((3 7,3 6,2 6,2 7,3 7)),((4 8,4 7,3 7,3 8,4 8)),((6 10,7 10,7 9,5 9,5 10,6 10)),((5 8,4 8,4 9,5 9,5 8)),((5 8,6 8,6 7,5 7,5 8)))"
+};
+
+static std::string case_recursive_boxes_40[2] =
+{
+ "MULTIPOLYGON(((8 7,9 7,9 6,7 6,7 7,8 7)),((6 4,7 4,7 3,6 3,6 4)),((6 4,5 4,5 5,6 5,6 4)),((3 6,3 7,4 7,4 6,3 6)),((3 6,3 5,2 5,2 6,3 6)),((1 0,1 1,2 1,2 0,1 0)),((7 9,8 9,8 8,6 8,6 9,7 9)),((6 8,6 7,5 7,5 8,6 8)),((5 1,5 0,3 0,3 1,5 1)),((5 1,5 2,6 2,6 1,5 1)),((4 3,4 4,5 4,5 3,4 3)),((4 3,4 2,3 2,3 3,4 3)))",
+ "MULTIPOLYGON(((7 2,7 3,8 3,8 2,7 2)),((5 9,5 10,6 10,6 9,5 9)),((7 0,6 0,6 2,7 2,7 1,8 1,8 0,7 0)),((5 3,5 4,6 4,6 3,5 3)),((7 4,7 5,8 5,8 4,7 4)),((2 2,2 1,1 1,1 2,2 2)),((2 2,2 3,3 3,3 2,2 2)),((4 7,4 6,3 6,3 7,4 7)),((5 5,4 5,4 6,5 6,5 7,6 7,6 5,5 5)),((5 7,4 7,4 8,5 8,5 7)))"
+};
+
+static std::string case_recursive_boxes_41[2] =
+{
+ // Smaller version of 35 for validity checks
+ "MULTIPOLYGON(((0 2,0 5,5 5,5 1,5 0,3 0,0 0,0 2),(0 2,1 2,1 3,0 2),(2 4,1 4,2 3,2 4)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 3,2 4,1 4,1 3,2 3)))"
+};
+
+static std::string case_recursive_boxes_42[2] =
+{
+ // Smaller version of 2 for validity checks
+ "MULTIPOLYGON(((0 0,0 10,6 10,6 9,7 9,7 10,10 10,10 0,0 0),(6 9,5 9,5 8,6 8,6 9),(7 6,8 6,8 7,7 7,7 6),(8 7,9 7,9 8,8 8,8 7)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(6 7,7 7,7 8,6 8,6 7)))"
+};
+
+static std::string case_recursive_boxes_43[2] =
+{
+ // Smaller version of 35 for validity checks
+ "MULTIPOLYGON(((0 2,0 5,4 5,4 4,5 4,5 1,4 1,5 0,3 0,0 0,0 2),(3 0,3 1,2 1,3 0)))",
+ "MULTIPOLYGON(((1 0,0 0,0 5,3 5,5 5,5 0,1 0),(1 0,2 1,1 1,1 0)))"
+};
+
+static std::string case_recursive_boxes_44[2] =
+{
+ // Needs discarding uu turns in intersections, either globally or in aggregations
+ "MULTIPOLYGON(((4 1,5 1,5 0,4 0,4 1)),((4 1,2 1,2 2,4 2,4 1)),((2 2,1 2,1 1,2 1,2 0,0 0,0 3,2 3,2 2)))",
+ "MULTIPOLYGON(((2 1,2 2,3 2,3 1,2 1)),((1 0,0 0,0 1,2 1,2 0,1 0)))"
+};
+
+static std::string case_recursive_boxes_45[2] =
+{
+ // Needs discarding u/x turns in aggregations (for clusters for intersections)
+ // This case did go wrong, don't make it smaller, it also depends on the order of turns
+ "MULTIPOLYGON(((5 2,5 3,4 3,4 6,6 6,6 5,8 5,8 1,5 1,5 2)),((4 7,4 6,1 6,1 4,0 4,0 7,2 7,2 8,3 8,3 7,4 7)),((3 3,2 3,2 5,3 5,3 3)),((3 3,4 3,4 0,3 0,3 1,2 1,2 2,3 2,3 3)),((1 1,2 1,2 0,1 0,1 1)),((1 1,0 1,0 2,1 2,1 1)),((2 3,2 2,1 2,1 3,2 3)))",
+ "MULTIPOLYGON(((5 1,4 1,4 2,7 2,7 1,5 1)),((7 6,7 4,6 4,6 3,4 3,4 4,3 4,3 5,6 5,6 6,3 6,3 8,2 8,2 9,7 9,7 6)),((3 4,3 2,1 2,1 1,0 1,0 4,1 4,1 3,2 3,2 4,3 4)),((4 1,4 0,2 0,2 1,4 1)),((2 4,1 4,1 5,2 5,2 4)))"
+};
+
+static std::string case_recursive_boxes_46[2] =
+{
+ "MULTIPOLYGON(((8 9,8 10,9 10,9 9,8 9)),((5 5,5 4,3 4,3 5,5 5)),((5 5,5 6,6 6,6 5,5 5)),((5 9,6 9,6 10,7 10,7 8,9 8,9 5,10 5,10 4,9 4,6 4,6 5,7 5,7 6,6 6,6 8,3 8,3 9,4 9,4 10,5 10,5 9),(7 6,8 6,8 7,7 7,7 6)))",
+ "MULTIPOLYGON(((5 10,6 10,6 9,5 9,5 10)),((5 3,4 3,4 7,7 7,7 6,8 6,8 3,5 3),(5 5,5 4,7 4,7 6,6 6,6 5,5 5)),((9 7,9 6,8 6,8 7,9 7)),((9 7,9 9,8 9,8 10,10 10,10 7,9 7)),((8 9,8 8,7 8,7 9,8 9)))"
+};
+
+static std::string case_recursive_boxes_47[2] =
+{
+ // Needs open_count==0 in get_ring_turn_info to select_rings
+ "MULTIPOLYGON(((5 4,6 4,6 3,4 3,4 5,5 5,5 4)),((5 5,5 6,6 6,6 5,5 5)),((5 6,3 6,3 7,4 7,4 8,7 8,7 6,6 6,6 7,5 7,5 6)),((6 4,6 5,7 5,7 4,6 4)))",
+ "MULTIPOLYGON(((4 5,4 4,1 4,1 5,4 5)),((5 6,5 7,6 7,6 6,5 6)),((5 6,5 5,4 5,4 6,5 6)),((5 3,5 5,6 5,6 3,5 3)),((5 3,5 2,4 2,4 3,5 3)),((6 5,6 6,7 6,7 5,6 5)),((3 7,2 7,2 9,3 9,3 8,4 8,4 7,3 7)))"
+};
+
+static std::string case_recursive_boxes_48[2] =
+{
+ // Needs discarding self-ii turns not located within the other geometry
+ "MULTIPOLYGON(((6 7,6 8,7 8,7 7,6 7)))",
+ "MULTIPOLYGON(((9 9,10 9,10 7,9 7,9 5,8 5,8 6,7 6,7 7,6 7,6 8,7 8,7 9,8 9,8 10,9 10,9 9),(9 8,8 8,8 7,9 7,9 8)))"
+};
+
+static std::string case_recursive_boxes_49[2] =
+{
+ // Needs specific handling for cc interior rings touching one exterior ring
+ "MULTIPOLYGON(((5 2,5 3,4 3,4 4,5 4,5 5,6 5,6 2,7 2,7 1,0 1,0 3,1 3,1 2,5 2)),((5 7,5 8,6 8,6 9,7 9,7 10,10 10,10 8,9 8,9 6,10 6,10 4,9 4,9 3,8 3,8 4,7 4,7 6,5 6,5 7),(7 6,8 6,8 7,7 7,7 6),(8 9,7 9,7 8,8 8,8 9)),((2 6,4 6,4 5,3 5,3 4,1 4,1 5,2 5,2 6)),((3 10,4 10,4 7,2 7,2 10,3 10)))",
+ "MULTIPOLYGON(((5 1,4 1,4 3,3 3,3 6,2 6,2 9,5 9,5 7,4 7,4 4,5 4,5 3,6 3,6 2,8 2,8 1,9 1,9 0,5 0,5 1),(4 7,4 8,3 8,3 7,4 7)),((8 2,8 3,9 3,9 2,8 2)),((9 5,9 6,10 6,10 5,9 5)),((9 5,9 4,8 4,8 5,9 5)),((7 5,7 4,6 4,6 5,7 5)),((7 10,9 10,9 9,10 9,10 7,8 7,8 6,6 6,6 10,7 10),(7 9,7 8,8 8,8 9,7 9)))"
+};
+
+static std::string case_recursive_boxes_50[2] =
+{
+ // Same as 49 but needs the second variant
+ "MULTIPOLYGON(((6 9,6 10,7 10,7 9,6 9)),((5 6,6 6,6 5,4 5,4 7,3 7,3 8,4 8,4 9,2 9,2 10,5 10,5 8,6 8,6 7,5 7,5 6)),((4 0,1 0,1 1,2 1,2 2,3 2,3 3,5 3,5 0,4 0)),((3 5,3 3,1 3,1 4,0 4,0 6,1 6,1 7,0 7,0 8,2 8,2 6,3 6,3 5),(2 5,1 5,1 4,2 4,2 5)),((1 1,0 1,0 2,1 2,1 1)),((6 5,7 5,7 4,6 4,6 5)),((10 5,8 5,8 6,9 6,9 7,10 7,10 5)),((6 0,6 1,8 1,8 2,10 2,10 0,6 0)),((9 7,7 7,7 8,8 8,8 9,9 9,9 7)),((8 2,6 2,6 3,8 3,8 2)),((9 9,9 10,10 10,10 9,9 9)))",
+ "MULTIPOLYGON(((5 3,5 4,6 4,6 3,5 3)),((5 7,6 7,6 5,4 5,4 6,3 6,3 7,4 7,4 8,5 8,5 7)),((3 6,3 4,4 4,4 3,1 3,1 2,0 2,0 9,1 9,1 10,3 10,3 9,2 9,2 8,3 8,3 7,1 7,1 6,3 6),(1 5,1 4,2 4,2 5,1 5)),((4 0,0 0,0 1,1 1,1 2,3 2,3 1,5 1,5 0,4 0)),((7 6,7 7,8 7,8 8,9 8,9 6,8 6,8 5,7 5,7 6)),((9 0,7 0,7 1,9 1,9 2,10 2,10 0,9 0)),((7 9,5 9,5 10,7 10,7 9)),((7 9,8 9,8 8,7 8,7 9)),((8 3,8 2,7 2,7 3,8 3)),((8 3,8 4,9 4,9 3,8 3)),((8 9,8 10,9 10,9 9,8 9)),((9 8,9 9,10 9,10 8,9 8)))"
+};
+
+static std::string case_recursive_boxes_51[2] =
+{
+ // Needs keeping colocated turns with a xx turn to properly generate interior rings. It also needs self-turns for validity
+ "MULTIPOLYGON(((0 4,0 5,1 5,1 4,0 4)),((2 1,3 1,3 0,2 0,2 1)),((3 3,4 3,4 2,3 2,3 3)),((5 4,6 4,6 3,5 3,5 4)),((2 3,2 4,3 4,3 3,2 3)),((5 6,4 6,4 5,3 5,3 10,4 10,4 9,5 9,5 8,4 8,4 7,6 7,6 9,7 9,7 10,8 10,8 8,7 8,7 7,8 7,8 4,7 4,7 5,6 5,6 6,5 6)),((5 0,4 0,4 1,5 1,5 2,6 2,6 3,7 3,7 1,8 1,8 0,5 0)),((0 2,1 2,1 1,0 1,0 2)),((1 2,1 3,2 3,2 2,1 2)),((1 10,2 10,2 8,1 8,1 9,0 9,0 10,1 10)),((1 8,1 7,0 7,0 8,1 8)),((10 1,10 0,9 0,9 1,8 1,8 4,9 4,9 6,10 6,10 1)))",
+ "MULTIPOLYGON(((3 1,4 1,4 0,2 0,2 1,3 1)),((1 9,0 9,0 10,1 10,1 9)),((8 2,9 2,9 1,10 1,10 0,8 0,8 2)),((5 8,4 8,4 9,5 9,5 10,7 10,7 8,8 8,8 7,7 7,7 6,8 6,8 7,10 7,10 6,9 6,9 3,8 3,8 2,6 2,6 1,5 1,5 3,7 3,7 4,4 4,4 5,5 5,5 6,6 6,6 8,5 8),(7 5,7 4,8 4,8 5,7 5)),((4 4,4 3,2 3,2 4,1 4,1 5,0 5,0 7,1 7,1 9,2 9,2 8,4 8,4 6,3 6,3 4,4 4),(1 5,2 5,2 6,1 6,1 5)),((0 3,1 3,1 1,0 1,0 3)),((4 9,3 9,3 10,4 10,4 9)),((9 10,10 10,10 9,9 9,9 8,8 8,8 10,9 10)))"
+};
+
+static std::string case_recursive_boxes_52[2] =
+{
+ // Needs checking for isolated in handling of cc_ii clusters for intersection
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)),((5 1,2 1,2 3,1 3,1 4,0 4,0 8,1 8,1 9,2 9,2 8,5 8,5 5,6 5,6 7,7 7,7 9,9 9,9 10,10 10,10 7,9 7,9 6,10 6,10 5,9 5,9 1,8 1,8 2,7 2,7 3,6 3,6 4,5 4,5 2,6 2,6 0,5 0,5 1),(4 4,4 5,3 5,3 6,4 6,4 7,1 7,1 6,2 6,2 5,3 5,3 4,4 4),(7 5,7 4,8 4,8 6,7 6,7 5),(2 5,1 5,1 4,2 4,2 5)),((5 8,5 9,6 9,6 8,5 8)),((8 1,8 0,7 0,7 1,8 1)))",
+ "MULTIPOLYGON(((1 1,2 1,2 0,1 0,1 1)),((9 10,10 10,10 9,9 9,9 10)),((3 9,3 10,4 10,4 9,3 9)),((1 10,2 10,2 9,0 9,0 10,1 10)),((5 4,4 4,4 3,3 3,3 2,1 2,1 1,0 1,0 3,2 3,2 4,1 4,1 5,5 5,5 7,6 7,6 6,7 6,7 8,9 8,9 7,8 7,8 6,9 6,9 4,8 4,8 3,10 3,10 2,8 2,8 1,7 1,7 0,6 0,6 2,7 2,7 3,6 3,6 4,5 4),(8 5,7 5,7 4,8 4,8 5)),((5 9,5 10,8 10,8 9,6 9,6 8,5 8,5 9)),((4 0,3 0,3 1,4 1,4 2,5 2,5 0,4 0)),((3 8,4 8,4 6,2 6,2 8,3 8)),((9 1,9 0,8 0,8 1,9 1)),((9 7,10 7,10 6,9 6,9 7)))"
+};
+
+static std::string case_recursive_boxes_53[2] =
+{
+ // Needs checking for intersection patterns intersection_pattern_common_interior2 with ii
+ "MULTIPOLYGON(((2 0,0 0,0 5,5 5,4 4,5 4,5 0,2 0),(2.5 4.5,3 4,3 5,2.5 4.5),(3 1,4 0,4 1,3 1),(3 3,4 2,4 3,3 3)))",
+ "MULTIPOLYGON(((2 0,0 0,0 5,1 5,0.5 4.5,1 4,2 5,5 5,5 0,2 0),(2 3,2 4,1 4,2 3),(3 1,3 2,2 2,2 1,3 1),(1 3,0 2,1 2,1 3),(1 0,1 1,0.5 0.5,1 0),(5 3,4 3,4 2,5 3),(4 1,3.5 0.5,4 0,4 1)))"
+};
+
+static std::string case_recursive_boxes_54[2] =
+{
+ // Needs including blocked from-ranks/operations in aggregations
+ "MULTIPOLYGON(((2 2,2 3,1 3,1 5,2 4,2 5,5 5,5 4,4 3,5 3,5 2,4 2,4 1,5 0,2 0,2 1,1 1,1 2,2 2),(3 2,2.5 1.5,3 1,4 2,3 2),(3 2,3 3,2.5 2.5,3 2),(3 4,3 3,4 4,3 4)),((1 1,1 0,0 0,0 1,1 1)),((1 3,1 2,0 1,0 3,1 3)))",
+ "MULTIPOLYGON(((2 2,3 3,2 3,2 5,5 5,5 3,4 3,3 2,5 2,5 1,4 1,3 0,1 0,1 1,0 1,0 2,2 2)),((0 4,0 5,1 5,1 4,0 3,0 4)))"
+};
+
+static std::string case_recursive_boxes_55[2] =
+{
+ // Needs correct handling for union clusters with 3 open spaces
+ "MULTIPOLYGON(((3 4,3 5,4 5,3 4)),((0 4,1 4,1 3,0 3,0 4)),((2 1,1.5 0.5,2 0,1 0,1 1,0 1,0 2,2 2,2 1)),((3 2,3 3,4 2,4 3,5 2,4 1,2 1,3 2)),((2 2,2 3,3 3,2 2)))",
+ "MULTIPOLYGON(((2 1,2 0,1 0,2 1)),((2 1,2 2,3 2,3 1,2 1)),((1 3,1 4,2 5,2 2,1 2,0 1,0 4,1 3)),((5 4,4 3,3 3,4 4,3 4,3 5,5 5,5 4)),((1 0,0 0,1 1,1 0)),((0 4,0 5,1 5,0 4)))"
+};
+
+static std::string case_recursive_boxes_56[2] =
+{
+ // Needs not discarding clustered self-turns if the cluster does not contain anything else
+ "MULTIPOLYGON(((3 4,3 5,4 5,3 4)),((3 3,4 3,2 1,2 3,3 3)),((2 1,2 0,1 0,1 1,2 1)),((1 4,1 3,0 3,0 4,1 5,1 4)))",
+ "MULTIPOLYGON(((2 4,2 5,3 4,2 4)),((1 5,1 4,0 4,0 5,1 5)),((1 2,0 2,0 3,1 2)),((2 2,1 2,2 3,2 2)),((2 2,2 1,1 1,1 2,1.5 1.5,2 2)))"
+};
+
+static std::string case_recursive_boxes_57[2] =
+{
+ // Needs handling of 3 open spaces in union to form interior ring
+ "MULTIPOLYGON(((2 0,0 0,0 1,0.5 0.5,1 1,1 2,2 1,4 1,4 4,5 3,5 0,2 0)),((2 5,2 4,1 4,1 5,2 5)),((1 2,0 2,0 3,1 2)),((1 2,1 3,2 3,2 2,1 2)),((0 1,0 2,1 1,0 1)),((4 3,3 3,3 4,4 3)),((3 4,3 5,5 5,5 4,3 4)))",
+ "MULTIPOLYGON(((3 3,2 3,2 5,3 4,3 5,5 5,5 4,4 4,4 3,3 3)),((3 3,4 2,2 2,3 3)),((0 0,0 4,1 4,1 3,2 3,2 2,1 2,1 0,0 0)),((3 1,2 1,2 2,3 1)),((1 5,0 4,0 5,1 5)),((1 5,2 5,1 4,1 5)),((5 2,5 1,4 1,4 3,5 4,5 2)),((4 1,4 0,3 0,3 1,4 1)),((2 1,2 0,1 0,2 1)))",
+};
+
+static std::string case_recursive_boxes_58[2] =
+{
+ // Needs correct handling for union clusters with 3 open spaces
+ "MULTIPOLYGON(((0 0,1 1,2 1,1 0,0 0)),((1 1,1 2,2 2,1 1)),((3 1,4 2,4 1,3 1)),((3 2,3 3,4 3,3 2)))",
+ "MULTIPOLYGON(((0 1,0 2,1 1,0 1)),((1 1,1 2,2 1,1 1)),((1 2,1 3,2 2,1 2)),((2 2,2 3,3 2,2 2)),((4 2,4 3,5 3,4 2)),((1 0,2 1,2 2,3 1,2 0,1 0)))",
+};
+
+static std::string case_recursive_boxes_59[2] =
+{
+ // Needs correct handling for union clusters with 3 open spaces
+ "MULTIPOLYGON(((2 3,2 2,3 2,3 1,2 1,1.5 0.5,2 0,0 0,0 1,1 1,1 4,2 4,3 5,5 5,5 4,3 4,3 3,2 3)),((3 2,3 3,4 3,4 2,3 2)),((2 0,3 1,5 1,5 0,2 0)),((0 3,0 5,1 5,1 4,0 3)),((0 3,1 3,0 2,0 3)))",
+ "MULTIPOLYGON(((3 5,3 4,4 4,4 3,5 3,5 2,4 2,4 1,3.5 0.5,4 0,1 0,1 1,2 2,1 2,1 4,0 4,1 5,3 5),(2 3,2 4,1 3,2 3),(2 2,3 2,3 3,2 2)),((1 1,0 1,0 3,1 2,1 1)))",
+};
+
+static std::string case_recursive_boxes_60[2] =
+{
+ // Needs checking left_count in union clusters
+ "MULTIPOLYGON(((0 4,0 5,1 5,0 4)),((1 2,1 4,2 4,2 5,3 4,4 5,5 5,5 4,4 4,3.5 3.5,4 3,4 2,3 2,2 1,2 2,1 2)),((1 2,2 1,1 1,1 2)),((2 1,3 1,4 2,5 1,4 1,4 0,2 0,2 1)),((0 0,0 2,2 0,0 0)),((0 2,0 3,1 3,0 2)),((5 4,5 3,4 3,5 4)))",
+ "MULTIPOLYGON(((2 3,1 2,1 4,0 4,0 5,3 5,3 3,2 3)),((1 2,3 2,3 3,4 4,5 4,5 3,4 3,3.5 2.5,4 2,4 0,0 0,0 1,1 1,1 2)),((4 2,5 3,5 2,4 2)))",
+};
+
+
+static std::string case_recursive_boxes_61[2] =
+{
+ // Needs pattern 4 for intersections
+ "MULTIPOLYGON(((2 0,2 1,1 0,0 0,0 1,1 2,0 2,0 4,1 4,1 5,1.5 4.5,2 5,4 5,4.5 4.5,5 5,5 2,4.5 1.5,5 1,5 0,2 0),(3 1,3 2,2 2,2 1,3 1),(4 5,3.5 4.5,4 4,4 5)),((0 4,0 5,1 5,0 4)))",
+ "MULTIPOLYGON(((3 5,5 5,5 0,2 0,2 1,1 1,1 0,0 0,0 2,1 2,1 3,0 3,0 5,3 5),(3 1,3 2,2 2,2 1,3 1)))",
+};
+
+static std::string case_recursive_boxes_62[2] =
+{
+ // Needs discarding self-intersections within other geometry
+ "MULTIPOLYGON(((2.5 3.5,3 4,3 3,4 3,4 2,5 2,5 0,1 0,1 1,2 1,3 2,2 2,2 3,1 3,2 4,2.5 3.5),(3 1,3 0,4 1,3 1)),((1 0,0 0,0 1,1 0)),((2 4,2 5,3 4,2 4)),((2 4,1 4,1 5,2 4)),((3 4,3 5,4 5,4 4,3 4)),((0 1,0 3,0.5 2.5,1 3,1 1,0 1)),((1 3,0 3,0 4,1 4,1 3)),((4 4,5 4,5 3,4 3,4 4)))",
+ "MULTIPOLYGON(((2 0,1 0,1 1,2 2,2 1,4 1,3 0,2 0)),((2 2,1 2,1 1,0.5 0.5,1 0,0 0,0 5,4 5,4 4,3 3,4 3,4 2,2 2),(1 3,1 4,0 4,1 3)),((4 2,5 1,4 1,4 2)))",
+};
+
+static std::string case_recursive_boxes_63[2] =
+{
+ // Derived from 62, needs not excluding startable points for checking rings for traversals
+ "MULTIPOLYGON(((2 0,1 0,1 1,2 2,2 1,4 1,3 0,2 0)),((2 2,1 2,1 1,0.5 0.5,1 0,0 0,0 5,4 5,4 4,3 3,4 3,4 2,2 2),(1 3,1 4,0 4,1 3)),((4 2,5 1,4 1,4 2)))",
+ "MULTIPOLYGON(((-1 -1, 6 -1, 6 6, -1 6, -1 -1), (0 0, 0 1, 0 3, 0 4, 1 4, 1 5, 2 4, 2 5, 3 4, 3 5, 4 5, 4 4, 5 4, 5 3, 4 3, 4 2, 5 2, 5 0, 3 0, 1 0, 0 0)),((2.5 3.5, 3 4, 2 4, 2.5 3.5)), ((3 3, 4 3, 4 4, 3 4, 3 3)), ((1 3, 2 4, 1 4, 1 3)), ((0.5 2.5, 1 3, 0 3, 0.5 2.5)), ((1 1, 2 1, 3 2, 2 2, 2 3, 1 3, 1 1)), ((3 0, 4 1, 3 1, 3 0)), ((1 0, 1 1, 0 1, 1 0)))",
+};
+
+static std::string case_recursive_boxes_64[2] =
+{
+ // Needs considering remaining_distance in clusters
+ "MULTIPOLYGON(((3 4,3 5,5 5,5 4,4 4,3 3,3.5 2.5,4 3,5 3,5 1,4 0,0 0,0 5,2 5,2 4,3 4),(2 2,3 2,3 3,2 2),(2 3,2 4,1 4,2 3),(2 0,2 1,1 1,2 0),(1 2,0 2,0.5 1.5,1 2)))",
+ "MULTIPOLYGON(((3 5,5 5,5 0,0 0,1 1,0 1,0 3,1 3,1 4,1.5 3.5,2 4,2 5,3 5),(2 2,1 2,2 1,2 2),(2 2,2.5 1.5,3 2,2 2),(4 4,4.5 3.5,5 4,4 4),(4 1,3 1,4 0,4 1)),((2 5,0 3,0 5,2 5)))"
+};
+
+static std::string case_recursive_boxes_65[2] =
+{
+ // Misses large hole in intersection
+ "MULTIPOLYGON(((3 5,3.5 4.5,4 5,5 5,5 1,4 0,3 0,3 1,2 0,0 0,0 4,1 4,1 5,3 5),(2 4,2 3,3 4,2 4),(2 1,2 2,1.5 1.5,2 1),(3 3,4 2,4 3,3 3)))",
+ "MULTIPOLYGON(((3 5,4 5,4 4,5 5,5 2,4 2,3.5 1.5,5 0,1 0,1 1,0 1,0 5,3 5),(2 2,3 2,4 3,1 3,1 2,2 2)),((1 0,0 0,0 1,1 0)),((4 1,4 2,5 1,4 1)))"
+};
+
+static std::string case_recursive_boxes_66[2] =
+{
+ // Needs self-turns startable, at least not determined using count left/right for self-turns
+ "MULTIPOLYGON(((1 0,0 0,1 1,0 1,0 4,1 4,1 5,3 5,3 4,4 5,5 5,5 0,1 0),(3 3,4 2,4 3,3 3),(3 1,4 1,4 2,3 2,3 1),(3 3,3 4,2 3,3 3),(3 4,3.5 3.5,4 4,3 4)))",
+ "MULTIPOLYGON(((2 0,0 0,0 1,1 1,1 2,0 2,0 5,1 5,2 4,2 5,5 5,5 0,2 0),(3 1,3 2,2.5 1.5,3 1),(2 3,1 2,2 1,2 2,3 2,4 3,2 3),(0 3,0.5 2.5,1 3,1 4,0 3)))"
+};
+
+static std::string case_recursive_boxes_67[2] =
+{
+ // Needs to avoid including any untraveled ring with blocked turns
+ "MULTIPOLYGON(((2 2,3 3,3 2,2 2)),((2 2,1 2,1 3,2 3,2 2)),((1 1,2 1,2 0,0 0,0 1,1 1)),((2 4,1 4,0.5 3.5,1 3,0 3,0 5,1 5,2 4)),((4 2,4 3,5 2,4 2)),((4 2,4 1,3 1,4 2)),((3 3,3 4,4 4,4 3,3 3)),((4 4,4 5,5 5,5 4,4 4)))",
+ "MULTIPOLYGON(((3 4,4 5,4 4,3 4)),((3 1,3 0,2 0,3 1)),((3 1,1 1,1 2,2 3,3 3,3 2,2 2,3 1)),((3 1,3 2,5 2,5 1,3 1)),((2 3,0 3,0 4,1 4,2 3)),((1 3,1 2,0 2,1 3)),((1 4,1 5,2 5,1 4)))"
+};
+
+static std::string case_recursive_boxes_68[2] =
+{
+ // Needs checking blocked turns in colocated turns
+ "MULTIPOLYGON(((3 3,3 4,4 4,4 5,5 5,4.5 4.5,5 4,5 3,4.5 2.5,5 2,2 2,2 4,3 3)),((2 5,3 5,3 4,2 4,1 3,1 2,0 2,0 4,1 4,1 5,2 5)),((2 2,4 0,1 0,2 1,1 1,1 2,2 2)),((1 0,0 0,0 1,1 1,1 0)),((4 0,5 1,5 0,4 0)),((5 1,4 1,4 2,5 1)))",
+ "MULTIPOLYGON(((2 0,2 1,1 1,2 2,3 2,3 1,4 2,5 2,5 0,2 0)),((2 0,1 0,1 1,2 0)),((2 2,2 3,3 4,3 3,2 2)),((3 2,3 3,4 4,5 4,5 3,4 2,3 2)),((3 4,3 5,4 4,3 4)),((2 4,2 3,1 2,1 3,0 3,0 5,1 5,1 4,2 4)),((1 2,1 1,0 1,0 2,1 2)),((4 4,4 5,5 5,4 4)))"
+};
+
+static std::string case_recursive_boxes_69[2] =
+{
+ // Needs checking left_count instead of is_closed for decision to block untraversed rings
+ "MULTIPOLYGON(((3 4,3 5,4 5,3 4)),((3 4,3 2,2 2,3 1,1 1,1 2,0 2,1 3,0 3,1 4,3 4)),((3 1,4 1,4 0,3 0,3 1)),((1 1,2 0,0 0,0 1,1 1)))",
+ "MULTIPOLYGON(((2 4,1 4,1 3,0 3,0 5,2 5,3 4,2 4)),((3 4,3 5,4 5,4 4,3 4)),((2 1,2 0,1 0,2 1)),((2 1,1 1,1 2,2 2,2 1)),((5 1,5 0,3 0,4 1,5 1)),((4 1,3 1,3 2,4 3,5 2,4 2,4 1)),((1 3,2 3,1 2,1 3)))"
+};
+
+static std::string case_recursive_boxes_70[2] =
+{
+ // Needs checking left_count instead of is_closed for decision to block untraversed rings
+ "MULTIPOLYGON(((2 0,0 0,0 4,1 3,3 3,3 5,5 5,5 3,4.5 2.5,5 2,5 0,2 0),(0 1,0.5 0.5,1 1,0 1),(5 2,4 2,4.5 1.5,5 2),(4 2,3 2,3 1,4 2)),((3 4,2 3,2 4,3 4)),((0 4,0 5,1 5,1.5 4.5,2 5,2 4,0 4)))",
+ "MULTIPOLYGON(((2 0,0 0,0 5,5 5,5 2,4.5 1.5,5 1,5 0,2 0),(2 1,3 0,3 1,2 1),(4 4,3 3,4 3,4 4),(1 1,1 2,0 2,1 1),(4 3,4.5 2.5,5 3,4 3)))"
+};
+
+static std::string case_recursive_boxes_71[2] =
+{
+ // Needs check for self-cluster within other geometry, in intersections
+ "MULTIPOLYGON(((4 0,4 1,5 1,5 0,4 0)),((4 3,4 4,5 4,4 3)),((3 3,4 2,3 2,3 3)),((3 3,2 3,3 4,3 3)),((3 2,3 0,1 0,1 3,0 3,0 4,1 4,3 2),(3 2,2 2,2 1,3 2)),((1 4,1 5,2 5,2 4,1 4)))",
+ "MULTIPOLYGON(((3 0,3 1,4 0,3 0)),((2 2,0 2,0 3,1 3,2 2)),((2 2,2 3,3 3,2 2)),((2 4,0 4,1 5,3 5,3 4,2 4)),((3 3,3 4,4 5,5 4,4 4,4 3,3 3)),((4 3,5 3,4 2,4 3)))"
+};
+
+static std::string case_recursive_boxes_72[2] =
+{
+ // Needs selection of ranked point in union (to finish the ring)
+ "MULTIPOLYGON(((3 1,4 1,4 0,3 0,3 1)),((1 0,1 1,2 1,2 0,1 0)),((3 3,3 5,5 5,5 2,4 2,4 3,3 3)),((3 3,2 2,2 3,3 3)),((1 3,0 2,0 3,1 3)),((1 4,2 4,2 3,1 2,1 4)),((1 4,1 5,2 5,1 4)),((2 5,3 5,2 4,2 5)),((1 5,0 4,0 5,1 5)))",
+ "MULTIPOLYGON(((4 0,4 1,5 0,4 0)),((4 4,4 5,5 5,5 4,4 4)),((2 4,2 3,1 3,1 4,2 4)),((2 4,2 5,3 5,2 4)),((2 2,2 3,3 3,2 2)),((2 2,3 2,3 1,2 1,2 2)),((3 3,4 2,3 2,3 3)),((3 1,3 0,2 0,3 1)),((1 3,2 2,1 1,1 3)),((1 2,0 2,0 3,1 2)),((1 4,0 4,0 5,1 5,1 4)),((4 2,4 3,5 2,4 2)))"
+};
+
+static std::string case_recursive_boxes_73[2] =
+{
+ // Needs handling connection points identical for clustered/non-clustered turns
+ "MULTIPOLYGON(((3 5,5 5,5 4,4.5 3.5,5 3,5 2,3 2,3 1,4 0,0 0,0 5,1 4,2 4,2 5,3 5),(2 3,2 2,3 3,2 3),(1 2,0 2,1 1,1 2)),((1 4,1 5,2 5,1 4)),((4 0,4 1,5 1,5 0,4 0)))",
+ "MULTIPOLYGON(((2 0,0 0,0 5,1 5,2 4,2 5,4 5,4.5 4.5,5 5,5 4,4 4,4 3,5 3,5 0,2 0),(0 2,0.5 1.5,1 2,0 2),(1 4,2 3,2 4,1 4)))"
+};
+
+static std::string case_recursive_boxes_74[2] =
+{
+ // Needs another method to find isolated regions (previous attempted used parents, that is dropped now)
+ "MULTIPOLYGON(((3 5,5 5,5 0,0 0,0 5,3 5),(2 3,1.5 2.5,2 2,3 3,2 3),(3 3,4 2,4 3,3 3),(2 0,3 1,2 1,2 0)))",
+ "MULTIPOLYGON(((2 0,0 0,0 5,1 5,2 4,2 5,5 5,5 0,2 0),(2 1,2.5 0.5,3 1,2 1),(2 3,3 3,3 4,2 4,2 3),(3 1,4 1,5 2,3 2,3 1)))"
+};
+
+static std::string case_recursive_boxes_75[2] =
+{
+ // Needs intersection pattern 6 (skip all isolated ranks in between)
+ "MULTIPOLYGON(((3 1,2 1,1 0,0 0,0 5,5 5,5 3,4 2,5 2,5 0,3 0,3 1),(2 3,1 3,2 2,2 3),(3 4,3.5 3.5,4 4,3 4),(3 3,3 2,4 2,4 3,3 3)))",
+ "MULTIPOLYGON(((3 5,4 5,4.5 4.5,5 5,5 0,4 0,4 1,2 1,2 2,1 2,1 3,0 2,0 5,1 5,0.5 4.5,1 4,2 5,3 5),(3 4,3 3,4 4,3 4),(3 3,4 2,4 3,3 3)),((2 1,2 0,1 0,1 1,2 1)),((0 2,1 2,0.5 1.5,1 1,0 1,0 2)),((1 0,0 0,0 1,1 0)))"
+};
+
+static std::string case_recursive_boxes_76[2] =
+{
+ // Needs considering ix/ix turns (opposite in both directions) as the same region
+ "MULTIPOLYGON(((3 5,3 4,4 5,4 4,5 4,5 0,0 0,0 4,1 4,1 5,3 5),(3 1,2 1,2.5 0.5,3 1),(1 2,0 2,0.5 1.5,1 2)))",
+ "MULTIPOLYGON(((2 0,0 0,0 3,1 4,0 4,0 5,2 5,2 4,3 4,4 5,5 5,5 0,2 0),(3 1,4 0,4 1,3 1),(3 2,2 1,3 1,3 2),(3 3,3 4,2 3,3 3),(2 1,1 1,1.5 0.5,2 1),(4 3,4 4,3 4,4 3)))"
+};
+
+static std::string case_recursive_boxes_77[2] =
+{
+ // Needs discarding self i/u turn traveling to itself (for intersection only)
+ "MULTIPOLYGON(((1 2,2 3,2 2,1 1,1 2)),((1 4,1 5,2 5,2 4,1 4)),((1 4,0 3,0 4,1 4)),((4 2,4 1,3 1,3 3,4 2)),((3 1,3 0,1 0,2 1,2.5 0.5,3 1)),((3 3,3 5,4 5,4 3,3 3)))",
+ "MULTIPOLYGON(((3 4,3 5,4 5,4 4,3 4)),((3 1,3 0,2 0,3 1)),((3 1,2 1,2 2,3 2,3 1)),((2 3,2 4,3 3,2 3)),((2 1,1 0,0 0,1 1,2 1)),((1 4,2 3,2 2,0 2,0 4,1 4),(2 3,1 3,1.5 2.5,2 3)),((1 4,1 5,2 5,2 4,1 4)),((4 1,5 0,4 0,4 1)),((4 1,4 2,5 1,4 1)),((4 2,5 3,5 2,4 2)))"
+};
+
+static std::string case_recursive_boxes_78[2] =
+{
+ // Needs checking intersection/right_count in overlay, as was already done for union
+ "MULTIPOLYGON(((3 2,1 2,1 4,3 2)),((3 2,3 4,4 4,3.5 3.5,4.5 2.5,5 3,5 1,4 1,3 0,3 2),(4 2,3.5 1.5,4 1,4 2)),((1 2,1 1,0 0,0 2,1 2)),((0 4,1 3,0 3,0 4)),((0 4,1 5,1.5 4.5,2 5,3 5,3 4,0 4)),((1 1,2 1,1 0,1 1)),((4 1,5 0,4 0,4 1)),((4 3,4 5,5 4,5 3,4 3)))",
+ "MULTIPOLYGON(((2 4,1 4,1 5,3 5,2 4)),((2 4,4 4,4 3,5 3,5 2,4 1,4 2,3 2,3 3,2 2,2 4)),((2 2,2 1,0 1,0 4,1 3,1 4,2 3,1 2,2 2)),((1 4,0 4,0 5,1 4)),((0 1,1 0,0 0,0 1)),((4 1,3 1,3 2,4 1)))"
+};
+
+static std::string case_recursive_boxes_79[2] =
+{
+ // Found by bug in discard_self_turns_which_loop, it needs only checking intersection and not union
+ "MULTIPOLYGON(((2 3,2 2,1 2,1 4,4 4,4 3,2 3)),((2 0,0 0,0 2,1 2,1.5 1.5,2 2,2 1,1 1,2 0)),((2 0,2 1,3 2,4 2,3.5 1.5,4 1,4 0,2 0),(2 1,2.5 0.5,3 1,2 1)))",
+ "MULTIPOLYGON(((2 0,1 0,1 1,0 1,0 3,1 4,4 4,4 0,2 0),(2 2,1 2,1 1,2 2),(4 3,3 3,3 2,4 3)))"
+};
+
+static std::string case_recursive_boxes_80[2] =
+{
+ // Creates very small interior ring (~0) for union. This is a robustness
+ // problem, it should not be generated. The intersection point is a tiny
+ // distance away from real IP, and therefore it generates a correct
+ // interior ring, and is considered as valid. But if you combine this
+ // resulting union later with other polygons, with another rescaling model,
+ // it most probably will be invalid.
+ // These cases are found with recursive_polygons and size=4.
+ // For size=5 the scaling is such that it does not occur (so often)
+ // It needs removing the rescaling.
+ "MULTIPOLYGON(((3.5 2.5,4 3,4 2,3 2,3 3,3.5 2.5)))",
+ "MULTIPOLYGON(((1 1,1 2,2 1,1 1)),((3 2,3 3,4 3,3 2)))"
+};
+
+static std::string case_recursive_boxes_81[2] =
+{
+ "MULTIPOLYGON(((3 4,2 4,2 5,3 4)),((3 3,2 3,2 4,3 3)),((3 3,3 4,4 5,5 4,5 3,3 3),(4 4,3.5 3.5,4 3,4 4)),((2 1,2 0,1 0,1 1,0 1,1 2,3 2,4 3,4 1,2 1)))",
+ "MULTIPOLYGON(((2 4,2 2,1 2,0 1,0 3,1 3,1 4,2 4)),((2 4,2 5,3 4,2 4)),((3 4,5 4,5 3,3 3,3 4)),((1 4,0 4,0 5,1 5,1 4)),((2 1,2 0,0 0,0 1,2 1)),((4 2,5 2,4 1,3 1,4 2)),((4 1,5 1,4 0,4 1)))"
+};
+
+static std::string case_recursive_boxes_82[2] =
+{
+ // Contains two outgoing arcs on same ring causing current aggregation implementation to fail.
+ // Fixed by greatly simplifying the code, skipping aggregations and using sbs directly (which is now possible, now that isolation-information is much better)
+ "MULTIPOLYGON(((4 0,5 1,5 0,4 0)),((3 3,3 1,4 1,3 0,0 0,0 5,1 5,1 4,1.5 3.5,2 4,2 3,3 3),(2 2,2 1,3 2,2 2)),((2 4,3 5,4 5,3.5 4.5,5 3,3 3,3 4,2 4)),((4 4,4 5,5 5,4.5 4.5,5 4,4 4)))",
+ "MULTIPOLYGON(((2 4,2 5,4 5,4 4,2 4)),((2 4,2 3,5 3,5 2,4 2,4 1,1 1,1 2,0 2,0 5,1 5,1 4,2 4),(2 2,1 2,1.5 1.5,2 2),(3 2,3.5 1.5,4 2,3 2)),((4 4,5 5,5 4,4 4)))"
+};
+
+static std::string case_recursive_boxes_83[2] =
+{
+ // Needs to select on operation in cluster
+ "MULTIPOLYGON(((2 1,2 0,1 0,1 4,2 4,2 5,3 5,4 4,4 3,5 3,4 2,5 2,5 0,4 0,4 1,3 0,3 1,2 1),(2 3,1 3,2 2,2 3),(3 2,3 3,2 2,3 2)),((0 2,1 1,0 0,0 2)),((0 2,0 3,1 3,0 2)),((4 4,4 5,5 4,4 4)))",
+ "MULTIPOLYGON(((2 0,1 0,1 2,2 2,2 5,3 4,3 5,4 5,4 4,5 5,5 3,4 3,4 1,5 1,5 0,2 0),(2 1,3 2,2 2,2 1)),((0 5,1 5,1 4,0 4,0 5)),((1 1,0 1,0 2,1 1)),((1 2,0 2,1 3,1 2)))"
+};
+
+static std::string case_recursive_boxes_84[2] =
+{
+ // Need to set some ii-turns non-startable
+ "MULTIPOLYGON(((2 4,1 4,1 5,3 5,2 4)),((3 5,4 5,4 4,3 4,3 5)),((3 3,4 3,4 4,5 4,4.5 3.5,5 3,5 2,4 1,3 1,3 2,2 2,2 3,3 3),(4 2,3.5 1.5,4 1,4 2)),((0 3,0 4,1 4,1 3,0 3)))",
+ "MULTIPOLYGON(((4 4,4 5,5 5,5 4,4 4)),((0 5,1 5,1 4,0 4,0 5)),((2 0,1 0,1 1,2 1,2 2,3 2,3 0,2 0)),((2 4,2 3,1 3,2 4)),((2 4,2 5,3 5,2 4)),((2 3,2 2,1 2,2 3)),((1 3,1 1,0 1,0 3,1 3)),((5 1,5 0,4 0,4 1,5 1)))"
+};
+
+static std::string case_recursive_boxes_85[2] =
+{
+ // Contains rescaling problem
+ "MULTIPOLYGON(((5 2,5 3,6 3,6 2,5 2)),((6 5,6 6,7 6,7 5,6 5)),((3 6,1 6,2 7,3 7,3 6)),((3 6,3 5,2 5,2 6,2.5 5.5,3 6)))",
+ "MULTIPOLYGON(((2 5,2 6,3 6,2 5)),((6 1,6 2,7 2,6 1)),((5 4,5 5,6 4,5 4)),((0 6,0 7,1 7,0 6)),((3 3,3 2,2 2,3 3)),((3 3,3 4,4 5,4 4,3 3)),((4 4,5 3,4 3,4 4)))"
+};
+
+static std::string case_recursive_boxes_86[2] =
+{
+ // Positive ring and negative ring have same area. For difference, this
+ // needs to be handled correctly in assign_parents,
+ // skipping the optimization for union
+ "MULTIPOLYGON(((3 4,4 4,4 3,2 3,3 4)))",
+ "MULTIPOLYGON(((4 1,3 1,3 2,4 1)),((4 1,5 1,5 0,4 0,4 1)))"
+};
+
+static std::string case_recursive_boxes_87[2] =
+{
+ // Needs to handle ii-turns for difference like done for intersection
+ "MULTIPOLYGON(((5 2,5 3,6 3,5 2)),((3 4,3 3,2 3,3 4)),((3 4,2 4,3 5,3 4)),((2 4,2 3,1 3,2 4)))",
+ "MULTIPOLYGON(((2 0,3 1,3 0,2 0)),((6 3,6 4,7 4,7 3,6 3)),((3 9,3 10,4 9,3 9)),((8 7,8 8,9 8,8 7)))"
+};
+
+static std::string case_recursive_boxes_88[2] =
+{
+ "MULTIPOLYGON(((1 4,1 5,2 5,2 4,1 4)),((0 2,0 3,1 3,0 2)),((3 5,4 5,4 4,3 4,3 5)),((2 3,4 3,4 2,3 1,2 1,2 3),(3 3,2.5 2.5,3 2,3 3)),((4 1,3 0,3 1,4 1)),((4 2,5 2,5 0,4 0,4 2)))",
+ "MULTIPOLYGON(((4 0,4 1,5 1,5 0,4 0)),((3 4,3 3,1 3,1 5,3 5,2.5 4.5,3 4)),((3 4,3 5,4 5,4 4,3 4)),((1 1,2 0,1 0,1 1)),((1 1,1 2,2 2,2 1,1 1)),((1 2,0 2,0 3,1 3,1 2)),((4 4,5 4,5 2,4 2,4 4)))"
+};
+
+static std::string pie_21_7_21_0_3[2] =
+{
+ "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,2500 2500)))",
+ "MULTIPOLYGON(((2500 2500,1704 3295,1937 3474,2208 3586,2499 3625,2791 3586,3062 3474,3295 3295,2500 2500)),((2500 2500,3586 2791,3625 2500,3586 2208,2500 2500)))"
+};
+
+static std::string pie_23_19_5_0_2[2] =
+{
+ "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,1527 3472,1812 3690,2500 2500)))",
+ "MULTIPOLYGON(((2500 2500,3586 2791,3625 2500,3586 2208,3474 1937,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2500 2500)),((2500 2500,2791 3586,3062 3474,2500 2500)))"
+};
+
+static std::string pie_7_14_5_0_7[2] =
+{
+ "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,2500 2500)))",
+ "MULTIPOLYGON(((2500 2500,3586 2791,3625 2500,3586 2208,3474 1937,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,2500 2500)),((2500 2500,1525 3062,1704 3295,1937 3474,2208 3586,2499 3625,2791 3586,3062 3474,2500 2500)))"
+};
+
+static std::string pie_16_16_9_0_2[2] =
+{
+ "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,2500 2500)))",
+ "MULTIPOLYGON(((2500 2500,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2499 3625,2500 2500)),((2500 2500,3062 3474,3295 3295,2500 2500)))"
+};
+
+static std::string pie_7_2_1_0_15[2] =
+{
+ "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,2500 2500)))",
+ "MULTIPOLYGON(((2500 2500,2791 3586,3062 3474,2500 2500)),((2500 2500,3474 3062,3586 2791,3625 2500,3586 2208,3474 1937,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,2500 2500)))"
+};
+
+static std::string case_precision_m1[2] =
+{
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 3,4 3,4 0,0 0)))",
+ "MULTIPOLYGON(((-1 -1,-1 8,2 8,2 7,2 3,4.0000005 2.9999995,4 7,4 8,8 8,8 -1,-1 -1)))"
+};
+
+static std::string case_precision_m2[2] =
+{
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 3,4 3,4 0,0 0)),((3 6,3 7.5,4.5 7.5,4.5 6,3 6)))",
+ "MULTIPOLYGON(((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4.0000005 2.9999995,4 7,2 7)))"
+};
+
+// Case, not literally on this list but derived, to mix polygon/multipolygon in call to difference
+static std::string ggl_list_20111025_vd[4] =
+ {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((10 0,10 5,15 0,10 0))",
+ "MULTIPOLYGON(((0 0,0 4,4 0,0 0)))",
+ "MULTIPOLYGON(((10 0,10 5,15 0,10 0)))"
+ };
+
+// Same, mail with other case with text "Say the MP is the 2 squares below and P is the blue-ish rectangle."
+static std::string ggl_list_20111025_vd_2[2] =
+ {
+ "POLYGON((5 0,5 4,8 4,8 0,5 0))",
+ "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((4 0,4 2,6 2,6 0,4 0)))"
+ };
+
+// Mail of h2 indicating that reversed order (in second polygon) has ix/ix problems
+static std::string ggl_list_20120915_h2[3] =
+ {
+ "MULTIPOLYGON(((-2 5, -1 5, 0 5, 2 5, 2 -2, 1 -2, 1 -1, 0 -1,0 0, -1 0, -2 0, -2 5)))",
+ "MULTIPOLYGON(((0 0, 1 0, 1 -1, 0 -1, 0 0)), ((-1 5, 0 5, 0 0, -1 0, -1 5)))",
+ "MULTIPOLYGON(((-1 5, 0 5, 0 0, -1 0, -1 5)), ((0 0, 1 0, 1 -1, 0 -1, 0 0)))"
+ };
+
+// Mail of volker, about another problem, but this specific example is causing two-point inner rings polygons which should be discarded
+// (condition of num_points in detail/overlay/convert_ring.hpp)
+static std::string ggl_list_20120221_volker[2] =
+ {
+ "MULTIPOLYGON(((1032 2130,1032 1764,2052 2712,1032 2130)),((3234 2580,2558 2690,3234 2532,3234 2580)),((2558 2690,2136 2790,2052 2712,2136 2760,2558 2690)))",
+ "MULTIPOLYGON(((3232 2532.469945355191,2136 2790,1032 1764,1032 1458,1032 1212,2136 2328,3232 2220.196721311475,3232 1056,1031 1056,1031 2856,3232 2856,3232 2532.469945355191),(3232 2412.426229508197,2136 2646,3232 2412.426229508197)))"
+ };
+
+static std::string ggl_list_20140212_sybren[2] =
+ {
+ "MULTIPOLYGON(((0.494062 0.659354,0.471383 0.64654,0.446639 0.616561,0.47291 0.61171,0.495396 0.625263,0.494964 0.679709,0.494062 0.659354)))",
+ "MULTIPOLYGON(((0.4951091661995328 0.6614133543986973,0.495396 0.625263,0.50092 0.6492750000000001,0.494964 0.679709,0.477258 0.698703,0.4951091661995328 0.6614133543986973)),((0.452167 0.706562,0.433379 0.696888,0.442673 0.65792,0.464729 0.671387,0.452167 0.706562)))"
+ };
+
+static std::string mail_2019_01_21_johan[4] =
+ {
+ // Contains a, b, both a and b (should have been merged), c (clip)
+ "MULTIPOLYGON(((1.2036811113357544 0.7535473108291626,1.1699721813201904 0.7535473108291626,1.1699721813201904 0.7663263082504272,1.2033243179321289 0.7672826647758484,1.2036811113357544 0.7535473108291626)))",
+ "MULTIPOLYGON(((1.2036811113357544 0.7535473108291626,1.2038091421127319 0.7486215233802795,1.1713759899139404 0.7495520114898682,1.1713759899139404 0.7535472512245178,1.2036811113357544 0.7535473108291626)))",
+ "MULTIPOLYGON(((1.2036811113357544 0.7535473108291626,1.1699721813201904 0.7535473108291626,1.1699721813201904 0.7663263082504272,1.2033243179321289 0.7672826647758484,1.2036811113357544 0.7535473108291626)),"
+ "((1.2036811113357544 0.7535473108291626,1.2038091421127319 0.7486215233802795,1.1713759899139404 0.7495520114898682,1.1713759899139404 0.7535472512245178,1.2036811113357544 0.7535473108291626)))",
+ "MULTIPOLYGON(((0 0,2 0,2 2,0 2,0 0)))"
+ };
+
+static std::string ticket_9081[2] =
+ {
+ "MULTIPOLYGON(((0.5489109414010371 0.5774835110050927,0.4099611282054447 0.4644351568071598,0.4294011278595494 0.4843224236729239,0.4205359995313906 0.5115225580860201,0.4441572412013468 0.5184999851878852,0.5489109414010371 0.5774835110050927)),((0.562085028126843 0.5882018328808966,0.5644349663154944 0.591180348361206,0.568218114394707 0.5970364466647042,0.5838690879677763 0.6212632646137447,0.5873787029417971 0.6412877041753083,0.468699602592386 0.5866280231830688,0.4171010902425981 0.5220616039851281,0.4059124592966251 0.5563907478354578,0.3909547828925878 0.6022841397455458,0.520859401226844 0.9508041627246925,0.8595233008819849 0.8301950132755517,0.562085028126843 0.5882018328808966)))",
+ "MULTIPOLYGON(((0.2099392122251989 0.492066865490789,0.1124301889095737 0.5124668111209448,0.3306914939102383 0.6126684490171914,0.2099392122251989 0.492066865490789)),((0.5885369465145437 0.6478961722242873,0.5342320718598281 0.6686303269145104,0.5619623880692838 0.7033299168703926,0.5945761233023867 0.6823532655194001,0.5885369465145437 0.6478961722242873)),((0.5570738195183501 0.6001870087680015,0.5429714753344335 0.6231021858940831,0.5880357506342242 0.6450365518134291,0.5838690879677763 0.6212632646137447,0.568218114394707 0.5970364466647042,0.5570738195183501 0.6001870087680015)),((0.5498478321815098 0.5029279381860542,0.608691671498764 0.5163121433149205,0.5636607291345047 0.5894838094559455,0.8595233008819849 0.8301950132755517,0.8285440738598029 0.8412277162756114,0.9591357158116398 0.9011810663167211,0.8572649311807611 0.3566393017365032,0.5965816668471951 0.4111770689940296,0.5498478321815098 0.5029279381860542)),((0.3984249865018206 0.4526335964808558,0.3621206996557855 0.4602288471829723,0.4183516736935784 0.4730187483833363,0.4099611282054451 0.4644351568071601,0.3984249865018206 0.4526335964808558)))"
+ };
+
+// Integer, ccw, open, reported by Volker
+static std::string ticket_9942[2] =
+ {
+ "MULTIPOLYGON(((2058 1761,1996 1700,1660 1370,1324 1040,982 1148,881 981,2644 981,2338 1982)),((1996 1760,2338 2078,2674 1010,3010 1160,3254 2085,3352 2522,3427 2562,3688 2930,3688 2924,3688 2702,3439 2568,3352 2444,3218 1926,3010 998,2959 981,3773 981,3773 3702,732 3702,732 981,770 981,982 1310,1324 1148,1660 1442,1697 1472,1660 1436,1698 1473,1697 1472)))",
+ "MULTIPOLYGON(((646 932,646 788,870 1136)),((3032 1096,3010 1040,2981 988,3010 998)),((3688 2702,3352 2522,3032 1096,3352 1916,3688 2018)),((2981 988,2674 884,2338 1982,1996 1712,1660 1442,1324 1148,982 1310,870 1136,982 1238,1324 1136,1660 1304,1996 1460,2338 1610,2674 434)))",
+ };
+
+// Simplified version showing the generated 'spike' which actually has an area because of the necessary rounding
+static std::string ticket_9942a[2] =
+ {
+ "MULTIPOLYGON(((2058 1761,1996 1700,1660 1370,1324 1040,2644 981,2338 1982)))",
+ "MULTIPOLYGON(((2674 884,2338 1982,1996 1712,1660 1442,1324 1148,1324 1136,1660 1304,1996 1460,2338 1610,2674 434)))",
+ };
+
+// Integer, ccw, open
+static std::string ticket_10661[3] =
+ {
+ /* A */ "MULTIPOLYGON(((1701 985,3501 985,3501 2785,1701 2785,1701 985)))",
+ /* B */ "MULTIPOLYGON(((1698 1860,1698 1122,2598 1392,3492 1842,3492 32706,2598 2340,1698 1860)))",
+ /* C=A-B, */
+ /* D */ "MULTIPOLYGON(((1698 2772,1698 1860,2598 2340,3492 2412,3492 32743,1698 2772)))"
+ // Reported problem was: validity of difference C-D
+ };
+
+// Integer, ccw, open
+static std::string ticket_10803[2] =
+ {
+ "MULTIPOLYGON(((3174 1374,3174 2886,1374 2886,1374 2139,3174 1374)))",
+ "MULTIPOLYGON(((1374 1092,1734 1092,3174 2526,3174 2886,1374 2886,1374 1092)))"
+ };
+
+// Intersection was reported as invalid
+static std::string ticket_11018[2] =
+ {
+ "MULTIPOLYGON(((66.32861177 -32.36106001,66.32805654 -32.36294657,66.32805697 -32.36294666,66.2558847 -32.60687137,66.18259719 -32.85172659,66.18259756 -32.85172667,66.10923256 -33.09561483,66.10923294 -33.09561491,66.03574675 -33.34044236,65.96214887 -33.58529255,65.96214918 -33.58529261,65.94391227 -33.64484979,65.839119 -33.032507,66.32861177 -32.36106001)),((67.77272059 -31.62519092,67.77272315 -31.62518165,67.77272398 -31.62517863,67.84057793 -31.37975346,67.90737994 -31.13429944,67.92189506 -31.0817063,68.151987 -31.013051,69.236142 -30.678138,70.320296 -31.013051,71.411955 -31.338781,72.016906 -32.187175,72.633163 -33.032507,72.464921 -34.015608,72.292755 -34.998316,71.385165 -35.656005,70.46265 -36.306671,69.236142 -36.312964,68.009631 -36.306671,67.087119 -35.656005,66.69381557 -35.37099587,66.7156576 -35.29873723,66.78843343 -35.05443368,66.86117133 -34.80910208,66.86117388 -34.80909338,66.86117494 -34.8090898,66.93281945 -34.5647568,67.00441882 -34.31942369,67.00441834 -34.31942359,67.07592335 -34.07510168,67.14737287 -33.83073849,67.21777858 -33.58537517,67.28811831 -33.34001123,67.35838201 -33.09560549,67.42858934 -32.85025274,67.49773049 -32.6058299,67.56682212 -32.36043528,67.63585135 -32.11504002,67.63585413 -32.11503015,67.63585478 -32.1150278,67.70382724 -31.86961401,67.77272059 -31.62519092)))",
+ "MULTIPOLYGON(((67.840578 -31.37975347,67.77272059 -31.62519092,66.61484414 -31.38427789,66.68556685 -31.13932219,67.840578 -31.37975347)))",
+ };
+
+
+// Integer, ccw, open
+static std::string ticket_11674[2] =
+ {
+ "MULTIPOLYGON(((529 3217,529 998,5337 998,5337 1834,5070 2000,5337 2072,5337 3475,529 3475,529 3312,1734 2054,2934 1670,3230 1690,2934 1400,1734 1784,529 3217),(4140 2582,5071 2001,4140 1754,3231 1691,4140 2582)))",
+ "MULTIPOLYGON(((528 3218,528 2498,1734 1406,2556 1522,1734 1784,528 3218)),((4610 2288,5340 1178,5340 1832,4609 2289,4140 3002,2934 1574,2555 1521,2934 1400,4140 2582,4610 2288)))",
+ };
+
+// Union was reported as invalid because of no generated interior rings, fixed
+static std::string ticket_11984[2] =
+ {
+ "MULTIPOLYGON(((-104.025 72.5541,-95 67,-94 64,-95 60,-81.5804 61.9881,-75 52,-73.1862 50.0729,-75 48,-69.2 42.6,-96 56,-102 51,-119 49,-128 41,-126 33,-99 29,-61.9276 35.8291,-46 21,-30 10,-45 8,-104 6,-119 -8,-89 -18,-29 -10,-20 -9,-16 -11,-15 -13,-27 -29,-9 -13,-7 -14,-13.4737 -33.4211,-21 -34,-25 -36,-30 -40,-40 -49,-35 -50,-30 -51,-27 -53,-21 -52,-20.037 -52.642,-31.5314 -70.8413,-37.9815 -75.2274,-52.1689 -78.5148,-55 -78,-55 -79,-55 -79.1707,-112.692 -92.5385,-120 -94,-90.9143 -94.9695,-91 -95,-90 -99.5,-90 -103,-95 -114,-93 -116,-92 -117,-90 -119,-87.28 -119.68,-87 -120,-86.4444 -119.889,-82 -121,-80.821 -119.728,-77.6667 -119,-73 -119,-55 -114,-54 -114,-47 -114,-40 -121,-39.9327 -120.951,-39.3478 -121.609,-39 -123,-35.2182 -118.927,-24.536 -110.248,-22.875 -109.292,-22 -109,-22 -109,-16 -107,-9 -105,-7.83333 -104.833,-1.33333 -104.333,0.962934 -105.481,11.9682 -122.413,13 -129,20.1579 -120.053,22 -119,29.5 -115.25,30.2903 -114.968,39 -114,48 -112,47.156 -108.962,61 -117,54.9172 -103.176,65 -107,51.482 -95.3683,50.2426 -92.5515,53 -92,51.806 -91.0448,52 -91,49.1363 -88.9091,25.1429 -69.7143,22.733 -56.1314,24.9744 -49.3053,26.9174 -45.1157,27 -45,27.1481 -44.6543,33.4226 -34.0476,35.5919 -31.272,39 -29,39.4424 -26.3458,44.296 -20.136,46 -19,53 -14,53.3759 -13.4361,58.9297 -10.7874,115 13,110.286 13,114 14,112.414 14.7207,247.196 184.001,250 189,239.971 201.765,239 216,237.627 218.027,237.317 223.454,243 229)))",
+ "MULTIPOLYGON(((-31 6,-51 220,-84 241,-120 249,-146 224,-67 56,-74 52,-95 60,-38 10,-38 9)))",
+ };
+
+static std::string ticket_12118[2] =
+ {
+ "MULTIPOLYGON(((13.08940410614013671875 -70.98416137695312500000,12.81384754180908203125 -67.55441284179687500000,12.60483169555664062500 -63.57923889160156250000,13.56438255310058593750 -54.91608428955078125000,13.80568027496337890625 -43.62073516845703125000,13.00057315826416015625 -33.85240554809570312500,9.29664993286132812500 -33.23409271240234375000,19.66869926452636718750 -14.42036247253417968750,-5.96064376831054687500 -17.19871711730957031250,-14.87041568756103515625 -6.99879980087280273438,-22.50806808471679687500 -27.92480468750000000000,-22.16161727905273437500 -45.15484619140625000000,-22.42436790466308593750 -54.01613616943359375000,-23.13828659057617187500 -59.28628540039062500000,-23.18314933776855468750 -68.01937866210937500000,-22.86939430236816406250 -72.78530883789062500000,-23.02970123291015625000 -72.76760864257812500000,-22.81921195983886718750 -73.54760742187500000000,-18.65677833557128906250 -73.25045776367187500000,3.16641521453857421875 -75.66014099121093750000,12.75282478332519531250 -76.71865844726562500000,13.08940410614013671875 -70.98416137695312500000)))",
+ "MULTIPOLYGON(((3.16641521453857421875 -75.66014099121093750000,12.75282478332519531250 -76.71865844726562500000,12.95001888275146484375 -74.61856842041015625000,3.16641521453857421875 -75.66014099121093750000)),((-22.84768676757812500000 -78.42963409423828125000,-20.92837524414062500000 -78.22530364990234375000,3.16641521453857421875 -75.66014099121093750000,-23.02970123291015625000 -72.76760864257812500000,-22.84768676757812500000 -78.42963409423828125000)))",
+ };
+
+static std::string ticket_12125[2] =
+ {
+ "MULTIPOLYGON(((-5.96064376831054687500 -17.19871711730957031250,7.83307075500488281250 -32.98977279663085937500,8.81292819976806640625 -34.11151504516601562500,19.66869926452636718750 -14.42036247253417968750,-5.96064376831054687500 -17.19871711730957031250)),((-14.87041568756103515625 -6.99879980087280273438,-16.12161636352539062500 -18.30021858215332031250,-5.96064376831054687500 -17.19871711730957031250,-14.87041568756103515625 -6.99879980087280273438)))",
+ "MULTIPOLYGON(((7.83307075500488281250 -32.98977279663085937500,8.81292819976806640625 -34.11151504516601562500,13.00057315826416015625 -33.85240554809570312500,7.83307075500488281250 -32.98977279663085937500)),((-22.50806808471679687500 -27.92480468750000000000,7.83307075500488281250 -32.98977279663085937500,-14.87041568756103515625 -6.99879980087280273438,-22.50806808471679687500 -27.92480468750000000000)))",
+ };
+
+static std::string ticket_12751[4] =
+ {
+ /* a */ "MULTIPOLYGON(((1920 1462,3720 1462,3720 3262,1920 3262,1920 1462)))",
+ /* b */ "MULTIPOLYGON(((1918 1957,1918 1657,2218 2189,1918 1957)),((3718 1957,3360 2233,3718 1561,3718 1957)),((3360 2233,2818 3253,2218 2189,2818 2653,3360 2233)))",
+ /* c=a-b */ "MULTIPOLYGON(((1920 1660,1920 1462,3720 1462,3720 3262,1920 3262,1920 1959,2218 2189,1920 1660),(3718 1561,3360 2233,3718 1957,3718 1561),(2818 2653,2218 2189,2818 3253,3360 2233,2818 2653)))",
+ /* d */ "MULTIPOLYGON(((1918 2155,1918 1957,2818 2653,3718 1957,3718 2154,2818 3055,1918 2155)))",
+ };
+
+static std::string ticket_12752[2] =
+ {
+ "MULTIPOLYGON(((3232 2413,2136 2646,3232 2412,3232 2413)),((3232 2532,3232 2856,1031 2856,1031 1056,3232 1056,3232 2221,2136 2328,1032 1212,1032 1458,1032 1764,2136 2790,3232 2532)))",
+ "MULTIPOLYGON(((1032 2130,1032 1764,2052 2712,1032 2130)),((3234 2580,2558 2690,3234 2532,3234 2580)),((2558 2690,2136 2790,2052 2712,2136 2760,2558 2690)))"
+ };
+
+
+// Ticket for validity, input is CCW
+static std::string ticket_12503[2] =
+ {
+ "MULTIPOLYGON (((15 17, 12 23, 15 20, 15 17)), ((35 23, 34 23, 34 24, 35 25, 36 25, 35 23)), ((8 6, 7 24, 10 25, 12 25, 12 23, 11 23, 10 13, 15 15, 8 6)), ((12 27, 8 31, 6 32, 6 38, 13 34, 13 31, 11 31, 12 30, 11 30, 12 29, 12 27)), ((7 24, 7 26, 6 31, 9 26, 7 24)), ((18 44, 15 45, 15 48, 18 44)), ((26 34, 18 44, 38 39, 26 34)), ((15 33, 13 34, 15 45, 15 33)), ((15 32, 15 33, 17 32, 15 32)), ((19 30, 17 32, 18 32, 16 38, 21 31, 19 30)), ((15 29, 13 30, 13 31, 15 32, 15 29)), ((15 28, 15 29, 17 29, 15 28)), ((14 27, 12 29, 13 30, 15 28, 14 27)), ((30 24, 25 24, 24 26, 25 27, 24 27, 23 28, 19 28, 19 29, 17 29, 18 30, 19 30, 22 29, 21 31, 26 34, 31 27, 28 30, 26 27, 30 24)), ((15 26, 15 28, 17 26, 15 26)), ((27 27, 31 27, 34 27, 32 26, 27 27)), ((19 25, 17 26, 19 26, 19 25)), ((41 15, 33 18, 35 23, 41 15)), ((23 24, 20 25, 19 26, 24 27, 24 26, 23 24)), ((33 15, 46 5, 48 4, 49 1, 32 13, 33 15)), ((32 23, 31 24, 32 25, 32 26, 33 25, 32 23)), ((35 23, 43 23, 44 23, 44 22, 43 22, 42 15, 35 23)), ((43 23, 36 25, 38 31, 35 25, 33 25, 34 27, 39 34, 40 39, 38 39, 44 42, 43 23)), ((48 22, 44 23, 48 46, 48 22)), ((18 11, 23 2, 15 3, 18 11)), ((29 17, 26 20, 22 23, 23 24, 25 24, 27 21, 28 20, 30 19, 29 17)), ((22 19, 21 20, 21 21, 24 19, 22 19)), ((31 23, 34 23, 31 19, 30 19, 31 22, 27 21, 30 24, 31 24, 31 23)), ((21 18, 20 21, 21 20, 21 18)), ((14 27, 15 26, 16 25, 19 25, 20 24, 22 23, 21 21, 20 21, 17 17, 15 20, 15 25, 12 25, 12 26, 14 26, 14 27), (20 21, 20 22, 17 24, 20 21)), ((22 17, 22 19, 23 18, 22 17)), ((30 15, 32 13, 31 10, 28 13, 30 15)), ((16 16, 17 17, 18 17, 16 16)), ((15 15, 15 17, 16 16, 15 15)), ((30 15, 29 16, 29 17, 30 17, 30 15)), ((33 15, 30 17, 31 19, 33 18, 33 15)), ((43 14, 44 22, 48 22, 48 4, 47 7, 42 13, 43 14)), ((43 14, 42 14, 41 15, 42 15, 43 14)), ((27 10, 25 6, 23 13, 27 11, 49 1, 24 2, 27 10)), ((28 13, 23 18, 24 19, 29 16, 28 13)), ((15 11, 15 15, 16 15, 17 13, 15 11)), ((18 11, 17 13, 19 15, 18 17, 21 18, 21 17, 20 15, 22 17, 23 13, 20 14, 18 11)), ((8 6, 8 5, 15 11, 15 3, 5 3, 8 6)))",
+ "MULTIPOLYGON(((13 18,18 18,18 23,13 23,13 18)))"
+ };
+
+static std::string issue_630_a[2] =
+{
+ "MULTIPOLYGON(((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475)))",
+ "MULTIPOLYGON(((-0.605 +0.1575,+0.254777333596 +1.0172773336,+1.53436796127 -0.262313294074,+0.674590627671 -1.12209062767,-0.605 +0.1575)))"
+};
+
+static std::string issue_630_b[2] =
+{
+ "MULTIPOLYGON(((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475)))",
+ "MULTIPOLYGON(((-1.215 +0.7675000000000001,-0.4962799075873666 +1.486220092412633,+0.665763075292561 +0.324177109532706,-0.05295701712007228 -0.3945429828799273,-1.215 +0.7675000000000001)))"
+};
+
+static std::string issue_630_c[2] =
+{
+ "MULTIPOLYGON(((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475)))",
+ "MULTIPOLYGON(((-0.9099999999999999 +0.4625,-0.1912799075873667 +1.181220092412633,+0.9707630752925609 +0.01917710953270602,+0.2520429828799277 -0.6995429828799273,-0.9099999999999999 +0.4625)))"
+};
+
+static std::string issue_643[2] =
+{
+ "MULTIPOLYGON(((-0.420825839394717959862646239344 0.168094877926996288941552393226,5.29161113734201116187705338234 5.76881481261494233336861725547,12.2925110557019436896553088445 -1.37173140830596795858298264648,6.58007407896521545609402892296 -6.97245134299391278176472042105,-0.420825839394717959862646239344 0.168094877926996288941552393226)))",
+ "MULTIPOLYGON(((4.75985680877701196159479187986e-16 -0.26112514220036736611874061964,0 0,0.72337592336357892097709054724 0.600648602980154100450249643472,1.223386680467822174023240222 1.19163154396839887638748223253,1.72339743757206620422550713556 2.1342216197599452875977021904,1.72339742847305732453833115869 -2.01889900623749607433410346857,4.75985680877701196159479187986e-16 -0.26112514220036736611874061964)))"
+};
+
+static std::string bug_21155501[2] =
+ {
+ "MULTIPOLYGON(((-8.3935546875 27.449790329784214,4.9658203125 18.729501999072138,11.8212890625 23.563987128451217,9.7119140625 25.48295117535531,9.8876953125 31.728167146023935,8.3056640625 32.99023555965106,8.5693359375 37.16031654673677,-1.8896484375 35.60371874069731,-0.5712890625 32.02670629333614,-8.9208984375 29.458731185355344,-8.3935546875 27.449790329784214)))",
+ "MULTIPOLYGON(((4.9658203125 18.729501999072138,-3.4868710311820115 24.246968623627644,8.3589904332912 33.833614418115445,8.3056640625 32.99023555965106,9.8876953125 31.728167146023935,9.7119140625 25.48295117535531,11.8212890625 23.563987128451217,4.9658203125 18.729501999072138)),((-3.88714525609152 24.508246314579743,-8.3935546875 27.449790329784214,-8.9208984375 29.458731185355344,-0.5712890625 32.02670629333614,-1.8896484375 35.60371874069731,8.5693359375 37.16031654673677,8.362166569827938 33.883846345901595,-3.88714525609152 24.508246314579743)))",
+ };
+
+static std::string mysql_21965285_b[2] =
+ {
+ "MULTIPOLYGON(((3 0, -19 -19, -7 3, -2 10, 15 0, 3 0)))",
+ "MULTIPOLYGON(((1 1, 3 0, 19 -8, -4 -3, 1 1)),((3 0, -2 7, -3 16, 1 19, 8 12, 3 0)))"
+ };
+
+// formerly mysql_1
+static std::string mysql_23023665_7[2] =
+ {
+ "MULTIPOLYGON(((4 5,12 11,-12 -3,4 5)))",
+ "MULTIPOLYGON(((5 4,-14 0,1 0,5 4)),((1 6,13 0,10 12,1 6)))"
+ };
+
+static std::string mysql_23023665_8[2] =
+ {
+ "MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))",
+ "MULTIPOLYGON(((10 10,10 20,20 10,10 10)),((20 10,30 20,30 10,20 10)),((10 20,10 30,20 20,10 20)),((20 20,30 30,30 20,20 20)))"
+ };
+
+static std::string mysql_23023665_9[2] =
+ {
+ "MULTIPOLYGON(((0 0, 0 40, 40 40, 40 0, 0 0),(10 10, 30 10, 30 30, 10 30, 10 10)))",
+ "MULTIPOLYGON(((15 10, 10 15, 10 17, 15 10)),((15 10, 10 20, 10 22, 15 10)),"
+ "((15 10, 10 25, 10 27, 15 10)),((25 10, 30 17, 30 15, 25 10)),"
+ "((25 10, 30 22, 30 20, 25 10)),((25 10, 30 27, 30 25, 25 10)),"
+ "((18 10, 20 30, 19 10, 18 10)),((21 10, 20 30, 22 10, 21 10)))"
+ };
+
+static std::string mysql_23023665_12[2] =
+ {
+ "MULTIPOLYGON(((6 7,18 14,-8 1,0 0,18 -8,6 7),(6 0,-4 3,5 3,6 0)))",
+ "MULTIPOLYGON(((2 3,-3 5,-10 -1,2 3)))"
+ };
+
+static std::string mysql_regression_1_65_2017_08_31[2] =
+ {
+ "MULTIPOLYGON(((23.695652173913043 4.3478260869565215,23.333333333333336 4.166666666666667,25 0,23.695652173913043 4.3478260869565215)),((10 15,0 15,8.870967741935484 9.67741935483871,10.777777750841748 14.44444437710437,10 15)))",
+ "MULTIPOLYGON(((10 15,20 15,15 25,10 15)),((10 15,0 15,7 10,5 0,15 5,15.90909090909091 4.545454545454546,17 10,10 15)),((23.695652173913043 4.3478260869565215,20 2.5,25 0,23.695652173913043 4.3478260869565215)))",
+ };
+
+#endif // BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_common.hpp b/src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_common.hpp
new file mode 100644
index 000000000..5d6aa20ec
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/multi_overlay_common.hpp
@@ -0,0 +1,40 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
+#define GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
+
+
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+//#include <boost/geometry/io/svg/write.hpp>
+
+
+
+template <typename P, typename Functor, typename T>
+void test_all(std::vector<T> const& expected, double precision = 0.01)
+{
+ typename boost::range_const_iterator<std::vector<T> >::type iterator
+ = boost::begin(expected);
+
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+ typedef bg::model::box<P> box;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<mp, mp, Functor>("1", *iterator,
+ "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))",
+ "MULTIPOLYGON(((3 0,0 3,4 5,3 0)))", precision);
+ iterator++;
+}
+
+
+#endif // GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/overlay.cpp b/src/boost/libs/geometry/test/algorithms/overlay/overlay.cpp
new file mode 100644
index 000000000..f89bfabff
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/overlay.cpp
@@ -0,0 +1,524 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <sstream>
+#include <string>
+
+#include <boost/type_traits/is_same.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <geometry_test_common.hpp>
+#include <algorithms/check_validity.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+//#include <boost/geometry/extensions/algorithms/inverse.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include "multi_overlay_cases.hpp"
+
+
+#if defined(TEST_WITH_SVG)
+template <typename Mapper>
+struct map_visitor
+{
+ map_visitor(Mapper& mapper)
+ : m_mapper(mapper)
+ , m_traverse_seq(0)
+ , m_do_output(true)
+ {}
+
+ void print(char const* header)
+ {}
+
+ template <typename Turns>
+ void print(char const* header, Turns const& turns, int turn_index)
+ {
+ std::string style = "fill:rgb(0,0,0);font-family:Arial;font-size:6px";
+ stream(turns, turns[turn_index], turns[turn_index].operations[0], header, style);
+ }
+
+ template <typename Turns>
+ void print(char const* header, Turns const& turns, int turn_index, int op_index)
+ {
+ std::string style = "fill:rgb(0,0,0);font-family:Arial;font-size:6px";
+ stream(turns, turns[turn_index], turns[turn_index].operations[op_index], header, style);
+ }
+
+ template <typename Turns>
+ void visit_turns(int phase, Turns const& turns)
+ {
+ typedef typename boost::range_value<Turns>::type turn_type;
+ int index = 0;
+ BOOST_FOREACH(turn_type const& turn, turns)
+ {
+ switch (phase)
+ {
+ case 1 :
+ m_mapper.map(turn.point, "fill:rgb(255,128,0);"
+ "stroke:rgb(0,0,0);stroke-width:1", 3);
+ break;
+ case 11 :
+ m_mapper.map(turn.point, "fill:rgb(92,255,0);" // Greenish
+ "stroke:rgb(0,0,0);stroke-width:1", 3);
+ break;
+ case 21 :
+ m_mapper.map(turn.point, "fill:rgb(0,128,255);" // Blueish
+ "stroke:rgb(0,0,0);stroke-width:1", 3);
+ break;
+ case 3 :
+ label_turn(index, turn);
+ break;
+ }
+ index++;
+ }
+ }
+
+ template <typename Turns, typename Turn, typename Operation>
+ std::string stream_turn_index(Turns const& turns, Turn const& turn, Operation const& op)
+ {
+ std::ostringstream out;
+
+ if (turn.cluster_id >= 0)
+ {
+ out << "cl=" << turn.cluster_id << " ";
+ }
+
+ // Because turn index is unknown here, and still useful for debugging,
+ std::size_t index = 0;
+ for (typename Turns::const_iterator it = turns.begin();
+ it != turns.end(); ++it, ++index)
+ {
+ Turn const& t = *it;
+ if (&t == &turn)
+ {
+ out << index;
+ break;
+ }
+ }
+
+ if (&op == &turn.operations[0]) { out << "[0]"; }
+ if (&op == &turn.operations[1]) { out << "[1]"; }
+ return out.str();
+ }
+
+ template <typename Clusters, typename Turns>
+ void visit_clusters(Clusters const& clusters, Turns const& turns)
+ {
+ typedef typename boost::range_value<Turns>::type turn_type;
+ int index = 0;
+ BOOST_FOREACH(turn_type const& turn, turns)
+ {
+ if (turn.cluster_id >= 0)
+ {
+ std::cout << " TURN: " << index << " part of cluster " << turn.cluster_id << std::endl;
+ }
+ index++;
+ }
+
+ for (typename Clusters::const_iterator it = clusters.begin(); it != clusters.end(); ++it)
+ {
+ std::cout << " CLUSTER " << it->first << ": ";
+ for (typename std::set<bg::signed_size_type>::const_iterator sit
+ = it->second.turn_indices.begin();
+ sit != it->second.turn_indices.end(); ++sit)
+ {
+ std::cout << " " << *sit;
+ }
+ std::cout << std::endl;
+ }
+
+ std::cout << std::endl;
+
+ }
+
+ template <typename Turns, typename Turn, typename Operation>
+ void visit_traverse(Turns const& turns, Turn const& turn, Operation const& op, const std::string& header)
+ {
+ typedef typename boost::range_value<Turns>::type turn_type;
+
+ if (! m_do_output)
+ {
+ return;
+ }
+
+ std::cout << "Visit turn " << stream_turn_index(turns, turn, op)
+ << " " << bg::operation_char(turn.operations[0].operation)
+ << bg::operation_char(turn.operations[1].operation)
+ << " (" << bg::operation_char(op.operation) << ")"
+ << " " << header << std::endl;
+
+ // Uncomment for more detailed debug info in SVG on traversal
+ std::string style
+ = header == "Visit" ? "fill:rgb(80,80,80)" : "fill:rgb(0,0,0)";
+
+ style += ";font-family:Arial;font-size:6px";
+
+ stream(turns, turn, op, header.substr(0, 1), style);
+ }
+
+ template <typename Turns, typename Turn, typename Operation>
+ void visit_traverse_reject(Turns const& turns, Turn const& turn, Operation const& op,
+ bg::detail::overlay::traverse_error_type error)
+ {
+ if (! m_do_output)
+ {
+ return;
+ }
+ std::cout << "Reject turn " << stream_turn_index(turns, turn, op)
+ << bg::operation_char(turn.operations[0].operation)
+ << bg::operation_char(turn.operations[1].operation)
+ << " (" << bg::operation_char(op.operation) << ")"
+ << " " << bg::detail::overlay::traverse_error_string(error) << std::endl;
+ //return;
+
+ std::string style = "fill:rgb(255,0,0);font-family:Arial;font-size:7px";
+ stream(turns, turn, op, bg::detail::overlay::traverse_error_string(error), style);
+
+ m_do_output = false;
+ }
+
+ template <typename Turns, typename Turn, typename Operation>
+ void visit_traverse_select_turn_from_cluster(Turns const& turns, Turn const& turn, Operation const& op)
+ {
+ std::cout << "Visit turn from cluster " << stream_turn_index(turns, turn, op)
+ << " " << bg::operation_char(turn.operations[0].operation)
+ << bg::operation_char(turn.operations[1].operation)
+ << " (" << bg::operation_char(op.operation) << ")"
+ << std::endl;
+ return;
+ }
+
+ template <typename Turns, typename Turn, typename Operation>
+ void stream(Turns const& turns, Turn const& turn, Operation const& op, const std::string& header, const std::string& style)
+ {
+ std::ostringstream out;
+ out << m_traverse_seq++ << " " << header
+ << " " << stream_turn_index(turns, turn, op);
+
+ out << " " << bg::visited_char(op.visited);
+
+ add_text(turn, out.str(), style);
+ }
+
+ template <typename Turn>
+ bool label_operation(Turn const& turn, int index, std::ostream& os)
+ {
+ os << bg::operation_char(turn.operations[index].operation);
+ bool result = false;
+ if (! turn.discarded)
+ {
+ if (turn.operations[index].enriched.next_ip_index != -1)
+ {
+ os << "->" << turn.operations[index].enriched.next_ip_index;
+ if (turn.operations[index].enriched.next_ip_index != -1)
+ {
+ result = true;
+ }
+ }
+ else
+ {
+ os << "->" << turn.operations[index].enriched.travels_to_ip_index;
+ if (turn.operations[index].enriched.travels_to_ip_index != -1)
+ {
+ result = true;
+ }
+ }
+
+ os << " {" << turn.operations[index].enriched.region_id
+ << (turn.operations[index].enriched.isolated ? " ISO" : "")
+ << "}";
+
+ if (! turn.operations[index].enriched.startable)
+ {
+ os << "$";
+ }
+ }
+
+ return result;
+ }
+
+ template <typename Turn>
+ void label_turn(int index, Turn const& turn)
+ {
+ std::ostringstream out;
+ out << index << " ";
+ if (turn.cluster_id != -1)
+ {
+ out << " c=" << turn.cluster_id << " ";
+ }
+ bool lab1 = label_operation(turn, 0, out);
+ out << " / ";
+ bool lab2 = label_operation(turn, 1, out);
+ if (turn.discarded)
+ {
+ out << "!";
+ }
+ if (turn.has_colocated_both)
+ {
+ out << "+";
+ }
+ bool const self_turn = bg::detail::overlay::is_self_turn<bg::overlay_union>(turn);
+ if (self_turn)
+ {
+ out << "@";
+ }
+
+ std::string font8 = "font-family:Arial;font-size:6px";
+ std::string font6 = "font-family:Arial;font-size:4px";
+ std::string style = "fill:rgb(0,0,255);" + font8;
+ if (self_turn)
+ {
+ if (turn.discarded)
+ {
+ style = "fill:rgb(128,28,128);" + font6;
+ }
+ else
+ {
+ style = "fill:rgb(255,0,255);" + font8;
+ }
+ }
+ else if (turn.discarded)
+ {
+ style = "fill:rgb(92,92,92);" + font6;
+ }
+ else if (turn.cluster_id != -1)
+ {
+ style = "fill:rgb(0,0,255);" + font8;
+ }
+ else if (! lab1 || ! lab2)
+ {
+ style = "fill:rgb(0,0,255);" + font6;
+ }
+
+ add_text(turn, out.str(), style);
+ }
+
+ template <typename Turn>
+ void add_text(Turn const& turn, std::string const& text, std::string const& style)
+ {
+ int const margin = 5;
+ int const lineheight = 6;
+ double const half = 0.5;
+ double const ten = 10;
+
+ // Map characteristics
+ // Create a rounded off point
+ std::pair<int, int> p
+ = std::make_pair(
+ boost::numeric_cast<int>(half
+ + ten * bg::get<0>(turn.point)),
+ boost::numeric_cast<int>(half
+ + ten * bg::get<1>(turn.point))
+ );
+ m_mapper.text(turn.point, text, style, margin, m_offsets[p], lineheight);
+ m_offsets[p] += lineheight;
+ }
+
+
+ Mapper& m_mapper;
+ std::map<std::pair<int, int>, int> m_offsets;
+ int m_traverse_seq;
+ bool m_do_output;
+
+};
+#endif
+
+template <typename Geometry, bg::overlay_type OverlayType>
+void test_overlay(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ double expected_area,
+ std::size_t expected_clip_count,
+ std::size_t expected_hole_count)
+{
+ Geometry g1;
+ bg::read_wkt(wkt1, g1);
+
+ Geometry g2;
+ bg::read_wkt(wkt2, g2);
+
+ // Reverse if necessary
+ bg::correct(g1);
+ bg::correct(g2);
+
+#if defined(TEST_WITH_SVG)
+ bool const ccw = bg::point_order<Geometry>::value == bg::counterclockwise;
+ bool const open = bg::closure<Geometry>::value == bg::open;
+
+ std::ostringstream filename;
+ filename << "overlay"
+ << "_" << caseid
+ << "_" << string_from_type<typename bg::coordinate_type<Geometry>::type>::name()
+ << (ccw ? "_ccw" : "")
+ << (open ? "_open" : "")
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ << "_rescaled"
+#endif
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ typedef bg::svg_mapper<typename bg::point_type<Geometry>::type> svg_mapper;
+
+ svg_mapper mapper(svg, 500, 500);
+ mapper.add(g1);
+ mapper.add(g2);
+
+ // Input shapes in green (src=0) / blue (src=1)
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+#endif
+
+
+ typedef typename boost::range_value<Geometry>::type geometry_out;
+ typedef bg::detail::overlay::overlay
+ <
+ Geometry, Geometry,
+ bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value,
+ OverlayType == bg::overlay_difference
+ ? ! bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value
+ : bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value,
+ bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value,
+ geometry_out,
+ OverlayType
+ > overlay;
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type strategy_type;
+
+ strategy_type strategy;
+
+ typedef typename bg::rescale_overlay_policy_type
+ <
+ Geometry,
+ Geometry
+ >::type rescale_policy_type;
+
+ rescale_policy_type robust_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+#if defined(TEST_WITH_SVG)
+ map_visitor<svg_mapper> visitor(mapper);
+#else
+ bg::detail::overlay::overlay_null_visitor visitor;
+#endif
+
+ Geometry result;
+ overlay::apply(g1, g2, robust_policy, std::back_inserter(result),
+ strategy, visitor);
+
+ std::string message;
+ bool const valid = check_validity<Geometry>::apply(result, caseid, g1, g2, message);
+ BOOST_CHECK_MESSAGE(valid,
+ "overlay: " << caseid << " not valid: " << message
+ << " type: " << (type_for_assert_message<Geometry, Geometry>()));
+
+ BOOST_CHECK_CLOSE(bg::area(result), expected_area, 0.001);
+ BOOST_CHECK_MESSAGE((bg::num_interior_rings(result) == expected_hole_count),
+ caseid
+ << " hole count: detected: " << bg::num_interior_rings(result)
+ << " expected: " << expected_hole_count);
+ BOOST_CHECK_MESSAGE((result.size() == expected_clip_count),
+ caseid
+ << " clip count: detected: " << result.size()
+ << " expected: " << expected_clip_count);
+
+#if defined(TEST_WITH_SVG)
+ mapper.map(result, "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,0,0);"
+ "stroke:rgb(255,0,255);stroke-width:8");
+
+#endif
+}
+
+#define TEST_INTERSECTION(caseid, area, clips, holes) (test_overlay<multi_polygon, bg::overlay_intersection>) \
+ ( #caseid "_int", caseid[0], caseid[1], area, clips, holes)
+#define TEST_UNION(caseid, area, clips, holes) (test_overlay<multi_polygon, bg::overlay_union>) \
+ ( #caseid "_union", caseid[0], caseid[1], area, clips, holes)
+#define TEST_DIFFERENCE_A(caseid, area, clips, holes) (test_overlay<multi_polygon, bg::overlay_difference>) \
+ ( #caseid "_diff_a", caseid[0], caseid[1], area, clips, holes)
+#define TEST_DIFFERENCE_B(caseid, area, clips, holes) (test_overlay<multi_polygon, bg::overlay_difference>) \
+ ( #caseid "_diff_b", caseid[1], caseid[0], area, clips, holes)
+
+#define TEST_INTERSECTION_WITH(caseid, index1, index2, area, clips, holes) (test_overlay<multi_polygon, bg::overlay_intersection>) \
+ ( #caseid "_int_" #index1 "_" #index2, caseid[index1], caseid[index2], area, clips, holes)
+#define TEST_UNION_WITH(caseid, index1, index2, area, clips, holes) (test_overlay<multi_polygon, bg::overlay_union>) \
+ ( #caseid "_union" #index1 "_" #index2, caseid[index1], caseid[index2], area, clips, holes)
+
+template <typename T, bool Clockwise>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::polygon<point_type, Clockwise> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ TEST_UNION(case_multi_simplex, 14.58, 1, 0);
+ TEST_INTERSECTION(case_multi_simplex, 6.42, 2, 0);
+
+ TEST_DIFFERENCE_A(case_multi_simplex, 5.58, 5, 0);
+ TEST_DIFFERENCE_B(case_multi_simplex, 2.58, 4, 0);
+
+ // Contains 5 clusters, needing immediate selection of next turn
+ TEST_UNION_WITH(case_58_multi, 0, 3, 19.8333333, 2, 0);
+
+ // Contains many clusters, needing to exclude u/u turns
+ TEST_UNION(case_recursive_boxes_3, 56.5, 17, 6);
+
+ // Contains 4 clusters, one of which having 4 turns
+ TEST_UNION(case_recursive_boxes_7, 7.0, 2, 0);
+
+ // Contains 5 clusters, needing immediate selection of next turn
+ TEST_UNION(case_89_multi, 6.0, 1, 0);
+
+ // Needs ux/next_turn_index==-1 to be filtered out
+ TEST_INTERSECTION(case_77_multi, 9.0, 5, 0);
+ TEST_UNION(case_101_multi, 22.25, 1, 3);
+ TEST_INTERSECTION(case_101_multi, 4.75, 4, 0);
+
+ TEST_INTERSECTION(case_recursive_boxes_11, 1.0, 2, 0);
+ TEST_INTERSECTION(case_recursive_boxes_30, 6.0, 4, 0);
+
+ TEST_UNION(case_recursive_boxes_4, 96.75, 1, 2);
+ TEST_INTERSECTION_WITH(case_58_multi, 2, 6, 13.25, 1, 1);
+ TEST_INTERSECTION_WITH(case_72_multi, 1, 2, 6.15, 3, 1);
+ TEST_UNION(case_recursive_boxes_12, 6.0, 6, 0);
+ TEST_UNION(case_recursive_boxes_13, 10.25, 3, 0);
+
+
+// std::cout
+// << " \""
+// << bg::inverse<multi_polygon>(case_65_multi[0], 1.0)
+// << "\"" << std::endl;
+}
+
+int test_main(int, char* [])
+{
+ test_all<double, true>();
+// test_all<double, false>();
+ return 0;
+ }
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/overlay_cases.hpp b/src/boost/libs/geometry/test/algorithms/overlay/overlay_cases.hpp
new file mode 100644
index 000000000..65bea7fbb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/overlay_cases.hpp
@@ -0,0 +1,1394 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015, 2016.
+// Modifications copyright (c) 2015-2016, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_OVERLAY_CASES_HPP
+#define BOOST_GEOMETRY_TEST_OVERLAY_CASES_HPP
+
+#include <string>
+
+// For case 1..79, See powerpoint doc/other/test_cases/overlay_cases.ppt
+
+static std::string case_1[2] = {
+ "POLYGON((0 1,2 5,5 3,0 1))",
+ "POLYGON((3 0,0 3,4 5,3 0))" };
+
+static std::string ccw_case_1[2] = {
+ "POLYGON((0 1,5 3,2 5,0 1))",
+ "POLYGON((3 0,4 5,0 3,3 0))" };
+
+static std::string open_case_1[2] = {
+ "POLYGON((0 1,2 5,5 3))",
+ "POLYGON((3 0,0 3,4 5))" };
+
+
+static std::string case_2[2] = {
+ "POLYGON((0 2,2 5,5 3,3 0,0 2))",
+ "POLYGON((0 4,4 5,5 1,1 0,0 4))" };
+
+static std::string case_3[2] = {
+ "POLYGON((1 2,2 4,4 3,3 1,1 2))",
+ "POLYGON((1 1,1 4,4 4,4 1,1 1))" };
+
+static std::string case_3_sph[2] = {
+ "POLYGON((1 2,2 4.0012148518458881,4 3,3.0001521347633209 1.0003046174216719,1 2))",
+ "POLYGON((1 1,1 4,4 4,4 1,1 1))" };
+
+static std::string case_3_2[2] = {
+ "POLYGON((1 1,1 2,1 4,2 4,4 4,4 3,4 1,3 1,1 1))",
+ "POLYGON((1 1,1 4,4 4,4 1,1 1))" };
+
+static std::string case_3_2_sph[2] = {
+ "POLYGON((1 1,1 2,1 4,2 4.0012148518458881,4 4, 4 3,4 1,3.0001521347633209 1.0003046174216719,1 1))",
+ "POLYGON((1 1,1 4,4 4,4 1,1 1))" };
+
+static std::string case_4[2] = {
+ "POLYGON((0 2,2 5,5 3,3 0,0 2))",
+ "POLYGON((0 4,4 5,5 1,1 0,0 4),(1 1,2 1,2 2,1 2,1 1),(3 3,4 3,4 4,3 4,3 3))" };
+
+static std::string case_5[2] = {
+ "POLYGON((0 4,1 5,2.5 4,3.5 5,5 4,4 3,5 2,4 1,3.5 0,3 1,2.5 0,2 1,1.5 0,1 3.5,0.25 3,1 2.5,0 2,0 4))",
+ "POLYGON((0.5 0.5,0.5 4.5,4.5 4.5,4.5 0.5,0.5 0.5))"
+ };
+
+static std::string case_6[2] = {
+ "POLYGON((0 1,2 5,5 2,0 1))",
+ "POLYGON((1 3,2 5,5 2,1 3))" };
+
+static std::string case_6_sph[2] = {
+ "POLYGON((0 1,2 5,5 2,0 1))",
+ "POLYGON((0.99816884334995659 3.0004544452169379,2 5,5 2,0.99816884334995659 3.0004544452169379))" };
+
+static std::string case_7[2] = {
+ "POLYGON((0 1,1 3,5 2,0 1))",
+ "POLYGON((1 3,2 5,5 2,1 3))" };
+
+static std::string case_8[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 3,4 4,3 1,1 3))" };
+
+static std::string case_8_sph[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1.0023984691325358 3.0008039480973441,4 4,3.0005710779764270 1.0017165445544389,1.0023984691325358 3.0008039480973441))" };
+
+static std::string case_9[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((2 2,2 4,5 4,2 2))" };
+
+static std::string case_9_sph[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((2.0021918671997510 2.0014662914956771,2 4,5 4,2.0021918671997510 2.0014662914956771))" };
+
+static std::string ccw_case_9[2] = {
+ "POLYGON((0 0,4 0,0 4,0 0))",
+ "POLYGON((2 2,5 4,2 4,2 2))" };
+
+static std::string open_case_9[2] = {
+ "POLYGON((0 0,0 4,4 0))",
+ "POLYGON((2 2,2 4,5 4))" };
+
+static std::string case_10[2] = {
+ "POLYGON((0 0,2 4,4 0,0 0))",
+ "POLYGON((1 2,2 5,3 2,2 4,1 2))" };
+
+static std::string case_10_sph[2] = {
+ "POLYGON((0 0,2 4,4 0,0 0))",
+ "POLYGON((1.0027234797707729 2.0081941097810105,2 5,2.9972765202292275 2.0081941097810105,2 4,1.0027234797707729 2.0081941097810105))" };
+
+static std::string case_11[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 2,2 2,2 1,1 1))" };
+
+static std::string case_11_sph[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 2,2 2.0036594926050890,2 1,1 1))" };
+
+static std::string case_12[2] = {
+ "POLYGON((0 1,1 4,2 2,3 4,4 1,0 1))",
+ "POLYGON((0 3,2 4,4 3,0 3))" };
+
+static std::string case_13[2] = {
+ "POLYGON((0 1,1 2,3 0,0 1))",
+ "POLYGON((0 3,2 3,2 1,0 3))" };
+
+static std::string case_13_sph[2] = {
+ "POLYGON((0 1,1 2,3 0,0 1))",
+ "POLYGON((0 2.9977189008308094,2 3,2 1.0004570537241211,0 2.9977189008308094))" };
+
+static std::string case_14[2] = {
+ "POLYGON((0 0,0 4,2 2,4 0,0 0))",
+ "POLYGON((1 3,4 4,3 1,1 3))" };
+
+static std::string case_14_sph[2] = {
+ "POLYGON((0 0,0 4,2 2.0036594926050877,4 0,0 0))",
+ "POLYGON((1.0023984691325358 3.0008039480973441,4 4,3.0005710779764270 1.0017165445544389,1.0023984691325358 3.0008039480973441))" };
+
+static std::string case_15[2] = {
+ "POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))",
+ "POLYGON((1 3,4 4,3 1,1 3))" };
+
+static std::string case_15_sph[2] = {
+ "POLYGON((0 0,0 4,1.5 2.5037147591481679,2.5 1.5031461368777814,4 0,0 0))",
+ "POLYGON((1.0023984691325358 3.0008039480973441,4 4,3.0005710779764270 1.0017165445544389,1.0023984691325358 3.0008039480973441))" };
+
+static std::string case_16[2] = {
+ "POLYGON((1 2,3 4,2 1,1 2))",
+ "POLYGON((1 0,1 2,2 1,3 4,2 3,3 5,4 0,1 0))" };
+
+static std::string case_16_sph[2] = {
+ "POLYGON((1 2,3 4,2 1,1 2))",
+ "POLYGON((1 0,1 2,2 1,3 4,2.0013644968330810 3.0027358616998980,3 5,4 0,1 0))" };
+
+static std::string case_17[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 1,1 3,3 1,1 1))" };
+
+static std::string case_17_sph[2] = {
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 1,1 3.0031983963093531,3 1.0022887548647623,1 1))" };
+
+static std::string case_18[2] = {
+ "POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))",
+ "POLYGON((1 1,1 3,3 1,1 1))" };
+
+static std::string case_18_sph[2] = {
+ "POLYGON((0 0,0 4,1.5 2.5037147591481679,2.5 1.5031461368777814,4 0,0 0))",
+ "POLYGON((1 1,1 3.0031983963093531,3 1.0022887548647623,1 1))" };
+
+static std::string case_19[2] = {
+ "POLYGON((2 0,1 3,5 2,2 0))",
+ "POLYGON((1 3,2 5,5 2,1 3))" };
+
+static std::string case_20[2] = {
+ "POLYGON((2 0,1 3,5 2,2 0))",
+ "POLYGON((2 0,1 3,5 2,2 0))" };
+
+static std::string case_21[2] = {
+ "POLYGON((1 0,0 5,5 2,1 0),(2 1,3 2,1 3,2 1))",
+ "POLYGON((2 1,1 3,3 2,2 1))" };
+
+static std::string case_22[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((2 4,5 5,4 2,2 4))" };
+
+static std::string case_23[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((3 3,4 2,1 1,3 3))" };
+
+static std::string case_24[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((2 2,4 2,1 1,2 2))" };
+
+static std::string case_25[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((3 1,4 2,5 0,3 1))" };
+
+static std::string case_26[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((3 1,4 2,5 4,4 0,3 1))" };
+
+static std::string case_27[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((1 1,4 2,5 0,1 1))" };
+
+static std::string case_28[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((1 1,4 2,5 4,5 0,1 1))" };
+
+static std::string case_29[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((4 4,5 1,4 2,1 1,4 4))" };
+
+static std::string case_30[2] = {
+ "POLYGON((1 0,0 3,2 2,3 3,1 0))",
+ "POLYGON((1 2,2 2,2 4,4 3,3 1,1 2))" };
+
+static std::string case_31[2] = {
+ "POLYGON((0 0,0 3,2 2,0 0))",
+ "POLYGON((4 1,2 2,3 3,4 1))" };
+
+static std::string case_32[2] = {
+ "POLYGON((0 0,0 3,2 2,0 0))",
+ "POLYGON((4 1,3 0,2 2,4 1))" };
+
+static std::string case_33[2] = {
+ "POLYGON((0 0,0 3,2 2,0 0))",
+ "POLYGON((3 3,3 0,2 2,3 3))" };
+
+static std::string case_34[2] = {
+ "POLYGON((2 0,0 3,4 2,2 0))",
+ "POLYGON((2 1,4 2,5 3,4 1,2 1))" };
+
+static std::string case_35[2] = {
+ "POLYGON((1 0,0 3,5 3,4 2,5 1,1 0))",
+ "POLYGON((2 2,4 2,4 1,2 2))" };
+
+static std::string case_36[2] = {
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((1 5,5 5,4 2,3 3,2 1,1 2,1 5))" };
+
+static std::string case_37[2] = {
+ "POLYGON((4 0,2 2,5 5,4 0))",
+ "POLYGON((0 2,4 3,2 2,4 1,0 2))" };
+
+static std::string case_38[2] = {
+ "POLYGON((4 0,3 3,2 2,4 5,5 2,4 0))",
+ "POLYGON((1 1,1 3,4 4,3 3,4 2,1 1))" };
+
+static std::string case_39[2] = {
+ "POLYGON((0 4,4 8,7 7,8 4,5 3,4 0,0 4))",
+ "POLYGON((0 4,4 8,5 5,8 4,7 1,4 0,0 4))" };
+
+static std::string case_40[2] = {
+ "POLYGON((0 1,1 2,2 1,3 2,4 1,5 2,4 0,2 0,0 1))",
+ "POLYGON((0 3,2 4,4 4,5 2,4 3,3 2,2 3,1 2,0 3))" };
+
+static std::string case_41[2] = {
+ "POLYGON((3 1,1 4,3 3.5,5 3,3 1))",
+ "POLYGON((3 1,1 4,5 3,4 2,3 1))" };
+
+static std::string case_42[2] = {
+ "POLYGON((3 1,1 4,3 3.5,5 3,5 3,3 1))",
+ "POLYGON((3 1,1 4,1 4,5 3,4 2,3 1))" };
+
+// keyholing
+static std::string case_43[2] = {
+ "POLYGON((1 2,1 1,2 1,2 2.25,3 2.25,3 0,0 0,0 3,3 3,2.75 2,1 2))",
+ "POLYGON((1.5 1.5,1.5 2.5,2.5 2.5,2.5 1.5,1.5 1.5))" };
+// self-tangency
+
+static std::string case_44[2] = {
+ "POLYGON((0 0,0 3,3 3,3 2,0 1.5,3 1,3 0,0 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))" };
+// self-intersection
+
+static std::string case_45[2] = {
+ "POLYGON((0.5 0,0.5 3,3 3,3 2,0 1.5,3 1,3 0,0.5 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))" };
+// self-tangent
+
+static std::string case_46[2] = {
+ "POLYGON((2 0,2 3,5 3,5 2,2 1.5,5 1,5 0,2 0))",
+ "POLYGON((1.5 1,1.5 2,2.5 2,2.5 1,1.5 1))" };
+// self-tangent
+
+static std::string case_47[2] = {
+ "POLYGON((2.5 0,2.5 3,5 3,5 2,2 1.5,5 1,5 0,2.5 0))",
+ "POLYGON((2 1,2 2,3 2,3 1,2 1))" };
+
+static std::string case_49[2] = {
+ "POLYGON((1 0,1 1,2 2,3 3,4 3,4 0,1 0))",
+ "POLYGON((0 2,2 5,5 2,5 0,2 0,2 2,0 2))" };
+
+
+// 50, collinear opposite
+static std::string case_50[2] = {
+ "POLYGON((0 0,0 3,2 3,4 3,4 0,0 0))",
+ "POLYGON((0 3,0 5,5 5,5 0,4 0,4 3,2 3,0 3))" };
+
+// 51, fit
+static std::string case_51[2] = {
+ "POLYGON((0 0,0 5,5 5,5 0,0 0),(4 1,3 4,1 2,4 1))",
+ "POLYGON((1 2,3 4,4 1,1 2))" };
+
+// 52, partially equal, touching each other
+static std::string case_52[2] = {
+ "POLYGON((0 0,1 4,3 1,4 4,1 4,5 5,5 0,0 0))",
+ "POLYGON((0 0,1 4,3 1,4 4,1 4,5 5,4 1,0 0))" };
+
+// 53, wrapping a box, self-touching
+static std::string case_53[3] = {
+ "POLYGON((2 2,2 3,3 3,3 2,2 2))",
+ // ST self-tangent ext. ring, ST_IsValid=false
+ "POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,3 2,3 1,4 1,4 4,1 4,1 3,2 3,2 2,0 2))",
+ // IET tangent ext/int ring, ST_IsValid=true
+ "POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,0 2),(1 3,2 3,2 2,3 2,3 1,4 1,4 4,1 4,1 3))"
+ };
+
+static std::string case_54[4] = {
+ // ST: self-tangent ext. ring
+ "POLYGON((2 2,2 3,4 3,4 0,1 0,1 2,2 2,2 1,3 1,3 2,2 2))",
+ // IET: tangent ext/int ring
+ "POLYGON((2 2,2 3,4 3,4 0,1 0,1 2,2 2),(2 1,3 1,3 2,2 2,2 1))",
+ // other like in case53
+ case_53[1], // ST
+ case_53[2] // IET
+ };
+
+static std::string case_55[4] = {
+ // ST: self-tangent ext. ring
+ "POLYGON((2 2,3 3,4 3,4 0,1 0,1 1,2 2,2 1,3 1,3 2,2 2))",
+ // IET: tangent ext/int ring
+ "POLYGON((2 2,3 3,4 3,4 0,1 0,1 1,2 2),(2 1,3 1,3 2,2 2,2 1))",
+ // ST: self-tangent ext. ring
+ "POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,3 1,4 1,4 4,1 4,1 3,2 2,0 2))" ,
+ // IET: tangent ext/int ring
+ "POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,0 2),(1 3,2 2,3 1,4 1,4 4,1 4,1 3))"
+
+ // B, not a 4-fold intersection
+ //"POLYGON((2 2,3 3,4 3,4 0,1 0,1 1,2 2),(2 1,3 1,3 2,2.0 1.9,2 1))",
+ //"POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,0 2),(1 3,2.1 2.1,3 1,4 1,4 4,1 4,1 3))"
+ // C, not a 4-fold intersection,
+ //"POLYGON((2 2,3 3,4 3,4 0,1 0,1 1,2 2),(2 1,3 1,3 2,2.0 1.9,2 1))",
+ //"POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,0 2),(1 3,1.9 1.9,3 1,4 1,4 4,1 4,1 3))"
+ };
+
+static std::string case_56[2] = {
+ "POLYGON((0 0,0 1,2 3,3 0,4 2,5 0,0 0))",
+ //"POLYGON((0 -1,0 1,2 3,3 0,4 2,5 -1,0 -1))",
+ //"POLYGON((0 1,0 4,5 4,5 0,3 0,4 1,4 3,2 3,2 1,3 0,0 0))"
+ "POLYGON((1 0,1 4,5 4,5 0,3 0,4 1,4 3,2 3,2 1,3 0,1 0))"
+ };
+
+static std::string case_57[2] = {
+ case_56[0],
+ //"POLYGON((0 2,4 5,5 1,0 2))"
+ //"POLYGON((0 -1,0 1,2 3,3 0,4 2,5 -1,0 -1))",
+ //"POLYGON((0 0,0 1,2 3,3 0,4 2,6 0,0 0))",
+ "POLYGON((0 0,4 5,5 0,0 0))"
+ };
+
+// Case 58, either one ring with self-tangencies defining holes,
+// or three inner rings tangent to outer ring
+static std::string case_58[3] = {
+ "POLYGON((3 3,3 4,4 4,4 3,3 3))",
+ // ST: self-tangent
+ "POLYGON((0 2,0 5,4 4,1 4,1 3,4 4,2 3,2 2,4 4,3 2,4 2,4 4,5 0,0 2))",
+ // IET: inner/ext tangency (the correct version)
+ "POLYGON((0 2,0 5,4 4,5 0,0 2),(4 4,1 4,1 3,4 4),(4 4,2 3,2 2,4 4),(4 4,3 2,4 2,4 4))"
+ };
+
+static std::string case_59[3] = {
+ "POLYGON((0.5 3,3.5 3.5,3 0.5,2 2,0.5 3))",
+ case_53[1], // ST: self-tangent
+ case_53[2] // IET: inner/ext tangency
+ };
+static std::string case_60[3] = {
+ "POLYGON((1 3,5 5,3 1,1 3))",
+ case_53[1], // ST: self-tangent
+ case_53[2] // IET: inner/ext tangency
+ };
+
+// 60-..., actually there are multi-polygons but expressed here using self-tangencies
+static std::string case_61[2] = {
+ "POLYGON((1 1,1 2,2 2,2 3,3 3,3 2,2 2,2 1,1 1))",
+ "POLYGON((1 2,1 3,2 3,2 4,3 4,3 3,2 3,2 2,1 2))"
+ };
+
+// 62..69 TODO, most are multi but can be expressed by self-tangent-polygon as well
+
+static std::string case_70[2] = {
+ "POLYGON((1 0,1 3,4 3,4 0,1 0),(2 1,3 1,3 2,2 2,2 1))",
+ "POLYGON((1 0,1 2,4 2,4 0,3 0,3 1,2 1,2 0,1 0))"
+ };
+
+static std::string case_71[2] = {
+ "POLYGON((0 0,0 3,1 3,1 1,3 1,3 2,2 2,2 3,3 3,3 2,4 2,4 0,0 0))",
+ "POLYGON((0 2,0 3,3 3,3 2,0 2))"
+ };
+
+static std::string case_72[2] = {
+ "POLYGON((0 3,4 4,3 0,3 3,2 1,1 2,3 3,0 3))",
+ "POLYGON((0 0,1 4,3 3,4 1,0 0))"
+ };
+
+// 73..78: multi
+
+static std::string case_79[2] = {
+ "POLYGON((0 0,0 5,5 5,5 3,2 3,2 2,5 2,5 0,0 0))",
+ "POLYGON((0 0,0 5,5 5,5 0,2 0,2 2,1 2,1 0,0 0))"
+ };
+
+// Two colocations of interior/exterior ring
+static std::string case_80[2] = {
+ "POLYGON((0 5,5 10,10 5,5 0,0 5),(10 5,4 6,5 4,10 5))",
+ "POLYGON((10 0,10 10,20 10,20 0,10 0),(10 5,15 3,18 8,10 5))"
+ };
+
+// Interior ring touches other ring in the middle
+static std::string case_81[2] = {
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 4,2 7,5 1,10 4))",
+ "POLYGON((10 0,10 10,20 10,20 0,10 0),(10 6,15 3,18 8,10 6))"
+ };
+
+
+// Missing intersection, simpler version of case_108_multi
+static std::string case_82[3] = {
+ "POLYGON((4 4,4 3,1 3,1 2,0 2,0 6,1 6,2 5,2 4,4 4),(2 4,1 4,1.5 3.5,2 4))",
+ "POLYGON((3 6,3 5,5 5,5 0,4 0,4 1,2 1,2 3,2 4,1 3,1 5,2 6,3 6),(3 3,3 2,4 2,4 4,2 4,3 3))",
+ "POLYGON((3 6,3 5,5 5,5 1, 2 1,2 3,2 4,1 3,1 5,2 6,3 6),(3 3,3 2,4 2,4 4,2 4,3 3))"
+ };
+
+static std::string case_83[2] = {
+ "POLYGON((2 4,2 2,0 2,0 6,2 4),(2 4,1 4,1.5 3.5,2 4))",
+ "POLYGON((5 6,5 0,2 4,1 3,0 6,5 6))"
+ };
+
+
+// Cases for u/u touches creating interior rings (originally they were called 80-89.
+// but in another branch - now renamed to 90-99)
+
+static std::string case_90[2] =
+ {
+ // union has one polygon with two holes; one of them is
+ // touching the exterior ring
+ // reported by MySQL QA on Aug 19, 2015
+ "POLYGON((0 6,-11 -6,6 0,0 6),(3 1,5 0,-2 0,3 1))",
+ "POLYGON((5 4,6 0,9 12,-7 -12,5 -19,5 4))"
+ };
+
+static std::string case_91[2] =
+ {
+ // union has a polygon with one hole touching the exterior ring
+ "POLYGON((0 0,10 10,20 0,0 0))",
+ "POLYGON((10 5,30 10,20 0,20 5,10 5))"
+ };
+
+static std::string case_92[2] =
+ {
+ "POLYGON((0 0,10 10,20 0,0 0))",
+ "POLYGON((10 10,30 10,20 0,20 5,10 10))"
+ };
+
+static std::string case_93[2] =
+ {
+ // union as a single polygon and two holes both touching the
+ // exterior ring at vertices
+ "POLYGON((0 0,10 10,20 0,0 0))",
+ "POLYGON((10 5,20 7,10 10,30 10,20 0,20 5,10 5))"
+ };
+
+static std::string case_94[2] =
+ {
+ "POLYGON((0 0,10 10,20 0,0 0))",
+ "POLYGON((15 5,20 7,10 10,30 10,20 0,20 5,15 5))"
+ };
+
+static std::string case_95[2] =
+ {
+ // union has a single polygon and two holes that touch each
+ // other at a vertex
+ "POLYGON((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10))",
+ "POLYGON((5 15,5 30,30 15,5 15))"
+ };
+
+static std::string case_96[2] =
+ {
+ "POLYGON((0 0,0 40,40 40,40 0,20 0,0 0),(10 10,20 0,30 10,30 30,10 30,10 10))",
+ "POLYGON((10 10,10 30,30 30,30 10,10 10))"
+ };
+
+static std::string case_97[2] =
+ {
+ "POLYGON((0 5,-6 -17,12 17,0 5),(4 6,5 5,0 1,4 6))",
+ "POLYGON((3 9,-15 -5,13 -11,3 9))"
+ };
+
+static std::string case_98[2] =
+ {
+ "POLYGON((5 6,-15 -13,1 -8,5 6))",
+ "POLYGON((0 8,-19 6,18 -17,20 8,11 17,0 8),(3 2,3 -1,1 0,3 2),(1 3,4 4,0 -1,1 3))"
+ };
+
+static std::string case_99[2] =
+ {
+ "POLYGON((0 0,0 40,40 40,40 0,0 0),(10 10,20 19,20 20,10 10),(20 20,30 30,20 21,20 20))",
+ "POLYGON((10 10,10 30,30 30,30 10,10 10))"
+ };
+
+static std::string case_100[2] =
+ {
+ "POLYGON((2 1,4 1,4 3,2 3,2 1),(3 1.5,4 3,2.5 2.5,3 1.5))",
+ "POLYGON((4 0,8 0,8 4,4 4,4 0))"
+ };
+
+static std::string case_101[2] =
+{
+ // Smaller adapted version of case_recursive_boxes_34, with only one cluster
+ "POLYGON((0 1,0 5,5 5,5 1,0 1))",
+ "POLYGON((3 6,4 5,5 4,3 2,1 4,3 6),(4 5,3 4,3.5 3.5,4 4,4 5))"
+};
+
+static std::string case_102[2] =
+{
+ // Smaller adapted version of case_recursive_boxes_34, with only one cluster
+ "POLYGON((1.25 3.75,1.25 5,5 5,5 3.75,1.25 3.75))",
+ "POLYGON((3 6,4 5,5 4,3 2,1 4,3 6),(4 5,3 4,3.5 3.5,4 4,4 5))"
+};
+
+static std::string case_103[2] =
+{
+ // intersection
+ // all points of [1] the same as some points of [0]
+ "POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ "POLYGON((0 0,0 1,1 0,0 0))"
+};
+
+static std::string case_104[2] =
+{
+ // union in hole
+ // all points of [1] the same as some points of [0]
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1))"
+};
+
+static const std::string case_105[2] =
+{
+ // Multiple touching interiors
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,7 3,7 7,3 7,3 3))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(1 5,2 4,3 5,2 6,1 5),(4 2,5 1,6 2,5 3,4 2),(4 8,5 7,6 8,5 9,4 8),(7 5,8 4,9 5,8 6,7 5))"
+};
+
+static const std::string case_106[2] =
+{
+ // Smaller adapted version of case_126_multi
+ "POLYGON((5 5,5 10,10 10,10 5,5 5),(9 8,7 9,5 8,7 7,9 8))",
+ "POLYGON((0 3,6 3,6 9,0 9,0 3))"
+};
+
+static const std::string case_107[2] =
+{
+ // Same but with hole in second polygon too
+ "POLYGON((5 5,5 10,10 10,10 5,5 5),(9 8,7 9,5 8,7 7,9 8))",
+ "POLYGON((0 3,6 3,6 9,0 9,0 3),(2 6,4 7,6 6,4 5,2 6))"
+};
+
+static const std::string case_108[2] =
+{
+ "POLYGON((0 1,0 2,1 2,1 3,2 3,2 2,3 2,3 1,2 1,2 0,1 0,1 1,0 1))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))"
+};
+
+static std::string case_many_situations[2] = {
+ "POLYGON((2 6,2 14,10 18,18 14,18 6,16 5,14 4,12 3,10 2,8 3,6 4,4 5,2 6))",
+ "POLYGON((2 6,2 7,2 8,2 9,2 10,2 11,2 12,1 14"
+ ",4 14,4 15,7 15,7 18,8 17,9 20,10 18"
+ ",10 15.5,11 17.5,12 17,11 15,12 14.5,13 16.5,14 18.5,15 18,14 16,15 15.5,16 17.5,18 14"
+ ",19 13,17 11,19 9,19 7"
+ ",17 5,16 5,15 4.5,13 3.5,11 2.5,10 2"
+ ",8 3,6 4,4 5,2 6))" };
+
+static std::string collinear_overlaps[2] = {
+ "POLYGON((0 2,0 4,2 4,2 5,0 5,0 7,2 7,2 8,6 8,6 7,8 7,8 5,6 5,6 4,8 4,8 2,6 2,6 1,2 1,2 2,0 2))",
+ "POLYGON((3 0,3 2,1 2,1 3,3 3,3 4,1 4,1 5,3 5,3 6,1 6,1 7,3 7,3 9,5 9,5 7,7 7,7 6,5 6,5 5,7 5,7 4,5 4,5 3,7 3,7 2,5 2,5 0,3 0))" };
+
+static std::string simplex_spike[2] = {
+ "POLYGON((0 1,2 5,5 3,0 1))",
+ "POLYGON((4 0,0 3,4 5,4 2,6 5,4 2,4 0))" };
+
+static std::string line_line1[2] = {
+ "LINESTRING(0 1,2 5,5 3)", "LINESTRING(3 0,0 3,4 5)"};
+
+
+
+// Pies
+static std::string pie_23_16_16[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,1527 3472,1812 3690,2500 2500))",
+ "POLYGON((2500 2500,1525 1937,1413 2208,1375 2499,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2499 3625,2791 3586,3062 3474,3295 3295,3474 3062,3586 2791,3625 2500,3586 2208,2500 2500))"
+ };
+
+static std::string pie_16_4_12[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,2500 2500))",
+ "POLYGON((2500 2500,2500 1375,2208 1413,1937 1525,1704 1704,2500 2500))"
+ };
+
+static std::string pie_4_13_15[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,2500 2500))",
+ "POLYGON((2500 2500,1704 1704,1525 1937,1413 2208,1375 2499,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2499 3625,2791 3586,3062 3474,3295 3295,2500 2500))"
+ };
+
+static std::string pie_16_2_15_0[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,2500 2500))",
+ "POLYGON((2500 2500,1704 1704,1525 1937,2500 2500))"
+ };
+
+static std::string pie_2_3_23_0[2] =
+{
+ "POLYGON((2500 2500,2855 3828,2500 3875,2500 2500))",
+ "POLYGON((2500 2500,2791 3586,2499 3625,2208 3586,2500 2500))"
+};
+
+// Shifted pies
+static std::string pie_20_20_7_100[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,2500 2500))",
+ "POLYGON((2500 2600,3586 2308,3474 2037,3295 1804,3062 1625,2791 1513,2499 1475,2208 1513,1937 1625,1704 1804,1525 2037,1413 2308,1375 2600,1413 2891,1525 3162,1704 3395,1937 3574,2208 3686,2499 3725,2791 3686,3062 3574,2500 2600))"
+ };
+
+static std::string pie_23_23_3_2000[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,1527 3472,1812 3690,2500 2500))",
+ "POLYGON((2500 3500,3295 4295,3474 4062,3586 3791,3625 3500,3586 3208,3474 2937,3295 2704,3062 2525,2791 2413,2499 2375,2208 2413,1937 2525,1704 2704,1525 2937,1413 3208,1375 3500,1413 3791,1525 4062,1704 4295,1937 4474,2208 4586,2499 4625,2791 4586,2500 3500))"
+ };
+
+static std::string pie_23_21_12_500[2] = {
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,1527 3472,1812 3690,2500 2500))",
+ "POLYGON((2500 3000,2500 1875,2208 1913,1937 2025,1704 2204,1525 2437,1413 2708,1375 3000,1413 3291,1525 3562,1704 3795,1937 3974,2208 4086,2499 4125,2791 4086,3062 3974,3295 3795,3474 3562,3586 3291,3625 3000,3586 2708,3474 2437,2500 3000))"
+ };
+
+// Self-tangent pies (but as single-polygon, this one is NOT VALID and (therefore) (currently) NOT WORKING)
+static std::string pie_5_12_12_0_7s[2] =
+{
+ "POLYGON((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,2500 2500))",
+ "POLYGON((2500 2500,2500 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2500 2500,2791 3586,3062 3474,3295 3295,3474 3062,3586 2791,3625 2500,3586 2208,2500 2500))"
+};
+
+
+// Cases coming from High volume (hv) tests
+static std::string hv_1[2] = {
+ "POLYGON((24.995166778564453 50.011310577392578,46.630809783935547 37.494682312011719,46.661380767822266 12.499360084533691,25.003841400146484 0.020658308640122414,3.3419711589813232 12.491842269897461,3.3638687133789062 37.487174987792969,24.995166778564453 50.011310577392578))",
+ "POLYGON((25.025228500366211 49.992599487304688,46.6719970703125 37.482185363769531,46.631874084472656 12.480358123779297,24.974153518676758 -0.011088892817497253,3.3419976234436035 12.524576187133789,3.3529467582702637 37.526435852050781,25.025228500366211 49.992599487304688))"
+ };
+
+static std::string hv_2[2] = {
+ "POLYGON((24.988700866699219 49.986705780029297,46.643772125244141 37.5079345703125,46.645118713378906 12.514699935913086,25.010652542114258 0.00024537215358577669,3.3652000427246094 12.495694160461426,3.3445985317230225 37.488922119140625,24.988700866699219 49.986705780029297))",
+ "POLYGON((24.993022918701172 49.977996826171875,46.643772125244141 37.503200531005859,46.634654998779297 12.51569938659668,25.005790710449219 0.0029967525042593479,3.3705389499664307 12.504646301269531,3.348651647567749 37.492141723632812,24.993022918701172 49.977996826171875))"
+ };
+
+static std::string hv_3[2] = {
+ "POLYGON((25.007728576660156 49.988899230957031,46.667163848876953 37.501667022705078,46.637229919433594 12.500443458557129,24.993251800537109 -0.01356174610555172,3.3565254211425781 12.512973785400391,3.3410670757293701 37.514209747314453,25.007728576660156 49.988899230957031))",
+ "POLYGON((24.998353958129883 49.993511199951172,46.659591674804688 37.507373809814453,46.646518707275391 12.505118370056152,25.002584457397461 -0.0109936548396945,3.3565335273742676 12.501456260681152,3.3392288684844971 37.503707885742188,24.998353958129883 49.993511199951172))"
+ };
+
+static std::string hv_4[2] = {
+ "POLYGON((25.009130477905273 50.022209167480469,46.670387268066406 37.500617980957031,46.666873931884766 12.480625152587891,24.992231369018555 -0.017777863889932632,3.3260366916656494 12.495262145996094,3.3394229412078857 37.515254974365234,25.009130477905273 50.022209167480469))",
+ "POLYGON((25.00263786315918 50.019630432128906,46.669231414794922 37.507579803466797,46.666202545166016 12.487733840942383,24.997152328491211 -0.020060751587152481,3.3308455944061279 12.492485046386719,3.3333024978637695 37.5123291015625,25.00263786315918 50.019630432128906))"
+ };
+
+static std::string hv_5[2] = {
+ "POLYGON((24.987522125244141 49.997768402099609,46.643741607666016 37.509471893310547,46.654956817626953 12.510490417480469,25.011669158935547 -0.00019846600480377674,3.3563058376312256 12.489578247070313,3.3433761596679687 37.488559722900391,24.987522125244141 49.997768402099609))",
+ "POLYGON((25.005760192871094 50.008182525634766,46.648590087890625 37.491542816162109,46.655918121337891 12.489977836608887,24.994773864746094 0.0050580352544784546,3.3391191959381104 12.499494552612305,3.3574333190917969 37.501052856445312,25.005760192871094 50.008182525634766))"
+ };
+
+static std::string hv_6[2] = {
+ "POLYGON((25.011470794677734 50.017532348632813,42.678981781005859 42.661365509033203,50.017532348632813 24.986530303955078,42.661365509033203 7.3190178871154785,24.986530303955078 -0.019533095881342888,7.3190178871154785 7.336634635925293,-0.019533095881342888 25.011470794677734,7.336634635925293 42.678981781005859,25.011470794677734 50.017532348632813))",
+ "POLYGON((25.002880096435547 50.013965606689453,46.671913146972656 37.507381439208984,46.660655975341797 12.488155364990234,24.9951171875 -0.024483053013682365,3.3334629535675049 12.494877815246582,3.3299689292907715 37.514102935791016,25.002880096435547 50.013965606689453))"
+ };
+
+static std::string hv_7[2] = {
+ "POLYGON((24.983684539794922 49.995647430419922,46.643482208251953 37.513137817382813,46.654392242431641 12.51393985748291,25.014318466186523 -0.0027416276279836893,3.3589246273040771 12.487411499023438,3.3391971588134766 37.486602783203125,24.983684539794922 49.995647430419922))",
+ "POLYGON((24.990163803100586 49.9993896484375,46.655281066894531 37.512466430664062,46.654388427734375 12.506458282470703,25.007841110229492 -0.012621366418898106,3.3524465560913086 12.491152763366699,3.3338801860809326 37.497154235839844,24.990163803100586 49.9993896484375))"
+ };
+
+static std::string dz_1[2] = {
+ "POLYGON((30.526203155517578 56.781166076660156,38.987510681152344 58.710700988769531,41.042613983154297 50.279010772705078,48.390048980712891 45.660350799560547,43.881126403808594 38.245067596435547,45.810657501220703 29.783760070800781,37.378971099853516 27.728654861450195,32.760307312011719 20.381219863891602,25.345026016235352 24.890144348144531,16.883718490600586 22.960611343383789,14.828612327575684 31.392299652099609,7.481177806854248 36.010959625244141,11.990103721618652 43.426242828369141,10.060568809509277 51.887550354003906,18.492258071899414 53.942657470703125,23.110919952392578 61.290092468261719,30.526203155517578 56.781166076660156))",
+ "POLYGON((12.580197334289551 33.274467468261719,14.852641105651855 24.577714920043945,21.524574279785156 30.601236343383789,18.734457015991211 22.056488037109375,27.603805541992188 23.51667594909668,20.636968612670898 17.836828231811523,28.887777328491211 14.270085334777832,19.956142425537109 13.258448600769043,24.968837738037109 5.7971897125244141,16.908138275146484 9.7749528884887695,17.091224670410156 0.78807485103607178,12.460672378540039 8.4923257827758789,7.7560214996337891 0.83309894800186157,8.0257854461669922 9.8177928924560547,-0.072908863425254822 5.9179673194885254,5.0115232467651367 13.330527305603027,-3.9099369049072266 14.42827033996582,4.3748917579650879 17.915260314941406,-2.5368332862854004 23.662046432495117,6.3180174827575684 22.116373062133789,3.6104514598846436 30.687637329101563,10.223971366882324 24.600040435791016,12.580197334289551 33.274467468261719))"
+ };
+
+static std::string dz_2[2] = {
+ "POLYGON((24.587966918945313 61.027225494384766,32.1783447265625 62.988296508789063,34.655326843261719 55.550270080566406,41.730445861816406 52.173538208007812,38.846851348876953 44.883510589599609,42.096187591552734 37.748981475830078,35.201282501220703 34.018035888671875,33.104434967041016 26.46403694152832,25.42442512512207 28.037921905517578,18.962528228759766 23.599054336547852,14.090974807739258 29.741334915161133,6.2876262664794922 30.494592666625977,6.5039811134338379 38.331226348876953,1.0104535818099976 43.924152374267578,6.2134823799133301 49.788291931152344,5.6002583503723145 57.603889465332031,13.355405807495117 58.751640319824219,17.909420013427734 65.132911682128906,24.587966918945313 61.027225494384766))",
+ "POLYGON((43.551433563232422 47.905071258544922,46.384872436523438 39.57366943359375,53.589195251464844 44.627212524414063,50.984420776367188 36.221515655517578,59.783241271972656 36.075325012207031,52.735191345214844 30.806018829345703,59.767654418945313 25.51593017578125,50.968441009521484 25.395713806152344,53.548389434814453 16.982362747192383,46.359016418457031 22.057153701782227,43.500991821289063 13.734155654907227,40.667552947998047 22.065553665161133,33.463230133056641 17.012012481689453,36.068000793457031 25.417709350585938,27.269184112548828 25.563901901245117,34.317234039306641 30.833206176757812,27.284770965576172 36.123294830322266,36.083980560302734 36.243511199951172,33.504035949707031 44.6568603515625,40.693408966064453 39.582073211669922,43.551433563232422 47.905071258544922))"
+ };
+
+static std::string dz_3[2] = {
+ "POLYGON((20.813335418701172 73.060707092285156,22.815366744995117 61.968788146972656,31.383756637573242 69.291458129882813,28.001794815063477 58.539661407470703,38.991741180419922 61.041633605957031,31.000555038452148 53.093067169189453,41.894393920898437 50.201171875,31.124666213989258 46.876754760742188,39.426750183105469 39.253490447998047,28.345697402954102 41.314804077148438,32.154121398925781 30.706569671630859,23.300275802612305 37.681396484375,21.742572784423828 26.518407821655273,17.144247055053711 36.808895111083984,10.5772705078125 27.648460388183594,11.287883758544922 38.897186279296875,1.2160475254058838 33.837848663330078,7.0728073120117187 43.467861175537109,-4.1965517997741699 43.668655395507812,5.4646410942077637 49.473834991455078,-4.4205660820007324 54.888763427734375,6.8317971229553223 55.539215087890625,0.59532338380813599 64.927780151367187,10.861076354980469 60.274494171142578,9.7020368576049805 71.485885620117188,16.629419326782227 62.594875335693359,20.813335418701172 73.060707092285156))",
+ "POLYGON((1.6459450721740723 46.720386505126953,10.693820953369141 61.892372131347656,7.2385158538818359 44.568569183349609,23.921955108642578 50.3751220703125,10.139513969421387 39.325347900390625,26.652151107788086 33.049518585205078,8.9915294647216797 33.444084167480469,17.606916427612305 18.02239990234375,4.3317174911499023 29.676681518554687,1.0186206102371216 12.32512378692627,-1.6595441102981567 29.785955429077148,-15.35089111328125 18.623508453369141,-6.1788778305053711 33.720771789550781,-23.842140197753906 33.970470428466797,-7.1116366386413574 39.639987945556641,-20.481979370117188 51.184993743896484,-4.0213727951049805 44.773937225341797,-6.8426628112792969 62.212215423583984,1.6459450721740723 46.720386505126953))"
+ };
+
+static std::string dz_4[2] = {
+ "POLYGON((36.179050445556641 50.613166809082031,40.804176330566406 39.819438934326172,52.211421966552734 42.607097625732422,48.816398620605469 31.365650177001953,59.346733093261719 26.168684005737305,49.520126342773438 19.73951530456543,54.246284484863281 8.9896402359008789,42.586078643798828 10.381030082702637,39.296642303466797 -0.89176815748214722,31.258771896362305 7.6691346168518066,21.492900848388672 1.1480809450149536,20.83837890625 12.87275505065918,9.1656351089477539 14.154719352722168,16.200717926025391 23.557058334350586,8.0829076766967773 32.042194366455078,19.515800476074219 34.722743988037109,18.751338958740234 46.440761566162109,29.232465744018555 41.145256042480469,36.179050445556641 50.613166809082031))",
+ "POLYGON((20.486696243286133 60.650150299072266,24.282432556152344 49.304500579833984,34.362251281738281 55.748767852783203,30.764263153076172 44.3388671875,42.706855773925781 43.627620697021484,33.089447021484375 36.511661529541016,42.333145141601563 28.916570663452148,30.369846343994141 28.81260871887207,33.383872985839844 17.234743118286133,23.644252777099609 24.182485580444336,19.277351379394531 13.044195175170898,15.48161506652832 24.389842987060547,5.40179443359375 17.945577621459961,8.9997835159301758 29.355476379394531,-2.9428071975708008 30.06672477722168,6.6745977401733398 37.182682037353516,-2.5690991878509521 44.777774810791016,9.394200325012207 44.881736755371094,6.3801741600036621 56.459602355957031,16.119794845581055 49.511859893798828,20.486696243286133 60.650150299072266))"
+ };
+
+static std::string case_precision_1[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4.000005 2.99999,2 3,2 7))"
+};
+
+static std::string case_precision_2[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 2.999995,2 3,2 7))"
+};
+
+static std::string case_precision_3[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4.0000001 2.99999995,2 3,2 7))"
+};
+
+static std::string case_precision_4[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3.00000001,2 3,2 7))"
+};
+
+static std::string case_precision_5[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3,2.0000005 2.9999995,2 7))"
+};
+
+static std::string case_precision_6[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,2 8,2 7,2 3,4.0000005 2.9999995,4 7,4 8,8 8,8 -1,-1 -1))"
+};
+
+static std::string case_precision_7[2] =
+{
+ // Needs larger margin for sectionalize (long double only)
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3.00000002,2 3,2 7))"
+};
+
+static std::string case_precision_8[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4.00000006 3.00000009,4 7,2 7))"
+};
+
+static std::string case_precision_9[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,3.99999 2.999995,4 7,2 7))"
+};
+
+static std::string case_precision_10[2] =
+{
+ // Needs 1.0e-5 for threshold in double
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4.000006 2.999991,4 7,2 7))"
+};
+
+static std::string case_precision_11[2] =
+{
+ // Needs ~0.5 for threshold in side_by_generic_form
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4.00000000000000089 2.99999999999999201,4 7,2 7))"
+};
+
+static std::string case_precision_12[2] =
+{
+ // Needs threshold for threshold a2
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((1 1,2.99999999999999731e-12 1.00000000001,2.99999999999999731e-12 3.00000000001,1 3,1 1))"
+};
+
+static std::string case_precision_13[2] =
+{
+ // Needs threshold for threshold a2
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((1 1,9.99999999999999912e-06 1,9.99999999999999912e-06 3,1 3,1 1))"
+};
+
+static std::string case_precision_14[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4.00000079999999958 3.00000020000000012,2 3,2 7))"
+};
+
+static std::string case_precision_15[2] =
+{
+ // Needs handling of side_value
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,3.99999599999999988 3.00000499999999981,4 7,2 7))"
+};
+
+static std::string case_precision_16[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4 2.99999940000000009,4 7,2 7))"
+};
+
+static std::string case_precision_17[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4 3.00000499999999999,4 7,2 7))"
+};
+
+static std::string case_precision_18[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2.00000199999999984 3.00000400000000012,4 3,4 7,2 7))"
+};
+
+static std::string case_precision_19[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,1.99999199999999999 2.99999400000000005,4 3,4 7,2 7))"
+};
+
+static std::string case_precision_20[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3,2.00000000000000044 3,2 7))"
+};
+
+static std::string case_precision_21[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3.00001000000000007,2 3,2 7))"
+};
+
+static std::string case_precision_22[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4.00000000200000017 2.99999999000000006,4 7,2 7))"
+};
+
+static std::string case_precision_23[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,3.99998999999999993 2.99998999999999993,4 7,2 7))"
+};
+
+static std::string case_precision_24[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3.000001,2 3,2 7))"
+};
+
+static std::string case_precision_25[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((2 7,4 7,4 3.00001,2 3,2 7))"
+};
+
+static std::string case_precision_26[2] =
+{
+ "POLYGON((0 0,0 4,2 4,2 3,4 3,4 0,0 0))",
+ "POLYGON((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,3.999991 2.999991,4 7,2 7))"
+};
+
+
+// ticket_17 is keyholed, so has a hole formed by an deliberate intersection
+// This will fail the intersection/traversal process
+static std::string ticket_17[2] = {
+ "POLYGON ((-122.28139163 37.37319149,-122.28100699 37.37273669,-122.28002186 37.37303123,-122.27979681 37.37290072,-122.28007349 37.37240493,-122.27977334 37.37220360,-122.27819720 37.37288580,-122.27714184 37.37275161,-122.27678628 37.37253167,-122.27766437 37.37180973,-122.27804382 37.37121453,-122.27687664 37.37101354,-122.27645829 37.37203386,-122.27604423 37.37249110,-122.27632234 37.37343339,-122.27760980 37.37391082,-122.27812478 37.37800320,-122.26117222 37.39121007,-122.25572289 37.39566631,-122.25547269 37.39564971,-122.25366304 37.39552993,-122.24919976 37.39580268,-122.24417933 37.39366907,-122.24051443 37.39094143,-122.23246277 37.38100418,-122.23606766 37.38141338,-122.24001587 37.37738940,-122.23666848 37.37609347,-122.23057450 37.37882170,-122.22679803 37.37807143,-122.22525727 37.37448817,-122.22523229 37.37443000,-122.23083199 37.37609347,-122.23033486 37.37777891,-122.23169030 37.37732117,-122.23229178 37.37709687,-122.23237761 37.37631249,-122.23297776 37.37438834,-122.23872850 37.37165986,-122.24044511 37.36934068,-122.24671067 37.36865847,-122.24825570 37.36981819,-122.25151719 37.36947713,-122.25357721 37.36756706,-122.26001451 37.36579354,-122.25615213 37.36545239,-122.25486458 37.36245083,-122.25357721 37.36108651,-122.25194642 37.36013139,-122.24885652 37.35958557,-122.24911401 37.35849399,-122.25357721 37.35808470,-122.25675286 37.35897159,-122.25855539 37.35753887,-122.26181687 37.35828939,-122.26713837 37.35897159,-122.26782510 37.36108651,-122.26662339 37.36456559,-122.27288911 37.36722601,-122.27366159 37.36531602,-122.27168740 37.36470213,-122.27391900 37.36374701,-122.27074326 37.36245083,-122.27134408 37.35951742,-122.27426240 37.36135926,-122.27709482 37.36115474,-122.27966974 37.36231438,-122.27958391 37.36463382,-122.27572152 37.36463382,-122.27563569 37.36524779,-122.27700899 37.36593000,-122.27709482 37.36763529,-122.27554978 37.36838573,-122.27667254 37.36931478,-122.27677932 37.36932073,-122.27769362 37.36853987,-122.27942490 37.36830803,-122.28178776 37.36677917,-122.28509559 37.36443500,-122.28845129 37.36413744,-122.29194403 37.36695946,-122.29382577 37.36726817,-122.29600414 37.36898512,-122.29733083 37.36995398,-122.29593239 37.37141436,-122.29416649 37.37075898,-122.29325026 37.37108436,-122.29652910 37.37311697,-122.29584237 37.37374461,-122.29537583 37.37573372,-122.29487677 37.37752502,-122.30923212 37.37593011,-122.31122484 37.38230086,-122.31467994 37.38092472,-122.31715663 37.38252181,-122.32307970 37.38166978,-122.31985618 37.37667694,-122.32210304 37.37580220,-122.32581446 37.37589532,-122.32401730 37.37331839,-122.32960417 37.37189020,-122.33465527 37.37331906,-122.33425328 37.37623680,-122.33620676 37.37726132,-122.33397986 37.37822382,-122.33358918 37.38036590,-122.33202637 37.37986918,-122.33147954 37.38101784,-122.33394080 37.38198017,-122.33545239 37.38587943,-122.33478058 37.38785697,-122.33386050 37.38723721,-122.33350041 37.38571137,-122.33122003 37.38548891,-122.33140008 37.38650606,-122.33366042 37.38817490,-122.33244019 37.39157602,-122.33298157 37.39419201,-122.33164013 37.39477028,-122.33202017 37.39518351,-122.33358038 37.39499282,-122.33376050 37.39597811,-122.33550067 37.39734478,-122.33556069 37.39481797,-122.33344040 37.39292676,-122.33638094 37.38892189,-122.34240644 37.38852719,-122.34906293 37.38726898,-122.35072321 37.39338769,-122.34910291 37.39445252,-122.34796272 37.39410291,-122.34449043 37.39640534,-122.34500223 37.39729709,-122.34936291 37.39670910,-122.35098322 37.39531066,-122.35364623 37.39554510,-122.35434369 37.39612111,-122.35798429 37.39600988,-122.35768430 37.39478621,-122.36334519 37.39206871,-122.36604726 37.39203267,-122.36778592 37.39335592,-122.36518870 37.40022011,-122.36554552 37.40247752,-122.36370519 37.40331974,-122.36270506 37.40530591,-122.36320512 37.40670418,-122.36149849 37.40851392,-122.36730580 37.41054938,-122.37263720 37.41378932,-122.37161871 37.42076600,-122.36566153 37.42006292,-122.36520547 37.42742106,-122.37165953 37.43661157,-122.35943972 37.44459022,-122.35356359 37.44600810,-122.33792254 37.45796329,-122.35228518 37.47478091,-122.35127080 37.48181199,-122.34867342 37.48487322,-122.34359717 37.48801082,-122.33388431 37.48677650,-122.33142321 37.48429747,-122.32929580 37.48473149,-122.32609609 37.48291144,-122.32344850 37.48228229,-122.31924364 37.48410234,-122.31677299 37.48114051,-122.31431751 37.47848973,-122.31259201 37.47682190,-122.31515972 37.47568196,-122.31691389 37.47360309,-122.31292494 37.46960081,-122.31130153 37.46937743,-122.30889894 37.47124987,-122.30612839 37.47011613,-122.30149630 37.46568378,-122.30064277 37.46363784,-122.29283821 37.45922376,-122.28630141 37.45415497,-122.28883099 37.44629920,-122.28316717 37.44197138,-122.27554148 37.42297597,-122.25597410 37.40553692,-122.25196579 37.40129593,-122.25012043 37.40049143,-122.24823207 37.39897758,-122.24754551 37.39740941,-122.24778582 37.39621607,-122.24934787 37.39599102,-122.25005170 37.39871849,-122.25222328 37.39863668,-122.25342491 37.39737529,-122.25520162 37.39667289,-122.25528737 37.39522726,-122.27747460 37.37809616,-122.27977493 37.37858717,-122.28157729 37.37920106,-122.28322534 37.37952846,-122.28416939 37.38092656,-122.28621223 37.37984219,-122.28638389 37.37613857,-122.28382607 37.37843722,-122.27930278 37.37718220,-122.28196361 37.37652740,-122.28295058 37.37568167,-122.28216101 37.37523148,-122.28114822 37.37543608,-122.27934569 37.37528613,-122.27996369 37.37448121,-122.28104521 37.37454944,-122.28185197 37.37422883,-122.28290767 37.37474038,-122.28376597 37.37467224,-122.28428104 37.37399012,-122.28402346 37.37338989,-122.28610922 37.37364914,-122.28651264 37.37327388,-122.28672722 37.37207343,-122.28628398 37.37205448,-122.28574460 37.37166682,-122.28479711 37.37200981,-122.28327731 37.37137228,-122.28285511 37.37100700,-122.28279409 37.37125669,-122.28315527 37.37173756,-122.28321872 37.37220569,-122.28187007 37.37231918,-122.28193109 37.37294908,-122.28139163 37.37319149))",
+ "BOX(-122.280 37.377,-122.277 37.379)"};
+
+static std::string snl_1[2] = {
+ "POLYGON((184913.4512 606985.7794,184912.9 606987.146,184904.4135 606987.6514,184901.8476 607014.5934,184916.3978 607021.0602,184927.7148 607008.1264,184926.0981 606998.4262,184913.4512 606985.7794),(184907.556 607013.301,184905.782 607009.972,184906.004 607005.978,184908.444 606998.877,184912.215 606994.218,184919.314 606993.996,184922.42 606995.771,184925.747 606998.877,184926.413 607002.872,184925.747 607007.753,184922.42 607012.191,184917.096 607015.298,184911.771 607015.298,184907.556 607013.301))",
+ "POLYGON((184861.118 606901.158,184893.787 606898.483,184925.043 606913.4,184927.174 606951.759,184912.9 606987.146,184877.87 606989.232,184885.103 607023.774,184899.058 607022.743,184906.008 607044.948,184966.465 607025.02,184968.442 606961.3,185024.768 606947.402,185024.544 606941.355,185027.007 606937.323,185030.366 606934.187,185035.516 606933.963,185040.442 606935.531,185042.905 606939.115,185088.364 606931.385,185089.139 607015.509,185095.2 607011.3,185118.827 606995.545,185126.813 606991.995,185177.727 606973.799,185181.482 606966.676,185193.571 606977.795,185193.711 606960.3,185189.352 606779.02,185167.515 606783.844,185086.96 606801.241,185011.707 606817.809,185000 606819.304,184994.034 606819.794,184976.398 606819.572,184956.654 606817.131,184934.913 606813.137,184893.097 606804.927,184884.445 606831.555,184866.919 606883.481,184861.118 606901.158),(184907.556 607013.301,184905.782 607009.972,184906.004 607005.978,184908.444 606998.877,184912.215 606994.218,184919.314 606993.996,184922.42 606995.771,184925.747 606998.877,184926.413 607002.872,184925.747 607007.753,184922.42 607012.191,184917.096 607015.298,184911.771 607015.298,184907.556 607013.301))"};
+
+
+// Isovist (submitted by Brandon during Formal Review)
+static std::string isovist[2] =
+ {
+ "POLYGON((37.29449462890625 1.7902572154998779, 46.296027072709599 -2.4984308554828116, 45.389434814453125 -4.5143837928771973, 47.585065917176543 -6.1314922196594779, 46.523914387974358 -8.5152102535033496, 42.699958801269531 -4.4278755187988281, 42.577877044677734 -4.4900407791137695, 42.577911376953125 -4.4901103973388672, 40.758884429931641 -5.418975830078125, 40.6978759765625 -5.4500408172607422, 41.590042114257813 -7.2021245956420898, 57.297810222148939 -37.546793343968417, 50.974888957147442 -30.277285722290763, 37.140213012695313 1.3446992635726929, 37.000419616699219 1.664225697517395, 37.29449462890625 1.7902572154998779))",
+ "POLYGON((43.644271850585938 0.96149998903274536,43.764598846435547 0.93951499462127686,49.071769542946825 0.61489892713413252,48.43512638981781 -0.81299959072453376,47.830955505371094 -0.69758313894271851,47.263670054709685 -1.784876824891044,46.695858001708984 -1.6093428134918213,45.389434814453125 -4.5143837928771973,47.604561877161387 -6.087697464505224,46.559533858616469 -8.435196445683264,42.699958801269531 -4.4278755187988281,42.577877044677734 -4.4900407791137695,42.577911376953125 -4.4901103973388672,40.758884429931641 -5.418975830078125,40.6978759765625 -5.4500408172607422,41.590042114257813 -7.2021245956420898,57.524304765518266 -37.807195733984784,41.988733475572282 -19.945838749437218,41.821544647216797 -19.211688995361328,40.800632476806641 -17.208097457885742,39.966808319091797 -17.625011444091797,38.823680877685547 -16.296066284179688,37.326129913330078 -17.190576553344727,35.963497161865234 -15.476018905639648,35.656356811523438 -15.66030216217041,34.931102752685547 -16.223842620849609,34.634240447128811 -15.85007183479255,34.886280059814453 -14.120697975158691,34.658355712890625 -13.81736946105957,34.328716278076172 -13.992490768432617,33.598796844482422 -14.546377182006836,33.164891643669634 -14.000060288415174,33.566280364990234 -12.450697898864746,33.339523315429688 -12.147735595703125,32.998821258544922 -12.323249816894531,32.274600982666016 -12.879127502441406,31.682494778186321 -12.133624901803865,32.226280212402344 -10.790698051452637,32.000633239746094 -10.488097190856934,31.669155120849609 -10.653837203979492,30.947774887084961 -11.208560943603516,30.207040612748258 -10.275926149505661,30.896280288696289 -9.1206979751586914,30.670633316040039 -8.8180980682373047,30.339155197143555 -8.9838371276855469,29.619997024536133 -9.5368013381958008,29.135100397190627 -8.9262827849488211,32.718830108642578 -4.3281683921813965,32.708168029785156 -2.3611698150634766,32.708126068115234 -2.3611700534820557,32.708126068115234 -2.3611266613006592,30.501169204711914 -2.3718316555023193,27.069889344709196 -4.2926591211028242,26.472516656201325 -3.5380830513658776,36.954700469970703 1.2597870826721191,37.140213012695313 1.3446992635726929,37.000419616699219 1.664225697517395,37.29449462890625 1.7902572154998779,37.43402099609375 1.470055103302002,51.370888500897557 7.4163459734570729,51.20102152843122 7.1738039562841562,42.721500396728516 3.6584999561309814,42.721500396728516 2.2342472076416016,42.399410247802734 1.4956772327423096,43.644271850585938 0.96149998903274536))"
+ };
+
+static std::string ggl_list_20110306_javier[2] =
+ {
+ "POLYGON((-2 2,2002 2,2002 -2002,-2 -2002,-2 2),(0 -147.00000000000003,0 -2000,2000 -2000,2000 0,104 0,440 -240,400 -280,0 -147.00000000000003))",
+ "POLYGON((359.99000000000001 -280,0 -182,0 -147,400.00999999999999 -280,359.99000000000001 -280))"
+ };
+
+static std::string ggl_list_20110307_javier[2] =
+ {
+ "POLYGON((-2 2, 1842 2, 1842 -2362, -2 -2362, -2 2), (0 0, 0 -2360, 1840 -2360, 1840 0, 0 0))",
+ // "POLYGON((-0.01 -1960, 0 -1960, 0 -1880, 0.01 -1960, -0.01 -1960))"
+ "POLYGON ((-0.01 -1960, 80.01 -1960, 0 -1880, -0.01 -1960))"
+ };
+
+
+static std::string ggl_list_20110627_phillip[2] =
+ {
+ "POLYGON((537.99678544791459 124.30517362077681,437.36539413622404 142.02728895075373,456.33031803043468 249.50296671450121,556.96217263181723 231.78347688272990,537.99678544791459 124.30517362077681))",
+ "POLYGON((437.35 142.03,461.94 281.32,564.5 263.26,539.9 123.97,437.35 142.03))"
+ };
+
+static std::string ggl_list_20110716_enrico[2] =
+ {
+ "POLYGON((1.83691e-014 -300,-259.808 -150,-259.808 150,-5.51073e-014 300,259.808 150,259.808 -150,9.18455e-014 -300,1.83691e-014 -300),(7.65379e-014 -250,216.506 -125,216.506 125,-4.59227e-014 250,-216.506 125,-216.506 -125,1.53076e-014 -250,7.65379e-014 -250))",
+ "POLYGON((1.83691e-014 -300,-259.808 -150,-216.506 -125,-216.506 125,-259.808 150,-5.51073e-014 300,-4.59227e-014 250,216.506 125,259.808 150,259.808 -150,216.506 -125,7.65379e-014 -250,9.18455e-014 -300,1.83691e-014 -300),(6.12303e-014 -200,173.205 -100,173.205 100,-3.67382e-014 200,-173.205 100,-173.205 -100,1.22461e-014 -200,6.12303e-014 -200))"
+ };
+
+
+// Send on ggl-list by Christoph/Angus at 2011-08-19/20
+// This polygon combination fails to union in <float> but do in <double> or <ttmath>
+// It had previosly an error which has been fixed at 2011-08-30
+static std::string ggl_list_20110820_christophe[2] =
+{
+ "POLYGON((17.763942722600319 32.23605727739968,19.192448808558737 30.807551191441263,16.000000000000000 30.000000000000000,17.763942722600319 32.236057277399681))",
+ "POLYGON((0.24806946917841693 26.015444246572663,31.751930530821582 33.984555753427337,32.248069469178418 30.015444246572663,0.24806946917841693 26.015444246572663))"
+};
+
+static std::string ggl_list_20131119_james[2] =
+{
+ "POLYGON((7 8,6.42705 6.23664,4.92705 5.14683,3.07295 5.14683,1.57295 6.23664,1 8,1.57295 9.76336,3.07295 10.8532,4.92705 10.8532,6.42705 9.76336,7 8))",
+ "POLYGON((4 4,4 8,12 8,12 4,4 4))"
+};
+
+static std::string ggl_list_20140223_shalabuda[2] =
+{
+ "POLYGON((-7.1621621621621605058294335322 43.228378378378366164724866394, -4.52438675915238786018335304107 30.5670564439314631499655661173, -4.16280147451538873326626344351 27.5407467090450168711868172977, -6.19047619047618891130468909978 36.7666666666666515084216371179, -7.1621621621621605058294335322 43.228378378378366164724866394))",
+ "POLYGON((-8.16216216216216139400785323232 49.8783783783783789544941100758, -3.16280147451538873326626344351 44.228378378378366164724866394, 1 -10.5499999999999971578290569596, -1 2.25, -8.16216216216216139400785323232 49.8783783783783789544941100758))",
+};
+
+
+static std::string ggl_list_20140321_7415963[2] =
+{
+ "POLYGON((-6.0 3.2500000000000013, -9.0 3.2500000000000022, -9.0 6.5, -6.0 6.5, -6.0 3.2500000000000013))",
+ "POLYGON((-3.0 0.0, -6.0 0.0, -6.0 3.2500000000000013, -3.0 3.2500000000000009, -3.0 0.0))",
+};
+
+// GEOS "TestOverlay" test.
+// Note that the first one WAS invalid and is made valid using SQL Server 2008 Spatial MakeValid() function
+static std::string geos_1[2] =
+ {
+ // Original: POLYGON((5417148.108 5658342.603,5417139.016 5658338.009,5417126.791 5658331.833,5417116.292 5658327.518,5417112.871 5658325.598,5417110.25 5658324.127,5417106.071 5658321.781,5417104.226 5658320.745,5417093.266 5658315.008,5417091.265 5658313.961,5417085.335 5658310.857,5417060.44 5658326.26,5417064.68 5658327.52,5417088.83 5658336.46,5417088.52 5658337.31,5417102.92 5658342.65,5417103.26 5658341.83,5417111.76 5658345.51,5417121.662 5658349.583,5417121.878 5658349.672,5417125.217 5658351.119,5417131.761 5658353.388,5417137.589 5658356.276,5417142.166 5658359.67,5417146.599 5658364.988,5417151.395 5658370.641,5417150.853 5658371.392,5417152.59741167 5658373.52811061,5417154.92 5658376.37,5417155.18955743 5658376.89699992,5417154.919 5658376.371,5417155.814 5658378.111,5417157.051 5658380.297,5417158.004 5658382.304,5417159.014 5658384.47,5417159.775 5658386.619,5417160.629 5658389.278,5417161.5 5658399.49,5417160.773 5658404.194,5417159.41 5658413.02,5417158.853 5658414.442,5417153.671 5658427.659,5417153.67051161 5658427.6586943,5417153.67 5658427.66,5417152.73 5658427.07,5417149.993 5658436.599,5417148.81 5658439.42,5417149.233 5658439.67,5417148.36 5658440.81,5417146.41 5658446.6,5417144.321 5658453.127,5417144.32092232 5658453.13043826,5417154.59 5658458.01,5417154.99551047 5658455.8409905,5417155.446 5658453.413,5417157.23981414 5658448.75748237,5417157.22660892 5658448.57861162,5417157.22660849 5658448.57860592,5417157.22660865 5658448.57860812,5417157.128 5658447.265,5417157.64950997 5658446.06368023,5417157.64950961 5658446.06368108,5417158.314 5658444.533,5417172.322 5658417.957,5417174.99 5658418.57,5417175.23 5658417.74,5417176.696 5658412.61,5417177.875 5658408.488,5417178.76 5658405.39,5417178.1 5658393.55,5417178.08 5658393.36,5417177.11 5658384.95,5417178.151 5658384.915,5417178.14836289 5658384.91508866,5417178.12 5658384.83,5417177.91415246 5658383.81114117,5417176.927 5658378.944,5417176.603 5658377.341,5417176.73975922 5658378.01762048,5417176.6 5658377.34,5417176.51210558 5658376.89535766,5417176.428 5658376.483,5417175.235 5658370.602,5417171.577 5658362.886,5417170.762 5658360.107,5417168.522 5658357.989,5417166.042 5658355.047,5417164.137 5658352.264,5417162.642 5658351.593,5417160.702 5658350.843,5417160.05417889 5658350.5823586,5417158.82 5658350.09,5417158.82103105 5658350.0862195,5417159.50373263 5658350.36089455,5417158.818 5658350.085,5417159.055 5658349.214,5417155.754 5658347.679,5417156.78066321 5658348.15640928,5417155.7525011 5658347.6811561,5417155.161 5658348.532,5417149.028 5658343.237,5417152.26877967 5658346.03496647,5417149.03 5658343.24,5417148.78133339 5658343.06701453,5417148.108 5658342.603))
+ "POLYGON((5417085.33499 5658310.85699,5417060.44 5658326.26001,5417064.67999 5658327.52002,5417088.82999 5658336.46002,5417088.51999 5658337.31,5417102.92001 5658342.65002,5417103.26001 5658341.83002,5417111.76001 5658345.51001,5417121.66199 5658349.58301,5417121.87799 5658349.672,5417125.21701 5658351.11902,5417131.76099 5658353.388,5417137.58899 5658356.276,5417142.16599 5658359.66998,5417146.599 5658364.98798,5417151.39499 5658370.64099,5417150.853 5658371.39203,5417152.59741 5658373.52814,5417154.92001 5658376.37,5417155.18806 5658376.89407,5417155.814 5658378.11102,5417157.05099 5658380.297,5417158.004 5658382.30402,5417159.01401 5658384.46997,5417159.77499 5658386.61902,5417160.629 5658389.27802,5417161.5 5658399.48999,5417160.77301 5658404.19397,5417159.41 5658413.02002,5417158.853 5658414.44202,5417153.67099 5658427.659,5417153.6705 5658427.65869,5417153.67001 5658427.65997,5417152.73001 5658427.07001,5417149.99301 5658436.599,5417148.81 5658439.41998,5417149.233 5658439.66998,5417148.35999 5658440.81,5417146.41 5658446.59998,5417144.32101 5658453.12701,5417144.32092 5658453.13043,5417154.59 5658458.01001,5417154.99551 5658455.841,5417155.44601 5658453.41302,5417157.23981 5658448.75751,5417157.22662 5658448.57861,5417157.12799 5658447.26501,5417157.64951 5658446.06366,5417158.314 5658444.53302,5417172.32199 5658417.95697,5417174.98999 5658418.57001,5417175.23001 5658417.73999,5417176.69601 5658412.60999,5417177.875 5658408.48798,5417178.76001 5658405.39001,5417178.10001 5658393.54999,5417178.07999 5658393.35999,5417177.10999 5658384.95001,5417178.14837 5658384.91507,5417178.12 5658384.83002,5417177.91415 5658383.81116,5417176.927 5658378.94397,5417176.603 5658377.341,5417176.73975 5658378.01764,5417176.60001 5658377.34003,5417176.51212 5658376.89539,5417176.42801 5658376.48297,5417175.23499 5658370.60199,5417171.577 5658362.88599,5417170.76199 5658360.10699,5417168.522 5658357.98901,5417166.04199 5658355.047,5417164.13699 5658352.26398,5417162.642 5658351.59302,5417160.702 5658350.84302,5417160.05417 5658350.58234,5417158.82001 5658350.09003,5417158.82104 5658350.08625,5417158.81799 5658350.08502,5417159.05499 5658349.21399,5417155.754 5658347.67902,5417156.78067 5658348.15643,5417155.7525 5658347.68115,5417155.16101 5658348.53198,5417149.02802 5658343.237,5417152.26877 5658346.03497,5417149.03 5658343.23999,5417148.78134 5658343.06702,5417148.108 5658342.60303,5417139.01599 5658338.00897,5417126.79099 5658331.83301,5417116.29199 5658327.51801,5417112.871 5658325.59802,5417110.25 5658324.12701,5417106.07101 5658321.78101,5417104.22601 5658320.745,5417093.26599 5658315.008,5417091.26501 5658313.961,5417085.33499 5658310.85699))",
+ "POLYGON((5417148.36 5658440.81,5417146.41 5658446.6,5417144.321 5658453.127,5417144.32092 5658453.13044,5417154.59 5658458.01,5417154.99551 5658455.84099,5417155.446 5658453.413,5417157.23981 5658448.75748,5417157.22661 5658448.57861,5417157.128 5658447.265,5417157.64951 5658446.06368,5417158.31 5658444.53,5417172.32 5658417.96,5417172.32037 5658417.96009,5417172.322 5658417.957,5417174.99 5658418.57,5417175.23 5658417.74,5417176.696 5658412.61,5417177.875 5658408.488,5417178.76 5658405.39,5417178.1 5658393.55,5417178.08 5658393.36,5417177.11 5658384.95,5417178.14836 5658384.91509,5417178.12 5658384.83,5417177.91415 5658383.81114,5417176.927 5658378.944,5417176.73976 5658378.01762,5417176.6 5658377.34,5417176.51211 5658376.89536,5417176.428 5658376.483,5417175.235 5658370.602,5417171.577 5658362.886,5417171.26172 5658361.81094,5417170.76 5658360.11,5417168.52 5658357.99,5417166.04 5658355.05,5417165.25343 5658353.89499,5417164.137 5658352.264,5417162.642 5658351.593,5417160.702 5658350.843,5417160.05418 5658350.58236,5417158.82 5658350.09,5417158.82103 5658350.08622,5417158.818 5658350.085,5417159.055 5658349.214,5417156.78066 5658348.15641,5417155.7525 5658347.68116,5417155.161 5658348.532,5417152.26878 5658346.03497,5417149.03 5658343.24,5417148.78133 5658343.06701,5417148.108 5658342.603,5417139.016 5658338.009,5417126.791 5658331.833,5417121.76604 5658329.76779,5417116.29 5658327.52,5417112.87 5658325.6,5417110.25 5658324.13,5417106.60319 5658322.07976,5417106.071 5658321.781,5417105.81727 5658321.63853,5417104.23 5658320.75,5417093.61267 5658315.18946,5417093.266 5658315.008,5417091.265 5658313.961,5417085.9075 5658311.15667,5417085.34 5658310.86,5417060.44 5658326.26,5417064.68 5658327.52,5417088.83 5658336.46,5417088.52 5658337.31,5417102.92 5658342.65,5417103.26 5658341.83,5417111.76 5658345.51,5417121.66 5658349.58,5417121.88 5658349.67,5417125.22 5658351.12,5417125.33012 5658351.15822,5417131.761 5658353.388,5417137.589 5658356.276,5417139.98755 5658358.0546,5417142.17 5658359.67,5417145.96673 5658364.22951,5417146.599 5658364.988,5417147.11101 5658365.5915,5417151.4 5658370.64,5417151.13021 5658371.0079,5417150.853 5658371.392,5417152.5974 5658373.5281,5417154.92 5658376.37,5417155.18956 5658376.897,5417155.814 5658378.111,5417157.051 5658380.297,5417158.004 5658382.304,5417159.014 5658384.47,5417159.36624 5658385.46469,5417159.78 5658386.62,5417160.63 5658389.28,5417161.5 5658399.49,5417160.773 5658404.194,5417159.41 5658413.02,5417158.853 5658414.442,5417153.671 5658427.659,5417153.67051 5658427.65869,5417153.67 5658427.66,5417152.73 5658427.07,5417149.993 5658436.599,5417148.81 5658439.42,5417149.233 5658439.67,5417148.36 5658440.81))"
+ };
+
+// Coming from "robustness.xml"
+static std::string geos_2[2] =
+ {
+ "POLYGON((742605.987032656 5087763.72510381,742599.903121688 5087760.56016809,742598.666141033 5087762.50894352,742591.100910753 5087758.50480931,742586.861672536 5087766.63211263,742591.417801844 5087769.04526206,742592.428792606 5087767.35034731,742601.541294342 5087772.18101105,742605.987032656 5087763.72510381))",
+ "POLYGON((742601.541294537 5087772.18101068,742592.428792606 5087767.35034731,742589.944404072 5087771.51539701,742583.880455986 5087782.54873438,742582.81550675 5087784.27809355,742583.216887765 5087784.43459684,742582.99081514 5087785.0349637,742592.341351823 5087789.67654,742593.375823205 5087787.7060691,742599.28794443 5087776.4640487,742601.541294537 5087772.18101068))"
+ };
+
+// Coming from "robustness.xml"
+static std::string geos_3[2] =
+ {
+ "POLYGON ((613697.0000000041909516 2369267.9999981997534633, 613797.0000000043073669 2368322.9999981978908181, 613643.0000000041909516 2367807.9999981969594955, 613674.0000000041909516 2367405.9999981969594955, 613400.0000000041909516 2367299.9999981955625117, 613200.0000000040745363 2366813.9999981950968504, 613252.0000000040745363 2366474.9999981927685440, 613094.0000000040745363 2366400.9999981927685440, 612695.0000000039581209 2365506.9999981909058988, 612326.0000000038417056 2365402.9999981909058988, 612145.0000000037252903 2365470.9999981913715601, 612061.0000000037252903 2365967.9999981918372214, 611724.0000000036088750 2366168.9999981927685440, 611334.0000000034924597 2366316.9999981927685440, 610743.0000000033760443 2366221.9999981932342052, 610174.0000000031432137 2366305.9999981927685440, 609973.0000000031432137 2367066.9999981955625117, 609073.0000000027939677 2367938.9999981974251568, 609061.0000000027939677 2368332.9999981974251568, 609151.0000000027939677 2368684.9999981992878020, 608919.0000000027939677 2368811.9999982002191246, 608801.0000000026775524 2369192.9999982002191246, 609161.0000000027939677 2369096.9999982006847858, 609161.0000000027939677 2369509.9999982025474310, 609857.0000000030267984 2369498.9999982011504471, 609762.0000000030267984 2369689.9999982020817697, 610796.0000000033760443 2369794.9999982025474310, 611332.0000000034924597 2370097.9999982025474310, 613149.0000000040745363 2370460.9999982034787536, 613613.0000000041909516 2369720.9999982016161084, 613697.0000000041909516 2369267.9999981997534633))",
+ "POLYGON ((607216.0000000019790605 2370623.9999982002191246, 608128.0000000019790605 2370312.9999982002191246, 608317.0000000030267984 2370101.9999982002191246, 608328.0000000030267984 2369868.9999982002191246, 608644.0000000030267984 2369847.9999982002191246, 608801.0000000030267984 2369192.9999982002191246, 608919.0000000030267984 2368811.9999982002191246, 609151.0000000030267984 2368684.9999982002191246, 609061.0000000030267984 2368332.9999982002191246, 608602.0000000030267984 2368124.9999982002191246, 607980.0000000019790605 2367585.9999982002191246, 607295.0000000019790605 2367062.9999981899745762, 606251.0000000019790605 2366697.9999981899745762, 605456.0000000019790605 2367679.9999982002191246, 605108.0000000019790605 2368377.9999982002191246, 604906.0000000019790605 2369083.9999982002191246, 604191.0000000010477379 2369719.9999982002191246, 604107.0000000010477379 2370057.9999982002191246, 604264.0000000010477379 2370397.9999982002191246, 604141.0000000010477379 2370768.9999982002191246, 604561.0000000010477379 2370448.9999982002191246, 604940.0000000019790605 2370406.9999982002191246, 605460.0000000019790605 2370792.9999982002191246, 605942.0000000019790605 2370945.9999982099980116, 606364.0000000019790605 2370892.9999982002191246, 606881.0000000019790605 2370988.9999982002191246, 607216.0000000019790605 2370623.9999982002191246))"
+ };
+
+// Coming from "TestRobustOverlayFixed.xml"
+static std::string geos_4[2] =
+ {
+ "POLYGON ((545 317, 617 379, 581 321, 545 317))",
+ "POLYGON ((484 290, 558 359, 543 309, 484 290))"
+ };
+
+static std::string ticket_5103[2] =
+ {
+ "POLYGON((-92810838 3618230,-94606872 1822196,-94999302 2214626,-93203268 4010660,-92810838 3618230))",
+ "POLYGON((-95269304 222758,-95260668 419862,-95234760 615696,-95192088 808228,-95132906 996442,-95057214 1178814,-94966028 1354074,-94860110 1520444,-94739968 1676908,-94606618 1822450,-94999048 2214880,-95165164 2033778,-95314770 1838706,-95446850 1631442,-95560388 1413510,-95654368 1186434,-95728282 951992,-95781368 711962,-95813626 468376,-95824294 222758,-95269304 222758))"
+ };
+
+static std::string ticket_6958[2] =
+ {
+ "POLYGON((0.63872330997599124913 0.25963790394761232516 , 0.51901482278481125832 0.36860892060212790966 , 0.24443514109589159489 0.62663296470418572426 , 0.41175117865081167778 0.47178476291601745274 , 0.63872330997599124913 0.25963790394761232516))",
+ "POLYGON((0.52364358028948876367 0.36823021165656988352 , 0.7762673462275415659 0.13443113025277850237 , 0.59446187055393329146 0.29992923303868185281 , 0.52364358028948876367 0.36823021165656988352))"
+ };
+
+static std::string ticket_7462[2] =
+ {
+ "POLYGON((0 0 , -0.3681253195 0.9297761917 , 2.421203136 2.034152031 , 2.789328575 1.104375958 , 0 0))",
+ "POLYGON((2.76143527 1.093332171 , 2.076887131 1.822299719 , 4.263789177 3.875944376 , 4.948337555 3.146976948 , 2.76143527 1.093332171))"
+ };
+
+// Ticket 8310 https://svn.boost.org/trac/boost/ticket/8310
+// The problem was in disjoint, "point_on_border" on the smallest polygon
+// is not considered as "within" the other, though there are no further intersection points.
+static std::string ticket_8310a[2] =
+ {
+ "POLYGON(( -2.559375047683716 -0.615625500679016, -2.559375047683716 0.384374797344208, 7.940625190734863 0.384374588727951, 7.940625190734863 -0.615625441074371, -2.559375047683716 -0.615625500679016 ))",
+ "POLYGON(( 1.000000000000000 0.384374707937241, 1.000000000000000 0.000000000000000, 0.000000000000000 0.000000000000000, 0.000000000000000 0.384374737739563, 1.000000000000000 0.384374707937241 ))"
+ };
+static std::string ticket_8310b[2] =
+ {
+ "POLYGON(( -2.592187881469727 -0.626561701297760, -2.592187643051147 0.373438000679016, 7.907812595367432 0.373437851667404, 7.907812595367432 -0.626561224460602, -2.592187881469727 -0.626561701297760 ))",
+ "POLYGON(( 0.000000000000000 0.373437941074371, 1.000000000000000 0.373437792062759, 1.000000000000000 0.000000000000000, 0.000000000000000 0.000000000000000, 0.000000000000000 0.373437941074371 ))"
+ };
+static std::string ticket_8310c[2] =
+ {
+ "POLYGON(( 5.204249382019043 3.531043529510498, 5.204247951507568 2.531045675277710, -5.295750617980957 2.531046152114868, -5.295751094818115 3.531045913696289, 5.204249382019043 3.531043529510498 ))",
+ "POLYGON(( 1.000000000000000 2.531045913696289, 1.000000000000000 3.000000000000000, 2.000000000000000 3.000000000000000, 2.000000000000000 2.531045913696289, 1.000000000000000 2.531045913696289 ))"
+ };
+
+static std::string ticket_8254[2] =
+ {
+ "POLYGON((0 0,-0.27224111308522275232 0.19250353717521062613,-0.27224111308522275232 0.96219700082478931691,0 1.154700537999999943,0 0))",
+ "POLYGON((-0.27224111308522286334 0.57751061210314269534,-0.27201435369399112885 0.57735026899999997152,-0.27224111308522280783 0.57718992589685735872,-0.27224111308522286334 0.57751061210314269534))"
+ };
+
+static std::string ticket_8652[2] =
+ {
+ "POLYGON((0 0, 0.05 0.04, 0.05 0, 0 0))",
+ "POLYGON((0.02 -2.77556e-17, 0.05 0.02, 0.05 -2.77556e-17, 0.02 -2.77556e-17))"
+ };
+
+static std::string ticket_9756[2] =
+{
+ // NOTE: these polygons are not closed. That is the reason the union failed for the library user.
+ // the unit test calls "correct" so this test is not a problem for the library. The ticket is closed as invalid.
+ "POLYGON((440820.110024126 4047009.80267429, 440806.545727707 4046942.39533656, 440797.171880196 4046895.8425726, 440804.202135392 4046888.73092639, 440813.573458131 4046935.27114371, 440827.140279322 4047002.69102807))",
+ "POLYGON((440855.857887967 4046932.1248641, 440813.740724389 4046942.21109839, 440806.376538684 4046935.44583646, 440848.493702262 4046925.35960217))",
+};
+
+static std::string issue_548[2] =
+{
+ "POLYGON((143526.96086588613 113763.64549686472, 76161.913300625194 96673.360975963747,76161.913300625194 71504.239234902911,145207.72299290277 81831.630077016118,143526.96086588613 113763.64549686472))",
+ "POLYGON((-47053.678255174891 -657486.29482312244,-610948.08772840793 300004.45446108561,-132202.71308630385 581951.65919770207,431691.69638692908 -375539.09008650586,-47053.678255174891 -657486.29482312244))"
+};
+
+static std::string issue_566_a[2] =
+{
+ "POLYGON((16.8739 0.353458,8.80872e-14 5.50545e-15,0.266003 -12.6988,17.1399 -12.3454,16.8739 0.353458))",
+ "POLYGON((-4.53257e-19 2.16383e-17,9.99781 0.209424,10.1459 -6.86009,0.148086 -7.06952,-4.53257e-19 2.16383e-17))"
+};
+
+static std::string issue_566_b[2] =
+{
+ "POLYGON((16.8739 0.353458,0 0,0.266003 -12.6988,17.1399 -12.3454,16.8739 0.353458))",
+ "POLYGON((0 0,0.148086 -7.06952,10.1459 -6.86009,9.99781 0.209424,0 0))"
+};
+
+static std::string ggl_list_20120229_volker[3] =
+ {
+ "POLYGON((1716 1554,2076 2250,2436 2352,2796 1248,3156 2484,3516 2688,3516 2688,3156 2484,2796 1248,2436 2352,2076 2250, 1716 1554))",
+ "POLYGON((2500 1600,2500 2300,3200 2300,3200 1600,2500 1600))",
+ "POLYGON((1716 1554,2076 2250,2436 2352,2796 1248,3156 2484,3516 2688,3156 2483,2796 1247,2436 2351,2076 2249, 1716 1554))",
+ };
+
+static std::string ggl_list_20120717_volker[2] =
+ {
+ "POLYGON((1031 1056,3232 1056,3232 2856,1031 2856))",
+ "POLYGON((1032 1458,1032 1212,2136 2328,3234 2220,3234 2412,2136 2646))"
+ };
+
+static std::string ggl_list_20190307_matthieu_1[2] =
+ {
+ "POLYGON((-1.00000010731 -0.713619134602,-1.00000012822 -0.493922219801,-0.598172925227 0.100631982002,-1.00000012886 -0.0624283708015,-1.00000011994 0.0862738908136,-0.440262107798 0.31341400405,-0.360828341246 0.292948255722,-0.357275641893 0.210997365241,-0.970143533681 -0.695818118925,-1.00000010731 -0.713619134602))",
+ "POLYGON((-0.999999965066 -0.493921978401,-0.909999987372 -0.360755621066,-0.909999996424 -0.91000000872,0.91000000872 -0.909999996424,0.909999996424 0.91000000872,-0.909999996424 0.91000000872,-0.909999911756 -0.0259065349961,-0.999999867625 -0.0624282647935,-1 1,1 1,1 -1,-1 -1,-0.999999965066 -0.493921978401))"
+ };
+
+static std::string ggl_list_20190307_matthieu_2[2] =
+ {
+ "POLYGON((-2 -2,-2 2,2 2,2 -2,-2 -2))",
+ "POLYGON((-0.430323140092 -0.999999912736,-1 -1,-1 1,1 1,1 -1,0.431066411049 -0.999999901684,0.43106695576 -1.00000010168,-0.43032321787 -1.00000011274,-0.430323140092 -0.999999912736),(0.135529235005 0.316180944443,-0.949848473072 -0.124261498451,-0.47733861208 -0.590634822845,0.135529235005 0.316180944443))"
+ };
+
+static std::string buffer_rt_a[2] =
+ {
+ "POLYGON((1 7,1 8,1.0012 8.04907,1.00482 8.09802,1.01082 8.14673,1.01921 8.19509,1.02997 8.24298,1.04306 8.29028,1.05846 8.33689,1.07612 8.38268,1.09601 8.42756,1.11808 8.4714,1.14227 8.5141,1.16853 8.55557,1.19679 8.5957,1.22699 8.63439,1.25905 8.67156,1.29289 8.70711,1.32844 8.74095,1.36561 8.77301,1.4043 8.80321,1.44443 8.83147,1.4859 8.85773,1.5286 8.88192,1.57244 8.90399,1.61732 8.92388,1.66311 8.94154,1.70972 8.95694,1.75702 8.97003,1.80491 8.98079,1.85327 8.98918,1.90198 8.99518,1.95093 8.9988,2 9,3 9,3.04907 8.9988,3.09802 8.99518,3.14673 8.98918,3.19509 8.98079,3.24298 8.97003,3.29028 8.95694,3.33689 8.94154,3.38268 8.92388,3.42756 8.90399,3.4714 8.88192,3.5141 8.85773,3.55557 8.83147,3.5957 8.80321,3.63439 8.77301,3.67156 8.74095,3.70711 8.70711,3.74095 8.67156,3.77301 8.63439,3.80321 8.5957,3.83147 8.55557,3.85773 8.5141,3.88192 8.4714,3.90399 8.42756,3.92388 8.38268,3.94154 8.33689,3.95694 8.29028,3.97003 8.24298,3.98079 8.19509,3.98918 8.14673,3.99518 8.09802,3.9988 8.04907,4 8,4 7,3.9988 6.95093,3.99518 6.90198,3.98918 6.85327,3.98079 6.80491,3.97003 6.75702,3.95694 6.70972,3.94154 6.66311,3.92388 6.61732,3.90399 6.57244,3.88192 6.5286,3.85773 6.4859,3.83147 6.44443,3.80321 6.4043,3.77301 6.36561,3.74095 6.32844,3.70711 6.29289,3.67156 6.25905,3.63439 6.22699,3.5957 6.19679,3.55557 6.16853,3.5141 6.14227,3.4714 6.11808,3.42756 6.09601,3.38268 6.07612,3.33689 6.05846,3.29028 6.04306,3.24298 6.02997,3.19509 6.01921,3.14673 6.01082,3.09802 6.00482,3.04907 6.0012,3 6,2 6,1.95093 6.0012,1.90198 6.00482,1.85327 6.01082,1.80491 6.01921,1.75702 6.02997,1.70972 6.04306,1.66311 6.05846,1.61732 6.07612,1.57244 6.09601,1.5286 6.11808,1.4859 6.14227,1.44443 6.16853,1.4043 6.19679,1.36561 6.22699,1.32844 6.25905,1.29289 6.29289,1.25905 6.32844,1.22699 6.36561,1.19679 6.4043,1.16853 6.44443,1.14227 6.4859,1.11808 6.5286,1.09601 6.57244,1.07612 6.61732,1.05846 6.66311,1.04306 6.70972,1.02997 6.75702,1.01921 6.80491,1.01082 6.85327,1.00482 6.90198,1.0012 6.95093,1 7))",
+ "POLYGON((3 6,4 6,4.04907 5.9988,4.09802 5.99518,4.14673 5.98918,4.19509 5.98079,4.24298 5.97003,4.29028 5.95694,4.33689 5.94154,4.38268 5.92388,4.42756 5.90399,4.4714 5.88192,4.5141 5.85773,4.55557 5.83147,4.5957 5.80321,4.63439 5.77301,4.67156 5.74095,4.70711 5.70711,4.74095 5.67156,4.77301 5.63439,4.80321 5.5957,4.83147 5.55557,4.85773 5.5141,4.88192 5.4714,4.90399 5.42756,4.92388 5.38268,4.94154 5.33689,4.95694 5.29028,4.97003 5.24298,4.98079 5.19509,4.98918 5.14673,4.99518 5.09802,4.9988 5.04907,5 5,5 4,4.9988 3.95093,4.99518 3.90198,4.98918 3.85327,4.98079 3.80491,4.97003 3.75702,4.95694 3.70972,4.94154 3.66311,4.92388 3.61732,4.90399 3.57244,4.88192 3.5286,4.85773 3.4859,4.83147 3.44443,4.80321 3.4043,4.77301 3.36561,4.74095 3.32844,4.70711 3.29289,4.67156 3.25905,4.63439 3.22699,4.5957 3.19679,4.55557 3.16853,4.5141 3.14227,4.4714 3.11808,4.42756 3.09601,4.38268 3.07612,4.33689 3.05846,4.29028 3.04306,4.24298 3.02997,4.19509 3.01921,4.14673 3.01082,4.09802 3.00482,4.04907 3.0012,4 3,3 3,3 3,2 3,1.95093 3.0012,1.90198 3.00482,1.85327 3.01082,1.80491 3.01921,1.75702 3.02997,1.70972 3.04306,1.66311 3.05846,1.61732 3.07612,1.57244 3.09601,1.5286 3.11808,1.4859 3.14227,1.44443 3.16853,1.4043 3.19679,1.36561 3.22699,1.32844 3.25905,1.29289 3.29289,1.25905 3.32844,1.22699 3.36561,1.19679 3.4043,1.16853 3.44443,1.14227 3.4859,1.11808 3.5286,1.09601 3.57244,1.07612 3.61732,1.05846 3.66311,1.04306 3.70972,1.02997 3.75702,1.01921 3.80491,1.01082 3.85327,1.00482 3.90198,1.0012 3.95093,1 4,1 5,1.0012 5.04907,1.00482 5.09802,1.01082 5.14673,1.01921 5.19509,1.02997 5.24298,1.04306 5.29028,1.05846 5.33689,1.07612 5.38268,1.09601 5.42756,1.11808 5.4714,1.14227 5.5141,1.16853 5.55557,1.19679 5.5957,1.22699 5.63439,1.25905 5.67156,1.29289 5.70711,1.32844 5.74095,1.36561 5.77301,1.4043 5.80321,1.44443 5.83147,1.4859 5.85773,1.5286 5.88192,1.57244 5.90399,1.61732 5.92388,1.66311 5.94154,1.70972 5.95694,1.75702 5.97003,1.80491 5.98079,1.85327 5.98918,1.90198 5.99518,1.95093 5.9988,2 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6,3 6))"
+ };
+
+static std::string buffer_rt_f[2] =
+ {
+ "POLYGON((-0.29999999999999999 6.0000000000000000,-0.29999999999999999 7.0000000000000000,-0.30000000000000027 7.7242640687119302,0.21213203435596423 7.2121320343559638,1.2121320343559643 6.2121320343559638,1.7242640687119293 5.7000000000000002,1.0000000000000000 5.7000000000000002,0.00000000000000000 5.7000000000000002,-0.30000000000000027 5.7000000000000002,-0.29999999999999999 6.0000000000000000))",
+ "POLYGON((1.3000000000000000 9.0000000000000000,1.3000000000000000 8.0000000000000000,1.3000000000000007 7.7000000000000002,1.0000000000000000 7.7000000000000002,0.00000000000000000 7.7000000000000002,-0.29999999999999982 7.7000000000000002,-0.29999999999999999 8.0000000000000000,-0.29999999999999999 9.0000000000000000,-0.29999999999999982 9.3000000000000007,0.00000000000000000 9.3000000000000007,1.0000000000000000 9.3000000000000007,1.3000000000000007 9.3000000000000007,1.3000000000000000 9.0000000000000000))"
+ };
+
+static std::string buffer_rt_g[2] =
+ {
+ "POLYGON((2.0 8.0,2.0 9.0,2.0 10.0,3.0 10.0,4.0 10.0,6.4142135623730958 10.0,4.7071067811865479 8.2928932188134521,3.7071067811865475 7.2928932188134521,2.0 5.5857864376269051,2.0 8.0))",
+ "POLYGON((0.0 6.0,0.0 7.0,0.0 8.0,1.0 8.0,2.0 8.0,4.4142135623730958 8.0,2.7071067811865475 6.2928932188134521,1.7071067811865475 5.2928932188134521,-0.0 3.5857864376269042,0.0 6.0))"
+ };
+
+static std::string buffer_rt_g_boxes[5] =
+ {
+ "POLYGON((0 0,0 4,4 4,4 0,0 0))",
+ "POLYGON((2 2,2 4,6 4,6 2,2 2))",
+ "POLYGON((2 2,2 4,6 4,8 4,8 2,2 2))",
+ "POLYGON((2 2,2 4,6 4,6 6,8 6,8 2,2 2))",
+
+ "POLYGON((0 0,0 4,4 4,4 5,5 5,5 1,4 1,4 0,0 0))"
+ };
+
+// From buffer-robustness-test with segment-intersection "touching" with r ~ 1.16
+static std::string buffer_rt_i[2] =
+ {
+ "POLYGON((1.0 1.0,1.0 2.0,1.0 3.0,2.0 3.0,3.0 3.0,5.4142135623730949 3.0,3.7071067811865475 1.2928932188134525,2.7071067811865475 0.29289321881345254,1.0 -1.4142135623730949,1.0 1.0))",
+ "POLYGON((2.0 2.0,2.0 3.0,2.0 4.0,3.0 4.0,4.0 4.0,6.4142135623730958 4.0,4.7071067811865479 2.2928932188134525,3.7071067811865475 1.2928932188134525,2.0 -0.41421356237309387,2.0 2.0))"
+ };
+
+// Idem, but with a touch-in-the-middle
+static std::string buffer_rt_j[2] =
+ {
+ "POLYGON((1.0 4.0,1.0 5.0,1.0 6.0,2.0 6.0,3.0 6.0,5.4142135623730967 6.0,3.7071067811865475 4.2928932188134521,2.7071067811865475 3.2928932188134525,1.0 1.5857864376269055,1.0 4.0))",
+ "POLYGON((-1.0 2.0,-1.0 3.0,-1.0 4.0,0.00 4.0,1.0 4.0,3.4142135623730949 4.0,1.7071067811865475 2.2928932188134525,0.70710678118654746 1.2928932188134525,-1.0 -0.41421356237309492,-1.0 2.0))"
+ };
+
+// Nearly-collinear (two segments as-if meeting but not really)
+static std::string buffer_rt_l[2] =
+ {
+ "POLYGON((1.0 5.0,1.0 6.0,1.0 8.4142135623730958,2.7071067811865475 6.7071067811865479,3.7071067811865475 5.7071067811865479,5.4142135623730958 4.0,3.0 4.0,2.0 4.0,1.0 4.0,1.0 5.0))",
+ "POLYGON((5.0 1.0,5.0 2.0,5.0 4.4142135623730958,6.7071067811865479 2.7071067811865475,7.7071067811865479 1.7071067811865475,9.4142135623730958 0.00,7.0 0.0,6.0 0.0,5.0 0.0,5.0 1.0))"
+ };
+
+static std::string buffer_rt_m1[2] =
+ {
+ "POLYGON((3.0 2.0,3.0 3.0,3.0 5.4142135623730940,4.7071067811865479 3.7071067811865475,5.7071067811865479 2.7071067811865475,7.4142135623730940 1.0,5.0 1.0,4.0 1.0,3.0 1.0,3.0 2.0))",
+ "POLYGON((0.29289321881345254 2.7071067811865475,1.2928932188134525 3.7071067811865475,3.0 5.4142135623730949,3.0 3.0,3.0 2.0,3.0 1.0,2.0 1.0,1.0 1.0,-1.4142135623730949 1.0,0.29289321881345254 2.7071067811865475))"
+ };
+
+static std::string buffer_rt_m2[2] =
+ {
+ "POLYGON((-0.70710678118654746 3.7071067811865475,0.29289321881345254 4.7071067811865479,2.0 6.4142135623730967,2.0 4.0,2.0 3.0,2.0 2.0,1.0 2.0,0.00 2.0,-2.4142135623730949 2.0,-0.70710678118654746 3.7071067811865475))",
+ "POLYGON((2.2928932188134525 6.7071067811865479,3.2928932188134525 7.7071067811865479,5.0 9.4142135623730958,5.0 7.0,5.0 6.0,5.0 6.0,5.0 5.0,5.0 4.0,4.0 4.0,3.0 4.0,2.0 4.0,2.0 5.0,2.0 6.0,2.0 6.4142135623730958,2.2928932188134525 6.7071067811865479))"
+ };
+
+
+static std::string buffer_rt_n[2] =
+ {
+ "POLYGON((-0.70710678118654746 0.70710678118654746,0.29289321881345254 1.7071067811865475,2.0 3.4142135623730949,2.0 1.0,2.0 0.0,2.0 -1.0,1.0 -1.0,0.00 -1.0,-2.4142135623730949 -1.0,-0.70710678118654746 0.70710678118654746))",
+ "POLYGON((2.2928932188134525 3.7071067811865475,3.2928932188134525 4.7071067811865479,5.0 6.4142135623730958,5.0 4.0,5.0 3.0,5.0 2.0,4.0 2.0,3.0 2.0,0.58578643762690574 2.0,2.2928932188134525 3.7071067811865475))"
+ };
+
+static std::string buffer_rt_q[2] =
+ {
+ "POLYGON((6.0 6.0,7.0 6.0,9.4142135623730958 6.0,7.7071067811865479 4.2928932188134521,6.7071067811865479 3.2928932188134525,6.4142135623730949 3.0,6.0 3.0,5.0 3.0,4.0 3.0,4.0 4.0,4.0 5.0,4.0 6.0,5.0 6.0,6.0 6.0))",
+ "POLYGON((3.0 2.0,3.0 3.0,3.0 4.0,4.0 4.0,5.0 4.0,7.4142135623730958 4.0,5.7071067811865479 2.2928932188134525,4.7071067811865479 1.2928932188134525,3.0 -0.41421356237309581,3.0 2.0))"
+ };
+
+static std::string buffer_rt_r[2] =
+ {
+ "POLYGON((3.7071067811865475 0.29289321881345254,2.7071067811865475 -0.70710678118654746,2.0 -1.4142135623730949,1.2928932188134525 -0.70710678118654746,0.29289321881345254 0.29289321881345254,-0.41421356237309492 1.0,0.29289321881345254 1.7071067811865475,1.2928932188134525 2.7071067811865475,2.0000000000000004 3.4142135623730954,2.7071067811865475 2.7071067811865475,3.7071067811865475 1.7071067811865475,4.4142135623730958 1.0000000000000004,3.7071067811865475 0.29289321881345254))",
+ "POLYGON((5.7071067811865479 2.2928932188134525,4.7071067811865479 1.2928932188134525,4.4142135623730958 1.0,4.0 1.0,3.0 1.0,1.3819660112501053 1.0,2.1055728090000843 2.4472135954999579,3.1055728090000843 4.4472135954999583,3.7260485282911020 5.6881650340819956,4.7071067811865479 4.7071067811865479,5.7071067811865479 3.7071067811865475,6.4142135623730958 3.0,5.7071067811865479 2.2928932188134525))"
+ };
+
+
+static std::string buffer_rt_t[2] =
+ {
+ "POLYGON((0.00000000000000000 3.0,0.00000000000000000 4.0,0.00000000000000000 6.4142135623730958,1.7071067811865475 4.7071067811865479,2.7071067811865475 3.7071067811865475,4.4142135623730940 2.0,2.0 2.0,1.0 2.0,-0.00000000000000000 2.0,0.00000000000000000 3.0))",
+ "POLYGON((1.7071067811865475 3.2928932188134525,0.70710678118654746 2.2928932188134525,-1.0 0.58578643762690508,-1.0 3.0,-1.0 4.0,-1.0 4.0,-1.0 5.0,-1.0 7.4142135623730958,0.70710678118654746 5.7071067811865479,1.7071067811865475 4.7071067811865479,2.4142135623730954 4.0,1.7071067811865475 3.2928932188134525))"
+ };
+
+// Two circles, causing problems in sectionalize. Fixed by adding small buffer
+static std::string buffer_mp1[2] =
+ {
+ "POLYGON((7 5,6.989043790736547 4.790943073464693,6.956295201467611 4.584176618364482,6.902113032590307 4.381966011250105,6.827090915285202 4.1865267138484,6.732050807568878 4,6.618033988749895 3.824429495415054,6.486289650954788 3.661738787282284,6.338261212717717 3.513710349045212,6.175570504584946 3.381966011250105,6 3.267949192431122,5.8134732861516 3.172909084714799,5.618033988749895 3.097886967409693,5.415823381635519 3.043704798532389,5.209056926535308 3.010956209263453,5.000000000000001 3,4.790943073464693 3.010956209263453,4.584176618364483 3.043704798532389,4.381966011250106 3.097886967409693,4.186526713848401 3.172909084714798,4.00 3.267949192431122,3.824429495415055 3.381966011250104,3.661738787282284 3.513710349045211,3.513710349045212 3.661738787282284,3.381966011250105 3.824429495415053,3.267949192431122 4,3.172909084714798 4.1865267138484,3.097886967409693 4.381966011250106,3.043704798532389 4.584176618364483,3.010956209263453 4.790943073464694,3 5.00,3.010956209263453 5.209056926535308,3.043704798532389 5.415823381635521,3.097886967409694 5.618033988749897,3.172909084714799 5.813473286151603,3.267949192431124 6.00,3.381966011250107 6.175570504584949,3.513710349045214 6.338261212717719,3.661738787282286 6.486289650954791,3.824429495415056 6.618033988749897,4.00 6.732050807568879,4.186526713848402 6.827090915285202,4.381966011250107 6.902113032590307,4.584176618364483 6.956295201467611,4.790943073464693 6.989043790736547,5 7,5.209056926535306 6.989043790736547,5.415823381635518 6.956295201467611,5.618033988749893 6.902113032590307,5.813473286151598 6.827090915285202,6.00 6.732050807568879,6.175570504584943 6.618033988749897,6.338261212717713 6.486289650954792,6.486289650954785 6.33826121271772,6.618033988749891 6.175570504584951,6.732050807568874 6.00,6.827090915285199 5.813473286151607,6.902113032590305 5.618033988749902,6.95629520146761 5.415823381635526,6.989043790736545 5.209056926535316,7 5))",
+ "POLYGON((9 7,8.989043790736547 6.790943073464693,8.956295201467611 6.584176618364482,8.902113032590307 6.381966011250105,8.827090915285202 6.1865267138484,8.732050807568877 6,8.618033988749895 5.824429495415053,8.486289650954788 5.661738787282284,8.338261212717717 5.513710349045212,8.175570504584947 5.381966011250105,8 5.267949192431122,7.8134732861516 5.172909084714799,7.618033988749895 5.097886967409693,7.415823381635519 5.043704798532389,7.209056926535308 5.010956209263453,7.000000000000001 5,6.790943073464693 5.010956209263453,6.584176618364483 5.043704798532389,6.381966011250106 5.097886967409693,6.186526713848401 5.172909084714798,6.00 5.267949192431122,5.824429495415055 5.381966011250104,5.661738787282284 5.513710349045211,5.513710349045212 5.661738787282284,5.381966011250105 5.824429495415053,5.267949192431122 6,5.172909084714798 6.1865267138484,5.097886967409693 6.381966011250106,5.043704798532389 6.584176618364483,5.010956209263453 6.790943073464694,5 7.00,5.010956209263453 7.209056926535308,5.043704798532389 7.415823381635521,5.097886967409694 7.618033988749897,5.172909084714799 7.813473286151603,5.267949192431124 8.00,5.381966011250107 8.175570504584949,5.513710349045214 8.338261212717718,5.661738787282286 8.486289650954792,5.824429495415057 8.618033988749897,6.00 8.732050807568879,6.186526713848402 8.827090915285202,6.381966011250107 8.902113032590307,6.584176618364483 8.956295201467611,6.790943073464693 8.989043790736547,7 9,7.209056926535306 8.989043790736547,7.415823381635518 8.956295201467611,7.618033988749893 8.902113032590307,7.813473286151598 8.827090915285202,8.00 8.732050807568879,8.175570504584943 8.618033988749897,8.338261212717713 8.486289650954792,8.486289650954785 8.33826121271772,8.618033988749891 8.17557050458495,8.732050807568875 8.00,8.827090915285199 7.813473286151607,8.902113032590306 7.618033988749902,8.95629520146761 7.415823381635526,8.989043790736545 7.209056926535316,9 7))"
+ };
+
+// Union of two circles, unioned with third circle, having undetected inner polygon
+// This is a robustness issue in get_turn_info, collinear_opposite, fixed by checking consistency
+static std::string buffer_mp2[2] =
+ {
+ "POLYGON((7 8,6.9949042292205075 7.8573216336015355,6.9796428837618656 7.7153703234534294,6.954293731942319 7.5748694208940464,6.918985947228995 7.4365348863171405,6.8738994499995236 7.301071640801803,6.8192639907090369 7.1691699739962269,6.7553579791345113 7.0415020265598862,6.682507065662362 6.9187183650888047,6.6010824818487208 6.8014446669773063,6.5114991487085163 6.6902785321094296,6.4142135623730949 6.5857864376269051,6.3097214678905704 6.4885008512914837,6.1985553330226946 6.3989175181512792,6.0812816349111953 6.317492934337638,5.9584979734401138 6.2446420208654887,5.8308300260037731 6.180736009290964,5.698928359198197 6.1261005500004764,5.5634651136828603 6.081014052771005,5.4251305791059536 6.045706268057681,5.2846296765465715 6.0203571162381344,5.1426783663984654 6.0050957707794925,5.0000000000000009 6,4.8573216336015363 6.0050957707794925,4.7153703234534312 6.0203571162381344,4.5748694208940481 6.045706268057681,4.4365348863171423 6.081014052771005,4.3010716408018048 6.1261005500004764,4.1691699739962287 6.1807360092909622,4.041502026559888 6.2446420208654878,3.9187183650888064 6.3174929343376363,3.8014446669773077 6.3989175181512783,3.6902785321094314 6.4885008512914819,3.5857864376269064 6.5857864376269033,3.4885008512914846 6.6902785321094278,3.3989175181512805 6.8014446669773045,3.3174929343376389 6.9187183650888029,3.2446420208654896 7.0415020265598844,3.180736009290964 7.1691699739962251,3.1261005500004773 7.3010716408018013,3.0810140527710059 7.4365348863171379,3.0457062680576819 7.5748694208940437,3.0203571162381349 7.7153703234534268,3.0050957707794934 7.8573216336015328,3 7.9999999999999973,3.0050957707794925 8.1426783663984619,3.0203571162381344 8.284629676546567,3.0457062680576801 8.4251305791059501,3.0810140527710042 8.5634651136828559,3.1261005500004755 8.6989283591981934,3.1807360092909618 8.8308300260037704,3.2446420208654869 8.9584979734401102,3.3174929343376358 9.0812816349111927,3.398917518151277 9.198555333022691,3.488500851291481 9.3097214678905669,3.5857864376269024 9.4142135623730923,3.6902785321094269 9.5114991487085145,3.8014446669773028 9.601082481848719,3.918718365088802 9.6825070656623602,4.0415020265598844 9.7553579791345104,4.169169973996226 9.819263990709036,4.301071640801803 9.8738994499995236,4.4365348863171405 9.918985947228995,4.5748694208940472 9.9542937319423199,4.7153703234534312 9.9796428837618656,4.8573216336015381 9.9949042292205075,5.0000000000000036 10,5.142678366398469 9.9949042292205075,5.284629676546575 9.9796428837618656,5.425130579105959 9.9542937319423181,5.5634651136828657 9.9189859472289932,5.6989283591982032 9.8738994499995201,5.8308300260037802 9.8192639907090324,5.9584979734401209 9.7553579791345069,6.0812816349112033 9.6825070656623566,6.1985553330227017 9.6010824818487137,6.3097214678905784 9.5114991487085092,6.4142135623731038 9.4142135623730869,6.5114991487085252 9.3097214678905598,6.6010824818487288 9.1985553330226821,6.68250706566237 9.0812816349111838,6.7553579791345184 8.9584979734400996,6.8192639907090431 8.830830026003758,6.873899449999529 8.698928359198181,6.9189859472290003 8.5634651136828417,6.9542937319423235 8.4251305791059359,6.9796428837618683 8.284629676546551,6.9949042292205084 8.1426783663984441,7 8))",
+ "POLYGON((7.281120925915111 9.019979886500282,7.142678366398465 9.005095770779493,7.000000000000001 9,6.857321633601536 9.005095770779493,6.715370323453431 9.020357116238134,6.574869420894048 9.04570626805768,6.436534886317142 9.081014052771005,6.301071640801805 9.126100550000476,6.169169973996229 9.180736009290962,6.041502026559888 9.244642020865488,5.918718365088806 9.317492934337636,5.801444666977307 9.398917518151277,5.690278532109431 9.488500851291482,5.585786437626906 9.585786437626904,5.488500851291485 9.690278532109428,5.398917518151281 9.801444666977304,5.317492934337639 9.918718365088804,5.24464202086549 10.04150202655988,5.180736009290964 10.16916997399622,5.126100550000477 10.3010716408018,5.081014052771006 10.43653488631714,5.045706268057682 10.57486942089405,5.020357116238134 10.71537032345343,5.005095770779493 10.85732163360153,5 11,5.005095770779493 11.14267836639846,5.020357116238134 11.28462967654657,5.04570626805768 11.42513057910595,5.081014052771004 11.56346511368286,5.126100550000476 11.69892835919819,5.180736009290962 11.83083002600377,5.244642020865487 11.95849797344011,5.317492934337636 12.08128163491119,5.398917518151277 12.19855533302269,5.488500851291481 12.30972146789057,5.585786437626902 12.41421356237309,5.690278532109427 12.51149914870852,5.801444666977303 12.60108248184872,5.918718365088802 12.68250706566236,6.041502026559884 12.75535797913451,6.169169973996226 12.81926399070904,6.301071640801803 12.87389944999952,6.436534886317141 12.918985947229,6.574869420894047 12.95429373194232,6.715370323453431 12.97964288376187,6.857321633601538 12.99490422922051,7.000000000000004 13,7.142678366398469 12.99490422922051,7.284629676546575 12.97964288376187,7.425130579105959 12.95429373194232,7.563465113682866 12.91898594722899,7.698928359198203 12.87389944999952,7.83083002600378 12.81926399070903,7.958497973440121 12.75535797913451,8.081281634911203 12.68250706566236,8.198555333022702 12.60108248184871,8.309721467890579 12.51149914870851,8.414213562373103 12.41421356237309,8.511499148708525 12.30972146789056,8.60108248184873 12.19855533302268,8.682507065662371 12.08128163491118,8.755357979134519 11.9584979734401,8.819263990709043 11.83083002600376,8.873899449999529 11.69892835919818,8.918985947229 11.56346511368284,8.954293731942324 11.42513057910594,8.979642883761869 11.28462967654655,8.994904229220509 11.14267836639844,9 11,8.994904229220508 10.85732163360154,8.979642883761866 10.71537032345343,8.954293731942318 10.57486942089405,8.918985947228995 10.43653488631714,8.873899449999524 10.3010716408018,8.819263990709036 10.16916997399623,8.755357979134512 10.04150202655989,8.718879074084889 9.980020113499718,8.857321633601538 9.994904229220508,9.000000000000004 10,9.142678366398469 9.994904229220508,9.284629676546576 9.979642883761866,9.425130579105959 9.954293731942318,9.563465113682865 9.918985947228993,9.698928359198204 9.87389944999952,9.830830026003779 9.819263990709032,9.958497973440121 9.755357979134507,10.0812816349112 9.682507065662357,10.1985553330227 9.601082481848714,10.30972146789058 9.511499148708509,10.4142135623731 9.414213562373087,10.51149914870853 9.30972146789056,10.60108248184873 9.198555333022682,10.68250706566237 9.081281634911184,10.75535797913452 8.9584979734401,10.81926399070904 8.830830026003758,10.87389944999953 8.698928359198181,10.918985947229 8.563465113682842,10.95429373194232 8.425130579105936,10.97964288376187 8.284629676546551,10.99490422922051 8.142678366398444,11 8,10.99490422922051 7.857321633601536,10.97964288376187 7.715370323453429,10.95429373194232 7.574869420894046,10.918985947229 7.436534886317141,10.87389944999952 7.301071640801803,10.81926399070904 7.169169973996227,10.75535797913451 7.041502026559886,10.68250706566236 6.918718365088805,10.60108248184872 6.801444666977306,10.51149914870852 6.69027853210943,10.4142135623731 6.585786437626905,10.30972146789057 6.488500851291484,10.1985553330227 6.398917518151279,10.0812816349112 6.317492934337638,9.958497973440114 6.244642020865489,9.830830026003774 6.180736009290964,9.698928359198197 6.126100550000476,9.56346511368286 6.081014052771005,9.425130579105954 6.045706268057681,9.284629676546571 6.020357116238134,9.142678366398465 6.005095770779493,9.000000000000002 6,8.857321633601536 6.005095770779493,8.715370323453431 6.020357116238134,8.574869420894048 6.045706268057681,8.436534886317142 6.081014052771005,8.301071640801805 6.126100550000476,8.169169973996228 6.180736009290962,8.041502026559888 6.244642020865488,7.918718365088806 6.317492934337636,7.801444666977307 6.398917518151278,7.690278532109431 6.488500851291482,7.585786437626906 6.585786437626903,7.488500851291485 6.690278532109428,7.398917518151281 6.801444666977305,7.317492934337639 6.918718365088803,7.24464202086549 7.041502026559884,7.180736009290964 7.169169973996225,7.126100550000477 7.301071640801801,7.081014052771006 7.436534886317138,7.045706268057682 7.574869420894044,7.020357116238134 7.715370323453427,7.005095770779493 7.857321633601533,7 7.999999999999997,7.005095770779493 8.142678366398462,7.020357116238134 8.284629676546567,7.04570626805768 8.42513057910595,7.081014052771004 8.563465113682856,7.126100550000476 8.698928359198193,7.180736009290962 8.83083002600377,7.244642020865487 8.95849797344011,7.281120925915111 9.019979886500282))"
+ };
+
+static std::string collinear_opposite_right[2] =
+ {
+ "POLYGON((7 6,7 8,8 9,8 5,7 6))",
+ "POLYGON((5.9 5.9,5.9 10.1,7 9,7 7,5.9 5.9))"
+ };
+
+static std::string collinear_opposite_left[2] =
+ {
+ "POLYGON((7 6,7 8,6 9,8 11,8 5,7 6))",
+ "POLYGON((5 7,7 9,7 7,9 5,8 4,5 7))"
+ };
+
+static std::string collinear_opposite_straight[2] =
+ {
+ "POLYGON((7 6,7 8,7 9,8 8,8 7,7 6))",
+ "POLYGON((6 6,6 9,7 10,7 7,7 5,6 6))"
+ };
+
+static std::string ticket_9081_15[2] =
+ {
+ "POLYGON((0.6733025292237357 0.1677633042748119,0.4903155795903966 0.2232818375071136,0.4271130992272586 0.3070047723327289,0.786116554767879 0.3837165261542967,0.6733025292237357 0.1677633042748119))",
+ "POLYGON((0.6331466887796691 0.351029969741811,0.7496863892358909 0.3759321389935647,0.7688695634785153 0.35070163001261,0.7290398105918782 0.2744578879686089,0.6331466887796691 0.351029969741811))"
+ };
+
+static std::string ticket_9081_314[2] =
+ {
+ "POLYGON((0.4397162028773298 0.5045841729755439,0.8281201612335258 0.8974555101699454,0.7367863490883197 0.2443919592743702,0.4397162028773298 0.5045841729755439))",
+ "POLYGON((0.5414573257656662 0.6074955108670699,0.5789048944501695 0.6005510671998147,0.6254781598681494 0.5392960142449524,0.7838704066548215 0.5810567836448409,0.7367863490883197 0.2443919592743702,0.4522347054548293 0.4936197023297791,0.4539963238827925 0.4940841246816053,0.4402150043376781 0.5050887115944368,0.5414573257656662 0.6074955108670699))"
+ };
+
+static std::string ticket_9081_6690[2] =
+ {
+ "POLYGON((0.5489109414010371 0.5774835110050927,0.4099611282054447 0.4644351568071598,0.4294011278595494 0.4843224236729239,0.4205359995313906 0.5115225580860201,0.4441572412013468 0.5184999851878852,0.5489109414010371 0.5774835110050927))",
+ "POLYGON((0.3984249865018206 0.4526335964808558,0.3621206996557855 0.4602288471829723,0.4183516736935784 0.4730187483833363,0.4099611282054451 0.4644351568071601,0.3984249865018206 0.4526335964808558))"
+ };
+
+static std::string ticket_9563[2] =
+ {
+ "POLYGON((16.4030230586813990 21.4147098480789640, 17.3451877762964380 14.8677773110138890, 11.9421647176150360 6.4530674629349205, 5.5969769413186015 4.5852901519210345, 4.6548122237035621 11.1322226889861170, 10.0578352823849610 19.5469325370650790, 16.4030230586813990 21.4147098480789640, 16.4030230586813990 21.4147098480789640))",
+ "POLYGON((16.4030230586814020 21.414709848078967, 17.7828326880709360 18.936596729241124, 17.3451877762964410 14.867777311013885, 15.2073549240394820 10.298488470659295, 11.9421647176150340 6.4530674629349125, 8.4245222359685457 4.3618917414181650, 5.5969769413185944 4.5852901519210292, 4.2171673119290620 7.0634032707588670, 4.6548122237035567 11.132222688986115, 6.7926450759605128 15.701511529340699, 10.0578352823849570 19.546932537065082, 13.5754777640314510 21.638108258581831, 16.4030230586814020 21.414709848078967))"
+ };
+
+static std::string ticket_10108_a[2] =
+ {
+ "POLYGON((-0.85012528418186883439 0.66468648958045217778 , -1.0190633474909247536 0.58375169123203618504 , -0.81735787096893253167 0.85208889314502478385 , -0.85012528418186883439 0.66468648958045217778))",
+ "POLYGON((-1.0898104946524889147 1.0651111163194444398 , -1.0543813205484939832 0.82438792455048248708 , -0.81735787088719669136 0.8520888930811181261 , -1.0898104946524889147 1.0651111163194444398))"
+ };
+static std::string ticket_10108_b[2] =
+ {
+ "POLYGON((818.61020100991334 686.40744987236633, 818.94520828641623 714.37814489343316, 857.67308553468195 713.83138513092547, 857.33807828316174 685.94987141847253, 818.61020100991334 686.40744987236633))",
+ "POLYGON((857.33807828316174 685.94987141847253, 857.64395373587263 711.40684463430682, 910.49336536223325 710.67130033421233, 910.18750000000000 685.32544378698219, 857.33807828316174 685.94987141847253))"
+ };
+
+// Rescaling problem (fixed in 1.58)
+static std::string ticket_10747_a[2] =
+ {
+ "POLYGON((0 33554432,0 0,33554432 0,33554432 33554432,0 33554432))",
+ "POLYGON((25165824 25165824,41943040 25165824,41943040 41943040,25165824 41943040,25165824 25165824))"
+ };
+static std::string ticket_10747_b[2] =
+ {
+ "POLYGON((0 335544320,0 0,335544320 0,335544320 335544320,0 335544320))",
+ "POLYGON((251658240 251658240,419430400 251658240,419430400 419430400,251658240 419430400,251658240 251658240))"
+ };
+static std::string ticket_10747_c[2] =
+ {
+ "POLYGON((0 16777216,0 0,16777216 0,16777216 16777216,0 16777216))",
+ "POLYGON((12582912 12582912,20971520 12582912,20971520 20971520,12582912 20971520,12582912 12582912))"
+ };
+static std::string ticket_10747_d[2] =
+ {
+ "POLYGON((0 3355443,0 0,3355443 0,3355443 3355443,0 3355443))",
+ "POLYGON((2516582 2516582,4194304 2516582,4194304 4194304,2516582 4194304,2516582 2516582))"
+ };
+static std::string ticket_10747_e[2] =
+ {
+ "POLYGON((0 0.00000033554432,0 0,0.00000033554432 0,0.00000033554432 0.00000033554432,0 0.00000033554432))",
+ "POLYGON((0.00000025165824 0.00000025165824,0.00000041943040 0.00000025165824,0.00000041943040 0.00000041943040,0.00000025165824 0.00000041943040,0.00000025165824 0.00000025165824))"
+ };
+
+static std::string ticket_10658[2] =
+ {
+ "POLYGON((516 1608,1308 1932,2094 2466,2094 32767,516 32767,516 1608))",
+ "POLYGON((516 2484,1308 3066,2094 3150,2094 32767,516 32767,516 2484))"
+ };
+
+static std::string ticket_10835[3] =
+ {
+ "MULTILINESTRING((5239 2113,1020 2986))",
+ "POLYGON((5233 2113,5200 2205,1020 2205,1020 2022,5200 2022))",
+ "POLYGON((5233 2986,5200 3078,1020 3078,1020 2895,5200 2895))"
+ };
+
+static std::string ticket_10866[2] =
+ {
+ "POLYGON((8126 3.18455e+07,8127 3.18455e+07,8129 3.18455e+07,8130 3.18455e+07,8130 -146305,8129 -146306,8127 -146306,8126 -146305,8126 3.18455e+07))",
+ "POLYGON((5.12064e+07 -146302,5.12064e+07 -146303,5.12064e+07 -146305,5.12064e+07 -146306,8127 -146306,8126 -146305,8126 -146303,8127 -146302,5.12064e+07 -146302))"
+ };
+
+static std::string ticket_10868[2] =
+ {
+ "POLYGON((42817136 -3774506,43029074 -3929862,31446819 18947953,30772384 19615678,30101303 19612322,30114725 16928001,33520458 6878575,35332375 2413654,35725796 2024148))",
+ "POLYGON((-33386239 -33721784,33721785 -33386239,33386240 33721785,-33721784 33386240))"
+ };
+
+static std::string ticket_11121[2] =
+ {
+ "POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
+ "POLYGON((-7901 -1485,-7901 529,-7901 529,15802 544,15802 -1485,-7901 -1485))"
+ };
+
+
+static std::string ticket_11576[2] =
+ {
+ "POLYGON((-0 0,0.0030892383152813277 0,0.0017033357506405240 0.0015364430953530355,-0 0))",
+ "POLYGON((0.0016845031281539609 0.0015194556912103366,0.00079878052059454633 0.00072051609032968962,0.0023117731015916947 0.00082400923980274917,0.0016845031281539609 0.0015194556912103366))"
+ };
+
+static std::string ticket_11725[2] =
+ {
+ "POLYGON((0 0, 0 1, 3 1, 3 0, 0 0))",
+ "POLYGON((0 1, 0 3, 3 3, 3 1, 2 2, 1 2 , 1 1, 0 1))"
+ };
+
+// Integer, ccw, open
+static std::string ticket_11676[2] =
+ {
+ "POLYGON((1920 1660,1920 1462,3720 1462,3720 3262,1920 3262,1920 1959,2218 2189,1920 1660),(3718 1561,3360 2233,3718 1957,3718 1561),(2818 2653,2218 2189,2818 3253,3360 2233,2818 2653))",
+ "POLYGON((1918 2155,1918 1957,2818 2653,3718 1957,3718 2154,2818 3055,1918 2155))",
+ };
+
+static std::string mysql_21964079_1[2] =
+ {
+ "POLYGON((7 3,0 10,0 -6,9 -5, 7 7, 7 3), (0 8, 2 3, 2 -2, 0 8))",
+ "POLYGON((0 8,-8 14,-11 18,-19 11, -3 1, 0 8))"
+ };
+
+static std::string mysql_21964079_2[2] =
+ {
+ "POLYGON((0 0,0 10,10 10,10 0,0 0), (0 8, 4 4, 4 6, 0 8))",
+ "POLYGON((0 8,-8 8,-10 4,0 8))"
+ };
+
+static std::string mysql_21964049[2] =
+ {
+ "POLYGON((7 0,10 -3,7 1,7 0))",
+ "POLYGON((7 4,-14 10,7 -17,7 4),(7 1,0 3,-2 4,7 1))"
+ };
+
+static std::string mysql_21964465[2] =
+ {
+ "POLYGON((0 0,0 10,10 10,10 0, 0 0), (0 8, 4 4, 4 6, 0 8))",
+ "POLYGON((0 8,-8 8,-2 2,0 8))",
+ };
+
+static std::string mysql_21977775[2] =
+ {
+ "POLYGON((8 6, 5 7, -1 4, -8 -7, 0 -17, 8 6), (3 6, 5 5, 0 -2, 3 6))",
+ "POLYGON((3 3, -17 11, -8 -3, 3 3))",
+ };
+
+static std::string mysql_21965285[2] =
+ {
+ "POLYGON((7 3, 0 10, 0 -6, 9 -5, 7 7, 7 3), (0 8, 2 3, 2 -2, 0 8))",
+ "POLYGON((0 6, 0 8, -14 13, 0 6))",
+ };
+
+static std::string mysql_21965285_b_inv[2] =
+ {
+ "POLYGON((3 0, -19 -19, -7 3, -2 10, 15 0, 3 0))",
+ "POLYGON((-20 -20,-20 20,20 20,20 -20,-20 -20),(1 1, -4 -3, 19 -8, 3 0, 1 1),(3 0, 8 12, 1 19, -3 16, -2 7, 3 0))"
+ };
+
+static std::string mysql_23023665_1[2] =
+ {
+ "POLYGON((7 3,0 10,0 -6,9 -5,7 7,7 3),(0 8,2 3,2 -2,0 8))",
+ "POLYGON((0 8,-8 14,-11 18,-19 11,-3 1,0 8))"
+ };
+
+static std::string mysql_23023665_2[2] =
+ {
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 8,4 4,4 6,0 8))",
+ "POLYGON((0 8,-8 8,-10 4,0 8))"
+ };
+
+static std::string mysql_23023665_3[2] =
+ {
+ "POLYGON((5 0,15 18,-14 11,5 0),(0 3,-1 4,5 0,0 3))",
+ "POLYGON((6 0,-5 0,-1 -12,6 0))"
+ };
+
+// mysql_23023665_4 was duplicate with mysql_21964049
+
+static std::string mysql_23023665_5[2] =
+ {
+ "POLYGON((8 6,5 7,-1 4,-8 -7,0 -17,8 6),(3 6,5 5,0 -2,3 6))",
+ "POLYGON((3 5,-17 11,-8 -3,3 5))"
+ };
+
+static std::string mysql_23023665_6[2] =
+ {
+ "POLYGON((6 7,18 14, -8 1, 0 0, 18 -8, 6 7), (6 0, -4 3, 5 3, 6 0))",
+ "POLYGON((2 3,-3 5,-10 -1,2 3))"
+ };
+
+static std::string mysql_23023665_10[2] =
+ {
+ "POLYGON((0 5, -6 -17, 12 17, 0 5),(4 6, 5 5, 0 1, 4 6))",
+ "POLYGON((3 9, -15 -5, 13 -11, 3 9))"
+ };
+
+static std::string mysql_23023665_11[2] =
+ {
+ "POLYGON((5 6,-15 -13,1 -8,5 6))",
+ "POLYGON((0 8,-19 6,18 -17,20 8,11 17,0 8),(3 2,3 -1,1 0,3 2),(1 3,4 4,0 -1,1 3))"
+ };
+
+static std::string mysql_23023665_13[2] =
+{
+ "POLYGON((6 7,18 14,-8 1,0 0,18 -8,6 7),(6 0,-4 3,5 3,6 0))",
+ "POLYGON((0 7,-5 6,11 -13,0 7))"
+};
+
+#endif // BOOST_GEOMETRY_TEST_OVERLAY_CASES_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/overlay_common.hpp b/src/boost/libs/geometry/test/algorithms/overlay/overlay_common.hpp
new file mode 100644
index 000000000..01fd109e5
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/overlay_common.hpp
@@ -0,0 +1,464 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_OVERLAY_COMMON_HPP
+#define BOOST_GEOMETRY_TEST_OVERLAY_COMMON_HPP
+
+
+#if defined(_MSC_VER)
+// We deliberately mix float/double's here so turn off warning
+#pragma warning( disable : 4244 )
+
+#endif // defined(_MSC_VER)
+
+
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
+
+
+
+template <typename G1, typename G2, typename Functor, typename T>
+void test_overlay(std::string const& id, T const& expected,
+ std::string const& wkt1, std::string const& wkt2,
+ double precision = 0.001)
+{
+ if (wkt1.empty() || wkt2.empty())
+ {
+ return;
+ }
+
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ bg::correct(g1);
+ bg::correct(g2);
+
+ //std::cout << bg::wkt(g1) << std::endl;
+ //std::cout << bg::wkt(g2) << std::endl;
+
+ // Try the overlay-function in both ways
+ std::string caseid = id;
+//goto case_reversed;
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << caseid << std::endl;
+#endif
+ Functor::template apply(caseid, expected, g1, g2, precision);
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ return;
+#endif
+
+//case_reversed:
+#if ! defined(BOOST_GEOMETRY_TEST_OVERLAY_NOT_EXCHANGED)
+ caseid = id + "_rev";
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << caseid << std::endl;
+#endif
+
+ Functor::template apply(caseid, expected, g2, g1, precision);
+#endif
+}
+
+
+#if ! defined(BOOST_GEOMETRY_TEST_MULTI)
+
+template <typename P, typename Functor, typename T>
+void test_all(std::vector<T> const& expected)
+{
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::box<P> box;
+
+ // compilation test only, will not output
+ //test_overlay<box, polygon, Functor>("", "", "", "");
+ typename boost::range_const_iterator<std::vector<T> >::type iterator
+ = boost::begin(expected);
+
+
+#ifndef ONLY_CASE_BRANDON
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("1", *iterator,
+ "POLYGON((0 1,2 5,5 3,0 1))",
+ "POLYGON((3 0,0 3,4 5,3 0))");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("2", *iterator,
+ "POLYGON((0 2,2 5,5 3,3 0,0 2))",
+ "POLYGON((0 4,4 5,5 1,1 0,0 4))");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("3", *iterator,
+ "POLYGON((1 2,2 4,4 3,3 1,1 2))",
+ "POLYGON((1 1,1 4,4 4,4 1,1 1))");
+ test_overlay<polygon, box, Functor>("3b", *iterator,
+ "POLYGON((1 2,2 4,4 3,3 1,1 2))",
+ "BOX(1 1,4 4)");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("4", *iterator,
+ "POLYGON((0 2,2 5,5 3,3 0,0 2))",
+ "POLYGON((0 4,4 5,5 1,1 0,0 4),(1 1,2 1,2 2,1 2,1 1),(3 3,4 3,4 4,3 4,3 3))");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("5", *iterator,
+ "POLYGON((0 4,1 5,2.5 4,3.5 5,5 4,4 3,5 2,4 1,3.5 0,3 1,2.5 0,2 1,1.5 0,1 3.5,0.25 3,1 2.5,0 2,0 4))",
+ "POLYGON((0.5 0.5,0.5 4.5,4.5 4.5,4.5 0.5,0.5 0.5))"
+ );
+ test_overlay<polygon, box, Functor>("5b", *iterator,
+ "POLYGON((0 4,1 5,2.5 4,3.5 5,5 4,4 3,5 2,4 1,3.5 0,3 1,2.5 0,2 1,1.5 0,1 3.5,0.25 3,1 2.5,0 2,0 4))",
+ "BOX(0.5 0.5,4.5 4.5)"
+ );
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("6", *iterator,
+ "POLYGON((0 1,2 5,5 2,0 1))",
+ "POLYGON((1 3,2 5,5 2,1 3))");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("7", *iterator,
+ "POLYGON((0 1,1 3,5 2,0 1))",
+ "POLYGON((1 3,2 5,5 2,1 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("8", *iterator,
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 3,4 4,3 1,1 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("9", *iterator,
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((2 2,2 4,5 4,2 2))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("10", *iterator,
+ "POLYGON((0 0,2 4,4 0,0 0))",
+ "POLYGON((1 2,2 5,3 2,2 4,1 2))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("11", *iterator,
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 2,2 2,2 1,1 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("12", *iterator,
+ "POLYGON((0 1,1 4,2 2,3 4,4 1,0 1))",
+ "POLYGON((0 3,2 4,4 3,0 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("13", *iterator,
+ "POLYGON((0 1,1 2,3 0,0 1))",
+ "POLYGON((0 3,2 3,2 1,0 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("14", *iterator,
+ "POLYGON((0 0,0 4,2 2,4 0,0 0))",
+ "POLYGON((1 3,4 4,3 1,1 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("15", *iterator,
+ "POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))",
+ "POLYGON((1 3,4 4,3 1,1 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("16", *iterator,
+ "POLYGON((1 2,3 4,2 1,1 2))",
+ "POLYGON((1 0,1 2,2 1,3 4,2 3,3 5,4 0,1 0))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("17", *iterator,
+ "POLYGON((0 0,0 4,4 0,0 0))",
+ "POLYGON((1 1,1 3,3 1,1 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("18", *iterator,
+ "POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))",
+ "POLYGON((1 1,1 3,3 1,1 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("19", *iterator,
+ "POLYGON((2 0,1 3,5 2,2 0))",
+ "POLYGON((1 3,2 5,5 2,1 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("20", *iterator,
+ "POLYGON((2 0,1 3,5 2,2 0))",
+ "POLYGON((2 0,1 3,5 2,2 0))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("21", *iterator,
+ "POLYGON((1 0,0 5,5 2,1 0),(2 1,3 2,1 3,2 1))",
+ "POLYGON((2 1,1 3,3 2,2 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("22", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((2 4,5 5,4 2,2 4))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("23", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((3 3,4 2,1 1,3 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("24", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((2 2,4 2,1 1,2 2))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("25", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((3 1,4 2,5 0,3 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("26", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((3 1,4 2,5 4,4 0,3 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("27", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((1 1,4 2,5 0,1 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("28", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((1 1,4 2,5 4,5 0,1 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("29", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((4 4,5 1,4 2,1 1,4 4))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("30", *iterator,
+ "POLYGON((1 0,0 3,2 2,3 3,1 0))",
+ "POLYGON((1 2,2 2,2 4,4 3,3 1,1 2))");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("31", *iterator,
+ "POLYGON((0 0,0 3,2 2,0 0))",
+ "POLYGON((4 1,2 2,3 3,4 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("32", *iterator,
+ "POLYGON((0 0,0 3,2 2,0 0))",
+ "POLYGON((4 1,3 0,2 2,4 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("33", *iterator,
+ "POLYGON((0 0,0 3,2 2,0 0))",
+ "POLYGON((3 3,3 0,2 2,3 3))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("34", *iterator,
+ "POLYGON((2 0,0 3,4 2,2 0))",
+ "POLYGON((2 1,4 2,5 3,4 1,2 1))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("35", *iterator,
+ "POLYGON((1 0,0 3,5 3,4 2,5 1,1 0))",
+ "POLYGON((2 2,4 2,4 1,2 2))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("36", *iterator,
+ "POLYGON((1 0,0 3,4 2,1 0))",
+ "POLYGON((1 5,5 5,4 2,3 3,2 1,1 2,1 5))");
+ iterator++;
+
+ // 37,38 in PPT but not yet implemented
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("37", *iterator,
+ "POLYGON((4 0,2 2,5 5,4 0))",
+ "POLYGON((0 2,4 3,2 2,4 1,0 2))");
+ iterator++;
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("38", *iterator,
+ "POLYGON((4 0,3 3,2 2,4 5,5 2,4 0))",
+ "POLYGON((1 1,1 3,4 4,3 3,4 2,1 1))");
+ iterator++;
+
+
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("39", *iterator,
+ "POLYGON((0 4,4 8,7 7,8 4,5 3,4 0,0 4))",
+ "POLYGON((0 4,4 8,5 5,8 4,7 1,4 0,0 4))");
+ iterator++;
+
+ // keyholing
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("43", *iterator,
+ "POLYGON((1 2,1 1,2 1,2 2.25,3 2.25,3 0,0 0,0 3,3 3,2.75 2,1 2))",
+ "POLYGON((1.5 1.5,1.5 2.5,2.5 2.5,2.5 1.5,1.5 1.5))");
+ iterator++;
+
+ // self-tangency
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("44", *iterator,
+ "POLYGON((0 0,0 3,3 3,3 2,0 1.5,3 1,3 0,0 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))");
+ iterator++;
+
+ // self-intersection
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("45", *iterator,
+ "POLYGON((0.5 0,0.5 3,3 3,3 2,0 1.5,3 1,3 0,0.5 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))");
+ iterator++;
+
+ // self-tangent
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("46", *iterator,
+ "POLYGON((2 0,2 3,5 3,5 2,2 1.5,5 1,5 0,2 0))",
+ "POLYGON((1.5 1,1.5 2,2.5 2,2.5 1,1.5 1))");
+ iterator++;
+
+ // self-tangent
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("47", *iterator,
+ "POLYGON((2.5 0,2.5 3,5 3,5 2,2 1.5,5 1,5 0,2.5 0))",
+ "POLYGON((2 1,2 2,3 2,3 1,2 1))");
+ iterator++;
+
+
+ // 49, all
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<polygon, polygon, Functor, T>("49", *iterator,
+ "POLYGON((2 6,2 14,10 18,18 14,18 6,16 5,14 4,12 3,10 2,8 3,6 4,4 5,2 6))",
+ "POLYGON((2 6,2 7,2 8,2 9,2 10,2 11,2 12,1 14"
+ ",4 14,4 15,7 15,7 18,8 17,9 20,10 18"
+ ",10 15.5,11 17.5,12 17,11 15,12 14.5,13 16.5,14 18.5,15 18,14 16,15 15.5,16 17.5,18 14"
+ ",19 13,17 11,19 9,19 7"
+ ",17 5,16 5,15 4.5,13 3.5,11 2.5,10 2"
+ ",8 3,6 4,4 5,2 6))");
+ iterator++;
+
+
+ // ticket #17
+ BOOST_ASSERT(iterator != boost::end(expected));
+ std::string const ticket17 = "POLYGON ((-122.28139163 37.37319149,-122.28100699 37.37273669,-122.28002186 37.37303123,-122.27979681 37.37290072,-122.28007349 37.37240493,-122.27977334 37.37220360,-122.27819720 37.37288580,-122.27714184 37.37275161,-122.27678628 37.37253167,-122.27766437 37.37180973,-122.27804382 37.37121453,-122.27687664 37.37101354,-122.27645829 37.37203386,-122.27604423 37.37249110,-122.27632234 37.37343339,-122.27760980 37.37391082,-122.27812478 37.37800320,-122.26117222 37.39121007,-122.25572289 37.39566631,-122.25547269 37.39564971,-122.25366304 37.39552993,-122.24919976 37.39580268,-122.24417933 37.39366907,-122.24051443 37.39094143,-122.23246277 37.38100418,-122.23606766 37.38141338,-122.24001587 37.37738940,-122.23666848 37.37609347,-122.23057450 37.37882170,-122.22679803 37.37807143,-122.22525727 37.37448817,-122.22523229 37.37443000,-122.23083199 37.37609347,-122.23033486 37.37777891,-122.23169030 37.37732117,-122.23229178 37.37709687,-122.23237761 37.37631249,-122.23297776 37.37438834,-122.23872850 37.37165986,-122.24044511 37.36934068,-122.24671067 37.36865847,-122.24825570 37.36981819,-122.25151719 37.36947713,-122.25357721 37.36756706,-122.26001451 37.36579354,-122.25615213 37.36545239,-122.25486458 37.36245083,-122.25357721 37.36108651,-122.25194642 37.36013139,-122.24885652 37.35958557,-122.24911401 37.35849399,-122.25357721 37.35808470,-122.25675286 37.35897159,-122.25855539 37.35753887,-122.26181687 37.35828939,-122.26713837 37.35897159,-122.26782510 37.36108651,-122.26662339 37.36456559,-122.27288911 37.36722601,-122.27366159 37.36531602,-122.27168740 37.36470213,-122.27391900 37.36374701,-122.27074326 37.36245083,-122.27134408 37.35951742,-122.27426240 37.36135926,-122.27709482 37.36115474,-122.27966974 37.36231438,-122.27958391 37.36463382,-122.27572152 37.36463382,-122.27563569 37.36524779,-122.27700899 37.36593000,-122.27709482 37.36763529,-122.27554978 37.36838573,-122.27667254 37.36931478,-122.27677932 37.36932073,-122.27769362 37.36853987,-122.27942490 37.36830803,-122.28178776 37.36677917,-122.28509559 37.36443500,-122.28845129 37.36413744,-122.29194403 37.36695946,-122.29382577 37.36726817,-122.29600414 37.36898512,-122.29733083 37.36995398,-122.29593239 37.37141436,-122.29416649 37.37075898,-122.29325026 37.37108436,-122.29652910 37.37311697,-122.29584237 37.37374461,-122.29537583 37.37573372,-122.29487677 37.37752502,-122.30923212 37.37593011,-122.31122484 37.38230086,-122.31467994 37.38092472,-122.31715663 37.38252181,-122.32307970 37.38166978,-122.31985618 37.37667694,-122.32210304 37.37580220,-122.32581446 37.37589532,-122.32401730 37.37331839,-122.32960417 37.37189020,-122.33465527 37.37331906,-122.33425328 37.37623680,-122.33620676 37.37726132,-122.33397986 37.37822382,-122.33358918 37.38036590,-122.33202637 37.37986918,-122.33147954 37.38101784,-122.33394080 37.38198017,-122.33545239 37.38587943,-122.33478058 37.38785697,-122.33386050 37.38723721,-122.33350041 37.38571137,-122.33122003 37.38548891,-122.33140008 37.38650606,-122.33366042 37.38817490,-122.33244019 37.39157602,-122.33298157 37.39419201,-122.33164013 37.39477028,-122.33202017 37.39518351,-122.33358038 37.39499282,-122.33376050 37.39597811,-122.33550067 37.39734478,-122.33556069 37.39481797,-122.33344040 37.39292676,-122.33638094 37.38892189,-122.34240644 37.38852719,-122.34906293 37.38726898,-122.35072321 37.39338769,-122.34910291 37.39445252,-122.34796272 37.39410291,-122.34449043 37.39640534,-122.34500223 37.39729709,-122.34936291 37.39670910,-122.35098322 37.39531066,-122.35364623 37.39554510,-122.35434369 37.39612111,-122.35798429 37.39600988,-122.35768430 37.39478621,-122.36334519 37.39206871,-122.36604726 37.39203267,-122.36778592 37.39335592,-122.36518870 37.40022011,-122.36554552 37.40247752,-122.36370519 37.40331974,-122.36270506 37.40530591,-122.36320512 37.40670418,-122.36149849 37.40851392,-122.36730580 37.41054938,-122.37263720 37.41378932,-122.37161871 37.42076600,-122.36566153 37.42006292,-122.36520547 37.42742106,-122.37165953 37.43661157,-122.35943972 37.44459022,-122.35356359 37.44600810,-122.33792254 37.45796329,-122.35228518 37.47478091,-122.35127080 37.48181199,-122.34867342 37.48487322,-122.34359717 37.48801082,-122.33388431 37.48677650,-122.33142321 37.48429747,-122.32929580 37.48473149,-122.32609609 37.48291144,-122.32344850 37.48228229,-122.31924364 37.48410234,-122.31677299 37.48114051,-122.31431751 37.47848973,-122.31259201 37.47682190,-122.31515972 37.47568196,-122.31691389 37.47360309,-122.31292494 37.46960081,-122.31130153 37.46937743,-122.30889894 37.47124987,-122.30612839 37.47011613,-122.30149630 37.46568378,-122.30064277 37.46363784,-122.29283821 37.45922376,-122.28630141 37.45415497,-122.28883099 37.44629920,-122.28316717 37.44197138,-122.27554148 37.42297597,-122.25597410 37.40553692,-122.25196579 37.40129593,-122.25012043 37.40049143,-122.24823207 37.39897758,-122.24754551 37.39740941,-122.24778582 37.39621607,-122.24934787 37.39599102,-122.25005170 37.39871849,-122.25222328 37.39863668,-122.25342491 37.39737529,-122.25520162 37.39667289,-122.25528737 37.39522726,-122.27747460 37.37809616,-122.27977493 37.37858717,-122.28157729 37.37920106,-122.28322534 37.37952846,-122.28416939 37.38092656,-122.28621223 37.37984219,-122.28638389 37.37613857,-122.28382607 37.37843722,-122.27930278 37.37718220,-122.28196361 37.37652740,-122.28295058 37.37568167,-122.28216101 37.37523148,-122.28114822 37.37543608,-122.27934569 37.37528613,-122.27996369 37.37448121,-122.28104521 37.37454944,-122.28185197 37.37422883,-122.28290767 37.37474038,-122.28376597 37.37467224,-122.28428104 37.37399012,-122.28402346 37.37338989,-122.28610922 37.37364914,-122.28651264 37.37327388,-122.28672722 37.37207343,-122.28628398 37.37205448,-122.28574460 37.37166682,-122.28479711 37.37200981,-122.28327731 37.37137228,-122.28285511 37.37100700,-122.28279409 37.37125669,-122.28315527 37.37173756,-122.28321872 37.37220569,-122.28187007 37.37231918,-122.28193109 37.37294908,-122.28139163 37.37319149))";
+ //test_overlay<polygon, polygon, Functor, T>("44", *iterator, ticket17, "POLYGON((-122.297 37.368, -122.297 37.413, -122.242 37.413, -122.242 37.368, -122.297 37.368))");
+ //test_overlay<polygon, box, Functor>("44b", *iterator, ticket17, "BOX(-122.297 37.368,-122.242 37.413)");
+ test_overlay<polygon, box, Functor>("ticket_17", *iterator, ticket17, "BOX(-122.280 37.377,-122.277 37.379)");
+ iterator++;
+
+#endif
+
+ // Boost.List case Brandon
+ BOOST_ASSERT(iterator != boost::end(expected));
+ {
+ std::string p5 = "POLYGON((37.29449462890625 1.7902572154998779,37.000419616699219 1.664225697517395,37.140213012695313 1.3446992635726929,50.974888957147442 -30.277285722290763,57.297810222148939 -37.546793343968417,41.590042114257813 -7.2021245956420898,40.6978759765625 -5.4500408172607422,40.758884429931641 -5.418975830078125,42.577911376953125 -4.4901103973388672,42.577877044677734 -4.4900407791137695,42.699958801269531 -4.4278755187988281,46.523914387974358 -8.5152102535033496,47.585065917176543 -6.1314922196594779,45.389434814453125 -4.5143837928771973,46.296027072709599 -2.4984308554828116,37.43402099609375 1.470055103302002,37.29449462890625 1.7902572154998779))";
+ std::string p6 = "POLYGON((42.399410247802734 1.4956772327423096,42.721500396728516 2.2342472076416016,42.721500396728516 3.6584999561309814,51.20102152843122 7.1738039562841562,51.370888500897557 7.4163459734570729,37.43402099609375 1.470055103302002,37.29449462890625 1.7902572154998779,37.000419616699219 1.664225697517395,37.140213012695313 1.3446992635726929,36.954700469970703 1.2597870826721191,26.472516656201325 -3.5380830513658776,27.069889344709196 -4.2926591211028242,30.501169204711914 -2.3718316555023193,32.708126068115234 -2.3611266613006592,32.708126068115234 -2.3611700534820557,32.708168029785156 -2.3611698150634766,32.718830108642578 -4.3281683921813965,29.135100397190627 -8.9262827849488211,29.619997024536133 -9.5368013381958008,30.339155197143555 -8.9838371276855469,30.670633316040039 -8.8180980682373047,30.896280288696289 -9.1206979751586914,30.207040612748258 -10.275926149505661,30.947774887084961 -11.208560943603516,31.669155120849609 -10.653837203979492,32.000633239746094 -10.488097190856934,32.226280212402344 -10.790698051452637,31.682494778186321 -12.133624901803865,32.274600982666016 -12.879127502441406,32.998821258544922 -12.323249816894531,33.339523315429688 -12.147735595703125,33.566280364990234 -12.450697898864746,33.164891643669634 -14.000060288415174,33.598796844482422 -14.546377182006836,34.328716278076172 -13.992490768432617,34.658355712890625 -13.81736946105957,34.886280059814453 -14.120697975158691,34.634240447128811 -15.85007183479255,34.931102752685547 -16.223842620849609,35.656356811523438 -15.66030216217041,35.963497161865234 -15.476018905639648,37.326129913330078 -17.190576553344727,38.823680877685547 -16.296066284179688,39.966808319091797 -17.625011444091797,40.800632476806641 -17.208097457885742,41.821544647216797 -19.211688995361328,41.988733475572282 -19.945838749437218,57.524304765518266 -37.807195733984784,41.590042114257813 -7.2021245956420898,40.6978759765625 -5.4500408172607422,40.758884429931641 -5.418975830078125,42.577911376953125 -4.4901103973388672,42.577877044677734 -4.4900407791137695,42.699958801269531 -4.4278755187988281,46.559533858616469 -8.435196445683264,47.604561877161387 -6.087697464505224,45.389434814453125 -4.5143837928771973,46.695858001708984 -1.6093428134918213,47.263670054709685 -1.784876824891044,47.830955505371094 -0.69758313894271851,48.43512638981781 -0.81299959072453376,49.071769542946825 0.61489892713413252,43.764598846435547 0.93951499462127686,43.644271850585938 0.96149998903274536,42.399410247802734 1.4956772327423096))";
+ test_overlay<polygon, polygon, Functor>("isovist", *iterator, p5, p6);
+ }
+ iterator++;
+
+
+ return;
+
+
+#if ! defined(NO_LINESTRING_INTERSECTION)
+ BOOST_ASSERT(iterator != boost::end(expected));
+ test_overlay<linestring, linestring, Functor, T>("100", *iterator,
+ "LINESTRING(0 1,2 5,5 3)",
+ "LINESTRING(3 0,0 3,4 5)");
+#endif
+
+
+
+/*
+
+ test_overlay<box, polygon, Functor>(11, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))");
+ test_overlay<box, polygon, Functor>(21, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2))");
+ test_overlay<box, polygon, Functor>(12, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,5.3 2.5,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))");
+ test_overlay<box, polygon, Functor>(13, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))");
+ test_overlay<box, polygon, Functor>(23, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 2.3,5.0 2.3,5.0 2.1,4.5 2.1,4.5 1.9,4.0 1.9,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))");
+
+ test_overlay<box, polygon, Functor>(14, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 1.2,2.9 0.7,2 1.3))");
+
+ test_overlay<box, polygon, Functor>(15, "box(1.5 1.5, 4.5 2.5)",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.0 3.0,5.0 2.0,2.9 0.7,2 1.3))");
+
+ test_overlay<box, polygon, Functor>(16, "box(0 0, 3 3)",
+ "POLYGON((2 2, 1 4, 2 4, 3 3, 2 2))");
+
+ test_overlay<box, polygon, Functor>(19, "box(115041.10 471900.10, 118334.60 474523.40)",
+ "POLYGON ((115483.40 474533.40, 116549.40 474059.20, 117199.90 473762.50, 117204.90 473659.50, 118339.40 472796.90, 118334.50 472757.90, 118315.10 472604.00, 118344.60 472520.90, 118277.90 472419.10, 118071.40 472536.80, 118071.40 472536.80, 117943.10 472287.70, 117744.90 472248.40, 117708.00 472034.50, 117481.90 472056.90, 117481.90 472056.90, 117272.30 471890.10, 117077.90 472161.20, 116146.60 473054.50, 115031.10 473603.30, 115483.40 474533.40))");
+*/
+}
+#endif
+
+#endif // BOOST_GEOMETRY_TEST_OVERLAY_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/relative_order.cpp b/src/boost/libs/geometry/test/algorithms/overlay/relative_order.cpp
new file mode 100644
index 000000000..8d2a5b47a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/relative_order.cpp
@@ -0,0 +1,220 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/get_relative_order.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <boost/geometry/strategies/side.hpp>
+#include <boost/geometry/strategies/cartesian/side_by_triangle.hpp>
+
+
+template <typename P, typename T>
+void test_with_point(std::string const& /*caseid*/,
+ T pi_x, T pi_y, T pj_x, T pj_y,
+ T ri_x, T ri_y, T rj_x, T rj_y,
+ T si_x, T si_y, T sj_x, T sj_y,
+ int expected_order)
+{
+ P pi = bg::make<P>(pi_x, pi_y);
+ P pj = bg::make<P>(pj_x, pj_y);
+ P ri = bg::make<P>(ri_x, ri_y);
+ P rj = bg::make<P>(rj_x, rj_y);
+ P si = bg::make<P>(si_x, si_y);
+ P sj = bg::make<P>(sj_x, sj_y);
+
+ typedef typename bg::strategy::side::services::default_strategy
+ <
+ typename bg::cs_tag<P>::type
+ >::type strategy_type;
+
+ int order = bg::detail::overlay::get_relative_order::apply(pi, pj, ri, rj, si, sj, strategy_type());
+
+ BOOST_CHECK_EQUAL(order, expected_order);
+
+
+
+
+ /*
+ std::cout << caseid
+ << (caseid.find("_") == std::string::npos ? " " : "")
+ << " " << method
+ << " " << detected
+ << " " << order
+ << std::endl;
+ */
+
+
+
+/*#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "get_turn_info_" << caseid
+ << "_" << string_from_type<typename bg::coordinate_type<P>::type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<P> mapper(svg, 500, 500);
+ mapper.add(bg::make<P>(0, 0));
+ mapper.add(bg::make<P>(10, 10));
+
+ bg::model::linestring<P> p; p.push_back(pi); p.push_back(pj); p.push_back(pk);
+ bg::model::linestring<P> q; q.push_back(qi); q.push_back(qj); q.push_back(qk);
+ mapper.map(p, "opacity:0.8;stroke:rgb(0,192,0);stroke-width:3");
+ mapper.map(q, "opacity:0.8;stroke:rgb(0,0,255);stroke-width:3");
+
+ std::string style = ";font-family='Verdana';font-weight:bold";
+ std::string align = ";text-anchor:end;text-align:end";
+ int offset = 8;
+
+ mapper.text(pi, "pi", "fill:rgb(0,192,0)" + style, offset, offset);
+ mapper.text(pj, "pj", "fill:rgb(0,192,0)" + style, offset, offset);
+ mapper.text(pk, "pk", "fill:rgb(0,192,0)" + style, offset, offset);
+
+ mapper.text(qi, "qi", "fill:rgb(0,0,255)" + style + align, -offset, offset);
+ mapper.text(qj, "qj", "fill:rgb(0,0,255)" + style + align, -offset, offset);
+ mapper.text(qk, "qk", "fill:rgb(0,0,255)" + style + align, -offset, offset);
+
+
+ int factor = 1; // second info, if any, will go left by factor -1
+ int ch = '1';
+ for (typename tp_vector::const_iterator it = info.begin();
+ it != info.end();
+ ++it, factor *= -1, ch++)
+ {
+ bool at_j = it->method == bg::detail::overlay::method_crosses;
+ std::string op;
+ op += operation_char(it->operations[0].operation);
+ align = ";text-anchor:middle;text-align:center";
+ mapper.text(at_j ? pj : pk, op, "fill:rgb(255,128,0)" + style + align, offset * factor, -offset);
+
+ op.clear();
+ op += operation_char(it->operations[1].operation);
+ mapper.text(at_j ? qj : qk, op, "fill:rgb(255,128,0)" + style + align, offset * factor, -offset);
+
+ // Map intersection point + method
+ mapper.map(it->point, "opacity:0.8;fill:rgb(255,0,0);stroke:rgb(0,0,100);stroke-width:1");
+
+ op.clear();
+ op += method_char(it->method);
+ if (info.size() != 1)
+ {
+ op += ch;
+ op += " p:"; op += operation_char(it->operations[0].operation);
+ op += " q:"; op += operation_char(it->operations[1].operation);
+ }
+ mapper.text(it->point, op, "fill:rgb(255,0,0)" + style, offset, -offset);
+ }
+ }
+#endif
+*/
+}
+
+
+
+template <typename P>
+void test_all()
+{
+ test_with_point<P, double>("OLR1",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 3, 3, 7, 2, // s
+ 1);
+ test_with_point<P, double>("OLR2",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 3, 7, 7, 6, // s
+ -1);
+ test_with_point<P, double>("OLR3",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 4, 2, 9, 6, // s
+ 1);
+ test_with_point<P, double>("OLR4",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 3, 8, 9, 4, // s
+ -1);
+ test_with_point<P, double>("OLR5",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 4, 2, 8, 6, // s
+ 1);
+ test_with_point<P, double>("OLR6",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 3, 7, 9, 4, // s
+ -1);
+ test_with_point<P, double>("OLR7",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 1, 4, 7, 7, // s
+ -1);
+ test_with_point<P, double>("OLR8",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 1, 6, 7, 3, // s
+ 1);
+
+
+ test_with_point<P, double>("OD1",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 7, 2, 3, 3, // s
+ 1);
+
+ test_with_point<P, double>("OD9",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 7, 5, 3, 3, // s
+ 1);
+ test_with_point<P, double>("OD10",
+ 5, 1, 5, 8, // p
+ 3, 5, 7, 5, // r
+ 7, 5, 3, 7, // s
+ -1);
+ test_with_point<P, double>("OD11",
+ 5, 1, 5, 8, // p
+ 7, 5, 3, 5, // r
+ 3, 5, 7, 7, // s
+ -1);
+ test_with_point<P, double>("OD12",
+ 5, 1, 5, 8, // p
+ 7, 5, 3, 5, // r
+ 3, 5, 7, 3, // s
+ 1);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/select_rings.cpp b/src/boost/libs/geometry/test/algorithms/overlay/select_rings.cpp
new file mode 100644
index 000000000..af43328f5
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/select_rings.cpp
@@ -0,0 +1,118 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+//
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/foreach.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/typeof/typeof.hpp>
+
+#include <algorithms/test_overlay.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/algorithms/detail/overlay/select_rings.hpp>
+#include <boost/geometry/algorithms/detail/overlay/assign_parents.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#include <boost/assign/list_of.hpp>
+
+
+template
+<
+ typename Geometry1,
+ typename Geometry2,
+ bg::overlay_type OverlayType,
+ typename RingIdVector
+>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ RingIdVector const& expected_ids)
+{
+ typedef bg::detail::overlay::ring_properties
+ <
+ typename bg::point_type<Geometry1>::type,
+ double
+ > properties;
+
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ typedef std::map<bg::ring_identifier, properties> map_type;
+ map_type selected;
+ std::map<bg::ring_identifier, bg::detail::overlay::ring_turn_info> empty;
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry1>::type
+ >::type strategy_type;
+
+ bg::detail::overlay::select_rings<OverlayType>(geometry1, geometry2, empty, selected, strategy_type());
+
+ BOOST_CHECK_EQUAL(selected.size(), expected_ids.size());
+
+ if (selected.size() <= expected_ids.size())
+ {
+ BOOST_AUTO(eit, expected_ids.begin());
+ for(typename map_type::const_iterator it = selected.begin(); it != selected.end(); ++it, ++eit)
+ {
+ bg::ring_identifier const ring_id = it->first;
+ BOOST_CHECK_EQUAL(ring_id.source_index, eit->source_index);
+ BOOST_CHECK_EQUAL(ring_id.multi_index, eit->multi_index);
+ BOOST_CHECK_EQUAL(ring_id.ring_index, eit->ring_index);
+ }
+ }
+}
+
+
+
+
+template <typename P>
+void test_all()
+{
+ // Point in correct clockwise ring -> should return true
+ typedef bg::ring_identifier rid;
+
+ test_geometry<bg::model::polygon<P>, bg::model::polygon<P>, bg::overlay_union>(
+ winded[0], winded[1],
+ boost::assign::list_of
+ (rid(0,-1,-1))
+ (rid(0,-1, 0))
+ (rid(0,-1, 1))
+ (rid(0,-1, 3))
+ (rid(1,-1, 1))
+ (rid(1,-1, 2)));
+
+ test_geometry<bg::model::polygon<P>, bg::model::polygon<P>, bg::overlay_intersection>(
+ winded[0], winded[1],
+ boost::assign::list_of
+ (rid(0,-1, 2))
+ (rid(1,-1,-1))
+ (rid(1,-1, 0))
+ (rid(1,-1, 3)));
+}
+
+
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp b/src/boost/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp
new file mode 100644
index 000000000..2d7a42039
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp
@@ -0,0 +1,279 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+//#include <boost/geometry/algorithms/detail/overlay/self_intersection_points.hpp>
+#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
+#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+template <typename Geometry>
+static void test_self_intersection_points(std::string const& case_id,
+ std::size_t expected_count,
+ Geometry const& geometry,
+ bool check_has_intersections,
+ double /*precision*/ = 0.001)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+ //typedef typename bg::rescale_policy_type<point_type>::type rescale_policy_type;
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type strategy_type;
+ typedef bg::detail::no_rescale_policy rescale_policy_type;
+ typedef bg::detail::overlay::turn_info<point_type> turn_info;
+
+ std::vector<turn_info> turns;
+
+ strategy_type strategy;
+ rescale_policy_type rescale_policy;
+
+ bg::detail::self_get_turn_points::no_interrupt_policy policy;
+ bg::self_turns
+ <
+ bg::detail::overlay::assign_null_policy
+ >(geometry, strategy, rescale_policy, turns, policy);
+
+
+ typedef typename bg::coordinate_type<Geometry>::type ct;
+ ct zero = ct();
+ ct x = zero, y = zero;
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ x += bg::get<0>(turn.point);
+ y += bg::get<1>(turn.point);
+ }
+ std::size_t n = boost::size(turns);
+ if (n > 0)
+ {
+ x /= n;
+ y /= n;
+ }
+
+ BOOST_CHECK_EQUAL(expected_count, n);
+
+ if (expected_count > 0)
+ {
+ BOOST_CHECK_EQUAL(bg::intersects(geometry), true);
+
+ if (check_has_intersections)
+ {
+ try
+ {
+ boost::geometry::detail::overlay::has_self_intersections(geometry);
+ BOOST_CHECK_MESSAGE(false, "Case " << case_id << " there are no self-intersections detected!");
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+ else
+ {
+ if (check_has_intersections)
+ {
+ try
+ {
+ boost::geometry::detail::overlay::has_self_intersections(geometry);
+ }
+ catch(...)
+ {
+ BOOST_CHECK_MESSAGE(false, "Case " << case_id << " there are self-intersections detected!");
+ }
+ }
+ }
+
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "self_ip" << case_id << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<Geometry>::type> mapper(svg, 500, 500);
+ mapper.add(geometry);
+
+ mapper.map(geometry, "fill:rgb(255,255,128);stroke:rgb(0,0,0);stroke-width:1");
+
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ mapper.map(turn.point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1");
+ }
+ }
+#endif
+}
+
+
+template <typename Geometry, typename T>
+void test_self_overlay(std::string const& case_id, T const& expected,
+ std::string const& wkt,
+ bool check_has_intersections = true)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+
+#ifdef GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << case_id << std::endl;
+#endif
+ test_self_intersection_points(case_id, expected, geometry, check_has_intersections);
+}
+
+
+
+template <typename P>
+void test_self_poly()
+{
+ typedef bg::model::polygon<P> polygon;
+
+ // Just a normal polygon
+ test_self_overlay<polygon>("1", 0,
+ "POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))");
+
+ // TODO: clean-up and visualize testcases
+
+ // Self intersecting
+ test_self_overlay<polygon>("2", 2,
+ "POLYGON((1 2,1 1,2 1,2 2.25,3 2.25,3 0,0 0,0 3,3 3,2.75 2,1 2))");
+
+ // Self intersecting in last segment
+ test_self_overlay<polygon>("3", 1,
+ "POLYGON((0 2,2 4,2 0,4 2,0 2))");
+
+ // Self tangent
+ test_self_overlay<polygon>("4", 1,
+ "POLYGON((0 0,0 4,4 4,4 0,2 4,0 0))", false);
+
+ // Self tangent in corner
+ test_self_overlay<polygon>("5", 1,
+ "POLYGON((0 0,0 4,4 4,4 0,0 4,2 0,0 0))", false);
+
+ // With spike
+ test_self_overlay<polygon>("6", 1,
+ "POLYGON((0 0,0 4,4 4,4 2,6 2,4 2,4 0,0 0))");
+
+ // Non intersection, but with duplicate
+ test_self_overlay<polygon>("d1", 0,
+ "POLYGON((0 0,0 4,4 0,4 0,0 0))");
+
+ // With many duplicates
+ test_self_overlay<polygon>("d2", 0,
+ "POLYGON((0 0,0 1,0 1,0 1,0 2,0 2,0 3,0 3,0 3,0 3,0 4,2 4,2 4,4 4,4 0,4 0,3 0,3 0,3 0,3 0,3 0,0 0))");
+
+ // Hole: interior tangent to exterior
+ test_self_overlay<polygon>("h1", 1,
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 2,2 4,3 2,1 2))", false);
+
+ // Hole: interior intersecting exterior
+ test_self_overlay<polygon>("h2", 2,
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 3,5 4,1 1))");
+
+ // Hole: two intersecting holes
+ test_self_overlay<polygon>("h3", 2,
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 3,3 3,3 1,1 1),(2 2,2 3.5,3.5 3.5,3.5 2,2 2))");
+
+ // Hole: self-intersecting hole
+ test_self_overlay<polygon>("h4", 2,
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,3 3,3 2.5,1 3.5,1.5 3.5,1 1))");
+
+ // Many loops (e.g. as result from buffering)
+ test_self_overlay<polygon>("case_1", 6,
+ "POLYGON((1 3,0 9,9 5,1 7,9 8,2 5,10 10,9 2,1 3))");
+
+ test_self_overlay<polygon>("buffer_poly_indentation8_d_r", 3,
+ "POLYGON((-0.8 5,-0.799036 5.03925,-0.796148 5.07841,-0.791341 5.11738,-0.784628 5.15607,-0.776025 5.19438,-0.765552 5.23223,-0.753235 5.26951,-0.739104 5.30615,-0.723191 5.34204,-0.705537 5.37712,-0.686183 5.41128,-0.665176 5.44446,-0.642566 5.47656,-0.618408 5.50751,-0.592761 5.53725,-0.537247 5.59276,-0.507515 5.61841,-0.476559 5.64257,-0.444456 5.66518,-0.411282 5.68618,-0.377117 5.70554,-0.342044 5.72319,-0.306147 5.7391,-0.269512 5.75324,-0.232228 5.76555,-0.194384 5.77603,-0.156072 5.78463,-0.117384 5.79134,-0.0784137 5.79615,-0.0392541 5.79904,0 5.8,4 5.8,4.03925 5.79904,4.07841 5.79615,4.11738 5.79134,4.15607 5.78463,4.19438 5.77603,4.23223 5.76555,4.26951 5.75324,4.30615 5.7391,4.34204 5.72319,4.37712 5.70554,4.41128 5.68618,4.44446 5.66518,4.47656 5.64257,4.50751 5.61841,4.53725 5.59276,4.59276 5.53725,4.61841 5.50751,4.64257 5.47656,4.66518 5.44446,4.68618 5.41128,4.70554 5.37712,4.72319 5.34204,4.7391 5.30615,4.75324 5.26951,4.76555 5.23223,4.77603 5.19438,4.78463 5.15607,4.79134 5.11738,4.79615 5.07841,4.79904 5.03925,4.8 5,4.8 4,4.79976 3.98037,4.79904 3.96075,4.79783 3.94115,4.79615 3.92159,4.79398 3.90207,4.79134 3.88262,4.78822 3.86323,4.78463 3.84393,4.78056 3.82472,4.77603 3.80562,4.77102 3.78663,4.76555 3.76777,4.75962 3.74905,4.75324 3.73049,4.74639 3.71208,4.73137 3.67581,4.72319 3.65796,4.71458 3.64031,4.70554 3.62288,4.69607 3.60568,4.68618 3.58872,4.67588 3.572,4.66518 3.55554,4.65407 3.53935,4.64257 3.52344,4.63068 3.50781,4.61841 3.49249,4.60577 3.47746,4.59276 3.46275,4.5794 3.44837,4.56569 3.43431,3.56569 2.43431,3.53725 2.40724,3.50751 2.38159,3.47656 2.35743,3.44446 2.33482,3.41128 2.31382,3.37712 2.29446,3.34204 2.27681,3.30615 2.2609,3.26951 2.24676,3.23223 2.23445,3.19438 2.22397,3.15607 2.21537,3.11738 2.20866,3.07841 2.20385,3.03925 2.20096,2.96075 2.20096,2.92159 2.20385,2.88262 2.20866,2.84393 2.21537,2.80562 2.22397,2.76777 2.23445,2.73049 2.24676,2.69385 2.2609,2.65796 2.27681,2.62288 2.29446,2.58872 2.31382,2.55554 2.33482,2.52344 2.35743,2.49249 2.38159,2.46275 2.40724,2.43431 2.43431,2.8 2.06863,2.8 2.93137,2.43431 2.56569,2.46275 2.59276,2.49249 2.61841,2.52344 2.64257,2.55554 2.66518,2.58872 2.68618,2.62288 2.70554,2.65796 2.72319,2.69385 2.7391,2.73049 2.75324,2.76777 2.76555,2.80562 2.77603,2.84393 2.78463,2.88262 2.79134,2.92159 2.79615,2.96075 2.79904,3.03925 2.79904,3.07841 2.79615,3.11738 2.79134,3.15607 2.78463,3.19438 2.77603,3.23223 2.76555,3.26951 2.75324,3.30615 2.7391,3.34204 2.72319,3.37712 2.70554,3.41128 2.68618,3.44446 2.66518,3.47656 2.64257,3.50751 2.61841,3.53725 2.59276,3.56569 2.56569,4.56569 1.56569,4.5794 1.55163,4.59276 1.53725,4.60577 1.52254,4.61841 1.50751,4.63068 1.49219,4.64257 1.47656,4.65407 1.46065,4.66518 1.44446,4.67588 1.428,4.68618 1.41128,4.69607 1.39432,4.70554 1.37712,4.71458 1.35969,4.72319 1.34204,4.73137 1.32419,4.74639 1.28792,4.75324 1.26951,4.75962 1.25095,4.76555 1.23223,4.77102 1.21337,4.77603 1.19438,4.78056 1.17528,4.78463 1.15607,4.78822 1.13677,4.79134 1.11738,4.79398 1.09793,4.79615 1.07841,4.79783 1.05885,4.79904 1.03925,4.79976 1.01963,4.8 1,4.8 0,4.79904 -0.0392541,4.79615 -0.0784137,4.79134 -0.117384,4.78463 -0.156072,4.77603 -0.194384,4.76555 -0.232228,4.75324 -0.269512,4.7391 -0.306147,4.72319 -0.342044,4.70554 -0.377117,4.68618 -0.411282,4.66518 -0.444456,4.64257 -0.476559,4.61841 -0.507515,4.59276 -0.537247,4.53725 -0.592761,4.50751 -0.618408,4.47656 -0.642566,4.44446 -0.665176,4.41128 -0.686183,4.37712 -0.705537,4.34204 -0.723191,4.30615 -0.739104,4.26951 -0.753235,4.23223 -0.765552,4.19438 -0.776025,4.15607 -0.784628,4.11738 -0.791341,4.07841 -0.796148,4.03925 -0.799036,4 -0.8,0 -0.8,-0.0392541 -0.799036,-0.0784137 -0.796148,-0.117384 -0.791341,-0.156072 -0.784628,-0.194384 -0.776025,-0.232228 -0.765552,-0.269512 -0.753235,-0.306147 -0.739104,-0.342044 -0.723191,-0.377117 -0.705537,-0.411282 -0.686183,-0.444456 -0.665176,-0.476559 -0.642566,-0.507515 -0.618408,-0.537247 -0.592761,-0.592761 -0.537247,-0.618408 -0.507515,-0.642566 -0.476559,-0.665176 -0.444456,-0.686183 -0.411282,-0.705537 -0.377117,-0.723191 -0.342044,-0.739104 -0.306147,-0.753235 -0.269512,-0.765552 -0.232228,-0.776025 -0.194384,-0.784628 -0.156072,-0.791341 -0.117384,-0.796148 -0.0784137,-0.799036 -0.0392541,-0.8 0,-0.8 5))");
+
+ test_self_overlay<polygon>("toolkit_2", 12,
+ "POLYGON((170718 605997,170718 605997,170776 606016,170773 606015,170786 606020,170778 606016,170787 606021,170781 606017,170795 606028,170795 606028,170829 606055,170939 606140,170933 605968,170933 605968,170932 605908,170929 605834,170920 605866,170961 605803,170739 605684,170699 605749,170691 605766,170693 605762,170686 605775,170688 605771,170673 605794,170676 605790,170668 605800,170672 605796,170651 605818,170653 605816,170639 605829,170568 605899,170662 605943,170633 605875,170603 605961,170718 605997))");
+
+ // Real-life
+
+ std::string const ticket17 = "POLYGON ((-122.28139163 37.37319149,-122.28100699 37.37273669,-122.28002186 37.37303123,-122.27979681 37.37290072,-122.28007349 37.37240493,-122.27977334 37.37220360,-122.27819720 37.37288580,-122.27714184 37.37275161,-122.27678628 37.37253167,-122.27766437 37.37180973,-122.27804382 37.37121453,-122.27687664 37.37101354,-122.27645829 37.37203386,-122.27604423 37.37249110,-122.27632234 37.37343339,-122.27760980 37.37391082,-122.27812478 37.37800320,-122.26117222 37.39121007,-122.25572289 37.39566631,-122.25547269 37.39564971,-122.25366304 37.39552993,-122.24919976 37.39580268,-122.24417933 37.39366907,-122.24051443 37.39094143,-122.23246277 37.38100418,-122.23606766 37.38141338,-122.24001587 37.37738940,-122.23666848 37.37609347,-122.23057450 37.37882170,-122.22679803 37.37807143,-122.22525727 37.37448817,-122.22523229 37.37443000,-122.23083199 37.37609347,-122.23033486 37.37777891,-122.23169030 37.37732117,-122.23229178 37.37709687,-122.23237761 37.37631249,-122.23297776 37.37438834,-122.23872850 37.37165986,-122.24044511 37.36934068,-122.24671067 37.36865847,-122.24825570 37.36981819,-122.25151719 37.36947713,-122.25357721 37.36756706,-122.26001451 37.36579354,-122.25615213 37.36545239,-122.25486458 37.36245083,-122.25357721 37.36108651,-122.25194642 37.36013139,-122.24885652 37.35958557,-122.24911401 37.35849399,-122.25357721 37.35808470,-122.25675286 37.35897159,-122.25855539 37.35753887,-122.26181687 37.35828939,-122.26713837 37.35897159,-122.26782510 37.36108651,-122.26662339 37.36456559,-122.27288911 37.36722601,-122.27366159 37.36531602,-122.27168740 37.36470213,-122.27391900 37.36374701,-122.27074326 37.36245083,-122.27134408 37.35951742,-122.27426240 37.36135926,-122.27709482 37.36115474,-122.27966974 37.36231438,-122.27958391 37.36463382,-122.27572152 37.36463382,-122.27563569 37.36524779,-122.27700899 37.36593000,-122.27709482 37.36763529,-122.27554978 37.36838573,-122.27667254 37.36931478,-122.27677932 37.36932073,-122.27769362 37.36853987,-122.27942490 37.36830803,-122.28178776 37.36677917,-122.28509559 37.36443500,-122.28845129 37.36413744,-122.29194403 37.36695946,-122.29382577 37.36726817,-122.29600414 37.36898512,-122.29733083 37.36995398,-122.29593239 37.37141436,-122.29416649 37.37075898,-122.29325026 37.37108436,-122.29652910 37.37311697,-122.29584237 37.37374461,-122.29537583 37.37573372,-122.29487677 37.37752502,-122.30923212 37.37593011,-122.31122484 37.38230086,-122.31467994 37.38092472,-122.31715663 37.38252181,-122.32307970 37.38166978,-122.31985618 37.37667694,-122.32210304 37.37580220,-122.32581446 37.37589532,-122.32401730 37.37331839,-122.32960417 37.37189020,-122.33465527 37.37331906,-122.33425328 37.37623680,-122.33620676 37.37726132,-122.33397986 37.37822382,-122.33358918 37.38036590,-122.33202637 37.37986918,-122.33147954 37.38101784,-122.33394080 37.38198017,-122.33545239 37.38587943,-122.33478058 37.38785697,-122.33386050 37.38723721,-122.33350041 37.38571137,-122.33122003 37.38548891,-122.33140008 37.38650606,-122.33366042 37.38817490,-122.33244019 37.39157602,-122.33298157 37.39419201,-122.33164013 37.39477028,-122.33202017 37.39518351,-122.33358038 37.39499282,-122.33376050 37.39597811,-122.33550067 37.39734478,-122.33556069 37.39481797,-122.33344040 37.39292676,-122.33638094 37.38892189,-122.34240644 37.38852719,-122.34906293 37.38726898,-122.35072321 37.39338769,-122.34910291 37.39445252,-122.34796272 37.39410291,-122.34449043 37.39640534,-122.34500223 37.39729709,-122.34936291 37.39670910,-122.35098322 37.39531066,-122.35364623 37.39554510,-122.35434369 37.39612111,-122.35798429 37.39600988,-122.35768430 37.39478621,-122.36334519 37.39206871,-122.36604726 37.39203267,-122.36778592 37.39335592,-122.36518870 37.40022011,-122.36554552 37.40247752,-122.36370519 37.40331974,-122.36270506 37.40530591,-122.36320512 37.40670418,-122.36149849 37.40851392,-122.36730580 37.41054938,-122.37263720 37.41378932,-122.37161871 37.42076600,-122.36566153 37.42006292,-122.36520547 37.42742106,-122.37165953 37.43661157,-122.35943972 37.44459022,-122.35356359 37.44600810,-122.33792254 37.45796329,-122.35228518 37.47478091,-122.35127080 37.48181199,-122.34867342 37.48487322,-122.34359717 37.48801082,-122.33388431 37.48677650,-122.33142321 37.48429747,-122.32929580 37.48473149,-122.32609609 37.48291144,-122.32344850 37.48228229,-122.31924364 37.48410234,-122.31677299 37.48114051,-122.31431751 37.47848973,-122.31259201 37.47682190,-122.31515972 37.47568196,-122.31691389 37.47360309,-122.31292494 37.46960081,-122.31130153 37.46937743,-122.30889894 37.47124987,-122.30612839 37.47011613,-122.30149630 37.46568378,-122.30064277 37.46363784,-122.29283821 37.45922376,-122.28630141 37.45415497,-122.28883099 37.44629920,-122.28316717 37.44197138,-122.27554148 37.42297597,-122.25597410 37.40553692,-122.25196579 37.40129593,-122.25012043 37.40049143,-122.24823207 37.39897758,-122.24754551 37.39740941,-122.24778582 37.39621607,-122.24934787 37.39599102,-122.25005170 37.39871849,-122.25222328 37.39863668,-122.25342491 37.39737529,-122.25520162 37.39667289,-122.25528737 37.39522726,-122.27747460 37.37809616,-122.27977493 37.37858717,-122.28157729 37.37920106,-122.28322534 37.37952846,-122.28416939 37.38092656,-122.28621223 37.37984219,-122.28638389 37.37613857,-122.28382607 37.37843722,-122.27930278 37.37718220,-122.28196361 37.37652740,-122.28295058 37.37568167,-122.28216101 37.37523148,-122.28114822 37.37543608,-122.27934569 37.37528613,-122.27996369 37.37448121,-122.28104521 37.37454944,-122.28185197 37.37422883,-122.28290767 37.37474038,-122.28376597 37.37467224,-122.28428104 37.37399012,-122.28402346 37.37338989,-122.28610922 37.37364914,-122.28651264 37.37327388,-122.28672722 37.37207343,-122.28628398 37.37205448,-122.28574460 37.37166682,-122.28479711 37.37200981,-122.28327731 37.37137228,-122.28285511 37.37100700,-122.28279409 37.37125669,-122.28315527 37.37173756,-122.28321872 37.37220569,-122.28187007 37.37231918,-122.28193109 37.37294908,-122.28139163 37.37319149))";
+ test_self_overlay<polygon>("ticket17", 2, ticket17);
+
+ std::string const uscounty_ne = "POLYGON((-72.297814 44.183545,-72.30498 44.183149,-72.306552 44.183668,-72.321587 44.188629,-72.368353 44.204057,-72.362972 44.211115,-72.357354 44.218485,-72.336176 44.246264,-72.333283 44.25006,-72.329737 44.254806,-72.327061 44.258388,-72.316301 44.272583,-72.317394 44.293961,-72.317455 44.295412,-72.317621 44.298382,-72.31757 44.298423,-72.308843 44.30567,-72.308336 44.306161,-72.305947 44.30843,-72.295321 44.31908,-72.292014 44.321754,-72.289771 44.323567,-72.283878 44.32772,-72.282024 44.32927,-72.275139 44.335778,-72.271225 44.339322,-72.269779 44.340275,-72.269584 44.340461,-72.267563 44.343747,-72.255707 44.359532,-72.254273 44.361075,-72.249662 44.367162,-72.249549 44.367339,-72.24832 44.369514,-72.247963 44.369843,-72.245885 44.372717,-72.244210 44.375223,-72.240219 44.380321,-72.24014 44.380422,-72.229086 44.391162,-72.224592 44.39553,-72.224364 44.395751,-72.224549 44.395985,-72.226261 44.398726,-72.225478 44.399979,-72.223603 44.402875,-72.222984 44.403317,-72.222454 44.403753,-72.217109 44.411083,-72.218322 44.411745,-72.218833 44.412134,-72.218904 44.412313,-72.219023 44.412613,-72.219444 44.412803,-72.21963 44.412887,-72.220395 44.413162,-72.220619 44.413527,-72.22215 44.414167,-72.222276 44.414327,-72.222276 44.414784,-72.222565 44.415058,-72.22266 44.415469,-72.222565 44.415583,-72.22282 44.416063,-72.222757 44.416452,-72.222543 44.416596,-72.222247 44.416792,-72.221852 44.416792,-72.221439 44.416564,-72.22084 44.416647,-72.220708 44.416898,-72.221268 44.417736,-72.221378 44.418454,-72.220846 44.418454,-72.220492 44.418406,-72.220095 44.418422,-72.219850 44.418865,-72.220006 44.419292,-72.220514 44.419909,-72.220846 44.420637,-72.220581 44.421159,-72.220824 44.421665,-72.221732 44.42214,-72.222374 44.422757,-72.222971 44.422583,-72.223103 44.422282,-72.223259 44.421981,-72.223923 44.42195,-72.224874 44.421491,-72.22514 44.420827,-72.225557 44.420503,-72.226261 44.420157,-72.226305 44.419869,-72.226807 44.419643,-72.226863 44.419618,-72.227333 44.41927,-72.22776 44.41927,-72.228341 44.419488,-72.22864 44.419675,-72.229199 44.420381,-72.229136 44.421066,-72.228977 44.421181,-72.228945 44.421569,-72.228404 44.421958,-72.228297 44.421996,-72.228021 44.422096,-72.227097 44.422119,-72.226936 44.422302,-72.22649 44.422508,-72.225917 44.422645,-72.224831 44.423217,-72.224068 44.42324,-72.223654 44.423537,-72.223654 44.423717,-72.223654 44.423742,-72.223781 44.42381,-72.223908 44.424587,-72.223924 44.424667,-72.227403 44.426083,-72.228008 44.426329,-72.228662 44.426595,-72.229395 44.426894,-72.230747 44.427231,-72.230971 44.427489,-72.234293 44.428436,-72.236972 44.429199,-72.23719 44.430035,-72.238801 44.430515,-72.24147 44.43131,-72.249962 44.43504,-72.252411 44.436005,-72.255865 44.437305,-72.263358 44.440285,-72.268753 44.442368,-72.277045 44.445563,-72.282573 44.447693,-72.292033 44.451282,-72.299916 44.454331,-72.30082 44.45469,-72.321277 44.462572,-72.325974 44.464436,-72.337127 44.468707,-72.341171 44.470234,-72.348117 44.472931,-72.350859 44.473996,-72.358758 44.477037,-72.371940 44.482113,-72.37455 44.483117,-72.374648 44.483164,-72.374779 44.483225,-72.381115 44.485666,-72.381492 44.485688,-72.392298 44.489866,-72.403342 44.494088,-72.418579 44.499928,-72.418900 44.500046,-72.4255 44.502596,-72.426254 44.502888,-72.434315 44.506098,-72.429847 44.512045,-72.428773 44.513475,-72.421543 44.522929,-72.42088 44.523797,-72.419175 44.524889,-72.416181 44.528756,-72.415673 44.529497,-72.411684 44.534382,-72.403416 44.545482,-72.401901 44.547507,-72.398575 44.553005,-72.396373 44.555888,-72.394723 44.556887,-72.389997 44.563861,-72.38785 44.567083,-72.374786 44.584125,-72.374551 44.584042,-72.374141 44.583887,-72.364296 44.579947,-72.363627 44.579974,-72.362284 44.579484,-72.354192 44.576537,-72.351726 44.575587,-72.346763 44.573679,-72.326173 44.566333,-72.322536 44.56502,-72.312109 44.560996,-72.303198 44.557718,-72.30252 44.557467,-72.299574 44.556334,-72.28218 44.550137,-72.282083 44.550101,-72.280975 44.54965,-72.278823 44.548773,-72.268653 44.544573,-72.268148 44.544564,-72.267242 44.544547,-72.267178 44.544523,-72.266593 44.544303,-72.264975 44.543192,-72.263435 44.542639,-72.263284 44.542541,-72.262964 44.542336,-72.261344 44.544238,-72.259827 44.54559,-72.257865 44.548899,-72.254187 44.554001,-72.249372 44.560675,-72.241644 44.570815,-72.237928 44.576139,-72.237433 44.576818,-72.236396 44.578188,-72.226097 44.591711,-72.224712 44.59373,-72.21978 44.600803,-72.218155 44.602206,-72.210135 44.612594,-72.209324 44.613712,-72.208816 44.614535,-72.207016 44.617438,-72.202901 44.624073,-72.202293 44.625051,-72.199855 44.62841,-72.198157 44.630644,-72.194619 44.635355,-72.193153 44.637354,-72.19052 44.641163,-72.188343 44.644224,-72.184378 44.649871,-72.182172 44.652973,-72.176 44.661598,-72.173651 44.665011,-72.169648 44.67078,-72.165261 44.676857,-72.163971 44.678423,-72.162882 44.679959,-72.158868 44.685588,-72.156736 44.688747,-72.152374 44.694988,-72.150094 44.698355,-72.147612 44.7018,-72.147155 44.702567,-72.146873 44.703032,-72.146226 44.703325,-72.145589 44.702653,-72.141899 44.701438,-72.132779 44.698434,-72.128309 44.696934,-72.124544 44.695638,-72.110654 44.691192,-72.109358 44.690747,-72.088864 44.683714,-72.09305 44.694921,-72.094078 44.697511,-72.094433 44.698327,-72.09461 44.698776,-72.094955 44.699515,-72.095146 44.700011,-72.099952 44.712285,-72.100813 44.714476,-72.101332 44.715715,-72.101783 44.717146,-72.108368 44.733658,-72.114503 44.749624,-72.091369 44.738322,-72.083693 44.734606,-72.061312 44.723479,-72.039137 44.7125,-72.036351 44.711121,-72.02562 44.705812,-72.024818 44.705401,-72.012503 44.698821,-72.010696 44.699614,-72.007273 44.70299,-72.006749 44.703702,-72.005453 44.70441,-72.004999 44.704665,-72.002948 44.706065,-72.002574 44.706344,-71.998947 44.710903,-71.9954 44.715164,-71.995032 44.715247,-71.989775 44.720625,-71.988815 44.721224,-71.981344 44.728822,-71.98093 44.729224,-71.977211 44.732588,-71.976089 44.733763,-71.974770 44.735186,-71.974591 44.73538,-71.973434 44.736503,-71.97039 44.73946,-71.959927 44.749625,-71.958846 44.750086,-71.950606 44.758585,-71.950276 44.758952,-71.943595 44.765337,-71.939936 44.769032,-71.930968 44.765049,-71.928756 44.762738,-71.921857 44.759843,-71.902374 44.750318,-71.882733 44.740608,-71.882573 44.740269,-71.881573 44.739354,-71.876888 44.736935,-71.875148 44.736035,-71.874539 44.735721,-71.858381 44.72766,-71.837294 44.716637,-71.83775 44.716201,-71.852267 44.702366,-71.856071 44.69874,-71.856484 44.698345,-71.87445 44.681027,-71.881231 44.674373,-71.882862 44.67311,-71.883675 44.67175,-71.88436 44.671401,-71.885978 44.669571,-71.888314 44.667829,-71.890624 44.665594,-71.891007 44.664845,-71.898726 44.657917,-71.902653 44.654205,-71.910085 44.64718,-71.910282 44.647038,-71.907401 44.645283,-71.894791 44.638722,-71.89426 44.638626,-71.892962 44.637931,-71.874538 44.628066,-71.86852 44.625053,-71.848306 44.614173,-71.848221 44.614129,-71.842803 44.611203,-71.842732 44.611165,-71.843021 44.610884,-71.856079 44.597255,-71.856286 44.59707,-71.874003 44.580903,-71.874537 44.580409,-71.898111 44.557857,-71.89867 44.557286,-71.908656 44.54708,-71.884835 44.524403,-71.884487 44.524048,-71.874412 44.51323,-71.871838 44.510637,-71.871760 44.51054,-71.861209 44.500056,-71.856636 44.496178,-71.8567 44.496122,-71.874535 44.480282,-71.885627 44.470472,-71.891883 44.464859,-71.893164 44.46383,-71.903342 44.454655,-71.903549 44.454476,-71.912995 44.450245,-71.921348 44.446484,-71.922164 44.44623,-71.925058 44.444914,-71.926307 44.44418,-71.933287 44.441174,-71.91481 44.423081,-71.90842 44.416928,-71.905891 44.414322,-71.898406 44.407105,-71.897962 44.406696,-71.897325 44.406109,-71.886305 44.395364,-71.874506 44.383831,-71.867904 44.377301,-71.865579 44.374962,-71.858643 44.368062,-71.849854 44.359674,-71.847478 44.357361,-71.844776 44.354732,-71.841775 44.351811,-71.840508 44.350578,-71.837656 44.347801,-71.838072 44.347593,-71.83875 44.34721,-71.839767 44.346579,-71.840775 44.345795,-71.84159 44.3453,-71.842483 44.344757,-71.843283 44.34444,-71.844319 44.344204,-71.845288 44.343871,-71.845882 44.343666,-71.846346 44.343506,-71.848005 44.342766,-71.849099 44.342345,-71.849899 44.341978,-71.851118 44.341405,-71.85184 44.341143,-71.852628 44.340873,-71.85355 44.340717,-71.854404 44.340617,-71.855257 44.340589,-71.85619 44.340522,-71.857168 44.340463,-71.858155 44.340363,-71.859166 44.340369,-71.859940 44.340357,-71.860974 44.340282,-71.861941 44.340109,-71.86265 44.33992,-71.863291 44.339778,-71.863719 44.339644,-71.864485 44.339374,-71.865196 44.339071,-71.865895 44.338801,-71.866458 44.338514,-71.866753 44.338322,-71.867509 44.337964,-71.868253 44.337638,-71.869120 44.337288,-71.869616 44.337129,-71.869909 44.336962,-71.870573 44.336804,-71.871203 44.336686,-71.871488 44.336689,-71.871833 44.336641,-71.872472 44.336628,-71.873009 44.336736,-71.873713 44.336973,-71.874326 44.337195,-71.874535 44.337123,-71.874997 44.337226,-71.875514 44.337266,-71.875863 44.33737,-71.876122 44.337482,-71.8762 44.337539,-71.87629 44.337651,-71.876313 44.337732,-71.876324 44.337844,-71.876324 44.337925,-71.876358 44.338054,-71.876403 44.338167,-71.876448 44.338287,-71.876583 44.338424,-71.876685 44.338512,-71.876731 44.338548,-71.876973 44.338572,-71.877493 44.338615,-71.877628 44.338623,-71.877965 44.338719"
+ ",-71.878695 44.338964,-71.879896 44.339367,-71.880546 44.339559,-71.880962 44.33976,-71.881154 44.33988,-71.881895 44.340209,-71.883973 44.341228,-71.884917 44.341717,-71.885044 44.341794,-71.887531 44.3426,-71.888182 44.342807,-71.888483 44.342846,-71.888866 44.342916,-71.88893 44.342938,-71.888994 44.342945,-71.889404 44.343039,-71.889893 44.343174,-71.890324 44.343274,-71.890332 44.343272,-71.890380 44.343255,-71.890408 44.343246,-71.890456 44.343228,-71.890548 44.343209,-71.890644 44.343192,-71.890739 44.343177,-71.890844 44.343173,-71.890926 44.343201,-71.891373 44.343335,-71.892197 44.343693,-71.894326 44.344591,-71.895856 44.345209,-71.898726 44.346251,-71.900162 44.346722,-71.902332 44.347499,-71.903115 44.347694,-71.905036 44.348154,-71.906001 44.348239,-71.906909 44.348284,-71.917008 44.346714,-71.917434 44.346535,-71.918748 44.345555,-71.921314 44.343835,-71.921459 44.343739,-71.924607 44.342252,-71.925088 44.342024,-71.926666 44.340286,-71.928041 44.338516,-71.929109 44.337577,-71.932138 44.336541,-71.935395 44.33577,-71.936773 44.335684,-71.939049 44.335843,-71.942442 44.336805,-71.943365 44.337188,-71.944254 44.337643,-71.945162 44.337744,-71.952593 44.337689,-71.956516 44.337632,-71.958119 44.337544,-71.959965 44.337013,-71.961822 44.336634,-71.963133 44.336556,-71.972572 44.336781,-71.973300 44.336777,-71.977175 44.337518,-71.977971 44.33757,-71.979505 44.337354,-71.980559 44.337486,-71.98112 44.3375,-71.984281 44.336414,-71.984617 44.336243,-71.984729 44.335882,-71.986483 44.331218,-71.987862 44.330081,-71.988305 44.329768,-71.989058 44.329561,-71.992446 44.328548,-71.993662 44.327611,-71.999448 44.325595,-72.000793 44.325295,-72.001221 44.325234,-72.001792 44.325079,-72.002314 44.324871,-72.003547 44.324397,-72.00485 44.324054,-72.005532 44.323829,-72.00676 44.323357,-72.009976 44.321951,-72.012172 44.321408,-72.014543 44.321032,-72.015936 44.320849,-72.01913 44.320383,-72.019577 44.320498,-72.019801 44.32052,-72.019908 44.320683,-72.020149 44.320818,-72.021041 44.320887,-72.021994 44.321184,-72.025782 44.322054,-72.028201 44.322375,-72.029061 44.322398,-72.029698 44.32217,-72.031322 44.320936,-72.031959 44.320662,-72.033136 44.320365,-72.033137 44.319543,-72.033773 44.317989,-72.033806 44.317349,-72.033678 44.316823,-72.03317 44.31632,-72.032341 44.315752,-72.031937 44.315475,-72.031802 44.315383,-72.031739 44.314652,-72.031549 44.313966,-72.031708 44.313007,-72.032218 44.311955,-72.032505 44.310653,-72.032444 44.307134,-72.032316 44.306677,-72.032541 44.303752,-72.032955 44.302701,-72.033464 44.301878,-72.034324 44.300941,-72.03487 44.300512,-72.035660 44.29989,-72.03633 44.298634,-72.03703 44.297834,-72.039003 44.296463,-72.039836 44.296087,-72.040117 44.295962,-72.040543 44.295876,-72.041609 44.295665,-72.041856 44.29565,-72.043202 44.295579,-72.043775 44.295608,-72.044546 44.294969,-72.044926 44.294636,-72.045137 44.29391,-72.045265 44.293198,-72.045745 44.292448,-72.046302 44.291983,-72.047349 44.291581,-72.048216 44.291404,-72.049472 44.291186,-72.051541 44.290889,-72.053355 44.290501,-72.054046 44.289971,-72.055002 44.288945,-72.055964 44.288162,-72.056078 44.287893,-72.056409 44.287618,-72.057273 44.287163,-72.05888 44.28624,-72.059957 44.284767,-72.062298 44.281754,-72.065434 44.277235,-72.066464 44.275093,-72.067774 44.270976,-72.066464 44.268331,-72.065949 44.268666,-72.064544 44.267997,-72.062671 44.269336,-72.060846 44.269972,-72.05874 44.270005,-72.058646 44.269269,-72.059395 44.268365,-72.05888 44.266926,-72.059113 44.265787,-72.058553 44.265285,-72.059021 44.265018,-72.059581 44.264315,-72.059535 44.265687,-72.060378 44.264951,-72.061173 44.263377,-72.061033 44.26244,-72.060333 44.261643,-72.060398 44.261463,-72.060723 44.261313,-72.061173 44.261258,-72.061495 44.260726,-72.06156 44.260621,-72.061542 44.26047,-72.060878 44.260436,-72.060518 44.260284,-72.060307 44.259961,-72.060259 44.259789,-72.060163 44.259766,-72.060194 44.257778,-72.060099 44.257595,-72.059838 44.256295,-72.059782 44.256018,-72.059523 44.255798,-72.059432 44.255721,-72.059018 44.255013,-72.058161 44.253916,-72.058224 44.253823,-72.058033 44.253664,-72.05708 44.252064,-72.056889 44.251859,-72.055694 44.250061,-72.055641 44.249649,-72.055515 44.249615,-72.055483 44.24912,-72.055134 44.248435,-72.054276 44.247703,-72.05399 44.246926,-72.051002 44.244892,-72.050112 44.244046,-72.049604 44.243292,-72.048999 44.242058,-72.04846 44.241212,-72.04792 44.239498,-72.047889 44.238493,-72.048621 44.237145,-72.050209 44.235066,-72.050656 44.233581,-72.052118 44.229856,-72.052469 44.229239,-72.052532 44.228805,-72.053264 44.227114,-72.053581 44.22604,-72.053995 44.224028,-72.0539 44.222703,-72.053614 44.221081,-72.053518 44.221035,-72.053518 44.220852,-72.053423 44.220784,-72.053423 44.220601,-72.053328 44.220487,-72.053328 44.220327,-72.053043 44.219732,-72.052662 44.218841,-72.052966 44.217794,-72.053232 44.216876,-72.05495 44.213677,-72.055903 44.212694,-72.056952 44.212169,-72.058605 44.211803,-72.058954 44.211597,-72.059716 44.210752,-72.060067 44.209998,-72.060067 44.209816,-72.058987 44.208512,-72.058605 44.208215,-72.058542 44.208032,-72.05886 44.207667,-72.058987 44.207164,-72.058906 44.20701,-72.058796 44.206798,-72.058066 44.206067,-72.058194 44.204907,-72.058287 44.204056,-72.058987 44.202114,-72.059564 44.201223,-72.059614 44.201144,-72.059669 44.201061,-72.060067 44.200446,-72.060543 44.200012,-72.062035 44.199074,-72.063560 44.198457,-72.064005 44.198069,-72.064577 44.196949,-72.064608 44.196058,-72.064608 44.195692,-72.06499 44.194801,-72.065213 44.194115,-72.065403 44.192607,-72.066102 44.19039,-72.066166 44.189773,-72.065911 44.189293,-72.065085 44.188631,-72.064285 44.187888,-72.06299 44.186688,-72.061337 44.184951,-72.05956 44.182666,-72.059116 44.181912,-72.058956 44.18182,-72.057496 44.179444,-72.056987 44.178096,-72.056861 44.178027,-72.056862 44.177822,-72.056798 44.17773,-72.056798 44.177433,-72.056575 44.176679,-72.056480 44.176633,-72.05629 44.175742,-72.054734 44.173114,-72.054227 44.172108,-72.054005 44.170646,-72.05391 44.170577,-72.053783 44.169869,-72.053021 44.167903,-72.052196 44.166921,-72.051655 44.166463,-72.050575 44.165961,-72.049179 44.165138,-72.048925 44.164795,-72.048799 44.164498,-72.048672 44.164452,-72.048639 44.164201,-72.048418 44.163926,-72.048355 44.163058,-72.048101 44.162144,-72.047592 44.161801,-72.047022 44.161595,-72.046133 44.161549,-72.043244 44.161869,-72.042830 44.161754,-72.042386 44.161343,-72.042386 44.160817,-72.042672 44.160292,-72.043785 44.158852,-72.044102 44.158121,-72.044039 44.157435,-72.043785 44.157047,-72.0435 44.156841,-72.042801 44.156613,-72.042103 44.15659,-72.041119 44.156864,-72.040167 44.157023,-72.039594 44.156749,-72.039245 44.156703,-72.039150 44.156498,-72.03988 44.155932,-72.039976 44.155858,-72.040082 44.155749,-72.040737 44.155972,-72.041923 44.156312,-72.042043 44.156349,-72.042801 44.156613,-72.044676 44.157097,-72.044884 44.157151,-72.045078 44.157206,-72.045767 44.157401,-72.046234 44.157563,-72.047344 44.157836,-72.048554 44.158134,-72.058602 44.160893,-72.065528 44.162794,-72.066594 44.163099,-72.070984 44.164364,-72.083157 44.167671,-72.083344 44.167722,-72.083451 44.167775,-72.087279 44.168733,-72.091724 44.16998,-72.092625 44.170284,-72.097954 44.171765,-72.100237 44.172391,-72.100809 44.172548,-72.100996 44.172599,-72.101265 44.172673,-72.10189 44.172759,-72.102047 44.172803,-72.105729 44.173842,-72.109921 44.175046,-72.110927 44.175333,-72.116790 44.176949,-72.122705 44.178552,-72.124310 44.179174,-72.133395 44.181725,-72.138984 44.183365,-72.139194 44.183494,-72.139466 44.183503,-72.140796 44.183868,-72.151283 44.186773,-72.166147 44.190938,-72.16836 44.191508,-72.17026 44.192053,-72.171978 44.19207,-72.174381 44.192183,-72.175395 44.192186,-72.187153 44.191379,-72.190945 44.191111,-72.191322 44.191101,-72.192686 44.190957,-72.199012 44.190573,-72.204065 44.190303,-72.209594 44.190003,-72.210965 44.189741,-72.221076 44.189175,-72.229408 44.188625,-72.237321 44.188057,-72.238117 44.188023,-72.24954 44.187528,-72.271323 44.185807,-72.282972 44.184887,-72.297814 44.183545))";
+ test_self_overlay<polygon>("uscounty_ne", 1, uscounty_ne, false);
+
+ // First two points are similar but not equal, causing a self-intersection (continuation)
+ // ----s-C------
+ // C=closing point, s=similar point, lying a little south-west. This causes a c/c (continue) intersection point.
+ // Was caused by error in neighbouring (get_turns.cpp)
+ std::string const ticket_9081_20873 =
+ "POLYGON((0.5246796698528305436 0.56288112949742163948,"
+ "0.52467966985283021053 0.56288112949742141744,"
+ "0.51150490059304598578 0.55384245388529118603,0.51053725440836283944 0.56288079068493779289,"
+ "0.55019180962335967333 0.60735187918348676472,0.5445123657939807682 0.58331435417450905323,"
+ "0.5246796698528305436 0.56288112949742163948))";
+ test_self_overlay<polygon>("ticket_9081_20873", 0, ticket_9081_20873);
+
+ // Was caused by error in neighbouring (get_turns.cpp)
+ std::string const ggl_list_2013_11_06_joan = "POLYGON((137.14632454923444 200.61927877947369,50 224, 323 497,255 169,137.14632454923444 200.61927877947369))";
+ test_self_overlay<polygon>("ggl_list_2013_11_06_joan", 0, ggl_list_2013_11_06_joan);
+
+ test_self_overlay<polygon>("ggl_list_20131119_james", 0, ggl_list_20131119_james[0]);
+}
+
+template <typename P>
+void test_self_ls()
+{
+ //typedef bg::model::linestring<P> linestring;
+
+ // Same case - but if this is a linestring.
+ // TODO: this does not compile yet, but it should return 1 intersection point at the "closing" point
+ // std::string const ggl_list_2013_11_06_joan_linestring = "LINESTRING(137.14632454923444 200.61927877947369,50 224, 323 497,255 169,137.14632454923444 200.61927877947369)";
+ // test_self_overlay<linestring>("ggl_list_2013_11_06_joan_linestring", 1, ggl_list_2013_11_06_joan_linestring);
+}
+
+template <typename P>
+void test_self_all()
+{
+ test_self_poly<P>();
+ test_self_ls<P>();
+}
+
+int test_main(int, char* [])
+{
+ test_self_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/sort_by_side.cpp b/src/boost/libs/geometry/test/algorithms/overlay/sort_by_side.cpp
new file mode 100644
index 000000000..1e0f42258
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/sort_by_side.cpp
@@ -0,0 +1,268 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2017, 2019.
+// Modifications copyright (c) 2017, 2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/assign/list_of.hpp>
+#include <boost/foreach.hpp>
+
+#include "multi_overlay_cases.hpp"
+
+
+namespace
+{
+
+template <typename T>
+std::string as_string(std::vector<T> const& v)
+{
+ std::stringstream out;
+ bool first = true;
+ BOOST_FOREACH(T const& value, v)
+ {
+ out << (first ? "[" : " , ") << value;
+ first = false;
+ }
+ out << (first ? "" : "]");
+ return out.str();
+}
+
+}
+
+// Adapted copy of handle_colocations::gather_cluster_properties
+template
+<
+ bool Reverse1, bool Reverse2,
+ bg::overlay_type OverlayType,
+ typename Clusters,
+ typename Turns,
+ typename Geometry1,
+ typename Geometry2,
+ typename SideStrategy
+>
+std::vector<std::size_t> gather_cluster_properties(
+ Clusters& clusters, Turns& turns,
+ bg::detail::overlay::operation_type for_operation,
+ Geometry1 const& geometry1, Geometry2 const& geometry2,
+ SideStrategy const& strategy)
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::detail::overlay;
+
+ std::vector<std::size_t> result;
+
+ typedef typename boost::range_value<Turns>::type turn_type;
+ typedef typename turn_type::point_type point_type;
+ typedef typename turn_type::turn_operation_type turn_operation_type;
+
+ // Define sorter, sorting counter-clockwise such that polygons are on the
+ // right side
+ typedef sort_by_side::side_sorter
+ <
+ Reverse1, Reverse2, OverlayType, point_type, SideStrategy, std::less<int>
+ > sbs_type;
+
+ for (typename Clusters::iterator mit = clusters.begin();
+ mit != clusters.end(); ++mit)
+ {
+ cluster_info& cinfo = mit->second;
+ std::set<signed_size_type> const& ids = cinfo.turn_indices;
+ if (ids.empty())
+ {
+ return result;
+ }
+
+ sbs_type sbs(strategy);
+ point_type turn_point; // should be all the same for all turns in cluster
+
+ bool first = true;
+ for (typename std::set<signed_size_type>::const_iterator sit = ids.begin();
+ sit != ids.end(); ++sit)
+ {
+ signed_size_type turn_index = *sit;
+ turn_type const& turn = turns[turn_index];
+ if (first)
+ {
+ turn_point = turn.point;
+ }
+ for (int i = 0; i < 2; i++)
+ {
+ turn_operation_type const& op = turn.operations[i];
+ sbs.add(op, turn_index, i, geometry1, geometry2, first);
+ first = false;
+ }
+ }
+ sbs.apply(turn_point);
+
+ sbs.find_open();
+ sbs.assign_zones(for_operation);
+
+ cinfo.open_count = sbs.open_count(for_operation);
+ result.push_back(cinfo.open_count);
+ }
+ return result;
+}
+
+
+// Adapted copy of overlay::apply
+template
+<
+ bg::overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut,
+ typename GeometryOut,
+ typename Geometry1, typename Geometry2,
+ typename RobustPolicy, typename Strategy
+>
+std::vector<std::size_t> apply_overlay(
+ Geometry1 const& geometry1, Geometry2 const& geometry2,
+ RobustPolicy const& robust_policy,
+ Strategy const& strategy)
+{
+ using namespace boost::geometry;
+
+ typedef typename bg::point_type<GeometryOut>::type point_type;
+ typedef bg::detail::overlay::traversal_turn_info
+ <
+ point_type,
+ typename bg::detail::segment_ratio_type<point_type, RobustPolicy>::type
+ > turn_info;
+ typedef std::deque<turn_info> turn_container_type;
+
+ // Define the clusters, mapping cluster_id -> turns
+ typedef std::map
+ <
+ signed_size_type,
+ bg::detail::overlay::cluster_info
+ > cluster_type;
+
+ turn_container_type turns;
+
+ detail::get_turns::no_interrupt_policy policy;
+ bg::get_turns
+ <
+ Reverse1, Reverse2,
+ detail::overlay::assign_null_policy
+ >(geometry1, geometry2, strategy, robust_policy, turns, policy);
+
+ cluster_type clusters;
+
+ bg::enrich_intersection_points<Reverse1, Reverse2, OverlayType>(turns,
+ clusters, geometry1, geometry2, robust_policy, strategy);
+
+ // Gather cluster properties, with test option
+ return ::gather_cluster_properties<Reverse1, Reverse2, OverlayType>(
+ clusters, turns, bg::detail::overlay::operation_from_overlay<OverlayType>::value,
+ geometry1, geometry2, strategy.get_side_strategy());
+}
+
+
+template <typename Geometry, bg::overlay_type OverlayType>
+void test_sort_by_side(std::string const& case_id,
+ std::string const& wkt1, std::string const& wkt2,
+ std::vector<std::size_t> const& expected_open_count)
+{
+// std::cout << case_id << std::endl;
+
+ Geometry g1;
+ bg::read_wkt(wkt1, g1);
+
+ Geometry g2;
+ bg::read_wkt(wkt2, g2);
+
+ // Reverse if necessary
+ bg::correct(g1);
+ bg::correct(g2);
+
+ typedef typename boost::range_value<Geometry>::type geometry_out;
+
+ typedef typename bg::rescale_overlay_policy_type
+ <
+ Geometry,
+ Geometry
+ >::type rescale_policy_type;
+
+ rescale_policy_type robust_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type strategy_type;
+
+ strategy_type strategy;
+
+ std::vector<std::size_t> result = ::apply_overlay
+ <
+ OverlayType, false, false, false, geometry_out
+ >(g1, g2, robust_policy, strategy);
+
+ BOOST_CHECK_MESSAGE(result == expected_open_count,
+ " caseid=" << case_id
+ << " open count: expected=" << as_string(expected_open_count)
+ << " detected=" << as_string(result));
+}
+
+
+// Define two small macro's to avoid repetitions of testcases/names etc
+#define TEST_INT(caseid, exp) { (test_sort_by_side<multi_polygon, bg::overlay_intersection>) \
+ ( #caseid "_int", caseid[0], caseid[1], exp); }
+
+#define TEST_UNION(caseid, exp) { (test_sort_by_side<multi_polygon, bg::overlay_union>) \
+ ( #caseid "_union", caseid[0], caseid[1], exp); }
+
+using boost::assign::list_of;
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::polygon<point_type> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ // Selection of test cases having only one cluster
+
+ TEST_INT(case_64_multi, list_of(1));
+ TEST_INT(case_72_multi, list_of(3));
+ TEST_INT(case_107_multi, list_of(2));
+ TEST_INT(case_123_multi, list_of(3));
+ TEST_INT(case_124_multi, list_of(3));
+ TEST_INT(case_recursive_boxes_10, list_of(2));
+ TEST_INT(case_recursive_boxes_20, list_of(2));
+ TEST_INT(case_recursive_boxes_21, list_of(1));
+ TEST_INT(case_recursive_boxes_22, list_of(0));
+
+ TEST_UNION(case_recursive_boxes_46, list_of(2)(1)(2)(1)(1)(2)(1));
+
+ TEST_UNION(case_62_multi, list_of(2));
+ TEST_UNION(case_63_multi, list_of(2));
+ TEST_UNION(case_64_multi, list_of(1));
+ TEST_UNION(case_107_multi, list_of(1));
+ TEST_UNION(case_123_multi, list_of(1));
+ TEST_UNION(case_124_multi, list_of(1));
+ TEST_UNION(case_recursive_boxes_10, list_of(1));
+ TEST_UNION(case_recursive_boxes_18, list_of(3));
+ TEST_UNION(case_recursive_boxes_19, list_of(3));
+ TEST_UNION(case_recursive_boxes_20, list_of(2));
+ TEST_UNION(case_recursive_boxes_21, list_of(1));
+ TEST_UNION(case_recursive_boxes_22, list_of(1));
+ TEST_UNION(case_recursive_boxes_23, list_of(3));
+}
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/sort_by_side_basic.cpp b/src/boost/libs/geometry/test/algorithms/overlay/sort_by_side_basic.cpp
new file mode 100644
index 000000000..f37bd38c6
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/sort_by_side_basic.cpp
@@ -0,0 +1,348 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp> // for equals/within
+#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/assign/list_of.hpp>
+#include <boost/foreach.hpp>
+
+#if defined(TEST_WITH_SVG)
+#include "debug_sort_by_side_svg.hpp"
+#endif
+
+namespace
+{
+
+
+template <typename T>
+std::string as_string(std::vector<T> const& v)
+{
+ std::stringstream out;
+ bool first = true;
+ BOOST_FOREACH(T const& value, v)
+ {
+ out << (first ? "[" : " , ") << value;
+ first = false;
+ }
+ out << (first ? "" : "]");
+ return out.str();
+}
+
+}
+
+template
+<
+ typename Geometry, typename Point,
+ typename RobustPolicy, typename Strategy
+>
+std::vector<std::size_t> apply_get_turns(std::string const& case_id,
+ Geometry const& geometry1, Geometry const& geometry2,
+ Point const& turn_point, Point const& origin_point,
+ RobustPolicy const& robust_policy,
+ Strategy const& strategy,
+ std::size_t expected_open_count,
+ std::size_t expected_max_rank,
+ std::vector<bg::signed_size_type> const& expected_right_count)
+{
+ using namespace boost::geometry;
+
+ std::vector<std::size_t> result;
+
+//todo: maybe should be enriched to count left/right - but can also be counted from ranks
+ typedef typename bg::point_type<Geometry>::type point_type;
+ typedef bg::detail::overlay::turn_info
+ <
+ point_type,
+ typename bg::detail::segment_ratio_type<point_type, RobustPolicy>::type
+ > turn_info;
+ typedef std::deque<turn_info> turn_container_type;
+
+ turn_container_type turns;
+
+ detail::get_turns::no_interrupt_policy policy;
+ bg::get_turns
+ <
+ false, false,
+ detail::overlay::assign_null_policy
+ >(geometry1, geometry2, strategy, robust_policy, turns, policy);
+
+
+ // Define sorter, sorting counter-clockwise such that polygons are on the
+ // right side
+ typedef typename Strategy::side_strategy_type side_strategy;
+ typedef bg::detail::overlay::sort_by_side::side_sorter
+ <
+ false, false, overlay_union,
+ point_type, side_strategy, std::less<int>
+ > sbs_type;
+
+ sbs_type sbs(strategy.get_side_strategy());
+
+ std::cout << "Case: " << case_id << std::endl;
+
+ bool has_origin = false;
+ for (std::size_t turn_index = 0; turn_index < turns.size(); turn_index++)
+ {
+ turn_info const& turn = turns[turn_index];
+
+ if (bg::equals(turn.point, turn_point))
+ {
+// std::cout << "Found turn: " << turn_index << std::endl;
+ for (int i = 0; i < 2; i++)
+ {
+ Point point1, point2, point3;
+ bg::copy_segment_points<false, false>(geometry1, geometry2,
+ turn.operations[i].seg_id, point1, point2, point3);
+ bool const is_origin = ! has_origin && bg::equals(point1, origin_point);
+ if (is_origin)
+ {
+ has_origin = true;
+ }
+
+ sbs.add(turn.operations[i], turn_index, i,
+ geometry1, geometry2, is_origin);
+
+ }
+ }
+ }
+
+ BOOST_CHECK_MESSAGE(has_origin,
+ " caseid=" << case_id
+ << " origin not found");
+
+ if (!has_origin)
+ {
+ for (std::size_t turn_index = 0; turn_index < turns.size(); turn_index++)
+ {
+ turn_info const& turn = turns[turn_index];
+ if (bg::equals(turn.point, turn_point))
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ Point point1, point2, point3;
+ bg::copy_segment_points<false, false>(geometry1, geometry2,
+ turn.operations[i].seg_id, point1, point2, point3);
+// std::cout << "Turn " << turn_index << " op " << i << " point1=" << bg::wkt(point1) << std::endl;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ sbs.apply(turn_point);
+
+ sbs.find_open();
+ sbs.assign_zones(detail::overlay::operation_union);
+
+ std::size_t const open_count = sbs.open_count(detail::overlay::operation_union);
+ std::size_t const max_rank = sbs.m_ranked_points.back().rank;
+ std::vector<bg::signed_size_type> right_count(max_rank + 1, -1);
+
+ int previous_rank = -1;
+ int previous_to_rank = -1;
+ for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
+ {
+ typename sbs_type::rp const& ranked_point = sbs.m_ranked_points[i];
+
+ int const rank = static_cast<int>(ranked_point.rank);
+ bool const set_right = rank != previous_to_rank;
+ if (rank != previous_rank)
+ {
+ BOOST_CHECK_MESSAGE(rank == previous_rank + 1,
+ " caseid=" << case_id
+ << " ranks: conflict in ranks=" << ranked_point.rank
+ << " vs " << previous_rank + 1);
+ previous_rank = rank;
+ }
+
+ if (ranked_point.direction != bg::detail::overlay::sort_by_side::dir_to)
+ {
+ continue;
+ }
+
+ previous_to_rank = rank;
+ if (set_right)
+ {
+ right_count[rank] = ranked_point.count_right;
+ }
+ else
+ {
+ BOOST_CHECK_MESSAGE(right_count[rank] == int(ranked_point.count_right),
+ " caseid=" << case_id
+ << " ranks: conflict in right_count=" << ranked_point.count_right
+ << " vs " << right_count[rank]);
+ }
+
+ }
+ BOOST_CHECK_MESSAGE(open_count == expected_open_count,
+ " caseid=" << case_id
+ << " open_count: expected=" << expected_open_count
+ << " detected=" << open_count);
+
+ BOOST_CHECK_MESSAGE(max_rank == expected_max_rank,
+ " caseid=" << case_id
+ << " max_rank: expected=" << expected_max_rank
+ << " detected=" << max_rank);
+
+ BOOST_CHECK_MESSAGE(right_count == expected_right_count,
+ " caseid=" << case_id
+ << " right count: expected=" << as_string(expected_right_count)
+ << " detected=" << as_string(right_count));
+
+#if defined(TEST_WITH_SVG)
+ debug::sorted_side_map(case_id, sbs, turn_point, geometry1, geometry2);
+#endif
+
+ return result;
+}
+
+
+template <typename T>
+void test_basic(std::string const& case_id,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ std::string const& wkt_turn_point,
+ std::string const& wkt_origin_point,
+ std::size_t expected_open_count,
+ std::size_t expected_max_rank,
+ std::vector<bg::signed_size_type> const& expected_right_count)
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::polygon<point_type> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ multi_polygon g1;
+ bg::read_wkt(wkt1, g1);
+
+ multi_polygon g2;
+ bg::read_wkt(wkt2, g2);
+
+ point_type turn_point, origin_point;
+ bg::read_wkt(wkt_turn_point, turn_point);
+ bg::read_wkt(wkt_origin_point, origin_point);
+
+ // Reverse if necessary
+ bg::correct(g1);
+ bg::correct(g2);
+
+ typedef typename bg::rescale_overlay_policy_type
+ <
+ multi_polygon,
+ multi_polygon
+ >::type rescale_policy_type;
+
+ rescale_policy_type robust_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<point_type>::type
+ >::type strategy_type;
+
+ strategy_type strategy;
+
+ apply_get_turns(case_id, g1, g2, turn_point, origin_point,
+ robust_policy, strategy,
+ expected_open_count, expected_max_rank, expected_right_count);
+}
+
+using boost::assign::list_of;
+
+template <typename T>
+void test_all()
+{
+ test_basic<T>("simplex",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 0,1, 0)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 2, 3, list_of(-1)(1)(-1)(1));
+
+ test_basic<T>("dup1",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 0,1, 0)),((0 2,1 2,1 1,0 1,0 2)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 2, 3, list_of(-1)(1)(-1)(2));
+
+ test_basic<T>("dup2",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)),((1 0,1 1,2 1,2 0,1, 0)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 0,1, 0)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 2, 3, list_of(-1)(2)(-1)(1));
+
+ test_basic<T>("dup3",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)),((1 0,1 1,2 1,2 0,1, 0)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 0,1, 0)),((0 2,1 2,1 1,0 1,0 2)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 2, 3, list_of(-1)(2)(-1)(2));
+
+ test_basic<T>("threequart1",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)),((1 0,1 1,2 1,2 0,1, 0)))",
+ "MULTIPOLYGON(((1 2,2 2,2 1,1 1,1 2)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 1, 3, list_of(-1)(1)(1)(1));
+
+ test_basic<T>("threequart2",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)),((1 0,1 1,2 1,2 0,1, 0)))",
+ "MULTIPOLYGON(((1 2,2 2,2 1,1 1,1 2)),((2 0,1 0,1 1,2 0)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 1, 4, list_of(-1)(2)(1)(1)(1));
+
+ test_basic<T>("threequart3",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)),((1 0,1 1,2 1,2 0,1, 0)))",
+ "MULTIPOLYGON(((1 2,2 2,2 1,1 1,1 2)),((2 0,1 0,1 1,2 0)),((0 1,0 2,1 1,0 1)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 1, 5, list_of(-1)(2)(1)(1)(-1)(2));
+
+ test_basic<T>("full1",
+ "MULTIPOLYGON(((0 2,1 2,1 1,0 1,0 2)),((1 0,1 1,2 1,2 0,1, 0)))",
+ "MULTIPOLYGON(((1 2,2 2,2 1,1 1,1 2)),((0 0,0 1,1 1,1 0,0 0)))",
+ "POINT(1 1)", "POINT(1 0)",
+ 0, 3, list_of(1)(1)(1)(1));
+
+ test_basic<T>("hole1",
+ "MULTIPOLYGON(((0 0,0 3,2 3,2 2,3 2,3 0,0 0),(1 1,2 1,2 2,1 2,1 1)),((4 2,3 2,3 3,4 3,4 2)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 2,1 2,1 4,4 4,4 0,1, 0),(3 2,3 3,2 3,2 2,3 2)))",
+ "POINT(1 2)", "POINT(2 2)",
+ 1, 2, list_of(-1)(2)(1));
+
+ test_basic<T>("hole2",
+ "MULTIPOLYGON(((0 0,0 3,2 3,2 2,3 2,3 0,0 0),(1 1,2 1,2 2,1 2,1 1)),((4 2,3 2,3 3,4 3,4 2)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 2,1 2,1 4,4 4,4 0,1, 0),(3 2,3 3,2 3,2 2,3 2)))",
+ "POINT(2 2)", "POINT(2 1)",
+ 2, 3, list_of(-1)(2)(-1)(2));
+
+ test_basic<T>("hole3",
+ "MULTIPOLYGON(((0 0,0 3,2 3,2 2,3 2,3 0,0 0),(1 1,2 1,2 2,1 2,1 1)),((4 2,3 2,3 3,4 3,4 2)))",
+ "MULTIPOLYGON(((1 0,1 1,2 1,2 2,1 2,1 4,4 4,4 0,1, 0),(3 2,3 3,2 3,2 2,3 2)))",
+ "POINT(3 2)", "POINT(2 2)",
+ 1, 3, list_of(-1)(2)(-1)(2));
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/split_rings.cpp b/src/boost/libs/geometry/test/algorithms/overlay/split_rings.cpp
new file mode 100644
index 000000000..00cf9f85b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/split_rings.cpp
@@ -0,0 +1,155 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/split_rings.hpp>
+#include <boost/geometry/algorithms/area.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+
+struct test_split_rings
+{
+ template <typename Geometry>
+ static void apply(std::string const& id,
+ Geometry const& geometry,
+ int expected_ring_count,
+ double precision)
+ {
+
+ typedef typename bg::ring_type<Geometry>::type ring_type;
+ std::vector<ring_type> rings;
+ bg::split_rings(geometry, rings);
+
+ BOOST_CHECK_EQUAL(rings.size(), expected_ring_count);
+
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "split_rings_" << id << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<Geometry>::type> mapper(svg, 500, 500);
+ mapper.add(geometry);
+
+ mapper.map(geometry, "fill:rgb(255,255,128);stroke:rgb(0,0,0);stroke-width:1");
+
+ BOOST_FOREACH(ring_type const& ring, rings)
+ {
+ std::string style = "opacity:0.6;fill:rgb";
+ std::string color = bg::area(ring) > 0 ? "(255,0,0)" : "(0,0,255)";
+ mapper.map(ring, style + color + ";stroke:rgb(128,128,128);stroke-width:3");
+ }
+ }
+#endif
+ }
+};
+
+
+template <typename Geometry>
+void test_geometry(std::string const& caseid,
+ std::string const& wkt,
+ int expected_ring_count, double precision = 0.001)
+{
+ if (wkt.empty())
+ {
+ return;
+ }
+
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+
+ test_split_rings::apply(caseid, geometry, expected_ring_count, precision);
+}
+
+
+#if ! defined(GEOMETRY_TEST_MULTI)
+
+template <typename P>
+void test_self_all()
+{
+ typedef bg::model::polygon<P> polygon;
+
+ // Simplex
+
+ test_geometry<polygon>("1", "POLYGON((0 0,0 10,10 10,5 2,5 8,10 0,0 0))", 2);
+
+
+ // // Many loops (e.g. as result from buffering)
+ test_geometry<polygon>("many_loops",
+ "POLYGON((1 3,0 9,9 5,1 7,9 8,2 5,10 10,9 2,1 3))", 3);
+
+
+ // From "mill" (flower)
+ test_geometry<polygon>("2",
+ "POLYGON((5 6.10557,3.64223 8.82111,4.28284 8.71716,2.28284 6.71716,2.17889 7.35777,4.89443 6,2.17889 4.64223,2.28284 5.28284,4.28284 3.28284,3.62547 3.14045,5 6.10557))",
+ 5);
+
+ test_geometry<polygon>("3",
+ "POLYGON((0.6 10.4,9.4 10.4,9.4 -0.4,7.59 -0.4,4.59 5.33667,4.25383 5.6797,2.67526 4.89042,4.28284 3.28284,3.62547 3.14045,5.15 7.20587,5.15 -0.4,0.6 -0.4,0.6 10.4))",
+ 4);
+
+ test_geometry<polygon>("4",
+ "POLYGON((0.6 10.4,9.4 10.4,9.4 -0.4,4.59 -0.4,4.59 5.5,4.70431 5.22003,3.93716 6.00284,5 7.06569,6.06284 6.00284,5.29569 5.22003,5.41 5.5,5.41 0.01,5.01 0.41,5.25 0.41,4.85 0.01,4.85 7.20587,6.37453 3.14045,5.71716 3.28284,7.71716 5.28284,7.82111 4.64223,5.10557 6,7.82111 7.35777,7.71716 6.71716,5.71716 8.71716,6.35777 8.82111,5 6.10557,3.64223 8.82111,4.28284 8.71716,2.28284 6.71716,2.17889 7.35777,4.89443 6,2.17889 4.64223,2.28284 5.28284,4.28284 3.28284,3.62547 3.14045,5.15 7.20587,5.15 -0.4,0.6 -0.4,0.6 10.4))",
+ 21);
+
+
+ // Split at end-point
+ test_geometry<polygon>("end1", "POLYGON((0 -1,0 10,10 10,10 0,-1 0,0 -1))", 2);
+ test_geometry<polygon>("end2", "POLYGON((0 -1,0 10,11 10,11 11,10 11,10 0,-1 0,0 -1))", 3);
+ test_geometry<polygon>("end3", "POLYGON((0 -1,0 10,11 10,11 12,12 12,12 11,10 11,10 0,-1 0,0 -1))", 4);
+
+ // Common boundaries
+ test_geometry<polygon>("common1", "POLYGON((0 0,0 10,10 10,10 0,15 0,15 5,10 5,10 0,0 0))", 2);
+
+
+ /*
+ // From us counties
+ test_geometry<polygon>("us_counties_1",
+ "POLYGON((-111.5261116995073 41.22069282150765,-111.5217628285303 41.22035416591237,-111.5169320292328 41.22267065617934,-111.5202664326763 41.22008222445458,-111.524706358225 41.21912313459525,-111.5275767689257 41.2191200646373,-111.5313115885788 41.21977799763464,-111.5361319416122 41.22230930953956,-111.5390149025386 41.22669307111289,-111.5389640868764 41.22665820699549,-111.5405314519348 41.226478917027,-111.5432483336679 41.22674131537675,-111.5420873870024 41.22669699246593,-111.5468899132279 41.22714783689431,-111.5460245791811 41.22698484329734,-111.549259355884 41.2274477430645,-111.5577408755315 41.22811342877968,-111.5617324131657 41.22965779857636,-111.5622074202574 41.22994756325099,-111.5670818828246 41.22909494401993,-111.5692718200805 41.22891062885189,-111.5728540853548 41.22873442382645,-111.5760492668632 41.22941962741943,-111.5791498048043 41.22837886418323,-111.5837423095737 41.22837646600842,-111.5873509885199 41.22912252997033,-111.5905502098084 41.23037015657303,-111.5905738976172 41.23038614536871,-111.5911014306057 41.23028197627109,-111.5941112302391 41.22824505355918,-111.595808135602 41.22727811489068,-111.5980905931322 41.22548836332129,-111.5989075933465 41.22473873279626,-111.6007963250705 41.22266022435337,-111.6036899443978 41.22086457915817,-111.6058137732627 41.22012887375856,-111.602749721482 41.22196865310281,-111.5997971061567 41.22806209012482,-111.6002070563618 41.23129419775559,-111.6028708561713 41.23528460733029,-111.5994206515041 41.23211047917744,-111.5970021250484 41.22731367405874,-111.5968553199938 41.2213333698604,-111.5978240860405 41.218735705151,-111.59872799008 41.21674091429518,-111.5990118775156 41.21586922673351,-111.5993569133788 41.21346252288525,-111.601620124863 41.20717717448136,-111.6036896381354 41.20413147570312,-111.6066477579892 41.20036520970371,-111.6170938638088 41.19792503997269,-111.6171211409054 41.197912672181,-111.6174792281175 41.19763333099935,-111.6154497071748 41.19990210883104,-111.6145469690724 41.20214793299209,-111.6143872042365 41.20466380077419,-111.6140900270553 41.2012073328748,-111.6150859490031 41.19660529794054,-111.6218436555485 41.19061554473284,-111.6263257242001 41.18915337689279,-111.6371251993805 41.18909914015737,-111.6373680096377 41.18885567474617,-111.6383949129559 41.18739026040299,-111.6411123401382 41.18431339866869,-111.6444453559743 41.18263938395823,-111.6475502757163 41.18131111472079,-111.6480824344513 41.18111660627603,-111.6487261483388 41.18018217910811,-111.6541286582274 41.17582409853807,-111.6607502293818 41.17606808683036,-111.6639928385305 41.17750001069842,-111.6627289991998 41.17881191178137,-111.6627289991998 41.16984763275211,-111.6723147297616 41.17250652017602,-111.6740201607502 41.17050691221176,-111.6809028142628 41.17126673355348,-111.6809650818884 41.17123939654464,-111.6853833520725 41.17029389383428,-111.6898658836949 41.17133338502266,-111.6902209084905 41.17152318556664,-111.6904607105552 41.17152361200778,-111.6937608878567 41.171379538936,-111.6956197940083 41.17208616938441,-111.6993728847585 41.17040839085778,-111.7047507179242 41.17328962730216,-111.705138917194 41.1733253907057,-111.7102826252236 41.17325145150028,-111.7134998796559 41.17582525522811,-111.713857740997 41.1760577731046,-111.7143713164526 41.17626863893947,-111.714718580845 41.17638849963699,-111.7161627293466 41.17641647553787,-111.7235652490785 41.17698889260424,-111.7252956636535 41.18063938630633,-111.7255467374265 41.18070780591805,-111.7276362413481 41.18341443465751,-111.7281195035541 41.18379477216856,-111.7289633137073 41.18400466618191,-111.7322463245943 41.18537474159142,-111.7350417499302 41.18787350954477,-111.7400241492817 41.18920498371762,-111.7403897806728 41.18992392192225,-111.7405871404544 41.18993880963902,-111.7419062185388 41.19156105303389,-111.7441017621743 41.19149230781282,-111.74633522639 41.19326425318707,-111.7521804511058 41.19568179191514,-111.7548256119847 41.2000988714596,-111.7562439764081 41.20369244649578,-111.756385520958 41.20741568356885,-111.7560620666084 41.21002180147129,-111.7557493627381 41.2115435666562,-111.7556682922401 41.21250032230501,-111.7549762228438 41.2083729918014,-111.753021260936 41.20652061558319,-111.7508964302413 41.20557195114677,-111.7490502562344 41.20743627992862,-111.7538043672131 41.20092160586289,-111.7599851908795 41.19974075159288,-111.7535482000425 41.20277936096064,-111.7771999505038 41.20664084862795,-111.7822946483749 41.20868575255317,-111.7890479847428 41.20857546302415,-111.7834053984034 41.21113545825469,-111.8070916837301 41.21164475084303,-111.7983239620671 41.20690941545636,-111.7989057748419 41.20685382060309,-111.7988970680348 41.20685567247974,-111.8003950034205 41.20645434489455,-111.8015510337817 41.20521459774467,-111.8040078302751 41.20352268624269,-111.8051400156104 41.20305119804074,-111.805500030827 41.2024512874073,-111.8087760206539 41.19898729003837,-111.8127632488366 41.19571430853862,-111.8168246456107 41.19449127428283,-111.8226375152909 41.19565019698728,-111.8231921576817 41.19623717584509,-111.8268842679184 41.19390830631116,-111.8294386474025 41.19326999358571,-111.8281081895357 41.1923520714658,-111.83461841217 41.19040911228597,-111.8363820197726 41.18976234820737,-111.8389082690123 41.18928774535946,-111.8407278566805 41.18914288072003,-111.8414848277101 41.18915262958935,-111.8446813084015 41.18866243446734,-111.845959886583 41.18861802620197,-111.8434859428467 41.18901816674433,-111.8524610560402 41.1882713958049,-111.8481595765179 41.18832631814151,-111.8496570501088 41.18779673144824,-111.8533671749084 41.18768855682465,-111.8555901658855 41.18738820608631,-111.8545856366929 41.18543601585669,-111.8575805827953 41.18393299249777,-111.8615394981653 41.18172167621498,-111.8609477242236 41.1754400940934,-111.8606336522941 41.17523901959252,-111.8627856637925 41.16997723323662,-111.8635235797656 41.16904436111794,-111.8633266432236 41.16866453458245,-111.8616523096336 41.16843313106372,-111.8616216864947 41.16843907484764,-111.8576102899319 41.16714259614227,-111.8547179142898 41.16646709783558,-111.849004376199 41.16243082584917,-111.8507419858166 41.16392775774389,-111.8449330541267 41.15938516033442,-111.8453252871628 41.14671969870953,-111.8475090520856 41.14347927334031,-111.8495994494861 41.14184555885641,-111.8555300241724 41.12935093455723,-111.8539570692924 41.12913464596177,-111.8600529353453 41.12732099986341,-111.8628893201463 41.12732099986341,-111.8661516016343 41.12766178921265,-111.8717554038871 41.12781992480323,-111.8727125056091 41.12781941462108,-111.8744250029675 41.12734726013537,-111.8884146775109 41.12740408919985,-111.8910337085167 41.12670722950872,-111.8905605241137 41.12684570910798,-111.9013989090858 41.12571131225988,-111.902772044475 41.12619651923274,-111.9129115072118 41.12403191483529,-111.9147507512154 41.12495153622086,-111.9201178874858 41.12566715447374,-111.9240696750495 41.12855499923182,-111.9276546757843 41.12501918886934,-111.9355598663484 41.12798289437448,-111.9479782385554 41.12689279975358,-111.9529681915247 41.12994221534668,-111.9568859680716 41.13081283226165,-111.9574421207222 41.13136898494051,-111.9640025656762 41.1310956332098,-111.9657332834527 41.1401588859141,-111.9717215703218 41.14239547503718,-111.9730675011477 41.14266466120236,-111.9787329018218 41.14336183402796,-111.9883596218439 41.14364222393152,-111.9931363926252 41.14354196764271,-111.9994051904948 41.14363978973041,-112.0021307818896 41.14345808374524,-112.019489139395 41.14254400074554,-112.0239643318703 41.14234399927284,-112.026875 41.142344,-112.027575 41.142344,-112.0287262996005 41.142444,-112.029675 41.142444,-112.0285706847393 41.14250516265326,-112.0334643259497 41.14254400007785,-112.037275 41.142544,-112.038460765726 41.14254315085275,-112.0431214055661 41.14232416334449,-112.045375 41.142443"
+ ",-112.045875 41.142443,-112.046183 41.142443,-112.046675 41.142443,-112.04701 41.142443,-112.047675 41.142443,-112.048675 41.142443,-112.050775 41.142443,-112.051675 41.142443,-112.0540827641383 41.14234300009903,-112.0612488438362 41.14234300000304,-112.0635234354713 41.14223960918194,-112.0770714181921 41.14244181784342,-112.083276 41.142343,-112.084776 41.142343,-112.0848417657806 41.14234299978541,-112.0924417865876 41.142443,-112.100276 41.142443,-112.103976 41.142443,-112.104114857411 41.14244299996745,-112.1076037688054 41.1425399140815,-112.112793190197 41.14242459354599,-112.1135036272676 41.14254300000501,-112.1226270227682 41.14254300006021,-112.1324270190691 41.142643,-112.1421638167791 41.142643,-112.1506273882427 41.14262237725859,-112.1576209575547 41.16131792925686,-112.152476 41.142743,-112.1733149590181 41.14274300002015,-112.1756526514941 41.14285431862275,-112.1721656863206 41.14330717334865,-112.1790628146085 41.14280884335523,-112.1808690864646 41.1427879609488,-112.1876051371955 41.1429370321104,-112.1984510116649 41.14057456440421,-112.1985386297479 41.14057190901539,-112.2482545857727 41.12928342466068,-112.2585216921568 41.1262568687031,-112.2815023152398 41.11964490348107,-112.3289786112679 41.10733319877986,-112.3533969705625 41.10142824273057,-112.5251560608342 41.05848586571712,-112.4535385157666 41.13192877978023,-112.3829356229766 41.20387761333999,-112.3628222295217 41.22454031797921,-112.3307981858544 41.25696262304565,-112.2578598211629 41.33099951523954,-112.2419961323004 41.34673900002596,-112.201955 41.34674,-112.198854 41.34674,-112.198567 41.34674,-112.197535 41.34674,-112.196755 41.34674,-112.183092 41.34674,-112.182661 41.34674,-112.174135 41.34674,-112.171521 41.34674,-112.164398 41.34674,-112.163765 41.34674,-112.162149 41.34674,-112.160616 41.34674,-112.152812 41.34674,-112.137305 41.34674,-112.133199 41.34674,-112.132112 41.34674,-112.1321083653075 41.34674,-112.1261408632321 41.34735552370944,-112.1210375425564 41.34723915345325,-112.0986867218297 41.34703960146247,-112.0991128873171 41.34703432373578,-112.096676 41.34703999999999,-112.0826884841567 41.34693962919125,-112.0727519042998 41.34683715821147,-112.0659830006501 41.34633201618576,-112.043791 41.346241,-112.038076 41.346241,-112.037476 41.346241,-112.033576 41.346241,-112.032963751752 41.346241,-112.0320859322845 41.34720047709238,-112.0293729847019 41.35158293065583,-112.0225987768525 41.35384099993897,-112.012945949278 41.35384099993896,-112.0051264048585 41.35982065155388,-111.9999931863867 41.35955048219633,-111.9985054002757 41.36093908247315,-111.9886378853145 41.36437975025613,-111.982438239708 41.36699931881362,-111.9768823000155 41.37105942855347,-111.9678461715639 41.3739866250941,-111.964824595067 41.37468391195694,-111.9684577169769 41.3568526391571,-111.9703144346862 41.35837247542384,-111.9717680562695 41.36002125916402,-111.9721806067458 41.36052336335063,-111.9722701353691 41.36056857086819,-111.9756933090284 41.36361139189865,-111.9764686134888 41.3653518489586,-111.9774815061067 41.36631107832983,-111.9784353725122 41.3673490439311,-111.9818608355456 41.36917725269873,-111.9855534354769 41.3760117250587,-111.9850442656137 41.37863404701749,-111.9854221363925 41.37887044147006,-111.977148428119 41.39494967066619,-111.9823464481754 41.39046084615109,-111.9775668170106 41.39635867866395,-111.9772955142989 41.39712343090701,-111.9777832268621 41.39396396792152,-111.9780769108747 41.39453595193084,-111.9779510967016 41.39732368111444,-111.9769673928205 41.40507237141038,-111.9776418373984 41.4063310929224,-111.979249745182 41.40756511192825,-111.9805546890196 41.41174800617959,-111.9821969091629 41.41376647554345,-111.9822412429523 41.41771857136868,-111.9841029081325 41.42395514822981,-111.9758267412905 41.42973332568962,-111.9744143892868 41.43003915215967,-111.974044426735 41.43044369722418,-111.9724487099302 41.43127793250221,-111.9714554951038 41.43218647543674,-111.9705674410934 41.4326839955389,-111.969173938818 41.43455463604666,-111.9691313074541 41.43514229114804,-111.9698532625346 41.44083524341373,-111.9563035057409 41.44387691758892,-111.9528519001313 41.4425035997071,-111.948862688548 41.43996812957263,-111.9436557129119 41.43464132813732,-111.944571811535 41.43108183151026,-111.9453783570838 41.43429662278894,-111.9453292374341 41.43423156460978,-111.9487047416977 41.4370350518674,-111.949293219852 41.43728152821434,-111.946617863753 41.43651233182759,-111.9427973525344 41.43430728368595,-111.9423776809036 41.43367777659645,-111.9419291943176 41.4334303851785,-111.9407777658475 41.43217660903539,-111.9381879763191 41.43031650193143,-111.9382493895579 41.43040002340472,-111.9372011434928 41.42981718018637,-111.934117584732 41.42860635849613,-111.9324487007684 41.4262717701259,-111.9302590931362 41.42612441754618,-111.925590477184 41.4240869309046,-111.9246983708718 41.42340851775217,-111.9216328785657 41.42175106235152,-111.9201304574531 41.41957427158692,-111.9218350345417 41.42105808569211,-111.9265579698133 41.4224674871054,-111.9269374253964 41.42243152261963,-111.92904005315 41.4216476704315,-111.9263529265228 41.42314117163985,-111.9215977648415 41.42317758175992,-111.9196428552148 41.42261319977101,-111.9169146898828 41.42287472206833,-111.9134215054519 41.42473907134696,-111.9126447259132 41.42469479648941,-111.9124490246428 41.42499795177306,-111.9092387641912 41.42755224569281,-111.9052380937632 41.42897848938426,-111.9002628533518 41.42946382895553,-111.8971561379816 41.42889450986716,-111.8960249780191 41.4283771327491,-111.8940193677521 41.42850175875044,-111.8960340763695 41.42767896956915,-111.9024176724123 41.42135665487622,-111.9015750043214 41.42528897612509,-111.8998000296643 41.4285722194028,-111.8966205495849 41.43183063874344,-111.8944406431162 41.43324514380939,-111.8926252959783 41.43414332950123,-111.8916804311569 41.43450204532494,-111.8813854987459 41.43984949127724,-111.880095916456 41.43458669143437,-111.8830979471463 41.43487808596424,-111.8730501071175 41.43221499037259,-111.8646587191902 41.42862291364479,-111.8681104012376 41.41281394982138,-111.8676066232081 41.41192879397556,-111.8662685472666 41.41047503332864,-111.8648360831269 41.40927056113344,-111.8617555367589 41.40987864206158,-111.8571815473483 41.40797796402953,-111.8529378794857 41.40290666028592,-111.8525219677778 41.40333283159944,-111.8527417149485 41.40333718389994,-111.8501119188309 41.40364548567232,-111.8450021686117 41.40306327006346,-111.843627880848 41.40234608708582,-111.8435199095021 41.40231074220579,-111.844881585803 41.40265278843807,-111.8349256853031 41.39920519979233,-111.832436319031 41.39890094762616,-111.8320872552582 41.39798934323525,-111.8361009415533 41.3978803505358,-111.8321021292179 41.40300459287702,-111.8241291143356 41.40167512219369,-111.8217725690825 41.40211299539512,-111.8212955423522 41.40200922486019,-111.8171546776915 41.40329458953078,-111.8125316083106 41.39846505320347,-111.8124294708664 41.39842288523761,-111.8124264284935 41.3984236578345,-111.8108857608745 41.39858652417184"
+ ",-111.809365213452 41.39987879371605,-111.8042760434507 41.4011908453571,-111.8020686543937 41.40053613590567,-111.8039046363505 41.40017458184678,-111.8042635478739 41.39999258459775,-111.7909954737669 41.40089644205416,-111.7929629310693 41.40139132981063,-111.7846743021944 41.40036870539331,-111.7827866126724 41.39571814524774,-111.7815214169703 41.39299863043483,-111.7828920971421 41.39327334027993,-111.7748509130635 41.38743730378992,-111.7752165761997 41.38718480775791,-111.7721697223399 41.38604483298051,-111.7750983614573 41.386555270279,-111.7639414583505 41.38192065911581,-111.761963781468 41.3800412809659,-111.7613108864837 41.37912231691754,-111.7612258742607 41.37910304832786,-111.7591299416527 41.37968085372221,-111.7577907259937 41.37944029328051,-111.7558579035919 41.38022277149841,-111.7512688505652 41.38095536128881,-111.7482174462501 41.37990334283357,-111.7486646160195 41.37996229584262,-111.7501551896196 41.37882469173843,-111.7454941763277 41.38178624311301,-111.7335398767194 41.38465825647904,-111.7344375425085 41.38458725363097,-111.7324914280349 41.38482975996588,-111.7308102203539 41.38492274099217,-111.730258 41.364938,-111.7400445096964 41.37466081033997,-111.7367972666407 41.37827413406988,-111.7369761626924 41.37865937323883,-111.7373499817572 41.38191202877975,-111.7362382343994 41.3896817282629,-111.7318062031051 41.39385726751244,-111.730934876677 41.39610325892399,-111.7281898573264 41.39852698503418,-111.7232992768295 41.40141614738422,-111.7216699706312 41.40155945218662,-111.7235231380814 41.40068052773415,-111.7265750913976 41.3963025736558,-111.7201029932023 41.40005616511778,-111.7177896512755 41.40746098221877,-111.7158070848994 41.41038399195119,-111.715655176932 41.41047706608663,-111.715983156649 41.40463400375688,-111.7204406800612 41.40810070196405,-111.7274933391879 41.41205246687121,-111.7285125917203 41.41467440623902,-111.728522980037 41.41344595317905,-111.7322942449122 41.41795959302958,-111.731896106543 41.42560633754115,-111.7320332087593 41.42926118743524,-111.729957646899 41.43302822141643,-111.7118843501114 41.43114694815002,-111.7140310900979 41.43355552193208,-111.7078739864605 41.43654866026967,-111.6998524797112 41.43271471504839,-111.6986652926243 41.42986102526688,-111.6975120881016 41.42897853603878,-111.6971210984819 41.4282934699863,-111.6961606079428 41.42773075204737,-111.6959864719628 41.42776692740181,-111.6933497690836 41.42989872972967,-111.6930019315523 41.42994586089555,-111.6917153721713 41.43152040923766,-111.6902295574764 41.4326187150197,-111.6857899530101 41.43448702217745,-111.6836120286734 41.43709471482509,-111.6771247652154 41.43723637943522,-111.6779983979918 41.43725697173675,-111.6749495172627 41.43734007411281,-111.6746735498744 41.43741591954125,-111.6720209667629 41.43783594325005,-111.6727109972352 41.43770166372526,-111.6553038799185 41.42796846134614,-111.6559813580971 41.42929086121254,-111.6584331526525 41.4317013458235,-111.6584370945208 41.43170379247909,-111.6526596626538 41.42834717102206,-111.6520987713805 41.42542774863863,-111.651155399945 41.42497098966823,-111.6485038542844 41.42069082966789,-111.6484473142877 41.42048207616851,-111.6481701857523 41.42030165647017,-111.6458111338422 41.41860283437335,-111.6435250708396 41.41556473317775,-111.6434325770253 41.41553749590582,-111.6387074295628 41.41091893071695,-111.6382542875749 41.40697282822121,-111.6430587268327 41.41423110967988,-111.6474946531616 41.41493287990986,-111.6519130312862 41.41196173789954,-111.6533453458041 41.4089750382549,-111.6534670630606 41.40818567942468,-111.6532180676668 41.41233729755218,-111.650141671316 41.41784707703802,-111.6506362105335 41.41721786169201,-111.6483458444573 41.42038505559527,-111.6399883913355 41.42456782419585,-111.6387619333563 41.42531302770971,-111.6372313167869 41.42610278062988,-111.6388772156545 41.42503724999391,-111.6241185051481 41.42565671005583,-111.6292989198989 41.42747881108829,-111.6330212257612 41.42632935426848,-111.6300888540781 41.42874135696512,-111.6258525865511 41.43045665694785,-111.6200937473438 41.43292197700307,-111.6163818162207 41.43227133372919,-111.6139121279047 41.43210192316946,-111.6127778034731 41.431778181874,-111.6100998879303 41.43186873969825,-111.6033371287108 41.42772766687219,-111.6022619251007 41.41977026042356,-111.6042208823911 41.42642276689722,-111.6042547368996 41.42641106290917,-111.608203778722 41.42866129535266,-111.6088030126456 41.42877501302603,-111.6100720883581 41.428785889551,-111.6085308515393 41.42932400636524,-111.606750545072 41.42926095100312,-111.6050156683234 41.42987323575301,-111.6032457428657 41.43066814395039,-111.5990673748855 41.43148472494484,-111.5935002234159 41.43042488220517,-111.5930272861467 41.42998515359408,-111.5930267097009 41.42998503477877,-111.5926383972181 41.42952847560235,-111.5893656740488 41.42939120933852,-111.5879879513229 41.42897465490946,-111.5877655061638 41.42920784693975,-111.5872128087414 41.42998364520915,-111.583805331358 41.43402279679681,-111.5850015607415 41.43257430449172,-111.5682595644039 41.43689127289402,-111.5655580307463 41.43431733658391,-111.5648140723382 41.43437789786282,-111.5588494686844 41.43147389314375,-111.5627733442355 41.43390475163831,-111.5467595603931 41.43097085352397,-111.5435231017314 41.4216909235525,-111.5442217676426 41.42410058028637,-111.5429581915997 41.4198629141784,-111.5415905096045 41.41916883276773,-111.5377466703981 41.42118674271469,-111.4999002636551 41.40754598864975,-111.49992321854 41.41992376877793,-111.5043942337116 41.42316548043323,-111.5074667581468 41.42367669767896,-111.5018577201973 41.42339139933106,-111.498492694593 41.42223736811422,-111.4908347022589 41.41568090530068,-111.4908130094445 41.41544015588016,-111.4899750552739 41.41493216608176,-111.4892746770538 41.41472074332899,-111.4877789754887 41.41479252991904,-111.4780235955907 41.41446855024663,-111.4758343817126 41.4101305233553,-111.4667945916543 41.408008495426,-111.4649303818979 41.39743051733797,-111.4670499026164 41.38880238826368,-111.4675403497742 41.39238946277144,-111.4682693256192 41.3896798556904,-111.468223034458 41.38866896494368,-111.4679524737185 41.3873696044556,-111.467909790308 41.38511421668602,-111.4689252899892 41.3893194192861,-111.4719613794916 41.39260783946975,-111.4773850453548 41.3939272250177,-111.4755047817366 41.39401042247292,-111.4730700536672 41.3936966334367,-111.4707125540257 41.39313997077441,-111.4681148394472 41.39206078401419,-111.4673020106218 41.39150164420799,-111.4650634653196 41.39118921312598,-111.4624398349077 41.3906400254072,-111.4605400175199 41.38972232484358,-111.4570460693707 41.38909801417777,-111.4548503602481 41.38578941112745,-111.4481916270633 41.37903507093495,-111.4538905371506 41.37167946112217,-111.4523110338275 41.37562482145626,-111.453122061191 41.38030214182341,-111.4559274593289 41.38258137778414,-111.4578400905912 41.38326186498487,-111.4580092624499 41.38328010181085,-111.4545500072416 41.38310423553524,-111.453828693243 41.38286176547096,-111.4513917306495 41.38316888047494,-111.4490880680225 41.38286920566615,-111.4458883535083 41.38283562865421,-111.4410455091279 41.38056286130516,-111.4296540092564 41.37759174629597,-111.4330684620716 41.37199485958408,-111.4325288499295 41.37170115977816,-111.433423614824 41.37148481989143,-111.4327514468304 41.37229760229101,-111.4292876194388 41.37329041914894,-111.4279628046368 41.37382224950171,-111.4310504194527 41.37201570165918,-111.4220511206116 41.37680632625185,-111.4132007135549 41.36916475528064,-111.4132556937664 41.36821137521456,-111.410599947015 41.3655167694235,-111.4095467780071 41.35588239586497,-111.4153923235931 41.35080670253447,-111.4157574283901 41.3503345776012,-111.4141595503214 41.35370156318688,-111.4141624489772 41.35339760480722,-111.4115288588478 41.35121628241728"
+ ",-111.4156461230987 41.34027082280225,-111.4156347336163 41.34011622708512,-111.4219171529141 41.33399691991721,-111.4230512496498 41.33351877639811,-111.4246536800136 41.33255158448824,-111.4278802645644 41.3316442458971,-111.4321841269485 41.3326384089827,-111.4310435307007 41.3328305819942,-111.4298921041398 41.33381070679388,-111.4325816436783 41.34640754412428,-111.4305938656625 41.34507358150004,-111.4288086603161 41.342542060306,-111.431481679049 41.34513109369425,-111.4287994278175 41.33815667720043,-111.4278232779227 41.33641772801344,-111.4265560012482 41.33289501968777,-111.4265560012482 41.32617628698502,-111.4272107382647 41.32560778902531,-111.4272178782421 41.32554523388917,-111.4261980734283 41.32225817088516,-111.4304919167739 41.31367048419434,-111.4363369977304 41.31257559725096,-111.4394237666417 41.31270635296883,-111.4394344156974 41.31270409565712,-111.441519161219 41.31236426658026,-111.4381960052264 41.31363247642526,-111.4343497992445 41.31844116068382,-111.4351634377084 41.3136073258965,-111.4398662896243 41.30910418220708,-111.4422468135143 41.30752683142005,-111.44538081134 41.30634785128562,-111.4477252742131 41.30622230681761,-111.4450982072919 41.30679223598104,-111.4415499070308 41.30926911751111,-111.440343520513 41.31155182354399,-111.4451062874178 41.31989072583871,-111.4414187617719 41.31986572481608,-111.4386063431991 41.31574156424257,-111.4372288340086 41.31425825843935,-111.4357467129998 41.3119401785306,-111.4339202494052 41.30822377235391,-111.4336625137004 41.30069611228576,-111.436193501451 41.29832538323529,-111.4342850140522 41.29308194363609,-111.4328391389641 41.29555271021763,-111.4325216530159 41.29665639935071,-111.4347508608123 41.30443260100356,-111.4360586780902 41.30564636670918,-111.4346792471093 41.30464063662748,-111.4254390049755 41.29528237788455,-111.4291302686912 41.29068338555521,-111.4261573074688 41.28463104839097,-111.4370267030589 41.27981638195083,-111.4375558321362 41.27935123578043,-111.4354383430839 41.27995632635503,-111.4416162807751 41.2758529929185,-111.4384076084416 41.27957295063146,-111.4377212864738 41.2850520602332,-111.4381740345049 41.28651100478594,-111.4384610963577 41.28700771059263,-111.4443864706288 41.29120163044556,-111.4392995187362 41.28993258176533,-111.437506253794 41.28634485567613,-111.4356263875061 41.28302577228677,-111.4349277183834 41.27937332380423,-111.4350242056712 41.26951553923891,-111.4419729572562 41.26823923756828,-111.443851402553 41.26628117225569,-111.4466503255125 41.26617791598309,-111.4466539930302 41.26617467737448,-111.4520015669708 41.26396940238351,-111.4535032224145 41.26442883740561,-111.4575335757568 41.26357415147228,-111.4483713214452 41.27007784433943,-111.4479650010794 41.2717768437342,-111.4480273600067 41.27313463677613,-111.4493445602483 41.27659822195652,-111.4478190730863 41.27422750187978,-111.4464117327744 41.26893674882813,-111.4496732569538 41.26159468063268,-111.4543300686382 41.25793771380997,-111.4571410161368 41.2577942766178,-111.4584177002777 41.25730159262817,-111.4553050787541 41.25932963474278,-111.4530081358515 41.26959930131982,-111.4508994156196 41.26371450013092,-111.4541957910179 41.25962837787136,-111.4533513082429 41.25606707336917,-111.4584511900491 41.24989054984832,-111.4611419330649 41.24901272751228,-111.4642296892219 41.2471079915566,-111.466302267792 41.24724208780359,-111.4612041454673 41.25525650795958,-111.4613628730978 41.25711686602586,-111.460012566547 41.25068020785515,-111.4631190491229 41.24557484651866,-111.4668960494423 41.24198842878425,-111.4691669157075 41.2417000374843,-111.4697812813245 41.24112614793989,-111.4746504843807 41.23477980181183,-111.4803977314971 41.23547461817721,-111.4807668379497 41.23549157614718,-111.4821598518453 41.235181287545,-111.4835147362251 41.23397825845257,-111.4913294700869 41.23144137067924,-111.4937928098947 41.23127714842143,-111.4853525806721 41.23734674935701,-111.4851730213113 41.24391252958296,-111.4868064098187 41.24667054274708,-111.4899998360328 41.24898263383229,-111.4827890866642 41.24415984037166,-111.4821185211798 41.23272415759732,-111.4852056387818 41.22855546079995,-111.4871367392634 41.22636620973306,-111.4877302368984 41.22602162842327,-111.4866371991571 41.22728810367443,-111.4862618064053 41.21244302667023,-111.5038439093175 41.21886594606829,-111.5086526752272 41.22023174933462,-111.5093913926803 41.21966687966173,-111.5156021372448 41.21908063181036,-111.5179945315531 41.21978213857661,-111.5200627063573 41.21974916010367,-111.5242768213902 41.22009310457656,-111.5261116995073 41.22069282150765))",
+ 22);
+ */
+
+}
+#endif
+
+
+
+#if ! defined(GEOMETRY_TEST_MULTI)
+int test_main(int, char* [])
+{
+ test_self_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/test_get_turns.hpp b/src/boost/libs/geometry/test/algorithms/overlay/test_get_turns.hpp
new file mode 100644
index 000000000..f761a996d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/test_get_turns.hpp
@@ -0,0 +1,328 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2016, 2017, 2018.
+// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_ALGORITHMS_OVERLAY_TEST_GET_TURNS_HPP
+#define BOOST_GEOMETRY_TEST_ALGORITHMS_OVERLAY_TEST_GET_TURNS_HPP
+
+#include <iostream>
+#include <iomanip>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+struct expected_pusher
+ : std::vector<std::string>
+{
+ expected_pusher & operator()(std::string const& ex)
+ {
+ std::vector<std::string>::push_back(ex);
+ return *this;
+ }
+};
+
+inline expected_pusher expected(std::string const& ex)
+{
+ expected_pusher res;
+ return res(ex);
+}
+
+struct equal_turn
+{
+ equal_turn(std::string const& s) : turn_ptr(&s) {}
+
+ template <typename T>
+ bool operator()(T const& t) const
+ {
+ std::string const& s = (*turn_ptr);
+ std::string::size_type const count = s.size();
+
+ return (count > 0
+ ? bg::method_char(t.method) == s[0]
+ : true)
+ && (count > 1
+ ? bg::operation_char(t.operations[0].operation) == s[1]
+ : true)
+ && (count > 2
+ ? bg::operation_char(t.operations[1].operation) == s[2]
+ : true)
+ && equal_operations_ex(t.operations[0], t.operations[1], s);
+ }
+
+ template <typename P, typename R>
+ static bool equal_operations_ex(bg::detail::overlay::turn_operation<P, R> const& /*op0*/,
+ bg::detail::overlay::turn_operation<P, R> const& /*op1*/,
+ std::string const& /*s*/)
+ {
+ return true;
+ }
+
+ template <typename P, typename R>
+ static bool equal_operations_ex(bg::detail::overlay::turn_operation_linear<P, R> const& op0,
+ bg::detail::overlay::turn_operation_linear<P, R> const& op1,
+ std::string const& s)
+ {
+ std::string::size_type const count = s.size();
+
+ return (count > 3
+ ? is_colinear_char(op0.is_collinear) == s[3]
+ : true)
+ && (count > 4
+ ? is_colinear_char(op1.is_collinear) == s[4]
+ : true);
+ }
+
+ static char is_colinear_char(bool is_collinear)
+ {
+ return is_collinear ? '=' : '+';
+ }
+
+ const std::string * turn_ptr;
+};
+
+template <typename Turns>
+struct turns_printer
+{
+ turns_printer(Turns const& t) : turns(t) {}
+
+ friend std::ostream & operator<<(std::ostream & os, turns_printer const& tp)
+ {
+ std::vector<std::string> vec(tp.turns.size());
+ std::transform(tp.turns.begin(), tp.turns.end(), vec.begin(), to_string());
+ std::sort(vec.begin(), vec.end());
+ std::copy(vec.begin(), vec.end(), std::ostream_iterator<std::string>(os, " "));
+ return os;
+ }
+
+ struct to_string
+ {
+ template <typename P, typename R>
+ std::string operator()(bg::detail::overlay::turn_info<P, R, bg::detail::overlay::turn_operation<P, R> > const& t) const
+ {
+ std::string res(3, ' ');
+ res[0] = bg::method_char(t.method);
+ res[1] = bg::operation_char(t.operations[0].operation);
+ res[2] = bg::operation_char(t.operations[1].operation);
+ return res;
+ }
+
+ template <typename P, typename R>
+ std::string operator()(bg::detail::overlay::turn_info<P, R, bg::detail::overlay::turn_operation_linear<P, R> > const& t) const
+ {
+ std::string res(5, ' ');
+ res[0] = bg::method_char(t.method);
+ res[1] = bg::operation_char(t.operations[0].operation);
+ res[2] = bg::operation_char(t.operations[1].operation);
+ res[3] = equal_turn::is_colinear_char(t.operations[0].is_collinear);
+ res[4] = equal_turn::is_colinear_char(t.operations[1].is_collinear);
+ return res;
+ }
+ };
+
+ Turns const& turns;
+};
+
+template <>
+struct turns_printer<expected_pusher>
+{
+ turns_printer(expected_pusher const& t) : turns(t) {}
+
+ friend std::ostream & operator<<(std::ostream & os, turns_printer const& tp)
+ {
+ std::vector<std::string> vec(tp.turns.size());
+ std::copy(tp.turns.begin(), tp.turns.end(), vec.begin());
+ std::sort(vec.begin(), vec.end());
+ std::copy(vec.begin(), vec.end(), std::ostream_iterator<std::string>(os, " "));
+ return os;
+ }
+
+ expected_pusher const& turns;
+};
+
+template <typename Geometry1, typename Geometry2, typename Expected, typename Strategy>
+void check_geometry_range(Geometry1 const& g1,
+ Geometry2 const& g2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ Expected const& expected,
+ Strategy const& strategy)
+{
+ typedef bg::detail::no_rescale_policy robust_policy_type;
+ typedef typename bg::point_type<Geometry2>::type point_type;
+
+ typedef typename bg::detail::segment_ratio_type
+ <
+ point_type, robust_policy_type
+ >::type segment_ratio_type;
+
+ typedef bg::detail::overlay::turn_info
+ <
+ typename bg::point_type<Geometry2>::type,
+ segment_ratio_type,
+ typename bg::detail::get_turns::turn_operation_type
+ <
+ Geometry1,
+ Geometry2,
+ segment_ratio_type
+ >::type
+ > turn_info;
+ typedef bg::detail::overlay::assign_null_policy assign_policy_t;
+ typedef bg::detail::get_turns::no_interrupt_policy interrupt_policy_t;
+
+ std::vector<turn_info> detected;
+ interrupt_policy_t interrupt_policy;
+ robust_policy_type robust_policy;
+
+ // Don't switch the geometries
+ typedef bg::detail::get_turns::get_turn_info_type
+ <
+ Geometry1, Geometry2, assign_policy_t
+ > turn_policy_t;
+
+ bg::dispatch::get_turns
+ <
+ typename bg::tag<Geometry1>::type, typename bg::tag<Geometry2>::type,
+ Geometry1, Geometry2, false, false,
+ turn_policy_t
+ >::apply(0, g1, 1, g2, strategy, robust_policy, detected, interrupt_policy);
+
+ bool ok = boost::size(expected) == detected.size();
+
+ BOOST_CHECK_MESSAGE(ok,
+ "get_turns: " << wkt1 << " and " << wkt2
+ << " -> Expected turns #: " << boost::size(expected) << " detected turns #: " << detected.size());
+
+ if (ok)
+ {
+ std::vector<turn_info> turns = detected;
+
+ for ( typename boost::range_iterator<Expected const>::type sit = boost::begin(expected) ;
+ sit != boost::end(expected) ; ++sit)
+ {
+ typename std::vector<turn_info>::iterator
+ it = std::find_if(turns.begin(), turns.end(), equal_turn(*sit));
+
+ if ( it != turns.end() )
+ {
+ turns.erase(it);
+ }
+ else
+ {
+ ok = false;
+ break;
+ }
+ }
+ }
+
+ if ( !ok )
+ {
+ BOOST_CHECK_MESSAGE(false,
+ "get_turns: " << wkt1 << " and " << wkt2
+ << " -> Expected turns: " << turns_printer<Expected>(expected)
+ << "Detected turns: " << turns_printer<std::vector<turn_info> >(detected));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Coordinates: "
+ << typeid(typename bg::coordinate_type<Geometry1>::type).name()
+ << ", "
+ << typeid(typename bg::coordinate_type<Geometry2>::type).name()
+ << std::endl;
+#endif
+ }
+}
+
+template <typename Geometry1, typename Geometry2, typename Expected>
+void check_geometry_range(Geometry1 const& g1,
+ Geometry2 const& g2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ Expected const& expected)
+{
+ typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry1>::type
+ >::type strategy;
+
+ check_geometry_range(g1, g2, wkt1, wkt2, expected, strategy);
+}
+
+template <typename Geometry1, typename Geometry2, typename Expected, typename Strategy>
+void test_geometry_range(std::string const& wkt1, std::string const& wkt2,
+ Expected const& expected, Strategy const& strategy)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ check_geometry_range(geometry1, geometry2, wkt1, wkt2, expected, strategy);
+}
+
+template <typename Geometry1, typename Geometry2, typename Expected>
+void test_geometry_range(std::string const& wkt1, std::string const& wkt2,
+ Expected const& expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ check_geometry_range(geometry1, geometry2, wkt1, wkt2, expected);
+}
+
+template <typename G1, typename G2>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ std::string const& ex0)
+{
+ test_geometry_range<G1, G2>(wkt1, wkt2, expected(ex0));
+}
+
+template <typename G1, typename G2>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ std::string const& ex0, std::string const& ex1)
+{
+ test_geometry_range<G1, G2>(wkt1, wkt2, expected(ex0)(ex1));
+}
+
+template <typename G1, typename G2>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ std::string const& ex0, std::string const& ex1, std::string const& ex2)
+{
+ test_geometry_range<G1, G2>(wkt1, wkt2, expected(ex0)(ex1)(ex2));
+}
+
+template <typename G1, typename G2>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ expected_pusher const& expected)
+{
+ test_geometry_range<G1, G2>(wkt1, wkt2, expected);
+}
+
+template <typename G1, typename G2, typename Strategy>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ expected_pusher const& expected,
+ Strategy const& strategy)
+{
+ test_geometry_range<G1, G2>(wkt1, wkt2, expected, strategy);
+}
+
+#endif // BOOST_GEOMETRY_TEST_ALGORITHMS_OVERLAY_TEST_GET_TURNS_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/traverse.cpp b/src/boost/libs/geometry/test/algorithms/overlay/traverse.cpp
new file mode 100644
index 000000000..8f5225091
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/traverse.cpp
@@ -0,0 +1,1040 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_DEFINE_STREAM_OPERATOR_SEGMENT_RATIO
+//#define BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+//#define BOOST_GEOMETRY_OVERLAY_NO_THROW
+//#define HAVE_TTMATH
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <sstream>
+#include <string>
+
+#include <boost/type_traits/is_same.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/contrib/ttmath_stub.hpp>
+#endif
+
+#include <geometry_test_common.hpp>
+
+
+// #define BOOST_GEOMETRY_DEBUG_ENRICH
+//#define BOOST_GEOMETRY_DEBUG_RELATIVE_ORDER
+
+// #define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+// #define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+
+
+#define BOOST_GEOMETRY_TEST_OVERLAY_NOT_EXCHANGED
+
+#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
+# define BOOST_GEOMETRY_DEBUG_IDENTIFIER
+#endif
+
+#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrichment_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp>
+#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
+#include <boost/geometry/algorithms/detail/overlay/overlay.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traverse.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+
+#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+template <bg::overlay_type Op>
+static inline std::string operation()
+{
+ switch(Op)
+ {
+ case bg::overlay_union : return "union";
+ case bg::overlay_intersection : return "intersection";
+ case bg::overlay_difference : return "difference";
+ }
+ return "unknown";
+}
+
+
+namespace detail
+{
+
+template
+<
+ typename G1, typename G2,
+ bg::overlay_type OverlayType,
+ bool Reverse1, bool Reverse2
+>
+struct test_traverse
+{
+
+ static void apply(std::string const& id,
+ std::size_t expected_count, double expected_area,
+ G1 const& g1, G2 const& g2,
+ double precision)
+ {
+ // DEBUG ONE or FEW CASE(S) ONLY
+ //if (! boost::contains(id, "36") || Direction != 1) return;
+ //if (! boost::contains(id, "iet_") || boost::contains(id, "st")) return;
+ //if (! boost::contains(id, "66") || Direction != 1) return;
+ //if (! boost::contains(id, "92") && ! boost::contains(id, "96") ) return;
+ //if (! (boost::contains(id, "58_st") || boost::contains(id, "59_st") || boost::contains(id, "60_st") || boost::contains(id, "83")) ) return;
+ //if (! (boost::contains(id, "81") || boost::contains(id, "82") || boost::contains(id, "84") || boost::contains(id, "85") || boost::contains(id, "68")) ) return;
+ //if (! (boost::contains(id, "81") || boost::contains(id, "86") || boost::contains(id, "88")) ) return;
+ //if (! boost::contains(id, "58_") || Direction != 1) return;
+ //if (! boost::contains(id, "55") || Direction != 1) return;
+ //if (! boost::contains(id, "55_iet_iet") || Direction != 1) return;
+ //if (! boost::contains(id, "55_st_iet") || Direction != 1) return;
+ //if (! boost::contains(id, "55_iet_st") || Direction != 1) return;
+ //if (! boost::contains(id, "54_st_st") || Direction != 1) return;
+ //if (! boost::contains(id, "54_iet_st") || Direction != 1) return;
+ //if (! (boost::contains(id, "54_") || boost::contains(id, "55_")) || Direction != 1) return;
+ //if (Direction != 1) return;
+ // END DEBUG ONE ...
+
+
+ /*** FOR REVERSING ONLY
+ {
+ // If one or both are invalid (e.g. ccw),
+ // they can be corrected by uncommenting this section
+ G1 cg1 = g1;
+ G2 cg2 = g2;
+ bg::correct(cg1);
+ bg::correct(cg2);
+ std::cout << std::setprecision(12)
+ << bg::wkt(cg1) << std::endl
+ << bg::wkt(cg2) << std::endl;
+ }
+ ***/
+
+#if defined(BOOST_GEOMETRY_DEBUG_OVERLAY) || defined(BOOST_GEOMETRY_DEBUG_ENRICH)
+ bool const ccw =
+ bg::point_order<G1>::value == bg::counterclockwise
+ || bg::point_order<G2>::value == bg::counterclockwise;
+
+ std::cout << std::endl
+ << "TRAVERSE"
+ << " " << id
+ << (ccw ? "_ccw" : "")
+ << " " << string_from_type<typename bg::coordinate_type<G1>::type>::name()
+ << "(" << OverlayType << ")" << std::endl;
+
+ //std::cout << bg::area(g1) << " " << bg::area(g2) << std::endl;
+#endif
+
+ typedef typename bg::strategy::side::services::default_strategy
+ <
+ typename bg::cs_tag<G1>::type
+ >::type side_strategy_type;
+
+ typedef typename bg::point_type<G2>::type point_type;
+ typedef typename bg::rescale_policy_type<point_type>::type
+ rescale_policy_type;
+
+ rescale_policy_type rescale_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+ typedef bg::detail::overlay::traversal_turn_info
+ <
+ point_type,
+ typename bg::detail::segment_ratio_type<point_type, rescale_policy_type>::type
+ > turn_info;
+ std::vector<turn_info> turns;
+
+ bg::detail::overlay::operation_type const op =
+ OverlayType == bg::overlay_union
+ ? bg::detail::overlay::operation_union
+ : bg::detail::overlay::operation_intersection;
+
+ bg::detail::get_turns::no_interrupt_policy policy;
+ bg::get_turns<Reverse1, Reverse2, bg::detail::overlay::assign_null_policy>(g1, g2, rescale_policy, turns, policy);
+ bg::enrich_intersection_points<Reverse1, Reverse2, OverlayType>(turns, op,
+ g1, g2, rescale_policy, side_strategy_type());
+
+ typedef bg::model::ring<typename bg::point_type<G2>::type> ring_type;
+ typedef std::vector<ring_type> out_vector;
+ out_vector v;
+
+ bg::detail::overlay::overlay_null_visitor visitor;
+
+ bg::detail::overlay::traverse
+ <
+ Reverse1, Reverse2,
+ G1, G2
+ >::apply(g1, g2, op, rescale_policy, turns, v, visitor);
+
+ // Check number of resulting rings
+ BOOST_CHECK_MESSAGE(expected_count == boost::size(v),
+ "traverse: " << id
+ << " (" << operation<OverlayType>() << ")"
+ << " #shapes expected: " << expected_count
+ << " detected: " << boost::size(v)
+ << " type: " << string_from_type
+ <typename bg::coordinate_type<G1>::type>::name()
+ );
+
+ // Check total area of resulting rings
+ typename bg::default_area_result<G1>::type total_area = 0;
+ BOOST_FOREACH(ring_type const& ring, v)
+ {
+ total_area += bg::area(ring);
+ //std::cout << bg::wkt(ring) << std::endl;
+ }
+
+ BOOST_CHECK_CLOSE(expected_area, total_area, precision);
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "traverse_" << operation<OverlayType>()
+ << "_" << id
+ << "_" << string_from_type<typename bg::coordinate_type<G1>::type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<G2>::type> mapper(svg, 500, 500);
+ mapper.add(g1);
+ mapper.add(g2);
+
+ // Input shapes in green (src=0) / blue (src=1)
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+
+ // Traversal rings in magenta outline/red fill -> over blue/green this gives brown
+ BOOST_FOREACH(ring_type const& ring, v)
+ {
+ mapper.map(ring, "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,0,0);"
+ "stroke:rgb(255,0,255);stroke-width:8");
+ }
+
+ // turn points in orange, + enrichment/traversal info
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+
+ // Simple map to avoid two texts at same place (note that can still overlap!)
+ std::map<std::pair<int, int>, int> offsets;
+ int index = 0;
+ int const margin = 5;
+
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ int lineheight = 8;
+ mapper.map(turn.point, "fill:rgb(255,128,0);"
+ "stroke:rgb(0,0,0);stroke-width:1", 3);
+
+ {
+ coordinate_type half = 0.5;
+ coordinate_type ten = 10;
+ // Map characteristics
+ // Create a rounded off point
+ std::pair<int, int> p
+ = std::make_pair(
+ boost::numeric_cast<int>(half
+ + ten * bg::get<0>(turn.point)),
+ boost::numeric_cast<int>(half
+ + ten * bg::get<1>(turn.point))
+ );
+ std::string style = "fill:rgb(0,0,0);font-family:Arial;font-size:8px";
+
+ if (turn.colocated)
+ {
+ style = "fill:rgb(255,0,0);font-family:Arial;font-size:8px";
+ }
+ else if (turn.discarded)
+ {
+ style = "fill:rgb(92,92,92);font-family:Arial;font-size:6px";
+ lineheight = 6;
+ }
+
+ //if (! turn.is_discarded() && ! turn.blocked() && ! turn.both(bg::detail::overlay::operation_union))
+ //if (! turn.discarded)
+ {
+ std::ostringstream out;
+ out << index
+ << ": " << bg::method_char(turn.method)
+ << std::endl
+ << "op: " << bg::operation_char(turn.operations[0].operation)
+ << " / " << bg::operation_char(turn.operations[1].operation)
+ //<< (turn.is_discarded() ? " (discarded) " : turn.blocked() ? " (blocked)" : "")
+ << std::endl;
+
+ out << "r: " << turn.operations[0].fraction
+ << " ; " << turn.operations[1].fraction
+ << std::endl;
+ if (turn.operations[0].enriched.next_ip_index != -1)
+ {
+ out << "ip: " << turn.operations[0].enriched.next_ip_index;
+ }
+ else
+ {
+ out << "vx: " << turn.operations[0].enriched.travels_to_vertex_index
+ << " -> ip: " << turn.operations[0].enriched.travels_to_ip_index;
+ }
+ out << " / ";
+ if (turn.operations[1].enriched.next_ip_index != -1)
+ {
+ out << "ip: " << turn.operations[1].enriched.next_ip_index;
+ }
+ else
+ {
+ out << "vx: " << turn.operations[1].enriched.travels_to_vertex_index
+ << " -> ip: " << turn.operations[1].enriched.travels_to_ip_index;
+ }
+
+ out << std::endl;
+
+ /*out
+
+ << std::setprecision(3)
+ << "dist: " << boost::numeric_cast<double>(turn.operations[0].enriched.distance)
+ << " / " << boost::numeric_cast<double>(turn.operations[1].enriched.distance)
+ << std::endl
+ << "vis: " << bg::visited_char(turn.operations[0].visited)
+ << " / " << bg::visited_char(turn.operations[1].visited);
+ */
+
+ /*
+ out << index
+ << ": " << bg::operation_char(turn.operations[0].operation)
+ << " " << bg::operation_char(turn.operations[1].operation)
+ << " (" << bg::method_char(turn.method) << ")"
+ << (turn.ignore() ? " (ignore) " : " ")
+ << std::endl
+
+ << "ip: " << turn.operations[0].enriched.travels_to_ip_index
+ << "/" << turn.operations[1].enriched.travels_to_ip_index;
+
+ if (turn.operations[0].enriched.next_ip_index != -1
+ || turn.operations[1].enriched.next_ip_index != -1)
+ {
+ out << " [" << turn.operations[0].enriched.next_ip_index
+ << "/" << turn.operations[1].enriched.next_ip_index
+ << "]"
+ ;
+ }
+ out << std::endl;
+
+
+ out
+ << "vx:" << turn.operations[0].enriched.travels_to_vertex_index
+ << "/" << turn.operations[1].enriched.travels_to_vertex_index
+ << std::endl
+
+ << std::setprecision(3)
+ << "dist: " << turn.operations[0].fraction
+ << " / " << turn.operations[1].fraction
+ << std::endl;
+ */
+
+
+
+ offsets[p] += lineheight;
+ int offset = offsets[p];
+ offsets[p] += lineheight * 3;
+ mapper.text(turn.point, out.str(), style, margin, offset, lineheight);
+ }
+ index++;
+ }
+ }
+ }
+#endif
+ }
+};
+}
+
+template
+<
+ typename G1, typename G2,
+ bg::overlay_type OverlayType,
+ bool Reverse1 = false,
+ bool Reverse2 = false
+>
+struct test_traverse
+{
+ typedef detail::test_traverse
+ <
+ G1, G2, OverlayType, Reverse1, Reverse2
+ > detail_test_traverse;
+
+ inline static void apply(std::string const& id, std::size_t expected_count, double expected_area,
+ std::string const& wkt1, std::string const& wkt2,
+ double precision = 0.001)
+ {
+ if (wkt1.empty() || wkt2.empty())
+ {
+ return;
+ }
+
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ bg::correct(g1);
+ bg::correct(g2);
+
+ //std::cout << bg::wkt(g1) << std::endl;
+ //std::cout << bg::wkt(g2) << std::endl;
+
+ // Try the overlay-function in both ways
+ std::string caseid = id;
+ //goto case_reversed;
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << caseid << std::endl;
+#endif
+ detail_test_traverse::apply(caseid, expected_count, expected_area, g1, g2, precision);
+
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ return;
+#endif
+
+ //case_reversed:
+#if ! defined(BOOST_GEOMETRY_TEST_OVERLAY_NOT_EXCHANGED)
+ caseid = id + "_rev";
+#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
+ std::cout << std::endl << std::endl << "# " << caseid << std::endl;
+#endif
+
+ detail_test_traverse::apply(caseid, expected_count, expected_area, g2, g1, precision);
+#endif
+ }
+};
+
+#if ! defined(BOOST_GEOMETRY_TEST_MULTI)
+template <typename T>
+void test_all(bool test_self_tangencies = true, bool test_mixed = false)
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> P;
+ typedef bg::model::polygon<P> polygon;
+ //typedef bg::model::box<P> box;
+
+ typedef test_traverse
+ <
+ polygon, polygon, bg::overlay_intersection
+ > test_traverse_intersection;
+ typedef test_traverse
+ <
+ polygon, polygon, bg::overlay_union
+ > test_traverse_union;
+
+ // 1-6
+ test_traverse_intersection::apply("1", 1, 5.4736, case_1[0], case_1[1]);
+ test_traverse_intersection::apply("2", 1, 12.0545, case_2[0], case_2[1]);
+ test_traverse_intersection::apply("3", 1, 5, case_3[0], case_3[1]);
+ test_traverse_intersection::apply("4", 1, 10.2212, case_4[0], case_4[1]);
+ test_traverse_intersection::apply("5", 2, 12.8155, case_5[0], case_5[1]);
+ test_traverse_intersection::apply("6", 1, 4.5, case_6[0], case_6[1]);
+
+ // 7-12
+ test_traverse_intersection::apply("7", 0, 0, case_7[0], case_7[1]);
+ test_traverse_intersection::apply("8", 0, 0, case_8[0], case_8[1]);
+ test_traverse_intersection::apply("9", 0, 0, case_9[0], case_9[1]);
+ test_traverse_intersection::apply("10", 0, 0, case_10[0], case_10[1]);
+ test_traverse_intersection::apply("11", 1, 1, case_11[0], case_11[1]);
+ test_traverse_intersection::apply("12", 2, 0.63333, case_12[0], case_12[1]);
+
+ // 13-18
+ test_traverse_intersection::apply("13", 0, 0, case_13[0], case_13[1]);
+ test_traverse_intersection::apply("14", 0, 0, case_14[0], case_14[1]);
+ test_traverse_intersection::apply("15", 0, 0, case_15[0], case_15[1]);
+ test_traverse_intersection::apply("16", 0, 0, case_16[0], case_16[1]);
+ test_traverse_intersection::apply("17", 1, 2, case_17[0], case_17[1]);
+ test_traverse_intersection::apply("18", 1, 2, case_18[0], case_18[1]);
+
+ // 19-24
+ test_traverse_intersection::apply("19", 0, 0, case_19[0], case_19[1]);
+ test_traverse_intersection::apply("20", 1, 5.5, case_20[0], case_20[1]);
+ test_traverse_intersection::apply("21", 0, 0, case_21[0], case_21[1]);
+ test_traverse_intersection::apply("22", 0, 0, case_22[0], case_22[1]);
+ test_traverse_intersection::apply("23", 1, 1.4, case_23[0], case_23[1]);
+ test_traverse_intersection::apply("24", 1, 1.0, case_24[0], case_24[1]);
+
+ // 25-30
+ test_traverse_intersection::apply("25", 0, 0, case_25[0], case_25[1]);
+ test_traverse_intersection::apply("26", 0, 0, case_26[0], case_26[1]);
+ test_traverse_intersection::apply("27", 1, 0.9545454, case_27[0], case_27[1]);
+ test_traverse_intersection::apply("28", 1, 0.9545454, case_28[0], case_28[1]);
+ test_traverse_intersection::apply("29", 1, 1.4, case_29[0], case_29[1]);
+ test_traverse_intersection::apply("30", 1, 0.5, case_30[0], case_30[1]);
+
+ // 31-36
+ test_traverse_intersection::apply("31", 0, 0, case_31[0], case_31[1]);
+ test_traverse_intersection::apply("32", 0, 0, case_32[0], case_32[1]);
+ test_traverse_intersection::apply("33", 0, 0, case_33[0], case_33[1]);
+ test_traverse_intersection::apply("34", 1, 0.5, case_34[0], case_34[1]);
+ test_traverse_intersection::apply("35", 1, 1.0, case_35[0], case_35[1]);
+ test_traverse_intersection::apply("36", 1, 1.625, case_36[0], case_36[1]);
+
+ // 37-42
+ test_traverse_intersection::apply("37", 2, 0.666666, case_37[0], case_37[1]);
+ test_traverse_intersection::apply("38", 2, 0.971429, case_38[0], case_38[1]);
+ test_traverse_intersection::apply("39", 1, 24, case_39[0], case_39[1]);
+ test_traverse_intersection::apply("40", 0, 0, case_40[0], case_40[1]);
+ test_traverse_intersection::apply("41", 1, 5, case_41[0], case_41[1]);
+ test_traverse_intersection::apply("42", 1, 5, case_42[0], case_42[1]);
+
+ // 43-48 - invalid polygons
+ //test_traverse_intersection::apply("43", 2, 0.75, case_43[0], case_43[1]);
+ //test_traverse_intersection::apply("44", 1, 44, case_44[0], case_44[1]);
+ //test_traverse_intersection::apply("45", 1, 45, case_45[0], case_45[1]);
+ //test_traverse_intersection::apply("46", 1, 46, case_46[0], case_46[1]);
+ //test_traverse_intersection::apply("47", 1, 47, case_47[0], case_47[1]);
+
+ // 49-54
+
+ test_traverse_intersection::apply("50", 0, 0, case_50[0], case_50[1]);
+ test_traverse_intersection::apply("51", 0, 0, case_51[0], case_51[1]);
+ test_traverse_intersection::apply("52", 1, 10.5, case_52[0], case_52[1]);
+ if (test_self_tangencies)
+ {
+ test_traverse_intersection::apply("53_st", 0, 0, case_53[0], case_53[1]);
+ }
+ test_traverse_intersection::apply("53_iet", 0, 0, case_53[0], case_53[2]);
+
+ test_traverse_intersection::apply("54_iet_iet", 1, 2, case_54[1], case_54[3]);
+ if (test_self_tangencies)
+ {
+ test_traverse_intersection::apply("54_st_iet", 1, 2, case_54[0], case_54[3]);
+ test_traverse_intersection::apply("54_iet_st", 1, 2, case_54[1], case_54[2]);
+ test_traverse_intersection::apply("54_st_st", 1, 2, case_54[0], case_54[2]);
+ }
+
+ if (test_self_tangencies)
+ {
+ // 55-60
+ test_traverse_intersection::apply("55_st_st", 1, 2, case_55[0], case_55[2]);
+ }
+
+ test_traverse_intersection::apply("55_st_iet", 1, 2, case_55[0], case_55[3]);
+ test_traverse_intersection::apply("55_iet_st", 1, 2, case_55[1], case_55[2]);
+ if (test_self_tangencies)
+ {
+ test_traverse_intersection::apply("56", 2, 4.5, case_56[0], case_56[1]);
+ }
+ test_traverse_intersection::apply("55_iet_iet", 1, 2, case_55[1], case_55[3]);
+ test_traverse_intersection::apply("57", 2, 5.9705882, case_57[0], case_57[1]);
+
+ if (test_self_tangencies)
+ {
+ test_traverse_intersection::apply("58_st",
+ 2, 0.333333, case_58[0], case_58[1]);
+ test_traverse_intersection::apply("59_st",
+ 2, 1.5416667, case_59[0], case_59[1]);
+ test_traverse_intersection::apply("60_st",
+ 3, 2, case_60[0], case_60[1]);
+ }
+ test_traverse_intersection::apply("58_iet",
+ 2, 0.333333, case_58[0], case_58[2]);
+ test_traverse_intersection::apply("59_iet",
+ 2, 1.5416667, case_59[0], case_59[2]);
+ test_traverse_intersection::apply("60_iet",
+ 3, 2, case_60[0], case_60[2]);
+ test_traverse_intersection::apply("61_st",
+ 0, 0, case_61[0], case_61[1]);
+
+ test_traverse_intersection::apply("70",
+ 2, 4, case_70[0], case_70[1]);
+ test_traverse_intersection::apply("71",
+ 2, 2, case_71[0], case_71[1]);
+ test_traverse_intersection::apply("72",
+ 3, 2.85, case_72[0], case_72[1]);
+ test_traverse_intersection::apply("79",
+ 2, 20, case_79[0], case_79[1]);
+
+ // Should be 3 shapes
+ test_traverse_intersection::apply("82a",
+ 2, 2.0, case_82[0], case_82[1]);
+ // Should be 3 shapes
+ test_traverse_intersection::apply("82b",
+ 2, 2.0, case_82[0], case_82[2]);
+ // other
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ // simplified version of 82, area should be different
+ // missing IP at (1.5 3.5) from (1 4,1.5 3.5,2 4)x(2 4,1 3)
+ test_traverse_intersection::apply("83",
+ 1, 0.0, case_83[0], case_83[1]);
+#endif
+
+ // pies (went wrong when not all cases where implemented, especially some collinear (opposite) cases
+ test_traverse_intersection::apply("pie_16_4_12",
+ 1, 491866.5, pie_16_4_12[0], pie_16_4_12[1]);
+ test_traverse_intersection::apply("pie_23_21_12_500",
+ 2, 2363199.3313, pie_23_21_12_500[0], pie_23_21_12_500[1]);
+ test_traverse_intersection::apply("pie_23_23_3_2000",
+ 2, 1867779.9349, pie_23_23_3_2000[0], pie_23_23_3_2000[1]);
+ test_traverse_intersection::apply("pie_23_16_16",
+ 2, 2128893.9555, pie_23_16_16[0], pie_23_16_16[1]);
+ test_traverse_intersection::apply("pie_16_2_15_0",
+ 0, 0, pie_16_2_15_0[0], pie_16_2_15_0[1]);
+ test_traverse_intersection::apply("pie_4_13_15",
+ 1, 490887.06678, pie_4_13_15[0], pie_4_13_15[1]);
+ test_traverse_intersection::apply("pie_20_20_7_100",
+ 2, 2183372.2718, pie_20_20_7_100[0], pie_20_20_7_100[1]);
+
+
+
+ // 1-6
+ test_traverse_union::apply("1", 1, 11.5264, case_1[0], case_1[1]);
+ test_traverse_union::apply("2", 1, 17.9455, case_2[0], case_2[1]);
+ test_traverse_union::apply("3", 1, 9, case_3[0], case_3[1]);
+ test_traverse_union::apply("4", 3, 17.7788, case_4[0], case_4[1]);
+ test_traverse_union::apply("5", 2, 18.4345, case_5[0], case_5[1]);
+ test_traverse_union::apply("6", 1, 9, case_6[0], case_6[1]);
+
+ // 7-12
+ test_traverse_union::apply("7", 1, 9, case_7[0], case_7[1]);
+ test_traverse_union::apply("8", 1, 12, case_8[0], case_8[1]);
+ test_traverse_union::apply("9", 0, 0 /*UU 2, 11*/, case_9[0], case_9[1]);
+ test_traverse_union::apply("10", 1, 9, case_10[0], case_10[1]);
+ test_traverse_union::apply("11", 1, 8, case_11[0], case_11[1]);
+ test_traverse_union::apply("12", 2, 8.36667, case_12[0], case_12[1]);
+
+ // 13-18
+ test_traverse_union::apply("13", 1, 4, case_13[0], case_13[1]);
+ test_traverse_union::apply("14", 1, 12, case_14[0], case_14[1]);
+ test_traverse_union::apply("15", 1, 12, case_15[0], case_15[1]);
+ test_traverse_union::apply("16", 1, 9, case_16[0], case_16[1]);
+ test_traverse_union::apply("17", 1, 8, case_17[0], case_17[1]);
+ test_traverse_union::apply("18", 1, 8, case_18[0], case_18[1]);
+
+ // 19-24
+ test_traverse_union::apply("19", 1, 10, case_19[0], case_19[1]);
+ test_traverse_union::apply("20", 1, 5.5, case_20[0], case_20[1]);
+ test_traverse_union::apply("21", 0, 0, case_21[0], case_21[1]);
+ test_traverse_union::apply("22", 0, 0 /*UU 2, 9.5*/, case_22[0], case_22[1]);
+ test_traverse_union::apply("23", 1, 6.1, case_23[0], case_23[1]);
+ test_traverse_union::apply("24", 1, 5.5, case_24[0], case_24[1]);
+
+ // 25-30
+ test_traverse_union::apply("25", 0, 0 /*UU 2, 7*/, case_25[0], case_25[1]);
+ test_traverse_union::apply("26", 0, 0 /*UU 2, 7.5 */, case_26[0], case_26[1]);
+ test_traverse_union::apply("27", 1, 8.04545, case_27[0], case_27[1]);
+ test_traverse_union::apply("28", 1, 10.04545, case_28[0], case_28[1]);
+ test_traverse_union::apply("29", 1, 8.1, case_29[0], case_29[1]);
+ test_traverse_union::apply("30", 1, 6.5, case_30[0], case_30[1]);
+
+ // 31-36
+ test_traverse_union::apply("31", 0, 0 /*UU 2, 4.5 */, case_31[0], case_31[1]);
+ test_traverse_union::apply("32", 0, 0 /*UU 2, 4.5 */, case_32[0], case_32[1]);
+ test_traverse_union::apply("33", 0, 0 /*UU 2, 4.5 */, case_33[0], case_33[1]);
+ test_traverse_union::apply("34", 1, 6.0, case_34[0], case_34[1]);
+ test_traverse_union::apply("35", 1, 10.5, case_35[0], case_35[1]);
+ test_traverse_union::apply("36", 1 /*UU 2*/, 14.375, case_36[0], case_36[1]);
+
+ // 37-42
+ test_traverse_union::apply("37", 1, 7.33333, case_37[0], case_37[1]);
+ test_traverse_union::apply("38", 1, 9.52857, case_38[0], case_38[1]);
+ test_traverse_union::apply("39", 1, 40.0, case_39[0], case_39[1]);
+ test_traverse_union::apply("40", 0, 0 /*UU 2, 11 */, case_40[0], case_40[1]);
+ test_traverse_union::apply("41", 1, 5, case_41[0], case_41[1]);
+ test_traverse_union::apply("42", 1, 5, case_42[0], case_42[1]);
+
+ // 43-48
+ //test_traverse_union::apply("43", 3, 8.1875, case_43[0], case_43[1]);
+ //test_traverse_union::apply("44", 1, 44, case_44[0], case_44[1]);
+ //test_traverse_union::apply("45", 1, 45, case_45[0], case_45[1]);
+ //test_traverse_union::apply("46", 1, 46, case_46[0], case_46[1]);
+ //test_traverse_union::apply("47", 1, 47, case_47[0], case_47[1]);
+
+ // 49-54
+
+ test_traverse_union::apply("50", 1, 25, case_50[0], case_50[1]);
+ test_traverse_union::apply("51", 0, 0, case_51[0], case_51[1]);
+ test_traverse_union::apply("52", 1, 15.5, case_52[0], case_52[1]);
+ if (test_self_tangencies)
+ {
+ test_traverse_union::apply("53_st", 2, 16, case_53[0], case_53[1]);
+ }
+ test_traverse_union::apply("53_iet",
+ 2, 16, case_53[0], case_53[2]);
+ if (test_self_tangencies)
+ {
+ test_traverse_union::apply("54_st_st", 2, 20, case_54[0], case_54[2]);
+ test_traverse_union::apply("54_st_iet", 2, 20, case_54[0], case_54[3]);
+ test_traverse_union::apply("54_iet_st", 2, 20, case_54[1], case_54[2]);
+ }
+ test_traverse_union::apply("54_iet_iet", 2, 20, case_54[1], case_54[3]);
+
+ if (test_mixed)
+ {
+ test_traverse_union::apply("55_st_iet", 2, 18, case_55[0], case_55[3]);
+ test_traverse_union::apply("55_iet_st", 2, 18, case_55[1], case_55[2]);
+ // moved to mixed
+ test_traverse_union::apply("55_iet_iet", 3, 18, case_55[1], case_55[3]);
+ }
+
+ // 55-60
+ if (test_self_tangencies)
+ {
+ // 55 with both input polygons having self tangencies (st_st) generates 1 correct shape
+ test_traverse_union::apply("55_st_st", 1, 18, case_55[0], case_55[2]);
+ // 55 with one of them self-tangency, other int/ext ring tangency generate 2 correct shapes
+
+ test_traverse_union::apply("56", 2, 14, case_56[0], case_56[1]);
+ }
+ test_traverse_union::apply("57", 1, 14.029412, case_57[0], case_57[1]);
+
+ if (test_self_tangencies)
+ {
+ test_traverse_union::apply("58_st",
+ 4, 12.16666, case_58[0], case_58[1]);
+ test_traverse_union::apply("59_st",
+ 2, 17.208333, case_59[0], case_59[1]);
+ test_traverse_union::apply("60_st",
+ 3, 19, case_60[0], case_60[1]);
+ }
+ test_traverse_union::apply("58_iet",
+ 4, 12.16666, case_58[0], case_58[2]);
+ test_traverse_union::apply("59_iet",
+ 1, -3.791666, // 2, 17.208333), outer ring (ii/ix) is done by ASSEMBLE
+ case_59[0], case_59[2]);
+ test_traverse_union::apply("60_iet",
+ 3, 19, case_60[0], case_60[2]);
+ test_traverse_union::apply("61_st",
+ 1, 4, case_61[0], case_61[1]);
+
+ test_traverse_union::apply("70",
+ 1, 9, case_70[0], case_70[1]);
+ test_traverse_union::apply("71",
+ 2, 9, case_71[0], case_71[1]);
+ test_traverse_union::apply("72",
+ 1, 10.65, case_72[0], case_72[1]);
+
+ // other
+ test_traverse_union::apply("box_poly5",
+ 2, 4.7191,
+ "POLYGON((1.5 1.5, 1.5 2.5, 4.5 2.5, 4.5 1.5, 1.5 1.5))",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 2.3,5.0 2.3,5.0 2.1,4.5 2.1,4.5 1.9,4.0 1.9,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))");
+
+ test_traverse_intersection::apply("collinear_overlaps",
+ 1, 24,
+ collinear_overlaps[0], collinear_overlaps[1]);
+ test_traverse_union::apply("collinear_overlaps",
+ 1, 50,
+ collinear_overlaps[0], collinear_overlaps[1]);
+
+ test_traverse_intersection::apply("many_situations", 1, 184, case_many_situations[0], case_many_situations[1]);
+ test_traverse_union::apply("many_situations",
+ 1, 207, case_many_situations[0], case_many_situations[1]);
+
+
+ // From "intersection piets", robustness test.
+ // This all went wrong in the past
+ // (when not all cases (get_turns) where implemented,
+ // especially important are some collinear (opposite) cases)
+ test_traverse_union::apply("pie_16_4_12",
+ 1, 3669665.5, pie_16_4_12[0], pie_16_4_12[1]);
+ test_traverse_union::apply("pie_23_21_12_500",
+ 1, 6295516.7185, pie_23_21_12_500[0], pie_23_21_12_500[1]);
+ test_traverse_union::apply("pie_23_23_3_2000",
+ 1, 7118735.0530, pie_23_23_3_2000[0], pie_23_23_3_2000[1]);
+ test_traverse_union::apply("pie_23_16_16",
+ 1, 5710474.5406, pie_23_16_16[0], pie_23_16_16[1]);
+ test_traverse_union::apply("pie_16_2_15_0",
+ 1, 3833641.5, pie_16_2_15_0[0], pie_16_2_15_0[1]);
+ test_traverse_union::apply("pie_4_13_15",
+ 1, 2208122.43322, pie_4_13_15[0], pie_4_13_15[1]);
+ test_traverse_union::apply("pie_20_20_7_100",
+ 1, 5577158.72823, pie_20_20_7_100[0], pie_20_20_7_100[1]);
+
+ /*
+ if (test_not_valid)
+ {
+ test_traverse_union::apply("pie_5_12_12_0_7s",
+ 1, 3271710.48516, pie_5_12_12_0_7s[0], pie_5_12_12_0_7s[1]);
+ }
+ */
+
+ static const bool is_float
+ = boost::is_same<T, float>::value;
+
+ static const double float_might_deviate_more = is_float ? 0.1 : 0.001; // In some cases up to 1 promille permitted
+
+ // GCC: does not everywhere handle float correctly (in our algorithms)
+ static bool const is_float_on_non_msvc =
+#if defined(_MSC_VER)
+ false;
+#else
+ is_float;
+#endif
+
+
+
+ // From "Random Ellipse Stars", robustness test.
+ // This all went wrong in the past
+ // when using Determinant/ra/rb and comparing with 0/1
+ // Solved now by avoiding determinant / using sides
+ // ("hv" means "high volume")
+ {
+ double deviation = is_float ? 0.01 : 0.001;
+ test_traverse_union::apply("hv1", 1, 1624.508688461573, hv_1[0], hv_1[1], deviation);
+ test_traverse_intersection::apply("hv1", 1, 1622.7200125123809, hv_1[0], hv_1[1], deviation);
+
+ test_traverse_union::apply("hv2", 1, 1622.9193392726836, hv_2[0], hv_2[1], deviation);
+ test_traverse_intersection::apply("hv2", 1, 1622.1733591429329, hv_2[0], hv_2[1], deviation);
+
+ test_traverse_union::apply("hv3", 1, 1624.22079205664, hv_3[0], hv_3[1], deviation);
+ test_traverse_intersection::apply("hv3", 1, 1623.8265057282042, hv_3[0], hv_3[1], deviation);
+
+
+ if ( BOOST_GEOMETRY_CONDITION(! is_float) )
+ {
+ test_traverse_union::apply("hv4", 1, 1626.5146964146334, hv_4[0], hv_4[1], deviation);
+ test_traverse_intersection::apply("hv4", 1, 1626.2580370864305, hv_4[0], hv_4[1], deviation);
+ test_traverse_union::apply("hv5", 1, 1624.2158307261871, hv_5[0], hv_5[1], deviation);
+ test_traverse_intersection::apply("hv5", 1, 1623.4506071521519, hv_5[0], hv_5[1], deviation);
+
+ // Case 2009-12-07
+ test_traverse_intersection::apply("hv6", 1, 1604.6318757402121, hv_6[0], hv_6[1], deviation);
+ test_traverse_union::apply("hv6", 1, 1790.091872401327, hv_6[0], hv_6[1], deviation);
+
+ // Case 2009-12-08, needing sorting on side in enrich_intersection_points
+ test_traverse_union::apply("hv7", 1, 1624.5779453641017, hv_7[0], hv_7[1], deviation);
+ test_traverse_intersection::apply("hv7", 1, 1623.6936420295772, hv_7[0], hv_7[1], deviation);
+ }
+ }
+
+ // From "Random Ellipse Stars", robustness test.
+ // This all went wrong in the past when distances (see below) were zero (dz)
+ // "Distance zero", dz, means: the distance between two intersection points
+ // on a same segment is 0, therefore it can't be sorted normally, therefore
+ // the chance is 50% that the segments are not sorted correctly and the wrong
+ // decision is taken.
+ // Solved now (by sorting on sides in those cases)
+ if ( BOOST_GEOMETRY_CONDITION(! is_float_on_non_msvc) )
+ {
+ test_traverse_intersection::apply("dz_1",
+ 2, 16.887537949472005, dz_1[0], dz_1[1]);
+ test_traverse_union::apply("dz_1",
+ 3, 1444.2621305732864, dz_1[0], dz_1[1]);
+
+ test_traverse_intersection::apply("dz_2",
+ 2, 68.678921274288541, dz_2[0], dz_2[1]);
+ test_traverse_union::apply("dz_2",
+ 1, 1505.4202304878663, dz_2[0], dz_2[1]);
+
+ test_traverse_intersection::apply("dz_3",
+ 5, 192.49316937645651, dz_3[0], dz_3[1]);
+ test_traverse_union::apply("dz_3",
+ 5, 1446.496005965641, dz_3[0], dz_3[1]);
+
+ test_traverse_intersection::apply("dz_4",
+ 1, 473.59423868207693, dz_4[0], dz_4[1]);
+ test_traverse_union::apply("dz_4",
+ 1, 1871.6125138873476, dz_4[0], dz_4[1]);
+ }
+
+ // Real-life problems
+
+ // SNL (Subsidiestelsel Natuur & Landschap - verAANnen)
+
+ test_traverse_intersection::apply("snl-1",
+ 2, 286.996062095888,
+ snl_1[0], snl_1[1],
+ float_might_deviate_more);
+
+ test_traverse_union::apply("snl-1",
+ 2, 51997.5408506132,
+ snl_1[0], snl_1[1],
+ float_might_deviate_more);
+
+ {
+ test_traverse_intersection::apply("isov",
+ 1, 88.1920, isovist[0], isovist[1],
+ float_might_deviate_more);
+ test_traverse_union::apply("isov",
+ 1, 313.3604, isovist[0], isovist[1],
+ float_might_deviate_more);
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION(! is_float) )
+ {
+
+/* TODO check this BSG 2013-09-24
+#if defined(_MSC_VER)
+ double const expected = if_typed_tt<T>(3.63794e-17, 0.0);
+ int expected_count = if_typed_tt<T>(1, 0);
+#else
+ double const expected = if_typed<T, long double>(2.77555756156289135106e-17, 0.0);
+ int expected_count = if_typed<T, long double>(1, 0);
+#endif
+
+ // Calculate intersection/union of two triangles. Robustness case.
+ // ttmath can form a very small intersection triangle
+ // (which is even not accomplished by SQL Server/PostGIS)
+ std::string const caseid = "ggl_list_20110820_christophe";
+ test_traverse_intersection::apply(caseid,
+ expected_count, expected,
+ ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1]);
+ test_traverse_union::apply(caseid,
+ 1, 67.3550722317627,
+ ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1]);
+*/
+ }
+
+ test_traverse_union::apply("buffer_rt_f",
+ 1, 4.60853,
+ buffer_rt_f[0], buffer_rt_f[1]);
+ test_traverse_intersection::apply("buffer_rt_f",
+ 1, 0.0002943725152286,
+ buffer_rt_f[0], buffer_rt_f[1], 0.01);
+
+ test_traverse_union::apply("buffer_rt_g",
+ 1, 16.571,
+ buffer_rt_g[0], buffer_rt_g[1]);
+
+ test_traverse_union::apply("buffer_rt_g_boxes1",
+ 1, 20,
+ buffer_rt_g_boxes[0], buffer_rt_g_boxes[1]);
+ test_traverse_union::apply("buffer_rt_g_boxes2",
+ 1, 24,
+ buffer_rt_g_boxes[0], buffer_rt_g_boxes[2]);
+ test_traverse_union::apply("buffer_rt_g_boxes3",
+ 1, 28,
+ buffer_rt_g_boxes[0], buffer_rt_g_boxes[3]);
+
+ test_traverse_union::apply("buffer_rt_g_boxes43",
+ 1, 30,
+ buffer_rt_g_boxes[4], buffer_rt_g_boxes[3]);
+
+ test_traverse_union::apply("buffer_rt_l",
+ 1, 19.3995, buffer_rt_l[0], buffer_rt_l[1]);
+
+ test_traverse_union::apply("buffer_mp2",
+ 1, 36.7535642, buffer_mp2[0], buffer_mp2[1], 0.01);
+ test_traverse_union::apply("collinear_opposite_rr",
+ 1, 6.41, collinear_opposite_right[0], collinear_opposite_right[1]);
+ test_traverse_union::apply("collinear_opposite_ll",
+ 1, 11.75, collinear_opposite_left[0], collinear_opposite_left[1]);
+ test_traverse_union::apply("collinear_opposite_ss",
+ 1, 6, collinear_opposite_straight[0], collinear_opposite_straight[1]);
+ test_traverse_union::apply("collinear_opposite_lr",
+ 1, 8.66, collinear_opposite_left[0], collinear_opposite_right[1]);
+ test_traverse_union::apply("collinear_opposite_rl",
+ 1, 9, collinear_opposite_right[0], collinear_opposite_left[1]);
+
+ test_traverse_intersection::apply("ticket_7462", 1, 0.220582, ticket_7462[0], ticket_7462[1]);
+
+ test_traverse_intersection::apply
+ ("ticket_9081_15", 1, 0.006889578,
+ ticket_9081_15[0], ticket_9081_15[1]);
+
+#ifdef BOOST_GEOMETRY_OVERLAY_NO_THROW
+ {
+ // NOTE: currently throws (normally)
+ std::string caseid = "ggl_list_20120229_volker";
+ test_traverse_union::apply(caseid,
+ 1, 99,
+ ggl_list_20120229_volker[0], ggl_list_20120229_volker[1]);
+ test_traverse_intersection::apply(caseid,
+ 1, 99,
+ ggl_list_20120229_volker[0], ggl_list_20120229_volker[1]);
+ caseid = "ggl_list_20120229_volker_2";
+ test_traverse_union::apply(caseid,
+ 1, 99,
+ ggl_list_20120229_volker[2], ggl_list_20120229_volker[1]);
+ test_traverse_intersection::apply(caseid,
+ 1, 99,
+ ggl_list_20120229_volker[2], ggl_list_20120229_volker[1]);
+ }
+#endif
+}
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+template <typename T>
+void test_open()
+{
+ typedef bg::model::polygon
+ <
+ bg::model::point<T, 2, bg::cs::cartesian>,
+ true, false
+ > polygon;
+
+ typedef test_traverse
+ <
+ polygon, polygon, bg::overlay_intersection
+ > test_traverse_intersection;
+ typedef test_traverse
+ <
+ polygon, polygon, bg::overlay_union
+ > test_traverse_union;
+
+ test_traverse_intersection::apply("open_1", 1, 5.4736,
+ open_case_1[0], open_case_1[1]);
+ test_traverse_union::apply("open_1", 1, 11.5264,
+ open_case_1[0], open_case_1[1]);
+}
+
+
+template <typename T>
+void test_ccw()
+{
+ typedef bg::model::polygon
+ <
+ bg::model::point<T, 2, bg::cs::cartesian>,
+ false, true
+ > polygon;
+
+ test_traverse<polygon, polygon, bg::overlay_intersection, true, true>::apply("ccw_1", 1, 5.4736,
+ ccw_case_1[0], ccw_case_1[1]);
+ test_traverse<polygon, polygon, bg::overlay_union, true, true>::apply("ccw_1", 1, 11.5264,
+ ccw_case_1[0], ccw_case_1[1]);
+}
+#endif
+
+
+int test_main(int, char* [])
+{
+#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<double>();
+#else
+ test_all<float>();
+ test_all<double>();
+ test_open<double>();
+ test_ccw<double>();
+
+#if ! defined(_MSC_VER)
+ test_all<long double>();
+#endif
+
+#ifdef HAVE_TTMATH
+ test_all<ttmath_big>();
+#endif
+#endif
+
+ return 0;
+ }
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/traverse_ccw.cpp b/src/boost/libs/geometry/test/algorithms/overlay/traverse_ccw.cpp
new file mode 100644
index 000000000..f93980860
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/traverse_ccw.cpp
@@ -0,0 +1,365 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_DEFINE_STREAM_OPERATOR_SEGMENT_RATIO
+
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+
+#include <boost/foreach.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+template <typename Geometry>
+struct rev : boost::mpl::if_c<bg::point_order<Geometry>::value == bg::counterclockwise, boost::true_type, boost::false_type>::type
+{};
+
+template <typename Geometry1, typename Geometry2>
+inline typename bg::coordinate_type<Geometry1>::type
+intersect(Geometry1 const& g1, Geometry2 const& g2, std::string const& name,
+ bg::detail::overlay::operation_type op)
+{
+ boost::ignore_unused(name);
+
+ typedef typename bg::strategy::side::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry1>::type
+ >::type side_strategy_type;
+
+
+ typedef typename bg::point_type<Geometry1>::type point_type;
+
+ typedef typename bg::rescale_policy_type<point_type>::type
+ rescale_policy_type;
+
+ rescale_policy_type rescale_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+ typedef bg::detail::overlay::traversal_turn_info
+ <
+ point_type,
+ typename bg::detail::segment_ratio_type<point_type, rescale_policy_type>::type
+ > turn_info;
+ std::vector<turn_info> turns;
+
+ bg::detail::get_turns::no_interrupt_policy policy;
+ bg::get_turns
+ <
+ rev<Geometry1>::value,
+ rev<Geometry2>::value,
+ bg::detail::overlay::assign_null_policy
+ >(g1, g2, rescale_policy, turns, policy);
+
+ bg::enrich_intersection_points
+ <
+ rev<Geometry1>::value, rev<Geometry2>::value,
+ bg::overlay_intersection
+ >(turns, bg::detail::overlay::operation_intersection,
+ g1, g2, rescale_policy, side_strategy_type());
+
+ typedef bg::model::ring<typename bg::point_type<Geometry1>::type> ring_type;
+ typedef std::deque<ring_type> out_vector;
+ out_vector v;
+
+ bg::detail::overlay::traverse
+ <
+ rev<Geometry1>::value, rev<Geometry2>::value,
+ Geometry1, Geometry2
+ >::apply(g1, g2, op, rescale_policy, turns, v);
+
+ typename bg::coordinate_type<Geometry1>::type result = 0.0;
+ BOOST_FOREACH(ring_type& ring, v)
+ {
+ result += bg::area(ring);
+ }
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename
+ << name << "_"
+ << (op == bg::detail::overlay::operation_intersection ? "i" : "u")
+ << "_" << (rev<Geometry1>::value ? "ccw" : "cw")
+ << "_" << (rev<Geometry2>::value ? "ccw" : "cw")
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<Geometry1>::type> mapper(svg, 500, 500);
+ mapper.add(g1);
+ mapper.add(g2);
+
+ // Input shapes in green/blue
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+
+ // Traversal rings in magenta/light yellow fill
+ BOOST_FOREACH(ring_type const& ring, v)
+ {
+ mapper.map(ring, "fill-opacity:0.3;stroke-opacity:0.4;fill:rgb(255,255,0);"
+ "stroke:rgb(255,0,255);stroke-width:8");
+ }
+
+
+ // turn points in orange, + enrichment/traversal info
+
+ // Simple map to avoid two texts at same place (note that can still overlap!)
+ std::map<std::pair<int, int>, int> offsets;
+ int index = 0;
+ int const lineheight = 10;
+ int const margin = 5;
+
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ mapper.map(turn.point, "fill:rgb(255,128,0);"
+ "stroke:rgb(0,0,0);stroke-width:1", 3);
+
+ {
+ // Map characteristics
+ // Create a rounded off point
+ std::pair<int, int> p
+ = std::make_pair(
+ boost::numeric_cast<int>(0.5 + 10 * bg::get<0>(turn.point)),
+ boost::numeric_cast<int>(0.5 + 10 * bg::get<1>(turn.point))
+ );
+ std::string style = "fill:rgb(0,0,0);font-family:Arial;font-size:10px";
+
+ std::ostringstream out;
+ out << index
+ << ": " << bg::method_char(turn.method)
+ << std::endl
+ << "op: " << bg::operation_char(turn.operations[0].operation)
+ << " / " << bg::operation_char(turn.operations[1].operation)
+ << (turn.is_discarded() ? " (discarded) " : turn.blocked() ? " (blocked)" : "")
+ << std::endl;
+
+ if (turn.operations[0].enriched.next_ip_index != -1)
+ {
+ out << "ip: " << turn.operations[0].enriched.next_ip_index;
+ }
+ else
+ {
+ out << "vx: " << turn.operations[0].enriched.travels_to_vertex_index;
+ }
+ out << " ";
+ if (turn.operations[1].enriched.next_ip_index != -1)
+ {
+ out << "ip: " << turn.operations[1].enriched.next_ip_index;
+ }
+ else
+ {
+ out << "vx: " << turn.operations[1].enriched.travels_to_vertex_index;
+ }
+
+ out << std::endl;
+
+ out
+
+ << std::setprecision(3)
+ << "dist: " << turn.operations[0].fraction
+ << " / " << turn.operations[1].fraction
+ << std::endl;
+
+ offsets[p] += lineheight;
+ int offset = offsets[p];
+ offsets[p] += lineheight * 5;
+ mapper.text(turn.point, out.str(), style, margin, offset, lineheight);
+ }
+ index++;
+ }
+ }
+#endif
+
+ return result;
+}
+
+template <typename Geometry1, typename Geometry2>
+inline typename bg::coordinate_type<Geometry1>::type intersect(std::string const& wkt1, std::string const& wkt2, std::string const& name,
+ bg::detail::overlay::operation_type op)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ // Reverse if necessary: adapt to cw/ccw
+ bg::correct(geometry1);
+ bg::correct(geometry2);
+
+ return intersect(geometry1, geometry2, name, op);
+}
+
+template <typename T>
+inline void test_polygon(std::string const& wkt1, std::string const& wkt2, std::string const& name)
+{
+ typedef bg::model::d2::point_xy<T> point;
+ typedef bg::model::polygon<point> clock;
+ typedef bg::model::polygon<point, false> counter;
+
+ namespace ov = bg::detail::overlay;
+ T area1 = intersect<clock, clock>(wkt1, wkt2, name, ov::operation_intersection);
+ T area2 = intersect<counter, counter>(wkt1, wkt2, name, ov::operation_intersection);
+ T area3 = intersect<clock, counter>(wkt1, wkt2, name, ov::operation_intersection);
+ T area4 = intersect<counter, clock>(wkt1, wkt2, name, ov::operation_intersection);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area1, area3, 0.001);
+ BOOST_CHECK_CLOSE(area2, area4, 0.001);
+
+ area1 = intersect<clock, clock>(wkt1, wkt2, name, ov::operation_union);
+ area2 = intersect<counter, counter>(wkt1, wkt2, name, ov::operation_union);
+ area3 = intersect<clock, counter>(wkt1, wkt2, name, ov::operation_union);
+ area4 = intersect<counter, clock>(wkt1, wkt2, name, ov::operation_union);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area1, area3, 0.001);
+ BOOST_CHECK_CLOSE(area2, area4, 0.001);
+}
+
+template <typename T>
+inline void test_box_polygon(std::string const& wkt1, std::string const& wkt2, std::string const& name)
+{
+ typedef bg::model::d2::point_xy<T> point;
+ typedef bg::model::box<point> box;
+ typedef bg::model::polygon<point> clock;
+ typedef bg::model::polygon<point, false> counter;
+
+ namespace ov = bg::detail::overlay;
+ T area1 = intersect<box, clock>(wkt1, wkt2, name + "_bp", ov::operation_intersection);
+ T area2 = intersect<box, counter>(wkt1, wkt2, name + "_bp", ov::operation_intersection);
+ T area3 = intersect<clock, box>(wkt2, wkt1, name + "_pb", ov::operation_intersection);
+ T area4 = intersect<counter, box>(wkt2, wkt1, name + "_pb", ov::operation_intersection);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area1, area3, 0.001);
+ BOOST_CHECK_CLOSE(area2, area4, 0.001);
+
+ area1 = intersect<box, clock>(wkt1, wkt2, name + "_bp", ov::operation_union);
+ area2 = intersect<box, counter>(wkt1, wkt2, name + "_bp", ov::operation_union);
+ area3 = intersect<clock, box>(wkt2, wkt1, name + "_pb", ov::operation_union);
+ area4 = intersect<counter, box>(wkt2, wkt1, name + "_pb", ov::operation_union);
+ BOOST_CHECK_CLOSE(area1, area2, 0.001);
+ BOOST_CHECK_CLOSE(area3, area4, 0.001);
+ BOOST_CHECK_CLOSE(area1, area3, 0.001);
+ BOOST_CHECK_CLOSE(area2, area4, 0.001);
+}
+
+int test_main(int, char* [])
+{
+ //bool const ig = true;
+ test_polygon<double>(case_1[0], case_1[1], "c1");
+ test_polygon<double>(case_2[0], case_2[1], "c2");
+ test_polygon<double>(case_3[0], case_3[1], "c3");
+ test_polygon<double>(case_4[0], case_4[1], "c4");
+ test_polygon<double>(case_5[0], case_5[1], "c5");
+ test_polygon<double>(case_6[0], case_6[1], "c6");
+ test_polygon<double>(case_7[0], case_7[1], "c7");
+ test_polygon<double>(case_8[0], case_8[1], "c8");
+ test_polygon<double>(case_9[0], case_9[1], "c9" /*, ig */);
+
+
+ test_polygon<double>(case_10[0], case_10[1], "c10");
+ test_polygon<double>(case_11[0], case_11[1], "c11");
+ test_polygon<double>(case_12[0], case_12[1], "c12");
+ test_polygon<double>(case_13[0], case_13[1], "c13");
+ test_polygon<double>(case_14[0], case_14[1], "c14");
+ test_polygon<double>(case_15[0], case_15[1], "c15");
+ test_polygon<double>(case_16[0], case_16[1], "c16");
+ test_polygon<double>(case_17[0], case_17[1], "c17");
+ test_polygon<double>(case_18[0], case_18[1], "c18");
+ test_polygon<double>(case_19[0], case_19[1], "c19");
+ test_polygon<double>(case_20[0], case_20[1], "c20");
+ test_polygon<double>(case_21[0], case_21[1], "c21");
+ test_polygon<double>(case_22[0], case_22[1], "c22" /*, ig */);
+ test_polygon<double>(case_23[0], case_23[1], "c23");
+ test_polygon<double>(case_24[0], case_24[1], "c24");
+ test_polygon<double>(case_25[0], case_25[1], "c25" /*, ig */);
+ test_polygon<double>(case_26[0], case_26[1], "c26" /*, ig */);
+ test_polygon<double>(case_27[0], case_27[1], "c27");
+ test_polygon<double>(case_28[0], case_28[1], "c28");
+ test_polygon<double>(case_29[0], case_29[1], "c29");
+ test_polygon<double>(case_30[0], case_30[1], "c30");
+ test_polygon<double>(case_31[0], case_31[1], "c31" /*, ig */);
+ test_polygon<double>(case_32[0], case_32[1], "c32" /*, ig */);
+ test_polygon<double>(case_33[0], case_33[1], "c33" /*, ig */);
+ test_polygon<double>(case_34[0], case_34[1], "c34");
+ test_polygon<double>(case_35[0], case_35[1], "c35");
+ test_polygon<double>(case_36[0], case_36[1], "c36" /*, ig */);
+ test_polygon<double>(case_37[0], case_37[1], "c37" /*, ig */);
+ test_polygon<double>(case_38[0], case_38[1], "c38" /*, ig */);
+ test_polygon<double>(case_39[0], case_39[1], "c39");
+ test_polygon<double>(case_40[0], case_40[1], "c40" /*, ig */);
+ test_polygon<double>(case_41[0], case_41[1], "c41");
+ test_polygon<double>(case_42[0], case_42[1], "c42");
+ //test_polygon<double>(case_43[0], case_43[1], "c43", inv);
+ test_polygon<double>(case_44[0], case_44[1], "c44");
+ test_polygon<double>(case_45[0], case_45[1], "c45");
+ //test_polygon<double>(case_46[0], case_46[1], "c46", inv);
+ //test_polygon<double>(case_47[0], case_47[1], "c47" /*, ig */);
+ //test_polygon<double>(case_48[0], case_48[1], "c48");
+ test_polygon<double>(case_49[0], case_49[1], "c49");
+ test_polygon<double>(case_50[0], case_50[1], "c50");
+ test_polygon<double>(case_51[0], case_51[1], "c51");
+ test_polygon<double>(case_52[0], case_52[1], "c52" /*, ig */);
+ test_polygon<double>(case_53[0], case_53[1], "c53");
+ // Invalid ones / overlaying intersection points / self tangencies
+ //test_polygon<double>(case_54[0], case_54[1], "c54");
+ //test_polygon<double>(case_55[0], case_55[1], "c55");
+ //test_polygon<double>(case_56[0], case_56[1], "c56");
+ //test_polygon<double>(case_57[0], case_57[1], "c57" /*, ig */);
+ //test_polygon<double>(case_58[0], case_58[1], "c58");
+ //test_polygon<double>(case_59[0], case_59[1], "c59");
+
+ test_polygon<double>(pie_16_4_12[0], pie_16_4_12[1], "pie_16_4_12");
+ test_polygon<double>(pie_23_21_12_500[0], pie_23_21_12_500[1], "pie_23_21_12_500");
+ test_polygon<double>(pie_23_23_3_2000[0], pie_23_23_3_2000[1], "pie_23_23_3_2000");
+ test_polygon<double>(pie_23_16_16[0], pie_23_16_16[1], "pie_23_16_16");
+ test_polygon<double>(pie_16_2_15_0[0], pie_16_2_15_0[1], "pie_16_2_15_0");
+ test_polygon<double>(pie_4_13_15[0], pie_4_13_15[1], "pie_4_13_15");
+ test_polygon<double>(pie_20_20_7_100[0], pie_20_20_7_100[1], "pie_20_20_7_100");
+
+ test_polygon<double>(hv_1[0], hv_1[1], "hv1");
+ test_polygon<double>(hv_2[0], hv_2[1], "hv2");
+ test_polygon<double>(hv_3[0], hv_3[1], "hv3");
+ test_polygon<double>(hv_4[0], hv_4[1], "hv4");
+ test_polygon<double>(hv_5[0], hv_5[1], "hv5");
+ test_polygon<double>(hv_6[0], hv_6[1], "hv6");
+ test_polygon<double>(hv_7[0], hv_7[1], "hv7");
+ test_polygon<double>(dz_1[0], dz_1[1], "dz_1");
+ test_polygon<double>(dz_2[0], dz_2[1], "dz_2");
+ test_polygon<double>(dz_3[0], dz_3[1], "dz_3");
+
+ test_box_polygon<double>("POLYGON((1 1,4 4))", case_1[0], "bp1");
+
+ {
+ static std::string example_box = "POLYGON((1.5 1.5, 4.5 2.5))";
+ static std::string example_ring =
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))";
+ test_box_polygon<double>(example_box, example_ring, "bp2");
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/traverse_gmp.cpp b/src/boost/libs/geometry/test/algorithms/overlay/traverse_gmp.cpp
new file mode 100644
index 000000000..335e8ce34
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/traverse_gmp.cpp
@@ -0,0 +1,208 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#error This unit test is not updated for several years
+
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4267 )
+#endif
+
+//#define GEOMETRY_DEBUG_INTERSECTION
+
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <fstream>
+
+#include <boost/numeric_adaptor/numeric_adaptor.hpp>
+#include <boost/numeric_adaptor/gmp_value_type.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrichment_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traverse.hpp>
+
+
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+
+
+template <typename OutputType, typename G1, typename G2>
+void test_traverse(std::string const& caseid, G1 const& g1, G2 const& g2)
+{
+ typedef bg::detail::intersection::intersection_point
+ <typename bg::point_type<G2>::type> ip;
+ typedef typename boost::range_const_iterator<std::vector<ip> >::type iterator;
+ typedef std::vector<ip> ip_vector;
+ ip_vector ips;
+
+ typedef typename bg::strategy::side::services::default_strategy
+ <
+ typename bg::cs_tag<G1>::type
+ >::type strategy_type;
+
+
+ typedef bg::detail::overlay::traversal_turn_info
+ <
+ typename bg::point_type<G2>::type
+ > turn_info;
+ typedef typename boost::range_iterator<const std::vector<turn_info> >::type iterator;
+ std::vector<turn_info> ips;
+
+ bg::get_turns<false, false, bg::detail::overlay::assign_null_policy>(g1, g2, ips);
+ bg::enrich_intersection_points(ips, g1, g2, strategy_type());
+
+ typedef bg::model::ring<typename bg::point_type<G2>::type> ring_type;
+ typedef std::vector<ring_type> out_vector;
+ out_vector v;
+
+
+
+ bg::traverse
+ <
+ strategy_type,
+ ring_type
+ >
+ (
+ g1, g2, -1, ips, std::back_inserter(v)
+ );
+
+
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "intersection_" << caseid << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ // Trick to have this always LongDouble
+ //typedef bg::model::d2::point_xy<long double> P;
+ typedef typename bg::point_type<G1>::type P;
+ //typename bg::replace_point_type<G1, P>::type rg1;
+ //typename bg::replace_point_type<G2, P>::type rg2;
+
+ bg::svg_mapper<P> mapper(svg, 1000, 800);
+
+ mapper.add(g1);
+ mapper.add(g2);
+
+ // Input shapes in green/blue
+ mapper.map(g1, "opacity:0.8;fill:rgb(0,255,0);"
+ "stroke:rgb(0,0,0);stroke-width:1");
+ mapper.map(g2, "opacity:0.8;fill:rgb(0,0,255);"
+ "stroke:rgb(0,0,0);stroke-width:1");
+
+ // Traversal rings in red
+ for (typename out_vector::const_iterator it = boost::begin(v);
+ it != boost::end(v);
+ ++it)
+ {
+ mapper.map(*it, "fill-opacity:0.1;stroke-opacity:0.9;"
+ "fill:rgb(255,0,0);stroke:rgb(255,0,0);stroke-width:5");
+
+ std::cout << bg::wkt(*it) << std::endl;
+ std::cout << bg::area(*it) << std::endl;
+ }
+
+ // IP's in orange
+ for (iterator it = boost::begin(ips); it != boost::end(ips); ++it)
+ {
+ mapper.map(it->point, "fill:rgb(255,128,0);"
+ "stroke:rgb(0,0,100);stroke-width:1");
+ }
+ }
+#endif
+}
+
+template <typename OutputType, typename G1, typename G2>
+void test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2)
+{
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ bg::correct(g1);
+ bg::correct(g2);
+ std::cout << "area1 " << bg::area(g1) << " " << " area2: " << bg::area(g2) << std::endl;
+
+ test_traverse<OutputType>(caseid, g1, g2);
+}
+
+
+#if ! defined(GEOMETRY_TEST_MULTI)
+
+template <typename P>
+void test_traverse_gmp(std::string const& caseid)
+{
+ typedef bg::model::polygon<P> polygon;
+ std::cout << typeid(typename bg::coordinate_type<P>::type).name() << std::endl;
+ std::cout << std::setprecision(30) << std::numeric_limits<float>::epsilon() << std::endl;
+ std::cout << std::setprecision(30) << std::numeric_limits<double>::epsilon() << std::endl;
+ std::cout << std::setprecision(30) << std::numeric_limits<long double>::epsilon() << std::endl;
+
+ static std::string brandon[3] =
+ {
+ //37.43402099609375 1.470055103302002,
+ "POLYGON((37.29449462890625 1.7902572154998779,37.000419616699219 1.664225697517395,37.140213012695313 1.3446992635726929,50.974888957147442 -30.277285722290763,57.297810222148939 -37.546793343968417,41.590042114257813 -7.2021245956420898,40.6978759765625 -5.4500408172607422,40.758884429931641 -5.418975830078125,42.577911376953125 -4.4901103973388672,42.577877044677734 -4.4900407791137695,42.699958801269531 -4.4278755187988281,46.523914387974358 -8.5152102535033496,47.585065917176543 -6.1314922196594779,45.389434814453125 -4.5143837928771973,46.296027072709599 -2.4984308554828116,37.29449462890625 1.7902572154998779))",
+ "POLYGON((42.399410247802734 1.4956772327423096,42.721500396728516 2.2342472076416016,42.721500396728516 3.6584999561309814,51.20102152843122 7.1738039562841562,51.370888500897557 7.4163459734570729,37.43402099609375 1.470055103302002,37.29449462890625 1.7902572154998779,37.000419616699219 1.664225697517395,37.140213012695313 1.3446992635726929,36.954700469970703 1.2597870826721191,26.472516656201325 -3.5380830513658776,27.069889344709196 -4.2926591211028242,30.501169204711914 -2.3718316555023193,32.708126068115234 -2.3611266613006592,32.708126068115234 -2.3611700534820557,32.708168029785156 -2.3611698150634766,32.718830108642578 -4.3281683921813965,29.135100397190627 -8.9262827849488211,29.619997024536133 -9.5368013381958008,30.339155197143555 -8.9838371276855469,30.670633316040039 -8.8180980682373047,30.896280288696289 -9.1206979751586914,30.207040612748258 -10.275926149505661,30.947774887084961 -11.208560943603516,31.669155120849609 -10.653837203979492,32.000633239746094 -10.488097190856934,32.226280212402344 -10.790698051452637,31.682494778186321 -12.133624901803865,32.274600982666016 -12.879127502441406,32.998821258544922 -12.323249816894531,33.339523315429688 -12.147735595703125,33.566280364990234 -12.450697898864746,33.164891643669634 -14.000060288415174,33.598796844482422 -14.546377182006836,34.328716278076172 -13.992490768432617,34.658355712890625 -13.81736946105957,34.886280059814453 -14.120697975158691,34.634240447128811 -15.85007183479255,34.931102752685547 -16.223842620849609,35.656356811523438 -15.66030216217041,35.963497161865234 -15.476018905639648,37.326129913330078 -17.190576553344727,38.823680877685547 -16.296066284179688,39.966808319091797 -17.625011444091797,40.800632476806641 -17.208097457885742,41.821544647216797 -19.211688995361328,41.988733475572282 -19.945838749437218,57.524304765518266 -37.807195733984784,41.590042114257813 -7.2021245956420898,40.6978759765625 -5.4500408172607422,40.758884429931641 -5.418975830078125,42.577911376953125 -4.4901103973388672,42.577877044677734 -4.4900407791137695,42.699958801269531 -4.4278755187988281,46.559533858616469 -8.435196445683264,47.604561877161387 -6.087697464505224,45.389434814453125 -4.5143837928771973,46.695858001708984 -1.6093428134918213,47.263670054709685 -1.784876824891044,47.830955505371094 -0.69758313894271851,48.43512638981781 -0.81299959072453376,49.071769542946825 0.61489892713413252,43.764598846435547 0.93951499462127686,43.644271850585938 0.96149998903274536,42.399410247802734 1.4956772327423096))",
+ "POLYGON((43.644271850585938 0.96149998903274536,43.764598846435547 0.93951499462127686,49.071769542946825 0.61489892713413252,48.43512638981781 -0.81299959072453376,47.830955505371094 -0.69758313894271851,47.263670054709685 -1.784876824891044,46.695858001708984 -1.6093428134918213,45.389434814453125 -4.5143837928771973,47.604561877161387 -6.087697464505224,46.559533858616469 -8.435196445683264,42.699958801269531 -4.4278755187988281,42.577877044677734 -4.4900407791137695,42.577911376953125 -4.4901103973388672,40.758884429931641 -5.418975830078125,40.6978759765625 -5.4500408172607422,41.590042114257813 -7.2021245956420898,57.524304765518266 -37.807195733984784,41.988733475572282 -19.945838749437218,41.821544647216797 -19.211688995361328,40.800632476806641 -17.208097457885742,39.966808319091797 -17.625011444091797,38.823680877685547 -16.296066284179688,37.326129913330078 -17.190576553344727,35.963497161865234 -15.476018905639648,35.656356811523438 -15.66030216217041,34.931102752685547 -16.223842620849609,34.634240447128811 -15.85007183479255,34.886280059814453 -14.120697975158691,34.658355712890625 -13.81736946105957,34.328716278076172 -13.992490768432617,33.598796844482422 -14.546377182006836,33.164891643669634 -14.000060288415174,33.566280364990234 -12.450697898864746,33.339523315429688 -12.147735595703125,32.998821258544922 -12.323249816894531,32.274600982666016 -12.879127502441406,31.682494778186321 -12.133624901803865,32.226280212402344 -10.790698051452637,32.000633239746094 -10.488097190856934,31.669155120849609 -10.653837203979492,30.947774887084961 -11.208560943603516,30.207040612748258 -10.275926149505661,30.896280288696289 -9.1206979751586914,30.670633316040039 -8.8180980682373047,30.339155197143555 -8.9838371276855469,29.619997024536133 -9.5368013381958008,29.135100397190627 -8.9262827849488211,32.718830108642578 -4.3281683921813965,32.708168029785156 -2.3611698150634766,32.708126068115234 -2.3611700534820557,32.708126068115234 -2.3611266613006592,30.501169204711914 -2.3718316555023193,27.069889344709196 -4.2926591211028242,26.472516656201325 -3.5380830513658776,36.954700469970703 1.2597870826721191,37.140213012695313 1.3446992635726929,37.000419616699219 1.664225697517395,37.29449462890625 1.7902572154998779,37.43402099609375 1.470055103302002,51.370888500897557 7.4163459734570729,51.20102152843122 7.1738039562841562,42.721500396728516 3.6584999561309814,42.721500396728516 2.2342472076416016,42.399410247802734 1.4956772327423096,43.644271850585938 0.96149998903274536))"
+ };
+
+
+ // Test the FORWARD case
+ test_one<polygon, polygon, polygon>(caseid, brandon[0], brandon[1]);
+}
+#endif
+
+
+
+int main(int argc, char** argv)
+{
+ int mode = (argc > 1) ? atol(argv[1]) : 1;
+ switch(mode)
+ {
+ case 1 :
+ test_traverse_gmp<bg::model::d2::point_xy<float> >("float");
+ break;
+ case 2 :
+ test_traverse_gmp<bg::model::d2::point_xy<double> >("double");
+ break;
+ case 3 :
+ test_traverse_gmp<bg::model::d2::point_xy<long double> >("long double");
+ break;
+ case 4 :
+ #if defined(HAVE_TTMATH)
+ test_traverse_gmp<bg::model::d2::point_xy<ttmath_big> >("ttmath_big");
+ #endif
+ break;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/overlay/traverse_multi.cpp b/src/boost/libs/geometry/test/algorithms/overlay/traverse_multi.cpp
new file mode 100644
index 000000000..dd20f9567
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/overlay/traverse_multi.cpp
@@ -0,0 +1,462 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+//#define BOOST_GEOMETRY_DEBUG_ENRICH
+//#define BOOST_GEOMETRY_DEBUG_RELATIVE_ORDER
+
+// Include the single-geometry version
+#define BOOST_GEOMETRY_TEST_MULTI
+#include <algorithms/overlay/traverse.cpp>
+
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/core/geometry_id.hpp>
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/core/ring_type.hpp>
+
+#include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
+#include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
+#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
+#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
+
+#include <boost/geometry/views/detail/range_type.hpp>
+
+
+#include "multi_overlay_cases.hpp"
+
+
+
+template <typename MultiPolygon, bool Reverse>
+void test_geometries()
+{
+ typedef test_traverse
+ <
+ MultiPolygon, MultiPolygon,
+ bg::overlay_intersection, Reverse, Reverse
+ > test_traverse_intersection;
+ typedef test_traverse
+ <
+ MultiPolygon, MultiPolygon,
+ bg::overlay_union, Reverse, Reverse
+ > test_traverse_union;
+
+ // Intersections:
+ test_traverse_intersection::apply
+ (
+ "simplex", 2, 6.42,
+ case_multi_simplex[0], case_multi_simplex[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_58_multi_b4", 1, 12.666666667,
+ case_58_multi[4], case_58_multi[2]
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ test_traverse_intersection::apply
+ (
+ "case_58_multi_b5", 1, 1,
+ case_58_multi[5], case_58_multi[2]
+ );
+#endif
+ test_traverse_intersection::apply
+ (
+ "case_58_multi_b6", 1, 13.25,
+ case_58_multi[6], case_58_multi[2]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_65_multi", 1, 1,
+ case_65_multi[0], case_65_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_66_multi", 1, 1,
+ case_66_multi[0], case_66_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_67_multi", 1, 1,
+ case_67_multi[0], case_67_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_69_multi", 1, 1,
+ case_69_multi[0], case_69_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_71_multi", 2, 2,
+ case_71_multi[0], case_71_multi[1]
+ );
+
+ // #72, note that it intersects into 2 shapes,
+ // the third one is done by assemble (see intersection #72)
+ test_traverse_intersection::apply
+ (
+ "case_72_multi", 2, 1.35,
+ case_72_multi[0], case_72_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_73_multi", 2, 2,
+ case_73_multi[0], case_73_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_74_multi", 2, 3,
+ case_74_multi[0], case_74_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_75_multi", 1, 1,
+ case_75_multi[0], case_75_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_77_multi", 5, 9,
+ case_77_multi[0], case_77_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_78_multi", 2, 22, // Went from 3 to 2 by get_turns / partition
+ case_78_multi[0], case_78_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_80_multi", 1, 0.5,
+ case_80_multi[0], case_80_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_81_multi", 1, 0.25,
+ case_81_multi[0], case_81_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_83_multi", 3, 1.25,
+ case_83_multi[0], case_83_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_91_multi", 2, 1.0,
+ case_91_multi[0], case_91_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_92_multi", 3, 1.5,
+ case_92_multi[0], case_92_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_93_multi", 2, 1.25,
+ case_93_multi[0], case_93_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_96_multi", 1, 0.5,
+ case_96_multi[0], case_96_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_98_multi", 4, 3.0,
+ case_98_multi[0], case_98_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_99_multi", 3, 1.75,
+ case_99_multi[0], case_99_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_100_multi", 2, 1.5,
+ case_100_multi[0], case_100_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_108_multi", 7, 7.5,
+ case_108_multi[0], case_108_multi[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "case_recursive_boxes_2", 1, 91,
+ case_recursive_boxes_2[0], case_recursive_boxes_2[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_107_multi", 2, 1.5,
+ case_107_multi[0], case_107_multi[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "case_recursive_boxes_3", 19, 12.5,
+ case_recursive_boxes_3[0], case_recursive_boxes_3[1]
+ );
+
+ // Unions
+
+
+ test_traverse_union::apply
+ (
+ "simplex", 1, 14.58,
+ case_multi_simplex[0], case_multi_simplex[1]
+ );
+
+ test_traverse_union::apply
+ (
+ "case_61_multi", 1, 4,
+ case_61_multi[0], case_61_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_62_multi", 1, 1 /*UU 2, 2 */,
+ case_62_multi[0], case_62_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_63_multi", 1, 1 /*UU 2, 2 */,
+ case_63_multi[0], case_63_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_64_multi", 1, 3,
+ case_64_multi[0], case_64_multi[1]
+ );
+
+ test_traverse_union::apply
+ (
+ "case_66_multi", 1, 4 /*UU 3, 7 */,
+ case_66_multi[0], case_66_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_68_multi", 1, 4 /*UU 2, 5 */,
+ case_68_multi[0], case_68_multi[1]
+ );
+ // 71: single-polygon generates 2 shapes, multi-polygon
+ // generates 1 shape, both are self-tangent and OK
+ test_traverse_union::apply
+ (
+ "case_71_multi", 1, 9,
+ case_71_multi[0], case_71_multi[1]
+ );
+
+ test_traverse_union::apply
+ (
+ "case_72_multi", 1, 10.65,
+ case_72_multi[0], case_72_multi[1]
+ );
+
+ test_traverse_union::apply
+ (
+ "case_73_multi", 1, 3,
+ case_73_multi[0], case_73_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_74_multi", 2, 17,
+ case_74_multi[0], case_74_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_75_multi", 1, 1 /*UU 5, 5 */,
+ case_75_multi[0], case_75_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_76_multi", 2, 5 /*UU 6, 6 */,
+ case_76_multi[0], case_76_multi[1]
+ );
+
+ test_traverse_union::apply
+ (
+ "case_80_multi", 1, 9.25,
+ case_80_multi[0], case_80_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_81_multi", 1, 3.25,
+ case_81_multi[0], case_81_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_82_multi", 3, 4,
+ case_82_multi[0], case_82_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_84_multi", 1, 4,
+ case_84_multi[0], case_84_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_85_multi", 1, 3.5,
+ case_85_multi[0], case_85_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_86_multi", 1, 4,
+ case_86_multi[0], case_86_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_87_multi", 1, 6,
+ case_87_multi[0], case_87_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_88_multi", 2, 4,
+ case_88_multi[0], case_88_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_89_multi", 1, 6,
+ case_89_multi[0], case_89_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_90_multi", 1, 7.5,
+ case_90_multi[0], case_90_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_92_multi", 2, 6.25,
+ case_92_multi[0], case_92_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_94_multi", 1, 10.0,
+ case_94_multi[0], case_94_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_95_multi", 2, 6.5,
+ case_95_multi[0], case_95_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_96_multi", 1, 3.5,
+ case_96_multi[0], case_96_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_97_multi", 1, 3.75,
+ case_97_multi[0], case_97_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_101_multi", 1, 22.25,
+ case_101_multi[0], case_101_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_102_multi", 3, 24.25,
+ case_102_multi[0], case_102_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_103_multi", 1, 25,
+ case_103_multi[0], case_103_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_104_multi", 1, 25,
+ case_104_multi[0], case_104_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_105_multi", 1, 25,
+ case_105_multi[0], case_105_multi[1]
+ );
+ test_traverse_union::apply
+ (
+ "case_106_multi", 1, 25,
+ case_106_multi[0], case_106_multi[1]
+ );
+
+
+ test_traverse_union::apply
+ (
+ "case_recursive_boxes_1", 2, 97,
+ case_recursive_boxes_1[0], case_recursive_boxes_1[1]
+ );
+
+ test_traverse_union::apply
+ (
+ "case_recursive_boxes_3", 7, 49.5,
+ case_recursive_boxes_3[0], case_recursive_boxes_3[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "pie_21_7_21_0_3", 2, 818824.56678,
+ pie_21_7_21_0_3[0], pie_21_7_21_0_3[1]
+ );
+
+ test_traverse_intersection::apply
+ (
+ "pie_23_19_5_0_2", 2, 2948602.3911823,
+ pie_23_19_5_0_2[0], pie_23_19_5_0_2[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "pie_7_14_5_0_7", 2, 490804.56678,
+ pie_7_14_5_0_7[0], pie_7_14_5_0_7[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "pie_16_16_9_0_2", 2, 1146795,
+ pie_16_16_9_0_2[0], pie_16_16_9_0_2[1]
+ );
+ test_traverse_intersection::apply
+ (
+ "pie_7_2_1_0_15", 2, 490585.5,
+ pie_7_2_1_0_15[0], pie_7_2_1_0_15[1]
+ );
+
+}
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+
+ typedef bg::model::multi_polygon
+ <
+ bg::model::polygon<point_type>
+ > multi_polygon;
+
+ typedef bg::model::multi_polygon
+ <
+ bg::model::polygon<point_type, false>
+ > multi_polygon_ccw;
+
+ test_geometries<multi_polygon, false>();
+ test_geometries<multi_polygon_ccw, true>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter.cpp b/src/boost/libs/geometry/test/algorithms/perimeter.cpp
new file mode 100644
index 000000000..54fcd3c57
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter.cpp
@@ -0,0 +1,63 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <algorithms/test_perimeter.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // 3-4-5 triangle
+ //test_geometry<std::pair<P, P> >("LINESTRING(0 0,3 4)", 5);
+
+ test_geometry<bg::model::ring<P> >(
+ "POLYGON((0 0,0 1,1 1,1 0,0 0))", 4);
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,0 1,1 0,0 0))", 1.0 + 1.0 + sqrt(2.0));
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,2 1,2 2,1 2,1 1))", 20);
+}
+
+template <typename P>
+void test_open()
+{
+ typedef bg::model::polygon<P, true, false> open_polygon;
+ test_geometry<open_polygon>("POLYGON((0 0,0 1,1 1,1 0))", 4);
+}
+
+template <typename P>
+void test_empty_input()
+{
+ bg::model::polygon<P> poly_empty;
+ bg::model::ring<P> ring_empty;
+
+ test_empty_input(poly_empty);
+ test_empty_input(ring_empty);
+}
+
+int test_main(int, char* [])
+{
+ //test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ test_open<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ // test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter/Jamfile b/src/boost/libs/geometry/test/algorithms/perimeter/Jamfile
new file mode 100644
index 000000000..79fea5d4f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter/Jamfile
@@ -0,0 +1,16 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2016 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-perimeter
+ :
+ [ run perimeter.cpp : : : : algorithms_perimeter ]
+ [ run perimeter_geo.cpp : : : : algorithms_perimeter_geo ]
+ [ run perimeter_sph.cpp : : : : algorithms_perimeter_sph ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter/perimeter.cpp b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter.cpp
new file mode 100644
index 000000000..c30389fde
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter.cpp
@@ -0,0 +1,66 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_perimeter.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename P>
+void test_all()
+{
+ // Simple
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,3 4,4 3,0 0))",
+ 5 + sqrt(2.0) + 5);
+ // Non-simple
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,3 4,4 3,0 3,0 0))",
+ 5 + sqrt(2.0) + 4 + 3);
+ // With holes
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,3 4,4 3,0 0),\
+ (2 2,3 4,3 3,2 2))",
+ 5 + sqrt(2.0) + 5 +
+ sqrt(5.0) + 1 + sqrt(2.0));
+ // Repeated points
+ test_geometry<bg::model::polygon<P> >("POLYGON((0 0,3 4,3 4,3 4,4 3,4 3,\
+ 4 3,4 3,4 3,4 3,0 3,0 0))",
+ 5 + sqrt(2.0) + 4 + 3);
+ // Multipolygon
+ test_geometry<bg::model::multi_polygon<bg::model::polygon<P> > >
+ (
+ "MULTIPOLYGON(((0 0,3 4,4 3,0 0)), ((0 0,3 4,4 3,0 3,0 0)))",
+ 5 + sqrt(2.0) + 5 + 5 + sqrt(2.0) + 4 + 3
+ );
+
+ // Geometries with perimeter zero
+ test_geometry<P>("POINT(0 0)", 0);
+ test_geometry<bg::model::linestring<P> >("LINESTRING(0 0,3 4,4 3)", 0);
+}
+
+template <typename P>
+void test_empty_input()
+{
+ test_empty_input(bg::model::polygon<P>());
+ test_empty_input(bg::model::multi_polygon<bg::model::polygon<P> >());
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ // test_empty_input<bg::model::d2::point_xy<int> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_geo.cpp b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_geo.cpp
new file mode 100644
index 000000000..403f87b0b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_geo.cpp
@@ -0,0 +1,124 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_perimeter.hpp>
+#include <algorithms/perimeter/perimeter_polygon_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename P>
+struct geo_strategies
+{
+ // Set radius type, but for integer coordinates we want to have floating
+ // point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<P>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+ typedef bg::strategy::distance::andoyer<stype> andoyer_type;
+ typedef bg::strategy::distance::thomas<stype> thomas_type;
+ typedef bg::strategy::distance::vincenty<stype> vincenty_type;
+};
+
+template <typename P>
+void test_default() //this should use andoyer strategy
+{
+ for (std::size_t i = 0; i <= 2; ++i)
+ {
+ test_geometry<bg::model::polygon<P> >(poly_data_geo[i],
+ 1116814.237 + 1116152.605);
+ }
+
+ //since the geodesic distance is the shortest path it should go over the pole
+ //in this case; thus the correct perimeter is the meridian length (below)
+ //and not 40075160 which is the legth of the equator
+ test_geometry<bg::model::polygon<P> >(poly_data_geo[3],
+ 40007834.7139);
+
+ //force to use equator path
+ test_geometry<bg::model::polygon<P> >(poly_data_geo[4],
+ 40075016.6856);
+
+ // Multipolygon
+ test_geometry<bg::model::multi_polygon<bg::model::polygon<P> > >
+ (multipoly_data[0], 60011752.0709);
+
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0);
+ test_geometry<bg::model::linestring<P> >("LINESTRING(0 0,0 1,1 1,1 0,0 0)",
+ 0);
+}
+
+template <typename P, typename N, typename Strategy>
+void test_with_strategy(N exp_length, Strategy strategy)
+{
+ for (std::size_t i = 0; i <= 2; ++i)
+ {
+ test_geometry<bg::model::polygon<P> >(poly_data_geo[i],
+ exp_length,
+ strategy);
+ }
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0, strategy);
+ test_geometry<bg::model::linestring<P> >("LINESTRING(0 0,0 1,1 1,1 0,0 0)",
+ 0,
+ strategy);
+}
+
+template <typename P>
+void test_andoyer()
+{
+ typename geo_strategies<P>::andoyer_type andoyer;
+ test_with_strategy<P>(1116814.237 + 1116152.605, andoyer);
+}
+
+template <typename P>
+void test_thomas()
+{
+ typename geo_strategies<P>::thomas_type thomas;
+ test_with_strategy<P>(1116825.795 + 1116158.7417, thomas);
+}
+
+template <typename P>
+void test_vincenty()
+{
+ typename geo_strategies<P>::vincenty_type vincenty;
+ test_with_strategy<P>(1116825.857 + 1116159.144, vincenty);
+}
+
+template <typename P>
+void test_all()
+{
+ test_default<P>();
+ test_andoyer<P>();
+ test_thomas<P>();
+ test_vincenty<P>();
+}
+
+int test_main(int, char* [])
+{
+ // Works only for double(?!)
+ //test_all<bg::model::d2::point_xy<int,
+ // bg::cs::geographic<bg::degree> > >();
+ //test_all<bg::model::d2::point_xy<float,
+ // bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::d2::point_xy<double,
+ bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_polygon_cases.hpp b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_polygon_cases.hpp
new file mode 100644
index 000000000..837829f5f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_polygon_cases.hpp
@@ -0,0 +1,37 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef PERIMETER_POLYGON_CASES_HPP
+#define PERIMETER_POLYGON_CASES_HPP
+
+#include <string>
+
+static std::string poly_data_geo[] = {
+ "POLYGON((0 90,1 80,1 70))",
+ "POLYGON((0 90,1 80,1 80,1 80,1 70,1 70))",
+ "POLYGON((0 90,1 80,1 79,1 78,1 77,1 76,1 75,1 74,\
+ 1 73,1 72,1 71,1 70))",\
+ "POLYGON((0 0,180 0,0 0))",
+ "POLYGON((0 0,90 0,180 0,90 0,0 0))"
+};
+
+static std::string poly_data_sph[] = {
+ "POLYGON((0 0,180 0,0 0))",
+ "POLYGON((0 0,180 0,180 0,180 0,180 180,0 0))",
+ "POLYGON((0 0,180 0,180 10,180 20,180 30,180 40,180 50,180 60,\
+ 180 70,180 80,180 90,180 100,180 110,180 120,180 130,\
+ 180 140,180 150,180 160,180 170,180 180,0 0))"
+};
+
+static std::string multipoly_data[] = {
+ "MULTIPOLYGON(((0 0,180 0,0 0)), ((0 0, 0 90, 90 90, 0 0)))"
+};
+
+#endif // PERIMETER_POLYGON_CASES_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_sph.cpp b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_sph.cpp
new file mode 100644
index 000000000..73cf91800
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter/perimeter_sph.cpp
@@ -0,0 +1,88 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithms/test_perimeter.hpp>
+#include <algorithms/perimeter/perimeter_polygon_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename P>
+void test_all_default() //test the default strategy
+{
+ double const pi = boost::math::constants::pi<double>();
+
+ for (std::size_t i = 0; i <= 2; ++i)
+ {
+ test_geometry<bg::model::polygon<P> >(poly_data_sph[i], 2 * pi);
+ }
+
+ // Multipolygon
+ test_geometry<bg::model::multi_polygon<bg::model::polygon<P> > >
+ (multipoly_data[0], 3 * pi);
+
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0);
+ test_geometry<bg::model::linestring<P> >("LINESTRING(0 0,3 4,4 3)", 0);
+}
+
+
+template <typename P>
+void test_all_haversine(double const mean_radius)
+{
+ double const pi = boost::math::constants::pi<double>();
+ bg::strategy::distance::haversine<double> haversine_strategy(mean_radius);
+
+ for (std::size_t i = 0; i <= 2; ++i)
+ {
+ test_geometry<bg::model::polygon<P> >(poly_data_sph[i],
+ 2 * pi * mean_radius,
+ haversine_strategy);
+ }
+
+ // Multipolygon
+ test_geometry<bg::model::multi_polygon<bg::model::polygon<P> > >
+ (multipoly_data[0],
+ 3 * pi * mean_radius,
+ haversine_strategy);
+
+ // Geometries with length zero
+ test_geometry<P>("POINT(0 0)", 0, haversine_strategy);
+ test_geometry<bg::model::linestring<P> >("LINESTRING(0 0,3 4,4 3)",
+ 0,
+ haversine_strategy);
+}
+
+int test_main(int, char* [])
+{
+ //Earth radius estimation in Km
+ //(see https://en.wikipedia.org/wiki/Earth_radius)
+ double const mean_radius = 6371.0;
+
+ test_all_default<bg::model::d2::point_xy<int,
+ bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all_default<bg::model::d2::point_xy<float,
+ bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all_default<bg::model::d2::point_xy<double,
+ bg::cs::spherical_equatorial<bg::degree> > >();
+
+ test_all_haversine<bg::model::d2::point_xy<int,
+ bg::cs::spherical_equatorial<bg::degree> > >(mean_radius);
+ test_all_haversine<bg::model::d2::point_xy<float,
+ bg::cs::spherical_equatorial<bg::degree> > >(mean_radius);
+ test_all_haversine<bg::model::d2::point_xy<double,
+ bg::cs::spherical_equatorial<bg::degree> > >(mean_radius);
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/perimeter_multi.cpp b/src/boost/libs/geometry/test/algorithms/perimeter_multi.cpp
new file mode 100644
index 000000000..3ddd8395c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/perimeter_multi.cpp
@@ -0,0 +1,37 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/perimeter.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <algorithms/test_perimeter.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)))", 1.0 + 1.0 + sqrt(2.0));
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/point_on_surface.cpp b/src/boost/libs/geometry/test/algorithms/point_on_surface.cpp
new file mode 100644
index 000000000..7ee5eb880
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/point_on_surface.cpp
@@ -0,0 +1,365 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2013-2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Instead of having a separate (and nearly similar) unit test to test multipolygons,
+// we now include them here and compile them by default. Only undefining the next line
+// will avoid testing multi-geometries
+#define BOOST_GEOMETRY_UNIT_TEST_MULTI
+
+#include <geometry_test_common.hpp>
+
+// The include to test
+#include <boost/geometry/algorithms/point_on_surface.hpp>
+
+// Helper includes
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+// Include from unit tests
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/predef_relop.hpp>
+#include <algorithms/overlay/overlay_cases.hpp>
+
+#if defined(BOOST_GEOMETRY_UNIT_TEST_MULTI)
+# include <boost/geometry/algorithms/detail/extreme_points.hpp>
+#endif
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+template <typename Geometry>
+void test_geometry(std::string const& case_id, Geometry const& geometry, double /*expected_x*/ = 0, double /*expected_y*/ = 0)
+{
+//std::cout << case_id << std::endl;
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ point_type point;
+ bg::point_on_surface(geometry, point);
+
+ BOOST_CHECK_MESSAGE(bg::within(point, geometry),
+ case_id << " generated point_on_surface (dim 1) is not within geometry");
+
+#ifdef BOOST_GEOMETRY_POINT_ON_SURFACE_COMPLETE
+ // For the algorithm we also check generation in the other dimension
+ point_type right_point;
+ bg::detail::point_on_surface::calculate_point_on_surface<0>(geometry, right_point);
+
+ BOOST_CHECK_MESSAGE(bg::within(right_point, geometry),
+ case_id << " generated point_on_surface (dim 0) is not within geometry");
+
+ point_type returned_point = bg::return_point_on_surface(geometry);
+#endif
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "point_on_surface_" << case_id << "_"
+ << string_from_type<typename bg::coordinate_type<Geometry>::type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ // To map the intermediate products:
+ bg::model::linestring<point_type> top_points;
+ typedef bg::model::linestring<point_type> intruder_type;
+ std::vector<intruder_type> top_intruders;
+ bg::extreme_points<1>(geometry, top_points, top_intruders);
+
+#ifdef BOOST_GEOMETRY_POINT_ON_SURFACE_COMPLETE
+ bg::model::linestring<point_type> right_points;
+ std::vector<bg::model::linestring<point_type> > right_intruders;
+ bg::extreme_points<0>(geometry, right_points, right_intruders);
+#endif
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+ mapper.add(geometry);
+ mapper.map(geometry, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:1");
+
+ // Top (red/magenta)
+ mapper.map(top_points, "stroke:rgb(255,0,0);stroke-width:2");
+ BOOST_FOREACH(intruder_type const& intruder, top_intruders)
+ {
+ mapper.map(intruder, "stroke:rgb(255,0,255);stroke-width:2");
+ }
+ mapper.map(point, "opacity:0.8;fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 3);
+
+#ifdef BOOST_GEOMETRY_POINT_ON_SURFACE_COMPLETE
+ //// Right (blue/cyan)
+ // (mostly commented, makes the picture less clear)
+ //mapper.map(right_points, "stroke:rgb(0,0,255);stroke-width:2");
+ //BOOST_FOREACH(intruder_type const& intruder, right_intruders)
+ //{
+ // mapper.map(intruder, "stroke:rgb(0,255,255);stroke-width:2");
+ //}
+ mapper.map(right_point, "opacity:0.8;fill:rgb(0,128,255);stroke:rgb(0,0,100);stroke-width:1", 3);
+#endif
+ }
+#endif
+
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& case_id, std::string const& wkt, double expected_x = 0, double expected_y = 0)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+ test_geometry(case_id, geometry, expected_x, expected_y);
+}
+
+template <typename Point>
+void test_point_order_and_type()
+{
+ typedef bg::model::polygon<Point, false, false> ccw_open_polygon;
+ typedef bg::model::polygon<Point, true, false> cw_open_polygon;
+ typedef bg::model::polygon<Point, false, true> ccw_closed_polygon;
+ typedef bg::model::polygon<Point, true, true> cw_closed_polygon;
+
+ test_geometry<ccw_open_polygon>("with_hole_ccw_open", "POLYGON((0 0,9 0,9 9,0 9),(2 2,2 7,7 7,7 2))", 0, 0);
+ test_geometry<cw_open_polygon>("with_hole_cw_open", "POLYGON((0 0,0 9,9 9,9 0),(2 2,7 2,7 7,2 7))", 0, 0);
+ test_geometry<ccw_closed_polygon>("with_hole_ccw_closed", "POLYGON((0 0,9 0,9 9,0 9,0 0),(2 2,2 7,7 7,7 2,2 2))", 0, 0);
+ test_geometry<cw_closed_polygon>("with_hole_cw_closed", "POLYGON((0 0,0 9,9 9,9 0,0 0),(2 2,7 2,7 7,2 7,2 2))", 0, 0);
+
+ test_geometry<cw_closed_polygon>("t1", "POLYGON((0 0,0 10,10 0,0 0))", 0, 0);
+ test_geometry<cw_closed_polygon>("t2", "POLYGON((0 0,10 0,0 -10,0 0))", 0, 0);
+ test_geometry<cw_closed_polygon>("t3", "POLYGON((0 0,0 -10,-10 0,0 0))", 0, 0);
+ test_geometry<cw_closed_polygon>("t4", "POLYGON((0 0,-10 0,0 10,0 0))", 0, 0);
+}
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> polygon;
+
+ // Specific test-cases for point-on-surface:
+ test_geometry<polygon>("ice", "polygon((5 0,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0))", 0, 0);
+ test_geometry<polygon>("intruding", "polygon((5 0,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,7 2,4 7,6 1,5 0))", 0, 0);
+ test_geometry<polygon>("intruding2", "polygon((5 0,3 2,4 6,2 3,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,7 2,4 7,6 1,5 0))", 0, 0);
+ test_geometry<polygon>("intruding3", "polygon((5 0,3 2,3 6,2 3,0 5,1 6,3 7,2 5,4 8,6 5,5 7,7 6,8 5,9 6,10 5,7 2,5 6,6 1,5 0))", 0, 0);
+ test_geometry<polygon>("intruding4", "polygon((5 0,3 2,3 6,2 3,0 5,1 6,3 7,2 5,4 8,6 5,5 8,7 6,8 5,9 6,10 5,7 2,5 6,6 1,5 0))", 0, 0);
+ test_geometry<polygon>("intruding5", "polygon((5 0,3 2,3 6,2 3,0 5,1 6,3 8,2 5,4 8,6 5,5 8,7 6,8 5,9 6,10 5,7 2,5 6,6 1,5 0))", 0, 0);
+ test_geometry<polygon>("ice_int", "polygon((5 0,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(3 4,4 3,5 4,4 7,3 4))", 0, 0);
+ test_geometry<polygon>("ice_int2", "polygon((5 0,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(4 7,3 4,4 3,5 4,4 7))", 0, 0);
+ test_geometry<polygon>("ice_in3", "polygon((5 0,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(3 4,5 4,5 6,3 6,3 4))", 0, 0);
+ test_geometry<polygon>("simplex_normal", simplex_normal[0], 0, 0);
+ test_geometry<polygon>("sqr", "polygon((0 0,0 5,0 10,5 10,10 10,10 5,10 0,5 0,0 0))", 0, 0);
+ test_geometry<polygon>("self_tangent", "polygon((0 0,5 10,10 0,9 0,7 4,8 0,7 0,5 10,3 0,2 0,3 4,1 0,0 0))", 0, 0);
+ test_geometry<polygon>("self_tangent2", "polygon((5 0,2 3,4 8,1.5 3.5,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0))", 0, 0);
+ test_geometry<polygon>("self_tangent_int", "polygon((5 0,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(3 4,4 3,5 4,4 8,3 4))", 0, 0);
+ test_geometry<polygon>("self_tangent_int2", "polygon((5 0,2 3,3.5 7,1.5 3.5,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(3 4,4 3,5 4,4 8,3 4))", 0, 0);
+ test_geometry<polygon>("self_tangent_int3", "polygon((5 0,2 3,4 8,1.5 3.5,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(3 4,4 3,5 4,4 8,3 4))", 0, 0);
+
+ test_geometry<polygon>("self_tangent_int3", "polygon((5 0,2 3,4 8,1.5 3.5,0 5,1 6,2 5,4 8,6 5,7 6,8 5,9 6,10 5,5 0),(3 4,4 3,5 4,4 8,3 4))", 0, 0);
+ test_geometry<polygon>("disjoint_simplex0", disjoint_simplex[0], 0, 0);
+ test_geometry<polygon>("disjoint_simplex1", disjoint_simplex[1], 0, 0);
+
+ test_geometry<polygon>("ticket_10643", "POLYGON((1074699.93 703064.65, 1074703.90 703064.58, 1074704.53 703061.40, 1074702.10 703054.62, 1074699.93 703064.65))");
+ test_geometry<polygon>("ticket_10643_2", "POLYGON((699.93 64.65, 703.90 64.58, 704.53 61.40, 702.10 54.62, 699.93 64.65))");
+
+#if defined(BOOST_GEOMETRY_UNIT_TEST_MULTI)
+ {
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ test_geometry<multi_polygon>("mp_simplex", "multipolygon(((0 0,0 5,5 0, 0 0)),((7 1,7 6,10 1,7 1)))", 0, 0);
+ // Wrapped polygon in two orders
+ test_geometry<multi_polygon>("mp_wrapped1",
+ "multipolygon("
+ "((4 10,9 11,10 16,11 11,16 10,11 9,10 4,9 9,4 10))"
+ ","
+ "((0 10,10 20,20 10,10 0,0 10),(10 2,18 10,10 18,2 10,10 2))"
+ ")",
+ 0, 0);
+ test_geometry<multi_polygon>("mp_wrapped2",
+ "multipolygon("
+ "((0 10,10 20,20 10,10 0,0 10),(10 2,18 10,10 18,2 10,10 2))"
+ ","
+ "((4 10,9 11,10 16,11 11,16 10,11 9,10 4,9 9,4 10))"
+ ")",
+ 0, 0);
+ }
+#endif
+
+
+ // Overlay testcases
+ test_geometry<polygon>("buffer_mp1", buffer_mp1[0], 0, 0);
+ test_geometry<polygon>("buffer_mp2", buffer_mp2[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_a", buffer_rt_a[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_f", buffer_rt_f[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_g", buffer_rt_g[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_i", buffer_rt_i[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_j", buffer_rt_j[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_l", buffer_rt_l[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_m1", buffer_rt_m1[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_m2", buffer_rt_m2[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_n", buffer_rt_n[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_q", buffer_rt_q[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_r", buffer_rt_r[0], 0, 0);
+ test_geometry<polygon>("buffer_rt_t", buffer_rt_t[0], 0, 0);
+ test_geometry<polygon>("case_10", case_10[0], 0, 0);
+ test_geometry<polygon>("case_11", case_11[0], 0, 0);
+ test_geometry<polygon>("case_12", case_12[0], 0, 0);
+ test_geometry<polygon>("case_13", case_13[0], 0, 0);
+ test_geometry<polygon>("case_14", case_14[0], 0, 0);
+ test_geometry<polygon>("case_15", case_15[0], 0, 0);
+ test_geometry<polygon>("case_16", case_16[0], 0, 0);
+ test_geometry<polygon>("case_17", case_17[0], 0, 0);
+ test_geometry<polygon>("case_18", case_18[0], 0, 0);
+ test_geometry<polygon>("case_19", case_19[0], 0, 0);
+ test_geometry<polygon>("case_1", case_1[0], 0, 0);
+ test_geometry<polygon>("case_20", case_20[0], 0, 0);
+ test_geometry<polygon>("case_21", case_21[0], 0, 0);
+ test_geometry<polygon>("case_22", case_22[0], 0, 0);
+ test_geometry<polygon>("case_23", case_23[0], 0, 0);
+ test_geometry<polygon>("case_24", case_24[0], 0, 0);
+ test_geometry<polygon>("case_25", case_25[0], 0, 0);
+ test_geometry<polygon>("case_26", case_26[0], 0, 0);
+ test_geometry<polygon>("case_27", case_27[0], 0, 0);
+ test_geometry<polygon>("case_28", case_28[0], 0, 0);
+ test_geometry<polygon>("case_29", case_29[0], 0, 0);
+ test_geometry<polygon>("case_2", case_2[0], 0, 0);
+ test_geometry<polygon>("case_30", case_30[0], 0, 0);
+ test_geometry<polygon>("case_31", case_31[0], 0, 0);
+ test_geometry<polygon>("case_32", case_32[0], 0, 0);
+ test_geometry<polygon>("case_33", case_33[0], 0, 0);
+ test_geometry<polygon>("case_34", case_34[0], 0, 0);
+ test_geometry<polygon>("case_35", case_35[0], 0, 0);
+ test_geometry<polygon>("case_36", case_36[0], 0, 0);
+ test_geometry<polygon>("case_37", case_37[0], 0, 0);
+ test_geometry<polygon>("case_38", case_38[0], 0, 0);
+ test_geometry<polygon>("case_39", case_39[0], 0, 0);
+ test_geometry<polygon>("case_3", case_3[0], 0, 0);
+ test_geometry<polygon>("case_40", case_40[0], 0, 0);
+ test_geometry<polygon>("case_41", case_41[0], 0, 0);
+ test_geometry<polygon>("case_42", case_42[0], 0, 0);
+ test_geometry<polygon>("case_43", case_43[0], 0, 0);
+ test_geometry<polygon>("case_44", case_44[0], 0, 0);
+ test_geometry<polygon>("case_45", case_45[0], 0, 0);
+ test_geometry<polygon>("case_46", case_46[0], 0, 0);
+ test_geometry<polygon>("case_47", case_47[0], 0, 0);
+ test_geometry<polygon>("case_49", case_49[0], 0, 0);
+ test_geometry<polygon>("case_4", case_4[0], 0, 0);
+ test_geometry<polygon>("case_50", case_50[0], 0, 0);
+ test_geometry<polygon>("case_51", case_51[0], 0, 0);
+ test_geometry<polygon>("case_52", case_52[0], 0, 0);
+ test_geometry<polygon>("case_53", case_53[0], 0, 0);
+ test_geometry<polygon>("case_54", case_54[0], 0, 0);
+ test_geometry<polygon>("case_55", case_55[0], 0, 0);
+ test_geometry<polygon>("case_56", case_56[0], 0, 0);
+ test_geometry<polygon>("case_57", case_57[0], 0, 0);
+ test_geometry<polygon>("case_58", case_58[0], 0, 0);
+ test_geometry<polygon>("case_59", case_59[0], 0, 0);
+ test_geometry<polygon>("case_5", case_5[0], 0, 0);
+ test_geometry<polygon>("case_60", case_60[0], 0, 0);
+ test_geometry<polygon>("case_61", case_61[0], 0, 0);
+ test_geometry<polygon>("case_6", case_6[0], 0, 0);
+ test_geometry<polygon>("case_70", case_70[0], 0, 0);
+ test_geometry<polygon>("case_71", case_71[0], 0, 0);
+ test_geometry<polygon>("case_72", case_72[0], 0, 0);
+ test_geometry<polygon>("case_79", case_79[0], 0, 0);
+ test_geometry<polygon>("case_7", case_7[0], 0, 0);
+ test_geometry<polygon>("case_8", case_8[0], 0, 0);
+ test_geometry<polygon>("case_9", case_9[0], 0, 0);
+ test_geometry<polygon>("case_many_situations", case_many_situations[0], 0, 0);
+ test_geometry<polygon>("ccw_case_1", ccw_case_1[0], 0, 0);
+ test_geometry<polygon>("ccw_case_9", ccw_case_9[0], 0, 0);
+ test_geometry<polygon>("collinear_opposite_left", collinear_opposite_left[0], 0, 0);
+ test_geometry<polygon>("collinear_opposite_right", collinear_opposite_right[0], 0, 0);
+ test_geometry<polygon>("collinear_opposite_straight", collinear_opposite_straight[0], 0, 0);
+ test_geometry<polygon>("collinear_overlaps", collinear_overlaps[0], 0, 0);
+ test_geometry<polygon>("dz_1", dz_1[0], 0, 0);
+ test_geometry<polygon>("dz_2", dz_2[0], 0, 0);
+ test_geometry<polygon>("dz_3", dz_3[0], 0, 0);
+ test_geometry<polygon>("dz_4", dz_4[0], 0, 0);
+ test_geometry<polygon>("geos_1", geos_1[0], 0, 0);
+ test_geometry<polygon>("geos_2", geos_2[0], 0, 0);
+ test_geometry<polygon>("geos_3", geos_3[0], 0, 0);
+ test_geometry<polygon>("geos_4", geos_4[0], 0, 0);
+ test_geometry<polygon>("ggl_list_20110306_javier", ggl_list_20110306_javier[0], 0, 0);
+ test_geometry<polygon>("ggl_list_20110307_javier", ggl_list_20110307_javier[0], 0, 0);
+ test_geometry<polygon>("ggl_list_20110627_phillip", ggl_list_20110627_phillip[0], 0, 0);
+ test_geometry<polygon>("ggl_list_20110716_enrico", ggl_list_20110716_enrico[0], 0, 0);
+ test_geometry<polygon>("ggl_list_20110820_christophe ", ggl_list_20110820_christophe [0], 0, 0);
+ test_geometry<polygon>("ggl_list_20120717_volker", ggl_list_20120717_volker[0], 0, 0);
+ test_geometry<polygon>("hv_1", hv_1[0], 0, 0);
+ test_geometry<polygon>("hv_2", hv_2[0], 0, 0);
+ test_geometry<polygon>("hv_3", hv_3[0], 0, 0);
+ test_geometry<polygon>("hv_4", hv_4[0], 0, 0);
+ test_geometry<polygon>("hv_5", hv_5[0], 0, 0);
+ test_geometry<polygon>("hv_6", hv_6[0], 0, 0);
+ test_geometry<polygon>("hv_7", hv_7[0], 0, 0);
+ test_geometry<polygon>("isovist", isovist[0], 0, 0);
+ test_geometry<polygon>("open_case_1", open_case_1[0], 0, 0);
+ test_geometry<polygon>("open_case_9", open_case_9[0], 0, 0);
+ test_geometry<polygon>("pie_16_2_15_0", pie_16_2_15_0[0], 0, 0);
+ test_geometry<polygon>("pie_16_4_12", pie_16_4_12[0], 0, 0);
+ test_geometry<polygon>("pie_20_20_7_100", pie_20_20_7_100[0], 0, 0);
+ test_geometry<polygon>("pie_23_16_16", pie_23_16_16[0], 0, 0);
+ test_geometry<polygon>("pie_23_21_12_500", pie_23_21_12_500[0], 0, 0);
+ test_geometry<polygon>("pie_23_23_3_2000", pie_23_23_3_2000[0], 0, 0);
+ test_geometry<polygon>("pie_4_13_15", pie_4_13_15[0], 0, 0);
+ test_geometry<polygon>("pie_5_12_12_0_7s", pie_5_12_12_0_7s[0], 0, 0);
+ test_geometry<polygon>("snl_1", snl_1[0], 0, 0);
+ test_geometry<polygon>("ticket_17", ticket_17[0], 0, 0);
+ test_geometry<polygon>("ticket_5103", ticket_5103[0], 0, 0);
+ test_geometry<polygon>("ticket_7462", ticket_7462[0], 0, 0);
+ test_geometry<polygon>("ticket_8310a", ticket_8310a[0], 0, 0);
+ test_geometry<polygon>("ticket_8310b", ticket_8310b[0], 0, 0);
+ test_geometry<polygon>("ticket_8310c", ticket_8310c[0], 0, 0);
+ test_geometry<polygon>("ticket_8254", ticket_8254[0], 0, 0);
+}
+
+template <typename Point>
+void test_dense(std::string const& case_id, double size)
+{
+ typedef bg::model::polygon<Point> polygon;
+ polygon poly;
+
+ bg::append(poly, Point(-size, 0));
+
+ double thres = 3.14158 / 8;
+ for ( double a = thres ; a > -thres ; a -= 0.01 )
+ {
+ bg::append(poly, Point(size * ::cos(a), size * ::sin(a)));
+ }
+
+ bg::append(poly, Point(-size, 0));
+
+ test_geometry(case_id, poly);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ test_point_order_and_type<bg::model::d2::point_xy<double> >();
+ test_point_order_and_type<bg::model::d2::point_xy<int> >();
+
+ test_dense<bg::model::d2::point_xy<double> >("dense1", 100);
+ test_dense<bg::model::d2::point_xy<double> >("dense2", 1000000);
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/predef_relop.hpp b/src/boost/libs/geometry/test/algorithms/predef_relop.hpp
new file mode 100644
index 000000000..eda98ac01
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/predef_relop.hpp
@@ -0,0 +1,33 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_PREDEF_RELOP_HPP
+#define BOOST_GEOMETRY_PREDEF_RELOP_HPP
+
+#include <string>
+
+
+static std::string disjoint_simplex[2] =
+ {"POLYGON((0 0,0 2,2 2,0 0))",
+ "POLYGON((1 0,3 2,3 0,1 0))"};
+
+static std::string touch_simplex[2] =
+ {"POLYGON((0 0,0 2,2 2,0 0))",
+ "POLYGON((2 2,3 2,3 0,2 2))"};
+
+static std::string overlaps_box[2] =
+ {"POLYGON((0 0,0 2,2 2,0 0))",
+ "POLYGON((1 1,3 2,3 0,1 1))"};
+
+static std::string within_simplex[2] =
+ {"POLYGON((0 0,1 4,4 1,0 0))",
+ "POLYGON((1 1,1 3,3 1,1 1))"};
+
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/pretty_print_geometry.hpp b/src/boost/libs/geometry/test/algorithms/pretty_print_geometry.hpp
new file mode 100644
index 000000000..2f3275cba
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/pretty_print_geometry.hpp
@@ -0,0 +1,69 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Tests
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_PRETTY_PRINT_GEOMETRY_HPP
+#define BOOST_GEOMETRY_TEST_PRETTY_PRINT_GEOMETRY_HPP
+
+#include <iostream>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+
+template
+<
+ typename Geometry,
+ typename Tag = typename boost::geometry::tag<Geometry>::type
+>
+struct pretty_print_geometry
+{
+ static inline std::ostream&
+ apply(std::ostream& os, Geometry const& geometry)
+ {
+ os << boost::geometry::wkt(geometry);
+ return os;
+ }
+};
+
+template <typename Box>
+struct pretty_print_geometry<Box, boost::geometry::box_tag>
+{
+ static inline std::ostream&
+ apply(std::ostream& os, Box const& box)
+ {
+ return os << "BOX" << boost::geometry::dsv(box);
+ }
+};
+
+template <typename Segment>
+struct pretty_print_geometry<Segment, boost::geometry::segment_tag>
+{
+ static inline std::ostream&
+ apply(std::ostream& os, Segment const& segment)
+ {
+ return os << "SEGMENT" << boost::geometry::dsv(segment);
+ }
+};
+
+template <typename Ring>
+struct pretty_print_geometry<Ring, boost::geometry::ring_tag>
+{
+ static inline std::ostream&
+ apply(std::ostream& os, Ring const& ring)
+ {
+ return os << "RING" << boost::geometry::dsv(ring);
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_PRETTY_PRINT_GEOMETRY_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/relate/Jamfile b/src/boost/libs/geometry/test/algorithms/relate/Jamfile
new file mode 100644
index 000000000..bcc306dac
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/Jamfile
@@ -0,0 +1,26 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-relate
+ :
+ [ run relate_areal_areal.cpp : : : : algorithms_relate_areal_areal ]
+ [ run relate_areal_areal_sph.cpp : : : : algorithms_relate_areal_areal_sph ]
+ [ run relate_linear_areal.cpp : : : : algorithms_relate_linear_areal ]
+ [ run relate_linear_areal_sph.cpp : : : : algorithms_relate_linear_areal_sph ]
+ [ run relate_linear_linear.cpp : : : : algorithms_relate_linear_linear ]
+ [ run relate_linear_linear_sph.cpp : : : : algorithms_relate_linear_linear_sph ]
+ [ run relate_pointlike_geometry.cpp : : : : algorithms_relate_pointlike_geometry ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/relate/nan_cases.hpp b/src/boost/libs/geometry/test/algorithms/relate/nan_cases.hpp
new file mode 100644
index 000000000..24306202d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/nan_cases.hpp
@@ -0,0 +1,130 @@
+// Boost.Geometry
+
+// Copyright (c) 2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/range/value_type.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+template <typename Container>
+struct pusher
+ : public Container
+{
+ typedef typename Container::value_type value_type;
+ pusher(value_type const& val)
+ {
+ this->push_back(val);
+ }
+
+ pusher & operator()(value_type const& val)
+ {
+ this->push_back(val);
+ return *this;
+ }
+};
+
+template <typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type,
+ typename Coord = typename bg::coordinate_type<Geometry>::type>
+struct nan_case_generator
+{
+ static void apply(Geometry & , std::string & )
+ {}
+};
+
+template <typename Geometry>
+struct nan_case_generator<Geometry, bg::multi_linestring_tag, double>
+{
+ static void apply(Geometry & geometry, std::string & wkt)
+ {
+ typedef typename boost::range_value<Geometry>::type ls;
+ typedef typename bg::point_type<Geometry>::type P;
+ typedef typename bg::coordinate_type<Geometry>::type coord_t;
+ coord_t nan = std::numeric_limits<coord_t>::quiet_NaN();
+
+ wkt = "MULTILINESTRING((3.1e+307 1,-nan -nan),(3.1e+307 1,-nan -nan),(3.1e+307 1,5.1e+307 6e+307,nan nan),(-nan -nan,nan nan),(-nan -nan,-1 -3.97843,-1 3.28571,-1 47.6364),(3 78.5455,3 2),(nan nan,3 12.9689),(3 -2,-nan -nan),(3 2,3 12.9689,3 78.5455),(-1 4.29497e+09,-1 7,-nan -nan),(9 5,-nan -nan),(-nan -nan,9 60.8755,9 124.909),(nan nan,1 6.87195e+10,-nan -nan),(nan nan,4 86.2727,4 20.9533),(4 -5,-nan -nan),(4 -5,-nan -nan),(4 -5,-nan -nan),(4 -5,1.1e+308 2.1e+307,nan nan),(-nan -nan,-1 -8),(-nan -nan,-9 -4))";
+
+ typedef pusher<Geometry> ml;
+ typedef pusher<ls> l;
+ geometry = ml(l(P(3.1e+307, 1))(P(-nan, -nan)))
+ (l(P(3.1e+307, 1))(P(-nan, -nan)))
+ (l(P(3.1e+307, 1))(P(5.1e+307, 6e+307))(P(nan, nan)))
+ (l(P(-nan, -nan))(P(nan, nan)))
+ (l(P(-nan, -nan))(P(-1, -3.97843))(P(-1, 3.28571))(P(-1, 47.6364)))
+ (l(P(3, 78.5455))(P(3, 2)))
+ (l(P(nan, nan))(P(3, 12.9689)))
+ (l(P(3, -2))(P(-nan, -nan)))
+ (l(P(3, 2))(P(3, 12.9689))(P(3, 78.5455)))
+ (l(P(-1, 4.29497e+09))(P(-1, 7))(P(-nan, -nan)))
+ (l(P(9, 5))(P(-nan, -nan)))
+ (l(P(-nan, -nan))(P(9, 60.8755))(P(9, 124.909)))
+ (l(P(nan, nan))(P(1, 6.87195e+10))(P(-nan, -nan)))
+ (l(P(nan, nan))(P(4, 86.2727))(P(4, 20.9533)))
+ (l(P(4, -5))(P(-nan, -nan)))
+ (l(P(4, -5))(P(-nan, -nan)))
+ (l(P(4, -5))(P(-nan, -nan)))
+ (l(P(4, -5))(P(1.1e+308, 2.1e+307))(P(nan, nan)))
+ (l(P(-nan, -nan))(P(-1, -8)))
+ (l(P(-nan, -nan))(P(-9, -4)));
+ }
+};
+
+template <typename Geometry>
+struct nan_case_generator<Geometry, bg::multi_point_tag, double>
+{
+ static void apply(Geometry & geometry, std::string & wkt)
+ {
+ typedef typename bg::point_type<Geometry>::type P;
+ typedef typename bg::coordinate_type<Geometry>::type coord_t;
+ coord_t nan = std::numeric_limits<coord_t>::quiet_NaN();
+
+ wkt = "MULTIPOINT((3.1e+307 1),(-nan -nan),(3.1e+307 1),(-nan -nan),(3.1e+307 1),(5.1e+307 6e+307),(nan nan),(-nan -nan),(nan nan),(-nan -nan),(-1 -3.97843),(-1 3.28571),(-1 47.6364),(3 78.5455),(3 2),(nan nan),(3 12.9689),(3 -2),(-nan -nan),(3 2),(3 12.9689),(3 78.5455),(-1 4.29497e+09),(-1 7),(-nan -nan),(9 5),(-nan -nan),(-nan -nan),(9 60.8755),(9 124.909),(nan nan),(1 6.87195e+10),(-nan -nan),(nan nan),(4 86.2727),(4 20.9533),(4 -5),(-nan -nan),(4 -5),(-nan -nan),(4 -5),(-nan -nan),(4 -5),(1.1e+308 2.1e+307),(nan nan),(-nan -nan),(-1 -8),(-nan -nan),(-9 -4))";
+
+ typedef pusher<Geometry> mp;
+ geometry = mp(P(3.1e+307, 1))(P(-nan, -nan))
+ (P(3.1e+307, 1))(P(-nan, -nan))
+ (P(3.1e+307, 1))(P(5.1e+307, 6e+307))(P(nan, nan))
+ (P(-nan, -nan))(P(nan, nan))
+ (P(-nan, -nan))(P(-1, -3.97843))(P(-1, 3.28571))(P(-1, 47.6364))
+ (P(3, 78.5455))(P(3, 2))
+ (P(nan, nan))(P(3, 12.9689))
+ (P(3, -2))(P(-nan, -nan))
+ (P(3, 2))(P(3, 12.9689))(P(3, 78.5455))
+ (P(-1, 4.29497e+09))(P(-1, 7))(P(-nan, -nan))
+ (P(9, 5))(P(-nan, -nan))
+ (P(-nan, -nan))(P(9, 60.8755))(P(9, 124.909))
+ (P(nan, nan))(P(1, 6.87195e+10))(P(-nan, -nan))
+ (P(nan, nan))(P(4, 86.2727))(P(4, 20.9533))
+ (P(4, -5))(P(-nan, -nan))
+ (P(4, -5))(P(-nan, -nan))
+ (P(4, -5))(P(-nan, -nan))
+ (P(4, -5))(P(1.1e+308, 2.1e+307))(P(nan, nan))
+ (P(-nan, -nan))(P(-1, -8))
+ (P(-nan, -nan))(P(-9, -4));
+ }
+};
+
+template <typename Geometry>
+void nan_case(Geometry & geometry, std::string & wkt)
+{
+ nan_case_generator<Geometry>::apply(geometry, wkt);
+}
+
+template <typename Geometry>
+struct is_nan_case_supported
+{
+ typedef typename bg::coordinate_type<Geometry>::type coord_t;
+
+ static const bool value = boost::is_same<coord_t, double>::value
+ && std::numeric_limits<coord_t>::has_quiet_NaN;
+};
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal.cpp
new file mode 100644
index 000000000..81ced941e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal.cpp
@@ -0,0 +1,434 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2014, 2015.
+// Modifications copyright (c) 2013-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_relate.hpp"
+
+//#include <to_svg.hpp>
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ // touching
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((10 0,10 10,20 10,20 0,10 0))",
+ "FF2F11212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((0 -10,0 0,10 0,10 -10,0 -10))",
+ "FF2F11212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((10 0,15 10,20 10,20 0,10 0))",
+ "FF2F01212");
+
+ // containing
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 5,5 10,6 10,6 5,5 5))",
+ "212F11FF2");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 5,5 10,6 5,5 5))",
+ "212F01FF2");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 5,5 6,6 6,6 5,5 5))",
+ "212FF1FF2");
+
+ // fully containing
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 5,5 9,6 9,6 5,5 5))",
+ "212FF1FF2");
+ // fully containing, with a hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,7 3,7 7,3 7,3 3))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1))",
+ "2121F12F2");
+ // fully containing, both with holes
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,7 3,7 7,3 7,3 3))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1),(2 2,8 2,8 8,2 8,2 2))",
+ "212FF1FF2");
+ // fully containing, both with holes
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,7 3,7 7,3 7,3 3))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1),(4 4,6 4,6 6,4 6,4 4))",
+ "2121F1212");
+
+ // overlapping
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 0,5 10,20 10,20 0,5 0))",
+ "212111212");
+ test_geometry<ring, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 0,5 10,20 10,20 0,5 0))",
+ "212111212");
+ test_geometry<ring, ring>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 0,5 10,20 10,20 0,5 0))",
+ "212111212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,15 5,10 0,0 0))",
+ "POLYGON((10 0,5 5,10 10,20 10,20 0,10 0))",
+ "212101212");
+
+ // equal
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((10 10,10 5,10 0,5 0,0 0,0 10,5 10,10 10))",
+ "2FFF1FFF2");
+ // hole-sized
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,6 5,6 6,5 6,5 5))",
+ "POLYGON((5 5,5 6,6 6,6 5,5 5))",
+ "FF2F112F2");
+
+ // disjoint
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((0 20,0 30,10 30,10 20,0 20))",
+ "FF2FF1212");
+ // disjoint
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,7 3,7 7,3 7,3 3))",
+ "POLYGON((0 20,0 30,10 30,10 20,0 20))",
+ "FF2FF1212");
+
+ // equal non-simple / non-simple hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,10 5,5 6,5 5))",
+ "POLYGON((0 0,0 10,10 10,10 5,5 6,5 5,10 5,10 0,0 0))",
+ "2FFF1FFF2");
+
+ // within non-simple / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,5 6,5 5,10 5,10 0,0 0))",
+ "POLYGON((0 0,5 5,10 5,10 0,0 0))",
+ "212F11FF2");
+ // within non-simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,10 5,5 6,5 5))",
+ "POLYGON((0 0,5 5,10 5,10 0,0 0))",
+ "212F11FF2");
+
+
+ // not within non-simple / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,5 6,5 5,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "2FF11F2F2");
+ // not within non-simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,10 5,5 6,5 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "2FF11F2F2");
+ // not within simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,9 5,5 6,5 5))",
+ "POLYGON((0 0,0 10,10 10,9 5,10 0,0 0))",
+ "2121112F2");
+
+ // within non-simple fake hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,4 7,4 3,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "2FF11F2F2");
+ // within non-simple fake hole / non-simple fake hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,4 7,4 3,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 5,5 6,5 4,10 5,10 0,0 0))",
+ "2FF11F212");
+ // within non-simple fake hole / non-simple hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,4 7,4 3,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,5 6,5 4,10 5))",
+ "2FF11F212");
+ // containing non-simple fake hole / non-simple hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,4 7,4 3,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,3 8,3 2,10 5))",
+ "212F11FF2");
+
+ // within non-simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "2FF11F2F2");
+ // within non-simple hole / non-simple fake hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 5,5 6,5 4,10 5,10 0,0 0))",
+ "2FF11F212");
+ // containing non-simple hole / non-simple fake hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 5,3 8,3 2,10 5,10 0,0 0))",
+ "212F11FF2");
+ // equal non-simple hole / non-simple fake hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 5,4 7,4 3,10 5,10 0,0 0))",
+ "2FFF1FFF2");
+ // within non-simple hole / non-simple hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,5 6,5 4,10 5))",
+ "2FF11F212");
+ // containing non-simple hole / non-simple hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,3 8,3 2,10 5))",
+ "212F11FF2");
+ // equal non-simple hole / non-simple hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,4 7,4 3,10 5))",
+ "2FFF1FFF2");
+
+ // intersecting non-simple hole / non-simple hole - touching holes
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,10 5,5 6,5 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 5,5 4,5 5,0 5))",
+ "21211F2F2");
+ // intersecting non-simple fake hole / non-simple hole - touching holes
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,5 6,5 5,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 5,5 4,5 5,0 5))",
+ "21211F2F2");
+ // intersecting non-simple fake hole / non-simple fake hole - touching holes
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 5,5 6,5 5,10 5,10 0,0 0))",
+ "POLYGON((0 0,0 5,5 4,5 5,0 5,0 10,10 10,10 0,0 0))",
+ "21211F2F2");
+
+ // intersecting simple - i/i
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,4 10,6 8,5 5,6 2,4 0,0 0))",
+ "POLYGON((5 5,4 8,6 10,10 10,10 0,6 0,4 2,5 5))",
+ "212101212");
+ // intersecting non-simple hole / non-simple hole - i/i
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,4 10,6 8,5 5,6 2,4 0,0 0),(5 5,2 6,2 4,5 5))",
+ "POLYGON((5 5,4 8,6 10,10 10,10 0,6 0,4 2,5 5),(5 5,8 4,8 6,5 5))",
+ "212101212");
+ // intersecting non-simple hole / simple - i/i
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,4 10,6 8,5 5,6 2,4 0,0 0),(5 5,2 6,2 4,5 5))",
+ "POLYGON((5 5,4 8,6 10,10 10,10 0,6 0,4 2,5 5))",
+ "212101212");
+
+ // no turns - disjoint inside a hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1))",
+ "POLYGON((3 3,3 7,7 7,7 3,3 3))",
+ "FF2FF1212");
+ // no turns - within
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1))",
+ "POLYGON((-1 -1,-1 11,11 11,11 -1,-1 -1))",
+ "2FF1FF212");
+ // no-turns - intersects
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1))",
+ "2121F12F2");
+ // no-turns - intersects, hole in a hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1),(3 3,7 3,7 7,3 7,3 3))",
+ "2121F1212");
+
+ // no-turns ring - for exteriors
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2))",
+ "POLYGON((1 1,1 9,9 9,9 1,1 1),(2 2,8 2,8 8,2 8,2 2))",
+ "212F11FF2");
+ // no-turns ring - for interiors
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,7 3,7 7,3 7,3 3))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2))",
+ "212F11FF2");
+
+ {
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((5 5,5 10,6 10,6 5,5 5))",
+ "212F11FF2");
+
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((10 0,10 10,20 10,20 0,10 0))",
+ "FF2F11212");
+
+ namespace bgdr = bg::detail::relate;
+ poly p1, p2, p3;
+ bg::read_wkt("POLYGON((0 0,0 10,10 10,10 0,0 0))", p1);
+ bg::read_wkt("POLYGON((10 0,10 10,20 10,20 0,10 0))", p2);
+ bg::read_wkt("POLYGON((5 5,5 10,6 10,6 5,5 5))", p3);
+ BOOST_CHECK(bg::relate(p1, p2, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****"))); // touches()
+ BOOST_CHECK(bg::relate(p1, p3, bg::de9im::mask("T*****FF*"))); // contains()
+ BOOST_CHECK(bg::relate(p2, p3, bg::de9im::mask("FF*FF****"))); // disjoint()
+
+ BOOST_CHECK(bg::relate(p1, p2, bg::de9im::static_mask<'F','T'>()
+ || bg::de9im::static_mask<'F','*','*','T'>()
+ || bg::de9im::static_mask<'F','*','*','*','T'>()));
+ }
+
+ // CCW
+ {
+ typedef bg::model::polygon<P, false> poly;
+ // within non-simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,5 6,10 5,5 5))",
+ "POLYGON((0 0,10 0,10 5,5 5,0 0))",
+ "212F11FF2");
+ }
+ // OPEN
+ {
+ typedef bg::model::polygon<P, true, false> poly;
+ // within non-simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0),(5 5,10 5,5 6))",
+ "POLYGON((0 0,5 5,10 5,10 0))",
+ "212F11FF2");
+ }
+ // CCW, OPEN
+ {
+ typedef bg::model::polygon<P, false, false> poly;
+ // within non-simple hole / simple
+ test_geometry<poly, poly>("POLYGON((0 0,10 0,10 10,0 10),(5 5,5 6,10 5))",
+ "POLYGON((0 0,10 0,10 5,5 5))",
+ "212F11FF2");
+ }
+
+ // https://svn.boost.org/trac/boost/ticket/10912
+ {
+ // external rings touches and G2's hole is inside G1
+ test_geometry<poly, poly>("POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2),(6 6,8 6,8 8,6 8,6 6))",
+ "21211F212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2))",
+ "212F1FFF2");
+ // extended
+ // external rings touches and G1's hole is inside G2
+ test_geometry<poly, poly>("POLYGON((0 0,0 9,9 9,9 0,0 0),(2 2,7 2,7 7,2 7,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "2FF11F212");
+ // external rings touches, holes doesn't
+ test_geometry<poly, poly>("POLYGON((0 0,0 9,9 9,9 0,0 0),(2 2,7 2,7 7,2 7,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,8 1,8 8,1 8,1 1))",
+ "212111212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,7 2,7 7,2 7,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,8 1,8 8,1 8,1 1))",
+ "212F11FF2");
+ // holes touches, external rings doesn't
+ test_geometry<poly, poly>("POLYGON((1 1,1 9,9 9,9 1,1 1),(2 2,8 2,8 8,2 8,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,7 2,7 7,2 7,2 2))",
+ "2FF11F212");
+ test_geometry<poly, poly>("POLYGON((1 1,1 9,9 9,9 1,1 1),(2 2,7 2,7 7,2 7,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2))",
+ "212111212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,7 2,7 7,2 7,2 2))",
+ "2FF11F212");
+
+ test_geometry<poly, poly>("POLYGON((3 3,3 9,9 9,9 3,3 3))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ "212101212");
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<typename bg::coordinate_type<P>::type, double>::value )) )
+ {
+ // original - assertion for CCW
+ //"POLYGON((-0.593220338983050821113352 -8.05084745762711939676137,1.14285714285714279370154 -4,1.50731707317073171381594 1.10243902439024443751237,1.73758865248226967992196 1.37588652482269591104114,1.21739130434782616418943 -3.82608695652173924628414,2 -2,2 1.68750000000000044408921,2.35384615384615436539661 2.10769230769230775379697,2 2.16666666666666651863693,2 4,1.81967213114754100544701 2.1967213114754100544701,1.5882352941176469673934 2.2352941176470588757752,1.8148148148148146585612 5.4074074074074074403029,-0.538461538461538546940233 4.23076923076923083755219,-1.76510067114094004736558 2.89261744966443012927471,-1.64864864864864868465588 2.7567567567567570208098,-1.83962264150943455298659 2.81132075471698161805989,-1.84337349397590433142113 2.80722891566265086993326,-2.14285714285714279370154 2.85714285714285720629846,-2.11111111111111116045436 2.88888888888888883954564,-2.87234042553191448732264 3.10638297872340407579372,-2.91803278688524558859285 3.4262295081967208965068,-3.1733333333333324510761 3.26666666666666660745477,-2.99999999999999822364316 3.14285714285714234961233,-3.25490196078431326398572 3.21568627450980359938626,-3.47368421052631504153396 3.07894736842105265495206,-7.32000000000000028421709 3.72000000000000019539925,-7.54716981132075481752963 3.62264150943396234794136,-7.75 3.79166666666666651863693,-7.79999999999999982236432 3.79999999999999982236432,-7.59999999999999964472863 3.60000000000000008881784,-8.8556701030927822415606 3.06185567010309300783888,-8.82945736434108674473009 2.8914728682170549589614,-7.73333333333333339254523 2.193939393939393855959,-8 2,-5.94736842105263185942476 -1.42105263157894645686952,-5.32558139534883689947264 -0.488372093023255016142059,-5.85714285714285765038767 1.00000000000000066613381,-4.78723404255319184841255 0.319148936170212838003835,-5.32558139534883689947264 -0.488372093023255016142059,-4.74019607843137258385013 -2.12745098039215774221589,-3.17647058823529437887601 -0.705882352941176627325603,-2.93103448275862055183438 -0.862068965517241436735674,-3 -1,-4.57894736842105309904127 -2.57894736842105265495206,-4.47887323943661996850096 -2.85915492957746497637572,-7.58620689655172419918472 -5.18965517241379359347775,-7.52525252525252508206677 -5.5858585858585865224768,-4.18644067796610119813749 -3.67796610169491522412955,-3.44041450777202051369841 -5.76683937823834202873741,-3.73611111111111116045436 -6.56944444444444464181743,-2.8823529411764705621124 -7.7647058823529411242248,-2.88235294117647100620161 -7.7647058823529411242248,-0.593220338983050821113352 -8.05084745762711939676137),(1.66666666666666696272614 1.59999999999999875655021,1.43749999999999911182158 1.8750000000000002220446,0.0869565217391310429917439 2.26086956521739113057379,0.466666666666667118157363 2.60606060606060552231611,1.04878048780487764801705 2.34146341463414664474385,1.43749999999999911182158 1.8750000000000002220446,1.56756756756756754356275 1.83783783783783771781373,1.66666666666666696272614 1.59999999999999875655021))"
+ //"POLYGON((-2.33333333333333303727386 -8.66666666666666607454772,-2.26315789473684203514381 -8.63157894736842123961651,-2.88235294117647100620161 -7.7647058823529411242248,-2.8823529411764705621124 -7.7647058823529411242248,-4.11949685534591125701809 -7.61006289308176064878353,-4.32530120481927671249878 -8.16867469879518104391991,-2.33333333333333303727386 -8.66666666666666607454772))"
+
+ // assertion failure in 1.57
+ test_geometry<poly, poly>("POLYGON((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "POLYGON((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "*********");
+ // simpler case
+ test_geometry<poly, poly>("POLYGON((0 0, -0.59322033898305082 -8.0508474576271194, -2.8823529411764710 -7.7647058823529411, -3.7361111111111112 -6.5694444444444446, 0 0))",
+ "POLYGON((-10 -10, -4.1194968553459113 -7.6100628930817606, -2.8823529411764706 -7.7647058823529411, -2.2631578947368420 -8.6315789473684212, -10 -10))",
+ "FF2F01212");
+ // sanity check
+ test_geometry<poly, poly>("POLYGON((0 0, -0.59322033898305082 -8.0508474576271194, -2.8823529411764710 -7.7647058823529411, -3.7361111111111112 -6.5694444444444446, 0 0))",
+ "POLYGON((-10 -10, -4.1194968553459113 -7.6100628930817606, -2.8823529411764710 -7.7647058823529411, -2.2631578947368420 -8.6315789473684212, -10 -10))",
+ "FF2F01212");
+
+ // compatibility check
+ /*test_geometry<poly, poly>("POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))",
+ "****0****");
+ test_geometry<P, P>("POINT(0.9999999999999998 0.9999999999999998)",
+ "POINT(1 1)",
+ "0********");
+ test_geometry<P, P>("POINT(0.9999999999999995 0.9999999999999995)",
+ "POINT(1 1)",
+ "F********");
+ test_geometry<poly, poly>("POLYGON((0 0,0 1,0.9999999999999998 0.9999999999999998,1 0,0 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))",
+ "****0****");
+ test_geometry<poly, poly>("POLYGON((0 0,0 1,0.9999999999999995 0.9999999999999995,1 0,0 0))",
+ "POLYGON((1 1,1 2,2 2,2 1,1 1))",
+ "****F****");*/
+ }
+
+ // mysql 21872795 (overlaps)
+ test_geometry<poly, poly>("POLYGON((2 2,2 8,8 8,8 2,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 8,4 6,4 4,8 8))",
+ "21210F212");
+ test_geometry<poly, poly>("POLYGON((2 2,2 8,8 8,8 2,2 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 4,4 6,2 2))",
+ "21210F212");
+ // mysql 21873343 (touches)
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0), (0 8, 8 5, 8 8, 0 8))",
+ "POLYGON((0 8,-8 5,-8 8,0 8))",
+ "FF2F01212");
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0), (0 6, 6 3, 6 6, 0 6))",
+ "POLYGON((0 6,-6 3,-6 6,0 6))",
+ "FF2F01212");
+ // similar but touching from the inside of the hole
+ test_geometry<poly, poly>("POLYGON((0 0,0 10,10 10,10 0,0 0), (0 8, 8 5, 8 8, 0 8))",
+ "POLYGON((0 8,7 7, 7 6,0 8))",
+ "FF2F01212");
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<poly, mpoly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "MULTIPOLYGON(((5 5,5 10,6 10,6 5,5 5)),((0 20,0 30,10 30,10 20,0 20)))",
+ "212F11212");
+ test_geometry<ring, mpoly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "MULTIPOLYGON(((5 5,5 10,6 10,6 5,5 5)),((0 20,0 30,10 30,10 20,0 20)))",
+ "212F11212");
+
+ test_geometry<mpoly, poly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "212F11FF2");
+ test_geometry<poly, mpoly>("POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "2FF11F212");
+ test_geometry<poly, mpoly>("POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 -10,-10 -10,-10 0,0 0)),((0 0,0 10,10 10,10 0,0 0)))",
+ "2FF11F212");
+ test_geometry<poly, mpoly>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "2FFF1F212");
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "MULTIPOLYGON(((5 5,5 10,6 10,6 5,5 5)),((0 20,0 30,10 30,10 20,0 20)))",
+ "212F11212");
+ test_geometry<mpoly, mpoly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 20,0 30,10 30,10 20,0 20)))",
+ "MULTIPOLYGON(((5 5,5 10,6 10,6 5,5 5)))",
+ "212F11FF2");
+
+ test_geometry<mpoly, mpoly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "MULTIPOLYGON(((5 5,5 6,6 6,6 5,5 5)),((0 20,0 30,10 30,10 20,0 20)))",
+ "212FF1212");
+ test_geometry<mpoly, mpoly>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 20,0 30,10 30,10 20,0 20)))",
+ "MULTIPOLYGON(((5 5,5 6,6 6,6 5,5 5)))",
+ "212FF1FF2");
+}
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal_sph.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal_sph.cpp
new file mode 100644
index 000000000..5475a8fe7
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_areal_areal_sph.cpp
@@ -0,0 +1,115 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_relate.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ "212101212");
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ "212101212");
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ "212101212");
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ "212101212");
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ "2FF10F212");
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ "2FFF1FFF2");
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ "212101212");
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ "212101212");
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ "212F11FF2");
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ "FF2F01212");
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ "212F01FF2");
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ "212101212");
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ "FF2F11212");
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ "212F11FF2");
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ "212F11FF2");
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ "212101212");
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ "212101212");
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ "212101212");
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+}
+
+int test_main( int , char* [] )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> cs_t;
+ test_all<bg::model::point<float, 2, cs_t> >();
+ test_all<bg::model::point<double, 2, cs_t> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, cs_t> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal.cpp
new file mode 100644
index 000000000..56017f6de
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal.cpp
@@ -0,0 +1,536 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2018 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2013, 2014, 2015.
+// Modifications copyright (c) 2013-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_relate.hpp"
+#include "nan_cases.hpp"
+
+//TEST
+//#include <to_svg.hpp>
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ // LS disjoint
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1FF0212");
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1FF0212");
+
+ // II BB
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1FFF0F212");
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1FFF0F212");
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1FF0FF212");
+
+ // IE
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1FF0212");
+ // IE IB0
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1F00212");
+ // IE IB1
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(11 1,10 10,0 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(11 1,10 0,0 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(0 -1,1 0,2 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ // IE IB0 II
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ // IE IB0 lring
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,11 5,11 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F01FFF212");
+ // IE IB1 lring
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,10 10,11 5,11 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11FFF212");
+
+ // IB1 II
+ test_geometry<ls, poly>("LINESTRING(0 0,5 0,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11F00F212");
+ // BI0 II IB1
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11FF0F212");
+
+ // IB1 II IB1
+ test_geometry<ls, poly>("LINESTRING(1 0,2 0,3 1,4 0,5 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11FF0F212");
+ // IB1 IE IB1
+ test_geometry<ls, poly>("LINESTRING(1 0,2 0,3 -1,4 0,5 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F0F212");
+
+ // II IB1
+ test_geometry<ls, poly>("LINESTRING(5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11F00F212");
+ // IB1 II
+ test_geometry<ls, poly>("LINESTRING(10 10,10 5,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11F00F212");
+ // IE IB1
+ test_geometry<ls, poly>("LINESTRING(15 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ // IB1 IE
+ test_geometry<ls, poly>("LINESTRING(10 10,10 5,15 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+
+ // duplicated points
+ {
+ // II IB0 IE
+ test_geometry<ls, poly>("LINESTRING(5 5,10 5,15 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5,10 5,10 5,10 5,15 10,15 10,15 10)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5,10 0,10 0,10 0,15 10,15 10,15 10)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+ // IE IB0 II
+ test_geometry<ls, poly>("LINESTRING(15 10,15 10,15 10,10 5,10 5,10 5,5 5,5 5,5 5)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(15 10,15 10,15 10,10 0,10 0,10 0,5 5,5 5,5 5)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+
+ // TEST
+ //test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5,15 5,15 5,15 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ }
+
+ // non-simple polygon with hole
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "10F0FF212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 8,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 8)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+
+ // non-simple polygon with hole, linear ring
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "10FFFF212");
+ test_geometry<ls, poly>("LINESTRING(10 5,10 9,11 5,10 1,10 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F11FFF212");
+ test_geometry<ls, poly>("LINESTRING(11 5,10 1,10 5,10 9,11 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F11FFF212");
+
+ // non-simple polygon with self-touching holes
+ test_geometry<ls, poly>("LINESTRING(7 1,8 5,7 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 1,9 1,9 9,8 9,8 1),(2 2,8 5,2 8,2 2))",
+ "10F0FF212");
+ test_geometry<ls, poly>("LINESTRING(8 2,8 5,8 8)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 1,9 1,9 9,8 9,8 1),(2 2,8 5,2 8,2 2))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 8,8 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 1,9 1,9 9,8 9,8 1),(2 2,8 5,2 8,2 2))",
+ "F1FF0F212");
+
+ // non-simple polygon self-touching
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "10F0FF212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 8,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F1FF0F212");
+
+ // non-simple polygon self-touching, linear ring
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "10FFFF212");
+ test_geometry<ls, poly>("LINESTRING(10 5,10 9,11 5,10 1,10 5)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F11FFF212");
+ test_geometry<ls, poly>("LINESTRING(11 5,10 1,10 5,10 9,11 5)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F11FFF212");
+
+ // polygons with some ring equal to the linestring
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "F1FFFF2F2");
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2))",
+ "F1FFFF212");
+ test_geometry<ls, poly>("LINESTRING(2 2,5 5,2 8,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2))",
+ "F1FFFF212");
+
+ // self-IP going on the boundary then into the exterior and to the boundary again
+ test_geometry<ls, poly>("LINESTRING(2 10,5 10,5 15,6 15,5 10,8 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "F11F0F212");
+ // self-IP going on the boundary then into the interior and to the boundary again
+ test_geometry<ls, poly>("LINESTRING(2 10,5 10,5 5,6 5,5 10,8 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "11FF0F212");
+
+ // self-IP with a hole -> B to I to B to E
+ test_geometry<ls, poly>("LINESTRING(0 0,3 3)", "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0))",
+ "FF1F00212");
+
+ // ccw
+ {
+ typedef bg::model::polygon<P, false> ccwpoly;
+
+ // IE IB0 II
+ test_geometry<ls, ccwpoly>("LINESTRING(11 1,10 5,5 5)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", "1010F0212");
+ // IE IB1 II
+ test_geometry<ls, ccwpoly>("LINESTRING(11 1,10 1,10 5,5 5)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", "1110F0212");
+ test_geometry<ls, ccwpoly>("LINESTRING(11 1,10 5,10 1,5 5)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", "1110F0212");
+ // II IB0 IE
+ test_geometry<ls, ccwpoly>("LINESTRING(5 1,10 5,11 1)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", "1010F0212");
+ // IE IB1 II
+ test_geometry<ls, ccwpoly>("LINESTRING(5 5,10 1,10 5,11 5)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", "1110F0212");
+ test_geometry<ls, ccwpoly>("LINESTRING(5 5,10 5,10 1,11 5)", "POLYGON((0 0,10 0,10 10,0 10,0 0))", "1110F0212");
+
+ }
+
+ {
+ // SPIKES
+
+ test_geometry<ls, poly>("LINESTRING(0 0,2 2,3 3,1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(0 0,3 3,1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(0 0,2 2,1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(1 1,3 3,2 2)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(1 1,2 2,1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FFFF212");
+
+ test_geometry<ls, poly>("LINESTRING(3 3,1 1,0 0,2 2)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(3 3,0 0,2 2)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 2,0 0,1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(3 3,1 1,2 2)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 2,1 1,2 2)", "POLYGON((0 0,3 3,3 0,0 0))", "F1FFFF212");
+
+ test_geometry<ls, poly>("LINESTRING(0 0,2 2,4 4,1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F11F0F212");
+
+ test_geometry<ls, poly>("LINESTRING(0 1,1 1,0 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F01FFF212");
+ test_geometry<ls, poly>("LINESTRING(0 1,3 3,0 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F01FFF212");
+ test_geometry<ls, poly>("LINESTRING(0 1,0 0,0 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F01FFF212");
+
+ test_geometry<ls, poly>("LINESTRING(0 1,1 1,-1 1)", "POLYGON((0 0,3 3,3 0,0 0))", "F01FF0212");
+ }
+
+ {
+ // POLYGON SPIKES
+ // note that those are invalid Polygons and in general the result is undefined
+
+ // MySQL bug 15.12.2014 (assertion for invalid polygon)
+ test_geometry<ls, poly>("LINESTRING(6 3,9 0)",
+ "POLYGON((0 0,5 8,6 1,6 3,8 1,5 4,9 6,2 5,7 4,1 7,0 0))",
+ "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(9 0,2 7)",
+ "POLYGON((4 1,3 2,5 9,8 4,4 5,3 6,8 1,6 2,2 4,6 0,4 1))",
+ "F11FF0212");
+
+ test_geometry<ls, poly>("LINESTRING(6 3,9 0)",
+ "POLYGON((6 1,6 3,8 1,5 4,6 1))",
+ "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(6 3,8 1,9 0)",
+ "POLYGON((6 1,6 3,8 1,5 4,6 1))",
+ "F11F00212");
+
+ // entry-point spikes are not handled
+ test_geometry<ls, poly>("LINESTRING(9 0,6 3)",
+ "POLYGON((6 1,6 3,8 1,5 4,6 1))",
+ "**1*00212");
+ test_geometry<ls, poly>("LINESTRING(9 0,8 1,6 3)",
+ "POLYGON((6 1,6 3,8 1,5 4,6 1))",
+ "F11F00212");
+
+ // Ls going out-in on 2 collinear spikes touching each other
+ // this works partially, other invalid effect is noticeable here,
+ // the bottom of a spike shouldn't be there so the algorithm
+ // thinks the linestring is going into the interior
+ test_geometry<ls, poly>("LINESTRING(2 2,6 6)",
+ "POLYGON((0 0,0 2,2 2,4 4,3 3,5 3,5 5,4 4,7 7,7 0,0 0))",
+ "*1FF0F212");
+ // Ls going out-in on 2 collinear spikes NOT touching each other
+ // This is not supported, plus the same as above
+ test_geometry<ls, poly>("LINESTRING(2 2,6 6)",
+ "POLYGON((0 0,0 2,2 2,3 3,2 2,5 3,5 5,4 4,7 7,7 0,0 0))",
+ "*1*F0*212");
+ }
+
+ // 21.01.2015
+ test_geometry<ls, poly>("LINESTRING(3 7, 9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,5 5,0 0))",
+ "11F00F212");
+
+ // inspired by the bug for mls/poly
+ test_geometry<ls, poly>("LINESTRING(0 0, 7 7)",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "1010F0212");
+
+ // 25.01.2015
+ test_geometry<ls, poly>("LINESTRING(4 5, 0 6, 5 6)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))",
+ "11FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 3, 4 5, 0 6, 5 6)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,6 4,6 6,4 6,4 4))",
+ "11F00F212");
+ test_geometry<ls, poly>("LINESTRING(2 9, 1 1, 10 1, 10 10, 1 10, 0 6, 5 6)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))",
+ "11F00F212");
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0)))",
+ "F1FF0F212");
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 2)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 2)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0)))",
+ "11F00F212");
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 2)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 8)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,3 3)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,3 7)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,5 5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "11F00F212");
+
+ test_geometry<ls, mpoly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 20,20 0)))",
+ "F1FFFF212");
+
+ // degenerated points
+ test_geometry<ls, mpoly>("LINESTRING(5 5,10 10,10 10,10 10,15 15)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))",
+ "10F0FF212");
+
+ // self-IP polygon with a hole and second polygon with a hole -> B to I to B to B to I to B to E
+ test_geometry<ls, mpoly>("LINESTRING(0 0,3 3)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)),((0 0,2 8,8 8,8 2,0 0),(0 0,7 3,7 7,3 7,0 0)))",
+ "FF1F00212");
+ // self-IP polygon with a hole and second polygon -> B to I to B to B to I
+ test_geometry<ls, mpoly>("LINESTRING(0 0,3 3)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)),((0 0,2 8,8 8,8 2,0 0)))",
+ "1FF00F212");
+ test_geometry<ls, mpoly>("LINESTRING(0 0,3 3)",
+ "MULTIPOLYGON(((0 0,2 8,8 8,8 2,0 0)),((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)))",
+ "1FF00F212");
+
+ // MySQL report 18.12.2014 (https://svn.boost.org/trac/boost/ticket/10887)
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 2)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10F0FF212");
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 5)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10F00F212");
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "1FF00F212");
+ // MySQL report 18.12.2014 - extended
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)),((5 0,7 1,7 -1,5 0)))",
+ "1FF00F212");
+ test_geometry<ls, mpoly>("LINESTRING(0 0,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)),((5 0,7 1,7 -1,5 0)))",
+ "FF1F00212");
+
+ // 22.01.2015
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,10 0)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "11F00F212");
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,0 10)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "11F00F212");
+ // extended
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,2 1)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "10F0FF212");
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,5 -5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "1010F0212");
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,5 -5,5 1)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "1010FF212");
+ test_geometry<ls, mpoly>("LINESTRING(-5 5,0 0,5 -5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "F01FF0212");
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P> poly;
+ typedef typename bg::coordinate_type<P>::type coord_t;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ "1F10F0212");
+ test_geometry<mls, poly>("MULTILINESTRING((10 0, 18 12),(2 2,2 1))",
+ "POLYGON((5 0,0 -5,-5 0,0 5,5 0))",
+ "1F10F0212");
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<coord_t, double>::value )) )
+ {
+ // assertion failure in 1.57
+ test_geometry<mls, poly>("MULTILINESTRING((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "POLYGON((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "*********");
+ test_geometry<mls, poly>("MULTILINESTRING((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "POLYGON((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "*********");
+ }
+
+ // 21.01.2015
+ test_geometry<mls, poly>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "101000212");
+ test_geometry<mls, poly>("MULTILINESTRING((15 15,6 6),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "101000212");
+ // extended
+ test_geometry<mls, poly>("MULTILINESTRING((15 15,6 6),(4 14,6 16))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "101000212");
+
+ // 23.01.2015
+ test_geometry<mls, poly>("MULTILINESTRING((4 10, 3 10, 10 6),(5 0, 7 5, 9 10))",
+ "POLYGON((0 0,0 10,10 10,10 0,5 5,0 0))",
+ "111F00212");
+
+ // 23.01.2015
+ test_geometry<mls, poly>("MULTILINESTRING((3 10, 1 5, 1 10, 3 4, 7 8, 6 10, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "10FF0F212");
+
+ // mysql bug
+ // assertion failure in relate->boundary_checker->std::equal_range with msvc
+ if (BOOST_GEOMETRY_CONDITION(is_nan_case_supported<mls>::value))
+ {
+ mls g1;
+ std::string wkt1;
+ nan_case(g1, wkt1);
+
+ std::string wkt2 = "POLYGON((1.1e+308 1.2e+308,-1 -9,1 1e+12,1.1e+308 7.8e+307,1.1e+308 1.2e+308),(3 2,1 1,8e+307 1e+308,3 2),(258 2049,1 -3,1 1,-6 9,258 2049))";
+ poly g2;
+ bg::read_wkt(wkt2, g2);
+
+ check_geometry(g1, g2, wkt1, wkt2, "*********");
+ }
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ // polygons with some ring equal to the linestrings
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "F11FFF2F2");
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ "F1FFFF2F2");
+
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "F1FFFF2F2");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "F11FFF2F2");
+
+ // disjoint
+ test_geometry<mls, mpoly>("MULTILINESTRING((20 20,30 30),(30 30,40 40))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "FF1FF0212");
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 5),(5 5,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)),((5 5,10 1,10 0,5 5)))",
+ "F1FF0F212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 5),(5 5,5 0),(0 5,0 0,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)),((5 5,10 1,10 0,5 5)))",
+ "F1FFFF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 0),(5 5,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)),((5 5,10 1,10 0,5 5)))",
+ "11FF0F212");
+
+ // MySQL report 18.12.2014 - extended
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10FFFF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,0 1,5 0),(0 0,0 -1,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "F01FFF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10F0FF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,0 1,5 0),(0 -1,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "F01FF0212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,5 0),(5 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "1010F0212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,5 0),(0 0,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "1010F0212");
+
+ // 22.01.2015 - extended
+ test_geometry<mls, mpoly>("MULTILINESTRING((10 10,0 10),(5 5,0 0,10 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "11F00F212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 0,5 -5),(0 0,9 1))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "101000212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -5,0 0,5 5),(0 0,5 -1))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "101000212");
+}
+
+template <typename P>
+void test_all()
+{
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal_sph.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal_sph.cpp
new file mode 100644
index 000000000..ec7b41734
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_areal_sph.cpp
@@ -0,0 +1,419 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_relate.hpp"
+
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ // LS disjoint
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1FF0212");
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1FF0212");
+
+ // II BB
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1FFF0F212");
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1FFF0F212");
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1FF0FF212");
+
+ // IE
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1FF0212");
+ // IE IB0
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "FF1F00212");
+ // IE IB1
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(11 1,10 10,0 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(11 1,10 0,0 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ test_geometry<ls, poly>("LINESTRING(0 -1,1 0,2 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ // IE IB0 II
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ // IE IB0 lring
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,11 5,11 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F01FFF212");
+ // IE IB1 lring
+ test_geometry<ls, poly>("LINESTRING(11 1,10 5,10 10,11 5,11 1)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11FFF212");
+
+ // IB1 II
+ test_geometry<ls, poly>("LINESTRING(0 0,5 0,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11F00F212");
+ // BI0 II IB1
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11FF0F212");
+
+ // IB1 II IB1
+ test_geometry<ls, poly>("LINESTRING(1 0,2 0,3 1,4 0,5 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11FF0F212");
+ // IB1 IE IB1
+ test_geometry<ls, poly>("LINESTRING(1 0,2 0,3 -1,4 0,5 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F0F212");
+
+ // II IB1
+ test_geometry<ls, poly>("LINESTRING(5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11F00F212");
+ // IB1 II
+ test_geometry<ls, poly>("LINESTRING(10 10,10 5,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "11F00F212");
+ // IE IB1
+ test_geometry<ls, poly>("LINESTRING(15 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+ // IB1 IE
+ test_geometry<ls, poly>("LINESTRING(10 10,10 5,15 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "F11F00212");
+
+ // duplicated points
+ {
+ // II IB0 IE
+ test_geometry<ls, poly>("LINESTRING(5 5,10 5,15 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5,10 5,10 5,10 5,15 10,15 10,15 10)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5,10 0,10 0,10 0,15 10,15 10,15 10)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+ // IE IB0 II
+ test_geometry<ls, poly>("LINESTRING(15 10,15 10,15 10,10 5,10 5,10 5,5 5,5 5,5 5)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(15 10,15 10,15 10,10 0,10 0,10 0,5 5,5 5,5 5)",
+ "POLYGON((0 0,0 0,0 0,0 10,0 10,0 10,10 10,10 10,10 10,10 0,10 0,10 0,0 0,0 0,0 0))",
+ "1010F0212");
+
+ // TEST
+ //test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ test_geometry<ls, poly>("LINESTRING(5 5,5 5,5 5,15 5,15 5,15 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", "1010F0212");
+ }
+
+ // non-simple polygon with hole
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "10F0FF212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 8,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,2 8)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F1FF0F212");
+
+ // non-simple polygon with hole, linear ring
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "10FFFF212");
+ test_geometry<ls, poly>("LINESTRING(10 5,10 9,11 5,10 1,10 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F11FFF212");
+ test_geometry<ls, poly>("LINESTRING(11 5,10 1,10 5,10 9,11 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ "F11FFF212");
+
+ // non-simple polygon with self-touching holes
+ test_geometry<ls, poly>("LINESTRING(7 1,8 5,7 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 1,9 1,9 9,8 9,8 1),(2 2,8 5,2 8,2 2))",
+ "10F0FF212");
+ test_geometry<ls, poly>("LINESTRING(8 2,8 5,8 8)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 1,9 1,9 9,8 9,8 1),(2 2,8 5,2 8,2 2))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 8,8 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8 1,9 1,9 9,8 9,8 1),(2 2,8 5,2 8,2 2))",
+ "F1FF0F212");
+
+ // non-simple polygon self-touching
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "10F0FF212");
+ test_geometry<ls, poly>("LINESTRING(10 1,10 5,10 9)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F1FF0F212");
+ test_geometry<ls, poly>("LINESTRING(2 8,10 5,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F1FF0F212");
+
+ // non-simple polygon self-touching, linear ring
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "10FFFF212");
+ test_geometry<ls, poly>("LINESTRING(10 5,10 9,11 5,10 1,10 5)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F11FFF212");
+ test_geometry<ls, poly>("LINESTRING(11 5,10 1,10 5,10 9,11 5)",
+ "POLYGON((0 0,0 10,10 10,10 5,2 8,2 2,10 5,10 0,0 0))",
+ "F11FFF212");
+
+ // polygons with some ring equal to the linestring
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "F1FFFF2F2");
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2))",
+ "F1FFFF212");
+ test_geometry<ls, poly>("LINESTRING(2 2,5 5,2 8,2 2)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2))",
+ "F1FFFF212");
+
+ // self-IP going on the boundary then into the exterior and to the boundary again
+ test_geometry<ls, poly>("LINESTRING(2 10.023946271183535,5 10.037423045910710,5 15,6 15,5 10.037423045910710,8 10.023946271183535)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "F11F0F212");
+ // self-IP going on the boundary then into the interior and to the boundary again
+ test_geometry<ls, poly>("LINESTRING(2 10.023946271183535,5 10.037423045910710,5 5,6 5,5 10.037423045910710,8 10.023946271183535)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "11FF0F212");
+
+ // self-IP with a hole -> B to I to B to E
+ test_geometry<ls, poly>("LINESTRING(0 0,3 3)", "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0))",
+ "FF1F00212");
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0)))",
+ "F1FF0F212");
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 2)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 2)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0)))",
+ "11F00F212");
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 2)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,2 8)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,3 3)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,3 7)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "F1FF0F212");
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,5 5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)),((10 5,3 3,3 7,10 5)))",
+ "11F00F212");
+
+ test_geometry<ls, mpoly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 20,20 0)))",
+ "F1FFFF212");
+
+ // degenerated points
+ test_geometry<ls, mpoly>("LINESTRING(5 5,10 10,10 10,10 10,15 15)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))",
+ "10F0FF212");
+
+ // self-IP polygon with a hole and second polygon with a hole -> B to I to B to B to I to B to E
+ test_geometry<ls, mpoly>("LINESTRING(0 0,3 3)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)),((0 0,2 8,8 8,8 2,0 0),(0 0,7 3,7 7,3 7,0 0)))",
+ "FF1F00212");
+ // self-IP polygon with a hole and second polygon -> B to I to B to B to I
+ test_geometry<ls, mpoly>("LINESTRING(0 0,3 3)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)),((0 0,2 8,8 8,8 2,0 0)))",
+ "1FF00F212");
+ test_geometry<ls, mpoly>("LINESTRING(0 0,3 3)",
+ "MULTIPOLYGON(((0 0,2 8,8 8,8 2,0 0)),((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)))",
+ "1FF00F212");
+
+ // MySQL report 18.12.2014 (https://svn.boost.org/trac/boost/ticket/10887)
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 2)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10F0FF212");
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 5.0190018174896416)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10F00F212");
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "1FF00F212");
+ // MySQL report 18.12.2014 - extended
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)),((5 0,7 1,7 -1,5 0)))",
+ "1FF00F212");
+ test_geometry<ls, mpoly>("LINESTRING(0 0,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)),((5 0,7 1,7 -1,5 0)))",
+ "FF1F00212");
+
+ // 22.01.2015
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,10 0)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "11F00F212");
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,0 10)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "11F00F212");
+ // extended
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,2 1)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "10F0FF212");
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,5 -5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "1010F0212");
+ test_geometry<ls, mpoly>("LINESTRING(5 5,0 0,5 -5,5 1)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "1010FF212");
+ test_geometry<ls, mpoly>("LINESTRING(-5 5,0 0,5 -5)",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "F01FF0212");
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef typename bg::coordinate_type<P>::type coord_t;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ "1F10F0212");
+ test_geometry<mls, poly>("MULTILINESTRING((10 0, 18 12),(2 2,2 1))",
+ "POLYGON((5 0,0 -5,-5 0,0 5,5 0))",
+ "1F10F0212");
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<coord_t, double>::value )) )
+ {
+ // assertion failure in 1.57
+ test_geometry<mls, poly>("MULTILINESTRING((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "POLYGON((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "*********");
+ test_geometry<mls, poly>("MULTILINESTRING((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "POLYGON((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "*********");
+ }
+
+ // 21.01.2015
+ test_geometry<mls, poly>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "101000212");
+ test_geometry<mls, poly>("MULTILINESTRING((15 15,6 6),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "101000212");
+
+ // extended
+ test_geometry<mls, ring>("MULTILINESTRING((15 15,6 6),(4 14,6 15.986412732589057))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ "101000212");
+
+ // 23.01.2015
+ test_geometry<mls, poly>("MULTILINESTRING((4 10.035925377760330, 3 10.031432746397092, 10 6),(5 0, 7 5, 9 10.013467818052765))",
+ "POLYGON((0 0,0 10,10 10,10 0,5 5,0 0))",
+ "111F00212");
+
+ // 23.01.2015
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "10FF0F212");
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ // polygons with some ring equal to the linestrings
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "F11FFF2F2");
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ "F1FFFF2F2");
+
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "F1FFFF2F2");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "F11FFF2F2");
+
+ // disjoint
+ test_geometry<mls, mpoly>("MULTILINESTRING((20 20,30 30),(30 30,40 40))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ "FF1FF0212");
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 5),(5 5,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)),((5 5,10 1,10 0,5 5)))",
+ "F1FF0F212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 5),(5 5,5 0),(0 5,0 0,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)),((5 5,10 1,10 0,5 5)))",
+ "F1FFFF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 0),(5 5,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)),((5 5,10 1,10 0,5 5)))",
+ "11FF0F212");
+
+ // MySQL report 18.12.2014 - extended
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10FFFF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,0 1,5 0),(0 0,0 -1,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "F01FFF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "10F0FF212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,0 1,5 0),(0 -1,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "F01FF0212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,5 0),(5 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "1010F0212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,5 0),(0 0,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ "1010F0212");
+
+ // 22.01.2015 - extended
+ test_geometry<mls, mpoly>("MULTILINESTRING((10 10,0 10),(5 5,0 0,10 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "11F00F212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 5,0 0,5 -5),(0 0,9 1))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "101000212");
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -5,0 0,5 5),(0 0,5 -1))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ "101000212");
+}
+
+template <typename P>
+void test_all()
+{
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+}
+
+int test_main( int , char* [] )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> cs_t;
+
+ test_all<bg::model::point<float, 2, cs_t> >();
+ test_all<bg::model::point<double, 2, cs_t> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, cs_t> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear.cpp
new file mode 100644
index 000000000..d2073a876
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear.cpp
@@ -0,0 +1,446 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2014, 2015.
+// Modifications copyright (c) 2013-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_relate.hpp"
+
+//TEST
+//#include <to_svg.hpp>
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(0 0,3 2)", "LINESTRING(0 0, 2 2, 3 2)", "FF1F0F1F2");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", "0F1FF0102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(0 0,1 1,2 0,2 -1)", "0F1F00102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(3 2, 2 2, 1 1, 0 0)", "LINESTRING(0 0, 2 2, 3 2)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1, 2 2, 3 2)", "LINESTRING(3 2, 2 2, 0 0)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(3 2, 2 2, 1 1, 0 0)", "LINESTRING(3 2, 2 2, 0 0)", "1FFF0FFF2");
+
+ test_geometry<ls, ls>("LINESTRING(3 1, 2 2, 1 1, 0 0)", "LINESTRING(0 0, 2 2, 3 2)", "1F1F00102");
+ test_geometry<ls, ls>("LINESTRING(3 3, 2 2, 1 1, 0 0)", "LINESTRING(0 0, 2 2, 3 2)", "1F1F00102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1, 2 2, 2 3)", "LINESTRING(0 0, 2 2, 2 3)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(2 3, 2 2, 1 1, 0 0)", "LINESTRING(0 0, 2 2, 2 3)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1, 2 2, 2 3)", "LINESTRING(2 3, 2 2, 0 0)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(2 3, 2 2, 1 1, 0 0)", "LINESTRING(2 3, 2 2, 0 0)", "1FFF0FFF2");
+
+ test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+
+ test_geometry<ls, ls>("LINESTRING(3 2, 2 2, 1 1)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 2)", "LINESTRING(4 2, 2 2, 0 0)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(3 2, 2 2, 1 1)", "LINESTRING(4 2, 2 2, 0 0)", "1FF0FF102");
+
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", true);
+
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 3)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 2, 3 3)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 1)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 2, 3 1)", "LINESTRING(0 0, 2 2, 4 2)", false);
+
+// test_geometry<ls, ls>("LINESTRING(0 1, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(0 1, 0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 0, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 0, 0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+
+// test_geometry<ls, ls>("LINESTRING(0 0)", "LINESTRING(0 0)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1)", "LINESTRING(0 0, 2 2)", true);
+// test_geometry<ls, ls>("LINESTRING(0 0)", "LINESTRING(0 0, 2 2)", false);
+// test_geometry<ls, ls>("LINESTRING(0 0, 1 1)", "LINESTRING(0 0)", false);
+
+// test_geometry<ls, ls>("LINESTRING(0 0,5 0,3 0,6 0)", "LINESTRING(0 0,6 0)", true);
+// test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,3 3,6 3)", true);
+
+ // SPIKES!
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
+ test_geometry<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
+ test_geometry<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
+
+ test_geometry<ls, ls>("LINESTRING(6 3,3 3,0 0)", "LINESTRING(0 0,2 2,3 3,1 1,5 3)", "101F001F2");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(1 0,9 0,2 0)", "101FF0FF2");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,3 3,6 3)", "1FF00F102");
+ // TODO: REWRITE MATRICES
+ // BEGIN
+ /*test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)", "1FF00F102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+ test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");*/
+ // END
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");
+
+ // loop i/i i/i u/u u/u
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)",
+ "LINESTRING(1 1,1 0,6 0,6 1,4 1,4 0,9 0,9 1)", "1F1FF0102");
+
+ // self-intersecting and self-touching equal
+ test_geometry<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,5 0)",
+ "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "1FFF0FFF2");
+ // self-intersecting loop and self-touching equal
+ test_geometry<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,10 5,10 10,5 10,5 5,5 0)",
+ "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "1FFF0FFF2");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 1)", "LINESTRING(0 1,1 0)", "0F1FF0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 1)", "LINESTRING(1 1,2 0)", "FF1F00102");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 1)", "LINESTRING(2 0,1 1)", "FF1F00102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(1 0,2 1,3 5)", "101FF0FF2");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(3 5,2 1,1 0)", "101FF0FF2");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 1,3 5)", "LINESTRING(4 0,3 5,2 1,1 0,0 0)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(3 5,2 1,1 0)", "LINESTRING(4 0,3 5,2 1,1 0,0 0)", "1FF0FF102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(-1 -1,1 0,10 0,20 -1)", "1F10F0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(20 -1,10 0,1 0,-1 -1)", "1F10F0102");
+
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,5 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,3 1,4 0,30 0)",
+ "101FF0102");
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,5 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(30 0,4 0,3 1,2 0,1 0,0 0,-1 -1)",
+ "101FF0102");
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,5 0,1 0,0 0,-1 1)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,3 1,4 0,30 0)",
+ "101FF0102");
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,5 0,1 0,0 0,-1 1)",
+ "LINESTRING(30 0,4 0,3 1,2 0,1 0,0 0,-1 -1)",
+ "101FF0102");
+
+ // self-IP
+ test_geometry<ls, ls>("LINESTRING(1 0,9 0)",
+ "LINESTRING(0 0,10 0,10 10,5 0,0 10)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,9 0)",
+ "LINESTRING(0 0,10 0,10 10,5 0,0 10)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,9 0)",
+ "LINESTRING(0 0,10 0,10 10,5 10,5 -1)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,9 0)",
+ "LINESTRING(0 0,10 0,5 0,5 5)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,7 0)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1F10F0102");
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1F10F0102");
+
+ // self-IP going out and in on the same point
+ test_geometry<ls, ls>("LINESTRING(2 0,5 0,5 5,6 5,5 0,8 0)", "LINESTRING(1 0,9 0)",
+ "1F10FF102");
+
+ // duplicated points
+ test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 1, 1 1, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+
+ // linear ring
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(5 0,9 0,5 5,1 0,5 0)", "1F1FF01F2");
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0,10 0)", "LINESTRING(5 0,9 0,5 5,1 0,5 0)", "1F1FF01F2");
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0,10 0)", "LINESTRING(5 0,10 0,5 5,1 0,5 0)", "1F10F01F2");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(5 0,10 0,5 5,0 0,5 0)", "1FF0FF1F2");
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(5 0,10 0,5 5,5 0)", "FF10F01F2");
+
+ test_geometry<ls, ls>("LINESTRING(1 0,1 6)", "LINESTRING(0 0,5 0,5 5,0 5)", "0F10F0102");
+
+ // point-size Linestring
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(0 0,5 0)", "0FFFFF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(1 0,5 0)", "F0FFFF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(0 0,1 0)", "F0FFFF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(1 0,1 0)", "0FFFFFFF2");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(0 0,0 0)", "FF0FFF0F2");
+
+ //to_svg<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(5 0,10 0,5 5,5 0)", "test_relate_00.svg");
+
+ // INVALID LINESTRINGS
+ // 1-point LS (a Point) NOT disjoint
+ //test_geometry<ls, ls>("LINESTRING(1 0)", "LINESTRING(0 0,5 0)", "0FFFFF102");
+ //test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(1 0)", "0F1FF0FF2");
+ //test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(1 0,1 0,1 0)", "0F1FF0FF2");
+ // Point/Point
+ //test_geometry<ls, ls>("LINESTRING(0 0)", "LINESTRING(0 0)", "0FFFFFFF2");
+
+ if ( BOOST_GEOMETRY_CONDITION(
+ boost::is_floating_point<typename bg::coordinate_type<ls>::type>::value ) )
+ {
+ // https://svn.boost.org/trac/boost/ticket/10904
+ // very small segments
+ test_geometry<ls, ls>("LINESTRING(5.6956521739130430148634331999347 -0.60869565217391330413931882503675,5.5 -0.50000000000000066613381477509392)",
+ "LINESTRING(5.5 -0.50000000000000066613381477509392,5.5 -0.5)",
+ "FF1F00102");
+ test_geometry<ls, ls>("LINESTRING(-3.2333333333333333925452279800083 5.5999999999999978683717927196994,-3.2333333333333333925452279800083 5.5999999999999996447286321199499)",
+ "LINESTRING(-3.2333333333333325043668082798831 5.5999999999999996447286321199499,-3.2333333333333333925452279800083 5.5999999999999996447286321199499)",
+ "FF1F00102", "F0FFFF102"); // on some platforms the first Linestring may be detected as degenerated to Point
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<typename bg::coordinate_type<ls>::type, double>::value )) )
+ {
+ // detected as collinear
+ test_geometry<ls, ls>("LINESTRING(1 -10, 3.069359e+307 3.069359e+307)",
+ "LINESTRING(1 6, 1 0)",
+ "*********"); // TODO: be more specific with the result
+ }
+
+ // OTHER MASKS
+ {
+ namespace bgdr = bg::detail::relate;
+ ls ls1, ls2, ls3, ls4;
+ bg::read_wkt("LINESTRING(0 0,2 0)", ls1);
+ bg::read_wkt("LINESTRING(2 0,4 0)", ls2);
+ bg::read_wkt("LINESTRING(1 0,1 1)", ls3);
+ bg::read_wkt("LINESTRING(1 0,4 0)", ls4);
+ BOOST_CHECK(bg::relate(ls1, ls2, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****")));
+ BOOST_CHECK(bg::relate(ls1, ls3, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****")));
+ BOOST_CHECK(bg::relate(ls3, ls1, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****")));
+ BOOST_CHECK(bg::relate(ls2, ls4, bg::de9im::mask("T*F**F***"))); // within
+
+ BOOST_CHECK(bg::relate(ls1, ls2, bg::de9im::static_mask<'F','T'>()
+ || bg::de9im::static_mask<'F','*','*','T'>()
+ || bg::de9im::static_mask<'F','*','*','*','T'>()));
+ BOOST_CHECK(bg::relate(ls1, ls2, bg::de9im::mask("FT")
+ || bg::de9im::mask("F**T")
+ || bg::de9im::mask("F***T**************")));
+
+ BOOST_CHECK_THROW(bg::relate(ls1, ls2, bg::de9im::mask("A")), bg::invalid_input_exception);
+ }
+
+ // spike - boundary and interior on the same point
+ test_geometry<ls, ls>("LINESTRING(3 7, 8 8, 2 6)", "LINESTRING(5 7, 10 7, 0 7)", "0010F0102");
+
+ // 22.01.2015
+ test_geometry<ls, ls>("LINESTRING(5 5,10 10)", "LINESTRING(6 6,3 3)", "1010F0102");
+ test_geometry<ls, ls>("LINESTRING(5 5,2 8)", "LINESTRING(4 6,7 3)", "1010F0102");
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ // LS disjoint
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1))", "101FF0102");
+ // linear ring disjoint
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1,2 2,1 1))", "101FF01F2");
+ // 2xLS forming non-simple linear ring disjoint
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1,2 2),(1 1,2 2))", "101FF01F2");
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,9 0),(9 0,2 0))",
+ "101FF0FF2");
+
+ // rings
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ "1FFFFFFF2");
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,5 0,0 0),(0 0,0 5,5 5))",
+ "1FFFFFFF2");
+ // overlapping rings
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5,0 5))",
+ "10FFFFFF2");
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,5 0,0 0),(0 0,0 5,5 5,5 0))",
+ "10FFFFFF2");
+
+ // INVALID LINESTRINGS
+ // 1-point LS (a Point) disjoint
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1))", "101FF00F2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,1 1))", "101FF00F2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,1 1,1 1))", "101FF00F2");
+ // 1-point LS (a Point) NOT disjoint
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,9 0),(2 0))", "101FF0FF2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,9 0),(2 0,2 0))", "101FF0FF2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,9 0),(2 0,2 0,2 0))", "101FF0FF2");
+
+ // point-like
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(2 0, 2 0))", // |------| *
+ "101F00FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(1 0, 1 0))", // |------*
+ "101F00FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((5 0, 1 0),(1 0, 1 0))", // *-------|
+ "101F00FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(5 0, 5 0))", // |------| *
+ "10100FFF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(0 0, 0 0))", // *------|
+ "101000FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((4 0, 5 0),(5 0, 5 0))", // |------*
+ "101000FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((1 0, 2 0),(0 0, 0 0))", // * |------|
+ "1010F0FF2");
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((2 0, 2 0),(2 0, 2 2))", // *
+ "001FF0102"); // |
+
+ // for consistency
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(0 0, 2 0))", // |--------------|
+ "10F00FFF2"); // |------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(3 0, 5 0))", // |--------------|
+ "10F00FFF2"); // |------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(0 0, 6 0))", // |--------------|
+ "1FF00F102"); // |----------------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(-1 0, 5 0))", // |--------------|
+ "1FF00F102"); // |----------------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(-1 0, 6 0))", // |--------------|
+ "1FF00F102"); // |------------------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(-1 0, 2 0))", // |--------------|
+ "10F00F102"); // |-------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(2 0, 6 0))", // |--------------|
+ "10F00F102"); // |-------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(2 0, 2 2))", // |--------------|
+ "10FF0F102"); // |
+ // |
+
+ if ( BOOST_GEOMETRY_CONDITION(boost::is_floating_point<typename bg::coordinate_type<ls>::type>::value) )
+ {
+ // related to https://svn.boost.org/trac/boost/ticket/10904
+ test_geometry<ls, mls>("LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ "MULTILINESTRING((20 100, 31 -97, -46 57, -20 -4),(-71 -4))",
+ "*********"); // TODO: be more specific with the result
+ }
+
+ // 22.01.2015
+ // inspired by L/A and A/A
+ test_geometry<ls, mls>("LINESTRING(1 1,2 2)", "MULTILINESTRING((0 0,1 1),(1 1,3 3))", "1FF0FF102");
+
+ // 25.01.2015
+ test_geometry<ls, mls>("LINESTRING(1 1, 5 5, 4 4)",
+ "MULTILINESTRING((2 5, 7 5, 8 3, 6 3, 4 0),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(4 1, 4 5, 4 4)",
+ "MULTILINESTRING((2 5, 7 5, 8 3, 6 3, 4 0),(4 0, 4 8, 0 4))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(1 1,5 5,4 4)",
+ "MULTILINESTRING((5 0,5 5,5 10),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(1 1,5 5,1 0)",
+ "MULTILINESTRING((5 0,5 5,5 10),(0 0,5 5,1 0))",
+ "1FF00F102");
+ test_geometry<ls, mls>("LINESTRING(5 5,4 4)",
+ "MULTILINESTRING((5 0,5 5,5 10),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(6 6,5 5,4 4)",
+ "MULTILINESTRING((5 0,5 5,5 10),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(5 5,4 4)",
+ "MULTILINESTRING((5 0,5 5,5 10))",
+ "FF10F0102");
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ "1F1F00102");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ //"MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(1 10,1 10,1 0,1 0,1 -10),(2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),(30 0,30 0,31 0,31 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(1 10,1 10,1 0,1 0,1 -10),(0 0,0 0,0 10,0 10),(30 0,30 0,31 0,31 0))",
+ "1F100F102");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(0 0,0 0,0 10,0 10))",
+ "1F1F0F1F2");
+
+ // point-like
+ test_geometry<mls, mls>("MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "MULTILINESTRING((0 0, 0 0))",
+ "0F0FFFFF2");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "0FFFFFFF2");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "MULTILINESTRING((2 2, 2 2),(3 3, 3 3))",
+ "FF0FFF0F2");
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 5,10 5,10 10,5 10),(5 10,5 0,5 2),(5 2,5 5,0 5))",
+ "MULTILINESTRING((5 5,0 5),(5 5,5 0),(10 10,10 5,5 5,5 10,10 10))",
+ "10FFFFFF2");
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<typename bg::coordinate_type<P>::type, double>::value )) )
+ {
+ // assertion failure in 1.57
+ test_geometry<mls, mls>("MULTILINESTRING((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "MULTILINESTRING((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "*********");
+ }
+}
+
+template <typename P>
+void test_all()
+{
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear_sph.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear_sph.cpp
new file mode 100644
index 000000000..dce75f8bf
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_linear_linear_sph.cpp
@@ -0,0 +1,451 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_relate.hpp"
+
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(0 0,3 2)", "LINESTRING(0 0, 2 2, 3 2)", "FF1F0F1F2");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", "0F1FF0102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(0 0,1 1,2 0,2 -1)", "0F1F00102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1.0004570537241206, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(3 2, 2 2, 1 1.0004570537241206, 0 0)", "LINESTRING(0 0, 2 2, 3 2)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1.0004570537241206, 2 2, 3 2)", "LINESTRING(3 2, 2 2, 0 0)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(3 2, 2 2, 1 1.0004570537241206, 0 0)", "LINESTRING(3 2, 2 2, 0 0)", "1FFF0FFF2");
+
+ test_geometry<ls, ls>("LINESTRING(3 1, 2 2, 1 1.0004570537241206, 0 0)", "LINESTRING(0 0, 2 2, 3 2)", "1F1F00102");
+ test_geometry<ls, ls>("LINESTRING(3 3, 2 2.0015234344160047, 1 1.0012195839797347, 0 0)", "LINESTRING(0 0, 2 2.0015234344160047, 3 2)", "1F1F00102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1.0004570537241206, 2 2, 2 3)", "LINESTRING(0 0, 2 2, 2 3)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(2 3, 2 2, 1 1.0004570537241206, 0 0)", "LINESTRING(0 0, 2 2, 2 3)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(0 0, 1 1.0004570537241206, 2 2, 2 3)", "LINESTRING(2 3, 2 2, 0 0)", "1FFF0FFF2");
+ test_geometry<ls, ls>("LINESTRING(2 3, 2 2, 1 1.0004570537241206, 0 0)", "LINESTRING(2 3, 2 2, 0 0)", "1FFF0FFF2");
+
+ test_geometry<ls, ls>("LINESTRING(1 1.0004570537241206, 2 2, 3 2.0003044086155000)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+
+ test_geometry<ls, ls>("LINESTRING(3 2.0003044086155000, 2 2, 1 1.0004570537241206)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 1.0004570537241206, 2 2, 3 2.0003044086155000)", "LINESTRING(4 2, 2 2, 0 0)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(3 2.0003044086155000, 2 2, 1 1.0004570537241206)", "LINESTRING(4 2, 2 2, 0 0)", "1FF0FF102");
+
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", true);
+
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 3)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 2, 3 3)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 1)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1, 2 2, 3 2, 3 1)", "LINESTRING(0 0, 2 2, 4 2)", false);
+
+// test_geometry<ls, ls>("LINESTRING(0 1, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(0 1, 0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 0, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+// test_geometry<ls, ls>("LINESTRING(1 0, 0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+
+// test_geometry<ls, ls>("LINESTRING(0 0)", "LINESTRING(0 0)", false);
+// test_geometry<ls, ls>("LINESTRING(1 1)", "LINESTRING(0 0, 2 2)", true);
+// test_geometry<ls, ls>("LINESTRING(0 0)", "LINESTRING(0 0, 2 2)", false);
+// test_geometry<ls, ls>("LINESTRING(0 0, 1 1)", "LINESTRING(0 0)", false);
+
+// test_geometry<ls, ls>("LINESTRING(0 0,5 0,3 0,6 0)", "LINESTRING(0 0,6 0)", true);
+// test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,3 3,6 3)", true);
+
+ // SPIKES!
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2.0015234344160047,3 3,1 1.0012195839797347,5 3.0009124369434743)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
+ test_geometry<ls, ls>("LINESTRING(5 3.0009124369434743,1 1.0012195839797347,3 3,2 2.0015234344160047,0 0)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2.0015234344160047,3 3,1 1.0012195839797347,5 3.0009124369434743)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
+ test_geometry<ls, ls>("LINESTRING(5 3.0009124369434743,1 1.0012195839797347,3 3,2 2.0015234344160047,0 0)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
+
+ test_geometry<ls, ls>("LINESTRING(6 3,3 3,0 0)", "LINESTRING(0 0,2 2.0015234344160047,3 3,1 1.0012195839797347,5 3.0009124369434743)", "101F001F2");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(1 0,9 0,2 0)", "101FF0FF2");
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2.0015234344160047,3 3,1 1.0012195839797347)", "LINESTRING(0 0,3 3,6 3)", "1FF00F102");
+ // TODO: REWRITE MATRICES
+ // BEGIN
+ /*test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)", "1FF00F102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+ test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");*/
+ // END
+
+ test_geometry<ls, ls>("LINESTRING(0 0,2 2.0036594926050868,3 3.0031983963093536,4 4)", "LINESTRING(0 0,1 1.0022887548647632,4 4)", "1FFF0FFF2");
+
+ // loop i/i i/i u/u u/u
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)",
+ "LINESTRING(1 1,1 0,6 0,6 1,4 1,4 0,9 0,9 1)", "1F1FF0102");
+
+ // self-intersecting and self-touching equal
+ test_geometry<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,5 0)",
+ "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "1FFF0FFF2");
+ // self-intersecting loop and self-touching equal
+ test_geometry<ls, ls>("LINESTRING(0 5,5 5,10 5,10 10,5 10,5 5,10 5,10 10,5 10,5 5,5 0)",
+ "LINESTRING(0 5,5 5,5 10,10 10,10 5,5 5,5 0)", "1FFF0FFF2");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 1)", "LINESTRING(0 1,1 0)", "0F1FF0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 1)", "LINESTRING(1 1,2 0)", "FF1F00102");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 1)", "LINESTRING(2 0,1 1)", "FF1F00102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(1 0,2 1,3 5)", "101FF0FF2");
+ test_geometry<ls, ls>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(3 5,2 1,1 0)", "101FF0FF2");
+ test_geometry<ls, ls>("LINESTRING(1 0,2 1,3 5)", "LINESTRING(4 0,3 5,2 1,1 0,0 0)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(3 5,2 1,1 0)", "LINESTRING(4 0,3 5,2 1,1 0,0 0)", "1FF0FF102");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(-1 -1,1 0,10 0,20 -1)", "1F10F0102");
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(20 -1,10 0,1 0,-1 -1)", "1F10F0102");
+
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,5 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,3 1,4 0,30 0)",
+ "101FF0102");
+ test_geometry<ls, ls>("LINESTRING(-1 1,0 0,1 0,5 0,5 5,10 5,15 0,31 0)",
+ "LINESTRING(30 0,4 0,3 1,2 0,1 0,0 0,-1 -1)",
+ "101FF0102");
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,5 0,1 0,0 0,-1 1)",
+ "LINESTRING(-1 -1,0 0,1 0,2 0,3 1,4 0,30 0)",
+ "101FF0102");
+ test_geometry<ls, ls>("LINESTRING(31 0,15 0,10 5,5 5,5 0,1 0,0 0,-1 1)",
+ "LINESTRING(30 0,4 0,3 1,2 0,1 0,0 0,-1 -1)",
+ "101FF0102");
+
+ // self-IP
+ test_geometry<ls, ls>("LINESTRING(1 0,9 0)",
+ "LINESTRING(0 0,10 0,10 10,5 0,0 10)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,9 0)",
+ "LINESTRING(0 0,10 0,10 10,5 0,0 10)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,9 0)",
+ "LINESTRING(0 0,10 0,10 10,5 10,5 -1)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,9 0)",
+ "LINESTRING(0 0,10 0,5 0,5 5)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,7 0)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1F10F0102");
+ test_geometry<ls, ls>("LINESTRING(1 0,5 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
+ "1F10F0102");
+
+ // self-IP going out and in on the same point
+ test_geometry<ls, ls>("LINESTRING(2 0,5 0,5 5,6 5,5 0,8 0)", "LINESTRING(1 0,9 0)",
+ "1F10FF102");
+
+ // duplicated points
+ test_geometry<ls, ls>("LINESTRING(1 1.0004570537241206, 2 2, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+ test_geometry<ls, ls>("LINESTRING(1 1.0004570537241206, 1 1.0004570537241206, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", "1FF0FF102");
+
+ // linear ring
+ test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(5 0,9 0,5 5,1 0,5 0)", "1F1FF01F2");
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0,10 0)", "LINESTRING(5 0,9 0,5 5,1 0,5 0)", "1F1FF01F2");
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0,10 0)", "LINESTRING(5 0,10 0,5 5,1 0,5 0)", "1F10F01F2");
+
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(5 0,10 0,5 5,0 0,5 0)", "1FF0FF1F2");
+ test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(5 0,10 0,5 5,5 0)", "FF10F01F2");
+
+ test_geometry<ls, ls>("LINESTRING(1 0,1 6)", "LINESTRING(0 0,5 0,5 5,0 5)", "0F10F0102");
+
+ // point-size Linestring
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(0 0,5 0)", "0FFFFF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(1 0,5 0)", "F0FFFF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(0 0,1 0)", "F0FFFF102");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(1 0,1 0)", "0FFFFFFF2");
+ test_geometry<ls, ls>("LINESTRING(1 0,1 0)", "LINESTRING(0 0,0 0)", "FF0FFF0F2");
+
+ //to_svg<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(5 0,10 0,5 5,5 0)", "test_relate_00.svg");
+
+ // INVALID LINESTRINGS
+ // 1-point LS (a Point) NOT disjoint
+ //test_geometry<ls, ls>("LINESTRING(1 0)", "LINESTRING(0 0,5 0)", "0FFFFF102");
+ //test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(1 0)", "0F1FF0FF2");
+ //test_geometry<ls, ls>("LINESTRING(0 0,5 0)", "LINESTRING(1 0,1 0,1 0)", "0F1FF0FF2");
+ // Point/Point
+ //test_geometry<ls, ls>("LINESTRING(0 0)", "LINESTRING(0 0)", "0FFFFFFF2");
+
+ if ( BOOST_GEOMETRY_CONDITION(
+ boost::is_floating_point<typename bg::coordinate_type<ls>::type>::value ) )
+ {
+ // https://svn.boost.org/trac/boost/ticket/10904
+ // very small segments
+ test_geometry<ls, ls>("LINESTRING(5.6956521739130430148634331999347 -0.60869565217391330413931882503675,5.5 -0.50000000000000066613381477509392)",
+ "LINESTRING(5.5 -0.50000000000000066613381477509392,5.5 -0.5)",
+ "*********"); // TODO: be more specific with the result
+ test_geometry<ls, ls>("LINESTRING(-3.2333333333333333925452279800083 5.5999999999999978683717927196994,-3.2333333333333333925452279800083 5.5999999999999996447286321199499)",
+ "LINESTRING(-3.2333333333333325043668082798831 5.5999999999999996447286321199499,-3.2333333333333333925452279800083 5.5999999999999996447286321199499)",
+ "*********"); // TODO: be more specific with the result
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<typename bg::coordinate_type<ls>::type, double>::value )) )
+ {
+ // detected as collinear
+ test_geometry<ls, ls>("LINESTRING(1 -10, 3.069359e+307 3.069359e+307)",
+ "LINESTRING(1 6, 1 0)",
+ "*********"); // TODO: be more specific with the result
+ }
+
+ // OTHER MASKS
+ {
+ namespace bgdr = bg::detail::relate;
+ ls ls1, ls2, ls3, ls4;
+ bg::read_wkt("LINESTRING(0 0,2 0)", ls1);
+ bg::read_wkt("LINESTRING(2 0,4 0)", ls2);
+ bg::read_wkt("LINESTRING(1 0,1 1)", ls3);
+ bg::read_wkt("LINESTRING(1 0,4 0)", ls4);
+ BOOST_CHECK(bg::relate(ls1, ls2, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****")));
+ BOOST_CHECK(bg::relate(ls1, ls3, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****")));
+ BOOST_CHECK(bg::relate(ls3, ls1, bg::de9im::mask("FT*******")
+ || bg::de9im::mask("F**T*****")
+ || bg::de9im::mask("F***T****")));
+ BOOST_CHECK(bg::relate(ls2, ls4, bg::de9im::mask("T*F**F***"))); // within
+
+ BOOST_CHECK(bg::relate(ls1, ls2, bg::de9im::static_mask<'F','T'>()
+ || bg::de9im::static_mask<'F','*','*','T'>()
+ || bg::de9im::static_mask<'F','*','*','*','T'>()));
+ BOOST_CHECK(bg::relate(ls1, ls2, bg::de9im::mask("FT")
+ || bg::de9im::mask("F**T")
+ || bg::de9im::mask("F***T**************")));
+
+ BOOST_CHECK_THROW(bg::relate(ls1, ls2, bg::de9im::mask("A")), bg::invalid_input_exception);
+ }
+
+ // spike - boundary and interior on the same point
+ test_geometry<ls, ls>("LINESTRING(3 7.0222344894505291, 8 8, 2 6.0297078652914440)", "LINESTRING(5 7.0264720782244758, 10 7, 0 7)", "0010F0102");
+
+ // 22.01.2015
+ test_geometry<ls, ls>("LINESTRING(5 5.0276084891434261,10 10)", "LINESTRING(6 6.0348911579043349,3 3)", "1010F0102");
+ test_geometry<ls, ls>("LINESTRING(5 5.0146631750126396,2 8)", "LINESTRING(4 6.0155438000959975,7 3)", "1010F0102");
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ // LS disjoint
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1))", "101FF0102");
+ // linear ring disjoint
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1,2 2,1 1))", "101FF01F2");
+ // 2xLS forming non-simple linear ring disjoint
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1,2 2),(1 1,2 2))", "101FF01F2");
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,9 0),(9 0,2 0))",
+ "101FF0FF2");
+
+ // rings
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ "1FFFFFFF2");
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,5 0,0 0),(0 0,0 5,5 5))",
+ "1FFFFFFF2");
+ // overlapping rings
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5,0 5))",
+ "10FFFFFF2");
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,5 0,0 0),(0 0,0 5,5 5,5 0))",
+ "10FFFFFF2");
+
+ // INVALID LINESTRINGS
+ // 1-point LS (a Point) disjoint
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1))", "101FF00F2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,1 1))", "101FF00F2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,1 1,1 1))", "101FF00F2");
+ // 1-point LS (a Point) NOT disjoint
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,9 0),(2 0))", "101FF0FF2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,9 0),(2 0,2 0))", "101FF0FF2");
+ //test_geometry<ls, mls>("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,9 0),(2 0,2 0,2 0))", "101FF0FF2");
+
+ // point-like
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(2 0, 2 0))", // |------| *
+ "101F00FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(1 0, 1 0))", // |------*
+ "101F00FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((5 0, 1 0),(1 0, 1 0))", // *-------|
+ "101F00FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(5 0, 5 0))", // |------| *
+ "10100FFF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 1 0),(0 0, 0 0))", // *------|
+ "101000FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((4 0, 5 0),(5 0, 5 0))", // |------*
+ "101000FF2");
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((1 0, 2 0),(0 0, 0 0))", // * |------|
+ "1010F0FF2");
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((2 0, 2 0),(2 0, 2 2))", // *
+ "001FF0102"); // |
+
+ // for consistency
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(0 0, 2 0))", // |--------------|
+ "10F00FFF2"); // |------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(3 0, 5 0))", // |--------------|
+ "10F00FFF2"); // |------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(0 0, 6 0))", // |--------------|
+ "1FF00F102"); // |----------------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(-1 0, 5 0))", // |--------------|
+ "1FF00F102"); // |----------------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(-1 0, 6 0))", // |--------------|
+ "1FF00F102"); // |------------------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(-1 0, 2 0))", // |--------------|
+ "10F00F102"); // |-------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(2 0, 6 0))", // |--------------|
+ "10F00F102"); // |-------|
+
+ test_geometry<ls, mls>("LINESTRING(0 0, 5 0)", // |--------------|
+ "MULTILINESTRING((0 0, 5 0),(2 0, 2 2))", // |--------------|
+ "10FF0F102"); // |
+ // |
+
+ if ( BOOST_GEOMETRY_CONDITION(boost::is_floating_point<typename bg::coordinate_type<ls>::type>::value) )
+ {
+ // related to https://svn.boost.org/trac/boost/ticket/10904
+ test_geometry<ls, mls>("LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)",
+ "MULTILINESTRING((20 100, 31 -97, -46 57, -20 -4),(-71 -4))",
+ "*********"); // TODO: be more specific with the result
+ }
+
+ // 22.01.2015
+ // inspired by L/A and A/A
+ test_geometry<ls, mls>("LINESTRING(1 1.0012195839797347,2 2.0015234344160047)",
+ "MULTILINESTRING((0 0,1 1.0012195839797347),(1 1.0012195839797347,3 3))",
+ "1FF0FF102");
+ // for floats this is considered as collinear due to a special check in spherical intersection strategy
+ test_geometry<ls, mls>("LINESTRING(1 1,2 2)",
+ "MULTILINESTRING((0 0,1 1),(1 1,3 3))",
+ "FF10F0102", "1FF0FF102");
+
+ // 25.01.2015
+ test_geometry<ls, mls>("LINESTRING(1 1.0152687848942923, 5 5.0575148968282102, 4 4.0516408785782314)",
+ "MULTILINESTRING((2 5.1322576184978592, 7 5, 8 3, 6 3, 4 0),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(4 1, 4 5, 4 4)",
+ "MULTILINESTRING((2 5.1322576184978592, 7 5, 8 3, 6 3, 4 0),(4 0, 4 8, 0 4))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(1 1.0152687848942923,5 5.0575148968282102,4 4.0516408785782314)",
+ "MULTILINESTRING((5 0,5 5.0575148968282102,5 10),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(1 1.0036662021874625,5 5,1 0)",
+ "MULTILINESTRING((5 0,5 5,5 10),(0 0,5 5,1 0))",
+ "1FF00F102");
+ test_geometry<ls, mls>("LINESTRING(5 5.0575148968282102,4 4.0516408785782314)",
+ "MULTILINESTRING((5 0,5 5.0575148968282102,5 10),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(6 6.0587459045645184,5 5.0575148968282102,4 4.0516408785782314)",
+ "MULTILINESTRING((5 0,5 5.0575148968282102,5 10),(0 0,10 10))",
+ "1FF0FF102");
+ test_geometry<ls, mls>("LINESTRING(5 5,4 4)",
+ "MULTILINESTRING((5 0,5 5,5 10))",
+ "FF10F0102");
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ "1F1F00102");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ //"MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(1 10,1 10,1 0,1 0,1 -10),(2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),(30 0,30 0,31 0,31 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(1 10,1 10,1 0,1 0,1 -10),(0 0,0 0,0 10,0 10),(30 0,30 0,31 0,31 0))",
+ "1F100F102");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(0 0,0 0,0 10,0 10))",
+ "1F1F0F1F2");
+
+ // point-like
+ test_geometry<mls, mls>("MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "MULTILINESTRING((0 0, 0 0))",
+ "0F0FFFFF2");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "0FFFFFFF2");
+ test_geometry<mls, mls>("MULTILINESTRING((0 0, 0 0),(1 1, 1 1))",
+ "MULTILINESTRING((2 2, 2 2),(3 3, 3 3))",
+ "FF0FFF0F2");
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 5,10 5,10 10,5 10),(5 10,5 0,5 2),(5 2,5 5.0190018174896416,0 5))",
+ "MULTILINESTRING((5 5.0190018174896416,0 5),(5 5.0190018174896416,5 0),(10 10,10 5,5 5.0190018174896416,5 10,10 10))",
+ "10FFFFFF2");
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ boost::is_same<typename bg::coordinate_type<P>::type, double>::value )) )
+ {
+ // assertion failure in 1.57
+ test_geometry<mls, mls>("MULTILINESTRING((-0.59322033898305082 -8.0508474576271194,-2.882352941176471 -7.7647058823529411,-2.8823529411764706 -7.7647058823529411,-3.7361111111111112 -6.5694444444444446,-3.4404145077720205 -5.766839378238342,-4.1864406779661012 -3.6779661016949152,-7.5252525252525251 -5.5858585858585865,-7.5862068965517242 -5.1896551724137936,-4.47887323943662 -2.859154929577465,-4.5789473684210531 -2.5789473684210527,-3 -1,-2.9310344827586206 -0.86206896551724144,-3.1764705882352944 -0.70588235294117663,-4.7401960784313726 -2.1274509803921577,-5.3255813953488369 -0.48837209302325502,-4.7872340425531918 0.31914893617021284,-5.8571428571428577 1.0000000000000007,-5.3255813953488369 -0.48837209302325502,-5.9473684210526319 -1.4210526315789465,-8 2,-7.7333333333333334 2.1939393939393939,-8.8294573643410867 2.891472868217055,-8.8556701030927822 3.061855670103093,-7.5999999999999996 3.6000000000000001,-7.7999999999999998 3.7999999999999998,-7.75 3.7916666666666665,-7.5471698113207548 3.6226415094339623,-7.3200000000000003 3.7200000000000002,-3.473684210526315 3.0789473684210527,-3.2549019607843133 3.2156862745098036,-2.9999999999999982 3.1428571428571423,-3.1733333333333325 3.2666666666666666,-2.9180327868852456 3.4262295081967209,-2.8723404255319145 3.1063829787234041,-2.1111111111111112 2.8888888888888888,-2.1428571428571428 2.8571428571428572,-1.8433734939759043 2.8072289156626509,-1.8396226415094346 2.8113207547169816,-1.6486486486486487 2.756756756756757,-1.76510067114094 2.8926174496644301,-0.53846153846153855 4.2307692307692308,1.8148148148148147 5.4074074074074074,1.588235294117647 2.2352941176470589,1.819672131147541 2.1967213114754101,2 4,2 2.1666666666666665,2.3538461538461544 2.1076923076923078,2 1.6875000000000004,2 -2,1.2173913043478262 -3.8260869565217392,1.7375886524822697 1.3758865248226959,1.5073170731707317 1.1024390243902444,1.1428571428571428 -4,-0.59322033898305082 -8.0508474576271194),(1.666666666666667 1.5999999999999988,1.5675675675675675 1.8378378378378377,1.4374999999999991 1.8750000000000002,1.0487804878048776 2.3414634146341466,0.46666666666666712 2.6060606060606055,0.086956521739131043 2.2608695652173911,1.4374999999999991 1.8750000000000002,1.666666666666667 1.5999999999999988))",
+ "MULTILINESTRING((-2.333333333333333 -8.6666666666666661,-4.3253012048192767 -8.168674698795181,-4.1194968553459113 -7.6100628930817606,-2.8823529411764706 -7.7647058823529411,-2.882352941176471 -7.7647058823529411,-2.263157894736842 -8.6315789473684212,-2.333333333333333 -8.6666666666666661))",
+ "*********");
+ }
+}
+
+template <typename P>
+void test_all()
+{
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+}
+
+int test_main( int , char* [] )
+{
+ typedef bg::cs::spherical_equatorial<bg::degree> cs_t;
+
+ test_all<bg::model::point<float, 2, cs_t> >();
+ test_all<bg::model::point<double, 2, cs_t> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, cs_t> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/relate_pointlike_geometry.cpp b/src/boost/libs/geometry/test/algorithms/relate/relate_pointlike_geometry.cpp
new file mode 100644
index 000000000..8894b6850
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/relate_pointlike_geometry.cpp
@@ -0,0 +1,254 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2018 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2013, 2014, 2015, 2017.
+// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_relate.hpp"
+#include "nan_cases.hpp"
+
+//TEST
+//#include <to_svg.hpp>
+
+template <typename P>
+void test_point_point()
+{
+ test_geometry<P, P>("POINT(0 0)", "POINT(0 0)", "0FFFFFFF2");
+ test_geometry<P, P>("POINT(1 0)", "POINT(0 0)", "FF0FFF0F2");
+}
+
+template <typename P>
+void test_point_multipoint()
+{
+ typedef bg::model::multi_point<P> mpt;
+
+ test_geometry<P, mpt>("POINT(0 0)", "MULTIPOINT(0 0)", "0FFFFFFF2");
+ test_geometry<P, mpt>("POINT(1 0)", "MULTIPOINT(0 0)", "FF0FFF0F2");
+ test_geometry<P, mpt>("POINT(0 0)", "MULTIPOINT(0 0, 1 0)", "0FFFFF0F2");
+}
+
+template <typename P>
+void test_multipoint_multipoint()
+{
+ typedef bg::model::multi_point<P> mpt;
+
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0)", "MULTIPOINT(0 0)", "0FFFFFFF2");
+ test_geometry<mpt, mpt>("MULTIPOINT(1 0)", "MULTIPOINT(0 0)", "FF0FFF0F2");
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0)", "MULTIPOINT(0 0, 1 0)", "0FFFFF0F2");
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 0)", "MULTIPOINT(0 0)", "0F0FFFFF2");
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 1)", "MULTIPOINT(0 0, 1 0)", "0F0FFF0F2");
+
+ //typedef bg::model::d2::point_xy<float> ptf;
+ //typedef bg::model::multi_point<ptf> mptf;
+ //test_geometry<mptf, mpt>("MULTIPOINT(0 0)", "MULTIPOINT(0 0)", "0FFFFFFF2");
+
+ // assertion failure in relate->boundary_checker->std::equal_range with msvc
+ if (BOOST_GEOMETRY_CONDITION(is_nan_case_supported<mpt>::value))
+ {
+ mpt g;
+ std::string wkt;
+ nan_case(g, wkt);
+
+ check_geometry(g, g, wkt, wkt, "*********");
+ }
+}
+
+template <typename P>
+void test_point_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ // degenerated
+ //test_geometry<P, ls>("POINT(0 0)", "LINESTRING(0 0)", "0FFFFFFF2");
+
+ test_geometry<P, ls>("POINT(0 0)", "LINESTRING(0 0, 2 2, 3 2)", "F0FFFF102");
+ test_geometry<P, ls>("POINT(1 1)", "LINESTRING(0 0, 2 2, 3 2)", "0FFFFF102");
+ test_geometry<P, ls>("POINT(3 2)", "LINESTRING(0 0, 2 2, 3 2)", "F0FFFF102");
+ test_geometry<P, ls>("POINT(1 0)", "LINESTRING(0 0, 2 2, 3 2)", "FF0FFF102");
+
+ test_geometry<P, ls>("POINT(0 0)", "LINESTRING(0 0, 2 2, 3 2, 0 0)", "0FFFFF1F2");
+ test_geometry<P, ls>("POINT(1 1)", "LINESTRING(0 0, 2 2, 3 2, 0 0)", "0FFFFF1F2");
+ test_geometry<P, ls>("POINT(3 2)", "LINESTRING(0 0, 2 2, 3 2, 0 0)", "0FFFFF1F2");
+ test_geometry<P, ls>("POINT(1 0)", "LINESTRING(0 0, 2 2, 3 2, 0 0)", "FF0FFF1F2");
+}
+
+template <typename P>
+void test_point_multilinestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0, 2 0, 2 2),(0 0, 0 2))", "0FFFFF102");
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0, 2 0, 2 2),(0 0, 0 2, 2 2))", "0FFFFF1F2");
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0, 2 0, 2 2),(0 0, 0 2, 2 2),(0 0, 1 1))", "F0FFFF102");
+
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0,5 0),(0 0,0 5,5 0),(0 0,-5 0),(0 0,0 -5,-5 0))", "0FFFFF1F2");
+ test_geometry<P, mls>("POINT(5 0)", "MULTILINESTRING((0 0,5 0),(0 0,0 5,5 0),(0 0,-5 0),(0 0,0 -5,-5 0))", "0FFFFF1F2");
+ test_geometry<P, mls>("POINT(1 0)", "MULTILINESTRING((0 0,5 0),(0 0,0 5,5 0),(0 0,-5 0),(0 0,0 -5,-5 0))", "0FFFFF1F2");
+
+ // assertion failure in relate->boundary_checker->std::equal_range with msvc
+ if (BOOST_GEOMETRY_CONDITION(is_nan_case_supported<mls>::value))
+ {
+ // on the boundary
+ std::string wkt0 = "POINT(3.1e+307 1)";
+ P g0;
+ bg::read_wkt(wkt0, g0);
+
+ // disjoint
+ std::string wkt1 = "POINT(1.1e+308 1.2e+308)";
+ P g1;
+ bg::read_wkt(wkt1, g1);
+
+ mls g2;
+ std::string wkt2;
+ nan_case(g2, wkt2);
+
+ check_geometry(g0, g2, wkt0, wkt2, "*********");
+ check_geometry(g1, g2, wkt1, wkt2, "*********");
+ }
+}
+
+template <typename P>
+void test_multipoint_linestring()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::linestring<P> ls;
+
+ // degenerated
+ //test_geometry<mpt, ls>("MULTIPOINT(0 0)", "LINESTRING(0 0)", "0FFFFFFF2");
+
+ test_geometry<mpt, ls>("MULTIPOINT(0 0)", "LINESTRING(0 0, 2 2, 3 2)", "F0FFFF102");
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 1 1)", "LINESTRING(0 0, 2 2, 3 2)", "00FFFF102");
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 1 1, 3 3)", "LINESTRING(0 0, 2 2, 3 2)", "000FFF102");
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 3 3)", "LINESTRING(0 0, 2 2, 3 2)", "F00FFF102");
+ test_geometry<mpt, ls>("MULTIPOINT(1 1, 3 3)", "LINESTRING(0 0, 2 2, 3 2)", "0F0FFF102");
+
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 1 1)", "LINESTRING(0 0, 2 2, 3 2, 0 0)", "0FFFFF1F2");
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 3 3)", "LINESTRING(0 0, 2 2, 3 2, 0 0)", "0F0FFF1F2");
+
+ test_geometry<mpt, ls>("MULTIPOINT(0 0)", "LINESTRING(0 0, 2 2)", "F0FFFF102");
+ test_geometry<mpt, ls>("MULTIPOINT(2 2)", "LINESTRING(0 0, 2 2)", "F0FFFF102");
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 2 2)", "LINESTRING(0 0, 2 2)", "F0FFFF1F2");
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 1 1, 0 1, 2 2)", "LINESTRING(0 0, 2 2)", "000FFF1F2");
+}
+
+template <typename P>
+void test_multipoint_multilinestring()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mpt, mls>("MULTIPOINT(0 0)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2))", "F0FFFF102");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2))", "00FFFF102");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1, 3 3)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2))", "000FFF102");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 3 3)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2))", "F00FFF102");
+ test_geometry<mpt, mls>("MULTIPOINT(1 1, 3 3)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2))", "0F0FFF102");
+
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2, 0 0))", "0FFFFF1F2");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 3 3)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 2, 0 0))", "0F0FFF1F2");
+
+ test_geometry<mpt, mls>("MULTIPOINT(0 0,1 1)", "MULTILINESTRING((0 0,0 1,1 1),(1 1,1 0,0 0))", "0FFFFF1F2");
+
+ test_geometry<mpt, mls>("MULTIPOINT(0 0)", "MULTILINESTRING((0 0,1 1),(1 1,2 2))", "F0FFFF102");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1)", "MULTILINESTRING((0 0,1 1),(1 1,2 2))", "00FFFF102");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1, 2 2)", "MULTILINESTRING((0 0,1 1),(1 1,2 2))", "00FFFF1F2");
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 2 2)", "MULTILINESTRING((0 0,1 1),(1 1,2 2))", "F0FFFF1F2");
+}
+
+template <typename P>
+void test_point_ring_polygon()
+{
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+
+ test_geometry<P, ring>("POINT(0 0)", "POLYGON((0 0, 0 2, 2 2, 2 0, 0 0))", "F0FFFF212");
+
+ test_geometry<P, poly>("POINT(1 1)", "POLYGON((0 0, 0 2, 2 2, 2 0, 0 0))", "0FFFFF212");
+ test_geometry<P, poly>("POINT(1 3)", "POLYGON((0 0, 0 2, 2 2, 2 0, 0 0))", "FF0FFF212");
+}
+
+template <typename P>
+void test_point_multipolygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<P, mpoly>("POINT(0 0)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "F0FFFF212");
+ test_geometry<P, mpoly>("POINT(1 1)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "0FFFFF212");
+ test_geometry<P, mpoly>("POINT(5 5)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "F0FFFF212");
+ test_geometry<P, mpoly>("POINT(6 6)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "0FFFFF212");
+ test_geometry<P, mpoly>("POINT(1 6)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "FF0FFF212");
+}
+
+template <typename P>
+void test_multipoint_ring_polygon()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+
+ test_geometry<mpt, ring>("MULTIPOINT(0 0)", "POLYGON((0 0, 0 3, 3 3, 3 0, 0 0))", "F0FFFF212");
+ test_geometry<mpt, ring>("MULTIPOINT(0 0, 1 1)", "POLYGON((0 0, 0 3, 3 3, 3 0, 0 0))", "00FFFF212");
+ test_geometry<mpt, ring>("MULTIPOINT(0 0, 1 1, 4 4)", "POLYGON((0 0, 0 3, 3 3, 3 0, 0 0))", "000FFF212");
+ test_geometry<mpt, ring>("MULTIPOINT(1 1, 4 4)", "POLYGON((0 0, 0 3, 3 3, 3 0, 0 0))", "0F0FFF212");
+
+ test_geometry<mpt, poly>("MULTIPOINT(2 2)", "POLYGON((0 0, 0 4, 4 4, 4 0, 0 0),(1 1, 3 1, 3 3, 1 3, 1 1))", "FF0FFF212");
+ test_geometry<mpt, poly>("MULTIPOINT(0 0, 1 1)", "POLYGON((0 0, 0 4, 4 4, 4 0, 0 0),(1 1, 3 1, 3 3, 1 3, 1 1))", "F0FFFF212");
+ test_geometry<mpt, poly>("MULTIPOINT(0 0, 1 1, 2 2)", "POLYGON((0 0, 0 4, 4 4, 4 0, 0 0),(1 1, 3 1, 3 3, 1 3, 1 1))", "F00FFF212");
+ test_geometry<mpt, poly>("MULTIPOINT(2 2, 4 4)", "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(1 1, 3 1, 3 3, 1 3, 1 1))", "0F0FFF212");
+}
+
+template <typename P>
+void test_multipoint_multipolygon()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "F0FFFF212");
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 1 1)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "00FFFF212");
+ test_geometry<mpt, mpoly>("MULTIPOINT(1 1, 5 5)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "00FFFF212");
+ test_geometry<mpt, mpoly>("MULTIPOINT(1 6, 6 6)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "0F0FFF212");
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 1 6)", "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((5 5, 5 9, 9 9, 9 5, 5 5)))", "F00FFF212");
+}
+
+template <typename P>
+void test_all()
+{
+ test_point_point<P>();
+ test_point_multipoint<P>();
+ test_multipoint_multipoint<P>();
+
+ test_point_linestring<P>();
+ test_point_multilinestring<P>();
+ test_multipoint_linestring<P>();
+ test_multipoint_multilinestring<P>();
+
+ test_point_ring_polygon<P>();
+ test_point_multipolygon<P>();
+ test_multipoint_ring_polygon<P>();
+ test_multipoint_multipolygon<P>();
+}
+
+int test_main( int , char* [] )
+{
+ check_mask();
+
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/relate/test_relate.hpp b/src/boost/libs/geometry/test/algorithms/relate/test_relate.hpp
new file mode 100644
index 000000000..859d29ade
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/relate/test_relate.hpp
@@ -0,0 +1,232 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2014, 2015, 2017.
+// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_RELATE_HPP
+#define BOOST_GEOMETRY_TEST_RELATE_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/variant.hpp>
+
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/algorithms/relate.hpp>
+#include <boost/geometry/algorithms/relation.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#include <boost/geometry/strategies/cartesian/point_in_box.hpp>
+#include <boost/geometry/strategies/cartesian/box_in_box.hpp>
+#include <boost/geometry/strategies/agnostic/point_in_box_by_side.hpp>
+
+namespace bgdr = bg::detail::relate;
+
+std::string transposed(std::string matrix)
+{
+ if ( !matrix.empty() )
+ {
+ std::swap(matrix[1], matrix[3]);
+ std::swap(matrix[2], matrix[6]);
+ std::swap(matrix[5], matrix[7]);
+ }
+ return matrix;
+}
+
+bool matrix_compare(std::string const& m1, std::string const& m2)
+{
+ BOOST_ASSERT(m1.size() == 9 && m2.size() == 9);
+ for ( size_t i = 0 ; i < 9 ; ++i )
+ {
+ if ( m1[i] == '*' || m2[i] == '*' )
+ continue;
+
+ if ( m1[i] != m2[i] )
+ return false;
+ }
+ return true;
+}
+
+bool matrix_compare(std::string const& m, std::string const& res1, std::string const& res2)
+{
+ return matrix_compare(m, res1)
+ || ( !res2.empty() ? matrix_compare(m, res2) : false );
+}
+
+std::string matrix_format(std::string const& matrix1, std::string const& matrix2)
+{
+ return matrix1
+ + ( !matrix2.empty() ? " || " : "" ) + matrix2;
+}
+
+template <typename M>
+char get_ii(M const& m)
+{
+ using bg::detail::relate::interior;
+ return m.template get<interior, interior>();
+}
+
+template <typename M>
+char get_ee(M const& m)
+{
+ using bg::detail::relate::exterior;
+ return m.template get<exterior, exterior>();
+}
+
+void check_mask()
+{
+ bg::de9im::mask m1("");
+ bg::de9im::mask m2("TTT");
+ bg::de9im::mask m3("000111222");
+ bg::de9im::mask m4("000111222FFFF");
+ bg::de9im::mask m5(std::string(""));
+ bg::de9im::mask m6(std::string("TTT"));
+ bg::de9im::mask m7(std::string("000111222"));
+ bg::de9im::mask m8(std::string("000111222FFFF"));
+
+ using bg::detail::relate::interior;
+ using bg::detail::relate::exterior;
+
+ BOOST_CHECK(get_ii(m1) == '*' && get_ee(m1) == '*');
+ BOOST_CHECK(get_ii(m2) == 'T' && get_ee(m2) == '*');
+ BOOST_CHECK(get_ii(m3) == '0' && get_ee(m3) == '2');
+ BOOST_CHECK(get_ii(m4) == '0' && get_ee(m4) == '2');
+ BOOST_CHECK(get_ii(m5) == '*' && get_ee(m5) == '*');
+ BOOST_CHECK(get_ii(m6) == 'T' && get_ee(m6) == '*');
+ BOOST_CHECK(get_ii(m7) == '0' && get_ee(m7) == '2');
+ BOOST_CHECK(get_ii(m8) == '0' && get_ee(m8) == '2');
+}
+
+template <typename Geometry1, typename Geometry2>
+void check_geometry(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ std::string const& expected1,
+ std::string const& expected2 = std::string())
+{
+ boost::variant<Geometry1> variant1 = geometry1;
+ boost::variant<Geometry2> variant2 = geometry2;
+
+ {
+ std::string res_str = bg::relation(geometry1, geometry2).str();
+ bool ok = matrix_compare(res_str, expected1, expected2);
+ BOOST_CHECK_MESSAGE(ok,
+ "relate: " << wkt1
+ << " and " << wkt2
+ << " -> Expected: " << matrix_format(expected1, expected2)
+ << " detected: " << res_str);
+
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+ std::string res_str0 = bg::relation(geometry1, geometry2, strategy_type()).str();
+ BOOST_CHECK(res_str == res_str0);
+
+ // test variants
+ boost::variant<Geometry1> v1 = geometry1;
+ boost::variant<Geometry2> v2 = geometry2;
+ std::string res_str1 = bg::relation(geometry1, variant2).str();
+ std::string res_str2 = bg::relation(variant1, geometry2).str();
+ std::string res_str3 = bg::relation(variant1, variant2).str();
+ BOOST_CHECK(res_str == res_str1);
+ BOOST_CHECK(res_str == res_str2);
+ BOOST_CHECK(res_str == res_str3);
+ }
+
+ // changed sequence of geometries - transposed result
+ {
+ std::string res_str = bg::relation(geometry2, geometry1).str();
+ std::string expected1_tr = transposed(expected1);
+ std::string expected2_tr = transposed(expected2);
+ bool ok = matrix_compare(res_str, expected1_tr, expected2_tr);
+ BOOST_CHECK_MESSAGE(ok,
+ "relate: " << wkt2
+ << " and " << wkt1
+ << " -> Expected: " << matrix_format(expected1_tr, expected2_tr)
+ << " detected: " << res_str);
+ }
+
+ if ( expected2.empty() )
+ {
+ {
+ bool result = bg::relate(geometry1, geometry2, bg::de9im::mask(expected1));
+ // TODO: SHOULD BE !interrupted - CHECK THIS!
+ BOOST_CHECK_MESSAGE(result,
+ "relate: " << wkt1
+ << " and " << wkt2
+ << " -> Expected: " << expected1);
+
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+ bool result0 = bg::relate(geometry1, geometry2, bg::de9im::mask(expected1), strategy_type());
+ BOOST_CHECK(result == result0);
+
+ // test variants
+ bool result1 = bg::relate(geometry1, variant2, bg::de9im::mask(expected1));
+ bool result2 = bg::relate(variant1, geometry2, bg::de9im::mask(expected1));
+ bool result3 = bg::relate(variant1, variant2, bg::de9im::mask(expected1));
+ BOOST_CHECK(result == result1);
+ BOOST_CHECK(result == result2);
+ BOOST_CHECK(result == result3);
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION((
+ bg::detail::relate::interruption_enabled<Geometry1, Geometry2>::value )) )
+ {
+ // brake the expected output
+ std::string expected_interrupt = expected1;
+ bool changed = false;
+ BOOST_FOREACH(char & c, expected_interrupt)
+ {
+ if ( c >= '0' && c <= '9' )
+ {
+ if ( c == '0' )
+ c = 'F';
+ else
+ --c;
+
+ changed = true;
+ }
+ }
+
+ if ( changed )
+ {
+ bool result = bg::relate(geometry1, geometry2, bg::de9im::mask(expected_interrupt));
+ // TODO: SHOULD BE interrupted - CHECK THIS!
+ BOOST_CHECK_MESSAGE(!result,
+ "relate: " << wkt1
+ << " and " << wkt2
+ << " -> Expected interrupt for:" << expected_interrupt);
+ }
+ }
+ }
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2,
+ std::string const& expected1,
+ std::string const& expected2 = std::string())
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ check_geometry(geometry1, geometry2, wkt1, wkt2, expected1, expected2);
+}
+
+#endif // BOOST_GEOMETRY_TEST_RELATE_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/remove_spikes.cpp b/src/boost/libs/geometry/test/algorithms/remove_spikes.cpp
new file mode 100644
index 000000000..f4e252103
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/remove_spikes.cpp
@@ -0,0 +1,186 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+
+// Instead of having a separate (and nearly similar) unit test to test multipolygons,
+// we now include them here and compile them by default. Only undefining the next line
+// will avoid testing multi-geometries
+#define BOOST_GEOMETRY_UNIT_TEST_MULTI
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+// The include to test
+#include <boost/geometry/algorithms/remove_spikes.hpp>
+
+// Helper includes
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/perimeter.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#if defined(BOOST_GEOMETRY_UNIT_TEST_MULTI)
+# include <boost/geometry/geometries/multi_polygon.hpp>
+#endif
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+
+template <typename Geometry>
+inline void test_remove_spikes(std::string const& /*id*/,
+ Geometry& geometry,
+ double expected_area, double expected_perimeter)
+{
+ bg::remove_spikes(geometry);
+
+ double detected_area = bg::area(geometry);
+ double detected_perimeter = bg::perimeter(geometry);
+
+ BOOST_CHECK_CLOSE(detected_area, expected_area, 0.01);
+ BOOST_CHECK_CLOSE(detected_perimeter, expected_perimeter, 0.01);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& id, std::string const& wkt,
+ double expected_area, double expected_perimeter)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+ boost::variant<Geometry> v(geometry);
+
+#if defined(TEST_WITH_SVG)
+ std::ostringstream filename;
+ filename << "remove_spikes_" << id;
+ if (! bg::closure<Geometry>::value)
+ {
+ filename << "_open";
+ }
+ filename << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<typename bg::point_type<Geometry>::type> mapper(svg, 500, 500);
+ mapper.add(geometry);
+ mapper.map(geometry, "fill-opacity:0.3;opacity:0.6;fill:rgb(51,51,153);stroke:rgb(0,0,255);stroke-width:2");
+#endif
+
+ test_remove_spikes(id, geometry, expected_area, expected_perimeter);
+ test_remove_spikes(id, v, expected_area, expected_perimeter);
+
+#if defined(TEST_WITH_SVG)
+ mapper.map(geometry, "opacity:0.6;fill:none;stroke:rgb(255,0,0);stroke-width:3");
+#endif
+}
+
+template <typename P, bool Clockwise, bool Closed>
+void test_polygons()
+{
+ typedef bg::model::ring<P, Clockwise, Closed> ring;
+ typedef bg::model::polygon<P, Clockwise, Closed> polygon;
+
+ test_geometry<ring>("box",
+ "POLYGON((0 0,0 4,4 4,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("box",
+ "POLYGON((0 0,0 4,4 4,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("box2",
+ "POLYGON((0 0,0 2,0 4,2 4,4 4,4 2,4 0,2 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("spike_right",
+ "POLYGON((0 0,0 4,4 4,4 2,6 2,4 2,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("spike_at_corner",
+ "POLYGON((0 0,0 4,6 4,4 4,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("spike_at_first",
+ "POLYGON((0 0,-1 3,0 0,0 4,4 4,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("spike_at_last",
+ "POLYGON((0 0,0 4,4 4,4 0,6 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("spike_at_closing",
+ "POLYGON((-1 0,0 0,0 4,4 4,4 0,0 0,-1 0))",
+ 16, 16);
+ test_geometry<polygon>("double_spike",
+ "POLYGON((0 0,0 4,4 4,4 2,6 2,5 2,4 2,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("three_double_spike",
+ "POLYGON((0 0,0 4,4 4,4 2,6 2,5 2,4.5 2,4 2,4 0,0 0))",
+ 16, 16);
+ test_geometry<polygon>("spike_with_corner",
+ "POLYGON((0 0,0 4,4 4,4 2,6 2,6 4,6 2,4 2,4 0,0 0))",
+ 16, 16);
+
+ test_geometry<polygon>("triangle0",
+ "POLYGON((0 0,0 4,2 0,4 0,0 0))",
+ 4, 6 + sqrt(20.0));
+ test_geometry<polygon>("triangle1",
+ "POLYGON((0 4,2 0,4 0,0 0,0 4))",
+ 4, 6 + sqrt(20.0));
+ test_geometry<polygon>("triangle2",
+ "POLYGON((2 0,4 0,0 0,0 4,2 0))",
+ 4, 6 + sqrt(20.0));
+ test_geometry<polygon>("triangle3",
+ "POLYGON((4 0,0 0,0 4,2 0,4 0))",
+ 4, 6 + sqrt(20.0));
+
+ test_geometry<polygon>("only_spike1",
+ "POLYGON((0 0,2 2,0 0))",
+ 0, 0);
+ test_geometry<polygon>("only_spike2",
+ "POLYGON((0 0,2 2,4 4,2 2,0 0))",
+ 0, 0);
+ test_geometry<polygon>("only_spike3",
+ "POLYGON((0 0,2 2,4 4,0 0))",
+ 0, 0);
+ test_geometry<polygon>("only_spike4",
+ "POLYGON((0 0,4 4,2 2,0 0))",
+ 0, 0);
+}
+
+
+template <typename P, bool Clockwise, bool Closed>
+void test_multi_polygons()
+{
+ typedef bg::model::polygon<P, Clockwise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ test_geometry<multi_polygon>("multi_spike_with_corner",
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 2,6 2,6 4,6 2,4 2,4 0,0 0)))",
+ 16, 16);
+}
+
+template <typename P, bool Clockwise, bool Closed>
+void test_all()
+{
+ test_polygons<P, Clockwise, Closed>();
+ test_multi_polygons<P, Clockwise, Closed>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double>, true, true>();
+ test_all<bg::model::d2::point_xy<double>, true, false>();
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/reverse.cpp b/src/boost/libs/geometry/test/algorithms/reverse.cpp
new file mode 100644
index 000000000..d74b756c4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/reverse.cpp
@@ -0,0 +1,75 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/test_reverse.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <test_common/test_point.hpp>
+#include <test_geometries/all_custom_linestring.hpp>
+#include <test_geometries/all_custom_ring.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+template <typename LineString>
+void test_linestring()
+{
+ // Simplex
+ test_geometry<LineString >(
+ "LINESTRING(0 0,1 1)",
+ "LINESTRING(1 1,0 0)");
+
+ // Three points, middle should stay the same
+ test_geometry<LineString >(
+ "LINESTRING(0 0,1 1,2 2)",
+ "LINESTRING(2 2,1 1,0 0)");
+
+ // Four points
+ test_geometry<LineString >(
+ "LINESTRING(0 0,1 1,2 2,3 3)",
+ "LINESTRING(3 3,2 2,1 1,0 0)");
+}
+
+template <typename Ring>
+void test_ring()
+{
+ test_geometry<Ring>(
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0))",
+ "POLYGON((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0))");
+}
+
+template <typename Point>
+void test_all()
+{
+ test_linestring<bg::model::linestring<Point> >();
+ test_linestring<all_custom_linestring<Point> >();
+
+ // Polygon with holes
+ test_geometry<bg::model::polygon<Point> >(
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3))",
+ "POLYGON((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0),(7 3,4 3,1 3,1 6,7 6,7 3))");
+
+ // Check compilation
+ test_geometry<Point>("POINT(0 0)", "POINT(0 0)");
+
+ test_ring<bg::model::ring<Point> >();
+ test_ring<all_custom_ring<Point> >();
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/reverse_multi.cpp b/src/boost/libs/geometry/test/algorithms/reverse_multi.cpp
new file mode 100644
index 000000000..f3a7f574d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/reverse_multi.cpp
@@ -0,0 +1,51 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/reverse.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <algorithms/test_reverse.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // Multi point, should happen nothing.
+ test_geometry<bg::model::multi_point<P> >(
+ "MULTIPOINT((0 0),(1 1))",
+ "MULTIPOINT((0 0),(1 1))");
+
+ test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((0 0,1 1),(3 3,4 4))",
+ "MULTILINESTRING((1 1,0 0),(4 4,3 3))");
+
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+ test_geometry<mp>(
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0)))",
+ "MULTIPOLYGON(((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0)))");
+ test_geometry<mp>(
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3)))",
+ "MULTIPOLYGON(((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0),(7 3,4 3,1 3,1 6,7 6,7 3)))");
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/Jamfile b/src/boost/libs/geometry/test/algorithms/set_operations/Jamfile
new file mode 100644
index 000000000..27ebad64b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/Jamfile
@@ -0,0 +1,20 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014.
+# Modifications copyright (c) 2014, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+build-project difference ;
+build-project intersection ;
+build-project sym_difference ;
+build-project union ;
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/check_turn_less.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/check_turn_less.hpp
new file mode 100644
index 000000000..0e9984d4a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/check_turn_less.hpp
@@ -0,0 +1,115 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2015, 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_CHECK_TURN_LESS_HPP
+#define BOOST_GEOMETRY_TEST_CHECK_TURN_LESS_HPP
+
+#include <boost/range.hpp>
+
+#include "test_set_ops_linear_linear.hpp"
+
+
+// check less functor for turns
+template <typename Turns, typename Less>
+inline void verify_less_for_turns(Turns turns, Less const& less)
+{
+ typedef typename boost::range_iterator<Turns const>::type iterator_type;
+
+ if (boost::size(turns) < 2)
+ {
+ return;
+ }
+
+ iterator_type last = --boost::end(turns);
+ for (iterator_type it1 = boost::begin(turns); it1 != last; ++it1)
+ {
+ iterator_type it2 = it1;
+ ++it2;
+ for (; it2 != boost::end(turns); ++it2)
+ {
+ if (less(*it1, *it2))
+ {
+ BOOST_CHECK(! less(*it2, *it1));
+ }
+ if (less(*it2, *it1))
+ {
+ BOOST_CHECK(! less(*it1, *it2));
+ }
+ }
+ }
+}
+
+
+struct check_turn_less
+{
+ template <bool EnableDegenerateTurns = true>
+ struct assign_policy
+ {
+ static bool const include_no_turn = false;
+ static bool const include_degenerate = EnableDegenerateTurns;
+ static bool const include_opposite = false;
+
+ template
+ <
+ typename Info,
+ typename Point1,
+ typename Point2,
+ typename IntersectionInfo
+ >
+ static inline void apply(Info& , Point1 const& , Point2 const& ,
+ IntersectionInfo const& )
+ {
+ }
+ };
+
+ template <typename Geometry1, typename Geometry2>
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2)
+ {
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry1>::type
+ >::type strategy_type;
+
+ typedef bg::detail::no_rescale_policy robust_policy_type;
+
+ typedef bg::detail::relate::turns::get_turns
+ <
+ Geometry1,
+ Geometry2,
+ bg::detail::get_turns::get_turn_info_type
+ <
+ Geometry1, Geometry2, assign_policy<>
+ >
+ > get_turns_type;
+
+ typedef typename get_turns_type::template turn_info_type
+ <
+ strategy_type, robust_policy_type
+ >::type turn_info;
+
+ typedef std::vector<turn_info> turns_container;
+
+ turns_container turns;
+
+ bg::detail::get_turns::no_interrupt_policy interrupt_policy;
+
+ get_turns_type::apply(turns, geometry1, geometry2,
+ interrupt_policy,
+ strategy_type(), robust_policy_type());
+
+
+ typedef bg::detail::turns::less_seg_fraction_other_op<> turn_less_type;
+
+ verify_less_for_turns(turns, turn_less_type());
+ }
+};
+
+#endif // BOOST_GEOMETRY_TEST_CHECK_TURN_LESS_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/Jamfile b/src/boost/libs/geometry/test/algorithms/set_operations/difference/Jamfile
new file mode 100644
index 000000000..f10724021
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/Jamfile
@@ -0,0 +1,32 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2019, 2020.
+# Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-difference
+ :
+ [ run difference.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_difference ]
+ [ run difference_l_a_sph.cpp : : : : algorithms_difference_l_a_sph ]
+ [ run difference_linear_linear.cpp : : : : algorithms_difference_linear_linear ]
+ [ run difference_areal_linear.cpp : : : : algorithms_difference_areal_linear ]
+ [ run difference_pl_a.cpp : : : : algorithms_difference_pl_a ]
+ [ run difference_pl_l.cpp : : : : algorithms_difference_pl_l ]
+ [ run difference_pl_pl.cpp : : : : algorithms_difference_pl_pl ]
+ [ run difference_multi.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_difference_multi ]
+ [ run difference_multi_areal_linear.cpp : : : : algorithms_difference_multi_areal_linear ]
+ [ run difference_multi_spike.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_difference_multi_spike ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference.cpp
new file mode 100644
index 000000000..ebc0ee1bf
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference.cpp
@@ -0,0 +1,663 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015, 2016.
+// Modifications copyright (c) 2015-2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include "test_difference.hpp"
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+
+// Convenience macros (points are not checked)
+#define TEST_DIFFERENCE(caseid, clips1, area1, clips2, area2, clips3) \
+ (test_one<polygon, polygon, polygon>) \
+ ( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
+ clips3, -1, area1 + area2)
+
+#define TEST_DIFFERENCE_WITH(caseid, clips1, area1, clips2, area2, clips3) \
+ (test_one<polygon, polygon, polygon>) \
+ ( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
+ clips3, -1, area1 + area2, settings)
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+
+ typedef typename bg::coordinate_type<P>::type ct;
+
+ ut_settings sym_settings;
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ sym_settings.sym_difference = false;
+#endif
+
+ ut_settings ignore_validity_settings;
+ ignore_validity_settings.test_validity = false;
+
+ test_one<polygon, polygon, polygon>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 3, 12, 2.52636706856656,
+ 3, 12, 3.52636706856656,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("simplex_with_empty",
+ simplex_normal[0], polygon_empty,
+ 1, 4, 8.0,
+ 0, 0, 0.0);
+
+ test_one<polygon, polygon, polygon>(
+ "star_ring", example_star, example_ring,
+ 5, 22, 1.1901714,
+ 5, 27, 1.6701714,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("two_bends",
+ two_bends[0], two_bends[1],
+ 1, 5, 8.0,
+ 1, 5, 8.0);
+
+ test_one<polygon, polygon, polygon>("star_comb_15",
+ star_comb_15[0], star_comb_15[1],
+ 30, -1, 227.658275102812,
+ 30, -1, 480.485775259312,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("new_hole",
+ new_hole[0], new_hole[1],
+ 1, 9, 7.0,
+ 1, 13, 14.0);
+
+
+ test_one<polygon, polygon, polygon>("crossed",
+ crossed[0], crossed[1],
+ 1, 18, 19.5,
+ 1, 7, 2.5);
+
+ test_one<polygon, polygon, polygon>("disjoint",
+ disjoint[0], disjoint[1],
+ 1, 5, 1.0,
+ 1, 5, 1.0);
+
+ // The too small one might be discarded (depending on point-type / compiler)
+ // We check area only
+ test_one<polygon, polygon, polygon>("distance_zero",
+ distance_zero[0], distance_zero[1],
+ -1, -1, 8.7048386,
+ -1, -1, 0.0098387,
+ tolerance(0.001));
+
+ test_one<polygon, polygon, polygon>("equal_holes_disjoint",
+ equal_holes_disjoint[0], equal_holes_disjoint[1],
+ 1, 5, 9.0,
+ 1, 5, 9.0);
+
+ test_one<polygon, polygon, polygon>("only_hole_intersections1",
+ only_hole_intersections[0], only_hole_intersections[1],
+ 2, 10, 1.9090909,
+ 4, 16, 10.9090909,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("only_hole_intersection2",
+ only_hole_intersections[0], only_hole_intersections[2],
+ 3, 20, 30.9090909,
+ 4, 16, 10.9090909,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("first_within_second",
+ first_within_second[1], first_within_second[0],
+ 1, 10, 24,
+ 0, 0, 0);
+
+ test_one<polygon, polygon, polygon>("fitting",
+ fitting[0], fitting[1],
+ 1, 9, 21.0,
+ 1, 4, 4.0,
+ 1, 5, 25.0);
+
+ test_one<polygon, polygon, polygon>("identical",
+ identical[0], identical[1],
+ 0, 0, 0.0,
+ 0, 0, 0.0);
+
+ test_one<polygon, polygon, polygon>("intersect_exterior_and_interiors_winded",
+ intersect_exterior_and_interiors_winded[0], intersect_exterior_and_interiors_winded[1],
+ 4, 20, 11.533333,
+ 5, 26, 29.783333);
+
+ test_one<polygon, polygon, polygon>("intersect_holes_intersect_and_disjoint",
+ intersect_holes_intersect_and_disjoint[0], intersect_holes_intersect_and_disjoint[1],
+ 2, 16, 15.75,
+ 3, 17, 6.75,
+ ignore_validity_settings);
+
+ test_one<polygon, polygon, polygon>("intersect_holes_intersect_and_touch",
+ intersect_holes_intersect_and_touch[0], intersect_holes_intersect_and_touch[1],
+ 3, 21, 16.25,
+ 3, 17, 6.25,
+ ignore_validity_settings);
+
+ {
+ ut_settings settings = sym_settings;
+ settings.percentage = 0.01;
+ test_one<polygon, polygon, polygon>("intersect_holes_new_ring",
+ intersect_holes_new_ring[0], intersect_holes_new_ring[1],
+ 3, 15, 9.8961,
+ 4, 25, 121.8961,
+ settings);
+ }
+
+ test_one<polygon, polygon, polygon>("first_within_hole_of_second",
+ first_within_hole_of_second[0], first_within_hole_of_second[1],
+ 1, 5, 1,
+ 1, 10, 16);
+
+ test_one<polygon, polygon, polygon>("intersect_holes_disjoint",
+ intersect_holes_disjoint[0], intersect_holes_disjoint[1],
+ 2, 14, 16.0,
+ 2, 10, 6.0);
+
+ test_one<polygon, polygon, polygon>("intersect_holes_intersect",
+ intersect_holes_intersect[0], intersect_holes_intersect[1],
+ 2, 16, 15.75,
+ 2, 12, 5.75,
+ ignore_validity_settings);
+
+ test_one<polygon, polygon, polygon>(
+ "case4", case_4[0], case_4[1],
+ 6, 28, 2.77878787878788,
+ 4, 22, 4.77878787878788,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>(
+ "case5", case_5[0], case_5[1],
+ 8, 36, 2.43452380952381,
+ 7, 33, 3.18452380952381);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Fails with rescaling, a-b is partly generated, b-a does not have any output
+ // It failed already in 1.59
+ test_one<polygon, polygon, polygon>("case_58_iet",
+ case_58[0], case_58[2],
+ 3, 12, 0.6666666667,
+ 1, -1, 11.1666666667,
+ 2, -1, 0.6666666667 + 11.1666666667);
+#endif
+
+ test_one<polygon, polygon, polygon>("case_80",
+ case_80[0], case_80[1],
+ 1, 9, 44.5,
+ 1, 10, 84.5);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Fails without rescaling, holes are not subtracted
+ test_one<polygon, polygon, polygon>("case_81",
+ case_81[0], case_81[1],
+ 1, 8, 80.5,
+ 1, 8, 83.0,
+ 1, 12, 80.5 + 83.0);
+#endif
+
+ test_one<polygon, polygon, polygon>("case_100",
+ case_100[0], case_100[1],
+ 1, 7, 3.125,
+ 1, 7, 16.0,
+ 1, 13, 16.0 + 3.125);
+
+ test_one<polygon, polygon, polygon>("case_101",
+ case_101[0], case_101[1],
+ 3, 17, 13.75,
+ 1, 4, 1.0);
+
+ test_one<polygon, polygon, polygon>("case_102",
+ case_102[0], case_102[1],
+ 4, 18, 1.5,
+ 3, 15, 4.0625);
+
+ TEST_DIFFERENCE(case_105, 4, 8.0, 1, 16.0, 5);
+ TEST_DIFFERENCE(case_106, 1, 17.5, 2, 32.5, 3);
+ TEST_DIFFERENCE(case_107, 2, 18.0, 2, 29.0, 4);
+
+ TEST_DIFFERENCE(case_precision_1, 1, 14.0, 1, BG_IF_KRAMER(8.00001, 8.0), 1);
+ TEST_DIFFERENCE(case_precision_2, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_3, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_4, 1, 14.0, 1, 8.0, 1);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_precision_5, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_6, 0, 0.0, 1, 57.0, 1);
+#endif
+ TEST_DIFFERENCE(case_precision_7, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_8, 0, 0.0, 1, 59.0, 1);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_precision_9, 0, 0.0, 1, 59.0, 1);
+ TEST_DIFFERENCE(case_precision_10, 0, 0.0, 1, 59.0, 1);
+ TEST_DIFFERENCE(case_precision_11, 0, 0.0, 1, 59.0, 1);
+#endif
+ TEST_DIFFERENCE(case_precision_12, 1, 12.0, 0, 0.0, 1);
+ TEST_DIFFERENCE(case_precision_13, 1, BG_IF_KRAMER(12.00002, 12.0), 0, 0.0, 1);
+ TEST_DIFFERENCE(case_precision_14, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_15, 0, 0.0, 1, 59.0, 1);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_precision_16, 0, 0.0, 1, 59.0, 1);
+#endif
+ TEST_DIFFERENCE(case_precision_17, 0, 0.0, 1, 59.0, 1);
+ TEST_DIFFERENCE(case_precision_18, 0, 0.0, 1, 59.0, 1);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_precision_19, 1, 0.0, 1, 59.0, 2);
+#endif
+ TEST_DIFFERENCE(case_precision_20, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_21, 1, 14.0, 1, 7.99999, 1);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_precision_22, 0, 0.0, 1, 59.0, 1);
+ TEST_DIFFERENCE(case_precision_23, 0, 0.0, 1, 59.0, 1);
+#endif
+ TEST_DIFFERENCE(case_precision_24, 1, 14.0, 1, 8.0, 1);
+ TEST_DIFFERENCE(case_precision_25, 1, 14.0, 1, 7.99999, 1);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_precision_26, 0, 0.0, 1, 59.0, 1);
+#endif
+
+ test_one<polygon, polygon, polygon>("winded",
+ winded[0], winded[1],
+ 3, 37, 61,
+ 1, 15, 13);
+
+ test_one<polygon, polygon, polygon>("within_holes_disjoint",
+ within_holes_disjoint[0], within_holes_disjoint[1],
+ 2, 15, 25,
+ 1, 5, 1);
+
+ test_one<polygon, polygon, polygon>("side_side",
+ side_side[0], side_side[1],
+ 1, 5, 1,
+ 1, 5, 1,
+ 1, 7, 2);
+
+ test_one<polygon, polygon, polygon>("buffer_mp1",
+ buffer_mp1[0], buffer_mp1[1],
+ 1, 61, 10.2717,
+ 1, 61, 10.2717);
+
+ if ( BOOST_GEOMETRY_CONDITION((boost::is_same<ct, double>::value)) )
+ {
+ test_one<polygon, polygon, polygon>("buffer_mp2",
+ buffer_mp2[0], buffer_mp2[1],
+ 1, 91, 12.09857,
+ 1, 155, 24.19714,
+ BG_IF_RESCALED(2, 1), -1, 12.09857 + 24.19714);
+ }
+
+ /*** TODO: self-tangencies for difference
+ test_one<polygon, polygon, polygon>("wrapped_a",
+ wrapped[0], wrapped[1],
+ 3, 1, 61,
+ 1, 0, 13);
+
+ test_one<polygon, polygon, polygon>("wrapped_b",
+ wrapped[0], wrapped[2],
+ 3, 1, 61,
+ 1, 0, 13);
+ ***/
+
+ {
+ ut_settings settings;
+ settings.percentage = BG_IF_RESCALED(0.001, 0.1);
+ settings.test_validity = BG_IF_RESCALED(true, false);
+ settings.sym_difference = BG_IF_RESCALED(true, false);
+
+ // Isovist - the # output polygons differ per compiler/pointtype, (very) small
+ // rings might be discarded. We check area only
+
+ // SQL Server gives: 0.279121891701124 and 224.889211358929
+ // PostGIS gives: 0.279121991127244 and 224.889205853156
+ // No robustness gives: 0.279121991127106 and 224.825363749290
+
+ test_one<polygon, polygon, polygon>("isovist",
+ isovist1[0], isovist1[1],
+ -1, -1, 0.279132,
+ -1, -1, 224.8892,
+ settings);
+ }
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ {
+ ut_settings settings;
+ settings.percentage = 0.1;
+ settings.test_validity = false;
+
+ // SQL Server gives: 0.28937764436705 and 0.000786406897532288 with 44/35 rings
+ // PostGIS gives: 0.30859375 and 0.033203125 with 35/35 rings
+ TEST_DIFFERENCE_WITH(geos_1,
+ -1, BG_IF_KRAMER(0.29171, 0.20705),
+ -1, BG_IF_KRAMER(0.00076855, 0.00060440758),
+ -1);
+ }
+#endif
+
+ {
+ // MSVC 14 expects 138.69214 and 211.85913: increase percentage
+
+ ut_settings settings = sym_settings;
+ settings.percentage = 0.01;
+ settings.test_validity = false;
+
+ // Output polygons for sym difference might be combined
+ test_one<polygon, polygon, polygon>("geos_2",
+ geos_2[0], geos_2[1],
+ 1, -1, 138.6923828,
+ 1, -1, 211.859375,
+ BG_IF_RESCALED(2, 1), -1, 138.6923828 + 211.859375,
+ settings);
+ }
+
+ // Output polygons for sym difference might be combined
+ test_one<polygon, polygon, polygon>("geos_3",
+ geos_3[0], geos_3[1],
+ 1, -1, 16211128.5,
+ 1, -1, 13180420.0,
+ BG_IF_RESCALED(1, 2), -1, 16211128.5 + 13180420.0,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("geos_4",
+ geos_4[0], geos_4[1],
+ 1, -1, 971.9163115,
+ 1, -1, 1332.4163115,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("ggl_list_20110306_javier",
+ ggl_list_20110306_javier[0], ggl_list_20110306_javier[1],
+ 1, -1, 71495.3331,
+ 2, -1, 8960.49049,
+ 2, -1, 71495.3331 + 8960.49049);
+
+ test_one<polygon, polygon, polygon>("ggl_list_20110307_javier",
+ ggl_list_20110307_javier[0], ggl_list_20110307_javier[1],
+ 1, if_typed<ct, float>(14, 13), 16815.6,
+ 1, 4, 3200.4,
+ tolerance(0.01));
+
+ if ( BOOST_GEOMETRY_CONDITION((! boost::is_same<ct, float>::value)) )
+ {
+ TEST_DIFFERENCE(ggl_list_20110716_enrico,
+ 3, 35723.8506317139, // TODO FOR GENERIC, misses one of three outputs
+ 1, 58456.4964294434,
+ 1);
+ }
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING) \
+ || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) \
+ || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ {
+ // Symmetric difference should output one polygon
+ // Using rescaling, it currently outputs two.
+ ut_settings settings;
+ settings.test_validity = false;
+
+ TEST_DIFFERENCE_WITH(ggl_list_20110820_christophe,
+ 1, 2.8570121719168924,
+ 1, 64.498061986388564,
+ BG_IF_RESCALED(2, 1));
+ }
+#endif
+
+ test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",
+ ggl_list_20120717_volker[0], ggl_list_20120717_volker[1],
+ 1, 11, 3370866.2295081965,
+ 1, 5, 384.2295081964694,
+ tolerance(0.01));
+
+ // 2011-07-02 / 2014-06-19
+ // Interesting FP-precision case.
+ // sql server gives: 6.62295817619452E-05
+ // PostGIS gives: 0.0 (no output)
+ // Boost.Geometry gave results depending on FP-type, and compiler, and operating system.
+ // With rescaling results are equal w.r.t. compiler/FP type,
+ // however, some long spikes are still generated in the resulting difference
+ // Without rescaling there is no output, like PostGIS
+ test_one<polygon, polygon, polygon>("ggl_list_20110627_phillip",
+ ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
+ BG_IF_RESCALED(1, 0), -1,
+ BG_IF_RESCALED(if_typed_tt<ct>(0.0000000000001105367, 0.000125137888971949), 0),
+ 1, -1, 3577.40960816756,
+ tolerance(0.01)
+ );
+
+ {
+ // With rescaling, difference of output a-b and a sym b is invalid
+ ut_settings settings;
+ settings.test_validity = BG_IF_RESCALED(false, true);
+ TEST_DIFFERENCE_WITH(ggl_list_20190307_matthieu_1,
+ BG_IF_KRAMER(2, 1), 0.18461532,
+ BG_IF_KRAMER(2, 1), 0.617978,
+ BG_IF_KRAMER(4, 2));
+ TEST_DIFFERENCE_WITH(ggl_list_20190307_matthieu_2, 2, 12.357152, 0, 0.0, 2);
+ }
+
+ // Ticket 8310, one should be completely subtracted from the other.
+ test_one<polygon, polygon, polygon>("ticket_8310a",
+ ticket_8310a[0], ticket_8310a[1],
+ 1, 10, 10.11562724,
+ 0, 0, 0);
+ test_one<polygon, polygon, polygon>("ticket_8310b",
+ ticket_8310b[0], ticket_8310b[1],
+ 1, 10, 10.12655608,
+ 0, 0, 0);
+ test_one<polygon, polygon, polygon>("ticket_8310c",
+ ticket_8310c[0], ticket_8310c[1],
+ 1, 10, 10.03103292,
+ 0, 0, 0);
+
+ test_one<polygon, polygon, polygon>("ticket_9081_15",
+ ticket_9081_15[0], ticket_9081_15[1],
+ 2, -1, 0.0334529710902111,
+ BG_IF_RESCALED(1, 0), -1, BG_IF_RESCALED(5.3469555172380723e-010, 0));
+
+ test_one<polygon, polygon, polygon>("ticket_9081_314",
+ ticket_9081_314[0], ticket_9081_314[1],
+ 2, 12, 0.0451236449624935,
+ 0, 0, 0);
+
+ {
+ ut_settings settings;
+ settings.test_validity = BG_IF_RESCALED(true, false);
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) && defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+ const int expected_count = 1; // Wrong, considers all consecutive polygons as one
+#else
+ const int expected_count = 6;
+#endif
+ TEST_DIFFERENCE_WITH(ticket_9563,
+ 0, 0,
+ expected_count, 20.096189,
+ expected_count);
+ }
+
+ test_one<polygon, polygon, polygon>("ticket_10108_a",
+ ticket_10108_a[0], ticket_10108_a[1],
+ 1, 4, 0.0145037,
+ 1, 4, 0.029019232,
+ sym_settings);
+
+ test_one<polygon, polygon, polygon>("ticket_10108_b",
+ ticket_10108_b[0], ticket_10108_b[1],
+ 1, -1, 1081.68697,
+ 1, -1, 1342.65795,
+ BG_IF_RESCALED(2, 1), -1, 1081.68697 + 1342.65795);
+
+ test_one<polygon, polygon, polygon>("ticket_11725",
+ ticket_11725[0], ticket_11725[1],
+ 1, -1, 3.0,
+ 1, -1, 4.5,
+ 1, -1, 7.5);
+
+ // From assemble-test, with a u/u case
+ test_one<polygon, polygon, polygon>("assemble_0210",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(8.5 1,9.5 1,9.5 2,8.5 2,8.5 1))",
+ "POLYGON((2 0.5,0.5 2,0.5 8,2 9.5,6 9.5,8.5 8,8.5 2,7 0.5,2 0.5),(2 2,7 2,7 8,2 8,2 2))",
+ 2, 23, 62.25,
+ 0, 0, 0.0);
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ typedef bg::model::box<P> box;
+ typedef bg::model::ring<P> ring;
+
+ // Other combinations
+ {
+ test_one<polygon, polygon, ring>(
+ "star_ring_ring", example_star, example_ring,
+ 5, 22, 1.1901714,
+ 5, 27, 1.6701714,
+ sym_settings);
+
+ test_one<polygon, ring, polygon>(
+ "ring_star_ring", example_ring, example_star,
+ 5, 27, 1.6701714,
+ 5, 22, 1.1901714,
+ sym_settings);
+
+ static std::string const clip = "POLYGON((2.5 0.5,5.5 2.5))";
+
+ test_one<polygon, box, ring>("star_box",
+ clip, example_star,
+ 4, 20, 2.833333, 4, 16, 0.833333);
+
+ test_one<polygon, ring, box>("box_star",
+ example_star, clip,
+ 4, 16, 0.833333, 4, 20, 2.833333);
+ }
+
+ // Counter clockwise
+ {
+ typedef bg::model::polygon<P, false> polygon_ccw;
+ test_one<polygon, polygon_ccw, polygon_ccw>(
+ "star_ring_ccw", example_star, example_ring,
+ 5, 22, 1.1901714,
+ 5, 27, 1.6701714,
+ sym_settings);
+ test_one<polygon, polygon, polygon_ccw>(
+ "star_ring_ccw1", example_star, example_ring,
+ 5, 22, 1.1901714,
+ 5, 27, 1.6701714,
+ sym_settings);
+ test_one<polygon, polygon_ccw, polygon>(
+ "star_ring_ccw2", example_star, example_ring,
+ 5, 22, 1.1901714,
+ 5, 27, 1.6701714,
+ sym_settings);
+ }
+
+ // Multi/box (should be moved to multi)
+ {
+ typedef bg::model::multi_polygon<polygon> mp;
+
+ static std::string const clip = "POLYGON((2 2,4 4))";
+
+ test_one<polygon, box, mp>("simplex_multi_box_mp",
+ clip, case_multi_simplex[0],
+ 2, -1, 0.53333333333, 3, -1, 8.53333333333);
+ test_one<polygon, mp, box>("simplex_multi_mp_box",
+ case_multi_simplex[0], clip,
+ 3, -1, 8.53333333333, 2, -1, 0.53333333333);
+
+ }
+#endif
+
+ // Rescaling generates a very small false polygon
+ {
+ ut_settings settings;
+#if defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+ settings.test_validity = BG_IF_RESCALED(true, false);
+#endif
+ TEST_DIFFERENCE_WITH(issue_566_a, 1, 143.662, BG_IF_RESCALED(1, 0),
+ BG_IF_RESCALED(1.605078e-6, 0.0),
+ BG_IF_RESCALED(2, 1));
+ }
+ TEST_DIFFERENCE(issue_566_b, 1, 143.662, BG_IF_RESCALED(1, 0),
+ BG_IF_RESCALED(1.605078e-6, 0.0),
+ BG_IF_RESCALED(2, 1));
+
+ TEST_DIFFERENCE(mysql_21977775, 2, 160.856568913, 2, 92.3565689126, 4);
+ TEST_DIFFERENCE(mysql_21965285, 1, 92.0, 1, 14.0, 1);
+ TEST_DIFFERENCE(mysql_23023665_1, 1, 92.0, 1, 142.5, 2);
+ TEST_DIFFERENCE(mysql_23023665_2, 1, 96.0, 1, 16.0, 2);
+ TEST_DIFFERENCE(mysql_23023665_3, 1, 225.0, 1, 66.0, 2);
+ TEST_DIFFERENCE(mysql_23023665_5, 2, 165.23735, 2, 105.73735, 4);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) \
+ || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) \
+ || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Testcases going wrong with Kramer's rule and no rescaling
+ TEST_DIFFERENCE(mysql_23023665_6, 2, 105.68756, 3, 10.18756, 5);
+ TEST_DIFFERENCE(mysql_23023665_13, 3, 99.74526, 3, 37.74526, 6);
+#endif
+}
+
+
+// Test cases for integer coordinates / ccw / open
+template <typename Point, bool ClockWise, bool Closed>
+void test_specific()
+{
+ typedef bg::model::polygon<Point, ClockWise, Closed> polygon;
+
+ test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",
+ ggl_list_20120717_volker[0], ggl_list_20120717_volker[1],
+ 1, 11, 3371540,
+ 1, 4, 385,
+ 1, 16, 3371540 + 385);
+
+ test_one<polygon, polygon, polygon>("ticket_10658",
+ ticket_10658[0], ticket_10658[1],
+ 1, 6, 1510434,
+ 0, 0, 0);
+
+ test_one<polygon, polygon, polygon>("ticket_11121",
+ ticket_11121[0], ticket_11121[1],
+ 2, 8, 489763.5,
+ 1, 4, 6731652.0);
+
+ // Generates spikes, both a-b and b-a
+ TEST_DIFFERENCE(ticket_11676, 2, 2537992.5, 2, 294963.5, 3);
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+ test_all<bg::model::d2::point_xy<default_test_type> >();
+
+ test_specific<bg::model::d2::point_xy<int>, false, false>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<float> >();
+
+#ifdef HAVE_TTMATH
+ std::cout << "Testing TTMATH" << std::endl;
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_areal_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_areal_linear.cpp
new file mode 100644
index 000000000..a44193e6e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_areal_linear.cpp
@@ -0,0 +1,260 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015, 2017.
+// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include "test_difference.hpp"
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+template <typename CoordinateType>
+void test_ticket_10835(std::string const& wkt_out1, std::string const& wkt_out2)
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::linestring<point_type> linestring_type;
+ typedef bg::model::multi_linestring<linestring_type> multilinestring_type;
+ typedef bg::model::polygon
+ <
+ point_type, /*ClockWise*/false, /*Closed*/false
+ > polygon_type;
+
+ multilinestring_type multilinestring;
+ bg::read_wkt(ticket_10835[0], multilinestring);
+ polygon_type polygon1;
+ bg::read_wkt(ticket_10835[1], polygon1);
+ polygon_type polygon2;
+ bg::read_wkt(ticket_10835[2], polygon2);
+
+ multilinestring_type multilinestringOut1;
+ bg::difference(multilinestring, polygon1, multilinestringOut1);
+ std::stringstream stream;
+ stream << bg::wkt(multilinestringOut1);
+
+ BOOST_CHECK_EQUAL(stream.str(), wkt_out1);
+
+ multilinestring_type multilinestringOut2;
+ bg::difference(multilinestringOut1, polygon2, multilinestringOut2);
+ stream.str("");
+ stream.clear();
+ stream << bg::wkt(multilinestringOut2);
+
+ BOOST_CHECK_EQUAL(stream.str(), wkt_out2);
+}
+
+
+template <typename Polygon, typename LineString>
+void test_areal_linear()
+{
+ typedef typename bg::point_type<Polygon>::type point;
+ typedef typename bg::coordinate_type<point>::type ct;
+
+ std::string const poly_simplex = "POLYGON((1 1,1 3,3 3,3 1,1 1))";
+ test_one_lp<LineString, LineString, Polygon>("simplex", "LINESTRING(0 2,4 2)", poly_simplex, 2, 4, 2.0);
+ test_one_lp<LineString, LineString, Polygon>("case2", "LINESTRING(0 1,4 3)", poly_simplex, 2, 4, sqrt(5.0));
+ test_one_lp<LineString, LineString, Polygon>("case3", "LINESTRING(0 1,1 2,3 2,4 3,6 3,7 4)", "POLYGON((2 0,2 5,5 5,5 0,2 0))", 2, 6, 2.0 + 2.0 * sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case4", "LINESTRING(1 1,3 2,1 3)", "POLYGON((0 0,0 4,2 4,2 0,0 0))", 1, 3, sqrt(5.0));
+
+ test_one_lp<LineString, LineString, Polygon>("case5", "LINESTRING(0 1,3 4)", poly_simplex, 2, 4, 2.0 * sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case6", "LINESTRING(1 1,10 3)", "POLYGON((2 0,2 4,3 4,3 1,4 1,4 3,5 3,5 1,6 1,6 3,7 3,7 1,8 1,8 3,9 3,9 0,2 0))", 5, 10,
+ // Pieces are 1 x 2/9:
+ 5.0 * sqrt(1.0 + 4.0/81.0));
+
+
+ test_one_lp<LineString, LineString, Polygon>("case7", "LINESTRING(1.5 1.5,2.5 2.5)", poly_simplex, 0, 0, 0.0);
+ test_one_lp<LineString, LineString, Polygon>("case8", "LINESTRING(1 0,2 0)", poly_simplex, 1, 2, 1.0);
+
+ std::string const poly_9 = "POLYGON((1 1,1 4,4 4,4 1,1 1))";
+ test_one_lp<LineString, LineString, Polygon>("case9", "LINESTRING(0 1,1 2,2 2)", poly_9, 1, 2, sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case10", "LINESTRING(0 1,1 2,0 2)", poly_9, 1, 3, 1.0 + sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case11", "LINESTRING(2 2,4 2,3 3)", poly_9, 0, 0, 0.0);
+ test_one_lp<LineString, LineString, Polygon>("case12", "LINESTRING(2 3,4 4,5 6)", poly_9, 1, 2, sqrt(5.0));
+
+ test_one_lp<LineString, LineString, Polygon>("case13", "LINESTRING(3 2,4 4,2 3)", poly_9, 0, 0, 0.0);
+ test_one_lp<LineString, LineString, Polygon>("case14", "LINESTRING(5 6,4 4,6 5)", poly_9, 1, 3, 2.0 * sqrt(5.0));
+
+ test_one_lp<LineString, LineString, Polygon>("case15", "LINESTRING(0 2,1 2,1 3,0 3)", poly_9, 2, 4, 2.0);
+ test_one_lp<LineString, LineString, Polygon>("case16", "LINESTRING(2 2,1 2,1 3,2 3)", poly_9, 0, 0, 0.0);
+
+ std::string const angly = "LINESTRING(2 2,2 1,4 1,4 2,5 2,5 3,4 3,4 4,5 4,3 6,3 5,2 5,2 6,0 4)";
+ test_one_lp<LineString, LineString, Polygon>("case17", angly, "POLYGON((1 1,1 5,4 5,4 1,1 1))", 3, 11, 6.0 + 4.0 * sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case18", angly, "POLYGON((1 1,1 5,5 5,5 1,1 1))", 2, 6, 2.0 + 3.0 * sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case19", "LINESTRING(1 2,1 3,0 3)", poly_9, 1, 2, 1.0);
+ test_one_lp<LineString, LineString, Polygon>("case20", "LINESTRING(1 2,1 3,2 3)", poly_9, 0, 0, 0.0);
+
+ // PROPERTIES CHANGED BY switch_to_integer
+ // TODO test_one_lp<LineString, LineString, Polygon>("case21", "LINESTRING(1 2,1 4,4 4,4 1,2 1,2 2)", poly_9, 0, 0, 0.0);
+
+ // More collinear (opposite) cases
+ test_one_lp<LineString, LineString, Polygon>("case22", "LINESTRING(4 1,4 4,7 4)", poly_9, 1, 2, 3.0);
+ test_one_lp<LineString, LineString, Polygon>("case23", "LINESTRING(4 0,4 4,7 4)", poly_9, 2, 4, 4.0);
+ test_one_lp<LineString, LineString, Polygon>("case24", "LINESTRING(4 1,4 5,7 5)", poly_9, 1, 3, 4.0);
+ test_one_lp<LineString, LineString, Polygon>("case25", "LINESTRING(4 0,4 5,7 5)", poly_9, 2, 5, 5.0);
+ test_one_lp<LineString, LineString, Polygon>("case26", "LINESTRING(4 0,4 3,4 5,7 5)", poly_9, 2, 5, 5.0);
+ test_one_lp<LineString, LineString, Polygon>("case27", "LINESTRING(4 4,4 5,5 5)", poly_9, 1, 3, 2.0);
+
+ if (BOOST_GEOMETRY_CONDITION( (! boost::is_same<ct, float>::value)) )
+ {
+ // Fails for float
+ test_one_lp<LineString, LineString, Polygon>("case28",
+ "LINESTRING(-1.3 0,-15 0,-1.3 0)",
+ "POLYGON((2 3,-9 -7,12 -13,2 3))",
+ 1, 3, 27.4);
+ }
+
+ test_one_lp<LineString, LineString, Polygon>("case29",
+ "LINESTRING(5 5,-10 5,5 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 1, 3, 20);
+
+ test_one_lp<LineString, LineString, Polygon>("case29a",
+ "LINESTRING(1 1,5 5,-10 5,5 5,6 6)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 1, 3, 20);
+
+ test_one_lp<LineString, LineString, Polygon>("case30",
+ "LINESTRING(-10 5,5 5,-10 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 2, 4, 20);
+
+ test_one_lp<LineString, LineString, Polygon>("case30a",
+ "LINESTRING(-20 10,-10 5,5 5,-10 5,-20 -10)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 2, 6, 49.208096);
+
+ test_one_lp<LineString, LineString, Polygon>("case31",
+ "LINESTRING(0 5,5 5,0 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 0, 0, 0);
+
+ test_one_lp<LineString, LineString, Polygon>("case31",
+ "LINESTRING(0 5,5 5,1 1,9 1,5 5,0 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 0, 0, 0);
+
+ test_one_lp<LineString, LineString, Polygon>("case32",
+ "LINESTRING(5 5,0 5,5 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 0, 0, 0);
+
+ test_one_lp<LineString, LineString, Polygon>("case32a",
+ "LINESTRING(-10 10,5 5,0 5,5 5,20 10)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 2, 4, 21.081851);
+
+ test_one_lp<LineString, LineString, Polygon>("case33",
+ "LINESTRING(-5 5,0 5,-5 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 1, 3, 10);
+
+ test_one_lp<LineString, LineString, Polygon>("case33a",
+ "LINESTRING(-10 10,-5 5,0 5,-5 5,-10 -10)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 1, 5, 32.882456);
+
+ test_one_lp<LineString, LineString, Polygon>("case33b",
+ "LINESTRING(0 5,-5 5,0 5)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 1, 3, 10);
+
+ test_one_lp<LineString, LineString, Polygon>("case34",
+ "LINESTRING(5 5,0 5,5 5,5 4,0 4,5 4)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 0, 0, 0);
+
+ test_one_lp<LineString, LineString, Polygon>("case35",
+ "LINESTRING(5 5,0 5,5 5,5 4,0 4,5 3)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ 0, 0, 0);
+
+ test_one_lp<LineString, LineString, Polygon>("case36",
+ "LINESTRING(-1 -1,10 10)",
+ "POLYGON((5 5,15 15,15 5,5 5))",
+ 1, 2, 6 * std::sqrt(2.0));
+
+ test_one_lp<LineString, LineString, Polygon>("case37_1",
+ "LINESTRING(1 1,2 2)",
+ "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))",
+ 1, 2, std::sqrt(2.0));
+
+ test_one_lp<LineString, LineString, Polygon>("case37_2",
+ "LINESTRING(1 1,2 2,3 3)",
+ "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))",
+ 1, 2, std::sqrt(2.0));
+
+ test_one_lp<LineString, LineString, Polygon>("case38",
+ "LINESTRING(0 0,1 1,2 2,3 3)",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0))",
+ 1, 3, 2 * std::sqrt(2.0));
+
+ // several linestrings are in the output, the result is geometrically correct
+ // still single linestring could be generated
+ test_one_lp<LineString, LineString, Polygon>("case39",
+ "LINESTRING(0 0,1 1,2 2,3 3)",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0),(2 2,3 2,3 3,2 3,2 2))",
+ 2, 5, 3 * std::sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case40",
+ "LINESTRING(0 0,1 1,2 2,4 4)",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0),(2 2,3 2,3 3,2 3,2 2))",
+ 2, 5, 3 * std::sqrt(2.0));
+ test_one_lp<LineString, LineString, Polygon>("case41",
+ "LINESTRING(0 0,1 1,2 2,9 9)",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0),(2 2,3 2,3 3,2 3,2 2),(7 7,8 7,9 9,7 8,7 7))",
+ 3, 7, 5 * std::sqrt(2.0));
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::linestring<P> linestring;
+
+ test_areal_linear<polygon, linestring>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+ test_ticket_10835<int>
+ ("MULTILINESTRING((5239 2113,5233 2114),(4794 2205,1020 2986))",
+ "MULTILINESTRING((5239 2113,5233 2114),(4794 2205,1460 2895))");
+
+ test_ticket_10835<double>
+ ("MULTILINESTRING((5239 2113,5232.52 2114.34),(4794.39 2205,1020 2986))",
+ "MULTILINESTRING((5239 2113,5232.52 2114.34),(4794.39 2205,1459.78 2895))");
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<float> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_l_a_sph.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_l_a_sph.cpp
new file mode 100644
index 000000000..2dbb3d0c1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_l_a_sph.cpp
@@ -0,0 +1,36 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_difference.hpp"
+
+void test_all()
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > point;
+ typedef bg::model::linestring<point> linestring;
+ typedef bg::model::polygon<point> polygon;
+
+ // https://github.com/boostorg/geometry/issues/619
+
+ test_one_lp<linestring, linestring, polygon>(
+ "issue_619",
+ "LINESTRING(-106.373725 39.638846, -106.373486 39.639362, -106.368378 39.614603)",
+ "POLYGON((-106.374074 39.638593, -106.373626 39.639230, -106.373594 39.639232, "
+ "-106.373366 39.638502, -106.373299 39.638459, -106.373369 39.638382, "
+ "-106.374074 39.638593))",
+ 2, 5, 0.00044107988528133710);
+}
+
+int test_main(int, char* [])
+{
+ test_all();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_linear_linear.cpp
new file mode 100644
index 000000000..df8227d93
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_linear_linear.cpp
@@ -0,0 +1,1542 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_difference_linear_linear
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_difference_linear_linear.hpp"
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/algorithms/difference.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_difference_linestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / LINESTRING DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_difference_of_geometries<L, L, ML> tester;
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 1,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0 2,1 1,2 1,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1),(2 1,3 2))"),
+ "lldf00");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 2,1 1,2 1,3 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 1,3 2)"),
+ from_wkt<ML>("MULTILINESTRING((0 2,1 1),(2 1,3 0))"),
+ "lldf00-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,5 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,3 0),(4 0,5 0))"),
+ "lldf01");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(3 0,4 0)"),
+ from_wkt<L>("LINESTRING(0 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf01-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,6 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,3 0))"),
+ "lldf01-2");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(3 0,6 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((4 0,6 0))"),
+ "lldf01-3");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((4 0,6 0))"),
+ "lldf01-4");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf01-5");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0),(5 0,20 0))"),
+ "lldf01-6");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-20 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((-20 0,4 0),(5 0,20 0))"),
+ "lldf01-7");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ "lldf01-8");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(2 0,4 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf01-9");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ "lldf01-10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ "lldf01-11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,3 0))"),
+ "lldf01-11a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,3 0))"),
+ "lldf01-11b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(5 0,6 0))"),
+ "lldf01-12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0)"),
+ from_wkt<L>("LINESTRING(-1 6,0 5,15 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,5 5),(10 5,15 0))"),
+ "lldf02");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0))"),
+ "lldf03");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 5,10 5,15 0))"),
+ "lldf04");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,25 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (20 0,25 1))"),
+ "lldf05");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0))"),
+ "lldf05-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 0))"),
+ "lldf06");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,25 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 0))"),
+ "lldf07");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 0))"),
+ "lldf08");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 1))"),
+ "lldf09");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 1))"),
+ "lldf10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(2 0,3 0),\
+ (4 0,5 5,10 5,15 0),(30 0,31 1))"),
+ "lldf11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(2 0,3 0),\
+ (4 0,5 5,10 5,15 0),(30 0,31 0))"),
+ "lldf11-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(3 1,2 0,0 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf12-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5,4 0,5 10)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "lldf13");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,2.5 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf14");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(3 5,4 0))"),
+ "lldf15");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0.5 0,1 0,3 2,4 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0.5 0))"),
+ "lldf16");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(4 5,3 2,1 0,0.5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0.5 0))"),
+ "lldf16-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,30 1)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(25 1,30 1))"),
+ "lldf17");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,21 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1,21 0,30 0))"),
+ "lldf18");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19a-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,6 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19c");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19d");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19e");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19f");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19f-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19g");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0))"),
+ "lldf19g-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,35 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(25 0,30 0,30 30,10 30),\
+ (10 0,10 -10,15 0,20 0),(25 0,35 0))"),
+ "lldf20");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,15 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,15 0),(30 0,30 30,10 30),\
+ (10 0,10 -10,15 0))"),
+ "lldf20a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<L>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0),(20 0,30 0))"),
+ "lldf21"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 2,5 -1,15 2,18 0))"),
+ "lldf21a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0)"),
+ from_wkt<L>("LINESTRING(1 0,4 0,2 1,5 1,4 0,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(8 0,10 0))"),
+ "lldf22"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0)"),
+ from_wkt<L>("LINESTRING(4 0,5 0,5 1,1 1,1 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,10 0))"),
+ "lldf23"
+ );
+
+ // the following two tests have been discussed with by Adam
+ tester::apply
+ (from_wkt<L>("LINESTRING(1 0,1 1,2 1)"),
+ from_wkt<L>("LINESTRING(2 1,1 1,1 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf24"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(1 0,1 1,2 1)"),
+ from_wkt<L>("LINESTRING(1 2,1 1,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 1))"),
+ "lldf25"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(6 0,0 0,5 0)"),
+ from_wkt<L>("LINESTRING(2 0,-10 0)"),
+ from_wkt<ML>("MULTILINESTRING((6 0,2 0),(2 0,5 0))"),
+ "lldf27a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(6 0,0 0,5 0)"),
+ from_wkt<L>("LINESTRING(2 0,-1 0,-10 0)"),
+ from_wkt<ML>("MULTILINESTRING((6 0,2 0),(2 0,5 0))"),
+ "lldf27b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(6 0,0 0,5 0)"),
+ from_wkt<L>("LINESTRING(2 0,0 0,-10 0)"),
+ from_wkt<ML>("MULTILINESTRING((6 0,2 0),(2 0,5 0))"),
+ "lldf27c"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(2 0,0 0,-10 0)"),
+ from_wkt<L>("LINESTRING(6 0,0 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,-10 0))"),
+ "lldf27d"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5)"),
+ from_wkt<L>("LINESTRING(-3 2,-3 0,-3 -10)"),
+ from_wkt<ML>("MULTILINESTRING((-3 6,-3 2),(-3 2,-3 5))"),
+ "lldf28a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-3 2,-3 0,-3 -10)"),
+ from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5)"),
+ from_wkt<ML>("MULTILINESTRING((-3 0,-3 -10))"),
+ "lldf28b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5)"),
+ from_wkt<L>("LINESTRING(-3 2,-3 0,-3 -10)"),
+ from_wkt<ML>("MULTILINESTRING((-3 6,-3 2),(-3 2,-3 5))"),
+ "lldf28c"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-7 -8,3 0,4 -1)"),
+ from_wkt<L>("LINESTRING(-5 -4,3 0,4 -1,7 -4)"),
+ from_wkt<ML>("MULTILINESTRING((-7 -8,3 0))"),
+ "lldf29a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-7 -8,3 0,4 -1,-7 10)"),
+ from_wkt<L>("LINESTRING(-5 -4,3 0,4 -1,2 -1)"),
+ from_wkt<ML>("MULTILINESTRING((-7 -8,3 0),(3 0,-7 10))"),
+ "lldf29b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-7 -8,3 0,4 -1,-7 10)"),
+ from_wkt<L>("LINESTRING(-5 -4,3 0,4 -1,7 -4,2 -1)"),
+ from_wkt<ML>("MULTILINESTRING((-7 -8,3 0),(3 0,-7 10))"),
+ "lldf29c"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-5 -4,3 0,4 -1,7 -4,2 -1)"),
+ from_wkt<L>("LINESTRING(-7 -8,3 0,4 -1,-7 10)"),
+ from_wkt<ML>("MULTILINESTRING((-5 -4,3 0),(4 -1,7 -4,2 -1))"),
+ "lldf29c-r"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-2 -2,-4 0,1 -8,-2 6,8 5,-7 -8,\
+ 3 0,4 -1,-7 10,-4 10)"),
+ from_wkt<L>("LINESTRING(-5 -4,3 0,4 -1,7 -4,2 -1,-4 -1,-2 6)"),
+ from_wkt<ML>("MULTILINESTRING((-2 -2,-4 0,1 -8,-2 6,8 5,-7 -8,\
+ 3 0),(3 0,-7 10,-4 10))"),
+ "lldf29d"
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ tester::apply
+ (from_wkt<L>("LINESTRING(8 5,5 1,-2 3,1 10)"),
+ from_wkt<L>("LINESTRING(1.9375 1.875,\
+ 1.7441860465116283 1.9302325581395348,\
+ -0.7692307692307692 2.6483516483516487,\
+ -2 3,-1.0071942446043165 5.316546762589928)"),
+ from_wkt<ML>("MULTILINESTRING((8 5,5 1,-2 3,1 10))"),
+ "lldf30a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(1.9375 1.875,\
+ 1.7441860465116283 1.9302325581395348,\
+ -0.7692307692307692 2.6483516483516487,\
+ -2 3,-1.0071942446043165 5.316546762589928)"),
+ from_wkt<L>("LINESTRING(8 5,5 1,-2 3,1 10)"),
+ from_wkt<ML>("MULTILINESTRING((1.9375 1.875,\
+ 1.7441860465116283 1.9302325581395348,\
+ -0.7692307692307692 2.6483516483516487,\
+ -2 3,-1.0071942446043165 5.316546762589928))"),
+ "lldf30b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(5 -8,-7 -6,-3 6,-3 1,-5 4,-1 0,8 5,\
+ 5 1,-2 3,1 10,8 5,6 2,7 4)"),
+ from_wkt<L>("LINESTRING(1.9375 1.875,\
+ 1.7441860465116283 1.9302325581395348,\
+ -0.7692307692307692 2.6483516483516487,\
+ -2 3,-1.0071942446043165 5.316546762589928)"),
+ from_wkt<ML>("MULTILINESTRING((5 -8,-7 -6,-3 6,-3 1,-5 4,-1 0,8 5,\
+ 5 1,-2 3,1 10,8 5,6 2,7 4))"),
+
+ "lldf30c"
+ );
+#endif
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(8 1, 4 .4)"),
+ from_wkt<L>("LINESTRING(0 -.2, 8 1)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lldf31s"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(8 1, 4 .4,2 8)"),
+ from_wkt<L>("LINESTRING(0 -.2, 8 1)"),
+ from_wkt<ML>("MULTILINESTRING((4 .4,2 8))"),
+ "lldf31x",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(2 8,4 .4,8 1)"),
+ from_wkt<L>("LINESTRING(0 -.2, 8 1)"),
+ from_wkt<ML>("MULTILINESTRING((2 8,4 .4))"),
+ "lldf31x-r",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 5, 8 1, 4 .4, 2 8)"),
+ from_wkt<L>("LINESTRING(0 -.2, 8 1, -.5 7)"),
+ from_wkt<ML>("MULTILINESTRING((0 5,8 1),(4 .4,2 8))"),
+ "lldf31y",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 -.2, 8 1, -.5 7)"),
+ from_wkt<L>("LINESTRING(0 5, 8 1, 4 .4, 2 8)"),
+ from_wkt<ML>("MULTILINESTRING((0 -.2,4 .4),(8 1,-.5 7))"),
+ "lldf31y-r",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 5, 8 1, 4 .4, 2 8)"),
+ from_wkt<L>("LINESTRING(0 -.2, 8 1, -.5 7, 6 +.2)"),
+ from_wkt<ML>("MULTILINESTRING((0 5,8 1),(4 .4,2 8))"),
+ "lldf31y+",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(10.0002 2,9 -1032.34324, .3 8, 0 5, 8 1, 4 .4, 2 8)"),
+ from_wkt<L>("LINESTRING(0 -.2, 8 1, -.5 7, 6 +.2)"),
+ from_wkt<ML>("MULTILINESTRING((10.0002 2,9 -1032.34324,.3 8,0 5,8 1),(4 .4,2 8))"),
+ "lldf31z",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 -.2, 8 1, -.5 7, 6 +.2)"),
+ from_wkt<L>("LINESTRING(10.0002 2,9 -1032.34324, .3 8, 0 5, 8 1, 4 .4, 2 8)"),
+ from_wkt<ML>("MULTILINESTRING((0 -.2,4 .4),(8 1,-.5 7,6 .2))"),
+ "lldf31z-r",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0, 8 1, -.5 7)"),
+ from_wkt<L>("LINESTRING(0 5, 8 1, 4 .5, 2 8)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 .5),(8 1,-.5 7))"),
+ "lldf32"
+ );
+}
+
+
+
+BOOST_AUTO_TEST_CASE( test_difference_linestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / MULTILINESTRING DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_difference_of_geometries<L, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1))"),
+ "lmldf01"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1))"),
+ "lmldf02"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(5 0,10 0,20 1))"),
+ "lmldf03"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1))"),
+ "lmldf04"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "lmldf07"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0))"),
+ "lmldf07a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lmldf07b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "lmldf08"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0))"),
+ "lmldf09"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,1.5 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(1.5 0,2 0.5,3 0))"),
+ "lmldf10"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf12"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf13"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf14"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf15"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf15a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf16"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmldf16a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "lmldf17"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "lmldf17a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "lmldf18"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "lmldf18a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(20 0,30 0))"),
+ "lmldf18b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,25 0,26 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,25 0),(26 0,30 0))"),
+ "lmldf18c"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,25 0,21 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,21 0),(25 0,30 0))"),
+ "lmldf18d"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 5,1 0,9 0,10 5),(0 1,2 0,3 1),\
+ (0 -2,3 0,4 4),(0 -5,4 0,5 0,6 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10))"),
+ "lmldf19"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,0 0),(10 0,12 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ "lmldf20"
+ );
+}
+
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multilinestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / LINESTRING DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_difference_of_geometries<ML, L, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 2,4 3)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ "mlldf01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0))"),
+ "mlldf02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<L>("LINESTRING(-1 -1,1 0,101 0,200 -1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "mlldf03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<L>("LINESTRING(0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlldf04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-1 0,-1 10),(0 0,20 0),(25 0,30 0))"),
+ from_wkt<L>("LINESTRING(0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,-1 10),(0 0,1 0),(19 0,20 0),(25 0,30 0))"),
+ "mlldf05"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-3 2,-3 0,-3 -10))"),
+ from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5)"),
+ from_wkt<ML>("MULTILINESTRING((-3 0,-3 -10))"),
+ "mlldf06a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((6 6,-3 2,-3 0,-3 -10,9 -2))"),
+ from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5,2 -3,-6 10,5 0,2 8,\
+ -6 1,10 -6)"),
+ from_wkt<ML>("MULTILINESTRING((6 6,-3 2),(-3 0,-3 -10,9 -2))"),
+ "mlldf06b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 -3,5 4,6 6,-3 2,-3 0,-3 -10,\
+ 9 -2,9 5,5 -5,-4 -8,9 0))"),
+ from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5,2 -3,-6 10,5 0,2 8,\
+ -6 1,10 -6)"),
+ from_wkt<ML>("MULTILINESTRING((0 -3,5 4,6 6,-3 2),\
+ (-3 0,-3 -10,9 -2,9 5,5 -5,-4 -8,9 0))"),
+ "mlldf06c"
+ );
+}
+
+
+
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multilinestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_difference_of_geometries<ML, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ "mlmldf01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0))"),
+ "mlmldf02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(5 0,10 0,20 1),\
+ (1 0,2 0),(5 0,7 0))"),
+ "mlmldf03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0))"),
+ "mlmldf04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0),(10 10,15 10),(20 10,30 20))"),
+ "mlmldf05"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((9 0,10 0,13 3),(15 5,20 10),\
+ (10 10,11 10),(12 10,15 10),(20 10,30 20))"),
+ "mlmldf06"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0),(-1 -1,0 0),(9 0,11 10),\
+ (12 10,13 3),(10 20,15 10),(20 10,25 10,30 15))"),
+ "mlmldf06a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "mlmldf07"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-1 1,0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0))"),
+ "mlmldf07a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "mlmldf07b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "mlmldf08"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0))"),
+ "mlmldf09"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,1.5 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(1.5 0,2 0.5,3 0))"),
+ "mlmldf10"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,100 1,101 0),\
+ (0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1,3 0,4 0,5 1,6 1,\
+ 7 0,8 0,9 1,10 1,11 0,12 0,13 1,14 1,15 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1),(2 1,5 1),(6 1,9 1),\
+ (10 1,13 1),(14 1,100 1,101 0),(0 0,1 0))"),
+ "mlmldf11"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf12"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf13"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf14"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf15"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf15a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf16"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmldf16a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "mlmldf17"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "mlmldf17a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "mlmldf18"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0))"),
+ "mlmldf18a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,0 0),(10 0,12 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ "mlmldf19"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 5, -4.3 -.1), (0 6, 8.6 6, 189.7654 5, 1 3, 6 3, 3 5, 6 2.232432, 0 4), (-6 5, 1 2.232432), (3 -1032.34324, 9 0, 189.7654 1, -1.4 3, 3 189.7654, +.3 10.0002, 1 5, 6 3, 5 1, 9 1, 10.0002 -1032.34324, -0.7654 0, 5 3, 3 4), (2.232432 2.232432, 8.6 +.4, 0.0 2.232432, 4 0, -8.8 10.0002), (1 0, 6 6, 7 2, -0 8.4), (-0.7654 3, +.6 8, 4 -1032.34324, 1 6, 0 4), (0 7, 2 1, 8 -7, 7 -.7, -1032.34324 9), (5 0, 10.0002 4, 8 7, 3 3, -8.1 5))"),
+ from_wkt<ML>("MULTILINESTRING((5 10.0002, 2 7, -0.7654 0, 5 3), (0 -0.7654, 4 10.0002, 4 +.1, -.8 3, -.1 8, 10.0002 2, +.9 -1032.34324))"),
+ from_wkt<ML>("MULTILINESTRING((1 5,-4.3 -0.1),(0 6,8.6 6,189.7654 5,1 3,6 3,3 5,6 2.232432,0 4),(-6 5,1 2.232432),(5 3,3 4),(3 -1032.34324,9 0,189.7654 1,-1.4 3,3 189.7654,0.3 10.0002,1 5,6 3,5 1,9 1,10.0002 -1032.34324,-0.7654 0),(2.232432 2.232432,8.6 0.4,0 2.232432,4 0,-8.8 10.0002),(1 0,6 6,7 2,-0 8.4),(-0.7654 3,0.6 8,4 -1032.34324,1 6,0 4),(0 7,2 1,8 -7,7 -0.7,-1032.34324 9),(5 0,10.0002 4,8 7,3 3,-8.1 5))"),
+ "mlmldf24",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((5 10.0002, 2 7, -0.7654 0, 5 3), (0 -0.7654, 4 10.0002, 4 +.1, -.8 3, -.1 8, 10.0002 2, +.9 -1032.34324))"),
+ from_wkt<ML>("MULTILINESTRING((1 5, -4.3 -.1), (0 6, 8.6 6, 189.7654 5, 1 3, 6 3, 3 5, 6 2.232432, 0 4), (-6 5, 1 2.232432), (3 -1032.34324, 9 0, 189.7654 1, -1.4 3, 3 189.7654, +.3 10.0002, 1 5, 6 3, 5 1, 9 1, 10.0002 -1032.34324, -0.7654 0, 5 3, 3 4), (2.232432 2.232432, 8.6 +.4, 0.0 2.232432, 4 0, -8.8 10.0002), (1 0, 6 6, 7 2, -0 8.4), (-0.7654 3, +.6 8, 4 -1032.34324, 1 6, 0 4), (0 7, 2 1, 8 -7, 7 -.7, -1032.34324 9), (5 0, 10.0002 4, 8 7, 3 3, -8.1 5))"),
+ from_wkt<ML>("MULTILINESTRING((5 10.0002,2 7,-0.7654 8.88178e-16),(0 -0.7654,4 10.0002,4 0.1,-0.8 3,-0.1 8,10.0002 2,0.9 -1032.34324))"),
+ "mlmldf24-r",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-.4 2, 2.232432 3, 6 9, 8 189.7654, -1032.34324 5.4, 2.232432 9), (-1032.34324 3, 8 -1.6), (0 -.2, 8 1, -.5 7, 6 +.2))"),
+ from_wkt<ML>("MULTILINESTRING((-8 1, 4.8 6, 2 +.5), (10.0002 2,9 -1032.34324, .3 8, 0 5, 8 1, 4 .4, 2 8), (6 7, +.1 7, 0 -.5))"),
+ from_wkt<ML>("MULTILINESTRING((-0.4 2,2.232432 3,6 9,8 189.7654,-1032.34324 5.4,2.232432 9),(-1032.34324 3,8 -1.6),(0 -0.2,4 0.4),(8 1,-0.5 7,6 0.2))"),
+ "mlmldf25",
+ 1e-10
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-8 1, 4.8 6, 2 +.5), (10.0002 2,9 -1032.34324, .3 8, 0 5, 8 1, 4 .4, 2 8), (6 7, +.1 7, 0 -.5))"),
+ from_wkt<ML>("MULTILINESTRING((-.4 2, 2.232432 3, 6 9, 8 189.7654, -1032.34324 5.4, 2.232432 9), (-1032.34324 3, 8 -1.6), (0 -.2, 8 1, -.5 7, 6 +.2))"),
+ from_wkt<ML>("MULTILINESTRING((-8 1,4.8 6,2 0.5),(10.0002 2,9 -1032.34324,0.3 8,0 5,8 1),(4 0.4,2 8),(6 7,0.1 7,0 -0.5))"),
+ "mlmldf25-r",
+ 1e-10
+ );
+
+ {
+ std::string wkt1 = "MULTILINESTRING((0 -18,17 -9,8.422018348623853 -6.477064220183486),(4.0893470790378 -5.202749140893471,0 -4,6.049382716049383 -7.4567901234567895),(9.21951219512195 -9.26829268292683,14 -12),(-7 3,-5.903614457831325 6.289156626506024),(-5.277777777777778 8.166666666666668,-5 9,-5.445859872611465 8.26751592356688),(-6.342710997442455 6.794117647058823,-19 -14,-6.2338779019776425 6.668959587274291),(-5.3004291845493565 8.180257510729614,-3.579710144927536 10.966183574879228),(-3.390625 11.272321428571429,2 20),(20 -19,14 -3,3.258064516129032 1.774193548387096),(-5.275590551181104 5.5669291338582685,-13 9,-8.678414096916299 9.480176211453745),(-7.65625 9.59375,-4 10),(-2 -4,-0.15873015873015883 -0.31746031746031766),(1.875 3.75,9 18,6 8,13 17),(12 -11,6 4))";
+
+ std::string wkt2 = "MULTILINESTRING((1 16,-16 18),(17 10,15 4),(0 -14,-7 3),(-16 3,-6.471885336273427 6.942668136714442),(-4.557823129251701 7.73469387755102,-2.220994475138122 8.701657458563536),(-1.7326203208556137 8.90374331550802,13 15,15 -16,11 -11),(-6 11,-4.285714285714287 7.571428571428573),(-0.5882352941176467 0.1764705882352935,4 -9,-4 -8,-4 4.1),(-4 7.4,-4 11.666666666666666),(-4 12.142857142857142,-4 19),(-17 -1,-3.5989717223650377 3.638817480719794),(0.8699690402476783 5.185758513931889,9 8),(18 10,2.814814814814815 2.4074074074074057),(-0.9090909090909101 0.545454545454545,-4 -1,-3 -16,1.272141706924316 -1.9629629629629637),(2.666666666666667 2.6190476190476204,4 7),(-1 18,11 -6))";
+
+ std::string wkt_out = "MULTILINESTRING((0 -18,17 -9,8.4220183486238529 -6.47706422018348604),(4.08934707903780037 -5.20274914089347096,0 -4,6.04938271604938294 -7.45679012345678949),(9.21951219512195053 -9.26829268292683039,14 -12),(-7 3,-5.90361445783132499 6.28915662650602414),(-5.27777777777777768 8.16666666666666785,-5 9,-5.44585987261146531 8.26751592356687937),(-6.34271099744245515 6.79411764705882337,-19 -14,-6.23387790197764247 6.66895958727429061),(-5.30042918454935652 8.18025751072961427,-3.57971014492753614 10.9661835748792278),(-3.390625 11.2723214285714288,2 20),(20 -19,14 -3,3.25806451612903203 1.77419354838709609),(-5.27559055118110365 5.56692913385826849,-13 9,-8.67841409691629906 9.48017621145374534),(-7.65625 9.59375,-4 10),(-2 -4,-0.158730158730158832 -0.317460317460317665),(1.875 3.75,9 18,6 8,13 17),(12 -11,6 4))";
+
+ ML mls1, mls2, mls_out;
+ bg::read_wkt(wkt1, mls1);
+ bg::read_wkt(wkt2, mls2);
+ bg::read_wkt(wkt_out, mls_out);
+
+ tester::apply(mls1, mls2, mls_out, "mlmldf26", 1e-10);
+ }
+ {
+ std::string wkt1 = "MULTILINESTRING((12 -11,6 4))";
+ std::string wkt2 = "MULTILINESTRING((18 10,2.814814814814815 2.4074074074074057),(-1 18,11 -6))";
+
+ std::string wkt_out = "MULTILINESTRING((12 -11,6 4))";
+
+ ML mls1, mls2, mls_out;
+ bg::read_wkt(wkt1, mls1);
+ bg::read_wkt(wkt2, mls2);
+ bg::read_wkt(wkt_out, mls_out);
+
+ tester::apply(mls1, mls2, mls_out, "mlmldf27");
+ }
+}
+
+
+
+
+
+
+#ifndef BOOST_GEOMETRY_TEST_NO_DEGENERATE
+BOOST_AUTO_TEST_CASE( test_difference_ml_ml_degenerate )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING DIFFERENCE"
+ << " (DEGENERATE) ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_difference_of_geometries<ML, ML, ML> tester;
+
+ // the following test cases concern linestrings with duplicate
+ // points and possibly linestrings with zero length.
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((5 5,5 5),(0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0),(2 0,2 0),(4 10,4 10))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 10),\
+ (4 0,4 10),(5 5,5 5))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(20 0,30 0))"),
+ "mlmldf20a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((5 5,5 5),(0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0),(2 0,2 0),(4 10,4 10))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 10,4 10),(5 5,5 5))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(20 0,30 0))"),
+ "mlmldf20aa"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((10 10,10 10),(0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0),(2 0,2 0),(4 10,4 10))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 10,4 10),(5 5,5 5))"),
+ from_wkt<ML>("MULTILINESTRING((10 10,10 10),(0 0,5 0),(20 0,30 0))"),
+ "mlmldf20aaa"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((10 10),(0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0),(2 0,2 0),(4 10,4 10))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 10,4 10),(5 5,5 5))"),
+ from_wkt<ML>("MULTILINESTRING((10 10,10 10),(0 0,5 0),(20 0,30 0))"),
+ "mlmldf20aaaa"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,0 0),(1 1,1 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,1 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 0))"),
+ "mlmldf21"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,0 0),(2 2,2 2),(1 1,1 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,1 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 0),(2 2,2 2))"),
+ "mlmldf22"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,0 0),(1 1,1 1),(2 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,1 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 0),(2 2,2 2))"),
+ "mlmldf23"
+ );
+}
+#endif // BOOST_GEOMETRY_TEST_NO_DEGENERATE
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_difference_ml_ml_spikes )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING DIFFERENCE"
+ << " (WITH SPIKES) ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_difference_of_geometries<ML, ML, ML> tester;
+
+ // the following test cases concern linestrings with spikes
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ "mlmldf-spikes-01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((9 0,1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ "mlmldf-spikes-02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0,2 0,8 0,3 0,7 0,4 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ "mlmldf-spikes-03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,3 0,2 0,4 0,3 0,5 0,4 0,6 0,\
+ 5 0,7 0,6 0,8 0,7 0,9 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ "mlmldf-spikes-04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0),\
+ (9 1,9 0,9 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(6 0,7 0),(8 0,10 0))"),
+ "mlmldf-spikes-05"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0),\
+ (9 0,9 2,9 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(6 0,7 0),(8 0,10 0))"),
+ "mlmldf-spikes-05a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(9 0,6 0,8 0),\
+ (11 0,8 0,12 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0))"),
+ "mlmldf-spikes-06"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,0 0,-2 0),(11 0,10 0,12 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ "mlmldf-spikes-07"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,-2 -2),(11 1,10 0,12 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ "mlmldf-spikes-07a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(11 0,10 0,12 0),\
+ (7 5,7 0,8 0,6.5 0,8.5 0,8.5 5))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(6 0,6.5 0),(8.5 0,10 0))"),
+ "mlmldf-spikes-08"
+ );
+
+ // now the first geometry has a spike
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(8 0,10 0))"),
+ "mlmldf-spikes-09"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,7 0,4 0,9 0))"),
+ "mlmldf-spikes-09a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(9 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,7 0,5 0),(5 0,9 0))"),
+ "mlmldf-spikes-09b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(6 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,6 0),(6 0,5 0),(5 0,6 0))"),
+ "mlmldf-spikes-09c"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(8 0,10 0,8 0))"),
+ "mlmldf-spikes-10"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0,4 0),(2 0,9 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0,9 0))"),
+ "mlmldf-spikes-11"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((11 1,10 0,12 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ "mlmldf-spikes-12"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((11 -1,10 0,12 -2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ "mlmldf-spikes-12a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((11 0,10 0,12 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ "mlmldf-spikes-13"
+ );
+
+ // the following three tests have been discussed with Adam
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 2,1 1,1 2))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ "mlmldf-spikes-14"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,1 0,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,0 0))"),
+ "mlmldf-spikes-15"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,1 1,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ "mlmldf-spikes-16"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1))"),
+ "mlmldf-spikes-17"
+ );
+
+ // test cases sent by Adam on the mailing list (equal slikes)
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "mlmldf-spikes-18"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,0 0,1 1))"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "mlmldf-spikes-19"
+ );
+}
+
+BOOST_AUTO_TEST_CASE( test_difference_ls_mls_geo_rad )
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::radian> > pt;
+ typedef bg::model::linestring<pt> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ bg::srs::spheroid<double> sph_wgs84(6378137.0, 6356752.3142451793);
+ boost::geometry::strategy::intersection::geographic_segments<> wgs84(sph_wgs84);
+
+ ls g1 = from_wkt<ls>("LINESTRING(0 0, -3.14159265358979 0)");
+ mls g2 = from_wkt<mls>("MULTILINESTRING((-2.1467549799530232 -0.12217304763960295,"
+ "-2.5481807079117185 -0.90757121103705041,"
+ "-2.6529004630313784 0.85521133347722067,"
+ " 0.92502450355699373 0.62831853071795796,"
+ "-2.5307274153917754 0,"
+ " 2.8099800957108676 1.0646508437165401,"
+ "-1.6057029118347816 -1.5009831567151219,"
+ " 0.2268928027592626 1.0646508437165401,"
+ "-2.199114857512853 -0.017453292519943278,"
+ " 0 0.31415926535897898,"
+ " 0 0.57595865315812822,"
+ " 1.0471975511965967 -0.73303828583761765,"
+ " 2.1118483949131366 -0.54105206811824158))");
+ mls out;
+ bg::difference(g1, g2, out, wgs84);
+
+ check_result(g1, g2, out,
+ from_wkt<mls>("MULTILINESTRING((0 0,0 0.31415926535897897853),"
+ "(0 0.57595865315812821983,-3.1415926535897900074 0))"),
+ "geo_lmldf-1");
+} \ No newline at end of file
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi.cpp
new file mode 100644
index 000000000..374e5d450
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi.cpp
@@ -0,0 +1,531 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include "test_difference.hpp"
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+// Convenience macros (points are not checked)
+#define TEST_DIFFERENCE(caseid, clips1, area1, clips2, area2, clips3) \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
+ clips3, -1, area1 + area2)
+
+#define TEST_DIFFERENCE_IGNORE(caseid, clips1, area1, clips2, area2, clips3) \
+ { ut_settings ignore_validity; ignore_validity.test_validity = false; \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
+ clips3, -1, area1 + area2, ignore_validity); }
+
+#define TEST_DIFFERENCE_WITH(index1, index2, caseid, clips1, area1, \
+ clips2, area2, clips3) \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid "_" #index1 "_" #index2, caseid[index1], caseid[index2], \
+ clips1, -1, area1, \
+ clips2, -1, area2, \
+ clips3, -1, area1 + area2, settings)
+
+
+template <typename Ring, typename Polygon, typename MultiPolygon>
+void test_areal()
+{
+ test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
+ case_multi_simplex[0], case_multi_simplex[1],
+ 5, 21, 5.58, 4, 17, 2.58);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_no_ip",
+ case_multi_no_ip[0], case_multi_no_ip[1],
+ 2, 12, 24.0, 2, 12, 34.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_2",
+ case_multi_2[0], case_multi_2[1],
+ 2, 15, 19.6, 2, 13, 33.6);
+
+ test_one<Polygon, MultiPolygon, Polygon>("simplex_multi_mp_p",
+ case_multi_simplex[0], case_single_simplex,
+ 5, 21, 5.58, 4, 17, 2.58);
+ test_one<Polygon, Ring, MultiPolygon>("simplex_multi_r_mp",
+ case_single_simplex, case_multi_simplex[0],
+ 4, 17, 2.58, 5, 21, 5.58);
+ test_one<Polygon, MultiPolygon, Ring>("simplex_multi_mp_r",
+ case_multi_simplex[0], case_single_simplex,
+ 5, 21, 5.58, 4, 17, 2.58);
+
+ // Constructed cases for multi/touch/equal/etc
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_61_multi",
+ case_61_multi[0], case_61_multi[1],
+ 2, 10, 2, 2, 10, 2, 1, 10, 4);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_62_multi",
+ case_62_multi[0], case_62_multi[1],
+ 0, 0, 0, 1, 5, 1);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_63_multi",
+ case_63_multi[0], case_63_multi[1],
+ 0, 0, 0, 1, 5, 1);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_64_multi",
+ case_64_multi[0], case_64_multi[1],
+ 1, 5, 1, 1, 5, 1, 1, 7, 2);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi",
+ case_65_multi[0], case_65_multi[1],
+ 0, 0, 0, 2, 10, 3);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_72_multi",
+ case_72_multi[0], case_72_multi[1],
+ 3, 13, 1.65, 3, 17, 6.15);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_77_multi",
+ case_77_multi[0], case_77_multi[1],
+ 6, 31, 7.0,
+ 5, 33, 13.0,
+ 5, 38, 7.0 + 13.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_78_multi",
+ case_78_multi[0], case_78_multi[1],
+ 1, 5, 1.0, 1, 5, 1.0);
+
+ TEST_DIFFERENCE(case_123_multi, 1, 0.25, 2, 0.625, 3);
+ TEST_DIFFERENCE(case_124_multi, 1, 0.25, 2, 0.4375, 3);
+ TEST_DIFFERENCE(case_125_multi, 1, 0.25, 2, 0.400, 3);
+
+ // A should have 3 clips, B should have 5 clips
+ TEST_DIFFERENCE(case_126_multi, 4, 16.0, 5, 27.0, 9);
+
+ {
+ ut_settings settings;
+
+ settings.sym_difference = BG_IF_RESCALED(false, true);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_108_multi",
+ case_108_multi[0], case_108_multi[1],
+ 7, 32, 5.5,
+ 4, 24, 9.75,
+ 7, 45, 15.25,
+ settings);
+ }
+
+ // Ticket on GGL list 2011/10/25
+ // to mix polygon/multipolygon in call to difference
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20111025_vd_pp",
+ ggl_list_20111025_vd[0], ggl_list_20111025_vd[1],
+ 1, 4, 8.0, 1, 4, 12.5);
+ test_one<Polygon, Polygon, MultiPolygon>("ggl_list_20111025_vd_pm",
+ ggl_list_20111025_vd[0], ggl_list_20111025_vd[3],
+ 1, 4, 8.0, 1, 4, 12.5);
+ test_one<Polygon, MultiPolygon, Polygon>("ggl_list_20111025_vd_mp",
+ ggl_list_20111025_vd[2], ggl_list_20111025_vd[1],
+ 1, 4, 8.0, 1, 4, 12.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20111025_vd_mm",
+ ggl_list_20111025_vd[2], ggl_list_20111025_vd[3],
+ 1, 4, 8.0, 1, 4, 12.5);
+
+ test_one<Polygon, Polygon, MultiPolygon>("ggl_list_20111025_vd_2",
+ ggl_list_20111025_vd_2[0], ggl_list_20111025_vd_2[1],
+ 1, 7, 10.0, 2, 10, 6.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
+ 2, 13, 17.0, 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
+ 2, 13, 17.0, 0, 0, 0.0);
+
+ {
+ ut_settings settings;
+ settings.percentage = 0.001;
+ settings.test_validity = BG_IF_RESCALED(true, false);
+ TEST_DIFFERENCE_WITH(0, 1, ggl_list_20120221_volker, 2, 7962.66, 2, 2775258.93, 4);
+ }
+
+ {
+ // With rescaling, A is invalid (this is a robustness problem) and the other
+ // output is discarded because of zero area
+ // POSTGIS areas: 3.75893745345145, 2.5810000723917e-15
+ ut_settings settings;
+ settings.sym_difference = BG_IF_RESCALED(false, true);
+ settings.test_validity = BG_IF_RESCALED(false, true);
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+ // No output for B
+ TEST_DIFFERENCE_WITH(0, 1, bug_21155501, 1, 3.758937, 0, 0.0, 1);
+#else
+ // Very small sliver for B, and sym difference is not considered valid
+ settings.test_validity = false;
+ TEST_DIFFERENCE_WITH(0, 1, bug_21155501, 1, 3.758937, 1, 1.7763568394002505e-15, 2);
+#endif
+ }
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ {
+ // With rescaling, it is complete but invalid
+ ut_settings settings;
+ settings.percentage = 0.001;
+ settings.test_validity = BG_IF_RESCALED(false, true);
+ TEST_DIFFERENCE_WITH(0, 1, ticket_9081,
+ 2, 0.0907392476356186,
+ 4, 0.126018011439877,
+ BG_IF_RESCALED(4, 3));
+ }
+#endif
+
+ TEST_DIFFERENCE(ticket_12503, 46, 920.625, 4, 7.625, 50);
+
+ {
+ // Reported issues going wrong with rescaling (except for 630b)
+ ut_settings settings;
+ settings.percentage = 0.001;
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE_WITH(0, 1, issue_630_a, 0, 0.0, 1, BG_IF_KRAMER(2.023326, 2.200326), 1);
+#endif
+ TEST_DIFFERENCE_WITH(0, 1, issue_630_b, 1, 0.0056089, 2, 1.498976, 3);
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+
+#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Only succeeds with Kramer rule and no rescaling
+ TEST_DIFFERENCE_WITH(0, 1, issue_630_c, 0, 0, 1, 1.493367, 1);
+#endif
+
+ TEST_DIFFERENCE_WITH(0, 1, issue_643, 1, 76.5385, BG_IF_KRAMER(1, 0), BG_IF_KRAMER(2.8634e-09, 0.0), 1);
+#endif
+ }
+
+ // Areas and #clips correspond with POSTGIS (except sym case)
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",
+ case_101_multi[0], case_101_multi[1],
+ 5, 23, 4.75,
+ 5, 40, 12.75,
+ 5, 48, 4.75 + 12.75);
+
+ // Areas and #clips correspond with POSTGIS
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_102_multi",
+ case_102_multi[0], case_102_multi[1],
+ 2, 8, 0.75,
+ 6, 25, 3.75,
+ 6, 27, 0.75 + 3.75);
+
+ // Areas and #clips correspond with POSTGIS
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi",
+ case_107_multi[0], case_107_multi[1],
+ 2, 11, 2.25,
+ 3, 14, 3.0,
+ 4, 21, 5.25);
+
+ TEST_DIFFERENCE(case_133_multi, 3, 16.0, 2, 8.0, 5);
+ TEST_DIFFERENCE(case_134_multi, 3, 16.0, 2, 8.0, 5);
+ TEST_DIFFERENCE(case_135_multi, 2, 2.0, 2, 13.0, 2);
+ TEST_DIFFERENCE(case_136_multi, 2, 2.0, 3, 13.5, 3);
+ TEST_DIFFERENCE(case_137_multi, 2, 2.5, 2, 13.0, 2);
+ TEST_DIFFERENCE(case_138_multi, 5, 16.6, 3, 8.225, 8);
+ TEST_DIFFERENCE(case_139_multi, 4, 16.328125, 3, 8.078125, 7);
+ TEST_DIFFERENCE(case_140_multi, 4, 16.328125, 3, 8.078125, 7);
+ TEST_DIFFERENCE(case_141_multi, 5, 15.5, 5, 10.0, 10);
+
+ // Areas correspond with POSTGIS,
+ // #clips in PostGIS is 11,11,5 but should most probably be be 12,12,6
+ TEST_DIFFERENCE(case_recursive_boxes_1, 12, 26.0, 12, 24.0, 6);
+
+ // Areas and #clips correspond with POSTGIS
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_2",
+ case_recursive_boxes_2[0], case_recursive_boxes_2[1],
+ 3, 15, 3.0,
+ 7, 33, 7.0,
+ 10, 48, 10.0);
+
+ // Areas and #clips by POSTGIS (except sym case)
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
+ case_recursive_boxes_3[0], case_recursive_boxes_3[1],
+ 24, -1, 21.5,
+ 25, -1, 22.5,
+ 37, -1, 44.0);
+
+ // 4, input is not valid
+
+ TEST_DIFFERENCE(case_recursive_boxes_5, 16, 22.0, 12, 27.0, 10);
+ TEST_DIFFERENCE(case_recursive_boxes_6, 7, 3.5, 3, 1.5, 9);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_7",
+ case_recursive_boxes_7[0], case_recursive_boxes_7[1],
+ 3, 15, 2.75,
+ 4, 19, 2.75,
+ 3, 22, 5.5);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_8",
+ case_recursive_boxes_8[0], case_recursive_boxes_8[1],
+ 2, -1, 2.50,
+ 4, -1, 5.75,
+ 4, -1, 8.25);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_9",
+ case_recursive_boxes_9[0], case_recursive_boxes_9[1],
+ 3, -1, 1.5,
+ 4, -1, 2.5,
+ 6, -1, 4.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_10",
+ case_recursive_boxes_10[0], case_recursive_boxes_10[1],
+ 2, -1, 1.25,
+ 2, -1, 0.75,
+ 4, -1, 2.00);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_11",
+ case_recursive_boxes_11[0], case_recursive_boxes_11[1],
+ 3, -1, 2.5,
+ 3, -1, 4.5,
+ 3, -1, 7.0);
+
+ TEST_DIFFERENCE(case_recursive_boxes_12, 4, 2.75, 3, 2.75, 6);
+ TEST_DIFFERENCE(case_recursive_boxes_13, 4, 4.75, 3, 5.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_14, 3, 2.0, 4, 2.5, 5);
+ TEST_DIFFERENCE(case_recursive_boxes_15, 3, 3.0, 2, 2.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_16, 8, 6.5, 3, 5.5, 9);
+ TEST_DIFFERENCE(case_recursive_boxes_17, 10, 7.75, 7, 5.5, 13);
+ TEST_DIFFERENCE(case_recursive_boxes_18, 2, 1.0, 1, 1.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_19, 2, 1.0, 2, 1.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_20, 2, 1.0, 0, 0.0, 2);
+
+ TEST_DIFFERENCE(case_recursive_boxes_21, 2, 1.0, 1, 1.0, 1);
+ TEST_DIFFERENCE(case_recursive_boxes_22, 2, 1.25, 2, 2.0, 2);
+ TEST_DIFFERENCE(case_recursive_boxes_23, 2, 0.75, 1, 0.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_24, 3, 2.5, 2, 2.0, 5);
+ TEST_DIFFERENCE(case_recursive_boxes_25, 2, 2.5, 3, 2.5, 2);
+ TEST_DIFFERENCE(case_recursive_boxes_26, 2, 1.5, 3, 2.0, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_27, 1, 1.5, 3, 2.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_28, 3, 2.5, 2, 3.0, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_29, 5, 7.25, 5, 4.5, 5);
+ TEST_DIFFERENCE(case_recursive_boxes_30, 6, 4.25, 3, 7.25, 7);
+
+ TEST_DIFFERENCE(case_recursive_boxes_31, 2, 2.0, 1, 0.5, 2);
+ TEST_DIFFERENCE(case_recursive_boxes_32, 2, 2.75, 2, 1.25, 2);
+ TEST_DIFFERENCE(case_recursive_boxes_33, 4, 3.0, 3, 6.0, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_34, 7, 7.25, 1, 0.5, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_35, 5, 1.75, 5, 2.75, 10);
+ TEST_DIFFERENCE(case_recursive_boxes_36, 2, 1.0, 2, 1.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_37, 3, 2.5, 2, 4.25, 2);
+ TEST_DIFFERENCE(case_recursive_boxes_38, 5, 7.75, 4, 3.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_39, 3, 6.0, 3, 3.0, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_40, 11, 14.0, 9, 13.0, 11);
+
+ TEST_DIFFERENCE(case_recursive_boxes_41, 1, 0.5, 1, 0.5, 2);
+ TEST_DIFFERENCE(case_recursive_boxes_42, 1, 1.0, 4, 4.0, 5);
+ TEST_DIFFERENCE(case_recursive_boxes_43, 1, 0.5, 3, 2.0, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_44, 3, 5.0, 0, 0.0, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_45, 6, 20.0, 7, 20.0, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_46, 4, 14.0, 5, 12.0, 5);
+ TEST_DIFFERENCE(case_recursive_boxes_47, 4, 10.0, 7, 11.0, 1);
+ TEST_DIFFERENCE(case_recursive_boxes_48, 0, 0.0, 1, 9.0, 1);
+ TEST_DIFFERENCE(case_recursive_boxes_49, 10, 22.0, 10, 17.0, 11);
+ TEST_DIFFERENCE(case_recursive_boxes_50, 14, 21.0, 16, 21.0, 14);
+ TEST_DIFFERENCE(case_recursive_boxes_51, 14, 25.0, 12, 31.0, 7);
+ TEST_DIFFERENCE(case_recursive_boxes_52, 13, 30.0, 15, 25.0, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_53, 6, 3.5, 4, 1.5, 9);
+ TEST_DIFFERENCE(case_recursive_boxes_54, 6, 6.5, 8, 6.0, 7);
+ TEST_DIFFERENCE(case_recursive_boxes_55, 4, 5.5, 6, 7.75, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_56, 4, 4.5, 5, 2.75, 6);
+ TEST_DIFFERENCE(case_recursive_boxes_57, 5, 3.75, 9, 6.5, 10);
+ TEST_DIFFERENCE(case_recursive_boxes_58, 4, 2.25, 6, 3.75, 7);
+ TEST_DIFFERENCE(case_recursive_boxes_59, 8, 6.5, 7, 7.0, 12);
+ TEST_DIFFERENCE(case_recursive_boxes_60, 6, 5.25, 7, 5.25, 11);
+ TEST_DIFFERENCE(case_recursive_boxes_61, 2, 1.5, 6, 2.0, 7);
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Misses one triangle, should be fixed in traversal.
+ // It is not related to rescaling.
+ TEST_DIFFERENCE(case_recursive_boxes_62, 5, 5.0, 11, 5.75, 12);
+#endif
+
+ TEST_DIFFERENCE(case_recursive_boxes_63, 9, 10.5, 5, 27.75, 4);
+ TEST_DIFFERENCE(case_recursive_boxes_64, 6, 2.75, 7, 4.5, 11);
+ TEST_DIFFERENCE(case_recursive_boxes_65, 6, 4.25, 7, 3.0, 13);
+ TEST_DIFFERENCE(case_recursive_boxes_66, 5, 4.75, 7, 4.0, 9);
+ TEST_DIFFERENCE(case_recursive_boxes_67, 7, 6.25, 9, 6.0, 10);
+ TEST_DIFFERENCE(case_recursive_boxes_68, 10, 6.5, 9, 6.5, 7);
+ TEST_DIFFERENCE(case_recursive_boxes_69, 5, 6.25, 5, 6.75, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_70, 5, 2.0, 8, 4.5, 11);
+ TEST_DIFFERENCE(case_recursive_boxes_71, 7, 8.25, 7, 5.75, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_72, 6, 6.5, 7, 4.0, 10);
+ TEST_DIFFERENCE(case_recursive_boxes_73, 4, 1.75, 5, 4.0, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_74, 3, 3.00, 3, 1.5, 5);
+ TEST_DIFFERENCE(case_recursive_boxes_75, 7, 4.5, 4, 2.0, 11);
+ TEST_DIFFERENCE(case_recursive_boxes_76, 7, 3.75, 4, 2.5, 9);
+ TEST_DIFFERENCE(case_recursive_boxes_77, 4, 3.75, 7, 6.25, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_78, 11, 5.5, 8, 4.5, 14);
+ TEST_DIFFERENCE(case_recursive_boxes_79, 2, 1.25, 6, 4.5, 8);
+
+ // one polygon is divided into two, for same reason as union creates a small
+ // interior ring there
+ TEST_DIFFERENCE(case_recursive_boxes_80, 1, 0.5, 2, 0.75, BG_IF_RESCALED(3, 2));
+
+ TEST_DIFFERENCE(case_recursive_boxes_81, 3, 5.0, 6, 6.75, 6);
+ TEST_DIFFERENCE(case_recursive_boxes_82, 5, 7.25, 7, 4.5, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_83, 9, 5.25, 8, 5.25, 12);
+ TEST_DIFFERENCE(case_recursive_boxes_84, 4, 8.0, 7, 9.0, 4);
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_DIFFERENCE(case_recursive_boxes_85, 4, 4.0, 7, 3.75, 9);
+#endif
+
+ TEST_DIFFERENCE(case_recursive_boxes_86, 1, 1.5, 2, 1.5, 3);
+ TEST_DIFFERENCE(case_recursive_boxes_87, 4, 2.0, 4, 2.5, 8);
+ TEST_DIFFERENCE(case_recursive_boxes_88, 3, 4.75, 5, 6.75, 4);
+
+ // Output of A can be 0 or 1 polygons (with a very small area)
+ TEST_DIFFERENCE(case_precision_m1, -1, 0.0, 1, 57.0, -1);
+ // Output of A can be 1 or 2 polygons (one with a very small area)
+ TEST_DIFFERENCE(case_precision_m2, -1, 1.0, 1, 57.75, -1);
+
+ {
+ ut_settings sym_settings;
+ #if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ sym_settings.sym_difference = false;
+ #endif
+ test_one<Polygon, MultiPolygon, MultiPolygon>("mysql_21965285_b",
+ mysql_21965285_b[0],
+ mysql_21965285_b[1],
+ 2, -1, 183.71376870369406,
+ 2, -1, 131.21376870369406,
+ sym_settings);
+ }
+
+ TEST_DIFFERENCE(mysql_regression_1_65_2017_08_31,
+ BG_IF_RESCALED(1, 0), BG_IF_RESCALED(4.30697514e-7, 0),
+ 3, 152.0642, BG_IF_RESCALED(4, 3));
+}
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ test_areal<ring, polygon, multi_polygon>();
+}
+
+
+// Test cases for integer coordinates / ccw / open
+template <typename Polygon, typename MultiPolygon>
+void test_specific_areal()
+{
+ {
+ // Spikes in a-b and b-a, failure in symmetric difference
+ ut_settings settings;
+ settings.sym_difference = false;
+ settings.test_validity = false;
+
+ TEST_DIFFERENCE_WITH(0, 1, ticket_11674,
+ BG_IF_KRAMER(3, 4),
+ BG_IF_KRAMER(9105781.5, 9105473.5),
+ 5,
+ BG_IF_KRAMER(119059.5, 119423), -1);
+ }
+
+ {
+ // Ticket 12751 (Volker)
+ // Spikes in a-b and b-a, failure in symmetric difference
+
+ ut_settings settings;
+ settings.remove_spikes = true;
+
+ TEST_DIFFERENCE_WITH(0, 1, ticket_12751, 1,
+ BG_IF_KRAMER(2781965.0, 2782114), 1,
+ BG_IF_KRAMER(597.0, 598.0), 2);
+
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER)
+ // Fails with general line form intersection, symmetric version misses one outcut
+ // TODO GENERAL FORM
+ settings.test_validity = false;
+ settings.sym_difference = false;
+#endif
+
+ TEST_DIFFERENCE_WITH(2, 3, ticket_12751,
+ 2, BG_IF_KRAMER(2537992.5, 2538305),
+ 2, BG_IF_KRAMER(294963.5, 294737),
+ 3);
+ }
+
+ {
+ // Ticket 12752 (Volker)
+ // Spikes in a-b and b-a, failure in symmetric difference
+ ut_settings settings;
+ settings.remove_spikes = true;
+ settings.sym_difference = false;
+ TEST_DIFFERENCE_WITH(0, 1, ticket_12752,
+ BG_IF_KRAMER(3, 2), BG_IF_KRAMER(2776692.0, 2776657),
+ 3, BG_IF_KRAMER(7893.0, 7710.5),
+ 2);
+ }
+
+ {
+#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Fails completely with general line form intersection
+ // There is something with scale.
+ // TODO GENERAL FORM
+ const std::string a_min_b =
+ TEST_DIFFERENCE(ticket_10661, 2, 1441632.5, 2, 13167454, 4);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_10661_2",
+ a_min_b, ticket_10661[2],
+ 1, 8, 825192.0,
+ 1, 10, BG_IF_KRAMER(27226370.5, 27842811),
+ 1, -1, 825192.0 + 27226370.5);
+#endif
+ }
+
+ {
+ ut_settings settings;
+ settings.sym_difference = false;
+
+#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Fails with general line form intersection
+ // Misses one clip
+ // TODO GENERAL FORM
+ TEST_DIFFERENCE_WITH(0, 1, ticket_9942, 4, 7427727.5, 4,
+ BG_IF_KRAMER(131506, 130083.5), 4);
+#endif
+ TEST_DIFFERENCE_WITH(0, 1, ticket_9942a, 2,
+ BG_IF_KRAMER(412676.5, 413183.5), 2,
+ BG_IF_KRAMER(76779.5, 76924), 4);
+ }
+}
+
+template <typename Point, bool ClockWise, bool Closed>
+void test_specific()
+{
+ typedef bg::model::polygon<Point, ClockWise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ test_specific_areal<polygon, multi_polygon>();
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+ test_all<bg::model::d2::point_xy<default_test_type> >();
+
+ test_specific<bg::model::d2::point_xy<int>, false, false>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<float> >();
+
+#if defined(HAVE_TTMATH)
+ std::cout << "Testing TTMATH" << std::endl;
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp
new file mode 100644
index 000000000..2a15e555c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp
@@ -0,0 +1,83 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+//#define HAVE_TTMATH
+//#define BOOST_GEOMETRY_DEBUG_ASSEMBLE
+//#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
+
+//#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+//#define BOOST_GEOMETRY_DEBUG_FOLLOW
+//#define BOOST_GEOMETRY_DEBUG_TRAVERSE
+
+
+#include "test_difference.hpp"
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+template <typename MultiPolygon, typename MultiLineString>
+void test_areal_linear()
+{
+ typedef typename boost::range_value<MultiPolygon>::type polygon;
+ typedef typename boost::range_value<MultiLineString>::type linestring;
+ typedef typename bg::point_type<polygon>::type point;
+ typedef bg::model::ring<point> ring;
+
+ test_one_lp<linestring, linestring, MultiPolygon>("case_mp_ls_1", "LINESTRING(2 0,2 5)", case_multi_simplex[0], 2, 4, 1.30);
+ test_one_lp<linestring, MultiLineString, polygon>("case_p_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_single_simplex, 3, 6, 2.5);
+ test_one_lp<linestring, MultiLineString, MultiPolygon>("case_mp_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_multi_simplex[0], 5, 10, 3.1666667);
+ test_one_lp<linestring, MultiLineString, ring>("case_r_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_single_simplex, 3, 6, 2.5);
+
+ // Collinear cases, with multiple turn points at the same location
+ test_one_lp<linestring, linestring, MultiPolygon>("case_mp_ls_2a", "LINESTRING(1 0,1 1,2 1,2 0)", "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)),((1 1,1 2,2 2,2 1,1 1)))", 1, 2, 1.0);
+ test_one_lp<linestring, linestring, MultiPolygon>("case_mp_ls_2b", "LINESTRING(1 0,1 1,2 1,2 0)", "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((0 0,0 1,1 1,1 0,0 0)))", 1, 2, 1.0);
+
+ test_one_lp<linestring, linestring, MultiPolygon>("case_mp_ls_3",
+ "LINESTRING(6 6,6 7,7 7,7 6,8 6,8 7,9 7,9 6)",
+ "MULTIPOLYGON(((5 7,5 8,6 8,6 7,5 7)),((6 6,6 7,7 7,7 6,6 6)),((8 8,9 8,9 7,8 7,7 7,7 8,8 8)))", 2, 5, 3.0);
+
+ return;
+
+ // TODO: this case contains collinearities and should still be solved
+ test_one_lp<linestring, linestring, MultiPolygon>("case_mp_ls_4",
+ "LINESTRING(0 5,0 6,1 6,1 5,2 5,2 6,3 6,3 5,3 4,3 3,2 3,2 4,1 4,1 3,0 3,0 4)",
+ "MULTIPOLYGON(((0 2,0 3,1 2,0 2)),((2 5,3 6,3 5,2 5)),((1 5,1 6,2 6,2 5,1 5)),((2 3,2 4,3 4,2 3)),((0 3,1 4,1 3,0 3)),((4 3,3 3,3 5,4 5,4 4,4 3)))", 5, 11, 6.0);
+}
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ typedef bg::model::multi_linestring<linestring> multi_linestring;
+ test_areal_linear<multi_polygon, multi_linestring>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<float> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_spike.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_spike.cpp
new file mode 100644
index 000000000..8e173b74a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_multi_spike.cpp
@@ -0,0 +1,121 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2013-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include "test_difference.hpp"
+
+
+template <typename P, bool ClockWise, bool Closed>
+void test_spikes_in_ticket_8364()
+{
+ ut_settings ignore_validity;
+ ignore_validity.test_validity = false;
+
+ // See: https://svn.boost.org/trac/boost/ticket/8364
+ //_TPolygon<T> polygon( "MULTIPOLYGON(((1031 1056,3232 1056,3232 2856,1031 2856)))" );
+ //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 1458,1032 1212,2136 2328,3234 2220,3234 2412,2136 2646)))" );
+ //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 1764,1032 1458,2136 2646,3234 2412,3234 2532,2136 2790)))" );
+ // RESULTS OF ABOVE IS USED IN STEP 3 BELOW
+ //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 2130,1032 1764,2052 2712)),((3234 2580,2558 2690,3234 2532)),((2558 2690,2136 2790,2052 2712,2136 2760)))" ); USED IN STEP 3
+ //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 2556,1032 2130,1778 2556)),((3234 2580,2136 2760,1778 2556,3234 2556)))" ); USED IN STEP 4
+ // NOTE: polygons below are closed and clockwise
+
+ typedef typename bg::coordinate_type<P>::type ct;
+ typedef bg::model::polygon<P, ClockWise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ // The difference of polygons below result in a spike. The spike should be there, it is also generated in ttmath,
+ // and (e.g.) in SQL Server. However, using int-coordinates, the spike makes the polygon invalid. Therefore it is now (since August 2013) checked and removed.
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ // TODO: commented working at ii/validity, this changes the area slightly, to be checked
+ // So using int's, the spike is removed automatically. Therefore there is one polygon less, and less points. Also area differs
+ test_one<polygon, multi_polygon, multi_polygon>("ticket_8364_step3",
+ "MULTIPOLYGON(((3232 2532,2136 2790,1032 1764,1032 1458,1032 1212,2136 2328,3232 2220,3232 1056,1031 1056,1031 2856,3232 2856,3232 2532)))",
+ "MULTIPOLYGON(((1032 2130,2052 2712,1032 1764,1032 2130)),((3234 2580,3234 2532,2558 2690,3234 2580)),((2558 2690,2136 2760,2052 2712,2136 2790,2558 2690)))",
+ 2,
+ if_typed<ct, int>(19, 22),
+ if_typed<ct, int>(2775595.5, 2775256.487954), // SQL Server: 2775256.47588724
+ 3,
+ -1, // don't check point-count
+ if_typed<ct, int>(7893.0, 7810.487954), // SQL Server: 7810.48711165739
+ if_typed<ct, int>(1, 5),
+ -1,
+ if_typed<ct, int>(2783349.5, 2775256.487954 + 7810.487954),
+ ignore_validity);
+#endif
+
+ // TODO: behaviour is not good yet. It is changed at introduction of self-turns.
+ test_one<polygon, multi_polygon, multi_polygon>("ticket_8364_step4",
+ "MULTIPOLYGON(((2567 2688,2136 2790,2052 2712,1032 2130,1032 1764,1032 1458,1032 1212,2136 2328,3232 2220,3232 1056,1031 1056,1031 2856,3232 2856,3232 2580,2567 2688)))",
+ "MULTIPOLYGON(((1032 2556,1778 2556,1032 2130,1032 2556)),((3234 2580,3234 2556,1778 2556,2136 2760,3234 2580)))",
+ if_typed<ct, int>(1, 2),
+ if_typed<ct, int>(17, 20),
+ if_typed<ct, int>(2615783.5, 2616029.559567), // SQL Server: 2616029.55616044
+ 1,
+ if_typed<ct, int>(9, 11),
+ if_typed<ct, int>(161133.5, 161054.559567), // SQL Server: 161054.560110092
+ if_typed<ct, int>(1, 3),
+ if_typed<ct, int>(25, 31),
+ if_typed<ct, int>(2776875.5, 2616029.559567 + 161054.559567));
+}
+
+template <typename P, bool ClockWise, bool Closed>
+void test_spikes_in_ticket_8365()
+{
+ // See: https://svn.boost.org/trac/boost/ticket/8365
+ // NOTE: polygons below are closed and clockwise
+
+ typedef typename bg::coordinate_type<P>::type ct;
+ typedef bg::model::polygon<P, ClockWise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ test_one<polygon, multi_polygon, multi_polygon>("ticket_8365_step2",
+ "MULTIPOLYGON(((971 2704,971 1402,4640 1402,3912 1722,3180 2376,3912 1884,4643 1402,5395 1402,5395 3353,971 3353,971 2865,1704 3348)))",
+ "MULTIPOLYGON(((5388 1560,4650 1722,3912 1884,4650 1398)),((2442 3186,1704 3348,966 2700,1704 3024)))",
+ 2,
+ 18,
+ if_typed<ct, int>(7975092.5, 7975207.6047877), // SQL Server:
+ 2,
+ -1,
+ if_typed<ct, int>(196.5, 197.1047877), // SQL Server:
+ if_typed<ct, int>(3, 4),
+ -1,
+ if_typed<ct, int>(7975092.5 + 196.5, 7975207.6047877 + 197.1047877));
+}
+
+
+
+
+
+int test_main(int, char* [])
+{
+ test_spikes_in_ticket_8364<bg::model::d2::point_xy<double>, true, true>();
+ test_spikes_in_ticket_8364<bg::model::d2::point_xy<double>, false, false>();
+ test_spikes_in_ticket_8365<bg::model::d2::point_xy<double>, true, true>();
+ test_spikes_in_ticket_8365<bg::model::d2::point_xy<double>, false, false>();
+
+ test_spikes_in_ticket_8364<bg::model::d2::point_xy<int>, true, true>();
+ test_spikes_in_ticket_8364<bg::model::d2::point_xy<int>, false, false>();
+ test_spikes_in_ticket_8365<bg::model::d2::point_xy<int>, true, true >();
+ test_spikes_in_ticket_8365<bg::model::d2::point_xy<int>, false, false >();
+
+#ifdef HAVE_TTMATH
+ std::cout << "Testing TTMATH" << std::endl;
+ test_spikes_in_ticket_8364<bg::model::d2::point_xy<ttmath_big>, true, true>();
+ test_spikes_in_ticket_8365<bg::model::d2::point_xy<ttmath_big>, true, true>();
+#endif
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_a.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_a.cpp
new file mode 100644
index 000000000..df8405290
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_a.cpp
@@ -0,0 +1,212 @@
+// Boost.Geometry
+
+// Copyright (c) 2020, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_difference_pointlike_areal
+#endif
+
+#include <iostream>
+#include <algorithm>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> Pt;
+typedef bg::model::ring<Pt> R;
+typedef bg::model::polygon<Pt> Po;
+typedef bg::model::multi_point<Pt> MPt;
+typedef bg::model::multi_polygon<Po> MPo;
+
+BOOST_AUTO_TEST_CASE( test_difference_point_ring )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ Pt, R, MPt, bg::overlay_difference
+ > tester;
+
+ tester::apply(
+ "pt-r-01",
+ from_wkt<Pt>("POINT(0 0)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-r-02",
+ from_wkt<Pt>("POINT(3 5)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-r-03",
+ from_wkt<Pt>("POINT(6 3)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(6 3)")
+ );
+}
+
+BOOST_AUTO_TEST_CASE( test_difference_point_polygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ Pt, Po, MPt, bg::overlay_difference
+ > tester;
+
+ tester::apply(
+ "pt-po-01",
+ from_wkt<Pt>("POINT(0 0)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-po-02",
+ from_wkt<Pt>("POINT(4 4)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-po-03",
+ from_wkt<Pt>("POINT(3 3)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(3 3)")
+ );
+
+ tester::apply(
+ "pt-po-04",
+ from_wkt<Pt>("POINT(6 0)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(6 0)")
+ );
+}
+
+BOOST_AUTO_TEST_CASE( test_difference_point_multipolygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ Pt, MPo, MPt, bg::overlay_difference
+ > tester;
+
+ tester::apply(
+ "pt-mpo-01",
+ from_wkt<Pt>("POINT(0 0)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-mpo-02",
+ from_wkt<Pt>("POINT(3 3)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT(3 3)")
+ );
+
+ tester::apply(
+ "pt-mpo-03",
+ from_wkt<Pt>("POINT(4 4)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-mpo-04",
+ from_wkt<Pt>("POINT(5 5)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-mpo-05",
+ from_wkt<Pt>("POINT(6 6)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+}
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_ring )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MPt, R, MPt, bg::overlay_difference
+ > tester;
+
+ tester::apply(
+ "mpt-r-01",
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1, 5 5, 6 6)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(6 6)")
+ );
+
+ tester::apply(
+ "mpt-r-02",
+ from_wkt<MPt>("MULTIPOINT(3 5, 5 3, 3 0, 0 3, 3 6, 6 3, 3 -1, -1 3)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(3 6, 6 3, 3 -1, -1 3)")
+ );
+}
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_polygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MPt, Po, MPt, bg::overlay_difference
+ > tester;
+
+ tester::apply(
+ "mpt-po-01",
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1, 4 4, 5 5, 6 6)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(1 1, 6 6)")
+ );
+
+ tester::apply(
+ "mpt-po-02",
+ from_wkt<MPt>("MULTIPOINT(3 5, 5 3, 3 0, 0 3, 3 6, 6 3, 3 -1, -1 3, 2 0.5, 0.5 2, 2 4, 4 2)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(3 6, 6 3, 3 -1, -1 3)")
+ );
+}
+
+BOOST_AUTO_TEST_CASE(test_difference_multipoint_multipolygon)
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MPt, MPo, MPt, bg::overlay_difference
+ > tester;
+
+ tester::apply(
+ "mpt-mpo-01",
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1, 4 4, 5 5, 6 6)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply(
+ "mpt-mpo-02",
+ from_wkt<MPt>("MULTIPOINT(3 5, 5 3, 3 0, 0 3, 3 6, 6 3, 3 -1, -1 3, 2 0.5, 0.5 2, 2 4, 4 2, 6 5, 6 7, 5 6, 7 6)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((5 5, 5 7, 7 7, 7 5, 5 5)))"),
+ from_wkt<MPt>("MULTIPOINT(3 6, 6 3, 3 -1, -1 3)")
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_l.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_l.cpp
new file mode 100644
index 000000000..9592ec56d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_l.cpp
@@ -0,0 +1,674 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_difference_pointlike_linear
+#endif
+
+#include <iostream>
+#include <algorithm>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_difference_point_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "size of std::size_t: " << sizeof(std::size_t) << std::endl;
+ std::cout << "size of range_iterator<multipoint>: "
+ << sizeof(boost::range_iterator<multi_point_type>::type)
+ << std::endl;
+ std::cout << "size of range_iterator<multilinestring>: "
+ << sizeof(boost::range_iterator<multi_linestring_type>::type)
+ << std::endl;
+ std::cout << "size of point_iterator<multipoint>: "
+ << sizeof(bg::point_iterator<multi_point_type>) << std::endl;
+ std::cout << "size of point_iterator<linestring>: "
+ << sizeof(bg::point_iterator<linestring_type>) << std::endl;
+ std::cout << "size of point_iterator<multilinestring>: "
+ << sizeof(bg::point_iterator<multi_linestring_type>) << std::endl;
+ std::cout << "size of segment_iterator<linestring>: "
+ << sizeof(bg::segment_iterator<linestring_type>) << std::endl;
+ std::cout << "size of segment_iterator<multilinestring>: "
+ << sizeof(bg::segment_iterator<multi_linestring_type>) << std::endl;
+
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / SEGMENT DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef segment_type S;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, S, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("psdf01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("psdf02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("psdf03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<S>("SEGMENT(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("psdf04",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<S>("SEGMENT(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT(3 3)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_point_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / LINESTRING DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef linestring_type L;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, L, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("pldf01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pldf02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pldf03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pldf04",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<L>("LINESTRING(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT(3 3)")
+ );
+
+ // linestrings with more than two points
+ tester::apply
+ ("pldf05",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pldf06",
+ from_wkt<P>("POINT(2 2)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pldf07",
+ from_wkt<P>("POINT(10 10)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT(10 10)")
+ );
+
+ tester::apply
+ ("pldf08",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT(0 1)")
+ );
+
+ tester::apply
+ ("pldf09",
+ from_wkt<P>("POINT(4 4)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pldf10",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_point_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / MULTILINESTRING DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_linestring_type ML;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, ML, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("pmldf01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2))"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pmldf02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf04",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2))"),
+ from_wkt<MP>("MULTIPOINT(3 3)")
+ );
+
+ // linestrings with more than two points
+ tester::apply
+ ("pmldf05",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,2 2))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf06",
+ from_wkt<P>("POINT(2 2)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf07",
+ from_wkt<P>("POINT(10 10)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(10 10)")
+ );
+
+ tester::apply
+ ("pmldf08",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 1)")
+ );
+
+ tester::apply
+ ("pmldf09",
+ from_wkt<P>("POINT(4 4)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf10",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ // multilinestrings with more than one linestring
+ tester::apply
+ ("pmldf11",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10,-10),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf12",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,0 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf13",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmldf14",
+ from_wkt<P>("POINT(-20 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(-20 0)")
+ );
+
+ tester::apply
+ ("pmldf15",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 1)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / SEGMENT DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+ typedef segment_type S;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, S, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("mpsdf01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mpsdf02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsdf03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsdf04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsdf05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)")
+ );
+
+ tester::apply
+ ("mpsf06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<S>("SEGMENT(1 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsdf07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpsdf08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsdf09",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(-1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpsdf10",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsdf11",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(-1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsdf12",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)")
+ );
+
+ tester::apply
+ ("mpsdf12a",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)")
+ );
+
+ tester::apply
+ ("mpsdf12b",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0,2 0)")
+ );
+
+ tester::apply
+ ("mpsdf12c",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0,2 0,0 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,0 0,2 0,2 0)")
+ );
+
+ tester::apply
+ ("mpsdf13",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsdf14",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(0 0,0 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpsdf15",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<S>("SEGMENT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / LINESTRING DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+ typedef linestring_type L;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, L, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("mpldf01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2,3 3,4 4,5 5)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mpldf02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpldf03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpldf04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpldf05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)")
+ );
+
+ tester::apply
+ ("mplf06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpldf07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpldf08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpldf09",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(-1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpldf10",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpldf11",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(-1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpldf12",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)")
+ );
+
+ tester::apply
+ ("mpldf13",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpldf14",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,0 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpldf15",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<L>("LINESTRING(0 0,1 0,2 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpldf16",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<L>("LINESTRING()"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / MULTILINESTRING DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+ typedef multi_linestring_type ML;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, ML, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("mpmldf01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 0,2 0)")
+ );
+
+ tester::apply
+ ("mpmldf02",
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpmldf03",
+ from_wkt<MP>("MULTIPOINT(5 5,3 3,0 0,0 0,5 5,1 1,1 1,1 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(5 5,5 5,0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpmldf04",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,0 0,1 1,0 0))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmldf05",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,0 0,1 2,1 0),\
+ (0 1,2 0,0 10,2 0,2 10,5 10,5 0,5 10))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmldf05a",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,6 0,7 0,2 0,5 0,7 0,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,0 0,1 2,1 0),\
+ (0 1,2 0,0 10,2 0,2 10,5 10,5 0,5 10))"),
+ from_wkt<MP>("MULTIPOINT(7 0,7 0,8 0,6 0)")
+ );
+
+ tester::apply
+ ("mpmldf06",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<ML>("MULTILINESTRING(())"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)")
+ );
+
+ tester::apply
+ ("mpmldf07",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<ML>("MULTILINESTRING(())"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmldf08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_pl.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_pl.cpp
new file mode 100644
index 000000000..eaf58b216
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference_pl_pl.cpp
@@ -0,0 +1,244 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_difference_pointlike_pointlike
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/multi_point.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_difference_point_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / POINT DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, P, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("ppdf01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("ppdf02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / POINT DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, P, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("mppdf01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("mppdf02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppdf03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("mppdf04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppdf05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("mppdf06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppdf07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppdf08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_point_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / MULTIPOINT DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, MP, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("pmpdf01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1)")
+ );
+
+ tester::apply
+ ("pmpdf02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1)")
+ );
+
+ tester::apply
+ ("pmpdf03",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_difference_multipoint_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / MULTIPOINT DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, MP, MP, bg::overlay_difference
+ > tester;
+
+ tester::apply
+ ("mpmpdf01",
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT(4 4)")
+ );
+
+ tester::apply
+ ("mpmpdf02",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmpdf03",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
+ );
+
+ tester::apply
+ ("mpmpdf04",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmpdf05",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference.hpp
new file mode 100644
index 000000000..9baeb293b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference.hpp
@@ -0,0 +1,478 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2016, 2017, 2019.
+// Modifications copyright (c) 2016-2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DIFFERENCE_HPP
+#define BOOST_GEOMETRY_TEST_DIFFERENCE_HPP
+
+#include <fstream>
+#include <iomanip>
+
+#include <geometry_test_common.hpp>
+#include <algorithms/check_validity.hpp>
+#include "../setop_output_type.hpp"
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/foreach.hpp>
+
+#include <boost/range/algorithm/copy.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/algorithms/sym_difference.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+#include <boost/geometry/algorithms/remove_spikes.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+# define BOOST_GEOMETRY_DEBUG_IDENTIFIER
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+# include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#endif
+
+
+struct ut_settings
+{
+ double percentage;
+ bool sym_difference;
+ bool remove_spikes;
+
+ bool test_validity;
+
+ ut_settings()
+ : percentage(0.0001)
+ , sym_difference(true)
+ , remove_spikes(false)
+ , test_validity(true)
+ {}
+
+};
+
+inline ut_settings tolerance(double percentage)
+{
+ ut_settings result;
+ result.percentage = percentage;
+ return result;
+}
+
+
+template <typename Output, typename G1, typename G2>
+void difference_output(std::string const& caseid, G1 const& g1, G2 const& g2, Output const& output)
+{
+ boost::ignore_unused(caseid, g1, g2, output);
+
+#if defined(TEST_WITH_SVG)
+ {
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ typedef typename bg::point_type<G1>::type point_type;
+
+ bool const ccw =
+ bg::point_order<G1>::value == bg::counterclockwise
+ || bg::point_order<G2>::value == bg::counterclockwise;
+ bool const open =
+ bg::closure<G1>::value == bg::open
+ || bg::closure<G2>::value == bg::open;
+
+ std::ostringstream filename;
+ filename << "difference_"
+ << caseid << "_"
+ << string_from_type<coordinate_type>::name()
+ << (ccw ? "_ccw" : "")
+ << (open ? "_open" : "")
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ << "_rescaled"
+#endif
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g1, "fill-opacity:0.3;fill:rgb(51,51,153);stroke:rgb(51,51,153);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:3");
+
+
+ for (typename Output::const_iterator it = output.begin(); it != output.end(); ++it)
+ {
+ mapper.map(*it,
+ //sym ? "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,255,0);stroke:rgb(255,0,255);stroke-width:8" :
+ "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,0,0);stroke:rgb(255,0,255);stroke-width:8");
+ }
+ }
+#endif
+}
+
+template <typename OutputType, typename G1, typename G2>
+std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g2,
+ int expected_count, int expected_rings_count, int expected_point_count,
+ double expected_area,
+ bool sym,
+ ut_settings const& settings)
+{
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ boost::ignore_unused<coordinate_type>();
+
+ bg::model::multi_polygon<OutputType> result;
+
+
+ if (sym)
+ {
+ bg::sym_difference(g1, g2, result);
+ }
+ else
+ {
+ bg::difference(g1, g2, result);
+ }
+
+ if (settings.remove_spikes)
+ {
+ bg::remove_spikes(result);
+ }
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ {
+ bg::model::multi_polygon<OutputType> result_s;
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ G1, G2
+ >::type strategy_type;
+ if (sym)
+ {
+ bg::sym_difference(g1, g2, result_s, strategy_type());
+ }
+ else
+ {
+ bg::difference(g1, g2, result_s, strategy_type());
+ }
+
+ if (settings.remove_spikes)
+ {
+ bg::remove_spikes(result_s);
+ }
+ BOOST_CHECK_EQUAL(bg::num_points(result), bg::num_points(result_s));
+ }
+#endif
+
+
+ std::ostringstream return_string;
+ return_string << bg::wkt(result);
+
+ typename bg::default_area_result<G1>::type const area = bg::area(result);
+
+#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
+#if ! defined(BOOST_GEOMETRY_TEST_ALWAYS_CHECK_VALIDITY)
+ if (settings.test_validity)
+#endif
+ {
+ // std::cout << bg::dsv(result) << std::endl;
+ typedef bg::model::multi_polygon<OutputType> result_type;
+ std::string message;
+ bool const valid = check_validity<result_type>::apply(result, caseid, g1, g2, message);
+ BOOST_CHECK_MESSAGE(valid,
+ "difference: " << caseid << " not valid " << message
+ << " type: " << (type_for_assert_message<G1, G2>()));
+ }
+#endif
+
+ difference_output(caseid, g1, g2, result);
+
+#if ! (defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE) \
+ || defined(BOOST_GEOMETRY_DEBUG_ASSEMBLE))
+ {
+ // Test inserter functionality
+ // Test if inserter returns output-iterator (using Boost.Range copy)
+ typename setop_output_type<OutputType>::type
+ inserted, array_with_one_empty_geometry;
+ array_with_one_empty_geometry.push_back(OutputType());
+ if (sym)
+ {
+ boost::copy(array_with_one_empty_geometry,
+ bg::detail::sym_difference::sym_difference_insert<OutputType>
+ (g1, g2, std::back_inserter(inserted)));
+ }
+ else
+ {
+ boost::copy(array_with_one_empty_geometry,
+ bg::detail::difference::difference_insert<OutputType>(
+ g1, g2, std::back_inserter(inserted)));
+ }
+
+ BOOST_CHECK_EQUAL(boost::size(result), boost::size(inserted) - 1);
+ }
+#endif
+
+
+
+#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ if (expected_point_count >= 0)
+ {
+ std::size_t const n = bg::num_points(result);
+ BOOST_CHECK_MESSAGE(bg::math::abs(int(n) - expected_point_count) < 3,
+ "difference: " << caseid
+ << " #points expected: " << expected_point_count
+ << " detected: " << n
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+#endif
+
+ if (expected_count >= 0)
+ {
+ BOOST_CHECK_MESSAGE(int(boost::size(result)) == expected_count,
+ "difference: " << caseid
+ << " #outputs expected: " << expected_count
+ << " detected: " << result.size()
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+
+ if (expected_rings_count >= 0)
+ {
+ int nrings = int(boost::size(result) + bg::num_interior_rings(result));
+ BOOST_CHECK_MESSAGE(nrings == expected_rings_count,
+ "difference: " << caseid
+ << " #rings expected: " << expected_rings_count
+ << " detected: " << nrings
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+
+ if (expected_area > 0)
+ {
+ BOOST_CHECK_CLOSE(area, expected_area, settings.percentage);
+ }
+ else
+ {
+ // Compare 0 with 0 or a very small detected area
+ BOOST_CHECK_LE(area, settings.percentage);
+ }
+#endif
+
+ return return_string.str();
+}
+
+template <typename OutputType, typename G1, typename G2>
+std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g2,
+ int expected_count, int expected_point_count,
+ double expected_area,
+ bool sym,
+ ut_settings const& settings)
+{
+ return test_difference<OutputType>(caseid, g1, g2,
+ expected_count, -1, expected_point_count, expected_area,
+ sym, settings);
+}
+
+#ifdef BOOST_GEOMETRY_CHECK_WITH_POSTGIS
+static int counter = 0;
+#endif
+
+
+template <typename OutputType, typename G1, typename G2>
+std::string test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ int expected_count1,
+ int expected_rings_count1,
+ int expected_point_count1,
+ double expected_area1,
+ int expected_count2,
+ int expected_rings_count2,
+ int expected_point_count2,
+ double expected_area2,
+ int expected_count_s,
+ int expected_rings_count_s,
+ int expected_point_count_s,
+ double expected_area_s,
+ ut_settings const& settings = ut_settings())
+{
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ bg::correct(g1);
+ bg::correct(g2);
+
+ std::string result = test_difference<OutputType>(caseid + "_a", g1, g2,
+ expected_count1, expected_rings_count1, expected_point_count1,
+ expected_area1, false, settings);
+
+#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
+ return result;
+#endif
+
+ test_difference<OutputType>(caseid + "_b", g2, g1,
+ expected_count2, expected_rings_count2, expected_point_count2,
+ expected_area2, false, settings);
+
+#if ! defined(BOOST_GEOMETRY_TEST_ALWAYS_CHECK_SYMDIFFERENCE)
+ if (settings.sym_difference)
+#endif
+ {
+ test_difference<OutputType>(caseid + "_s", g1, g2,
+ expected_count_s,
+ expected_rings_count_s,
+ expected_point_count_s,
+ expected_area_s,
+ true, settings);
+ }
+ return result;
+}
+
+template <typename OutputType, typename G1, typename G2>
+std::string test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ int expected_count1,
+ int expected_rings_count1,
+ int expected_point_count1,
+ double expected_area1,
+ int expected_count2,
+ int expected_rings_count2,
+ int expected_point_count2,
+ double expected_area2,
+ ut_settings const& settings = ut_settings())
+{
+ return test_one<OutputType, G1, G2>(caseid, wkt1, wkt2,
+ expected_count1, expected_rings_count1, expected_point_count1, expected_area1,
+ expected_count2, expected_rings_count2, expected_point_count2, expected_area2,
+ expected_count1 + expected_count2,
+ expected_rings_count1 + expected_rings_count2,
+ expected_point_count1 >= 0 && expected_point_count2 >= 0
+ ? (expected_point_count1 + expected_point_count2) : -1,
+ expected_area1 + expected_area2,
+ settings);
+}
+
+template <typename OutputType, typename G1, typename G2>
+std::string test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ int expected_count1,
+ int expected_point_count1,
+ double expected_area1,
+ int expected_count2,
+ int expected_point_count2,
+ double expected_area2,
+ int expected_count_s,
+ int expected_point_count_s,
+ double expected_area_s,
+ ut_settings const& settings = ut_settings())
+{
+ return test_one<OutputType, G1, G2>(caseid, wkt1, wkt2,
+ expected_count1, -1, expected_point_count1, expected_area1,
+ expected_count2, -1, expected_point_count2, expected_area2,
+ expected_count_s, -1, expected_point_count_s, expected_area_s,
+ settings);
+}
+
+template <typename OutputType, typename G1, typename G2>
+std::string test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ int expected_count1,
+ int expected_point_count1,
+ double expected_area1,
+ int expected_count2,
+ int expected_point_count2,
+ double expected_area2,
+ ut_settings const& settings = ut_settings())
+{
+ return test_one<OutputType, G1, G2>(caseid, wkt1, wkt2,
+ expected_count1, expected_point_count1, expected_area1,
+ expected_count2, expected_point_count2, expected_area2,
+ expected_count1 + expected_count2,
+ expected_point_count1 >= 0 && expected_point_count2 >= 0
+ ? (expected_point_count1 + expected_point_count2) : -1,
+ expected_area1 + expected_area2,
+ settings);
+}
+
+template <typename OutputType, typename G1, typename G2>
+void test_one_lp(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ std::size_t expected_count,
+ int expected_point_count,
+ double expected_length)
+{
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ bg::correct(g1);
+ bg::correct(g2);
+
+ typedef typename setop_output_type<OutputType>::type result_type;
+ result_type pieces;
+ bg::difference(g1, g2, pieces);
+
+ typename bg::default_length_result<G1>::type length = 0;
+ std::size_t n = 0;
+ std::size_t piece_count = 0;
+ for (typename result_type::iterator it = pieces.begin();
+ it != pieces.end();
+ ++it)
+ {
+ if (expected_point_count >= 0)
+ {
+ n += bg::num_points(*it);
+ }
+ piece_count++;
+ length += bg::length(*it);
+ }
+
+ BOOST_CHECK_MESSAGE(piece_count == expected_count,
+ "difference: " << caseid
+ << " #outputs expected: " << expected_count
+ << " detected: " << pieces.size()
+ );
+
+ if (expected_point_count >= 0)
+ {
+ BOOST_CHECK_MESSAGE(n == std::size_t(expected_point_count),
+ "difference: " << caseid
+ << " #points expected: " << std::size_t(expected_point_count)
+ << " detected: " << n
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+
+ BOOST_CHECK_CLOSE(length, expected_length, 0.001);
+
+ std::string lp = "lp_";
+ difference_output(lp + caseid, g1, g2, pieces);
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference_linear_linear.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference_linear_linear.hpp
new file mode 100644
index 000000000..14f6b039a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/difference/test_difference_linear_linear.hpp
@@ -0,0 +1,186 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_GEOMETRY_TEST_DIFFERENCE_LINEAR_LINEAR_HPP
+#define BOOST_GEOMETRY_TEST_DIFFERENCE_LINEAR_LINEAR_HPP
+
+#include <limits>
+
+#include <boost/geometry/geometry.hpp>
+#include "../test_set_ops_linear_linear.hpp"
+#include "../check_turn_less.hpp"
+#include <from_wkt.hpp>
+#include <to_svg.hpp>
+
+
+//==================================================================
+//==================================================================
+// difference of (linear) geometries
+//==================================================================
+//==================================================================
+
+template <typename Geometry1, typename Geometry2, typename MultiLineString>
+inline void check_result(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_output,
+ MultiLineString const& mls_diff,
+ std::string const& case_id,
+ double tolerance = std::numeric_limits<double>::epsilon())
+{
+ BOOST_CHECK_MESSAGE( equals::apply(mls_diff, mls_output, tolerance),
+ "case id: " << case_id
+ << ", difference L/L: " << bg::wkt(geometry1)
+ << " " << bg::wkt(geometry2)
+ << " -> Expected: " << bg::wkt(mls_diff)
+ << std::setprecision(20)
+ << " computed: " << bg::wkt(mls_output) );
+}
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ typename MultiLineString
+>
+class test_difference_of_geometries
+{
+private:
+ static inline void base_test(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_diff,
+ std::string const& case_id,
+ double tolerance,
+ bool test_vector_and_deque = true,
+ bool reverse_output_for_checking = false)
+ {
+ static bool vector_deque_already_tested = false;
+
+ typedef typename boost::range_value<MultiLineString>::type LineString;
+ typedef std::vector<LineString> linestring_vector;
+ typedef std::deque<LineString> linestring_deque;
+
+ MultiLineString mls_output;
+
+ linestring_vector ls_vector_output;
+ linestring_deque ls_deque_output;
+
+ // Check strategy passed explicitly
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+ bg::difference(geometry1, geometry2, mls_output, strategy_type());
+
+ if (reverse_output_for_checking)
+ {
+ bg::reverse(mls_output);
+ }
+
+ check_result(geometry1, geometry2, mls_output, mls_diff, case_id, tolerance);
+
+ // Check normal behaviour
+ bg::clear(mls_output);
+ bg::difference(geometry1, geometry2, mls_output);
+
+ if ( reverse_output_for_checking )
+ {
+ bg::reverse(mls_output);
+ }
+
+ check_result(geometry1, geometry2, mls_output, mls_diff, case_id, tolerance);
+
+ set_operation_output("difference", case_id,
+ geometry1, geometry2, mls_output);
+
+ if ( !vector_deque_already_tested && test_vector_and_deque )
+ {
+ vector_deque_already_tested = true;
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "Testing with vector and deque as output container..."
+ << std::endl;
+#endif
+ bg::difference(geometry1, geometry2, ls_vector_output);
+ bg::difference(geometry1, geometry2, ls_deque_output);
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_diff, ls_vector_output, tolerance));
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_diff, ls_deque_output, tolerance));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Done!" << std::endl << std::endl;
+#endif
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "difference : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected difference : " << bg::wkt(mls_diff) << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+
+ check_turn_less::apply(geometry1, geometry2);
+ }
+
+
+public:
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_diff,
+ std::string const& case_id,
+ double tolerance
+ = std::numeric_limits<double>::epsilon())
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "test case: " << case_id << std::endl;
+ std::stringstream sstr;
+ sstr << "svgs/" << case_id << ".svg";
+#ifdef TEST_WITH_SVG
+ to_svg(geometry1, geometry2, sstr.str());
+#endif
+#endif
+
+ Geometry1 rg1(geometry1);
+ bg::reverse<Geometry1>(rg1);
+
+ Geometry2 rg2(geometry2);
+ bg::reverse<Geometry2>(rg2);
+
+ test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl
+ << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
+ << std::endl << std::endl;
+#endif
+ test_get_turns_ll_invariance<>::apply(rg1, geometry2);
+
+ base_test(geometry1, geometry2, mls_diff, case_id, tolerance);
+ base_test(geometry1, rg2, mls_diff, case_id, tolerance, false);
+ base_test(rg1, geometry2, mls_diff, case_id, tolerance, false, true);
+ base_test(rg1, rg2, mls_diff, case_id, tolerance, false, true);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_DIFFERENCE_LINEAR_LINEAR_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/Jamfile b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/Jamfile
new file mode 100644
index 000000000..783c20781
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/Jamfile
@@ -0,0 +1,29 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2020.
+# Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-intersection
+ :
+ [ run intersection.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_intersection ]
+ [ run intersection_areal_areal_linear.cpp : : : : algorithms_intersection_areal_areal_linear ]
+ [ run intersection_linear_linear.cpp : : : : algorithms_intersection_linear_linear ]
+ [ run intersection_multi.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_intersection_multi ]
+ [ run intersection_pl_a.cpp : : : : algorithms_intersection_pl_a ]
+ [ run intersection_pl_l.cpp : : : : algorithms_intersection_pl_l ]
+ [ run intersection_pl_pl.cpp : : : : algorithms_intersection_pl_pl ]
+ [ run intersection_tupled.cpp : : : : algorithms_intersection_tupled ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection.cpp
new file mode 100644
index 000000000..01c958171
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection.cpp
@@ -0,0 +1,974 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015, 2016, 2017.
+// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <climits>
+#include <iostream>
+#include <string>
+
+#include <boost/config.hpp>
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/util/rational.hpp>
+
+#include "test_intersection.hpp"
+#include <algorithms/test_overlay.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+
+#include <test_common/test_point.hpp>
+#include <test_common/with_pointer.hpp>
+#include <test_geometries/custom_segment.hpp>
+
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+
+#define TEST_INTERSECTION(caseid, clips, points, area) \
+ (test_one<Polygon, Polygon, Polygon>) \
+ ( #caseid, caseid[0], caseid[1], clips, points, area)
+
+#define TEST_INTERSECTION_REV(caseid, clips, points, area) \
+ (test_one<Polygon, Polygon, Polygon>) \
+ ( #caseid "_rev", caseid[1], caseid[0], clips, points, area)
+
+#define TEST_INTERSECTION_WITH(caseid, index1, index2, \
+ clips, points, area, settings) \
+ (test_one<Polygon, Polygon, Polygon>) \
+ ( #caseid "_" #index1 "_" #index2, caseid[index1], caseid[index2], \
+ clips, points, area, settings)
+
+template <typename Polygon>
+void test_areal()
+{
+ typedef typename bg::coordinate_type<Polygon>::type ct;
+ bool const ccw = bg::point_order<Polygon>::value == bg::counterclockwise;
+ bool const open = bg::closure<Polygon>::value == bg::open;
+
+ test_one<Polygon, Polygon, Polygon>("simplex_with_empty_1",
+ simplex_normal[0], polygon_empty,
+ 0, 0, 0.0);
+ test_one<Polygon, Polygon, Polygon>("simplex_with_empty_2",
+ polygon_empty, simplex_normal[0],
+ 0, 0, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 1, 7, 5.47363293);
+ test_one<Polygon, Polygon, Polygon>("star_ring", example_star, example_ring,
+ 1, 18, 2.80983);
+
+ test_one<Polygon, Polygon, Polygon>("star_poly", example_star, example_polygon,
+ 1, 0, // CLN: 23 points, other types: 22 point (one is merged)
+ 2.5020508);
+ test_one<Polygon, Polygon, Polygon>("first_within_second1",
+ first_within_second[0], first_within_second[1],
+ 1, 5, 1.0);
+
+ test_one<Polygon, Polygon, Polygon>("first_within_second2",
+ first_within_second[1], first_within_second[0],
+ 1, 5, 1.0);
+
+ test_one<Polygon, Polygon, Polygon>("first_within_hole_of_second",
+ first_within_hole_of_second[0], first_within_hole_of_second[1],
+ 0, 0, 0.0);
+
+ // Two forming new hole
+ test_one<Polygon, Polygon, Polygon>("new_hole",
+ new_hole[0], new_hole[1],
+ 2, 10, 2.0);
+
+ // Two identical
+ test_one<Polygon, Polygon, Polygon>("identical",
+ identical[0], identical[1],
+ 1, 5, 1.0);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_exterior_and_interiors_winded",
+ intersect_exterior_and_interiors_winded[0], intersect_exterior_and_interiors_winded[1],
+ 1, 14, 25.2166667);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_disjoint",
+ intersect_holes_disjoint[0], intersect_holes_disjoint[1],
+ 1, 15, 18.0);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_intersect",
+ intersect_holes_intersect[0], intersect_holes_intersect[1],
+ 1, 14, 18.25);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_intersect_and_disjoint",
+ intersect_holes_intersect_and_disjoint[0], intersect_holes_intersect_and_disjoint[1],
+ 1, 19, 17.25);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_intersect_and_touch",
+ intersect_holes_intersect_and_touch[0], intersect_holes_intersect_and_touch[1],
+ 1, 23, 17.25);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_new_ring",
+ intersect_holes_new_ring[0], intersect_holes_new_ring[1],
+ 2, 23, 122.1039);
+
+ test_one<Polygon, Polygon, Polygon>("winded",
+ winded[0], winded[1],
+ 1, 22, 40.0);
+
+ test_one<Polygon, Polygon, Polygon>("within_holes_disjoint",
+ within_holes_disjoint[0], within_holes_disjoint[1],
+ 1, 15, 23.0);
+
+ test_one<Polygon, Polygon, Polygon>("side_side",
+ side_side[0], side_side[1],
+ 0, 0, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("two_bends",
+ two_bends[0], two_bends[1],
+ 1, 7, 24.0);
+
+ test_one<Polygon, Polygon, Polygon>("star_comb_15",
+ star_comb_15[0], star_comb_15[1],
+ 28, 150, 189.952883);
+
+ test_one<Polygon, Polygon, Polygon>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 1, 7, 5.47363293);
+
+ test_one<Polygon, Polygon, Polygon>("distance_zero",
+ distance_zero[0], distance_zero[1],
+ 1, 0 /* f: 4, other: 5 */, 0.29516139, ut_settings(0.01));
+
+ test_one<Polygon, Polygon, Polygon>("equal_holes_disjoint",
+ equal_holes_disjoint[0], equal_holes_disjoint[1],
+ 1, 20, 81.0 - 2.0 * 3.0 * 3.0 - 3.0 * 7.0);
+
+ test_one<Polygon, Polygon, Polygon>("only_hole_intersections1",
+ only_hole_intersections[0], only_hole_intersections[1],
+ 1, 21, 178.090909);
+ test_one<Polygon, Polygon, Polygon>("only_hole_intersection2",
+ only_hole_intersections[0], only_hole_intersections[2],
+ 1, 21, 149.090909);
+
+ test_one<Polygon, Polygon, Polygon>("fitting",
+ fitting[0], fitting[1],
+ 0, 0, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("crossed",
+ crossed[0], crossed[1],
+ 3, 0, 1.5);
+
+ test_one<Polygon, Polygon, Polygon>("pie_2_3_23_0",
+ pie_2_3_23_0[0], pie_2_3_23_0[1],
+ 1, 4, 163292.679042133, ut_settings(0.1));
+
+ {
+ ut_settings settings(if_typed_tt<ct>(0.01, 0.1));
+ settings.test_validity = BG_IF_RESCALED(true, false);
+
+ // SQL Server gives: 88.1920416352664
+ // PostGIS gives: 88.19203677911
+ test_one<Polygon, Polygon, Polygon>("isovist",
+ isovist1[0], isovist1[1],
+ 1, 19, 88.192037,
+ settings);
+ }
+
+ if (! BOOST_GEOMETRY_CONDITION((boost::is_same<ct, float>::value)) )
+ {
+ test_one<Polygon, Polygon, Polygon>("geos_1",
+ geos_1[0], geos_1[1],
+ 1, -1, BG_IF_RESCALED(3461.12321694, BG_IF_KRAMER(3461.02336, 3461.105448)), // MSVC 14 reports 3461.025390625
+ ut_settings(0.01, false));
+ }
+
+ // Expectations:
+ // In most cases: 0 (no intersection)
+ // In some cases: 1.430511474609375e-05 (clang/gcc on Xubuntu using b2)
+ // In some cases: 5.6022983000000002e-05 (powerpc64le-gcc-6-0)
+ test_one<Polygon, Polygon, Polygon>("geos_2", geos_2[0], geos_2[1],
+ 0, 0, 6.0e-5, ut_settings(-1.0)); // -1 denotes: compare with <=
+
+ test_one<Polygon, Polygon, Polygon>("geos_3",
+ geos_3[0], geos_3[1],
+ 0, 0, 0.0);
+ test_one<Polygon, Polygon, Polygon>("geos_4",
+ geos_4[0], geos_4[1],
+ 1, -1, 0.08368849, ut_settings(0.01));
+
+
+ if ( BOOST_GEOMETRY_CONDITION(! ccw && open) )
+ {
+ // Pointcount for ttmath/double (both 5) or float (4)
+ // double returns 5 (since method append_no_dups_or_spikes)
+ // but not for ccw/open. Those cases has to be adapted once, anyway,
+ // because for open always one point too much is generated...
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110306_javier",
+ ggl_list_20110306_javier[0], ggl_list_20110306_javier[1],
+ 1, if_typed<ct, float>(4, 5),
+ 0.6649875,
+ ut_settings(if_typed<ct, float>(1.0, 0.01)));
+ }
+
+ // SQL Server reports: 0.400390625
+ // PostGIS reports 0.4
+ // BG did report 0.4 but with rescaling 0.397
+ // when selecting other IP closer at endpoint or if segment B is smaller than A
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110307_javier",
+ ggl_list_20110307_javier[0], ggl_list_20110307_javier[1],
+ 1, 4, BG_IF_RESCALED(0.397162651, 0.40), ut_settings(0.01));
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110627_phillip",
+ ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
+ 1, if_typed_tt<ct>(6, 5), 11151.6618);
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110716_enrico",
+ ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
+ 3, 16, 35723.8506317139);
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20131119_james",
+ ggl_list_20131119_james[0], ggl_list_20131119_james[1],
+ 1, 4, 6.6125873045, ut_settings(0.1));
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20140223_shalabuda",
+ ggl_list_20140223_shalabuda[0], ggl_list_20140223_shalabuda[1],
+ 1, 4, 3.77106, ut_settings(0.001));
+
+ // Mailed to the Boost.Geometry list on 2014/03/21 by 7415963@gmail.com
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20140321_7415963",
+ ggl_list_20140321_7415963[0], ggl_list_20140321_7415963[1],
+ 0, 0, 0, ut_settings(0.1));
+
+ TEST_INTERSECTION(ggl_list_20190307_matthieu_1, 2, -1, 0.035136);
+ TEST_INTERSECTION(ggl_list_20190307_matthieu_2, 1, -1, 3.64285);
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
+ 1, 4, 0.00029437899183903937, ut_settings(0.01));
+#endif
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_g", buffer_rt_g[0], buffer_rt_g[1],
+ 1, 0, 2.914213562373);
+
+ test_one<Polygon, Polygon, Polygon>("ticket_8254", ticket_8254[0], ticket_8254[1],
+ if_typed<ct, float>(0, 1), -1, if_typed<ct, float>(0.0, 3.635930e-08), ut_settings(0.01));
+ test_one<Polygon, Polygon, Polygon>("ticket_6958", ticket_6958[0], ticket_6958[1],
+ if_typed<ct, float>(0, 1), -1, if_typed<ct, float>(0.0, 4.34355e-05), ut_settings(0.01));
+ test_one<Polygon, Polygon, Polygon>("ticket_8652", ticket_8652[0], ticket_8652[1],
+ 1, 4, 0.0003);
+
+ TEST_INTERSECTION(ticket_8310a, 1, 5, 0.3843747);
+ TEST_INTERSECTION(ticket_8310b, 1, 5, 0.3734379);
+ TEST_INTERSECTION(ticket_8310c, 1, 5, 0.4689541);
+ TEST_INTERSECTION_REV(ticket_8310a, 1, 5, 0.3843747);
+ TEST_INTERSECTION_REV(ticket_8310b, 1, 5, 0.3734379);
+ TEST_INTERSECTION_REV(ticket_8310c, 1, 5, 0.4689541);
+
+ test_one<Polygon, Polygon, Polygon>("ticket_9081_15",
+ ticket_9081_15[0], ticket_9081_15[1],
+ 1, 4, 0.0068895780745301394);
+
+ test_one<Polygon, Polygon, Polygon>("ticket_10108_a",
+ ticket_10108_a[0], ticket_10108_a[1],
+ 0, 0, 0.0);
+
+ // msvc 5.6023011e-5
+ // mingw 5.6022954e-5
+ test_one<Polygon, Polygon, Polygon>("ticket_10108_b",
+ ticket_10108_b[0], ticket_10108_b[1],
+ 0, 0, 5.6022983e-5, ut_settings(-1.0));
+
+ test_one<Polygon, Polygon, Polygon>("ticket_10747_a",
+ ticket_10747_a[0], ticket_10747_a[1],
+ 1, 4, 70368744177664.0);
+ test_one<Polygon, Polygon, Polygon>("ticket_10747_b",
+ ticket_10747_b[0], ticket_10747_b[1],
+ 1, 4, 7036874417766400.0);
+ test_one<Polygon, Polygon, Polygon>("ticket_10747_c",
+ ticket_10747_c[0], ticket_10747_c[1],
+ 1, 4, 17592186044416.0);
+ test_one<Polygon, Polygon, Polygon>("ticket_10747_d",
+ ticket_10747_d[0], ticket_10747_d[1],
+ 1, 4, 703687777321.0);
+
+ // Delivers very small triangle < 1.0e-13, or zero
+ test_one<Polygon, Polygon, Polygon>("ticket_10747_e",
+ ticket_10747_e[0], ticket_10747_e[1],
+ BG_IF_RESCALED(1, 0), -1, 1.0e-13, ut_settings(-1.0));
+
+ test_one<Polygon, Polygon, Polygon>("ticket_11576",
+ ticket_11576[0], ticket_11576[1],
+ if_typed<ct, float>(0, 1), -1, if_typed<ct, float>(0.0, 5.585617332907136e-07));
+
+ {
+ // Not yet valid when rescaling is turned off
+ ut_settings settings;
+ settings.test_validity = BG_IF_RESCALED(true, false);
+ test_one<Polygon, Polygon, Polygon>("ticket_9563", ticket_9563[0], ticket_9563[1],
+ 1, 8, 129.90381, settings);
+ }
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // With rescaling the output is empty
+ TEST_INTERSECTION(issue_548, 1, -1, 1958824415.2151);
+#endif
+
+ TEST_INTERSECTION(issue_566_a, 1, -1, 70.7107);
+ TEST_INTERSECTION(issue_566_b, 1, -1, 70.7107);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_mp1", buffer_mp1[0], buffer_mp1[1],
+ 1, 31, 2.271707796);
+ test_one<Polygon, Polygon, Polygon>("buffer_mp2", buffer_mp2[0], buffer_mp2[1],
+ 1, 29, 0.457126);
+
+ test_one<Polygon, Polygon, Polygon>("case_58_iet",
+ case_58[0], case_58[2],
+ 2, -1, 1.0 / 3.0);
+
+ test_one<Polygon, Polygon, Polygon>("case_80",
+ case_80[0], case_80[1],
+ 0, -1, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("case_81",
+ case_81[0], case_81[1],
+ 0, -1, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("case_101",
+ case_101[0], case_101[1],
+ 0, -1, 6.25);
+ test_one<Polygon, Polygon, Polygon>("case_102",
+ case_102[0], case_102[1],
+ 0, -1, 3.1875);
+
+ test_one<Polygon, Polygon, Polygon>("case_103",
+ case_103[0], case_103[1],
+ 1, -1, 0.5);
+ test_one<Polygon, Polygon, Polygon>("case_104",
+ case_104[0], case_104[1],
+ 0, -1, 0.0);
+
+ TEST_INTERSECTION(case_105, 1, 34, 76.0);
+ TEST_INTERSECTION(case_106, 2, -1, 3.5);
+ TEST_INTERSECTION(case_107, 3, -1, 3.0);
+
+ TEST_INTERSECTION(case_precision_1, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_2, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_3, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_4, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_5, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_6, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_7, 0, -1, 0.0);
+ TEST_INTERSECTION(case_precision_8, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_9, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_10, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_11, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_12, 1, -1, 2.0);
+ TEST_INTERSECTION(case_precision_13, 1, -1, 1.99998);
+ TEST_INTERSECTION(case_precision_14, 0, -1, 0.0);
+ TEST_INTERSECTION(case_precision_15, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_16, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_17, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_18, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_19, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_20, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_21, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_22, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_23, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_24, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_25, 0, 0, 0.0);
+ TEST_INTERSECTION(case_precision_26, 1, -1, 14.0);
+
+ TEST_INTERSECTION_REV(case_precision_1, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_2, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_3, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_4, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_5, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_6, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_7, 0, -1, 0.0);
+ TEST_INTERSECTION_REV(case_precision_8, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_9, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_10, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_11, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_12, 1, -1, 2.0);
+ TEST_INTERSECTION_REV(case_precision_13, 1, -1, 1.99998);
+ TEST_INTERSECTION_REV(case_precision_14, 0, -1, 0.0);
+ TEST_INTERSECTION_REV(case_precision_15, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_16, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_17, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_18, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_19, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_20, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_21, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_22, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_23, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_24, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_25, 0, 0, 0.0);
+ TEST_INTERSECTION_REV(case_precision_26, 1, -1, 14.0);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_21964049",
+ mysql_21964049[0], mysql_21964049[1],
+ 0, -1, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_21964465",
+ mysql_21964465[0], mysql_21964465[1],
+ 0, -1, 0.0);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_21965285_b_inv",
+ mysql_21965285_b_inv[0],
+ mysql_21965285_b_inv[1],
+ 2, -1, 183.71376870369406);
+
+ TEST_INTERSECTION(mysql_23023665_6, 2, 0, 11.812440191387557);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_23023665_10",
+ mysql_23023665_10[0], mysql_23023665_10[1],
+ 1, 0, -1, 54.701340543162523);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_23023665_11",
+ mysql_23023665_11[0], mysql_23023665_11[1],
+ 1, 0, -1, 35.933385462482065);
+
+// test_one<Polygon, Polygon, Polygon>(
+// "polygon_pseudo_line",
+// "Polygon((0 0,0 4,4 4,4 0,0 0))",
+// "Polygon((2 -2,2 -1,2 6,2 -2))",
+// 5, 22, 1.1901714);
+}
+
+template <typename Polygon, typename Box>
+void test_areal_clip()
+{
+ test_one<Polygon, Box, Polygon>("boxring", example_box, example_ring,
+ 2, 12, 1.09125);
+ test_one<Polygon, Polygon, Box>("boxring2", example_ring,example_box,
+ 2, 12, 1.09125);
+
+ test_one<Polygon, Box, Polygon>("boxpoly", example_box, example_polygon,
+ 3, 19, 0.840166);
+
+ test_one<Polygon, Box, Polygon>("poly1", example_box,
+ "POLYGON((3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2))",
+ 2, 12, 1.09125);
+
+ test_one<Polygon, Box, Polygon>("clip_poly2", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,5.3 2.5,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 2, 12, 1.00375);
+
+ test_one<Polygon, Box, Polygon>("clip_poly3", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 2, 12, 1.00375);
+
+ test_one<Polygon, Box, Polygon>("clip_poly4", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 2.3,5.0 2.3,5.0 2.1,4.5 2.1,4.5 1.9,4.0 1.9,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 2, 16, 0.860892);
+
+ test_one<Polygon, Box, Polygon>("clip_poly5", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 1.2,2.9 0.7,2 1.3))",
+ 2, 11, 0.7575961);
+
+ test_one<Polygon, Box, Polygon>("clip_poly6", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.0 3.0,5.0 2.0,2.9 0.7,2 1.3))",
+ 2, 13, 1.0744456);
+
+ test_one<Polygon, Box, Polygon>("clip_poly7", "Box(0 0, 3 3)",
+ "POLYGON((2 2, 1 4, 2 4, 3 3, 2 2))",
+ 1, 4, 0.75);
+}
+
+
+template <typename Box>
+void test_boxes(std::string const& wkt1, std::string const& wkt2, double expected_area, bool expected_result)
+{
+ Box box1, box2;
+ bg::read_wkt(wkt1, box1);
+ bg::read_wkt(wkt2, box2);
+
+ Box box_out;
+ bg::assign_zero(box_out);
+ bool detected = bg::intersection(box1, box2, box_out);
+ typename bg::default_area_result<Box>::type area = bg::area(box_out);
+
+ BOOST_CHECK_EQUAL(detected, expected_result);
+ if (detected && expected_result)
+ {
+ BOOST_CHECK_CLOSE(area, expected_area, 0.01);
+ }
+}
+
+template <typename P>
+void test_point_output()
+{
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::box<P> box;
+ //typedef bg::model::segment<P> segment;
+
+ test_point_output<polygon, polygon>(simplex_normal[0], simplex_normal[1], 6);
+ test_point_output<box, polygon>("box(1 1,6 4)", simplex_normal[0], 4);
+ test_point_output<linestring, polygon>("linestring(0 2,6 2)", simplex_normal[0], 2);
+ // NYI because of sectionize:
+ // test_point_output<segment, polygon>("linestring(0 2,6 2)", simplex_normal[0], 2);
+ // NYI because needs special treatment:
+ // test_point_output<box, box>("box(0 0,4 4)", "box(2 2,6 6)", 2);
+}
+
+
+template <typename Polygon, typename LineString>
+void test_areal_linear()
+{
+ std::string const poly_simplex = "POLYGON((1 1,1 3,3 3,3 1,1 1))";
+
+ test_one_lp<LineString, Polygon, LineString>("simplex", poly_simplex, "LINESTRING(0 2,4 2)", 1, 2, 2.0);
+ test_one_lp<LineString, Polygon, LineString>("case2", poly_simplex, "LINESTRING(0 1,4 3)", 1, 2, sqrt(5.0));
+ test_one_lp<LineString, Polygon, LineString>("case3", "POLYGON((2 0,2 5,5 5,5 0,2 0))", "LINESTRING(0 1,1 2,3 2,4 3,6 3,7 4)", 1, 4, 2 + sqrt(2.0));
+ test_one_lp<LineString, Polygon, LineString>("case4", "POLYGON((0 0,0 4,2 4,2 0,0 0))", "LINESTRING(1 1,3 2,1 3)", 2, 4, sqrt(5.0));
+
+ test_one_lp<LineString, Polygon, LineString>("case5", poly_simplex, "LINESTRING(0 1,3 4)", 1, 2, sqrt(2.0));
+ test_one_lp<LineString, Polygon, LineString>("case6", "POLYGON((2 0,2 4,3 4,3 1,4 1,4 3,5 3,5 1,6 1,6 3,7 3,7 1,8 1,8 3,9 3,9 0,2 0))", "LINESTRING(1 1,10 3)", 4, 8,
+ // Pieces are 1 x 2/9:
+ 4.0 * sqrt(1.0 + 4.0/81.0));
+ test_one_lp<LineString, Polygon, LineString>("case7", poly_simplex, "LINESTRING(1.5 1.5,2.5 2.5)", 1, 2, sqrt(2.0));
+ test_one_lp<LineString, Polygon, LineString>("case8", poly_simplex, "LINESTRING(1 0,2 0)", 0, 0, 0.0);
+
+ std::string const poly_9 = "POLYGON((1 1,1 4,4 4,4 1,1 1))";
+ test_one_lp<LineString, Polygon, LineString>("case9", poly_9, "LINESTRING(0 1,1 2,2 2)", 1, 2, 1.0);
+ test_one_lp<LineString, Polygon, LineString>("case10", poly_9, "LINESTRING(0 1,1 2,0 2)", 0, 0, 0.0);
+ test_one_lp<LineString, Polygon, LineString>("case11", poly_9, "LINESTRING(2 2,4 2,3 3)", 1, 3, 2.0 + sqrt(2.0));
+ test_one_lp<LineString, Polygon, LineString>("case12", poly_9, "LINESTRING(2 3,4 4,5 6)", 1, 2, sqrt(5.0));
+
+ test_one_lp<LineString, Polygon, LineString>("case13", poly_9, "LINESTRING(3 2,4 4,2 3)", 1, 3, 2.0 * sqrt(5.0));
+ test_one_lp<LineString, Polygon, LineString>("case14", poly_9, "LINESTRING(5 6,4 4,6 5)", 0, 0, 0.0);
+ test_one_lp<LineString, Polygon, LineString>("case15", poly_9, "LINESTRING(0 2,1 2,1 3,0 3)", 1, 2, 1.0);
+ test_one_lp<LineString, Polygon, LineString>("case16", poly_9, "LINESTRING(2 2,1 2,1 3,2 3)", 1, 4, 3.0);
+
+ std::string const angly = "LINESTRING(2 2,2 1,4 1,4 2,5 2,5 3,4 3,4 4,5 4,3 6,3 5,2 5,2 6,0 4)";
+ // PROPERTIES CHANGED BY switch_to_integer
+ // TODO test_one_lp<LineString, Polygon, LineString>("case17", "POLYGON((1 1,1 5,4 5,4 1,1 1))", angly, 3, 8, 6.0);
+ test_one_lp<LineString, Polygon, LineString>("case18", "POLYGON((1 1,1 5,5 5,5 1,1 1))", angly, 2, 12, 10.0 + sqrt(2.0));
+ test_one_lp<LineString, Polygon, LineString>("case19", poly_9, "LINESTRING(1 2,1 3,0 3)", 1, 2, 1.0);
+ test_one_lp<LineString, Polygon, LineString>("case20", poly_9, "LINESTRING(1 2,1 3,2 3)", 1, 3, 2.0);
+
+ test_one_lp<LineString, Polygon, LineString>("case21",
+ "POLYGON((2 3,-9 -7,12 -13,2 3))",
+ "LINESTRING(-1.3 0,-15 0,-1.3 0)",
+ 0, 0, 0);
+
+ test_one_lp<LineString, Polygon, LineString>("case22",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(5 5,-10 5,5 5)",
+ 2, 4, 10);
+
+ test_one_lp<LineString, Polygon, LineString>("case22a",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(1 1,5 5,-10 5,5 5,6 6)",
+ 2, 6, 17.071068);
+
+ test_one_lp<LineString, Polygon, LineString>("case23",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-10 5,5 5,-10 5)",
+ 1, 3, 10);
+
+ test_one_lp<LineString, Polygon, LineString>("case23a",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-20 10,-10 5,5 5,-10 5,-20 -10)",
+ 1, 3, 10);
+
+ test_one_lp<LineString, Polygon, LineString>("case24",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(0 5,5 5,0 5)",
+ 1, 3, 10);
+
+ test_one_lp<LineString, Polygon, LineString>("case24",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(0 5,5 5,1 1,9 1,5 5,0 5)",
+ 1, 6, 29.313708);
+
+ test_one_lp<LineString, Polygon, LineString>("case25",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(5 5,0 5,5 5)",
+ 1, 3, 10);
+
+ test_one_lp<LineString, Polygon, LineString>("case25a",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-10 10,5 5,0 5,5 5,20 10)",
+ 1, 4, 20.540925);
+
+ test_one_lp<LineString, Polygon, LineString>("case25b",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-10 10,5 5,1 5,5 5,20 10)",
+ 1, 4, 18.540925);
+
+ test_one_lp<LineString, Polygon, LineString>("case25c",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-10 10,5 5,-1 5,5 5,20 10)",
+ 2, 6, 20.540925);
+
+ test_one_lp<LineString, Polygon, LineString>("case26",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-5 5,0 5,-5 5)",
+ 0, 0, 0);
+
+ test_one_lp<LineString, Polygon, LineString>("case26a",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(-10 10,-5 5,0 5,-5 5,-10 -10)",
+ 0, 0, 0);
+
+ test_one_lp<LineString, Polygon, LineString>("case27",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(5 5,0 5,5 5,5 4,0 4,5 4)",
+ 1, 6, 21.0);
+
+ test_one_lp<LineString, Polygon, LineString>("case28",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "LINESTRING(5 5,0 5,5 5,5 4,0 4,5 3)",
+ 1, 6, 21.099019);
+
+ test_one_lp<LineString, Polygon, LineString>("case29",
+ "POLYGON((5 5,15 15,15 5,5 5))",
+ "LINESTRING(0 0,10 10)",
+ 1, 2, 5 * std::sqrt(2.0));
+
+ // PROPERTIES CHANGED BY switch_to_integer
+ // TODO test_one_lp<LineString, Polygon, LineString>("case21", poly_9, "LINESTRING(1 2,1 4,4 4,4 1,2 1,2 2)", 1, 6, 11.0);
+
+ // Compile test - arguments in any order:
+ test_one<LineString, Polygon, LineString>("simplex", poly_simplex, "LINESTRING(0 2,4 2)", 1, 2, 2.0);
+ test_one<LineString, LineString, Polygon>("simplex", "LINESTRING(0 2,4 2)", poly_simplex, 1, 2, 2.0);
+
+ typedef typename bg::point_type<Polygon>::type Point;
+ test_one<LineString, bg::model::ring<Point>, LineString>("simplex", poly_simplex, "LINESTRING(0 2,4 2)", 1, 2, 2.0);
+
+ test_one_lp<LineString, Polygon, LineString>("case30",
+ "POLYGON((25 0,0 15,30 15,22 10,25 0))",
+ "LINESTRING(10 15,20 15)",
+ 1, 2, 10.0);
+
+ test_one_lp<LineString, Polygon, LineString>("case31",
+ "POLYGON((25 0,0 15,30 15,22 10,25 0))",
+ "LINESTRING(0 15,20 15)",
+ 1, 2, 20.0);
+
+ test_one_lp<LineString, Polygon, LineString>("case32",
+ "POLYGON((25 0,0 15,30 15,22 10,25 0))",
+ "LINESTRING(25 0, 0 15,20 15)",
+ 1, 3, 49.15475947422650 /*sqrt(25^2+15^2)+20*/);
+
+ typedef typename bg::point_type<Polygon>::type P;
+
+ test_one_lp<P, Polygon, LineString>("case30p",
+ "POLYGON((25 0,0 15,30 15,22 10,25 0))",
+ "LINESTRING(10 15,20 15)",
+ 2, 2, 0);
+}
+
+
+template <typename Linestring, typename Box>
+void test_linear_box()
+{
+ typedef bg::model::multi_linestring<Linestring> multi_linestring_type;
+
+ test_one_lp<Linestring, Box, Linestring>
+ ("case-l-b-01",
+ "BOX(-10 -10,10 10)",
+ "LINESTRING(-20 -20, 0 0,20 20)",
+ 1, 3, 20 * sqrt(2.0));
+
+ test_one_lp<Linestring, Box, Linestring>
+ ("case-l-b-02",
+ "BOX(-10 -10,10 10)",
+ "LINESTRING(-20 -20, 20 20)",
+ 1, 2, 20.0 * sqrt(2.0));
+
+ test_one_lp<Linestring, Box, Linestring>
+ ("case-l-b-02",
+ "BOX(-10 -10,10 10)",
+ "LINESTRING(-20 -20, 20 20,15 0,0 -15)",
+ 2, 4, 25.0 * sqrt(2.0));
+
+ test_one_lp<Linestring, Box, multi_linestring_type>
+ ("case-ml-b-01",
+ "BOX(-10 -10,10 10)",
+ "MULTILINESTRING((-20 -20, 20 20),(0 -15,15 0))",
+ 2, 4, 25.0 * sqrt(2.0));
+}
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::box<P> box;
+ typedef bg::model::segment<P> segment;
+
+ typedef bg::model::polygon<P, false> polygon_ccw;
+ typedef bg::model::polygon<P, true, false> polygon_open;
+ typedef bg::model::polygon<P, false, false> polygon_ccw_open;
+ boost::ignore_unused<polygon_ccw, polygon_open, polygon_ccw_open>();
+
+ ut_settings ignore_validity;
+ ignore_validity.test_validity = false;
+
+ std::string clip = "box(2 2,8 8)";
+
+ test_areal_linear<polygon, linestring>();
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_areal_linear<polygon_open, linestring>();
+ test_areal_linear<polygon_ccw, linestring>();
+ test_areal_linear<polygon_ccw_open, linestring>();
+#endif
+
+ test_linear_box<linestring, box>();
+
+ // Test polygons clockwise and counter clockwise
+ test_areal<polygon>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_areal<polygon_ccw>();
+ test_areal<polygon_open>();
+ test_areal<polygon_ccw_open>();
+#endif
+
+ test_areal_clip<polygon, box>();
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_areal_clip<polygon_ccw, box>();
+#endif
+
+#if defined(TEST_FAIL_DIFFERENT_ORIENTATIONS)
+ // Should NOT compile
+ // NOTE: this can probably be relaxed later on.
+ test_one<polygon, polygon_ccw, polygon>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 1, 7, 5.47363293);
+ // Output ccw, nyi (should be just reversing afterwards)
+ test_one<polygon, polygon, polygon_ccw>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 1, 7, 5.47363293);
+#endif
+
+ // Basic check: box/linestring, is clipping OK? should compile in any order
+ test_one<linestring, linestring, box>("llb", "LINESTRING(0 0,10 10)", clip, 1, 2, sqrt(2.0 * 6.0 * 6.0));
+ test_one<linestring, box, linestring>("lbl", clip, "LINESTRING(0 0,10 10)", 1, 2, sqrt(2.0 * 6.0 * 6.0));
+
+ // Box/segment
+ test_one<linestring, segment, box>("lsb", "LINESTRING(0 0,10 10)", clip, 1, 2, sqrt(2.0 * 6.0 * 6.0));
+ test_one<linestring, box, segment>("lbs", clip, "LINESTRING(0 0,10 10)", 1, 2, sqrt(2.0 * 6.0 * 6.0));
+
+ // Completely inside
+ test_one<linestring, linestring, box>("llbi", "LINESTRING(3 3,7 7)", clip, 1, 2, sqrt(2.0 * 4.0 * 4.0));
+
+ // Completely outside
+ test_one<linestring, linestring, box>("llbo", "LINESTRING(9 9,10 10)", clip, 0, 0, 0.0);
+
+ // Touching with point (-> output linestring with ONE point)
+ test_one<linestring, linestring, box>("llb_touch", "LINESTRING(8 8,10 10)", clip, 1, 1, 0.0, ignore_validity);
+
+ // Along border
+ test_one<linestring, linestring, box>("llb_along", "LINESTRING(2 2,2 8)", clip, 1, 2, 6.0);
+
+ // Outputting two lines (because of 3-4-5 constructions (0.3,0.4,0.5)
+ // which occur 4 times, the length is expected to be 2.0)
+ test_one<linestring, linestring, box>("llb_2", "LINESTRING(1.7 1.6,2.3 2.4,2.9 1.6,3.5 2.4,4.1 1.6)", clip, 2, 6, 4.0 * 0.5);
+
+ // linear
+ test_one<P, linestring, linestring>("llp1", "LINESTRING(0 0,1 1)", "LINESTRING(0 1,1 0)", 1, 1, 0.0);
+ test_one<P, segment, segment>("ssp1", "LINESTRING(0 0,1 1)", "LINESTRING(0 1,1 0)", 1, 1, 0.0);
+ test_one<P, linestring, linestring>("llp2", "LINESTRING(0 0,1 1)", "LINESTRING(0 0,2 2)", 2, 2, 0.0);
+
+ // polygons outputing points
+ //test_one<P, polygon, polygon>("ppp1", simplex_normal[0], simplex_normal[1], 1, 7, 5.47363293);
+
+ test_boxes<box>("box(2 2,8 8)", "box(4 4,10 10)", 16, true);
+ test_boxes<box>("box(2 2,8 7)", "box(4 4,10 10)", 12, true);
+ test_boxes<box>("box(2 2,8 7)", "box(14 4,20 10)", 0, false);
+ test_boxes<box>("box(2 2,4 4)", "box(4 4,8 8)", 0, true);
+
+ test_point_output<P>();
+
+
+ /*
+ test_one<polygon, box, polygon>(99, "box(115041.10 471900.10, 118334.60 474523.40)",
+ "POLYGON ((115483.40 474533.40, 116549.40 474059.20, 117199.90 473762.50, 117204.90 473659.50, 118339.40 472796.90, 118334.50 472757.90, 118315.10 472604.00, 118344.60 472520.90, 118277.90 472419.10, 118071.40 472536.80, 118071.40 472536.80, 117943.10 472287.70, 117744.90 472248.40, 117708.00 472034.50, 117481.90 472056.90, 117481.90 472056.90, 117272.30 471890.10, 117077.90 472161.20, 116146.60 473054.50, 115031.10 473603.30, 115483.40 474533.40))",
+ 1, 26, 3727690.74);
+ */
+
+}
+
+void test_pointer_version()
+{
+ std::vector<test::test_point_xy*> ln;
+ test::test_point_xy* p;
+ p = new test::test_point_xy; p->x = 0; p->y = 0; ln.push_back(p);
+ p = new test::test_point_xy; p->x = 10; p->y = 10; ln.push_back(p);
+
+ bg::model::box<bg::model::d2::point_xy<double> > box;
+ bg::assign_values(box, 2, 2, 8, 8);
+
+ typedef bg::model::linestring<bg::model::d2::point_xy<double> > output_type;
+ std::vector<output_type> clip;
+ bg::detail::intersection::intersection_insert<output_type>(box, ln, std::back_inserter(clip));
+
+ double length = 0;
+ std::size_t n = 0;
+ for (std::vector<output_type>::const_iterator it = clip.begin();
+ it != clip.end(); ++it)
+ {
+ length += bg::length(*it);
+ n += bg::num_points(*it);
+ }
+
+ BOOST_CHECK_EQUAL(clip.size(), 1u);
+ BOOST_CHECK_EQUAL(n, 2u);
+ BOOST_CHECK_CLOSE(length, sqrt(2.0 * 6.0 * 6.0), 0.001);
+
+ for (std::size_t i = 0; i < ln.size(); i++)
+ {
+ delete ln[i];
+ }
+}
+
+
+template <typename P>
+void test_exception()
+{
+ typedef bg::model::polygon<P> polygon;
+
+ try
+ {
+ // Define polygon with a spike (= invalid)
+ std::string spike = "POLYGON((0 0,0 4,2 4,2 6,2 4,4 4,4 0,0 0))";
+
+ test_one<polygon, polygon, polygon>("with_spike",
+ simplex_normal[0], spike,
+ 0, 0, 0);
+ }
+ catch(bg::overlay_invalid_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "No exception thrown");
+}
+
+template <typename Point>
+void test_rational()
+{
+ typedef bg::model::polygon<Point> polygon;
+ test_one<polygon, polygon, polygon>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 1, 7, 5.47363293);
+}
+
+
+template <typename P>
+void test_boxes_per_d(P const& min1, P const& max1, P const& min2, P const& max2, bool expected_result)
+{
+ typedef bg::model::box<P> box;
+
+ box box_out;
+ bool detected = bg::intersection(box(min1, max1), box(min2, max2), box_out);
+
+ BOOST_CHECK_EQUAL(detected, expected_result);
+ if ( detected && expected_result )
+ {
+ BOOST_CHECK( bg::equals(box_out, box(min2,max1)) );
+ }
+}
+
+template <typename CoordinateType>
+void test_boxes_nd()
+{
+ typedef bg::model::point<CoordinateType, 1, bg::cs::cartesian> p1;
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> p2;
+ typedef bg::model::point<CoordinateType, 3, bg::cs::cartesian> p3;
+
+ test_boxes_per_d(p1(0), p1(5), p1(3), p1(6), true);
+ test_boxes_per_d(p2(0,0), p2(5,5), p2(3,3), p2(6,6), true);
+ test_boxes_per_d(p3(0,0,0), p3(5,5,5), p3(3,3,3), p3(6,6,6), true);
+}
+
+
+template <typename CoordinateType>
+void test_ticket_10868(std::string const& wkt_out)
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::polygon
+ <
+ point_type, /*ClockWise*/false, /*Closed*/false
+ > polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multipolygon_type;
+
+ polygon_type polygon1;
+ bg::read_wkt(ticket_10868[0], polygon1);
+ polygon_type polygon2;
+ bg::read_wkt(ticket_10868[1], polygon2);
+
+ multipolygon_type multipolygon_out;
+ bg::intersection(polygon1, polygon2, multipolygon_out);
+ std::stringstream stream;
+ stream << bg::wkt(multipolygon_out);
+
+ BOOST_CHECK_EQUAL(stream.str(), wkt_out);
+
+ test_one<polygon_type, polygon_type, polygon_type>("ticket_10868",
+ ticket_10868[0], ticket_10868[1],
+ 1, 7, 20266195244586.0);
+}
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+ test_all<bg::model::d2::point_xy<default_test_type> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<float> >();
+
+#if defined(HAVE_TTMATH)
+ std::cout << "Testing TTMATH" << std::endl;
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+
+ // Commented, because exception is now disabled:
+ // test_exception<bg::model::d2::point_xy<double> >();
+
+ test_pointer_version();
+#if ! defined(BOOST_GEOMETRY_RESCALE_TO_ROBUST)
+ test_rational<bg::model::d2::point_xy<boost::rational<int> > >();
+#endif
+
+ test_boxes_nd<double>();
+
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // ticket #10868 still fails for 32-bit integers
+ test_ticket_10868<int32_t>("MULTIPOLYGON(((33520458 6878575,33480192 14931538,31446819 18947953,30772384 19615678,30101303 19612322,30114725 16928001,33520458 6878575)))");
+
+#if !defined(BOOST_NO_INT64) || defined(BOOST_HAS_INT64_T) || defined(BOOST_HAS_MS_INT64)
+ test_ticket_10868<int64_t>("MULTIPOLYGON(((33520458 6878575,33480192 14931538,31446819 18947953,30772384 19615678,30101303 19612322,30114725 16928001,33520458 6878575)))");
+#endif
+
+ if (BOOST_GEOMETRY_CONDITION(sizeof(long) * CHAR_BIT >= 64))
+ {
+ test_ticket_10868<long>("MULTIPOLYGON(((33520458 6878575,33480192 14931538,31446819 18947953,30772384 19615678,30101303 19612322,30114725 16928001,33520458 6878575)))");
+ }
+
+#if defined(BOOST_HAS_LONG_LONG)
+ test_ticket_10868<boost::long_long_type>("MULTIPOLYGON(((33520458 6878575,33480192 14931538,31446819 18947953,30772384 19615678,30101303 19612322,30114725 16928001,33520458 6878575)))");
+#endif
+#endif
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_aa_sph.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_aa_sph.cpp
new file mode 100644
index 000000000..4a96359bd
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_aa_sph.cpp
@@ -0,0 +1,39 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_intersection.hpp"
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+
+ // https://svn.boost.org/trac/boost/ticket/11789
+ test_one<polygon, polygon, polygon>("poly_poly_se_ticket_11789",
+ "POLYGON((-4.5726431789237223 52.142932977753595, \
+ -4.5743166242433153 52.143359442355219, \
+ -4.5739141406075410 52.143957260988416, \
+ -4.5722406991324354 52.143530796430468, \
+ -4.5726431789237223 52.142932977753595))",
+ "POLYGON((-4.5714644516017975 52.143819810922480, \
+ -4.5670821923630358 52.143819810922480, \
+ -4.5670821923630358 52.143649055226163, \
+ -4.5714644516017975 52.143649055226163, \
+ -4.5714644516017975 52.143819810922480))",
+ 0, 0, 0.0);
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_areal_areal_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_areal_areal_linear.cpp
new file mode 100644
index 000000000..c83c794c0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_areal_areal_linear.cpp
@@ -0,0 +1,391 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_intersection_linear_linear_areal
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/range.hpp>
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include "test_intersection_linear_linear.hpp"
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_linestring
+ <
+ bg::model::linestring<point_type>
+ > multi_linestring_type;
+
+typedef bg::model::ring<point_type, true, false> open_ring_type;
+typedef bg::model::polygon<point_type, true, false> open_polygon_type;
+typedef bg::model::multi_polygon<open_polygon_type> open_multipolygon_type;
+
+typedef bg::model::ring<point_type> closed_ring_type;
+typedef bg::model::polygon<point_type> closed_polygon_type;
+typedef bg::model::multi_polygon<closed_polygon_type> closed_multipolygon_type;
+
+
+template
+<
+ typename OpenAreal1,
+ typename OpenAreal2,
+ typename ClosedAreal1,
+ typename ClosedAreal2,
+ typename MultiLinestring
+>
+struct test_intersection_aal
+{
+ static inline void apply(std::string const& case_id,
+ OpenAreal1 const& open_areal1,
+ OpenAreal2 const& open_areal2,
+ MultiLinestring const& expected1,
+ MultiLinestring const& expected2)
+ {
+ typedef test_intersection_of_geometries
+ <
+ OpenAreal1, OpenAreal2, MultiLinestring
+ > tester;
+
+ tester::apply(open_areal1, open_areal2, expected1, expected2, case_id);
+
+ ClosedAreal1 closed_areal1;
+ ClosedAreal2 closed_areal2;
+ bg::convert(open_areal1, closed_areal1);
+ bg::convert(open_areal2, closed_areal2);
+
+ typedef test_intersection_of_geometries
+ <
+ ClosedAreal1, ClosedAreal2, MultiLinestring
+ > tester_of_closed;
+
+ std::string case_id_closed = case_id + "-closed";
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "testing closed areal geometries..." << std::endl;
+#endif
+ tester_of_closed::apply(closed_areal1, closed_areal2,
+ expected1, expected2, case_id_closed);
+ }
+
+ static inline void apply(std::string const& case_id,
+ OpenAreal1 const& open_areal1,
+ OpenAreal2 const& open_areal2,
+ MultiLinestring const& expected)
+ {
+ apply(case_id, open_areal1, open_areal2, expected, expected);
+ }
+};
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_ring_ring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** RING / RING / LINEAR INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+ typedef open_ring_type OG;
+ typedef closed_ring_type CG;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_aal<OG, OG, CG, CG, ML> tester;
+
+ tester::apply
+ ("r-r-01",
+ from_wkt<OG>("POLYGON((0 0,0 2,2 2,2 0))"),
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,2 2),(2 0,1 0),(2 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 1),(2 0,1 0),(2 1,2 1))")
+ );
+
+ tester::apply
+ ("r-r-02",
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("r-r-03",
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("r-r-04",
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_ring_polygon_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** RING / POLYGON / LINEAR INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+ typedef open_ring_type OG1;
+ typedef open_polygon_type OG2;
+ typedef closed_ring_type CG1;
+ typedef closed_polygon_type CG2;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_aal<OG1, OG2, CG1, CG2, ML> tester;
+
+ tester::apply
+ ("r-pg-01",
+ from_wkt<OG1>("POLYGON((0 0,0 2,2 2,2 0))"),
+ from_wkt<OG2>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,2 2),(2 0,1 0),(2 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 1),(2 0,1 0),(2 1,2 1))")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_ring_multipolygon_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** RING / MULTIPOLYGON / LINEAR INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ typedef open_ring_type OG1;
+ typedef open_multipolygon_type OG2;
+ typedef closed_ring_type CG1;
+ typedef closed_multipolygon_type CG2;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_aal<OG1, OG2, CG1, CG2, ML> tester;
+
+ tester::apply
+ ("r-mpg-01",
+ from_wkt<OG1>("POLYGON((0 0,0 2,2 2,2 0))"),
+ from_wkt<OG2>("MULTIPOLYGON(((2 1,2 4,4 4,4 0,1 0)))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,2 2),(2 0,1 0),(2 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 1),(2 0,1 0),(2 1,2 1))")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_polygon_polygon_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POLYGON / POLYGON / LINEAR INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+ typedef open_polygon_type OG;
+ typedef closed_polygon_type CG;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_aal<OG, OG, CG, CG, ML> tester;
+
+ tester::apply
+ ("pg-pg-01",
+ from_wkt<OG>("POLYGON((0 0,0 2,2 2,2 0))"),
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,2 2),(2 0,1 0),(2 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 1),(2 0,1 0),(2 1,2 1))")
+ );
+
+ tester::apply
+ ("pg-pg-02",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 2,2 7,7 7,7 2))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 2),(2 2,2 7,7 7,7 2,2 2),(2 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 2),(2 2,7 2,7 7,2 7,2 2),(2 2,2 2))")
+ );
+
+ tester::apply
+ ("pg-pg-03",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 3,2 6,6 6,6 3))"),
+ from_wkt<ML>("MULTILINESTRING((2 3,2 6),(2 3,2 3))")
+ );
+
+ tester::apply
+ ("pg-pg-04",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 3,2 7,6 7,6 3))"),
+ from_wkt<ML>("MULTILINESTRING((2 3,2 7,6 7),(2 3,2 3))")
+ );
+
+ tester::apply
+ ("pg-pg-05",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 3,2 7,7 7,7 3))"),
+ from_wkt<ML>("MULTILINESTRING((2 3,2 7,7 7,7 3),(2 3,2 3))")
+ );
+
+ tester::apply
+ ("pg-pg-06",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 3,2 7,7 7,7 3))"),
+ from_wkt<ML>("MULTILINESTRING((2 3,2 7,7 7,7 3),(2 3,2 3))")
+ );
+
+ tester::apply
+ ("pg-pg-07",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 5,5 7,7 5,5 2))"),
+ from_wkt<ML>("MULTILINESTRING((2 5,2 5),(5 7,5 7),(7 5,7 5),(5 2,5 2))")
+ );
+
+ tester::apply
+ ("pg-pg-08",
+ from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(2 2,7 2,7 7,2 7))"),
+ from_wkt<OG>("POLYGON((2 5,4 7,6 7,7 5,5 2))"),
+ from_wkt<ML>("MULTILINESTRING((2 5,2 5),(4 7,6 7),(7 5,7 5),(5 2,5 2))")
+ );
+
+ tester::apply
+ ("pg-pg-09",
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("pg-pg-10",
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0))"),
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("pg-pg-11",
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("pg-pg-12",
+ from_wkt<OG>("POLYGON((),())"),
+ from_wkt<OG>("POLYGON((),(),())"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("pg-pg-13",
+ from_wkt<OG>("POLYGON((2 1,2 4,4 4,4 0,1 0),())"),
+ from_wkt<OG>("POLYGON(())"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_polygon_multipolygon_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POLYGON / MULTIPOLYGON / LINEAR INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ typedef open_polygon_type OG1;
+ typedef open_multipolygon_type OG2;
+ typedef closed_polygon_type CG1;
+ typedef closed_multipolygon_type CG2;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_aal<OG1, OG2, CG1, CG2, ML> tester;
+
+ tester::apply
+ ("pg-mpg-01",
+ from_wkt<OG1>("POLYGON((0 0,0 2,2 2,2 0))"),
+ from_wkt<OG2>("MULTIPOLYGON(((2 1,2 4,4 4,4 0,1 0)))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,2 2),(2 0,1 0),(2 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 1),(2 0,1 0),(2 1,2 1))")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipolygon_multipolygon_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOLYGON / MULTIPOLYGON / LINEAR INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ typedef open_multipolygon_type OG;
+ typedef closed_multipolygon_type CG;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_aal<OG, OG, CG, CG, ML> tester;
+
+ tester::apply
+ ("mpg-mpg-01",
+ from_wkt<OG>("MULTIPOLYGON(((0 0,0 2,2 2,2 0)))"),
+ from_wkt<OG>("MULTIPOLYGON(((2 1,2 4,4 4,4 0,1 0)))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,2 2),(2 0,1 0),(2 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,2 1),(2 0,1 0),(2 1,2 1))")
+ );
+
+ tester::apply
+ ("mpg-mpg-02",
+ from_wkt<OG>("MULTIPOLYGON(((0 0,0 10,10 10,10 0),(2 2,8 2,8 8,2 8)))"),
+ from_wkt<OG>("MULTIPOLYGON(((2 4,2 6,8 6,8 4)))"),
+ from_wkt<ML>("MULTILINESTRING((2 4,2 4),(2 4,2 6),(8 6,8 4))")
+ );
+
+ tester::apply
+ ("mpg-mpg-03",
+ from_wkt<OG>("MULTIPOLYGON()"),
+ from_wkt<OG>("MULTIPOLYGON(((2 1,2 4,4 4,4 0,1 0)))"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("mpg-mpg-04",
+ from_wkt<OG>("MULTIPOLYGON(((2 1,2 4,4 4,4 0,1 0)))"),
+ from_wkt<OG>("MULTIPOLYGON()"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("mpg-mpg-05",
+ from_wkt<OG>("MULTIPOLYGON()"),
+ from_wkt<OG>("MULTIPOLYGON()"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("mpg-mpg-06",
+ from_wkt<OG>("MULTIPOLYGON((()),((),()))"),
+ from_wkt<OG>("MULTIPOLYGON()"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+
+ tester::apply
+ ("mpg-mpg-07",
+ from_wkt<OG>("MULTIPOLYGON(((2 1,2 4,4 4,4 0,1 0),(),()))"),
+ from_wkt<OG>("MULTIPOLYGON()"),
+ from_wkt<ML>("MULTILINESTRING()")
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_linear_linear.cpp
new file mode 100644
index 000000000..5224f10f4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_linear_linear.cpp
@@ -0,0 +1,1617 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_intersection_linear_linear
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_intersection_linear_linear.hpp"
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_linestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / LINESTRING INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<L, L, ML> tester;
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 1,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0 2,1 1,2 1,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 1))"),
+ "lli00");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,5 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0))"),
+ "lli01");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,6 0)"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0))"),
+ "lli01-2");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0))"),
+ "lli01-4");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((4 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(2 0),(4 0,5 0),(6.5 0),(8 0))"),
+#endif
+ "lli01-6");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-20 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((4 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(2 0),(4 0,5 0),(6.5 0),(8 0))"),
+#endif
+ "lli01-7");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0))"),
+ "lli01-8");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lli01-10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,5 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((2 0))"),
+#endif
+ "lli01-11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0))"),
+ "lli01-11a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0))"),
+ "lli01-11b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,5 0,10 0)"),
+ from_wkt<L>("LINESTRING(2 0,6 0,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 0,5 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,6 0,8 0))"),
+ "lli01-11c");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0,5 0))"),
+ "lli01-12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0)"),
+ from_wkt<L>("LINESTRING(-1 6,0 5,15 5)"),
+ from_wkt<ML>("MULTILINESTRING((5 5,10 5))"),
+ "lli02");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0))"),
+ "lli03");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0))"),
+ "lli04");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,25 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0)(15 0,20 0))"),
+ "lli05");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,30 0))"),
+ "lli05-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,30 0))"),
+ "lli06");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,25 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,25 0,30 0))"),
+ "lli07");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,19 0,30 0))"),
+ "lli08");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,30 0))"),
+ "lli09");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(15 0,30 0))"),
+ "lli10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0),(3 0,4 0),\
+ (15 0,20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0),(3 0,4 0),\
+ (15 0,30 0))"),
+ "lli11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0),\
+ (3 0,4 0),(15 0,30 0))"),
+ "lli11-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0,3 1))"),
+ "lli12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(3 1,2 0,0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((3 1,2 0,0 0))"),
+ "lli12-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5,4 0,5 10)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,2 1,3 5,4 0))"),
+ "lli13");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,2.5 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0,2.5 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0,2.5 0,3 1))"),
+ "lli14");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,2 1,3 5))"),
+ "lli15");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0.5 0,1 0,3 2,4 5)"),
+ from_wkt<ML>("MULTILINESTRING((0.5 0,1 0,2 1,3 2))"),
+ from_wkt<ML>("MULTILINESTRING((0.5 0,1 0,3 2))"),
+ "lli16");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(4 5,3 2,1 0,0.5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0.5 0,1 0,2 1,3 2))"),
+ from_wkt<ML>("MULTILINESTRING((0.5 0,1 0,3 2))"),
+ "lli16-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,30 1)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 1)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((20 1,25 1))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((2 0),(20 1,25 1))"),
+#endif
+ "lli17");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,21 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((2 0),(20 1),(25 0))"),
+#endif
+ "lli18");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 1)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0))"),
+#endif
+ "lli19");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,4 0,4 1,20 1,5 0,1 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0))"),
+#endif
+ "lli19-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0))"),
+#endif
+ "lli19a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(4 0,4 1,20 1,5 0,1 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0))"),
+#endif
+ "lli19a-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0,5 0))"),
+ "lli19b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,6 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0,5 0))"),
+ "lli19c");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0,3 0))"),
+ "lli19d");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0,3 0))"),
+ "lli19e");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(4 0,5 0))"),
+ "lli19f");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,4 0),(5 0,1 0))"),
+ "lli19f-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,5 0,5 1)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(5 0))"),
+#endif
+ "lli19g");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 1,20 1,5 0,1 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0),(5 0))"),
+#endif
+ "lli19g-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,35 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((20 0,25 0),(10 30,10 0),\
+ (35 0,40 0),(20 0,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((20 0,25 0),(10 0,10 30),\
+ (40 0,35 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((10 0),(20 0,25 0),(10 30,10 0),\
+ (30 20),(35 0,40 0),(20 0,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((10 0),(20 0,25 0),(10 0,10 30),\
+ (30 20),(40 0,35 0))"),
+#endif
+ "lli20");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,15 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((15 0,30 0),(10 30,10 0),\
+ (15 0,40 0))"),
+ from_wkt<ML>("MULTILINESTRING((10 0,10 30),(20 0,25 0),(40 0,15 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((10 0),(15 0,30 0),(10 30,10 0),\
+ (30 20),(15 0,40 0))"),
+ from_wkt<ML>("MULTILINESTRING((10 0),(10 0,10 30),(20 0,25 0),\
+ (30 20),(40 0,15 0))"),
+#endif
+ "lli20a");
+
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<L>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((18 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((4 0),(8.33333333333333333 0),\
+ (18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((4 0),(8.33333333333333333 0),\
+ (18 0,20 0))"),
+#endif
+ "lli21"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0)"),
+ from_wkt<L>("LINESTRING(1 0,4 0,2 1,5 1,4 0,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,4 0),(4 0,8 0))"),
+ "lli22"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0)"),
+ from_wkt<L>("LINESTRING(4 0,5 0,5 1,1 1,1 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,4 0),(4 0,5 0))"),
+ "lli23"
+ );
+
+ // the following two tests have been discussed with by Adam
+ tester::apply
+ (from_wkt<L>("LINESTRING(1 0,1 1,2 1)"),
+ from_wkt<L>("LINESTRING(2 1,1 1,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ "lli24"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(1 0,1 1,2 1)"),
+ from_wkt<L>("LINESTRING(1 2,1 1,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1))"),
+ "lli25"
+ );
+}
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_linestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / MULTILINESTRING INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<L, ML, ML> tester;
+
+ // the inertsection code automatically reverses the order of the
+ // geometries according to the geometry IDs.
+ // all calls below are actually reversed, and internally the
+ // intersection of the linestring with the multi-linestring is
+ // computed.
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "lmli01"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0))"),
+ "lmli02"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,5 0))"),
+ "lmli03"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0))"),
+ "lmli04"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,101 0))"),
+ "lmli07"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ "lmli07a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ "lmli07b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,101 0))"),
+ "lmli08"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((3 0,101 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0),(2 0.5),(3 0,101 0))"),
+#endif
+ "lmli09"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,1.5 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,1.5 0),(3 0,101 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0),(2 0.5),(1 0,1.5 0),(3 0,101 0))"),
+#endif
+ "lmli10"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli12"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli13"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli14"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli15"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli15a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli16"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli16a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(25 0))"),
+#endif
+ "lmli17"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(25 0))"),
+#endif
+ "lmli17a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ "lmli18"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,18 0,19 0))"),
+ "lmli18a"
+ );
+}
+
+
+
+
+
+
+#ifndef BOOST_GEOMETRY_TEST_NO_DEGENERATE
+BOOST_AUTO_TEST_CASE( test_intersection_l_ml_degenerate )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / MULTILINESTRING INTERSECTION"
+ << " (DEGENERATE) ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<L, ML, ML> tester;
+
+ // the following test cases concern linestrings with duplicate
+ // points and possibly linestrings with zero length.
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 10,4 10))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),(4 0),\
+ (5 0,18 0,19 0,20 0))"),
+#endif
+ "lmli20a"
+ );
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 0,4 10,4 10))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),(4 0),\
+ (5 0,18 0,19 0,20 0))"),
+#endif
+ "lmli20b"
+ );
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (30 0,30 0,30 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),\
+ (5 0,18 0,19 0,20 0),(30 0))"),
+#endif
+ "lmli20c"
+ );
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (30 0,30 0,31 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),\
+ (5 0,18 0,19 0,20 0),(30 0))"),
+#endif
+ "lmli20d"
+ );
+}
+#endif // BOOST_GEOMETRY_TEST_NO_DEGENERATE
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / LINESTRING INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<ML, L, ML> tester;
+
+ // the intersection code automatically reverses the order of the
+ // geometries according to the geometry IDs.
+ // all calls below are actually reversed, and internally the
+ // intersection of the linestring with the multi-linestring is
+ // computed.
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 2,4 3)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "mlli01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0))"),
+ "mlli02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<L>("LINESTRING(-1 -1,1 0,101 0,200 -1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,101 0))"),
+ "mlli03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<L>("LINESTRING(0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(18 0,2 0),\
+ (3 0,17 0),(16 0,4 0))"),
+ "mlli04"
+ );
+}
+
+
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<ML, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "mlmli01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(3 0,4 0))"),
+ "mlmli02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,5 0),(2 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(3 0,5 0))"),
+ "mlmli03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0))"),
+ "mlmli04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(2 0,4 0),(15 10,20 10))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(15 10,20 10))"),
+ "mlmli05"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((0 0,9 0),(13 3,15 5),\
+ (1 0,7 0),(11 10,12 10),(15 10,20 10))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(0 0,9 0),(13 3,14 4,15 5),\
+ (11 10,12 10),(15 10,20 10))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0,9 0),(13 3,15 5),(20 10),\
+ (1 0,7 0),(11 10,12 10),(15 10,20 10))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(0 0,9 0),(13 3,14 4,15 5),\
+ (11 10,12 10),(15 10,20 10))"),
+#endif
+ "mlmli06"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,101 0))"),
+ "mlmli07"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-1 1,0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,50 0),(20 0,101 0))"),
+ "mlmli07a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,50 0),(20 0,101 0))"),
+ "mlmli07b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,101 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0),(1 0,101 0))"),
+#endif
+ "mlmli08"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((3 0,101 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0),(2 0.5),(3 0,101 0))"),
+#endif
+ "mlmli09"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,1.5 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,1.5 0),(3 0,101 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,1.5 0),(2 0.5),(3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0),(1 0,1.5 0),(2 0.5),(3 0,101 0))"),
+#endif
+ "mlmli10"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,100 1,101 0),\
+ (0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1,3 0,4 0,5 1,6 1,\
+ 7 0,8 0,9 1,10 1,11 0,12 0,13 1,14 1,15 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 1,2 1),(5 1,6 1),(9 1,10 1),\
+ (13 1,14 1),(1 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 1),(5 1,6 1),(9 1,10 1),\
+ (13 1,14 1),(3 0,4 0),(7 0,8 0),(11 0,12 0),\
+ (1 0,101 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 1,2 1),(5 1,6 1),(9 1,10 1),\
+ (13 1,14 1),(101 0),(1 0),(1 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0),(1 1,2 1),(5 1,6 1),(9 1,10 1),\
+ (13 1,14 1),(3 0,4 0),(7 0,8 0),(11 0,12 0),(15 0),\
+ (1 0,101 0))"),
+#endif
+ "mlmli11"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(2 0,18 0),(3 0,17 0),\
+ (4 0,16 0))"),
+ "mlmli12"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(2 0,18 0),(3 0,17 0),\
+ (4 0,16 0))"),
+ "mlmli13"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(18 0,2 0),\
+ (3 0,17 0),(16 0,4 0))"),
+ "mlmli14"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(6 0))"),
+#endif
+ "mlmli15"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(6 0))"),
+#endif
+ "mlmli15a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(5 0,6 0))"),
+ "mlmli16"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(6 0,5 0))"),
+ "mlmli16a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(25 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(4 0),(25 0))"),
+#endif
+ "mlmli17"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(25 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(4 0),(25 0))"),
+#endif
+ "mlmli17a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(4 0),\
+ (8.3333333333333333333 0),(18 0))"),
+#endif
+ "mlmli18"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,18 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,18 0,19 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(4 0),\
+ (8.3333333333333333333 0),(18 0))"),
+#endif
+ "mlmli18a"
+ );
+}
+
+
+
+
+
+
+#ifndef BOOST_GEOMETRY_TEST_NO_DEGENERATE
+BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION"
+ << " (DEGENERATE) ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<ML, ML, ML> tester;
+
+ // the following test cases concern linestrings with duplicate
+ // points and possibly linestrings with zero length.
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((5 5,5 5),(0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0),(2 0,2 0),(4 10,4 10))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 10),\
+ (4 0,4 10),(5 5,5 5))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((5 5),(0 0),(1 0),(2 0),(3 0),\
+ (4 0),(5 0,18 0,19 0,20 0),(2 0),(4 10))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0),(1 0),(2 0),(2 0),(3 0),\
+ (0 0),(4 0),(4 10),(5 5))"),
+#endif
+ "mlmli20a"
+ );
+
+ // no unique: (3 0) appears three times
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((5 5,5 5),(0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0),(2 0,2 0),(4 10,4 10))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 10,4 10),(5 5,5 5))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((5 5),(0 0),(1 0),(2 0),(3 0),(4 0),\
+ (5 0,18 0,19 0,20 0),(2 0),(4 10))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0),(1 0),(2 0),(2 0),\
+ (3 0),(0 0),(4 0),(4 10),(5 5))"),
+#endif
+ "mlmli20aa"
+ );
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((5 5,5 5),(0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (4 0,4 0,4 10,4 10),(0 5,15 5))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((5 5),(0 0),(1 0),(2 0),(3 0),(4 0),\
+ (5 0,18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0),(1 0),(2 0),(3 0),\
+ (0 0),(4 0),(5 5))"),
+#endif
+ "mlmli20b"
+ );
+
+ // no unique: (3 0) and (30 0) appear twice
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (30 0,30 0,30 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),\
+ (5 0,18 0,19 0,20 0),(30 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0),(1 0),(2 0),(3 0),\
+ (0 0),(30 0))"),
+#endif
+ "mlmli20c"
+ );
+
+ // no unique: (3 0) appears twice
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,-9 0),(0 10,5 0,20 0,20 0,30 10),\
+ (1 1,1 1,2 2,2 2),(1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (30 0,30 0,31 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),\
+ (5 0,18 0,19 0,20 0),(30 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0),(1 0),(2 0),(3 0),\
+ (0 0),(30 0))"),
+#endif
+ "mlmli20d"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,0 0,18 0,18 0,\
+ 19 0,19 0,19 0,30 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),\
+ (1 10,1 10,1 0,1 0,1 -10),\
+ (2 0,2 0),(3 0,3 0,3 0),(0 0,0 0,0 10,0 10),\
+ (30 0,30 0,31 0,31 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((5 0,18 0,19 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0,30 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(1 0),(2 0),(3 0),\
+ (5 0,18 0,19 0,30 0),(30 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 0,20 0,30 0),(1 0),(2 0),(3 0),\
+ (0 0),(30 0))"),
+#endif
+ "mlmli20e"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 5, -4.3 -.1), (0 6, 8.6 6, 189.7654 5, 1 3, 6 3, 3 5, 6 2.232432, 0 4), (-6 5, 1 2.232432), (3 -1032.34324, 9 0, 189.7654 1, -1.4 3, 3 189.7654, +.3 10.0002, 1 5, 6 3, 5 1, 9 1, 10.0002 -1032.34324, -0.7654 0, 5 3, 3 4), (2.232432 2.232432, 8.6 +.4, 0.0 2.232432, 4 0, -8.8 10.0002), (1 0, 6 6, 7 2, -0 8.4), (-0.7654 3, +.6 8, 4 -1032.34324, 1 6, 0 4), (0 7, 2 1, 8 -7, 7 -.7, -1032.34324 9), (5 0, 10.0002 4, 8 7, 3 3, -8.1 5))"),
+ from_wkt<ML>("MULTILINESTRING((5 10.0002, 2 7, -0.7654 0, 5 3), (0 -0.7654, 4 10.0002, 4 +.1, -.8 3, -.1 8, 10.0002 2, +.9 -1032.34324))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((-0.7654 8.88178e-16,-0.7654 0,5 3))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((-0.756651 3.30964),(1.60494 6),\
+ (2.51371 6),(3.26673 6),(4 6),(8.18862 3.07616),\
+ (4 3.03179),(1.40063 3.00424),(1.39905 3),\
+ (4 3),(5 3),(4 4.33333),(4 4.07748),\
+ (4.41962 2.698),(4 2.82162),(1.59592 3.52985),\
+ (0.729883 3.78498),(-0.532243 2.83823),\
+ (0.235887 2.53454),(7.08745 -329.0674155),\
+ (9.98265 0.00543606),(8.49103 2.89652),\
+ (4.87386 2.93436),(4 2.9435),(1.38821 2.97083)\
+ (0.412281 2.98104),(-0.789427 2.99361),\
+ (0.641699 7.5594),(1.18124 4.9275),\
+ (1.99437 4.60225),(4 3.8),(9.09826 -100.515944),\
+ (5.06428 -559.024344),\
+ (4 3.5),(3.06464 1.99294),(4 1.72377),\
+ (4 1.38014),(2.50083 1.69957),(1.03214 2.01251),\
+ (0.72677 2.07758),(0.10749 2.20953),\
+ (0.0954852 2.17914),(0.92255 1.71755),\
+ (1.70073 1.28324),(3.43534 0.441146),\
+ (2.09493 1.48836),(1.12031 2.2498),\
+ (0.358522 2.84496),(-0.705343 3.67612),\
+ (2.06005 1.27206),(2.3516 1.62191),(4 3.6),\
+ (5.09496 4.91395),(6.47672 4.09311),(4 4.74286),\
+ (2.54193 6.07595),(1.87562 6.68515),\
+ (1.43457 7.08839),(0.502294 7.64221),\
+ (0.601362 7.58336),(0.614728 3.49349),\
+ (0.619143 2.1426),(0.623165 0.911787),\
+ (0.623783 0.722855),(3.16036 -775.427199),\
+ (3.23365 -767.0972558),(1.01466 0.926246),\
+ (1.01183 1.90535),(1.01168 1.95744),\
+ (1.00439 4.47984),(0.91526 4.25422),\
+ (1.36441 2.90677),(1.8713 1.38609),\
+ (1.87531 1.37408),(0.0484053 -0.635122),\
+ (8.5655 2.85228),(5.26567 4.81254),(4 3.8),\
+ (1.4995 3.27036),(0.591231 3.43401),\
+ (-0.706503 3.66784),\
+ (-0.7654 8.88178e-16,-0.7654 0,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((1.87562 6.68515),(1.60494 6),\
+ (1.18124 4.9275),(1.00439 4.47984),(0.91526 4.25422),\
+ (0.729883 3.78498),(0.614728 3.49349),\
+ (0.591231 3.43401),(0.412281 2.98104),\
+ (0.358522 2.84496),(0.235887 2.53454),\
+ (0.10749 2.20953),(0.0954852 2.17914),\
+ (5 3),(0.0484053 -0.635122),(0.535994 0.677175),\
+ (0.623165 0.911787),(0.92255 1.71755),\
+ (1.01168 1.95744),(1.03214 2.01251),\
+ (1.12031 2.2498),(1.36441 2.90677),\
+ (1.38821 2.97083),(1.39905 3),(1.40063 3.00424),\
+ (1.4995 3.27036),(1.59592 3.52985),\
+ (1.99437 4.60225),(2.51371 6),(2.54193 6.07595),\
+ (4 6),(4 4.74286),(4 4.33333),(4 4.07748),(4 3.8),\
+ (4 3.8),(4 3.6),(4 3.5),(4 3.03179),(4 3),\
+ (4 2.9435),(4 2.82162),(4 2.47965),(4 1.72377),\
+ (4 1.38014),(3.43534 0.441146),(2.06005 1.27206),\
+ (1.88383 1.37852),(1.8713 1.38609),\
+ (1.01183 1.90535),(0.72677 2.07758),\
+ (0.619143 2.1426),(-0.532243 2.83823),\
+ (-0.789427 2.99361),(-0.756651 3.30964),\
+ (-0.706503 3.66784),(-0.705343 3.67612),\
+ (0.502294 7.64221),(0.601362 7.58336),\
+ (0.641699 7.5594),(1.43457 7.08839),\
+ (3.26673 6),(5.09496 4.91395),(5.26567 4.81254),\
+ (6.47672 4.09311),(8.18862 3.07616),\
+ (8.49103 2.89652),(8.5655 2.85228),\
+ (9.98265 0.00543606),(9.09826 -100.515944),\
+ (7.08745 -329.0674155),(5.06428 -559.024344),\
+ (3.23365 -767.0972558),(3.16036 -775.427199),\
+ (-0.7654 8.88178e-16,-0.7654 0,5 3))"),
+#endif
+ "mlmli21",
+ 1e-4
+ );
+}
+#endif // BOOST_GEOMETRY_TEST_NO_DEGENERATE
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_spikes )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION"
+ << " (WITH SPIKES) ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_intersection_of_geometries<ML, ML, ML> tester;
+
+ // the following test cases concern linestrings with spikes
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0,5 0))"),
+ "mlmli-spikes-01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((9 0,1 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0))"),
+ from_wkt<ML>("MULTILINESTRING((9 0,1 0,5 0))"),
+ "mlmli-spikes-02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0,2 0,8 0,3 0,7 0,4 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0,2 0,8 0,3 0,7 0,4 0,5 0))"),
+ "mlmli-spikes-03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,3 0,2 0,4 0,3 0,5 0,4 0,6 0,\
+ 5 0,7 0,6 0,8 0,7 0,9 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,3 0,2 0,4 0,3 0,5 0,4 0,6 0,\
+ 5 0,7 0,6 0,8 0,7 0,9 0))"),
+ "mlmli-spikes-04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0),\
+ (9 1,9 0,9 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(7 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(7 0,8 0),(9 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0),(9 0))"),
+#endif
+ "mlmli-spikes-05"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0),\
+ (9 0,9 2,9 1))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(7 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(7 0,8 0),(9 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,7 0),(9 0))"),
+#endif
+ "mlmli-spikes-05a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(9 0,6 0,8 0),\
+ (11 0,8 0,12 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(6 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(9 0,6 0,8 0),\
+ (10 0,8 0,10 0))"),
+ "mlmli-spikes-06"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,0 0,-2 0),(11 0,10 0,12 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(10 0))"),
+#endif
+ "mlmli-spikes-07"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,-2 -2),(11 1,10 0,12 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((0 0),(10 0))"),
+#endif
+ "mlmli-spikes-07a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(11 0,10 0,12 0),\
+ (7 5,7 0,8 0,6.5 0,8.5 0,8.5 5))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(6.5 0,8.5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,6.5 0,8.5 0))"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0),(6.5 0,8.5 0),(10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,6 0,5 0),(7 0,8 0,6.5 0,8.5 0),(10 0))"),
+#endif
+ "mlmli-spikes-08"
+ );
+
+ // now the first geometry has a spike
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,7 0,4 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0))"),
+ "mlmli-spikes-09"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ "mlmli-spikes-09a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(9 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(5 0,4 0,5 0),(9 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(9 0,10 0))"),
+ "mlmli-spikes-09b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,7 0,4 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(6 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(6 0,7 0,6 0),(5 0,4 0,5 0),\
+ (6 0,10 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0),(6 0,10 0))"),
+ "mlmli-spikes-09c"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0),(8 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0))"),
+ "mlmli-spikes-10"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0,4 0),(2 0,9 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,9 0),(9 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,8 0,4 0),(2 0,9 0,5 0))"),
+ "mlmli-spikes-11"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((11 1,10 0,12 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((10 0))"),
+#endif
+ "mlmli-spikes-12"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((11 -1,10 0,12 -2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((10 0))"),
+#endif
+ "mlmli-spikes-12a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((11 0,10 0,12 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((10 0))"),
+#endif
+ "mlmli-spikes-13"
+ );
+
+ // the following three tests have been discussed with Adam
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 2,1 1,1 2))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 1))"),
+#endif
+ "mlmli-spikes-14"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,1 0,2 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 0))"),
+#endif
+ "mlmli-spikes-15"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,1 1,2 0))"),
+#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+ from_wkt<ML>("MULTILINESTRING()"),
+#else
+ from_wkt<ML>("MULTILINESTRING((1 1))"),
+#endif
+ "mlmli-spikes-16"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 1))"),
+ from_wkt<ML>("MULTILINESTRING((2 1,1 1,2 1))"),
+ "mlmli-spikes-17"
+ );
+
+ // test cases sent by Adam on the mailing list (equal slikes)
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ "mlmli-spikes-18"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,0 0,1 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,0 0,1 1))"),
+ "mlmli-spikes-19"
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_multi.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_multi.cpp
new file mode 100644
index 000000000..7bc1d4615
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_multi.cpp
@@ -0,0 +1,515 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include "test_intersection.hpp"
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#define TEST_INTERSECTION(caseid, clips, points, area) \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid, caseid[0], caseid[1], clips, points, area)
+
+#define TEST_INTERSECTION_REV(caseid, clips, points, area) \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid "_rev", caseid[1], caseid[0], clips, points, area)
+
+#define TEST_INTERSECTION_IGNORE(caseid, clips, points, area) \
+ { ut_settings ignore_validity; ignore_validity.test_validity = false; \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid, caseid[0], caseid[1], clips, points, area, ignore_validity); }
+
+template <typename Ring, typename Polygon, typename MultiPolygon>
+void test_areal()
+{
+ test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
+ case_multi_simplex[0], case_multi_simplex[1],
+ 2, 12, 6.42);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_no_ip",
+ case_multi_no_ip[0], case_multi_no_ip[1],
+ 2, 8, 8.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_2",
+ case_multi_2[0], case_multi_2[1],
+ 3, 12, 5.9);
+
+ test_one<Polygon, MultiPolygon, Polygon>("simplex_multi_mp_p",
+ case_multi_simplex[0], case_single_simplex,
+ 2, 12, 6.42);
+
+ test_one<Polygon, Ring, MultiPolygon>("simplex_multi_r_mp",
+ case_single_simplex, case_multi_simplex[0],
+ 2, 12, 6.42);
+ test_one<Ring, MultiPolygon, Polygon>("simplex_multi_mp_r",
+ case_multi_simplex[0], case_single_simplex,
+ 2, 12, 6.42);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_a",
+ case_58_multi[0], case_58_multi[3],
+ 3, 12, 0.666666667);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_b",
+ case_58_multi[1], case_58_multi[2],
+ 1, 19, 11.16666666667);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_b4",
+ case_58_multi[4], case_58_multi[2],
+ 1, 13, 12.66666666);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_b5",
+ case_58_multi[5], case_58_multi[2],
+ 1, 13, 13.25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_b6",
+ case_58_multi[6], case_58_multi[2],
+ 1, 13, 13.25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_b7",
+ case_58_multi[7], case_58_multi[2],
+ 1, 16, 12.5);
+
+ // Constructed cases for multi/touch/equal/etc
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_61_multi",
+ case_61_multi[0], case_61_multi[1],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_62_multi",
+ case_62_multi[0], case_62_multi[1],
+ 1, 5, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_63_multi",
+ case_63_multi[0], case_63_multi[1],
+ 1, 5, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_64_multi",
+ case_64_multi[0], case_64_multi[1],
+ 1, 5, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi",
+ case_65_multi[0], case_65_multi[1],
+ 1, 5, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi_inv_a",
+ case_65_multi[0], case_65_multi[3],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi_inv_b",
+ case_65_multi[1], case_65_multi[2],
+ 2, 10, 3.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_72_multi",
+ case_72_multi[0], case_72_multi[1],
+ 3, 14, 2.85);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_72_multi_inv_b",
+ case_72_multi[1], case_72_multi[2],
+ 3, 16, 6.15);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_77_multi",
+ case_77_multi[0], case_77_multi[1],
+ 5, 27, 9.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_78_multi",
+ case_78_multi[0], case_78_multi[1],
+ 1, 16, 22.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",
+ case_101_multi[0], case_101_multi[1],
+ 4, 22, 4.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_102_multi",
+ case_102_multi[0], case_102_multi[1],
+ 3, 26, 19.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_102_multi_inv_b",
+ case_102_multi[1], case_102_multi[2],
+ 6, 25, 3.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi",
+ case_107_multi[0], case_107_multi[1],
+ 2, 10, 1.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi_inv_b",
+ case_107_multi[1], case_107_multi[2],
+ 3, 13, 3.0);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ {
+ // Rescaling misses one intersection
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_108_multi",
+ case_108_multi[0], case_108_multi[1],
+ 7, -1, 7.5);
+ }
+#endif
+
+ TEST_INTERSECTION(case_123_multi, 3, 13, 1.875);
+ TEST_INTERSECTION(case_124_multi, 2, 13, 2.0625);
+ TEST_INTERSECTION(case_125_multi, 3, 17, 2.1);
+ TEST_INTERSECTION(case_126_multi, 5, 27, 9.0);
+ TEST_INTERSECTION(case_127_multi, 3, 19, 24.0);
+ TEST_INTERSECTION(case_128_multi, 2, 26, 75.5);
+ TEST_INTERSECTION(case_129_multi, 1, 20, 20.5);
+ TEST_INTERSECTION(case_130_multi, 2, 30, 39.0);
+
+ TEST_INTERSECTION(case_133_multi, 2, 23, 40.625);
+ TEST_INTERSECTION(case_134_multi, 1, 23, 42.0);
+ TEST_INTERSECTION(case_135_multi, 1, 12, 7.0);
+ TEST_INTERSECTION(case_136_multi, 1, 12, 6.5);
+ TEST_INTERSECTION(case_137_multi, 1, 12, 6.5);
+
+ TEST_INTERSECTION(case_138_multi, 2, 23, 40.4);
+ TEST_INTERSECTION(case_139_multi, 2, 23, 40.546875);
+ TEST_INTERSECTION(case_140_multi, 2, 23, 40.546875);
+ TEST_INTERSECTION(case_141_multi, 3, -1, 74.5);
+
+ TEST_INTERSECTION(case_recursive_boxes_1, 10, 89, 47.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_2",
+ case_recursive_boxes_2[0], case_recursive_boxes_2[1],
+ 1, 50, 90.0); // Area from SQL Server
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
+ case_recursive_boxes_3[0], case_recursive_boxes_3[1],
+ 19, 84, 12.5); // Area from SQL Server
+
+ TEST_INTERSECTION_IGNORE(case_recursive_boxes_4, 13, 158, 67.0);
+
+ // Fixed by replacing handle_tangencies in less_by_segment_ratio sort order
+ // Should contain 6 output polygons
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_6",
+ case_recursive_boxes_6[0], case_recursive_boxes_6[1],
+ 6, 42, 19.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_7",
+ case_recursive_boxes_7[0], case_recursive_boxes_7[1],
+ 2, 9, 1.5);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_8",
+ case_recursive_boxes_8[0], case_recursive_boxes_8[1],
+ 3, 19, 3.75);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_9",
+ case_recursive_boxes_9[0], case_recursive_boxes_9[1],
+ 5, 27, 4.25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_10",
+ case_recursive_boxes_10[0], case_recursive_boxes_10[1],
+ 2, 8, 0.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_11",
+ case_recursive_boxes_11[0], case_recursive_boxes_11[1],
+ 2, 8, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_12",
+ case_recursive_boxes_12[0], case_recursive_boxes_12[1],
+ 1, 4, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_13",
+ case_recursive_boxes_13[0], case_recursive_boxes_13[1],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_14",
+ case_recursive_boxes_14[0], case_recursive_boxes_14[1],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_15",
+ case_recursive_boxes_15[0], case_recursive_boxes_15[1],
+ 1, 4, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_16",
+ case_recursive_boxes_16[0], case_recursive_boxes_16[1],
+ 9, 43, 10.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_17",
+ case_recursive_boxes_17[0], case_recursive_boxes_17[1],
+ 7, -1, 7.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_18",
+ case_recursive_boxes_18[0], case_recursive_boxes_18[1],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_19",
+ case_recursive_boxes_19[0], case_recursive_boxes_19[1],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_20",
+ case_recursive_boxes_20[0], case_recursive_boxes_20[1],
+ 2, 0, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_21",
+ case_recursive_boxes_21[0], case_recursive_boxes_21[1],
+ 1, 0, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_22",
+ case_recursive_boxes_22[0], case_recursive_boxes_22[1],
+ 0, 0, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_23",
+ case_recursive_boxes_23[0], case_recursive_boxes_23[1],
+ 1, 0, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_24",
+ case_recursive_boxes_24[0], case_recursive_boxes_24[1],
+ 1, 0, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_25",
+ case_recursive_boxes_25[0], case_recursive_boxes_25[1],
+ 1, 0, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_26",
+ case_recursive_boxes_26[0], case_recursive_boxes_26[1],
+ 1, 0, 2.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_27",
+ case_recursive_boxes_27[0], case_recursive_boxes_27[1],
+ 1, 0, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_28",
+ case_recursive_boxes_28[0], case_recursive_boxes_28[1],
+ 2, 0, 1.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_29",
+ case_recursive_boxes_29[0], case_recursive_boxes_29[1],
+ 5, 0, 3.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_30",
+ case_recursive_boxes_30[0], case_recursive_boxes_30[1],
+ 4, 0, 6.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_31",
+ case_recursive_boxes_31[0], case_recursive_boxes_31[1],
+ 2, 0, 2.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_32",
+ case_recursive_boxes_32[0], case_recursive_boxes_32[1],
+ 2, 0, 1.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_33",
+ case_recursive_boxes_33[0], case_recursive_boxes_33[1],
+ 3, 0, 2.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_34",
+ case_recursive_boxes_34[0], case_recursive_boxes_34[1],
+ 2, 0, 17.25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_35",
+ case_recursive_boxes_35[0], case_recursive_boxes_35[1],
+ 2, 0, 20.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_36",
+ case_recursive_boxes_36[0], case_recursive_boxes_36[1],
+ 1, 0, 0.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_37",
+ case_recursive_boxes_37[0], case_recursive_boxes_37[1],
+ 2, 0, 1.0);
+
+ TEST_INTERSECTION(case_recursive_boxes_39, 3, 0, 3.0);
+ TEST_INTERSECTION(case_recursive_boxes_40, 1, 0, 1.0);
+ TEST_INTERSECTION(case_recursive_boxes_41, 1, 0, 23.5);
+ TEST_INTERSECTION(case_recursive_boxes_42, 1, 29, 95.0);
+ TEST_INTERSECTION(case_recursive_boxes_43, 2, 0, 22.5);
+ TEST_INTERSECTION(case_recursive_boxes_44, 2, 0, 3.0);
+ TEST_INTERSECTION(case_recursive_boxes_45, 7, 0, 12.0);
+ TEST_INTERSECTION(case_recursive_boxes_46, 6, -1, 7.0);
+ TEST_INTERSECTION(case_recursive_boxes_47, 1, 5, 1.0);
+ TEST_INTERSECTION(case_recursive_boxes_48, 1, 5, 1.0);
+ TEST_INTERSECTION(case_recursive_boxes_49, 7, 57, 20.0);
+ TEST_INTERSECTION(case_recursive_boxes_50, 9, 62, 26.0);
+ TEST_INTERSECTION(case_recursive_boxes_51, 14, 74, 19.0);
+ TEST_INTERSECTION(case_recursive_boxes_52, 8, -1, 22.0);
+ TEST_INTERSECTION(case_recursive_boxes_53, 1, -1, 19.75);
+ TEST_INTERSECTION(case_recursive_boxes_54, 3, -1, 10.0);
+ TEST_INTERSECTION(case_recursive_boxes_55, 5, -1, 2.25);
+ TEST_INTERSECTION(case_recursive_boxes_56, 1, -1, 0.5);
+ TEST_INTERSECTION(case_recursive_boxes_57, 10, -1, 9.5);
+ TEST_INTERSECTION(case_recursive_boxes_58, 1, -1, 0.25);
+ TEST_INTERSECTION(case_recursive_boxes_59, 8, -1, 8.25);
+ TEST_INTERSECTION(case_recursive_boxes_60, 8, -1, 10.0);
+ TEST_INTERSECTION(case_recursive_boxes_61, 2, -1, 20.0);
+ TEST_INTERSECTION(case_recursive_boxes_62, 9, -1, 10.5);
+ TEST_INTERSECTION(case_recursive_boxes_63, 11, -1, 5.75);
+ TEST_INTERSECTION(case_recursive_boxes_64, 5, -1, 17.25);
+ TEST_INTERSECTION(case_recursive_boxes_65, 3, -1, 17.25);
+ TEST_INTERSECTION(case_recursive_boxes_66, 4, -1, 16.0);
+ TEST_INTERSECTION(case_recursive_boxes_67, 5, -1, 2.5);
+ TEST_INTERSECTION(case_recursive_boxes_68, 8, -1, 9.5);
+ TEST_INTERSECTION(case_recursive_boxes_69, 6, -1, 3.25);
+ TEST_INTERSECTION(case_recursive_boxes_70, 6, -1, 18.5);
+ TEST_INTERSECTION(case_recursive_boxes_71, 3, -1, 1.75);
+ TEST_INTERSECTION(case_recursive_boxes_72, 8, -1, 4.5);
+ TEST_INTERSECTION(case_recursive_boxes_73, 3, -1, 18.5);
+ TEST_INTERSECTION(case_recursive_boxes_74, 3, -1, 20.25);
+ TEST_INTERSECTION(case_recursive_boxes_75, 5, -1, 16.75);
+ TEST_INTERSECTION(case_recursive_boxes_76, 2, -1, 18.25);
+ TEST_INTERSECTION(case_recursive_boxes_77, 5, -1, 3.5);
+ TEST_INTERSECTION(case_recursive_boxes_78, 9, -1, 8.0);
+ TEST_INTERSECTION(case_recursive_boxes_79, 5, -1, 9.0);
+ TEST_INTERSECTION(case_recursive_boxes_80, 1, -1, 0.25);
+ TEST_INTERSECTION(case_recursive_boxes_81, 5, -1, 3.75);
+ TEST_INTERSECTION(case_recursive_boxes_82, 5, -1, 8.5);
+ TEST_INTERSECTION(case_recursive_boxes_83, 5, -1, 10.25);
+ TEST_INTERSECTION(case_recursive_boxes_84, 1, -1, 0.5);
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ TEST_INTERSECTION(case_recursive_boxes_85, 1, -1, 0.25);
+#endif
+ TEST_INTERSECTION(case_recursive_boxes_86, 0, -1, 0.0);
+ TEST_INTERSECTION(case_recursive_boxes_87, 0, -1, 0.0);
+ TEST_INTERSECTION(case_recursive_boxes_88, 4, -1, 3.5);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ TEST_INTERSECTION(case_precision_m1, 1, -1, 14.0);
+ TEST_INTERSECTION(case_precision_m2, 2, -1, 15.25);
+ TEST_INTERSECTION_REV(case_precision_m1, 1, -1, 14.0);
+ TEST_INTERSECTION_REV(case_precision_m2, 2, -1, 15.25);
+#else
+ // Validity: false positives (very small triangles looking like a line)
+ TEST_INTERSECTION_IGNORE(case_precision_m1, 1, -1, 14.0);
+ TEST_INTERSECTION_IGNORE(case_precision_m2, 2, -1, 15.25);
+#endif
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
+ 2, 10, 6.0); // Area from SQL Server
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
+ 2, 10, 6.0); // Area from SQL Server
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
+ ticket_9081[0], ticket_9081[1],
+ 2, 10, 0.0019812556);
+
+ // Should generate output, even for <float>
+ test_one<Polygon, MultiPolygon, MultiPolygon>("mail_2019_01_21_johan",
+ mail_2019_01_21_johan[2], mail_2019_01_21_johan[3],
+ 2, -1, 0.0005889587);
+
+ // Very small slice is generated.
+ // qcc-arm reports 1.7791215549400884e-14
+ // With rescaling, generates very small triangle
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_11018",
+ ticket_11018[0], ticket_11018[1],
+ BG_IF_RESCALED(1, 0), 0,
+ 1.0e-8, ut_settings(-1)
+ );
+
+ TEST_INTERSECTION(ticket_12503, 2, 13, 17.375);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Result is wrong with rescaling
+ TEST_INTERSECTION(issue_630_a, 1, -1, 0.1770);
+#endif
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Two cases produce either too large, or no output if Kramer rule is used
+ TEST_INTERSECTION(issue_630_b, 1, -1, BG_IF_KRAMER(0.1714, 0.1713911));
+ TEST_INTERSECTION(issue_630_c, 1, -1, 0.1770);
+#endif
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Result is missing with rescaling
+ TEST_INTERSECTION(issue_643, 1, -1, 3.4615);
+#endif
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("mysql_23023665_7",
+ mysql_23023665_7[0], mysql_23023665_7[1],
+ 2, 11, 9.80505786783);
+
+ TEST_INTERSECTION(mysql_23023665_12, 2, 0, 11.812440191387557);
+ TEST_INTERSECTION(mysql_regression_1_65_2017_08_31, 2, -1, 29.9022122);
+}
+
+template <typename Polygon, typename MultiPolygon, typename Box>
+void test_areal_clip()
+{
+ static std::string const clip = "POLYGON((1 1,4 4))";
+ test_one<Polygon, Box, MultiPolygon>("simplex_multi_mp_b", clip, case_multi_simplex[0],
+ 2, 11, 6.791666);
+ test_one<Polygon, MultiPolygon, Box>("simplex_multi_b_mp", case_multi_simplex[0], clip,
+ 2, 11, 6.791666);
+}
+
+template <typename LineString, typename MultiLineString, typename Box>
+void test_linear()
+{
+ typedef typename bg::point_type<MultiLineString>::type point;
+ test_one<point, MultiLineString, MultiLineString>("case_multi_ml_ml_1",
+ "MULTILINESTRING((0 0,1 1))", "MULTILINESTRING((0 1,1 0))",
+ 1, 1, 0.0);
+ test_one<point, MultiLineString, MultiLineString>("case_multi_ml_ml_2",
+ "MULTILINESTRING((0 0,1 1),(0.5 0,1.5 1))", "MULTILINESTRING((0 1,1 0),(0.5 1,1.5 0))",
+ 4, 4, 0.0);
+
+ test_one<point, LineString, MultiLineString>("case_multi_l_ml",
+ "LINESTRING(0 0,1 1)", "MULTILINESTRING((0 1,1 0),(0.5 1,1.5 0))",
+ 2, 2, 0.0);
+ test_one<point, MultiLineString, LineString>("case_multi_ml_l",
+ "MULTILINESTRING((0 1,1 0),(0.5 1,1.5 0))", "LINESTRING(0 0,1 1)",
+ 2, 2, 0.0);
+
+ test_one<LineString, MultiLineString, Box>("case_multi_ml_b",
+ "MULTILINESTRING((0 0,3 3)(1 0,4 3))", "POLYGON((1 1,3 2))",
+ 2, 4, 2.0 * std::sqrt(2.0));
+ test_one<LineString, Box, MultiLineString>("case_multi_b_ml",
+ "POLYGON((1 1,3 2))", "MULTILINESTRING((0 0,3 3)(1 0,4 3))",
+ 2, 4, 2.0 * std::sqrt(2.0));
+}
+
+template <typename P>
+void test_point_output()
+{
+ typedef bg::model::box<P> box;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ test_point_output<multi_polygon, multi_polygon>(case_multi_simplex[0], case_multi_simplex[1], 10);
+ test_point_output<linestring, multi_polygon>("linestring(4 0,0 4)", case_multi_simplex[0], 4);
+ test_point_output<box, multi_polygon>("box(3 0,4 6)", case_multi_simplex[0], 8);
+}
+
+template <typename MultiPolygon, typename MultiLineString>
+void test_areal_linear()
+{
+ typedef typename boost::range_value<MultiPolygon>::type Polygon;
+ typedef typename boost::range_value<MultiLineString>::type LineString;
+ typedef typename bg::point_type<Polygon>::type Point;
+ typedef bg::model::ring<Point> Ring;
+
+ test_one_lp<LineString, MultiPolygon, LineString>("case_mp_ls_1", case_multi_simplex[0], "LINESTRING(2 0,2 5)", 2, 4, 3.70);
+ test_one_lp<LineString, Polygon, MultiLineString>("case_p_mls_1", case_single_simplex, "MULTILINESTRING((2 0,2 5),(3 0,3 5))", 2, 4, 7.5);
+ test_one_lp<LineString, MultiPolygon, MultiLineString>("case_mp_mls_1", case_multi_simplex[0], "MULTILINESTRING((2 0,2 5),(3 0,3 5))", 4, 8, 6.8333333);
+ test_one_lp<LineString, Ring, MultiLineString>("case_r_mls_1", case_single_simplex, "MULTILINESTRING((2 0,2 5),(3 0,3 5))", 2, 4, 7.5);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ test_areal<ring, polygon, multi_polygon>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+
+ typedef bg::model::ring<P, false> ring_ccw;
+ typedef bg::model::polygon<P, false> polygon_ccw;
+ typedef bg::model::multi_polygon<polygon_ccw> multi_polygon_ccw;
+ test_areal<ring_ccw, polygon_ccw, multi_polygon_ccw>();
+
+ typedef bg::model::ring<P, true, false> ring_open;
+ typedef bg::model::polygon<P, true, false> polygon_open;
+ typedef bg::model::multi_polygon<polygon_open> multi_polygon_open;
+ test_areal<ring_open, polygon_open, multi_polygon_open>();
+
+ typedef bg::model::ring<P, false, false> ring_open_ccw;
+ typedef bg::model::polygon<P, false, false> polygon_open_ccw;
+ typedef bg::model::multi_polygon<polygon_open_ccw> multi_polygon_open_ccw;
+ test_areal<ring_open_ccw, polygon_open_ccw, multi_polygon_open_ccw>();
+
+ typedef bg::model::box<P> box;
+ test_areal_clip<polygon, multi_polygon, box>();
+ test_areal_clip<polygon_ccw, multi_polygon_ccw, box>();
+
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::multi_linestring<linestring> multi_linestring;
+
+ test_linear<linestring, multi_linestring, box>();
+ test_areal_linear<multi_polygon, multi_linestring>();
+#endif
+
+ test_point_output<P>();
+ // linear
+
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+ test_all<bg::model::d2::point_xy<default_test_type> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<float> >();
+
+#if defined(HAVE_TTMATH)
+ std::cout << "Testing TTMATH" << std::endl;
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_a.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_a.cpp
new file mode 100644
index 000000000..0fef842c5
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_a.cpp
@@ -0,0 +1,190 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2020, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_intersection_pointlike_areal
+#endif
+
+#include <iostream>
+#include <algorithm>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> Pt;
+typedef bg::model::polygon<Pt> Po;
+typedef bg::model::ring<Pt> R;
+typedef bg::model::multi_point<Pt> MPt;
+typedef bg::model::multi_polygon<Po> MPo;
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_ring )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ Pt, R, MPt, bg::overlay_intersection
+ > tester;
+
+ tester::apply(
+ "pt-r-01",
+ from_wkt<Pt>("POINT(0 0)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply(
+ "pt-r-02",
+ from_wkt<Pt>("POINT(1 1)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply(
+ "pt-r-03",
+ from_wkt<Pt>("POINT(6 6)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_polygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ Pt, Po, MPt, bg::overlay_intersection
+ > tester;
+
+ tester::apply(
+ "pt-po-01",
+ from_wkt<Pt>("POINT(0 0)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 3 1, 3 3, 1 3, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply(
+ "pt-po-02",
+ from_wkt<Pt>("POINT(1 1)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 3 1, 3 3, 1 3, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+
+ tester::apply(
+ "pt-po-03",
+ from_wkt<Pt>("POINT(3 3)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 3 1, 3 3, 1 3, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(3 3)")
+ );
+
+ tester::apply(
+ "pt-po-04",
+ from_wkt<Pt>("POINT(4 4)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 3 1, 3 3, 1 3, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(4 4)")
+ );
+
+ tester::apply(
+ "pt-po-05",
+ from_wkt<Pt>("POINT(6 6)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 3 1, 3 3, 1 3, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_multipolygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ Pt, MPo, MPt, bg::overlay_intersection
+ > tester;
+
+ tester::apply(
+ "pt-mpo-01",
+ from_wkt<Pt>("POINT(0 0)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))"),
+ from_wkt<MPt>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply(
+ "pt-mpo-02",
+ from_wkt<Pt>("POINT(1 1)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))"),
+ from_wkt<MPt>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply(
+ "pt-mpo-03",
+ from_wkt<Pt>("POINT(2 2)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))"),
+ from_wkt<MPt>("MULTIPOINT(2 2)")
+ );
+
+ tester::apply(
+ "pt-mpo-04",
+ from_wkt<Pt>("POINT(3 3)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))"),
+ from_wkt<MPt>("MULTIPOINT()")
+ );
+}
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_ring )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MPt, R, MPt, bg::overlay_intersection
+ > tester;
+
+ tester::apply(
+ "mpt-r-01",
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1, 6 6)"),
+ from_wkt<R>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_polygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MPt, Po, MPt, bg::overlay_intersection
+ > tester;
+
+ tester::apply(
+ "mpt-po-01",
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1, 3 3, 4 4, 6 6)"),
+ from_wkt<Po>("POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 3 1, 3 3, 1 3, 0 0))"),
+ from_wkt<MPt>("MULTIPOINT(0 0, 3 3, 4 4)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_multipolygon )
+{
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MPt, MPo, MPt, bg::overlay_intersection
+ > tester;
+
+ tester::apply(
+ "mpt-mpo-01",
+ from_wkt<MPt>("MULTIPOINT(0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6)"),
+ from_wkt<MPo>("MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))"),
+ // NOTE: This is caused by the fact that intersection(MPt, MPt)
+ // used internally does not filter duplicates out.
+ from_wkt<MPt>("MULTIPOINT(0 0, 0 0, 1 1, 2 2, 4 4, 5 5)")
+ );
+} \ No newline at end of file
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_l.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_l.cpp
new file mode 100644
index 000000000..fd4575f0b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_l.cpp
@@ -0,0 +1,702 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_intersection_pointlike_linear
+#endif
+
+#include <iostream>
+#include <algorithm>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / SEGMENT INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef segment_type S;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, S, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("psi01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("psi02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("psi03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<S>("SEGMENT(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("psi04",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<S>("SEGMENT(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / LINESTRING INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef linestring_type L;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, L, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("pli01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pli02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pli03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("pli04",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<L>("LINESTRING(0 0,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ // linestrings with more than two points
+ tester::apply
+ ("pli05",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("pli06",
+ from_wkt<P>("POINT(2 2)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT(2 2)")
+ );
+
+ tester::apply
+ ("pli07",
+ from_wkt<P>("POINT(10 10)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pli08",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pli09",
+ from_wkt<P>("POINT(4 4)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT(4 4)")
+ );
+
+ tester::apply
+ ("pli10",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,4 4)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / MULTILINESTRING INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_linestring_type ML;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, ML, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("pmli01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmli02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1))"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pmli03",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2))"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("pmli04",
+ from_wkt<P>("POINT(3 3)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 2))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ // linestrings with more than two points
+ tester::apply
+ ("pmli05",
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,2 2))"),
+ from_wkt<MP>("MULTIPOINT(1 1)")
+ );
+
+ tester::apply
+ ("pmli06",
+ from_wkt<P>("POINT(2 2)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(2 2)")
+ );
+
+ tester::apply
+ ("pmli07",
+ from_wkt<P>("POINT(10 10)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmli08",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmli09",
+ from_wkt<P>("POINT(4 4)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(4 4)")
+ );
+
+ tester::apply
+ ("pmli10",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ // multilinestrings with more than one linestring
+ tester::apply
+ ("pmli11",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10,-10),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pmli12",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,0 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pmli13",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("pmli14",
+ from_wkt<P>("POINT(-20 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmli15",
+ from_wkt<P>("POINT(0 1)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("pmli16",
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(-1 0,2 0,20 0))"),
+ from_wkt<MP>("MULTIPOINT(1 0)")
+ );
+
+ tester::apply
+ ("pmli17",
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<ML>("MULTILINESTRING((-10 0,10 0),(0 -1,0 2,0 4))"),
+ from_wkt<MP>("MULTIPOINT(1 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_segment )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / SEGMENT INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+ typedef segment_type S;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, S, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("mpsi01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mpsi03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsi05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<S>("SEGMENT(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsf06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<S>("SEGMENT(1 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0)")
+ );
+
+ tester::apply
+ ("mpsi07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsi07a",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(0 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)")
+ );
+
+ tester::apply
+ ("mpsi08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<S>("SEGMENT(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi09",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(-1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsi10",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpsi11",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(-1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)")
+ );
+
+ tester::apply
+ ("mpsi12",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi12a",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi12b",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi12c",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0,2 0,0 0)"),
+ from_wkt<S>("SEGMENT(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi13",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(2 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpsi14",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<S>("SEGMENT(0 0,0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpsi15",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<S>("SEGMENT(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpsi16",
+ from_wkt<MP>("MULTIPOINT(0 0,2 0,0 0,2 0,0 0)"),
+ from_wkt<S>("SEGMENT(-1 0,10 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,0 0,2 0,2 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / LINESTRING INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+ typedef linestring_type L;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, L, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("mpli01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2,3 3,4 4,5 5)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpli02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mpli03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpli04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpli05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 2)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpli06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0)")
+ );
+
+ tester::apply
+ ("mpli07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpli08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<L>("LINESTRING(0 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpli09",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(-1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpli10",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpli10a",
+ from_wkt<MP>("MULTIPOINT(2 0,0 0,2 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0,2 0,2 0)")
+ );
+
+ tester::apply
+ ("mpli11",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(-1 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0,0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpli12",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(3 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpli13",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(2 0)")
+ );
+
+ tester::apply
+ ("mpli14",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,2 0)"),
+ from_wkt<L>("LINESTRING(0 0,0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpli15",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<L>("LINESTRING(0 0,1 0,2 0,3 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpli16",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<L>("LINESTRING()"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / MULTILINESTRING INTERSECTION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+ typedef multi_linestring_type ML;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, ML, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("mpmli01",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(1 0)")
+ );
+
+ tester::apply
+ ("mpmli02",
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(2 2,2 2,3 3,1 1,1 1,1 0,1 0)")
+ );
+
+ tester::apply
+ ("mpmli03",
+ from_wkt<MP>("MULTIPOINT(5 5,3 3,0 0,0 0,5 5,1 1,1 1,1 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,1 1,4 4))"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 0,3 3,1 1,1 1)")
+ );
+
+ tester::apply
+ ("mpmli04",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,0 0,1 1,0 0))"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,1 1)")
+ );
+
+ tester::apply
+ ("mpmli05",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,0 0,1 2,1 0),\
+ (0 1,2 0,0 10,2 0,2 10,5 10,5 0,5 10))"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,5 0)")
+ );
+
+ tester::apply
+ ("mpmli06",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<ML>("MULTILINESTRING(())"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmli07",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<ML>("MULTILINESTRING(())"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmli08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(9 0,10 0))"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmli09",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,0 0,0 0,0 0,0 0,0 0,0 0,\
+ 0 0,0 0,0 0,0 0,0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 1),(0 0,2 0),(0 0,0 3),\
+ (0 0,4 0),(0 0,0 5),(0 0,6 0),(0 0,7 0),(0 0,8 0))"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,0 0,0 0,0 0,0 0,0 0,\
+ 0 0,0 0,0 0,0 0,0 0)")
+ );
+
+ tester::apply
+ ("mpmli09a",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0 1),(0 0,2 0),(0 0,0 3),\
+ (0 0,4 0),(0 0,0 5),(0 0,6 0),(0 0,7 0),(0 0,8 0))"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)")
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_pl.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_pl.cpp
new file mode 100644
index 000000000..e564040e4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_pl_pl.cpp
@@ -0,0 +1,201 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_intersection_pointlike_pointlike
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/multi_point.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_point_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / POINT INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, P, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("ppi01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("ppi02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / POINT INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, P, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("mppi01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppi02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mppi03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppi04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mppi05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mppi06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0)")
+ );
+
+ tester::apply
+ ("mppi07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mppi08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_intersection_multipoint_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / MULTIPOINT INTERSECTION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, MP, MP, bg::overlay_intersection
+ > tester;
+
+ tester::apply
+ ("mpmpi01",
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)")
+ );
+
+ tester::apply
+ ("mpmp02",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
+ );
+
+ tester::apply
+ ("mpmpi03",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmpi04",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmpi05",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmpi06",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,2 0)")
+ );
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_segment.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_segment.cpp
new file mode 100644
index 000000000..664d37c9b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_segment.cpp
@@ -0,0 +1,134 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+#include <ostream>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include <boost/config.hpp>
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+#include <boost/geometry/algorithms/intersection_segment.hpp>
+#include <boost/geometry/io/wkt/aswkt.hpp>
+
+static std::ostream & operator<<(std::ostream &s, const bg::intersection_result& r)
+{
+ switch(r)
+ {
+ case bg::is_intersect_no : s << "is_intersect_no"; break;
+ case bg::is_intersect : s << "is_intersect"; break;
+ case bg::is_parallel : s << "is_parallel"; break;
+ case bg::is_collinear_no : s << "is_collinear_no"; break;
+ case bg::is_collinear_one : s << "is_collinear_one"; break;
+ case bg::is_collinear_connect : s << "is_collinear_connect"; break;
+ case bg::is_collinear_overlap : s << "is_collinear_overlap"; break;
+ case bg::is_collinear_overlap_opposite : s << "is_collinear_overlap_opposite"; break;
+ case bg::is_collinear_connect_opposite : s << "is_collinear_connect_opposite"; break;
+
+ // detailed connection results:
+ case bg::is_intersect_connect_s1p1 : s << "is_intersect_connect_s1p1"; break;
+ case bg::is_intersect_connect_s1p2 : s << "is_intersect_connect_s1p2"; break;
+ case bg::is_intersect_connect_s2p1 : s << "is_intersect_connect_s2p1"; break;
+ case bg::is_intersect_connect_s2p2 : s << "is_intersect_connect_s2p2"; break;
+ }
+ return s;
+}
+
+static std::string as_string(const bg::intersection_result& r)
+{
+ std::stringstream out;
+ out << r;
+ return out.str();
+}
+
+typedef bg::model::point<double> P;
+typedef bg::const_segment<P> S;
+
+
+static void test_intersection(double s1x1, double s1y1, double s1x2, double s1y2,
+ double s2x1, double s2y1, double s2x2, double s2y2,
+ // Expected results
+ bg::intersection_result expected_result,
+ int exptected_count, const P& exp_p1, const P& exp_p2)
+{
+ S s1(P(s1x1, s1y1), P(s1x2, s1y2));
+ S s2(P(s2x1, s2y1), P(s2x2, s2y2));
+ std::vector<P> ip;
+ double ra, rb;
+ bg::intersection_result r = bg::intersection_s(s1, s2, ra, rb, ip);
+ r = bg::intersection_connect_result(r, ra, rb);
+
+ BOOST_CHECK_EQUAL(ip.size(), exptected_count);
+ BOOST_CHECK_EQUAL(as_string(expected_result), as_string(r));
+
+ if (ip.size() == 2 && ip[0] != exp_p1)
+ {
+ // Swap results, second point is not as expected, swap results, order is not prescribed,
+ // it might be OK.
+ std::reverse(ip.begin(), ip.end());
+ }
+
+ if (ip.size() >= 1)
+ {
+ BOOST_CHECK_EQUAL(ip[0], exp_p1);
+ }
+ if (ip.size() >= 2)
+ {
+ BOOST_CHECK_EQUAL(ip[1], exp_p2);
+ }
+
+
+ /*
+ std::cout << exptected_count << " " << r;
+ if (exptected_count >= 1) std::cout << " " << ip[0];
+ if (exptected_count >= 2) std::cout << " " << ip[1];
+ std::cout << std::endl;
+ */
+}
+
+//BOOST_AUTO_TEST_CASE( test1 )
+int test_main( int , char* [] )
+{
+ // Identical cases
+ test_intersection(0,0, 1,1, 0,0, 1,1, bg::is_collinear_overlap, 2, P(0,0), P(1,1));
+ test_intersection(1,1, 0,0, 0,0, 1,1, bg::is_collinear_overlap_opposite, 2, P(1,1), P(0,0));
+ test_intersection(0,1, 0,2, 0,1, 0,2, bg::is_collinear_overlap, 2, P(0,1), P(0,2)); // Vertical
+ test_intersection(0,2, 0,1, 0,1, 0,2, bg::is_collinear_overlap_opposite, 2, P(0,2), P(0,1)); // Vertical
+ // Overlap cases
+ test_intersection(0,0, 1,1, -0.5,-0.5, 2,2, bg::is_collinear_overlap, 2, P(0,0), P(1,1));
+ test_intersection(0,0, 1,1, 0.5,0.5, 1.5,1.5, bg::is_collinear_overlap, 2, P(0.5,0.5), P(1,1));
+ test_intersection(0,0, 0,1, 0,-10, 0,10, bg::is_collinear_overlap, 2, P(0,0), P(0,1)); // Vertical
+ test_intersection(0,0, 0,1, 0,10, 0,-10, bg::is_collinear_overlap_opposite, 2, P(0,0), P(0,1)); // Vertical
+ test_intersection(0,0, 1,1, 1,1, 2,2, bg::is_collinear_connect, 1, P(1,1), P(0,0)); // Single point
+ // Colinear, non overlap cases
+ test_intersection(0,0, 1,1, 1.5,1.5, 2.5,2.5, bg::is_collinear_no, 0, P(0,0), P(0,0));
+ test_intersection(0,0, 0,1, 0,5, 0,6, bg::is_collinear_no, 0, P(0,0), P(0,0)); // Vertical
+ // Parallel cases
+ test_intersection(0,0, 1,1, 1,0, 2,1, bg::is_parallel, 0, P(0,0), P(0,1));
+ // Intersect cases
+ test_intersection(0,2, 4,2, 3,0, 3,4, bg::is_intersect, 1, P(3,2), P(0,0));
+ // Non intersect cases
+
+ // Single point cases
+ test_intersection(0,0, 0,0, 1,1, 2,2, bg::is_collinear_no, 0, P(1,1), P(0,0)); // Colinear/no
+ test_intersection(2,2, 2,2, 1,1, 3,3, bg::is_collinear_one, 1, P(2,2.01), P(0,0)); // On segment
+ test_intersection(1,1, 3,3, 2,2, 2,2, bg::is_collinear_one, 1, P(2,2), P(0,0)); // On segment
+ test_intersection(1,1, 3,3, 1,1, 1,1, bg::is_collinear_one, 1, P(1,1), P(0,0)); // On segment, start
+ test_intersection(1,1, 3,3, 3,3, 3,3, bg::is_collinear_one, 1, P(3,3), P(0,0)); // On segment, end
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_tupled.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_tupled.cpp
new file mode 100644
index 000000000..43283dddf
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_tupled.cpp
@@ -0,0 +1,365 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2020, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/cartesian/area.hpp>
+#include <boost/geometry/strategies/cartesian/intersection.hpp>
+#include <boost/geometry/strategies/cartesian/point_in_poly_winding.hpp>
+#include <boost/geometry/strategies/cartesian/point_in_point.hpp>
+
+#include <boost/tuple/tuple.hpp>
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> Pt;
+typedef bg::model::linestring<Pt> Ls;
+typedef bg::model::polygon<Pt> Po;
+typedef bg::model::ring<Pt> R;
+typedef bg::model::multi_point<Pt> MPt;
+typedef bg::model::multi_linestring<Ls> MLs;
+typedef bg::model::multi_polygon<Po> MPo;
+
+#ifdef BOOST_GEOMETRY_CXX11_TUPLE
+
+#include <tuple>
+
+#endif
+
+template <typename G>
+inline void check(std::string const& wkt1,
+ std::string const& wkt2,
+ G const& g,
+ std::string const& expected)
+{
+ G expect;
+ bg::read_wkt(expected, expect);
+ bg::correct(expect);
+ if (! boost::empty(g) || ! boost::empty(expect))
+ {
+ BOOST_CHECK_MESSAGE(
+ // Commented out becasue the output in reversed case may be slightly different
+ // e.g. different number of duplicated points in MultiPoint
+ //boost::size(g) == boost::size(expect) &&
+ bg::equals(g, expect),
+ wkt1 << " x " << wkt2 << " -> " << bg::wkt(g)
+ << " different than expected: " << expected
+ );
+ }
+}
+
+inline void check(std::string const& wkt1,
+ std::string const& wkt2,
+ boost::tuple<MPt, MLs, MPo> const& tup,
+ std::string const& out_p_str,
+ std::string const& out_l_str,
+ std::string const& out_a_str)
+{
+ check(wkt1, wkt2, boost::get<0>(tup), out_p_str);
+ check(wkt1, wkt2, boost::get<1>(tup), out_l_str);
+ check(wkt1, wkt2, boost::get<2>(tup), out_a_str);
+}
+
+inline void check(std::string const& wkt1,
+ std::string const& wkt2,
+ std::pair<MPt, MLs> const& pair,
+ std::string const& out_p_str,
+ std::string const& out_l_str,
+ std::string const& )
+{
+ check(wkt1, wkt2, pair.first, out_p_str);
+ check(wkt1, wkt2, pair.second, out_l_str);
+}
+
+#ifdef BOOST_GEOMETRY_CXX11_TUPLE
+
+inline void check(std::string const& wkt1,
+ std::string const& wkt2,
+ std::tuple<MPt, MLs, MPo> const& tup,
+ std::string const& out_p_str,
+ std::string const& out_l_str,
+ std::string const& out_a_str)
+{
+ check(wkt1, wkt2, std::get<0>(tup), out_p_str);
+ check(wkt1, wkt2, std::get<1>(tup), out_l_str);
+ check(wkt1, wkt2, std::get<2>(tup), out_a_str);
+}
+
+#endif
+
+template <typename In1, typename In2, typename Tup>
+inline void test_one(std::string const& in1_str,
+ std::string const& in2_str,
+ std::string const& out_p_str = "MULTIPOINT()",
+ std::string const& out_l_str = "MULTILINESTRING()",
+ std::string const& out_a_str = "MULTIPOLYGON()")
+{
+ In1 in1;
+ bg::read_wkt(in1_str, in1);
+ bg::correct(in1);
+
+ In2 in2;
+ bg::read_wkt(in2_str, in2);
+ bg::correct(in2);
+
+ {
+ Tup result;
+ bg::intersection(in1, in2, result);
+ check(in1_str, in2_str, result, out_p_str, out_l_str, out_a_str);
+ }
+ {
+ Tup result;
+ bg::intersection(in2, in1, result);
+ check(in1_str, in2_str, result, out_p_str, out_l_str, out_a_str);
+ }
+}
+
+template <typename Tup>
+inline void test_pp()
+{
+ test_one<Pt, Pt, Tup>(
+ "POINT(0 0)",
+ "POINT(0 0)",
+ "MULTIPOINT(0 0)");
+
+ test_one<Pt, MPt, Tup>(
+ "POINT(0 0)",
+ "MULTIPOINT(0 0, 1 1)",
+ "MULTIPOINT(0 0)");
+
+ test_one<MPt, MPt, Tup>(
+ "MULTIPOINT(0 0, 1 1, 2 2)",
+ "MULTIPOINT(1 1, 2 2, 3 3)",
+ "MULTIPOINT(1 1, 2 2)");
+}
+
+template <typename Tup>
+inline void test_pl()
+{
+ test_one<Pt, Ls, Tup>(
+ "POINT(0 0)",
+ "LINESTRING(0 0, 1 1)",
+ "MULTIPOINT(0 0)");
+
+ test_one<Pt, MLs, Tup>(
+ "POINT(1 1)",
+ "MULTILINESTRING((0 0, 1 1),(1 1, 2 2),(4 4, 5 5))",
+ "MULTIPOINT(1 1)");
+
+ test_one<MPt, Ls, Tup>(
+ "MULTIPOINT(0 0, 1 1, 2 2, 3 3)",
+ "LINESTRING(0 0, 1 1)",
+ "MULTIPOINT(0 0, 1 1)");
+
+ test_one<MPt, MLs, Tup>(
+ "MULTIPOINT(0 0, 1 1, 2 2, 3 3)",
+ "MULTILINESTRING((0 0, 1 1),(1 1, 2 2),(4 4, 5 5))",
+ "MULTIPOINT(0 0, 1 1, 2 2)");
+}
+
+template <typename Tup>
+inline void test_pa()
+{
+ test_one<Pt, R, Tup>(
+ "POINT(0 0)",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))",
+ "MULTIPOINT(0 0)");
+
+ test_one<Pt, Po, Tup>(
+ "POINT(0 0)",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "MULTIPOINT(0 0)");
+
+ test_one<Pt, MPo, Tup>(
+ "POINT(0 0)",
+ "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))",
+ "MULTIPOINT(0 0)");
+
+ test_one<MPt, R, Tup>(
+ "MULTIPOINT(0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6)",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))",
+ "MULTIPOINT(0 0, 1 1, 2 2, 3 3, 4 4, 5 5)");
+
+ test_one<MPt, Po, Tup>(
+ "MULTIPOINT(0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6)",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "MULTIPOINT(0 0, 4 4, 5 5)");
+
+ test_one<MPt, MPo, Tup>(
+ "MULTIPOINT(0 0, 0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6)",
+ "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))",
+ "MULTIPOINT(0 0, 0 0, 1 1, 2 2, 4 4, 5 5)"); // one (0 0) could be filtered out
+}
+
+template <typename Tup>
+inline void test_ll()
+{
+ test_one<Ls, Ls, Tup>(
+ "LINESTRING(0 0, 1 0, 2 1, 3 0)",
+ "LINESTRING(0 0, 1 0, 3 0, 4 0)",
+ "MULTIPOINT(3 0)",
+ "MULTILINESTRING((0 0, 1 0))");
+
+ test_one<Ls, MLs, Tup>(
+ "LINESTRING(0 0, 1 0, 2 1, 3 0)",
+ "MULTILINESTRING((0 0, 1 0, 3 0),(2 1, 2 2))",
+ "MULTIPOINT(3 0, 2 1)",
+ "MULTILINESTRING((0 0, 1 0))");
+
+ test_one<MLs, MLs, Tup>(
+ "MULTILINESTRING((0 0, 1 0, 2 1),(2 1, 3 0))",
+ "MULTILINESTRING((0 0, 1 0, 3 0),(2 1, 2 2))",
+ "MULTIPOINT(3 0, 2 1, 2 1)", // (2 1) could be filtered out
+ "MULTILINESTRING((0 0, 1 0))");
+
+
+ test_one<Ls, Ls, Tup>(
+ "LINESTRING(0 0, 0 5, 5 5, 5 0, 0 0)",
+ "LINESTRING(0 0, 0 1, 6 1, 5 2, 5 5, 5 6, 4 5, 4 7, 7 7, 7 0, 0 0)",
+ "MULTIPOINT(4 5, 5 1, 0 0)", // (0 0) could be filtered out
+ "MULTILINESTRING((0 0, 0 1), (5 5, 5 2), (5 0, 0 0))");
+
+ test_one<MLs, MLs, Tup>(
+ "MULTILINESTRING((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "MULTILINESTRING((0 0, 1 4, 5 4, 5 1, 4 1, 0 0),(0 0, 2 1, 2 2, 1 2, 0 0))",
+ // all (0 0) could be filtered out
+ "MULTIPOINT(0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0)",
+ "MULTILINESTRING((5 4,5 1),(0 0,4 1),(4 4,1 4,0 0))");
+}
+
+template <typename Tup>
+inline void test_la()
+{
+ test_one<Ls, R, Tup>(
+ "LINESTRING(0 2, -4 1, 0 0, 5 0, 9 1, 5 2, 9 3, 5 5, 4 9, 4 5, 3 3, 2 5, 2 9, 0 5)",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))",
+ "MULTIPOINT(0 2, 5 2, 5 5, 0 5)",
+ "MULTILINESTRING((0 0, 5 0),(4 5, 3 3, 2 5))");
+
+ test_one<Ls, Po, Tup>(
+ "LINESTRING(1 4, -4 1, 0 0, 5 0, 9 1, 5 2, 9 3, 5 5, 4 9, 4 5, 3 3, 2 5, 2 9, 0 5)",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "MULTIPOINT(5 2, 5 5, 0 5)",
+ "MULTILINESTRING((1 4, 0 3.4)(0 0, 5 0),(4 5, 3.5 4),(2.5 4, 2 5))");
+
+ test_one<MLs, R, Tup>(
+ "MULTILINESTRING((0 2, -4 1, 0 0, 5 0, 9 1, 5 2, 9 3, 5 5, 4 9), (4 9, 4 5, 3 3, 2 5, 2 9, 0 5))",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))",
+ "MULTIPOINT(0 2, 5 2, 5 5, 0 5)",
+ "MULTILINESTRING((0 0, 5 0),(4 5, 3 3, 2 5))");
+
+ test_one<MLs, Po, Tup>(
+ "MULTILINESTRING((1 4, -4 1, 0 0, 5 0, 9 1, 5 2, 9 3, 5 5, 4 9), (4 9, 4 5, 3 3, 2 5, 2 9, 0 5))",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "MULTIPOINT(5 2, 5 5, 0 5)",
+ "MULTILINESTRING((1 4, 0 3.4)(0 0, 5 0),(4 5, 3.5 4),(2.5 4, 2 5))");
+
+ test_one<MLs, MPo, Tup>(
+ "MULTILINESTRING((1 4, -4 1, 0 0, 5 0, 9 1, 5 2, 9 3, 5 5, 4 9), (4 9, 4 5, 4 4, 2 2, 2 5, 1 9, 0 5))",
+ "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),((0 0, 1 2, 2 2, 2 1, 0 0)))",
+ "MULTIPOINT(5 2, 5 5, 2 2, 0 5)",
+ "MULTILINESTRING((1 4, 0 3.4)(0 0, 5 0),(4 5, 4 4),(2 4, 2 5))");
+
+
+ test_one<Ls, R, Tup>(
+ "LINESTRING(0 0, 0 5, 5 5, 5 0, 0 0)",
+ "POLYGON((0 0, 0 1, 6 1, 5 2, 5 5, 5 6, 4 5, 4 7, 7 7, 7 0, 0 0))",
+ "MULTIPOINT(4 5)",
+ "MULTILINESTRING((0 0, 0 1), (5 5, 5 2), (5 1, 5 0, 0 0))");
+
+ test_one<MLs, Po, Tup>(
+ "MULTILINESTRING((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "POLYGON((0 0, 1 4, 5 4, 5 1, 4 1, 0 0),(0 0, 2 1, 2 2, 1 2, 0 0))",
+ "MULTIPOINT(0 0)", // (0 0) could be filtered out
+ "MULTILINESTRING((5 4, 5 1),(0 0, 4 1, 4 4, 1 4, 0 0))");
+}
+
+template <typename Tup>
+inline void test_aa()
+{
+ test_one<R, R, Tup>(
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))",
+ "POLYGON((0 0, 0 1, 6 1, 5 2, 5 5, 5 6, 4 5, 4 7, 7 7, 7 0, 0 0))",
+ "MULTIPOINT(4 5)",
+ "MULTILINESTRING((5 2, 5 5))",
+ "MULTIPOLYGON(((0 0, 0 1, 5 1, 5 0, 0 0)))");
+
+ test_one<R, MPo, Tup>(
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))",
+ "MULTIPOLYGON(((0 0, 0 1, 6 1, 6 0, 0 0)),"
+ "((6 1, 5 2, 5 5, 5 6, 4 5, 4 7, 7 7, 7 1, 6 1)))",
+ "MULTIPOINT(4 5)",
+ "MULTILINESTRING((5 2, 5 5))",
+ "MULTIPOLYGON(((0 0, 0 1, 5 1, 5 0, 0 0)))");
+
+ test_one<Po, Po, Tup>(
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "POLYGON((0 0, 1 4, 5 4, 5 1, 4 1, 0 0),(0 0, 2 1, 2 2, 1 2, 0 0))",
+ // all (0 0) could be filtered out
+ "MULTIPOINT(0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0)",
+ "MULTILINESTRING((0 0, 1 4, 4 4),(0 0, 4 1))",
+ "MULTIPOLYGON(((4 1, 4 4, 5 4, 5 1, 4 1)))");
+
+ test_one<Po, MPo, Tup>(
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0))",
+ "MULTIPOLYGON(((0 0, 1 4, 5 4, 5 1, 4 1, 0 0),(0 0, 2 1, 2 2, 1 2, 0 0)),"
+ "((5 0, 5 1, 6 1, 6 4, 5 4, 3 6, 2 5, 2 7, 7 7, 7 0 5 0)))",
+ // all (0 0) and (5 0) could be filtered out
+ "MULTIPOINT(2 5, 5 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0)",
+ "MULTILINESTRING((0 0, 1 4, 4 4),(0 0, 4 1),(5 1, 5 0))",
+ "MULTIPOLYGON(((4 1, 4 4, 5 4, 5 1, 4 1)),((5 4, 4 5, 5 5, 5 4)))");
+
+ test_one<MPo, MPo, Tup>(
+ "MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0),(0 0, 4 1, 4 4, 1 4, 0 0)),"
+ "((2 6, 2 8, 8 8, 8 5, 7 5, 7 6, 2 6)))",
+ "MULTIPOLYGON(((0 0, 1 4, 5 4, 5 1, 4 1, 0 0),(0 0, 2 1, 2 2, 1 2, 0 0)),"
+ "((5 0, 5 1, 6 1, 6 4, 5 4, 3 6, 2 5, 2 7, 7 7, 7 0 5 0)))",
+ // all (0 0) and (5 0) could be filtered out
+ "MULTIPOINT(2 5, 5 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0)",
+ "MULTILINESTRING((0 0, 1 4, 4 4),(0 0, 4 1),(5 1, 5 0),(7 5, 7 6))",
+ "MULTIPOLYGON(((4 1, 4 4, 5 4, 5 1, 4 1)),"
+ "((5 4, 4 5, 5 5, 5 4)),"
+ "((2 6, 2 7, 7 7, 7 6, 2 6)))");
+}
+
+template <typename Tup>
+inline void test_pair()
+{
+ test_pp<Tup>();
+ test_pl<Tup>();
+ test_pa<Tup>();
+ test_ll<Tup>();
+ test_la<Tup>();
+}
+
+template <typename Tup>
+inline void test_tuple()
+{
+ test_pp<Tup>();
+ test_pl<Tup>();
+ test_pa<Tup>();
+ test_ll<Tup>();
+ test_la<Tup>();
+ test_aa<Tup>();
+}
+
+int test_main(int, char* [])
+{
+ test_pair<std::pair<MPt, MLs> >();
+ test_tuple<boost::tuple<MPt, MLs, MPo> >();
+
+#ifdef BOOST_GEOMETRY_CXX11_TUPLE
+ test_tuple<std::tuple<MPt, MLs, MPo> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp
new file mode 100644
index 000000000..836851009
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp
@@ -0,0 +1,390 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016, 2017.
+// Modifications copyright (c) 2016-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_INTERSECTION_HPP
+#define BOOST_GEOMETRY_TEST_INTERSECTION_HPP
+
+#include <fstream>
+#include <iomanip>
+
+#include <boost/foreach.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/num_interior_rings.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+#include <geometry_test_common.hpp>
+#include <algorithms/check_validity.hpp>
+#include "../setop_output_type.hpp"
+
+struct ut_settings
+{
+ double percentage;
+ bool test_validity;
+ bool debug;
+
+ explicit ut_settings(double p = 0.0001, bool tv = true)
+ : percentage(p)
+ , test_validity(tv)
+ , debug(false)
+ {}
+
+};
+
+template<typename IntersectionOutput, typename G1, typename G2>
+void check_result(IntersectionOutput const& intersection_output,
+ std::string const& caseid,
+ G1 const& g1, G2 const& g2,
+ std::size_t expected_count, std::size_t expected_holes_count,
+ int expected_point_count, double expected_length_or_area,
+ ut_settings const& settings)
+{
+ typedef typename boost::range_value<IntersectionOutput>::type OutputType;
+ bool const is_line = bg::geometry_id<OutputType>::type::value == 2;
+
+ typename bg::default_area_result<G1>::type length_or_area = 0;
+ int n = 0;
+ std::size_t nholes = 0;
+ for (typename IntersectionOutput::const_iterator it = intersection_output.begin();
+ it != intersection_output.end();
+ ++it)
+ {
+ if (expected_point_count > 0)
+ {
+ // here n should rather be of type std::size_t, but expected_point_count
+ // is set to -1 in some test cases so type int was left for now
+ n += static_cast<int>(bg::num_points(*it, true));
+ }
+
+ if (expected_holes_count > 0)
+ {
+ nholes += bg::num_interior_rings(*it);
+ }
+
+ // instead of specialization we check it run-time here
+ length_or_area += is_line
+ ? bg::length(*it)
+ : bg::area(*it);
+
+ if (settings.debug)
+ {
+ std::cout << std::setprecision(20) << bg::wkt(*it) << std::endl;
+ }
+ }
+
+#if ! defined(BOOST_GEOMETRY_TEST_ALWAYS_CHECK_VALIDITY)
+ if (settings.test_validity)
+#endif
+ {
+ std::string message;
+ bool const valid = check_validity<IntersectionOutput>
+ ::apply(intersection_output, caseid, g1, g2, message);
+
+ BOOST_CHECK_MESSAGE(valid,
+ "intersection: " << caseid << " not valid: " << message
+ << " type: " << (type_for_assert_message<G1, G2>()));
+ }
+
+#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ // Without rescaling, point count might easily differ (which is no problem)
+ if (expected_point_count > 0)
+ {
+ BOOST_CHECK_MESSAGE(bg::math::abs(n - expected_point_count) < 3,
+ "intersection: " << caseid
+ << " #points expected: " << expected_point_count
+ << " detected: " << n
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+#endif
+
+ if (expected_count > 0)
+ {
+ BOOST_CHECK_MESSAGE(intersection_output.size() == expected_count,
+ "intersection: " << caseid
+ << " #outputs expected: " << expected_count
+ << " detected: " << intersection_output.size()
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+
+ if (expected_holes_count > 0)
+ {
+
+ BOOST_CHECK_MESSAGE(nholes == expected_holes_count,
+ "intersection: " << caseid
+ << " #holes expected: " << expected_holes_count
+ << " detected: " << nholes
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+ }
+
+ double const detected_length_or_area = boost::numeric_cast<double>(length_or_area);
+ if (settings.percentage > 0.0)
+ {
+ if (expected_length_or_area > 0)
+ {
+ BOOST_CHECK_CLOSE(detected_length_or_area, expected_length_or_area, settings.percentage);
+ }
+ else
+ {
+ // Compare 0 with 0 or a very small detected area
+ BOOST_CHECK_LE(detected_length_or_area, settings.percentage);
+ }
+ }
+ else
+ {
+ // In some cases (geos_2) the intersection is either 0, or a tiny rectangle,
+ // depending on compiler/settings. That cannot be tested by CLOSE
+ BOOST_CHECK_LE(detected_length_or_area, expected_length_or_area);
+ }
+#endif
+
+}
+
+
+template <typename OutputType, typename CalculationType, typename G1, typename G2>
+typename bg::default_area_result<G1>::type test_intersection(std::string const& caseid,
+ G1 const& g1, G2 const& g2,
+ std::size_t expected_count = 0, std::size_t expected_holes_count = 0,
+ int expected_point_count = 0, double expected_length_or_area = 0,
+ ut_settings const& settings = ut_settings())
+{
+ if (settings.debug)
+ {
+ std::cout << std::endl << "case " << caseid << std::endl;
+ }
+
+ typedef typename setop_output_type<OutputType>::type result_type;
+
+ typedef typename bg::point_type<G1>::type point_type;
+ boost::ignore_unused<point_type>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ if (! settings.debug)
+ {
+ // Check _inserter behaviour with stratey
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<point_type>::type
+ >::type strategy_type;
+ result_type clip;
+ bg::detail::intersection::intersection_insert<OutputType>(g1, g2, std::back_inserter(clip), strategy_type());
+ }
+#endif
+
+ typename bg::default_area_result<G1>::type length_or_area = 0;
+
+ // Check normal behaviour
+ result_type intersection_output;
+ bg::intersection(g1, g2, intersection_output);
+
+ check_result(intersection_output, caseid, g1, g2, expected_count,
+ expected_holes_count, expected_point_count, expected_length_or_area,
+ settings);
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ // Check variant behaviour
+ intersection_output.clear();
+ bg::intersection(boost::variant<G1>(g1), g2, intersection_output);
+
+ check_result(intersection_output, caseid, g1, g2, expected_count,
+ expected_holes_count, expected_point_count, expected_length_or_area,
+ settings);
+
+ intersection_output.clear();
+ bg::intersection(g1, boost::variant<G2>(g2), intersection_output);
+
+ check_result(intersection_output, caseid, g1, g2, expected_count,
+ expected_holes_count, expected_point_count, expected_length_or_area,
+ settings);
+
+ intersection_output.clear();
+ bg::intersection(boost::variant<G1>(g1), boost::variant<G2>(g2), intersection_output);
+
+ check_result(intersection_output, caseid, g1, g2, expected_count,
+ expected_holes_count, expected_point_count, expected_length_or_area,
+ settings);
+#endif
+
+#if defined(TEST_WITH_SVG)
+ {
+ bool const is_line = bg::geometry_id<OutputType>::type::value == 2;
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+
+ bool const ccw =
+ bg::point_order<G1>::value == bg::counterclockwise
+ || bg::point_order<G2>::value == bg::counterclockwise;
+ bool const open =
+ bg::closure<G1>::value == bg::open
+ || bg::closure<G2>::value == bg::open;
+
+ std::ostringstream filename;
+ filename << "intersection_"
+ << caseid << "_"
+ << string_from_type<coordinate_type>::name()
+ << string_from_type<CalculationType>::name()
+ << (ccw ? "_ccw" : "")
+ << (open ? "_open" : "")
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ << "_rescaled"
+#endif
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g1, is_line
+ ? "opacity:0.6;stroke:rgb(0,255,0);stroke-width:5"
+ : "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+
+ for (typename result_type::const_iterator it = intersection_output.begin();
+ it != intersection_output.end(); ++it)
+ {
+ mapper.map(*it, "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,0,0);"
+ "stroke:rgb(255,0,255);stroke-width:8");
+ }
+ }
+#endif
+
+
+ if (settings.debug)
+ {
+ std::cout << "end case " << caseid << std::endl;
+ }
+
+ return length_or_area;
+}
+
+template <typename OutputType, typename CalculationType, typename G1, typename G2>
+typename bg::default_area_result<G1>::type test_intersection(std::string const& caseid,
+ G1 const& g1, G2 const& g2,
+ std::size_t expected_count = 0, int expected_point_count = 0,
+ double expected_length_or_area = 0,
+ ut_settings const& settings = ut_settings())
+{
+ return test_intersection<OutputType, CalculationType>(
+ caseid, g1, g2, expected_count, 0, expected_point_count,
+ expected_length_or_area, settings
+ );
+}
+
+template <typename OutputType, typename G1, typename G2>
+typename bg::default_area_result<G1>::type test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ std::size_t expected_count = 0, std::size_t expected_holes_count = 0,
+ int expected_point_count = 0, double expected_length_or_area = 0,
+ ut_settings const& settings = ut_settings())
+{
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ // Reverse if necessary
+ bg::correct(g1);
+ bg::correct(g2);
+
+ return test_intersection<OutputType, void>(caseid, g1, g2,
+ expected_count, expected_holes_count, expected_point_count,
+ expected_length_or_area, settings);
+}
+
+template <typename OutputType, typename G1, typename G2>
+typename bg::default_area_result<G1>::type test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ std::size_t expected_count = 0, int expected_point_count = 0,
+ double expected_length_or_area = 0,
+ ut_settings const& settings = ut_settings())
+{
+ return test_one<OutputType, G1, G2>(caseid, wkt1, wkt2,
+ expected_count, 0, expected_point_count,
+ expected_length_or_area,
+ settings);
+}
+
+template <typename OutputType, typename Areal, typename Linear>
+void test_one_lp(std::string const& caseid,
+ std::string const& wkt_areal, std::string const& wkt_linear,
+ std::size_t expected_count = 0, int expected_point_count = 0,
+ double expected_length = 0,
+ ut_settings const& settings = ut_settings())
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << caseid << " -- start" << std::endl;
+#endif
+ Areal areal;
+ bg::read_wkt(wkt_areal, areal);
+ bg::correct(areal);
+
+ Linear linear;
+ bg::read_wkt(wkt_linear, linear);
+
+ test_intersection<OutputType, void>(caseid, areal, linear,
+ expected_count, expected_point_count,
+ expected_length, settings);
+
+ // A linestring reversed should deliver exactly the same.
+ bg::reverse(linear);
+
+ test_intersection<OutputType, void>(caseid + "_rev", areal, linear,
+ expected_count, expected_point_count,
+ expected_length, settings);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << caseid << " -- end" << std::endl;
+#endif
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_point_output(std::string const& wkt1, std::string const& wkt2, unsigned int expected_count)
+{
+ Geometry1 g1;
+ bg::read_wkt(wkt1, g1);
+ bg::correct(g1);
+
+ Geometry2 g2;
+ bg::read_wkt(wkt2, g2);
+ bg::correct(g2);
+
+ bg::model::multi_point<typename bg::point_type<Geometry1>::type> points;
+ bg::intersection(g1, g2, points);
+ BOOST_CHECK_EQUAL(points.size(), expected_count);
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection_linear_linear.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection_linear_linear.hpp
new file mode 100644
index 000000000..f916b023c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/intersection/test_intersection_linear_linear.hpp
@@ -0,0 +1,260 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_GEOMETRY_TEST_INTERSECTION_LINEAR_LINEAR_HPP
+#define BOOST_GEOMETRY_TEST_INTERSECTION_LINEAR_LINEAR_HPP
+
+#include <limits>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include "../test_set_ops_linear_linear.hpp"
+#include <from_wkt.hpp>
+#include <to_svg.hpp>
+
+
+//==================================================================
+//==================================================================
+// intersection of (linear) geometries
+//==================================================================
+//==================================================================
+
+template <typename Geometry1, typename Geometry2, typename MultiLineString>
+inline void check_result(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_output,
+ MultiLineString const& mls_int1,
+ MultiLineString const& mls_int2,
+ std::string const& case_id,
+ double tolerance)
+{
+ BOOST_CHECK_MESSAGE( equals::apply(mls_int1, mls_output, tolerance)
+ || equals::apply(mls_int2, mls_output, tolerance),
+ "case id: " << case_id
+ << ", intersection L/L: " << bg::wkt(geometry1)
+ << " " << bg::wkt(geometry2)
+ << " -> Expected: " << bg::wkt(mls_int1)
+ << " or: " << bg::wkt(mls_int2)
+ << " computed: " << bg::wkt(mls_output) );
+}
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ typename MultiLineString
+>
+class test_intersection_of_geometries
+{
+private:
+ static inline void base_test(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_int1,
+ MultiLineString const& mls_int2,
+ std::string const& case_id,
+ double tolerance,
+ bool test_vector_and_deque = false)
+ {
+ static bool vector_deque_already_tested = false;
+
+ typedef typename boost::range_value<MultiLineString>::type LineString;
+ typedef std::vector<LineString> linestring_vector;
+ typedef std::deque<LineString> linestring_deque;
+
+ MultiLineString mls_output;
+
+ linestring_vector ls_vector_output;
+ linestring_deque ls_deque_output;
+
+ // Check normal behaviour
+ bg::intersection(geometry1, geometry2, mls_output);
+
+ check_result(geometry1, geometry2, mls_output, mls_int1, mls_int2, case_id, tolerance);
+
+ // Check strategy passed explicitly
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+ bg::clear(mls_output);
+ bg::intersection(geometry1, geometry2, mls_output, strategy_type());
+
+ check_result(geometry1, geometry2, mls_output, mls_int1, mls_int2, case_id, tolerance);
+
+ set_operation_output("intersection", case_id,
+ geometry1, geometry2, mls_output);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "intersection : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected intersection : " << bg::wkt(mls_int1)
+ << " or: " << bg::wkt(mls_int2) << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+
+ if ( !vector_deque_already_tested && test_vector_and_deque )
+ {
+ vector_deque_already_tested = true;
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "Testing with vector and deque as output container..."
+ << std::endl;
+#endif
+ bg::intersection(geometry1, geometry2, ls_vector_output);
+ bg::intersection(geometry1, geometry2, ls_deque_output);
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_int1, ls_vector_output, tolerance));
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_int1, ls_deque_output, tolerance));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Done!" << std::endl << std::endl;
+#endif
+ }
+
+ // check the intersection where the order of the two
+ // geometries is reversed
+ bg::clear(mls_output);
+ bg::intersection(geometry2, geometry1, mls_output);
+
+ check_result(geometry1, geometry2, mls_output, mls_int1, mls_int2, case_id, tolerance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "intersection : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected intersection : " << bg::wkt(mls_int1)
+ << " or: " << bg::wkt(mls_int2) << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ static inline void base_test_all(Geometry1 const& geometry1,
+ Geometry2 const& geometry2)
+ {
+ typedef typename bg::point_type<MultiLineString>::type Point;
+ typedef bg::model::multi_point<Point> multi_point;
+
+ MultiLineString mls12_output, mls21_output;
+ multi_point mp12_output, mp21_output;
+
+ bg::intersection(geometry1, geometry2, mls12_output);
+ bg::intersection(geometry1, geometry2, mp12_output);
+ bg::intersection(geometry2, geometry1, mls21_output);
+ bg::intersection(geometry2, geometry1, mp21_output);
+
+ std::cout << "************************************" << std::endl;
+ std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "intersection(1,2) [MLS]: " << bg::wkt(mls12_output)
+ << std::endl;
+ std::cout << "intersection(2,1) [MLS]: " << bg::wkt(mls21_output)
+ << std::endl;
+ std::cout << std::endl;
+ std::cout << "intersection(1,2) [MP]: " << bg::wkt(mp12_output)
+ << std::endl;
+ std::cout << "intersection(2,1) [MP]: " << bg::wkt(mp21_output)
+ << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+ }
+#else
+ static inline void base_test_all(Geometry1 const&, Geometry2 const&)
+ {
+ }
+#endif
+
+
+public:
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_int1,
+ MultiLineString const& mls_int2,
+ std::string const& case_id,
+ double tolerance
+ = std::numeric_limits<double>::epsilon())
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "test case: " << case_id << std::endl;
+ std::stringstream sstr;
+ sstr << "svgs/" << case_id << ".svg";
+#ifdef TEST_WITH_SVG
+ to_svg(geometry1, geometry2, sstr.str());
+#endif
+#endif
+
+ Geometry1 rg1(geometry1);
+ bg::reverse<Geometry1>(rg1);
+
+ Geometry2 rg2(geometry2);
+ bg::reverse<Geometry2>(rg2);
+
+ typedef typename bg::tag_cast
+ <
+ Geometry1, bg::linear_tag
+ >::type tag1_type;
+
+ typedef typename bg::tag_cast
+ <
+ Geometry2, bg::linear_tag
+ >::type tag2_type;
+
+ bool const are_linear
+ = boost::is_same<tag1_type, bg::linear_tag>::value
+ && boost::is_same<tag2_type, bg::linear_tag>::value;
+
+ test_get_turns_ll_invariance<are_linear>::apply(geometry1, geometry2);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl
+ << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
+ << std::endl << std::endl;
+#endif
+ test_get_turns_ll_invariance<are_linear>::apply(rg1, geometry2);
+
+ base_test(geometry1, geometry2, mls_int1, mls_int2, case_id, tolerance);
+ // base_test(rg1, rg2, mls_int1, mls_int2);
+ base_test_all(geometry1, geometry2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+
+
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_int,
+ std::string const& case_id,
+ double tolerance
+ = std::numeric_limits<double>::epsilon())
+ {
+ apply(geometry1, geometry2, mls_int, mls_int, case_id, tolerance);
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_INTERSECTION_LINEAR_LINEAR_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/set_ops_ll.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/set_ops_ll.cpp
new file mode 100644
index 000000000..c3311a054
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/set_ops_ll.cpp
@@ -0,0 +1,17 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_set_ops_linear_linear
+#endif
+
+#include "intersection_linear_linear.cpp"
+#include "union_linear_linear.cpp"
+#include "difference_linear_linear.cpp"
+#include "sym_difference_linear_linear.cpp"
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/set_ops_pp.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/set_ops_pp.cpp
new file mode 100644
index 000000000..725737e1b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/set_ops_pp.cpp
@@ -0,0 +1,16 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_set_ops_pointlike_pointlike
+#endif
+
+#include "intersection_pl_pl.cpp"
+#include "union_pl_pl.cpp"
+#include "difference_pl_pl.cpp"
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/setop_output_type.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/setop_output_type.hpp
new file mode 100644
index 000000000..2233cb255
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/setop_output_type.hpp
@@ -0,0 +1,43 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_SETOP_OUTPUT_TYPE_HPP
+#define BOOST_GEOMETRY_TEST_SETOP_OUTPUT_TYPE_HPP
+
+#include <vector>
+
+#include <boost/geometry/core/tags.hpp>
+#include <boost/geometry/core/tag.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+template <typename Single, typename Tag = typename bg::tag<Single>::type>
+struct setop_output_type
+{
+ typedef std::vector<Single> type;
+};
+
+template <typename Polygon>
+struct setop_output_type<Polygon, bg::polygon_tag>
+{
+ typedef bg::model::multi_polygon<Polygon> type;
+};
+
+template <typename Linestring>
+struct setop_output_type<Linestring, bg::linestring_tag>
+{
+ typedef bg::model::multi_linestring<Linestring> type;
+};
+
+template <typename Point>
+struct setop_output_type<Point, bg::point_tag>
+{
+ typedef bg::model::multi_point<Point> type;
+};
+
+#endif // BOOST_GEOMETRY_TEST_SETOP_OUTPUT_TYPE_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/Jamfile b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/Jamfile
new file mode 100644
index 000000000..72bbeeab2
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/Jamfile
@@ -0,0 +1,21 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015.
+# Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-sym_difference
+ :
+ [ run sym_difference_areal_areal.cpp : : : : algorithms_sym_difference_areal_areal ]
+ [ run sym_difference_linear_linear.cpp : : : : algorithms_sym_difference_linear_linear ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_areal_areal.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_areal_areal.cpp
new file mode 100644
index 000000000..b0b386c1f
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_areal_areal.cpp
@@ -0,0 +1,140 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_sym_difference_areal_areal
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/algorithms/sym_difference.hpp>
+
+#include "../difference/test_difference.hpp"
+#include <from_wkt.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::ring<point_type> ring_type; // ccw, closed
+typedef bg::model::polygon<point_type> polygon_type; // ccw, closed
+typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+double const default_tolerance = 0.0001;
+
+template
+<
+ typename Areal1, typename Areal2, typename PolygonOut
+>
+struct test_sym_difference_of_areal_geometries
+{
+ static inline void apply(std::string const& case_id,
+ Areal1 const& areal1,
+ Areal2 const& areal2,
+ int expected_polygon_count,
+ int expected_point_count,
+ double expected_area,
+ double tolerance = default_tolerance)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ bg::model::multi_polygon<PolygonOut> sdf;
+
+ bg::sym_difference(areal1, areal2, sdf);
+
+ std::cout << "Case ID: " << case_id << std::endl;
+ std::cout << "Geometry #1: " << bg::wkt(areal1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(areal2) << std::endl;
+ std::cout << "Sym diff: " << bg::wkt(sdf) << std::endl;
+ std::cout << "Polygon count: expected: "
+ << expected_polygon_count
+ << "; detected: " << sdf.size() << std::endl;
+ std::cout << "Point count: expected: "
+ << expected_point_count
+ << "; detected: " << bg::num_points(sdf) << std::endl;
+ std::cout << "Area: expected: "
+ << expected_area
+ << "; detected: " << bg::area(sdf) << std::endl;
+#endif
+ ut_settings settings;
+ settings.percentage = tolerance;
+
+ test_difference
+ <
+ PolygonOut
+ >(case_id, areal1, areal2,
+ expected_polygon_count, expected_point_count, expected_area,
+ true, settings);
+ }
+};
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_sym_difference_ring_ring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** RING / RING SYMMETRIC DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef ring_type R;
+ typedef polygon_type PG;
+
+ typedef test_sym_difference_of_areal_geometries<R, R, PG> tester;
+
+ tester::apply("r-r-sdf00",
+ from_wkt<R>("POLYGON((0 0,0 10,10 10,10 0,0 0))"),
+ from_wkt<R>("POLYGON((10 0,10 20,20 20,20 0,10 0))"),
+ 1,
+ 8,
+ 300);
+
+ tester::apply("r-r-sdf01",
+ from_wkt<R>("POLYGON((0 0,0 10,10 10,10 0,0 0))"),
+ from_wkt<R>("POLYGON((9 0,9 20,20 20,20 0,9 0))"),
+ 2,
+ 12,
+ 300);
+}
+
+
+BOOST_AUTO_TEST_CASE( test_sym_difference_polygon_multipolygon )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POLYGON / MULTIPOLYGON SYMMETRIC DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef polygon_type PG;
+ typedef multi_polygon_type MPG;
+
+ typedef test_sym_difference_of_areal_geometries<PG, MPG, PG> tester;
+
+ tester::apply
+ ("pg-mpg-sdf00",
+ from_wkt<PG>("POLYGON((10 0,10 10,20 10,20 0,10 0))"),
+ from_wkt<MPG>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),\
+ ((20 0,20 10,30 10,30 0,20 0)))"),
+ 1,
+ 6,
+ 300);
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_linear_linear.cpp
new file mode 100644
index 000000000..93ff46e1a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/sym_difference_linear_linear.cpp
@@ -0,0 +1,989 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_sym_difference_linear_linear
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_sym_difference_linear_linear.hpp"
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/algorithms/sym_difference.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / LINESTRING SYMMETRIC DIFFERENCE ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_sym_difference_of_geometries<L, L, ML> tester;
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 1,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0 2,1 1,2 1,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1),(2 1,3 2),\
+ (0 2,1 1),(2 1,3 0))"),
+ "llsdf00");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,5 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,3 0),(4 0,5 0))"),
+ "llsdf01");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,6 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,3 0),(4 0,6 0))"),
+ "llsdf01-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((4 0,6 0))"),
+ "llsdf01-2");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0),(5 0,20 0),\
+ (0 0,1 1,2 0,3 1,4 0),(5 0,6 1,7 -1,8 0))"),
+ "llsdf01-3");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-20 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((-20 0,4 0),(5 0,20 0),\
+ (0 0,1 1,2 0,3 1,4 0),(5 0,6 1,7 -1,8 0))"),
+ "llsdf01-4");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0))"),
+ "llsdf01-5");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,5 0))"),
+ "llsdf01-6");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(2 0,5 0))"),
+ "llsdf01-7");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,3 0),(4 0,5 0))"),
+ "llsdf01-8");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,3 0),(4 0,5 0))"),
+ "llsdf01-9");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(5 0,6 0))"),
+ "llsdf01-10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0)"),
+ from_wkt<L>("LINESTRING(-1 6,0 5,15 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,5 5),(10 5,15 0),\
+ (-1 6,0 5,5 5),(10 5,15 5))"),
+ "llsdf02");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (-1 0,0 0),(1 0,15 0),(20 0,30 0))"),
+ "llsdf03");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 5,10 5,15 0),\
+ (-1 0,0 0),(1 0,15 0),(20 0,30 0))"),
+ "llsdf04");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,25 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (20 0,25 1),(-1 0,0 0),(1 0,15 0),(20 0,30 0))"),
+ "llsdf05");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (-1 0,0 0),(1 0,15 0))"),
+ "llsdf05-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 0),(-1 0,0 0),(1 0,15 0))"),
+ "llsdf06");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,25 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 0),(-1 0,0 0),(1 0,15 0))"),
+ "llsdf07");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 0),(-1 0,0 0),(1 0,15 0))"),
+ "llsdf08");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 1),(-1 0,0 0),(1 0,15 0))"),
+ "llsdf09");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(1 0,5 5,10 5,15 0),\
+ (30 0,31 1),(-1 -1,0 0),(1 0,2 1,3 0,15 0))"),
+ "llsdf10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(2 0,3 0),\
+ (4 0,5 5,10 5,15 0),(30 0,31 1),(-1 -1,0 0),\
+ (2 0,2.5 1,3 0),(4 0,15 0))"),
+ "llsdf11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(2 0,3 0),\
+ (4 0,5 5,10 5,15 0),(30 0,31 0),(-1 -1,0 0),\
+ (2 0,2.5 1,3 0),(4 0,15 0))"),
+ "llsdf11-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "llsdf12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(3 1,2 0,0 0)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "llsdf12-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5,4 0,5 10)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(4 0,5 10))"),
+ "llsdf13");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,2.5 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING()"),
+ "llsdf14");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(3 5,4 0))"),
+ "llsdf15");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0.5 0,1 0,3 2,4 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0.5 0),(3 2,4 5))"),
+ "llsdf16");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(4 5,3 2,1 0,0.5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,0.5 0),(4 5,3 2))"),
+ "llsdf16-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,30 1)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(25 1,30 1),\
+ (1 1,2 0,3 1,20 1))"),
+ "llsdf17");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,21 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1,21 0,30 0),\
+ (1 1,2 0,3 1,20 1,25 0))"),
+ "llsdf18");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0,5 1))"),
+ "llsdf19");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 1,4 0,4 1,20 1,5 0))"),
+ "llsdf19-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0))"),
+ "llsdf19a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (4 0,4 1,20 1,5 0))"),
+ "llsdf19a-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0))"),
+ "llsdf19b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,6 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0),(5 0,6 1))"),
+ "llsdf19c");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0))"),
+ "llsdf19d");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0),(3 0,3 1))"),
+ "llsdf19e");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,4 0),(5 0,5 1))"),
+ "llsdf19f");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 1,5 0),(4 0,4 1,20 1,5 0))"),
+ "llsdf19f-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 0,20 1,4 1,5 0,5 1))"),
+ "llsdf19g");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(5 0,30 0),\
+ (5 1,5 0,4 1,20 1,5 0))"),
+ "llsdf19g-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,35 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(25 0,30 0,30 30,10 30),\
+ (10 0,10 -10,15 0,20 0),(25 0,35 0),\
+ (5 5,10 0),(10 30,20 0),(25 0,25 25,50 0,40 0))"),
+ "llsdf20");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,15 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,15 0),(30 0,30 30,10 30),\
+ (10 0,10 -10,15 0),(5 5,10 0),(10 30,20 0),\
+ (25 0,25 25,50 0,40 0))"),
+ "llsdf20a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<L>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0),(20 0,30 0),\
+ (2 2,5 -1,15 2,18 0))"),
+ "llsdf21"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 -3,5 4,6 6,-3 2,-3 0,-3 -10,9 -2,\
+ 9 5,5 -5,-4 -8,9 0)"),
+ from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5,2 -3,-6 10,5 0,\
+ 2 8,-6 1,10 -6)"),
+ from_wkt<ML>("MULTILINESTRING((0 -3,5 4,6 6,-3 2),\
+ (-3 0,-3 -10,9 -2,9 5,5 -5,-4 -8,9 0),(-3 6,-3 2),\
+ (-3 2,-3 5,2 -3,-6 10,5 0,2 8,-6 1,10 -6))"),
+ "llsdf22"
+ );
+}
+
+
+
+BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / MULTILINESTRING SYMMETRIC DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_sym_difference_of_geometries<L, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),\
+ (1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ "lmlsdf01"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 1,2 0),(1 1,3 0))"),
+ "lmlsdf02"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(5 0,10 0,20 1),\
+ (1 1,2 0),(1 1,3 0))"),
+ "lmlsdf03"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 1,2 0))"),
+ "lmlsdf04"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(-1 -1,1 0),(101 0,200 -1))"),
+ "lmlsdf07"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(-1 -1,0 0),\
+ (19 -1,20 0),(101 0,200 -1))"),
+ "lmlsdf07a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0),(19 -1,20 0),\
+ (101 0,200 -1))"),
+ "lmlsdf07b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(0 1,1 1,2 0),\
+ (-1 -1,1 0),(101 0,200 -1))"),
+ "lmlsdf08"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0),\
+ (0 1,1 1,2 0.5),(-1 -1,1 0,3 0),(101 0,200 -1))"),
+ "lmlsdf09"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,1.5 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(1.5 0,2 0.5,3 0),\
+ (0 1,1 1,1 0,2 0.5),(-1 -1,1 0),(1.5 0,3 0),\
+ (101 0,200 -1))"),
+ "lmlsdf10"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(1 1,2 0),(18 0,19 1),\
+ (2 1,3 0),(17 0,18 1),(3 1,4 0),(16 0,17 1))"),
+ "lmlsdf12"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (19 0,20 1),(18 0,19 1),(17 0,18 1),(16 0,17 1))"),
+ "lmlsdf13"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(2 0,18 0),(3 0,17 0),\
+ (4 0,16 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "lmlsdf13a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1,19 1,18 0),(2 0,1 1,2 1,3 0),\
+ (17 0,18 1,17 1,16 0),(4 0,3 1))"),
+ "lmlsdf14"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 2,6 0))"),
+ "lmlsdf15"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(6 0,4 2,2 2))"),
+ "lmlsdf15a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 2,5 0))"),
+ "lmlsdf16"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(5 0,4 2,2 2))"),
+ "lmlsdf16a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 0,5 2,20 2,25 0))"),
+ "lmlsdf17"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 0,5 2,20 2,25 0,26 2))"),
+ "lmlsdf17a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "lmlsdf18"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "lmlsdf18a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(20 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "lmlsdf18b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,25 0,26 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,25 0),(26 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,25 0))"),
+ "lmlsdf18c"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,25 0,21 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,21 0),(25 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,25 0))"),
+ "lmlsdf18d"
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_FAILURES
+ tester::apply
+ (from_wkt<L>("LINESTRING(1 5,4 2,1 -1.1,1 6,1 189.7654,2 5,-0.7654 3)"),
+ from_wkt<ML>("MULTILINESTRING((2 5,-0.7654 2),\
+ (-1032.34324 4,1 5,9 7,3 9,0.2 5,1 -0.3),\
+ (1 0.9,1 6,1 -0.6,2.232432 -0.7654,0.9 3,1 5,\
+ -0.7654 9,3 0.1,9 0,-6 8,-0.7 8,0 1,-1032.34324 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 5,-0.7654 2),\
+ (-1032.34324 4,1 5,9 7,3 9,0.2 5,1 -0.3),\
+ (1 -0.6,2.232432 -0.7654,0.9 3,1 5,-0.7654 9,\
+ 3 0.1,9 0,-6 8,-0.7 8,0 1,-1032.34324 0),\
+ (1 5,4 2,1 -1.1,1 -0.6),\
+ (1 6,1 189.7654,2 5,-0.7654 3))"),
+ "lmlsdf19",
+ 1e-10
+ );
+#endif
+}
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_sym_difference_multilinestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / LINESTRING SYMMETRIC DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_sym_difference_of_geometries<ML, L, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 2,4 3)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (1 1,2 2,4 3))"),
+ "mllsdf01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0),(1 1,2 0))"),
+ "mllsdf02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<L>("LINESTRING(-1 -1,1 0,101 0,200 -1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(-1 -1,1 0),(101 0,200 -1))"),
+ "mllsdf03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<L>("LINESTRING(0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1,19 1,18 0),(2 0,1 1,2 1,3 0),\
+ (17 0,18 1,17 1,16 0),(4 0,3 1))"),
+ "mllsdf04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 -3,5 4,6 6,-3 2,-3 0,\
+ -3 -10,9 -2,9 5,5 -5,-4 -8,9 0),\
+ (-7 9,-4 -9,-5 -10,5 3),\
+ (-8 -3,-6 6,-9 0,-4 -3,-1 -10),\
+ (0 1,7 -1,-2 3,-7 1),\
+ (-5 -9,-4 -10,7 -10,0 -6,1 6,2 -1,1 5,-5 -5))"),
+ from_wkt<L>("LINESTRING(-3 6,-3 0,-3 5,2 -3,-6 10,5 0,2 8,\
+ -6 1,10 -6)"),
+ from_wkt<ML>("MULTILINESTRING((0 -3,5 4,6 6,-3 2),\
+ (-3 0,-3 -10,9 -2,9 5,5 -5,-4 -8,9 0),\
+ (-7 9,-4 -9,-5 -10,5 3),\
+ (-8 -3,-6 6,-9 0,-4 -3,-1 -10),\
+ (0 1,7 -1,-2 3,-7 1),\
+ (-5 -9,-4 -10,7 -10,0 -6,1 6,2 -1,1 5,-5 -5),\
+ (-3 6,-3 2),(-3 2,-3 5,2 -3,-6 10,5 0,2 8,-6 1,10 -6))"),
+ "mllsdf05"
+ );
+}
+
+
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_sym_difference_multilinestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING SYMMETRIC DIFFERENCE ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_sym_difference_of_geometries<ML, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ "mlmlsdf01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0),(1 1,2 0),(1 1,3 0))"),
+ "mlmlsdf02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(5 0,10 0,20 1),\
+ (1 0,2 0),(5 0,7 0),(1 1,2 0),(1 1,3 0))"),
+ "mlmlsdf03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0),(1 1,2 0))"),
+ "mlmlsdf04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0),(10 10,15 10),(20 10,30 20),\
+ (1 1,2 0),(10 20,15 10),(20 10,25 10,30 15))"),
+ "mlmlsdf05"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 0.3,14 0.4,15 0.5),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((9 0,10 0,13 0.3),(15 0.5,20 1),\
+ (10 10,11 10),(12 10,15 10),(20 10,30 20),\
+ (1 1,2 0),(-1 -1,0 0),(9 0,11 10),(12 10,13 0.3),\
+ (10 20,15 10),(20 10,25 10,30 15))"),
+ "mlmlsdf06",
+ 4.0 * std::numeric_limits<double>::epsilon()
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((9 0,10 0,13 3),(15 5,20 10),\
+ (10 10,11 10),(12 10,15 10),(20 10,30 20),\
+ (1 1,2 0),(-1 -1,0 0),(9 0,11 10),(12 10,13 3),\
+ (10 20,15 10),(20 10,25 10,30 15))"),
+ "mlmlsdf06a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(-1 -1,1 0),\
+ (101 0,200 -1))"),
+ "mlmlsdf07"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-1 1,0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0),(-1 -1,0 0),\
+ (19 -1,20 0),(101 0,200 -1))"),
+ "mlmlsdf07a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0),(19 -1,20 0),\
+ (101 0,200 -1))"),
+ "mlmlsdf07b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(0 1,1 1,2 0),\
+ (-1 -1,1 0),(101 0,200 -1))"),
+ "mlmlsdf08"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0),(0 1,1 1,2 0.5),\
+ (-1 -1,1 0,3 0),(101 0,200 -1))"),
+ "mlmlsdf09"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,1.5 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(1.5 0,2 0.5,3 0),\
+ (0 1,1 1,1 0,2 0.5),(-1 -1,1 0),(1.5 0,3 0),\
+ (101 0,200 -1))"),
+ "mlmlsdf10"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,100 1,101 0),\
+ (0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1,3 0,4 0,5 1,6 1,\
+ 7 0,8 0,9 1,10 1,11 0,12 0,13 1,14 1,15 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1),(2 1,5 1),(6 1,9 1),\
+ (10 1,13 1),(14 1,100 1,101 0),(0 0,1 0),\
+ (1 0,1 1),(2 1,3 0),(4 0,5 1),(6 1,7 0),\
+ (8 0,9 1),(10 1,11 0),(12 0,13 1),(14 1,15 0),\
+ (-1 -1,1 0),(101 0,200 -1))"),
+ "mlmlsdf11"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(1 1,2 0),(18 0,19 1),\
+ (2 1,3 0),(17 0,18 1),(3 1,4 0),(16 0,17 1))"),
+ "mlmlsdf12"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (19 0,20 1),(18 0,19 1),(17 0,18 1),(16 0,17 1))"),
+ "mlmlsdf13"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0),(2 0,18 0),(3 0,17 0),\
+ (4 0,16 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0))"),
+ "mlmlsdf13a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1,19 1,18 0),(2 0,1 1,2 1,3 0),\
+ (17 0,18 1,17 1,16 0),(4 0,3 1))"),
+ "mlmlsdf14"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 2,6 0))"),
+ "mlmlsdf15"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(6 0,4 2,2 2))"),
+ "mlmlsdf15a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 2,5 0))"),
+ "mlmlsdf16"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,20 0),\
+ (0 1,1 0),(19 0,20 1),(5 0,4 2,2 2))"),
+ "mlmlsdf16a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 0,5 2,20 2,25 0))"),
+ "mlmlsdf17"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,4 0,5 2,20 2,25 0,26 2))"),
+ "mlmlsdf17a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "mlmlsdf18"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0),(19 0,30 0),\
+ (0 1,1 0),(19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "mlmlsdf18a"
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/test_sym_difference_linear_linear.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/test_sym_difference_linear_linear.hpp
new file mode 100644
index 000000000..843345247
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/sym_difference/test_sym_difference_linear_linear.hpp
@@ -0,0 +1,196 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_GEOMETRY_TEST_SYM_DIFFERENCE_LINEAR_LINEAR_HPP
+#define BOOST_GEOMETRY_TEST_SYM_DIFFERENCE_LINEAR_LINEAR_HPP
+
+#include <limits>
+
+#include <boost/geometry/geometry.hpp>
+#include "../test_set_ops_linear_linear.hpp"
+#include <from_wkt.hpp>
+#include <to_svg.hpp>
+
+
+//==================================================================
+//==================================================================
+// symmetric difference of (linear) geometries
+//==================================================================
+//==================================================================
+
+template <typename Geometry1, typename Geometry2, typename MultiLineString>
+inline void check_result(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_output,
+ MultiLineString const& mls_sym_diff,
+ std::string const& case_id,
+ double tolerance)
+{
+ BOOST_CHECK_MESSAGE( equals::apply(mls_sym_diff, mls_output, tolerance),
+ "case id: " << case_id
+ << ", sym diff L/L: " << bg::wkt(geometry1)
+ << " " << bg::wkt(geometry2)
+ << " -> Expected: " << bg::wkt(mls_sym_diff)
+ << " computed: " << bg::wkt(mls_output) );
+}
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ typename MultiLineString
+>
+class test_sym_difference_of_geometries
+{
+private:
+ static inline void base_test(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_sym_diff,
+ std::string const& case_id,
+ double tolerance,
+ bool test_vector_and_deque = false)
+ {
+ static bool vector_deque_already_tested = false;
+
+ typedef typename boost::range_value<MultiLineString>::type LineString;
+ typedef std::vector<LineString> linestring_vector;
+ typedef std::deque<LineString> linestring_deque;
+
+ MultiLineString mls_output;
+
+ linestring_vector ls_vector_output;
+ linestring_deque ls_deque_output;
+
+ // Check strategy passed explicitly
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+ bg::sym_difference(geometry1, geometry2, mls_output, strategy_type());
+
+ check_result(geometry1, geometry2, mls_output, mls_sym_diff, case_id, tolerance);
+
+ // Check normal behaviour
+ bg::clear(mls_output);
+ bg::sym_difference(geometry1, geometry2, mls_output);
+
+ check_result(geometry1, geometry2, mls_output, mls_sym_diff, case_id, tolerance);
+
+ set_operation_output("sym_difference", case_id,
+ geometry1, geometry2, mls_output);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "sym_difference : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected sym_difference : " << bg::wkt(mls_sym_diff)
+ << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+
+ if ( !vector_deque_already_tested && test_vector_and_deque )
+ {
+ vector_deque_already_tested = true;
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "Testing with vector and deque as output container..."
+ << std::endl;
+#endif
+ bg::sym_difference(geometry1, geometry2, ls_vector_output);
+ bg::sym_difference(geometry1, geometry2, ls_deque_output);
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_sym_diff, ls_vector_output, tolerance));
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_sym_diff, ls_deque_output, tolerance));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Done!" << std::endl << std::endl;
+#endif
+ }
+
+ // check the symmetric difference where the order of the two
+ // geometries is reversed
+ bg::clear(mls_output);
+ bg::sym_difference(geometry2, geometry1, mls_output);
+
+ BOOST_CHECK_MESSAGE( equals::apply(mls_sym_diff, mls_output, tolerance),
+ "case id: " << case_id
+ << ", sym diff L/L: " << bg::wkt(geometry2)
+ << " " << bg::wkt(geometry1)
+ << " -> Expected: " << bg::wkt(mls_sym_diff)
+ << " computed: " << bg::wkt(mls_output) );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "sym_difference : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected sym_difference : " << bg::wkt(mls_sym_diff)
+ << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+
+public:
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_sym_diff,
+ std::string const& case_id,
+ double tolerance
+ = std::numeric_limits<double>::epsilon())
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "test case: " << case_id << std::endl;
+ std::stringstream sstr;
+ sstr << "svgs/" << case_id << ".svg";
+#ifdef TEST_WITH_SVG
+ to_svg(geometry1, geometry2, sstr.str());
+#endif
+#endif
+
+ Geometry1 rg1(geometry1);
+ bg::reverse<Geometry1>(rg1);
+
+ Geometry2 rg2(geometry2);
+ bg::reverse<Geometry2>(rg2);
+
+ test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl
+ << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
+ << std::endl << std::endl;
+#endif
+ test_get_turns_ll_invariance<>::apply(rg1, geometry2);
+
+ base_test(geometry1, geometry2, mls_sym_diff, case_id, tolerance, true);
+ // base_test(geometry1, rg2, mls_sym_diff);
+ // base_test(rg1, geometry2, mls_sym_diff);
+ base_test(rg1, rg2, mls_sym_diff, case_id, tolerance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_SYM_DIFFERENCE_LINEAR_LINEAR_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/test_get_turns_ll_invariance.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/test_get_turns_ll_invariance.hpp
new file mode 100644
index 000000000..22b01cab2
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/test_get_turns_ll_invariance.hpp
@@ -0,0 +1,189 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014, 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_GET_TURNS_LL_INVARIANCE_HPP
+#define BOOST_GEOMETRY_TEST_GET_TURNS_LL_INVARIANCE_HPP
+
+#include <vector>
+
+#include <boost/geometry/algorithms/reverse.hpp>
+
+#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
+
+#include <boost/geometry/algorithms/detail/relate/turns.hpp>
+
+#include <boost/geometry/algorithms/detail/turns/compare_turns.hpp>
+#include <boost/geometry/algorithms/detail/turns/print_turns.hpp>
+#include <boost/geometry/algorithms/detail/turns/filter_continue_turns.hpp>
+#include <boost/geometry/algorithms/detail/turns/remove_duplicate_turns.hpp>
+
+#include <boost/geometry/io/wkt/write.hpp>
+
+
+namespace bg = ::boost::geometry;
+namespace bg_detail = ::boost::geometry::detail;
+namespace bg_turns = bg_detail::turns;
+
+template
+<
+ bool Enable = true,
+ bool EnableRemoveDuplicateTurns = true,
+ bool EnableDegenerateTurns = true
+>
+class test_get_turns_ll_invariance
+{
+private:
+ struct assign_policy
+ {
+ static bool const include_no_turn = false;
+ static bool const include_degenerate = EnableDegenerateTurns;
+ static bool const include_opposite = false;
+
+ template
+ <
+ typename Info,
+ typename Point1,
+ typename Point2,
+ typename IntersectionInfo
+ >
+ static inline void apply(Info& , Point1 const& , Point2 const& ,
+ IntersectionInfo const&)
+ {
+ }
+ };
+
+
+
+ template
+ <
+ typename Turns,
+ typename LinearGeometry1,
+ typename LinearGeometry2
+ >
+ static inline void compute_turns(Turns& turns,
+ LinearGeometry1 const& linear1,
+ LinearGeometry2 const& linear2)
+ {
+ turns.clear();
+ bg_detail::relate::turns::get_turns
+ <
+ LinearGeometry1,
+ LinearGeometry2,
+ bg_detail::get_turns::get_turn_info_type
+ <
+ LinearGeometry1,
+ LinearGeometry2,
+ assign_policy
+ >
+ >::apply(turns, linear1, linear2);
+ }
+
+
+
+public:
+ template <typename Linear1, typename Linear2>
+ static inline void apply(Linear1 const& lineargeometry1,
+ Linear2 const& lineargeometry2)
+ {
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Linear1, Linear2
+ >::type strategy_type;
+
+ typedef typename bg_detail::relate::turns::get_turns
+ <
+ Linear1, Linear2
+ >::template turn_info_type<strategy_type>::type turn_info;
+
+ typedef std::vector<turn_info> turns_container;
+
+ typedef bg_turns::filter_continue_turns
+ <
+ turns_container, true
+ > filter_continue_turns;
+
+ typedef bg_turns::remove_duplicate_turns
+ <
+ turns_container, EnableRemoveDuplicateTurns
+ > remove_duplicate_turns;
+
+ turns_container turns;
+
+ Linear1 linear1(lineargeometry1);
+ Linear2 linear2(lineargeometry2);
+
+ Linear2 linear2_reverse(linear2);
+ boost::geometry::reverse(linear2_reverse);
+
+ turns_container turns_all, rturns_all;
+ compute_turns(turns_all, linear1, linear2);
+ compute_turns(rturns_all, linear1, linear2_reverse);
+
+ turns_container turns_wo_cont(turns_all);
+ turns_container rturns_wo_cont(rturns_all);
+
+ filter_continue_turns::apply(turns_wo_cont);
+ filter_continue_turns::apply(rturns_wo_cont);
+
+ std::sort(boost::begin(turns_all), boost::end(turns_all),
+ bg_turns::less_seg_fraction_other_op<>());
+
+ std::sort(boost::begin(turns_wo_cont), boost::end(turns_wo_cont),
+ bg_turns::less_seg_fraction_other_op<>());
+
+ std::sort(boost::begin(rturns_all), boost::end(rturns_all),
+ bg_turns::less_seg_fraction_other_op<std::greater<boost::geometry::signed_size_type> >());
+
+ std::sort(boost::begin(rturns_wo_cont), boost::end(rturns_wo_cont),
+ bg_turns::less_seg_fraction_other_op<std::greater<boost::geometry::signed_size_type> >());
+
+ remove_duplicate_turns::apply(turns_all);
+ remove_duplicate_turns::apply(turns_wo_cont);
+ remove_duplicate_turns::apply(rturns_all);
+ remove_duplicate_turns::apply(rturns_wo_cont);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "### ORIGINAL TURNS ###" << std::endl;
+ bg_turns::print_turns(linear1, linear2, turns_all);
+ std::cout << std::endl << std::endl;
+ std::cout << "### ORIGINAL REVERSE TURNS ###" << std::endl;
+ bg_turns::print_turns(linear1, linear2_reverse, rturns_all);
+ std::cout << std::endl << std::endl;
+ std::cout << "### TURNS W/O CONTINUE TURNS ###" << std::endl;
+ bg_turns::print_turns(linear1, linear2, turns_wo_cont);
+ std::cout << std::endl << std::endl;
+ std::cout << "### REVERSE TURNS W/O CONTINUE TURNS ###" << std::endl;
+ bg_turns::print_turns(linear1, linear2_reverse, rturns_wo_cont);
+ std::cout << std::endl << std::endl;
+#endif
+
+ BOOST_CHECK_MESSAGE(boost::size(turns_wo_cont) == boost::size(rturns_wo_cont),
+ "Incompatible turns count: " << boost::size(turns_wo_cont) <<
+ " and " << boost::size(rturns_wo_cont) <<
+ " for L1: " << bg::wkt(lineargeometry1) <<
+ ", L2: " << bg::wkt(lineargeometry2));
+ }
+};
+
+template <bool EnableRemoveDuplicateTurns, bool EnableDegenerateTurns>
+class test_get_turns_ll_invariance
+<
+ false, EnableRemoveDuplicateTurns, EnableDegenerateTurns
+>
+{
+public:
+ template <typename Linear1, typename Linear2>
+ static inline void apply(Linear1 const&, Linear2 const&)
+ {
+ }
+};
+
+#endif // BOOST_GEOMETRY_TEST_GET_TURNS_LL_INVARIANCE_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_linear_linear.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_linear_linear.hpp
new file mode 100644
index 000000000..a8749b42b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_linear_linear.hpp
@@ -0,0 +1,381 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#ifndef BOOST_GEOMETRY_TEST_SET_OPS_LINEAR_LINEAR_HPP
+#define BOOST_GEOMETRY_TEST_SET_OPS_LINEAR_LINEAR_HPP
+
+
+#include <string>
+#include <fstream>
+#include <sstream>
+#include <algorithm>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/range.hpp>
+#include <boost/typeof/typeof.hpp>
+
+#include <boost/geometry/policies/compare.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/reverse.hpp>
+
+#include "test_get_turns_ll_invariance.hpp"
+
+namespace bg = ::boost::geometry;
+
+
+
+template <typename Linestring1, typename Linestring2>
+struct ls_less
+{
+ typedef typename boost::range_iterator<Linestring1 const>::type Iterator1;
+ typedef typename boost::range_iterator<Linestring2 const>::type Iterator2;
+
+ typedef bg::less<typename bg::point_type<Linestring1>::type> point_less;
+
+ bool operator()(Linestring1 const& linestring1,
+ Linestring2 const& linestring2) const
+ {
+ if (boost::size(linestring1) != boost::size(linestring2))
+ {
+ return boost::size(linestring1) < boost::size(linestring2);
+ }
+
+ Iterator1 it1 = boost::begin(linestring1);
+ Iterator2 it2 = boost::begin(linestring2);
+ point_less less;
+ for (; it1 != boost::end(linestring1); ++it1, ++it2)
+ {
+ if (less(*it1, *it2))
+ {
+ return true;
+ }
+ if (less(*it2, *it1))
+ {
+ return false;
+ }
+ }
+ return false;
+ }
+};
+
+
+template <typename Linestring1, typename Linestring2>
+struct ls_equal
+{
+ bool operator()(Linestring1 const& linestring1,
+ Linestring2 const& linestring2) const
+ {
+ ls_less<Linestring1, Linestring2> less;
+
+ return ! less(linestring1, linestring2)
+ && ! less(linestring2, linestring1);
+ }
+};
+
+
+template <typename Point1, typename Point2>
+class pt_equal
+{
+private:
+ double m_tolerence;
+
+ template <typename T>
+ static inline T const& get_max(T const& a, T const& b, T const& c)
+ {
+ return (std::max)((std::max)(a, b), c);
+ }
+
+ template <typename T>
+ static inline bool check_close(T const& a, T const& b, T const& tol)
+ {
+ return (a == b)
+ || (std::abs(a - b) <= tol * get_max(std::abs(a), std::abs(b), 1.0));
+ }
+
+public:
+ pt_equal(double tolerence) : m_tolerence(tolerence) {}
+
+ bool operator()(Point1 const& point1, Point2 const& point2) const
+ {
+ // allow for some tolerence in testing equality of points
+ return check_close(bg::get<0>(point1), bg::get<0>(point2), m_tolerence)
+ && check_close(bg::get<1>(point1), bg::get<1>(point2), m_tolerence);
+ }
+};
+
+
+template <bool EnableUnique = false>
+struct multilinestring_equals
+{
+ template <typename MultiLinestring, bool Enable>
+ struct unique
+ {
+ typedef typename boost::range_value<MultiLinestring>::type Linestring;
+ typedef typename bg::point_type<MultiLinestring>::type point_type;
+ typedef ls_equal<Linestring, Linestring> linestring_equal;
+ typedef pt_equal<point_type, point_type> point_equal;
+
+ template <typename Range, typename EqualTo>
+ void apply_to_range(Range& range, EqualTo const& equal_to)
+ {
+ range.erase(std::unique(boost::begin(range), boost::end(range),
+ equal_to),
+ boost::end(range));
+ }
+
+ void operator()(MultiLinestring& mls, double tolerance)
+ {
+ for (typename boost::range_iterator<MultiLinestring>::type it
+ = boost::begin(mls); it != boost::end(mls); ++it)
+ {
+ apply_to_range(*it, point_equal(tolerance));
+ }
+ apply_to_range(mls, linestring_equal());
+ }
+ };
+
+ template <typename MultiLinestring>
+ struct unique<MultiLinestring, false>
+ {
+ void operator()(MultiLinestring&, double)
+ {
+ }
+ };
+
+ template <typename MultiLinestring1, typename MultiLinestring2>
+ static inline
+ bool apply(MultiLinestring1 const& multilinestring1,
+ MultiLinestring2 const& multilinestring2,
+ double tolerance)
+ {
+ typedef typename boost::range_iterator
+ <
+ MultiLinestring1 const
+ >::type ls1_iterator;
+
+ typedef typename boost::range_iterator
+ <
+ MultiLinestring2 const
+ >::type ls2_iterator;
+
+ typedef typename boost::range_value<MultiLinestring1>::type Linestring1;
+
+ typedef typename boost::range_value<MultiLinestring2>::type Linestring2;
+
+ typedef typename boost::range_iterator
+ <
+ Linestring1 const
+ >::type point1_iterator;
+
+ typedef typename boost::range_iterator
+ <
+ Linestring2 const
+ >::type point2_iterator;
+
+ typedef ls_less<Linestring1, Linestring2> linestring_less;
+
+ typedef pt_equal
+ <
+ typename boost::range_value
+ <
+ typename boost::range_value<MultiLinestring1>::type
+ >::type,
+ typename boost::range_value
+ <
+ typename boost::range_value<MultiLinestring2>::type
+ >::type
+ > point_equal;
+
+
+ MultiLinestring1 mls1 = multilinestring1;
+ MultiLinestring2 mls2 = multilinestring2;
+
+ std::sort(boost::begin(mls1), boost::end(mls1), linestring_less());
+ std::sort(boost::begin(mls2), boost::end(mls2), linestring_less());
+
+ unique<MultiLinestring1, EnableUnique>()(mls1, tolerance);
+ unique<MultiLinestring2, EnableUnique>()(mls2, tolerance);
+
+ if (boost::size(mls1) != boost::size(mls2))
+ {
+ return false;
+ }
+
+ ls1_iterator it1 = boost::begin(mls1);
+ ls2_iterator it2 = boost::begin(mls2);
+ for (; it1 != boost::end(mls1); ++it1, ++it2)
+ {
+ if (boost::size(*it1) != boost::size(*it2))
+ {
+ return false;
+ }
+ point1_iterator pit1 = boost::begin(*it1);
+ point2_iterator pit2 = boost::begin(*it2);
+ for (; pit1 != boost::end(*it1); ++pit1, ++pit2)
+ {
+ if (! point_equal(tolerance)(*pit1, *pit2))
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+};
+
+
+
+
+class equals
+{
+private:
+ template <typename Linestring, typename OutputIterator>
+ static inline OutputIterator
+ isolated_point_to_segment(Linestring const& linestring, OutputIterator oit)
+ {
+ BOOST_ASSERT( boost::size(linestring) == 1 );
+
+ *oit++ = *boost::begin(linestring);
+ *oit++ = *boost::begin(linestring);
+ return oit;
+ }
+
+
+ template <typename MultiLinestring, typename OutputIterator>
+ static inline OutputIterator
+ convert_isolated_points_to_segments(MultiLinestring const& multilinestring,
+ OutputIterator oit)
+ {
+ BOOST_AUTO_TPL(it, boost::begin(multilinestring));
+
+ for (; it != boost::end(multilinestring); ++it)
+ {
+ if (boost::size(*it) == 1)
+ {
+ typename boost::range_value<MultiLinestring>::type linestring;
+ isolated_point_to_segment(*it, std::back_inserter(linestring));
+ *oit++ = linestring;
+ }
+ else
+ {
+ *oit++ = *it;
+ }
+ }
+ return oit;
+ }
+
+
+ template <typename MultiLinestring1, typename MultiLinestring2>
+ static inline bool apply_base(MultiLinestring1 const& multilinestring1,
+ MultiLinestring2 const& multilinestring2,
+ double tolerance)
+ {
+ typedef multilinestring_equals<true> mls_equals;
+
+ if (mls_equals::apply(multilinestring1, multilinestring2, tolerance))
+ {
+ return true;
+ }
+
+ MultiLinestring1 reverse_multilinestring1 = multilinestring1;
+ bg::reverse(reverse_multilinestring1);
+ if (mls_equals::apply(reverse_multilinestring1,
+ multilinestring2,
+ tolerance))
+ {
+ return true;
+ }
+
+ MultiLinestring2 reverse_multilinestring2 = multilinestring2;
+ bg::reverse(reverse_multilinestring2);
+ if (mls_equals::apply(multilinestring1,
+ reverse_multilinestring2,
+ tolerance))
+ {
+ return true;
+ }
+
+ return mls_equals::apply(reverse_multilinestring1,
+ reverse_multilinestring2,
+ tolerance);
+ }
+
+
+
+public:
+ template <typename MultiLinestring1, typename MultiLinestring2>
+ static inline bool apply(MultiLinestring1 const& multilinestring1,
+ MultiLinestring2 const& multilinestring2,
+ double tolerance)
+ {
+#ifndef BOOST_GEOMETRY_ALLOW_ONE_POINT_LINESTRINGS
+ MultiLinestring1 converted_multilinestring1;
+ convert_isolated_points_to_segments
+ (multilinestring1, std::back_inserter(converted_multilinestring1));
+ MultiLinestring2 converted_multilinestring2;
+ convert_isolated_points_to_segments
+ (multilinestring2, std::back_inserter(converted_multilinestring2));
+ return apply_base(converted_multilinestring1,
+ converted_multilinestring2, tolerance);
+#else
+ return apply_base(multilinestring1, multilinestring2, tolerance);
+#endif
+ }
+};
+
+
+
+
+template <typename Output, typename G1, typename G2>
+void set_operation_output(std::string const& set_op_id,
+ std::string const& caseid,
+ G1 const& g1, G2 const& g2,
+ Output const& output)
+{
+ boost::ignore_unused(set_op_id, caseid, g1, g2, output);
+
+#if defined(TEST_WITH_SVG)
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ typedef typename bg::point_type<G1>::type point_type;
+
+ std::ostringstream filename;
+ filename << "svgs/" << set_op_id << "_" << caseid << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g2, "stroke-opacity:1;stroke:rgb(153,204,0);stroke-width:4");
+ mapper.map(g1, "stroke-opacity:1;stroke:rgb(51,51,153);stroke-width:2");
+
+ BOOST_AUTO_TPL(it, output.begin());
+ for (; it != output.end(); ++it)
+ {
+ if ( boost::size(*it) == 2
+ && bg::equals(*boost::begin(*it), *++boost::begin(*it)) )
+ {
+ // draw isolated points (generated by the intersection operation)
+ mapper.map(*boost::begin(*it),
+ "fill:rgb(255,0,255);stroke:rgb(0,0,0);stroke-width:1",
+ 4);
+ }
+ else
+ {
+ mapper.map(*it,
+ "stroke-opacity:0.4;stroke:rgb(255,0,255);stroke-width:8");
+ }
+ }
+#endif
+}
+
+
+#endif // BOOST_GEOMETRY_TEST_SET_OPS_LINEAR_LINEAR_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_pointlike.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_pointlike.hpp
new file mode 100644
index 000000000..6908aa552
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_pointlike.hpp
@@ -0,0 +1,352 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2020, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
+#define BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
+
+
+#include <boost/geometry/geometry.hpp>
+
+namespace bg = ::boost::geometry;
+
+#include <from_wkt.hpp>
+#include <to_svg.hpp>
+
+#include <algorithm>
+#include <fstream>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/typeof/typeof.hpp>
+
+#include <boost/geometry/policies/compare.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+
+#include <boost/geometry/algorithms/union.hpp>
+#include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/sym_difference.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
+
+
+//==================================================================
+//==================================================================
+// svg output
+//==================================================================
+//==================================================================
+
+template <typename Output, typename G1, typename G2>
+void set_operation_output(std::string const& set_op_id,
+ std::string const& caseid,
+ G1 const& g1, G2 const& g2,
+ Output const& output)
+{
+ boost::ignore_unused(set_op_id, caseid, g1, g2, output);
+
+#if defined(TEST_WITH_SVG)
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ typedef typename bg::point_type<G1>::type point_type;
+
+ std::ostringstream filename;
+ filename << "svgs/" << set_op_id << "_" << caseid << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g2, "stroke-opacity:1;stroke:rgb(153,204,0);stroke-width:4");
+ mapper.map(g1, "stroke-opacity:1;stroke:rgb(51,51,153);stroke-width:2");
+
+ BOOST_AUTO_TPL(it, output.begin());
+ for (; it != output.end(); ++it)
+ {
+ mapper.map(*it,
+ "fill:rgb(255,0,255);stroke:rgb(0,0,0);stroke-width:1",
+ 4);
+ }
+#endif
+}
+
+
+//==================================================================
+//==================================================================
+// testing equality of multi-points
+//==================================================================
+//==================================================================
+
+
+struct equals
+{
+ template <typename MultiPoint1, typename MultiPoint2>
+ static inline bool apply(MultiPoint1 const& multipoint1,
+ MultiPoint2 const& multipoint2)
+ {
+ MultiPoint1 mp1(multipoint1);
+ MultiPoint2 mp2(multipoint2);
+
+ std::sort(mp1.begin(), mp1.end(),
+ bg::less<typename bg::point_type<MultiPoint1>::type>());
+ std::sort(mp2.begin(), mp2.end(),
+ bg::less<typename bg::point_type<MultiPoint2>::type>());
+
+ if ( boost::size(mp1) != boost::size(mp2) )
+ {
+ return false;
+ }
+
+ BOOST_AUTO_TPL(it1, boost::begin(mp1));
+ BOOST_AUTO_TPL(it2, boost::begin(mp2));
+ for (; it1 != boost::end(mp1); ++it1, ++it2)
+ {
+ if ( !bg::equals(*it1, *it2) )
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+};
+
+
+
+//==================================================================
+//==================================================================
+// struct for calling the appropriate set op function
+//==================================================================
+//==================================================================
+
+template <bg::overlay_type OverlayType> struct set_op;
+
+
+template<>
+struct set_op<bg::overlay_difference>
+{
+ static inline std::string name() { return "difference"; }
+
+ template <typename Geometry1, typename Geometry2, typename GeometryOut>
+ static inline void apply(Geometry1 const& g1,
+ Geometry2 const& g2,
+ GeometryOut& gout)
+ {
+ bg::difference(g1, g2, gout);
+ }
+};
+
+
+template<>
+struct set_op<bg::overlay_union>
+{
+ static inline std::string name() { return "union"; }
+
+ template <typename Geometry1, typename Geometry2, typename GeometryOut>
+ static inline void apply(Geometry1 const& g1,
+ Geometry2 const& g2,
+ GeometryOut& gout)
+ {
+ bg::union_(g1, g2, gout);
+ }
+};
+
+
+template<>
+struct set_op<bg::overlay_intersection>
+{
+ static inline std::string name() { return "intersection"; }
+
+ template <typename Geometry1, typename Geometry2, typename GeometryOut>
+ static inline void apply(Geometry1 const& g1,
+ Geometry2 const& g2,
+ GeometryOut& gout)
+ {
+ bg::intersection(g1, g2, gout);
+ }
+};
+
+
+template
+<
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+> struct geometry_info
+{};
+
+template <typename Point>
+struct geometry_info<Point, bg::point_tag>
+{
+ static std::size_t const topological_dimension = 0;
+
+ static inline char const* name() { return "Pt"; }
+};
+
+template <typename MultiPoint>
+struct geometry_info<MultiPoint, bg::multi_point_tag>
+{
+ static std::size_t const topological_dimension = 0;
+
+ static inline char const* name() { return "MPt"; }
+};
+
+template <typename Linestring>
+struct geometry_info<Linestring, bg::linestring_tag>
+{
+ static std::size_t const topological_dimension = 1;
+
+ static inline char const* name() { return "L"; }
+};
+
+template <typename MultiLinestring>
+struct geometry_info<MultiLinestring, bg::multi_linestring_tag>
+{
+ static std::size_t const topological_dimension = 1;
+
+ static inline char const* name() { return "ML"; }
+};
+
+template <typename Segment>
+struct geometry_info<Segment, bg::segment_tag>
+{
+ static std::size_t const topological_dimension = 1;
+
+ static inline char const* name() { return "S"; }
+};
+
+template <typename Ring>
+struct geometry_info<Ring, bg::ring_tag>
+{
+ static std::size_t const topological_dimension = 2;
+
+ static inline char const* name() { return "R"; }
+};
+
+template <typename Polygon>
+struct geometry_info<Polygon, bg::polygon_tag>
+{
+ static std::size_t const topological_dimension = 2;
+
+ static inline char const* name() { return "Po"; }
+};
+
+template <typename MultiPolygon>
+struct geometry_info<MultiPolygon, bg::multi_polygon_tag>
+{
+ static std::size_t const topological_dimension = 2;
+
+ static inline char const* name() { return "MPo"; }
+};
+
+//==================================================================
+//==================================================================
+// test the set operation of (point-like) geometries
+//==================================================================
+//==================================================================
+
+
+template
+<
+ typename Geometry1,
+ typename Geometry2,
+ typename MultiPoint,
+ bg::overlay_type OverlayType
+>
+class test_set_op_of_pointlike_geometries
+{
+private:
+ template <bool Enable, typename Dummy = void>
+ struct base_test
+ {
+ template <typename G1, typename G2, typename MP>
+ static inline void apply(std::string const& case_id,
+ G1 const& geometry1,
+ G2 const& geometry2,
+ MP const& mp_expected)
+ {
+ MultiPoint mp_output;
+
+ set_op<OverlayType>::apply(geometry1, geometry2, mp_output);
+
+ std::string op_name = set_op<OverlayType>::name();
+
+ BOOST_CHECK_MESSAGE(equals::apply(mp_expected, mp_output),
+ "case ID: " << case_id << ", "
+ << op_name << " "
+ << geometry_info<G1>::name() << "/"
+ << geometry_info<G2>::name() << ": "
+ << bg::wkt(geometry1)
+ << " " << bg::wkt(geometry2)
+ << " -> Expected: " << bg::wkt(mp_expected)
+ << " computed: " << bg::wkt(mp_output) );
+
+ set_operation_output(op_name, case_id,
+ geometry1, geometry2, mp_output);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "expected " << op_name << " : "
+ << bg::wkt(mp_expected) << std::endl;
+ std::cout << op_name << " : " << bg::wkt(mp_output) << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+ };
+
+ template <typename Dummy>
+ struct base_test<false, Dummy>
+ {
+ template <typename G1, typename G2, typename MP>
+ static inline void apply(std::string const&, G1 const&, G2 const&,
+ MP const&)
+ {
+ }
+ };
+
+public:
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiPoint const& mp_expected12,
+ MultiPoint const& mp_expected21)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "test case: " << case_id << std::endl;
+#endif
+
+ base_test<true>::apply(case_id, geometry1, geometry2, mp_expected12);
+ // try the same set operation with the arguments' order
+ // reversed only if the two geometries are of the same
+ // topological dimension
+ base_test
+ <
+ (geometry_info<Geometry1>::topological_dimension
+ == geometry_info<Geometry2>::topological_dimension)
+ >::apply(case_id, geometry2, geometry1, mp_expected21);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+ static inline void apply(std::string const& case_id,
+ Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiPoint const& mp_expected)
+ {
+ apply(case_id, geometry1, geometry2, mp_expected, mp_expected);
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/Jamfile b/src/boost/libs/geometry/test/algorithms/set_operations/union/Jamfile
new file mode 100644
index 000000000..e351a870d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/Jamfile
@@ -0,0 +1,27 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2017, 2018.
+# Modifications copyright (c) 2014-2018, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-union
+ :
+ [ run union.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_union ]
+ [ run union_aa_geo.cpp : : : : algorithms_union_aa_geo ]
+ [ run union_aa_sph.cpp : : : : algorithms_union_aa_sph ]
+ [ run union_linear_linear.cpp : : : : algorithms_union_linear_linear ]
+ [ run union_multi.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
+ : algorithms_union_multi ]
+ [ run union_pl_pl.cpp : : : : algorithms_union_pl_pl ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/test_union.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/test_union.hpp
new file mode 100644
index 000000000..d92fff221
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/test_union.hpp
@@ -0,0 +1,282 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015, 2016, 2017.
+// Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_UNION_HPP
+#define BOOST_GEOMETRY_TEST_UNION_HPP
+
+#include <fstream>
+
+#include <geometry_test_common.hpp>
+#include <algorithms/check_validity.hpp>
+#include "../setop_output_type.hpp"
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/foreach.hpp>
+#include <boost/range/algorithm/copy.hpp>
+
+#include <boost/geometry/algorithms/union.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/is_empty.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+struct ut_settings
+{
+ double percentage;
+ bool test_validity;
+
+ ut_settings()
+ : percentage(0.001)
+ , test_validity(true)
+ {}
+
+};
+
+#if defined(BOOST_GEOMETRY_TEST_CHECK_VALID_INPUT)
+template <typename Geometry>
+inline void check_input_validity(std::string const& caseid, int case_index,
+ Geometry const& geometry)
+{
+ std::string message;
+ if (!bg::is_valid(geometry, message))
+ {
+ std::cout << caseid << " Input ["
+ << case_index << "] not valid" << std::endl
+ << " (" << message << ")" << std::endl;
+ }
+}
+#endif
+
+
+
+template <typename Range>
+inline std::size_t num_points(Range const& rng, bool add_for_open = false)
+{
+ std::size_t result = 0;
+ for (typename boost::range_iterator<Range const>::type it = boost::begin(rng);
+ it != boost::end(rng); ++it)
+ {
+ result += bg::num_points(*it, add_for_open);
+ }
+ return result;
+}
+
+template <typename OutputType, typename G1, typename G2>
+void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
+ int expected_count, int expected_hole_count,
+ int expected_point_count, double expected_area,
+ ut_settings const& settings)
+{
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ boost::ignore_unused<coordinate_type>();
+ boost::ignore_unused(expected_point_count);
+
+ // Declare output (vector of rings or multi_polygon)
+ typedef typename setop_output_type<OutputType>::type result_type;
+ result_type clip;
+
+#if defined(BOOST_GEOMETRY_DEBUG_ROBUSTNESS)
+ std::cout << "*** UNION " << caseid << std::endl;
+#endif
+
+#if defined(BOOST_GEOMETRY_TEST_CHECK_VALID_INPUT)
+ check_input_validity(caseid, 0, g1);
+ check_input_validity(caseid, 1, g2);
+#endif
+
+ // Check normal behaviour
+ bg::union_(g1, g2, clip);
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ {
+ // Check strategy passed explicitly
+ result_type clip_s;
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<OutputType>::type
+ >::type strategy_type;
+ bg::union_(g1, g2, clip_s, strategy_type());
+ BOOST_CHECK_EQUAL(num_points(clip), num_points(clip_s));
+ }
+#endif
+
+#if ! defined(BOOST_GEOMETRY_TEST_ALWAYS_CHECK_VALIDITY)
+ if (settings.test_validity)
+#endif
+ {
+ std::string message;
+ bool const valid = check_validity<result_type>::apply(clip, caseid, g1, g2, message);
+ BOOST_CHECK_MESSAGE(valid,
+ "union: " << caseid << " not valid: " << message
+ << " type: " << (type_for_assert_message<G1, G2>()));
+ }
+
+ typename bg::default_area_result<OutputType>::type area = 0;
+ std::size_t n = 0;
+ std::size_t holes = 0;
+ for (typename result_type::iterator it = clip.begin();
+ it != clip.end(); ++it)
+ {
+ area += bg::area(*it);
+ holes += bg::num_interior_rings(*it);
+ n += bg::num_points(*it, true);
+ }
+
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ {
+ // Test inserter functionality
+ // Test if inserter returns output-iterator (using Boost.Range copy)
+ result_type inserted, array_with_one_empty_geometry;
+ array_with_one_empty_geometry.push_back(OutputType());
+ boost::copy(array_with_one_empty_geometry, bg::detail::union_::union_insert<OutputType>(g1, g2, std::back_inserter(inserted)));
+
+ typename bg::default_area_result<OutputType>::type area_inserted = 0;
+ int index = 0;
+ for (typename result_type::iterator it = inserted.begin();
+ it != inserted.end();
+ ++it, ++index)
+ {
+ // Skip the empty polygon created above to avoid the empty_input_exception
+ if (! bg::is_empty(*it))
+ {
+ area_inserted += bg::area(*it);
+ }
+ }
+ BOOST_CHECK_EQUAL(boost::size(clip), boost::size(inserted) - 1);
+ BOOST_CHECK_CLOSE(area_inserted, expected_area, settings.percentage);
+ }
+#endif
+
+
+
+#if defined(BOOST_GEOMETRY_DEBUG_ROBUSTNESS)
+ std::cout << "*** case: " << caseid
+ << " area: " << area
+ << " points: " << n
+ << " polygons: " << boost::size(clip)
+ << " holes: " << holes
+ << std::endl;
+#endif
+
+ BOOST_CHECK_MESSAGE(expected_count < 0 || int(clip.size()) == expected_count,
+ "union: " << caseid
+ << " #clips expected: " << expected_count
+ << " detected: " << clip.size()
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+
+ BOOST_CHECK_MESSAGE(expected_hole_count < 0 || int(holes) == expected_hole_count,
+ "union: " << caseid
+ << " #holes expected: " << expected_hole_count
+ << " detected: " << holes
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ // Without rescaling, point count might easily differ (which is no problem)
+ BOOST_CHECK_MESSAGE(expected_point_count < 0 || std::abs(int(n) - expected_point_count) < 3,
+ "union: " << caseid
+ << " #points expected: " << expected_point_count
+ << " detected: " << n
+ << " type: " << (type_for_assert_message<G1, G2>())
+ );
+#endif
+
+ BOOST_CHECK_CLOSE(area, expected_area, settings.percentage);
+
+#if defined(TEST_WITH_SVG)
+ {
+ bool const ccw =
+ bg::point_order<G1>::value == bg::counterclockwise
+ || bg::point_order<G2>::value == bg::counterclockwise;
+ bool const open =
+ bg::closure<G1>::value == bg::open
+ || bg::closure<G2>::value == bg::open;
+
+ std::ostringstream filename;
+ filename << "union_"
+ << caseid << "_"
+ << string_from_type<coordinate_type>::name()
+ << (ccw ? "_ccw" : "")
+ << (open ? "_open" : "")
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ << "_rescaled"
+#endif
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper
+ <
+ typename bg::point_type<G2>::type
+ > mapper(svg, 500, 500);
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+ //mapper.map(g1, "opacity:0.6;fill:rgb(0,0,255);stroke:rgb(0,0,0);stroke-width:1");
+ //mapper.map(g2, "opacity:0.6;fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:1");
+
+ for (typename result_type::const_iterator it = clip.begin();
+ it != clip.end(); ++it)
+ {
+ mapper.map(*it, "fill-opacity:0.2;stroke-opacity:0.4;fill:rgb(255,0,0);"
+ "stroke:rgb(255,0,255);stroke-width:8");
+ //mapper.map(*it, "opacity:0.6;fill:none;stroke:rgb(255,0,0);stroke-width:5");
+ }
+ }
+#endif
+}
+
+template <typename OutputType, typename G1, typename G2>
+void test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
+ int expected_count, int expected_hole_count,
+ int expected_point_count, double expected_area,
+ ut_settings const& settings = ut_settings())
+{
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+
+ G2 g2;
+ bg::read_wkt(wkt2, g2);
+
+ // Reverse/close if necessary (e.g. G1/G2 are ccw and/or open)
+ bg::correct(g1);
+ bg::correct(g2);
+
+ test_union<OutputType>(caseid, g1, g2,
+ expected_count, expected_hole_count, expected_point_count,
+ expected_area, settings);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/test_union_linear_linear.hpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/test_union_linear_linear.hpp
new file mode 100644
index 000000000..e4357b603
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/test_union_linear_linear.hpp
@@ -0,0 +1,203 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_GEOMETRY_TEST_UNION_LINEAR_LINEAR_HPP
+#define BOOST_GEOMETRY_TEST_UNION_LINEAR_LINEAR_HPP
+
+#include <limits>
+
+#include <boost/geometry/geometry.hpp>
+#include "../test_set_ops_linear_linear.hpp"
+#include <from_wkt.hpp>
+#include <to_svg.hpp>
+
+
+//==================================================================
+//==================================================================
+// union of (linear) geometries
+//==================================================================
+//==================================================================
+
+template <typename Geometry1, typename Geometry2, typename MultiLineString>
+inline void check_result(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_output,
+ MultiLineString const& mls_union,
+ std::string const& case_id,
+ double tolerance)
+{
+ BOOST_CHECK_MESSAGE( equals::apply(mls_union, mls_output, tolerance),
+ "case id: " << case_id
+ << ", union L/L: " << bg::wkt(geometry1)
+ << " " << bg::wkt(geometry2)
+ << " -> Expected: " << bg::wkt(mls_union)
+ << " computed: " << bg::wkt(mls_output) );
+}
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ typename MultiLineString
+>
+class test_union_of_geometries
+{
+private:
+ static inline void base_test(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_union1,
+ MultiLineString const& mls_union2,
+ std::string const& case_id,
+ double tolerance,
+ bool test_vector_and_deque = false)
+ {
+ static bool vector_deque_already_tested = false;
+
+ typedef typename boost::range_value<MultiLineString>::type LineString;
+ typedef std::vector<LineString> linestring_vector;
+ typedef std::deque<LineString> linestring_deque;
+
+ MultiLineString mls_output;
+
+ linestring_vector ls_vector_output;
+ linestring_deque ls_deque_output;
+
+ // Check strategy passed explicitly
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+ bg::union_(geometry1, geometry2, mls_output, strategy_type());
+
+ check_result(geometry1, geometry2, mls_output, mls_union1, case_id, tolerance);
+
+ // Check normal behaviour
+ bg::clear(mls_output);
+ bg::union_(geometry1, geometry2, mls_output);
+
+ check_result(geometry1, geometry2, mls_output, mls_union1, case_id, tolerance);
+
+ set_operation_output("union", case_id,
+ geometry1, geometry2, mls_output);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "union : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected union : " << bg::wkt(mls_union1)
+ << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+
+ if ( !vector_deque_already_tested && test_vector_and_deque )
+ {
+ vector_deque_already_tested = true;
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "Testing with vector and deque as output container..."
+ << std::endl;
+#endif
+ bg::union_(geometry1, geometry2, ls_vector_output);
+ bg::union_(geometry1, geometry2, ls_deque_output);
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_union1, ls_vector_output, tolerance));
+
+ BOOST_CHECK(multilinestring_equals
+ <
+ false
+ >::apply(mls_union1, ls_deque_output, tolerance));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Done!" << std::endl << std::endl;
+#endif
+ }
+
+ // check the union where the order of the two
+ // geometries is reversed
+ bg::clear(mls_output);
+ bg::union_(geometry2, geometry1, mls_output);
+
+ check_result(geometry1, geometry2, mls_output, mls_union2, case_id, tolerance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
+ std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
+ std::cout << "union : " << bg::wkt(mls_output) << std::endl;
+ std::cout << "expected union : " << bg::wkt(mls_union2)
+ << std::endl;
+ std::cout << std::endl;
+ std::cout << "************************************" << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+
+public:
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_union1,
+ MultiLineString const& mls_union2,
+ std::string const& case_id,
+ double tolerance
+ = std::numeric_limits<double>::epsilon())
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "test case: " << case_id << std::endl;
+ std::stringstream sstr;
+ sstr << "svgs/" << case_id << ".svg";
+ to_svg(geometry1, geometry2, sstr.str());
+#endif
+
+ Geometry1 rg1(geometry1);
+ bg::reverse<Geometry1>(rg1);
+
+ Geometry2 rg2(geometry2);
+ bg::reverse<Geometry2>(rg2);
+
+ test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl
+ << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
+ << std::endl << std::endl;
+#endif
+ test_get_turns_ll_invariance<>::apply(rg1, geometry2);
+
+ base_test(geometry1, geometry2, mls_union1, mls_union2,
+ case_id, tolerance, true);
+ // base_test(geometry1, rg2, mls_sym_diff);
+ // base_test(rg1, geometry2, mls_sym_diff);
+ base_test(rg1, rg2, mls_union1, mls_union2, case_id, tolerance);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+
+ static inline void apply(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ MultiLineString const& mls_union,
+ std::string const& case_id,
+ double tolerance
+ = std::numeric_limits<double>::epsilon())
+ {
+ apply(geometry1, geometry2, mls_union, mls_union, case_id, tolerance);
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_UNION1_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/union.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/union.cpp
new file mode 100644
index 000000000..4dea6f98d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/union.cpp
@@ -0,0 +1,644 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2016 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2016 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2016,2017.
+// Modifications copyright (c) 2016-2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include "test_union.hpp"
+#include <algorithms/test_overlay.hpp>
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+#define TEST_UNION(caseid, clips, holes, points, area) \
+ (test_one<Polygon, Polygon, Polygon>) \
+ ( #caseid, caseid[0], caseid[1], clips, holes, points, area)
+
+#define TEST_UNION_REV(caseid, clips, holes, points, area) \
+ (test_one<Polygon, Polygon, Polygon>) \
+ ( #caseid "_rev", caseid[1], caseid[0], clips, holes, points, area)
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) \
+ && defined(BOOST_GEOMETRY_USE_KRAMER_RULE) \
+ && ! defined(BOOST_GEOMETRY_TEST_FAILURES)
+// These testcases are failing for non-rescaled Kramer rule
+#define BOOST_GEOMETRY_EXCLUDE
+#endif
+
+
+template <typename Ring, typename Polygon>
+void test_areal()
+{
+ typedef typename bg::coordinate_type<Polygon>::type ct;
+
+ test_one<Polygon, Polygon, Polygon>("simplex_normal",
+ simplex_normal[0], simplex_normal[1],
+ 1, 0, 13, 11.526367);
+
+ test_one<Polygon, Polygon, Polygon>("simplex_with_empty_1",
+ simplex_normal[0], polygon_empty,
+ 1, 0, 4, 8.0);
+ test_one<Polygon, Polygon, Polygon>("simplex_with_empty_2",
+ polygon_empty, simplex_normal[0],
+ 1, 0, 4, 8.0);
+
+ test_one<Polygon, Polygon, Polygon>("star_ring", example_star, example_ring,
+ 1, 0, 23, 5.67017141);
+
+ // This sample was selected because of the border case, and ttmath generates one point more.
+ test_one<Polygon, Polygon, Polygon>("star_poly", example_star, example_polygon,
+ 1, 1,
+ if_typed_tt<ct>(28, 27), 5.647949);
+
+ // Pseudo-box as Polygon
+ // (note, internally, the intersection points is different, so yes,
+ // it has to be tested)
+ test_one<Polygon, Polygon, Polygon>("box_poly3", "POLYGON((1.5 1.5 , 1.5 2.5 , 4.5 2.5 , 4.5 1.5 , 1.5 1.5))",
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,5.3 2.5,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 1, 1, 15, 5.93625);
+
+ test_one<Polygon, Polygon, Polygon>("first_within_second",
+ first_within_second[0], first_within_second[1],
+ 1, 0, 5, 25.0);
+
+ test_one<Polygon, Polygon, Polygon>("second_within_first",
+ first_within_second[1], first_within_second[0],
+ 1, 0, 5, 25.0);
+
+ test_one<Polygon, Polygon, Polygon>("first_within_hole_of_second",
+ first_within_hole_of_second[0], first_within_hole_of_second[1],
+ 2, 1, 15, 17.0);
+
+ test_one<Polygon, Polygon, Polygon>("new_hole",
+ new_hole[0], new_hole[1],
+ 1, 1, 14, 23.0);
+
+ test_one<Polygon, Polygon, Polygon>("side_side",
+ side_side[0], side_side[1], 1, 0, 7, 2.0);
+
+ test_one<Polygon, Polygon, Polygon>("identical",
+ identical[0], identical[1], 1, 0, 5, 1.0);
+
+ test_one<Polygon, Polygon, Polygon>("disjoint",
+ disjoint[0], disjoint[1], 2, 0, 10, 2.0);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_intersect",
+ intersect_holes_intersect[0], intersect_holes_intersect[1],
+ 1, 1, 14, 39.75);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_intersect_and_disjoint",
+ intersect_holes_intersect_and_disjoint[0], intersect_holes_intersect_and_disjoint[1],
+ 1, 1, 14, 39.75);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_intersect_and_touch",
+ intersect_holes_intersect_and_touch[0], intersect_holes_intersect_and_touch[1],
+ 1, 1, 14, 39.75);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_new_ring",
+ intersect_holes_new_ring[0], intersect_holes_new_ring[1],
+ 1, 2, 15, 253.8961);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_holes_disjoint",
+ intersect_holes_disjoint[0],
+ intersect_holes_disjoint[1],
+ 1, 0, 9, 40.0);
+
+ test_one<Polygon, Polygon, Polygon>("within_holes_disjoint",
+ within_holes_disjoint[0], within_holes_disjoint[1],
+ 1, 0, 5, 49.0);
+
+ test_one<Polygon, Polygon, Polygon>("winded",
+ winded[0], winded[1],
+ 1, 5, 30, 114.0);
+
+ test_one<Polygon, Polygon, Polygon>("two_bends",
+ two_bends[0], two_bends[1],
+ 1, 0, 7, 40.0);
+
+ test_one<Polygon, Polygon, Polygon>("star_comb_15",
+ star_comb_15[0], star_comb_15[1],
+ 1, 27, 204, 898.09693338);
+
+ test_one<Polygon, Polygon, Polygon>("equal_holes_disjoint",
+ equal_holes_disjoint[0], equal_holes_disjoint[1],
+ 1, 1, 10, 81 - 3 * 7);
+
+ test_one<Polygon, Polygon, Polygon>("only_hole_intersections1",
+ only_hole_intersections[0], only_hole_intersections[1],
+ 1, 2, 13, 190.9090909);
+ test_one<Polygon, Polygon, Polygon>("only_hole_intersections2",
+ only_hole_intersections[0], only_hole_intersections[2],
+ 1, 2, 13, 190.9090909);
+
+ test_one<Polygon, Polygon, Polygon>("intersect_exterior_and_interiors_winded",
+ intersect_exterior_and_interiors_winded[0], intersect_exterior_and_interiors_winded[1],
+ 1, 1, 26, 66.5333333);
+
+ test_one<Polygon, Polygon, Polygon>("crossed",
+ crossed[0], crossed[1],
+ 1, 3, 17, 23.5); // Area from SQL Server - was somehow wrong before
+
+ test_one<Polygon, Polygon, Polygon>("fitting",
+ fitting[0], fitting[1],
+ 1, 0, 5, 25);
+
+ test_one<Polygon, Polygon, Polygon>("distance_zero",
+ distance_zero[0], distance_zero[1],
+ 1, 0, 8, 9.0098387);
+
+ test_one<Polygon, Polygon, Polygon>("wrapped_a",
+ wrapped[0], wrapped[1],
+ 1, 1, 16, 16);
+ test_one<Polygon, Polygon, Polygon>("wrapped_b",
+ wrapped[0], wrapped[2],
+ 1, 1, 16, 16);
+
+ test_one<Polygon, Polygon, Polygon>("9",
+ case_9[0], case_9[1], 2, 0, 8, 11);
+ test_one<Polygon, Polygon, Polygon>("22",
+ case_22[0], case_22[1], 2, 0, 8, 9.5);
+ test_one<Polygon, Polygon, Polygon>("25",
+ case_25[0], case_25[1], 2, 0, 8, 7);
+ test_one<Polygon, Polygon, Polygon>("26",
+ case_26[0], case_26[1], 2, 0, 9, 7.5);
+ test_one<Polygon, Polygon, Polygon>("31",
+ case_31[0], case_31[1], 2, 0, 8, 4.5);
+ test_one<Polygon, Polygon, Polygon>("32",
+ case_32[0], case_32[1], 2, 0, 8, 4.5);
+ test_one<Polygon, Polygon, Polygon>("33",
+ case_33[0], case_33[1], 2, 0, 8, 4.5);
+ test_one<Polygon, Polygon, Polygon>("36",
+ case_36[0], case_36[1], 1, 1, 10, 14.375);
+ test_one<Polygon, Polygon, Polygon>("40",
+ case_40[0], case_40[1], 2, 0, 18, 11);
+
+ // Test rings which should be generated by assemble
+ test_one<Polygon, Polygon, Polygon>("53_iet",
+ case_53[0], case_53[2], 1, 1, 16, 16);
+ test_one<Polygon, Polygon, Polygon>("58_iet",
+ case_58[0], case_58[2], 1, 3, 20, 12.16666);
+
+ test_one<Polygon, Polygon, Polygon>("59_iet",
+ case_59[0], case_59[2], 1, 1, 14, 17.20833);
+
+ test_one<Polygon, Polygon, Polygon>("80",
+ case_80[0], case_80[1], 2, 2, 18, 129.0);
+
+ test_one<Polygon, Polygon, Polygon>("81",
+ case_81[0], case_81[1], 1, 2, 15, 163.5);
+
+ test_one<Polygon, Polygon, Polygon>("82",
+ case_82[0], case_82[1], 1, 1, 21, 19.75);
+
+ test_one<Polygon, Polygon, Polygon>("83",
+ case_83[0], case_83[1], 1, 0, 7, 20.0);
+
+ test_one<Polygon, Polygon, Polygon>("90",
+ case_90[0], case_90[1], 1, 2, 17, 221.3688);
+
+ test_one<Polygon, Polygon, Polygon>("91",
+ case_91[0], case_91[1], 1, 1, 9, 147.5);
+
+ test_one<Polygon, Polygon, Polygon>("92",
+ case_92[0], case_92[1], 2, 0, 9, 175.0);
+
+ test_one<Polygon, Polygon, Polygon>("93",
+ case_93[0], case_93[1], 1, 2, 12, 172.9167);
+
+ test_one<Polygon, Polygon, Polygon>("94",
+ case_94[0], case_94[1], 2, 0, 12, 170.0);
+
+ // Has two separate but touching interior rings
+ test_one<Polygon, Polygon, Polygon>("95",
+ case_95[0], case_95[1], 1, 2, 15, 1320.0);
+
+ test_one<Polygon, Polygon, Polygon>("96",
+ case_96[0], case_96[1], 1, 1, 10, 1500.0);
+
+ test_one<Polygon, Polygon, Polygon>("97",
+ case_97[0], case_97[1], 1, 0, 10, 286.799);
+
+ test_one<Polygon, Polygon, Polygon>("98",
+ case_98[0], case_98[1], 1, 1, 14, 653.067);
+
+ test_one<Polygon, Polygon, Polygon>("99",
+ case_99[0], case_99[1], 1, 0, 5, 1600.0);
+
+ test_one<Polygon, Polygon, Polygon>("100",
+ case_100[0], case_100[1], 1, 1, 13, 19.125);
+
+ test_one<Polygon, Polygon, Polygon>("101",
+ case_101[0], case_101[1], 1, 0, 9, 21.0);
+
+ test_one<Polygon, Polygon, Polygon>("102",
+ case_102[0], case_102[1], 1, 1, 17, 8.75);
+
+ test_one<Polygon, Polygon, Polygon>("103",
+ case_103[0], case_103[1],
+ 1, 0, 5, 1.0);
+ test_one<Polygon, Polygon, Polygon>("104",
+ case_104[0], case_104[1],
+ 1, 0, 5, 100.0);
+
+ test_one<Polygon, Polygon, Polygon>("105",
+ case_105[0], case_105[1], 1, 0, 5, 100);
+
+ test_one<Polygon, Polygon, Polygon>("108",
+ case_108[0], case_108[1], 1, 0, 13, 5.0);
+
+ TEST_UNION(case_precision_1, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_2, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_3, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_4, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_5, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_6, 1, 0, -1, 71.0);
+ TEST_UNION(case_precision_7, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_8, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_9, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_10, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_11, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_12, 1, 0, -1, 14.0);
+ TEST_UNION(case_precision_13, 1, 0, -1, 14.0);
+ TEST_UNION(case_precision_14, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_15, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_16, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_17, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_18, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_19, 1, 1, -1, 73.0);
+#if ! defined(BOOST_GEOMETRY_EXCLUDE)
+ TEST_UNION(case_precision_20, 1, 0, -1, 22.0);
+#endif
+ TEST_UNION(case_precision_21, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_22, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_23, 1, 1, -1, 73.0);
+ TEST_UNION(case_precision_24, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_25, 1, 0, -1, 22.0);
+ TEST_UNION(case_precision_26, 1, 1, -1, 73.0);
+
+ TEST_UNION_REV(case_precision_1, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_2, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_3, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_4, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_5, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_6, 1, 0, -1, 71.0);
+ TEST_UNION_REV(case_precision_7, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_8, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_9, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_10, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_11, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_12, 1, 0, -1, 14.0);
+ TEST_UNION_REV(case_precision_13, 1, 0, -1, 14.0);
+ TEST_UNION_REV(case_precision_14, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_15, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_16, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_17, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_18, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_19, 1, 1, -1, 73.0);
+#if ! defined(BOOST_GEOMETRY_EXCLUDE)
+ TEST_UNION_REV(case_precision_20, 1, 0, -1, 22.0);
+#endif
+ TEST_UNION_REV(case_precision_21, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_22, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_23, 1, 1, -1, 73.0);
+ TEST_UNION_REV(case_precision_24, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_25, 1, 0, -1, 22.0);
+ TEST_UNION_REV(case_precision_26, 1, 1, -1, 73.0);
+
+ /*
+ test_one<Polygon, Polygon, Polygon>(102,
+ simplex_normal[0], simplex_reversed[1],
+ 1, 0, 7, X);
+
+ test_one<Polygon, Polygon, Polygon>(103,
+ simplex_reversed[0], simplex_normal[1],
+ 1, 0, 7, 24.0);
+
+ test_one<Polygon, Polygon, Polygon>(104,
+ simplex_reversed[0], simplex_reversed[1],
+ 1, 0, 7, 24.0);
+
+ test_one<Polygon, Polygon, Polygon>(100,
+ star_15, comb_15,
+ 1, 10, 7, 24.0);
+ */
+
+ // test some other input/output types
+
+ // 1 input Ring
+ test_one<Polygon, Polygon, Ring>("identical_pr", identical[0], identical[1], 1, 0, 5, 1.0);
+ test_one<Polygon, Ring, Polygon>("identical_rp", identical[0], identical[1], 1, 0, 5, 1.0);
+
+ // 2 input rings
+ test_one<Polygon, Ring, Ring>("identical_rr", identical[0], identical[1], 1, 0, 5, 1.0);
+
+ // output is also Ring
+ test_one<Ring, Ring, Ring>("identical_rrr", identical[0], identical[1], 1, 0, 5, 1.0);
+
+ // "new hole", tested with Ring -> the newly formed hole will be omitted
+ test_one<Ring, Ring, Ring>("new_hole_discarded", new_hole[0], new_hole[1], 1, 0, 9, 24.0);
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110306_javier",
+ ggl_list_20110306_javier[0], ggl_list_20110306_javier[1],
+ 1, 1, 16, 80456.4904910401);
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110307_javier",
+ ggl_list_20110307_javier[0], ggl_list_20110307_javier[1],
+ 1, 1, 13, 20016.4);
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110627_phillip",
+ ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
+ 1, 0, 8, 14729.07145);
+
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110716_enrico",
+ ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
+ 1, 1, 15, 129904.197692871);
+
+#if ! defined(BOOST_GEOMETRY_EXCLUDE)
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110820_christophe",
+ ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
+ -1, // Either 1 or 2, depending if the intersection/turn point (eps.region) is missed
+ 0,
+ if_typed_tt<ct>(9, 8),
+ 67.3550722317627);
+#endif
+
+ {
+ ut_settings settings;
+ settings.percentage = 0.1;
+ settings.test_validity = BG_IF_RESCALED(true, false);
+
+ test_one<Polygon, Polygon, Polygon>("isovist",
+ isovist1[0], isovist1[1],
+ 1,
+ 0,
+ -1,
+ 313.36036462, settings);
+
+ // SQL Server gives: 313.360374193241
+ // PostGIS gives: 313.360364623393
+ }
+
+ TEST_UNION(ggl_list_20190307_matthieu_1, 1, 1, -1, 0.83773);
+ TEST_UNION(ggl_list_20190307_matthieu_2, 1, 0, -1, 16.0);
+
+ // Ticket 5103 https://svn.boost.org/trac/boost/ticket/5103
+ // This ticket was actually reported for Boost.Polygon
+ // We check it for Boost.Geometry as well.
+ // SQL Server gives: 2515271331437.69
+ // PostGIS gives: 2515271327070.52
+ // Boost.Geometry gives: 2515271327070.5237746891 (ttmath)
+ // 2515271327070.5156 (double)
+ // 2515271320603.0000 (int)
+ // Note the int-test was tested outside of this unit test.
+ // It is in two points 0.37 off (logical for an int).
+ // Because of the width of the polygon (400000 meter)
+ // this causes a substantial difference.
+
+ test_one<Polygon, Polygon, Polygon>("ticket_5103",
+ ticket_5103[0], ticket_5103[1],
+ 1, 0, 25, 2515271327070.5);
+
+ TEST_UNION(ticket_8310a, 1, 0, 5, 10.5000019595);
+ TEST_UNION(ticket_8310b, 1, 0, 5, 10.5000019595);
+ TEST_UNION(ticket_8310c, 1, 0, 5, 10.5000019595);
+ TEST_UNION_REV(ticket_8310a, 1, 0, 5, 10.5000019595);
+ TEST_UNION_REV(ticket_8310b, 1, 0, 5, 10.5000019595);
+ TEST_UNION_REV(ticket_8310c, 1, 0, 5, 10.5000019595);
+
+ test_one<Polygon, Polygon, Polygon>("ticket_9081_15",
+ ticket_9081_15[0], ticket_9081_15[1],
+ 1, 0, -1, 0.0403425433);
+
+ {
+ ut_settings settings;
+ settings.test_validity = BG_IF_RESCALED(true, false);
+ test_one<Polygon, Polygon, Polygon>("ticket_9563", ticket_9563[0], ticket_9563[1],
+ 1, 0, 13, 150.0, settings);
+ }
+
+ // Float result is OK but a bit larger
+ test_one<Polygon, Polygon, Polygon>("ticket_9756", ticket_9756[0], ticket_9756[1],
+ 1, 0, 10, if_typed<ct, float>(1291.5469, 1289.08374));
+
+ // Can generate one polygon, or two splitted, both is OK
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+ TEST_UNION(ticket_10108_a, 2, 0, 8, 0.0435229);
+ TEST_UNION(ticket_10108_b, 1, 0, 10, 2424.3449);
+#else
+ TEST_UNION(ticket_10108_a, BG_IF_RESCALED(2, 1), 0, 8, 0.0435229);
+ TEST_UNION(ticket_10108_b, BG_IF_RESCALED(1, 2), 0, 10, 2424.3449);
+#endif
+
+ test_one<Polygon, Polygon, Polygon>("ticket_10866", ticket_10866[0], ticket_10866[1],
+ 1, 0, 14, if_typed<ct, float>(332752493.0, 332760303.5));
+
+ test_one<Polygon, Polygon, Polygon>("ticket_11725", ticket_11725[0], ticket_11725[1],
+ 1, 1, 10, 7.5);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // With rescaling an extra overlapping polygon is generated
+ TEST_UNION(issue_548, 1, 0, -1, 617382720000);
+#endif
+
+ TEST_UNION(issue_566_a, 1, 0, -1, 214.3728);
+ TEST_UNION(issue_566_b, 1, 0, -1, 214.3728);
+ TEST_UNION_REV(issue_566_a, 1, 0, -1, 214.3728);
+ TEST_UNION_REV(issue_566_b, 1, 0, -1, 214.3728);
+
+ if (! BOOST_GEOMETRY_CONDITION((boost::is_same<ct, float>::value)) )
+ {
+ ut_settings ignore_validity;
+ ignore_validity.test_validity = false;
+ ignore_validity.percentage = 0.01;
+ test_one<Polygon, Polygon, Polygon>("geos_1", geos_1[0], geos_1[1],
+ 1, 0, -1, 3461.3203125,
+ ignore_validity);
+ }
+ test_one<Polygon, Polygon, Polygon>("geos_2", geos_2[0], geos_2[1],
+ 1, 0, -1, 350.55102539);
+ test_one<Polygon, Polygon, Polygon>("geos_3", geos_3[0], geos_3[1],
+ 1, 0, -1, 29391548.4998779);
+ test_one<Polygon, Polygon, Polygon>("geos_4", geos_4[0], geos_4[1],
+ 1, 0, -1, 2304.4163115);
+
+ // Robustness issues, followed out buffer-robustness-tests, test them also reverse
+ {
+ // Area can vary depending on joining point of nearly parallel lines
+ ut_settings settings;
+ settings.percentage = 0.01;
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_a", buffer_rt_a[0], buffer_rt_a[1],
+ 1, 0, -1, 19.28, settings);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_a_rev", buffer_rt_a[1], buffer_rt_a[0],
+ 1, 0, -1, 19.28, settings);
+ }
+#if ! defined(BOOST_GEOMETRY_EXCLUDE)
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
+ 1, 0, -1, 4.60853);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_f_rev", buffer_rt_f[1], buffer_rt_f[0],
+ 1, 0, -1, 4.60853);
+#endif
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_g", buffer_rt_g[0], buffer_rt_g[1],
+ 1, 0, -1, 16.571);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_g_rev", buffer_rt_g[1], buffer_rt_g[0],
+ 1, 0, -1, 16.571);
+#if ! defined(BOOST_GEOMETRY_EXCLUDE)
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_i", buffer_rt_i[0], buffer_rt_i[1],
+ 1, 0, -1, 13.6569);
+#endif
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_i_rev", buffer_rt_i[1], buffer_rt_i[0],
+ 1, 0, -1, 13.6569);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_j", buffer_rt_j[0], buffer_rt_j[1],
+ 1, 0, -1, 16.5711);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_j_rev", buffer_rt_j[1], buffer_rt_j[0],
+ 1, 0, -1, 16.5711);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_l", buffer_rt_l[0], buffer_rt_l[1],
+ 1, 0, -1, 19.3995);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_l_rev", buffer_rt_l[1], buffer_rt_l[0],
+ 1, 0, -1, 19.3995);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_m1", buffer_rt_m1[0], buffer_rt_m1[1],
+ 1, 0, 9, 19.4852);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_m1_rev", buffer_rt_m1[1], buffer_rt_m1[0],
+ 1, 0, 9, 19.4852);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_m2", buffer_rt_m2[0], buffer_rt_m2[1],
+ 1, 0, -1, 21.4853);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_m2_rev", buffer_rt_m2[1], buffer_rt_m2[0],
+ 1, 0, 15, 21.4853);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_q", buffer_rt_q[0], buffer_rt_q[1],
+ 1, 0, -1, 18.5710);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_q_rev", buffer_rt_q[1], buffer_rt_q[0],
+ 1, 0, -1, 18.5710);
+#if ! defined(BOOST_GEOMETRY_EXCLUDE)
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_r", buffer_rt_r[0], buffer_rt_r[1],
+ 1, 0, -1, 21.07612);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_r_rev", buffer_rt_r[1], buffer_rt_r[0],
+ 1, 0, -1, 21.07612);
+#endif
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_t", buffer_rt_t[0], buffer_rt_t[1],
+ 1, 0, -1, 15.6569);
+ test_one<Polygon, Polygon, Polygon>("buffer_rt_t_rev", buffer_rt_t[1], buffer_rt_t[0],
+ 1, 0, -1, 15.6569);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_mp1", buffer_mp1[0], buffer_mp1[1],
+ 1, 0, if_typed_tt<ct>(93, 91), 22.815);
+
+ test_one<Polygon, Polygon, Polygon>("buffer_mp2", buffer_mp2[0], buffer_mp2[1],
+ 1, BG_IF_RESCALED(1, (if_typed<ct, float>(1, 0))), 217, 36.752837);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_21964079_1",
+ mysql_21964079_1[0], mysql_21964079_1[1],
+ 2, 1, -1, 234.5);
+ test_one<Polygon, Polygon, Polygon>("mysql_21964079_2",
+ mysql_21964079_2[0], mysql_21964079_2[1],
+ 2, 1, -1, 112.0);
+
+ test_one<Polygon, Polygon, Polygon>("mysql_23023665_1",
+ mysql_23023665_1[0], mysql_23023665_1[1],
+ 2, 1, -1, 92.0 + 142.5);
+ test_one<Polygon, Polygon, Polygon>("mysql_23023665_2",
+ mysql_23023665_2[0], mysql_23023665_2[1],
+ 2, 1, -1, 96.0 + 16.0);
+ test_one<Polygon, Polygon, Polygon>("mysql_23023665_3",
+ mysql_23023665_3[0], mysql_23023665_3[1],
+ 2, 1, -1, 225.0 + 66.0);
+ test_one<Polygon, Polygon, Polygon>("mysql_21964049",
+ mysql_21964049[0], mysql_21964049[1],
+ 1, 1, -1, 220.5);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::box<P> box;
+
+ test_areal<ring, polygon>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ // Open
+ test_areal<bg::model::ring<P, true, false>, bg::model::polygon<P, true, false> >();
+
+ // Counter clockwise
+ test_areal<bg::model::ring<P, false>, bg::model::polygon<P, false> >();
+
+ // Counter clockwise and open
+ test_areal<bg::model::ring<P, false, false>, bg::model::polygon<P, false, false> >();
+#endif
+
+ test_one<polygon, box, polygon>("box_ring", example_box, example_ring,
+ 1, 1, 15, 6.38875);
+
+ test_one<polygon, box, polygon>("box_poly", example_box, example_polygon,
+ 1, 3, 23, 6.30983);
+
+
+ test_one<polygon, box, polygon>("box_poly1", example_box,
+ "POLYGON((3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2))",
+ 1, 1, 15, 6.38875);
+ test_one<polygon, box, polygon>("box_poly2", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,5.3 2.5,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 1, 1, 15, 5.93625);
+
+ // 3: see areal
+
+ test_one<polygon, box, polygon>("box_poly4", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 1, 1, 15, 4.651245);
+
+ test_one<polygon, box, polygon>("box_poly5", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 2.3,5.0 2.3,5.0 2.1,4.5 2.1,4.5 1.9,4.0 1.9,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))",
+ 1, 1, 21, 4.7191);
+
+ test_one<polygon, box, polygon>("box_poly6", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 1.2,2.9 0.7,2 1.3))",
+ 1, 1, 15, 4.2174);
+
+ test_one<polygon, box, polygon>("box_poly7", example_box,
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.0 3.0,5.0 2.0,2.9 0.7,2 1.3))",
+ 1, 1, 17, 4.270554);
+
+ test_one<polygon, box, polygon>("box_poly8", "box(0 0, 3 3)",
+ "POLYGON((2 2, 1 4, 2 4, 3 3, 2 2))",
+ 1, 0, 8, 10.25);
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+ test_all<bg::model::d2::point_xy<default_test_type> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<long double> >();
+
+#if defined(HAVE_TTMATH)
+ std::cout << "Testing TTMATH" << std::endl;
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_geo.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_geo.cpp
new file mode 100644
index 000000000..00587e91c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_geo.cpp
@@ -0,0 +1,135 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include "test_union.hpp"
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+struct exterior_points_counter
+{
+ exterior_points_counter() : count(0) {}
+
+ template <typename Polygon>
+ void operator()(Polygon const& poly)
+ {
+ count += boost::size(bg::exterior_ring(poly));
+ }
+
+ std::size_t count;
+};
+
+struct interiors_counter
+ : exterior_points_counter
+{
+ template <typename Polygon>
+ void operator()(Polygon const& poly)
+ {
+ count += boost::size(bg::interior_rings(poly));
+ }
+};
+
+void test_geographic_one(std::string const& wkt1, std::string const& wkt2,
+ std::size_t count, std::size_t exterior_points_count, std::size_t interiors_count,
+ double expected_area)
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > point;
+ typedef bg::model::polygon<point> polygon;
+ typedef bg::model::multi_polygon<polygon> multipolygon;
+
+ bg::srs::spheroid<double> sph(6378137.0000000000, 6356752.3142451793);
+
+ bg::strategy::intersection::geographic_segments<> is(sph);
+ bg::strategy::area::geographic<> as(sph);
+
+ polygon p1, p2;
+
+ boost::geometry::read_wkt(wkt1, p1);
+ boost::geometry::read_wkt(wkt2, p2);
+
+ multipolygon result;
+
+ enum test_mode { expect_valid, expect_empty, expect_exception };
+
+#if defined(BOOST_GEOMETRY_UNION_THROW_INVALID_OUTPUT_EXCEPTION)
+ test_mode mode = expected_area >= 0 ? expect_valid : expect_exception;
+#elif defined(BOOST_GEOMETRY_UNION_RETURN_INVALID)
+ test_mode mode = expect_valid;
+#else
+ // default
+ test_mode mode = expected_area >= 0 ? expect_valid : expect_empty;
+#endif
+
+ if (mode == expect_exception)
+ {
+ BOOST_CHECK_THROW(boost::geometry::union_(p1, p2, result, is),
+ bg::invalid_output_exception);
+ }
+ else
+ {
+
+ boost::geometry::union_(p1, p2, result, is);
+
+ double result_area = bg::area(result, as);
+
+ std::size_t result_count = boost::size(result);
+ std::size_t result_exterior_points = std::for_each(boost::begin(result),
+ boost::end(result),
+ exterior_points_counter()).count;
+ std::size_t result_interiors = std::for_each(boost::begin(result),
+ boost::end(result),
+ interiors_counter()).count;
+ if (mode == expect_valid)
+ {
+ BOOST_CHECK_EQUAL(result_count, count);
+ BOOST_CHECK_EQUAL(result_exterior_points, exterior_points_count);
+ BOOST_CHECK_EQUAL(result_interiors, interiors_count);
+ BOOST_CHECK_CLOSE(result_area, expected_area, 0.001);
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL(result_count, 0u);
+ BOOST_CHECK_EQUAL(result_area, 0.0);
+ }
+ }
+}
+
+
+void test_geographic()
+{
+ // input ok and the result is ok
+ test_geographic_one("POLYGON((16 15,-132 10,-56 89,67 5,16 15))",
+ "POLYGON((101 49,12 40,-164 10,117 0,101 49))",
+ 1, 9, 0, 144265751613509.06);
+
+ // input ok but the result is too big
+ test_geographic_one("POLYGON((16 -15,-132 -22,-56 89,67 -29,16 -15))",
+ "POLYGON((101 49,12 40,-164 -21,117 -61,101 49))",
+ 1, 9, 0, -163427005620080.0);
+
+ // the second polygon is reversed i.e. it covers more than half of the globe
+ // so the result is also too big
+ test_geographic_one("POLYGON((16 -15,-132 -22,-56 89,67 -29,16 -15))",
+ "POLYGON((101 49,117 -61,-164 -21,12 40,101 49))",
+ 1, 7, 0, -125258931656228.08);
+}
+
+
+int test_main(int, char* [])
+{
+ test_geographic();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_sph.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_sph.cpp
new file mode 100644
index 000000000..cbb8f28d6
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_aa_sph.cpp
@@ -0,0 +1,106 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2017-2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include "test_union.hpp"
+
+
+struct exterior_points_counter
+{
+ exterior_points_counter() : count(0) {}
+
+ template <typename Polygon>
+ void operator()(Polygon const& poly)
+ {
+ count += boost::size(bg::exterior_ring(poly));
+ }
+
+ std::size_t count;
+};
+
+struct interiors_counter
+ : exterior_points_counter
+{
+ template <typename Polygon>
+ void operator()(Polygon const& poly)
+ {
+ count += boost::size(bg::interior_rings(poly));
+ }
+};
+
+void test_spherical_one(std::string const& wkt1, std::string const& wkt2,
+ std::size_t count, std::size_t exterior_points_count, std::size_t interiors_count,
+ double expected_area)
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > point;
+ typedef bg::model::polygon<point> polygon;
+ typedef bg::model::multi_polygon<polygon> multipolygon;
+
+ polygon p1, p2;
+
+ boost::geometry::read_wkt(wkt1, p1);
+ boost::geometry::read_wkt(wkt2, p2);
+
+ multipolygon result;
+
+ boost::geometry::union_(p1, p2, result);
+
+ double result_area = bg::area(result);
+
+ std::size_t result_count = boost::size(result);
+ std::size_t result_exterior_points = std::for_each(boost::begin(result),
+ boost::end(result),
+ exterior_points_counter()).count;
+ std::size_t result_interiors = std::for_each(boost::begin(result),
+ boost::end(result),
+ interiors_counter()).count;
+ if (expected_area >= 0)
+ {
+ BOOST_CHECK_EQUAL(result_count, count);
+ BOOST_CHECK_EQUAL(result_exterior_points, exterior_points_count);
+ BOOST_CHECK_EQUAL(result_interiors, interiors_count);
+ BOOST_CHECK_CLOSE(result_area, expected_area, 0.001);
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL(result_count, 0u);
+ BOOST_CHECK_EQUAL(result_area, 0.0);
+ }
+}
+
+
+void test_spherical()
+{
+ // https://github.com/boostorg/geometry/issues/475
+ test_spherical_one("POLYGON((-78.4072265625001 43.06652924482626,-78.4072265625 43.06740063068311,-78.4063141178686 43.06653210403569,-78.4072265625001 43.06652924482626))",
+ "POLYGON((-78.55968743491499 43.06594969590624,-78.55036227331367 43.07380195109801,-78.53503704605811 43.08248347074284,-78.51769210872999 43.08880392487917,-78.49899564953199 43.09251971058174,-78.47966844278045 43.09348761253013,-78.46045580120891 43.09167037120638,-78.44209853911326 43.08713812460473,-78.42530412309867 43.08006566649393,-78.41071917768537 43.07072563376782,-78.40631359930124 43.06653210565861,-78.55968743491499 43.06594969590624))",
+ 1, 12, 0, 0.00000064324358632259458);
+ test_spherical_one("POLYGON((-121.5731370931394 37.95996093777254,-121.5731374919342 37.9599609375,-121.5774655572748 37.96661505459264,-121.5814229252572 37.9775390625,-121.5814227715605 37.97753906261685,-121.5824154607857 37.98027887997713,-121.5839036001453 37.9944445317401,-121.5835741960922 37.99673349281881,-121.4641571044922 37.9967043028667,-121.4641571044935 37.97756945550759,-121.4641571044935 37.95998526681451,-121.4641571044935 37.92462240375453,-121.4758884395752 37.92196920341666,-121.493771910322 37.92080607027856,-121.5115987448441 37.92242636171255,-121.5286857982694 37.92676802819236,-121.5443780170238 37.93366470898578,-121.5580733707665 37.94285205174562,-121.5692458339493 37.95397776814401,-121.5731370931394 37.95996093777254))",
+ "POLYGON((-121.6413116455078 37.9967043028667,-121.5810851310329 37.99673411655077,-121.5697730327269 37.99673629028738,-121.5608282121158 37.99281120211074,-121.5471234211378 37.98362406015312,-121.5359500167068 37.97249627286875,-121.527736882307 37.95985622934639,-121.5227984361816 37.94619029268395,-121.5213227340147 37.93202401606796,-121.5233645060913 37.91790188887406,-121.5288433558941 37.90436639967157,-121.537547143277 37.89193722240091,-121.5491403777151 37.8810913202222,-121.5572385386645 37.87598800167662,-121.5490395877234 37.86781333310999,-121.5420190642174 37.85699822330511,-121.6413116455078 37.85696553311346,-121.6413116455089 37.8645849275209,-121.6413116455089 37.874858067486,-121.6413116455089 37.89983322075715,-121.6413116455089 37.95996381547175,-121.6413116455089 37.97754168382039,-121.6413116455089 37.97754250238781,-121.6413116455078 37.9967043028667))",
+ 1, 24, 0, 0.0000047757848548868592);
+ test_spherical_one("POLYGON((-121.3246465532687 35.88962804614829,-121.2883758544922 35.88960686771812,-121.2883758544928 35.85058599290677,-121.290026580334 35.8505859375,-121.3246465532687 35.88962804614829))",
+ "POLYGON((-121.2883758544928 35.85055605452366,-121.29 35.850556,-121.3056335092293 35.8681640625,-121.2883758544928 35.86816464188531,-121.2883758544928 35.85055605452366))",
+ 1, 8, 0, 0.00000018266345129866598);
+ test_spherical_one("POLYGON((-120.4666783969804 37.2997584488572,-120.466678397 37.3000076100001,-120.466678399 37.3166742810001,-120.450011727 37.3166742830001,-120.4500117249686 37.2997528818001,-120.4666783969804 37.2997584488572))",
+ "POLYGON((-120.466678399 37.3166742810001,-120.466678396991 37.29975844885721,-120.566678432986 37.29974277357464,-120.477336505269 37.35026345984599,-120.471699839074 37.3480665431537,-120.466678402489 37.345749649536,-120.466269200472 37.345560843499,-120.461071086478 37.3427585963354,-120.456130850491 37.3396734837438,-120.45147257817 37.3363205671631,-120.447118969699 37.3327162133727,-120.443091229047 37.3288780141012,-120.439408960746 37.3248246996654,-120.4360900747 37.3205760470716,-120.4334972505575 37.31667428399087,-120.4333450539725 37.31644525379688,-120.433150699472 37.3161527830495,-120.43060510448 37.3115764824821,-120.428465631443 37.306869462763,-120.426742635401 37.3020546745901,-120.4261294725058 37.29974083085035,-120.4333450519679 37.29974497771207,-120.4500117249686 37.2997528818001,-120.450011727 37.3166742830001,-120.466678399 37.3166742810001))",
+ 1, 20, 0, 0.00000096333365336696321);
+}
+
+
+int test_main(int, char* [])
+{
+ test_spherical();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/union_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_linear_linear.cpp
new file mode 100644
index 000000000..4ef79e6cc
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_linear_linear.cpp
@@ -0,0 +1,1075 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_union_linear_linear
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "test_union_linear_linear.hpp"
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/algorithms/union.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_union_linestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / LINESTRING UNION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_union_of_geometries<L, L, ML> tester;
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 1,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0 2,1 1,2 1,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,2 1,3 2),\
+ (0 2,1 1),(2 1,3 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 2,1 1,2 1,3 0),\
+ (0 0,1 1),(2 1,3 2))"),
+ "llu00");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,5 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0),(0 0,3 0),(4 0,5 0))"),
+ "llu01");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(3 0,4 0)"),
+ from_wkt<L>("LINESTRING(0 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0),(0 0,3 0),(4 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,5 0))"),
+ "llu01-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,6 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0),(4 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((3 0,6 0),(0 0,3 0))"),
+ "llu01-2");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(3 0,6 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((3 0,6 0),(0 0,3 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0),(4 0,6 0))"),
+ "llu01-3");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0),(4 0,6 0))"),
+ "llu01-4");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),\
+ (0 0,1 1,2 0,3 1,4 0),\
+ (5 0,6 1,7 -1,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0),\
+ (0 0,4 0),(5 0,20 0))"),
+ "llu01-6");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-20 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0)"),
+ from_wkt<ML>("MULTILINESTRING((-20 0,20 0),\
+ (0 0,1 1,2 0,3 1,4 0),\
+ (5 0,6 1,7 -1,8 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,2 0,3 1,4 0,5 0,6 1,7 -1,8 0),\
+ (-20 0,4 0),(5 0,20 0))"),
+ "llu01-7");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,4 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0),(0 0,2 0))"),
+ "llu01-8");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(4 0,5 0))"),
+ "llu01-10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0)"),
+ from_wkt<L>("LINESTRING(2 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0),(2 0,5 0))"),
+ "llu01-11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,4 0),(4 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((3 0,5 0),(0 0,1 0,3 0))"),
+ "llu01-11a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,4 0)"),
+ from_wkt<L>("LINESTRING(3 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,4 0),(4 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((3 0,4 0,5 0),(0 0,1 0,3 0))"),
+ "llu01-11b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,6 0)"),
+ from_wkt<L>("LINESTRING(2 0,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 0,4 0,5 0),(0 0,2 0),(5 0,6 0))"),
+ "llu01-12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0)"),
+ from_wkt<L>("LINESTRING(-1 6,0 5,15 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,5 5,10 5,15 0),\
+ (-1 6,0 5,5 5),(10 5,15 5))"),
+ from_wkt<ML>("MULTILINESTRING((-1 6,0 5,15 5),\
+ (0 0,1 0,5 5),(10 5,15 0))"),
+ "llu02");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0),\
+ (-1 0,0 0),(1 0,15 0),(20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0))"),
+ "llu03");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,5 5,10 5,15 0,20 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,5 5,10 5,15 0,20 0),\
+ (-1 0,0 0),(1 0,15 0),(20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,30 0),(1 0,5 5,10 5,15 0))"),
+ "llu04");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,25 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,25 1),\
+ (-1 0,0 0),(1 0,15 0),(20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0),(20 0,25 1))"),
+ "llu05");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0),\
+ (-1 0,0 0),(1 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0))"),
+ "llu05-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0),\
+ (-1 0,0 0),(1 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0),(30 0,31 0))"),
+ "llu06");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,25 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0),\
+ (-1 0,0 0),(1 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,25 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0),(30 0,31 0))"),
+ "llu07");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,31 0),\
+ (-1 0,0 0),(1 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,19 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0),(30 0,31 0))"),
+ "llu08");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1),(-1 0,0 0),(1 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 0,30 0),(-1 1,0 0),\
+ (1 0,5 5,10 5,15 0),(30 0,31 1))"),
+ "llu09");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,5 5,10 5,15 0,20 0,30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1),(-1 -1,0 0),(1 0,2 1,3 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,1 0,2 1,3 0,30 0),\
+ (-1 1,0 0),(1 0,5 5,10 5,15 0),(30 0,31 1))"),
+ "llu10");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,4 0,5 5,10 5,15 0,20 0,\
+ 30 0,31 1),(-1 -1,0 0),(2 0,2.5 1,3 0),(4 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0),\
+ (-1 1,0 0),(2 0,3 0),(4 0,5 5,10 5,15 0),(30 0,31 1))"),
+ "llu11");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)"),
+ from_wkt<L>("LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0),\
+ (-1 -1,0 0),(2 0,2.5 1,3 0),(4 0,15 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0),\
+ (-1 1,0 0),(2 0,3 0),(4 0,5 5,10 5,15 0),(30 0,31 0))"),
+ "llu11-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0,3 1))"),
+ "llu12");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,2 0,3 1)"),
+ from_wkt<L>("LINESTRING(3 1,2 0,0 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((3 1,2 0,0 0))"),
+ "llu12-1");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5,4 0,5 10)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 1,3 5,4 0),(4 0,5 10))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,2 1,3 5,4 0,5 10),(0 0,1 0))"),
+ "llu13");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)"),
+ from_wkt<L>("LINESTRING(0 0,2 0,2.5 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0,2.5 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,2 0,2.5 0,3 1))"),
+ "llu14");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 5,4 0)"),
+ from_wkt<L>("LINESTRING(1 0,2 1,3 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 1,3 5,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,2 1,3 5),(0 0,1 0),(3 5,4 0))"),
+ "llu15");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(0.5 0,1 0,3 2,4 5)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 1,3 2),(3 2,4 5))"),
+ from_wkt<ML>("MULTILINESTRING((0.5 0,1 0,3 2,4 5),(0 0,0.5 0))"),
+ "llu16");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 1,3 2)"),
+ from_wkt<L>("LINESTRING(4 5,3 2,1 0,0.5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 1,3 2),(4 5,3 2))"),
+ from_wkt<ML>("MULTILINESTRING((4 5,3 2,1 0,0.5 0),(0 0,0.5 0))"),
+ "llu16-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,30 1)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1,30 1),(1 1,2 0,3 1,20 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,3 1,20 1,25 1),\
+ (0 0,10 0,20 1),(25 1,30 1))"),
+ "llu17");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1,21 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 1,2 0,3 1,20 1,25 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1,21 0,30 0),\
+ (1 1,2 0,3 1,20 1,25 0))"),
+ "llu18");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0,5 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0,5 1),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 1,4 0,4 1,20 1,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 1,4 0,4 1,20 1,5 0,1 0),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0),(0 0,1 0),\
+ (5 0,30 0))"),
+ "llu19a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(4 0,4 1,20 1,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((4 0,4 1,20 1,5 0,1 0),(0 0,1 0),\
+ (5 0,30 0))"),
+ "llu19a-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0,5 0),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19b");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,6 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0),(5 0,6 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0,5 0,6 1),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19c");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0,3 0),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19d");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,3 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0),(3 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0,3 0,3 1),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19e");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,4 0),(5 0,5 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,4 0,5 0,5 1),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19f");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 1,5 0),\
+ (4 0,4 1,20 1,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 1,5 0,4 0,4 1,20 1,5 0,1 0),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19f-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(1 0,5 0,20 1,4 1,5 0,5 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 0,20 1,4 1,5 0,5 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,5 0,20 1,4 1,5 0,5 1),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19g");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<L>("LINESTRING(5 1,5 0,4 1,20 1,5 0,1 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(5 1,5 0,4 1,20 1,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 1,5 0,4 1,20 1,5 0,1 0),\
+ (0 0,1 0),(5 0,30 0))"),
+ "llu19g-r");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,35 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0,30 30,10 30,10 -10,15 0,40 0),\
+ (5 5,10 0),(10 30,20 0),(25 0,25 25,50 0,40 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 5,10 0,10 30,20 0,25 0,25 25,50 0,35 0),\
+ (0 0,20 0),(25 0,30 0,30 30,10 30),\
+ (10 0,10 -10,15 0,20 0),(25 0,35 0))"),
+ "llu20");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0,30 30,10 30,10 -10,15 0,40 0)"),
+ from_wkt<L>("LINESTRING(5 5,10 0,10 30,20 0,25 0,25 25,50 0,15 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0,30 30,10 30,10 -10,15 0,40 0),\
+ (5 5,10 0),(10 30,20 0),(25 0,25 25,50 0,40 0))"),
+ from_wkt<ML>("MULTILINESTRING((5 5,10 0,10 30,20 0,25 0,25 25,50 0,15 0),\
+ (0 0,15 0),(30 0,30 30,10 30),(10 0,10 -10,15 0))"),
+ "llu20a");
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<L>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((2 2,5 -1,15 2,18 0,20 0),\
+ (0 0,18 0),(20 0,30 0))"),
+ "llu21"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)"),
+ from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((2 2,5 -1,15 2,18 0,20 0),\
+ (0 0,18 0),(20 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),\
+ (2 2,5 -1,15 2,18 0))"),
+ "llu21a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-2 -2,-4 0,1 -8,-2 6,8 5,-7 -8,3 0,\
+ 4 -1,-7 10,-4 10)"),
+ from_wkt<L>("LINESTRING(-5 -4,3 0,4 -1,7 -4,2 -1,-4 -1,-2 6)"),
+ from_wkt<ML>("MULTILINESTRING((-2 -2,-4 0,1 -8,-2 6,8 5,-7 -8,3 0,\
+ 4 -1,-7 10,-4 10),(-5 -4,3 0),\
+ (4 -1,7 -4,2 -1,-4 -1,-2 6))"),
+ from_wkt<ML>("MULTILINESTRING((-5 -4,3 0,4 -1,7 -4,2 -1,-4 -1,-2 6),\
+ (-2 -2,-4 0,1 -8,-2 6,8 5,-7 -8,3 0),\
+ (3 0,-7 10,-4 10))"),
+ "llu22"
+ );
+}
+
+
+
+BOOST_AUTO_TEST_CASE( test_union_linestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** LINESTRING / MULTILINESTRING UNION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_union_of_geometries<L, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 1,2 2,4 3),\
+ (1 1,2 2,5 3))"),
+ "lmlu01"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 1,2 0),(1 1,3 0))"),
+ "lmlu02"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 1,2 0),(1 1,3 0))"),
+ "lmlu03"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,10 0,20 1)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 1,2 0))"),
+ "lmlu04"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0),(-1 -1,1 0),(101 0,200 -1))"),
+ "lmlu07"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(-1 1,0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,101 0),(-1 -1,0 0),\
+ (19 -1,20 0),(101 0,200 -1))"),
+ "lmlu07a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0),(-1 -1,0 0),\
+ (19 -1,20 0),(101 0,200 -1))"),
+ "lmlu07b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0),(0 1,1 1,2 0),\
+ (-1 -1,1 0),(101 0,200 -1))"),
+ "lmlu08"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0,101 0),\
+ (0 1,1 1,2 0.5),(-1 -1,1 0,3 0),(101 0,200 -1))"),
+ "lmlu09"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,1 0,1.5 0,2 0.5,3 0,101 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,1.5 0,2 0.5,3 0,101 0),\
+ (0 1,1 1,1 0,2 0.5),(-1 -1,1 0),(1.5 0,3 0),\
+ (101 0,200 -1))"),
+ "lmlu10"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (1 1,2 0),(18 0,19 1),(2 1,3 0),(17 0,18 1),\
+ (3 1,4 0),(16 0,17 1))"),
+ "lmlu12"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(19 0,20 1),(18 0,19 1),\
+ (17 0,18 1),(16 0,17 1))"),
+ "lmlu13"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),\
+ (19 0,20 1,19 1,18 0),(2 0,1 1,2 1,3 0),\
+ (17 0,18 1,17 1,16 0),(4 0,3 1))"),
+ "lmlu14"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ "lmlu15"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ "lmlu15a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 2,5 0))"),
+ "lmlu16"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,20 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (5 0,4 2,2 2))"),
+ "lmlu16a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ "lmlu17"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ "lmlu17a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ "lmlu18"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),(0 1,1 0),\
+ (19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "lmlu18a"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),(0 1,1 0),\
+ (19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ "lmlu18b"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,25 0,26 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),(0 1,1 0),\
+ (19 0,20 1),(2 2,5 -1,15 2,25 0))"),
+ "lmlu18c"
+ );
+
+ tester::apply
+ (from_wkt<L>("LINESTRING(0 0,18 0,19 0,30 0)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,25 0,21 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),(0 1,1 0),\
+ (19 0,20 1),(2 2,5 -1,15 2,25 0))"),
+ "lmlu18d"
+ );
+}
+
+
+
+BOOST_AUTO_TEST_CASE( test_union_multilinestring_linestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / LINESTRING UNION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef linestring_type L;
+ typedef multi_linestring_type ML;
+
+ typedef test_union_of_geometries<ML, L, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 2,4 3)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(0 0,10 0,20 1),(1 0,7 0))"),
+ "mllu01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<L>("LINESTRING(1 1,2 0,4 0)"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0))"),
+ "mllu02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<L>("LINESTRING(-1 -1,1 0,101 0,200 -1)"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1),(0 0,1 0))"),
+ "mllu03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<L>("LINESTRING(0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1)"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1),\
+ (0 0,1 0),(19 0,20 0))"),
+ "mllu04"
+ );
+}
+
+
+
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_union_multilinestring_multilinestring )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTILINESTRING / MULTILINESTRING UNION ***"
+ << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_linestring_type ML;
+
+ typedef test_union_of_geometries<ML, ML, ML> tester;
+
+ // disjoint linestrings
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (1 1,2 2,4 3),(1 1,2 2,5 3))"),
+ "mlmlu01"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (1 1,2 0),(1 1,3 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,4 0),\
+ (0 0,2 0),(4 0,10 0,20 1),(1 0,2 0),(4 0,7 0))"),
+ "mlmlu02"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (1 1,2 0),(1 1,3 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(1 1,3 0,5 0),\
+ (0 0,2 0),(5 0,10 0,20 1),(1 0,2 0),(5 0,7 0))"),
+ "mlmlu03"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (1 1,2 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),(0 0,2 0),\
+ (4 0,10 0,20 1),(1 0,2 0),(4 0,7 0))"),
+ "mlmlu04"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0),\
+ (10 10,20 10,30 20),(1 1,2 0),(10 20,15 10),\
+ (20 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (10 20,15 10,25 10,30 15),(0 0,2 0),(4 0,10 0,20 1),\
+ (1 0,2 0),(4 0,7 0),(10 10,15 10),(20 10,30 20))"),
+ "mlmlu05"
+ );
+
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20),(1 1,2 0),\
+ (-1 -1,0 0),(9 0,11 10),(12 10,13 3),(10 20,15 10),\
+ (20 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15),(9 0,10 0,13 3),\
+ (15 5,20 10),(10 10,11 10),(12 10,15 10),(20 10,30 20))"),
+ "mlmlu06"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((1 1,2 0,4 0),\
+ (-1 -1,0 0,9 0,11 10,12 10,13 3,14 4,15 5),\
+ (10 20,15 10,25 10,30 15),(9 0,10 0,13 3),\
+ (15 5,20 10),(10 10,11 10),(12 10,15 10),\
+ (20 10,30 20))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,10 0,20 10),(1 0,7 0),\
+ (10 10,20 10,30 20),(1 1,2 0),(-1 -1,0 0), \
+ (9 0,11 10),(12 10,13 3),(10 20,15 10),\
+ (20 10,25 10,30 15))"),
+ "mlmlu06a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0),(-1 -1,1 0),(101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,1 0,101 0,200 -1),(0 0,1 0))"),
+ "mlmlu07"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((-1 1,0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 1,0 0,101 0),(-1 -1,0 0),\
+ (19 -1,20 0),(101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1),(-1 1,0 0))"),
+ "mlmlu07a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0),(-1 -1,0 0),\
+ (19 -1,20 0),(101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((-1 -1,0 0,50 0),\
+ (19 -1,20 0,101 0,200 -1))"),
+ "mlmlu07b"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,101 0),(0 1,1 1,2 0),\
+ (-1 -1,1 0),(101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0),\
+ (-1 -1,1 0,101 0,200 -1),(0 0,1 0))"),
+ "mlmlu08"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,2 0.5,3 0,101 0),\
+ (0 1,1 1,2 0.5),(-1 -1,1 0,3 0),(101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1),(0 0,1 0,2 0.5,3 0))"),
+ "mlmlu09"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 0,1.5 0,2 0.5,3 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 0,1.5 0,2 0.5,3 0,101 0),\
+ (0 1,1 1,1 0,2 0.5),(-1 -1,1 0),(1.5 0,3 0),\
+ (101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 1,1 0,2 0.5),\
+ (-1 -1,1 0,101 0,200 -1),(0 0,1 0),(1.5 0,2 0.5,3 0))"),
+ "mlmlu10"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,1 1,100 1,101 0),\
+ (0 0,101 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1,3 0,4 0,5 1,6 1,\
+ 7 0,8 0,9 1,10 1,11 0,12 0,13 1,14 1,15 0),\
+ (-1 -1,1 0,101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,1 1,100 1,101 0),\
+ (0 0,101 0),(1 0,1 1),(2 1,3 0),(4 0,5 1),(6 1,7 0),\
+ (8 0,9 1),(10 1,11 0),(12 0,13 1),(14 1,15 0),\
+ (-1 -1,1 0),(101 0,200 -1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,1 1,2 1,3 0,4 0,5 1,6 1,\
+ 7 0,8 0,9 1,10 1,11 0,12 0,13 1,14 1,15 0),\
+ (-1 -1,1 0,101 0,200 -1),(0 0,1 1),(2 1,5 1),\
+ (6 1,9 1),(10 1,13 1),(14 1,100 1,101 0),(0 0,1 0))"),
+ "mlmlu11"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (1 1,2 0),(18 0,19 1),(2 1,3 0),(17 0,18 1),\
+ (3 1,4 0),(16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (1 1,2 0,18 0,19 1),(2 1,3 0,17 0,18 1),\
+ (3 1,4 0,16 0,17 1),(0 0,1 0),(19 0,20 0))"),
+ "mlmlu12"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(19 0,20 1),(18 0,19 1),\
+ (17 0,18 1),(16 0,17 1))"),
+ from_wkt<ML>("MULTILINESTRING((1 0,19 0,20 1),\
+ (2 0,18 0,19 1),(3 0,17 0,18 1),\
+ (4 0,16 0,17 1),(0 0,1 0),(19 0,20 0))"),
+ "mlmlu13"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),\
+ (19 0,20 1,19 1,18 0),(2 0,1 1,2 1,3 0),\
+ (17 0,18 1,17 1,16 0),(4 0,3 1))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1,19 1,18 0,2 0,\
+ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1),\
+ (0 0,1 0),(19 0,20 0))"),
+ "mlmlu14"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 2,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,6 0),(0 0,1 0),(19 0,20 0))"),
+ "mlmlu15"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (6 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,4 2,2 2),(0 0,1 0),(19 0,20 0))"),
+ "mlmlu15a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 2,5 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 2,5 0,6 0),(0 0,1 0),(19 0,20 0))"),
+ "mlmlu16"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,20 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,20 0),(0 1,1 0),(19 0,20 1),\
+ (5 0,4 2,2 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (6 0,5 0,4 2,2 2),(0 0,1 0),(19 0,20 0))"),
+ "mlmlu16a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0),(0 0,1 0),(19 0,30 0))"),
+ "mlmlu17"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,4 0,5 2,20 2,25 0,26 2),(0 0,1 0),(19 0,30 0))"),
+ "mlmlu17a"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,30 0),(0 1,1 0),(19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0),(0 0,1 0),(19 0,30 0))"),
+ "mlmlu18"
+ );
+
+ tester::apply
+ (from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 0,18 0,19 0,30 0),(0 1,1 0),\
+ (19 0,20 1),(2 2,5 -1,15 2,18 0))"),
+ from_wkt<ML>("MULTILINESTRING((0 1,1 0,19 0,20 1),\
+ (2 2,5 -1,15 2,18 0),(0 0,1 0),(19 0,30 0))"),
+ "mlmlu18a"
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/union_multi.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_multi.cpp
new file mode 100644
index 000000000..c76bbcd5e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_multi.cpp
@@ -0,0 +1,499 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include "test_union.hpp"
+#include <algorithms/test_overlay.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+#define TEST_UNION(caseid, clips, holes, points, area) \
+ (test_one<Polygon, MultiPolygon, MultiPolygon>) \
+ ( #caseid, caseid[0], caseid[1], clips, holes, points, area)
+
+#define TEST_UNION_IGNORE(caseid, clips, holes, points, area) \
+ { ut_settings ignore_validity; ignore_validity.test_validity = false; \
+ test_one<Polygon, MultiPolygon, MultiPolygon> \
+ (#caseid, caseid[0], caseid[1], \
+ clips, holes, points, area, ignore_validity); }
+
+
+template <typename Ring, typename Polygon, typename MultiPolygon>
+void test_areal()
+{
+ test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
+ case_multi_simplex[0], case_multi_simplex[1],
+ 1, 0, 20, 14.58);
+
+ test_one<Polygon, Polygon, MultiPolygon>("simplex_multi_p_mp",
+ case_single_simplex, case_multi_simplex[0],
+ 1, 0, 20, 14.58);
+ test_one<Polygon, MultiPolygon, Polygon>("simplex_multi_mp_p",
+ case_multi_simplex[0], case_single_simplex,
+ 1, 0, 20, 14.58);
+
+ test_one<Polygon, Ring, MultiPolygon>("simplex_multi_r_mp",
+ case_single_simplex, case_multi_simplex[0],
+ 1, 0, 20, 14.58);
+ test_one<Ring, MultiPolygon, Polygon>("simplex_multi_mp_r",
+ case_multi_simplex[0], case_single_simplex,
+ 1, 0, 20, 14.58);
+
+
+ // Normal test cases
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_no_ip",
+ case_multi_no_ip[0], case_multi_no_ip[1],
+ 4, 0, 16, 66.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_2",
+ case_multi_2[0], case_multi_2[1],
+ 3, 0, 16, 59.1);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_a",
+ case_58_multi[0], case_58_multi[3],
+ 2, 0, 21, 19.83333333);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_58_multi_b",
+ case_58_multi[1], case_58_multi[2],
+ 1, 3, 17, 48.333333);
+
+ // Constructed cases for multi/touch/equal/etc
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_61_multi",
+ case_61_multi[0], case_61_multi[1],
+ 1, 0, 11, 4.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_62_multi",
+ case_62_multi[0], case_62_multi[1],
+ 2, 0, 10, 2.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_63_multi",
+ case_63_multi[0], case_63_multi[1],
+ 2, 0, 10, 2.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_64_multi",
+ case_64_multi[0], case_64_multi[1],
+ 1, 0, 9, 3.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi",
+ case_65_multi[0], case_65_multi[1],
+ 3, 0, 15, 4.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_66_multi",
+ case_66_multi[0], case_66_multi[1],
+ 3, 0, 23, 7.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_72_multi",
+ case_72_multi[0], case_72_multi[1],
+ 1, 0, 13, 10.65);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_75_multi",
+ case_75_multi[0], case_75_multi[1],
+ 5, 0, 25, 5.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_76_multi",
+ case_76_multi[0], case_76_multi[1],
+ 5, 0, 31, 8.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_89_multi",
+ case_89_multi[0], case_89_multi[1],
+ 1, 0, 13, 6);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",
+ case_101_multi[0], case_101_multi[1],
+ 1, 3, 32, 22.25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_103_multi",
+ case_103_multi[0], case_103_multi[1],
+ 1, 0, 7, 25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_104_multi",
+ case_104_multi[0], case_104_multi[1],
+ 1, 0, 8, 25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_105_multi",
+ case_105_multi[0], case_105_multi[1],
+ 1, 0, 5, 25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_106_multi",
+ case_106_multi[0], case_106_multi[1],
+ 1, 0, 5, 25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi",
+ case_107_multi[0], case_107_multi[1],
+ 1, 0, 15, 6.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_108_multi",
+ case_108_multi[0], case_108_multi[1],
+ 1, 1, 20, 22.75);
+
+ TEST_UNION(case_109_multi, 1, 2, 14, 1400);
+
+ // Should have 9 holes, they are all separate and touching
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_110_multi",
+ case_110_multi[0], case_110_multi[1],
+ 1, 9, 45, 1250);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_111_multi",
+ case_111_multi[0], case_111_multi[1],
+ 2, 0, 10, 16);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_112_multi",
+ case_112_multi[0], case_112_multi[1],
+ 2, 0, 16, 48);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_113_multi",
+ case_113_multi[0], case_113_multi[1],
+ 2, 0, 13, 162.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_114_multi",
+ case_114_multi[0], case_114_multi[1],
+ 1, 1, 13, 187.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_115_multi",
+ case_115_multi[0], case_115_multi[1],
+ 1, 1, 18, 26.7036);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_116_multi",
+ case_116_multi[0], case_116_multi[1],
+ 1, 2, 27, 51);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_117_multi",
+ case_117_multi[0], case_117_multi[1],
+ 2, 0, 18, 22);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_118_multi",
+ case_118_multi[0], case_118_multi[1],
+ 3, 0, 27, 46);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_119_multi",
+ case_119_multi[0], case_119_multi[1],
+ 2, 0, 26, 44);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_120_multi",
+ case_120_multi[0], case_120_multi[1],
+ 1, 1, 17, 35);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_121_multi",
+ case_121_multi[0], case_121_multi[1],
+ 1, 1, 14, 25.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_122_multi",
+ case_122_multi[0], case_122_multi[1],
+ 1, 1, 14, 29.5);
+
+ TEST_UNION(case_123_multi, 1, 0, 11, 2.75);
+ TEST_UNION(case_124_multi, 1, 0, 9, 2.75);
+ TEST_UNION(case_125_multi, 1, 0, 9, 2.75);
+ TEST_UNION(case_126_multi, 1, 2, 27, 52.0);
+
+ TEST_UNION(case_131_multi, 1, 2, 15, 14.0);
+
+ // SQL Server returns: MULTIPOLYGON (((4 4, 5.5 4.5, 6 6, 4.5 5.5, 4 4)), ((2 2, 3.5 2.5, 4 4, 2.5 3.5, 2 2)), ((0 0, 8 0, 8 8, 0 8, 0 0), (2 2, 2 4, 4 4, 4 6, 6 6, 6 4, 4 4, 4 2, 2 2)))
+ // Which is one self-connected hole with two island polygons in both parts, basically identical to what Boost.Geometry delivers
+
+ // PostGIS returns: MULTIPOLYGON(((0 0,0 8,8 8,8 0,0 0),(4 6,4 4,6 4,6 6,4 6)),((2 2,2.5 3.5,4 4,3.5 2.5,2 2),(4 4,2 4,2 2,4 2,4 4)),((4 4,4.5 5.5,6 6,5.5 4.5,4 4)))
+ // Which seems wrong because the second hole is part of a smaller polygon (?)
+ // ("POSTGIS="2.1.7 r13414" GEOS="3.5.0dev-CAPI-1.9.0 r4057")
+ TEST_UNION(case_132_multi, 3, 2, 26, 60.0);
+
+ TEST_UNION(case_133_multi, 2, 1, -1, 64.625);
+ TEST_UNION(case_134_multi, 1, 2, -1, 66.0);
+ TEST_UNION(case_135_multi, 1, 2, -1, 22.0);
+ TEST_UNION(case_136_multi, 1, 2, -1, 22.0);
+ TEST_UNION(case_137_multi, 1, 2, -1, 22.0);
+ TEST_UNION(case_138_multi, 2, 1, -1, 65.225);
+ TEST_UNION(case_139_multi, 2, 1, -1, 64.953);
+ TEST_UNION(case_140_multi, 2, 1, -1, 64.953);
+ TEST_UNION(case_141_multi, 1, 0, -1, 100.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_1",
+ case_recursive_boxes_1[0], case_recursive_boxes_1[1],
+ 1, 1, 16, 97.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_2",
+ case_recursive_boxes_2[0], case_recursive_boxes_2[1],
+ 1, 0, 5, 100.0); // Area from SQL Server
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
+ case_recursive_boxes_3[0], case_recursive_boxes_3[1],
+ 17, 6, 154, 56.5); // Area from SQL Server
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_4",
+ case_recursive_boxes_4[0], case_recursive_boxes_4[1],
+ 1, 2, 26, 96.75);
+
+ TEST_UNION(case_recursive_boxes_5, 3, 10, 98, 70.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_6",
+ case_recursive_boxes_6[0], case_recursive_boxes_6[1],
+ 1, 3, 17, 24.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_7",
+ case_recursive_boxes_7[0], case_recursive_boxes_7[1],
+ 2, 0, 20, 7.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_8",
+ case_recursive_boxes_8[0], case_recursive_boxes_8[1],
+ 1, 0, 13, 12.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_9",
+ case_recursive_boxes_9[0], case_recursive_boxes_9[1],
+ 1, 1, 11, 8.25);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_10",
+ case_recursive_boxes_10[0], case_recursive_boxes_10[1],
+ 1, 0, -1, 2.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_11",
+ case_recursive_boxes_11[0], case_recursive_boxes_11[1],
+ 1, 0, -1, 8.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_12",
+ case_recursive_boxes_12[0], case_recursive_boxes_12[1],
+ 6, 0, -1, 6.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_13",
+ case_recursive_boxes_13[0], case_recursive_boxes_13[1],
+ 3, 0, -1, 10.25);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_14",
+ case_recursive_boxes_14[0], case_recursive_boxes_14[1],
+ 5, 0, -1, 4.5);
+
+ // 12, 13, 14 with invalid input. To make then valid it is necessary
+ // to break regions at self-intersection points (postponed)
+
+ TEST_UNION_IGNORE(case_recursive_boxes_12_invalid, 5, 0, -1, 6.0);
+ TEST_UNION_IGNORE(case_recursive_boxes_13_invalid, 2, 0, -1, 10.25);
+ TEST_UNION_IGNORE(case_recursive_boxes_14_invalid, 4, 0, -1, 4.5);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_15",
+ case_recursive_boxes_15[0], case_recursive_boxes_15[1],
+ 3, 0, -1, 6.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_16",
+ case_recursive_boxes_16[0], case_recursive_boxes_16[1],
+ 1, 4, -1, 22.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_17",
+ case_recursive_boxes_17[0], case_recursive_boxes_17[1],
+ 5, 2, -1, 21.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_18",
+ case_recursive_boxes_18[0], case_recursive_boxes_18[1],
+ 3, 0, -1, 2.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_19",
+ case_recursive_boxes_19[0], case_recursive_boxes_19[1],
+ 3, 0, -1, 2.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_20",
+ case_recursive_boxes_20[0], case_recursive_boxes_20[1],
+ 2, 0, -1, 2.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_21",
+ case_recursive_boxes_21[0], case_recursive_boxes_21[1],
+ 1, 0, -1, 2.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_22",
+ case_recursive_boxes_22[0], case_recursive_boxes_22[1],
+ 2, 0, -1, 3.25);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_23",
+ case_recursive_boxes_23[0], case_recursive_boxes_23[1],
+ 3, 0, -1, 1.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_24",
+ case_recursive_boxes_24[0], case_recursive_boxes_24[1],
+ 5, 0, -1, 5.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_25",
+ case_recursive_boxes_25[0], case_recursive_boxes_25[1],
+ 2, 0, -1, 5.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_26",
+ case_recursive_boxes_26[0], case_recursive_boxes_26[1],
+ 3, 0, -1, 6.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_27",
+ case_recursive_boxes_27[0], case_recursive_boxes_27[1],
+ 4, 0, -1, 4.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_28",
+ case_recursive_boxes_28[0], case_recursive_boxes_28[1],
+ 2, 0, -1, 6.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_29",
+ case_recursive_boxes_29[0], case_recursive_boxes_29[1],
+ 2, 2, -1, 15.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_30",
+ case_recursive_boxes_30[0], case_recursive_boxes_30[1],
+ 1, 3, -1, 17.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_31",
+ case_recursive_boxes_31[0], case_recursive_boxes_31[1],
+ 3, 0, -1, 5.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_32",
+ case_recursive_boxes_32[0], case_recursive_boxes_32[1],
+ 2, 0, -1, 5.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_33",
+ case_recursive_boxes_33[0], case_recursive_boxes_33[1],
+ 1, 1, -1, 11.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_34",
+ case_recursive_boxes_34[0], case_recursive_boxes_34[1],
+ 1, 0, -1, 25.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_35",
+ case_recursive_boxes_35[0], case_recursive_boxes_35[1],
+ 1, 1, -1, 24.5);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_36",
+ case_recursive_boxes_36[0], case_recursive_boxes_36[1],
+ 3, 0, -1, 3.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_37",
+ case_recursive_boxes_37[0], case_recursive_boxes_37[1],
+ 2, 1, -1, 7.75);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_38",
+ case_recursive_boxes_38[0], case_recursive_boxes_38[1],
+ 2, 1, -1, 14.0);
+
+ TEST_UNION(case_recursive_boxes_46, 1, 4, 51, 33.0);
+ TEST_UNION(case_recursive_boxes_47, 1, 0, -1, 22.0);
+ TEST_UNION(case_recursive_boxes_48, 1, 1, -1, 10.0);
+ TEST_UNION(case_recursive_boxes_49, 1, 3, -1, 59.0);
+ TEST_UNION(case_recursive_boxes_50, 7, 4, -1, 68.0);
+ TEST_UNION(case_recursive_boxes_51, 2, 6, -1, 75.0);
+ TEST_UNION(case_recursive_boxes_52, 2, 6, -1, 77.0);
+ TEST_UNION(case_recursive_boxes_53, 1, 1, -1, 24.75);
+ TEST_UNION(case_recursive_boxes_54, 1, 2, -1, 22.5);
+ TEST_UNION(case_recursive_boxes_55, 3, 1, -1, 15.5);
+ TEST_UNION(case_recursive_boxes_56, 5, 1, -1, 7.75);
+ TEST_UNION(case_recursive_boxes_57, 3, 4, -1, 19.75);
+ TEST_UNION(case_recursive_boxes_58, 6, 1, -1, 6.25);
+ TEST_UNION(case_recursive_boxes_59, 1, 3, -1, 21.75);
+ TEST_UNION(case_recursive_boxes_60, 3, 0, -1, 20.5);
+ TEST_UNION(case_recursive_boxes_61, 1, 1, -1, 23.5);
+ TEST_UNION(case_recursive_boxes_62, 2, 3, -1, 21.25);
+ TEST_UNION(case_recursive_boxes_63, 2, 3, -1, 44.0);
+ TEST_UNION(case_recursive_boxes_64, 1, 2, -1, 24.5);
+ TEST_UNION(case_recursive_boxes_65, 1, 1, -1, 24.5);
+ TEST_UNION(case_recursive_boxes_66, 1, 1, -1, 24.75);
+ TEST_UNION(case_recursive_boxes_67, 4, 0, -1, 14.75);
+ TEST_UNION(case_recursive_boxes_68, 1, 4, -1, 22.5);
+ TEST_UNION(case_recursive_boxes_69, 4, 0, -1, 16.25);
+ TEST_UNION(case_recursive_boxes_70, 1, 0, -1, 25.0);
+ TEST_UNION(case_recursive_boxes_71, 4, 2, -1, 15.75);
+ TEST_UNION(case_recursive_boxes_72, 10, 0, -1, 15.0);
+ TEST_UNION(case_recursive_boxes_73, 1, 2, -1, 24.25);
+ TEST_UNION(case_recursive_boxes_74, 1, 1, -1, 24.75);
+ TEST_UNION(case_recursive_boxes_75, 1, 2, -1, 23.25);
+ TEST_UNION(case_recursive_boxes_76, 1, 0, -1, 24.5);
+ TEST_UNION(case_recursive_boxes_77, 8, 1, -1, 13.5);
+ TEST_UNION(case_recursive_boxes_78, 2, 5, -1, 18.0);
+ TEST_UNION(case_recursive_boxes_79, 1, 2, -1, 14.75);
+
+ // No hole should be generated (but rescaling generates one hole)
+ TEST_UNION(case_recursive_boxes_80, 2, BG_IF_RESCALED(1, 0), -1, 1.5);
+
+ TEST_UNION(case_recursive_boxes_81, 5, 0, -1, 15.5);
+ TEST_UNION(case_recursive_boxes_82, 2, 2, -1, 20.25);
+ TEST_UNION(case_recursive_boxes_83, 3, 1, -1, 20.75);
+ TEST_UNION(case_recursive_boxes_84, 4, 1, -1, 17.5);
+ TEST_UNION(case_recursive_boxes_85, 9, 0, -1, 8.0);
+ TEST_UNION(case_recursive_boxes_86, 3, 0, -1, 3.0);
+ TEST_UNION(case_recursive_boxes_87, 8, 0, -1, 4.5);
+ TEST_UNION(case_recursive_boxes_88, 5, 1, -1, 15.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
+ 1, 0, 12, 23.0); // Area from SQL Server
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
+ 1, 0, 12, 23.0); // Area from SQL Server
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20140212_sybren",
+ ggl_list_20140212_sybren[0], ggl_list_20140212_sybren[1],
+ 2, 0, 16, 0.002471626);
+
+ {
+ // Generates either 4 or 3 output polygons
+ // With rescaling the result is invalid.
+ ut_settings settings;
+ settings.test_validity = BG_IF_RESCALED(false, true);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
+ ticket_9081[0], ticket_9081[1],
+ BG_IF_RESCALED(4, 3), 0, 31, 0.2187385,
+ settings);
+ }
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_10803",
+ ticket_10803[0], ticket_10803[1],
+ 1, 0, 9, 2663736.07038);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_11984",
+ ticket_11984[0], ticket_11984[1],
+ 1, 2, 134, 60071.08077);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_12118",
+ ticket_12118[0], ticket_12118[1],
+ 1, -1, 27, 2221.38713);
+
+#if defined(BOOST_GEOMETRY_TEST_FAILURES) || ! defined(BOOST_GEOMETRY_USE_RESCALING)
+ // No output if rescaling is done
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_12125",
+ ticket_12125[0], ticket_12125[1],
+ 1, 0, -1, 575.831180350007);
+#endif
+
+ TEST_UNION(ticket_12503, 42, 1, -1, 945.625);
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Failure with rescaling
+ TEST_UNION(issue_630_a, 1, 0, -1, 2.200326);
+#endif
+ TEST_UNION(issue_630_b, 1, 0, -1, 1.675976);
+#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // Failure with Kramer rule
+ TEST_UNION(issue_630_c, 1, 0, -1, 1.670367);
+#endif
+
+#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
+ // With rescaling the small polygon is added on top of the outer polygon
+ TEST_UNION(issue_643, 1, 0, -1, 80.0);
+#endif
+
+#if defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+ // Two polygons, should ideally be merged
+ TEST_UNION(mail_2019_01_21_johan, 2, 0, -1, 0.00058896);
+#else
+ // Correct: one polygon
+ TEST_UNION(mail_2019_01_21_johan, 1, 0, -1, 0.00058896);
+#endif
+
+ TEST_UNION(mysql_23023665_7, 1, 1, -1, 99.19494);
+ TEST_UNION(mysql_23023665_8, 1, 2, -1, 1400.0);
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("mysql_23023665_9",
+ mysql_23023665_9[0], mysql_23023665_9[1],
+ 1, 9, -1, 1250.0);
+
+ TEST_UNION(mysql_regression_1_65_2017_08_31, 3, 0, -1, 181.966397646608);
+}
+
+// Test cases (generic)
+template <typename Point, bool ClockWise, bool Closed>
+void test_all()
+{
+
+ typedef bg::model::ring<Point, ClockWise, Closed> ring;
+ typedef bg::model::polygon<Point, ClockWise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ test_areal<ring, polygon, multi_polygon>();
+}
+
+// Test cases for integer coordinates / ccw / open
+template <typename Point, bool ClockWise, bool Closed>
+void test_specific()
+{
+ typedef bg::model::polygon<Point, ClockWise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ ut_settings settings;
+ settings.test_validity = true;
+
+ test_one<polygon, multi_polygon, multi_polygon>("ticket_10803",
+ ticket_10803[0], ticket_10803[1],
+ 1, 0, 9, 2664270, settings);
+}
+
+
+int test_main(int, char* [])
+{
+ BoostGeometryWriteTestConfiguration();
+ test_all<bg::model::d2::point_xy<default_test_type>, true, true>();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<bg::model::d2::point_xy<double>, false, false>();
+
+ test_specific<bg::model::d2::point_xy<int>, false, false>();
+
+ test_all<bg::model::d2::point_xy<float>, true, true>();
+
+#if defined(HAVE_TTMATH)
+ std::cout << "Testing TTMATH" << std::endl;
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/set_operations/union/union_pl_pl.cpp b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_pl_pl.cpp
new file mode 100644
index 000000000..030a62784
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/set_operations/union/union_pl_pl.cpp
@@ -0,0 +1,202 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+#include <iostream>
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_union_pointlike_pointlike
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#define BOOST_GEOMETRY_DEBUG_TURNS
+#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include "../test_set_ops_pointlike.hpp"
+
+#include <boost/geometry/geometries/multi_point.hpp>
+
+typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+
+
+//===========================================================================
+//===========================================================================
+//===========================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_union_point_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** POINT / POINT UNION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ P, P, MP, bg::overlay_union
+ > tester;
+
+ tester::apply
+ ("ppu01",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)")
+ );
+
+ tester::apply
+ ("ppu02",
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_union_multipoint_point )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / POINT UNION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef point_type P;
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, P, MP, bg::overlay_union
+ > tester;
+
+ tester::apply
+ ("mppu01",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1)")
+ );
+
+ tester::apply
+ ("mppu02",
+ from_wkt<MP>("MULTIPOINT(0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mppu03",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 1)")
+ );
+
+ tester::apply
+ ("mppu04",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+
+ tester::apply
+ ("mppu05",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(1 1)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0,1 1)")
+ );
+
+ tester::apply
+ ("mppu06",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(1 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)")
+ );
+
+ tester::apply
+ ("mppu07",
+ from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 0)")
+ );
+
+ tester::apply
+ ("mppu08",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<P>("POINT(0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0)")
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE( test_union_multipoint_multipoint )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+ std::cout << "*** MULTIPOINT / MULTIPOINT UNION ***" << std::endl;
+ std::cout << std::endl;
+#endif
+
+ typedef multi_point_type MP;
+
+ typedef test_set_op_of_pointlike_geometries
+ <
+ MP, MP, MP, bg::overlay_union
+ > tester;
+
+ tester::apply
+ ("mpmpu01",
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)"),
+ from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1,2 2,3 3,0 0,0 0,2 2)")
+ );
+
+ tester::apply
+ ("mpmpu02",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
+ );
+
+ tester::apply
+ ("mpmpu03",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
+ from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
+ );
+
+ tester::apply
+ ("mpmpu04",
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)")
+ );
+
+ tester::apply
+ ("mpmpu05",
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()"),
+ from_wkt<MP>("MULTIPOINT()")
+ );
+
+ tester::apply
+ ("mpmpu06",
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0)"),
+ from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0,0 1,0 2)"),
+ from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0,3 0)")
+ );
+}
diff --git a/src/boost/libs/geometry/test/algorithms/similarity/Jamfile b/src/boost/libs/geometry/test/algorithms/similarity/Jamfile
new file mode 100644
index 000000000..f8452b1a4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/similarity/Jamfile
@@ -0,0 +1,15 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
+#
+# Contributed and/or modified by Yaghyavardhan Singh Khangarot, as part of Google Summer of Code 2018 program.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-similarity
+ :
+ [ run discrete_frechet_distance.cpp : : : : algorithms_discrete_frechet_distance ]
+ [ run discrete_hausdorff_distance.cpp : : : : algorithms_discrete_hausdorff_distance ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/similarity/discrete_frechet_distance.cpp b/src/boost/libs/geometry/test/algorithms/similarity/discrete_frechet_distance.cpp
new file mode 100644
index 000000000..35e552585
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/similarity/discrete_frechet_distance.cpp
@@ -0,0 +1,95 @@
+// Boost.Geometry
+
+// Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
+
+// Contributed and/or modified by Yaghyavardhan Singh Khangarot, as part of Google Summer of Code 2018 program.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <vector>
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include "test_frechet_distance.hpp"
+
+ template <typename P>
+void test_all_cartesian()
+{
+ typedef bg::model::linestring<P> linestring_2d;
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef typename coordinate_system<P>::type CordType;
+ std::cout << typeid(CordType).name() << std::endl;
+#endif
+
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)", 3);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)",bg::strategy::distance::pythagoras<>(), 3);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(1 1, 0 1, 0 0, 1 0, 1 1)",sqrt(2.0));
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(1 1, 0 0, 1 0, 1 1)",sqrt(2.0));
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0)","LINESTRING(0 0, 1 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0,3 4,4 3)","LINESTRING(4 3,3 4,0 0)",5);
+
+
+}
+
+ template <typename P>
+void test_all_geographic()
+{
+ typedef bg::model::linestring<P> linestring_2d;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef typename coordinate_system<P>::type CordType;
+ std::cout << typeid(CordType).name() << std::endl;
+#endif
+
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)", 333958);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)",bg::strategy::distance::geographic<bg::strategy::vincenty>(), 333958.472379679);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)",bg::strategy::distance::geographic<bg::strategy::thomas>(), 333958.472379679);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(1 1, 0 1, 0 0, 1 0, 1 1)",156898);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(1 1, 0 0, 1 0, 1 1)",156898);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0)","LINESTRING(0 0, 1 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0,3 4,4 3)","LINESTRING(4 3,3 4,0 0)",555093);
+
+}
+
+ template <typename P>
+void test_all_spherical_equ()
+{
+ typedef bg::model::linestring<P> linestring_2d;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef typename coordinate_system<P>::type CordType;
+ std::cout << typeid(CordType).name() << std::endl;
+#endif
+
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)", 0.05235987);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)",bg::strategy::distance::haversine<int>(), 0.05235987);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(1 1, 0 1, 0 0, 1 0, 1 1)",0.02468205);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(1 1, 0 0, 1 0, 1 1)",0.02468205);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0)","LINESTRING(0 0, 1 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0,3 4,4 3)","LINESTRING(4 3,3 4,0 0)",0.0872409);
+
+}
+
+int test_main(int, char* [])
+{
+ //Cartesian Coordinate System
+ test_all_cartesian<bg::model::d2::point_xy<double,bg::cs::cartesian> >();
+
+ //Geographic Coordinate System
+ test_all_geographic<bg::model::d2::point_xy<double,bg::cs::geographic<bg::degree> > >();
+
+ //Spherical_Equatorial Coordinate System
+ test_all_spherical_equ<bg::model::d2::point_xy<double,bg::cs::spherical_equatorial<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/similarity/discrete_hausdorff_distance.cpp b/src/boost/libs/geometry/test/algorithms/similarity/discrete_hausdorff_distance.cpp
new file mode 100644
index 000000000..d5d98cdcb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/similarity/discrete_hausdorff_distance.cpp
@@ -0,0 +1,118 @@
+// Boost.Geometry
+
+// Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
+
+// Contributed and/or modified by Yaghyavardhan Singh Khangarot,
+// as part of Google Summer of Code 2018 program.
+
+// This file was modified by Oracle on 2018.
+// Modifications copyright (c) 2018 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <vector>
+
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+
+#include "test_hausdorff_distance.hpp"
+
+ template <typename P>
+void test_all_cartesian()
+{
+ typedef bg::model::linestring<P> linestring_2d;
+ typedef bg::model::multi_linestring<linestring_2d> mlinestring_t;
+ typedef bg::model::multi_point<P> mpoint_t;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef typename coordinate_system<P>::type CordType;
+ std::cout << typeid(CordType).name() << std::endl;
+#endif
+
+ test_geometry<P,mpoint_t>("POINT(3 1)","MULTIPOINT(0 0,3 4,4 3)", sqrt(5.0));
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)", 3);
+ test_geometry<mpoint_t,mpoint_t>("MULTIPOINT(3 0,2 1,3 2)","MULTIPOINT(0 0,3 4,4 3)", 3);
+ test_geometry<linestring_2d,mlinestring_t >("LINESTRING(1 1,2 2,4 3)","MULTILINESTRING((0 0,3 4,4 3),(1 1,2 2,4 3))", sqrt(5.0));
+ test_geometry<mlinestring_t,mlinestring_t >("MULTILINESTRING((3 0,2 1,3 2),(0 0,3 4,4 3))","MULTILINESTRING((0 0,3 4,4 3),(3 0,2 1,3 2))", 3);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(1 1, 0 1, 0 0, 1 0, 1 1)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(1 1, 0 0, 1 0, 1 1)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0)","LINESTRING(0 0, 1 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0,3 4,4 3)","LINESTRING(4 3,3 4,0 0)",0);
+}
+
+ template <typename P>
+void test_all_geographic()
+{
+ typedef bg::model::linestring<P> linestring_2d;
+ typedef bg::model::multi_linestring<linestring_2d> mlinestring_t;
+ typedef bg::model::multi_point<P> mpoint_t;
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef typename coordinate_system<P>::type CordType;
+ std::cout << typeid(CordType).name() << std::endl;
+#endif
+
+ test_geometry<P,mpoint_t>("POINT(3 1)","MULTIPOINT(0 0,3 4,4 3)", 247552);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)", 333958);
+ test_geometry<mpoint_t,mpoint_t>("MULTIPOINT(3 0,2 1,3 2)","MULTIPOINT(0 0,3 4,4 3)", 333958);
+ test_geometry<linestring_2d,mlinestring_t >("LINESTRING(1 1,2 2,4 3)","MULTILINESTRING((0 0,3 4,4 3),(1 1,2 2,4 3))", 247518);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)",bg::strategy::distance::geographic<bg::strategy::vincenty>(), 333958.472379679);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)",bg::strategy::distance::geographic<bg::strategy::thomas>(), 333958.472379679);
+ test_geometry<mlinestring_t,mlinestring_t >("MULTILINESTRING((3 0,2 1,3 2),(0 0,3 4,4 3))","MULTILINESTRING((0 0,3 4,4 3),(3 0,2 1,3 2))",333958);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(1 1, 0 1, 0 0, 1 0, 1 1)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(1 1, 0 0, 1 0, 1 1)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0)","LINESTRING(0 0, 1 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0,3 4,4 3)","LINESTRING(4 3,3 4,0 0)",0);
+}
+
+ template <typename P>
+void test_all_spherical_equ()
+{
+ typedef bg::model::linestring<P> linestring_2d;
+ typedef bg::model::multi_linestring<linestring_2d> mlinestring_t;
+ typedef bg::model::multi_point<P> mpoint_t;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef typename coordinate_system<P>::type CordType;
+ std::cout << typeid(CordType).name() << std::endl;
+#endif
+
+ test_geometry<P,mpoint_t>("POINT(3 1)","MULTIPOINT(0 0,3 4,4 3)", 0.03902);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(3 0,2 1,3 2)","LINESTRING(0 0,3 4,4 3)", 0.05236);
+ test_geometry<mpoint_t,mpoint_t>("MULTIPOINT(3 0,2 1,3 2)","MULTIPOINT(0 0,3 4,4 3)", 0.05236);
+ test_geometry<linestring_2d,mlinestring_t >("LINESTRING(1 1,2 2,4 3)","MULTILINESTRING((0 0,3 4,4 3),(1 1,2 2,4 3))", 0.03900);
+ test_geometry<mlinestring_t,mlinestring_t >("MULTILINESTRING((3 0,2 1,3 2),(0 0,3 4,4 3))","MULTILINESTRING((0 0,3 4,4 3),(3 0,2 1,3 2))",0.05236);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 1, 0 0)","LINESTRING(1 1, 0 1, 0 0, 1 0, 1 1)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(0 0, 1 0, 1 1, 0 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0, 1 1, 0 0)","LINESTRING(1 1, 0 0, 1 0, 1 1)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0, 1 0)","LINESTRING(0 0, 1 0)",0);
+ test_geometry<linestring_2d,linestring_2d >("LINESTRING(0 0,3 4,4 3)","LINESTRING(4 3,3 4,0 0)",0);
+}
+
+int test_main(int, char* [])
+{
+ //Cartesian Coordinate System
+ test_all_cartesian<bg::model::d2::point_xy<int,bg::cs::cartesian> >();
+ test_all_cartesian<bg::model::d2::point_xy<float,bg::cs::cartesian> >();
+ test_all_cartesian<bg::model::d2::point_xy<double,bg::cs::cartesian> >();
+
+ //Geographic Coordinate System
+ test_all_geographic<bg::model::d2::point_xy<float,bg::cs::geographic<bg::degree> > >();
+ test_all_geographic<bg::model::d2::point_xy<double,bg::cs::geographic<bg::degree> > >();
+
+ //Spherical_Equatorial Coordinate System
+ test_all_spherical_equ<bg::model::d2::point_xy<float,bg::cs::spherical_equatorial<bg::degree> > >();
+ test_all_spherical_equ<bg::model::d2::point_xy<double,bg::cs::spherical_equatorial<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/similarity/test_frechet_distance.hpp b/src/boost/libs/geometry/test/algorithms/similarity/test_frechet_distance.hpp
new file mode 100644
index 000000000..cca028525
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/similarity/test_frechet_distance.hpp
@@ -0,0 +1,144 @@
+// Boost.Geometry
+
+// Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
+
+// Contributed and/or modified by Yaghyavardhan Singh Khangarot, as part of Google Summer of Code 2018 program.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_FRECHET_DISTANCE_HPP
+#define BOOST_GEOMETRY_TEST_FRECHET_DISTANCE_HPP
+
+#include <geometry_test_common.hpp>
+#include <boost/geometry/algorithms/discrete_frechet_distance.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/variant/variant.hpp>
+
+template <typename Geometry1,typename Geometry2>
+void test_frechet_distance(Geometry1 const& geometry1,Geometry2 const& geometry2,
+ typename bg::distance_result
+ <
+ typename bg::point_type<Geometry1>::type,
+ typename bg::point_type<Geometry2>::type
+ >::type expected_frechet_distance )
+{
+ using namespace bg;
+ typedef typename distance_result
+ <
+ typename point_type<Geometry1>::type,
+ typename point_type<Geometry2>::type
+ >::type result_type;
+ result_type h_distance = bg::discrete_frechet_distance(geometry1,geometry2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
+ << std::endl
+ << typeid(typename bg::coordinate_type<Geometry2>::type).name()
+ << std::endl
+ << typeid(h_distance).name()
+ << std::endl
+ << "frechet_distance : " << bg::discrete_frechet_distance(geometry1,geometry2)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(h_distance, expected_frechet_distance, 0.001);
+}
+
+
+
+template <typename Geometry1,typename Geometry2>
+void test_geometry(std::string const& wkt1,std::string const& wkt2,
+ typename bg::distance_result
+ <
+ typename bg::point_type<Geometry1>::type,
+ typename bg::point_type<Geometry2>::type
+ >::type expected_frechet_distance)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+ test_frechet_distance(geometry1,geometry2,expected_frechet_distance);
+#if defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_frechet_distance(boost::variant<Geometry1>(geometry1),boost::variant<Geometry2>(geometry2), expected_frechet_distance);
+#endif
+}
+
+template <typename Geometry1,typename Geometry2 ,typename Strategy>
+void test_frechet_distance(Geometry1 const& geometry1,Geometry2 const& geometry2,Strategy strategy,
+ typename bg::distance_result
+ <
+ typename bg::point_type<Geometry1>::type,
+ typename bg::point_type<Geometry2>::type,
+ Strategy
+ >::type expected_frechet_distance )
+{
+ using namespace bg;
+ typedef typename distance_result
+ <
+ typename point_type<Geometry1>::type,
+ typename point_type<Geometry2>::type,
+ Strategy
+ >::type result_type;
+ result_type h_distance = bg::discrete_frechet_distance(geometry1,geometry2,strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
+ << std::endl
+ << typeid(typename bg::coordinate_type<Geometry2>::type).name()
+ << std::endl
+ << typeid(h_distance).name()
+ << std::endl
+ << "frechet_distance : " << bg::discrete_frechet_distance(geometry1,geometry2,strategy)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(h_distance, expected_frechet_distance, 0.001);
+}
+
+
+
+template <typename Geometry1,typename Geometry2,typename Strategy>
+void test_geometry(std::string const& wkt1,std::string const& wkt2,Strategy strategy,
+ typename bg::distance_result
+ <
+ typename bg::point_type<Geometry1>::type,
+ typename bg::point_type<Geometry2>::type,
+ Strategy
+ >::type expected_frechet_distance)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+ test_frechet_distance(geometry1,geometry2,strategy,expected_frechet_distance);
+#if defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_frechet_distance(boost::variant<Geometry1>(geometry1),boost::variant<Geometry2>(geometry2),strategy, expected_frechet_distance);
+#endif
+}
+
+
+template <typename Geometry1,typename Geometry2>
+void test_empty_input(Geometry1 const& geometry1,Geometry2 const& geometry2)
+{
+ try
+ {
+ bg::discrete_frechet_distance(geometry1,geometry2);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+
+#endif
+
diff --git a/src/boost/libs/geometry/test/algorithms/similarity/test_hausdorff_distance.hpp b/src/boost/libs/geometry/test/algorithms/similarity/test_hausdorff_distance.hpp
new file mode 100644
index 000000000..8b96f6109
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/similarity/test_hausdorff_distance.hpp
@@ -0,0 +1,138 @@
+// Boost.Geometry
+
+// Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
+// Contributed and/or modified by Yaghyavardhan Singh Khangarot,
+// as part of Google Summer of Code 2018 program.
+
+// This file was modified by Oracle on 2018.
+// Modifications copyright (c) 2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_HAUSDORFF_DISTANCE_HPP
+#define BOOST_GEOMETRY_TEST_HAUSDORFF_DISTANCE_HPP
+
+#include <geometry_test_common.hpp>
+#include <boost/geometry/algorithms/discrete_hausdorff_distance.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/variant/variant.hpp>
+
+template <typename Geometry1, typename Geometry2, typename Expected>
+void test_hausdorff_distance(Geometry1 const& geometry1, Geometry2 const& geometry2,
+ Expected const& expected_hausdorff_distance)
+{
+ typedef typename bg::distance_result
+ <
+ typename bg::point_type<Geometry1>::type,
+ typename bg::point_type<Geometry2>::type
+ >::type result_type;
+
+ result_type h_distance = bg::discrete_hausdorff_distance(geometry1, geometry2);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
+ << std::endl
+ << typeid(typename bg::coordinate_type<Geometry2>::type).name()
+ << std::endl
+ << typeid(h_distance).name()
+ << std::endl
+ << "hausdorff_distance : " << h_distance
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(h_distance, result_type(expected_hausdorff_distance), 0.01);
+}
+
+
+
+template <typename Geometry1, typename Geometry2, typename Expected>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ Expected const& expected_hausdorff_distance)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+
+ test_hausdorff_distance(geometry1, geometry2, expected_hausdorff_distance);
+
+#if defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_hausdorff_distance(boost::variant<Geometry1>(geometry1),
+ boost::variant<Geometry2>(geometry2),
+ expected_hausdorff_distance);
+#endif
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy, typename Expected>
+void test_hausdorff_distance(Geometry1 const& geometry1, Geometry2 const& geometry2,
+ Strategy strategy, Expected const& expected_hausdorff_distance)
+{
+ typedef typename bg::distance_result
+ <
+ typename bg::point_type<Geometry1>::type,
+ typename bg::point_type<Geometry2>::type,
+ Strategy
+ >::type result_type;
+
+ result_type h_distance = bg::discrete_hausdorff_distance(geometry1, geometry2, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
+ << std::endl
+ << typeid(typename bg::coordinate_type<Geometry2>::type).name()
+ << std::endl
+ << typeid(h_distance).name()
+ << std::endl
+ << "hausdorff_distance : " << h_distance
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(h_distance, result_type(expected_hausdorff_distance), 0.01);
+}
+
+
+
+template <typename Geometry1, typename Geometry2, typename Strategy, typename Expected>
+void test_geometry(std::string const& wkt1, std::string const& wkt2,
+ Strategy strategy, Expected const& expected_hausdorff_distance)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+
+ test_hausdorff_distance(geometry1, geometry2, strategy, expected_hausdorff_distance);
+
+#if defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_hausdorff_distance(boost::variant<Geometry1>(geometry1),
+ boost::variant<Geometry2>(geometry2),
+ strategy, expected_hausdorff_distance);
+#endif
+}
+
+
+template <typename Geometry1,typename Geometry2>
+void test_empty_input(Geometry1 const& geometry1, Geometry2 const& geometry2)
+{
+ try
+ {
+ bg::discrete_hausdorff_distance(geometry1, geometry2);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown");
+}
+
+
+#endif
+
diff --git a/src/boost/libs/geometry/test/algorithms/simplify.cpp b/src/boost/libs/geometry/test/algorithms/simplify.cpp
new file mode 100644
index 000000000..81c7be5da
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/simplify.cpp
@@ -0,0 +1,311 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iterator>
+
+
+#include <algorithms/test_simplify.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <test_geometries/wrapped_boost_array.hpp>
+#include <test_common/test_point.hpp>
+
+// #define TEST_PULL89
+#ifdef TEST_PULL89
+#include <boost/geometry/strategies/cartesian/distance_projected_point_ax.hpp>
+#endif
+
+
+#ifdef TEST_PULL89
+template <typename Geometry, typename T>
+void test_with_ax(std::string const& wkt,
+ std::string const& expected,
+ T const& adt,
+ T const& xdt)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+ typedef bg::strategy::distance::detail::projected_point_ax<> ax_type;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ bg::strategy::distance::detail::projected_point_ax<>,
+ point_type,
+ point_type
+ >::type return_type;
+
+ typedef bg::strategy::distance::detail::projected_point_ax_less
+ <
+ return_type
+ > comparator_type;
+
+ typedef bg::strategy::simplify::detail::douglas_peucker
+ <
+ point_type,
+ bg::strategy::distance::detail::projected_point_ax<>,
+ comparator_type
+ > dp_ax;
+
+ return_type max_distance(adt, xdt);
+ comparator_type comparator(max_distance);
+ dp_ax strategy(comparator);
+
+ test_geometry<Geometry>(wkt, expected, max_distance, strategy);
+}
+#endif
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0,5 5,10 10)",
+ "LINESTRING(0 0,10 10)", 1.0);
+
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0, 5 5, 6 5, 10 10)",
+ "LINESTRING(0 0,10 10)", 1.0);
+
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0,5 5,7 5,10 10)",
+ "LINESTRING(0 0,5 5,7 5,10 10)", 1.0);
+
+ // Lightning-form which fails for Douglas-Peucker
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0,120 6,80 10,200 0)",
+ "LINESTRING(0 0,120 6,80 10,200 0)", 7);
+
+ // Same which reordered coordinates
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0,80 10,120 6,200 0)",
+ "LINESTRING(0 0,80 10,200 0)", 7);
+
+ // Duplicate point is removed
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0,0 0)",
+ "LINESTRING(0 0)", 1.0);
+
+ // Mail 2013-10-07, real-life test, piece of River Leine
+ // PostGIS returns exactly the same result
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(4293586 3290439,4293568 3290340,4293566 3290332,4293570 3290244,4293576 3290192"
+ ",4293785 3289660,4293832 3289597,4293879 3289564,4293937 3289545,4294130 3289558"
+ ",4294204 3289553,4294240 3289539,4294301 3289479,4294317 3289420,4294311 3289353"
+ ",4294276 3289302,4293870 3289045,4293795 3288978,4293713 3288879,4293669 3288767"
+ ",4293654 3288652,4293657 3288563,4293690 3288452,4293761 3288360,4293914 3288215"
+ ",4293953 3288142,4293960 3288044,4293951 3287961,4293913 3287875,4293708 3287628"
+ ",4293658 3287542,4293633 3287459,4293630 3287383,4293651 3287323,4293697 3287271"
+ ",4293880 3287128,4293930 3287045,4293938 3286977,4293931 3286901,4293785 3286525"
+ ",4293775 3286426,4293786 3286358,4293821 3286294,4294072 3286076,4294134 3285986)",
+ "LINESTRING(4293586 3290439,4293785 3289660,4294317 3289420,4293654 3288652,4293960 3288044"
+ ",4293633 3287459,4293786 3286358,4294134 3285986)", 250);
+
+ /* TODO fix this
+ test_geometry<test::wrapped_boost_array<P, 10> >(
+ "LINESTRING(0 0,5 5,7 5,10 10)",
+ "LINESTRING(0 0,5 5,7 5,10 10)", 1.0);
+ */
+
+ /*
+
+ Above can be checked in PostGIS by:
+
+ select astext(ST_Simplify(geomfromtext('LINESTRING(0 0, 5 5, 10 10)'),1.0)) as simplified
+ union all select astext(ST_Simplify(geomfromtext('LINESTRING(0 0, 5 5, 6 5, 10 10)'),1.0))
+ etc
+ */
+
+
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0))",
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,4 0))", 1.0);
+
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3))",
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,4 0),(7 3,7 6,1 6,1 3,7 3))", 1.0);
+
+ // Closing point should be simplified away
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((1 0,0 0,0 4,4 4,4 0,1 0))",
+ "POLYGON((0 0,0 4,4 4,4 0,0 0))", 0.1);
+
+ // Section around closing point should be simplified away
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((5 0,4 0,3 0,2 0,1 0,0 0,0 5,5 5,5 0))",
+ "POLYGON((5 0,0 0,0 5,5 5,5 0))", 0.1);
+
+ // Manually rotate this WKT over all the 5 redundant points at closing area
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((4 0,3 0,2 0,1 0,0 0,0 5,5 5,5 0,4 0))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))", 0.1);
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((3 0,2 0,1 0,0 0,0 5,5 5,5 0,4 0,3 0))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))", 0.1);
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((2 0,1 0,0 0,0 5,5 5,5 0,4 0,3 0,2 0))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))", 0.1);
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((1 0,0 0,0 5,5 5,5 0,4 0,3 0,2 0,1 0))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))", 0.1);
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,0 5,5 5,5 0,4 0,3 0,2 0,1 0,0 0))",
+ "POLYGON((0 0,0 5,5 5,5 0,0 0))", 0.1);
+
+ // Test wither all collinear points in between are simplified away
+ // First approach did select one of them because it was the end of the
+ // "closing area". Now the opposite is taken, which is farthest and never
+ // collinear
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((2 0,1 0,0 0,0 1,0 2,0 3,0 4,1 4,2 4,3 4,4 4,4 3,4 2,4 1,4 0,3 0,2 0))",
+ "POLYGON((0 0,0 4,4 4,4 0,0 0))", 1.0);
+
+ // Test simplifying away one of the sides (collinear), then closing point
+ // and finally the whole polygon
+ std::string const near_triangle = "POLYGON((0.55 0.55,1 0,0.5 0,0 0,0 1,0.55 0.55))";
+ test_geometry<bg::model::polygon<P> >(near_triangle,
+ "POLYGON((0.55 0.55,1 0,0 0,0 1,0.55 0.55))", 0.01);
+ test_geometry<bg::model::polygon<P> >(near_triangle,
+ "POLYGON((1 0,0 0,0 1,1 0))", 0.1);
+ // 0.9 should still result in a simplified polygon
+ test_geometry<bg::model::polygon<P> >(near_triangle,
+ "POLYGON((1 0,0 0,0 1,1 0))", 0.9);
+ test_geometry<bg::model::polygon<P> >(near_triangle,
+ "POLYGON(())", 1.1);
+
+ // Test simplifying away the closing point, and closing it explicitly
+ std::string const salamina = "POLYGON((2616131.59828 4579307.29099,2616687.86177 4579151.05325,2618172.52982 4578718.79836,2618728.79332 4578522.73574,2620336.91468 4577424.54293,2620522.48427 4576992.50129,2621264.76264 4569815.3917,2621140.75272 4569502.07546,2620491.53745 4568208.96982,2620151.34509 4567855.90928,2612606.55528 4562800.36094,2611833.3301 4562291.50023,2611369.5731 4562174.16117,2610225.54269 4562408.69959,2605896.21638 4564367.29512,2605494.13038 4564641.6634,2605277.94792 4566288.44857,2606019.89233 4569423.46562,2609050.12019 4577424.54293,2614337.90732 4579347.12775,2615296.7021 4579543.34723,2616131.59828 4579307.29099))";
+ test_geometry<bg::model::polygon<P> >(salamina, 196318951.5097456, 100);
+ test_geometry<bg::model::polygon<P> >(salamina, 194471472.35804176, 200);
+ test_geometry<bg::model::polygon<P> >(salamina, 191735337.33374023, 500);
+ test_geometry<bg::model::polygon<P> >(salamina, 186593693.18401337, 1000);
+ test_geometry<bg::model::polygon<P> >(salamina, 181448561.04094696, 2000);
+ test_geometry<bg::model::polygon<P> >(salamina, 141965392.92240524, 5000);
+
+ // Interior ring (sized ~ 1) should be simplified away (distance 5)
+ test_geometry<bg::model::polygon<P> >(
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(5 5,6 6,5 6,5 5))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))", 5.0);
+
+// // Non-closed version
+// test_geometry<bg::model::polygon<P, true, false> >(
+// "POLYGON((1 0,0 0,0 4,4 4,4 0))",
+// "POLYGON((0 0,0 4,4 4,4 0))", 0.1);
+
+
+ {
+ // Test with explicit strategy
+
+ typedef bg::strategy::simplify::douglas_peucker
+ <
+ P,
+ bg::strategy::distance::projected_point<double>
+ > dp;
+
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0,5 5,10 10)",
+ "LINESTRING(0 0,10 10)", 1.0, dp());
+ }
+
+
+ // POINT: check compilation
+ test_geometry<P>(
+ "POINT(0 0)",
+ "POINT(0 0)", 1.0);
+
+
+ // RING: check compilation and behaviour
+ test_geometry<bg::model::ring<P> >(
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0))",
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,4 0))", 1.0);
+
+
+#ifdef TEST_PULL89
+ test_with_ax<bg::model::linestring<P> >(
+ "LINESTRING(0 0,120 6,80 10,200 0)",
+ "LINESTRING(0 0,80 10,200 0)", 10, 7);
+#endif
+}
+
+template <typename P>
+void test_zigzag()
+{
+ static const std::string zigzag = "LINESTRING(0 10,1 7,1 9,2 6,2 7,3 4,3 5,5 3,4 5,6 2,6 3,9 1,7 3,10 1,9 2,12 1,10 2,13 1,11 2,14 1,12 2,16 1,14 2,17 3,15 3,18 4,16 4,19 5,17 5,20 6,18 6,21 8,19 7,21 9,19 8,21 10,19 9,21 11,19 10,20 13,19 11)";
+
+ static const std::string expected100 = "LINESTRING(0 10,3 4,5 3,4 5,6 2,9 1,7 3,10 1,9 2,16 1,14 2,17 3,15 3,18 4,16 4,19 5,17 5,21 8,19 7,21 9,19 8,21 10,19 9,21 11,19 10,20 13,19 11)";
+ static const std::string expected150 = "LINESTRING(0 10,6 2,16 1,14 2,21 8,19 7,21 9,19 8,21 10,19 9,20 13,19 11)";
+ static const std::string expected200 = "LINESTRING(0 10,6 2,16 1,14 2,21 8,19 7,20 13,19 11)";
+ static const std::string expected225 = "LINESTRING(0 10,6 2,16 1,21 8,19 11)";
+ test_geometry<bg::model::linestring<P> >(zigzag, expected100, 1.0001);
+ test_geometry<bg::model::linestring<P> >(zigzag, expected150, 1.5001);
+ test_geometry<bg::model::linestring<P> >(zigzag, expected200, 2.0001);
+ test_geometry<bg::model::linestring<P> >(zigzag, expected225, 2.25); // should be larger than sqrt(5)=2.236
+
+#ifdef TEST_PULL89
+ // This should work (results might vary but should have LESS points then expected above
+ // Small xtd, larger adt,
+ test_with_ax<bg::model::linestring<P> >(zigzag, expected100, 1.0001, 1.0001);
+ test_with_ax<bg::model::linestring<P> >(zigzag, expected150, 1.5001, 1.0001);
+ test_with_ax<bg::model::linestring<P> >(zigzag, expected200, 2.0001, 1.0001);
+ test_with_ax<bg::model::linestring<P> >(zigzag, expected225, 2.25, 1.0001);
+#endif
+
+}
+
+
+template <typename P>
+void test_3d()
+{
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0 0,1 1 1,2 2 0)",
+ "LINESTRING(0 0 0,2 2 0)", 1.0001);
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(0 0 0,1 1 1,2 2 0)",
+ "LINESTRING(0 0 0,1 1 1,2 2 0)", 0.9999);
+}
+
+
+template <typename P>
+void test_spherical()
+{
+ test_geometry<bg::model::linestring<P> >(
+ "LINESTRING(4.1 52.1,4.2 52.2,4.3 52.3)",
+ "LINESTRING(4.1 52.1,4.3 52.3)", 0.01);
+}
+
+
+int test_main(int, char* [])
+{
+ // Integer compiles, but simplify-process fails (due to distances)
+ //test_all<bg::model::d2::point_xy<int> >();
+
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+
+ test_all<bg::model::d2::point_xy<float> >();
+
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ test_spherical<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+ test_zigzag<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_spherical<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+#endif
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/simplify_countries.cpp b/src/boost/libs/geometry/test/algorithms/simplify_countries.cpp
new file mode 100644
index 000000000..87f674339
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/simplify_countries.cpp
@@ -0,0 +1,188 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// (Unit) Test
+
+// Copyright (c) 2018 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry.hpp>
+#include <geometry_test_common.hpp>
+
+#include <boost/foreach.hpp>
+
+#include <iomanip>
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+
+
+template <typename MultiPolygon>
+std::string read_from_file(std::string const& filename)
+{
+ MultiPolygon mp;
+ std::ifstream in(filename.c_str());
+ while (in.good())
+ {
+ std::string line;
+ std::getline(in, line);
+ if (! line.empty())
+ {
+ typename boost::range_value<MultiPolygon>::type pol;
+ bg::read_wkt(line, pol);
+ mp.push_back(pol);
+ }
+ }
+ std::ostringstream out;
+ if (! mp.empty())
+ {
+ out << std::fixed << std::setprecision(19) << bg::wkt(mp);
+ }
+
+ BOOST_CHECK(! out.str().empty());
+
+ return out.str();
+}
+
+
+template <typename MultiPolygon>
+void test_one(std::string const& caseid, std::string const& wkt,
+ double distance_in_meters,
+ double expected_area_ratio, double expected_perimeter_ratio,
+ std::size_t expected_polygon_count = 0,
+ std::size_t expected_interior_count = 0,
+ std::size_t expected_point_count = 0)
+{
+ boost::ignore_unused(caseid);
+
+ MultiPolygon geometry, simplified;
+ bg::read_wkt(wkt, geometry);
+ bg::correct(geometry);
+ bg::simplify(geometry, simplified, distance_in_meters);
+
+ double const area_ratio = bg::area(simplified) / bg::area(geometry);
+ double const perimeter_ratio = bg::perimeter(simplified) / bg::perimeter(geometry);
+
+ BOOST_CHECK_CLOSE(perimeter_ratio, expected_perimeter_ratio, 0.01);
+ BOOST_CHECK_CLOSE(area_ratio, expected_area_ratio, 0.01);
+ BOOST_CHECK_EQUAL(expected_polygon_count, boost::size(simplified));
+ BOOST_CHECK_EQUAL(expected_interior_count, bg::num_interior_rings(simplified));
+ BOOST_CHECK_EQUAL(expected_point_count, bg::num_points(simplified));
+
+// To add new tests, this is convenient and write the test itself:
+// std::cout << "test_one<mp>(\"" << caseid << "\", " << caseid
+// << ", " << distance_in_meters
+// << std::setprecision(6)
+// << ", " << area_ratio
+// << ", " << perimeter_ratio
+// << ", " << boost::size(simplified)
+// << ", " << bg::num_interior_rings(simplified)
+// << ", " << bg::num_points(simplified)
+// << ");"
+// << std::endl;
+
+#if defined(TEST_WITH_SVG)
+ {
+ typedef typename boost::range_value<MultiPolygon>::type polygon;
+
+ std::ostringstream filename;
+ filename << "simplify_" << caseid << "_" << distance_in_meters << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper
+ <
+ typename bg::point_type<MultiPolygon>::type
+ > mapper(svg, 1200, 800);
+ mapper.add(geometry);
+ mapper.add(simplified);
+
+ mapper.map(geometry, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:1");
+ BOOST_FOREACH(polygon const& pol, simplified)
+ {
+ mapper.map(pol,
+ bg::area(pol) > 0 ? "fill:none;stroke:rgb(255,0,0);stroke-width:1"
+ : "fill:none;stroke:rgb(255,0,255);stroke-width:1");
+ }
+ }
+#endif
+}
+
+
+template <bool Clockwise, typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P, Clockwise> polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+
+ // The unit test uses countries originally added for buffer unit test
+ std::string base_folder = "buffer/data/";
+
+ // Verify for Greece, Italy, Netherlands, Norway and UK
+ std::string gr = read_from_file<mp>(base_folder + "gr.wkt");
+ std::string it = read_from_file<mp>(base_folder + "it.wkt");
+ std::string nl = read_from_file<mp>(base_folder + "nl.wkt");
+ std::string no = read_from_file<mp>(base_folder + "no.wkt");
+ std::string uk = read_from_file<mp>(base_folder + "uk.wkt");
+
+ // Gradually simplify more aggresively.
+ // Area ratio (first) can increase or decrease
+ // Perimeter ratio (second) should decrease.
+ // Polygons, interior rings, points should decrease
+ test_one<mp>("gr", gr, 100, 0.999905, 0.999758, 68, 0, 2520);
+ test_one<mp>("gr", gr, 200, 0.999773, 0.998865, 68, 0, 2019);
+ test_one<mp>("gr", gr, 500, 0.999026, 0.995931, 68, 0, 1468);
+ test_one<mp>("gr", gr, 1000, 0.997782, 0.991475, 68, 0, 1132);
+ test_one<mp>("gr", gr, 2000, 0.994448, 0.9793, 65, 0, 854);
+ test_one<mp>("gr", gr, 5000, 0.979743, 0.910266, 50, 0, 471);
+ test_one<mp>("gr", gr, 10000, 0.968349, 0.778863, 28, 0, 245);
+ test_one<mp>("gr", gr, 20000, 0.961943, 0.607009, 10, 0, 97); // Many islands disappear
+
+ test_one<mp>("it", it, 100, 1.00001, 0.999813, 22, 1, 1783);
+ test_one<mp>("it", it, 200, 1.00009, 0.9991, 22, 1, 1406);
+ test_one<mp>("it", it, 500, 1.00019, 0.996848, 22, 1, 1011);
+ test_one<mp>("it", it, 1000, 1.00041, 0.99294, 22, 1, 749);
+ test_one<mp>("it", it, 2000, 1.00086, 0.985144, 22, 1, 546);
+ test_one<mp>("it", it, 5000, 1.00147, 0.93927, 11, 1, 283);
+ test_one<mp>("it", it, 10000, 1.01089, 0.882198, 4, 1, 153);
+ test_one<mp>("it", it, 20000, 1.00893, 0.828774, 4, 0, 86); // San Marino disappears
+
+ test_one<mp>("nl", nl, 100, 0.999896, 0.999804, 8, 0, 789);
+ test_one<mp>("nl", nl, 200, 0.999733, 0.999095, 8, 0, 633);
+ test_one<mp>("nl", nl, 500, 0.999423, 0.996313, 8, 0, 436);
+ test_one<mp>("nl", nl, 1000, 0.997893, 0.991951, 8, 0, 331);
+ test_one<mp>("nl", nl, 2000, 0.996129, 0.981998, 8, 0, 234);
+ test_one<mp>("nl", nl, 5000, 0.986128, 0.896, 5, 0, 132);
+ test_one<mp>("nl", nl, 10000, 0.973917, 0.832522, 4, 0, 75);
+ test_one<mp>("nl", nl, 20000, 0.970675, 0.739275, 3, 0, 40);
+
+ test_one<mp>("no", no, 100, 0.999966, 0.999975, 95, 0, 7650);
+ test_one<mp>("no", no, 200, 0.999812, 0.999731, 95, 0, 6518);
+ test_one<mp>("no", no, 500, 0.99929, 0.998092, 95, 0, 4728);
+ test_one<mp>("no", no, 1000, 0.998473, 0.994075, 95, 0, 3524);
+ test_one<mp>("no", no, 2000, 0.996674, 0.985863, 92, 0, 2576);
+ test_one<mp>("no", no, 5000, 0.99098, 0.965689, 87, 0, 1667);
+ test_one<mp>("no", no, 10000, 0.978207, 0.906525, 69, 0, 1059);
+ test_one<mp>("no", no, 20000, 0.955223, 0.786546, 38, 0, 593);
+
+ test_one<mp>("uk", uk, 100, 0.999942, 0.999878, 48, 0, 3208);
+ test_one<mp>("uk", uk, 200, 0.999843, 0.999291, 48, 0, 2615);
+ test_one<mp>("uk", uk, 500, 0.999522, 0.996888, 48, 0, 1885);
+ test_one<mp>("uk", uk, 1000, 0.999027, 0.992306, 48, 0, 1396);
+ test_one<mp>("uk", uk, 2000, 0.998074, 0.983839, 47, 0, 1032);
+ test_one<mp>("uk", uk, 5000, 0.991901, 0.943496, 35, 0, 611);
+ test_one<mp>("uk", uk, 10000, 0.990039, 0.871969, 23, 0, 359);
+ test_one<mp>("uk", uk, 20000, 0.979171, 0.737577, 11, 0, 193);
+
+}
+
+int test_main(int, char* [])
+{
+ test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/algorithms/simplify_multi.cpp b/src/boost/libs/geometry/test/algorithms/simplify_multi.cpp
new file mode 100644
index 000000000..04591f0df
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/simplify_multi.cpp
@@ -0,0 +1,65 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <algorithms/test_simplify.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::multi_point<P> >(
+ "MULTIPOINT((0 0),(1 1))",
+ "MULTIPOINT((0 0),(1 1))", 1.0);
+
+ test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((0 0,5 5,10 10))",
+ "MULTILINESTRING((0 0,10 10))", 1.0);
+
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+ test_geometry<mp>(
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0)))",
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,4 0)))", 1.0);
+ test_geometry<mp>(
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3)))",
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,4 0),(7 3,7 6,1 6,1 3,7 3)))", 1.0);
+
+ // Ticket 5954 https://svn.boost.org/trac/boost/ticket/5954
+ test_geometry<mp>(
+ "MULTIPOLYGON(((0.561648 1,1 1,1 0,0.468083 0,0.52758 0.00800554,0.599683 0.0280924,0.601611 0.265374,0.622693 0.316765,0.69507 0.357497,0.695623 0.429711,0.655111 0.502298,0.696467 0.543147,0.840712 0.593546,0.882583 0.66546,0.852357 0.748213,0.84264 0.789567,0.832667 0.841202,0.832667 0.841202,0.740538 0.873004,0.617349 0.905045,0.566576 0.977697,0.561648 1)),((0 0.801979,0.0308575 0.786234,0.0705513 0.631135,0.141616 0.527248,0.233985 0.505872,0.264777 0.526263,0.336631 0.505009,0.356603 0.422321,0.355803 0.350038,0.375252 0.205364,0.415206 0.0709182,0.45479 0,0 0,0 0,0 0.801979)))",
+ 0.51961289352, 1.0 / 2048.0);
+
+ // Same polygon but multiplied with 2047.0
+ test_geometry<mp>(
+ "MULTIPOLYGON(((1149.69 2047,2047 2047,2047 0,958.166 0,1079.96 16.3873,1227.55 57.5051,1231.5 543.221,1274.65 648.418,1422.81 731.796,1423.94 879.618,1341.01 1028.2,1425.67 1111.82,1720.94 1214.99,1806.65 1362.2,1744.77 1531.59,1724.88 1616.24,1704.47 1721.94,1704.47 1721.94,1515.88 1787.04,1263.71 1852.63,1159.78 2001.35,1149.69 2047)),((0 1641.65,63.1653 1609.42,144.419 1291.93,289.888 1079.28,478.967 1035.52,541.999 1077.26,689.084 1033.75,729.966 864.491,728.329 716.528,768.141 420.38,849.927 145.17,930.955 0,0 0,0 0,0 1641.65)))",
+ 0.51961289352 * (2047.0 * 2047.0), 1.0);
+ // End ticket 5954
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/test_centroid.hpp b/src/boost/libs/geometry/test/algorithms/test_centroid.hpp
new file mode 100644
index 000000000..7e4d99483
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_centroid.hpp
@@ -0,0 +1,146 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_CENTROID_HPP
+#define BOOST_GEOMETRY_TEST_CENTROID_HPP
+
+// Test-functionality, shared between single and multi tests
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/algorithms/centroid.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+template <std::size_t D>
+struct check_result
+{
+ template <typename Point1, typename Point2>
+ static void apply(Point1 const& actual, Point2 const& expected)
+ {
+ check_result<D-1>::apply(actual, expected);
+
+ BOOST_CHECK_CLOSE(bg::get<D-1>(actual), bg::get<D-1>(expected), 0.001);
+ }
+};
+
+template <>
+struct check_result<0>
+{
+ template <typename Point1, typename Point2>
+ static void apply(Point1 const&, Point2 const&)
+ {}
+};
+
+
+template <typename CalculationType, typename Geometry, typename Point>
+void test_with_other_calculation_type(Geometry const& geometry, Point& c1)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+ // Calculate it with user defined strategy
+ Point c2;
+ bg::centroid(geometry, c2,
+ bg::strategy::centroid::bashein_detmer<Point, point_type, CalculationType>());
+
+ std::cout << typeid(CalculationType).name() << ": " << std::setprecision(20)
+ << bg::get<0>(c2) << " " << bg::get<1>(c2)
+ << " -> difference: " << bg::distance(c1, c2)
+ << std::endl;
+}
+
+template <typename Geometry, typename Point, typename T>
+void test_centroid(Geometry const& geometry, T const& d1, T const& d2, T const& d3 = T(), T const& d4 = T(), T const& d5 = T())
+{
+ Point c1;
+
+ bg::centroid(geometry, c1);
+ check_result<bg::dimension<Geometry>::type::value>::apply(c1, boost::make_tuple(d1, d2, d3, d4, d5));
+
+ boost::variant<Geometry> v(geometry);
+ bg::centroid(v, c1);
+
+#ifdef REPORT_RESULTS
+ std::cout << "normal: " << std::setprecision(20) << bg::get<0>(c1) << " " << bg::get<1>(c1) << std::endl;
+
+ //test_with_other_calculation_type<long long>(geometry, c1);
+ test_with_other_calculation_type<float>(geometry, c1);
+ test_with_other_calculation_type<long double>(geometry, c1);
+#if defined(HAVE_TTMATH)
+ test_with_other_calculation_type<ttmath_big>(geometry, c1);
+#endif
+
+#endif
+}
+
+template <typename Geometry, typename Point, typename T>
+void test_centroid(std::string const& wkt, T const& d1, T const& d2, T const& d3 = T(), T const& d4 = T(), T const& d5 = T())
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+
+ test_centroid<Geometry, Point>(geometry, d1, d2, d3, d4, d5);
+}
+
+template <typename Geometry, typename T>
+void test_centroid(Geometry const& geometry, T const& d1, T const& d2, T const& d3 = T(), T const& d4 = T(), T const& d5 = T())
+{
+ test_centroid<Geometry, typename bg::point_type<Geometry>::type>(geometry, d1, d2, d3, d4, d5);
+}
+
+template <typename Geometry, typename T>
+void test_centroid(std::string const& wkt, T const& d1, T const& d2, T const& d3 = T(), T const& d4 = T(), T const& d5 = T())
+{
+ test_centroid<Geometry, typename bg::point_type<Geometry>::type>(wkt, d1, d2, d3, d4, d5);
+}
+
+template <typename Geometry>
+void test_centroid_exception()
+{
+ Geometry geometry;
+ try
+ {
+ typename bg::point_type<Geometry>::type c;
+ bg::centroid(geometry, c);
+ }
+ catch(bg::centroid_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A centroid_exception should have been thrown" );
+}
+
+template <typename Geometry>
+void test_centroid_exception(std::string const& wkt)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ try
+ {
+ typename bg::point_type<Geometry>::type c;
+ bg::centroid(geometry, c);
+ }
+ catch(bg::centroid_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A centroid_exception should have been thrown" );
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_convert.hpp b/src/boost/libs/geometry/test/algorithms/test_convert.hpp
new file mode 100644
index 000000000..fe91907da
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_convert.hpp
@@ -0,0 +1,77 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_CONVERT_HPP
+#define BOOST_GEOMETRY_TEST_CONVERT_HPP
+
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+
+template <typename Geometry2, typename Geometry1>
+void check_mixed(Geometry1 const& geometry1, std::string const& expected, int expected_point_count)
+{
+ Geometry2 geometry2;
+ bg::convert(geometry1, geometry2);
+
+ std::ostringstream out;
+ out << bg::wkt(geometry2);
+ BOOST_CHECK_EQUAL(out.str(), expected);
+
+ std::size_t n = bg::num_points(geometry2);
+ BOOST_CHECK_MESSAGE(expected_point_count < 0 || int(n) == expected_point_count,
+ "convert: "
+ << " #points expected: " << expected_point_count
+ << " detected: " << n
+ << " expected wkt: " << expected
+ );
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_mixed(std::string const& wkt, std::string const& expected, int expected_point_count)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt, geometry1);
+ check_mixed<Geometry2>(geometry1, expected, expected_point_count);
+ check_mixed<Geometry2>(boost::variant<Geometry1>(geometry1), expected, expected_point_count);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_mixed_identical_result(std::string const& wkt)
+{
+ test_mixed<Geometry1, Geometry2>(wkt, wkt, -1);
+ test_mixed<Geometry2, Geometry1>(wkt, wkt, -1);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_mixed_reversible_result(std::string const& wkt1, std::string const& wkt2)
+{
+ test_mixed<Geometry1, Geometry2>(wkt1, wkt2, -1);
+ test_mixed<Geometry2, Geometry1>(wkt2, wkt1, -1);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_convex_hull.hpp b/src/boost/libs/geometry/test/algorithms/test_convex_hull.hpp
new file mode 100644
index 000000000..a3ab82df4
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_convex_hull.hpp
@@ -0,0 +1,191 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_CONVEX_HULL_HPP
+#define BOOST_GEOMETRY_TEST_CONVEX_HULL_HPP
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/convex_hull.hpp>
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/is_empty.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/perimeter.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/polygon.hpp>
+
+
+template <typename Geometry, typename Hull>
+void check_convex_hull(Geometry const& geometry, Hull const& hull,
+ std::size_t /*size_original*/, std::size_t size_hull,
+ double expected_area, double expected_perimeter,
+ bool reverse)
+{
+ std::size_t n = bg::num_points(hull);
+
+ BOOST_CHECK_MESSAGE(n == size_hull,
+ "convex hull: " << bg::wkt(geometry)
+ << " -> " << bg::wkt(hull)
+ << " type "
+ << (typeid(typename bg::coordinate_type<Hull>::type).name())
+ << " -> Expected: " << size_hull
+ << " detected: " << n);
+
+
+ // We omit this check as it is not important for the hull algorithm
+ // BOOST_CHECK(bg::num_points(geometry) == size_original);
+
+ typename bg::default_area_result<Geometry>::type ah = bg::area(hull);
+ if (reverse)
+ {
+ ah = -ah;
+ }
+
+ BOOST_CHECK_CLOSE(ah, expected_area, 0.001);
+
+ if ( expected_perimeter >= 0 )
+ {
+ typename bg::default_length_result<Geometry>::type
+ ph = bg::perimeter(hull);
+
+ BOOST_CHECK_CLOSE(ph, expected_perimeter, 0.001);
+ }
+}
+
+namespace resolve_variant {
+
+struct closure_visitor : public boost::static_visitor<bg::closure_selector>
+{
+ template <typename Geometry>
+ bg::closure_selector operator()(Geometry const&) const
+ {
+ return bg::closure<Geometry>::value;
+ }
+};
+
+template <typename Geometry>
+inline bg::closure_selector get_closure(Geometry const&)
+{
+ return bg::closure<Geometry>::value;
+}
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
+inline bg::closure_selector get_closure(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& v)
+{
+ return boost::apply_visitor(closure_visitor(), v);
+}
+
+} // namespace resolve_variant
+
+template <typename Hull, typename Strategy, typename Geometry>
+void test_convex_hull(Geometry const& geometry,
+ std::size_t size_original, std::size_t size_hull_closed,
+ double expected_area, double expected_perimeter,
+ bool reverse)
+{
+ bool const is_original_closed = resolve_variant::get_closure(geometry) != bg::open;
+ static bool const is_hull_closed = bg::closure<Hull>::value != bg::open;
+
+ // convex_hull_insert() uses the original Geometry as a source of the info about the order and closure
+ std::size_t const size_hull_from_orig = is_original_closed ? size_hull_closed : size_hull_closed - 1;
+ std::size_t const size_hull = is_hull_closed ? size_hull_closed : size_hull_closed - 1;
+
+ Hull hull;
+
+ // Test version with output iterator
+ bg::detail::convex_hull::convex_hull_insert(geometry, std::back_inserter(hull.outer()));
+ check_convex_hull(geometry, hull, size_original, size_hull_from_orig, expected_area, expected_perimeter, reverse);
+
+ // Test version with ring as output
+ bg::clear(hull);
+ bg::convex_hull(geometry, hull.outer());
+ check_convex_hull(geometry, hull, size_original, size_hull, expected_area, expected_perimeter, false);
+
+ // Test version with polygon as output
+ bg::clear(hull);
+ bg::convex_hull(geometry, hull);
+ check_convex_hull(geometry, hull, size_original, size_hull, expected_area, expected_perimeter, false);
+
+ // Test version with strategy
+ bg::clear(hull);
+ bg::convex_hull(geometry, hull.outer(), Strategy());
+ check_convex_hull(geometry, hull, size_original, size_hull, expected_area, expected_perimeter, false);
+
+ // Test version with output iterator and strategy
+ bg::clear(hull);
+ bg::detail::convex_hull::convex_hull_insert(geometry, std::back_inserter(hull.outer()), Strategy());
+ check_convex_hull(geometry, hull, size_original, size_hull_from_orig, expected_area, expected_perimeter, reverse);
+}
+
+
+template <typename Geometry, bool Clockwise, bool Closed>
+void test_geometry_order(std::string const& wkt,
+ std::size_t size_original, std::size_t size_hull_closed,
+ double expected_area, double expected_perimeter = -1.0)
+{
+ typedef bg::model::polygon
+ <
+ typename bg::point_type<Geometry>::type,
+ Clockwise,
+ Closed
+ > hull_type;
+
+ typedef bg::strategy::convex_hull::graham_andrew
+ <
+ Geometry,
+ typename bg::point_type<Geometry>::type
+ > strategy_type;
+
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> v(geometry);
+
+ test_convex_hull<hull_type, strategy_type>(geometry, size_original, size_hull_closed, expected_area, expected_perimeter, !Clockwise);
+ test_convex_hull<hull_type, strategy_type>(v, size_original, size_hull_closed, expected_area, expected_perimeter, !Clockwise);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ std::size_t size_original, std::size_t size_hull_closed,
+ double expected_area, double expected_perimeter = -1.0)
+{
+ test_geometry_order<Geometry, true, true>(wkt, size_original, size_hull_closed, expected_area, expected_perimeter);
+ test_geometry_order<Geometry, false, true>(wkt, size_original, size_hull_closed, expected_area, expected_perimeter);
+ test_geometry_order<Geometry, true, false>(wkt, size_original, size_hull_closed, expected_area, expected_perimeter);
+ test_geometry_order<Geometry, false, false>(wkt, size_original, size_hull_closed, expected_area, expected_perimeter);
+}
+
+template <typename Geometry>
+void test_empty_input()
+{
+ Geometry geometry;
+ bg::model::polygon
+ <
+ typename bg::point_type<Geometry>::type
+ > hull;
+
+ bg::convex_hull(geometry, hull);
+ BOOST_CHECK_MESSAGE(bg::is_empty(hull), "Output convex hull should be empty" );
+}
+
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_correct.hpp b/src/boost/libs/geometry/test/algorithms/test_correct.hpp
new file mode 100644
index 000000000..1576b1602
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_correct.hpp
@@ -0,0 +1,54 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_CORRECT_HPP
+#define BOOST_GEOMETRY_TEST_CORRECT_HPP
+
+
+// Test-functionality, shared between single and multi tests
+
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+#include <boost/variant/variant.hpp>
+
+template <typename Geometry>
+void check_geometry(Geometry const& geometry, std::string const& expected)
+{
+ std::ostringstream out;
+ out << bg::wkt_manipulator<Geometry>(geometry, false);
+
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::string const& expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> v(geometry);
+
+ bg::correct(geometry);
+ check_geometry(geometry, expected);
+
+ bg::correct(v);
+ check_geometry(v, expected);
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_for_each.hpp b/src/boost/libs/geometry/test/algorithms/test_for_each.hpp
new file mode 100644
index 000000000..741bd26bb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_for_each.hpp
@@ -0,0 +1,277 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_FOR_EACH_HPP
+#define BOOST_GEOMETRY_TEST_FOR_EACH_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/config.hpp>
+#include <boost/geometry/algorithms/for_each.hpp>
+
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+
+template<typename Point>
+inline void translate_x_function(Point& p)
+{
+ bg::set<0>(p, bg::get<0>(p) + 100.0);
+}
+
+template<typename Point>
+struct scale_y_functor
+{
+ inline void operator()(Point& p)
+ {
+ bg::set<1>(p, bg::get<1>(p) * 100.0);
+ }
+};
+
+template<typename Point>
+struct sum_x_functor
+{
+ typename bg::coordinate_type<Point>::type sum;
+
+ sum_x_functor()
+ : sum(0)
+ {}
+
+ inline void operator()(Point const& p)
+ {
+ sum += bg::get<0>(p);
+ }
+};
+
+// Per segment
+static std::ostringstream g_out;
+
+template<typename Segment>
+inline void stream_segment(Segment const& s)
+{
+ g_out << bg::dsv(s) << " ";
+}
+
+template<typename Segment>
+struct sum_segment_length
+{
+ typename bg::coordinate_type<Segment>::type sum;
+
+ sum_segment_length()
+ : sum(0)
+ {}
+ inline void operator()(Segment const& s)
+ {
+ sum += bg::distance(s.first, s.second);
+ }
+};
+
+template<typename Segment>
+inline void modify_segment(Segment& s)
+{
+ if (bg::math::equals(bg::get<0,0>(s), 1.0))
+ {
+ bg::set<0,0>(s, 10.0);
+ }
+}
+
+
+template <typename Geometry>
+void test_per_point_const(Geometry const& geometry, int expected)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ // Class (functor)
+ sum_x_functor<point_type> functor;
+ functor = bg::for_each_point(geometry, functor);
+ BOOST_CHECK_EQUAL(functor.sum, expected);
+
+
+ // Lambda
+#if !defined(BOOST_NO_CXX11_LAMBDAS)
+
+ typename bg::coordinate_type<point_type>::type sum_x = 0;
+
+ bg::for_each_point
+ (
+ geometry,
+ [&sum_x](point_type const& p)
+ {
+ sum_x += bg::get<0>(p);
+ }
+
+ );
+
+ BOOST_CHECK_EQUAL(sum_x, expected);
+#endif
+}
+
+template <typename Geometry>
+void test_per_point_non_const(Geometry& geometry,
+ std::string const& expected1,
+ std::string const& expected2)
+{
+#if !defined(BOOST_NO_CXX11_LAMBDAS)
+ Geometry copy = geometry;
+#endif
+
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ // function
+ bg::for_each_point(geometry, translate_x_function<point_type>);
+ std::ostringstream out1;
+ out1 << bg::wkt(geometry);
+
+ BOOST_CHECK_MESSAGE(out1.str() == expected1,
+ "for_each_point: "
+ << " expected " << expected1
+ << " got " << bg::wkt(geometry));
+
+ // functor
+ bg::for_each_point(geometry, scale_y_functor<point_type>());
+
+ std::ostringstream out2;
+ out2 << bg::wkt(geometry);
+
+ BOOST_CHECK_MESSAGE(out2.str() == expected2,
+ "for_each_point: "
+ << " expected " << expected2
+ << " got " << bg::wkt(geometry));
+
+#if !defined(BOOST_NO_CXX11_LAMBDAS)
+ // Lambda, both functions above together. Without / with capturing
+
+ geometry = copy;
+ bg::for_each_point
+ (
+ geometry,
+ [](point_type& p)
+ {
+ bg::set<0>(p, bg::get<0>(p) + 100);
+ }
+
+ );
+
+ typename bg::coordinate_type<point_type>::type scale = 100;
+ bg::for_each_point
+ (
+ geometry,
+ [&](point_type& p)
+ {
+ bg::set<1>(p, bg::get<1>(p) * scale);
+ }
+
+ );
+
+ std::ostringstream out3;
+ out3 << bg::wkt(geometry);
+
+ BOOST_CHECK_MESSAGE(out3.str() == expected2,
+ "for_each_point (lambda): "
+ << " expected " << expected2
+ << " got " << bg::wkt(geometry));
+#endif
+
+}
+
+
+template <typename Geometry>
+void test_per_point(std::string const& wkt
+ , int expected_sum_x
+ , std::string const& expected1
+ , std::string const& expected2
+ )
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_per_point_const(geometry, expected_sum_x);
+ test_per_point_non_const(geometry, expected1, expected2);
+}
+
+
+
+template <typename Geometry>
+void test_per_segment_const(Geometry const& geometry,
+ std::string const& expected_dsv,
+ double expected_length)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ // function
+ g_out.str("");
+ g_out.clear();
+ bg::for_each_segment(geometry,
+ stream_segment<bg::model::referring_segment<point_type const> >);
+ std::string out = g_out.str();
+ boost::trim(out);
+ BOOST_CHECK_EQUAL(out, expected_dsv);
+
+ // functor
+ sum_segment_length<bg::model::referring_segment<point_type const> > functor;
+ functor = bg::for_each_segment(geometry, functor);
+
+ BOOST_CHECK_CLOSE(functor.sum, expected_length, 0.0001);
+}
+
+
+template <typename Geometry>
+void test_per_segment_non_const(Geometry& geometry,
+ std::string const& expected_wkt)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ // function
+ bg::for_each_segment(geometry,
+ modify_segment<bg::model::referring_segment<point_type> >);
+
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+
+ BOOST_CHECK_MESSAGE(out.str() == expected_wkt,
+ "for_each_segment: "
+ << " expected " << expected_wkt
+ << " got " << bg::wkt(geometry));
+
+ // function is working here, functor works for all others,
+ // it will also work here.
+}
+
+
+template <typename Geometry>
+void test_per_segment(std::string const& wkt
+ , std::string const& expected_dsv
+ , double expected_length
+ , std::string const& expected_wkt
+ )
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_per_segment_const(geometry, expected_dsv, expected_length);
+ test_per_segment_non_const(geometry, expected_wkt);
+}
+
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt
+ , int expected_sum_x
+ , std::string const& expected1
+ , std::string const& expected2
+ , std::string const& expected_dsv
+ , double expected_length
+ , std::string const& expected_wkt
+ )
+{
+ test_per_point<Geometry>(wkt, expected_sum_x, expected1, expected2);
+ test_per_segment<Geometry>(wkt, expected_dsv, expected_length, expected_wkt);
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_is_simple.hpp b/src/boost/libs/geometry/test/algorithms/test_is_simple.hpp
new file mode 100644
index 000000000..d4162d04b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_is_simple.hpp
@@ -0,0 +1,121 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#include <iostream>
+#include <string>
+
+#include <boost/assert.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+#include <boost/geometry/algorithms/is_simple.hpp>
+
+#include <from_wkt.hpp>
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#include "pretty_print_geometry.hpp"
+#endif
+
+namespace bg = ::boost::geometry;
+
+template <typename Geometry, typename Strategy>
+void test_simple_s(Geometry const& geometry,
+ Strategy const& strategy,
+ bool expected_result,
+ bool check_validity = true)
+{
+ bool simple = bg::is_simple(geometry, strategy);
+ bool valid = ! check_validity || bg::is_valid(geometry, strategy);
+
+ BOOST_CHECK_MESSAGE( valid == true,
+ "Expected valid geometry, "
+ << " wkt: " << bg::wkt(geometry) );
+
+ BOOST_CHECK_MESSAGE( simple == expected_result,
+ "Expected: " << expected_result
+ << " detected: " << simple
+ << " wkt: " << bg::wkt(geometry) );
+}
+
+template <typename CSTag, typename Geometry>
+void test_simple(Geometry const& geometry, bool expected_result,
+ bool check_validity = true)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "=======" << std::endl;
+#endif
+
+ bool simple = bg::is_simple(geometry);
+ bool valid = ! check_validity || bg::is_valid(geometry);
+
+ BOOST_CHECK_MESSAGE( valid == true,
+ "Expected valid geometry, "
+ << " wkt: " << bg::wkt(geometry) );
+
+ BOOST_CHECK_MESSAGE( simple == expected_result,
+ "Expected: " << expected_result
+ << " detected: " << simple
+ << " wkt: " << bg::wkt(geometry) );
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ CSTag
+ >::type strategy_type;
+
+ test_simple_s(geometry, strategy_type(), expected_result, check_validity);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "Geometry: ";
+ pretty_print_geometry<Geometry>::apply(std::cout, geometry);
+ std::cout << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "is simple: " << simple << std::endl;
+ std::cout << "expected result: " << expected_result << std::endl;
+ std::cout << "=======" << std::endl;
+ std::cout << std::endl << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+}
+
+template <typename Geometry>
+void test_simple(Geometry const& geometry,
+ bool expected_result,
+ bool check_validity = true)
+{
+ typedef typename bg::cs_tag<Geometry>::type cs_tag;
+ test_simple<cs_tag>(geometry, expected_result, check_validity);
+}
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
+void test_simple(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& variant_geometry,
+ bool expected_result,
+ bool check_validity = true)
+{
+ typedef typename bg::cs_tag<T0>::type cs_tag;
+ test_simple<cs_tag>(variant_geometry, expected_result, check_validity);
+}
diff --git a/src/boost/libs/geometry/test/algorithms/test_is_valid.hpp b/src/boost/libs/geometry/test/algorithms/test_is_valid.hpp
new file mode 100644
index 000000000..df0be5b81
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_is_valid.hpp
@@ -0,0 +1,508 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_IS_VALID_HPP
+#define BOOST_GEOMETRY_TEST_IS_VALID_HPP
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/range.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/core/exterior_ring.hpp>
+#include <boost/geometry/core/interior_rings.hpp>
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/algorithms/convert.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+
+#include <boost/geometry/algorithms/detail/check_iterator_range.hpp>
+
+#include <from_wkt.hpp>
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#include "pretty_print_geometry.hpp"
+#endif
+
+
+namespace bg = ::boost::geometry;
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
+typedef bg::model::segment<point_type> segment_type;
+typedef bg::model::box<point_type> box_type;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+typedef bg::model::multi_point<point_type> multi_point_type;
+
+
+//----------------------------------------------------------------------------
+
+
+// returns true if a geometry can be converted to closed
+template
+<
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type,
+ bg::closure_selector Closure = bg::closure<Geometry>::value
+>
+struct is_convertible_to_closed
+{
+ static inline bool apply(Geometry const&)
+ {
+ return false;
+ }
+};
+
+template <typename Ring>
+struct is_convertible_to_closed<Ring, bg::ring_tag, bg::open>
+{
+ static inline bool apply(Ring const& ring)
+ {
+ return boost::size(ring) > 0;
+ }
+};
+
+template <typename Polygon>
+struct is_convertible_to_closed<Polygon, bg::polygon_tag, bg::open>
+{
+ typedef typename bg::ring_type<Polygon>::type ring_type;
+
+ template <typename InteriorRings>
+ static inline
+ bool apply_to_interior_rings(InteriorRings const& interior_rings)
+ {
+ return bg::detail::check_iterator_range
+ <
+ is_convertible_to_closed<ring_type>
+ >::apply(boost::begin(interior_rings),
+ boost::end(interior_rings));
+ }
+
+ static inline bool apply(Polygon const& polygon)
+ {
+ return boost::size(bg::exterior_ring(polygon)) > 0
+ && apply_to_interior_rings(bg::interior_rings(polygon));
+ }
+};
+
+template <typename MultiPolygon>
+struct is_convertible_to_closed<MultiPolygon, bg::multi_polygon_tag, bg::open>
+{
+ typedef typename boost::range_value<MultiPolygon>::type polygon;
+
+ static inline bool apply(MultiPolygon const& multi_polygon)
+ {
+ return bg::detail::check_iterator_range
+ <
+ is_convertible_to_closed<polygon>,
+ false // do not allow empty multi-polygon
+ >::apply(boost::begin(multi_polygon),
+ boost::end(multi_polygon));
+ }
+};
+
+
+//----------------------------------------------------------------------------
+
+
+// returns true if a geometry can be converted to cw
+template
+<
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type,
+ bg::order_selector Order = bg::point_order<Geometry>::value
+>
+struct is_convertible_to_cw
+{
+ static inline bool apply(Geometry const&)
+ {
+ return bg::point_order<Geometry>::value == bg::counterclockwise;
+ }
+};
+
+
+//----------------------------------------------------------------------------
+
+
+// returns true if geometry can be converted to polygon
+template
+<
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+>
+struct is_convertible_to_polygon
+{
+ typedef Geometry type;
+ static bool const value = false;
+};
+
+template <typename Ring>
+struct is_convertible_to_polygon<Ring, bg::ring_tag>
+{
+ typedef bg::model::polygon
+ <
+ typename bg::point_type<Ring>::type,
+ bg::point_order<Ring>::value == bg::clockwise,
+ bg::closure<Ring>::value == bg::closed
+ > type;
+
+ static bool const value = true;
+};
+
+
+//----------------------------------------------------------------------------
+
+
+// returns true if geometry can be converted to multi-polygon
+template
+<
+ typename Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+>
+struct is_convertible_to_multipolygon
+{
+ typedef Geometry type;
+ static bool const value = false;
+};
+
+template <typename Ring>
+struct is_convertible_to_multipolygon<Ring, bg::ring_tag>
+{
+ typedef bg::model::multi_polygon
+ <
+ typename is_convertible_to_polygon<Ring>::type
+ > type;
+
+ static bool const value = true;
+};
+
+template <typename Polygon>
+struct is_convertible_to_multipolygon<Polygon, bg::polygon_tag>
+{
+ typedef bg::model::multi_polygon<Polygon> type;
+ static bool const value = true;
+};
+
+
+//----------------------------------------------------------------------------
+
+
+template <typename ValidityTester>
+struct validity_checker
+{
+ template <typename Geometry>
+ static inline bool apply(std::string const& case_id,
+ Geometry const& geometry,
+ bool expected_result,
+ std::string& reason)
+ {
+ bool valid = ValidityTester::apply(geometry);
+ std::string const reason_valid
+ = bg::validity_failure_type_message(bg::no_failure);
+ reason = ValidityTester::reason(geometry);
+ std::string reason_short = reason.substr(0, reason_valid.length());
+
+ BOOST_CHECK_MESSAGE(valid == expected_result,
+ "case id: " << case_id
+ << ", Expected: " << expected_result
+ << ", detected: " << valid
+ << "; wkt: " << bg::wkt(geometry));
+
+ BOOST_CHECK_MESSAGE(reason != "",
+ "case id (empty reason): " << case_id
+ << ", Expected: " << valid
+ << ", detected reason: " << reason
+ << "; wkt: " << bg::wkt(geometry));
+
+ BOOST_CHECK_MESSAGE((valid && reason == reason_valid)
+ ||
+ (! valid && reason != reason_valid)
+ ||
+ (! valid && reason_short != reason_valid),
+ "case id (reason): " << case_id
+ << ", Expected: " << valid
+ << ", detected reason: " << reason
+ << "; wkt: " << bg::wkt(geometry));
+
+ return valid;
+ }
+};
+
+
+//----------------------------------------------------------------------------
+
+
+struct default_validity_tester
+{
+ template <typename Geometry>
+ static inline bool apply(Geometry const& geometry)
+ {
+ return bg::is_valid(geometry);
+ }
+
+ template <typename Geometry>
+ static inline std::string reason(Geometry const& geometry)
+ {
+ std::string message;
+ bg::is_valid(geometry, message);
+ return message;
+ }
+};
+
+
+template <bool AllowSpikes>
+struct validity_tester_linear
+{
+ template <typename Geometry>
+ static inline bool apply(Geometry const& geometry)
+ {
+ bool const irrelevant = true;
+ bg::is_valid_default_policy<irrelevant, AllowSpikes> visitor;
+ return bg::is_valid(geometry, visitor, bg::default_strategy());
+ }
+
+ template <typename Geometry>
+ static inline std::string reason(Geometry const& geometry)
+ {
+ bool const irrelevant = true;
+ std::ostringstream oss;
+ bg::failing_reason_policy<irrelevant, AllowSpikes> visitor(oss);
+ bg::is_valid(geometry, visitor, bg::default_strategy());
+ return oss.str();
+ }
+};
+
+
+template <bool AllowDuplicates>
+struct validity_tester_areal
+{
+ template <typename Geometry>
+ static inline bool apply(Geometry const& geometry)
+ {
+ bg::is_valid_default_policy<AllowDuplicates> visitor;
+ return bg::is_valid(geometry, visitor, bg::default_strategy());
+ }
+
+ template <typename Geometry>
+ static inline std::string reason(Geometry const& geometry)
+ {
+ std::ostringstream oss;
+ bg::failing_reason_policy<AllowDuplicates> visitor(oss);
+ bg::is_valid(geometry, visitor, bg::default_strategy());
+ return oss.str();
+ }
+
+};
+
+
+template <bool AllowDuplicates>
+struct validity_tester_geo_areal
+{
+ template <typename Geometry>
+ static inline bool apply(Geometry const& geometry)
+ {
+ bg::is_valid_default_policy<AllowDuplicates> visitor;
+ bg::strategy::intersection::geographic_segments<> s;
+ return bg::is_valid(geometry, visitor, s);
+ }
+
+ template <typename Geometry>
+ static inline std::string reason(Geometry const& geometry)
+ {
+ std::ostringstream oss;
+ bg::failing_reason_policy<AllowDuplicates> visitor(oss);
+ bg::strategy::intersection::geographic_segments<> s;
+ bg::is_valid(geometry, visitor, s);
+ return oss.str();
+ }
+
+};
+
+
+//----------------------------------------------------------------------------
+
+
+template
+<
+ typename ValidityTester,
+ typename Geometry,
+ typename ClosedGeometry = Geometry,
+ typename CWGeometry = Geometry,
+ typename CWClosedGeometry = Geometry,
+ typename Tag = typename bg::tag<Geometry>::type
+>
+class test_valid
+{
+protected:
+ template <typename G>
+ static inline void base_test(std::string const& case_id,
+ G const& g,
+ bool expected_result)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "=======" << std::endl;
+#endif
+
+ std::string reason;
+ bool valid = validity_checker
+ <
+ ValidityTester
+ >::apply(case_id, g, expected_result, reason);
+ boost::ignore_unused(valid);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case id: " << case_id << ", Geometry: ";
+ pretty_print_geometry<G>::apply(std::cout, g);
+ std::cout << std::endl;
+ std::cout << "wkt: " << bg::wkt(g) << std::endl;
+ std::cout << std::boolalpha;
+ std::cout << "is valid? " << valid << std::endl;
+ std::cout << "expected result: " << expected_result << std::endl;
+ std::cout << "reason: " << reason << std::endl;
+ std::cout << "=======" << std::endl;
+ std::cout << std::noboolalpha;
+#endif
+ }
+
+public:
+ static inline void apply(std::string const& case_id,
+ Geometry const& geometry,
+ bool expected_result)
+ {
+ std::stringstream sstr;
+ sstr << case_id << "-original"; // which is: CCW open
+ base_test(sstr.str(), geometry, expected_result);
+
+ if ( is_convertible_to_closed<Geometry>::apply(geometry) )
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "...checking closed geometry..."
+ << std::endl;
+#endif
+ ClosedGeometry closed_geometry;
+ bg::convert(geometry, closed_geometry);
+ sstr.str("");
+ sstr << case_id << "-2closed";
+ base_test(sstr.str(), closed_geometry, expected_result);
+ }
+ if ( is_convertible_to_cw<Geometry>::apply(geometry) )
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "...checking cw open geometry..."
+ << std::endl;
+#endif
+ CWGeometry cw_geometry;
+ bg::convert(geometry, cw_geometry);
+ sstr.str("");
+ sstr << case_id << "-2CW";
+ base_test(sstr.str(), cw_geometry, expected_result);
+ if ( is_convertible_to_closed<CWGeometry>::apply(cw_geometry) )
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "...checking cw closed geometry..."
+ << std::endl;
+#endif
+ CWClosedGeometry cw_closed_geometry;
+ bg::convert(cw_geometry, cw_closed_geometry);
+ sstr.str("");
+ sstr << case_id << "-2CWclosed";
+ base_test(sstr.str(), cw_closed_geometry, expected_result);
+ }
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION(is_convertible_to_polygon<Geometry>::value) )
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "...checking geometry converted to polygon..."
+ << std::endl;
+#endif
+ typename is_convertible_to_polygon<Geometry>::type polygon;
+ bg::convert(geometry, polygon);
+ sstr.str("");
+ sstr << case_id << "-2Polygon";
+ base_test(sstr.str(), polygon, expected_result);
+ }
+
+ if ( BOOST_GEOMETRY_CONDITION(is_convertible_to_multipolygon<Geometry>::value) )
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "...checking geometry converted to multi-polygon..."
+ << std::endl;
+#endif
+ typename is_convertible_to_multipolygon
+ <
+ Geometry
+ >::type multipolygon;
+
+ bg::convert(geometry, multipolygon);
+ sstr.str("");
+ sstr << case_id << "-2MultiPolygon";
+ base_test(sstr.str(), multipolygon, expected_result);
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+ }
+
+ static inline void apply(std::string const& case_id,
+ std::string const& wkt,
+ bool expected_result)
+ {
+ apply(case_id, from_wkt<Geometry>(wkt), expected_result);
+ }
+};
+
+
+//----------------------------------------------------------------------------
+
+
+template <typename VariantGeometry>
+class test_valid_variant
+ : test_valid<default_validity_tester, VariantGeometry>
+{
+private:
+ typedef test_valid<default_validity_tester, VariantGeometry> base_type;
+
+public:
+ static inline void apply(std::string const& case_id,
+ VariantGeometry const& vg,
+ bool expected_result)
+ {
+ std::ostringstream oss;
+ base_type::base_test(case_id, vg, expected_result);
+ }
+};
+
+
+#endif // BOOST_GEOMETRY_TEST_IS_VALID_HPP
diff --git a/src/boost/libs/geometry/test/algorithms/test_length.hpp b/src/boost/libs/geometry/test/algorithms/test_length.hpp
new file mode 100644
index 000000000..c4242209b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_length.hpp
@@ -0,0 +1,99 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_LENGTH_HPP
+#define BOOST_GEOMETRY_TEST_LENGTH_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/variant/variant.hpp>
+
+template <typename Geometry>
+void test_length(Geometry const& geometry, long double expected_length)
+{
+ typename bg::default_length_result<Geometry>::type
+ length = bg::length(geometry);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << std::endl
+ << typeid(typename bg::default_length_result<Geometry>::type).name()
+ << std::endl
+ << "length : " << bg::length(geometry)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(length, expected_length, 0.0001);
+}
+
+template <typename Geometry, typename Strategy>
+void test_length(Geometry const& geometry, long double expected_length, Strategy strategy)
+{
+ typename bg::default_length_result<Geometry>::type
+ length = bg::length(geometry, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << std::endl
+ << typeid(typename bg::default_length_result<Geometry>::type).name()
+ << std::endl
+ << "length : " << bg::length(geometry, strategy)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(length, expected_length, 0.0001);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, double expected_length)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_length(geometry, expected_length);
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_length(boost::variant<Geometry>(geometry), expected_length);
+#endif
+}
+
+template <typename Geometry, typename Strategy>
+void test_geometry(std::string const& wkt, double expected_length, Strategy strategy)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ test_length(geometry, expected_length, strategy);
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_length(boost::variant<Geometry>(geometry), expected_length, strategy);
+#endif
+}
+
+template <typename Geometry>
+void test_empty_input(Geometry const& geometry)
+{
+ try
+ {
+ bg::length(geometry);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_overlay.hpp b/src/boost/libs/geometry/test/algorithms/test_overlay.hpp
new file mode 100644
index 000000000..69a0d17a3
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_overlay.hpp
@@ -0,0 +1,161 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_OVERLAY_HPP
+#define BOOST_GEOMETRY_TEST_OVERLAY_HPP
+
+#include <string>
+
+// 1. (Example) testcases
+static std::string example_box = "box(1.5 1.5, 4.5 2.5)";
+
+static std::string example_polygon =
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)"
+ "(4.0 2.0, 4.2 1.4, 4.8 1.9, 4.4 2.2, 4.0 2.0))";
+
+static std::string example_ring =
+ "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))";
+
+static std::string example_star =
+ "POLYGON((4.0 -0.5 , 3.5 1.0 , 2.0 1.5 , 3.5 2.0 , 4.0 3.5 , 4.5 2.0 , 6.0 1.5 , 4.5 1.0 , 4.0 -0.5))";
+
+static std::string polygon_empty = "POLYGON EMPTY";
+
+// 2. Alphabetically ordered testcase pairs
+
+static std::string crossed[2] =
+ {"POLYGON((0 0,0 5,5 5,5 0,0 0),(4 1,3 4,1 2,4 1))",
+ "POLYGON((2 1,1 4,4 3,2 1))"};
+
+static std::string disjoint[2] =
+ {"POLYGON((3 0,3 1,4 1,4 0,3 0))",
+ "POLYGON((3 4,3 5,4 5,4 4,3 4))"};
+
+static std::string distance_zero[2] =
+ {"POLYGON((1 1,1 4,4 4,4 1,1 1))",
+ "POLYGON((1.9 0.9,2.0 4.000001,2.1 1.0,1.9 0.9))"};
+
+// e-45 gives 'convenient' IEEE-single-FP-error,
+static std::string epsilon[2] =
+ {"POLYGON((0.0 0.0"
+ ",3.0e-45 4.0e-45"
+ ",4.0e-45 1.0e-45"
+ ",0.0 0.0))",
+ "POLYGON((2.0e-45 2.0e-45"
+ ",6.0e-45 4.0e-45"
+ ",4.0e-45 -1.0e-45"
+ ",2.0e-45 2.0e-45))"};
+
+static std::string epsilon_multi_ip[2] =
+ {
+ "POLYGON("
+ "(0.0e-44 2.0e-44,0.5e-44 2.5e-44,1.2e-44 2.0e-44,1.7e-44 2.5e-44,2.5e-44 2.0e-44,2.0e-44 1.5e-44"
+ ",2.5e-44 1.0e-44,2.0e-44 0.5e-44,1.7e-44 0.0e-44,1.5e-44 0.5e-44,1.2e-44 0.0e-44,1.0e-44 0.5e-44"
+ ",0.7e-44 0.0e-44,0.5e-44 1.7e-44,0.12e-44 1.5e-44,0.5e-44 1.2e-44,0.0e-44 1.0e-44,0.0e-44 2.0e-44))",
+ "POLYGON("
+ "(0.2e-44 0.2e-44,0.2e-44 2.2e-44,2.2e-44 2.2e-44,2.2e-44 0.2e-44,0.2e-44 0.2e-44))"
+ };
+
+static std::string equal_holes_disjoint[2] =
+ {"POLYGON((0 0,0 9,9 9,9 0,0 0),(1 1,4 1,4 8,1 8,1 1),(5 1,8 1,8 4,5 4,5 1))",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(1 1,4 1,4 8,1 8,1 1),(5 5,8 5,8 8,5 8,5 5))"};
+
+static std::string first_within_second[2] =
+ {"POLYGON((2 2,2 3,3 3,3 2,2 2))",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))"};
+
+static std::string first_within_hole_of_second[2] =
+ {"POLYGON((2 2,2 3,3 3,3 2,2 2))",
+ "POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(1 1,4 1,4 4,1 4,1 1))"};
+
+// == case 52
+static std::string fitting[2] =
+ {"POLYGON((0 0,0 5,5 5,5 0,0 0),(4 1,3 4,1 2,4 1))",
+ "POLYGON((1 2,3 4,4 1,1 2))"};
+
+static std::string identical[2] =
+ {"POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ "POLYGON((1 1,1 0,0 0,0 1,1 1))"};
+
+// case 2102 from "algorithms/detail/overlay/robustness/assemble.hpp"
+static std::string intersect_exterior_and_interiors_winded[2] =
+ {"POLYGON((2 0.5,0.5 2,0.5 8,2 9.5,6 9.5,8.5 8,8.5 2,7 0.5,2 0.5),(2 2,7 2,7 8,2 8,2 2))",
+ "POLYGON((1 1,1 9,8 9,8 1,1 1),(4 4,5 4,5 5,4 5,4 4))"};
+
+static std::string intersect_holes_disjoint[2] =
+ {"POLYGON((0 0,0 7,5 7,5 0,0 0),(2 2,3 2,3 3,2 3,2 2))",
+ "POLYGON((1 1,1 6,6 6,6 1,1 1),(2 4,3 4,3 5,2 5,2 4))"};
+
+static std::string intersect_holes_intersect[2] =
+ {"POLYGON((0 0,0 7,5 7,5 0,0 0),(2 2,3 2,3 3,2 3,2 2))",
+ "POLYGON((1 1,1 6,6 6,6 1,1 1),(2.5 2.5,3.5 2.5,3.5 3.5,2.5 3.5,2.5 2.5))"};
+
+static std::string intersect_holes_intersect_and_disjoint[2] =
+ {"POLYGON((0 0,0 7,5 7,5 0,0 0),(2 2,3 2,3 3,2 3,2 2),(2 4,3 4,3 5,2 5,2 4))",
+ "POLYGON((1 1,1 6,6 6,6 1,1 1),(2.5 2.5,3.5 2.5,3.5 3.5,2.5 3.5,2.5 2.5))"};
+
+static std::string intersect_holes_intersect_and_touch[2] =
+ {"POLYGON((0 0,0 7,5 7,5 0,0 0),(2 2,3 2,3 3,2 3,2 2),(2.5 4,3 4.5,2.5 5,2 4.5,2.5 4))",
+ "POLYGON((1 1,1 6,6 6,6 1,1 1),(2.5 2.5,3.5 2.5,3.5 3.5,2.5 3.5,2.5 2.5),(3.5 4,4 4.5,3.5 5,3 4.5,3.5 4))"};
+
+static std::string intersect_holes_new_ring[2] =
+ {"POLYGON((4 4,4 16,16 16,16 4,4 4),(7 6,14 10,7 14,11 10,7 6))",
+ "POLYGON((2 2,2 18,18 18,18 2,2 2),(13 6,9 10,13 14,6 10,13 6))"};
+
+static std::string isovist1[2] =
+ {
+ "POLYGON((37.29449462890625 1.7902572154998779, 46.296027072709599 -2.4984308554828116, 45.389434814453125 -4.5143837928771973, 47.585065917176543 -6.1314922196594779, 46.523914387974358 -8.5152102535033496, 42.699958801269531 -4.4278755187988281, 42.577877044677734 -4.4900407791137695, 42.577911376953125 -4.4901103973388672, 40.758884429931641 -5.418975830078125, 40.6978759765625 -5.4500408172607422, 41.590042114257813 -7.2021245956420898, 57.297810222148939 -37.546793343968417, 50.974888957147442 -30.277285722290763, 37.140213012695313 1.3446992635726929, 37.000419616699219 1.664225697517395, 37.29449462890625 1.7902572154998779))",
+ "POLYGON((43.644271850585938 0.96149998903274536,43.764598846435547 0.93951499462127686,49.071769542946825 0.61489892713413252,48.43512638981781 -0.81299959072453376,47.830955505371094 -0.69758313894271851,47.263670054709685 -1.784876824891044,46.695858001708984 -1.6093428134918213,45.389434814453125 -4.5143837928771973,47.604561877161387 -6.087697464505224,46.559533858616469 -8.435196445683264,42.699958801269531 -4.4278755187988281,42.577877044677734 -4.4900407791137695,42.577911376953125 -4.4901103973388672,40.758884429931641 -5.418975830078125,40.6978759765625 -5.4500408172607422,41.590042114257813 -7.2021245956420898,57.524304765518266 -37.807195733984784,41.988733475572282 -19.945838749437218,41.821544647216797 -19.211688995361328,40.800632476806641 -17.208097457885742,39.966808319091797 -17.625011444091797,38.823680877685547 -16.296066284179688,37.326129913330078 -17.190576553344727,35.963497161865234 -15.476018905639648,35.656356811523438 -15.66030216217041,34.931102752685547 -16.223842620849609,34.634240447128811 -15.85007183479255,34.886280059814453 -14.120697975158691,34.658355712890625 -13.81736946105957,34.328716278076172 -13.992490768432617,33.598796844482422 -14.546377182006836,33.164891643669634 -14.000060288415174,33.566280364990234 -12.450697898864746,33.339523315429688 -12.147735595703125,32.998821258544922 -12.323249816894531,32.274600982666016 -12.879127502441406,31.682494778186321 -12.133624901803865,32.226280212402344 -10.790698051452637,32.000633239746094 -10.488097190856934,31.669155120849609 -10.653837203979492,30.947774887084961 -11.208560943603516,30.207040612748258 -10.275926149505661,30.896280288696289 -9.1206979751586914,30.670633316040039 -8.8180980682373047,30.339155197143555 -8.9838371276855469,29.619997024536133 -9.5368013381958008,29.135100397190627 -8.9262827849488211,32.718830108642578 -4.3281683921813965,32.708168029785156 -2.3611698150634766,32.708126068115234 -2.3611700534820557,32.708126068115234 -2.3611266613006592,30.501169204711914 -2.3718316555023193,27.069889344709196 -4.2926591211028242,26.472516656201325 -3.5380830513658776,36.954700469970703 1.2597870826721191,37.140213012695313 1.3446992635726929,37.000419616699219 1.664225697517395,37.29449462890625 1.7902572154998779,37.43402099609375 1.470055103302002,51.370888500897557 7.4163459734570729,51.20102152843122 7.1738039562841562,42.721500396728516 3.6584999561309814,42.721500396728516 2.2342472076416016,42.399410247802734 1.4956772327423096,43.644271850585938 0.96149998903274536))"
+ };
+
+static std::string new_hole[2] =
+ {"POLYGON((2 2,2 5,5 5,5 2,2 2))",
+ "POLYGON((0 0,0 6,3 6,3 4,1 4,1 3,3 3,3 0,0 0))"};
+
+static std::string only_hole_intersections[3] =
+ {"POLYGON((0 0,0 10,20 10,20 0,0 0),(1 1,7 5,5 7,1 1),(11 1,17 5,15 7,11 1))",
+ "POLYGON((0 0,0 10,20 10,20 0,0 0),(1 1,7 6,6 7,1 1),(11 1,17 6,16 7,11 1))",
+ "POLYGON((0.5 0.5,0.5 9.5,19.5 9.5,19.5 0.5,0.5 0.5),(1 1,7 6,6 7,1 1),(11 1,17 6,16 7,11 1))"};
+
+static std::string side_side[2] =
+ {"POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ "POLYGON((1 0,1 1,2 1,2 0,1 0))"};
+
+static std::string simplex_normal[2] =
+ {"POLYGON((0 1,2 5,5 3,0 1))",
+ "POLYGON((3 0,0 3,4 5,3 0))"};
+
+static std::string simplex_reversed[2] =
+ {"POLYGON((0 1,5 3,2 5,0 1))",
+ "POLYGON((3 0,4 5,0 3,3 0))"};
+
+static std::string star_comb_15[2] =
+ {"POLYGON((25 52.5,27.1694 29.5048,46.5004 42.146,29.8746 26.1126,51.8105 18.8807,28.9092 21.8826,36.9318 0.223356,25 20,13.0682 0.223356,21.0908 21.8826,-1.81052 18.8807,20.1254 26.1126,3.49963 42.146,22.8306 29.5048,25 52.5))",
+ "POLYGON((25 0,0 25,25 50,50 25,49.0741 24.0741,25 48.1481,24.0741 47.2222,48.1481 23.1481,47.2222 22.2222,23.1481 46.2963,22.2222 45.3704,46.2963 21.2963,45.3704 20.3704,21.2963 44.4444,20.3704 43.5185,44.4444 19.4444,43.5185 18.5185,19.4444 42.5926,18.5185 41.6667,42.5926 17.5926,41.6667 16.6667,17.5926 40.7407,16.6667 39.8148,40.7407 15.7407,39.8148 14.8148,15.7407 38.8889,14.8148 37.963,38.8889 13.8889,37.963 12.963,13.8889 37.037,12.963 36.1111,37.037 12.037,36.1111 11.1111,12.037 35.1852,11.1111 34.2593,35.1852 10.1852,34.2593 9.25926,10.1852 33.3333,9.25926 32.4074,33.3333 8.33333,32.4074 7.40741,8.33333 31.4815,7.40741 30.5556,31.4815 6.48148,30.5556 5.55556,6.48148 29.6296,5.55556 28.7037,29.6296 4.62963,28.7037 3.7037,4.62963 27.7778,3.7037 26.8519,27.7778 2.77778,26.8519 1.85185,2.77778 25.9259,1.85185 25,25.9259 0.925926,25 0))"};
+
+static std::string two_bends[2] =
+ {"POLYGON((0 4,4 8,7 7,8 4,5 3,4 0,0 4))",
+ "POLYGON((0 4,4 8,5 5,8 4,7 1,4 0,0 4))"};
+
+// within each other, having no intersections but many holes within each other
+static std::string winded[2] =
+ {"POLYGON((0 0,0 11,11 11,11 0,0 0),(3 3,4 3,4 4,3 4,3 3),(5 3,6 3,6 4,5 4,5 3),(2 6,7 6,7 9,2 9,2 6),(9 2,10 2,10 5,9 5,9 2))",
+ "POLYGON((1 1,1 10,10 10,10 6,8 6,8 1,1 1),(2 2,7 2,7 5,2 5,2 2),(3 7,4 7,4 8,3 8,3 7),(5 7,6 7,6 8,5 8,5 7),(8 7,9 7,9 8,8 8,8 7))"};
+
+static std::string within_holes_disjoint[2] =
+ {"POLYGON((0 0,0 7,7 7,7 0,0 0),(2 2,3 2,3 3,2 3,2 2))",
+ "POLYGON((1 1,1 6,6 6,6 1,1 1),(2 4,3 4,3 5,2 5,2 4))"};
+
+// == case 53
+static std::string wrapped[3] = {
+ "POLYGON((2 2,2 3,3 3,3 2,2 2))",
+ /*a:*/ "POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,3 2,3 1,4 1,4 4,1 4,1 3,2 3,2 2,0 2))", // NOT st_isvalid
+ /*b:*/ "POLYGON((0 2,0 5,5 5,5 0,2 0,2 2,0 2),(1 3,2 3,2 2,3 2,3 1,4 1,4 4,1 4,1 3))" // st_isvalid
+ };
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_perimeter.hpp b/src/boost/libs/geometry/test/algorithms/test_perimeter.hpp
new file mode 100644
index 000000000..32a5defb6
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_perimeter.hpp
@@ -0,0 +1,103 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_PERIMETER_HPP
+#define BOOST_GEOMETRY_TEST_PERIMETER_HPP
+
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/perimeter.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+template <typename Geometry>
+void test_perimeter(Geometry const& geometry, long double expected_perimeter)
+{
+ typename bg::default_length_result<Geometry>::type
+ perimeter = bg::perimeter(geometry);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << std::endl
+ //<< typeid(typename bg::default_perimeter_result<Geometry>::type).name()
+ << std::endl
+ << "perimeter : " << bg::perimeter(geometry)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(perimeter, expected_perimeter, 0.0001);
+}
+
+
+template <typename Geometry, typename Strategy>
+void test_perimeter(Geometry const& geometry, long double expected_perimeter, Strategy strategy)
+{
+ typename bg::default_length_result<Geometry>::type
+ perimeter = bg::perimeter(geometry, strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::ostringstream out;
+ out << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << std::endl
+ //<< typeid(typename bg::default_perimeter_result<Geometry>::type).name()
+ << std::endl
+ << "perimeter : " << bg::perimeter(geometry, strategy)
+ << std::endl;
+ std::cout << out.str();
+#endif
+
+ BOOST_CHECK_CLOSE(perimeter, expected_perimeter, 0.0001);
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, double expected_perimeter)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> v(geometry);
+
+ test_perimeter(geometry, expected_perimeter);
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_perimeter(v, expected_perimeter);
+#endif
+}
+
+template <typename Geometry, typename Strategy>
+void test_geometry(std::string const& wkt, double expected_perimeter, Strategy strategy)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> v(geometry);
+
+ test_perimeter(geometry, expected_perimeter, strategy);
+#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
+ test_perimeter(v, expected_perimeter, strategy);
+#endif
+}
+
+template <typename Geometry>
+void test_empty_input(Geometry const& geometry)
+{
+ try
+ {
+ bg::perimeter(geometry);
+ }
+ catch(bg::empty_input_exception const& )
+ {
+ return;
+ }
+ BOOST_CHECK_MESSAGE(false, "A empty_input_exception should have been thrown" );
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_reverse.hpp b/src/boost/libs/geometry/test/algorithms/test_reverse.hpp
new file mode 100644
index 000000000..101429251
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_reverse.hpp
@@ -0,0 +1,46 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_REVERSE_HPP
+#define BOOST_GEOMETRY_TEST_REVERSE_HPP
+
+// Test-functionality, shared between single and multi tests
+
+#include <geometry_test_common.hpp>
+#include <boost/geometry/algorithms/reverse.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/variant/variant.hpp>
+
+
+template <typename Geometry>
+void check_geometry(Geometry& geometry, std::string const& wkt, std::string const& expected)
+{
+ bg::reverse(geometry);
+
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+
+ BOOST_CHECK_MESSAGE(out.str() == expected,
+ "reverse: " << wkt
+ << " expected " << expected
+ << " got " << out.str());
+}
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::string const& expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> v(geometry);
+
+ check_geometry(geometry, wkt, expected);
+ check_geometry(v, wkt, expected);
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_simplify.hpp b/src/boost/libs/geometry/test/algorithms/test_simplify.hpp
new file mode 100644
index 000000000..2ae96d58b
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_simplify.hpp
@@ -0,0 +1,241 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_SIMPLIFY_HPP
+#define BOOST_GEOMETRY_TEST_SIMPLIFY_HPP
+
+// Test-functionality, shared between single and multi tests
+
+#include <iomanip>
+#include <sstream>
+#include <geometry_test_common.hpp>
+#include <boost/geometry/algorithms/correct_closure.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/simplify.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/variant/variant.hpp>
+
+
+template
+<
+ typename GeometryForTag,
+ typename Tag = typename bg::tag<GeometryForTag>::type
+>
+struct test_equality
+{
+ template <typename Geometry, typename Expected>
+ static void apply(Geometry const& geometry, Expected const& expected)
+ {
+ // Verify both spatially equal AND number of points, because several
+ // of the tests only check explicitly on collinear points being
+ // simplified away
+ bool const result
+ = bg::equals(geometry, expected)
+ && bg::num_points(geometry) == bg::num_points(expected);
+
+ BOOST_CHECK_MESSAGE(result,
+ " result: " << bg::wkt(geometry) << " " << bg::area(geometry)
+ << " expected: " << bg::wkt(expected) << " " << bg::area(expected));
+
+ }
+};
+
+// Linestring does NOT yet have "geometry::equals" implemented
+// Until then, WKT's are compared (which is acceptable for linestrings, but not
+// for polygons, because simplify might rotate them)
+template <typename GeometryForTag>
+struct test_equality<GeometryForTag, bg::linestring_tag>
+{
+ template <typename Geometry, typename Expected>
+ static void apply(Geometry const& geometry, Expected const& expected)
+ {
+ std::ostringstream out1, out2;
+ out1 << bg::wkt(geometry);
+ out2 << bg::wkt(expected);
+ BOOST_CHECK_EQUAL(out1.str(), out2.str());
+ }
+};
+
+
+template <typename Tag>
+struct test_inserter
+{
+ template <typename Geometry, typename Expected>
+ static void apply(Geometry& , Expected const& , double )
+ {}
+};
+
+template <>
+struct test_inserter<bg::linestring_tag>
+{
+ template <typename Geometry, typename Expected, typename DistanceMeasure>
+ static void apply(Geometry& geometry,
+ Expected const& expected,
+ DistanceMeasure const& distance)
+ {
+ {
+ Geometry simplified;
+ bg::detail::simplify::simplify_insert(geometry,
+ std::back_inserter(simplified), distance);
+
+ test_equality<Geometry>::apply(simplified, expected);
+ }
+
+#ifdef TEST_PULL89
+ {
+ typedef typename bg::point_type<Geometry>::type point_type;
+ typedef typename bg::strategy::distance::detail::projected_point_ax<>::template result_type<point_type, point_type>::type distance_type;
+ typedef bg::strategy::distance::detail::projected_point_ax_less<distance_type> less_comparator;
+
+ distance_type max_distance(distance);
+ less_comparator less(max_distance);
+
+ bg::strategy::simplify::detail::douglas_peucker
+ <
+ point_type,
+ bg::strategy::distance::detail::projected_point_ax<>,
+ less_comparator
+ > strategy(less);
+
+ Geometry simplified;
+ bg::detail::simplify::simplify_insert(geometry,
+ std::back_inserter(simplified), max_distance, strategy);
+
+ test_equality<Geometry>::apply(simplified, expected);
+ }
+#endif
+ }
+};
+
+template <typename Geometry, typename Expected, typename DistanceMeasure>
+void check_geometry(Geometry const& geometry,
+ Expected const& expected,
+ DistanceMeasure const& distance)
+{
+ Geometry simplified;
+ bg::simplify(geometry, simplified, distance);
+ test_equality<Expected>::apply(simplified, expected);
+}
+
+template <typename Geometry, typename Expected, typename Strategy, typename DistanceMeasure>
+void check_geometry(Geometry const& geometry,
+ Expected const& expected,
+ DistanceMeasure const& distance,
+ Strategy const& strategy)
+{
+ Geometry simplified;
+ bg::simplify(geometry, simplified, distance, strategy);
+ test_equality<Expected>::apply(simplified, expected);
+}
+
+template <typename Geometry, typename DistanceMeasure>
+void check_geometry_with_area(Geometry const& geometry,
+ double expected_area,
+ DistanceMeasure const& distance)
+{
+ Geometry simplified;
+ bg::simplify(geometry, simplified, distance);
+ BOOST_CHECK_CLOSE(bg::area(simplified), expected_area, 0.01);
+}
+
+
+template <typename Geometry, typename DistanceMeasure>
+void test_geometry(std::string const& wkt,
+ std::string const& expected_wkt,
+ DistanceMeasure distance)
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ Geometry geometry, expected;
+
+ bg::read_wkt(wkt, geometry);
+ bg::read_wkt(expected_wkt, expected);
+
+ boost::variant<Geometry> v(geometry);
+
+ // Define default strategy for testing
+ typedef bg::strategy::simplify::douglas_peucker
+ <
+ typename bg::point_type<Geometry>::type,
+ bg::strategy::distance::projected_point<double>
+ > dp;
+
+ check_geometry(geometry, expected, distance);
+ check_geometry(v, expected, distance);
+
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::SimplifyStrategy<dp, point_type>) );
+
+ check_geometry(geometry, expected, distance, dp());
+ check_geometry(v, expected, distance, dp());
+
+ // Check inserter (if applicable)
+ test_inserter
+ <
+ typename bg::tag<Geometry>::type
+ >::apply(geometry, expected, distance);
+
+#ifdef TEST_PULL89
+ // Check using non-default less comparator in douglass_peucker
+ typedef typename bg::strategy::distance::detail::projected_point_ax<>::template result_type<point_type, point_type>::type distance_type;
+ typedef bg::strategy::distance::detail::projected_point_ax_less<distance_type> less_comparator;
+
+ distance_type const max_distance(distance);
+ less_comparator const less(max_distance);
+
+ typedef bg::strategy::simplify::detail::douglas_peucker
+ <
+ point_type,
+ bg::strategy::distance::detail::projected_point_ax<>,
+ less_comparator
+ > douglass_peucker_with_less;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::SimplifyStrategy<douglass_peucker_with_less, point_type>) );
+
+ check_geometry(geometry, expected, distance, douglass_peucker_with_less(less));
+ check_geometry(v, expected, distance, douglass_peucker_with_less(less));
+#endif
+}
+
+template <typename Geometry, typename Strategy, typename DistanceMeasure>
+void test_geometry(std::string const& wkt,
+ std::string const& expected_wkt,
+ DistanceMeasure const& distance,
+ Strategy const& strategy)
+{
+ Geometry geometry, expected;
+
+ bg::read_wkt(wkt, geometry);
+ bg::read_wkt(expected_wkt, expected);
+ bg::correct_closure(geometry);
+ bg::correct_closure(expected);
+
+ boost::variant<Geometry> v(geometry);
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::SimplifyStrategy<Strategy,
+ typename bg::point_type<Geometry>::type>) );
+
+ check_geometry(geometry, expected, distance, strategy);
+ check_geometry(v, expected, distance, strategy);
+}
+
+template <typename Geometry, typename DistanceMeasure>
+void test_geometry(std::string const& wkt,
+ double expected_area,
+ DistanceMeasure const& distance)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ bg::correct_closure(geometry);
+
+ check_geometry_with_area(geometry, expected_area, distance);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/test_unique.hpp b/src/boost/libs/geometry/test/algorithms/test_unique.hpp
new file mode 100644
index 000000000..be9d23565
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/test_unique.hpp
@@ -0,0 +1,39 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_UNIQUE_HPP
+#define BOOST_GEOMETRY_TEST_UNIQUE_HPP
+
+// Test-functionality, shared between single and multi tests
+
+#include <geometry_test_common.hpp>
+#include <boost/geometry/algorithms/unique.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt, std::string const& expected)
+{
+ Geometry geometry;
+
+ bg::read_wkt(wkt, geometry);
+ bg::unique(geometry);
+
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+
+ BOOST_CHECK_MESSAGE(out.str() == expected,
+ "unique: " << wkt
+ << " expected " << expected
+ << " got " << out.str());
+}
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/touches/Jamfile b/src/boost/libs/geometry/test/algorithms/touches/Jamfile
new file mode 100644
index 000000000..fcce33366
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/Jamfile
@@ -0,0 +1,24 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-touches
+ :
+ [ run touches.cpp : : : : algorithms_touches ]
+ [ run touches_box.cpp : : : : algorithms_touches_box ]
+ [ run touches_multi.cpp : : : : algorithms_touches_multi ]
+ [ run touches_self.cpp : : : : algorithms_touches_self ]
+ [ run touches_sph.cpp : : : : algorithms_touches_sph ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/touches/test_touches.hpp b/src/boost/libs/geometry/test/algorithms/touches/test_touches.hpp
new file mode 100644
index 000000000..fa7e39a34
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/test_touches.hpp
@@ -0,0 +1,142 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2015, 2016, 2017.
+// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_TOUCHES_HPP
+#define BOOST_GEOMETRY_TEST_TOUCHES_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/algorithms/touches.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/variant/variant.hpp>
+
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void check_touches(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = bg::touches(geometry1, geometry2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "touches: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ detected = bg::touches(geometry2, geometry1, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "touches: " << wkt2
+ << " with " << wkt1
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry1, typename Geometry2>
+void check_touches(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ no_strategy = no_strategy())
+{
+ bool detected = bg::touches(geometry1, geometry2);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "touches: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+
+ detected = bg::touches(geometry2, geometry1);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "touches: " << wkt2
+ << " with " << wkt1
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_touches(std::string const& wkt1,
+ std::string const& wkt2, bool expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+
+ boost::variant<Geometry1> v1(geometry1);
+ boost::variant<Geometry2> v2(geometry2);
+
+ typedef typename bg::strategy::relate::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+
+ check_touches(geometry1, geometry2, wkt1, wkt2, expected, no_strategy());
+ check_touches(geometry1, geometry2, wkt1, wkt2, expected, strategy_type());
+ check_touches(v1, geometry2, wkt1, wkt2, expected, no_strategy());
+ check_touches(geometry1, v2, wkt1, wkt2, expected, no_strategy());
+ check_touches(v1, v2, wkt1, wkt2, expected, no_strategy());
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected)
+{
+ test_touches<Geometry1, Geometry2>(wkt1, wkt2, expected);
+}
+
+
+template <typename Geometry>
+void check_self_touches(Geometry const& geometry,
+ std::string const& wkt,
+ bool expected)
+{
+ bool detected = bg::touches(geometry);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "touches: " << wkt
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry>
+void test_self_touches(std::string const& wkt, bool expected)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ boost::variant<Geometry> v(geometry);
+
+ check_self_touches(geometry, wkt, expected);
+ check_self_touches(v, wkt, expected);
+}
+
+
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/touches/touches.cpp b/src/boost/libs/geometry/test/algorithms/touches/touches.cpp
new file mode 100644
index 000000000..80db2d9b9
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/touches.cpp
@@ -0,0 +1,226 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2014. 2015.
+// Modifications copyright (c) 2013-2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_touches.hpp"
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::multi_point<P> mpoint;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::multi_polygon<polygon> mpolygon;
+ typedef bg::model::multi_linestring<linestring> mlinestring;
+
+ // Touching at corner
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((100 100,100 200,200 200, 200 100,100 100))",
+ true
+ );
+
+ // Intersecting at corner
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,101 101,100 0,0 0))",
+ "POLYGON((100 100,100 200,200 200, 200 100,100 100))",
+ false
+ );
+
+ // Touching at side (interior of a segment)
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((200 0,100 50,200 100,200 0))",
+ true
+ );
+
+ // Touching at side (partly collinear)
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((200 20,100 20,100 80,200 80,200 20))",
+ true
+ );
+
+ // Completely equal
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ false
+ );
+
+ // Spatially equal
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((0 0,0 100,100 100,100 80,100 20,100 0,0 0))",
+ false
+ );
+
+ // Spatially equal (without equal segments)
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((0 0,0 50,0 100,50 100,100 100,100 50,100 0,50 0,0 0))",
+ false
+ );
+
+
+ // Touching at side (opposite equal)
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((200 0,100 0,100 100,200 100,200 0))",
+ true
+ );
+
+ // Touching at side (opposite equal - but with real "equal" turning point)
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 80,100 20,100 0,0 0))",
+ "POLYGON((200 0,100 0,100 20,100 80,100 100,200 100,200 0))",
+ true
+ );
+ // First partly collinear to side, than overlapping
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((200 20,100 20,100 50,50 50,50 80,100 80,200 80,200 20))",
+ false
+ );
+
+ // Touching interior (= no touch)
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0))",
+ "POLYGON((20 20,20 80,100 50,20 20))",
+ false
+ );
+
+ // Fitting in hole
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 100,100 100,100 0,0 0),(40 40,60 40,60 60,40 60,40 40))",
+ "POLYGON((40 40,40 60,60 60,60 40,40 40))",
+ true
+ );
+
+ // mysql 21873343
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 10,10 10,10 0,0 0), (0 8, 8 5, 8 8, 0 8))",
+ "POLYGON((0 8,-8 5,-8 8,0 8))",
+ true
+ );
+ test_touches<polygon, polygon>
+ (
+ "POLYGON((0 0,0 10,10 10,10 0,0 0), (0 6, 6 3, 6 6, 0 6))",
+ "POLYGON((0 6,-6 3,-6 6,0 6))",
+ true
+ );
+
+ // Point-Polygon
+ test_touches<P, ring>("POINT(40 50)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", true);
+ test_touches<P, polygon>("POINT(40 50)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", true);
+ test_touches<P, polygon>("POINT(60 60)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", true);
+ test_touches<P, polygon>("POINT(50 50)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", false);
+ test_touches<P, polygon>("POINT(30 50)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", false);
+
+ // Point-MultiPolygon
+ test_touches<P, mpolygon>("POINT(40 50)", "MULTIPOLYGON(((40 40,40 60,60 60,60 40,40 40)),((0 0,0 10,10 10,10 0)))", true);
+
+ // Point-Linestring
+ test_touches<P, linestring>("POINT(0 0)", "LINESTRING(0 0, 2 2, 10 2)", true);
+ test_touches<P, linestring>("POINT(2 2)", "LINESTRING(0 0, 2 2, 10 2)", false);
+ test_touches<P, linestring>("POINT(1 1)", "LINESTRING(0 0, 2 2, 10 2)", false);
+ test_touches<P, linestring>("POINT(5 5)", "LINESTRING(0 0, 2 2, 10 2)", false);
+
+ // Point-MultiLinestring
+ test_touches<P, mlinestring>("POINT(0 0)", "MULTILINESTRING((0 0, 2 2, 10 2),(5 5, 6 6))", true);
+ test_touches<P, mlinestring>("POINT(0 0)", "MULTILINESTRING((0 0, 2 2, 10 2),(0 0, 6 6))", false);
+
+ // MultiPoint-Polygon
+ test_touches<mpoint, ring>("MULTIPOINT(40 50, 30 50)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", true);
+ test_touches<mpoint, polygon>("MULTIPOINT(40 50, 50 50)", "POLYGON((40 40,40 60,60 60,60 40,40 40))", false);
+
+ // Linestring-Linestring
+ test_touches<linestring, linestring>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,0 2)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,2 0)", "LINESTRING(2 0,2 2)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,2 0)", "LINESTRING(0 2,0 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,2 0)", "LINESTRING(2 2,2 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 0,0 0)", "LINESTRING(0 0,0 2)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 0,0 0)", "LINESTRING(2 0,2 2)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 0,0 0)", "LINESTRING(0 2,0 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 0,0 0)", "LINESTRING(2 2,2 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,2 0)", "LINESTRING(1 0,1 1)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,2 0)", "LINESTRING(1 1,1 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 0,0 0)", "LINESTRING(1 0,1 1)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 0,0 0)", "LINESTRING(1 1,1 0)", true);
+
+ test_touches<linestring, linestring>("LINESTRING(0 0,10 0)", "LINESTRING(0 0,5 5,10 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,10 10)", "LINESTRING(0 0,0 5,10 5)", false);
+
+ test_touches<linestring, linestring>("LINESTRING(0 5,5 6,10 5)", "LINESTRING(0 7,5 6,10 7)", false);
+ test_touches<linestring, linestring>("LINESTRING(0 5,5 6,10 5)", "LINESTRING(10 7,5 6,0 7)", false);
+ test_touches<linestring, linestring>("LINESTRING(10 5,5 6,0 5)", "LINESTRING(0 7,5 6,10 7)", false);
+ test_touches<linestring, linestring>("LINESTRING(10 5,5 6,0 5)", "LINESTRING(10 7,5 6,0 7)", false);
+
+ test_touches<linestring, linestring>("LINESTRING(0 0,1 1,2 2)", "LINESTRING(2 0,2 2,1 2,1 1)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 2,1 1,0 0)", "LINESTRING(2 0,2 2,1 2,1 1)", true);
+ test_touches<linestring, linestring>("LINESTRING(0 0,1 1,2 2)", "LINESTRING(1 1,1 2,2 2,2 0)", true);
+ test_touches<linestring, linestring>("LINESTRING(2 2,1 1,0 0)", "LINESTRING(1 1,1 2,2 2,2 0)", true);
+
+ test_touches<linestring, linestring>("LINESTRING(0 0,1 1,0 1)", "LINESTRING(1 1,2 2,1 2,1 1)", false);
+
+ test_touches<linestring, mlinestring>("LINESTRING(0 0,1 1,0 1)", "MULTILINESTRING((1 1,2 2),(1 2,1 1))", false);
+
+ //Linestring-Polygon
+ test_touches<linestring, polygon>("LINESTRING(10 0,15 5,10 10,5 15,5 10,0 10,5 15,5 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_touches<linestring, polygon>("LINESTRING(5 10,5 15,0 10,5 10,5 15,10 10,15 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_touches<linestring, polygon>("LINESTRING(5 10,5 15,0 10,5 10,5 15,10 10,5 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_touches<linestring, ring>("LINESTRING(0 15,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_touches<linestring, polygon>("LINESTRING(0 15,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_touches<linestring, polygon>("LINESTRING(0 15,5 10,5 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_touches<linestring, polygon>("LINESTRING(10 15,5 10,0 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_touches<linestring, polygon>("LINESTRING(0 0,3 3)", "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0))", true);
+
+ test_touches<linestring, mpolygon>("LINESTRING(-1 -1,3 3)", "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)))", true);
+
+ test_touches<mlinestring, mpolygon>("MULTILINESTRING((0 0,11 11))", "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 9,1 9,0 0)))", false);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
+
+/*
+with viewy as
+(
+select geometry::STGeomFromText('POLYGON((0 0,0 100,100 100,100 0,0 0))',0) as p
+ , geometry::STGeomFromText('POLYGON((200 0,100 50,200 100,200 0))',0) as q
+)
+-- select p from viewy union all select q from viewy
+select p.STTouches(q) from viewy
+*/
diff --git a/src/boost/libs/geometry/test/algorithms/touches/touches_box.cpp b/src/boost/libs/geometry/test/algorithms/touches/touches_box.cpp
new file mode 100644
index 000000000..7325bc2c2
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/touches_box.cpp
@@ -0,0 +1,66 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2014, 2015.
+// Modifications copyright (c) 2013-2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_touches.hpp"
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::box<P> box;
+
+ test_touches<box, box>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((5 1,5 2,6 2,6 1,5 1))", true);
+ test_touches<box, box>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((4 1,4 2,5 2,5 1,4 1))", false);
+ test_touches<box, box>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((4 1,4 2,6 2,6 1,4 1))", false);
+
+ // Point-size
+ test_touches<box, box>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((5 5,5 5,5 5,5 5,5 5))", true);
+ // TODO: should it be TRUE?
+ test_touches<box, box>("POLYGON((5 5,5 5,5 5,5 5,5 5))", "POLYGON((5 5,5 5,5 5,5 5,5 5))", true);
+}
+
+template <typename P>
+void test_box_3d()
+{
+ typedef bg::model::box<P> box;
+
+ check_touches<box, box>(box(P(0,0,0),P(5,5,5)), box(P(5,1,2),P(6,6,6)),
+ "box(P(0,0,0),P(5,5,5))", "box(P(5,1,2),P(6,6,6))",
+ true);
+
+ check_touches<box, box>(box(P(0,0,0),P(5,5,5)), box(P(5,5,5),P(6,6,6)),
+ "box(P(0,0,0),P(5,5,5))", "box(P(5,5,5),P(6,6,6))",
+ true);
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ test_box_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
+
+/*
+with viewy as
+(
+select geometry::STGeomFromText('POLYGON((0 0,0 100,100 100,100 0,0 0))',0) as p
+ , geometry::STGeomFromText('POLYGON((200 0,100 50,200 100,200 0))',0) as q
+)
+-- select p from viewy union all select q from viewy
+select p.STTouches(q) from viewy
+*/
diff --git a/src/boost/libs/geometry/test/algorithms/touches/touches_multi.cpp b/src/boost/libs/geometry/test/algorithms/touches/touches_multi.cpp
new file mode 100644
index 000000000..65de6b52c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/touches_multi.cpp
@@ -0,0 +1,80 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_touches.hpp"
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/num_geometries.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::multi_linestring<linestring> ml;
+
+ test_self_touches<mp>("MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
+ false);
+
+ // Exactly equal
+ test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
+ false);
+
+ // Spatially equal
+ test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 100,100 100,100 80,100 20,100 0,0 0)))",
+ false);
+
+ // One exactly equal, another pair touching
+ test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((30 10,30 20,40 20,40 10,30 10)))",
+ false);
+
+ // One spatially equal (without equal segments), another pair touching
+ test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 5,0 10,5 10,10 10,10 5,10 0,5 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((30 10,30 20,40 20,40 10,30 10)))",
+ false);
+
+ // Alternate touches
+ test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10)),((30 10,30 20,40 20,40 10,30 10)))",
+ true);
+
+ // Touch plus inside
+ test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10)),((22 2,28 2,28 8,22 8,22 2)))",
+ false);
+
+
+ test_touches<mp, ml>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTILINESTRING((10 10,10 20,20 20,20 10,10 10),(30 10,30 20,40 20,40 10,30 10))",
+ true);
+
+ test_touches<mp, ml>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTILINESTRING((10 10,10 20,20 20,20 10,10 10),(22 2,28 2,28 8,22 8,22 2))",
+ false);
+
+ test_touches<mp, ml>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
+ "MULTILINESTRING((10 10,10 20,20 20,20 10,10 10),(50 2,60 2,60 8,50 8,50 2))",
+ true);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/touches/touches_self.cpp b/src/boost/libs/geometry/test/algorithms/touches/touches_self.cpp
new file mode 100644
index 000000000..00ea47daa
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/touches_self.cpp
@@ -0,0 +1,43 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2013, 2014. 2015.
+// Modifications copyright (c) 2013-2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_touches.hpp"
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> polygon;
+
+ // Just a normal polygon
+ test_self_touches<polygon>("POLYGON((0 0,0 4,1.5 2.5,2.5 1.5,4 0,0 0))", false);
+
+ // Self intersecting
+ test_self_touches<polygon>("POLYGON((1 2,1 1,2 1,2 2.25,3 2.25,3 0,0 0,0 3,3 3,2.75 2,1 2))", false);
+
+ // Self touching at a point
+ test_self_touches<polygon>("POLYGON((0 0,0 3,2 3,2 2,1 2,1 1,2 1,2 2,3 2,3 0,0 0))", true);
+
+ // Self touching at a segment
+ test_self_touches<polygon>("POLYGON((0 0,0 3,2 3,2 2,1 2,1 1,2 1,2 2.5,3 2.5,3 0,0 0))", true);
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/touches/touches_sph.cpp b/src/boost/libs/geometry/test/algorithms/touches/touches_sph.cpp
new file mode 100644
index 000000000..352a9bff1
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/touches/touches_sph.cpp
@@ -0,0 +1,239 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_touches.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ false);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ false);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ false);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ false);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ false);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ false);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ false);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ false);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ true);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ true);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ true);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ true);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ false);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ false);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ true);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ true);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ true);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ true);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ false);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ false);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ false);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ false);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ false);
+}
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::polygon<P> ring;
+
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ false);
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ true);
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ false);
+
+ test_geometry<mls, ring>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ false);
+
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ true);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ true);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", false);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false);
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ false);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/transform.cpp b/src/boost/libs/geometry/test/algorithms/transform.cpp
new file mode 100644
index 000000000..68811cf80
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/transform.cpp
@@ -0,0 +1,165 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <sstream>
+
+#include <boost/typeof/typeof.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/transform.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <test_common/test_point.hpp>
+
+template <typename Geometry1, typename Geometry2>
+void check_transform(Geometry1 const& geometry1,
+ Geometry2 const& expected)
+{
+ Geometry2 geometry2;
+ BOOST_CHECK(bg::transform(geometry1, geometry2));
+
+ std::ostringstream result_wkt, expected_wkt;
+ result_wkt << bg::wkt(geometry2);
+ expected_wkt << bg::wkt(expected);
+ BOOST_CHECK_EQUAL(result_wkt.str(), expected_wkt.str());
+}
+
+template <typename P1, typename P2, typename Value>
+void test_transform_point(Value value)
+{
+ P1 p1;
+ bg::set<0>(p1, 1);
+ bg::set<1>(p1, 2);
+ boost::variant<P1> v(p1);
+
+ P2 expected;
+ bg::assign(expected, p1);
+ bg::multiply_value(expected, value);
+
+ check_transform(p1, expected);
+ check_transform(v, expected);
+}
+
+template <typename P1, typename P2, typename Value>
+void test_transform_linestring(Value value)
+{
+ typedef bg::model::linestring<P1> line1_type;
+ typedef bg::model::linestring<P2> line2_type;
+
+ line1_type line1;
+ line1.push_back(bg::make<P1>(1, 1));
+ line1.push_back(bg::make<P1>(2, 2));
+ boost::variant<line1_type> v(line1);
+
+ line2_type expected;
+ for (BOOST_AUTO(p, line1.begin()); p != line1.end(); ++p)
+ {
+ P2 new_point;
+ bg::assign(new_point, *p);
+ bg::multiply_value(new_point, value);
+ expected.push_back(new_point);
+ }
+
+ check_transform(line1, expected);
+ check_transform(v, expected);
+}
+
+
+template <typename P1, typename P2, typename Value>
+void test_all(Value value)
+{
+ test_transform_point<P1, P2>(value);
+ test_transform_linestring<P1, P2>(value);
+}
+
+template <typename T, typename DegreeOrRadian>
+void test_transformations(double phi, double theta, double r)
+{
+ typedef bg::model::point<T, 3, bg::cs::cartesian> cartesian_type;
+ cartesian_type p;
+
+ // 1: using spherical coordinates
+ {
+ typedef bg::model::point<T, 3, bg::cs::spherical<DegreeOrRadian> > spherical_type;
+ spherical_type sph1;
+ assign_values(sph1, phi, theta, r);
+ BOOST_CHECK(transform(sph1, p));
+
+ spherical_type sph2;
+ BOOST_CHECK(transform(p, sph2));
+
+ BOOST_CHECK_CLOSE(bg::get<0>(sph1), bg::get<0>(sph2), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(sph1), bg::get<1>(sph2), 0.001);
+ }
+
+ // 2: using spherical coordinates on unit sphere
+ {
+ typedef bg::model::point<T, 2, bg::cs::spherical<DegreeOrRadian> > spherical_type;
+ spherical_type sph1, sph2;
+ assign_values(sph1, phi, theta);
+ BOOST_CHECK(transform(sph1, p));
+ BOOST_CHECK(transform(p, sph2));
+
+ BOOST_CHECK_CLOSE(bg::get<0>(sph1), bg::get<0>(sph2), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(sph1), bg::get<1>(sph2), 0.001);
+ }
+}
+
+int test_main(int, char* [])
+{
+ typedef bg::model::d2::point_xy<double > P;
+ test_all<P, P>(1.0);
+ test_all<bg::model::d2::point_xy<int>, bg::model::d2::point_xy<float> >(1.0);
+
+ test_all<bg::model::point<double, 2, bg::cs::spherical<bg::degree> >,
+ bg::model::point<double, 2, bg::cs::spherical<bg::radian> > >(bg::math::d2r<double>());
+ test_all<bg::model::point<double, 2, bg::cs::spherical<bg::radian> >,
+ bg::model::point<double, 2, bg::cs::spherical<bg::degree> > >(bg::math::r2d<double>());
+
+ test_all<bg::model::point<int, 2, bg::cs::spherical<bg::degree> >,
+ bg::model::point<float, 2, bg::cs::spherical<bg::radian> > >(bg::math::d2r<float>());
+
+ test_transformations<float, bg::degree>(4, 52, 1);
+ test_transformations<double, bg::degree>(4, 52, 1);
+
+ test_transformations
+ <
+ float, bg::radian
+ >(3 * bg::math::d2r<float>(), 51 * bg::math::d2r<float>(), 1);
+
+ test_transformations
+ <
+ double, bg::radian
+ >(3 * bg::math::d2r<double>(), 51 * bg::math::d2r<double>(), 1);
+
+#if defined(HAVE_TTMATH)
+ typedef bg::model::d2::point_xy<ttmath_big > PT;
+ test_all<PT, PT>();
+ test_transformations<ttmath_big, bg::degree>(4, 52, 1);
+ test_transformations
+ <
+ ttmath_big, bg::radian
+ >(3 * bg::math::d2r<ttmath_big>(), 51 * bg::math::d2r<ttmath_big>(), 1);
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/transform_multi.cpp b/src/boost/libs/geometry/test/algorithms/transform_multi.cpp
new file mode 100644
index 000000000..66cb8ba6e
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/transform_multi.cpp
@@ -0,0 +1,91 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/transform.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+// This test is a little different from transform.cpp test.
+// This test explicitly tests all geometries, including multi*
+// while the transform.cpp tests various strategies.
+
+template <typename Geometry>
+void test_transform(std::string const& wkt, std::string const& expected)
+{
+ typedef typename bg::coordinate_type<Geometry>::type coordinate_type;
+ const std::size_t dim = bg::dimension<Geometry>::value;
+
+ Geometry geometry_in, geometry_out;
+ bg::read_wkt(wkt, geometry_in);
+ bg::transform(geometry_in, geometry_out,
+ bg::strategy::transform::scale_transformer<coordinate_type, dim, dim>(2, 2));
+ std::ostringstream detected;
+ detected << bg::wkt(geometry_out);
+ BOOST_CHECK_EQUAL(detected.str(), expected);
+}
+
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::d2::point_xy<T> P;
+
+ test_transform<P>(
+ "POINT(1 1)",
+ "POINT(2 2)");
+ test_transform<bg::model::linestring<P> >(
+ "LINESTRING(1 1,2 2)",
+ "LINESTRING(2 2,4 4)");
+ test_transform<bg::model::segment<P> >(
+ "LINESTRING(1 1,2 2)",
+ "LINESTRING(2 2,4 4)");
+ test_transform<bg::model::ring<P> >(
+ "POLYGON((0 0,0 1,1 0,0 0))",
+ "POLYGON((0 0,0 2,2 0,0 0))");
+ test_transform<bg::model::polygon<P> >(
+ "POLYGON((0 0,0 1,1 0,0 0))",
+ "POLYGON((0 0,0 2,2 0,0 0))");
+ test_transform<bg::model::box<P> >(
+ "POLYGON((0 0,0 1,1 1,1 0,0 0))",
+ "POLYGON((0 0,0 2,2 2,2 0,0 0))");
+ test_transform<bg::model::multi_point<P> >(
+ "MULTIPOINT((1 1),(2 2))",
+ "MULTIPOINT((2 2),(4 4))");
+ test_transform<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((1 1,2 2))",
+ "MULTILINESTRING((2 2,4 4))");
+ test_transform<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 2,2 0,0 0)))");
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+
+#ifdef HAVE_TTMATH
+ test_all<ttmath_big>();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/unique.cpp b/src/boost/libs/geometry/test/algorithms/unique.cpp
new file mode 100644
index 000000000..4460029eb
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/unique.cpp
@@ -0,0 +1,60 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithms/test_unique.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+
+template <typename Point>
+void test_all()
+{
+ test_geometry<bg::model::linestring<Point> >(
+ "LINESTRING(0 0,1 1)",
+ "LINESTRING(0 0,1 1)");
+
+ test_geometry<bg::model::linestring<Point> >(
+ "LINESTRING(0 0,1 1,1 1)",
+ "LINESTRING(0 0,1 1)");
+
+ test_geometry<bg::model::linestring<Point> >(
+ "LINESTRING(0 0,0 0,1 1)",
+ "LINESTRING(0 0,1 1)");
+
+ // Consecutive points
+ test_geometry<bg::model::linestring<Point> >(
+ "LINESTRING(0 0,0 0,0 0,0 0,1 1,1 1,1 1)",
+ "LINESTRING(0 0,1 1)");
+
+ // Other types
+ test_geometry<bg::model::ring<Point> >(
+ "POLYGON((0 0,0 1,1 1,1 1,1 1,1 0,0 0,0 0))",
+ "POLYGON((0 0,0 1,1 1,1 0,0 0))");
+
+ // With holes
+ test_geometry<bg::model::polygon<Point> >(
+ "POLYGON((0 0,0 10,10 10,10 10,10 10,10 0,0 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))");
+}
+
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/unique_multi.cpp b/src/boost/libs/geometry/test/algorithms/unique_multi.cpp
new file mode 100644
index 000000000..9061d7ef3
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/unique_multi.cpp
@@ -0,0 +1,52 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/unique.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <algorithms/test_unique.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // Multi point, should happen nothing, even if there are duplicate points
+ test_geometry<bg::model::multi_point<P> >(
+ "MULTIPOINT((0 0),(0 0),(1 1))",
+ "MULTIPOINT((0 0),(0 0),(1 1))");
+
+ test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING((0 0,1 1,1 1),(3 3,3 3,4 4))",
+ "MULTILINESTRING((0 0,1 1),(3 3,4 4))");
+
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+ test_geometry<mp>(
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 1,1 1,1 0,0 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))");
+
+ // With holes
+ test_geometry<mp>(
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 10,10 10,10 0,0 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))");
+
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/Jamfile b/src/boost/libs/geometry/test/algorithms/within/Jamfile
new file mode 100644
index 000000000..b3b788a04
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/Jamfile
@@ -0,0 +1,27 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2016.
+# Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-algorithms-within
+ :
+ [ run within.cpp : : : : algorithms_within ]
+ [ run within_areal_areal.cpp : : : : algorithms_within_areal_areal ]
+ [ run within_linear_areal.cpp : : : : algorithms_within_linear_areal ]
+ [ run within_linear_linear.cpp : : : : algorithms_within_linear_linear ]
+ [ run within_multi.cpp : : : : algorithms_within_multi ]
+ [ run within_pointlike_geometry.cpp : : : : algorithms_within_pointlike_geometry ]
+ [ run within_sph.cpp : : : : algorithms_within_sph ]
+ [ run within_sph_geo.cpp : : : : algorithms_within_sph_geo ]
+ ;
diff --git a/src/boost/libs/geometry/test/algorithms/within/test_within.hpp b/src/boost/libs/geometry/test/algorithms/within/test_within.hpp
new file mode 100644
index 000000000..f4df47527
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/test_within.hpp
@@ -0,0 +1,163 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015, 2017, 2019.
+// Modifications copyright (c) 2014-2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_WITHIN_HPP
+#define BOOST_GEOMETRY_TEST_WITHIN_HPP
+
+
+#include <boost/variant/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_within(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::within(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_within(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::within(geometry1, geometry2);
+}
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+void check_geometry(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ std::string const& wkt1,
+ std::string const& wkt2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_within(geometry1, geometry2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "within: " << wkt1
+ << " in " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+
+template <typename Geometry1, typename Geometry2>
+void test_geometry(std::string const& wkt1,
+ std::string const& wkt2, bool expected)
+{
+ Geometry1 geometry1;
+ Geometry2 geometry2;
+ bg::read_wkt(wkt1, geometry1);
+ bg::read_wkt(wkt2, geometry2);
+ boost::variant<Geometry1> v1(geometry1);
+ boost::variant<Geometry2> v2(geometry2);
+
+ typedef typename bg::strategy::within::services::default_strategy
+ <
+ Geometry1, Geometry2
+ >::type strategy_type;
+
+ check_geometry(geometry1, geometry2, wkt1, wkt2, expected, strategy_type());
+ check_geometry(geometry1, geometry2, wkt1, wkt2, expected, no_strategy());
+ check_geometry(v1, geometry2, wkt1, wkt2, expected, no_strategy());
+ check_geometry(geometry1, v2, wkt1, wkt2, expected, no_strategy());
+ check_geometry(v1, v2, wkt1, wkt2, expected, no_strategy());
+}
+
+template <typename Point, bool Clockwise, bool Closed>
+void test_ordered_ring(std::string const& wkt_point,
+ std::string const& wkt_geometry, bool expected, bool on_border)
+{
+ typedef bg::model::ring<Point, Clockwise, Closed> ring_type;
+ ring_type ring;
+ Point point;
+
+ bg::read_wkt(wkt_geometry, ring);
+ if ( BOOST_GEOMETRY_CONDITION(! Clockwise) )
+ {
+ std::reverse(boost::begin(ring), boost::end(ring));
+ }
+
+ bg::read_wkt(wkt_point, point);
+
+ bool detected = bg::within(point, ring);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "within: " << wkt_point
+ << " in " << wkt_geometry
+ << " -> Expected: " << expected
+ << " detected: " << detected
+ << " clockwise: " << int(Clockwise)
+ << " closed: " << int(Closed)
+ );
+
+ // other strategy (note that this one cannot detect OnBorder
+ // (without modifications)
+
+ bg::strategy::within::franklin<Point> franklin;
+ detected = bg::within(point, ring, franklin);
+ if (! on_border)
+ {
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "within: " << wkt_point
+ << " in " << wkt_geometry
+ << " -> Expected: " << expected
+ << " detected: " << detected
+ << " clockwise: " << int(Clockwise)
+ << " closed: " << int(Closed)
+ );
+ }
+
+
+ bg::strategy::within::crossings_multiply<Point> cm;
+ detected = bg::within(point, ring, cm);
+ if (! on_border)
+ {
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "within: " << wkt_point
+ << " in " << wkt_geometry
+ << " -> Expected: " << expected
+ << " detected: " << detected
+ << " clockwise: " << int(Clockwise)
+ << " closed: " << int(Closed)
+ );
+ }
+}
+
+template <typename Point>
+void test_ring(std::string const& wkt_point,
+ std::string const& wkt_geometry,
+ bool expected, bool on_border)
+{
+ test_ordered_ring<Point, true, true>(wkt_point, wkt_geometry, expected, on_border);
+ test_ordered_ring<Point, false, true>(wkt_point, wkt_geometry, expected, on_border);
+ test_ordered_ring<Point, true, false>(wkt_point, wkt_geometry, expected, on_border);
+ test_ordered_ring<Point, false, false>(wkt_point, wkt_geometry, expected, on_border);
+ test_geometry<Point, bg::model::polygon<Point> >(wkt_point, wkt_geometry, expected);
+}
+
+#endif
diff --git a/src/boost/libs/geometry/test/algorithms/within/within.cpp b/src/boost/libs/geometry/test/algorithms/within/within.cpp
new file mode 100644
index 000000000..b095d1752
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within.cpp
@@ -0,0 +1,152 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015, 2016, 2018.
+// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_within.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+template <typename P1, typename P2>
+void test_point_box()
+{
+ typedef bg::model::box<P1> box_type1;
+ typedef bg::model::box<P2> box_type2;
+
+ test_geometry<P1, box_type2>("POINT(1 1)", "BOX(0 0,2 2)", true);
+ test_geometry<P1, box_type2>("POINT(0 0)", "BOX(0 0,2 2)", false);
+ test_geometry<P1, box_type2>("POINT(2 2)", "BOX(0 0,2 2)", false);
+ test_geometry<P1, box_type2>("POINT(0 1)", "BOX(0 0,2 2)", false);
+ test_geometry<P1, box_type2>("POINT(1 0)", "BOX(0 0,2 2)", false);
+
+ test_geometry<P1, box_type2>("POINT(3 3)", "BOX(1 1,4 4)", true);
+ test_geometry<P2, box_type1>("POINT(3 3)", "BOX(0 0,5 5)", true);
+
+ test_geometry<box_type1, box_type2>("BOX(1 1,2 2)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type1, box_type2>("BOX(0 0,3 3)", "BOX(1 1,2 2)", false);
+
+ test_geometry<box_type1, box_type2>("BOX(1 1,3 3)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type1, box_type2>("BOX(3 1,3 3)", "BOX(0 0,3 3)", false);
+
+ test_geometry<box_type1, box_type2>("BOX(1 1,4 4)", "BOX(0 0,5 5)", true);
+ test_geometry<box_type2, box_type1>("BOX(0 0,5 5)", "BOX(1 1,4 4)", false);
+
+ /*
+ test_within_code<P, box_type>("POINT(1 1)", "BOX(0 0,2 2)", 1);
+ test_within_code<P, box_type>("POINT(1 0)", "BOX(0 0,2 2)", 0);
+ test_within_code<P, box_type>("POINT(0 1)", "BOX(0 0,2 2)", 0);
+ test_within_code<P, box_type>("POINT(0 3)", "BOX(0 0,2 2)", -1);
+ test_within_code<P, box_type>("POINT(3 3)", "BOX(0 0,2 2)", -1);
+
+ test_within_code<box_type, box_type>("BOX(1 1,2 2)", "BOX(0 0,3 3)", 1);
+ test_within_code<box_type, box_type>("BOX(0 1,2 2)", "BOX(0 0,3 3)", 0);
+ test_within_code<box_type, box_type>("BOX(1 0,2 2)", "BOX(0 0,3 3)", 0);
+ test_within_code<box_type, box_type>("BOX(1 1,2 3)", "BOX(0 0,3 3)", 0);
+ test_within_code<box_type, box_type>("BOX(1 1,3 2)", "BOX(0 0,3 3)", 0);
+ test_within_code<box_type, box_type>("BOX(1 1,3 4)", "BOX(0 0,3 3)", -1);
+ */
+}
+
+void test_point_box_3d()
+{
+ typedef boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> point_type;
+ typedef boost::geometry::model::box<point_type> box_type;
+ box_type box(point_type(0, 0, 0), point_type(4, 4, 4));
+ BOOST_CHECK_EQUAL(bg::within(point_type(2, 2, 2), box), true);
+ BOOST_CHECK_EQUAL(bg::within(point_type(2, 4, 2), box), false);
+ BOOST_CHECK_EQUAL(bg::within(point_type(2, 2, 4), box), false);
+ BOOST_CHECK_EQUAL(bg::within(point_type(2, 2, 5), box), false);
+
+ box_type box2(point_type(2, 2, 2), point_type(3, 3, 3));
+ BOOST_CHECK_EQUAL(bg::within(box2, box), true);
+
+}
+
+template <typename P1, typename P2>
+void test_point_poly()
+{
+ typedef boost::geometry::model::polygon<P1> poly1;
+ typedef boost::geometry::model::polygon<P2> poly2;
+
+ test_geometry<P1, poly2>("POINT(3 3)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<P2, poly1>("POINT(3 3)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ test_point_box<P1, P2>();
+ test_point_poly<P1, P2>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+void test_strategy()
+{
+ // Test by explicitly specifying a strategy
+ typedef bg::model::d2::point_xy<double> point_type;
+ typedef bg::model::box<point_type> box_type;
+ point_type p(3, 3);
+ box_type b(point_type(0, 0), point_type(5, 5));
+ box_type b0(point_type(0, 0), point_type(5, 0));
+
+ bool r = bg::within(p, b,
+ bg::strategy::within::cartesian_point_box());
+ BOOST_CHECK_EQUAL(r, true);
+
+ r = bg::within(b, b,
+ bg::strategy::within::box_in_box<box_type, box_type>());
+ BOOST_CHECK_EQUAL(r, true);
+
+ r = bg::within(b0, b0,
+ bg::strategy::within::box_in_box<box_type, box_type>());
+ BOOST_CHECK_EQUAL(r, false);
+
+ r = bg::within(p, b,
+ bg::strategy::within::point_in_box_by_side<>());
+ BOOST_CHECK_EQUAL(r, true);
+}
+
+
+int test_main( int , char* [] )
+{
+ typedef boost::geometry::model::d2::point_xy<double> xyd;
+ typedef boost::geometry::model::d2::point_xy<float> xyf;
+ typedef boost::geometry::model::d2::point_xy<int> xyi;
+ typedef boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> p2d;
+
+ test_all<xyd, p2d>();
+ test_all<xyf, p2d>();
+ test_all<xyi, xyd>();
+
+ test_all<xyi>();
+ test_all<xyd>();
+
+ test_point_box_3d();
+ test_strategy();
+
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_areal_areal.cpp b/src/boost/libs/geometry/test/algorithms/within/within_areal_areal.cpp
new file mode 100644
index 000000000..625be46d8
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_areal_areal.cpp
@@ -0,0 +1,105 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015, 2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_within.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+template <typename P1, typename P2>
+void test_a_a()
+{
+ typedef bg::model::polygon<P1> poly1;
+ typedef bg::model::ring<P1> ring1;
+ typedef bg::model::multi_polygon<poly1> mpoly1;
+ typedef bg::model::polygon<P2> poly2;
+ typedef bg::model::ring<P2> ring2;
+ typedef bg::model::multi_polygon<poly2> mpoly2;
+
+ test_geometry<ring1, ring2>("POLYGON((0 0,0 2,2 2,2 0,0 0))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<ring1, poly2>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ test_geometry<poly1, ring2>("POLYGON((0 0,0 6,6 6,6 0,0 0))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+
+ test_geometry<poly1, poly2>("POLYGON((0 0,0 9,9 9,9 0,0 0),(3 3,6 3,6 6,3 6,3 3))",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(3 3,6 3,6 6,3 6,3 3))", true);
+ test_geometry<poly1, poly2>("POLYGON((0 0,0 9,9 9,9 0,0 0),(3 3,6 3,6 6,3 6,3 3))",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(4 4,5 4,5 5,4 5,4 4))", true);
+ test_geometry<poly1, poly2>("POLYGON((1 1,1 8,8 8,8 1,1 1),(3 3,6 3,6 6,3 6,3 3))",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(3 3,6 3,6 6,3 6,3 3))", true);
+ test_geometry<poly1, poly2>("POLYGON((1 1,1 8,8 8,8 1,1 1),(3 3,6 3,6 6,3 6,3 3))",
+ "POLYGON((0 0,0 9,9 9,9 0,0 0),(4 4,5 4,5 5,4 5,4 4))", true);
+
+ test_geometry<ring1, mpoly2>("POLYGON((0 0,0 2,2 2,2 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))", true);
+ test_geometry<poly1, mpoly2>("POLYGON((0 0,0 2,2 2,2 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))", true);
+
+ test_geometry<mpoly1, ring2>("MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<mpoly1, poly2>("MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((15 15,15 110,110 110,110 15,15 15)))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_geometry<mpoly1, poly2>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((3 3,3 4,4 3,3 3)))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(3 3,4 3,4 4,3 4,3 3))", false);
+
+ test_geometry<mpoly1, mpoly2>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((3 3,3 4,4 3,3 3)))",
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((3 3,3 4,4 3,3 3)))", true);
+ test_geometry<mpoly1, mpoly2>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((3 3,3 4,4 3,3 3)))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))", true);
+ test_geometry<mpoly1, mpoly2>("MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))",
+ "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((3 3,3 4,4 3,3 3)))", false);
+
+ // https://svn.boost.org/trac/boost/ticket/10912
+ test_geometry<poly1, poly2>("POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2),(6 6,8 6,8 8,6 8,6 6))",
+ false);
+ test_geometry<poly1, poly2>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2))",
+ false);
+
+ test_geometry<poly1, mpoly2>("POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ true);
+ test_geometry<poly1, mpoly2>("POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))",
+ true);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ test_a_a<P1, P2>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_a_a<P, P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::d2::point_xy<double>, bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_linear_areal.cpp b/src/boost/libs/geometry/test/algorithms/within/within_linear_areal.cpp
new file mode 100644
index 000000000..63bb0028a
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_linear_areal.cpp
@@ -0,0 +1,127 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015, 2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_within.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+template <typename P1, typename P2>
+void test_l_a()
+{
+ typedef bg::model::linestring<P1> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P2> poly;
+ typedef bg::model::ring<P2> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ // B,I
+ test_geometry<ls, ring>("LINESTRING(0 0, 2 2)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+
+ // B,I
+ test_geometry<ls, poly>("LINESTRING(0 0, 2 2)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ // I
+ test_geometry<ls, poly>("LINESTRING(1 1, 2 2)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ // I,E
+ test_geometry<ls, poly>("LINESTRING(1 1, 6 6)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+ // B
+ test_geometry<ls, poly>("LINESTRING(0 0, 5 0)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(0 0, 0 5)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+ // E
+ test_geometry<ls, poly>("LINESTRING(6 0, 6 5)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+
+ // BIBIB
+ test_geometry<ls, mpoly>("LINESTRING(0 0, 10 10)", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))", true);
+ // BIBEBIB
+ test_geometry<ls, mpoly>("LINESTRING(0 0, 10 10)", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((6 6,5 10,10 10,10 5,6 6)))", false);
+
+ // MySQL report 18.12.2014 (https://svn.boost.org/trac/boost/ticket/10887)
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 2)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 5)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+ // MySQL report 18.12.2014 - extended
+ test_geometry<ls, mpoly>("LINESTRING(5 -2,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)),((5 0,7 1,7 -1,5 0)))",
+ true);
+ test_geometry<ls, mpoly>("LINESTRING(0 0,5 0)",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)),((5 0,7 1,7 -1,5 0)))",
+ false);
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,0 1,5 0),(0 0,0 -1,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,0 1,5 0),(0 -1,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,5 0),(5 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,5 0),(0 0,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ false);
+
+ // BI
+ test_geometry<mls, poly>("MULTILINESTRING((0 0,2 2),(2 2,3 3))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
+ // I E
+ test_geometry<mls, poly>("MULTILINESTRING((1 1,2 2),(6 6,7 7))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
+
+ // I I
+ test_geometry<mls, mpoly>("MULTILINESTRING((1 1,5 5),(6 6,7 7))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))",
+ true);
+ // I E
+ test_geometry<mls, mpoly>("MULTILINESTRING((1 1,5 5),(11 11,12 12))",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))",
+ false);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ test_l_a<P1, P2>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_l_a<P, P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::d2::point_xy<double>, bg::model::point<double, 2, bg::cs::cartesian> >();
+
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_linear_linear.cpp b/src/boost/libs/geometry/test/algorithms/within/within_linear_linear.cpp
new file mode 100644
index 000000000..c4d7d348d
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_linear_linear.cpp
@@ -0,0 +1,108 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015, 2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "test_within.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+
+template <typename P1, typename P2>
+void test_l_l()
+{
+ typedef bg::model::linestring<P1> ls1;
+ typedef bg::model::multi_linestring<ls1> mls1;
+ typedef bg::model::linestring<P2> ls2;
+ typedef bg::model::multi_linestring<ls2> mls2;
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true);
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(3 2, 2 2, 1 1, 0 0)", "LINESTRING(0 0, 2 2, 3 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(0 0, 1 1, 2 2, 3 2)", "LINESTRING(3 2, 2 2, 0 0)", true);
+ test_geometry<ls1, ls2>("LINESTRING(3 2, 2 2, 1 1, 0 0)", "LINESTRING(3 2, 2 2, 0 0)", true);
+
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(3 2, 2 2, 1 1)", "LINESTRING(0 0, 2 2, 4 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 3 2)", "LINESTRING(4 2, 2 2, 0 0)", true);
+ test_geometry<ls1, ls2>("LINESTRING(3 2, 2 2, 1 1)", "LINESTRING(4 2, 2 2, 0 0)", true);
+
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 3 3)", "LINESTRING(0 0, 2 2, 4 2)", false);
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 3 2, 3 3)", "LINESTRING(0 0, 2 2, 4 2)", false);
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 3 1)", "LINESTRING(0 0, 2 2, 4 2)", false);
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 3 2, 3 1)", "LINESTRING(0 0, 2 2, 4 2)", false);
+
+ test_geometry<ls1, ls2>("LINESTRING(0 1, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+ test_geometry<ls1, ls2>("LINESTRING(0 1, 0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+ test_geometry<ls1, ls2>("LINESTRING(1 0, 1 1, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+ test_geometry<ls1, ls2>("LINESTRING(1 0, 0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 4 2)", false);
+
+ // duplicated points
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 2 2, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", true);
+ test_geometry<ls1, ls2>("LINESTRING(1 1, 1 1, 2 2)", "LINESTRING(0 0, 2 2, 4 2)", true);
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0, 0 0, 0 0, 1 1, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 2 2, 3 3)",
+ "LINESTRING(0 0, 2 2, 4 4)", true);
+
+ // invalid linestrings
+// test_geometry<ls1, ls2>("LINESTRING(0 0)", "LINESTRING(0 0)", false);
+// test_geometry<ls1, ls2>("LINESTRING(1 1)", "LINESTRING(0 0, 2 2)", true);
+// test_geometry<ls1, ls2>("LINESTRING(0 0)", "LINESTRING(0 0, 2 2)", false);
+// test_geometry<ls1, ls2>("LINESTRING(0 0, 1 1)", "LINESTRING(0 0)", false);
+
+ // spikes
+ // FOR NOW DISABLED
+
+ /*test_geometry<ls1, ls2>("LINESTRING(0 0,5 0,3 0,6 0)", "LINESTRING(0 0,6 0)", true);
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,3 3,6 3)", true);
+ test_geometry<ls1, ls2>("LINESTRING(0 0,3 3,6 3)", "LINESTRING(0 0,2 2,3 3,1 1)", false);
+ test_geometry<ls1, ls2>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)", true);
+ test_geometry<ls1, ls2>("LINESTRING(0 0,4 4,6 3)", "LINESTRING(0 0,2 2,3 3,1 1)", false);
+
+ test_geometry<ls1, ls2>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(0 0,3 3,6 3)", false);*/
+
+ test_geometry<ls1, mls2>("LINESTRING(1 1, 2 2)", "MULTILINESTRING((0 0, 2 2),(3 3, 4 4))", true);
+
+ test_geometry<mls1, ls2>("MULTILINESTRING((0 0, 2 2),(3 3, 4 4))", "LINESTRING(0 0, 5 5)", true);
+
+ test_geometry<mls1, mls2>("MULTILINESTRING((1 1, 2 2),(3 3, 4 4))", "MULTILINESTRING((1 1, 2 2),(2 2, 5 5))", true);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ test_l_l<P1, P2>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_l_l<P, P>();
+}
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::d2::point_xy<double>, bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_multi.cpp b/src/boost/libs/geometry/test/algorithms/within/within_multi.cpp
new file mode 100644
index 000000000..b41529cc0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_multi.cpp
@@ -0,0 +1,54 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include "test_within.hpp"
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
+
+ // test multi-with-one-polygon (trivial case)
+ test_geometry<P, mp>("POINT(1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", true);
+ test_geometry<P, mp>("POINT(3 3)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
+ test_geometry<P, mp>("POINT(0 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
+ test_geometry<P, mp>("POINT(4 4)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
+
+ // test if it is in one of them
+ std::string multi("MULTIPOLYGON("
+ "((0 0,0 2,2 2,2 0,0 0))"
+ "((3 3,3 6,6 6,6 3,3 3))"
+ ")");
+ test_geometry<P, mp>("POINT(4 4)", multi, true);
+ test_geometry<P, mp>("POINT(1 1)", multi, true);
+ test_geometry<P, mp>("POINT(0 1)", multi, false);
+}
+
+int test_main( int , char* [] )
+{
+ //test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_pointlike_geometry.cpp b/src/boost/libs/geometry/test/algorithms/within/within_pointlike_geometry.cpp
new file mode 100644
index 000000000..523e183c0
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_pointlike_geometry.cpp
@@ -0,0 +1,462 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2014, 2015, 2016, 2017.
+// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_within.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+
+template <typename P>
+void test_p_p()
+{
+ typedef bg::model::multi_point<P> mpt;
+
+ test_geometry<P, P>("POINT(0 0)", "POINT(0 0)", true);
+ test_geometry<P, P>("POINT(0 0)", "POINT(1 1)", false);
+
+ test_geometry<P, mpt>("POINT(0 0)", "MULTIPOINT(0 0, 1 1)", true);
+ test_geometry<P, mpt>("POINT(0 0)", "MULTIPOINT(1 1, 2 2)", false);
+
+ test_geometry<mpt, P>("MULTIPOINT(0 0)", "POINT(0 0)", true);
+ test_geometry<mpt, P>("MULTIPOINT(0 0, 1 1)", "POINT(0 0)", false);
+ test_geometry<mpt, P>("MULTIPOINT(0 0, 1 1)", "POINT(2 2)", false);
+
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0)", "MULTIPOINT(0 0, 1 1)", true);
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 1)", "MULTIPOINT(0 0, 1 1)", true);
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 1)", "MULTIPOINT(0 0)", false);
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 1)", "MULTIPOINT(1 1, 2 2)", false);
+ test_geometry<mpt, mpt>("MULTIPOINT(0 0, 1 1)", "MULTIPOINT(2 2, 3 4)", false);
+}
+
+template <typename P>
+void test_p_l()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::segment<P> seg;
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<P, seg>("POINT(1 1)", "LINESTRING(0 0, 2 2)", true);
+ test_geometry<P, seg>("POINT(0 0)", "LINESTRING(0 0, 1 1)", false);
+ test_geometry<P, seg>("POINT(1 0)", "LINESTRING(0 0, 1 1)", false);
+
+ test_geometry<P, ls>("POINT(0 0)", "LINESTRING(0 0,1 1,2 2)", false);
+ test_geometry<P, ls>("POINT(3 3)", "LINESTRING(0 0,1 1,2 2)", false);
+ test_geometry<P, ls>("POINT(1 1)", "LINESTRING(0 0,2 2,3 3)", true);
+
+ test_geometry<P, ls>("POINT(1 1)", "LINESTRING(0 0, 2 2)", true);
+ test_geometry<P, ls>("POINT(0 0)", "LINESTRING(0 0, 1 1)", false);
+
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0,1 1,2 2),(0 0,0 1))", true);
+ test_geometry<P, mls>("POINT(0 0)", "MULTILINESTRING((0 0,1 1,2 2),(0 0,0 1),(0 0,1 0))", false);
+
+ test_geometry<P, mls>("POINT(1 1)", "MULTILINESTRING((0 0, 1 1),(1 1, 2 2))", true);
+ test_geometry<P, mls>("POINT(1 1)", "MULTILINESTRING((0 0, 1 1),(2 2, 3 3))", false);
+
+ test_geometry<mpt, seg>("MULTIPOINT(0 0, 1 1)", "LINESTRING(0 0, 2 2)", true);
+
+ test_geometry<mpt, ls>("MULTIPOINT(0 0, 2 2)", "LINESTRING(0 0, 2 2)", false);
+ test_geometry<mpt, ls>("MULTIPOINT(1 1, 3 3)", "LINESTRING(0 0, 2 2)", false);
+
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 1 1)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", true);
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 2 2)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", true);
+ test_geometry<mpt, mls>("MULTIPOINT(0 0, 3 3)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", false);
+ test_geometry<mpt, mls>("MULTIPOINT(1 1, 4 4)", "MULTILINESTRING((0 0, 2 2),(2 2, 3 3))", false);
+}
+
+template <typename P>
+void test_p_a()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ // trivial case
+ test_ring<P>("POINT(1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true, false);
+
+ // on border/corner
+ test_ring<P>("POINT(0 0)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false, true);
+ test_ring<P>("POINT(0 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false, true);
+
+ // aligned to segment/vertex
+ test_ring<P>("POINT(1 1)", "POLYGON((0 0,0 3,3 3,3 1,2 1,2 0,0 0))", true, false);
+ test_ring<P>("POINT(1 1)", "POLYGON((0 0,0 3,4 3,3 1,2 2,2 0,0 0))", true, false);
+
+ // same polygon, but point on border
+ test_ring<P>("POINT(3 3)", "POLYGON((0 0,0 3,3 3,3 1,2 1,2 0,0 0))", false, true);
+ test_ring<P>("POINT(3 3)", "POLYGON((0 0,0 3,4 3,3 1,2 2,2 0,0 0))", false, true);
+
+ // holes
+ test_geometry<P, poly>("POINT(2 2)",
+ "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,3 1,3 3,1 3,1 1))", false);
+
+ // Real-life problem (solved now), point is in the middle, 409623 is also a coordinate
+ // on the border, has been wrong in the past (2009)
+ test_ring<P>("POINT(146383 409623)",
+ "POLYGON((146351 410597,146521 410659,147906 410363,148088 410420"
+ ",148175 410296,148281 409750,148215 409623,148154 409666,148154 409666"
+ ",148130 409625,148035 409626,148035 409626,148008 409544,147963 409510"
+ ",147993 409457,147961 409352,147261 408687,147008 408586,145714 408840"
+ ",145001 409033,144486 409066,144616 409308,145023 410286,145254 410488"
+ ",145618 410612,145618 410612,146015 410565,146190 410545,146351 410597))",
+ true, false);
+
+ test_geometry<P, mpoly>("POINT(2 2)",
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0),(1 1,3 1,3 3,1 3,1 1)),((5 5,5 9,9 9,9 5,5 5)))", false);
+ test_geometry<P, mpoly>("POINT(1 1)",
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0),(1 1,3 1,3 3,1 3,1 1)),((5 5,5 9,9 9,9 5,5 5)))", false);
+ test_geometry<P, mpoly>("POINT(1 1)",
+ "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 2,4 2,4 4,2 4,2 2)),((5 5,5 9,9 9,9 5,5 5)))", true);
+ test_geometry<P, mpoly>("POINT(6 6)",
+ "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0),(1 1,3 1,3 3,1 3,1 1)),((5 5,5 9,9 9,9 5,5 5)))", true);
+
+ test_geometry<P, poly>("POINT(6 4)",
+ "POLYGON((0 5, 5 0, 6 1, 5 2, 8 4, 5 6, 6 7, 5 8, 6 9, 5 10, 0 5))", true);
+ test_geometry<P, poly>("POINT(4 6)",
+ "POLYGON((5 0, 0 5, 1 6, 2 5, 4 8, 6 5, 7 6, 8 5, 9 6, 10 5, 5 0))", true);
+
+ test_geometry<mpt, ring>("MULTIPOINT(0 0, 1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true);
+
+ test_geometry<mpt, poly>("MULTIPOINT(0 0, 2 2)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false);
+ test_geometry<mpt, poly>("MULTIPOINT(1 1, 3 3)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", false);
+
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", true);
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 2 2)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", false);
+ test_geometry<mpt, mpoly>("MULTIPOINT(0 0, 3 3)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", false);
+ test_geometry<mpt, mpoly>("MULTIPOINT(1 1, 4 4)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))", false);
+}
+
+template <typename P>
+void test_all()
+{
+ test_p_p<P>();
+ test_p_l<P>();
+ test_p_a<P>();
+}
+
+template <typename Point>
+void test_spherical_geographic()
+{
+ bg::model::polygon<Point> wrangel;
+
+ typename boost::mpl::if_
+ <
+ boost::is_same<typename bg::cs_tag<Point>::type, bg::geographic_tag>,
+ bg::strategy::within::geographic_winding<Point>,
+ bg::strategy::within::spherical_winding<Point>
+ >::type ws;
+
+ typename boost::mpl::if_
+ <
+ boost::is_same<typename bg::cs_tag<Point>::type, bg::geographic_tag>,
+ bg::strategy::side::geographic<>,
+ bg::strategy::side::spherical_side_formula<>
+ >::type ss;
+
+ boost::ignore_unused(ws, ss);
+
+ // SQL Server check (no geography::STWithin, so check with intersection trick)
+ /*
+
+ with q as (
+ select geography::STGeomFromText('POLYGON((-178.569 71.5641,-179.034 71.5977,-179.305 71.5514,-179.629 71.5772,-180 71.5358,179.53 71.4383,178.872 71.2175,178.618 71.0355,178.791 70.7964,179.273 70.8886,179.678 70.8955,-180 70.9972,-179.274 70.9078,-178.819 70.98,-177.939 71.0375,-177.62 71.1166,-177.439 71.2269,-177.503 71.2775,-177.833 71.3461,-178.018 71.4497,-178.569 71.5641))',4326) as wrangel
+ )
+
+ select wrangel.STArea()/1000000.0
+ ,geography::STGeomFromText('POINT(-179.3 71.27)',4326).STIntersection(wrangel).STAsText() as workaround_within_1
+ ,geography::STGeomFromText('POINT(-179.9 70.95)',4326).STIntersection(wrangel).STAsText() as workaround_within_2
+ ,geography::STGeomFromText('POINT(179.9 70.95)',4326).STIntersection(wrangel).STAsText() as workaround_within_3
+ from q
+
+ -> 7669.10402181435 POINT (-179.3 71.27) GEOMETRYCOLLECTION EMPTY GEOMETRYCOLLECTION EMPTY
+
+ PostGIS knows Within for Geography neither, and the intersection trick gives the same result
+
+ */
+
+ bg::read_wkt("POLYGON((-178.568604 71.564148,-178.017548 71.449692,-177.833313 71.3461,-177.502838 71.277466 ,-177.439453 71.226929,-177.620026 71.116638,-177.9389 71.037491,-178.8186 70.979965,-179.274445 70.907761,-180 70.9972,179.678314 70.895538,179.272766 70.888596,178.791016 70.7964,178.617737 71.035538,178.872192 71.217484,179.530273 71.4383 ,-180 71.535843 ,-179.628601 71.577194,-179.305298 71.551361,-179.03421 71.597748,-178.568604 71.564148))", wrangel);
+
+ bool within = bg::within(Point(-179.3, 71.27), wrangel);
+ BOOST_CHECK_EQUAL(within, true);
+
+ within = bg::within(Point(-179.9, 70.95), wrangel);
+ BOOST_CHECK_EQUAL(within, false);
+
+ within = bg::within(Point(179.9, 70.95), wrangel);
+ BOOST_CHECK_EQUAL(within, false);
+
+ // Test using great circle mapper
+ // http://www.gcmap.com/mapui?P=5E52N-9E53N-7E50N-5E52N,7E52.5N,8E51.5N,6E51N
+
+ bg::model::polygon<Point> triangle;
+ bg::read_wkt("POLYGON((5 52,9 53,7 50,5 52))", triangle);
+ BOOST_CHECK_EQUAL(bg::within(Point(7, 52.5), triangle, ws), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(8.0, 51.5), triangle, ws), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(6.0, 51.0), triangle, ws), false);
+
+ // northern hemisphere
+ {
+ bg::model::polygon<Point> poly_n;
+ bg::read_wkt("POLYGON((10 50,30 50,30 40,10 40, 10 50))", poly_n);
+ Point pt_n1(20, 50.00001);
+ Point pt_n2(20, 40.00001);
+ BOOST_CHECK_EQUAL(ss.apply(poly_n.outer()[0], poly_n.outer()[1], pt_n1), -1); // right of segment
+ BOOST_CHECK_EQUAL(ss.apply(poly_n.outer()[2], poly_n.outer()[3], pt_n2), 1); // left of segment
+ BOOST_CHECK_EQUAL(bg::within(pt_n1, poly_n, ws), true);
+ BOOST_CHECK_EQUAL(bg::within(pt_n2, poly_n, ws), false);
+ }
+ // southern hemisphere
+ {
+ bg::model::polygon<Point> poly_s;
+ bg::read_wkt("POLYGON((10 -40,30 -40,30 -50,10 -50, 10 -40))", poly_s);
+ Point pt_s1(20, -40.00001);
+ Point pt_s2(20, -50.00001);
+ BOOST_CHECK_EQUAL(ss.apply(poly_s.outer()[0], poly_s.outer()[1], pt_s1), 1); // left of segment
+ BOOST_CHECK_EQUAL(ss.apply(poly_s.outer()[2], poly_s.outer()[3], pt_s2), -1); // right of segment
+ BOOST_CHECK_EQUAL(bg::within(pt_s1, poly_s, ws), false);
+ BOOST_CHECK_EQUAL(bg::within(pt_s2, poly_s, ws), true);
+ }
+ // crossing antimeridian, northern hemisphere
+ {
+ bg::model::polygon<Point> poly_n;
+ bg::read_wkt("POLYGON((170 50,-170 50,-170 40,170 40, 170 50))", poly_n);
+ Point pt_n11(180, 50.00001);
+ Point pt_n12(-180, 50.00001);
+ Point pt_n13(179, 50.00001);
+ Point pt_n14(-179, 50.00001);
+ Point pt_n21(180, 40.00001);
+ Point pt_n22(-180, 40.00001);
+ Point pt_n23(179, 40.00001);
+ Point pt_n24(-179, 40.00001);
+ BOOST_CHECK_EQUAL(bg::within(pt_n11, poly_n, ws), true);
+ BOOST_CHECK_EQUAL(bg::within(pt_n12, poly_n, ws), true);
+ BOOST_CHECK_EQUAL(bg::within(pt_n13, poly_n, ws), true);
+ BOOST_CHECK_EQUAL(bg::within(pt_n14, poly_n, ws), true);
+ BOOST_CHECK_EQUAL(bg::within(pt_n21, poly_n, ws), false);
+ BOOST_CHECK_EQUAL(bg::within(pt_n22, poly_n, ws), false);
+ BOOST_CHECK_EQUAL(bg::within(pt_n23, poly_n, ws), false);
+ BOOST_CHECK_EQUAL(bg::within(pt_n24, poly_n, ws), false);
+ }
+
+ // TODO: Move to covered_by tests
+
+ // Segment going through pole
+ {
+ bg::model::polygon<Point> poly_n1;
+ bg::read_wkt("POLYGON((-90 80,90 80,90 70,-90 70, -90 80))", poly_n1);
+ // Points on segment
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(-90, 85), poly_n1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(90, 85), poly_n1, ws), true);
+ // Points on pole
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(90, 90), poly_n1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(0, 90), poly_n1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(45, 90), poly_n1, ws), true);
+ }
+ // Segment going through pole
+ {
+ bg::model::polygon<Point> poly_n2;
+ bg::read_wkt("POLYGON((-90 80,90 70,0 70,-90 80))", poly_n2);
+ // Points on segment
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(-90, 85), poly_n2, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(90, 75), poly_n2, ws), true);
+ // Points outside but on the same level as segment
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(-90, 75), poly_n2, ws), false);
+ }
+ // Possibly invalid, 2-segment polygon with segment going through pole
+ /*{
+ bg::model::polygon<Point> poly_n;
+ bg::read_wkt("POLYGON((-90 80,90 70,-90 80))", poly_n);
+ // Point within
+ BOOST_CHECK_EQUAL(bg::within(Point(0, 89), poly_n), true);
+ // Points on segment
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(-90, 85), poly_n), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(90, 75), poly_n), true);
+ // Points outside but on the same level as segment
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(-90, 75), poly_n), false);
+ }*/
+ // Segment endpoints on pole with arbitrary longitudes
+ {
+ bg::model::polygon<Point> poly_n3;
+ bg::read_wkt("POLYGON((45 90,45 80,0 80,45 90))", poly_n3);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(0, 85), poly_n3, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(45, 85), poly_n3, ws), true);
+ }
+ // Segment going through pole
+ {
+ bg::model::polygon<Point> poly_s1;
+ bg::read_wkt("POLYGON((-90 -80,-90 -70,90 -70,90 -80,-90 -80))", poly_s1);
+ // Points on segment
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(-90, -85), poly_s1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(90, -85), poly_s1, ws), true);
+ // Points on pole
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(90, -90), poly_s1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(0, -90), poly_s1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(45, -90), poly_s1, ws), true);
+ }
+ // Segment endpoints on pole with arbitrary longitudes
+ {
+ bg::model::polygon<Point> poly_s2;
+ bg::read_wkt("POLYGON((45 -90,0 -80,45 -80,45 -90))", poly_s2);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(0, -85), poly_s2, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(45, -85), poly_s2, ws), true);
+ }
+ // Polygon covering nearly half of the globe but no poles
+ {
+ bg::model::polygon<Point> poly_h1;
+ bg::read_wkt("POLYGON((170 0, 170 -80,10 -80,0 -80,0 -20,10 -20,10 20,0 20,0 80,10 80,170 80,170 0))", poly_h1);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 90), poly_h1, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 85), poly_h1, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 50), poly_h1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 0), poly_h1, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -50), poly_h1, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -85), poly_h1, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -90), poly_h1, ws), false);
+ }
+ // Polygon covering more than half of the globe with both holes
+ {
+ bg::model::polygon<Point> poly_h2;
+ bg::read_wkt("POLYGON((180 0, 180 -80,0 -80,10 -80,10 -20,0 -20,0 20,10 20,10 80,0 80,180 80,180 0))", poly_h2);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 90), poly_h2, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 85), poly_h2, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 50), poly_h2, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 0), poly_h2, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -50), poly_h2, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -85), poly_h2, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -90), poly_h2, ws), true);
+ }
+ // Polygon covering around half of the globe covering south pole
+ {
+ bg::model::polygon<Point> poly_h3;
+ bg::read_wkt("POLYGON((180 0, 180 -80,0 -80,0 -20,10 -20,10 20,0 20,0 80,10 80,170 80,180 0))", poly_h3);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 90), poly_h3, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 85), poly_h3, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 50), poly_h3, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 0), poly_h3, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -50), poly_h3, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -85), poly_h3, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -90), poly_h3, ws), true);
+ }
+ // Polygon covering around half of the globe covering north pole
+ {
+ bg::model::polygon<Point> poly_h4;
+ bg::read_wkt("POLYGON((180 0, 170 -80,10 -80,10 -20,0 -20,0 20,10 20,10 80,0 80,180 80,180 0))", poly_h4);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 90), poly_h4, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 85), poly_h4, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 50), poly_h4, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, 0), poly_h4, ws), true);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -50), poly_h4, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -85), poly_h4, ws), false);
+ BOOST_CHECK_EQUAL(bg::covered_by(Point(5, -90), poly_h4, ws), false);
+ }
+}
+
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ std::string const polygon_li = "POLYGON((1872000 528000,1872000 192000,1536119 192000,1536000 528000,1200000 528000,1200000 863880,1536000 863880,1872000 863880,1872000 528000))";
+ bg::model::polygon<int_point_type> int_poly;
+ bg::model::polygon<double_point_type> double_poly;
+ bg::read_wkt(polygon_li, int_poly);
+ bg::read_wkt(polygon_li, double_poly);
+
+ std::string const point_li = "POINT(1592000 583950)";
+ int_point_type int_point;
+ double_point_type double_point;
+ bg::read_wkt(point_li, int_point);
+ bg::read_wkt(point_li, double_point);
+
+ bool wi = bg::within(int_point, int_poly);
+ bool wd = bg::within(double_point, double_poly);
+
+ BOOST_CHECK_MESSAGE(wi == wd, "within<a double> different from within<an int>");
+}
+
+void test_tickets()
+{
+ typedef boost::geometry::model::d2::point_xy<double> pt;
+ typedef boost::geometry::model::ring<pt> ring;
+
+ // https://svn.boost.org/trac/boost/ticket/9628
+ {
+ ring r;
+ r.push_back(pt(-19155.669324773193,54820.312032458620));
+ r.push_back(pt(-13826.169324773080,54820.312032458627));
+ r.push_back(pt(-13826.169324773078,52720.312032458663));
+ r.push_back(pt(-12755.169324773129,52720.312032458663));
+ r.push_back(pt(-12755.169324773129,51087.312032458671));
+ r.push_back(pt(-12760.669324773080,51087.312032458671));
+ r.push_back(pt(-12760.669324773082,51070.312032458627));
+ r.push_back(pt(-19155.669324779392,51070.312032458620));
+ r.push_back(pt(-19155.669324773193,54820.312032458620));
+
+ pt p( -12260.669324773118, 54820.312032458634 );
+
+ //boost::geometry::correct(r);
+
+ bool within = boost::geometry::within(p, r);
+ BOOST_CHECK_EQUAL(within, false);
+ }
+ // similar
+ {
+ ring r;
+ r.push_back(pt(-14155.6,54820.312032458620));
+ r.push_back(pt(-13826.1,54820.312032458625));
+ r.push_back(pt(-12155.6,53720.3));
+ r.push_back(pt(-14155.6,54820.312032458620));
+
+ pt p( -13826.0, 54820.312032458634 );
+
+ bool within = boost::geometry::within(p, r);
+ BOOST_CHECK_EQUAL(within, false);
+ }
+
+ // https://svn.boost.org/trac/boost/ticket/10234
+ {
+ pt p;
+ ring r;
+ bg::read_wkt("POINT(0.1377 5.00)", p);
+ bg::read_wkt("POLYGON((0.1277 4.97, 0.1277 5.00, 0.1278 4.9999999999999982, 0.1278 4.97, 0.1277 4.97))", r);
+ bool within = boost::geometry::within(p, r);
+ BOOST_CHECK_EQUAL(within, false);
+ bool covered_by = boost::geometry::covered_by(p, r);
+ BOOST_CHECK_EQUAL(covered_by, false);
+ }
+}
+
+int test_main( int , char* [] )
+{
+ test_large_integers();
+
+ test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<double> >();
+
+ test_spherical_geographic<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_spherical_geographic<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_spherical_geographic<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_spherical_geographic<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();
+#endif
+
+ test_tickets();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_sph.cpp b/src/boost/libs/geometry/test/algorithms/within/within_sph.cpp
new file mode 100644
index 000000000..455a8db49
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_sph.cpp
@@ -0,0 +1,273 @@
+// Boost.Geometry
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_within.hpp"
+
+#include <algorithms/overlay/overlay_cases.hpp>
+#include <algorithms/overlay/multi_overlay_cases.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename P>
+void test_polygon_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<ring, ring>(case_1[0], case_1[1],
+ false);
+ test_geometry<ring, poly>(case_1[0], case_1[1],
+ false);
+
+ test_geometry<poly, poly>(case_1[0], case_1[1],
+ false);
+ test_geometry<poly, poly>(case_2[0], case_2[1],
+ false);
+ test_geometry<poly, poly>(case_3_sph[0], case_3_sph[1],
+ true);
+ test_geometry<poly, poly>(case_3_2_sph[0], case_3_2_sph[1],
+ true);
+ test_geometry<poly, poly>(case_4[0], case_4[1],
+ false);
+ test_geometry<poly, poly>(case_5[0], case_5[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[0], case_6_sph[1],
+ false);
+ test_geometry<poly, poly>(case_6_sph[1], case_6_sph[0],
+ true);
+
+ test_geometry<poly, poly>(case_7[0], case_7[1],
+ false);
+ test_geometry<poly, poly>(case_8_sph[0], case_8_sph[1],
+ false);
+ test_geometry<poly, poly>(case_9_sph[0], case_9_sph[1],
+ false);
+ test_geometry<poly, poly>(case_10_sph[0], case_10_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[0], case_11_sph[1],
+ false);
+ test_geometry<poly, poly>(case_11_sph[1], case_11_sph[0],
+ true);
+ test_geometry<poly, poly>(case_12[0], case_12[1],
+ false);
+
+ test_geometry<poly, poly>(case_13_sph[0], case_13_sph[1],
+ false);
+ test_geometry<poly, poly>(case_14_sph[0], case_14_sph[1],
+ false);
+ test_geometry<poly, poly>(case_15_sph[0], case_15_sph[1],
+ false);
+ test_geometry<poly, poly>(case_16_sph[0], case_16_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[0], case_17_sph[1],
+ false);
+ test_geometry<poly, poly>(case_17_sph[1], case_17_sph[0],
+ true);
+ test_geometry<poly, poly>(case_18_sph[0], case_18_sph[1],
+ false);
+ test_geometry<poly, poly>(case_18_sph[1], case_18_sph[0],
+ true);
+}
+
+template <typename P>
+void test_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ring, mpoly>(case_1[0], case_multi_2[0],
+ false);
+ test_geometry<poly, mpoly>(case_2[0], case_multi_2[0],
+ false);
+}
+
+template <typename P>
+void test_multi_polygon_multi_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mpoly, mpoly>(case_multi_2[0], case_multi_2[1],
+ false);
+}
+
+template <typename P>
+void test_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::polygon<P> ring;
+
+ test_geometry<ls, poly>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, ring>("LINESTRING(11 0,11 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+ test_geometry<ls, poly>("LINESTRING(0 0,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(5 1,5 5,9 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", true);
+ test_geometry<ls, poly>("LINESTRING(11 1,11 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))", false);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ true);
+
+ test_geometry<ls, poly>("LINESTRING(9 1,10 5,9 9,1 9,1 1,9 1)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5))",
+ true);
+
+ test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10,0 10,0 0)",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ false);
+}
+
+template <typename P>
+void test_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<ls, mpoly>("LINESTRING(10 1,10 5,10 9)",
+ "MULTIPOLYGON(((0 20,0 30,10 30,10 20,0 20)),((0 0,0 10,10 10,10 0,0 0),(10 5,2 8,2 2,10 5)))",
+ false);
+}
+
+template <typename P>
+void test_multi_linestring_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::ring<P> ring;
+
+ test_geometry<mls, poly>("MULTILINESTRING((11 11, 20 20),(5 7, 4 1))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2 2))",
+ false);
+
+ test_geometry<mls, ring>("MULTILINESTRING((6 6,15 15),(0 0, 7 7))",
+ "POLYGON((5 5,5 15,15 15,15 5,5 5))",
+ false);
+
+ test_geometry<mls, poly>("MULTILINESTRING((3 10.031432746397092, 1 5, 1 10.013467818052765, 3 4, 7 8, 6 10.035925377760330, 10 2))",
+ "POLYGON((0 0,0 10,10 10,10 0,0 0))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_polygon()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,5 5,2 8,2 2))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,5 5,2 8,2 2)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((0 0,10 0,10 10),(10 10,0 10,0 0),(20 20,50 50,20 80,20 20))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
+ false);
+
+ test_geometry<mls, mpoly>("MULTILINESTRING((5 -2,4 -2,5 0),(5 -2,6 -2,5 0))",
+ "MULTIPOLYGON(((5 0,0 5,10 5,5 0)),((5 0,10 -5,0 -5,5 0)))",
+ true);
+}
+
+template <typename P>
+void test_linestring_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+
+ test_geometry<ls, ls>("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true);
+
+ test_geometry<ls, ls>("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false);
+}
+
+template <typename P>
+void test_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<ls, mls>("LINESTRING(0 0,10 0)",
+ "MULTILINESTRING((1 0,2 0),(1 1,2 1))",
+ false);
+
+ test_geometry<ls, mls>("LINESTRING(0 0,5 0,5 5,0 5,0 0)",
+ "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))",
+ true);
+}
+
+template <typename P>
+void test_multi_linestring_multi_linestring()
+{
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+
+ test_geometry<mls, mls>("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))",
+ "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))",
+ false);
+}
+
+template <typename P>
+void test_point_polygon()
+{
+ typedef bg::model::polygon<P> poly;
+
+ // https://svn.boost.org/trac/boost/ticket/9162
+ test_geometry<P, poly>("POINT(0 90)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(-120 21)",
+ "POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
+ false);
+ // extended
+ test_geometry<P, poly>("POINT(0 -90)",
+ "POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
+ true);
+ test_geometry<P, poly>("POINT(0 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+ test_geometry<P, poly>("POINT(-180 89)",
+ "POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
+ true);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_polygon_polygon<P>();
+ test_polygon_multi_polygon<P>();
+ test_multi_polygon_multi_polygon<P>();
+
+ test_linestring_polygon<P>();
+ test_linestring_multi_polygon<P>();
+ test_multi_linestring_polygon<P>();
+ test_multi_linestring_multi_polygon<P>();
+
+ test_linestring_linestring<P>();
+ test_linestring_multi_linestring<P>();
+ test_multi_linestring_multi_linestring<P>();
+
+ test_point_polygon<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/algorithms/within/within_sph_geo.cpp b/src/boost/libs/geometry/test/algorithms/within/within_sph_geo.cpp
new file mode 100644
index 000000000..6b0fb1b2c
--- /dev/null
+++ b/src/boost/libs/geometry/test/algorithms/within/within_sph_geo.cpp
@@ -0,0 +1,129 @@
+// Boost.Geometry
+
+// Copyright (c) 2016-2018 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_within.hpp"
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+template <typename Point>
+void test_point_box_by_side()
+{
+ // Test spherical boxes
+ // See also http://www.gcmap.com/mapui?P=1E45N-19E45N-19E55N-1E55N-1E45N,10E55.1N,10E45.1N
+ typedef bg::model::box<Point> box_t;
+ bg::strategy::within::point_in_box_by_side<> by_side;
+ box_t box;
+ bg::read_wkt("POLYGON((1 45,19 55))", box);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 55.1), box, by_side), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 55.2), box, by_side), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 55.3), box, by_side), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 55.4), box, by_side), false);
+
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 45.1), box, by_side), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 45.2), box, by_side), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 45.3), box, by_side), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 45.4), box, by_side), true);
+
+ // By default Box is not a polygon in spherical CS, edges are defined by small circles
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 45.1), box), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 54.9), box), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 55), box), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(10, 45), box), false);
+
+ // Crossing the dateline (Near Tuvalu)
+ // http://www.gcmap.com/mapui?P=178E10S-178W10S-178W6S-178E6S-178E10S,180W5.999S,180E9.999S
+ // http://en.wikipedia.org/wiki/Tuvalu
+
+ box_t tuvalu(Point(178, -10), Point(-178, -6));
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -8), tuvalu, by_side), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(-180, -8), tuvalu, by_side), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -5.999), tuvalu, by_side), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -10.001), tuvalu, by_side), true);
+
+ // The above definition of a Box is not valid
+ // min should be lesser than max
+ // By default Box is not a polygon in spherical CS, edges are defined by small circles
+ box_t tuvalu2(Point(178, -10), Point(182, -6));
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -8), tuvalu2), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(-180, -8), tuvalu2), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -6.001), tuvalu2), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -5.999), tuvalu2), false);
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -9.999), tuvalu2), true);
+ BOOST_CHECK_EQUAL(bg::within(Point(180, -10.001), tuvalu2), false);
+}
+
+
+template <typename P>
+void test_point_box()
+{
+ typedef bg::model::box<P> box_t;
+
+ test_geometry<P, box_t>("POINT(0 0)", "BOX(0 0, 1 1)", false);
+ test_geometry<P, box_t>("POINT(1 1)", "BOX(0 0, 2 2)", true);
+
+ test_geometry<P, box_t>("POINT(180 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(-180 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(180 1)", "BOX(170 0, 180 2)", false);
+ test_geometry<P, box_t>("POINT(-180 1)", "BOX(170 0, 180 2)", false);
+ test_geometry<P, box_t>("POINT(179 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(-179 1)", "BOX(170 0, 190 2)", true);
+ test_geometry<P, box_t>("POINT(179 1)", "BOX(170 0, 180 2)", true);
+ test_geometry<P, box_t>("POINT(-179 1)", "BOX(170 0, 180 2)", false);
+ test_geometry<P, box_t>("POINT(169 1)", "BOX(170 0, 180 2)", false);
+
+ test_point_box_by_side<P>();
+}
+
+template <typename P>
+void test_box_box()
+{
+ typedef bg::model::box<P> box_t;
+
+ test_geometry<box_t, box_t>("BOX(0 0, 1 1)", "BOX(0 0, 1 1)", true);
+
+ test_geometry<box_t, box_t>("BOX(-170 0,-160 1)", "BOX(-180 0, 180 1)", true);
+ test_geometry<box_t, box_t>("BOX(-170 0,-160 1)", "BOX(170 0, 200 1)", true);
+ test_geometry<box_t, box_t>("BOX(-170 0,-150 1)", "BOX(170 0, 200 1)", false);
+ test_geometry<box_t, box_t>("BOX(0 0,1 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(0 0,10 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,10 1)", "BOX(170 0, 370 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,20 1)", "BOX(170 0, 370 1)", false);
+ test_geometry<box_t, box_t>("BOX(10 0,20 1)", "BOX(170 0, 370 1)", false);
+ test_geometry<box_t, box_t>("BOX(160 0,180 1)", "BOX(170 0, 370 1)", false);
+
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 190 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 191 1)", true); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(179 0, 190 1)", true);
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(181 0, 190 1)", false); // invalid?
+ test_geometry<box_t, box_t>("BOX(-180 0,-170 1)", "BOX(180 0, 189 1)", false); // invalid?
+}
+
+
+template <typename P>
+void test_cs()
+{
+ test_point_box<P>();
+ test_box_box<P>();
+}
+
+
+int test_main( int , char* [] )
+{
+ test_cs<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_cs<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/arithmetic/Jamfile b/src/boost/libs/geometry/test/arithmetic/Jamfile
new file mode 100644
index 000000000..232fe79fb
--- /dev/null
+++ b/src/boost/libs/geometry/test/arithmetic/Jamfile
@@ -0,0 +1,19 @@
+# Boost.Geometry
+#
+# Copyright (c) 2007-2019 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2019 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2019 Mateusz Loskot, London, UK.
+# Copyright (c) 2015-2019 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-arithmetic
+ :
+ [ run general.cpp : : : : arithmetic_general ]
+ [ run dot_product.cpp : : : : arithmetic_dot_product ]
+ [ run cross_product.cpp : : : : arithmetic_cross_product ]
+ [ run infinite_line_functions.cpp : : : : arithmetic_infinite_line_functions ]
+ [ compile-fail cross_product.cpp : <define>TEST_FAIL_CROSS_PRODUCT : arithmetic_cross_product_cf ]
+ ;
diff --git a/src/boost/libs/geometry/test/arithmetic/cross_product.cpp b/src/boost/libs/geometry/test/arithmetic/cross_product.cpp
new file mode 100644
index 000000000..cb1ddf617
--- /dev/null
+++ b/src/boost/libs/geometry/test/arithmetic/cross_product.cpp
@@ -0,0 +1,87 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/arithmetic/cross_product.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+
+template <typename P>
+void test_2d()
+{
+ P p1;
+ bg::assign_values(p1, 20, 30);
+ P p2;
+ bg::assign_values(p2, 45, 70);
+ P c = bg::cross_product(p1, p2);
+
+ typedef typename bg::coordinate_type<P>::type scalar_type;
+ BOOST_CHECK_EQUAL(bg::get<0>(c), scalar_type(50));
+}
+
+template <typename P>
+void test_3d()
+{
+ P p1;
+ bg::assign_values(p1, 20, 30, 10);
+ P p2;
+ bg::assign_values(p2, 45, 70, 20);
+ P c = bg::cross_product(p1, p2);
+
+ typedef typename bg::coordinate_type<P>::type scalar_type;
+ BOOST_CHECK_EQUAL(bg::get<0>(c), scalar_type(-100));
+ BOOST_CHECK_EQUAL(bg::get<1>(c), scalar_type(50));
+ BOOST_CHECK_EQUAL(bg::get<2>(c), scalar_type(50));
+}
+
+#ifdef TEST_FAIL_CROSS_PRODUCT
+template <typename P>
+void test_4d()
+{
+ P p1;
+ bg::assign_values(p1, 20, 30, 10);
+ bg::set<3>(p1, 15);
+ P p2;
+ bg::assign_values(p2, 45, 70, 20);
+ bg::set<3>(p2, 35);
+ P c = bg::cross_product(p1, p2);
+ boost::ignore_unused(c);
+}
+#endif
+
+int test_main(int, char* [])
+{
+ test_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_3d<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_3d<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+#ifdef TEST_FAIL_CROSS_PRODUCT
+ test_4d<bg::model::point<int, 4, bg::cs::cartesian> >();
+ test_4d<bg::model::point<float, 4, bg::cs::cartesian> >();
+ test_4d<bg::model::point<double, 4, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/arithmetic/dot_product.cpp b/src/boost/libs/geometry/test/arithmetic/dot_product.cpp
new file mode 100644
index 000000000..2242e3c30
--- /dev/null
+++ b/src/boost/libs/geometry/test/arithmetic/dot_product.cpp
@@ -0,0 +1,53 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/arithmetic/dot_product.hpp>
+
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+void test_all()
+{
+ P p1;
+ bg::assign_values(p1, 1, 2, 3);
+ P p2;
+ bg::assign_values(p2, 4, 5, 6);
+ BOOST_CHECK(bg::dot_product(p1, p2) == 1*4 + 2*5 + 3*6);
+}
+
+int test_main(int, char* [])
+{
+ test_all<int[3]>();
+ test_all<float[3]>();
+ test_all<double[3]>();
+ test_all<test::test_point>();
+ test_all<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/arithmetic/general.cpp b/src/boost/libs/geometry/test/arithmetic/general.cpp
new file mode 100644
index 000000000..a329a6e52
--- /dev/null
+++ b/src/boost/libs/geometry/test/arithmetic/general.cpp
@@ -0,0 +1,142 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/arithmetic/arithmetic.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P, typename P2>
+void test_addition()
+{
+ P p1;
+ bg::assign_values(p1, 1, 2, 3);
+ bg::add_value(p1, 10);
+ BOOST_CHECK(bg::get<0>(p1) == 11);
+ BOOST_CHECK(bg::get<1>(p1) == 12);
+ BOOST_CHECK(bg::get<2>(p1) == 13);
+
+ P2 p2(4, 5, 6);
+ bg::add_point(p1, p2);
+ BOOST_CHECK(bg::get<0>(p1) == 15);
+ BOOST_CHECK(bg::get<1>(p1) == 17);
+ BOOST_CHECK(bg::get<2>(p1) == 19);
+}
+
+template <typename P, typename P2>
+void test_subtraction()
+{
+ P p1;
+ bg::assign_values(p1, 1, 2, 3);
+ bg::subtract_value(p1, 10);
+ BOOST_CHECK(bg::get<0>(p1) == -9);
+ BOOST_CHECK(bg::get<1>(p1) == -8);
+ BOOST_CHECK(bg::get<2>(p1) == -7);
+
+ P2 p2(4, 6, 8);
+ bg::subtract_point(p1, p2);
+ BOOST_CHECK(bg::get<0>(p1) == -13);
+ BOOST_CHECK(bg::get<1>(p1) == -14);
+ BOOST_CHECK(bg::get<2>(p1) == -15);
+}
+
+template <typename P, typename P2>
+void test_multiplication()
+{
+ P p1;
+ bg::assign_values(p1, 1, 2, 3);
+ bg::multiply_value(p1, 5);
+ BOOST_CHECK(bg::get<0>(p1) == 5);
+ BOOST_CHECK(bg::get<1>(p1) == 10);
+ BOOST_CHECK(bg::get<2>(p1) == 15);
+
+ P2 p2(4, 5, 6);
+ bg::multiply_point(p1, p2);
+ BOOST_CHECK(bg::get<0>(p1) == 20);
+ BOOST_CHECK(bg::get<1>(p1) == 50);
+ BOOST_CHECK(bg::get<2>(p1) == 90);
+}
+
+template <typename P, typename P2>
+void test_division()
+{
+ P p1;
+ bg::assign_values(p1, 50, 100, 150);
+ bg::divide_value(p1, 5);
+ BOOST_CHECK(bg::get<0>(p1) == 10);
+ BOOST_CHECK(bg::get<1>(p1) == 20);
+ BOOST_CHECK(bg::get<2>(p1) == 30);
+
+ P2 p2(2, 4, 6);
+ bg::divide_point(p1, p2);
+ BOOST_CHECK(bg::get<0>(p1) == 5);
+ BOOST_CHECK(bg::get<1>(p1) == 5);
+ BOOST_CHECK(bg::get<2>(p1) == 5);
+}
+
+template <typename P, typename P2>
+void test_assign()
+{
+ P p1;
+ P2 p2(12, 34, 56);
+ bg::assign_values(p1, 12, 34, 56);
+ bg::assign_point(p1, p2);
+ BOOST_CHECK(bg::get<0>(p1) == 12);
+ BOOST_CHECK(bg::get<1>(p1) == 34);
+ BOOST_CHECK(bg::get<2>(p1) == 56);
+
+ bg::assign_value(p1, 78);
+ BOOST_CHECK(bg::get<0>(p1) == 78);
+ BOOST_CHECK(bg::get<1>(p1) == 78);
+ BOOST_CHECK(bg::get<2>(p1) == 78);
+}
+
+
+template <typename P>
+void test_all()
+{
+ typedef test::test_const_point P2;
+
+ test_addition<P, P2>();
+ test_subtraction<P, P2>();
+ test_multiplication<P, P2>();
+ test_division<P, P2>();
+ test_assign<P, P2>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<int[3]>();
+ test_all<float[3]>();
+ test_all<double[3]>();
+ test_all<test::test_point>();
+ test_all<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/arithmetic/infinite_line_functions.cpp b/src/boost/libs/geometry/test/arithmetic/infinite_line_functions.cpp
new file mode 100755
index 000000000..9c879178c
--- /dev/null
+++ b/src/boost/libs/geometry/test/arithmetic/infinite_line_functions.cpp
@@ -0,0 +1,205 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2018-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2019.
+// Modifications copyright (c) 2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/arithmetic/infinite_line_functions.hpp>
+#include <boost/geometry/geometries/infinite_line.hpp>
+#include <boost/geometry/algorithms/detail/make/make.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+namespace
+{
+ // Boost.Test does not support BOOST_CHECK_CLOSE for integral types
+ template <typename T>
+ bool is_small(T const& value)
+ {
+ static long double const epsilon = 1.0e-5;
+ return bg::math::abs(value) < epsilon;
+ }
+}
+
+template <typename T, typename C>
+void verify_point_on_line(bg::model::infinite_line<T> const& line,
+ C const& x, C const& y)
+{
+ BOOST_CHECK_MESSAGE(is_small(line.a * x + line.b * y + line.c),
+ "Point is not located on the line");
+}
+
+template <typename T>
+void test_side_value()
+{
+ typedef bg::model::infinite_line<T> line_type;
+
+ // Horizontal line going right
+ line_type line = bg::detail::make::make_infinite_line<T>(0, 0, 10, 0);
+
+ // Point above (= on left side)
+ T d = bg::arithmetic::side_value(line, 5, 5);
+ BOOST_CHECK_MESSAGE(d > 0, "point not on left side");
+
+ // Point below (= on right side)
+ d = bg::arithmetic::side_value(line, 5, -5);
+ BOOST_CHECK_MESSAGE(d < 0, "point not on right side");
+
+ // Diagonal not through origin, from right (down) to left (up)
+ line = bg::detail::make::make_infinite_line<T>(5, 2, -7, 10);
+ d = bg::arithmetic::side_value(line, 5, 2);
+ BOOST_CHECK_MESSAGE(is_small(d), "point not on line");
+ d = bg::arithmetic::side_value(line, -7, 10);
+ BOOST_CHECK_MESSAGE(is_small(d), "point not on line");
+
+ // vector is (-12, 8), move (-3,2) on the line from (5,2)
+ d = bg::arithmetic::side_value(line, 2, 4);
+ BOOST_CHECK_MESSAGE(is_small(d), "point not on line");
+
+ // Go perpendicular (2,3) from (2,4) up, so right of the line (negative)
+ d = bg::arithmetic::side_value(line, 4, 7);
+ BOOST_CHECK_MESSAGE(d < 0, "point not on right side");
+
+ // Go perpendicular (2,3) from (2,4) down, so left of the line (positive)
+ d = bg::arithmetic::side_value(line, 0, 1);
+ BOOST_CHECK_MESSAGE(d > 0, "point not on left side");
+}
+
+
+template <typename T>
+void test_get_intersection()
+{
+ typedef bg::model::infinite_line<T> line_type;
+
+ // Diagonal lines (first is same as in distance measure,
+ // second is perpendicular and used there for distance measures)
+ line_type p = bg::detail::make::make_infinite_line<T>(5, 2, -7, 10);
+ line_type q = bg::detail::make::make_infinite_line<T>(4, 7, 0, 1);
+
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ point_type ip;
+ BOOST_CHECK(bg::arithmetic::intersection_point(p, q, ip));
+
+ BOOST_CHECK_MESSAGE(is_small(bg::get<0>(ip) - 2), "x-coordinate wrong");
+ BOOST_CHECK_MESSAGE(is_small(bg::get<1>(ip) - 4), "y-coordinate wrong");
+
+ verify_point_on_line(p, bg::get<0>(ip), bg::get<1>(ip));
+ verify_point_on_line(q, bg::get<0>(ip), bg::get<1>(ip));
+}
+
+template <typename T>
+void test_same_direction()
+{
+ bg::model::infinite_line<T> p, q;
+
+ // Exactly opposite, diagonal
+ p = bg::detail::make::make_infinite_line<T>(2, 1, 12, 11);
+ q = bg::detail::make::make_infinite_line<T>(12, 11, 2, 1);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // Exactly opposite, horizontal
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 0);
+ q = bg::detail::make::make_infinite_line<T>(10, 0, 0, 0);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // Exactly opposite, vertical
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 0, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 10, 0, 0);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // Exactly equal, diagonal
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ BOOST_CHECK(bg::arithmetic::similar_direction(p, q));
+
+ // Exactly equal, horizontal
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 0);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, 10, 0);
+ BOOST_CHECK(bg::arithmetic::similar_direction(p, q));
+
+ // Exactly equal, vertical
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 0, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, 0, 10);
+ BOOST_CHECK(bg::arithmetic::similar_direction(p, q));
+
+ // Coming together, diagonal
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(20, 20, 10, 10);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // Leaving from common point, diagonal
+ p = bg::detail::make::make_infinite_line<T>(10, 10, 0, 0);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // Continuing each other, diagonal
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(10, 10, 20, 20);
+ BOOST_CHECK(bg::arithmetic::similar_direction(p, q));
+
+ // (Nearly) perpendicular
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, -10, 10);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // 45 deg
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, 0, 10);
+ BOOST_CHECK(bg::arithmetic::similar_direction(p, q));
+
+ // a bit more than 45 deg
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, -1, 10);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+
+ // 135 deg
+ p = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ q = bg::detail::make::make_infinite_line<T>(0, 0, -10, 0);
+ BOOST_CHECK(! bg::arithmetic::similar_direction(p, q));
+}
+
+template <typename T>
+void test_degenerate()
+{
+ typedef bg::model::infinite_line<T> line_type;
+
+ line_type line = bg::detail::make::make_infinite_line<T>(0, 0, 10, 0);
+ BOOST_CHECK(! bg::arithmetic::is_degenerate(line));
+
+ line = bg::detail::make::make_infinite_line<T>(0, 0, 0, 10);
+ BOOST_CHECK(! bg::arithmetic::is_degenerate(line));
+
+ line = bg::detail::make::make_infinite_line<T>(0, 0, 10, 10);
+ BOOST_CHECK(! bg::arithmetic::is_degenerate(line));
+
+ line = bg::detail::make::make_infinite_line<T>(0, 0, 0, 0);
+ BOOST_CHECK(bg::arithmetic::is_degenerate(line));
+}
+
+
+template <typename T>
+void test_all()
+{
+ test_side_value<T>();
+ test_get_intersection<T>();
+ test_same_direction<T>();
+ test_degenerate<T>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ test_all<long double>();
+ test_all<float>();
+ test_all<int>();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/Jamfile b/src/boost/libs/geometry/test/concepts/Jamfile
new file mode 100644
index 000000000..dd1ad4eb7
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/Jamfile
@@ -0,0 +1,30 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-concepts
+ :
+ [ run linestring_concept.cpp : : : : concepts_linestring_concept ]
+ [ compile point_array.cpp : : concepts_point_array ]
+ [ compile point_concept_checker.cpp : : concepts_point_concept_checker ]
+ [ compile point_well_formed.cpp : : concepts_point_well_formed ]
+ [ compile point_well_formed_non_cartesian.cpp : : concepts_point_well_formed_non_cartesian ]
+ [ compile point_well_formed_traits.cpp : : concepts_point_well_formed_traits ]
+ [ compile-fail point_geographic_custom_with_wrong_units.cpp : : concepts_point_geographic_custom_with_wrong_units ]
+ [ compile-fail point_geographic_with_wrong_units.cpp : : concepts_point_geographic_with_wrong_units ]
+ [ compile-fail point_spherical_custom_with_wrong_units.cpp : : concepts_point_spherical_custom_with_wrong_units ]
+ [ compile-fail point_spherical_with_wrong_units.cpp : : concepts_point_spherical_with_wrong_units ]
+ [ compile-fail point_with_incorrect_dimension.cpp : : concepts_point_with_incorrect_dimension ]
+ [ compile-fail point_without_coordinate_type.cpp : : concepts_point_without_coordinate_type ]
+ [ compile-fail point_without_dimension.cpp : : concepts_point_without_dimension ]
+ [ compile-fail point_without_getter.cpp : : concepts_point_without_getter ]
+ [ compile-fail point_without_setter.cpp : : concepts_point_without_setter ]
+# [ run polygon_concept.cpp : : : : concepts_polygon_concept ]
+ ;
diff --git a/src/boost/libs/geometry/test/concepts/function_asserting_a_point.hpp b/src/boost/libs/geometry/test/concepts/function_asserting_a_point.hpp
new file mode 100644
index 000000000..802d19852
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/function_asserting_a_point.hpp
@@ -0,0 +1,30 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) Point concept unit tests
+//
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_ASSERTING_A_POINT_HPP
+#define GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_ASSERTING_A_POINT_HPP
+
+#include <boost/concept/requires.hpp>
+
+#include <boost/geometry/geometries/concepts/point_concept.hpp>
+
+namespace bg = boost::geometry;
+
+namespace test
+{
+ template <typename P, typename CP>
+ void function_asserting_a_point(P& p1, const CP& p2)
+ {
+ BOOST_CONCEPT_ASSERT((bg::concepts::Point<P>));
+ BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint<P>));
+
+ bg::get<0>(p1) = bg::get<0>(p2);
+ }
+}
+
+#endif // GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_ASSERTING_A_POINT_HPP
diff --git a/src/boost/libs/geometry/test/concepts/function_requiring_a_point.hpp b/src/boost/libs/geometry/test/concepts/function_requiring_a_point.hpp
new file mode 100644
index 000000000..d8628e940
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/function_requiring_a_point.hpp
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) Point concept unit tests
+//
+// Copyright (c) 2008-2016 Bruno Lalande, Paris, France.
+// Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2016 Adam Wulkiewicz, Lodz, Poland.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
+#define GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
+
+#include <boost/geometry/geometries/concepts/point_concept.hpp>
+
+namespace bg = boost::geometry;
+
+namespace test
+{
+ template <typename P, typename C>
+ inline void function_requiring_a_point(P& p1, const C& p2)
+ {
+ BOOST_CONCEPT_ASSERT((bg::concepts::Point<P>));
+ BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint<C>));
+
+ bg::set<0>(p1, bg::get<0>(p2));
+ }
+}
+
+#endif // GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
diff --git a/src/boost/libs/geometry/test/concepts/linestring_concept.cpp b/src/boost/libs/geometry/test/concepts/linestring_concept.cpp
new file mode 100644
index 000000000..06f3dfcf9
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/linestring_concept.cpp
@@ -0,0 +1,77 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <deque>
+#include <vector>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/algorithms/clear.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+
+
+#include <test_common/test_point.hpp>
+#include <test_geometries/all_custom_linestring.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
+
+
+
+template <typename Geometry>
+void test_linestring()
+{
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Linestring<Geometry>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<Geometry>) );
+
+ Geometry geometry;
+ typedef typename bg::point_type<Geometry>::type P;
+
+ bg::clear(geometry);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 0u);
+
+ bg::append(geometry, bg::make<P>(1, 2));
+ BOOST_CHECK_EQUAL(boost::size(geometry), 1u);
+
+ bg::append(geometry, bg::make<P>(3, 4));
+ BOOST_CHECK_EQUAL(boost::size(geometry), 2u);
+
+ bg::traits::resize<Geometry>::apply(geometry, 1);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 1u);
+
+ //std::cout << bg::dsv(geometry) << std::endl;
+ P p = *boost::begin(geometry);
+ //std::cout << bg::dsv(p) << std::endl;
+ BOOST_CHECK_EQUAL(bg::get<0>(p), 1);
+ BOOST_CHECK_EQUAL(bg::get<1>(p), 2);
+
+ bg::clear(geometry);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 0u);
+}
+
+template <typename Point>
+void test_all()
+{
+ test_linestring<bg::model::linestring<Point> >();
+ test_linestring<test::wrapped_boost_array<Point, 10> >();
+ test_linestring<all_custom_linestring<Point> >();
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_array.cpp b/src/boost/libs/geometry/test/concepts/point_array.cpp
new file mode 100644
index 000000000..000deadc0
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_array.cpp
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <test_common/test_point.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include "function_requiring_a_point.hpp"
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+
+
+int main()
+{
+ float p1[3] = { 0, 0, 0 };
+ const float p2[3] = { 0, 0, 0 };
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_concept_checker.cpp b/src/boost/libs/geometry/test/concepts/point_concept_checker.cpp
new file mode 100644
index 000000000..ea51a2e96
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_concept_checker.cpp
@@ -0,0 +1,76 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+struct ro_point
+{
+ float x, y;
+};
+
+
+struct rw_point
+{
+ float x, y;
+};
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<ro_point> { typedef point_tag type; };
+template <> struct coordinate_type<ro_point> { typedef float type; };
+template <> struct coordinate_system<ro_point> { typedef cs::cartesian type; };
+template <> struct dimension<ro_point> { enum { value = 2 }; };
+
+template <> struct access<ro_point, 0>
+{
+ static float get(ro_point const& p) { return p.x; }
+};
+
+template <> struct access<ro_point, 1>
+{
+ static float get(ro_point const& p) { return p.y; }
+};
+
+
+
+
+template <> struct tag<rw_point> { typedef point_tag type; };
+template <> struct coordinate_type<rw_point> { typedef float type; };
+template <> struct coordinate_system<rw_point> { typedef cs::cartesian type; };
+template <> struct dimension<rw_point> { enum { value = 2 }; };
+
+template <> struct access<rw_point, 0>
+{
+ static float get(rw_point const& p) { return p.x; }
+ static void set(rw_point& p, float value) { p.x = value; }
+};
+
+template <> struct access<rw_point, 1>
+{
+ static float get(rw_point const& p) { return p.y; }
+ static void set(rw_point& p, float value) { p.y = value; }
+};
+
+
+}}} // namespace bg::traits
+
+
+int main()
+{
+ boost::geometry::concepts::check<const ro_point>();
+ boost::geometry::concepts::check<rw_point>();
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_geographic_custom_with_wrong_units.cpp b/src/boost/libs/geometry/test/concepts/point_geographic_custom_with_wrong_units.cpp
new file mode 100644
index 000000000..5ac6e03e7
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_geographic_custom_with_wrong_units.cpp
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <test_geometries/custom_lon_lat_point.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+namespace bg = boost::geometry;
+
+struct dummy {};
+
+int main()
+{
+ bg::concepts::check
+ <
+ ro_lon_lat_point<double, bg::cs::geographic<dummy> > const
+ >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_geographic_with_wrong_units.cpp b/src/boost/libs/geometry/test/concepts/point_geographic_with_wrong_units.cpp
new file mode 100644
index 000000000..9ea423181
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_geographic_with_wrong_units.cpp
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <test_geometries/custom_lon_lat_point.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+namespace bg = boost::geometry;
+
+
+int main()
+{
+ bg::concepts::check
+ <
+ bg::model::point<double, 2, bg::cs::geographic<int> >
+ >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_spherical_custom_with_wrong_units.cpp b/src/boost/libs/geometry/test/concepts/point_spherical_custom_with_wrong_units.cpp
new file mode 100644
index 000000000..4a44f3236
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_spherical_custom_with_wrong_units.cpp
@@ -0,0 +1,28 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <test_geometries/custom_lon_lat_point.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+namespace bg = boost::geometry;
+
+
+int main()
+{
+ bg::concepts::check
+ <
+ rw_lon_lat_point<double, bg::cs::spherical_equatorial<double> >
+ >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_spherical_with_wrong_units.cpp b/src/boost/libs/geometry/test/concepts/point_spherical_with_wrong_units.cpp
new file mode 100644
index 000000000..960db4a4d
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_spherical_with_wrong_units.cpp
@@ -0,0 +1,26 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <test_geometries/custom_lon_lat_point.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+namespace bg = boost::geometry;
+
+
+int main()
+{
+ bg::model::point<double, 2, bg::cs::spherical_equatorial<double> > p;
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_well_formed.cpp b/src/boost/libs/geometry/test/concepts/point_well_formed.cpp
new file mode 100644
index 000000000..20ae39c62
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_well_formed.cpp
@@ -0,0 +1,34 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+
+#include "function_requiring_a_point.hpp"
+
+struct point: public boost::tuple<float, float>
+{
+};
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(point, float, cs::cartesian, get<0>(), get<1>())
+
+int main()
+{
+ point p1;
+ point const p2 = point();
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_well_formed_non_cartesian.cpp b/src/boost/libs/geometry/test/concepts/point_well_formed_non_cartesian.cpp
new file mode 100644
index 000000000..adbc14ce0
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_well_formed_non_cartesian.cpp
@@ -0,0 +1,64 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include <test_geometries/custom_lon_lat_point.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+namespace bg = boost::geometry;
+
+
+template <typename CoordinateSystem>
+inline void test_coordinate_system()
+{
+ typedef bg::model::point<double, 2, CoordinateSystem> bg_double_point;
+ typedef bg::model::point<int, 2, CoordinateSystem> bg_int_point;
+
+ typedef rw_lon_lat_point<double, CoordinateSystem> rw_double_point;
+ typedef ro_lon_lat_point<double, CoordinateSystem> ro_double_point;
+
+ typedef rw_lon_lat_point<int, CoordinateSystem> rw_int_point;
+ typedef ro_lon_lat_point<int, CoordinateSystem> ro_int_point;
+
+ bg::concepts::check<bg_int_point>();
+ bg::concepts::check<bg_int_point const>();
+
+ bg::concepts::check<bg_double_point>();
+ bg::concepts::check<bg_double_point const>();
+
+ bg::concepts::check<rw_int_point>();
+ bg::concepts::check<rw_int_point const>();
+ bg::concepts::check<ro_int_point const>();
+
+ bg::concepts::check<rw_double_point>();
+ bg::concepts::check<rw_double_point const>();
+ bg::concepts::check<ro_double_point const>();
+}
+
+
+int main()
+{
+ test_coordinate_system<bg::cs::geographic<bg::degree> >();
+ test_coordinate_system<bg::cs::geographic<bg::radian> >();
+
+ test_coordinate_system<bg::cs::spherical<bg::degree> >();
+ test_coordinate_system<bg::cs::spherical<bg::radian> >();
+
+ test_coordinate_system<bg::cs::spherical_equatorial<bg::degree> >();
+ test_coordinate_system<bg::cs::spherical_equatorial<bg::radian> >();
+
+ test_coordinate_system<bg::cs::polar<bg::degree> >();
+ test_coordinate_system<bg::cs::polar<bg::radian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_well_formed_traits.cpp b/src/boost/libs/geometry/test/concepts/point_well_formed_traits.cpp
new file mode 100644
index 000000000..fc4ab82f2
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_well_formed_traits.cpp
@@ -0,0 +1,88 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry/core/cs.hpp>
+
+#include "function_requiring_a_point.hpp"
+
+struct point
+{
+ point(): x(), y() {}
+ float x, y;
+};
+
+namespace boost { namespace geometry { namespace traits {
+
+template <>
+struct tag<point>
+{
+ typedef point_tag type;
+};
+
+template <>
+struct coordinate_type<point>
+{
+ typedef float type;
+};
+
+template <>
+struct coordinate_system<point>
+{
+ typedef bg::cs::cartesian type;
+};
+
+template <>
+struct dimension<point>
+{
+ enum { value = 2 };
+};
+
+template <>
+struct access<point, 0>
+{
+ static float get(point const& p)
+ {
+ return p.x;
+ }
+
+ static void set(point& p, float value)
+ {
+ p.x = value;
+ }
+};
+
+template <>
+struct access<point, 1>
+{
+ static float get(point const& p)
+ {
+ return p.y;
+ }
+
+ static void set(point& p, float value)
+ {
+ p.y = value;
+ }
+};
+
+
+}}} // namespace bg::traits
+
+int main()
+{
+ point p1;
+ const point p2;
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_with_incorrect_dimension.cpp b/src/boost/libs/geometry/test/concepts/point_with_incorrect_dimension.cpp
new file mode 100644
index 000000000..79ffc8bee
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_with_incorrect_dimension.cpp
@@ -0,0 +1,59 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <test_common/test_point.hpp>
+
+#include "function_asserting_a_point.hpp"
+#include "function_requiring_a_point.hpp"
+
+#include <boost/geometry/core/cs.hpp>
+
+struct point
+{
+ point() : x(0), y(0) {} // initialize to suppress warnings
+ float x, y;
+};
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<point> { typedef point_tag type; };
+template <> struct coordinate_type<point> { typedef float type; };
+template <> struct coordinate_system<point> { typedef bg::cs::cartesian type; };
+template <> struct dimension<point> { enum { value = 3 }; };
+
+template <> struct access<point, 0>
+{
+ static float get(point const& p) { return p.x; }
+ static void set(point& p, float value) { p.x = value; }
+};
+
+template <> struct access<point, 1>
+{
+ static float get(point const& p) { return p.y; }
+ static void set(point& p, float value) { p.y = value; }
+};
+
+
+}}} // namespace bg::traits
+
+
+int main()
+{
+ point p1;
+ const point p2;
+ test::function_requiring_a_point(p1, p2);
+ test::function_asserting_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_without_coordinate_type.cpp b/src/boost/libs/geometry/test/concepts/point_without_coordinate_type.cpp
new file mode 100644
index 000000000..3896e4690
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_without_coordinate_type.cpp
@@ -0,0 +1,54 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "function_requiring_a_point.hpp"
+
+#include <boost/geometry/core/cs.hpp>
+
+struct point
+{
+ point() : x(0), y(0) {} // initialize to suppress warnings
+ float x, y;
+};
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<point> { typedef point_tag type; };
+//template <> struct coordinate_type<point> { typedef float type; };
+template <> struct coordinate_system<point> { typedef bg::cs::cartesian type; };
+template <> struct dimension<point> { enum { value = 2 }; };
+
+template <> struct access<point, 0>
+{
+ static float get(point const& p) { return p.x; }
+ static void set(point& p, float value) { p.x = value; }
+};
+
+template <> struct access<point, 1>
+{
+ static float get(point const& p) { return p.y; }
+ static void set(point& p, float value) { p.y = value; }
+};
+
+
+}}} // namespace bg::traits
+
+int main()
+{
+ point p1;
+ const point p2;
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_without_dimension.cpp b/src/boost/libs/geometry/test/concepts/point_without_dimension.cpp
new file mode 100644
index 000000000..11182ed2b
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_without_dimension.cpp
@@ -0,0 +1,56 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "function_requiring_a_point.hpp"
+
+#include <boost/geometry/core/cs.hpp>
+
+struct point
+{
+ point() : x(0), y(0) {} // initialize to suppress warnings
+ float x, y;
+};
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<point> { typedef point_tag type; };
+template <> struct coordinate_type<point> { typedef float type; };
+template <> struct coordinate_system<point> { typedef bg::cs::cartesian type; };
+//template <> struct dimension<point> { enum { value = 2 }; };
+
+template <> struct access<point, 0>
+{
+ static float get(point const& p) { return p.x; }
+ static void set(point& p, float value) { p.x = value; }
+};
+
+template <> struct access<point, 1>
+{
+ static float get(point const& p) { return p.y; }
+ static void set(point& p, float value) { p.y = value; }
+};
+
+
+}}} // namespace bg::traits
+
+
+int main()
+{
+ point p1;
+ const point p2;
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_without_getter.cpp b/src/boost/libs/geometry/test/concepts/point_without_getter.cpp
new file mode 100644
index 000000000..5d19924e2
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_without_getter.cpp
@@ -0,0 +1,52 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "function_requiring_a_point.hpp"
+
+#include <boost/geometry/core/cs.hpp>
+
+struct point
+{
+ point() : x(0), y(0) {} // initialize to suppress warnings
+ float x, y;
+};
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<point> { typedef point_tag type; };
+template <> struct coordinate_type<point> { typedef float type; };
+template <> struct coordinate_system<point> { typedef bg::cs::cartesian type; };
+template <> struct dimension<point> { enum { value = 2 }; };
+
+template <> struct access<point, 0>
+{
+ static void set(point& p, float value) { p.x = value; }
+};
+
+template <> struct access<point, 1>
+{
+ static void set(point& p, float value) { p.y = value; }
+};
+
+
+}}} // namespace bg::traits
+
+int main()
+{
+ point p1;
+ const point p2;
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/concepts/point_without_setter.cpp b/src/boost/libs/geometry/test/concepts/point_without_setter.cpp
new file mode 100644
index 000000000..78be83994
--- /dev/null
+++ b/src/boost/libs/geometry/test/concepts/point_without_setter.cpp
@@ -0,0 +1,52 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "function_requiring_a_point.hpp"
+
+#include <boost/geometry/core/cs.hpp>
+
+struct point
+{
+ point() : x(0), y(0) {} // initialize to suppress warnings
+ float x, y;
+};
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<point> { typedef point_tag type; };
+template <> struct coordinate_type<point> { typedef float type; };
+template <> struct coordinate_system<point> { typedef bg::cs::cartesian type; };
+template <> struct dimension<point> { enum { value = 2 }; };
+
+template <> struct access<point, 0>
+{
+ static float get(point const& p) { return p.x; }
+};
+
+template <> struct access<point, 1>
+{
+ static float get(point const& p) { return p.y; }
+};
+
+
+}}} // namespace bg::traits
+
+int main()
+{
+ point p1;
+ const point p2;
+ test::function_requiring_a_point(p1, p2);
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/Jamfile b/src/boost/libs/geometry/test/core/Jamfile
new file mode 100644
index 000000000..1564d034f
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/Jamfile
@@ -0,0 +1,29 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-core
+ :
+ [ run access.cpp : : : : core_access ]
+ [ run assert.cpp : : : : core_assert ]
+ [ run coordinate_dimension.cpp : : : : core_coordinate_dimension ]
+ [ run coordinate_system.cpp : : : : core_coordinate_system ]
+ [ run coordinate_type.cpp : : : : core_coordinate_type ]
+ [ run geometry_id.cpp : : : : core_geometry_id ]
+ [ run point_type.cpp : : : : core_point_type ]
+ [ run radian_access.cpp : : : : core_radian_access ]
+ [ run radius.cpp : : : : core_radius ]
+# [ run reverse_dispatch.cpp : : : : core_reverse_dispatch ]
+ [ run ring.cpp : : : : core_ring ]
+ [ run tag.cpp : : : : core_tag ]
+ [ run topological_dimension.cpp : : : : core_topological_dimension ]
+ ;
+
+# The reverse_dispatch somehow asks for UAC-control on MinGW...
diff --git a/src/boost/libs/geometry/test/core/access.cpp b/src/boost/libs/geometry/test/core/access.cpp
new file mode 100644
index 000000000..451348bb4
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/access.cpp
@@ -0,0 +1,133 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/core/access.hpp>
+
+
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename G>
+void test_get_set()
+{
+ typedef typename bg::coordinate_type<G>::type coordinate_type;
+
+ G g;
+ bg::set<0>(g, coordinate_type(1));
+ bg::set<1>(g, coordinate_type(2));
+
+ coordinate_type x = bg::get<0>(g);
+ coordinate_type y = bg::get<1>(g);
+
+ BOOST_CHECK_CLOSE(double(x), 1.0, 0.0001);
+ BOOST_CHECK_CLOSE(double(y), 2.0, 0.0001);
+}
+
+template <typename G>
+void test_indexed_get_set(G& g)
+{
+ bg::set<0, 0>(g, 1);
+ bg::set<0, 1>(g, 2);
+ bg::set<1, 0>(g, 3);
+ bg::set<1, 1>(g, 4);
+
+ typedef typename bg::coordinate_type<G>::type coordinate_type;
+ coordinate_type x1 = bg::get<0, 0>(g);
+ coordinate_type y1 = bg::get<0, 1>(g);
+ coordinate_type x2 = bg::get<1, 0>(g);
+ coordinate_type y2 = bg::get<1, 1>(g);
+
+ BOOST_CHECK_CLOSE(double(x1), 1.0, 0.0001);
+ BOOST_CHECK_CLOSE(double(y1), 2.0, 0.0001);
+ BOOST_CHECK_CLOSE(double(x2), 3.0, 0.0001);
+ BOOST_CHECK_CLOSE(double(y2), 4.0, 0.0001);
+}
+
+template <typename G, typename T>
+void test_indexed_get(G const& g, T a, T b, T c, T d)
+{
+ T x1 = bg::get<0, 0>(g);
+ T y1 = bg::get<0, 1>(g);
+ T x2 = bg::get<1, 0>(g);
+ T y2 = bg::get<1, 1>(g);
+
+ BOOST_CHECK_CLOSE(double(x1), double(a), 0.0001);
+ BOOST_CHECK_CLOSE(double(y1), double(b), 0.0001);
+ BOOST_CHECK_CLOSE(double(x2), double(c), 0.0001);
+ BOOST_CHECK_CLOSE(double(y2), double(d), 0.0001);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+
+ // POINT, setting coordinate
+ test_get_set<P>();
+
+
+ // BOX, setting left/right/top/bottom
+ bg::model::box<P> b;
+ test_indexed_get_set(b);
+
+ // SEGMENT (in GGL not having default constructor; however that is not a requirement)
+ P p1 = bg::make_zero<P>();
+ P p2 = bg::make_zero<P>();
+ bg::model::referring_segment<P> s(p1, p2);
+ test_indexed_get_set(s);
+
+ // CONST SEGMENT
+ bg::set<0>(p1, 1); // we don't use assign because dim in {2,3}
+ bg::set<1>(p1, 2);
+ bg::set<0>(p2, 3);
+ bg::set<1>(p2, 4);
+ bg::model::referring_segment<P const> cs(p1, p2);
+ test_indexed_get(cs,
+ coordinate_type(1), coordinate_type(2),
+ coordinate_type(3), coordinate_type(4));
+}
+
+
+int test_main(int, char* [])
+{
+ test_get_set<int[2]>();
+ test_get_set<float[2]>();
+ test_get_set<double[2]>();
+ test_get_set<double[3]>();
+
+ test_get_set<boost::tuple<double, double> >();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/assert.cpp b/src/boost/libs/geometry/test/core/assert.cpp
new file mode 100644
index 000000000..59d90dee1
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/assert.cpp
@@ -0,0 +1,65 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#define BOOST_GEOMETRY_ENABLE_ASSERT_HANDLER
+#include <boost/geometry/core/assert.hpp>
+
+struct assert_failure_exception
+ : std::exception
+{
+ const char * what() const throw()
+ {
+ return "assertion failure";
+ }
+};
+
+namespace boost { namespace geometry {
+
+inline void assertion_failed(char const * /*expr*/, char const * /*function*/, char const * /*file*/, long /*line*/)
+{
+ throw assert_failure_exception();
+}
+
+inline void assertion_failed_msg(char const * /*expr*/, char const * /*msg*/, char const * /*function*/, char const * /*file*/, long /*line*/)
+{
+ throw assert_failure_exception();
+}
+
+}}
+
+void fun1(bool condition)
+{
+ BOOST_GEOMETRY_ASSERT(condition);
+}
+
+void fun2(bool condition, const char* msg = "")
+{
+ BOOST_GEOMETRY_ASSERT_MSG(condition, msg);
+}
+
+bool is_ok(assert_failure_exception const& ) { return true; }
+
+int test_main(int, char* [])
+{
+ int a = 1;
+
+ fun1(a == 1);
+ BOOST_CHECK_EXCEPTION(fun1(a == 2), assert_failure_exception, is_ok);
+ fun2(a == 1);
+ BOOST_CHECK_EXCEPTION(fun2(a == 2), assert_failure_exception, is_ok);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/coordinate_dimension.cpp b/src/boost/libs/geometry/test/core/coordinate_dimension.cpp
new file mode 100644
index 000000000..94a90bbfd
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/coordinate_dimension.cpp
@@ -0,0 +1,74 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/core/coordinate_dimension.hpp>
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, int Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(bg::dimension<G>::type::value, Expected);
+}
+
+template <typename P, size_t D>
+void test_all()
+{
+ test_geometry<P, D>();
+ test_geometry<P const, D>();
+ test_geometry<bg::model::linestring<P> , D>();
+ test_geometry<bg::model::ring<P> , D>();
+ test_geometry<bg::model::polygon<P> , D>();
+ test_geometry<bg::model::box<P> , D>();
+ test_geometry<bg::model::segment<P> , D>();
+ test_geometry<bg::model::referring_segment<P const> , D>();
+
+ test_geometry<std::vector<P>, D>();
+ test_geometry<std::deque<P>, D>();
+}
+
+int test_main(int, char* [])
+{
+ test_geometry<int[2], 2>();
+ test_geometry<float[2], 2>();
+ test_geometry<double[2], 2>();
+
+ test_geometry<int[3], 3>();
+ test_geometry<float[3], 3>();
+ test_geometry<double[3], 3>();
+
+ test_geometry<boost::tuple<double, double>, 2>();
+ test_geometry<boost::tuple<double, double, double>, 3>();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian>, 2 >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian>, 2 >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian>, 2 >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/coordinate_system.cpp b/src/boost/libs/geometry/test/core/coordinate_system.cpp
new file mode 100644
index 000000000..5a79f329e
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/coordinate_system.cpp
@@ -0,0 +1,101 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/core/coordinate_system.hpp>
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, typename Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(typeid(typename bg::coordinate_system<G>::type).name(),
+ typeid(Expected).name());
+}
+
+template <typename P, typename Expected>
+void test_all()
+{
+ test_geometry<P, Expected>();
+ test_geometry<P const, Expected>();
+ test_geometry<bg::model::linestring<P> , Expected>();
+ test_geometry<bg::model::ring<P> , Expected>();
+ test_geometry<bg::model::polygon<P> , Expected>();
+ test_geometry<bg::model::box<P> , Expected>();
+ test_geometry<bg::model::segment<P> , Expected>();
+ test_geometry<bg::model::referring_segment<P const> , Expected>();
+
+ test_geometry<std::vector<P>, Expected>();
+ test_geometry<std::deque<P>, Expected>();
+}
+
+int test_main(int, char* [])
+{
+ // Because of the included headerfiles, there are always cartesian
+ test_geometry<int[2], bg::cs::cartesian>();
+ test_geometry<float[2], bg::cs::cartesian>();
+ test_geometry<double[2], bg::cs::cartesian>();
+
+ test_geometry<int[3], bg::cs::cartesian>();
+ test_geometry<float[3], bg::cs::cartesian>();
+ test_geometry<double[3], bg::cs::cartesian>();
+
+ // Because of the included headerfiles, there are always cartesian
+ test_geometry<boost::tuple<double, double>, bg::cs::cartesian>();
+ test_geometry<boost::tuple<double, double, double>, bg::cs::cartesian>();
+
+
+ // Test cartesian
+ test_all<bg::model::point<int, 2, bg::cs::cartesian>, bg::cs::cartesian>();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian>, bg::cs::cartesian>();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian>, bg::cs::cartesian>();
+
+ // Test spherical
+ test_all<bg::model::point<int, 2, bg::cs::spherical<bg::degree> >,
+ bg::cs::spherical<bg::degree> >();
+ test_all<bg::model::point<float, 2, bg::cs::spherical<bg::degree> >,
+ bg::cs::spherical<bg::degree> >();
+ test_all<bg::model::point<double, 2, bg::cs::spherical<bg::degree> >,
+ bg::cs::spherical<bg::degree> >();
+
+ test_all<bg::model::point<int, 2, bg::cs::spherical<bg::radian> >,
+ bg::cs::spherical<bg::radian> >();
+ test_all<bg::model::point<float, 2, bg::cs::spherical<bg::radian> >,
+ bg::cs::spherical<bg::radian> >();
+ test_all<bg::model::point<double, 2, bg::cs::spherical<bg::radian> >,
+ bg::cs::spherical<bg::radian> >();
+
+ // Test other
+ test_all<bg::model::point<double, 2, bg::cs::polar<bg::degree> >,
+ bg::cs::polar<bg::degree> >();
+
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> >,
+ bg::cs::geographic<bg::degree> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/coordinate_type.cpp b/src/boost/libs/geometry/test/core/coordinate_type.cpp
new file mode 100644
index 000000000..e382a8908
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/coordinate_type.cpp
@@ -0,0 +1,78 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/core/coordinate_type.hpp>
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, typename Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(typeid(typename bg::coordinate_type<G>::type).name(),
+ typeid(Expected).name());
+}
+
+template <typename P, typename Expected>
+void test_all()
+{
+ test_geometry<P, Expected>();
+ test_geometry<P const, Expected>();
+ test_geometry<bg::model::linestring<P> , Expected>();
+ test_geometry<bg::model::ring<P> , Expected>();
+ test_geometry<bg::model::polygon<P> , Expected>();
+ test_geometry<bg::model::box<P> , Expected>();
+ test_geometry<bg::model::segment<P> , Expected>();
+ test_geometry<bg::model::referring_segment<P const> , Expected>();
+
+ test_geometry<std::vector<P>, Expected>();
+ test_geometry<std::deque<P>, Expected>();
+}
+
+int test_main(int, char* [])
+{
+ test_geometry<int[2], int>();
+ test_geometry<float[2], float>();
+ test_geometry<double[2], double>();
+
+ test_geometry<int[3], int>();
+ test_geometry<float[3], float>();
+ test_geometry<double[3], double>();
+
+ test_geometry<boost::tuple<float, float>, float>();
+ test_geometry<boost::tuple<double, double>, double>();
+ test_geometry<boost::tuple<long double, long double>, long double>();
+ test_geometry<boost::tuple<double, double, double>, double>();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian>, int>();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian>, float>();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian>, double>();
+ test_all<bg::model::point<long double, 2, bg::cs::cartesian>, long double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/geometry_id.cpp b/src/boost/libs/geometry/test/core/geometry_id.cpp
new file mode 100644
index 000000000..3d7f89c95
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/geometry_id.cpp
@@ -0,0 +1,73 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/core/geometry_id.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, int Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(bg::geometry_id<G>::type::value, Expected);
+}
+
+template <typename P>
+void test_all()
+{
+ test_geometry<P, 1>();
+ test_geometry<P const, 1>();
+ test_geometry<bg::model::linestring<P> , 2>();
+ test_geometry<bg::model::ring<P> , 93>();
+ test_geometry<bg::model::polygon<P> , 3>();
+ test_geometry<bg::model::box<P> , 94>();
+ test_geometry<bg::model::segment<P> , 92>();
+ test_geometry<bg::model::referring_segment<P const> , 92>();
+
+ test_geometry<std::vector<P>, 2>();
+ test_geometry<std::deque<P>, 2>();
+}
+
+int test_main(int, char* [])
+{
+ test_geometry<int[2], 1>();
+ test_geometry<float[2], 1>();
+ test_geometry<double[2], 1>();
+
+ test_geometry<int[3], 1>();
+ test_geometry<float[3], 1>();
+ test_geometry<double[3], 1>();
+
+ test_geometry<boost::tuple<double, double>, 1>();
+ test_geometry<boost::tuple<double, double, double>, 1>();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/point_type.cpp b/src/boost/libs/geometry/test/core/point_type.cpp
new file mode 100644
index 000000000..1d6446dc6
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/point_type.cpp
@@ -0,0 +1,96 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/variant.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <boost/variant/variant.hpp>
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, typename Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(typeid(typename bg::point_type<G>::type).name(),
+ typeid(Expected).name());
+
+ static const bool is_same = boost::is_same<typename bg::point_type<G>::type, Expected>::value;
+ BOOST_CHECK(is_same);
+}
+
+template <typename P>
+void test_all()
+{
+ test_geometry<P, P>();
+ test_geometry<P const, P>();
+ test_geometry<P*, P>();
+ test_geometry<P&, P>();
+ test_geometry<P*&, P>();
+ test_geometry<const P *, P>();
+ test_geometry<bg::model::linestring<P> , P>();
+ test_geometry<bg::model::linestring<P> *&, P>();
+ test_geometry<bg::model::ring<P> , P>();
+ test_geometry<bg::model::polygon<P> , P>();
+ test_geometry<bg::model::box<P> , P>();
+ test_geometry<bg::model::segment<P> , P>();
+ test_geometry<bg::model::referring_segment<P const> , P>();
+
+ test_geometry<std::vector<P>, P>();
+ test_geometry<std::deque<P>, P>();
+}
+
+int test_main(int, char* [])
+{
+ test_geometry<int[2], int[2]>();
+ test_geometry<float[2], float[2]>();
+ test_geometry<double[2], double[2]>();
+
+ test_geometry<int[3], int[3]>();
+ test_geometry<float[3], float[3]>();
+ test_geometry<double[3], double[3]>();
+
+ test_geometry<boost::tuple<double, double>,
+ boost::tuple<double, double> >();
+ test_geometry<boost::tuple<double, double, double>,
+ boost::tuple<double, double, double> >();
+
+ test_geometry<boost::variant<bg::model::box<boost::tuple<double, double> > >,
+ boost::tuple<double, double> >();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/radian_access.cpp b/src/boost/libs/geometry/test/core/radian_access.cpp
new file mode 100644
index 000000000..d0aa59ac3
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/radian_access.cpp
@@ -0,0 +1,110 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/radian_access.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/geometries/point.hpp>
+
+
+template <std::size_t D, typename P, typename T>
+void test_get(T const& c, T const& e)
+{
+ //std::cout << "get_as_radian " << typeid(P).name() << std::endl;
+
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+
+ P p;
+ bg::set<D>(p, coordinate_type(c));
+
+ coordinate_type g = bg::get_as_radian<D>(p);
+
+ BOOST_CHECK_CLOSE(double(g), double(e), 0.0001);
+}
+
+
+template <std::size_t D, typename P, typename T>
+void test_set(T const& c, T const& e)
+{
+ //std::cout << "set_from_radian " << typeid(P).name() << std::endl;
+
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+
+ P p;
+ bg::set_from_radian<D>(p, coordinate_type(c));
+
+ coordinate_type g = bg::get<D>(p);
+
+ BOOST_CHECK_CLOSE(double(g), double(e), 0.0001);
+}
+
+
+template <typename T>
+void test()
+{
+ double d2r = 3.1415926535897932384626433832795 / 180.0;
+
+ // Degree
+ test_get<0, bg::model::point<T, 2, bg::cs::spherical<bg::degree> > >
+ (1.0, 1.0 * d2r);
+ test_get<1, bg::model::point<T, 2, bg::cs::spherical<bg::degree> > >
+ (2.0, 2.0 * d2r);
+
+ test_set<0, bg::model::point<T, 2, bg::cs::spherical<bg::degree> > >
+ (1.0, 1.0 / d2r);
+ test_set<1, bg::model::point<T, 2, bg::cs::spherical<bg::degree> > >
+ (2.0, 2.0 / d2r);
+
+
+ // Radian
+ test_get<0, bg::model::point<T, 2, bg::cs::spherical<bg::radian> > >
+ (1.0, 1.0);
+ test_get<1, bg::model::point<T, 2, bg::cs::spherical<bg::radian> > >
+ (1.0, 1.0);
+
+ test_set<0, bg::model::point<T, 2, bg::cs::spherical<bg::radian> > >
+ (1.0, 1.0);
+ test_set<1, bg::model::point<T, 2, bg::cs::spherical<bg::radian> > >
+ (1.0, 1.0);
+
+
+ // Cartesian (== untouched, no conversion)
+ test_get<0, bg::model::point<T, 2, bg::cs::cartesian> >
+ (1.0, 1.0);
+ test_get<1, bg::model::point<T, 2, bg::cs::cartesian> >
+ (1.0, 1.0);
+
+ // Dimension >=2, should always be untouched, even for degree
+ // (assuming lat/lon + height)
+ test_set<2, bg::model::point<T, 3, bg::cs::spherical<bg::radian> > >
+ (1.0, 1.0);
+ test_set<2, bg::model::point<T, 3, bg::cs::spherical<bg::degree> > >
+ (1.0, 1.0);
+
+}
+
+
+
+
+int test_main(int, char* [])
+{
+ //test<float>();
+ test<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/radius.cpp b/src/boost/libs/geometry/test/core/radius.cpp
new file mode 100644
index 000000000..719dcdcdb
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/radius.cpp
@@ -0,0 +1,64 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/core/radius.hpp>
+
+#include <boost/geometry/srs/sphere.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+
+#include <boost/geometry/algorithms/make.hpp>
+
+
+template <std::size_t I, typename G>
+void test_get_set()
+{
+ typedef typename bg::radius_type<G>::type radius_type;
+
+ G g;
+ bg::set_radius<I>(g, radius_type(5));
+
+ radius_type x = bg::get_radius<I>(g);
+
+ BOOST_CHECK_CLOSE(double(x), 5.0, 0.0001);
+}
+
+template <typename T>
+void test_all()
+{
+ typedef bg::srs::spheroid<T> Sd;
+ test_get_set<0, Sd>();
+ test_get_set<2, Sd>();
+
+ typedef bg::srs::sphere<T> Se;
+ test_get_set<0, Se>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<int>();
+ test_all<float>();
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/reverse_dispatch.cpp b/src/boost/libs/geometry/test/core/reverse_dispatch.cpp
new file mode 100644
index 000000000..cff472ec2
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/reverse_dispatch.cpp
@@ -0,0 +1,65 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/reverse_dispatch.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+
+template <typename Geometry1, typename Geometry2, bool Expected>
+void test_reversed()
+{
+ BOOST_CHECK_EQUAL((bg::reverse_dispatch<Geometry1, Geometry2>::type::value),
+ Expected);
+}
+
+
+template <typename P>
+void test_all()
+{
+
+ test_reversed<P, P, false>();
+ test_reversed<P, bg::model::linestring<P>, false>();
+ test_reversed<bg::model::linestring<P>, P, true>();
+ test_reversed<bg::model::ring<P>, P, true>();
+ test_reversed<bg::model::linestring<P>, bg::model::ring<P>, false>();
+ test_reversed<bg::model::ring<P>, bg::model::linestring<P>, true>();
+}
+
+template <typename P1, typename P2>
+void test_mixed()
+{
+ test_reversed<P1, P2, false>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_mixed
+ <
+ bg::model::point<int, 2, bg::cs::cartesian>,
+ bg::model::point<int, 2, bg::cs::spherical<bg::degree> >
+ >();
+ test_mixed
+ <
+ bg::model::point<int, 2, bg::cs::spherical<bg::degree> >,
+ bg::model::point<int, 2, bg::cs::spherical<bg::radian> >
+ >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/ring.cpp b/src/boost/libs/geometry/test/core/ring.cpp
new file mode 100644
index 000000000..cf7ee5d7e
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/ring.cpp
@@ -0,0 +1,99 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+// To be tested:
+#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/core/exterior_ring.hpp>
+#include <boost/geometry/core/interior_rings.hpp>
+
+// For geometries:
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+template <typename Poly>
+void test_order_closure(bg::order_selector expected_order, bg::closure_selector exptected_closure)
+{
+ bg::order_selector order = bg::point_order<Poly>::value;
+ bg::closure_selector closure = bg::closure<Poly>::value;
+
+ BOOST_CHECK_EQUAL(order, expected_order);
+ BOOST_CHECK_EQUAL(closure, exptected_closure);
+}
+
+
+template <typename P>
+void test_ring(std::string const& wkt,
+ std::size_t expected_main_count,
+ std::size_t expected_interior_ring_count,
+ std::size_t expected_first_interior_count)
+{
+ typedef bg::model::polygon<P> the_polygon;
+ typedef typename bg::ring_type<the_polygon>::type the_ring;
+ typedef typename bg::interior_return_type<the_polygon const>::type the_interior;
+
+ the_polygon poly;
+ bg::read_wkt(wkt, poly);
+
+ the_ring ext = bg::exterior_ring(poly);
+ the_interior rings = bg::interior_rings(poly);
+
+ BOOST_CHECK_EQUAL(bg::num_interior_rings(poly), expected_interior_ring_count);
+ BOOST_CHECK_EQUAL(boost::size(rings), expected_interior_ring_count);
+ BOOST_CHECK_EQUAL(boost::size(ext), expected_main_count);
+ if (boost::size(rings))
+ {
+ BOOST_CHECK_EQUAL(boost::size(rings.front()), expected_first_interior_count);
+ }
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_ring<P>("POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))", 5, 1, 5);
+ test_ring<P>("POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,2 2,2 1,1 1),(1 1,1 2,2 2,1 1))", 5, 2, 4);
+ test_ring<P>("POLYGON((0 0,0 3,3 3,3 0,0 0))", 5, 0, 0);
+
+ test_order_closure< bg::model::polygon<P, true, true> >(bg::clockwise, bg::closed);
+ test_order_closure< bg::model::polygon<P, true, false> >(bg::clockwise, bg::open);
+ test_order_closure< bg::model::polygon<P, false, true> >(bg::counterclockwise, bg::closed);
+ test_order_closure< bg::model::polygon<P, false, false> >(bg::counterclockwise, bg::open);
+
+ test_order_closure< bg::model::polygon<P> *>(bg::clockwise, bg::closed);
+ test_order_closure< bg::model::polygon<P> &>(bg::clockwise, bg::closed);
+ test_order_closure< bg::model::polygon<P> const>(bg::clockwise, bg::closed);
+ test_order_closure< bg::model::polygon<P> *&>(bg::clockwise, bg::closed);
+ test_order_closure< const bg::model::polygon<P> *>(bg::clockwise, bg::closed);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/tag.cpp b/src/boost/libs/geometry/test/core/tag.cpp
new file mode 100644
index 000000000..f67c58d4b
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/tag.cpp
@@ -0,0 +1,89 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, typename Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(typeid(typename bg::tag<G>::type).name(),
+ typeid(Expected).name());
+
+ static const bool is_same = boost::is_same<typename bg::tag<G>::type, Expected>::value;
+ BOOST_CHECK(is_same);
+}
+
+template <typename P, size_t D>
+void test_all()
+{
+ test_geometry<P, bg::point_tag>();
+ test_geometry<P const, bg::point_tag>();
+ test_geometry<P*, bg::point_tag>();
+ test_geometry<P&, bg::point_tag>();
+ test_geometry<P*&, bg::point_tag>();
+ test_geometry<const P *, bg::point_tag>();
+ test_geometry<bg::model::linestring<P> , bg::linestring_tag>();
+ test_geometry<bg::model::linestring<P> *&, bg::linestring_tag>();
+ test_geometry<bg::model::ring<P> , bg::ring_tag>();
+ test_geometry<bg::model::polygon<P> , bg::polygon_tag>();
+ test_geometry<bg::model::box<P> , bg::box_tag>();
+ test_geometry<bg::model::segment<P> , bg::segment_tag>();
+ test_geometry<bg::model::referring_segment<P const> , bg::segment_tag>();
+
+ test_geometry<std::vector<P>, bg::linestring_tag>();
+ test_geometry<std::deque<P>, bg::linestring_tag>();
+
+}
+
+int test_main(int, char* [])
+{
+ test_geometry<int[2], bg::point_tag>();
+ test_geometry<float[2], bg::point_tag>();
+ test_geometry<double[2], bg::point_tag>();
+
+ test_geometry<int[3], bg::point_tag>();
+ test_geometry<float[3], bg::point_tag>();
+ test_geometry<double[3], bg::point_tag>();
+
+ test_geometry<boost::tuple<double, double>, bg::point_tag>();
+ test_geometry<boost::tuple<double, double, double>, bg::point_tag>();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian>, 2 >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian>, 2 >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian>, 2 >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/core/topological_dimension.cpp b/src/boost/libs/geometry/test/core/topological_dimension.cpp
new file mode 100644
index 000000000..392e5f866
--- /dev/null
+++ b/src/boost/libs/geometry/test/core/topological_dimension.cpp
@@ -0,0 +1,73 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/topological_dimension.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+
+#include <vector>
+#include <deque>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+
+template <typename G, int Expected>
+void test_geometry()
+{
+ BOOST_CHECK_EQUAL(bg::topological_dimension<G>::type::value, Expected);
+}
+
+template <typename P>
+void test_all()
+{
+ test_geometry<P, 0>();
+ test_geometry<P const, 0>();
+ test_geometry<bg::model::linestring<P> , 1>();
+ test_geometry<bg::model::ring<P> , 2>(); // being discussed
+ test_geometry<bg::model::polygon<P> , 2>();
+ test_geometry<bg::model::box<P> , 2>();
+ test_geometry<bg::model::segment<P> , 1>();
+ test_geometry<bg::model::referring_segment<P const> , 1>();
+
+ test_geometry<std::vector<P>, 1>();
+ test_geometry<std::deque<P>, 1>();
+
+}
+
+int test_main(int, char* [])
+{
+ test_geometry<int[2], 0>();
+ test_geometry<float[2], 0>();
+ test_geometry<double[2], 0>();
+
+ test_geometry<int[3], 0>();
+ test_geometry<float[3], 0>();
+ test_geometry<double[3], 0>();
+
+ test_geometry<boost::tuple<double, double>, 0>();
+ test_geometry<boost::tuple<double, double, double>, 0>();
+
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/Jamfile b/src/boost/libs/geometry/test/cs_undefined/Jamfile
new file mode 100644
index 000000000..b5e53d916
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/Jamfile
@@ -0,0 +1,21 @@
+# Boost.Geometry
+#
+# Copyright (c) 2019, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Licensed under the Boost Software License version 1.0.
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-cs_undefined
+ :
+ [ compile distance.cpp : : csundef_distance ]
+ [ compile envelope_expand.cpp : : csundef_envelope_expand ]
+ [ compile index.cpp : : csundef_index ]
+ [ compile is.cpp : : csundef_is ]
+ [ compile measure.cpp : : csundef_measure ]
+ [ compile other.cpp : : csundef_other ]
+ [ compile relops1.cpp : : csundef_relops1 ]
+ [ compile relops2.cpp : : csundef_relops2 ]
+ [ compile setops.cpp : : csundef_setops ]
+ ;
diff --git a/src/boost/libs/geometry/test/cs_undefined/common.hpp b/src/boost/libs/geometry/test/cs_undefined/common.hpp
new file mode 100644
index 000000000..92cb80680
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/common.hpp
@@ -0,0 +1,69 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_CS_UNDEFINED_COMMON_HPP
+#define BOOST_GEOMETRY_TEST_CS_UNDEFINED_COMMON_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+struct geom
+{
+ //typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+ typedef bg::model::point<double, 2, bg::cs::undefined> point;
+ typedef bg::model::box<point> box;
+ typedef bg::model::segment<point> segment;
+ typedef bg::model::linestring<point> linestring;
+ typedef bg::model::ring<point> ring;
+ typedef bg::model::polygon<point> polygon;
+ typedef bg::model::multi_linestring<linestring> multi_linestring;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+ typedef bg::model::multi_point<point> multi_point;
+
+ geom()
+ {
+ pt = point(0, 0);
+ b = box(point(-1, -1), point(1, 1));
+ s = segment(point(0, 0), point(1, 1));
+ ls.push_back(point(0, 0));
+ ls.push_back(point(1, 1));
+ ls.push_back(point(1.1, 1.1));
+ r.push_back(point(0, 0));
+ r.push_back(point(0, 1));
+ r.push_back(point(1, 1));
+ r.push_back(point(1, 0));
+ r.push_back(point(0, 0));
+ po.outer() = r;
+ po.inners().push_back(ring());
+ po.inners().back().push_back(point(0, 0));
+ po.inners().back().push_back(point(0.2, 0.1));
+ po.inners().back().push_back(point(0.1, 0.2));
+ po.inners().back().push_back(point(0, 0));
+ mls.push_back(ls);
+ mpo.push_back(po);
+ mpt.push_back(pt);
+ }
+
+ point pt;
+ box b;
+ segment s;
+ linestring ls;
+ ring r;
+ polygon po;
+ multi_linestring mls;
+ multi_polygon mpo;
+ multi_point mpt;
+};
+
+#endif // BOOST_GEOMETRY_TEST_CS_UNDEFINED_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/cs_undefined/distance.cpp b/src/boost/libs/geometry/test/cs_undefined/distance.cpp
new file mode 100644
index 000000000..8bd03a44c
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/distance.cpp
@@ -0,0 +1,113 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/distance.hpp>
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ bg::distance(g.pt, g.pt, bg::strategy::distance::pythagoras<>());
+ bg::distance(g.pt, g.pt, bg::strategy::distance::haversine<>());
+ bg::distance(g.pt, g.pt, bg::strategy::distance::geographic<>());
+ bg::distance(g.pt, g.mpt, bg::strategy::distance::pythagoras<>());
+ bg::distance(g.pt, g.mpt, bg::strategy::distance::haversine<>());
+ bg::distance(g.pt, g.mpt, bg::strategy::distance::geographic<>());
+ bg::distance(g.mpt, g.mpt, bg::strategy::distance::pythagoras<>());
+ bg::distance(g.mpt, g.mpt, bg::strategy::distance::haversine<>());
+ bg::distance(g.mpt, g.mpt, bg::strategy::distance::geographic<>());
+ bg::distance(g.pt, g.ls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.pt, g.ls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.pt, g.ls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.pt, g.mls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.pt, g.mls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.pt, g.mls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpt, g.ls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpt, g.ls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpt, g.ls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpt, g.mls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpt, g.mls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpt, g.mls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.ls, g.ls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.ls, g.ls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.ls, g.ls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.ls, g.mls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.ls, g.mls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.ls, g.mls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mls, g.mls, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mls, g.mls, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mls, g.mls, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.pt, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.pt, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.pt, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.pt, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.pt, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.pt, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.pt, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.pt, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.pt, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpt, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpt, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpt, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpt, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpt, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpt, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpt, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpt, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpt, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.ls, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.ls, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.ls, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.ls, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.ls, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.ls, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.ls, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.ls, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.ls, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mls, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mls, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mls, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mls, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mls, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mls, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mls, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mls, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mls, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.r, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.r, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.r, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.r, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.r, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.r, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.r, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.r, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.r, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.po, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.po, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.po, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.po, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.po, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.po, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.po, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.po, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.po, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpo, g.r, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpo, g.r, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpo, g.r, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpo, g.po, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpo, g.po, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpo, g.po, bg::strategy::distance::geographic_cross_track<>());
+ bg::distance(g.mpo, g.mpo, bg::strategy::distance::projected_point<>());
+ bg::distance(g.mpo, g.mpo, bg::strategy::distance::cross_track<>());
+ bg::distance(g.mpo, g.mpo, bg::strategy::distance::geographic_cross_track<>());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/envelope_expand.cpp b/src/boost/libs/geometry/test/cs_undefined/envelope_expand.cpp
new file mode 100644
index 000000000..5d16e6f25
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/envelope_expand.cpp
@@ -0,0 +1,53 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/algorithms/expand.hpp>
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ bg::expand(g.b, g.pt, bg::strategy::expand::cartesian_point());
+ bg::expand(g.b, g.pt, bg::strategy::expand::spherical_point());
+ bg::expand(g.b, g.b, bg::strategy::expand::cartesian_box());
+ bg::expand(g.b, g.b, bg::strategy::expand::spherical_box());
+ bg::expand(g.b, g.s, bg::strategy::expand::cartesian_segment());
+ bg::expand(g.b, g.s, bg::strategy::expand::spherical_segment<>());
+ bg::expand(g.b, g.s, bg::strategy::expand::geographic_segment<>());
+
+ bg::envelope(g.pt, g.b, bg::strategy::envelope::cartesian_point());
+ bg::envelope(g.pt, g.b, bg::strategy::envelope::spherical_point());
+ bg::envelope(g.b, g.b, bg::strategy::envelope::cartesian_box());
+ bg::envelope(g.b, g.b, bg::strategy::envelope::spherical_box());
+ bg::envelope(g.s, g.b, bg::strategy::envelope::cartesian_segment<>());
+ bg::envelope(g.s, g.b, bg::strategy::envelope::spherical_segment<>());
+ bg::envelope(g.s, g.b, bg::strategy::envelope::geographic_segment<>());
+ bg::envelope(g.ls, g.b, bg::strategy::envelope::cartesian<>());
+ bg::envelope(g.ls, g.b, bg::strategy::envelope::spherical<>());
+ bg::envelope(g.ls, g.b, bg::strategy::envelope::geographic<>());
+ bg::envelope(g.r, g.b, bg::strategy::envelope::cartesian<>());
+ bg::envelope(g.r, g.b, bg::strategy::envelope::spherical<>());
+ bg::envelope(g.r, g.b, bg::strategy::envelope::geographic<>());
+ bg::envelope(g.po, g.b, bg::strategy::envelope::cartesian<>());
+ bg::envelope(g.po, g.b, bg::strategy::envelope::spherical<>());
+ bg::envelope(g.po, g.b, bg::strategy::envelope::geographic<>());
+ bg::envelope(g.mls, g.b, bg::strategy::envelope::cartesian<>());
+ bg::envelope(g.mls, g.b, bg::strategy::envelope::spherical<>());
+ bg::envelope(g.mls, g.b, bg::strategy::envelope::geographic<>());
+ bg::envelope(g.mpo, g.b, bg::strategy::envelope::cartesian<>());
+ bg::envelope(g.mpo, g.b, bg::strategy::envelope::spherical<>());
+ bg::envelope(g.mpo, g.b, bg::strategy::envelope::geographic<>());
+ bg::envelope(g.mpt, g.b, bg::strategy::envelope::cartesian_multipoint());
+ bg::envelope(g.mpt, g.b, bg::strategy::envelope::spherical_multipoint());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/index.cpp b/src/boost/libs/geometry/test/cs_undefined/index.cpp
new file mode 100644
index 000000000..008187044
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/index.cpp
@@ -0,0 +1,101 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+// These includes are required for the following code to compile.
+// This is probably wrong.
+#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/disjoint.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+
+#include <boost/geometry/index/rtree.hpp>
+
+#include <vector>
+
+namespace bgi = boost::geometry::index;
+
+template
+<
+ typename VG, typename QG,
+ typename VTag = typename bg::tag<VG>::type,
+ typename QTag = typename bg::tag<QG>::type
+>
+struct call_query
+{
+ template <typename Rtree, typename Res>
+ static inline void apply(Rtree const& , Res const& )
+ {}
+};
+
+template <typename VG, typename QG>
+struct call_query<VG, QG, bg::box_tag, bg::point_tag>
+{
+ template <typename Rtree>
+ static inline void apply(Rtree const& rtree, QG const& qg)
+ {
+ std::vector<VG> res;
+ rtree.query(bgi::intersects(qg), std::back_inserter(res));
+ }
+};
+
+template <typename G, typename P>
+inline void rtree_test(G const& g, P const& p)
+{
+ {
+ bgi::rtree<G, P> rtree;
+ }
+
+ std::vector<G> de2(100, g);
+
+ bgi::rtree<G, P> rtree(de2, p);
+ rtree.insert(g);
+ rtree.remove(g);
+ rtree.count(g);
+
+ call_query<G, geom::point>::apply(rtree, geom::point(0, 0));
+}
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ rtree_test(g.pt, bgi::parameters<bgi::linear<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.pt, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.pt, bgi::parameters<bgi::rstar<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.b, bgi::parameters<bgi::linear<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.b, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.b, bgi::parameters<bgi::rstar<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.s, bgi::parameters<bgi::linear<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.s, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::cartesian<> >());
+ rtree_test(g.s, bgi::parameters<bgi::rstar<4>, bg::strategy::index::cartesian<> >());
+
+ rtree_test(g.pt, bgi::parameters<bgi::linear<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.pt, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.pt, bgi::parameters<bgi::rstar<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.b, bgi::parameters<bgi::linear<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.b, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.b, bgi::parameters<bgi::rstar<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.s, bgi::parameters<bgi::linear<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.s, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::spherical<> >());
+ rtree_test(g.s, bgi::parameters<bgi::rstar<4>, bg::strategy::index::spherical<> >());
+
+ rtree_test(g.pt, bgi::parameters<bgi::linear<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.pt, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.pt, bgi::parameters<bgi::rstar<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.b, bgi::parameters<bgi::linear<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.b, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.b, bgi::parameters<bgi::rstar<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.s, bgi::parameters<bgi::linear<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.s, bgi::parameters<bgi::quadratic<4>, bg::strategy::index::geographic<> >());
+ rtree_test(g.s, bgi::parameters<bgi::rstar<4>, bg::strategy::index::geographic<> >());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/is.cpp b/src/boost/libs/geometry/test/cs_undefined/is.cpp
new file mode 100644
index 000000000..c043d301b
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/is.cpp
@@ -0,0 +1,44 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/is_simple.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+
+template <typename G, typename S>
+inline void is(G const& g, S const& s)
+{
+ bg::is_simple(g, s);
+ bg::is_valid(g, s);
+}
+
+template <typename G>
+inline void is_x(G const& g)
+{
+ ::is(g, bg::strategy::intersection::cartesian_segments<>());
+ ::is(g, bg::strategy::intersection::spherical_segments<>());
+ ::is(g, bg::strategy::intersection::geographic_segments<>());
+}
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ ::is_x(g.pt);
+ ::is_x(g.mpt);
+ ::is_x(g.s);
+ ::is_x(g.ls);
+ ::is_x(g.mls);
+ ::is_x(g.r);
+ ::is_x(g.po);
+ ::is_x(g.mpo);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/measure.cpp b/src/boost/libs/geometry/test/cs_undefined/measure.cpp
new file mode 100644
index 000000000..40d8a4f97
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/measure.cpp
@@ -0,0 +1,51 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/perimeter.hpp>
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ bg::area(g.r, bg::strategy::area::cartesian<>());
+ bg::area(g.r, bg::strategy::area::spherical<>());
+ bg::area(g.r, bg::strategy::area::geographic<>());
+ bg::area(g.po, bg::strategy::area::cartesian<>());
+ bg::area(g.po, bg::strategy::area::spherical<>());
+ bg::area(g.po, bg::strategy::area::geographic<>());
+ bg::area(g.mpo, bg::strategy::area::cartesian<>());
+ bg::area(g.mpo, bg::strategy::area::spherical<>());
+ bg::area(g.mpo, bg::strategy::area::geographic<>());
+
+ bg::length(g.s, bg::strategy::distance::pythagoras<>());
+ bg::length(g.s, bg::strategy::distance::haversine<>());
+ bg::length(g.s, bg::strategy::distance::geographic<>());
+ bg::length(g.ls, bg::strategy::distance::pythagoras<>());
+ bg::length(g.ls, bg::strategy::distance::haversine<>());
+ bg::length(g.ls, bg::strategy::distance::geographic<>());
+ bg::length(g.mls, bg::strategy::distance::pythagoras<>());
+ bg::length(g.mls, bg::strategy::distance::haversine<>());
+ bg::length(g.mls, bg::strategy::distance::geographic<>());
+
+ bg::perimeter(g.r, bg::strategy::distance::pythagoras<>());
+ bg::perimeter(g.r, bg::strategy::distance::haversine<>());
+ bg::perimeter(g.r, bg::strategy::distance::geographic<>());
+ bg::perimeter(g.po, bg::strategy::distance::pythagoras<>());
+ bg::perimeter(g.po, bg::strategy::distance::haversine<>());
+ bg::perimeter(g.po, bg::strategy::distance::geographic<>());
+ bg::perimeter(g.mpo, bg::strategy::distance::pythagoras<>());
+ bg::perimeter(g.mpo, bg::strategy::distance::haversine<>());
+ bg::perimeter(g.mpo, bg::strategy::distance::geographic<>());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/other.cpp b/src/boost/libs/geometry/test/cs_undefined/other.cpp
new file mode 100644
index 000000000..fe2ad6501
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/other.cpp
@@ -0,0 +1,40 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/centroid.hpp>
+#include <boost/geometry/algorithms/simplify.hpp>
+
+template <typename G>
+inline void simplify(G const& g1, G & g2)
+{
+ bg::simplify(g1, g2, 1, bg::strategy::simplify::douglas_peucker<geom::point, bg::strategy::distance::projected_point<> >());
+ bg::simplify(g1, g2, 1, bg::strategy::simplify::douglas_peucker<geom::point, bg::strategy::distance::cross_track<> >());
+
+ // TODO: douglas_peucker does not define a ctor taking distance strategy
+ // which is needed in geographic CS
+ bg::simplify(g1, g2, 1, bg::strategy::simplify::douglas_peucker<geom::point, bg::strategy::distance::geographic_cross_track<> >());
+}
+
+int test_main(int, char*[])
+{
+ geom g, o;
+
+ // this compiles but it shouldn't!
+ // internally default_strategy is defined as not_applicable_strategy for box
+ bg::centroid(g.b, o.pt);
+
+ ::simplify(g.ls, o.ls);
+ // TODO:
+ //::simplify(g.r, o.r); // area (point order) strategy not propagated
+ //::simplify(g.po, o.po); // area (point order) strategy not propagated
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/relops1.cpp b/src/boost/libs/geometry/test/cs_undefined/relops1.cpp
new file mode 100644
index 000000000..c22bb6b07
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/relops1.cpp
@@ -0,0 +1,50 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "test_relops.hpp"
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ bg::disjoint(g.pt, g.b, bg::strategy::covered_by::cartesian_point_box());
+ bg::disjoint(g.pt, g.b, bg::strategy::covered_by::spherical_point_box());
+ bg::disjoint(g.b, g.b, bg::strategy::disjoint::cartesian_box_box());
+ bg::disjoint(g.b, g.b, bg::strategy::disjoint::spherical_box_box());
+ bg::within(g.pt, g.b, bg::strategy::within::cartesian_point_box());
+ bg::within(g.pt, g.b, bg::strategy::within::spherical_point_box());
+ bg::within(g.b, g.b, bg::strategy::within::cartesian_box_box());
+ bg::within(g.b, g.b, bg::strategy::within::spherical_box_box());
+ bg::covered_by(g.pt, g.b, bg::strategy::covered_by::cartesian_point_box());
+ bg::covered_by(g.pt, g.b, bg::strategy::covered_by::spherical_point_box());
+ bg::covered_by(g.b, g.b, bg::strategy::covered_by::cartesian_box_box());
+ bg::covered_by(g.b, g.b, bg::strategy::covered_by::spherical_box_box());
+
+ // P/P
+ ::rel_pp(g.pt, g.pt);
+ ::rel_pp(g.pt, g.mpt);
+ ::rel_pp(g.mpt, g.mpt);
+
+ // P/L
+ //::rel_ps(g.pt, g.s); // relate not implemented
+ ::rel_ps(g.pt, g.ls);
+ ::rel_ps(g.pt, g.mls);
+ //::rel_ps(g.mpt, g.s); // relate not implemented
+ ::rel_ps(g.mpt, g.ls);
+ ::rel_ps(g.mpt, g.mls);
+ // P/A
+ ::rel_ps(g.pt, g.r);
+ ::rel_ps(g.mpt, g.r);
+ ::rel_ps(g.pt, g.po);
+ ::rel_ps(g.mpt, g.po);
+ ::rel_ps(g.pt, g.mpo);
+ ::rel_ps(g.mpt, g.mpo);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/relops2.cpp b/src/boost/libs/geometry/test/cs_undefined/relops2.cpp
new file mode 100644
index 000000000..11f971b87
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/relops2.cpp
@@ -0,0 +1,48 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "test_relops.hpp"
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ // L/L
+ //::rel_ss(g.s, g.s); // relate not implemented
+ //::rel_ss(g.s, g.ls); // relate not implemented
+ //::rel_ss(g.s, g.mls); // relate not implemented
+ //::rel_ss(g.ls, g.s); // relate not implemented
+ ::rel_ss(g.ls, g.ls);
+ ::rel_ss(g.ls, g.mls);
+ //::rel_ss(g.mls, g.s); // relate not implemented
+ ::rel_ss(g.mls, g.ls);
+ ::rel_ss(g.mls, g.mls);
+ // L/A
+ //::rel_ss(g.s, g.r); // relate not implemented
+ ::rel_ss(g.ls, g.r);
+ ::rel_ss(g.mls, g.r);
+ //::rel_ss(g.s, g.po); // relate not implemented
+ ::rel_ss(g.ls, g.po);
+ ::rel_ss(g.mls, g.po);
+ //::rel_ss(g.s, g.mpo); // relate not implemented
+ ::rel_ss(g.ls, g.mpo);
+ ::rel_ss(g.mls, g.mpo);
+ // A/A
+ ::rel_ss(g.r, g.r);
+ ::rel_ss(g.po, g.r);
+ ::rel_ss(g.mpo, g.r);
+ ::rel_ss(g.r, g.po);
+ ::rel_ss(g.po, g.po);
+ ::rel_ss(g.mpo, g.po);
+ ::rel_ss(g.r, g.mpo);
+ ::rel_ss(g.po, g.mpo);
+ ::rel_ss(g.mpo, g.mpo);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/setops.cpp b/src/boost/libs/geometry/test/cs_undefined/setops.cpp
new file mode 100644
index 000000000..d684214a4
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/setops.cpp
@@ -0,0 +1,281 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/sym_difference.hpp>
+#include <boost/geometry/algorithms/union.hpp>
+
+template <typename G1, typename G2, typename G3, typename S>
+inline void set_idsu(G1 const& g1, G2 const& g2, G3 & g3, S const& s)
+{
+ bg::intersection(g1, g2, g3, s);
+ bg::difference(g1, g2, g3, s);
+ bg::sym_difference(g1, g2, g3, s);
+ bg::union_(g1, g2, g3, s);
+}
+
+template <typename G1, typename G2, typename G3, typename S>
+inline void set_ids(G1 const& g1, G2 const& g2, G3 & g3, S const& s)
+{
+ bg::intersection(g1, g2, g3, s);
+ bg::difference(g1, g2, g3, s);
+ bg::sym_difference(g1, g2, g3, s);
+}
+
+template <typename G1, typename G2, typename G3, typename S>
+inline void set_id(G1 const& g1, G2 const& g2, G3 & g3, S const& s)
+{
+ bg::intersection(g1, g2, g3, s);
+ bg::difference(g1, g2, g3, s);
+}
+
+template <typename G1, typename G2, typename G3, typename S>
+inline void set_i(G1 const& g1, G2 const& g2, G3 & g3, S const& s)
+{
+ bg::intersection(g1, g2, g3, s);
+}
+
+template <typename G1, typename G2, typename G3, typename S>
+inline void set_d(G1 const& g1, G2 const& g2, G3 & g3, S const& s)
+{
+ bg::difference(g1, g2, g3, s);
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_idsu_pp(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_idsu(g1, g2, g3, bg::strategy::within::cartesian_point_point());
+ ::set_idsu(g1, g2, g3, bg::strategy::within::spherical_point_point());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_idsu_ps(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ typedef typename bg::point_type<G1>::type point_type;
+ ::set_idsu(g1, g2, g3, bg::strategy::within::cartesian_winding<point_type>());
+ ::set_idsu(g1, g2, g3, bg::strategy::within::spherical_winding<point_type>());
+ ::set_idsu(g1, g2, g3, bg::strategy::within::geographic_winding<point_type>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_idsu_ss(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_idsu(g1, g2, g3, bg::strategy::intersection::cartesian_segments<>());
+ ::set_idsu(g1, g2, g3, bg::strategy::intersection::spherical_segments<>());
+ ::set_idsu(g1, g2, g3, bg::strategy::intersection::geographic_segments<>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_ids_pp(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_ids(g1, g2, g3, bg::strategy::within::cartesian_point_point());
+ ::set_ids(g1, g2, g3, bg::strategy::within::spherical_point_point());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_ids_ps(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ typedef typename bg::point_type<G1>::type point_type;
+ ::set_ids(g1, g2, g3, bg::strategy::within::cartesian_winding<point_type>());
+ ::set_ids(g1, g2, g3, bg::strategy::within::spherical_winding<point_type>());
+ ::set_ids(g1, g2, g3, bg::strategy::within::geographic_winding<point_type>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_ids_ss(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_ids(g1, g2, g3, bg::strategy::intersection::cartesian_segments<>());
+ ::set_ids(g1, g2, g3, bg::strategy::intersection::spherical_segments<>());
+ ::set_ids(g1, g2, g3, bg::strategy::intersection::geographic_segments<>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_id_pp(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_id(g1, g2, g3, bg::strategy::within::cartesian_point_point());
+ ::set_id(g1, g2, g3, bg::strategy::within::spherical_point_point());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_id_ps(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ typedef typename bg::point_type<G1>::type point_type;
+ ::set_id(g1, g2, g3, bg::strategy::within::cartesian_winding<point_type>());
+ ::set_id(g1, g2, g3, bg::strategy::within::spherical_winding<point_type>());
+ ::set_id(g1, g2, g3, bg::strategy::within::geographic_winding<point_type>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_id_ss(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_id(g1, g2, g3, bg::strategy::intersection::cartesian_segments<>());
+ ::set_id(g1, g2, g3, bg::strategy::intersection::spherical_segments<>());
+ ::set_id(g1, g2, g3, bg::strategy::intersection::geographic_segments<>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_i_pp(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_i(g1, g2, g3, bg::strategy::within::cartesian_point_point());
+ ::set_i(g1, g2, g3, bg::strategy::within::spherical_point_point());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_i_ps(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ typedef typename bg::point_type<G1>::type point_type;
+ ::set_i(g1, g2, g3, bg::strategy::within::cartesian_winding<point_type>());
+ ::set_i(g1, g2, g3, bg::strategy::within::spherical_winding<point_type>());
+ ::set_i(g1, g2, g3, bg::strategy::within::geographic_winding<point_type>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_i_ss(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_i(g1, g2, g3, bg::strategy::intersection::cartesian_segments<>());
+ ::set_i(g1, g2, g3, bg::strategy::intersection::spherical_segments<>());
+ ::set_i(g1, g2, g3, bg::strategy::intersection::geographic_segments<>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_d_pp(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_d(g1, g2, g3, bg::strategy::within::cartesian_point_point());
+ ::set_d(g1, g2, g3, bg::strategy::within::spherical_point_point());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_d_ps(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ typedef typename bg::point_type<G1>::type point_type;
+ ::set_d(g1, g2, g3, bg::strategy::within::cartesian_winding<point_type>());
+ ::set_d(g1, g2, g3, bg::strategy::within::spherical_winding<point_type>());
+ ::set_d(g1, g2, g3, bg::strategy::within::geographic_winding<point_type>());
+}
+
+template <typename G1, typename G2, typename G3>
+inline void set_d_ss(G1 const& g1, G2 const& g2, G3 & g3)
+{
+ ::set_d(g1, g2, g3, bg::strategy::intersection::cartesian_segments<>());
+ ::set_d(g1, g2, g3, bg::strategy::intersection::spherical_segments<>());
+ ::set_d(g1, g2, g3, bg::strategy::intersection::geographic_segments<>());
+}
+
+int test_main(int, char*[])
+{
+ geom g;
+
+ // P/P->P
+ ::set_idsu_pp(g.pt, g.pt, g.mpt);
+ ::set_idsu_pp(g.pt, g.mpt, g.mpt);
+ ::set_idsu_pp(g.mpt, g.mpt, g.mpt);
+
+ // P/L->P
+ ::set_id_ps(g.pt, g.s, g.mpt);
+ ::set_id_ps(g.pt, g.ls, g.mpt);
+ ::set_id_ps(g.pt, g.mls, g.mpt);
+ ::set_id_ps(g.mpt, g.s, g.mpt);
+ ::set_id_ps(g.mpt, g.ls, g.mpt);
+ ::set_id_ps(g.mpt, g.mls, g.mpt);
+
+ // P/A->P
+ // no intersection nor difference
+ //::set_id_ps(g.pt, g.r, g.mpt);
+ //::set_id_ps(g.pt, g.po, g.mpt);
+ //::set_id_ps(g.pt, g.mpo, g.mpt);
+ //::set_id_ps(g.mpt, g.r, g.mpt);
+ //::set_id_ps(g.mpt, g.po, g.mpt);
+ //::set_id_ps(g.mpt, g.mpo, g.mpt);
+
+ // L/L->P
+ ::set_ids_ss(g.s, g.s, g.mpt);
+ //::set_i_ss(g.s, g.ls, g.mpt); // no intersection nor difference
+ //::set_i_ss(g.s, g.mls, g.mpt); // no intersection nor difference
+ //::set_i_ss(g.ls, g.s, g.mpt); // no intersection nor difference
+ ::set_ids_ss(g.ls, g.ls, g.mpt);
+ ::set_i_ss(g.ls, g.mls, g.mpt); // no difference nor sym_difference
+ //::set_i_ss(g.mls, g.s, g.mpt); // no intersection nor difference
+ ::set_i_ss(g.mls, g.ls, g.mpt); // no difference nor sym_difference
+ ::set_ids_ss(g.mls, g.mls, g.mpt);
+
+ // L/L->L
+ //::set_ids_ss(g.s, g.s, g.mls); // union not implemented, missing specialization
+ //::set_idsu_ss(g.s, g.ls, g.mls); // missing specialization
+ //::set_idsu_ss(g.s, g.mls, g.mls); // missing specialization
+ //::set_idsu_ss(g.ls, g.s, g.mls); // missing specialization
+ ::set_idsu_ss(g.ls, g.ls, g.mls);
+ ::set_idsu_ss(g.ls, g.mls, g.mls);
+ //::set_idsu_ss(g.mls, g.s, g.mls); // missing specialization
+ ::set_idsu_ss(g.mls, g.ls, g.mls);
+ ::set_idsu_ss(g.mls, g.mls, g.mls);
+
+ // S/B->L ?
+
+ // L/B->L ?
+
+ // L/A->P
+ //::set_ids_ss(g.s, g.r, g.mpt); // no intersection
+ //::set_ids_ss(g.s, g.po, g.mpt); // no intersection
+ //::set_ids_ss(g.s, g.mpo, g.mpt); // no intersection
+ ::set_ids_ss(g.ls, g.r, g.mpt);
+ ::set_ids_ss(g.ls, g.po, g.mpt);
+ ::set_ids_ss(g.ls, g.mpo, g.mpt);
+ ::set_ids_ss(g.mls, g.r, g.mpt);
+ ::set_ids_ss(g.mls, g.po, g.mpt);
+ ::set_ids_ss(g.mls, g.mpo, g.mpt);
+
+ // L/A->L
+ //::set_id_ss(g.s, g.r, g.mls); // no intersection
+ //::set_id_ss(g.s, g.po, g.mls); // no intersection
+ //::set_id_ss(g.s, g.mpo, g.mls); // no intersection
+ ::set_id_ss(g.ls, g.r, g.mls);
+ ::set_id_ss(g.ls, g.po, g.mls);
+ ::set_id_ss(g.ls, g.mpo, g.mls);
+ ::set_id_ss(g.mls, g.r, g.mls);
+ ::set_id_ss(g.mls, g.po, g.mls);
+ ::set_id_ss(g.mls, g.mpo, g.mls);
+
+ // A/A->P
+ ::set_i_ss(g.r, g.r, g.mpt);
+ ::set_i_ss(g.r, g.po, g.mpt);
+ ::set_i_ss(g.r, g.mpo, g.mpt);
+ ::set_i_ss(g.po, g.r, g.mpt);
+ ::set_i_ss(g.po, g.po, g.mpt);
+ ::set_i_ss(g.po, g.mpo, g.mpt);
+ ::set_i_ss(g.mpo, g.r, g.mpt);
+ ::set_i_ss(g.mpo, g.po, g.mpt);
+ ::set_i_ss(g.mpo, g.mpo, g.mpt);
+
+ // A/A->L
+ ::set_i_ss(g.r, g.r, g.mls);
+ ::set_i_ss(g.r, g.po, g.mls);
+ ::set_i_ss(g.r, g.mpo, g.mls);
+ ::set_i_ss(g.po, g.r, g.mls);
+ ::set_i_ss(g.po, g.po, g.mls);
+ ::set_i_ss(g.po, g.mpo, g.mls);
+ ::set_i_ss(g.mpo, g.r, g.mls);
+ ::set_i_ss(g.mpo, g.po, g.mls);
+ ::set_i_ss(g.mpo, g.mpo, g.mls);
+
+ // A/A->A
+ ::set_idsu_ss(g.r, g.r, g.mpo);
+ ::set_idsu_ss(g.r, g.po, g.mpo);
+ ::set_idsu_ss(g.r, g.mpo, g.mpo);
+ ::set_idsu_ss(g.po, g.r, g.mpo);
+ ::set_idsu_ss(g.po, g.po, g.mpo);
+ ::set_idsu_ss(g.po, g.mpo, g.mpo);
+ ::set_idsu_ss(g.mpo, g.r, g.mpo);
+ ::set_idsu_ss(g.mpo, g.po, g.mpo);
+ ::set_idsu_ss(g.mpo, g.mpo, g.mpo);
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/cs_undefined/test_relops.hpp b/src/boost/libs/geometry/test/cs_undefined/test_relops.hpp
new file mode 100644
index 000000000..7a366bcd6
--- /dev/null
+++ b/src/boost/libs/geometry/test/cs_undefined/test_relops.hpp
@@ -0,0 +1,164 @@
+// Boost.Geometry
+
+// Copyright (c) 2019, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP
+#define BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP
+
+#include "common.hpp"
+
+#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/crosses.hpp>
+#include <boost/geometry/algorithms/disjoint.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+#include <boost/geometry/algorithms/overlaps.hpp>
+#include <boost/geometry/algorithms/relate.hpp>
+#include <boost/geometry/algorithms/relation.hpp>
+#include <boost/geometry/algorithms/touches.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+
+template
+<
+ typename G1,
+ typename G2,
+ std::size_t Dim1 = bg::topological_dimension<G1>::value,
+ std::size_t Dim2 = bg::topological_dimension<G2>::value
+>
+struct call_equals
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s) {}
+};
+
+template <typename G1, typename G2, std::size_t Dim>
+struct call_equals<G1, G2, Dim, Dim>
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s)
+ {
+ bg::equals(g1, g2, s);
+ }
+};
+
+template
+<
+ typename G1,
+ typename G2,
+ std::size_t Dim1 = bg::topological_dimension<G1>::value,
+ std::size_t Dim2 = bg::topological_dimension<G2>::value
+>
+struct call_overlaps
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s) {}
+};
+
+template <typename G1, typename G2, std::size_t Dim>
+struct call_overlaps<G1, G2, Dim, Dim>
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s)
+ {
+ bg::overlaps(g1, g2, s);
+ }
+};
+
+template
+<
+ typename G1,
+ typename G2,
+ std::size_t Dim1 = bg::topological_dimension<G1>::value,
+ std::size_t Dim2 = bg::topological_dimension<G2>::value
+>
+struct call_touches
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s)
+ {
+ bg::touches(g1, g2, s);
+ }
+};
+
+template <typename G1, typename G2>
+struct call_touches<G1, G2, 0, 0>
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s) {}
+};
+
+template
+<
+ typename G1,
+ typename G2,
+ std::size_t Dim1 = bg::topological_dimension<G1>::value,
+ std::size_t Dim2 = bg::topological_dimension<G2>::value
+>
+struct call_crosses
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s)
+ {
+ bg::crosses(g1, g2, s);
+ }
+};
+
+template <typename G1, typename G2>
+struct call_crosses<G1, G2, 0, 0>
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s) {}
+};
+
+template <typename G1, typename G2>
+struct call_crosses<G1, G2, 2, 2>
+{
+ template <typename S>
+ static void apply(G1 const& g1, G2 const& g2, S const& s) {}
+};
+
+template <typename G1, typename G2, typename S>
+inline void rel(G1 const& g1, G2 const& g2, S const& s)
+{
+ bg::relation(g1, g2, s);
+ bg::relate(g1, g2, bg::de9im::mask("*********"), s);
+ bg::covered_by(g1, g2, s);
+ call_crosses<G1, G2>::apply(g1, g2, s);
+ bg::disjoint(g1, g2, s);
+ call_equals<G1, G2>::apply(g1, g2, s);
+ bg::intersects(g1, g2, s);
+ call_overlaps<G1, G2>::apply(g1, g2, s);
+ call_touches<G1, G2>::apply(g1, g2, s);
+ bg::within(g1, g2, s);
+}
+
+template <typename G1, typename G2>
+inline void rel_pp(G1 const& g1, G2 const& g2)
+{
+ ::rel(g1, g2, bg::strategy::within::cartesian_point_point());
+ ::rel(g1, g2, bg::strategy::within::spherical_point_point());
+}
+
+template <typename G1, typename G2>
+inline void rel_ps(G1 const& g1, G2 const& g2)
+{
+ typedef typename bg::point_type<G1>::type point;
+ ::rel(g1, g2, bg::strategy::within::cartesian_winding<point>());
+ ::rel(g1, g2, bg::strategy::within::spherical_winding<point>());
+ ::rel(g1, g2, bg::strategy::within::geographic_winding<point>());
+}
+
+template <typename G1, typename G2>
+inline void rel_ss(G1 const& g1, G2 const& g2)
+{
+ ::rel(g1, g2, bg::strategy::intersection::cartesian_segments<>());
+ ::rel(g1, g2, bg::strategy::intersection::spherical_segments<>());
+ ::rel(g1, g2, bg::strategy::intersection::geographic_segments<>());
+}
+
+#endif // BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP
diff --git a/src/boost/libs/geometry/test/formulas/Jamfile b/src/boost/libs/geometry/test/formulas/Jamfile
new file mode 100644
index 000000000..28ca87194
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/Jamfile
@@ -0,0 +1,21 @@
+# Boost.Geometry
+#
+# Copyright (c) 2016-2019, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-formulas
+ :
+ [ run inverse.cpp : : : : formulas_inverse ]
+ [ run inverse_karney.cpp : : : : formulas_inverse_karney ]
+ [ run direct.cpp : : : : formulas_direct ]
+ [ run direct_accuracy.cpp : : : : formulas_direct_accuracy ]
+ [ run direct_meridian.cpp : : : : formulas_direct_meridian ]
+ [ run intersection.cpp : : : : formulas_intersection ]
+ [ run vertex_longitude.cpp : : : : formulas_vertex_longitude ]
+ ;
diff --git a/src/boost/libs/geometry/test/formulas/direct.cpp b/src/boost/libs/geometry/test/formulas/direct.cpp
new file mode 100644
index 000000000..97fb170f4
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/direct.cpp
@@ -0,0 +1,176 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_formula.hpp"
+#include "direct_cases.hpp"
+#include "direct_cases_antipodal.hpp"
+
+#include <boost/geometry/formulas/vincenty_direct.hpp>
+#include <boost/geometry/formulas/thomas_direct.hpp>
+#include <boost/geometry/formulas/karney_direct.hpp>
+//#include <boost/geometry/formulas/series_expansion_direct.hpp>
+#include <boost/geometry/formulas/spherical.hpp>
+
+#include <boost/geometry/srs/srs.hpp>
+
+#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+#include <GeographicLib/Geodesic.hpp>
+#include <GeographicLib/Constants.hpp>
+#endif // BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+
+inline void symmetrize_wrt_origin(expected_result & r)
+{
+ r.lon2 = -r.lon2;
+ r.lat2 = -r.lat2;
+ r.reduced_length = -r.reduced_length;
+}
+
+inline expected_results symmetric_wrt_origin(expected_results r)
+{
+ r.distance = -r.distance;
+ symmetrize_wrt_origin(r.karney);
+ symmetrize_wrt_origin(r.series);
+ symmetrize_wrt_origin(r.spherical);
+ symmetrize_wrt_origin(r.thomas);
+ symmetrize_wrt_origin(r.thomas1st);
+ symmetrize_wrt_origin(r.vincenty);
+ return r;
+}
+
+template <typename Result>
+void check_direct(Result const& result, expected_result const& expected, expected_result const& reference,
+ double reference_error, bool check_reference_only = false)
+{
+ check_direct_sph(result, expected, reference, reference_error, check_reference_only);
+ check_one(result.reduced_length, expected.reduced_length, reference.reduced_length, reference_error);
+ check_one(result.geodesic_scale, expected.geodesic_scale, reference.geodesic_scale, reference_error);
+}
+
+template <typename Result>
+void check_direct_sph(Result const& result, expected_result const& expected, expected_result const& reference,
+ double reference_error, bool check_reference_only = false)
+{
+ check_one(result.lon2, expected.lon2, reference.lon2, reference_error, true, check_reference_only);
+ check_one(result.lat2, expected.lat2, reference.lat2, reference_error, true, check_reference_only);
+ check_one(result.reverse_azimuth, expected.reverse_azimuth, reference.reverse_azimuth, reference_error, true, check_reference_only);
+}
+
+void test_all(expected_results const& results)
+{
+ double const d2r = bg::math::d2r<double>();
+ double const r2d = bg::math::r2d<double>();
+
+ double lon1r = results.p1.lon * d2r;
+ double lat1r = results.p1.lat * d2r;
+ double distance = results.distance;
+ double azi12r = results.azimuth12 * d2r;
+
+ double lon1d = results.p1.lon;
+ double lat1d = results.p1.lat;
+ double azi12d = results.azimuth12;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+ bg::srs::sphere<double> const sphere;
+
+ bg::formula::result_direct<double> result;
+
+ typedef bg::formula::vincenty_direct<double, true, true, true, true> vi_t;
+ result = vi_t::apply(lon1r, lat1r, distance, azi12r, spheroid);
+ result.lon2 *= r2d;
+ result.lat2 *= r2d;
+ result.reverse_azimuth *= r2d;
+ check_direct(result, results.vincenty, results.karney, 0.00000001);
+
+ typedef bg::formula::thomas_direct<double, true, true, true, true, true> th_t;
+ result = th_t::apply(lon1r, lat1r, distance, azi12r, spheroid);
+ result.lon2 *= r2d;
+ result.lat2 *= r2d;
+ result.reverse_azimuth *= r2d;
+ check_direct(result, results.thomas, results.karney, 0.0000001);
+
+ typedef bg::formula::thomas_direct<double, false, true, true, true, true> th_t1st;
+ result = th_t1st::apply(lon1r, lat1r, distance, azi12r, spheroid);
+ result.lon2 *= r2d;
+ result.lat2 *= r2d;
+ result.reverse_azimuth *= r2d;
+ check_direct(result, results.thomas1st, results.karney, 0.0000001);
+/*
+ typedef bg::formula::series_expansion_direct<double, true, true, true, true, 4> series;
+ result = series::apply(lon1r, lat1r, distance, azi12r, spheroid);
+ result.lon2 *= r2d;
+ result.lat2 *= r2d;
+ result.reverse_azimuth *= r2d;
+ check_direct(result, results.series, results.karney, 0.0000001);
+*/
+ result = bg::formula::spherical_direct<true, true>(lon1r, lat1r, distance,
+ azi12r, sphere);
+ result.lon2 *= r2d;
+ result.lat2 *= r2d;
+ result.reverse_azimuth *= r2d;
+ check_direct_sph(result, results.spherical, results.karney, 0.1);
+
+ typedef bg::formula::karney_direct<double, true, true, true, true, 2> ka_t;
+ result = ka_t::apply(lon1d, lat1d, distance, azi12d, spheroid);
+ check_direct(result, results.karney, results.karney, 0.0000001);
+
+#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+ {
+ using namespace GeographicLib;
+ Geodesic geod(Constants::WGS84_a(), Constants::WGS84_f());
+ double foo = 0;
+ geod.Direct(lat1d, lon1d, azi12d, distance,
+ result.lat2, result.lon2, result.reverse_azimuth,
+ result.reduced_length, result.geodesic_scale, foo);
+ boost::ignore_unused(foo);
+ check_direct(result, results.karney, results.karney, 0.0000001);
+ }
+#endif
+}
+
+void test_karney_antipodal(expected_results_antipodal const& results)
+{
+ double lon1d = results.p1.lon;
+ double lat1d = results.p1.lat;
+ double distance = results.distance;
+ double azi12d = results.azimuth12;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ bg::formula::result_direct<double> result;
+
+ typedef bg::formula::karney_direct<double, true, true, true, true, 8> ka_t;
+ result = ka_t::apply(lon1d, lat1d, distance, azi12d, spheroid);
+ check_direct(result, results.karney, results.karney, 0.0000001, true);
+}
+
+int test_main(int, char*[])
+{
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all(expected[i]);
+
+ if (expected[i].p1.lon == 0 && expected[i].p1.lat == 0)
+ {
+ test_all(symmetric_wrt_origin(expected[i]));
+ }
+ }
+
+ for (size_t i = 0; i < expected_size_antipodal; ++i)
+ {
+ test_karney_antipodal(expected_antipodal[i]);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/formulas/direct_accuracy.cpp b/src/boost/libs/geometry/test/formulas/direct_accuracy.cpp
new file mode 100644
index 000000000..e485caafb
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/direct_accuracy.cpp
@@ -0,0 +1,97 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/formulas/karney_direct.hpp>
+#include <boost/geometry/srs/srs.hpp>
+
+#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+#include <GeographicLib/Geodesic.hpp>
+#include <GeographicLib/Constants.hpp>
+#endif // BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+
+int test_main(int, char*[])
+{
+
+#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+ // accuracy test from https://github.com/boostorg/geometry/issues/560
+ using namespace GeographicLib;
+
+ const long double wgs84_a = 6378137.0L;
+ const long double wgs84_f = 1.0L / 298.257223563L;
+ const long double one_minus_f = 1.0L - wgs84_f;
+ const long double wgs84_b = wgs84_a * one_minus_f;
+
+ const boost::geometry::srs::spheroid<long double> BoostWGS84(wgs84_a, wgs84_b);
+
+ // boost karney_direct function class with azimuth output and SeriesOrder = 6
+ typedef boost::geometry::formula::karney_direct <double, true, true, false, false, 6u>
+ BoostKarneyDirect_6;
+
+ // boost karney_direct function class with azimuth output and SeriesOrder = 8
+ typedef boost::geometry::formula::karney_direct <double, true, true, false, false, 8u>
+ BoostKarneyDirect_8;
+
+ // boost test BOOST_CHECK_CLOSE macro takes a percentage accuracy parameter
+ const double EPSILON = std::numeric_limits<double>::epsilon();
+ const double CALCULATION_TOLERANCE = 100 * EPSILON;
+
+ const Geodesic GeographicLibWGS84(Geodesic::WGS84());
+
+ // Loop around latitudes: 0 to 89 degrees
+ for (int i=0; i < 90; ++i)
+ {
+ // The latitude in degrees.
+ double latitude(1.0 * i);
+
+ // Loop around longitudes: 1 to 179 degrees
+ for (int j=1; j < 180; ++j)
+ {
+ // The longitude in degrees.
+ double longitude(1.0 * j);
+
+ // The Geodesic: distance in metres, start azimuth and finish azimuth in degrees.
+ double distance_m, azimuth, azi2;
+ GeographicLibWGS84.Inverse(0.0, 0.0, latitude, longitude, distance_m, azimuth, azi2);
+
+ // The GeographicLib position and azimuth at the distance in metres
+ double lat2k, lon2k, azi2k;
+ GeographicLibWGS84.Direct(0.0, 0.0, azimuth, distance_m, lat2k, lon2k, azi2k);
+ BOOST_CHECK_CLOSE(latitude, lat2k, 140 * CALCULATION_TOLERANCE);
+ BOOST_CHECK_CLOSE(longitude, lon2k, 120 * CALCULATION_TOLERANCE);
+
+ // The boost karney_direct order 6 position at the azimuth and distance in metres.
+ boost::geometry::formula::result_direct<double> results_6
+ = BoostKarneyDirect_6::apply(0.0, 0.0, distance_m, azimuth, BoostWGS84);
+ BOOST_CHECK_CLOSE(azi2, results_6.reverse_azimuth, 140 * CALCULATION_TOLERANCE);
+ BOOST_CHECK_CLOSE(latitude, results_6.lat2, 220 * CALCULATION_TOLERANCE);
+
+ /******** Test below only passes with >= 10172000 * CALCULATION_TOLERANCE !! ********/
+ BOOST_CHECK_CLOSE(longitude, results_6.lon2, 10171000 * CALCULATION_TOLERANCE);
+ /*****************************************************************************/
+
+ // The boost karney_direct order 8 position at the azimuth and distance in metres.
+ boost::geometry::formula::result_direct<double> results_8
+ = BoostKarneyDirect_8::apply(0.0, 0.0, distance_m, azimuth, BoostWGS84);
+ BOOST_CHECK_CLOSE(azi2, results_8.reverse_azimuth, 140 * CALCULATION_TOLERANCE);
+ BOOST_CHECK_CLOSE(latitude, results_8.lat2, 220 * CALCULATION_TOLERANCE);
+
+ /******** Test below only passes with >= 10174000 * CALCULATION_TOLERANCE !! ********/
+ BOOST_CHECK_CLOSE(longitude, results_8.lon2, 10173000 * CALCULATION_TOLERANCE);
+ /*****************************************************************************/
+ }
+ }
+#endif // BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/formulas/direct_cases.hpp b/src/boost/libs/geometry/test/formulas/direct_cases.hpp
new file mode 100644
index 000000000..1ac436e6f
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/direct_cases.hpp
@@ -0,0 +1,700 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DIRECT_CASES_HPP
+#define BOOST_GEOMETRY_TEST_DIRECT_CASES_HPP
+
+struct coordinates
+{
+ double lon;
+ double lat;
+};
+
+struct expected_result
+{
+ double lon2;
+ double lat2;
+ double reverse_azimuth;
+ double reduced_length;
+ double geodesic_scale;
+};
+
+struct expected_results
+{
+ coordinates p1;
+ double distance;
+ double azimuth12;
+ expected_result karney;
+ expected_result vincenty;
+ expected_result thomas;
+ expected_result thomas1st;
+ expected_result series;
+ expected_result spherical;
+};
+
+expected_results expected[] =
+{
+
+ {
+ { 0, 0 }, 250000, 0,
+ { 0.00000000000000000000, 2.26091191238511868278, 0.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { 0.00000000000000000000, 2.26091191236402178077, 0.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { 0.00000000000000000000, 2.26091189386641744363, 0.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { 0.00000000000000000000, 2.26091190837723177154, 0.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { 0.00000000000000000000, 2.26091191238508226746, 0.00000000000000000000, 249935.55905602785060182214, 0.99922674639115527384 },
+ { 0.00000000000000000000, 2.24830091939884413321, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, 45,
+ { 1.58842150169031337548, 1.59850419267109766785, 45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 },
+ { 1.58842150168977558344, 1.59850419267017707092, 45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 },
+ { 1.58842149958854261804, 1.59850419056543535667, 45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 },
+ { 1.58842150075770360829, 1.59850419406187715943, 45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 },
+ { 1.58842150169031270934, 1.59850419267109744581, 45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 },
+ { 1.59019688120571478507, 1.58958477520588337129, 45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, 90,
+ { 2.24578821029880382198, 0.00000000000000000000, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 2.24830091939884413321, 0.00000000000000013763, 90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, 135,
+ { 1.58842150169031337548, -1.59850419267109766785, 134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 },
+ { 1.58842150168977580549, -1.59850419267017707092, 134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 },
+ { 1.58842149958854261804, -1.59850419056543602281, 134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 },
+ { 1.58842150075770360829, -1.59850419406187760352, 134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 },
+ { 1.58842150169033402562, -1.59850419267108945220, 134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 },
+ { 1.59019688120571345280, -1.58958477520588448151, 134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, 180,
+ { 0.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { 0.00000000000000027517, -2.26091191236402178077, 180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { 0.00000000000000000000, -2.26091189386641744363, 180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { 0.00000000000000000000, -2.26091190837723177154, 180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { 0.00000000000000000000, -2.26091191238511468597, 180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 },
+ { 0.00000000000000000000, -2.24830091939884635366, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, -45,
+ { -1.58842150169031337548, 1.59850419267109766785, -45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 },
+ { -1.58842150168977558344, 1.59850419267017707092, -45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 },
+ { -1.58842149958854261804, 1.59850419056543535667, -45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 },
+ { -1.58842150075770360829, 1.59850419406187715943, -45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 },
+ { -1.58842150169031270934, 1.59850419267109744581, -45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 },
+ { -1.59019688120571478507, 1.58958477520588337129, -45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, -90,
+ { -2.24578821029880382198, 0.00000000000000000000, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -2.24830091939884413321, 0.00000000000000013763, -90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, -135,
+ { -1.58842150169031337548, -1.59850419267109766785, -134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 },
+ { -1.58842150168977580549, -1.59850419267017707092, -134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 },
+ { -1.58842149958854261804, -1.59850419056543602281, -134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 },
+ { -1.58842150075770360829, -1.59850419406187760352, -134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 },
+ { -1.58842150169033402562, -1.59850419267108945220, -134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 },
+ { -1.59019688120571345280, -1.58958477520588448151, -134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 0 }, 250000, -180,
+ { 0.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { -0.00000000000000027517, -2.26091191236402178077, -180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { 0.00000000000000000000, -2.26091189386641744363, -180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { 0.00000000000000000000, -2.26091190837723177154, -180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { 0.00000000000000000000, -2.26091191238511468597, -180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 },
+ { 0.00000000000000000000, -2.24830091939884635366, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, 0,
+ { -1.00000000000000000000, 2.26091191238511868278, 0.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { -1.00000000000000000000, 2.26091191236402178077, 0.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { -1.00000000000000000000, 2.26091189386641744363, 0.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { -1.00000000000000000000, 2.26091190837723177154, 0.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { -1.00000000000000000000, 2.26091191238508226746, 0.00000000000000000000, 249935.55905602785060182214, 0.99922674639115527384 },
+ { -1.00000000000000000000, 2.24830091939884413321, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, 45,
+ { 0.58842150169031337548, 1.59850419267109766785, 45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 },
+ { 0.58842150168977558344, 1.59850419267017707092, 45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 },
+ { 0.58842149958854272906, 1.59850419056543535667, 45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 },
+ { 0.58842150075770371931, 1.59850419406187715943, 45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 },
+ { 0.58842150169031270934, 1.59850419267109744581, 45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 },
+ { 0.59019688120571467405, 1.58958477520588337129, 45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, 90,
+ { 1.24578821029880382198, 0.00000000000000000000, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 1.24830091939884435526, 0.00000000000000013763, 90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, 135,
+ { 0.58842150169031337548, -1.59850419267109766785, 134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 },
+ { 0.58842150168977569447, -1.59850419267017707092, 134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 },
+ { 0.58842149958854272906, -1.59850419056543602281, 134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 },
+ { 0.58842150075770371931, -1.59850419406187760352, 134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 },
+ { 0.58842150169033402562, -1.59850419267108945220, 134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 },
+ { 0.59019688120571345280, -1.58958477520588448151, 134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, 180,
+ { -1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { -0.99999999999999977796, -2.26091191236402178077, 180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { -1.00000000000000000000, -2.26091189386641744363, 180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { -1.00000000000000000000, -2.26091190837723177154, 180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { -1.00000000000000000000, -2.26091191238511468597, 180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 },
+ { -1.00000000000000000000, -2.24830091939884635366, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, -45,
+ { -2.58842150169031359752, 1.59850419267109766785, -45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 },
+ { -2.58842150168977536140, 1.59850419267017707092, -45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 },
+ { -2.58842149958854284009, 1.59850419056543535667, -45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 },
+ { -2.58842150075770360829, 1.59850419406187715943, -45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 },
+ { -2.58842150169031270934, 1.59850419267109744581, -45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 },
+ { -2.59019688120571478507, 1.58958477520588337129, -45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, -90,
+ { -3.24578821029880382198, 0.00000000000000000000, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { -3.24830091939884457730, 0.00000000000000013763, -90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, -135,
+ { -2.58842150169031359752, -1.59850419267109766785, -134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 },
+ { -2.58842150168977580549, -1.59850419267017707092, -134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 },
+ { -2.58842149958854284009, -1.59850419056543602281, -134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 },
+ { -2.58842150075770360829, -1.59850419406187760352, -134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 },
+ { -2.58842150169027718221, -1.59850419267108945220, -134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 },
+ { -2.59019688120571345280, -1.58958477520588448151, -134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 0 }, 250000, -180,
+ { -1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { -1.00000000000000022204, -2.26091191236402178077, -180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { -1.00000000000000000000, -2.26091189386641744363, -180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { -1.00000000000000000000, -2.26091190837723177154, -180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { -1.00000000000000000000, -2.26091191238511468597, -180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 },
+ { -1.00000000000000000000, -2.24830091939884635366, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, 0,
+ { 1.00000000000000000000, 2.26091191238511868278, 0.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { 1.00000000000000000000, 2.26091191236402178077, 0.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { 1.00000000000000000000, 2.26091189386641744363, 0.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { 1.00000000000000000000, 2.26091190837723177154, 0.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { 1.00000000000000000000, 2.26091191238508226746, 0.00000000000000000000, 249935.55905602785060182214, 0.99922674639115527384 },
+ { 1.00000000000000000000, 2.24830091939884413321, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, 45,
+ { 2.58842150169031359752, 1.59850419267109766785, 45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 },
+ { 2.58842150168977536140, 1.59850419267017707092, 45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 },
+ { 2.58842149958854284009, 1.59850419056543535667, 45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 },
+ { 2.58842150075770360829, 1.59850419406187715943, 45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 },
+ { 2.58842150169031270934, 1.59850419267109744581, 45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 },
+ { 2.59019688120571478507, 1.58958477520588337129, 45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, 90,
+ { 3.24578821029880382198, 0.00000000000000000000, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 },
+ { 3.24830091939884457730, 0.00000000000000013763, 90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, 135,
+ { 2.58842150169031359752, -1.59850419267109766785, 134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 },
+ { 2.58842150168977580549, -1.59850419267017707092, 134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 },
+ { 2.58842149958854284009, -1.59850419056543602281, 134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 },
+ { 2.58842150075770360829, -1.59850419406187760352, 134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 },
+ { 2.58842150169027718221, -1.59850419267108945220, 134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 },
+ { 2.59019688120571345280, -1.58958477520588448151, 134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, 180,
+ { 1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { 1.00000000000000022204, -2.26091191236402178077, 180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { 1.00000000000000000000, -2.26091189386641744363, 180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { 1.00000000000000000000, -2.26091190837723177154, 180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { 1.00000000000000000000, -2.26091191238511468597, 180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 },
+ { 1.00000000000000000000, -2.24830091939884635366, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, -45,
+ { -0.58842150169031337548, 1.59850419267109766785, -45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 },
+ { -0.58842150168977558344, 1.59850419267017707092, -45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 },
+ { -0.58842149958854272906, 1.59850419056543535667, -45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 },
+ { -0.58842150075770371931, 1.59850419406187715943, -45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 },
+ { -0.58842150169031270934, 1.59850419267109744581, -45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 },
+ { -0.59019688120571467405, 1.58958477520588337129, -45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, -90,
+ { -1.24578821029880382198, 0.00000000000000000000, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 },
+ { -1.24830091939884435526, 0.00000000000000013763, -90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, -135,
+ { -0.58842150169031337548, -1.59850419267109766785, -134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 },
+ { -0.58842150168977569447, -1.59850419267017707092, -134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 },
+ { -0.58842149958854272906, -1.59850419056543602281, -134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 },
+ { -0.58842150075770371931, -1.59850419406187760352, -134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 },
+ { -0.58842150169033402562, -1.59850419267108945220, -134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 },
+ { -0.59019688120571345280, -1.58958477520588448151, -134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 0 }, 250000, -180,
+ { 1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 },
+ { 0.99999999999999977796, -2.26091191236402178077, -180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 },
+ { 1.00000000000000000000, -2.26091189386641744363, -180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 },
+ { 1.00000000000000000000, -2.26091190837723177154, -180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 },
+ { 1.00000000000000000000, -2.26091191238511468597, -180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 },
+ { 1.00000000000000000000, -2.24830091939884635366, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, 0,
+ { 0.00000000000000000000, 1.26092062918498104551, 0.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { 0.00000000000000000000, 1.26092062916373448545, 0.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { 0.00000000000000000000, 1.26092061053506587776, 0.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { 0.00000000000000000000, 1.26092062023552875516, 0.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { 0.00000000000000000000, 1.26092062918495995127, 0.00000000000000000000, 249935.55872469596215523779, 0.99922674479230122468 },
+ { 0.00000000000000000000, 1.24830091939884435526, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, 45,
+ { 1.58789352027561725400, 0.59889382252477618707, 44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 },
+ { 1.58789352027508279264, 0.59889382252384637528, 44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 },
+ { 1.58789351816042789700, 0.59889382039736038799, 44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 },
+ { 1.58789351933467837164, 0.59889382227058296504, 44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 },
+ { 1.58789352027561680991, 0.59889382252477563195, 44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 },
+ { 1.58966906957485254459, 0.58996975014221642031, 44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, 90,
+ { 2.24612766651409989649, -0.99922666842209439952, 89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 },
+ { 2.24612766651347328661, -0.99922666842209439952, 89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 },
+ { 2.24612766651409945240, -0.99922666842208529570, 89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 },
+ { 2.24612766651409812013, -0.99922666841944873806, 89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 },
+ { 2.24612766651407858021, -0.99922666842209184601, 89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 },
+ { 2.24864304714222296155, -0.99923012194947846698, 89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, 135,
+ { 1.58943065821228057821, -2.59810442478829362045, 134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 },
+ { 1.58943065821171258811, -2.59810442478739078709, 134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 },
+ { 1.58943065613921019619, -2.59810442273856878614, 134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 },
+ { 1.58943065729835319999, -2.59810443328209572655, 134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 },
+ { 1.58943065821226814371, -2.59810442478831138402, 134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 },
+ { 1.59120965314639395416, -2.58919942720575324557, 134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, 180,
+ { 0.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { 0.00000000000000027540, -3.26088938009322193423, 180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { 0.00000000000000000000, -3.26088936183515265554, 180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { 0.00000000000000000000, -3.26088938879229361945, 180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { 0.00000000000000000000, -3.26088938011400975014, 180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 },
+ { 0.00000000000000000000, -3.24830091939884901819, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, -45,
+ { -1.58789352027561725400, 0.59889382252477618707, -44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 },
+ { -1.58789352027508279264, 0.59889382252384637528, -44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 },
+ { -1.58789351816042789700, 0.59889382039736038799, -44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 },
+ { -1.58789351933467837164, 0.59889382227058296504, -44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 },
+ { -1.58789352027561680991, 0.59889382252477563195, -44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 },
+ { -1.58966906957485254459, 0.58996975014221642031, -44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, -90,
+ { -2.24612766651409989649, -0.99922666842209439952, -89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 },
+ { -2.24612766651347328661, -0.99922666842209439952, -89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 },
+ { -2.24612766651409945240, -0.99922666842208529570, -89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 },
+ { -2.24612766651409812013, -0.99922666841944873806, -89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 },
+ { -2.24612766651407858021, -0.99922666842209184601, -89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 },
+ { -2.24864304714222296155, -0.99923012194947846698, -89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, -135,
+ { -1.58943065821228057821, -2.59810442478829362045, -134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 },
+ { -1.58943065821171258811, -2.59810442478739078709, -134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 },
+ { -1.58943065613921019619, -2.59810442273856878614, -134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 },
+ { -1.58943065729835319999, -2.59810443328209572655, -134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 },
+ { -1.58943065821226814371, -2.59810442478831138402, -134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 },
+ { -1.59120965314639395416, -2.58919942720575324557, -134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, -1 }, 250000, -180,
+ { 0.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { -0.00000000000000027540, -3.26088938009322193423, -180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { 0.00000000000000000000, -3.26088936183515265554, -180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { 0.00000000000000000000, -3.26088938879229361945, -180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { 0.00000000000000000000, -3.26088938011400975014, -180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 },
+ { 0.00000000000000000000, -3.24830091939884901819, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, 0,
+ { 0.00000000000000000000, 3.26088938011404927408, 0.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { 0.00000000000000000000, 3.26088938009322193423, 0.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { 0.00000000000000000000, 3.26088936183515265554, 0.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { 0.00000000000000000000, 3.26088938879229361945, 0.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { 0.00000000000000000000, 3.26088938011400220063, 0.00000000000000000000, 249935.55991249639191664755, 0.99922675429255336521 },
+ { 0.00000000000000000000, 3.24830091939884457730, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, 45,
+ { 1.58943065821228057821, 2.59810442478829362045, 45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 },
+ { 1.58943065821171236607, 2.59810442478739123118, 45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 },
+ { 1.58943065613921019619, 2.59810442273856923023, 45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 },
+ { 1.58943065729835319999, 2.59810443328209572655, 45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 },
+ { 1.58943065821227924594, 2.59810442478829228818, 45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 },
+ { 1.59120965314638773691, 2.58919942720574303152, 45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, 90,
+ { 2.24612766651409989649, 0.99922666842209439952, 90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 },
+ { 2.24612766651347328661, 0.99922666842209484361, 90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 },
+ { 2.24612766651409945240, 0.99922666842208562876, 90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 },
+ { 2.24612766651409812013, 0.99922666841944918215, 90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 },
+ { 2.24612766651412920638, 0.99922666842209206806, 90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 },
+ { 2.24864304714222296155, 0.99923012194947880005, 90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, 135,
+ { 1.58789352027561725400, -0.59889382252477618707, 135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 },
+ { 1.58789352027508301468, -0.59889382252384604222, 135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 },
+ { 1.58789351816042789700, -0.59889382039736038799, 135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 },
+ { 1.58789351933467837164, -0.59889382227058296504, 135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 },
+ { 1.58789352027559971248, -0.59889382252475087398, 135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 },
+ { 1.58966906957488163243, -0.58996975014221753053, 135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, 180,
+ { 0.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { 0.00000000000000027502, -1.26092062916373448545, 180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { 0.00000000000000000000, -1.26092061053506587776, 180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { 0.00000000000000000000, -1.26092062023552875516, 180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { 0.00000000000000000000, -1.26092062918495328994, 180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 },
+ { 0.00000000000000000000, -1.24830091939885789998, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, -45,
+ { -1.58943065821228057821, 2.59810442478829362045, -45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 },
+ { -1.58943065821171236607, 2.59810442478739123118, -45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 },
+ { -1.58943065613921019619, 2.59810442273856923023, -45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 },
+ { -1.58943065729835319999, 2.59810443328209572655, -45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 },
+ { -1.58943065821227924594, 2.59810442478829228818, -45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 },
+ { -1.59120965314638773691, 2.58919942720574303152, -45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, -90,
+ { -2.24612766651409989649, 0.99922666842209439952, -90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 },
+ { -2.24612766651347328661, 0.99922666842209484361, -90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 },
+ { -2.24612766651409945240, 0.99922666842208562876, -90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 },
+ { -2.24612766651409812013, 0.99922666841944918215, -90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 },
+ { -2.24612766651412920638, 0.99922666842209206806, -90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 },
+ { -2.24864304714222296155, 0.99923012194947880005, -90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, -135,
+ { -1.58789352027561725400, -0.59889382252477618707, -135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 },
+ { -1.58789352027508301468, -0.59889382252384604222, -135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 },
+ { -1.58789351816042789700, -0.59889382039736038799, -135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 },
+ { -1.58789351933467837164, -0.59889382227058296504, -135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 },
+ { -1.58789352027559971248, -0.59889382252475087398, -135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 },
+ { -1.58966906957488163243, -0.58996975014221753053, -135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 0, 1 }, 250000, -180,
+ { 0.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { -0.00000000000000027502, -1.26092062916373448545, -180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { 0.00000000000000000000, -1.26092061053506587776, -180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { 0.00000000000000000000, -1.26092062023552875516, -180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { 0.00000000000000000000, -1.26092062918495328994, -180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 },
+ { 0.00000000000000000000, -1.24830091939885789998, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, 0,
+ { -1.00000000000000000000, 1.26092062918498104551, 0.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { -1.00000000000000000000, 1.26092062916373448545, 0.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { -1.00000000000000000000, 1.26092061053506587776, 0.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { -1.00000000000000000000, 1.26092062023552875516, 0.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { -1.00000000000000000000, 1.26092062918495995127, 0.00000000000000000000, 249935.55872469596215523779, 0.99922674479230122468 },
+ { -1.00000000000000000000, 1.24830091939884435526, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, 45,
+ { 0.58789352027561725400, 0.59889382252477618707, 44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 },
+ { 0.58789352027508279264, 0.59889382252384637528, 44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 },
+ { 0.58789351816042800802, 0.59889382039736038799, 44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 },
+ { 0.58789351933467837164, 0.59889382227058296504, 44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 },
+ { 0.58789352027561669889, 0.59889382252477563195, 44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 },
+ { 0.58966906957485232255, 0.58996975014221642031, 44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, 90,
+ { 1.24612766651409989649, -0.99922666842209439952, 89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 },
+ { 1.24612766651347328661, -0.99922666842209439952, 89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 },
+ { 1.24612766651409945240, -0.99922666842208529570, 89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 },
+ { 1.24612766651409834218, -0.99922666841944873806, 89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 },
+ { 1.24612766651407835816, -0.99922666842209184601, 89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 },
+ { 1.24864304714222140724, -0.99923012194947846698, 89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, 135,
+ { 0.58943065821228057821, -2.59810442478829362045, 134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 },
+ { 0.58943065821171258811, -2.59810442478739078709, 134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 },
+ { 0.58943065613921030721, -2.59810442273856878614, 134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 },
+ { 0.58943065729835331101, -2.59810443328209572655, 134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 },
+ { 0.58943065821226814371, -2.59810442478831138402, 134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 },
+ { 0.59120965314640527843, -2.58919942720575324557, 134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, 180,
+ { -1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { -0.99999999999999977796, -3.26088938009322193423, 180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { -1.00000000000000000000, -3.26088936183515265554, 180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { -1.00000000000000000000, -3.26088938879229361945, 180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { -1.00000000000000000000, -3.26088938011400975014, 180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 },
+ { -0.99999999999998867573, -3.24830091939884901819, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, -45,
+ { -2.58789352027561747605, 0.59889382252477618707, -44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 },
+ { -2.58789352027508279264, 0.59889382252384637528, -44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 },
+ { -2.58789351816042811905, 0.59889382039736038799, -44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 },
+ { -2.58789351933467859368, 0.59889382227058296504, -44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 },
+ { -2.58789352027561658787, 0.59889382252477563195, -44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 },
+ { -2.58966906957485276664, 0.58996975014221642031, -44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, -90,
+ { -3.24612766651409989649, -0.99922666842209439952, -89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 },
+ { -3.24612766651347328661, -0.99922666842209439952, -89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 },
+ { -3.24612766651409989649, -0.99922666842208529570, -89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 },
+ { -3.24612766651409812013, -0.99922666841944873806, -89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 },
+ { -3.24612766651407813612, -0.99922666842209184601, -89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 },
+ { -3.24864304714222429382, -0.99923012194947846698, -89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, -135,
+ { -2.58943065821228035617, -2.59810442478829362045, -134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 },
+ { -2.58943065821171281016, -2.59810442478739078709, -134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 },
+ { -2.58943065613921019619, -2.59810442273856878614, -134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 },
+ { -2.58943065729835319999, -2.59810443328209572655, -134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 },
+ { -2.58943065821226792167, -2.59810442478831138402, -134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 },
+ { -2.59120965314638285193, -2.58919942720575324557, -134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, -1 }, 250000, -180,
+ { -1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { -1.00000000000000022204, -3.26088938009322193423, -180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { -1.00000000000000000000, -3.26088936183515265554, -180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { -1.00000000000000000000, -3.26088938879229361945, -180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { -1.00000000000000000000, -3.26088938011400975014, -180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 },
+ { -0.99999999999998867573, -3.24830091939884901819, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, 0,
+ { -1.00000000000000000000, 3.26088938011404927408, 0.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { -1.00000000000000000000, 3.26088938009322193423, 0.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { -1.00000000000000000000, 3.26088936183515265554, 0.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { -1.00000000000000000000, 3.26088938879229361945, 0.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { -1.00000000000000000000, 3.26088938011400220063, 0.00000000000000000000, 249935.55991249639191664755, 0.99922675429255336521 },
+ { -1.00000000000000000000, 3.24830091939884457730, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, 45,
+ { 0.58943065821228057821, 2.59810442478829362045, 45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 },
+ { 0.58943065821171236607, 2.59810442478739123118, 45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 },
+ { 0.58943065613921030721, 2.59810442273856923023, 45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 },
+ { 0.58943065729835331101, 2.59810443328209572655, 45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 },
+ { 0.58943065821227913492, 2.59810442478829228818, 45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 },
+ { 0.59120965314638784793, 2.58919942720574303152, 45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, 90,
+ { 1.24612766651409989649, 0.99922666842209439952, 90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 },
+ { 1.24612766651347328661, 0.99922666842209484361, 90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 },
+ { 1.24612766651409945240, 0.99922666842208562876, 90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 },
+ { 1.24612766651409834218, 0.99922666841944918215, 90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 },
+ { 1.24612766651412942842, 0.99922666842209206806, 90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 },
+ { 1.24864304714222140724, 0.99923012194947880005, 90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, 135,
+ { 0.58789352027561725400, -0.59889382252477618707, 135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 },
+ { 0.58789352027508301468, -0.59889382252384604222, 135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 },
+ { 0.58789351816042800802, -0.59889382039736038799, 135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 },
+ { 0.58789351933467837164, -0.59889382227058296504, 135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 },
+ { 0.58789352027559971248, -0.59889382252475087398, 135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 },
+ { 0.58966906957488163243, -0.58996975014221753053, 135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, 180,
+ { -1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { -0.99999999999999977796, -1.26092062916373448545, 180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { -1.00000000000000000000, -1.26092061053506587776, 180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { -1.00000000000000000000, -1.26092062023552875516, 180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { -1.00000000000000000000, -1.26092062918495328994, 180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 },
+ { -1.00000000000000000000, -1.24830091939885789998, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, -45,
+ { -2.58943065821228035617, 2.59810442478829362045, -45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 },
+ { -2.58943065821171236607, 2.59810442478739123118, -45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 },
+ { -2.58943065613921019619, 2.59810442273856923023, -45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 },
+ { -2.58943065729835319999, 2.59810443328209572655, -45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 },
+ { -2.58943065821227902390, 2.59810442478829228818, -45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 },
+ { -2.59120965314638818100, 2.58919942720574303152, -45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, -90,
+ { -3.24612766651409989649, 0.99922666842209439952, -90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 },
+ { -3.24612766651347328661, 0.99922666842209484361, -90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 },
+ { -3.24612766651409989649, 0.99922666842208562876, -90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 },
+ { -3.24612766651409812013, 0.99922666841944918215, -90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 },
+ { -3.24612766651412920638, 0.99922666842209206806, -90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 },
+ { -3.24864304714222429382, 0.99923012194947880005, -90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, -135,
+ { -2.58789352027561747605, -0.59889382252477618707, -135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 },
+ { -2.58789352027508279264, -0.59889382252384604222, -135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 },
+ { -2.58789351816042811905, -0.59889382039736038799, -135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 },
+ { -2.58789351933467859368, -0.59889382227058296504, -135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 },
+ { -2.58789352027559971248, -0.59889382252475087398, -135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 },
+ { -2.58966906957482478902, -0.58996975014221753053, -135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { -1, 1 }, 250000, -180,
+ { -1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { -1.00000000000000022204, -1.26092062916373448545, -180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { -1.00000000000000000000, -1.26092061053506587776, -180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { -1.00000000000000000000, -1.26092062023552875516, -180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { -1.00000000000000000000, -1.26092062918495328994, -180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 },
+ { -1.00000000000000000000, -1.24830091939885789998, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, 0,
+ { 1.00000000000000000000, 3.26088938011404927408, 0.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { 1.00000000000000000000, 3.26088938009322193423, 0.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { 1.00000000000000000000, 3.26088936183515265554, 0.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { 1.00000000000000000000, 3.26088938879229361945, 0.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { 1.00000000000000000000, 3.26088938011400220063, 0.00000000000000000000, 249935.55991249639191664755, 0.99922675429255336521 },
+ { 1.00000000000000000000, 3.24830091939884457730, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, 45,
+ { 2.58943065821228035617, 2.59810442478829362045, 45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 },
+ { 2.58943065821171236607, 2.59810442478739123118, 45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 },
+ { 2.58943065613921019619, 2.59810442273856923023, 45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 },
+ { 2.58943065729835319999, 2.59810443328209572655, 45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 },
+ { 2.58943065821227902390, 2.59810442478829228818, 45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 },
+ { 2.59120965314638818100, 2.58919942720574303152, 45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, 90,
+ { 3.24612766651409989649, 0.99922666842209439952, 90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 },
+ { 3.24612766651347328661, 0.99922666842209484361, 90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 },
+ { 3.24612766651409989649, 0.99922666842208562876, 90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 },
+ { 3.24612766651409812013, 0.99922666841944918215, 90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 },
+ { 3.24612766651412920638, 0.99922666842209206806, 90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 },
+ { 3.24864304714222429382, 0.99923012194947880005, 90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, 135,
+ { 2.58789352027561747605, -0.59889382252477618707, 135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 },
+ { 2.58789352027508279264, -0.59889382252384604222, 135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 },
+ { 2.58789351816042811905, -0.59889382039736038799, 135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 },
+ { 2.58789351933467859368, -0.59889382227058296504, 135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 },
+ { 2.58789352027559971248, -0.59889382252475087398, 135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 },
+ { 2.58966906957482478902, -0.58996975014221753053, 135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, 180,
+ { 1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { 1.00000000000000022204, -1.26092062916373448545, 180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { 1.00000000000000000000, -1.26092061053506587776, 180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { 1.00000000000000000000, -1.26092062023552875516, 180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { 1.00000000000000000000, -1.26092062918495328994, 180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 },
+ { 1.00000000000000000000, -1.24830091939885789998, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, -45,
+ { -0.58943065821228057821, 2.59810442478829362045, -45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 },
+ { -0.58943065821171236607, 2.59810442478739123118, -45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 },
+ { -0.58943065613921030721, 2.59810442273856923023, -45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 },
+ { -0.58943065729835331101, 2.59810443328209572655, -45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 },
+ { -0.58943065821227913492, 2.59810442478829228818, -45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 },
+ { -0.59120965314638784793, 2.58919942720574303152, -45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, -90,
+ { -1.24612766651409989649, 0.99922666842209439952, -90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 },
+ { -1.24612766651347328661, 0.99922666842209484361, -90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 },
+ { -1.24612766651409945240, 0.99922666842208562876, -90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 },
+ { -1.24612766651409834218, 0.99922666841944918215, -90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 },
+ { -1.24612766651412942842, 0.99922666842209206806, -90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 },
+ { -1.24864304714222140724, 0.99923012194947880005, -90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, -135,
+ { -0.58789352027561725400, -0.59889382252477618707, -135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 },
+ { -0.58789352027508301468, -0.59889382252384604222, -135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 },
+ { -0.58789351816042800802, -0.59889382039736038799, -135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 },
+ { -0.58789351933467837164, -0.59889382227058296504, -135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 },
+ { -0.58789352027559971248, -0.59889382252475087398, -135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 },
+ { -0.58966906957488163243, -0.58996975014221753053, -135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, 1 }, 250000, -180,
+ { 1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { 0.99999999999999977796, -1.26092062916373448545, -180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { 1.00000000000000000000, -1.26092061053506587776, -180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { 1.00000000000000000000, -1.26092062023552875516, -180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { 1.00000000000000000000, -1.26092062918495328994, -180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 },
+ { 1.00000000000000000000, -1.24830091939885789998, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, 0,
+ { 1.00000000000000000000, 1.26092062918498104551, 0.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 },
+ { 1.00000000000000000000, 1.26092062916373448545, 0.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 },
+ { 1.00000000000000000000, 1.26092061053506587776, 0.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 },
+ { 1.00000000000000000000, 1.26092062023552875516, 0.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 },
+ { 1.00000000000000000000, 1.26092062918495995127, 0.00000000000000000000, 249935.55872469596215523779, 0.99922674479230122468 },
+ { 1.00000000000000000000, 1.24830091939884435526, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, 45,
+ { 2.58789352027561747605, 0.59889382252477618707, 44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 },
+ { 2.58789352027508279264, 0.59889382252384637528, 44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 },
+ { 2.58789351816042811905, 0.59889382039736038799, 44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 },
+ { 2.58789351933467859368, 0.59889382227058296504, 44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 },
+ { 2.58789352027561658787, 0.59889382252477563195, 44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 },
+ { 2.58966906957485276664, 0.58996975014221642031, 44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, 90,
+ { 3.24612766651409989649, -0.99922666842209439952, 89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 },
+ { 3.24612766651347328661, -0.99922666842209439952, 89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 },
+ { 3.24612766651409989649, -0.99922666842208529570, 89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 },
+ { 3.24612766651409812013, -0.99922666841944873806, 89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 },
+ { 3.24612766651407813612, -0.99922666842209184601, 89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 },
+ { 3.24864304714222429382, -0.99923012194947846698, 89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, 135,
+ { 2.58943065821228035617, -2.59810442478829362045, 134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 },
+ { 2.58943065821171281016, -2.59810442478739078709, 134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 },
+ { 2.58943065613921019619, -2.59810442273856878614, 134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 },
+ { 2.58943065729835319999, -2.59810443328209572655, 134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 },
+ { 2.58943065821226792167, -2.59810442478831138402, 134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 },
+ { 2.59120965314638285193, -2.58919942720575324557, 134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, 180,
+ { 1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { 1.00000000000000022204, -3.26088938009322193423, 180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { 1.00000000000000000000, -3.26088936183515265554, 180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { 1.00000000000000000000, -3.26088938879229361945, 180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { 1.00000000000000000000, -3.26088938011400975014, 180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 },
+ { 0.99999999999998867573, -3.24830091939884901819, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, -45,
+ { -0.58789352027561725400, 0.59889382252477618707, -44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 },
+ { -0.58789352027508279264, 0.59889382252384637528, -44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 },
+ { -0.58789351816042800802, 0.59889382039736038799, -44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 },
+ { -0.58789351933467837164, 0.59889382227058296504, -44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 },
+ { -0.58789352027561669889, 0.59889382252477563195, -44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 },
+ { -0.58966906957485232255, 0.58996975014221642031, -44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, -90,
+ { -1.24612766651409989649, -0.99922666842209439952, -89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 },
+ { -1.24612766651347328661, -0.99922666842209439952, -89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 },
+ { -1.24612766651409945240, -0.99922666842208529570, -89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 },
+ { -1.24612766651409834218, -0.99922666841944873806, -89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 },
+ { -1.24612766651407835816, -0.99922666842209184601, -89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 },
+ { -1.24864304714222140724, -0.99923012194947846698, -89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, -135,
+ { -0.58943065821228057821, -2.59810442478829362045, -134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 },
+ { -0.58943065821171258811, -2.59810442478739078709, -134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 },
+ { -0.58943065613921030721, -2.59810442273856878614, -134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 },
+ { -0.58943065729835331101, -2.59810443328209572655, -134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 },
+ { -0.58943065821226814371, -2.59810442478831138402, -134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 },
+ { -0.59120965314640527843, -2.58919942720575324557, -134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 }
+ },{
+ { 1, -1 }, 250000, -180,
+ { 1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 },
+ { 0.99999999999999977796, -3.26088938009322193423, -180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 },
+ { 1.00000000000000000000, -3.26088936183515265554, -180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 },
+ { 1.00000000000000000000, -3.26088938879229361945, -180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 },
+ { 1.00000000000000000000, -3.26088938011400975014, -180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 },
+ { 0.99999999999998867573, -3.24830091939884901819, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 }
+ }
+
+};
+
+size_t const expected_size = sizeof(expected) / sizeof(expected_results);
+#endif // BOOST_GEOMETRY_TEST_DIRECT_CASES_HPP
diff --git a/src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp b/src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp
new file mode 100644
index 000000000..c6ba85248
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp
@@ -0,0 +1,343 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
+
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DIRECT_CASES_ANTIPODAL_HPP
+#define BOOST_GEOMETRY_TEST_DIRECT_CASES_ANTIPODAL_HPP
+
+#include "direct_cases.hpp"
+
+struct expected_results_antipodal
+{
+ coordinates p1;
+ double distance;
+ double azimuth12;
+ expected_result karney;
+};
+
+/*
+ These values are collected from GeodTest which is associated with GeographicLib:
+ https://zenodo.org/record/32156
+
+ The conversion to C++ array format is done using this Python script:
+ https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-dataset-parse.py
+
+ Geodesic scale (M12) is absent from the GeodTest dataset, so it is manually generated
+ using GeographicLib through this C++ script:
+ https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-direct-antipodal.cpp
+*/
+expected_results_antipodal expected_antipodal[] =
+{
+ {
+ { 0, 31.394417440639 }, 19980218.4055399, 34.266322930672,
+ { 179.615601631202912322, -31.275540610835465807, 145.782701113414306756, 49490.8807994496209, -0.996116451012525883079717914370121434 }
+ },{
+ { 0, 29.788792273749 }, 19887224.5407334, 74.302205994192,
+ { 178.569451327813675741, -29.558013672069422725, 106.156240654579267308, 97043.7545600593058, -0.998624031147844926081802441331092268 }
+ },{
+ { 0, 46.471843094141 }, 19944337.8863917, 63.693680310665,
+ { 179.083144618009561276, -46.284166405924629853, 116.699978859005570535, 53139.140576552365, -0.997597309645591900917338534782174975 }
+ },{
+ { 0, 63.016506345929 }, 20000925.7533636, 153.393656073038,
+ { 179.862869954071637855, -63.02943882703369735, 26.619056019474552953, 12713.9284725111772, -1.00381317792143387457315384381217882 }
+ },{
+ { 0, 19.796231412719 }, 19956338.1330537, 28.272934411318,
+ { 179.546498474461283862, -19.470586923091672503, 151.789094611690988249, 87191.1749625132931, -0.997015409027664833985227232915349305 }
+ },{
+ { 0, 6.373459459035 }, 19946581.6983394, 56.859050230583,
+ { 179.240009269347556917, -6.204887833274217382, 123.169200847008284851, 53958.8698005263939, -0.999349049081101004077254401636309922 }
+ },{
+ { 0, 66.380766469414 }, 19986277.7696849, 38.646950203356,
+ { 179.632633596894388233, -66.27177494016956425, 141.550919825824399405, 22198.215635049214, -0.996949176054954366854587988200364634 }
+ },{
+ { 0, 16.483421185231 }, 19962737.9842573, 163.431254767325,
+ { 179.731567273052604726, -16.818424446748042212, 16.598399455529231288, 95318.4104529881431, -1.00272210232979741562076014815829694 }
+ },{
+ { 0, 4.215702155486 }, 19932517.393764, 65.543168480886,
+ { 179.093771177769992874, -4.051917290690976764, 114.482669479963380006, 55205.4553703842317, -0.999655858425056553784315838129259646 }
+ },{
+ { 0, 40.71372085907 }, 19951133.3595356, 143.672151631634,
+ { 179.404612926861498984, -41.047052242159400671, 36.54002600969304553, 70931.1530155553621, -1.00414169574077272173440178448799998 }
+ },{
+ { 0, 15.465481491654 }, 19877383.8879911, 36.289185640976,
+ { 179.020726605204181801, -14.622355549425900341, 143.875673907461159912, 156419.0806764376957, -0.997639074397169589580869342171354219 }
+ },{
+ { 0, 17.586197343531 }, 19982280.4639115, 157.929615091529,
+ { 179.722490735835379144, -17.731394230364437075, 22.089021105298661023, 69727.5357849255557, -1.00280451698301242835498214844847098 }
+ },{
+ { 0, 5.7442768247 }, 19902873.7431814, 116.146983678305,
+ { 178.85894724576868462, -6.039853564481335581, 63.91482549951374061, 87149.6188944111673, -1.00039332893096744037109147029696032 }
+ },{
+ { 0, 32.002904282111 }, 19967670.3104795, 163.052160078191,
+ { 179.744925422107715439, -32.297934520693132807, 17.004175883388454943, 78311.3164829640582, -1.00449903445302446414189034840092063 }
+ },{
+ { 0, 55.902716926362 }, 19970525.337607, 98.927641063414,
+ { 179.300685189522463007, -55.934320218634018206, 81.374264168520557301, 23554.0093185709067, -1.00072788779083454713259015989024192 }
+ },{
+ { 0, 22.69939784398 }, 19959286.1903172, 74.253870776761,
+ { 179.294173474584020749, -22.654875407651067149, 105.811588890213155275, 22369.7179951557679, -0.998972181419003457669703038845909759 }
+ },{
+ { 0, 41.312328471121 }, 19962690.5721867, 11.277616109847,
+ { 179.817186837717804928, -40.954523601529804886, 168.784288786443902199, 77252.6121237260201, -0.994825151471527391322524636052548885 }
+ },{
+ { 0, 27.927415327453 }, 19961296.8828333, 23.166421459647,
+ { 179.636508875679110143, -27.607314264234172721, 156.905194492817275222, 83096.5801709291101, -0.995959692767656723511038308060960844 }
+ },{
+ { 0, 41.567228741451 }, 19944253.4454809, 176.66609526064,
+ { 179.931812964300204608, -42.103039532074194347, 3.361859685835349219, 96859.08180779197, -1.00513607140487626345759508694754913 }
+ },{
+ { 0, 37.384208978567 }, 19928705.5911445, 39.072534864532,
+ { 179.225180174670992261, -36.916085670712060029, 141.212743814390850106, 92667.7834060578402, -0.995955516859159284415170532156480476 }
+ },{
+ { 0, 59.011868682852 }, 19970442.3788306, 44.970301291063,
+ { 179.424923485514312807, -58.82705468054708336, 135.333817989802309531, 38071.1136293083857, -0.996658942892707400140750451100757346 }
+ },{
+ { 0, 35.515406087737 }, 19948918.9139751, 28.528972431952,
+ { 179.50369572149476218, -35.119747127350258822, 151.622257906284404073, 84564.0387217601751, -0.995562861799169418475230486365035176 }
+ },{
+ { 0, 58.170252463184 }, 19961407.0813807, 128.021116291844,
+ { 179.254737571455023977, -58.372261836268550805, 52.399129705193347143, 43715.3070711393309, -1.00285273713280753682397516968194395 }
+ },{
+ { 0, 34.012183807959 }, 19970955.843065, 168.944519134772,
+ { 179.83713352180447672, -34.29640782899529639, 11.093048811826875835, 76493.5814538538151, -1.0047652354558671561335359001532197 }
+ },{
+ { 0, 45.510762948553 }, 19940248.3450143, 99.886784003837,
+ { 178.981682578823726535, -45.582753595227824235, 80.542330522982505877, 48555.1946627894972, -1.00083807750906350619857221317943186 }
+ },{
+ { 0, 4.19841765451 }, 19970496.5132933, 89.561550657928,
+ { 179.398024428225540172, -4.198416896099783242, 90.438456568689151881, 14.8790480103109, -0.999994104810285944218151144013972953 }
+ },{
+ { 0, 40.890119148103 }, 19926563.5817492, 165.437641169967,
+ { 179.6557148951668192, -41.553556264538302258, 14.713597527941311478, 111805.7305227545923, -1.00492294933406567380984597548376769 }
+ },{
+ { 0, 28.096672787686 }, 19883901.8482359, 115.174366374632,
+ { 178.606868012231657724, -28.472055035513955205, 65.257367020445564176, 107880.4353518862363, -1.00170803073331593502359737613005564 }
+ },{
+ { 0, 6.50572154271 }, 19917276.4101551, 79.069492719523,
+ { 178.926013840891647541, -6.411745140559297675, 100.985091481519557845, 57073.3242952680707, -0.999736666933808471036115861352300271 }
+ },{
+ { 0, .468835109567 }, 19849380.7342734, 80.234636214474,
+ { 178.325942223692180692, -.281751687044281805, 99.77243368342786593, 123845.4568822078908, -0.999801437209140719808431185811059549 }
+ },{
+ { 0, 1.682746325049 }, 19890026.0274781, 10.076182752451,
+ { 179.717131561406935483, -.677647430701204515, 169.927471515299313238, 177917.2104306563981, -0.999538055691262194990542866435134783 }
+ },{
+ { 0, 10.711305126218 }, 19962987.2134077, 7.528253696796,
+ { 179.874050163405229937, -10.349315378531556046, 172.480576051850009046, 104175.1095378254456, -0.998071853755238880268052525934763253 }
+ },{
+ { 0, 53.374321544652 }, 19980478.1457438, 23.324715976877,
+ { 179.729445806011012057, -53.196257519024042184, 156.777734080146664812, 41907.8869272231053, -0.995333596277707566279957518418086693 }
+ },{
+ { 0, 39.680221664519 }, 19956191.7841809, 7.075406493429,
+ { 179.87506206720154785, -39.256187213040660911, 172.967624741991546131, 86943.8110669895148, -0.994801087909667924868983845954062417 }
+ },{
+ { 0, 1.377666714083 }, 19925401.4931301, 95.29199069739,
+ { 178.994542525209058878, -1.415358715570225495, 84.7178724483824156, 45800.9140624827059, -0.99999803170512457928253979844157584 }
+ },{
+ { 0, 48.751426624188 }, 19988599.1160495, 40.252328570137,
+ { 179.661697715070846977, -48.688146707479475147, 139.808452951157199824, 26322.3790862461568, -0.995999245724129789181233718409202993 }
+ },{
+ { 0, 59.443039048494 }, 19969935.9534732, 93.052184108221,
+ { 179.247605418616998285, -59.454371825393424121, 87.331416513795326158, 25342.4691896499534, -1.00020727848897084122370415570912883 }
+ },{
+ { 0, 4.122408476235 }, 19938291.6332293, 167.73479753304,
+ { 179.749430572914989772, -4.689124208743755363, 12.274635577599782826, 127855.6475863583497, -1.00068600902837667732114823593292385 }
+ },{
+ { 0, 46.422470082432 }, 19931980.7029341, 86.67365350297,
+ { 178.857408435141563774, -46.390934261324541952, 93.852683224054943377, 56114.680046867064, -0.999607096116300386512421027873642743 }
+ },{
+ { 0, 32.614423729024 }, 19926887.3785175, 24.943814520557,
+ { 179.460593512880455451, -32.01874745886238612, 155.229917137448282531, 112355.3319340873104, -0.995562150676871926435751447570510209 }
+ },{
+ { 0, 3.242895277973 }, 19964490.4789049, 30.247458779683,
+ { 179.556428318080663113, -3.001106476068264917, 149.760178923092147784, 80929.0418317066044, -0.999474184270344845337774586369050667 }
+ },{
+ { 0, 6.29069210113 }, 19877160.8505733, 94.34299459284,
+ { 178.556859259685624933, -6.354208910915346725, 85.750059038253282986, 94127.1566760840083, -0.999976397350904933070125935046235099 }
+ },{
+ { 0, 18.232086569498 }, 19927978.7462175, 164.41905055334,
+ { 179.658073278238477245, -18.87394850776853555, 15.640779355822506503, 129771.1882449660559, -1.00293460439063886191490837518358603 }
+ },{
+ { 0, 12.049849333181 }, 19908004.4552909, 9.418096768309,
+ { 179.761046682699610657, -11.201990279782499264, 170.610608272305604585, 157761.5040571466343, -0.997761474497510958414636661473196 }
+ },{
+ { 0, 40.289465276136 }, 19985674.936106, 143.092606818963,
+ { 179.644208494155329095, -40.370034926441385999, 36.958610382613096419, 36200.8933724688593, -1.00414965876091266672176516294712201 }
+ },{
+ { 0, 2.197784650379 }, 19910509.7517973, 1.542117609437,
+ { 179.961199531084784854, -1.353440827124394777, 178.458582198505846426, 160403.6285079348996, -0.999488724639301051588802238256903365 }
+ },{
+ { 0, 1.966575272177 }, 19875595.6267266, 170.112968791865,
+ { 179.699817324905962184, -3.101125282483752618, 9.89572776349855838, 192355.7206665719908, -1.00015463589804554089823795948177576 }
+ },{
+ { 0, 25.078832492684 }, 19887997.7953866, 77.264585323781,
+ { 178.600804840925824646, -24.897833702325682511, 103.101167809583406892, 92442.9124509225839, -0.998981189838600847075156252685701475 }
+ },{
+ { 0, 31.740361941314 }, 19972325.3556069, 143.930820896999,
+ { 179.553485210731879874, -31.909206787477701871, 36.145242998351638503, 54883.4113710054145, -1.00379461628115951299378139083273709 }
+ },{
+ { 0, .05479250563 }, 19858049.4780499, 41.349430623518,
+ { 178.822647462220726609, .836079031223269324, 138.645259065012502544, 169078.442370111714, -0.9997793696948588104689292777038645 }
+ },{
+ { 0, 36.685139871608 }, 19968965.6773632, 89.167975517493,
+ { 179.366667224014334712, -36.6833040833258687, 90.921025521408327068, 13327.2156799476918, -0.999916537946348604748436628142371774 }
+ },{
+ { 0, 3.451199399671 }, 19938203.3838544, 91.541212417048,
+ { 179.107509334399258305, -3.459003521120242021, 88.476282464773035164, 32316.1747698810781, -1.00000397484395819880376166111091152 }
+ },{
+ { 0, 27.692898794247 }, 19883493.6699045, 88.406440883665,
+ { 178.512356615673144314, -27.666009301228316555, 92.036345087713397961, 94128.7880896190836, -0.999736458322951659916100197733612731 }
+ },{
+ { 0, 17.363238291869 }, 19980749.7638027, 39.697196316589,
+ { 179.567921315455829491, -17.288872648596950413, 140.321938237586060826, 46975.9359427664379, -0.997687691981715030209443284547887743 }
+ },{
+ { 0, 37.006775102539 }, 19949309.9180043, 116.455543532607,
+ { 179.191103068859169842, -37.156365616364686838, 63.771817992036617793, 45856.1961421018701, -1.00221962858918423044940482213860378 }
+ },{
+ { 0, 45.572883540957 }, 19940027.8586414, 137.627256708444,
+ { 179.224707765088686272, -45.94675931323086696, 42.723991162977357301, 74208.4359612889496, -1.00380887786447159371050474874209613 }
+ },{
+ { 0, 43.63393981955 }, 19931045.2914508, 91.203625101465,
+ { 178.878236417027994157, -43.642335115130514773, 89.268780774643462256, 55253.5406349861764, -1.00002974153150514524668324156664312 }
+ },{
+ { 0, 38.4995307019 }, 19918391.2222193, 141.232864609445,
+ { 179.143856004445269342, -39.042223438550921467, 39.117947060740562295, 102217.2563106863077, -1.00388164115732947401227193040540442 }
+ },{
+ { 0, 27.55015339382 }, 19986004.7358853, 137.025135713548,
+ { 179.596220103573824099, -27.587412128122249651, 42.992898351962011956, 33938.7346646670654, -1.00316044390281167153489150223322213 }
+ },{
+ { 0, 1.54507498314 }, 19978593.3191777, 36.816106412092,
+ { 179.567115633151308577, -1.448861185025252004, 143.185763012309022403, 56320.5800276739168, -0.999770499462467210349814195069484413 }
+ },{
+ { 0, 45.217063644222 }, 19987042.0782465, 18.114645812265,
+ { 179.807382581661125, -45.086424050571516283, 161.928120141429818658, 45544.2915061261936, -0.994974179414854997816064496873877943 }
+ },{
+ { 0, 13.473522450751 }, 19987364.078382, 156.839609002403,
+ { 179.726941062277208626, -13.570372758027936877, 23.170293747820406391, 65329.9068132034472, -1.00219093189506569530067281448282301 }
+ },{
+ { 0, 6.287741997374 }, 19912159.8245954, 132.954797451112,
+ { 179.071252372259552052, -6.743450924917895817, 47.100789519677419746, 104772.4027498097375, -1.00071252411103017720961361192166805 }
+ },{
+ { 0, 7.639709001531 }, 19976374.3699535, 29.731916588299,
+ { 179.616156296978583335, -7.48702643786017917, 150.279582966919438164, 69224.6591757209539, -0.998789792086741234911073661351110786 }
+ },{
+ { 0, 5.893688050348 }, 19886907.2520668, 14.653438882877,
+ { 179.586212000450856399, -4.888408917114795625, 165.371181401863458848, 177183.5330818593022, -0.998794647031120752522781458537792787 }
+ },{
+ { 0, 61.997076235476 }, 19976288.2901729, 149.562797049254,
+ { 179.605779116829636081, -62.19593758437129915, 30.65850204223272625, 36696.2853801462176, -1.00373071432437144245852778112748638 }
+ },{
+ { 0, 50.507637741656 }, 19979542.5263293, 171.564028344478,
+ { 179.893569206021038536, -50.721890799900161112, 8.4746613464253591, 50644.5234828162697, -1.00508881632281776852266830246662721 }
+ },{
+ { 0, 7.484475238477 }, 19867425.2906303, 57.020570370985,
+ { 178.638400003000590878, -6.926155588124333461, 123.087267812322270238, 132929.2775641349633, -0.999097042677338120775232255255104974 }
+ },{
+ { 0, 56.851165323215 }, 19988235.9960515, 112.345749045605,
+ { 179.587046628550073045, -56.875248360744638525, 67.744017057185404441, 9971.0934553515518, -1.00182859249871403228837607457535341 }
+ },{
+ { 0, 10.692273150738 }, 19893210.3050033, 102.824601316946,
+ { 178.709520715733071393, -10.851727623036704339, 77.308514969817191459, 83032.7122948051111, -1.00034345584508432835946223349310458 }
+ },{
+ { 0, 46.694739303788 }, 19975447.9283188, 174.663684259477,
+ { 179.926838145841924189, -46.948618153686522669, 5.361568174833475454, 59614.5876209460645, -1.00520484875201732144489596976200119 }
+ },{
+ { 0, 15.804386137005 }, 19855850.8800526, 74.932089158884,
+ { 178.367587635209819128, -15.522042847777054984, 105.357235560913450667, 123350.4326645237628, -0.999091578546475345135036150168161839 }
+ },{
+ { 0, 4.371450175299 }, 19979071.1035552, 164.163592252794,
+ { 179.780887420199549421, -4.566109732313098407, 15.840695025950408814, 84137.2115482558728, -1.00076323969894742660358133434783667 }
+ },{
+ { 0, 30.894388279688 }, 19968681.8321577, 77.35154610481,
+ { 179.375426183521944524, -30.871308884744172663, 102.709506078439532936, 14048.0277985734058, -0.998975176336422854284080585784977302 }
+ },{
+ { 0, 9.541166838639 }, 19848553.7844137, 118.441353539081,
+ { 178.432934555386452839, -10.09982228112793472, 61.736686215549403663, 144831.1911566651614, -1.00060548620110489892454097571317106 }
+ },{
+ { 0, 8.489292700054 }, 19995477.1669578, 171.963952699866,
+ { 179.906698338023119097, -8.559237750032113623, 8.037517851139094467, 72192.60793572974, -1.00152068486306466965629624610301107 }
+ },{
+ { 0, 19.562401114224 }, 19893208.1788508, 126.362762598128,
+ { 178.838724116996037606, -20.05038360490599475, 53.875560227496658204, 112181.7524188837615, -1.00185202668802775249901060306001455 }
+ },{
+ { 0, 42.260350252749 }, 19942715.0054774, 170.703419847646,
+ { 179.807860448877064601, -42.79985897702184353, 9.377654670896439828, 96336.3477142010769, -1.00508642406443549077721399953588843 }
+ },{
+ { 0, 24.511403144656 }, 19924809.5184876, 102.913211410163,
+ { 178.957598444862223515, -24.616808725039883945, 77.297538210434837096, 55403.453072179318, -1.0008408309188838725134473861544393 }
+ },{
+ { 0, 20.844284170708 }, 19909084.6340808, 44.172784008084,
+ { 179.069258863637226633, -20.321320573298341477, 136.01627115731728436, 111009.0987238994608, -0.997389183621778974142557672166731209 }
+ },{
+ { 0, 2.426010809098 }, 19840940.6924189, 94.315194952561,
+ { 178.236397468862000784, -2.513715200833756776, 85.734896842737189557, 130002.6104886615638, -0.999825249844991659209370027383556589 }
+ },{
+ { 0, 6.600682554664 }, 19878412.28273, 168.167678684515,
+ { 179.646475458013797028, -7.699164822656561787, 11.861035812918738552, 187426.3958525886692, -1.00098284856064978498579876031726599 }
+ },{
+ { 0, 23.372339802326 }, 19899498.4582543, 161.197647943542,
+ { 179.499422665106094027, -24.239465200482591299, 18.932355367478826536, 151863.2545535951091, -1.00347666868431395492677893344080076 }
+ },{
+ { 0, 16.194668264095 }, 19874825.6683239, 148.942349959054,
+ { 179.115193814080201851, -17.129419031459576897, 31.225656401221968078, 166033.3161394594622, -1.00222032222233647935638600756647065 }
+ },{
+ { 0, 1.528726471528 }, 19897803.9939987, 69.212891442493,
+ { 178.791047180477802091, -1.282203000582034597, 110.802928803578167132, 85252.8333849204133, -0.999827144228156883265512533398577943 }
+ },{
+ { 0, 6.297249676078 }, 19864042.0495193, 56.274639904925,
+ { 178.623258703845895437, -5.709470001196540278, 123.817184177744186806, 137475.1283083659258, -0.999190450178399580671850799262756482 }
+ },{
+ { 0, 17.393540327984 }, 19962624.6302607, 107.855062015266,
+ { 179.330156510680163326, -17.431100690958209424, 72.181322855288535245, 19320.5501845044839, -1.00091841779689127989172447996679693 }
+ },{
+ { 0, 46.284685151236 }, 19990422.3478916, 14.758013867151,
+ { 179.852534804091121255, -46.176234945675219984, 165.271681964991897184, 42614.1796365710104, -0.994894592261839960656288894824683666 }
+ },{
+ { 0, 14.924320176299 }, 19891861.8615337, 31.446544793174,
+ { 179.195663739713760883, -14.125476432252858442, 148.678916887199611191, 149419.6596309045804, -0.997620142585332936313591289945179597 }
+ },{
+ { 0, 23.668824656069 }, 19938736.4442268, 148.091483667618,
+ { 179.409875478773990359, -24.107855233601412399, 32.02919257641173958, 97771.7687385830819, -1.00323262872000595891108787327539176 }
+ },{
+ { 0, 46.986276695896 }, 19968596.0414782, 174.796708941456,
+ { 179.92040916864362177, -47.301644191214905832, 5.234240076649939638, 66113.7417494369769, -1.00519095452608087093437916337279603 }
+ },{
+ { 0, 65.946144289524 }, 19993734.5109736, 25.375428509648,
+ { 179.808282612725835525, -65.871840130833632868, 154.703163938350061652, 18355.2254271672769, -0.996436935914610577569305860379245132 }
+ },{
+ { 0, 10.950298933293 }, 19975919.5586889, 28.779018914489,
+ { 179.624609619829763098, -10.787771536605316781, 151.238005588662201946, 70291.1998404303581, -0.998272071834115148902810688014142215 }
+ },{
+ { 0, 13.609869340778 }, 19913213.8514358, 129.616021271129,
+ { 179.035623147420893383, -14.023624108675206222, 50.506400999466711623, 97596.7664002074776, -1.00146664642314031645753402699483559 }
+ },{
+ { 0, 48.701427557433 }, 19972955.2699173, 102.875149183407,
+ { 179.385565054218238481, -48.735316652259656533, 77.294384444682547869, 18461.7742226227697, -1.00114676855429074464609584538266063 }
+ },{
+ { 0, 31.519172055785 }, 19952318.3772514, 26.247105619999,
+ { 179.555251675378549409, -31.140142027808697534, 153.865822276646938125, 86354.7117605101002, -0.995739948399825047786748655198607594 }
+ },{
+ { 0, 31.863784754278 }, 19993324.8682601, 29.572313410211,
+ { 179.722489476483407524, -31.826935359797657785, 150.440607907359037187, 41427.6181613499234, -0.995888009001147267440501309465616941 }
+ },{
+ { 0, 76.434608546092 }, 19997750.023578, 167.428385412814,
+ { 179.918287057674124459, -76.48787937532808951, 12.621032110142724567, 9619.5267710862108, -1.00233963893091582164629471662919968 }
+ },{
+ { 0, 73.114273316483 }, 19992866.6147806, 78.154765899661,
+ { 179.576736605988553624, -73.098788070892914568, 102.085693546950923465, 8580.6475692800946, -0.999384143308475469957841141876997426 }
+ },{
+ { 0, 1.125639056292 }, 19852573.5442848, 67.184842289382,
+ { 178.426819580880619395, -.694775021853292564, 112.831314850896246589, 132932.8743502563937, -0.999732957962833457266071945923613384 }
+ }
+};
+
+size_t const expected_size_antipodal = sizeof(expected_antipodal) / sizeof(expected_results_antipodal);
+
+#endif // BOOST_GEOMETRY_TEST_DIRECT_CASES_ANTIPODAL_HPP
diff --git a/src/boost/libs/geometry/test/formulas/direct_meridian.cpp b/src/boost/libs/geometry/test/formulas/direct_meridian.cpp
new file mode 100644
index 000000000..aa94413b9
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/direct_meridian.cpp
@@ -0,0 +1,115 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_NORMALIZE_LATITUDE
+
+#include <sstream>
+
+#include "test_formula.hpp"
+#include "direct_meridian_cases.hpp"
+
+#include <boost/geometry/srs/srs.hpp>
+#include <boost/geometry/formulas/vincenty_direct.hpp>
+#include <boost/geometry/formulas/meridian_direct.hpp>
+
+template <typename Result, typename Expected, typename Reference>
+void check_meridian_direct(Result& result,
+ Expected const& expected,
+ Reference& reference,
+ double reference_error)
+{
+ boost::geometry::math::normalize_spheroidal_coordinates
+ <
+ boost::geometry::radian,
+ double
+ >(result.lon2, result.lat2);
+
+ boost::geometry::math::normalize_spheroidal_coordinates
+ <
+ boost::geometry::radian,
+ double
+ >(reference.lon2, reference.lat2);
+
+ std::stringstream ss;
+ ss << "(" << result.lon2 * bg::math::r2d<double>()
+ << " " << result.lat2 * bg::math::r2d<double>() << ")";
+
+ check_one("lon:" + ss.str(), result.lon2, expected.lon, reference.lon2,
+ reference_error);
+ check_one("lat:" + ss.str(), result.lat2, expected.lat, reference.lat2,
+ reference_error);
+ check_one("rev_az:" + ss.str(), result.reverse_azimuth,
+ result.reverse_azimuth, reference.reverse_azimuth, reference_error);
+ check_one("red len:" + ss.str(), result.reduced_length, result.reduced_length,
+ reference.reduced_length, 0.01);
+ check_one("geo scale:" + ss.str(), result.geodesic_scale, result.geodesic_scale,
+ reference.geodesic_scale, 0.01);
+
+}
+
+void test_all(expected_results const& results)
+{
+ double const d2r = bg::math::d2r<double>();
+
+ double lon1_rad = results.p1.lon * d2r;
+ double lat1_rad = results.p1.lat * d2r;
+ coordinates expected_point;
+ expected_point.lon = results.p2.lon * d2r;
+ expected_point.lat = results.p2.lat * d2r;
+ double distance = results.distance;
+ bool direction = results.direction;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ bg::formula::result_direct<double> vincenty_result;
+ bg::formula::result_direct<double> meridian_result;
+
+ typedef bg::formula::vincenty_direct<double, true, true, true, true> vi_t;
+ double vincenty_azimuth = direction ? 0.0 : bg::math::pi<double>();
+ vincenty_result = vi_t::apply(lon1_rad, lat1_rad, distance, vincenty_azimuth, spheroid);
+
+ {
+ typedef bg::formula::meridian_direct<double, true, true, true, true, 1> eli;
+ meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid);
+ check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.001);
+ }
+ {
+ typedef bg::formula::meridian_direct<double, true, true, true, true, 2> eli;
+ meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid);
+ check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00001);
+ }
+ {
+ typedef bg::formula::meridian_direct<double, true, true, true, true, 3> eli;
+ meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid);
+ check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00000001);
+ }
+ {
+ typedef bg::formula::meridian_direct<double, true, true, true, true, 4> eli;
+ meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid);
+ check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00000001);
+ }
+ {
+ typedef bg::formula::meridian_direct<double, true, true, true, true, 5> eli;
+ meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid);
+ check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00000000001);
+ }
+}
+
+int test_main(int, char*[])
+{
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all(expected[i]);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp b/src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp
new file mode 100644
index 000000000..b02c42b28
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp
@@ -0,0 +1,57 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP
+#define BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP
+
+struct coordinates
+{
+ double lon;
+ double lat;
+};
+
+struct expected_results
+{
+ coordinates p1;
+ double distance;
+ bool direction;//north=true, south=false
+ coordinates p2;
+};
+
+expected_results expected[] =
+{
+ { {0, 0}, 100000, true, {0, 0.90435537782} },
+ { {0, 0}, 200000, true, {0, 1.8087062846} },
+ { {0, 0}, 300000, true, {0, 2.7130880778385226826} },
+ { {0, 0}, 400000, true, {0, 3.6174296804714929365} },
+ { {0, 0}, 500000, true, {0, 4.521753233678117212} },
+ { {0, 0}, 600000, true, {0, 5.4260542596891729872} },
+ { {0, 0}, 700000, true, {0, 6.3303283037366426811} },
+ { {0, 0}, 800000, true, {0, 7.234570938597034484} },
+ { {0, 0}, 900000, true, {0, 8.1386639105161684427} },
+ { {0, 0}, 1000000, true, {0, 9.0428195432854963087} },
+ { {0, 0}, 10000000, true, {0, 89.982400761362015373} },
+ { {0, 0}, 10001965, true, {0, 90} },
+ { {0, 0}, 11000000, true, {180, 81.063836359} },
+ { {10, 0}, 11000000, true, {-170, 81.063836359} },
+ { {0, 1}, 100000, true, {0, 1.9043634563000368942} },
+ { {0, 10}, 100000, true, {0, 10.904070448} },
+ { {0, 80}, 100000, true, {0, 80.895552833} },
+ { {0, 0}, 40010000, true, {0, 0.01932683869} },//wrap the spheroid once
+ { {0, 10}, 100000, false, {0, 9.0956502718} },
+ { {0, 10}, 2000000, false, {0, -8.0858305929} },
+ { {0, 0}, 11000000, false, {180, -81.063836359} },
+ { {0, 0}, 40010000, false, {0, -0.01932683869} } //wrap the spheroid once
+};
+
+size_t const expected_size = sizeof(expected) / sizeof(expected_results);
+
+#endif // BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP
diff --git a/src/boost/libs/geometry/test/formulas/intersection.cpp b/src/boost/libs/geometry/test/formulas/intersection.cpp
new file mode 100644
index 000000000..4ab53aa24
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/intersection.cpp
@@ -0,0 +1,198 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test_formula.hpp"
+#include "intersection_cases.hpp"
+
+#include <boost/geometry/formulas/andoyer_inverse.hpp>
+#include <boost/geometry/formulas/geographic.hpp>
+#include <boost/geometry/formulas/gnomonic_intersection.hpp>
+#include <boost/geometry/formulas/sjoberg_intersection.hpp>
+#include <boost/geometry/formulas/thomas_direct.hpp>
+#include <boost/geometry/formulas/thomas_inverse.hpp>
+#include <boost/geometry/formulas/vincenty_direct.hpp>
+#include <boost/geometry/formulas/vincenty_inverse.hpp>
+
+#include <boost/geometry/strategies/geographic/parameters.hpp>
+
+#include <boost/geometry/srs/spheroid.hpp>
+
+void check_result(expected_result const& result, expected_result const& expected,
+ expected_result const& reference, double reference_error,
+ bool check_reference_only)
+{
+ //BOOST_CHECK_MESSAGE((false), "(" << result.lon << " " << result.lat << ") vs (" << expected.lon << " " << expected.lat << ")");
+ check_one(result.lon, expected.lon, reference.lon, reference_error, false, check_reference_only);
+ check_one(result.lat, expected.lat, reference.lat, reference_error, false, check_reference_only);
+}
+
+void test_formulas(expected_results const& results, bool check_reference_only)
+{
+ // reference result
+ if (results.sjoberg_vincenty.lon == ND)
+ {
+ return;
+ }
+
+ double const d2r = bg::math::d2r<double>();
+ double const r2d = bg::math::r2d<double>();
+
+ double lona1r = results.p1.lon * d2r;
+ double lata1r = results.p1.lat * d2r;
+ double lona2r = results.p2.lon * d2r;
+ double lata2r = results.p2.lat * d2r;
+ double lonb1r = results.q1.lon * d2r;
+ double latb1r = results.q1.lat * d2r;
+ double lonb2r = results.q2.lon * d2r;
+ double latb2r = results.q2.lat * d2r;
+
+ expected_result result;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ if (results.gnomonic_vincenty.lon != ND)
+ {
+ bg::formula::gnomonic_intersection<double, bg::formula::vincenty_inverse, bg::formula::vincenty_direct>
+ ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
+ result.lon *= r2d;
+ result.lat *= r2d;
+ check_result(result, results.gnomonic_vincenty, results.sjoberg_vincenty, 0.00000001, check_reference_only);
+ }
+
+ if (results.gnomonic_thomas.lon != ND)
+ {
+ bg::formula::gnomonic_intersection<double, bg::strategy::thomas::inverse, bg::strategy::thomas::direct>
+ ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
+ result.lon *= r2d;
+ result.lat *= r2d;
+ check_result(result, results.gnomonic_thomas, results.sjoberg_vincenty, 0.0000001, check_reference_only);
+ }
+
+ if (results.sjoberg_vincenty.lon != ND)
+ {
+ bg::formula::sjoberg_intersection<double, bg::formula::vincenty_inverse, 4>
+ ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
+ result.lon *= r2d;
+ result.lat *= r2d;
+ check_result(result, results.sjoberg_vincenty, results.sjoberg_vincenty, 0.00000001, check_reference_only);
+ }
+
+ if (results.sjoberg_thomas.lon != ND)
+ {
+ bg::formula::sjoberg_intersection<double, bg::formula::thomas_inverse, 2>
+ ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
+ result.lon *= r2d;
+ result.lat *= r2d;
+ check_result(result, results.sjoberg_thomas, results.sjoberg_vincenty, 0.0000001, check_reference_only);
+ }
+
+ if (results.sjoberg_andoyer.lon != ND)
+ {
+ bg::formula::sjoberg_intersection<double, bg::formula::andoyer_inverse, 1>
+ ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid);
+ result.lon *= r2d;
+ result.lat *= r2d;
+ check_result(result, results.sjoberg_andoyer, results.sjoberg_vincenty, 0.0001, check_reference_only);
+ }
+
+ if (results.great_elliptic.lon != ND)
+ {
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > point_geo;
+ typedef bg::model::point<double, 3, bg::cs::cartesian> point_3d;
+ point_geo a1(results.p1.lon, results.p1.lat);
+ point_geo a2(results.p2.lon, results.p2.lat);
+ point_geo b1(results.q1.lon, results.q1.lat);
+ point_geo b2(results.q2.lon, results.q2.lat);
+ point_3d a1v = bg::formula::geo_to_cart3d<point_3d>(a1, spheroid);
+ point_3d a2v = bg::formula::geo_to_cart3d<point_3d>(a2, spheroid);
+ point_3d b1v = bg::formula::geo_to_cart3d<point_3d>(b1, spheroid);
+ point_3d b2v = bg::formula::geo_to_cart3d<point_3d>(b2, spheroid);
+ point_3d resv(0, 0, 0);
+ point_geo res(0, 0);
+ bg::formula::great_elliptic_intersection(a1v, a2v, b1v, b2v, resv, spheroid);
+ res = bg::formula::cart3d_to_geo<point_geo>(resv, spheroid);
+ result.lon = bg::get<0>(res);
+ result.lat = bg::get<1>(res);
+ check_result(result, results.great_elliptic, results.sjoberg_vincenty, 0.01, check_reference_only);
+ }
+}
+
+void test_4_input_combinations(expected_results const& results, bool check_reference_only)
+{
+ test_formulas(results, check_reference_only);
+
+#ifdef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR
+ {
+ expected_results results_alt = results;
+ std::swap(results_alt.p1, results_alt.p2);
+ test_formulas(results_alt, true);
+ }
+ {
+ expected_results results_alt = results;
+ std::swap(results_alt.q1, results_alt.q2);
+ test_formulas(results_alt, true);
+ }
+ {
+ expected_results results_alt = results;
+ std::swap(results_alt.p1, results_alt.p2);
+ std::swap(results_alt.q1, results_alt.q2);
+ test_formulas(results_alt, true);
+ }
+#endif
+}
+
+void test_all(expected_results const& results)
+{
+ test_4_input_combinations(results, false);
+
+#ifdef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR
+ expected_results results_alt = results;
+ results_alt.p1.lat *= -1;
+ results_alt.p2.lat *= -1;
+ results_alt.q1.lat *= -1;
+ results_alt.q2.lat *= -1;
+ results_alt.gnomonic_vincenty.lat *= -1;
+ results_alt.gnomonic_thomas.lat *= -1;
+ results_alt.sjoberg_vincenty.lat *= -1;
+ results_alt.sjoberg_thomas.lat *= -1;
+ results_alt.sjoberg_andoyer.lat *= -1;
+ results_alt.great_elliptic.lat *= -1;
+ test_4_input_combinations(results_alt, true);
+#endif
+}
+
+void test_bugs()
+{
+ // https://github.com/boostorg/geometry/issues/612
+ {
+ double lon, lat;
+ bg::formula::sjoberg_intersection<double, bg::formula::andoyer_inverse, 1>
+ ::apply(-0.0872665, -0.0872665, -0.0872665, 0.0872665,
+ 0.0, 1.57e-07, -0.392699, 1.57e-07,
+ lon, lat, bg::srs::spheroid<double>());
+ check_one("issue 612", lon, -0.087266500535674751);
+ check_one("issue 612", lat, 1.5892499139622920e-07);
+ }
+}
+
+int test_main(int, char*[])
+{
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all(expected[i]);
+ }
+
+ test_bugs();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/formulas/intersection_cases.hpp b/src/boost/libs/geometry/test/formulas/intersection_cases.hpp
new file mode 100644
index 000000000..8fdcdb520
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/intersection_cases.hpp
@@ -0,0 +1,335 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP
+#define BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP
+
+struct coordinates
+{
+ double lon;
+ double lat;
+};
+
+struct expected_result
+{
+ double lon;
+ double lat;
+};
+
+struct expected_results
+{
+ coordinates p1;
+ coordinates p2;
+ coordinates q1;
+ coordinates q2;
+ expected_result gnomonic_vincenty;
+ expected_result gnomonic_thomas;
+ expected_result sjoberg_vincenty;
+ expected_result sjoberg_thomas;
+ expected_result sjoberg_andoyer;
+ expected_result great_elliptic;
+};
+
+#define ND 1000
+
+expected_results expected[] =
+{
+ {
+ { -1, -1 },{ 1, 1 },
+ { -1, 1 },{ 1, -1 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { 0.0000000000626537, -0.0000000000000000 },
+ { -0.0000000187861002, -0.0000000000000000 },
+ { -0.0000055778585615, -0.0000000000000000 },
+ { -0.0000000000000000, -0.0000000000000000 }
+ },{
+ // TODO: Newton method in Sjoberg formula is not used in this case
+ // due to f1 - f2 == 0. The other method is used instead.
+ // Hence different results. Look into this.
+ { 1, 1 },{ -1, -1 },
+ { -1, 1 },{ 1, -1 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { 0.0000000000000000, 0.0000000000626632 },
+ { -0.0000000000000006, -0.0000000187889745 },
+ { -0.0000000000000001, -0.0000055787431353 },
+ { -0.0000000000000000, 0.0000000000000000 }
+ },{
+ // TODO: Newton method in Sjoberg formula is not used in this case
+ // due to f1 - f2 == 0. The other method is used instead.
+ // Hence different results. Look into this.
+ { -1, -1 },{ 1, 1 },
+ { 1, -1 },{ -1, 1 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { -0.0000000000000000, -0.0000000000626632 },
+ { -0.0000000000000004, 0.0000000187889746 },
+ { 0.0000000000000001, 0.0000055787431353 },
+ { 0.0000000000000000, 0.0000000000000000 }
+ },{
+ { 1, 1 },{ -1, -1 },
+ { 1, -1 },{ -1, 1 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { 0.0000000000000000, 0.0000000000000000 },
+ { -0.0000000000626537, -0.0000000000000000 },
+ { 0.0000000187860994, 0.0000000000000001 },
+ { 0.0000055778585615, -0.0000000000000000 },
+ { -0.0000000000000000, 0.0000000000000000 }
+ },{
+ { 0, 0 },{ 1, 1 },
+ { 0, 1 },{ 1, 0 },
+ { 0.5000000000000000, 0.5000573755188470 },
+ { 0.5000000000000000, 0.5000573755109839 },
+ { 0.5000000000313266, 0.5000573755188389 },
+ { 0.4999999906069524, 0.5000573755152582 },
+ { 0.4999972102164753, 0.5000573755151276 },
+ { 0.4999999999999999, 0.5000571197534014 }
+ },{
+ { 1, 1 },{ 0, 0 },
+ { 0, 1 },{ 1, 0 },
+ { 0.5000000000000000, 0.5000573755188470 },
+ { 0.5000000000000000, 0.5000573755109839 },
+ { 0.5000000000000000, 0.5000573755501669 },
+ { 0.4999999999999996, 0.5000573661218464 },
+ { 0.4999999999999999, 0.5000545856093679 },
+ { 0.4999999999999999, 0.5000571197534014 }
+ },{
+ { 0, 0 },{ 1, 1 },
+ { 1, 0 },{ 0, 1 },
+ { 0.5000000000000000, 0.5000573755188470 },
+ { 0.5000000000000000, 0.5000573755109839 },
+ { 0.4999999999999999, 0.5000573754875109 },
+ { 0.4999999999999999, 0.5000573849086647 },
+ { 0.5000000000000000, 0.5000601654208935 },
+ { 0.4999999999999999, 0.5000571197534014 }
+ },{
+ { 1, 1 },{ 0, 0 },
+ { 1, 0 },{ 0, 1 },
+ { 0.5000000000000000, 0.5000573755188470 },
+ { 0.5000000000000000, 0.5000573755109839 },
+ { 0.4999999999686731, 0.5000573755188389 },
+ { 0.5000000093930521, 0.5000573755152582 },
+ { 0.5000027897835244, 0.5000573755151276 },
+ { 0.4999999999999999, 0.5000571197534014 }
+ },{
+ { 1, 1 }, {2, 2},
+ {-2, -1}, {-1, -1},
+ { ND, ND },
+ { ND, ND },
+ { -0.9981650042162076, -0.999999718164758 },
+ { ND, ND },
+ { ND, ND },
+ { -0.9981731758085121, -0.9999997213000095 }
+ },{
+ {-25, -31}, {3, 44},
+ {-66, -14}, {-1, -1},
+ { ND, ND },
+ { ND, ND },
+ { -15.83269406235058, -4.87746450262433 },
+ { ND, ND },
+ { ND, ND },
+ { -15.82846301029918, -4.869650527718342 }
+ },{
+ {-47, -8}, {-1, -4},
+ {-40, -5}, {-5, -5},
+ { ND, ND },
+ { ND, ND },
+ { -10.28209064194141, -5.124101297536392 },
+ { ND, ND },
+ { ND, ND },
+ { -10.29663941896089, -5.123527178300465 }
+ }, {
+ {-43, -8}, {3, -4},
+ {-43, -5}, {3, -7},
+ { ND, ND },
+ { ND, ND },
+ { -19.95519754153282, -6.521540589691206 },
+ { ND, ND },
+ { ND, ND },
+ { -19.95535387979888, -6.517861579906892 }
+ }, {
+ {-1, -17}, {-5, 3},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -3.424525475838061, -5.070550173747042 },
+ { ND, ND },
+ { ND, ND },
+ { -3.424493504575876, -5.070060631936228 }
+ }, {
+ {-29, -4}, {-1, -5},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -0.9999999978280006, -5.00000000000684 },
+ { ND, ND },
+ { ND, ND },
+ { -0.9999999999999919, -5 }
+ }, {
+ {-4, -6}, {-40, -5},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -40.00000000470697, -4.999999999854269 },
+ { ND, ND },
+ { ND, ND },
+ { -40.00000000000003, -4.999999999999998 }
+ }, {
+ {5, -4}, {-25, -5},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -40.04870859732954, -4.998490166905039 },
+ { ND, ND },
+ { ND, ND },
+ { -39.87674154148858, -5.003778171392734 }
+ }, {
+ {-44, -1}, {38, -7},
+ {-54, -10}, {27, 3},
+ { ND, ND },
+ { ND, ND },
+ { -12.49994722584679, -4.492062263169279 },
+ { ND, ND },
+ { ND, ND },
+ { -12.49786552878283, -4.48224349980724 }
+ }, {
+ {-29, -5}, {10, -5},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -14.99999999880286, -5.280237387890117 },
+ { ND, ND },
+ { ND, ND },
+ { -14.99999999999999, -5.278284829442087 }
+ }, {
+ {-29, -5}, {7, -5},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -12.68814198534678, -5.255404335144863 },
+ { ND, ND },
+ { ND, ND },
+ { -12.68883814704657, -5.253634733357015 }
+ }, {
+ {-29, -5}, {2, -5},
+ {-40, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -6.793546728871506, -5.153444544719724 },
+ { ND, ND },
+ { ND, ND },
+ { -6.794933162619669, -5.152409434095275 }
+ }, {
+ {-29, -5}, {2, -5},
+ {-30, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -22.13104411461423, -5.130155316882458 },
+ { ND, ND },
+ { ND, ND },
+ { -22.13016591567375, -5.129277412801533 }
+ }, {
+ {-29, -5}, {2, -5},
+ {-32, -5}, {-1, -5},
+ { ND, ND },
+ { ND, ND },
+ { -14.99999999908104, -5.187213913248173 },
+ { ND, ND },
+ { ND, ND },
+ { -15.00000000000009, -5.185931965560752 }
+ }, {
+ {-92, -24}, {44, 19},
+ {-78, -5}, {50, -5},
+ { ND, ND },
+ { ND, ND },
+ { -31.65127861442256, -10.84411293410938 },
+ { ND, ND },
+ { ND, ND },
+ { -31.65294079308247, -10.76785432928444 }
+ }, {
+ {-93, -15}, {22, 3},
+ {-78, -5}, {50, -5},
+ { ND, ND },
+ { ND, ND },
+ { -32.33383382062637, -10.80295061031259 },
+ { ND, ND },
+ { ND, ND },
+ { -32.26069578187354, -10.73176059393484 }
+ }, {
+ {-93, -15}, {28, 3},
+ {-78, -5}, {50, -5},
+ { ND, ND },
+ { ND, ND },
+ { -25.71257598566304, -11.13752154787724 },
+ { ND, ND },
+ { ND, ND },
+ { -25.67761999514295, -11.05881610957402 }
+ }, {
+ {-54, -21}, {20, 17},
+ {-59, -5}, {13, -5},
+ { ND, ND },
+ { ND, ND },
+ { -22.96397490169162, -6.181426780426698 },
+ { ND, ND },
+ { ND, ND },
+ { -22.95999443662035, -6.172089364736989 }
+ }, {
+ {-31, -10}, {-31, -2},
+ {-37, -10}, {-25, -2},
+ { ND, ND },
+ { ND, ND },
+ { -31.00000000000001, -6.062729839503469 },
+ { ND, ND },
+ { ND, ND },
+ { -31, -6.062411484514648 }
+ }, {
+ {-26, -10}, {-26, 13},
+ {-37, -4}, {-18, -4},
+ { ND, ND },
+ { ND, ND },
+ { -25.99999999999969, -4.05441766735837 },
+ { ND, ND },
+ { ND, ND },
+ { -26, -4.05405101510235 }
+ }, {
+ {-26, -10}, {154, 78},
+ {-46, 41}, {-13, 36},
+ { ND, ND },
+ { ND, ND },
+ { -26, 39.19492836828103 },
+ { ND, ND },
+ { ND, ND },
+ { -26, 39.19004133747198 }
+ }, {
+ {-26, -10}, {154, 68},
+ {-85, 79}, {22, 80},
+ { ND, ND },
+ { ND, ND },
+ { -26.00000000000013, 83.7164889918963 },
+ { ND, ND },
+ { ND, ND },
+ { -26.00000000000002, 83.71603758698208 }
+ }, {
+ {-25, 55}, {155, 68},
+ {178, 79}, {124, 80},
+ { ND, ND },
+ { ND, ND },
+ { 155, 80.55982670305147 },
+ { ND, ND },
+ { ND, ND },
+ { 155, 80.55961176607357 }
+ }
+};
+
+size_t const expected_size = sizeof(expected) / sizeof(expected_results);
+
+#endif // BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP
diff --git a/src/boost/libs/geometry/test/formulas/inverse.cpp b/src/boost/libs/geometry/test/formulas/inverse.cpp
new file mode 100644
index 000000000..cab678200
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/inverse.cpp
@@ -0,0 +1,93 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
+
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <sstream>
+
+#include "test_formula.hpp"
+#include "inverse_cases.hpp"
+
+#include <boost/geometry/formulas/vincenty_inverse.hpp>
+#include <boost/geometry/formulas/thomas_inverse.hpp>
+#include <boost/geometry/formulas/andoyer_inverse.hpp>
+
+#include <boost/geometry/srs/spheroid.hpp>
+
+template <typename Result>
+void check_inverse(std::string const& name,
+ Result const& results,
+ bg::formula::result_inverse<double> const& result,
+ expected_result const& expected,
+ expected_result const& reference,
+ double reference_error)
+{
+ std::stringstream ss;
+ ss << "(" << results.p1.lon << " " << results.p1.lat << ")->(" << results.p2.lon << " " << results.p2.lat << ")";
+
+ check_one(name + "_d " + ss.str(),
+ result.distance, expected.distance, reference.distance, reference_error);
+ check_one(name + "_a " + ss.str(),
+ result.azimuth, expected.azimuth, reference.azimuth, reference_error, true);
+ check_one(name + "_ra " + ss.str(),
+ result.reverse_azimuth, expected.reverse_azimuth, reference.reverse_azimuth, reference_error, true);
+ check_one(name + "_rl " + ss.str(),
+ result.reduced_length, expected.reduced_length, reference.reduced_length, reference_error);
+ check_one(name + "_gs " + ss.str(),
+ result.geodesic_scale, expected.geodesic_scale, reference.geodesic_scale, reference_error);
+}
+
+void test_all(expected_results const& results)
+{
+ double const d2r = bg::math::d2r<double>();
+ double const r2d = bg::math::r2d<double>();
+
+ double lon1r = results.p1.lon * d2r;
+ double lat1r = results.p1.lat * d2r;
+ double lon2r = results.p2.lon * d2r;
+ double lat2r = results.p2.lat * d2r;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ bg::formula::result_inverse<double> result_v, result_t, result_a;
+
+ typedef bg::formula::vincenty_inverse<double, true, true, true, true, true> vi_t;
+ result_v = vi_t::apply(lon1r, lat1r, lon2r, lat2r, spheroid);
+ result_v.azimuth *= r2d;
+ result_v.reverse_azimuth *= r2d;
+ check_inverse("vincenty", results, result_v, results.vincenty, results.reference, 0.0000001);
+
+ typedef bg::formula::thomas_inverse<double, true, true, true, true, true> th_t;
+ result_t = th_t::apply(lon1r, lat1r, lon2r, lat2r, spheroid);
+ result_t.azimuth *= r2d;
+ result_t.reverse_azimuth *= r2d;
+ check_inverse("thomas", results, result_t, results.thomas, results.reference, 0.00001);
+
+ typedef bg::formula::andoyer_inverse<double, true, true, true, true, true> an_t;
+ result_a = an_t::apply(lon1r, lat1r, lon2r, lat2r, spheroid);
+ result_a.azimuth *= r2d;
+ result_a.reverse_azimuth *= r2d;
+ check_inverse("andoyer", results, result_a, results.andoyer, results.reference, 0.001);
+}
+
+int test_main(int, char*[])
+{
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all(expected[i]);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/formulas/inverse_cases.hpp b/src/boost/libs/geometry/test/formulas/inverse_cases.hpp
new file mode 100644
index 000000000..586ed54ba
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/inverse_cases.hpp
@@ -0,0 +1,626 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2020 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_INVERSE_CASES_HPP
+#define BOOST_GEOMETRY_TEST_INVERSE_CASES_HPP
+
+struct coordinates
+{
+ double lon;
+ double lat;
+};
+
+struct expected_result
+{
+ double distance;
+ double azimuth;
+ double reverse_azimuth;
+ double reduced_length;
+ double geodesic_scale;
+};
+
+struct expected_results
+{
+ coordinates p1;
+ coordinates p2;
+ expected_result reference; // karney or vincenty
+ expected_result vincenty;
+ expected_result thomas;
+ expected_result andoyer;
+
+};
+
+expected_results expected[] =
+{
+ {
+ { 0, 0 },{ 2, 0 },
+ { 222638.98158654713188298047, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 },
+ { 222638.98158645280636847019, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 },
+ { 222638.98158654122380539775, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 },
+ { 222638.98158654125290922821, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }
+ },{
+ { 0, 0 },{ 2, 2 },
+ { 313775.70942918420769274235, 45.17488858648466987233, 45.20980230803674970730, 313648.30600607168162241578, 0.99878199603375228399 },
+ { 313775.70929574419278651476, 45.17488858646600391467, 45.20980230801805532792, 313648.30601466231746599078, 0.99878199603375328319 },
+ { 313775.70869052573107182980, 45.17488750916628958976, 45.20980122940459722258, 313648.30008120078127831221, 0.99878199607986462016 },
+ { 313772.17715740547282621264, 45.17456700769592004008, 45.20948072916769433505, 313646.54128309490624815226, 0.99878200978130526888 }
+ },{
+ { 0, 0 },{ 0, 2 },
+ { 221149.45337213488528504968, 0.00000000000000000000, 0.00000000000000000000, 221104.84592454897938296199, 0.99939490135383823866 },
+ { 221149.45318342180689796805, 0.00000000000000000000, 0.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 },
+ { 221149.45337045041378587484, 0.00000000000000000000, 0.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 },
+ { 221146.95820782837108708918, 0.00000000000000002350, 0.00000000000000002350, 221104.84893554644077084959, 0.99939490135383812763 }
+ },{
+ { 0, 0 },{ -2, 2 },
+ { 313775.70942918420769274235, -45.17488858648466987233, -45.20980230803674970730, 313648.30600607168162241578, 0.99878199603375228399 },
+ { 313775.70929574419278651476, -45.17488858646600391467, -45.20980230801805532792, 313648.30601466231746599078, 0.99878199603375328319 },
+ { 313775.70869052573107182980, -45.17488750916629669518, -45.20980122940459722258, 313648.30008120078127831221, 0.99878199607986462016 },
+ { 313772.17715740547282621264, -45.17456700769592004008, -45.20948072916767301876, 313646.54128309484804049134, 0.99878200978130526888 }
+ },{
+ { 0, 0 },{ -2, 0 },
+ { 222638.98158654713188298047, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 },
+ { 222638.98158645280636847019, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 },
+ { 222638.98158654122380539775, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 },
+ { 222638.98158654125290922821, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }
+ },{
+ { 0, 0 },{ -2, -2 },
+ { 313775.70942918420769274235, -134.82511141351534433852, -134.79019769196324318727, 313648.30600607168162241578, 0.99878199603375228399 },
+ { 313775.70929574419278651476, -134.82511141353401740162, -134.79019769198197309379, 313648.30601466225925832987, 0.99878199603375317217 },
+ { 313775.70869052573107182980, -134.82511249083370330482, -134.79019877059539567199, 313648.30008120083948597312, 0.99878199607986462016 },
+ { 313772.17715740547282621264, -134.82543299230408706535, -134.79051927083230566495, 313646.54128309502266347408, 0.99878200978130537990 }
+ },{
+ { 0, 0 },{ 0, -2 },
+ { 221149.45337213488528504968, -180.00000000000000000000, -180.00000000000000000000, 221104.84592454897938296199, 0.99939490135383823866 },
+ { 221149.45318342180689796805, 180.00000000000000000000, 180.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 },
+ { 221149.45337045041378587484, 180.00000000000000000000, 180.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 },
+ { 221146.95820782837108708918, 180.00000000000000000000, 180.00000000000000000000, 221104.84893554644077084959, 0.99939490135383812763 }
+ },{
+ { 0, 0 },{ 2, -2 },
+ { 313775.70942918420769274235, 134.82511141351534433852, 134.79019769196324318727, 313648.30600607168162241578, 0.99878199603375228399 },
+ { 313775.70929574419278651476, 134.82511141353401740162, 134.79019769198197309379, 313648.30601466225925832987, 0.99878199603375317217 },
+ { 313775.70869052573107182980, 134.82511249083370330482, 134.79019877059539567199, 313648.30008120083948597312, 0.99878199607986462016 },
+ { 313772.17715740547282621264, 134.82543299230408706535, 134.79051927083230566495, 313646.54128309502266347408, 0.99878200978130537990 }
+ },{
+ { -1, 0 },{ 2, 0 },
+ { 333958.47237982071237638593, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 },
+ { 333958.47237967920955270529, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 },
+ { 333958.47237982566002756357, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 },
+ { 333958.47237982566002756357, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }
+ },{
+ { -1, 0 },{ 2, 2 },
+ { 400487.62166116386651992798, 56.46443555420994186989, 56.51681282834063324572, 400222.73679570353124290705, 0.99801604059094650712 },
+ { 400487.62155657896073535085, 56.46443555419775606197, 56.51681282832842612152, 400222.73680666065774857998, 0.99801604059094761734 },
+ { 400487.62116943788714706898, 56.46443456250134573793, 56.51681183466060787168, 400222.72635490150423720479, 0.99801604069467231284 },
+ { 400484.31980028707766905427, 56.46436757836366382435, 56.51674485214859089410, 400222.02724612434394657612, 0.99801604768666130063 }
+ },{
+ { -1, 0 },{ 0, 2 },
+ { 247576.47264764847932383418, 26.70874628270370010341, 26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, 26.70874628267113948255, 26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 },
+ { 247576.47204536388744600117, 26.70874541733553186873, 26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, 26.70817834948789482041, 26.72563387223648589952, 247512.65741612159763462842, 0.99924167083675718981 }
+ },{
+ { -1, 0 },{ -2, 2 },
+ { 247576.47264764847932383418, -26.70874628270370010341, -26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, -26.70874628267113948255, -26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 },
+ { 247576.47204536388744600117, -26.70874541733554607958, -26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, -26.70817834948789482041, -26.72563387223651432123, 247512.65741612159763462842, 0.99924167083675718981 }
+ },{
+ { -1, 0 },{ -2, 0 },
+ { 111319.49079327356594149023, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 },
+ { 111319.49079322640318423510, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 },
+ { 111319.49079326246283017099, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 },
+ { 111319.49079326246283017099, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }
+ },{
+ { -1, 0 },{ -2, -2 },
+ { 247576.47264764847932383418, -153.29125371729628568573, -153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, -153.29125371732885696474, -153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 },
+ { 247576.47204536388744600117, -153.29125458266443615685, -153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, -153.29182165051210517959, -153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 }
+ },{
+ { -1, 0 },{ 0, -2 },
+ { 247576.47264764847932383418, 153.29125371729628568573, 153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, 153.29125371732885696474, 153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 },
+ { 247576.47204536388744600117, 153.29125458266446457856, 153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, 153.29182165051210517959, 153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 }
+ },{
+ { -1, 0 },{ 2, -2 },
+ { 400487.62166116386651992798, 123.53556444579005813011, 123.48318717165936675428, 400222.73679570353124290705, 0.99801604059094650712 },
+ { 400487.62155657896073535085, 123.53556444580226525431, 123.48318717167158808934, 400222.73680666059954091907, 0.99801604059094761734 },
+ { 400487.62116943788714706898, 123.53556543749867557835, 123.48318816533939923374, 400222.72635490150423720479, 0.99801604069467231284 },
+ { 400484.31980028707766905427, 123.53563242163632196480, 123.48325514785142331675, 400222.02724612434394657612, 0.99801604768666130063 }
+ },{
+ { 1, 0 },{ 2, 0 },
+ { 111319.49079327356594149023, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 },
+ { 111319.49079322640318423510, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 },
+ { 111319.49079326246283017099, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 },
+ { 111319.49079326246283017099, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }
+ },{
+ { 1, 0 },{ 2, 2 },
+ { 247576.47264764847932383418, 26.70874628270370010341, 26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, 26.70874628267113948255, 26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 },
+ { 247576.47204536388744600117, 26.70874541733553186873, 26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, 26.70817834948789482041, 26.72563387223648589952, 247512.65741612159763462842, 0.99924167083675718981 }
+ },{
+ { 1, 0 },{ 0, 2 },
+ { 247576.47264764847932383418, -26.70874628270370010341, -26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, -26.70874628267113948255, -26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 },
+ { 247576.47204536388744600117, -26.70874541733554607958, -26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, -26.70817834948789482041, -26.72563387223651432123, 247512.65741612159763462842, 0.99924167083675718981 }
+ },{
+ { 1, 0 },{ -2, 2 },
+ { 400487.62166116386651992798, -56.46443555420994186989, -56.51681282834063324572, 400222.73679570353124290705, 0.99801604059094650712 },
+ { 400487.62155657896073535085, -56.46443555419775606197, -56.51681282832842612152, 400222.73680666065774857998, 0.99801604059094761734 },
+ { 400487.62116943788714706898, -56.46443456250133863250, -56.51681183466062918797, 400222.72635490167886018753, 0.99801604069467231284 },
+ { 400484.31980028707766905427, -56.46436757836366382435, -56.51674485214855536697, 400222.02724612399470061064, 0.99801604768666130063 }
+ },{
+ { 1, 0 },{ -2, 0 },
+ { 333958.47237982071237638593, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 },
+ { 333958.47237967920955270529, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 },
+ { 333958.47237982566002756357, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 },
+ { 333958.47237982566002756357, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }
+ },{
+ { 1, 0 },{ -2, -2 },
+ { 400487.62166116386651992798, -123.53556444579005813011, -123.48318717165936675428, 400222.73679570353124290705, 0.99801604059094650712 },
+ { 400487.62155657896073535085, -123.53556444580226525431, -123.48318717167158808934, 400222.73680666059954091907, 0.99801604059094761734 },
+ { 400487.62116943788714706898, -123.53556543749867557835, -123.48318816533941344460, 400222.72635490121319890022, 0.99801604069467231284 },
+ { 400484.31980028707766905427, -123.53563242163632196480, -123.48325514785139489504, 400222.02724612463498488069, 0.99801604768666130063 }
+ },{
+ { 1, 0 },{ 0, -2 },
+ { 247576.47264764847932383418, -153.29125371729628568573, -153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, -153.29125371732885696474, -153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 },
+ { 247576.47204536388744600117, -153.29125458266443615685, -153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, -153.29182165051210517959, -153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 }
+ },{
+ { 1, 0 },{ 2, -2 },
+ { 247576.47264764847932383418, 153.29125371729628568573, 153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 },
+ { 247576.47247877591871656477, 153.29125371732885696474, 153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 },
+ { 247576.47204536388744600117, 153.29125458266446457856, 153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 },
+ { 247573.34468778557493351400, 153.29182165051210517959, 153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 }
+ },{
+ { 0, -1 },{ 2, 0 },
+ { 248575.56516798117081634700, 63.59904041930798257454, 63.58158489649751743400, 248512.21908866314333863556, 0.99923553066716652715 },
+ { 248575.56515735003631561995, 63.59904041929794260568, 63.58158489648748457057, 248512.21909045605571009219, 0.99923553066715220528 },
+ { 248575.56501938513247296214, 63.59903955892717419829, 63.58158403677443004653, 248512.21158473053947091103, 0.99923553071334769715 },
+ { 248574.11260137573117390275, 63.59909262487922632090, 63.58163710212382113696, 248512.67536870032199658453, 0.99923552785888392069 }
+ },{
+ { 0, -1 },{ 2, 2 },
+ { 399491.95531813317211344838, 33.86382331638844789268, 33.88128418166377286980, 399229.04036820423789322376, 0.99802588852441009859 },
+ { 399491.95525925338733941317, 33.86382331636024645150, 33.88128418163555721776, 399229.04037646017968654633, 0.99802588850630413742 },
+ { 399491.95420239900704473257, 33.86382231856556046523, 33.88128318318352683036, 399229.03571708954405039549, 0.99802588855242924115 },
+ { 399486.91562757542124018073, 33.86329689027443379246, 33.88075775553439683563, 399226.58732164395041763783, 0.99802591281687313973 }
+ },{
+ { 0, -1 },{ 0, 2 },
+ { 331723.84192993369651958346, 0.00000000000000000000, 0.00000000000000000000, 331573.30333569750655442476, 0.99863870153788791839 },
+ { 331723.84185956208966672421, 0.00000000000000000000, 0.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 },
+ { 331723.84192803525365889072, 0.00000000000000000000, 0.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 },
+ { 331720.09633564797695726156, 0.00000000000000002351, 0.00000000000000002350, 331573.30672345001948997378, 0.99863870151614875237 }
+ },{
+ { 0, -1 },{ -2, 2 },
+ { 399491.95531813317211344838, -33.86382331638844789268, -33.88128418166377286980, 399229.04036820423789322376, 0.99802588852441009859 },
+ { 399491.95525925338733941317, -33.86382331636024645150, -33.88128418163555721776, 399229.04037646017968654633, 0.99802588850630413742 },
+ { 399491.95420239900704473257, -33.86382231856555335980, -33.88128318318355525207, 399229.03571708960225805640, 0.99802588855242924115 },
+ { 399486.91562757542124018073, -33.86329689027443379246, -33.88075775553439683563, 399226.58732164395041763783, 0.99802591281687313973 }
+ },{
+ { 0, -1 },{ -2, 0 },
+ { 248575.56516798117081634700, -63.59904041930798257454, -63.58158489649751743400, 248512.21908866314333863556, 0.99923553066716652715 },
+ { 248575.56515735003631561995, -63.59904041929794260568, -63.58158489648748457057, 248512.21909045605571009219, 0.99923553066715220528 },
+ { 248575.56501938513247296214, -63.59903955892717419829, -63.58158403677445846824, 248512.21158473053947091103, 0.99923553071334769715 },
+ { 248574.11260137573117390275, -63.59909262487922632090, -63.58163710212379271525, 248512.67536870032199658453, 0.99923552785888392069 }
+ },{
+ { 0, -1 },{ -2, -2 },
+ { 248515.52773222429095767438, -116.44291541236518128244, -116.39055416434335654685, 248452.22805491264443844557, 0.99923590400821504787 },
+ { 248515.52763759149820543826, -116.44291541237451781399, -116.39055416435273571096, 248452.22805559608968906105, 0.99923590407101092747 },
+ { 248515.52758369332877919078, -116.44291626924928095832, -116.39055502319511958831, 248452.22057304141344502568, 0.99923590411705243142 },
+ { 248514.07922688819235190749, -116.44286383106521043374, -116.39050258320843056481, 248452.68231273870333097875, 0.99923590134832673826 }
+ },{
+ { 0, -1 },{ 0, -2 },
+ { 110575.06481433614681009203, -180.00000000000000000000, -180.00000000000000000000, 110569.48860416181560140103, 0.99984871368918792900 },
+ { 110575.06460189135395921767, 180.00000000000000000000, 180.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 },
+ { 110575.06481286860071122646, 180.00000000000000000000, 180.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 },
+ { 110573.82008000080531928688, 180.00000000000000000000, 180.00000000000000000000, 110569.49123749321734067053, 0.99984871370886085895 }
+ },{
+ { 0, -1 },{ 2, -2 },
+ { 248515.52773222429095767438, 116.44291541236518128244, 116.39055416434335654685, 248452.22805491264443844557, 0.99923590400821504787 },
+ { 248515.52763759149820543826, 116.44291541237451781399, 116.39055416435273571096, 248452.22805559608968906105, 0.99923590407101092747 },
+ { 248515.52758369332877919078, 116.44291626924930938003, 116.39055502319511958831, 248452.22057304164627566934, 0.99923590411705243142 },
+ { 248514.07922688819235190749, 116.44286383106521043374, 116.39050258320843056481, 248452.68231273870333097875, 0.99923590134832673826 }
+ },{
+ { 0, 1 },{ 2, 0 },
+ { 248575.56516798117081634700, 116.40095958069201742546, 116.41841510350248256600, 248512.21908866314333863556, 0.99923553066716652715 },
+ { 248575.56515735003631561995, 116.40095958070207871060, 116.41841510351252964028, 248512.21909045602660626173, 0.99923553066715220528 },
+ { 248575.56501938513247296214, 116.40096044107282580171, 116.41841596322554153176, 248512.21158473062678240240, 0.99923553071334780817 },
+ { 248574.11260137573117390275, 116.40090737512078078453, 116.41836289787615044133, 248512.67536870026378892362, 0.99923552785888392069 }
+ },{
+ { 0, 1 },{ 2, 2 },
+ { 248515.52773222429095767438, 63.55708458763482582299, 63.60944583565664345315, 248452.22805491264443844557, 0.99923590400821504787 },
+ { 248515.52763759149820543826, 63.55708458762548218601, 63.60944583564726428904, 248452.22805559608968906105, 0.99923590407101092747 },
+ { 248515.52758369332877919078, 63.55708373075069061997, 63.60944497680485909541, 248452.22057304115151055157, 0.99923590411705243142 },
+ { 248514.07922688819235190749, 63.55713616893478246084, 63.60949741679156232976, 248452.68231273847050033510, 0.99923590134832684928 }
+ },{
+ { 0, 1 },{ 0, 2 },
+ { 110575.06481433614681009203, 0.00000000000000000000, 0.00000000000000000000, 110569.48860416181560140103, 0.99984871368918792900 },
+ { 110575.06460189135395921767, 0.00000000000000000000, 0.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 },
+ { 110575.06481286860071122646, 0.00000000000000000000, 0.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 },
+ { 110573.82008000080531928688, 0.00000000000000002350, 0.00000000000000002350, 110569.49123749321734067053, 0.99984871370886085895 }
+ },{
+ { 0, 1 },{ -2, 2 },
+ { 248515.52773222429095767438, -63.55708458763482582299, -63.60944583565664345315, 248452.22805491264443844557, 0.99923590400821504787 },
+ { 248515.52763759149820543826, -63.55708458762548218601, -63.60944583564726428904, 248452.22805559608968906105, 0.99923590407101092747 },
+ { 248515.52758369332877919078, -63.55708373075070483083, -63.60944497680488041169, 248452.22057304150075651705, 0.99923590411705254244 },
+ { 248514.07922688819235190749, -63.55713616893478246084, -63.60949741679156943519, 248452.68231273873243480921, 0.99923590134832684928 }
+ },{
+ { 0, 1 },{ -2, 0 },
+ { 248575.56516798117081634700, -116.40095958069201742546, -116.41841510350248256600, 248512.21908866314333863556, 0.99923553066716652715 },
+ { 248575.56515735003631561995, -116.40095958070207871060, -116.41841510351252964028, 248512.21909045602660626173, 0.99923553066715220528 },
+ { 248575.56501938513247296214, -116.40096044107282580171, -116.41841596322554153176, 248512.21158473062678240240, 0.99923553071334780817 },
+ { 248574.11260137573117390275, -116.40090737512078078453, -116.41836289787615044133, 248512.67536870026378892362, 0.99923552785888392069 }
+ },{
+ { 0, 1 },{ -2, -2 },
+ { 399491.95531813317211344838, -146.13617668361155210732, -146.11871581833622713020, 399229.04036820423789322376, 0.99802588852441009859 },
+ { 399491.95525925338733941317, -146.13617668363974644308, -146.11871581836444988767, 399229.04037646006327122450, 0.99802588850630413742 },
+ { 399491.95420239900704473257, -146.13617768143444664020, -146.11871681681645895878, 399229.03571708971867337823, 0.99802588855242924115 },
+ { 399486.91562757542124018073, -146.13670310972554489126, -146.11924224446559605894, 399226.58732164406683295965, 0.99802591281687325075 }
+ },{
+ { 0, 1 },{ 0, -2 },
+ { 331723.84192993369651958346, -180.00000000000000000000, -180.00000000000000000000, 331573.30333569750655442476, 0.99863870153788791839 },
+ { 331723.84185956208966672421, 180.00000000000000000000, 180.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 },
+ { 331723.84192803525365889072, 180.00000000000000000000, 180.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 },
+ { 331720.09633564797695726156, 180.00000000000000000000, 180.00000000000000000000, 331573.30672345001948997378, 0.99863870151614875237 }
+ },{
+ { 0, 1 },{ 2, -2 },
+ { 399491.95531813317211344838, 146.13617668361155210732, 146.11871581833622713020, 399229.04036820423789322376, 0.99802588852441009859 },
+ { 399491.95525925338733941317, 146.13617668363974644308, 146.11871581836444988767, 399229.04037646006327122450, 0.99802588850630413742 },
+ { 399491.95420239900704473257, 146.13617768143444664020, 146.11871681681645895878, 399229.03571708971867337823, 0.99802588855242924115 },
+ { 399486.91562757542124018073, 146.13670310972554489126, 146.11924224446559605894, 399226.58732164406683295965, 0.99802591281687325075 }
+ },
+ {
+ { -1, -1 },{ 2, 0 },
+ { 351772.23553088010521605611, 71.69677339271241578444, 71.67058676207953737958, 351592.72256732499226927757, 0.99846922689201267342 },
+ { 351772.23552330053644254804, 71.69677339270522509196, 71.67058676207236089795, 351592.72256738768192008138, 0.99846922689200567902 },
+ { 351772.23547190619865432382, 71.69677274795321864076, 71.67058611830732672843, 351592.71064292185474187136, 0.99846922699591911243 },
+ { 351771.13000385620398446918, 71.69688960494077889507, 71.67070297450321447741, 351594.87308142206165939569, 0.99846920815167106156 }
+ }, {
+ { -1, -1 },{ 2, 2 },
+ { 470675.27496387914288789034, 45.18799532476352709409, 45.21418997011227247640, 470245.32092262554215267301, 0.99726004843767979136 },
+ { 470675.27491378918057307601, 45.18799532474472613330, 45.21418997009345730476, 470245.32093124865787103772, 0.99726004841255500022 },
+ { 470675.27385581465205177665, 45.18799424651773222195, 45.21418889088008796762, 470245.31203990190988406539, 0.99726004851631100401 },
+ { 470669.97387331607751548290, 45.18767381182056652733, 45.21386845703356982540, 470242.67608062457293272018, 0.99726007931332938394 }
+ }, {
+ { -1, -1 },{ 0, 2 },
+ { 349898.53698544885264709592, 18.54804530050607525027, 18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, 18.54804530047409016902, 18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, 18.54804465014367664821, 18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, 18.54754137243966738424, 18.55627113576925424354, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { -1, -1 },{ -2, 2 },
+ { 349898.53698544885264709592, -18.54804530050607525027, -18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, -18.54804530047409016902, -18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, -18.54804465014367664821, -18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, -18.54754137243966738424, -18.55627113576928266525, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { -1, -1 },{ -2, 0 },
+ { 156899.56829134028521366417, -45.19676732164486310239, -45.18804022935886877121, 156883.63778222308610565960, 0.99969540695122460772 },
+ { 156899.56827460310887545347, -45.19676732162573529195, -45.18804022933975517162, 156883.63778401838499121368, 0.99969540695121617002 },
+ { 156899.56792193598812445998, -45.19676624219880523015, -45.18803915024161454994, 156883.63480984271154738963, 0.99969540696276681935 },
+ { 156897.79947260793414898217, -45.19644594033049145310, -45.18771884804953486992, 156882.75281389255542308092, 0.99969541038810816325 }
+ }, {
+ { -1, -1 },{ -2, -2 },
+ { 156876.14940188667969778180, -134.82952991582811819171, -134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, -134.82952991584656388113, -134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 },
+ { 156876.14903264911845326424, -134.82953099167991695140, -134.80335237457535413341, 156860.22319510785746388137, 0.99969549955919845274 },
+ { 156874.38594904550700448453, -134.82985169207830722371, -134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 }
+ }, {
+ { -1, -1 },{ 0, -2 },
+ { 156876.14940188667969778180, 134.82952991582811819171, 134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, 134.82952991584656388113, 134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 },
+ { 156876.14903264911845326424, 134.82953099167994537311, 134.80335237457538255512, 156860.22319510785746388137, 0.99969549955919856377 },
+ { 156874.38594904550700448453, 134.82985169207830722371, 134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 }
+ }, {
+ { -1, -1 },{ 2, -2 },
+ { 351676.50043935602298006415, 108.36087395536006283692, 108.28232205125480902552, 351497.13544799503870308399, 0.99847006808788085763 },
+ { 351676.50037266127765178680, 108.36087395536665667350, 108.28232205126143128382, 351497.13543194788508117199, 0.99847006821303718738 },
+ { 351676.50038040406070649624, 108.36087459655153963922, 108.28232269539883247944, 351497.12354394816793501377, 0.99847006831660412018 },
+ { 351675.39839278126601129770, 108.36075825022818719390, 108.28220634670809374711, 351499.26940269087208434939, 0.99847004976658149111 }
+ }, {
+ { -1, 1 },{ 2, 0 },
+ { 351772.23553088010521605611, 108.30322660728758421556, 108.32941323792046262042, 351592.72256732499226927757, 0.99846922689201267342 },
+ { 351772.23552330053644254804, 108.30322660729477490804, 108.32941323792763910205, 351592.72256738756550475955, 0.99846922689200567902 },
+ { 351772.23547190619865432382, 108.30322725204678135924, 108.32941388169267327157, 351592.71064292197115719318, 0.99846922699591911243 },
+ { 351771.13000385620398446918, 108.30311039505922110493, 108.32929702549677131174, 351594.87308142217807471752, 0.99846920815167106156 }
+ }, {
+ { -1, 1 },{ 2, 2 },
+ { 351676.50043935602298006415, 71.63912604463993716308, 71.71767794874519097448, 351497.13544799503870308399, 0.99847006808788085763 },
+ { 351676.50037266127765178680, 71.63912604463332911564, 71.71767794873858292704, 351497.13543194829253479838, 0.99847006821303718738 },
+ { 351676.50038040406070649624, 71.63912540344847457163, 71.71767730460115330970, 351497.12354394729482010007, 0.99847006831660423121 },
+ { 351675.39839278126601129770, 71.63924174977181280610, 71.71779365329189204203, 351499.26940269029000774026, 0.99847004976658149111 }
+ }, {
+ { -1, 1 },{ 0, 2 },
+ { 156876.14940188667969778180, 45.17047008417186759743, 45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, 45.17047008415342190801, 45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 },
+ { 156876.14903264911845326424, 45.17046900832006883775, 45.19664762542461744488, 156860.22319510774104855955, 0.99969549955919845274 },
+ { 156874.38594904550700448453, 45.17014830792169988172, 45.19632692599481060824, 156859.34477911831345409155, 0.99969550299904519353 }
+ }, {
+ { -1, 1 },{ -2, 2 },
+ { 156876.14940188667969778180, -45.17047008417186759743, -45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, -45.17047008415342190801, -45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 },
+ { 156876.14903264911845326424, -45.17046900832009015403, -45.19664762542463876116, 156860.22319510785746388137, 0.99969549955919856377 },
+ { 156874.38594904550700448453, -45.17014830792169988172, -45.19632692599484613538, 156859.34477911848807707429, 0.99969550299904519353 }
+ }, {
+ { -1, 1 },{ -2, 0 },
+ { 156899.56829134028521366417, -134.80323267835512979218, -134.81195977064112412336, 156883.63778222308610565960, 0.99969540695122460772 },
+ { 156899.56827460310887545347, -134.80323267837425760263, -134.81195977066025193380, 156883.63778401838499121368, 0.99969540695121617002 },
+ { 156899.56792193598812445998, -134.80323375780119476985, -134.81196084975837834463, 156883.63480984274065122008, 0.99969540696276681935 },
+ { 156897.79947260793414898217, -134.80355405966952275776, -134.81228115195048644637, 156882.75281389255542308092, 0.99969541038810816325 }
+ }, {
+ { -1, 1 },{ -2, -2 },
+ { 349898.53698544885264709592, -161.45195469949391053888, -161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, -161.45195469952594180540, -161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, -161.45195534985634822078, -161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, -161.45245862756033261576, -161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { -1, 1 },{ 0, -2 },
+ { 349898.53698544885264709592, 161.45195469949391053888, 161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, 161.45195469952594180540, 161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, 161.45195534985634822078, 161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, 161.45245862756033261576, 161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { -1, 1 },{ 2, -2 },
+ { 470675.27496387914288789034, 134.81200467523646580048, 134.78581002988772752360, 470245.32092262554215267301, 0.99726004843767979136 },
+ { 470675.27491378918057307601, 134.81200467525528097212, 134.78581002990657111695, 470245.32093124854145571589, 0.99726004841255500022 },
+ { 470675.27385581465205177665, 134.81200575348228198891, 134.78581110911991913781, 470245.31203990190988406539, 0.99726004851631100401 },
+ { 470669.97387331607751548290, 134.81232618817941215639, 134.78613154296644438546, 470242.67608062474755570292, 0.99726007931332960599 }
+ }, {
+ { 1, 1 },{ 2, 0 },
+ { 156899.56829134028521366417, 134.80323267835512979218, 134.81195977064112412336, 156883.63778222308610565960, 0.99969540695122460772 },
+ { 156899.56827460310887545347, 134.80323267837425760263, 134.81195977066025193380, 156883.63778401838499121368, 0.99969540695121617002 },
+ { 156899.56792193598812445998, 134.80323375780122319156, 134.81196084975840676634, 156883.63480984268244355917, 0.99969540696276681935 },
+ { 156897.79947260793414898217, 134.80355405966952275776, 134.81228115195048644637, 156882.75281389255542308092, 0.99969541038810816325 }
+ }, {
+ { 1, 1 },{ 2, 2 },
+ { 156876.14940188667969778180, 45.17047008417186759743, 45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, 45.17047008415342190801, 45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 },
+ { 156876.14903264911845326424, 45.17046900832006883775, 45.19664762542461744488, 156860.22319510774104855955, 0.99969549955919845274 },
+ { 156874.38594904550700448453, 45.17014830792169988172, 45.19632692599481060824, 156859.34477911831345409155, 0.99969550299904519353 }
+ }, {
+ { 1, 1 },{ 0, 2 },
+ { 156876.14940188667969778180, -45.17047008417186759743, -45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, -45.17047008415342190801, -45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 },
+ { 156876.14903264911845326424, -45.17046900832009015403, -45.19664762542463876116, 156860.22319510785746388137, 0.99969549955919856377 },
+ { 156874.38594904550700448453, -45.17014830792169988172, -45.19632692599484613538, 156859.34477911848807707429, 0.99969550299904519353 }
+ }, {
+ { 1, 1 },{ -2, 2 },
+ { 351676.50043935602298006415, -71.63912604463993716308, -71.71767794874519097448, 351497.13544799503870308399, 0.99847006808788085763 },
+ { 351676.50037266127765178680, -71.63912604463332911564, -71.71767794873858292704, 351497.13543194829253479838, 0.99847006821303718738 },
+ { 351676.50038040406070649624, -71.63912540344847457163, -71.71767730460118173141, 351497.12354394828435033560, 0.99847006831660412018 },
+ { 351675.39839278126601129770, -71.63924174977181280610, -71.71779365329184940947, 351499.26940268895123153925, 0.99847004976658171316 }
+ }, {
+ { 1, 1 },{ -2, 0 },
+ { 351772.23553088010521605611, -108.30322660728758421556, -108.32941323792046262042, 351592.72256732499226927757, 0.99846922689201267342 },
+ { 351772.23552330053644254804, -108.30322660729477490804, -108.32941323792763910205, 351592.72256738756550475955, 0.99846922689200567902 },
+ { 351772.23547190619865432382, -108.30322725204673872668, -108.32941388169263063901, 351592.71064292272785678506, 0.99846922699591933448 },
+ { 351771.13000385620398446918, -108.30311039505922110493, -108.32929702549677131174, 351594.87308142217807471752, 0.99846920815167106156 }
+ }, {
+ { 1, 1 },{ -2, -2 },
+ { 470675.27496387914288789034, -134.81200467523646580048, -134.78581002988772752360, 470245.32092262554215267301, 0.99726004843767979136 },
+ { 470675.27491378918057307601, -134.81200467525528097212, -134.78581002990657111695, 470245.32093124854145571589, 0.99726004841255500022 },
+ { 470675.27385581465205177665, -134.81200575348222514549, -134.78581110911991913781, 470245.31203990196809172630, 0.99726004851631100401 },
+ { 470669.97387331607751548290, -134.81232618817941215639, -134.78613154296644438546, 470242.67608062474755570292, 0.99726007931332960599 }
+ }, {
+ { 1, 1 },{ 0, -2 },
+ { 349898.53698544885264709592, -161.45195469949391053888, -161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, -161.45195469952594180540, -161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, -161.45195534985634822078, -161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, -161.45245862756033261576, -161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { 1, 1 },{ 2, -2 },
+ { 349898.53698544885264709592, 161.45195469949391053888, 161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, 161.45195469952594180540, 161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, 161.45195534985634822078, 161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, 161.45245862756033261576, 161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { 1, -1 },{ 2, 0 },
+ { 156899.56829134028521366417, 45.19676732164486310239, 45.18804022935886877121, 156883.63778222308610565960, 0.99969540695122460772 },
+ { 156899.56827460310887545347, 45.19676732162573529195, 45.18804022933975517162, 156883.63778401838499121368, 0.99969540695121617002 },
+ { 156899.56792193598812445998, 45.19676624219878391386, 45.18803915024158612823, 156883.63480984268244355917, 0.99969540696276681935 },
+ { 156897.79947260793414898217, 45.19644594033049145310, 45.18771884804951355363, 156882.75281389255542308092, 0.99969541038810816325 }
+ }, {
+ { 1, -1 },{ 2, 2 },
+ { 349898.53698544885264709592, 18.54804530050607525027, 18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, 18.54804530047409016902, 18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, 18.54804465014367664821, 18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, 18.54754137243966738424, 18.55627113576925424354, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { 1, -1 },{ 0, 2 },
+ { 349898.53698544885264709592, -18.54804530050607525027, -18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 },
+ { 349898.53691851865733042359, -18.54804530047409016902, -18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 },
+ { 349898.53644461580552160740, -18.54804465014367664821, -18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 },
+ { 349894.27001174906035885215, -18.54754137243966738424, -18.55627113576928266525, 349720.85020991315832361579, 0.99848549544738174344 }
+ }, {
+ { 1, -1 },{ -2, 2 },
+ { 470675.27496387914288789034, -45.18799532476352709409, -45.21418997011227247640, 470245.32092262554215267301, 0.99726004843767979136 },
+ { 470675.27491378918057307601, -45.18799532474472613330, -45.21418997009345730476, 470245.32093124865787103772, 0.99726004841255500022 },
+ { 470675.27385581465205177665, -45.18799424651773932737, -45.21418889088011638933, 470245.31203990196809172630, 0.99726004851631100401 },
+ { 470669.97387331607751548290, -45.18767381182056652733, -45.21386845703356271997, 470242.67608062445651739836, 0.99726007931332938394 }
+ }, {
+ { 1, -1 },{ -2, 0 },
+ { 351772.23553088010521605611, -71.69677339271241578444, -71.67058676207953737958, 351592.72256732499226927757, 0.99846922689201267342 },
+ { 351772.23552330053644254804, -71.69677339270522509196, -71.67058676207236089795, 351592.72256738768192008138, 0.99846922689200567902 },
+ { 351772.23547190619865432382, -71.69677274795323285161, -71.67058611830736936099, 351592.71064292214578017592, 0.99846922699591911243 },
+ { 351771.13000385620398446918, -71.69688960494077889507, -71.67070297450322868826, 351594.87308142206165939569, 0.99846920815167106156 }
+ }, {
+ { 1, -1 },{ -2, -2 },
+ { 351676.50043935602298006415, -108.36087395536006283692, -108.28232205125480902552, 351497.13544799503870308399, 0.99847006808788085763 },
+ { 351676.50037266127765178680, -108.36087395536665667350, -108.28232205126143128382, 351497.13543194788508117199, 0.99847006821303718738 },
+ { 351676.50038040406070649624, -108.36087459655152542837, -108.28232269539881826859, 351497.12354394845897331834, 0.99847006831660412018 },
+ { 351675.39839278126601129770, -108.36075825022818719390, -108.28220634670809374711, 351499.26940269087208434939, 0.99847004976658149111 }
+ }, {
+ { 1, -1 },{ 0, -2 },
+ { 156876.14940188667969778180, -134.82952991582811819171, -134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, -134.82952991584656388113, -134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 },
+ { 156876.14903264911845326424, -134.82953099167991695140, -134.80335237457535413341, 156860.22319510785746388137, 0.99969549955919845274 },
+ { 156874.38594904550700448453, -134.82985169207830722371, -134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 }
+ }, {
+ { 1, -1 },{ 2, -2 },
+ { 156876.14940188667969778180, 134.82952991582811819171, 134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 },
+ { 156876.14925185780157335103, 134.82952991584656388113, 134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 },
+ { 156876.14903264911845326424, 134.82953099167994537311, 134.80335237457538255512, 156860.22319510785746388137, 0.99969549955919856377 },
+ { 156874.38594904550700448453, 134.82985169207830722371, 134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 }
+ }, {
+ // near pole
+ {90, -45}, {90, -80},
+ {3900195.49395913071930408478, -180.00000000000000000000, -180.00000000000000000000, 3662502.04478993499651551247, 0.81922976250863166481},
+ {3900195.49395686946809291840, 180.00000000000000000000, 180.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368},
+ {3900195.49053949490189552307, 180.00000000000000000000, 180.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368},
+ {3900203.61653685756027698517, 180.00000000000000000000, 180.00000000000000000000, 3662507.91531699104234576225, 0.81923068138101373670}
+ }, {
+ // pole, same lon
+ {90, -45}, {90, -90},
+ {5017021.35133497882634401321, -180.00000000000000000000, -180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.35133314039558172226, 180.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.34791153203696012497, 180.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017017.85355509258806705475, 180.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}
+ }, {
+ // pole
+ {90, -45}, {0, -90},
+ {5017021.35133497882634401321, -180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.35133314039558172226, 180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.34791153203696012497, 180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017017.85355509258806705475, 180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}
+ }, {
+ // near pole
+ {90, 45}, {90, 80},
+ {3900195.49395913071930408478, 0.00000000000000000000, 0.00000000000000000000, 3662502.04478993499651551247, 0.81922976250863166481},
+ {3900195.49395686946809291840, 0.00000000000000000000, 0.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368},
+ {3900195.49053949490189552307, 0.00000000000000000000, 0.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368},
+ {3900203.61653685756027698517, 0.00000000000000000076, 0.00000000000000000071, 3662507.91531699104234576225, 0.81923068138101373670}
+ }, {
+ // pole, same lon
+ {90, 45}, {90, 90},
+ {5017021.35133497882634401321, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.35133314039558172226, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.34791153203696012497, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017017.85355509258806705475, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}
+ }, {
+ // pole
+ {90, 45}, {0, 90},
+ {5017021.35133497882634401321, -0.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.35133314039558172226, -0.00000000000000496992, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017021.34791153203696012497, 0.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172},
+ {5017017.85355509258806705475, 0.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}
+ }, {
+ // pole
+ {0, -90}, {90, -45},
+ {5017021.35133497882634401321, 90.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70778496454077310940},
+ {5017021.35133314039558172226, 90.00000000000000000000, 0.00000000000000496992, 4517590.87884893082082271576, 0.70778494508412304054},
+ {5017021.34791153203696012497, 90.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70778494508412304054},
+ {5017017.85355509258806705475, 90.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70777827352623101653}
+ }, {
+ // pole
+ {0, 90}, {90, 45},
+ {5017021.35133497882634401321, 90.00000000000000000000, -180.00000000000000000000, 4517590.87884893082082271576, 0.70778496454077310940},
+ {5017021.35133314039558172226, 90.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70778494508412304054},
+ {5017021.34791153203696012497, 90.00000000000001421085, 180.00000000000000000000, 4517590.87884893082082271576, 0.70778494508412304054},
+ {5017017.85355509258806705475, 90.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70777827352623101653}
+ }, {
+ {90, -45}, {90, 45},
+ {9969888.75595548748970031738, 0.00000000000000000000, 0.00000000000000000000, 6361290.27546359039843082428, 0.00431189731318673553},
+ {9969888.75595730356872081757, 0.00000000000000000000, 0.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994},
+ {9969888.73915978334844112396, 0.00000000000000000000, 0.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994},
+ {9969881.64984572120010852814, 0.00000000000000001848, 0.00000000000000001176, 6361314.54906367603689432144, 0.00430809793699618842}
+ }, {
+ {90, 45}, {90, -45},
+ {9969888.75595548748970031738, -180.00000000000000000000, -180.00000000000000000000, 6361290.27546359039843082428, 0.00431189731318673553},
+ {9969888.75595730356872081757, 180.00000000000000000000, 180.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994},
+ {9969888.73915978334844112396, 180.00000000000000000000, 180.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994},
+ {9969881.64984572120010852814, 180.00000000000000000000, 180.00000000000000000000, 6361314.54906367603689432144, 0.00430809793699618842}
+ }, {
+ // pole, same lon
+ {90, 0}, {90, 90},
+ {10001965.72931272350251674652, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.72931179217994213104, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.71749142371118068695, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001958.67847795411944389343, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}
+ }, {
+ // pole
+ {90, 0}, {0, 90},
+ {10001965.72931272350251674652, -0.00000000000000000000, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.72931179217994213104, -0.00000000000000352016, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.71749142371118068695, 0.00000000000000000000, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001958.67847795411944389343, 0.00000000000000000000, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}
+ }, {
+ // pole, different lon
+ {0, 0}, {1, 90},
+ {10001965.72931272350251674652, 0.00000000000000000000, 1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.72931179217994213104, 0.00000000000000006144, 1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.71749142371118068695, 0.00000000000000000000, 0.99999999999998867573, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001958.67847795411944389343, 0.00000000000000000000, 0.99999999999998867573, 6378136.99999999906867742538, 0.00000000000000000000}
+ }, {
+ // pole, different lon
+ {0, 0}, {-1, 90},
+ {10001965.72931272350251674652, -0.00000000000000000000, -1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.72931179217994213104, -0.00000000000000006144, -1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.71749142371118068695, 0.00000000000000000000, -1.00000000000001421085, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001958.67847795411944389343, 0.00000000000000000000, -0.99999999999998867573, 6378136.99999999906867742538, 0.00000000000000000000}
+ }, {
+ // pole, different lon
+ {0, 0}, {1, -90},
+ {10001965.72931272350251674652, -180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.72931179217994213104, 180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.71749142371118068695, 180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001958.67847795411944389343, 180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}
+ }, {
+ // pole, different lon
+ {0, 0}, {-1, -90},
+ {10001965.72931272350251674652, -180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.72931179217994213104, -180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001965.71749142371118068695, 180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000},
+ {10001958.67847795411944389343, 180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}
+ }
+ /*, {
+ // antipodal
+ {-90, -45}, {90, 45},
+ {20003931.45862544700503349304, -180.00000000000000000000, 0.00000000000000000000, 33675.52452803074265830219, -0.99472900658949181540},
+ {19987083.06974205747246742249, 90.00000000000000000000, 90.00000000000000000000, 00000.00000000078240703623, -1.00000000000000000000},
+ {00000000.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000, 000000.00000000000000000000, 1.00000000000000000000},
+ {20020712.84987257421016693115, 0.00000000000000000000, 0.00000000000000000000, 6361314.54906367603689432144, 0.00430809793699618842}
+ },{
+ // antipodal
+ {-90, 45}, {90, -45},
+ {20003931.45862544700503349304, 0.00000000000000000000, -180.00000000000000000000, 33675.52452803074265830219, -0.99472900658949181540},
+ {19987083.06974205747246742249, 90.00000000000000000000, 90.00000000000000000000, -000000.00000000078240703623, -1.00000000000000000000},
+ {00000000.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000, 000000.00000000000000000000, 1.00000000000000000000},
+ {20020712.84987257421016693115, 180.00000000000000000000, 0.00000000000000000000, 33590.79639541531651047990, -1.00525773151080621837}
+ }
+ // pi = 3.1415926535897931
+ // r2d = 57.295779513082323
+ // commented out because of inconsistencies
+ /*, {
+ {0.26387320519564444 * 57.295779513082323, 0.84008767903244352 * 57.295779513082323},
+ {0.26387320679785603 * 57.295779513082323, 0.84008767099694759 * 57.295779513082323},
+ {0.051647212499179529, 172.39749230932208, 172.39749237768564, 0.051647212499179536, 1.0000000000000000},
+ {0.051647209427812361, 172.39750897806516, 172.39750904523200, 0.051638407375539180, 0.99999999999999734},
+ // TODO: This is wrong
+ {0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.0000000000000000},
+ {0.00000000000000000, 0.00000000000000000, 0.00000000000000000, -0.051193490763866173, 1.0000000000000000}
+ }, {
+ {0.26387320519564444 * 57.295779513082323, 0.84008767903244352 * 57.295779513082323},
+ {(0.26387320679785603 - 3.1415926535897931) * 57.295779513082323, -0.84008767099694759 * 57.295779513082323},
+ {20003931.407432225, -1.3045327945402774e-05, -179.99998695467218, 30010.522036068141, -0.99475954491334551},
+ {20003669.536724485, -7.5912543895164619, -172.40874567755344, 29487.136123182696, -0.99480541226332386},
+ // TODO: This is wrong
+ {0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.0000000000000000},
+ {20018879.436128609, 0.00000000000000000, 180.00000000000000, 29935.015234617360, -0.99477272997811228}
+ }*/
+};
+
+size_t const expected_size = sizeof(expected) / sizeof(expected_results);
+
+#endif // BOOST_GEOMETRY_TEST_INVERSE_CASES_HPP
diff --git a/src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp b/src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp
new file mode 100644
index 000000000..e66046dd5
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp
@@ -0,0 +1,342 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
+
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_INVERSE_CASES_ANTIPODAL_HPP
+#define BOOST_GEOMETRY_TEST_INVERSE_CASES_ANTIPODAL_HPP
+
+#include "inverse_cases.hpp"
+
+struct expected_results_antipodal
+{
+ coordinates p1;
+ coordinates p2;
+ expected_result karney;
+};
+
+/*
+ These values are collected from GeodTest which is associated with GeographicLib:
+ https://zenodo.org/record/32156
+
+ The conversion to C++ array format is done using this Python script:
+ https://github.com/adl1995/boost-geometry-extra/blob/master/geographiclib-dataset-parse-inverse.py
+
+ Geodesic scale (M12) is absent from the GeodTest dataset, so it is manually generated
+ using GeographicLib using this C++ script:
+ https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-direct-antipodal.cpp
+*/
+expected_results_antipodal expected_antipodal[] =
+{
+ {
+ { 0, 31.394417440639 }, { 179.615601631202912322, -31.275540610835465807 },
+ { 19980218.4055399, 34.266322930672, 145.782701113414306756, 49490.8807994496209, -0.996116451012525883079717914370121434 }
+ },{
+ { 0, 29.788792273749 }, { 178.569451327813675741, -29.558013672069422725 },
+ { 19887224.5407334, 74.302205994192, 106.156240654579267308, 97043.7545600593058, -0.998624031147844926081802441331092268 }
+ },{
+ { 0, 46.471843094141 }, { 179.083144618009561276, -46.284166405924629853 },
+ { 19944337.8863917, 63.693680310665, 116.699978859005570535, 53139.140576552365, -0.997597309645591900917338534782174975 }
+ },{
+ { 0, 63.016506345929 }, { 179.862869954071637855, -63.02943882703369735 },
+ { 20000925.7533636, 153.393656073038, 26.619056019474552953, 12713.9284725111772, -1.00381317792143387457315384381217882 }
+ },{
+ { 0, 19.796231412719 }, { 179.546498474461283862, -19.470586923091672503 },
+ { 19956338.1330537, 28.272934411318, 151.789094611690988249, 87191.1749625132931, -0.997015409027664833985227232915349305 }
+ },{
+ { 0, 6.373459459035 }, { 179.240009269347556917, -6.204887833274217382 },
+ { 19946581.6983394, 56.859050230583, 123.169200847008284851, 53958.8698005263939, -0.999349049081101004077254401636309922 }
+ },{
+ { 0, 66.380766469414 }, { 179.632633596894388233, -66.27177494016956425 },
+ { 19986277.7696849, 38.646950203356, 141.550919825824399405, 22198.215635049214, -0.996949176054954366854587988200364634 }
+ },{
+ { 0, 16.483421185231 }, { 179.731567273052604726, -16.818424446748042212 },
+ { 19962737.9842573, 163.431254767325, 16.598399455529231288, 95318.4104529881431, -1.00272210232979741562076014815829694 }
+ },{
+ { 0, 4.215702155486 }, { 179.093771177769992874, -4.051917290690976764 },
+ { 19932517.393764, 65.543168480886, 114.482669479963380006, 55205.4553703842317, -0.999655858425056553784315838129259646 }
+ },{
+ { 0, 40.71372085907 }, { 179.404612926861498984, -41.047052242159400671 },
+ { 19951133.3595356, 143.672151631634, 36.54002600969304553, 70931.1530155553621, -1.00414169574077272173440178448799998 }
+ },{
+ { 0, 15.465481491654 }, { 179.020726605204181801, -14.622355549425900341 },
+ { 19877383.8879911, 36.289185640976, 143.875673907461159912, 156419.0806764376957, -0.997639074397169589580869342171354219 }
+ },{
+ { 0, 17.586197343531 }, { 179.722490735835379144, -17.731394230364437075 },
+ { 19982280.4639115, 157.929615091529, 22.089021105298661023, 69727.5357849255557, -1.00280451698301242835498214844847098 }
+ },{
+ { 0, 5.7442768247 }, { 178.85894724576868462, -6.039853564481335581 },
+ { 19902873.7431814, 116.146983678305, 63.91482549951374061, 87149.6188944111673, -1.00039332893096744037109147029696032 }
+ },{
+ { 0, 32.002904282111 }, { 179.744925422107715439, -32.297934520693132807 },
+ { 19967670.3104795, 163.052160078191, 17.004175883388454943, 78311.3164829640582, -1.00449903445302446414189034840092063 }
+ },{
+ { 0, 55.902716926362 }, { 179.300685189522463007, -55.934320218634018206 },
+ { 19970525.337607, 98.927641063414, 81.374264168520557301, 23554.0093185709067, -1.00072788779083454713259015989024192 }
+ },{
+ { 0, 22.69939784398 }, { 179.294173474584020749, -22.654875407651067149 },
+ { 19959286.1903172, 74.253870776761, 105.811588890213155275, 22369.7179951557679, -0.998972181419003457669703038845909759 }
+ },{
+ { 0, 41.312328471121 }, { 179.817186837717804928, -40.954523601529804886 },
+ { 19962690.5721867, 11.277616109847, 168.784288786443902199, 77252.6121237260201, -0.994825151471527391322524636052548885 }
+ },{
+ { 0, 27.927415327453 }, { 179.636508875679110143, -27.607314264234172721 },
+ { 19961296.8828333, 23.166421459647, 156.905194492817275222, 83096.5801709291101, -0.995959692767656723511038308060960844 }
+ },{
+ { 0, 41.567228741451 }, { 179.931812964300204608, -42.103039532074194347 },
+ { 19944253.4454809, 176.66609526064, 3.361859685835349219, 96859.08180779197, -1.00513607140487626345759508694754913 }
+ },{
+ { 0, 37.384208978567 }, { 179.225180174670992261, -36.916085670712060029 },
+ { 19928705.5911445, 39.072534864532, 141.212743814390850106, 92667.7834060578402, -0.995955516859159284415170532156480476 }
+ },{
+ { 0, 59.011868682852 }, { 179.424923485514312807, -58.82705468054708336 },
+ { 19970442.3788306, 44.970301291063, 135.333817989802309531, 38071.1136293083857, -0.996658942892707400140750451100757346 }
+ },{
+ { 0, 35.515406087737 }, { 179.50369572149476218, -35.119747127350258822 },
+ { 19948918.9139751, 28.528972431952, 151.622257906284404073, 84564.0387217601751, -0.995562861799169418475230486365035176 }
+ },{
+ { 0, 58.170252463184 }, { 179.254737571455023977, -58.372261836268550805 },
+ { 19961407.0813807, 128.021116291844, 52.399129705193347143, 43715.3070711393309, -1.00285273713280753682397516968194395 }
+ },{
+ { 0, 34.012183807959 }, { 179.83713352180447672, -34.29640782899529639 },
+ { 19970955.843065, 168.944519134772, 11.093048811826875835, 76493.5814538538151, -1.0047652354558671561335359001532197 }
+ },{
+ { 0, 45.510762948553 }, { 178.981682578823726535, -45.582753595227824235 },
+ { 19940248.3450143, 99.886784003837, 80.542330522982505877, 48555.1946627894972, -1.00083807750906350619857221317943186 }
+ },{
+ { 0, 4.19841765451 }, { 179.398024428225540172, -4.198416896099783242 },
+ { 19970496.5132933, 89.561550657928, 90.438456568689151881, 14.8790480103109, -0.999994104810285944218151144013972953 }
+ },{
+ { 0, 40.890119148103 }, { 179.6557148951668192, -41.553556264538302258 },
+ { 19926563.5817492, 165.437641169967, 14.713597527941311478, 111805.7305227545923, -1.00492294933406567380984597548376769 }
+ },{
+ { 0, 28.096672787686 }, { 178.606868012231657724, -28.472055035513955205 },
+ { 19883901.8482359, 115.174366374632, 65.257367020445564176, 107880.4353518862363, -1.00170803073331593502359737613005564 }
+ },{
+ { 0, 6.50572154271 }, { 178.926013840891647541, -6.411745140559297675 },
+ { 19917276.4101551, 79.069492719523, 100.985091481519557845, 57073.3242952680707, -0.999736666933808471036115861352300271 }
+ },{
+ { 0, .468835109567 }, { 178.325942223692180692, -.281751687044281805 },
+ { 19849380.7342734, 80.234636214474, 99.77243368342786593, 123845.4568822078908, -0.999801437209140719808431185811059549 }
+ },{
+ { 0, 1.682746325049 }, { 179.717131561406935483, -.677647430701204515 },
+ { 19890026.0274781, 10.076182752451, 169.927471515299313238, 177917.2104306563981, -0.999538055691262194990542866435134783 }
+ },{
+ { 0, 10.711305126218 }, { 179.874050163405229937, -10.349315378531556046 },
+ { 19962987.2134077, 7.528253696796, 172.480576051850009046, 104175.1095378254456, -0.998071853755238880268052525934763253 }
+ },{
+ { 0, 53.374321544652 }, { 179.729445806011012057, -53.196257519024042184 },
+ { 19980478.1457438, 23.324715976877, 156.777734080146664812, 41907.8869272231053, -0.995333596277707566279957518418086693 }
+ },{
+ { 0, 39.680221664519 }, { 179.87506206720154785, -39.256187213040660911 },
+ { 19956191.7841809, 7.075406493429, 172.967624741991546131, 86943.8110669895148, -0.994801087909667924868983845954062417 }
+ },{
+ { 0, 1.377666714083 }, { 178.994542525209058878, -1.415358715570225495 },
+ { 19925401.4931301, 95.29199069739, 84.7178724483824156, 45800.9140624827059, -0.99999803170512457928253979844157584 }
+ },{
+ { 0, 48.751426624188 }, { 179.661697715070846977, -48.688146707479475147 },
+ { 19988599.1160495, 40.252328570137, 139.808452951157199824, 26322.3790862461568, -0.995999245724129789181233718409202993 }
+ },{
+ { 0, 59.443039048494 }, { 179.247605418616998285, -59.454371825393424121 },
+ { 19969935.9534732, 93.052184108221, 87.331416513795326158, 25342.4691896499534, -1.00020727848897084122370415570912883 }
+ },{
+ { 0, 4.122408476235 }, { 179.749430572914989772, -4.689124208743755363 },
+ { 19938291.6332293, 167.73479753304, 12.274635577599782826, 127855.6475863583497, -1.00068600902837667732114823593292385 }
+ },{
+ { 0, 46.422470082432 }, { 178.857408435141563774, -46.390934261324541952 },
+ { 19931980.7029341, 86.67365350297, 93.852683224054943377, 56114.680046867064, -0.999607096116300386512421027873642743 }
+ },{
+ { 0, 32.614423729024 }, { 179.460593512880455451, -32.01874745886238612 },
+ { 19926887.3785175, 24.943814520557, 155.229917137448282531, 112355.3319340873104, -0.995562150676871926435751447570510209 }
+ },{
+ { 0, 3.242895277973 }, { 179.556428318080663113, -3.001106476068264917 },
+ { 19964490.4789049, 30.247458779683, 149.760178923092147784, 80929.0418317066044, -0.999474184270344845337774586369050667 }
+ },{
+ { 0, 6.29069210113 }, { 178.556859259685624933, -6.354208910915346725 },
+ { 19877160.8505733, 94.34299459284, 85.750059038253282986, 94127.1566760840083, -0.999976397350904933070125935046235099 }
+ },{
+ { 0, 18.232086569498 }, { 179.658073278238477245, -18.87394850776853555 },
+ { 19927978.7462175, 164.41905055334, 15.640779355822506503, 129771.1882449660559, -1.00293460439063886191490837518358603 }
+ },{
+ { 0, 12.049849333181 }, { 179.761046682699610657, -11.201990279782499264 },
+ { 19908004.4552909, 9.418096768309, 170.610608272305604585, 157761.5040571466343, -0.997761474497510958414636661473196 }
+ },{
+ { 0, 40.289465276136 }, { 179.644208494155329095, -40.370034926441385999 },
+ { 19985674.936106, 143.092606818963, 36.958610382613096419, 36200.8933724688593, -1.00414965876091266672176516294712201 }
+ },{
+ { 0, 2.197784650379 }, { 179.961199531084784854, -1.353440827124394777 },
+ { 19910509.7517973, 1.542117609437, 178.458582198505846426, 160403.6285079348996, -0.999488724639301051588802238256903365 }
+ },{
+ { 0, 1.966575272177 }, { 179.699817324905962184, -3.101125282483752618 },
+ { 19875595.6267266, 170.112968791865, 9.89572776349855838, 192355.7206665719908, -1.00015463589804554089823795948177576 }
+ },{
+ { 0, 25.078832492684 }, { 178.600804840925824646, -24.897833702325682511 },
+ { 19887997.7953866, 77.264585323781, 103.101167809583406892, 92442.9124509225839, -0.998981189838600847075156252685701475 }
+ },{
+ { 0, 31.740361941314 }, { 179.553485210731879874, -31.909206787477701871 },
+ { 19972325.3556069, 143.930820896999, 36.145242998351638503, 54883.4113710054145, -1.00379461628115951299378139083273709 }
+ },{
+ { 0, .05479250563 }, { 178.822647462220726609, .836079031223269324 },
+ { 19858049.4780499, 41.349430623518, 138.645259065012502544, 169078.442370111714, -0.9997793696948588104689292777038645 }
+ },{
+ { 0, 36.685139871608 }, { 179.366667224014334712, -36.6833040833258687 },
+ { 19968965.6773632, 89.167975517493, 90.921025521408327068, 13327.2156799476918, -0.999916537946348604748436628142371774 }
+ },{
+ { 0, 3.451199399671 }, { 179.107509334399258305, -3.459003521120242021 },
+ { 19938203.3838544, 91.541212417048, 88.476282464773035164, 32316.1747698810781, -1.00000397484395819880376166111091152 }
+ },{
+ { 0, 27.692898794247 }, { 178.512356615673144314, -27.666009301228316555 },
+ { 19883493.6699045, 88.406440883665, 92.036345087713397961, 94128.7880896190836, -0.999736458322951659916100197733612731 }
+ },{
+ { 0, 17.363238291869 }, { 179.567921315455829491, -17.288872648596950413 },
+ { 19980749.7638027, 39.697196316589, 140.321938237586060826, 46975.9359427664379, -0.997687691981715030209443284547887743 }
+ },{
+ { 0, 37.006775102539 }, { 179.191103068859169842, -37.156365616364686838 },
+ { 19949309.9180043, 116.455543532607, 63.771817992036617793, 45856.1961421018701, -1.00221962858918423044940482213860378 }
+ },{
+ { 0, 45.572883540957 }, { 179.224707765088686272, -45.94675931323086696 },
+ { 19940027.8586414, 137.627256708444, 42.723991162977357301, 74208.4359612889496, -1.00380887786447159371050474874209613 }
+ },{
+ { 0, 43.63393981955 }, { 178.878236417027994157, -43.642335115130514773 },
+ { 19931045.2914508, 91.203625101465, 89.268780774643462256, 55253.5406349861764, -1.00002974153150514524668324156664312 }
+ },{
+ { 0, 38.4995307019 }, { 179.143856004445269342, -39.042223438550921467 },
+ { 19918391.2222193, 141.232864609445, 39.117947060740562295, 102217.2563106863077, -1.00388164115732947401227193040540442 }
+ },{
+ { 0, 27.55015339382 }, { 179.596220103573824099, -27.587412128122249651 },
+ { 19986004.7358853, 137.025135713548, 42.992898351962011956, 33938.7346646670654, -1.00316044390281167153489150223322213 }
+ },{
+ { 0, 1.54507498314 }, { 179.567115633151308577, -1.448861185025252004 },
+ { 19978593.3191777, 36.816106412092, 143.185763012309022403, 56320.5800276739168, -0.999770499462467210349814195069484413 }
+ },{
+ { 0, 45.217063644222 }, { 179.807382581661125, -45.086424050571516283 },
+ { 19987042.0782465, 18.114645812265, 161.928120141429818658, 45544.2915061261936, -0.994974179414854997816064496873877943 }
+ },{
+ { 0, 13.473522450751 }, { 179.726941062277208626, -13.570372758027936877 },
+ { 19987364.078382, 156.839609002403, 23.170293747820406391, 65329.9068132034472, -1.00219093189506569530067281448282301 }
+ },{
+ { 0, 6.287741997374 }, { 179.071252372259552052, -6.743450924917895817 },
+ { 19912159.8245954, 132.954797451112, 47.100789519677419746, 104772.4027498097375, -1.00071252411103017720961361192166805 }
+ },{
+ { 0, 7.639709001531 }, { 179.616156296978583335, -7.48702643786017917 },
+ { 19976374.3699535, 29.731916588299, 150.279582966919438164, 69224.6591757209539, -0.998789792086741234911073661351110786 }
+ },{
+ { 0, 5.893688050348 }, { 179.586212000450856399, -4.888408917114795625 },
+ { 19886907.2520668, 14.653438882877, 165.371181401863458848, 177183.5330818593022, -0.998794647031120752522781458537792787 }
+ },{
+ { 0, 61.997076235476 }, { 179.605779116829636081, -62.19593758437129915 },
+ { 19976288.2901729, 149.562797049254, 30.65850204223272625, 36696.2853801462176, -1.00373071432437144245852778112748638 }
+ },{
+ { 0, 50.507637741656 }, { 179.893569206021038536, -50.721890799900161112 },
+ { 19979542.5263293, 171.564028344478, 8.4746613464253591, 50644.5234828162697, -1.00508881632281776852266830246662721 }
+ },{
+ { 0, 7.484475238477 }, { 178.638400003000590878, -6.926155588124333461 },
+ { 19867425.2906303, 57.020570370985, 123.087267812322270238, 132929.2775641349633, -0.999097042677338120775232255255104974 }
+ },{
+ { 0, 56.851165323215 }, { 179.587046628550073045, -56.875248360744638525 },
+ { 19988235.9960515, 112.345749045605, 67.744017057185404441, 9971.0934553515518, -1.00182859249871403228837607457535341 }
+ },{
+ { 0, 10.692273150738 }, { 178.709520715733071393, -10.851727623036704339 },
+ { 19893210.3050033, 102.824601316946, 77.308514969817191459, 83032.7122948051111, -1.00034345584508432835946223349310458 }
+ },{
+ { 0, 46.694739303788 }, { 179.926838145841924189, -46.948618153686522669 },
+ { 19975447.9283188, 174.663684259477, 5.361568174833475454, 59614.5876209460645, -1.00520484875201732144489596976200119 }
+ },{
+ { 0, 15.804386137005 }, { 178.367587635209819128, -15.522042847777054984 },
+ { 19855850.8800526, 74.932089158884, 105.357235560913450667, 123350.4326645237628, -0.999091578546475345135036150168161839 }
+ },{
+ { 0, 4.371450175299 }, { 179.780887420199549421, -4.566109732313098407 },
+ { 19979071.1035552, 164.163592252794, 15.840695025950408814, 84137.2115482558728, -1.00076323969894742660358133434783667 }
+ },{
+ { 0, 30.894388279688 }, { 179.375426183521944524, -30.871308884744172663 },
+ { 19968681.8321577, 77.35154610481, 102.709506078439532936, 14048.0277985734058, -0.998975176336422854284080585784977302 }
+ },{
+ { 0, 9.541166838639 }, { 178.432934555386452839, -10.09982228112793472 },
+ { 19848553.7844137, 118.441353539081, 61.736686215549403663, 144831.1911566651614, -1.00060548620110489892454097571317106 }
+ },{
+ { 0, 8.489292700054 }, { 179.906698338023119097, -8.559237750032113623 },
+ { 19995477.1669578, 171.963952699866, 8.037517851139094467, 72192.60793572974, -1.00152068486306466965629624610301107 }
+ },{
+ { 0, 19.562401114224 }, { 178.838724116996037606, -20.05038360490599475 },
+ { 19893208.1788508, 126.362762598128, 53.875560227496658204, 112181.7524188837615, -1.00185202668802775249901060306001455 }
+ },{
+ { 0, 42.260350252749 }, { 179.807860448877064601, -42.79985897702184353 },
+ { 19942715.0054774, 170.703419847646, 9.377654670896439828, 96336.3477142010769, -1.00508642406443549077721399953588843 }
+ },{
+ { 0, 24.511403144656 }, { 178.957598444862223515, -24.616808725039883945 },
+ { 19924809.5184876, 102.913211410163, 77.297538210434837096, 55403.453072179318, -1.0008408309188838725134473861544393 }
+ },{
+ { 0, 20.844284170708 }, { 179.069258863637226633, -20.321320573298341477 },
+ { 19909084.6340808, 44.172784008084, 136.01627115731728436, 111009.0987238994608, -0.997389183621778974142557672166731209 }
+ },{
+ { 0, 2.426010809098 }, { 178.236397468862000784, -2.513715200833756776 },
+ { 19840940.6924189, 94.315194952561, 85.734896842737189557, 130002.6104886615638, -0.999825249844991659209370027383556589 }
+ },{
+ { 0, 6.600682554664 }, { 179.646475458013797028, -7.699164822656561787 },
+ { 19878412.28273, 168.167678684515, 11.861035812918738552, 187426.3958525886692, -1.00098284856064978498579876031726599 }
+ },{
+ { 0, 23.372339802326 }, { 179.499422665106094027, -24.239465200482591299 },
+ { 19899498.4582543, 161.197647943542, 18.932355367478826536, 151863.2545535951091, -1.00347666868431395492677893344080076 }
+ },{
+ { 0, 16.194668264095 }, { 179.115193814080201851, -17.129419031459576897 },
+ { 19874825.6683239, 148.942349959054, 31.225656401221968078, 166033.3161394594622, -1.00222032222233647935638600756647065 }
+ },{
+ { 0, 1.528726471528 }, { 178.791047180477802091, -1.282203000582034597 },
+ { 19897803.9939987, 69.212891442493, 110.802928803578167132, 85252.8333849204133, -0.999827144228156883265512533398577943 }
+ },{
+ { 0, 6.297249676078 }, { 178.623258703845895437, -5.709470001196540278 },
+ { 19864042.0495193, 56.274639904925, 123.817184177744186806, 137475.1283083659258, -0.999190450178399580671850799262756482 }
+ },{
+ { 0, 17.393540327984 }, { 179.330156510680163326, -17.431100690958209424 },
+ { 19962624.6302607, 107.855062015266, 72.181322855288535245, 19320.5501845044839, -1.00091841779689127989172447996679693 }
+ },{
+ { 0, 46.284685151236 }, { 179.852534804091121255, -46.176234945675219984 },
+ { 19990422.3478916, 14.758013867151, 165.271681964991897184, 42614.1796365710104, -0.994894592261839960656288894824683666 }
+ },{
+ { 0, 14.924320176299 }, { 179.195663739713760883, -14.125476432252858442 },
+ { 19891861.8615337, 31.446544793174, 148.678916887199611191, 149419.6596309045804, -0.997620142585332936313591289945179597 }
+ },{
+ { 0, 23.668824656069 }, { 179.409875478773990359, -24.107855233601412399 },
+ { 19938736.4442268, 148.091483667618, 32.02919257641173958, 97771.7687385830819, -1.00323262872000595891108787327539176 }
+ },{
+ { 0, 46.986276695896 }, { 179.92040916864362177, -47.301644191214905832 },
+ { 19968596.0414782, 174.796708941456, 5.234240076649939638, 66113.7417494369769, -1.00519095452608087093437916337279603 }
+ },{
+ { 0, 65.946144289524 }, { 179.808282612725835525, -65.871840130833632868 },
+ { 19993734.5109736, 25.375428509648, 154.703163938350061652, 18355.2254271672769, -0.996436935914610577569305860379245132 }
+ },{
+ { 0, 10.950298933293 }, { 179.624609619829763098, -10.787771536605316781 },
+ { 19975919.5586889, 28.779018914489, 151.238005588662201946, 70291.1998404303581, -0.998272071834115148902810688014142215 }
+ },{
+ { 0, 13.609869340778 }, { 179.035623147420893383, -14.023624108675206222 },
+ { 19913213.8514358, 129.616021271129, 50.506400999466711623, 97596.7664002074776, -1.00146664642314031645753402699483559 }
+ },{
+ { 0, 48.701427557433 }, { 179.385565054218238481, -48.735316652259656533 },
+ { 19972955.2699173, 102.875149183407, 77.294384444682547869, 18461.7742226227697, -1.00114676855429074464609584538266063 }
+ },{
+ { 0, 31.519172055785 }, { 179.555251675378549409, -31.140142027808697534 },
+ { 19952318.3772514, 26.247105619999, 153.865822276646938125, 86354.7117605101002, -0.995739948399825047786748655198607594 }
+ },{
+ { 0, 31.863784754278 }, { 179.722489476483407524, -31.826935359797657785 },
+ { 19993324.8682601, 29.572313410211, 150.440607907359037187, 41427.6181613499234, -0.995888009001147267440501309465616941 }
+ },{
+ { 0, 76.434608546092 }, { 179.918287057674124459, -76.48787937532808951 },
+ { 19997750.023578, 167.428385412814, 12.621032110142724567, 9619.5267710862108, -1.00233963893091582164629471662919968 }
+ },{
+ { 0, 73.114273316483 }, { 179.576736605988553624, -73.098788070892914568 },
+ { 19992866.6147806, 78.154765899661, 102.085693546950923465, 8580.6475692800946, -0.999384143308475469957841141876997426 }
+ },{
+ { 0, 1.125639056292 }, { 178.426819580880619395, -.694775021853292564 },
+ { 19852573.5442848, 67.184842289382, 112.831314850896246589, 132932.8743502563937, -0.999732957962833457266071945923613384 }
+ }
+};
+
+size_t const expected_size_antipodal = sizeof(expected_antipodal) / sizeof(expected_results_antipodal);
+
+#endif // BOOST_GEOMETRY_TEST_INVERSE_CASES_ANTIPODAL_HPP
diff --git a/src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp b/src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp
new file mode 100644
index 000000000..6fe9557c7
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp
@@ -0,0 +1,106 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
+
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_INVERSE_CASES_SMALL_ANGLES_HPP
+#define BOOST_GEOMETRY_TEST_INVERSE_CASES_SMALL_ANGLES_HPP
+
+#include "inverse_cases.hpp"
+
+struct expected_results_small_angles
+{
+ coordinates p1;
+ coordinates p2;
+ expected_result karney;
+};
+
+/*
+ These values are collected from GeodTest which is associated with GeographicLib:
+ https://zenodo.org/record/32156
+
+ The conversion to C++ array format is done using this Python script:
+ https://github.com/adl1995/boost-geometry-extra/blob/master/geographiclib-dataset-parse-inverse.py
+
+ Geodesic scale (M12) is absent from the GeodTest dataset, so it is manually generated
+ using GeographicLib using this C++ script:
+ https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-direct-small_angles.cpp
+*/
+expected_results_small_angles expected_small_angles[] =
+{
+ {
+ { 180, 0 },{ 0, 0 },
+ { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 },
+ },{
+ { 180, 0 },{ 1e-300, 0 },
+ { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 },
+ },{
+ { 180, 0 },{ 1e-200, 0 },
+ { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 },
+ },{
+ { 180, 0 },{ 1e-100, 0 },
+ { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 },
+ },{
+ { 180, 0 },{ 1e-50, 0 },
+ { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 },
+ },{
+ { 180, 0 },{ 1e-20, 0 },
+ { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 },
+ },{
+ { 180, 0 },{ 1e-10, 0 },
+ { 20003931.45862544700503349304, -9.501793528220011062168943853e-09, -179.9999999904981962117744843, 67125.61229850351810455322266, -1 },
+ },{
+ { 0, 1e-100 },{ 170, 1e-200},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-300 },{ 170, 1e-50},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-300 },{ 170, 1e-10},
+ { 18924313.43485650792717933655, 89.99999999939157646622334141, 90.00000000060019544889655663, 1041298.80855225014965981245, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-100 },{ 170, 1e-50},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-200 },{ 170, 1e-50},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 0.0 },{ 170, 1e-10},
+ { 18924313.43485650792717933655, 89.99999999939157646622334141, 90.00000000060019544889655663, 1041298.80855225014965981245, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-20 },{ 170, 1e-100},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-100 },{ 170, 0.0},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-10 },{ 170, 1e-300},
+ { 18924313.43485650792717933655, 89.99999999939980455110344337, 90.00000000060842353377665859, 1041298.80855225014965981245, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-300 },{ 170, 1e-100},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-200 },{ 170, 1e-100},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 1e-10 },{ 170, 1e-50},
+ { 18924313.43485650792717933655, 89.99999999939980455110344337, 90.00000000060842353377665859, 1041298.80855225014965981245, -0.9864919282563420210863114335 },
+ },{
+ { 0, 0.0 },{ 170, 1e-200},
+ { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 },
+ },{
+ { 0, 0.0 },{ 170, 1e-10},
+ { 18924313.43485650792717933655, 89.99999999939157646622334141, 90.00000000060019544889655663, 1041298.80855225014965981245, -0.9864919282563420210863114335 },
+ }
+};
+
+
+size_t const expected_size_small_angles = sizeof(expected_small_angles) / sizeof(expected_results_small_angles);
+
+#endif // BOOST_GEOMETRY_TEST_INVERSE_CASES_SMALL_ANGLES_HPP
diff --git a/src/boost/libs/geometry/test/formulas/inverse_karney.cpp b/src/boost/libs/geometry/test/formulas/inverse_karney.cpp
new file mode 100644
index 000000000..f7004b64d
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/inverse_karney.cpp
@@ -0,0 +1,104 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
+
+// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <sstream>
+
+#include "test_formula.hpp"
+#include "inverse_cases.hpp"
+#include "inverse_cases_antipodal.hpp"
+#include "inverse_cases_small_angles.hpp"
+
+#include <boost/geometry/formulas/karney_inverse.hpp>
+
+#include <boost/geometry/srs/spheroid.hpp>
+
+template <typename Result>
+void check_inverse(std::string const& name,
+ Result const& results,
+ bg::formula::result_inverse<double> const& result,
+ expected_result const& expected,
+ expected_result const& reference,
+ double reference_error)
+{
+ std::stringstream ss;
+ ss << "(" << results.p1.lon << " " << results.p1.lat << ")->(" << results.p2.lon << " " << results.p2.lat << ")";
+
+ check_one(name + "_d " + ss.str(),
+ result.distance, expected.distance, reference.distance, reference_error);
+ check_one(name + "_a " + ss.str(),
+ result.azimuth, expected.azimuth, reference.azimuth, reference_error, true);
+ check_one(name + "_ra " + ss.str(),
+ result.reverse_azimuth, expected.reverse_azimuth, reference.reverse_azimuth, reference_error, true);
+ check_one(name + "_rl " + ss.str(),
+ result.reduced_length, expected.reduced_length, reference.reduced_length, reference_error);
+ check_one(name + "_gs " + ss.str(),
+ result.geodesic_scale, expected.geodesic_scale, reference.geodesic_scale, reference_error);
+}
+
+void test_all(expected_results const& results)
+{
+ double lon1d = results.p1.lon;
+ double lat1d = results.p1.lat;
+ double lon2d = results.p2.lon;
+ double lat2d = results.p2.lat;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ bg::formula::result_inverse<double> result_k;
+
+ typedef bg::formula::karney_inverse<double, true, true, true, true, true, 8> ka_t;
+ result_k = ka_t::apply(lon1d, lat1d, lon2d, lat2d, spheroid);
+ check_inverse("karney", results, result_k, results.vincenty, results.reference, 0.0000001);
+}
+
+template <typename ExpectedResults>
+void test_karney(ExpectedResults const& results)
+{
+ double lon1d = results.p1.lon;
+ double lat1d = results.p1.lat;
+ double lon2d = results.p2.lon;
+ double lat2d = results.p2.lat;
+
+ // WGS84
+ bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793);
+
+ bg::formula::result_inverse<double> result;
+
+ typedef bg::formula::karney_inverse<double, true, true, true, true, true, 8> ka_t;
+ result = ka_t::apply(lon1d, lat1d, lon2d, lat2d, spheroid);
+ check_inverse("karney", results, result, results.karney, results.karney, 0.0000001);
+}
+
+int test_main(int, char*[])
+{
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all(expected[i]);
+ }
+
+ for (size_t i = 0; i < expected_size_antipodal; ++i)
+ {
+ test_karney(expected_antipodal[i]);
+ }
+
+ for (size_t i = 0; i < expected_size_small_angles; ++i)
+ {
+ test_karney(expected_small_angles[i]);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/formulas/test_formula.hpp b/src/boost/libs/geometry/test/formulas/test_formula.hpp
new file mode 100644
index 000000000..9e41bfcae
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/test_formula.hpp
@@ -0,0 +1,97 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_FORMULA_HPP
+#define BOOST_GEOMETRY_TEST_FORMULA_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/util/math.hpp>
+
+void normalize_deg(double & deg)
+{
+ while (deg > 180.0)
+ deg -= 360.0;
+ while (deg <= -180.0)
+ deg += 360.0;
+}
+
+
+#define BOOST_GEOMETRY_CHECK_CLOSE( L, R, T, M ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), M, CHECK, CHECK_MSG, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
+
+
+void check_one(std::string const& name, double result, double expected)
+{
+ std::string id = name.empty() ? "" : (name + " : ");
+
+ double eps = std::numeric_limits<double>::epsilon();
+ double abs_result = bg::math::abs(result);
+ double abs_expected = bg::math::abs(expected);
+ double res_max = (std::max)(abs_result, abs_expected);
+ double res_min = (std::min)(abs_result, abs_expected);
+ if (res_min <= eps) // including 0
+ {
+ bool is_close = abs_result <= 30 * eps && abs_expected <= 30 * eps;
+ BOOST_CHECK_MESSAGE((is_close),
+ id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}.");
+ }
+ else if (res_max > 100 * eps)
+ {
+ BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 0.1,
+ id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}.");
+ }
+ else if (res_max > 10 * eps)
+ {
+ BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 10,
+ id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}.");
+ }
+ else if (res_max > eps)
+ {
+ BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 1000,
+ id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}.");
+ }
+}
+
+void check_one(std::string const& name,
+ double result, double expected, double reference, double reference_error,
+ bool normalize = false, bool check_reference_only = false)
+{
+ std::string id = name.empty() ? "" : (name + " : ");
+
+ if (normalize)
+ {
+ normalize_deg(result);
+ normalize_deg(expected);
+ normalize_deg(reference);
+ }
+
+ if (! check_reference_only)
+ {
+ check_one(name, result, expected);
+ }
+
+ // NOTE: in some cases it probably will be necessary to normalize
+ // the differences between the result and expected result
+ double ref_diff = bg::math::abs(result - reference);
+ double ref_max = (std::max)(bg::math::abs(result), bg::math::abs(reference));
+ bool is_ref_close = ref_diff <= reference_error || ref_diff <= reference_error * ref_max;
+ BOOST_CHECK_MESSAGE((is_ref_close),
+ id << std::setprecision(20) << "result {" << result << "} and reference {" << reference << "} not close enough.");
+}
+
+void check_one(double result, double expected, double reference, double reference_error,
+ bool normalize = false, bool check_reference_only = false)
+{
+ check_one("", result, expected, reference, reference_error, normalize, check_reference_only);
+}
+
+#endif // BOOST_GEOMETRY_TEST_FORMULA_HPP
diff --git a/src/boost/libs/geometry/test/formulas/vertex_longitude.cpp b/src/boost/libs/geometry/test/formulas/vertex_longitude.cpp
new file mode 100644
index 000000000..1aadc4a35
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/vertex_longitude.cpp
@@ -0,0 +1,154 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include "test_formula.hpp"
+#include "vertex_longitude_cases.hpp"
+
+#include <boost/geometry/formulas/vertex_latitude.hpp>
+#include <boost/geometry/formulas/vertex_longitude.hpp>
+#include <boost/geometry/formulas/vincenty_inverse.hpp>
+#include <boost/geometry/formulas/thomas_inverse.hpp>
+#include <boost/geometry/formulas/andoyer_inverse.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/util/math.hpp>
+
+#define BOOST_GEOMETRY_TEST_DEBUG
+
+namespace bg = boost::geometry;
+
+template<typename CT>
+CT test_vrt_lon_sph(CT lon1r,
+ CT lat1r,
+ CT lon2r,
+ CT lat2r)
+{
+ CT a1 = bg::formula::spherical_azimuth(lon1r, lat1r, lon2r, lat2r);
+
+ typedef bg::model::point<CT, 2,
+ bg::cs::spherical_equatorial<bg::radian> > point;
+
+ bg::model::segment<point> segment(point(lon1r, lat1r),
+ point(lon2r, lat2r));
+ bg::model::box<point> box;
+ bg::envelope(segment, box);
+
+ CT vertex_lat;
+ CT lat_sum = lat1r + lat2r;
+ if (lat_sum > CT(0))
+ {
+ vertex_lat = bg::get_as_radian<bg::max_corner, 1>(box);
+ } else {
+ vertex_lat = bg::get_as_radian<bg::min_corner, 1>(box);
+ }
+
+ bg::strategy::azimuth::spherical<> azimuth;
+
+ return bg::formula::vertex_longitude
+ <CT, bg::spherical_equatorial_tag>::
+ apply(lon1r, lat1r,
+ lon2r, lat2r,
+ vertex_lat,
+ a1,
+ azimuth);
+}
+
+template
+<
+ template <typename, bool, bool, bool, bool, bool> class FormulaPolicy,
+ typename CT
+ >
+CT test_vrt_lon_geo(CT lon1r,
+ CT lat1r,
+ CT lon2r,
+ CT lat2r)
+{
+ // WGS84
+ bg::srs::spheroid<CT> spheroid(6378137.0, 6356752.3142451793);
+
+ typedef FormulaPolicy<CT, false, true, false, false, false> formula;
+ CT a1 = formula::apply(lon1r, lat1r, lon2r, lat2r, spheroid).azimuth;
+
+ typedef bg::model::point<CT, 2, bg::cs::geographic<bg::radian> > geo_point;
+
+ bg::model::segment<geo_point> segment(geo_point(lon1r, lat1r),
+ geo_point(lon2r, lat2r));
+ bg::model::box<geo_point> box;
+ bg::envelope(segment, box);
+
+ CT vertex_lat;
+ CT lat_sum = lat1r + lat2r;
+ if (lat_sum > CT(0))
+ {
+ vertex_lat = bg::get_as_radian<bg::max_corner, 1>(box);
+ } else {
+ vertex_lat = bg::get_as_radian<bg::min_corner, 1>(box);
+ }
+
+ bg::strategy::azimuth::geographic<> azimuth_geographic;
+
+ return bg::formula::vertex_longitude
+ <CT, bg::geographic_tag>::apply(lon1r, lat1r,
+ lon2r, lat2r,
+ vertex_lat,
+ a1,
+ azimuth_geographic);
+
+}
+
+void test_all(expected_results const& results)
+{
+ double const d2r = bg::math::d2r<double>();
+
+ double lon1r = results.p1.lon * d2r;
+ double lat1r = results.p1.lat * d2r;
+ double lon2r = results.p2.lon * d2r;
+ double lat2r = results.p2.lat * d2r;
+
+ if(lon1r > lon2r)
+ {
+ std::swap(lon1r, lon2r);
+ std::swap(lat1r, lat2r);
+ }
+
+ double res_an = test_vrt_lon_geo<bg::formula::andoyer_inverse>
+ (lon1r, lat1r, lon2r, lat2r);
+ double res_th = test_vrt_lon_geo<bg::formula::thomas_inverse>
+ (lon1r, lat1r, lon2r, lat2r);
+ double res_vi = test_vrt_lon_geo<bg::formula::vincenty_inverse>
+ (lon1r, lat1r, lon2r, lat2r);
+ double res_sh = test_vrt_lon_sph(lon1r, lat1r, lon2r, lat2r);
+
+ bg::math::normalize_longitude<bg::radian, double>(res_an);
+ bg::math::normalize_longitude<bg::radian, double>(res_th);
+ bg::math::normalize_longitude<bg::radian, double>(res_vi);
+ bg::math::normalize_longitude<bg::radian, double>(res_sh);
+
+ check_one(res_an, results.andoyer * d2r, res_vi, 0.001);
+ check_one(res_th, results.thomas * d2r, res_vi, 0.01);//in some tests thomas gives low accuracy
+ check_one(res_vi, results.vincenty * d2r, res_vi, 0.0000001);
+ check_one(res_sh, results.spherical * d2r, res_vi, 1);
+}
+
+int test_main(int, char*[])
+{
+
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all(expected[i]);
+ }
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp b/src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp
new file mode 100644
index 000000000..2357c2b18
--- /dev/null
+++ b/src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp
@@ -0,0 +1,457 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_VERTEX_LONGITUDE_CASES_HPP
+#define BOOST_GEOMETRY_TEST_VERTEX_LONGITUDE_CASES_HPP
+
+struct coordinates
+{
+ double lon;
+ double lat;
+};
+
+struct expected_result
+{
+ double lon;
+ double lat;
+};
+
+struct expected_results
+{
+ coordinates p1;
+ coordinates p2;
+ double andoyer;
+ double thomas;
+ double vincenty;
+ double spherical;
+};
+
+expected_results expected[] =
+{
+ { //ascenting segments (wrt pole)
+ { 1, 1 },{ 100, 2 },
+ 66.25553538,
+ 66.25594187,
+ 66.25594273,
+ 66.39744208
+ },{
+ { 1, 1 },{ 90, 2 },
+ 64.09051435,
+ 64.09082287,
+ 64.09082352,
+ 64.24414382
+ },{
+ { 0, 1 },{ 50, 1 },
+ 24.99994265,
+ 24.99999906,
+ 25,
+ 25
+ },{
+ { 0, 1 },{ 50, 1.1 },
+ 30.79039009,
+ 30.79049758,
+ 30.79049828,
+ 30.83209056
+ },{
+ { 0, 1 },{ 50, 1.2 },
+ 35.95625867,
+ 35.95640445,
+ 35.95640493,
+ 36.0343576
+ },{
+ { 0, 1 },{ 50, 1.3 },
+ 40.52204781,
+ 40.52222064,
+ 40.52222094,
+ 40.63120292
+ },{
+ { 0, 1 },{ 50, 1.4 },
+ 44.53768967,
+ 44.53788045,
+ 44.53788061,
+ 44.6729585
+ },{
+ { 0, 1 },{ 50, 1.5 },
+ 48.06382018,
+ 48.0640219,
+ 48.06402195,
+ 48.22088385
+ },{
+ { 0, 1 },{ 50, 1.6 },
+ 50,
+ 50,
+ 50,
+ 50
+ },{ //descending segment (wrt pole)
+ { 50, 1 },{ 0, 1.1 },
+ 19.20950181,
+ 19.20950054,
+ 19.20950172,
+ 19.16790944
+ },{
+ { 50, 1 },{ 0, 1.2 },
+ 14.04365003,
+ 14.04359367,
+ 14.04359507,
+ 13.9656424
+ },{
+ { 50, 1 },{ 0, 1.3 },
+ 9.477883847,
+ 9.477777483,
+ 9.477779056,
+ 9.368797077
+ },{
+ { 50, 1 },{ 0, 1.4 },
+ 5.462267984,
+ 5.462117673,
+ 5.462119386,
+ 5.327041497
+ },{
+ { 50, 1 },{ 0, 1.5 },
+ 1.936164363,
+ 1.935976226,
+ 1.93597805,
+ 1.779116148
+ },{
+ { 3, 5 },{ 150, 0},
+ 60.29182988,
+ 60.29785309,
+ 60.29785255,
+ 60
+ },{
+ { 3, 5 },{ 150, 0.5},
+ 63.11344576,
+ 63.11900045,
+ 63.11899891,
+ 62.87000766
+ },{
+ { 3, 5 },{ 150, 1},
+ 65.51880171,
+ 65.52391866,
+ 65.52391623,
+ 65.31813729
+ },{
+ { 3, 5 },{ 150, 5},
+ 76.49727275,
+ 76.50000657,
+ 76.5,
+ 76.5
+ },{ //segments parallel to equator
+ { 0, 1 },{ 4, 1 },
+ 1.999999973,
+ 1.999999925,
+ 2,
+ 2
+ },{
+ { 0, 1 },{ 10, 1 },
+ 4.999999569,
+ 4.999999812,
+ 5,
+ 5
+ },{
+ { 0, 1 },{ 60, 1 },
+ 29.9998978,
+ 29.99999887,
+ 30,
+ 30
+ },{
+ { 0, 1 },{ 90, 1 },
+ 44.99960266,
+ 45.22272756,//thomas low accuracy
+ 45,
+ 45
+ },{
+ { 0, 1 },{ 120, 1 },
+ 59.99878311,
+ 59.99999778,
+ 60,
+ 60
+ },{
+ { 0, 1 },{ 180, 1 },
+ 90,
+ 90,
+ 90,
+ 90
+ },{
+ { 0, 1 },{ 270, 1 },
+ -44.99960266,
+ -45.08931472,//thomas low accuracy
+ -45,
+ -45
+ },{
+ { 0, 1 },{ 290, 1 },
+ -34.9998314,
+ -34.99999868,
+ -35,
+ -35
+ },{
+ { 0, 1 },{ 150, 1 },
+ 74.99598515,
+ 74.99999794,
+ 75,
+ 75
+ },{
+ { 0, 1 },{ 180, 1 },
+ 90,
+ 90,
+ 90,
+ 90
+ },{ //in equator vertex is any point on segment
+ { 1, 0 },{ 10, 0 },
+ 1,
+ 1,
+ 1,
+ 1
+ },{// one point on equator (descending)
+ { 150, 0},{ 3, 1 },
+ 60.29513726,
+ 60.30158943,
+ 60.3015947,
+ 60
+ },{// one point on equator (ascending)
+ { 3, 0 },{ 150, 1},
+ 92.69840523,
+ 92.6984053,
+ 92.6984053,
+ 93
+ },{ //meridian
+ { 1, 1 },{ 1, 2 },
+ 1,
+ 1,
+ 1,
+ 1
+ },{ //nearly meridian
+ { 1, 1 },{ 1.001, 2 },
+ 1.001,
+ 1.001,
+ 1.001,
+ 1.001
+ },{ //vertex is a segment's endpoint
+ { 1, 1 },{ 10, 2 },
+ 10,
+ 10,
+ 10,
+ 10
+ },{
+ { 10, 1 },{ 1, 2 },
+ 1,
+ 1,
+ 1,
+ 1
+ },{ //South hemisphere, ascending
+ { 0, -1 },{ 50, -1.4 },
+ 44.53768958,
+ 44.53788035,
+ 44.53788052,
+ 44.6729585
+ },{ //South hemisphere, descending
+ { 0, -1.5 },{ 50, -1 },
+ 1.936164356,
+ 1.935976219,
+ 1.935978042,
+ 1.779116148
+ },{ //South hemisphere, same latitude
+ { 0, -1 },{ 50, -1 },
+ 24.99994261,
+ 24.99999901,
+ 24.99999995,
+ 25
+ },{//Both hemispheres, vertex on the northern
+ //A desc vertex north
+ { 3, 5 },{ 150, -3},
+ 27.357069,
+ 27.36422922,
+ 27.36423549,
+ 26.74999989
+ },{//B asc vertex north
+ { 3, -3 },{ 150, 5},
+ 125.6403436,
+ 125.6357677,
+ 125.6357659,
+ 126.2500001
+ },{//C desc vertex south
+ { 3, -5 },{ 150, 3},
+ 27.3570679,
+ 27.36422812,
+ 27.36423439,
+ 26.74999989
+ },{//D asc vertex south
+ { 3, 3 },{ 150, -5},
+ 125.6403423,
+ 125.6357664,
+ 125.6357645,
+ 126.2500001
+ },{//E asc vertex south
+ { 3, 3 },{ 184, -5},
+ -88.00743796,
+ -88.0660268,
+ -88.0558747,
+ -88.49315894
+ },{
+ { 3, 5 },{ 150, -3.5},
+ 17.96722293,
+ 17.97322407,
+ 17.97323051,
+ 17.3742464
+ },{
+ { 3, 5 },{ 150, -1},
+ 52.9706038,
+ 52.97759463,
+ 52.9775964,
+ 52.56504545
+ },{ //Both hemispheres, vertex on the southern
+ { 3, 3},{ 5, -5},
+ 5,
+ 5,
+ 5,
+ 5
+ },{
+ { 3, -5 },{ 150, 1}, //symmetric to { 3, 5 },{ 150, -1}
+ 52.97060093,
+ 52.97759176,
+ 52.97759353,
+ 52.56504545
+ },{// fix p1 lon, lat and p2 lon and vary p2 lat
+ { 3, 5 },{ 150, 1},
+ 65.51880171,
+ 65.52391866,
+ 65.52391623,
+ 65.31813729
+ },{
+ { 3, 5 },{ 150, 0},
+ 60.29182988,
+ 60.29785309,
+ 60.29785255,
+ 60
+ },{
+ { 3, 5 },{ 150, -0.1},
+ 59.66911673,
+ 59.67523649,
+ 59.67523616,
+ 59.36690727
+ },{
+ { 3, 5 },{ 150, -1},
+ 52.9706038,
+ 52.97759463,
+ 52.9775964,
+ 52.56504545
+ },{
+ { 3, 5 },{ 150, -4.15},
+ 4.481947557,
+ 4.485467841,
+ 4.485473295,
+ 3.981178967
+ },{
+ { 3, 5 },{ 150, -4.2},
+ 3,
+ 3,
+ 3,
+ 3
+ },{//symmetry of geodesics:
+ // (i) case A same as C and B same as D
+ // (ii) longitude diff between vertex and p2 in A, C equals
+ // longitude diff between vertex and p1 in B, D by symmetry
+ // case (A)
+ { 0, 5 },{ 30, 5.5},
+ 25.06431998,
+ 25.0644277,
+ 25.06442787,
+ 25.13253724
+ },{// case (B)
+ { 0, 5.5 },{ 30, 5},
+ 4.935667094,
+ 4.935571216,
+ 4.93557213,
+ 4.867462762
+ },{// case (C)
+ { 0, -5 },{ 30, -5.5},
+ 25.06431885,
+ 25.06442657,
+ 25.06442674,
+ 25.13253724
+ },{// case (D)
+ { 0, -5.5 },{ 30, -5},
+ 4.935666841,
+ 4.935570963,
+ 4.935571877,
+ 4.867462762
+ },{//crossing meridian
+ { -10, 1 },{ 50, 1.1},
+ 24.68113946,
+ 24.68127641,
+ 24.68127733,
+ 24.71605263
+ },{
+ { 350, 1 },{ 50, 1.1},
+ 24.68113946,
+ 24.68127641,
+ 24.68127733,
+ 24.71605263
+ },{//crossing antimeridian
+ { 130, 1 },{ 190, 1.1},
+ 164.6811395,
+ 164.6812764,
+ 164.6812773,
+ 164.7160526
+ },{
+ { 130, 1 },{ -170, 1.1},
+ 164.6811395,
+ 164.6812764,
+ 164.6812773,
+ 164.7160526
+ },{//crossing meridian both hemispheres
+ { -10, -5 },{ 150, 1},
+ 55.61285835,
+ 55.62727853,
+ 55.62725182,
+ 55.19943725
+ },{
+ { 350, -5 },{ 150, 1},
+ 55.6243632,
+ 55.6272619,
+ 55.627257,
+ 55.1994373
+ },{//crossing anti-meridian both hemispheres
+ { 90, -5 },{ 210, 1},
+ 109.4997596,
+ 109.5011987,
+ 109.5012031,
+ 109.1354089
+ },{
+ { 90, -5 },{ -150, 1},
+ 109.4997596,
+ 109.5011987,
+ 109.5012031,
+ 109.1354089
+ },{
+ { -150, -5 },{ 90, 1},
+ -169.4997596,
+ -169.5011987,
+ -169.5012031,
+ -169.1354089
+ },{
+ { 90, 1 },{ 210, -5},
+ -169.5008004,
+ -169.5012037,
+ -169.501204,
+ -169.1354089
+ },{
+ { 0, 1 },{ 120, -5},
+ 100.4991996,
+ 100.4987963,
+ 100.498796,
+ 100.8645911
+ }
+};
+
+size_t const expected_size = sizeof(expected) / sizeof(expected_results);
+
+#endif // BOOST_GEOMETRY_TEST_VERTEX_LONGITUDE_CASES_HPP
diff --git a/src/boost/libs/geometry/test/from_wkt.hpp b/src/boost/libs/geometry/test/from_wkt.hpp
new file mode 100644
index 000000000..2d5f7bac6
--- /dev/null
+++ b/src/boost/libs/geometry/test/from_wkt.hpp
@@ -0,0 +1,28 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Tests
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_FROM_WKT_HPP
+#define BOOST_GEOMETRY_TEST_FROM_WKT_HPP
+
+#include <string>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Geometry>
+inline Geometry from_wkt(std::string const& wkt)
+{
+ Geometry result;
+ boost::geometry::read_wkt(wkt, result);
+ return result;
+}
+
+#endif // BOOST_GEOMETRY_TEST_FROM_WKT_HPP
diff --git a/src/boost/libs/geometry/test/geometries/Jamfile b/src/boost/libs/geometry/test/geometries/Jamfile
new file mode 100644
index 000000000..89a2b3ccb
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/Jamfile
@@ -0,0 +1,40 @@
+# Boost.Geometry
+#
+# Copyright (c) 2007-2019 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2019 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2019 Mateusz Loskot, London, UK.
+# Copyright (c) 2014-2019 Adam Wulkiewicz, Lodz, Poland.
+
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-geometries
+ :
+ [ run adapted.cpp : : : : geometries_adapted ]
+ [ run boost_array_as_point.cpp : : : : geometries_boost_array_as_point ]
+ [ run boost_fusion.cpp : : : : geometries_boost_fusion ]
+ [ run boost_polygon.cpp : : : : geometries_boost_polygon ]
+ [ run boost_range.cpp : : : : geometries_boost_range ]
+ [ run boost_tuple.cpp : : : : geometries_boost_tuple ]
+ [ run box.cpp : : : : geometries_box ]
+ #[ compile-fail custom_linestring.cpp
+ # : # requirements
+ # <define>TEST_FAIL_CLEAR
+ # : # target name
+ # geometries_custom_linestring_test_fail_clear
+ #]
+ [ run custom_linestring.cpp : : : : geometries_custom_linestring ]
+ [ run initialization.cpp : : : : geometries_initialization ]
+ [ run linestring.cpp : : : : geometries_linestring ]
+ [ run multi_linestring.cpp : : : : geometries_multi_linestring ]
+ [ run multi_point.cpp : : : : geometries_multi_point ]
+ [ run multi_polygon.cpp : : : : geometries_multi_polygon ]
+ [ run point.cpp : : : : geometries_point ]
+ [ run point_xy.cpp : : : : geometries_point_xy ]
+ [ run point_xyz.cpp : : : : geometries_point_xyz ]
+ [ run polygon.cpp : : : : geometries_polygon ]
+ [ run ring.cpp : : : : geometries_ring ]
+ [ run segment.cpp : : : : geometries_segment ]
+ [ run infinite_line.cpp : : : : geometries_infinite_line ]
+ ;
diff --git a/src/boost/libs/geometry/test/geometries/adapted.cpp b/src/boost/libs/geometry/test/geometries/adapted.cpp
new file mode 100644
index 000000000..173314396
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/adapted.cpp
@@ -0,0 +1,112 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <deque>
+#include <vector>
+
+#include <geometry_test_common.hpp>
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <test_common/test_point.hpp>
+
+#define BOOST_GEOMETRY_TEST_RING
+
+
+
+#if defined(BOOST_GEOMETRY_TEST_RING)
+
+ #include <boost/geometry/geometries/register/ring.hpp>
+ #include <boost/geometry/geometries/concepts/ring_concept.hpp>
+
+ BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(std::vector)
+ BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(std::deque)
+
+#elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT)
+
+ #include <boost/geometry/geometries/register/multi_point.hpp>
+ #include <boost/geometry/geometries/concepts/multi_point_concept.hpp>
+
+ BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(std::vector)
+ BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(std::deque)
+
+#else
+
+ #include <boost/geometry/geometries/register/linestring.hpp>
+ #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
+
+ BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+ BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+#endif
+
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+// ----------------------------------------------------------------------------
+
+template <typename G>
+void test_geometry(G const& geometry, std::size_t expected_size = 0)
+{
+#if defined(BOOST_GEOMETRY_TEST_RING)
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstRing<G>) );
+#elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT)
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiPoint<G>) );
+#else
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<G>) );
+#endif
+
+ typedef typename bg::point_type<G>::type P;
+ typedef typename bg::coordinate_type<P>::type C;
+ boost::ignore_unused<P, C>();
+
+ // Check range-like behaviour
+ BOOST_CHECK_EQUAL(boost::size(geometry), expected_size);
+}
+
+template <typename P>
+void test_all()
+{
+ test_geometry(std::vector<P>());
+ test_geometry(std::deque<P>());
+ //test_geometry(std::list<P>());
+
+ /***
+ double vertices[][3] = {
+ {-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1},
+ {-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}
+ };
+
+ test_geometry(vertices, 8);
+ ***/
+}
+
+int test_main(int, char* [])
+{
+ test_all<test::test_point>();
+ test_all<boost::tuple<float, float> >();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<long double, 2, bg::cs::cartesian> >();
+
+ test_all<boost::tuple<float, float, float> >();
+ test_all<bg::model::point<double, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<long double, 3, bg::cs::cartesian> >();
+
+ test_all<boost::tuple<float, float, float, float, float> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/boost_array_as_point.cpp b/src/boost/libs/geometry/test/geometries/boost_array_as_point.cpp
new file mode 100644
index 000000000..1cd49bf60
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/boost_array_as_point.cpp
@@ -0,0 +1,50 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010 Alfredo Correa
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+#include <geometry_test_common.hpp>
+
+#include<boost/geometry/geometry.hpp>
+#include<boost/geometry/geometries/adapted/boost_array.hpp>
+#include<boost/geometry/geometries/adapted/c_array.hpp>
+#include<boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include<iostream>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include<boost/geometry/geometries/adapted/std_array.hpp>
+BOOST_GEOMETRY_REGISTER_STD_ARRAY_CS(cs::cartesian)
+#endif //BOOST_NO_CXX11_HDR_ARRAY
+
+int test_main(int, char* [])
+{
+ bg::model::point<double, 3, bg::cs::cartesian> p1(1,2,3);
+ double p2[3] = {4,5,6};
+ boost::tuple<double, double, double> p3(7,8,9);
+ boost::array<double, 3> p4 = {{10,11,12}};
+ std::clog << bg::distance(p1, p2) << std::endl;
+ std::clog << bg::distance(p2, p3) << std::endl;
+ std::clog << bg::distance(p3, p4) << std::endl;
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::array<double, 3> p5 = {13,14,15};
+#else
+ std::array<double, 3> p5; p5[0] = 13; p5[1] = 14; p5[2] = 15;
+#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::clog << bg::distance(p4, p5) << std::endl;
+#endif //BOOST_NO_CXX11_HDR_ARRAY
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/geometries/boost_fusion.cpp b/src/boost/libs/geometry/test/geometries/boost_fusion.cpp
new file mode 100644
index 000000000..38a4a05ff
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/boost_fusion.cpp
@@ -0,0 +1,71 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright Akira Takahashi 2011
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/fusion/include/adapt_struct_named.hpp>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/adapted/boost_fusion.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <iostream>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+struct for_fusion_2d
+{
+ float x,y;
+};
+struct for_fusion_3d
+{
+ double x,y,z;
+};
+
+BOOST_FUSION_ADAPT_STRUCT(for_fusion_2d, (float, x) (float, y))
+BOOST_FUSION_ADAPT_STRUCT(for_fusion_3d, (double, x) (double, y) (double, z))
+
+
+void test_2d()
+{
+ bg::model::point<double, 2, bg::cs::cartesian> p1(1, 2);
+ double p2[2] = {3, 4};
+ boost::tuple<double, double> p3(5,6);
+
+ for_fusion_2d pf = {7, 8};
+
+ BOOST_CHECK_CLOSE(bg::distance(p1, pf), 8.4852813742385695, 0.01);
+ BOOST_CHECK_CLOSE(bg::distance(p2, pf), 5.6568542494923806, 0.01);
+ BOOST_CHECK_CLOSE(bg::distance(p3, pf), 2.82843, 0.01);
+}
+
+void test_3d()
+{
+ bg::model::point<double, 3, bg::cs::cartesian> p1(1, 2, 3);
+ double p2[3] = {4, 5, 6};
+ boost::tuple<double, double, double> p3(7, 8, 9);
+
+ for_fusion_3d pf = {10, 11, 12};
+
+ BOOST_CHECK_CLOSE(bg::distance(p1, pf), 15.58845726811, 0.01);
+ BOOST_CHECK_CLOSE(bg::distance(p2, pf), 10.392304845413, 0.01);
+ BOOST_CHECK_CLOSE(bg::distance(p3, pf), 5.196152, 0.01);
+}
+
+int test_main(int, char* [])
+{
+ test_2d();
+ test_3d();
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/geometries/boost_polygon.cpp b/src/boost/libs/geometry/test/geometries/boost_polygon.cpp
new file mode 100644
index 000000000..c535b22d1
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/boost_polygon.cpp
@@ -0,0 +1,174 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// geometry::num_points does not accept the ring_proxy for adaptation, like
+// centroid and probably many more algorithms. TODO: fix that. Until then we
+// define it such that num_points is not called.
+#define BOOST_GEOMETRY_EMPTY_INPUT_NO_THROW
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+
+#include <boost/geometry/geometries/adapted/boost_polygon/point.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/box.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/ring.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/polygon.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <iostream>
+
+template <typename T>
+void fill_polygon_with_two_holes(boost::polygon::polygon_with_holes_data<T>& boost_polygon_polygon)
+{
+ std::vector<boost::polygon::point_data<T> > point_vector;
+ point_vector.push_back(boost::polygon::point_data<T>(0, 0));
+ point_vector.push_back(boost::polygon::point_data<T>(0, 10));
+ point_vector.push_back(boost::polygon::point_data<T>(10, 10));
+ point_vector.push_back(boost::polygon::point_data<T>(10, 0));
+ point_vector.push_back(boost::polygon::point_data<T>(0, 0));
+ boost_polygon_polygon.set(point_vector.begin(), point_vector.end());
+
+
+ std::vector<boost::polygon::polygon_data<T> > holes;
+ holes.resize(2);
+
+ {
+ std::vector<boost::polygon::point_data<T> > point_vector;
+ point_vector.push_back(boost::polygon::point_data<T>(1, 1));
+ point_vector.push_back(boost::polygon::point_data<T>(2, 1));
+ point_vector.push_back(boost::polygon::point_data<T>(2, 2));
+ point_vector.push_back(boost::polygon::point_data<T>(1, 2));
+ point_vector.push_back(boost::polygon::point_data<T>(1, 1));
+ holes[0].set(point_vector.begin(), point_vector.end());
+ }
+
+ {
+ std::vector<boost::polygon::point_data<T> > point_vector;
+ point_vector.push_back(boost::polygon::point_data<T>(3, 3));
+ point_vector.push_back(boost::polygon::point_data<T>(4, 3));
+ point_vector.push_back(boost::polygon::point_data<T>(4, 4));
+ point_vector.push_back(boost::polygon::point_data<T>(3, 4));
+ point_vector.push_back(boost::polygon::point_data<T>(3, 3));
+ holes[1].set(point_vector.begin(), point_vector.end());
+ }
+ boost_polygon_polygon.set_holes(holes.begin(), holes.end());
+}
+
+
+template <typename T>
+void test_coordinate_type()
+{
+ // 1a: Check if Boost.Polygon's point fulfills Boost.Geometry's point concept
+ bg::concepts::check<boost::polygon::point_data<T> >();
+
+ // 1b: use a Boost.Polygon point in Boost.Geometry, calc. distance with two point types
+ boost::polygon::point_data<T> boost_polygon_point(1, 2);
+
+ typedef bg::model::point<T, 2, bg::cs::cartesian> bg_point_type;
+ bg_point_type boost_geometry_point(3, 4);
+ BOOST_CHECK_EQUAL(bg::distance(boost_polygon_point, boost_geometry_point),
+ 2 * std::sqrt(2.0));
+
+ // 2a: Check if Boost.Polygon's box fulfills Boost.Geometry's box concept
+ bg::concepts::check<boost::polygon::rectangle_data<T> >();
+
+ // 2b: use a Boost.Polygon rectangle in Boost.Geometry, compare with boxes
+ boost::polygon::rectangle_data<T> boost_polygon_box;
+ bg::model::box<bg_point_type> boost_geometry_box;
+
+ bg::assign_values(boost_polygon_box, 0, 1, 5, 6);
+ bg::assign_values(boost_geometry_box, 0, 1, 5, 6);
+ T boost_polygon_area = bg::area(boost_polygon_box);
+ T boost_geometry_area = bg::area(boost_geometry_box);
+ T boost_polygon_area_by_boost_polygon = boost::polygon::area(boost_polygon_box);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_geometry_area);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_polygon_area_by_boost_polygon);
+
+ // 3a: Check if Boost.Polygon's polygon fulfills Boost.Geometry's ring concept
+ bg::concepts::check<boost::polygon::polygon_data<T> >();
+
+ // 3b: use a Boost.Polygon polygon (ring)
+ boost::polygon::polygon_data<T> boost_polygon_ring;
+ {
+ // Filling it is a two-step process using Boost.Polygon
+ std::vector<boost::polygon::point_data<T> > point_vector;
+ point_vector.push_back(boost::polygon::point_data<T>(0, 0));
+ point_vector.push_back(boost::polygon::point_data<T>(0, 3));
+ point_vector.push_back(boost::polygon::point_data<T>(4, 0));
+ point_vector.push_back(boost::polygon::point_data<T>(0, 0));
+ boost_polygon_ring.set(point_vector.begin(), point_vector.end());
+ }
+
+ // Boost-geometry ring
+ bg::model::ring<bg_point_type> boost_geometry_ring;
+ {
+ boost_geometry_ring.push_back(bg_point_type(0, 0));
+ boost_geometry_ring.push_back(bg_point_type(0, 3));
+ boost_geometry_ring.push_back(bg_point_type(4, 0));
+ boost_geometry_ring.push_back(bg_point_type(0, 0));
+ }
+ boost_polygon_area = bg::area(boost_polygon_ring);
+ boost_geometry_area = bg::area(boost_geometry_ring);
+ boost_polygon_area_by_boost_polygon = boost::polygon::area(boost_polygon_ring);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_geometry_area);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_polygon_area_by_boost_polygon);
+
+ // Check mutable ring
+ std::string wkt = "POLYGON((0 0,0 10,10 10,10 0,0 0))";
+ bg::read_wkt(wkt, boost_polygon_ring);
+ bg::read_wkt(wkt, boost_geometry_ring);
+ boost_polygon_area = bg::area(boost_polygon_ring);
+ boost_geometry_area = bg::area(boost_geometry_ring);
+ boost_polygon_area_by_boost_polygon = boost::polygon::area(boost_polygon_ring);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_geometry_area);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_polygon_area_by_boost_polygon);
+
+ // 4a: Boost.Polygon's polygon with holes
+ boost::polygon::polygon_with_holes_data<T> boost_polygon_polygon;
+ fill_polygon_with_two_holes(boost_polygon_polygon);
+
+ // Using Boost.Polygon
+ boost_polygon_area = bg::area(boost_polygon_polygon);
+ boost_polygon_area_by_boost_polygon = boost::polygon::area(boost_polygon_polygon);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_polygon_area_by_boost_polygon);
+
+ wkt = "POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,2 1,2 2,1 2,1 1),(3 3,4 3,4 4,3 4,3 3))";
+
+ bg::model::polygon<bg_point_type> boost_geometry_polygon;
+ bg::read_wkt(wkt, boost_geometry_polygon);
+
+ boost_geometry_area = bg::area(boost_geometry_polygon);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_geometry_area);
+
+ bg::clear(boost_polygon_polygon);
+ bg::read_wkt(wkt, boost_polygon_polygon);
+ boost_geometry_area = bg::area(boost_polygon_polygon);
+ BOOST_CHECK_EQUAL(boost_polygon_area, boost_geometry_area);
+
+ std::ostringstream out;
+ out << bg::wkt(boost_polygon_polygon);
+ BOOST_CHECK_EQUAL(wkt, out.str());
+
+}
+
+int test_main(int, char* [])
+{
+ test_coordinate_type<int>();
+ //test_coordinate_type<float>(); // compiles, but "BOOST_CHECK_EQUAL" fails
+ test_coordinate_type<double>();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/boost_polygon_overlay.cpp b/src/boost/libs/geometry/test/geometries/boost_polygon_overlay.cpp
new file mode 100644
index 000000000..f7db77353
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/boost_polygon_overlay.cpp
@@ -0,0 +1,122 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/point.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/box.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/ring.hpp>
+#include <boost/geometry/geometries/adapted/boost_polygon/polygon.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include<iostream>
+
+template <typename T>
+void test_overlay_using_boost_polygon(std::string const& case_id, std::string const& wkt_p, std::string const& wkt_q)
+{
+ typedef boost::polygon::polygon_set_data<T> polygon_set;
+
+ polygon_set p, q;
+ polygon_set out_i, out_u;
+
+ {
+ // Read polygons, conveniently using Boost.Geometry
+ typedef boost::geometry::model::multi_polygon
+ <
+ boost::polygon::polygon_with_holes_data<T>
+ > mp_type;
+ mp_type mp, mq;
+
+ bg::read_wkt(wkt_p, mp);
+ bg::read_wkt(wkt_q, mq);
+
+ p.insert(mp.begin(), mp.end());
+ q.insert(mq.begin(), mq.end());
+ }
+
+ {
+ using namespace boost::polygon::operators;
+ out_i = p & q;
+ out_u = p | q;
+ }
+
+ double area_p = boost::polygon::area(p);
+ double area_q = boost::polygon::area(q);
+ double area_i = boost::polygon::area(out_i);
+ double area_u = boost::polygon::area(out_u);
+
+ double sum = area_p + area_q - area_u - area_i;
+ BOOST_CHECK_MESSAGE(abs(sum) < 0.001,
+ "Overlay error\n"
+ << "Boost.Polygon " << case_id
+ << " area p: " << area_p
+ << " area q: " << area_q
+ << " area i: " << area_i
+ << " area u: " << area_u
+ << " sum: " << sum
+ );
+}
+
+
+template <typename T>
+void test_overlay_using_boost_geometry(std::string const& case_id, std::string const& wkt_p, std::string const& wkt_q)
+{
+ typedef boost::geometry::model::multi_polygon
+ <
+ boost::geometry::model::polygon
+ <
+ boost::geometry::model::d2::point_xy<T>
+ >
+ > mp_type;
+
+ // Read it using Boost.Geometry
+ mp_type p, q, out_i, out_u;
+
+ boost::geometry::read_wkt(wkt_p, p);
+ boost::geometry::read_wkt(wkt_q, q);
+
+ boost::geometry::intersection(p, q, out_i);
+ boost::geometry::union_(p, q, out_u);
+
+ double area_p = boost::geometry::area(p);
+ double area_q = boost::geometry::area(q);
+ double area_i = boost::geometry::area(out_i);
+ double area_u = boost::geometry::area(out_u);
+
+ double sum = area_p + area_q - area_u - area_i;
+ BOOST_CHECK_MESSAGE(abs(sum) < 0.001,
+ "Overlay error\n"
+ << "Boost.Geometry " << case_id
+ << " area p: " << area_p
+ << " area q: " << area_q
+ << " area i: " << area_i
+ << " area u: " << area_u
+ << " sum: " << sum
+ );
+}
+
+template <typename T>
+void test_overlay(std::string const& case_id, std::string const& wkt_p, std::string const& wkt_q)
+{
+ test_overlay_using_boost_polygon<T>(case_id, wkt_p, wkt_q);
+ test_overlay_using_boost_geometry<T>(case_id, wkt_p, wkt_q);
+}
+
+
+int test_main(int, char* [])
+{
+ test_overlay<int>("case 1", "MULTIPOLYGON(((100 900,0 800,100 800,100 900)),((200 700,100 800,100 700,200 700)),((500 400,400 400,400 300,500 400)),((600 300,500 200,600 200,600 300)),((600 700,500 800,500 700,600 700)),((700 500,600 500,600 400,700 500)),((900 300,800 400,800 300,900 300)))",
+ "MULTIPOLYGON(((200 900,100 1000,100 800,200 800,200 900)),((400 500,300 600,300 500,400 500)),((500 900,400 800,500 800,500 900)),((600 800,500 700,600 700,600 800)),((700 500,600 400,700 400,700 500)),((1000 1000,900 900,1000 900,1000 1000)))");
+ test_overlay<int>("case 2", "MULTIPOLYGON(((200 400,100 400,100 300,200 400)),((300 100,200 100,200 0,300 0,300 100)),((600 700,500 700,500 600,600 700)),((700 300,600 300,600 200,700 300)),((800 500,700 600,700 500,800 500)),((900 800,800 700,900 700,900 800)),((1000 200,900 100,1000 100,1000 200)),((1000 800,900 900,900 800,1000 800)))",
+ "MULTIPOLYGON(((200 800,100 800,100 700,200 700,200 800)),((400 200,300 100,400 100,400 200)),((400 800,300 700,400 700,400 800)),((700 100,600 0,700 0,700 100)),((700 200,600 200,600 100,700 200)),((900 200,800 200,800 0,900 0,900 200)),((1000 300,900 200,1000 200,1000 300)))");
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/boost_range.cpp b/src/boost/libs/geometry/test/geometries/boost_range.cpp
new file mode 100644
index 000000000..d2a2ff5d9
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/boost_range.cpp
@@ -0,0 +1,123 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_range/adjacent_filtered.hpp>
+#include <boost/geometry/geometries/adapted/boost_range/filtered.hpp>
+#include <boost/geometry/geometries/adapted/boost_range/reversed.hpp>
+#include <boost/geometry/geometries/adapted/boost_range/strided.hpp>
+#include <boost/geometry/geometries/adapted/boost_range/sliced.hpp>
+#include <boost/geometry/geometries/adapted/boost_range/uniqued.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+#include <sstream>
+
+#ifdef BOOST_GEOMETRY_TEST_QUARANTINED
+struct not_two
+{
+ template <typename P>
+ bool operator()(P const& p) const
+ {
+ return boost::geometry::get<0>(p) != 2.0;
+ }
+};
+
+struct sum_not_five
+{
+ template <typename P>
+ bool operator()(P const& p1, P const& p2) const
+ {
+ return boost::geometry::get<0>(p1) + boost::geometry::get<0>(p2) != 5.0;
+ }
+};
+#endif
+
+
+template <typename P>
+void test_range_adaptor()
+{
+ bg::model::linestring<P> ls;
+ bg::read_wkt("LINESTRING(1 1,2 2,3 3,4 4)", ls);
+
+ {
+ std::ostringstream out;
+ out << bg::wkt(ls);
+ BOOST_CHECK_EQUAL(out.str(), "LINESTRING(1 1,2 2,3 3,4 4)");
+ }
+
+ {
+ std::ostringstream out;
+ out << bg::wkt(ls | boost::adaptors::reversed);
+ BOOST_CHECK_EQUAL(out.str(), "LINESTRING(4 4,3 3,2 2,1 1)");
+ }
+
+ {
+ std::ostringstream out;
+ out << bg::wkt(ls | boost::adaptors::strided(2));
+ BOOST_CHECK_EQUAL(out.str(), "LINESTRING(1 1,3 3)");
+ }
+
+ {
+ std::ostringstream out;
+ out << bg::wkt(ls | boost::adaptors::sliced(1,3));
+ BOOST_CHECK_EQUAL(out.str(), "LINESTRING(2 2,3 3)");
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_QUARANTINED
+// range filter adaptor does not support boost::size()
+// This makes it in practice not applicable, boost::geometry calls boost::size
+// in most if not all algorithms
+ {
+ std::ostringstream out;
+ out << bg::wkt(ls | boost::adaptors::filtered(not_two()));
+ BOOST_CHECK_EQUAL(out.str(), "LINESTRING(1 1,3 3,4 4)");
+ }
+
+ {
+ std::ostringstream out;
+ out << bg::wkt(ls | boost::adaptors::adjacent_filtered(sum_not_five()));
+ BOOST_CHECK_EQUAL(out.str(), "LINESTRING(1 1,3 3,4 4)");
+ }
+
+ {
+ bg::model::linestring<P> ls2;
+ bg::read_wkt("LINESTRING(1 1,1 1,2 2,3 3,3 3,4 4)", ls2);
+ std::ostringstream out;
+
+
+ // uniqued needs == operator, equals
+ //out << bg::wkt(ls | boost::adaptors::uniqued);
+ //BOOST_CHECK_EQUAL(out.str(), "LINESTRING(1 1,2 2,3 3,4 4)");
+ }
+#endif
+}
+
+template <typename P>
+void test_all()
+{
+ test_range_adaptor<P>();
+}
+
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+
+ return 0;
+ }
+
diff --git a/src/boost/libs/geometry/test/geometries/boost_tuple.cpp b/src/boost/libs/geometry/test/geometries/boost_tuple.cpp
new file mode 100644
index 000000000..b6db1f02b
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/boost_tuple.cpp
@@ -0,0 +1,39 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <iostream>
+
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+void test_all()
+{
+ P p1, p2;
+ bg::distance(p1, p2);
+}
+
+int test_main(int, char* [])
+{
+ test_all<boost::tuple<float> >();
+ test_all<boost::tuple<int, int> >();
+ test_all<boost::tuple<double, double, double> >();
+ test_all<boost::tuple<float, float, float, float> >();
+ test_all<boost::tuple<float, float, float, float, float> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/box.cpp b/src/boost/libs/geometry/test/geometries/box.cpp
new file mode 100644
index 000000000..5e1fdaae5
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/box.cpp
@@ -0,0 +1,105 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/make.hpp>
+
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+bg::model::box<P> create_box()
+{
+ P p1;
+ P p2;
+ bg::assign_values(p1, 1, 2, 5);
+ bg::assign_values(p2, 3, 4, 6);
+ return bg::model::box<P>(p1, p2);
+}
+
+template <typename B, typename T>
+void check_box(B& to_check,
+ T min_x, T min_y, T min_z,
+ T max_x, T max_y, T max_z)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check.min_corner()), min_x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check.min_corner()), min_y);
+ BOOST_CHECK_EQUAL(bg::get<2>(to_check.min_corner()), min_z);
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check.max_corner()), max_x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check.max_corner()), max_y);
+ BOOST_CHECK_EQUAL(bg::get<2>(to_check.max_corner()), max_z);
+}
+
+template <typename P>
+void test_construction()
+{
+ typedef typename bg::coordinate_type<P>::type T;
+
+ bg::model::box<P> b1 = bg::make_zero<bg::model::box<P> >();
+ check_box(b1, T(),T(),T(),T(),T(),T());
+
+ bg::model::box<P> b2(create_box<P>());
+ check_box(b2, 1,2,5,3,4,6);
+
+ bg::model::box<P> b3 = bg::make_inverse<bg::model::box<P> >();
+ check_box(b3, boost::numeric::bounds<T>::highest(),
+ boost::numeric::bounds<T>::highest(),
+ boost::numeric::bounds<T>::highest(),
+ boost::numeric::bounds<T>::lowest(),
+ boost::numeric::bounds<T>::lowest(),
+ boost::numeric::bounds<T>::lowest());
+}
+
+template <typename P>
+void test_assignment()
+{
+ bg::model::box<P> b(create_box<P>());
+ bg::set<0>(b.min_corner(), 10);
+ bg::set<1>(b.min_corner(), 20);
+ bg::set<2>(b.min_corner(), 30);
+ bg::set<0>(b.max_corner(), 40);
+ bg::set<1>(b.max_corner(), 50);
+ bg::set<2>(b.max_corner(), 60);
+ check_box(b, 10,20,30,40,50,60);
+}
+
+template <typename P>
+void test_all()
+{
+ test_construction<P>();
+ test_assignment<P>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<int[3]>();
+ test_all<float[3]>();
+ test_all<double[3]>();
+ test_all<test::test_point>();
+ test_all<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/concepts/check.cpp b/src/boost/libs/geometry/test/geometries/concepts/check.cpp
new file mode 100644
index 000000000..07b344295
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/concepts/check.cpp
@@ -0,0 +1,76 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+struct ro_point
+{
+ float x, y;
+};
+
+
+struct rw_point
+{
+ float x, y;
+};
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template <> struct tag<ro_point> { typedef point_tag type; };
+template <> struct coordinate_type<ro_point> { typedef float type; };
+template <> struct coordinate_system<ro_point> { typedef bg::cs::cartesian type; };
+template <> struct dimension<ro_point> { enum { value = 2 }; };
+
+template <> struct access<ro_point, 0>
+{
+ static float get(ro_point const& p) { return p.x; }
+};
+
+template <> struct access<ro_point, 1>
+{
+ static float get(ro_point const& p) { return p.y; }
+};
+
+
+
+
+template <> struct tag<rw_point> { typedef point_tag type; };
+template <> struct coordinate_type<rw_point> { typedef float type; };
+template <> struct coordinate_system<rw_point> { typedef bg::cs::cartesian type; };
+template <> struct dimension<rw_point> { enum { value = 2 }; };
+
+template <> struct access<rw_point, 0>
+{
+ static float get(rw_point const& p) { return p.x; }
+ static void set(rw_point& p, float value) { p.x = value; }
+};
+
+template <> struct access<rw_point, 1>
+{
+ static float get(rw_point const& p) { return p.y; }
+ static void set(rw_point& p, float value) { p.y = value; }
+};
+
+
+}}} // namespace bg::traits
+
+
+int main()
+{
+ bg::concepts::check<const ro_point>();
+ bg::concepts::check<rw_point>();
+}
diff --git a/src/boost/libs/geometry/test/geometries/custom_linestring.cpp b/src/boost/libs/geometry/test/geometries/custom_linestring.cpp
new file mode 100644
index 000000000..66feef665
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/custom_linestring.cpp
@@ -0,0 +1,128 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <deque>
+#include <vector>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/algorithms/clear.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
+
+//#define TEST_FAIL_CLEAR
+//#define TEST_FAIL_APPEND
+
+
+
+// ----------------------------------------------------------------------------
+// First custom linestring, requires ONLY one traits: to register itself as a linestring
+template <typename P>
+struct custom_linestring1 : std::vector<P> {};
+
+namespace boost { namespace geometry { namespace traits {
+ template <typename P>
+ struct tag< custom_linestring1<P> > { typedef linestring_tag type; };
+}}} // namespace bg::traits
+
+// ----------------------------------------------------------------------------
+// Second custom linestring, decides to implement all edit operations itself
+// by specializing the "use_std" traits to false.
+// It should therefore implement the traits:: clear / append_point
+template <typename P>
+struct custom_linestring2 : std::deque<P> // std::pair<typename std::vector<P>::const_iterator, typename std::vector<P>::const_iterator>
+{
+};
+
+namespace boost { namespace geometry { namespace traits {
+ template <typename P>
+ struct tag< custom_linestring2<P> > { typedef linestring_tag type; };
+
+#if ! defined(TEST_FAIL_CLEAR)
+ template <typename P>
+ struct clear< custom_linestring2<P> >
+ {
+ // does not use std::vector<P>.clear() but something else.
+ static inline void apply(custom_linestring2<P>& ls) { ls.resize(0); }
+ };
+#endif
+
+}}} // namespace bg::traits
+
+// ----------------------------------------------------------------------------
+
+template <typename G>
+void test_linestring()
+{
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Linestring<G>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<G>) );
+
+ G geometry;
+ typedef typename bg::point_type<G>::type P;
+
+ bg::clear(geometry);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 0u);
+
+ bg::append(geometry, bg::make_zero<P>());
+ BOOST_CHECK_EQUAL(boost::size(geometry), 1u);
+
+ //std::cout << geometry << std::endl;
+
+ bg::clear(geometry);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 0u);
+
+
+ //P p = boost::range::front(geometry);
+}
+
+template <typename P>
+void test_all()
+{
+ test_linestring<bg::model::linestring<P> >();
+ test_linestring<bg::model::linestring<P, std::vector> >();
+ test_linestring<bg::model::linestring<P, std::deque> >();
+
+ test_linestring<custom_linestring1<P> >();
+ test_linestring<custom_linestring2<P> >();
+
+ test_linestring<std::vector<P> >();
+ test_linestring<std::deque<P> >();
+ //test_linestring<std::list<P> >();
+}
+
+int test_main(int, char* [])
+{
+ test_all<test::test_point>();
+ test_all<boost::tuple<float, float> >();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/infinite_line.cpp b/src/boost/libs/geometry/test/geometries/infinite_line.cpp
new file mode 100755
index 000000000..a69b43137
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/infinite_line.cpp
@@ -0,0 +1,90 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2019.
+// Modifications copyright (c) 2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/detail/make/make.hpp>
+#include <boost/geometry/geometries/infinite_line.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/util/math.hpp>
+
+namespace
+{
+ // Boost.Test does not support BOOST_CHECK_CLOSE for integral types
+ template <typename T>
+ bool is_small(T const& value)
+ {
+ static long double const epsilon = 1.0e-5;
+ return bg::math::abs(value) < epsilon;
+ }
+}
+
+template <typename T, typename C>
+void verify_point_on_line(bg::model::infinite_line<T> const& line,
+ C const& x, C const& y)
+{
+ BOOST_CHECK_MESSAGE(is_small(line.a * x + line.b * y + line.c),
+ "Point is not located on the line");
+}
+
+template <typename T>
+void test_make()
+{
+ typedef bg::model::infinite_line<T> line_type;
+
+ // Horizontal through origin
+ line_type line = bg::detail::make::make_infinite_line<T>(0, 0, 10, 0);
+ verify_point_on_line(line, 0, 0);
+ verify_point_on_line(line, 10, 0);
+
+ // Horizontal line above origin
+ line = bg::detail::make::make_infinite_line<T>(0, 5, 10, 5);
+ verify_point_on_line(line, 0, 5);
+ verify_point_on_line(line, 10, 5);
+
+ // Vertical through origin
+ line = bg::detail::make::make_infinite_line<T>(0, 0, 0, 10);
+ verify_point_on_line(line, 0, 0);
+ verify_point_on_line(line, 0, 10);
+
+ // Vertical line left from origin
+ line = bg::detail::make::make_infinite_line<T>(5, 0, 5, 10);
+ verify_point_on_line(line, 5, 0);
+ verify_point_on_line(line, 5, 10);
+
+ // Diagonal through origin
+ line = bg::detail::make::make_infinite_line<T>(0, 0, 8, 10);
+ verify_point_on_line(line, 0, 0);
+ verify_point_on_line(line, 8, 10);
+
+ // Diagonal not through origin
+ line = bg::detail::make::make_infinite_line<T>(5, 2, -8, 10);
+ verify_point_on_line(line, 5, 2);
+ verify_point_on_line(line, -8, 10);
+}
+
+
+template <typename T>
+void test_all()
+{
+ test_make<T>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ test_all<long double>();
+ test_all<float>();
+ test_all<int>();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/initialization.cpp b/src/boost/libs/geometry/test/geometries/initialization.cpp
new file mode 100644
index 000000000..23dd11f52
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/initialization.cpp
@@ -0,0 +1,252 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/num_geometries.hpp>
+
+typedef std::pair<float, float> pt_pair_t;
+BOOST_GEOMETRY_REGISTER_POINT_2D(pt_pair_t, float, bg::cs::cartesian, first, second)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+template <typename P>
+void test_default()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ // multi_point()
+ mpt mptd;
+ BOOST_CHECK(bg::num_points(mptd) == 0);
+ // linestring()
+ ls lsd;
+ BOOST_CHECK(bg::num_points(lsd) == 0);
+ // multi_linestring()
+ mls mlsd;
+ BOOST_CHECK(bg::num_points(mlsd) == 0);
+ // ring()
+ ring rd;
+ BOOST_CHECK(bg::num_points(rd) == 0);
+ // polygon()
+ poly pd;
+ BOOST_CHECK(bg::num_points(pd) == 0);
+ // multi_polygon()
+ mpoly mpd;
+ BOOST_CHECK(bg::num_points(mpd) == 0);
+}
+
+template <typename P>
+void test_boost_assign_2d()
+{
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::ring<P> ring;
+
+ // using Boost.Assign
+ mpt mpt2 = boost::assign::list_of(P(0, 0))(P(1, 0));
+ BOOST_CHECK(bg::num_points(mpt2) == 2);
+ mpt2 = boost::assign::list_of(P(0, 0))(P(1, 0));
+ BOOST_CHECK(bg::num_points(mpt2) == 2);
+
+ // using Boost.Assign
+ ls ls2 = boost::assign::list_of(P(0, 0))(P(1, 0))(P(1, 1));
+ BOOST_CHECK(bg::num_points(ls2) == 3);
+ ls2 = boost::assign::list_of(P(0, 0))(P(1, 0))(P(1, 1));
+ BOOST_CHECK(bg::num_points(ls2) == 3);
+
+ // using Boost.Assign
+ ring r2 = boost::assign::list_of(P(0, 0))(P(0, 1))(P(1, 1))(P(1, 0))(P(0, 0));
+ BOOST_CHECK(bg::num_points(r2) == 5);
+ r2 = boost::assign::list_of(P(0, 0))(P(0, 1))(P(1, 1))(P(1, 0))(P(0, 0));
+ BOOST_CHECK(bg::num_points(r2) == 5);
+}
+
+void test_boost_assign_pair_2d()
+{
+ typedef std::pair<float, float> pt;
+
+ test_boost_assign_2d<pt>();
+
+ typedef bg::model::multi_point<pt> mpt;
+
+ // using Boost.Assign
+ mpt mpt2 = boost::assign::pair_list_of(0, 0)(1, 0);
+ BOOST_CHECK(bg::num_points(mpt2) == 2);
+ mpt2 = boost::assign::pair_list_of(0, 0)(1, 0);
+ BOOST_CHECK(bg::num_points(mpt2) == 2);
+}
+
+void test_boost_assign_tuple_2d()
+{
+ typedef boost::tuple<float, float> pt;
+
+ test_boost_assign_2d<pt>();
+
+ typedef bg::model::multi_point<pt> mpt;
+
+ // using Boost.Assign
+ mpt mpt2 = boost::assign::tuple_list_of(0, 0)(1, 0);
+ BOOST_CHECK(bg::num_points(mpt2) == 2);
+ mpt2 = boost::assign::tuple_list_of(0, 0)(1, 0);
+ BOOST_CHECK(bg::num_points(mpt2) == 2);
+}
+
+template <typename P>
+void test_initializer_list_2d()
+{
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+
+ typedef bg::model::multi_point<P> mpt;
+ typedef bg::model::linestring<P> ls;
+ typedef bg::model::multi_linestring<ls> mls;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> poly;
+ typedef bg::model::multi_polygon<poly> mpoly;
+
+ // multi_point(initializer_list<Point>)
+ mpt mpt1 = {{0, 0}, {1, 0}, {2, 0}};
+ BOOST_CHECK(bg::num_geometries(mpt1) == 3);
+ BOOST_CHECK(bg::num_points(mpt1) == 3);
+ // multi_point::operator=(initializer_list<Point>)
+ mpt1 = {{0, 0}, {1, 0}, {2, 0}, {3, 0}};
+ BOOST_CHECK(bg::num_points(mpt1) == 4);
+
+ // linestring(initializer_list<Point>)
+ ls ls1 = {{0, 0}, {1, 0}, {2, 0}};
+ BOOST_CHECK(bg::num_geometries(ls1) == 1);
+ BOOST_CHECK(bg::num_points(ls1) == 3);
+ // linestring::operator=(initializer_list<Point>)
+ ls1 = {{0, 0}, {1, 0}, {2, 0}, {3, 0}};
+ BOOST_CHECK(bg::num_points(ls1) == 4);
+
+ // multi_linestring(initializer_list<Linestring>)
+ mls mls1 = {{{0, 0}, {1, 0}, {2, 0}}, {{3, 0}, {4, 0}}};
+ BOOST_CHECK(bg::num_geometries(mls1) == 2);
+ BOOST_CHECK(bg::num_points(mls1) == 5);
+ // multi_linestring::operator=(initializer_list<Linestring>)
+ mls1 = {{{0, 0}, {1, 0}, {2, 0}}, {{3, 0}, {4, 0}, {5, 0}}};
+ BOOST_CHECK(bg::num_points(mls1) == 6);
+
+ // ring(initializer_list<Point>)
+ ring r1 = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}};
+ BOOST_CHECK(bg::num_geometries(r1) == 1);
+ BOOST_CHECK(bg::num_points(r1) == 5);
+ // ring::operator=(initializer_list<Point>)
+ r1 = {{0, 0}, {0, 1}, {1, 2}, {2, 1}, {1, 0}, {0, 0}};
+ BOOST_CHECK(bg::num_points(r1) == 6);
+
+ // polygon(initializer_list<ring_type>)
+ poly p1 = {{{0, 0}, {0, 9}, {9, 9}, {9, 0}, {0, 0}}, {{1, 1}, {2, 1}, {2, 2}, {1, 2}, {1, 1}}};
+ BOOST_CHECK(bg::num_geometries(p1) == 1);
+ BOOST_CHECK(bg::num_points(p1) == 10);
+ BOOST_CHECK(boost::size(bg::interior_rings(p1)) == 1);
+ // polygon::operator=(initializer_list<ring_type>)
+ p1 = {{{0, 0}, {0, 8}, {8, 9}, {9, 8}, {8, 0}, {0, 0}}, {{1, 1}, {2, 1}, {2, 2}, {1, 2}, {1, 1}}};
+ BOOST_CHECK(bg::num_points(p1) == 11);
+ BOOST_CHECK(boost::size(bg::interior_rings(p1)) == 1);
+ p1 = {{{0, 0}, {0, 9}, {9, 9}, {9, 0}, {0, 0}}};
+ BOOST_CHECK(bg::num_points(p1) == 5);
+ BOOST_CHECK(boost::size(bg::interior_rings(p1)) == 0);
+ // polygon(initializer_list<ring_type>)
+ poly p2 = {{{0, 0}, {0, 9}, {9, 9}, {9, 0}, {0, 0}}};
+ BOOST_CHECK(bg::num_geometries(p2) == 1);
+ BOOST_CHECK(bg::num_points(p2) == 5);
+ BOOST_CHECK(boost::size(bg::interior_rings(p1)) == 0);
+ // polygon::operator=(initializer_list<ring_type>)
+ p2 = {{{0, 0}, {0, 8}, {8, 9}, {9, 8}, {8, 0}, {0, 0}}};
+ BOOST_CHECK(bg::num_points(p2) == 6);
+
+ // multi_polygon(initializer_list<Polygon>)
+ mpoly mp1 = {{{{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}}}, {{{2, 2}, {2, 3}, {3, 3}, {3, 2}, {2, 2}}}};
+ BOOST_CHECK(bg::num_geometries(mp1) == 2);
+ BOOST_CHECK(bg::num_points(mp1) == 10);
+ // multi_polygon::operator=(initializer_list<Polygon>)
+ mp1 = {{{{0, 0}, {0, 1}, {1, 2}, {2, 1}, {1, 0}, {0, 0}}}, {{{2, 2}, {2, 3}, {3, 3}, {3, 2}, {2, 2}}}};
+ BOOST_CHECK(bg::num_points(mp1) == 11);
+
+#endif
+}
+
+template <typename P>
+void test_all_2d()
+{
+ test_default<P>();
+ test_boost_assign_2d<P>();
+ test_initializer_list_2d<P>();
+}
+
+template <typename T>
+struct test_point
+{
+ test_point(T = T(), T = T()) {}
+};
+
+template <typename T>
+struct test_range
+{
+ test_range() {}
+ template <typename It>
+ test_range(It, It) {}
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ test_range(std::initializer_list<T>) {}
+ //test_range & operator=(std::initializer_list<T>) { return *this; }
+#endif
+};
+
+void test_sanity_check()
+{
+ typedef test_point<float> P;
+ typedef test_range<P> R;
+ typedef std::vector<P> V;
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+ {
+ R r = {{1, 1},{2, 2},{3, 3}};
+ r = {{1, 1},{2, 2},{3, 3}};
+
+ V v = {{1, 1},{2, 2},{3, 3}};
+ v = {{1, 1},{2, 2},{3, 3}};
+ }
+#endif
+ {
+ R r = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
+ r = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
+
+ V v = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
+ //v = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
+ v.empty();
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_all_2d< bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all_2d< bg::model::d2::point_xy<float> >();
+
+ test_boost_assign_pair_2d();
+ test_boost_assign_tuple_2d();
+
+ test_sanity_check();
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/geometries/linestring.cpp b/src/boost/libs/geometry/test/geometries/linestring.cpp
new file mode 100644
index 000000000..3f32eee7e
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/linestring.cpp
@@ -0,0 +1,136 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+
+template <typename P>
+bg::model::linestring<P> create_linestring()
+{
+ bg::model::linestring<P> l1;
+ P p1;
+ bg::assign_values(p1, 1, 2, 3);
+ bg::append(l1, p1);
+ return l1;
+}
+
+template <typename L, typename T>
+void check_linestring(L& to_check, T x, T y, T z)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check[0]), x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check[0]), y);
+ BOOST_CHECK_EQUAL(bg::get<2>(to_check[0]), z);
+}
+
+template <typename P>
+void test_default_constructor()
+{
+ bg::model::linestring<P> l1(create_linestring<P>());
+ check_linestring(l1, 1, 2, 3);
+}
+
+template <typename P>
+void test_copy_constructor()
+{
+ bg::model::linestring<P> l1 = create_linestring<P>();
+ check_linestring(l1, 1, 2, 3);
+}
+
+template <typename P>
+void test_copy_assignment()
+{
+ bg::model::linestring<P> l1(create_linestring<P>()), l2;
+ l2 = l1;
+ check_linestring(l2, 1, 2, 3);
+}
+
+template <typename P>
+void test_concept()
+{
+ typedef bg::model::linestring<P> L;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<L>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Linestring<L>) );
+
+ typedef typename bg::coordinate_type<L>::type T;
+ typedef typename bg::point_type<L>::type LP;
+ boost::ignore_unused<T, LP>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_default_constructor<P>();
+ test_copy_constructor<P>();
+ test_copy_assignment<P>();
+ test_concept<P>();
+}
+
+template <typename P>
+void test_custom_linestring(std::initializer_list<P> IL)
+{
+ bg::model::linestring<P> l1(IL);
+ std::ostringstream out;
+ out << bg::dsv(l1);
+ BOOST_CHECK_EQUAL(out.str(), "((1, 2), (2, 3), (3, 4))");
+}
+
+template <typename P>
+void test_custom()
+{
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::initializer_list<P> IL = {P(1, 2), P(2, 3), P(3, 4)};
+ test_custom_linestring<P>(IL);
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<bg::model::point<int, 3, CS> >();
+ test_all<bg::model::point<float, 3, CS> >();
+ test_all<bg::model::point<double, 3, CS> >();
+
+ test_custom<bg::model::point<double, 2, CS> >();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ test_custom<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/multi_linestring.cpp b/src/boost/libs/geometry/test/geometries/multi_linestring.cpp
new file mode 100644
index 000000000..74ac3f5f7
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/multi_linestring.cpp
@@ -0,0 +1,159 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/linestring.hpp>
+#include <boost/geometry/geometries/multi_linestring.hpp>
+#include <boost/geometry/geometries/concepts/multi_linestring_concept.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+template <typename P>
+bg::model::linestring<P> create_linestring()
+{
+ bg::model::linestring<P> l1;
+ P p1(1, 2);
+ bg::append(l1, p1);
+ return l1;
+}
+
+template <typename P, typename L>
+bg::model::multi_linestring<L> create_multi_linestring()
+{
+ bg::model::multi_linestring<L> ml1;
+ L l1(create_linestring<P>());
+ ml1.push_back(l1);
+ ml1.push_back(l1);
+ return ml1;
+}
+
+template <typename ML, typename L>
+void check_multi_linestring(ML& to_check, L l1)
+{
+ ML cur;
+ cur.push_back(l1);
+ cur.push_back(l1);
+
+ std::ostringstream out1, out2;
+ out1 << bg::dsv(to_check);
+ out2 << bg::dsv(cur);
+ BOOST_CHECK_EQUAL(out1.str(), out2.str());
+}
+
+template <typename P, typename L>
+void test_default_constructor()
+{
+ bg::model::multi_linestring<L> ml1(create_multi_linestring<P, L>());
+ check_multi_linestring(ml1, L(create_linestring<P>()));
+}
+
+template <typename P, typename L>
+void test_copy_constructor()
+{
+ bg::model::multi_linestring<L> ml1 = create_multi_linestring<P, L>();
+ check_multi_linestring(ml1, L(create_linestring<P>()));
+}
+
+template <typename P, typename L>
+void test_copy_assignment()
+{
+ bg::model::multi_linestring<L> ml1(create_multi_linestring<P, L>()), ml2;
+ ml2 = ml1;
+ check_multi_linestring(ml2, L(create_linestring<P>()));
+}
+
+template <typename L>
+void test_concept()
+{
+ typedef bg::model::multi_linestring<L> ML;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiLinestring<ML>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::MultiLinestring<ML>) );
+
+ typedef typename bg::coordinate_type<ML>::type T;
+ typedef typename bg::point_type<ML>::type PML;
+ boost::ignore_unused<T, PML>();
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::linestring<P> L;
+
+ test_default_constructor<P, L>();
+ test_copy_constructor<P, L>();
+ test_copy_assignment<P, L>();
+ test_concept<L>();
+}
+
+template <typename P>
+void test_custom_multi_linestring(bg::model::linestring<P> IL)
+{
+ typedef bg::model::linestring<P> L;
+
+ std::initializer_list<L> LIL = {IL};
+ bg::model::multi_linestring<L> ml1(LIL);
+ std::ostringstream out;
+ out << bg::dsv(ml1);
+ BOOST_CHECK_EQUAL(out.str(), "(((1, 1), (2, 2), (3, 3), (0, 0), (0, 2), (0, 3)))");
+}
+
+template <typename P>
+void test_custom()
+{
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::initializer_list<P> IL1 = {P(1, 1), P(2, 2), P(3, 3)};
+ std::initializer_list<P> IL2 = {P(0, 0), P(0, 2), P(0, 3)};
+ bg::model::linestring<P> l1;
+ bg::append(l1, IL1);
+ bg::append(l1, IL2);
+ test_custom_multi_linestring<P>(l1);
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<bg::model::point<int, 2, CS> >();
+ test_all<bg::model::point<float, 2, CS> >();
+ test_all<bg::model::point<double, 2, CS> >();
+
+ test_custom<bg::model::point<double, 2, CS> >();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ test_custom<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/multi_point.cpp b/src/boost/libs/geometry/test/geometries/multi_point.cpp
new file mode 100644
index 000000000..b10af2281
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/multi_point.cpp
@@ -0,0 +1,135 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/multi_point.hpp>
+#include <boost/geometry/geometries/concepts/multi_point_concept.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+template <typename P>
+bg::model::multi_point<P> create_multi_point()
+{
+ bg::model::multi_point<P> mp1;
+ P p1;
+ bg::assign_values(p1, 1, 2, 3);
+ bg::append(mp1, p1);
+ return mp1;
+}
+
+template <typename L, typename T>
+void check_multi_point(L& to_check, T x, T y, T z)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check[0]), x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check[0]), y);
+ BOOST_CHECK_EQUAL(bg::get<2>(to_check[0]), z);
+}
+
+template <typename P>
+void test_default_constructor()
+{
+ bg::model::multi_point<P> mp1(create_multi_point<P>());
+ check_multi_point(mp1, 1, 2, 3);
+}
+
+template <typename P>
+void test_copy_constructor()
+{
+ bg::model::multi_point<P> mp1 = create_multi_point<P>();
+ check_multi_point(mp1, 1, 2, 3);
+}
+
+template <typename P>
+void test_copy_assignment()
+{
+ bg::model::multi_point<P> mp1(create_multi_point<P>()), mp2;
+ mp2 = mp1;
+ check_multi_point(mp2, 1, 2, 3);
+}
+
+template <typename P>
+void test_concept()
+{
+ typedef bg::model::multi_point<P> MP;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiPoint<MP>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::MultiPoint<MP>) );
+
+ typedef typename bg::coordinate_type<MP>::type T;
+ typedef typename bg::point_type<MP>::type MPP;
+ boost::ignore_unused<T, MPP>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_default_constructor<P>();
+ test_copy_constructor<P>();
+ test_copy_assignment<P>();
+ test_concept<P>();
+}
+
+template <typename P>
+void test_custom_multi_point(std::initializer_list<P> IL)
+{
+ bg::model::multi_point<P> mp1(IL);
+ std::ostringstream out;
+ out << bg::dsv(mp1);
+ BOOST_CHECK_EQUAL(out.str(), "((0, 0), (1, 2), (2, 0))");
+}
+
+template <typename P>
+void test_custom()
+{
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::initializer_list<P> IL = {P(0, 0), P(1, 2), P(2, 0)};
+ test_custom_multi_point<P>(IL);
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<bg::model::point<int, 3, CS> >();
+ test_all<bg::model::point<float, 3, CS> >();
+ test_all<bg::model::point<double, 3, CS> >();
+
+ test_custom<bg::model::point<double, 2, CS> >();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ test_custom<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/multi_polygon.cpp b/src/boost/libs/geometry/test/geometries/multi_polygon.cpp
new file mode 100644
index 000000000..f0c474db5
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/multi_polygon.cpp
@@ -0,0 +1,166 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/multi_polygon.hpp>
+#include <boost/geometry/geometries/concepts/multi_polygon_concept.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+template <typename P>
+bg::model::polygon<P> create_polygon()
+{
+ bg::model::polygon<P> pl1;
+ P p1;
+ P p2;
+ P p3;
+ bg::assign_values(p1, 1, 2);
+ bg::assign_values(p2, 2, 0);
+ bg::assign_values(p3, 0, 0);
+
+ bg::append(pl1, p1);
+ bg::append(pl1, p2);
+ bg::append(pl1, p3);
+ bg::append(pl1, p1);
+ return pl1;
+}
+
+template <typename P, typename PL>
+bg::model::multi_polygon<PL> create_multi_polygon()
+{
+ bg::model::multi_polygon<PL> mpl1;
+ PL pl1(create_polygon<P>());
+ mpl1.push_back(pl1);
+ mpl1.push_back(pl1);
+ return mpl1;
+}
+
+template <typename MPL, typename PL>
+void check_multi_polygon(MPL& to_check, PL pl1)
+{
+ MPL cur;
+ cur.push_back(pl1);
+ cur.push_back(pl1);
+
+ std::ostringstream out1, out2;
+ out1 << bg::dsv(to_check);
+ out2 << bg::dsv(cur);
+ BOOST_CHECK_EQUAL(out1.str(), out2.str());
+}
+
+template <typename P, typename PL>
+void test_default_constructor()
+{
+ bg::model::multi_polygon<PL> mpl1(create_multi_polygon<P, PL>());
+ check_multi_polygon(mpl1, PL(create_polygon<P>()));
+}
+
+template <typename P, typename PL>
+void test_copy_constructor()
+{
+ bg::model::multi_polygon<PL> mpl1 = create_multi_polygon<P, PL>();
+ check_multi_polygon(mpl1, PL(create_polygon<P>()));
+}
+
+template <typename P, typename PL>
+void test_copy_assignment()
+{
+ bg::model::multi_polygon<PL> mpl1(create_multi_polygon<P, PL>()), mpl2;
+ mpl2 = mpl1;
+ check_multi_polygon(mpl2, PL(create_polygon<P>()));
+}
+
+template <typename PL>
+void test_concept()
+{
+ typedef bg::model::multi_polygon<PL> MPL;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiPolygon<MPL>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::MultiPolygon<MPL>) );
+
+ typedef typename bg::coordinate_type<MPL>::type T;
+ typedef typename bg::point_type<MPL>::type PMPL;
+ boost::ignore_unused<T, PMPL>();
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::polygon<P> PL;
+
+ test_default_constructor<P, PL>();
+ test_copy_constructor<P, PL>();
+ test_copy_assignment<P, PL>();
+ test_concept<PL>();
+}
+
+template <typename P>
+void test_custom_multi_polygon(bg::model::polygon<P> IL)
+{
+ typedef bg::model::polygon<P> PL;
+
+ std::initializer_list<PL> PIL = {IL};
+ bg::model::multi_polygon<PL> mpl1(PIL);
+ std::ostringstream out;
+ out << bg::dsv(mpl1);
+ BOOST_CHECK_EQUAL(out.str(), "((((3, 3), (3, 0), (0, 0), (0, 3), (3, 3))))");
+}
+
+template <typename P>
+void test_custom()
+{
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::initializer_list<P> IL = {P(3, 3), P(3, 0), P(0, 0), P(0, 3), P(3, 3)};
+ bg::model::ring<P> r1(IL);
+ std::initializer_list<bg::model::ring<P> > RIL = {r1};
+ test_custom_multi_polygon<P>(RIL);
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<bg::model::point<int, 2, CS> >();
+ test_all<bg::model::point<float, 2, CS> >();
+ test_all<bg::model::point<double, 2, CS> >();
+
+ test_custom<bg::model::point<double, 2, CS> >();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ test_custom<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/point.cpp b/src/boost/libs/geometry/test/geometries/point.cpp
new file mode 100644
index 000000000..23a4151a4
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/point.cpp
@@ -0,0 +1,101 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/geometries/concepts/point_concept.hpp>
+#include <boost/geometry/geometries/point.hpp>
+
+#include <test_common/test_point.hpp>
+
+
+template <typename T, typename CS>
+bg::model::point<T, 3, CS> create_point()
+{
+ T t1 = 1;
+ T t2 = 2;
+ T t3 = 3;
+ return bg::model::point<T, 3, CS>(t1, t2, t3);
+}
+
+template <typename P, typename T>
+void check_point(P& to_check, T x, T y, T z)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check), x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check), y);
+ BOOST_CHECK_EQUAL(bg::get<2>(to_check), z);
+}
+
+template <typename T, typename CS>
+void test_default_constructor()
+{
+ bg::model::point<T, 3, CS> p(create_point<T, CS>());
+ check_point(p, 1, 2, 3);
+}
+
+template <typename T, typename CS>
+void test_copy_constructor()
+{
+ bg::model::point<T, 3, CS> p = create_point<T, CS>();
+ check_point(p, 1, 2, 3);
+}
+
+template <typename T, typename CS>
+void test_copy_assignment()
+{
+ bg::model::point<T, 3, CS> p(create_point<T, CS>());
+ bg::set<0>(p, 4);
+ bg::set<1>(p, 5);
+ bg::set<2>(p, 6);
+ check_point(p, 4, 5, 6);
+}
+
+template <typename T, typename CS>
+void test_concept()
+{
+ typedef bg::model::point<T, 3, CS> P;
+
+ // Compilation tests, all things should compile.
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstPoint<P>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Point<P>) );
+
+ typedef typename bg::coordinate_type<P>::type T1;
+ boost::ignore_unused<T1>();
+}
+
+template <typename T, typename CS>
+void test_all()
+{
+ test_default_constructor<T, CS>();
+ test_copy_constructor<T, CS>();
+ test_copy_assignment<T, CS>();
+ test_concept<T, CS>();
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<int, CS>();
+ test_all<float, CS>();
+ test_all<double, CS>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/point_xy.cpp b/src/boost/libs/geometry/test/geometries/point_xy.cpp
new file mode 100644
index 000000000..791940140
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/point_xy.cpp
@@ -0,0 +1,75 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <test_common/test_point.hpp>
+
+
+template <typename T>
+bg::model::d2::point_xy<T> create_point_xy()
+{
+ T t1 = 1;
+ T t2 = 2;
+ return bg::model::d2::point_xy<T>(t1, t2);
+}
+
+template <typename P, typename T>
+void check_point_xy(P& to_check, T x, T y)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check), x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check), y);
+ BOOST_CHECK_EQUAL(to_check.x(), x);
+ BOOST_CHECK_EQUAL(to_check.y(), y);
+}
+
+template <typename T>
+void test_default_constructor()
+{
+ bg::model::d2::point_xy<T> p(create_point_xy<T>());
+ check_point_xy(p, 1, 2);
+}
+
+template <typename T>
+void test_copy_constructor()
+{
+ bg::model::d2::point_xy<T> p(create_point_xy<T>());
+ check_point_xy(p, 1, 2);
+}
+
+template <typename T>
+void test_copy_assignment()
+{
+ bg::model::d2::point_xy<T> p(create_point_xy<T>());
+ bg::set<0>(p, 4);
+ bg::set<1>(p, 5);
+ check_point_xy(p, 4, 5);
+}
+
+template <typename T>
+void test_all()
+{
+ test_default_constructor<T>();
+ test_copy_constructor<T>();
+ test_copy_assignment<T>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<int>();
+ test_all<float>();
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/point_xyz.cpp b/src/boost/libs/geometry/test/geometries/point_xyz.cpp
new file mode 100644
index 000000000..f52484a2a
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/point_xyz.cpp
@@ -0,0 +1,79 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xyz.hpp>
+
+#include <test_common/test_point.hpp>
+
+
+template <typename T>
+bg::model::d3::point_xyz<T> create_point_xyz()
+{
+ T t1 = 1;
+ T t2 = 2;
+ T t3 = 3;
+ return bg::model::d3::point_xyz<T>(t1, t2, t3);
+}
+
+template <typename P, typename T>
+void check_point_xyz(P& to_check, T x, T y, T z)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check), x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check), y);
+ BOOST_CHECK_EQUAL(bg::get<2>(to_check), z);
+ BOOST_CHECK_EQUAL(to_check.x(), x);
+ BOOST_CHECK_EQUAL(to_check.y(), y);
+ BOOST_CHECK_EQUAL(to_check.z(), z);
+}
+
+template <typename T>
+void test_default_constructor()
+{
+ bg::model::d3::point_xyz<T> p(create_point_xyz<T>());
+ check_point_xyz(p, 1, 2, 3);
+}
+
+template <typename T>
+void test_copy_constructor()
+{
+ bg::model::d3::point_xyz<T> p = create_point_xyz<T>();
+ check_point_xyz(p, 1, 2, 3);
+}
+
+template <typename T>
+void test_copy_assignment()
+{
+ bg::model::d3::point_xyz<T> p(create_point_xyz<T>());
+ bg::set<0>(p, 4);
+ bg::set<1>(p, 5);
+ bg::set<2>(p, 6);
+ check_point_xyz(p, 4, 5, 6);
+}
+
+template <typename T>
+void test_all()
+{
+ test_default_constructor<T>();
+ test_copy_constructor<T>();
+ test_copy_assignment<T>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<int>();
+ test_all<float>();
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/polygon.cpp b/src/boost/libs/geometry/test/geometries/polygon.cpp
new file mode 100644
index 000000000..bf9aeb337
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/polygon.cpp
@@ -0,0 +1,152 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+template <typename P>
+bg::model::polygon<P> create_polygon()
+{
+ bg::model::polygon<P> pl1;
+ P p1;
+ P p2;
+ P p3;
+ bg::assign_values(p1, 1, 2);
+ bg::assign_values(p2, 2, 0);
+ bg::assign_values(p3, 0, 0);
+
+ bg::append(pl1, p1);
+ bg::append(pl1, p2);
+ bg::append(pl1, p3);
+ bg::append(pl1, p1);
+ return pl1;
+}
+
+template <typename PL, typename P>
+void check_polygon(PL& to_check, P p1, P p2, P p3)
+{
+ PL cur;
+ bg::append(cur, p1);
+ bg::append(cur, p2);
+ bg::append(cur, p3);
+ bg::append(cur, p1);
+
+ std::ostringstream out1, out2;
+ out1 << bg::dsv(to_check);
+ out2 << bg::dsv(cur);
+ BOOST_CHECK_EQUAL(out1.str(), out2.str());
+}
+
+template <typename P>
+void test_default_constructor()
+{
+ bg::model::polygon<P> pl1(create_polygon<P>());
+ check_polygon(pl1, P(1, 2), P(2, 0), P(0, 0));
+}
+
+template <typename P>
+void test_copy_constructor()
+{
+ bg::model::polygon<P> pl1 = create_polygon<P>();
+ check_polygon(pl1, P(1, 2), P(2, 0), P(0, 0));
+}
+
+template <typename P>
+void test_copy_assignment()
+{
+ bg::model::polygon<P> pl1(create_polygon<P>()), pl2;
+ pl2 = pl1;
+ check_polygon(pl2, P(1, 2), P(2, 0), P(0, 0));
+}
+
+template <typename P>
+void test_concept()
+{
+ typedef bg::model::polygon<P> PL;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstPolygon<PL>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Polygon<PL>) );
+
+ typedef typename bg::coordinate_type<PL>::type T;
+ typedef typename bg::point_type<PL>::type PPL;
+ boost::ignore_unused<T, PPL>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_default_constructor<P>();
+ test_copy_constructor<P>();
+ test_copy_assignment<P>();
+ test_concept<P>();
+}
+
+template <typename P>
+void test_custom_polygon(bg::model::ring<P> IL)
+{
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::initializer_list<bg::model::ring<P> > RIL = {IL};
+ bg::model::polygon<P> pl1(RIL);
+ std::ostringstream out;
+ out << bg::dsv(pl1);
+ BOOST_CHECK_EQUAL(out.str(), "(((3, 3), (3, 0), (0, 0), (0, 3), (3, 3)))");
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+}
+
+template <typename P>
+void test_custom()
+{
+ std::initializer_list<P> IL = {P(3, 3), P(3, 0), P(0, 0), P(0, 3), P(3, 3)};
+ bg::model::ring<P> r1(IL);
+ test_custom_polygon<P>(r1);
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<bg::model::point<int, 2, CS> >();
+ test_all<bg::model::point<float, 2, CS> >();
+ test_all<bg::model::point<double, 2, CS> >();
+
+ test_custom<bg::model::point<double, 2, CS> >();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ test_custom<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/ring.cpp b/src/boost/libs/geometry/test/geometries/ring.cpp
new file mode 100644
index 000000000..e74378090
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/ring.cpp
@@ -0,0 +1,155 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/append.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/ring.hpp>
+#include <boost/geometry/geometries/concepts/ring_concept.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+template <typename P>
+bg::model::ring<P> create_ring()
+{
+ bg::model::ring<P> r1;
+ P p1;
+ P p2;
+ P p3;
+ P p4;
+ bg::assign_values(p1, 2, 2);
+ bg::assign_values(p2, 2, 0);
+ bg::assign_values(p3, 0, 0);
+ bg::assign_values(p4, 0, 2);
+
+ bg::append(r1, p1);
+ bg::append(r1, p2);
+ bg::append(r1, p3);
+ bg::append(r1, p4);
+ bg::append(r1, p1);
+ return r1;
+}
+
+template <typename P, typename T>
+void check_point(P& to_check, T x, T y)
+{
+ BOOST_CHECK_EQUAL(bg::get<0>(to_check), x);
+ BOOST_CHECK_EQUAL(bg::get<1>(to_check), y);
+}
+
+template <typename R, typename P>
+void check_ring(R& to_check, P p1, P p2, P p3, P p4)
+{
+ check_point(to_check[0], bg::get<0>(p1), bg::get<1>(p1));
+ check_point(to_check[1], bg::get<0>(p2), bg::get<1>(p2));
+ check_point(to_check[2], bg::get<0>(p3), bg::get<1>(p3));
+ check_point(to_check[3], bg::get<0>(p4), bg::get<1>(p4));
+ check_point(to_check[4], bg::get<0>(p1), bg::get<1>(p1));
+}
+
+template <typename P>
+void test_default_constructor()
+{
+ bg::model::ring<P> r1(create_ring<P>());
+ check_ring(r1, P(2, 2), P(2, 0), P(0, 0), P(0, 2));
+}
+
+template <typename P>
+void test_copy_constructor()
+{
+ bg::model::ring<P> r1 = create_ring<P>();
+ check_ring(r1, P(2, 2), P(2, 0), P(0, 0), P(0, 2));
+}
+
+template <typename P>
+void test_copy_assignment()
+{
+ bg::model::ring<P> r1(create_ring<P>()), r2;
+ r2 = r1;
+ check_ring(r2, P(2, 2), P(2, 0), P(0, 0), P(0, 2));
+}
+
+template <typename P>
+void test_concept()
+{
+ typedef bg::model::ring<P> R;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstRing<R>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Ring<R>) );
+
+ typedef typename bg::coordinate_type<R>::type T;
+ typedef typename bg::point_type<R>::type PR;
+ boost::ignore_unused<T, PR>();
+}
+
+template <typename P>
+void test_all()
+{
+ test_default_constructor<P>();
+ test_copy_constructor<P>();
+ test_copy_assignment<P>();
+ test_concept<P>();
+}
+
+template <typename P>
+void test_custom_ring(bg::model::ring<P> IL)
+{
+ bg::model::ring<P> r1(IL);
+ std::ostringstream out;
+ out << bg::dsv(r1);
+ BOOST_CHECK_EQUAL(out.str(), "((3, 3), (3, 0), (0, 0), (0, 3), (3, 3))");
+}
+
+template <typename P>
+void test_custom()
+{
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ std::initializer_list<P> IL = {P(3, 3), P(3, 0), P(0, 0), P(0, 3), P(3, 3)};
+ test_custom_ring<P>(IL);
+#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+}
+
+template <typename CS>
+void test_cs()
+{
+ test_all<bg::model::point<int, 2, CS> >();
+ test_all<bg::model::point<float, 2, CS> >();
+ test_all<bg::model::point<double, 2, CS> >();
+
+ test_custom<bg::model::point<double, 2, CS> >();
+}
+
+
+int test_main(int, char* [])
+{
+ test_cs<bg::cs::cartesian>();
+ test_cs<bg::cs::spherical<bg::degree> >();
+ test_cs<bg::cs::spherical_equatorial<bg::degree> >();
+ test_cs<bg::cs::geographic<bg::degree> >();
+
+ test_custom<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/geometries/segment.cpp b/src/boost/libs/geometry/test/geometries/segment.cpp
new file mode 100644
index 000000000..dcbb2ed18
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometries/segment.cpp
@@ -0,0 +1,104 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/geometries/concepts/segment_concept.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+
+
+#include <test_common/test_point.hpp>
+#include <test_geometries/custom_segment.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::referring_segment<P> S;
+
+ P p1;
+ P p2;
+ S s(p1, p2);
+ BOOST_CHECK_EQUAL(&s.first, &p1);
+ BOOST_CHECK_EQUAL(&s.second, &p2);
+
+ // Compilation tests, all things should compile.
+ BOOST_CONCEPT_ASSERT( (bg::concepts::ConstSegment<S>) );
+ BOOST_CONCEPT_ASSERT( (bg::concepts::Segment<S>) );
+
+ typedef typename bg::coordinate_type<S>::type T;
+ typedef typename bg::point_type<S>::type SP;
+ boost::ignore_unused<T, SP>();
+
+ //std::cout << sizeof(typename coordinate_type<S>::type) << std::endl;
+
+ typedef bg::model::referring_segment<P const> refseg_t;
+ //BOOST_CONCEPT_ASSERT( (concepts::ConstSegment<refseg_t>) );
+
+ refseg_t seg(p1, p2);
+
+ typedef typename bg::coordinate_type<refseg_t>::type CT;
+ typedef typename bg::point_type<refseg_t>::type CSP;
+ boost::ignore_unused<CT, CSP>();
+}
+
+
+
+template <typename S>
+void test_custom()
+{
+ S seg;
+ bg::set<0,0>(seg, 1);
+ bg::set<0,1>(seg, 2);
+ bg::set<1,0>(seg, 3);
+ bg::set<1,1>(seg, 4);
+ std::ostringstream out;
+ out << bg::dsv(seg);
+ BOOST_CHECK_EQUAL(out.str(), "((1, 2), (3, 4))");
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<int[3]>();
+ test_all<float[3]>();
+ test_all<double[3]>();
+ //test_all<test_point>();
+ test_all<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ test_custom<test::custom_segment>();
+ test_custom<test::custom_segment_of<bg::model::point<double, 2, bg::cs::cartesian> > >();
+ test_custom<test::custom_segment_of<test::custom_point_for_segment> >();
+ test_custom<test::custom_segment_4>();
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/geometry_test_common.hpp b/src/boost/libs/geometry/test/geometry_test_common.hpp
new file mode 100644
index 000000000..87ec3d979
--- /dev/null
+++ b/src/boost/libs/geometry/test/geometry_test_common.hpp
@@ -0,0 +1,202 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_GEOMETRY_TEST_COMMON_HPP
+#define GEOMETRY_TEST_GEOMETRY_TEST_COMMON_HPP
+
+#include <boost/config.hpp>
+
+// Determine debug/release mode
+// (it would be convenient if Boost.Config or Boost.Test would define this)
+// Note that they might be combined (e.g. for optimize+no inline)
+#if defined (BOOST_CLANG) || defined(BOOST_GCC)
+#if defined(__OPTIMIZE__)
+ #define BOOST_GEOMETRY_COMPILER_MODE_RELEASE
+#endif
+#if defined(__NO_INLINE__)
+#define BOOST_GEOMETRY_COMPILER_MODE_DEBUG
+#endif
+#endif
+
+#if defined(BOOST_MSVC)
+#if defined(_DEBUG)
+#define BOOST_GEOMETRY_COMPILER_MODE_DEBUG
+#else
+#define BOOST_GEOMETRY_COMPILER_MODE_RELEASE
+#endif
+#endif
+
+
+#if defined(BOOST_MSVC)
+// We deliberately mix float/double's so turn off warnings
+#pragma warning( disable : 4244 )
+// For (new since Boost 1.40) warning in Boost.Test on putenv/posix
+#pragma warning( disable : 4996 )
+
+//#pragma warning( disable : 4305 )
+#endif // defined(BOOST_MSVC)
+
+#include <boost/config.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/foreach.hpp>
+
+#include <string_from_type.hpp>
+
+// Include some always-included-for-testing files
+#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
+
+// Until Boost.Test fixes it, silence warning issued by clang:
+#ifdef __clang__
+# pragma clang diagnostic push
+// warning: unused variable 'check_is_close' [-Wunused-variable]
+# pragma clang diagnostic ignored "-Wunused-variable"
+// warnings when -Wconversion is set
+# pragma clang diagnostic ignored "-Wsign-conversion"
+# pragma clang diagnostic ignored "-Wshorten-64-to-32"
+#endif
+
+# include <boost/test/tools/floating_point_comparison.hpp>
+#ifndef BOOST_TEST_MODULE
+# include <boost/test/included/test_exec_monitor.hpp>
+//# include <boost/test/included/prg_exec_monitor.hpp>
+# include <boost/test/impl/execution_monitor.ipp>
+#endif
+
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
+
+#endif
+
+
+#if defined(HAVE_TTMATH)
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+#if defined(HAVE_CLN) || defined(HAVE_GMP)
+# include <boost/numeric_adaptor/numeric_adaptor.hpp>
+#endif
+
+
+#if defined(HAVE_GMP)
+# include <boost/numeric_adaptor/gmp_value_type.hpp>
+#endif
+#if defined(HAVE_CLN)
+# include <boost/numeric_adaptor/cln_value_type.hpp>
+#endif
+
+// For all tests:
+// - do NOT use "using namespace boost::geometry" to make clear what is Boost.Geometry
+// - use bg:: as short alias
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/config.hpp>
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/core/tag.hpp>
+namespace bg = boost::geometry;
+
+
+template <typename CoordinateType, typename T1, typename T2>
+inline T1 if_typed_tt(T1 value_tt, T2 value)
+{
+#if defined(HAVE_TTMATH)
+ return boost::is_same<CoordinateType, ttmath_big>::type::value ? value_tt : value;
+#else
+ boost::ignore_unused(value_tt);
+ return value;
+#endif
+}
+
+template <typename CoordinateType, typename Specified, typename T>
+inline T if_typed(T value_typed, T value)
+{
+ return boost::is_same<CoordinateType, Specified>::value ? value_typed : value;
+}
+
+template <typename Geometry1, typename Geometry2>
+inline std::string type_for_assert_message()
+{
+ bool const ccw =
+ bg::point_order<Geometry1>::value == bg::counterclockwise
+ || bg::point_order<Geometry2>::value == bg::counterclockwise;
+ bool const open =
+ bg::closure<Geometry1>::value == bg::open
+ || bg::closure<Geometry2>::value == bg::open;
+
+ std::ostringstream out;
+ out << string_from_type<typename bg::coordinate_type<Geometry1>::type>::name()
+ << (ccw ? " ccw" : "")
+ << (open ? " open" : "");
+ return out.str();
+}
+
+struct geographic_policy
+{
+ template <typename CoordinateType>
+ static inline CoordinateType apply(CoordinateType const& value)
+ {
+ return value;
+ }
+};
+
+struct mathematical_policy
+{
+ template <typename CoordinateType>
+ static inline CoordinateType apply(CoordinateType const& value)
+ {
+ return 90 - value;
+ }
+
+};
+
+typedef double default_test_type;
+
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+#define BG_IF_RESCALED(a, b) a
+#else
+#define BG_IF_RESCALED(a, b) b
+#endif
+
+#if defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+#define BG_IF_KRAMER(a, b) a
+#else
+#define BG_IF_KRAMER(a, b) b
+#endif
+
+inline void BoostGeometryWriteTestConfiguration()
+{
+ std::cout << std::endl << "Test configuration:" << std::endl;
+#if defined(BOOST_GEOMETRY_USE_RESCALING)
+ std::cout << " - Using rescaling" << std::endl;
+#endif
+#if defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
+ std::cout << " - Using Kramer rule" << std::endl;
+#else
+ std::cout << " - Using general form" << std::endl;
+#endif
+#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ std::cout << " - Testing only one type" << std::endl;
+#endif
+#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
+ std::cout << " - Testing only one order" << std::endl;
+#endif
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+ std::cout << " - Including failing test cases" << std::endl;
+#endif
+ std::cout << " - Default test type: " << string_from_type<default_test_type>::name() << std::endl;
+ std::cout << std::endl;
+}
+
+#endif // GEOMETRY_TEST_GEOMETRY_TEST_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/headers/Jamfile b/src/boost/libs/geometry/test/headers/Jamfile
new file mode 100644
index 000000000..4f245dd48
--- /dev/null
+++ b/src/boost/libs/geometry/test/headers/Jamfile
@@ -0,0 +1,61 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2018 Mateusz Loskot <mateusz@loskot.net>
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os ;
+import path ;
+import regex ;
+
+rule generate_self_contained_headers ( headers_subpath )
+{
+ # This rule is based on script copied from similar rule in Boost.GIL
+ # On CI services, test the self-contained headers on-demand only to avoid build timeouts
+ # CI environment is common for Travis CI, AppVeyor, CircleCI, etc.
+ # For example:
+ # if ! [ os.environ CI ] || [ os.environ TEST_HEADERS ] {
+ # alias self_contained_headers : [ generate_self_contained_headers ] ;
+ # }
+
+ local targets ;
+
+ # NOTE: All '/' in test names are replaced with '-' because apparently
+ # test scripts have a problem with test names containing slashes.
+
+ local top_headers_path = [ path.make $(BOOST_ROOT)/libs/geometry/include/boost/geometry ] ;
+
+ for local file in [ path.glob-tree $(top_headers_path)/$(headers_subpath) : *.hpp ]
+ {
+ local rel_file = [ path.relative-to $(top_headers_path) $(file) ] ;
+ local target_name = [ regex.replace h/$(rel_file) "/" "-" ] ;
+ local target_name = [ regex.replace $(target_name) "\.hpp" "" ] ;
+ targets += [
+ compile $(BOOST_ROOT)/libs/geometry/test/headers/main.cpp
+ : <define>"BOOST_GEOMETRY_TEST_HEADER=$(rel_file)" <dependency>$(file)
+ : $(target_name)
+ ] ;
+ }
+
+ return $(targets) ;
+}
+
+# TODO: Review sorting to get as close as possible from general to specific
+
+# Core
+alias core : [ generate_self_contained_headers core ] ;
+alias util : [ generate_self_contained_headers util ] ;
+alias policies : [ generate_self_contained_headers policies ] ;
+alias geometries : [ generate_self_contained_headers geometries ] ;
+alias concepts : [ generate_self_contained_headers concepts ] ;
+alias arithmetic : [ generate_self_contained_headers arithmetic ] ;
+alias formulas : [ generate_self_contained_headers formulas ] ;
+alias iterators : [ generate_self_contained_headers iterators ] ;
+alias strategies : [ generate_self_contained_headers strategies ] ;
+alias srs : [ generate_self_contained_headers srs ] ;
+alias algorithms : [ generate_self_contained_headers algorithms ] ;
+alias views : [ generate_self_contained_headers views ] ;
+# Even though index is a separate submodule test headers here
+alias index : [ generate_self_contained_headers index ] ;
diff --git a/src/boost/libs/geometry/test/headers/main.cpp b/src/boost/libs/geometry/test/headers/main.cpp
new file mode 100644
index 000000000..c4ba97796
--- /dev/null
+++ b/src/boost/libs/geometry/test/headers/main.cpp
@@ -0,0 +1,19 @@
+//
+// Copyright (c) 2018 Mateusz Loskot <mateusz@loskot.net>
+// Copyright (c) 2007-2015 Andrey Semashev
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// This file contains a test boilerplate for checking that every public header
+// is self-contained and does not have any missing #include-s.
+
+#define BOOST_GEOMETRY_TEST_INCLUDE_HEADER() <boost/geometry/BOOST_GEOMETRY_TEST_HEADER>
+
+#include BOOST_GEOMETRY_TEST_INCLUDE_HEADER()
+
+int main()
+{
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/io/Jamfile b/src/boost/libs/geometry/test/io/Jamfile
new file mode 100644
index 000000000..28fbba1a9
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/Jamfile
@@ -0,0 +1,17 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2016.
+# Modifications copyright (c) 2016 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+build-project wkt ;
+build-project svg ;
diff --git a/src/boost/libs/geometry/test/io/dsv/Jamfile b/src/boost/libs/geometry/test/io/dsv/Jamfile
new file mode 100644
index 000000000..eaebe1c72
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/dsv/Jamfile
@@ -0,0 +1,16 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-io-dsv
+ :
+ [ run dsv_multi.cpp : : : : dsv_multi ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/io/dsv/dsv_multi.cpp b/src/boost/libs/geometry/test/io/dsv/dsv_multi.cpp
new file mode 100644
index 000000000..0b4bd8f28
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/dsv/dsv_multi.cpp
@@ -0,0 +1,99 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+template <typename Geometry>
+void test_dsv(std::string const& wkt, std::string const& expected, bool json = false)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ std::ostringstream out;
+ if (json)
+ {
+ out << bg::dsv(geometry, ", ", "[", "]", ", ", "[ ", " ]", ", ");
+ }
+ else
+ {
+ out << bg::dsv(geometry);
+ }
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+
+template <typename T>
+void test_all()
+{
+ using namespace boost::geometry;
+ typedef model::point<T, 2, cs::cartesian> point_type;
+ typedef model::multi_point<point_type> mpoint;
+ typedef model::multi_linestring<model::linestring<point_type> > mline;
+ typedef model::multi_polygon<model::polygon<point_type> > mpoly;
+
+ test_dsv<mpoint>
+ (
+ "multipoint((1 2),(3 4))",
+ "((1, 2), (3, 4))"
+ );
+ test_dsv<mline>
+ (
+ "multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))",
+ "(((1, 1), (2, 2), (3, 3)), ((4, 4), (5, 5), (6, 6)))"
+ );
+ test_dsv<mpoly>
+ (
+ // Multi with 2 poly's, first has hole, second is triangle
+ "multipolygon(((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((5 5,6 5,5 6,5 5)))",
+ "((((0, 0), (0, 4), (4, 4), (4, 0), (0, 0)), ((1, 1), (1, 2), (2, 2), (2, 1), (1, 1))), (((5, 5), (6, 5), (5, 6), (5, 5))))"
+ );
+
+ // http://geojson.org/geojson-spec.html#id5
+ test_dsv<mpoint>
+ (
+ "multipoint((1 2),(3 4))",
+ "[ [1, 2], [3, 4] ]",
+ true
+ );
+
+ // http://geojson.org/geojson-spec.html#id6
+ test_dsv<mline>
+ (
+ "multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))",
+ "[ [ [1, 1], [2, 2], [3, 3] ], [ [4, 4], [5, 5], [6, 6] ] ]",
+ true
+ );
+
+ // http://geojson.org/geojson-spec.html#id7
+ test_dsv<mpoly>
+ (
+ "multipolygon(((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((5 5,6 5,5 6,5 5)))",
+ "[ [ [ [0, 0], [0, 4], [4, 4], [4, 0], [0, 0] ], [ [1, 1], [1, 2], [2, 2], [2, 1], [1, 1] ] ], [ [ [5, 5], [6, 5], [5, 6], [5, 5] ] ] ]",
+ true
+ );
+
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ test_all<int>();
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/io/svg/Jamfile b/src/boost/libs/geometry/test/io/svg/Jamfile
new file mode 100644
index 000000000..ed406ffd4
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/svg/Jamfile
@@ -0,0 +1,15 @@
+# Boost.Geometry
+#
+# Copyright (c) 2016 Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-io-svg
+ :
+ [ run svg.cpp : : : : io_svg ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/io/svg/svg.cpp b/src/boost/libs/geometry/test/io/svg/svg.cpp
new file mode 100644
index 000000000..10e8b4fee
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/svg/svg.cpp
@@ -0,0 +1,157 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifdef TEST_WITH_SVG
+#include <fstream>
+#endif
+
+#include <sstream>
+#include <string>
+
+#include <boost/variant.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#include <boost/geometry/io/svg/write.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+
+template <typename R, typename T>
+inline void push_back_square(R & rng, T const& mi, T const& ma)
+{
+ typedef typename bg::point_type<R>::type P;
+ rng.push_back(P(mi, mi));
+ rng.push_back(P(mi, ma));
+ rng.push_back(P(ma, ma));
+ rng.push_back(P(ma, mi));
+ rng.push_back(P(mi, mi));
+}
+
+template <typename P>
+void test_all()
+{
+ typedef bg::model::box<P> box;
+ typedef bg::model::segment<P> segment;
+ typedef bg::model::linestring<P> linestring;
+ typedef bg::model::ring<P> ring;
+ typedef bg::model::polygon<P> polygon;
+
+ typedef bg::model::multi_point<P> multi_point;
+ typedef bg::model::multi_linestring<linestring> multi_linestring;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ P pt(0, 0);
+ box b(P(10, 10), P(20, 20));
+ segment s(P(30, 30), P(40, 40));
+
+ linestring ls;
+ push_back_square(ls, 50, 60);
+
+ ring r;
+ push_back_square(r, 70, 80);
+
+ polygon po;
+ push_back_square(po.outer(), 90, 120);
+ po.inners().resize(1);
+ push_back_square(po.inners()[0], 100, 110);
+ bg::correct(po);
+
+ multi_point m_pt;
+ m_pt.push_back(pt);
+
+ multi_linestring m_ls;
+ m_ls.push_back(ls);
+
+ multi_polygon m_po;
+ m_po.push_back(po);
+
+ boost::variant<P, linestring, polygon> var;
+ linestring lsv;
+ push_back_square(lsv, 130, 140);
+ var = lsv;
+
+ std::string style = "fill-opacity:0.5;fill:rgb(200,0,0);stroke:rgb(200,0,0);stroke-width:3";
+ std::string m_style = "fill-opacity:0.5;fill:rgb(0,200,0);stroke:rgb(0,200,0);stroke-width:1";
+
+ {
+#ifdef TEST_WITH_SVG
+ std::ofstream os("test1.svg", std::ios::trunc);
+#else
+ std::stringstream os;
+#endif
+ os << "<?xml version=\"1.0\" standalone=\"no\"?>"
+ << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">"
+ << "<svg height=\"200\" width=\"200\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">";
+
+ os << bg::svg(pt, style);
+ os << bg::svg(b, style);
+ os << bg::svg(s, style);
+ os << bg::svg(ls, style);
+ os << bg::svg(r, style);
+ os << bg::svg(po, style);
+ os << bg::svg(m_pt, m_style);
+ os << bg::svg(m_ls, m_style);
+ os << bg::svg(m_po, m_style);
+ os << bg::svg(var, style);
+
+ os << "</svg>";
+ }
+
+ {
+#ifdef TEST_WITH_SVG
+ std::ofstream os("test2.svg", std::ios::trunc);
+#else
+ std::stringstream os;
+#endif
+ bg::svg_mapper<P> mapper(os, 500, 500);
+ mapper.add(pt);
+ mapper.add(b);
+ mapper.add(s);
+ mapper.add(ls);
+ mapper.add(r);
+ mapper.add(po);
+ mapper.add(m_pt);
+ mapper.add(m_ls);
+ mapper.add(m_po);
+ mapper.add(var);
+
+ mapper.map(pt, style);
+ mapper.map(b, style);
+ mapper.map(s, style);
+ mapper.map(ls, style);
+ mapper.map(r, style);
+ mapper.map(po, style);
+ mapper.map(m_pt, m_style);
+ mapper.map(m_ls, m_style);
+ mapper.map(m_po, m_style);
+ mapper.map(var, m_style);
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_all< boost::geometry::model::d2::point_xy<double> >();
+ test_all< boost::geometry::model::d2::point_xy<int> >();
+
+#if defined(HAVE_TTMATH)
+ test_all< boost::geometry::model::d2::point_xy<ttmath_big> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/io/wkt/Jamfile b/src/boost/libs/geometry/test/io/wkt/Jamfile
new file mode 100644
index 000000000..898e8e94d
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/wkt/Jamfile
@@ -0,0 +1,17 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-io-wkt
+ :
+ [ run wkt.cpp : : : : io_wkt ]
+ [ run wkt_multi.cpp : : : : io_wkt_multi ]
+ ;
+
diff --git a/src/boost/libs/geometry/test/io/wkt/wkt.cpp b/src/boost/libs/geometry/test/io/wkt/wkt.cpp
new file mode 100644
index 000000000..2955fbba3
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/wkt/wkt.cpp
@@ -0,0 +1,299 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <sstream>
+#include <string>
+
+#include <boost/algorithm/string.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/perimeter.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/core/point_type.hpp>
+#include <boost/geometry/core/topological_dimension.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+#include <boost/variant/variant.hpp>
+
+template <typename G>
+void check_wkt(G const& geometry, std::string const& expected)
+{
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+ BOOST_CHECK_EQUAL(boost::to_upper_copy(out.str()),
+ boost::to_upper_copy(expected));
+}
+
+template <typename G>
+void test_wkt(std::string const& wkt, std::string const& expected,
+ std::size_t n, double len = 0, double ar = 0, double peri = 0)
+{
+ G geometry;
+
+ bg::read_wkt(wkt, geometry);
+
+ /*
+ std::cout << "n=" << bg::num_points(geometry)
+ << " dim=" << bg::topological_dimension<G>::value
+ << " length=" << bg::length(geometry)
+ << " area=" << bg::area(geometry)
+ << " perimeter=" << bg::perimeter(geometry)
+ << std::endl << "\t\tgeometry=" << dsv(geometry)
+ << std::endl;
+ */
+
+ BOOST_CHECK_EQUAL(bg::num_points(geometry), n);
+ if (n > 0)
+ {
+ BOOST_CHECK_CLOSE(double(bg::length(geometry)), len, 0.0001);
+ BOOST_CHECK_CLOSE(double(bg::area(geometry)), ar, 0.0001);
+ BOOST_CHECK_CLOSE(double(bg::perimeter(geometry)), peri, 0.0001);
+ }
+
+ check_wkt(geometry, expected);
+ check_wkt(boost::variant<G>(geometry), expected);
+}
+
+template <typename G>
+void test_wkt(std::string const& wkt,
+ std::size_t n, double len = 0, double ar = 0, double peri = 0)
+{
+ test_wkt<G>(wkt, wkt, n, len, ar, peri);
+}
+
+template <typename G>
+void test_relaxed_wkt(std::string const& wkt, std::string const& expected)
+{
+ std::string e;
+ G geometry;
+ bg::read_wkt(wkt, geometry);
+ std::ostringstream out;
+ out << bg::wkt(geometry);
+
+ BOOST_CHECK_EQUAL(boost::to_upper_copy(out.str()), boost::to_upper_copy(expected));
+}
+
+
+
+
+template <typename G>
+void test_wrong_wkt(std::string const& wkt, std::string const& start)
+{
+ std::string e("no exception");
+ G geometry;
+ try
+ {
+ bg::read_wkt(wkt, geometry);
+ }
+ catch(bg::read_wkt_exception const& ex)
+ {
+ e = ex.what();
+ boost::to_lower(e);
+ }
+ catch(...)
+ {
+ e = "other exception";
+ }
+
+ bool check = true;
+
+#if defined(HAVE_TTMATH)
+ // For ttmath we skip bad lexical casts
+ typedef typename bg::coordinate_type<G>::type ct;
+
+ if (boost::is_same<ct, ttmath_big>::type::value
+ && boost::starts_with(start, "bad lexical cast"))
+ {
+ check = false;
+ }
+#endif
+
+ if (check)
+ {
+ BOOST_CHECK_MESSAGE(boost::starts_with(e, start), " Expected:"
+ << start << " Got:" << e << " with WKT: " << wkt);
+ }
+}
+
+template <typename G>
+void test_wkt_output_iterator(std::string const& wkt)
+{
+ G geometry;
+ bg::read_wkt<G>(wkt, std::back_inserter(geometry));
+}
+
+
+
+#ifndef GEOMETRY_TEST_MULTI
+template <typename T>
+void test_order_closure()
+{
+ using namespace boost::geometry;
+ typedef bg::model::point<T, 2, bg::cs::cartesian> Pt;
+ typedef bg::model::polygon<Pt, true, true> PCWC;
+ typedef bg::model::polygon<Pt, true, false> PCWO;
+ typedef bg::model::polygon<Pt, false, true> PCCWC;
+ typedef bg::model::polygon<Pt, false, false> PCCWO;
+
+ {
+ std::string wkt_cwc = "POLYGON((0 0,0 2,2 2,2 0,0 0))";
+ std::string wkt_cwo = "POLYGON((0 0,0 2,2 2,2 0))";
+ std::string wkt_ccwc = "POLYGON((0 0,2 0,2 2,0 2,0 0))";
+ std::string wkt_ccwo = "POLYGON((0 0,2 0,2 2,0 2))";
+
+ test_wkt<PCWC>(wkt_cwc, 5, 0, 4, 8);
+ test_wkt<PCWO>(wkt_cwc, 4, 0, 4, 8);
+ test_wkt<PCWO>(wkt_cwo, wkt_cwc, 4, 0, 4, 8);
+ test_wkt<PCCWC>(wkt_ccwc, 5, 0, 4, 8);
+ test_wkt<PCCWO>(wkt_ccwc, 4, 0, 4, 8);
+ test_wkt<PCCWO>(wkt_ccwo, wkt_ccwc, 4, 0, 4, 8);
+ }
+ {
+ std::string wkt_cwc = "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,2 1,2 2,1 2,1 1))";
+ std::string wkt_cwo = "POLYGON((0 0,0 3,3 3,3 0),(1 1,2 1,2 2,1 2))";
+ std::string wkt_ccwc = "POLYGON((0 0,3 0,3 3,0 3,0 0),(1 1,1 2,2 2,2 1,1 1))";
+ std::string wkt_ccwo = "POLYGON((0 0,3 0,3 3,0 3),(1 1,1 2,2 2,2 1,1 1))";
+
+ test_wkt<PCWC>(wkt_cwc, 10, 0, 8, 16);
+ test_wkt<PCWO>(wkt_cwc, 8, 0, 8, 16);
+ test_wkt<PCWO>(wkt_cwo, wkt_cwc, 8, 0, 8, 16);
+ test_wkt<PCCWC>(wkt_ccwc, 10, 0, 8, 16);
+ test_wkt<PCCWO>(wkt_ccwc, 8, 0, 8, 16);
+ test_wkt<PCCWO>(wkt_ccwo, wkt_ccwc, 8, 0, 8, 16);
+ }
+}
+
+template <typename T>
+void test_all()
+{
+ using namespace boost::geometry;
+ typedef bg::model::point<T, 2, bg::cs::cartesian> P;
+
+ test_wkt<P>("POINT(1 2)", 1);
+ test_wkt<bg::model::linestring<P> >("LINESTRING(1 1,2 2,3 3)", 3, 2 * sqrt(2.0));
+ test_wkt<bg::model::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0)"
+ ",(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))", 15, 0, 18, 24);
+
+ // Non OGC: a box defined by a polygon
+ //test_wkt<box<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 4, 0, 1, 4);
+ test_wkt<bg::model::ring<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 5, 0, 1, 4);
+
+ // We accept empty sequences as well (much better than EMPTY)...
+ // ...or even POINT() (see below)
+ test_wkt<bg::model::linestring<P> >("LINESTRING()", 0, 0);
+ test_wkt<bg::model::polygon<P> >("POLYGON(())", 0);
+ // ... or even with empty holes
+ test_wkt<bg::model::polygon<P> >("POLYGON((),(),())", 0);
+ // which all make no valid geometries, but they can exist.
+
+ // These WKT's are incomplete or abnormal but they are considered OK
+ test_relaxed_wkt<P>("POINT(1)", "POINT(1 0)");
+ test_relaxed_wkt<P>("POINT()", "POINT(0 0)");
+ test_relaxed_wkt<bg::model::linestring<P> >("LINESTRING(1,2,3)",
+ "LINESTRING(1 0,2 0,3 0)");
+ test_relaxed_wkt<P>("POINT ( 1 2) ", "POINT(1 2)");
+ test_relaxed_wkt<P>("POINT M ( 1 2)", "POINT(1 2)");
+ test_relaxed_wkt<bg::model::box<P> >("BOX(1 1,2 2)", "POLYGON((1 1,1 2,2 2,2 1,1 1))");
+
+ test_relaxed_wkt<bg::model::linestring<P> >("LINESTRING EMPTY", "LINESTRING()");
+
+ test_relaxed_wkt<bg::model::polygon<P> >("POLYGON( ( ) , ( ) , ( ) )",
+ "POLYGON((),(),())");
+
+ // Wrong WKT's
+ test_wrong_wkt<P>("POINT(1 2", "expected ')'");
+ test_wrong_wkt<P>("POINT 1 2)", "expected '('");
+ test_wrong_wkt<P>("POINT(1 2,)", "expected ')'");
+ test_wrong_wkt<P>("POINT(1 2)foo", "too many tokens at 'foo'");
+ test_wrong_wkt<P>("POINT(1 2 3)", "expected ')'");
+ test_wrong_wkt<P>("POINT(a 2 3)", "bad lexical cast");
+ test_wrong_wkt<P>("POINT 2 3", "expected '('");
+ test_wrong_wkt<P>("POINT Z (1 2 3)", "z only allowed");
+
+ test_wrong_wkt<P>("PIONT (1 2)", "should start with 'point'");
+
+ test_wrong_wkt<bg::model::linestring<P> >("LINESTRING())", "too many tokens");
+
+ test_wrong_wkt<bg::model::polygon<P> >("POLYGON((1 1,1 4,4 4,4 1,1 1)"
+ ",((2 2,2 3,3 3,3 2,2 2))", "bad lexical cast");
+
+ test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2,3 3)", "box should have 2");
+ test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2) )", "too many tokens");
+
+ if ( BOOST_GEOMETRY_CONDITION(boost::is_floating_point<T>::type::value
+ || ! boost::is_fundamental<T>::type::value ) )
+ {
+ test_wkt<P>("POINT(1.1 2.1)", 1);
+ }
+
+ // Deprecated:
+ // test_wkt_output_iterator<bg::model::linestring<P> >("LINESTRING(1 1,2 2,3 3)");
+ // test_wkt_output_iterator<bg::model::ring<P> >("POLYGON((1 1,2 2,3 3))");
+
+ test_order_closure<T>();
+}
+#endif
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ test_all<int>();
+
+#if defined(HAVE_TTMATH)
+ test_all<ttmath_big>();
+#endif
+
+ return 0;
+}
+
+/*
+
+Results can be checked in PostGIS by query below,
+or by MySQL (but replace length by glength and remove the perimeter)
+
+Note:
+- PostGIS gives "3" for a numpoints of a multi-linestring of 6 points in total (!)
+ --> "npoints" should be taken for all geometries
+- SQL Server 2008 gives "6"
+ select geometry::STGeomFromText('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))',0).STNumPoints()
+- MySQL gives "NULL"
+
+select 1 as code,'np p' as header,npoints(geomfromtext('POINT(1 2)')) as contents
+union select 2,'length point', length(geomfromtext('POINT(1 2)'))
+union select 3,'peri point', perimeter(geomfromtext('POINT(1 2)'))
+union select 4,'area point',area(geomfromtext('POINT(1 2)'))
+
+
+union select 5,'# ls',npoints(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
+union select 6,'length ls',length(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
+union select 7,'peri ls',perimeter(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
+union select 8,'aera ls',area(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
+
+union select 9,'# poly',npoints(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
+union select 10,'length poly',length(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
+union select 11,'peri poly',perimeter(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
+union select 12,'area poly',area(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
+
+*/
diff --git a/src/boost/libs/geometry/test/io/wkt/wkt_multi.cpp b/src/boost/libs/geometry/test/io/wkt/wkt_multi.cpp
new file mode 100644
index 000000000..814717456
--- /dev/null
+++ b/src/boost/libs/geometry/test/io/wkt/wkt_multi.cpp
@@ -0,0 +1,126 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+//#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <boost/algorithm/string.hpp>
+#include <boost/concept/requires.hpp>
+
+#include <boost/test/tools/floating_point_comparison.hpp>
+#include <boost/test/included/test_exec_monitor.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+template <typename T>
+void test_all();
+
+
+// Include the single test
+#define GEOMETRY_TEST_MULTI
+#include "io/wkt/wkt.cpp"
+
+template <typename T>
+void test_order_closure()
+{
+ using namespace boost::geometry;
+ typedef bg::model::point<T, 2, bg::cs::cartesian> Pt;
+ typedef bg::model::polygon<Pt, true, true> PCWC;
+ typedef bg::model::polygon<Pt, true, false> PCWO;
+ typedef bg::model::polygon<Pt, false, true> PCCWC;
+ typedef bg::model::polygon<Pt, false, false> PCCWO;
+ typedef bg::model::multi_polygon<PCWC> MPCWC;
+ typedef bg::model::multi_polygon<PCWO> MPCWO;
+ typedef bg::model::multi_polygon<PCCWC> MPCCWC;
+ typedef bg::model::multi_polygon<PCCWO> MPCCWO;
+
+ std::string wkt_cwc = "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((0 0,0 -3,-3 -3,-3 0,0 0),(-1 -1,-2 -1,-2 -2,-1 -2,-1 -1)))";
+ std::string wkt_cwo = "MULTIPOLYGON(((0 0,0 2,2 2,2 0)),((0 0,0 -3,-3 -3,-3 0),(-1 -1,-2 -1,-2 -2,-1 -2)))";
+ std::string wkt_ccwc = "MULTIPOLYGON(((0 0,2 0,2 2,0 2,0 0)),((0 0,-3 0,-3 -3,0 -3,0 0),(-1 -1,-1 -2,-2 -2,-2 -1,-1 -1)))";
+ std::string wkt_ccwo = "MULTIPOLYGON(((0 0,2 0,2 2,0 2)),((0 0,-3 0,-3 -3,0 -3),(-1 -1,-1 -2,-2 -2,-2 -1)))";
+
+ test_wkt<MPCWC>(wkt_cwc, wkt_cwc, 15, 0, 12, 24);
+ test_wkt<MPCWO>(wkt_cwc, wkt_cwc, 12, 0, 12, 24);
+ test_wkt<MPCWO>(wkt_cwo, wkt_cwc, 12, 0, 12, 24);
+ test_wkt<MPCCWC>(wkt_ccwc, wkt_ccwc, 15, 0, 12, 24);
+ test_wkt<MPCCWO>(wkt_ccwc, wkt_ccwc, 12, 0, 12, 24);
+ test_wkt<MPCCWO>(wkt_ccwo, wkt_ccwc, 12, 0, 12, 24);
+}
+
+template <typename T>
+void test_all()
+{
+ using namespace boost::geometry;
+ typedef bg::model::point<T, 2, bg::cs::cartesian> P;
+
+ test_wkt<bg::model::multi_point<P> >("multipoint((1 2),(3 4))", 2);
+ test_wkt<bg::model::multi_linestring<bg::model::linestring<P> > >("multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))", 6, 4 * sqrt(2.0));
+ test_wkt<bg::model::multi_polygon<bg::model::polygon<P> > >("multipolygon(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))", 15, 0, 21, 28);
+
+ // Support for the official alternative syntax for multipoint
+ // (provided by Aleksey Tulinov):
+ test_relaxed_wkt<bg::model::multi_point<P> >("multipoint(1 2,3 4)", "multipoint((1 2),(3 4))");
+
+ test_wrong_wkt<bg::model::multi_polygon<bg::model::polygon<P> > >(
+ "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),(0 0,0 4,4 4,4 0,0 0)))",
+ "expected '('");
+
+ test_wrong_wkt<bg::model::multi_linestring<bg::model::linestring<P> > >(
+ "MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)), (0 0, 1 1)",
+ "too many tokens at ','");
+
+ test_wrong_wkt<bg::model::multi_point<P> >(
+ "MULTIPOINT((8 9), 10 11)",
+ "expected '(' at '10'");
+ test_wrong_wkt<bg::model::multi_point<P> >(
+ "MULTIPOINT(12 13, (14 15))",
+ "bad lexical cast: source type value could not be interpreted as target at '(' in 'multipoint(12 13, (14 15))'");
+ test_wrong_wkt<bg::model::multi_point<P> >(
+ "MULTIPOINT((16 17), (18 19)",
+ "expected ')' in 'multipoint((16 17), (18 19)'");
+ test_wrong_wkt<bg::model::multi_point<P> >(
+ "MULTIPOINT(16 17), (18 19)",
+ "too many tokens at ',' in 'multipoint(16 17), (18 19)'");
+
+ test_order_closure<T>();
+}
+
+/*
+
+... see comments in "wkt.cpp"
+
+union select 13,'# mpoint',npoints(geomfromtext('MULTIPOINT((1 2),(3 4))'))
+union select 14,'length mpoint',length(geomfromtext('MULTIPOINT((1 2),(3 4))'))
+union select 15,'peri mpoint',perimeter(geomfromtext('MULTIPOINT((1 2),(3 4))'))
+union select 16,'area mpoint',area(geomfromtext('MULTIPOINT((1 2),(3 4))'))
+
+union select 17,'# mls',npoints(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
+union select 18,'length mls',length(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
+union select 19,'peri mls',perimeter(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
+union select 20,'area mls',area(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
+
+union select 21,'# mpoly',npoints(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
+union select 22,'length mpoly',length(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
+union select 23,'peri mpoly',perimeter(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
+union select 24,'area mpoly',area(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
+
+*/
diff --git a/src/boost/libs/geometry/test/iterators/Jamfile b/src/boost/libs/geometry/test/iterators/Jamfile
new file mode 100644
index 000000000..c9b54e961
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/Jamfile
@@ -0,0 +1,25 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015.
+# Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-iterators
+ :
+ [ run closing_iterator.cpp : : : : iterators_closing_iterator ]
+ [ run concatenate_iterator.cpp : : : : iterators_concatenate_iterator ]
+ [ run ever_circling_iterator.cpp : : : : iterators_ever_circling_iterator ]
+ [ run flatten_iterator.cpp : : : : iterators_flatten_iterator ]
+ [ run point_iterator.cpp : : : : iterators_point_iterator ]
+ [ run segment_iterator.cpp : : : : iterators_segment_iterator ]
+ ;
diff --git a/src/boost/libs/geometry/test/iterators/closing_iterator.cpp b/src/boost/libs/geometry/test/iterators/closing_iterator.cpp
new file mode 100644
index 000000000..9ac43634b
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/closing_iterator.cpp
@@ -0,0 +1,174 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/iterators/closing_iterator.hpp>
+
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/range/adaptor/transformed.hpp>
+
+
+// The closing iterator should also work on normal std:: containers
+void test_empty_non_geometry()
+{
+ std::vector<int> v;
+
+ typedef bg::closing_iterator
+ <
+ std::vector<int> const
+ > closing_iterator;
+
+
+ closing_iterator it(v);
+ closing_iterator end(v, true);
+
+ std::ostringstream out;
+ for (; it != end; ++it)
+ {
+ out << *it;
+ }
+ BOOST_CHECK_EQUAL(out.str(), "");
+}
+
+void test_non_geometry()
+{
+ std::vector<int> v;
+ v.push_back(1);
+ v.push_back(2);
+ v.push_back(3);
+
+ typedef bg::closing_iterator
+ <
+ std::vector<int> const
+ > closing_iterator;
+
+
+ closing_iterator it(v);
+ closing_iterator end(v, true);
+
+ std::ostringstream out;
+ for (; it != end; ++it)
+ {
+ out << *it;
+ }
+ BOOST_CHECK_EQUAL(out.str(), "1231");
+}
+
+void test_transformed_non_geometry()
+{
+ std::vector<int> v;
+ v.push_back(-1);
+ v.push_back(-2);
+ v.push_back(-3);
+
+ typedef boost::transformed_range
+ <
+ std::negate<int>,
+ std::vector<int>
+ > transformed_range;
+
+ typedef bg::closing_iterator
+ <
+ transformed_range const
+ > closing_iterator;
+
+ transformed_range v2 = v | boost::adaptors::transformed(std::negate<int>());
+ closing_iterator it(v2);
+ closing_iterator end(v2, true);
+
+ std::ostringstream out;
+ for (; it != end; ++it)
+ {
+ out << *it;
+ }
+ BOOST_CHECK_EQUAL(out.str(), "1231");
+}
+
+
+
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt)
+{
+ Geometry geometry;
+ bg::read_wkt(wkt, geometry);
+ typedef bg::closing_iterator<Geometry const> closing_iterator;
+
+
+ // 1. Test normal behaviour
+ {
+ closing_iterator it(geometry);
+ closing_iterator end(geometry, true);
+
+ std::ostringstream out;
+ for (; it != end; ++it)
+ {
+ out << " " << bg::get<0>(*it) << bg::get<1>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), " 11 14 44 41 11");
+
+ // Check compilations, it is (since Oct 2010) random access
+ it--;
+ --it;
+ it += 2;
+ it -= 2;
+ }
+
+ // 2: check copy behaviour
+ {
+ typedef typename boost::range_iterator<Geometry const>::type normal_iterator;
+ Geometry copy;
+
+ std::copy<closing_iterator>(
+ closing_iterator(geometry),
+ closing_iterator(geometry, true),
+ std::back_inserter(copy));
+
+ std::ostringstream out;
+ for (normal_iterator cit = boost::begin(copy); cit != boost::end(copy); ++cit)
+ {
+ out << " " << bg::get<0>(*cit) << bg::get<1>(*cit);
+ }
+ BOOST_CHECK_EQUAL(out.str(), " 11 14 44 41 11");
+ }
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_empty_non_geometry();
+ test_non_geometry();
+ test_transformed_non_geometry();
+ test_geometry<bg::model::ring<P> >("POLYGON((1 1,1 4,4 4,4 1))");
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/iterators/concatenate_iterator.cpp b/src/boost/libs/geometry/test/iterators/concatenate_iterator.cpp
new file mode 100644
index 000000000..15de3082a
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/concatenate_iterator.cpp
@@ -0,0 +1,259 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_concatenate_iterator
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <cstddef>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <algorithm>
+#include <iterator>
+
+#include <vector>
+#include <list>
+
+#include <boost/assign/std/vector.hpp>
+#include <boost/assign/std/list.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include "test_iterator_common.hpp"
+
+#include <boost/geometry/iterators/concatenate_iterator.hpp>
+
+using namespace boost::assign;
+
+
+struct test_concatenate_iterator
+{
+ template
+ <
+ typename ConcatenateIterator,
+ typename ConstConcatenateIterator,
+ typename Container
+ >
+ static inline
+ void test_using_max_element(ConcatenateIterator first,
+ ConcatenateIterator beyond,
+ ConstConcatenateIterator const_first,
+ ConstConcatenateIterator const_beyond,
+ Container const& c,
+ std::size_t other_size,
+ bool second_container)
+ {
+ typedef typename std::iterator_traits
+ <
+ ConcatenateIterator
+ >::value_type value_type;
+
+ if ( c.size() == 0 )
+ {
+ return;
+ }
+
+ ConcatenateIterator c_first = first;
+ if ( second_container )
+ {
+ std::size_t counter(0);
+ while ( counter != other_size )
+ {
+ ++counter;
+ c_first++;
+ }
+ }
+
+ ConcatenateIterator it_max = std::max_element(first, beyond);
+ ConstConcatenateIterator const_it_max =
+ std::max_element(const_first, const_beyond);
+
+ BOOST_CHECK( it_max == const_it_max );
+ BOOST_CHECK( *it_max == *const_it_max );
+
+ value_type old_value = *c_first;
+ value_type new_value = *it_max + 1;
+
+ *c_first = *it_max + 1;
+ BOOST_CHECK( *c.begin() == new_value );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "modified element of ";
+ std::cout << (second_container ? "2nd" : "1st");
+ std::cout << " container:" << std::endl;
+ print_container(std::cout, c.begin(), c.end(),
+ (second_container ? "second :" : "first :"))
+ << std::endl;
+ print_container(std::cout, first, beyond, "combined:") << std::endl;
+#endif
+
+ *c_first = old_value;
+ BOOST_CHECK( *c.begin() == old_value );
+ }
+
+
+ template <typename Container1, typename Container2>
+ static inline void apply(Container1& c1, Container2& c2,
+ std::string const& case_id,
+ std::string const& containers_id)
+ {
+ boost::ignore_unused(case_id, containers_id);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::stringstream sstream;
+ sstream << case_id << " [" << containers_id << "]";
+
+ std::cout << "case id: " << sstream.str() << std::endl;
+#endif
+ typedef typename Container1::const_iterator const_iterator1;
+ typedef typename Container2::const_iterator const_iterator2;
+ typedef typename Container1::iterator iterator1;
+ typedef typename Container2::iterator iterator2;
+
+ typedef boost::geometry::concatenate_iterator
+ <
+ const_iterator1, const_iterator2,
+ typename Container1::value_type const
+ > const_concat_iterator;
+
+ typedef boost::geometry::concatenate_iterator
+ <
+ iterator1, iterator2, typename Container1::value_type
+ > concat_iterator;
+
+ typedef typename std::iterator_traits
+ <
+ concat_iterator
+ >::value_type value_type;
+
+ // test constructors/assignment operators
+ concat_iterator begin(c1.begin(), c1.end(), c2.begin(), c2.begin());
+ concat_iterator end(c1.end(), c2.begin(), c2.end());
+ const_concat_iterator const_begin(begin);
+ const_concat_iterator const_end(end);
+ const_begin = begin;
+ const_end = end;
+
+ concat_iterator begin2(c1.end(), c1.end(), c2.begin(), c2.begin());
+ const_concat_iterator const_begin2(c1.end(), c1.end(),
+ c2.begin(), c2.begin());
+
+ BOOST_CHECK( c1.empty() || *begin == *c1.begin() );
+ BOOST_CHECK( c1.empty() || *const_begin == *c1.begin() );
+
+ BOOST_CHECK( c2.empty() || *begin2 == *c2.begin() );
+ BOOST_CHECK( c2.empty() || *const_begin2 == *c2.begin() );
+
+
+ // test copying, dereferencing and element equality
+ std::vector<value_type> combined;
+ std::copy(c1.begin(), c1.end(), std::back_inserter(combined));
+ std::copy(c2.begin(), c2.end(), std::back_inserter(combined));
+ test_equality(begin, end, combined);
+
+ combined.clear();
+ std::copy(begin, end, std::back_inserter(combined));
+ test_equality(begin, end, combined);
+ test_equality(const_begin, const_end, combined);
+
+ combined.clear();
+ std::copy(const_begin, const_end, std::back_inserter(combined));
+ test_equality(begin, end, combined);
+ test_equality(const_begin, const_end, combined);
+
+ // test sizes (and std::distance)
+ test_size(begin, end, combined);
+ test_size(const_begin, const_end, combined);
+
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_container(std::cout, c1.begin(), c1.end(), "first :")
+ << std::endl;
+ print_container(std::cout, c2.begin(), c2.end(), "second :")
+ << std::endl;
+ print_container(std::cout, begin, end, "combined:")
+ << std::endl;
+
+ if ( begin != end )
+ {
+ std::cout << "min element: "
+ << *std::min_element(begin, end)
+ << std::endl;
+ std::cout << "max element: "
+ << *std::max_element(const_begin, const_end)
+ << std::endl;
+ }
+#endif
+
+ // perform reversals (std::reverse)
+ test_using_reverse(begin, end, combined);
+
+ // test std::max_element, dereferencing and value assigment
+ test_using_max_element(begin, end, const_begin, const_end,
+ c1, c2.size(), false);
+ test_using_max_element(begin, end, const_begin, const_end,
+ c2, c1.size(), true);
+
+ // test std::count_if / std::remove_if
+ test_using_remove_if(begin, end, combined);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "====================" << std::endl << std::endl;
+#endif
+ }
+};
+
+
+template <typename Container1, typename Container2>
+inline void test_concatenation_of_containers(Container1& c1, Container2& c2,
+ std::string const& containers_id)
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+ std::cout << "************************************" << std::endl
+ << " TESTING CONTAINERS COMBINATION: "
+ << containers_id << std::endl
+ << "************************************" << std::endl
+ << std::endl;
+#endif
+
+ c1.clear();
+ c2.clear();
+ test_concatenate_iterator::apply(c1, c2, "empty_both", containers_id);
+
+ c2 += 10,11,12,13,14,15,16,17,18,19,20;
+ test_concatenate_iterator::apply(c1, c2, "empty_first", containers_id);
+
+ c2.clear();
+ c1 += 0,1,2,3,4,5,6;
+ test_concatenate_iterator::apply(c1, c2, "empty_second", containers_id);
+
+ c1.clear();
+ c2.clear();
+ c1 += 0,1,2,3,4,5,6;
+ c2 += 10,11,12,13,14,15,16,17,18,19,20;
+ test_concatenate_iterator::apply(c1, c2, "non_empty", containers_id);
+}
+
+
+BOOST_AUTO_TEST_CASE( test_concatenate_iterator_all )
+{
+ std::vector<int> v, vv;
+ std::list<int> l, ll;
+
+ test_concatenation_of_containers(v, vv, "VV");
+ test_concatenation_of_containers(v, l, "VL");
+ test_concatenation_of_containers(l, v, "LV");
+ test_concatenation_of_containers(l, ll, "LL");
+}
diff --git a/src/boost/libs/geometry/test/iterators/ever_circling_iterator.cpp b/src/boost/libs/geometry/test/iterators/ever_circling_iterator.cpp
new file mode 100644
index 000000000..835a7b5a3
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/ever_circling_iterator.cpp
@@ -0,0 +1,143 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/iterators/ever_circling_iterator.hpp>
+
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+
+#include <boost/range/adaptor/transformed.hpp>
+
+
+template <typename G>
+void test_geometry(G const& geo)
+{
+ typedef typename boost::range_iterator<G const>::type iterator_type;
+
+
+ // Run 3 times through the geometry
+ std::size_t n = boost::size(geo) * 3;
+
+ {
+ std::ostringstream out;
+ bg::ever_circling_iterator<iterator_type> it(boost::begin(geo), boost::end(geo));
+ for (std::size_t i = 0; i < n; ++i, ++it)
+ {
+ out << bg::get<0>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), "123451234512345");
+ }
+
+ {
+ std::ostringstream out;
+ // Start somewhere
+ bg::ever_circling_iterator<iterator_type> it(
+ boost::begin(geo), boost::end(geo), boost::begin(geo) + 1);
+ for (std::size_t i = 0; i < n; ++i, ++it)
+ {
+ out << bg::get<0>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), "234512345123451");
+ }
+
+ {
+ std::ostringstream out;
+
+ // Navigate to somewhere
+ bg::ever_circling_iterator<iterator_type> it(boost::begin(geo), boost::end(geo));
+ for (std::size_t i = 0; i < n; ++i, ++it)
+ {
+ std::size_t const m = boost::size(geo);
+ it.moveto(boost::begin(geo) + m - (i % m) - 1);
+ out << bg::get<0>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), "543215432154321");
+ }
+
+ // Check the range_iterator-one
+ {
+ std::ostringstream out;
+ bg::ever_circling_range_iterator<G const> it(geo);
+ for (std::size_t i = 0; i < n; ++i, ++it)
+ {
+ out << bg::get<0>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), "123451234512345");
+ }
+}
+
+template <typename G>
+void test_geometry(std::string const& wkt)
+{
+ G geo;
+ bg::read_wkt(wkt, geo);
+ test_geometry(geo);
+}
+
+
+template <typename P>
+P transform_point(P const& p)
+{
+ P result;
+ bg::set<0>(result, bg::get<0>(p) + 1);
+ bg::set<1>(result, bg::get<1>(p) + 1);
+ return result;
+}
+
+template <typename G>
+struct transformed_geometry_type
+{
+ typedef typename bg::point_type<G>::type point_type;
+ typedef boost::transformed_range<point_type(*)(point_type const&), G> type;
+};
+
+template <typename G>
+void test_transformed_geometry(G const& geo)
+{
+ typedef typename bg::point_type<G>::type point_type;
+ test_geometry(geo | boost::adaptors::transformed(&transform_point<point_type>));
+}
+
+template <typename G>
+void test_transformed_geometry(std::string const& wkt)
+{
+ G geo;
+ bg::read_wkt(wkt, geo);
+ test_transformed_geometry(geo);
+}
+
+
+BOOST_GEOMETRY_REGISTER_LINESTRING(transformed_geometry_type< bg::model::linestring< bg::model::d2::point_xy<double> > >::type)
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::linestring<P> >("linestring(1 1,2 2,3 3,4 4,5 5)");
+ test_transformed_geometry<bg::model::linestring<P> >("linestring(0 0,1 1,2 2,3 3,4 4)");
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/iterators/flatten_iterator.cpp b/src/boost/libs/geometry/test/iterators/flatten_iterator.cpp
new file mode 100644
index 000000000..9f989594e
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/flatten_iterator.cpp
@@ -0,0 +1,368 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_flatten_iterator
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <cstddef>
+#include <iostream>
+#include <string>
+#include <sstream>
+#include <algorithm>
+#include <iterator>
+
+#include <vector>
+#include <list>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/assign/std/vector.hpp>
+#include <boost/assign/std/list.hpp>
+#include <boost/assign/std/set.hpp>
+
+#include "test_iterator_common.hpp"
+
+#include <boost/geometry/iterators/flatten_iterator.hpp>
+
+using namespace boost::assign;
+
+
+template <typename InnerContainer>
+struct access_begin
+{
+ typedef typename boost::mpl::if_
+ <
+ typename boost::is_const<InnerContainer>::type,
+ typename InnerContainer::const_iterator,
+ typename InnerContainer::iterator
+ >::type return_type;
+
+ static inline return_type apply(InnerContainer& inner)
+ {
+ return inner.begin();
+ }
+};
+
+
+template <typename InnerContainer>
+struct access_end
+{
+ typedef typename boost::mpl::if_
+ <
+ typename boost::is_const<InnerContainer>::type,
+ typename InnerContainer::const_iterator,
+ typename InnerContainer::iterator
+ >::type return_type;
+
+ static inline return_type apply(InnerContainer& inner)
+ {
+ return inner.end();
+ }
+};
+
+
+template <typename NestedContainer>
+inline std::size_t number_of_elements(NestedContainer const& c)
+{
+ std::size_t num_elements(0);
+ for (typename NestedContainer::const_iterator outer = c.begin();
+ outer != c.end(); ++outer)
+ {
+ num_elements += outer->size();
+ }
+ return num_elements;
+}
+
+
+struct test_flatten_iterator
+{
+ template
+ <
+ typename FlattenIterator,
+ typename ConstFlattenIterator,
+ typename NestedContainer
+ >
+ static inline
+ void test_using_max_element(FlattenIterator first,
+ FlattenIterator beyond,
+ ConstFlattenIterator const_first,
+ ConstFlattenIterator const_beyond,
+ NestedContainer const& c)
+ {
+ typedef typename std::iterator_traits
+ <
+ FlattenIterator
+ >::value_type value_type;
+
+ typedef typename NestedContainer::const_iterator const_outer_iterator;
+ typedef typename NestedContainer::value_type inner_container;
+ typedef typename inner_container::const_iterator const_inner_iterator;
+
+ if ( first == beyond )
+ {
+ return;
+ }
+
+ FlattenIterator it_max = std::max_element(first, beyond);
+ ConstFlattenIterator const_it_max =
+ std::max_element(const_first, const_beyond);
+
+ BOOST_CHECK( it_max == const_it_max );
+ BOOST_CHECK( *it_max == *const_it_max );
+
+ value_type old_value = *const_first;
+ value_type new_value = *it_max + 1;
+
+ *first = *it_max + 1;
+ const_outer_iterator outer = c.begin();
+ while ( outer->begin() == outer->end() )
+ {
+ ++outer;
+ }
+ const_inner_iterator inner = outer->begin();
+
+ BOOST_CHECK( *inner == new_value );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "modified 1st element of 1st non-empty "
+ << "inner container:" << std::endl;
+ print_nested_container(std::cout, c.begin(), c.end(), "nested :")
+ << std::endl;
+ print_container(std::cout, first, beyond, "flattened:") << std::endl;
+#endif
+
+ *first = old_value;
+ BOOST_CHECK( *inner == old_value );
+ }
+
+ template <typename NestedContainer>
+ static inline void apply(NestedContainer& c,
+ std::string const& case_id,
+ std::string const& container_id)
+ {
+ boost::ignore_unused(case_id, container_id);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::stringstream sstream;
+ sstream << case_id << " [" << container_id << "]";
+
+ std::cout << "case id: " << sstream.str() << std::endl;
+#endif
+ typedef typename NestedContainer::const_iterator const_outer_iterator;
+ typedef typename NestedContainer::iterator outer_iterator;
+ typedef typename NestedContainer::value_type inner_container;
+
+ typedef typename inner_container::const_iterator const_inner_iterator;
+ typedef typename inner_container::iterator inner_iterator;
+
+ typedef boost::geometry::flatten_iterator
+ <
+ const_outer_iterator,
+ const_inner_iterator,
+ typename inner_container::value_type const,
+ access_begin<inner_container const>,
+ access_end<inner_container const>
+ > const_flatten_iterator;
+
+ typedef boost::geometry::flatten_iterator
+ <
+ outer_iterator,
+ inner_iterator,
+ typename inner_container::value_type,
+ access_begin<inner_container>,
+ access_end<inner_container>
+ > flatten_iterator;
+
+ typedef typename std::iterator_traits
+ <
+ flatten_iterator
+ >::value_type value_type;
+
+ flatten_iterator begin(c.begin(), c.end());
+ flatten_iterator end(c.end());
+ const_flatten_iterator const_begin(begin);
+ const_flatten_iterator const_end(end);
+ const_begin = begin;
+ const_end = end;
+
+ // test copying, dereferencing and element equality
+ std::vector<value_type> combined;
+ for (const_outer_iterator outer = c.begin();
+ outer != c.end(); ++outer)
+ {
+ std::copy(outer->begin(), outer->end(),
+ std::back_inserter(combined));
+ }
+ test_equality(begin, end, combined);
+ test_equality(const_begin, const_end, combined);
+
+ combined.clear();
+ std::copy(begin, end, std::back_inserter(combined));
+ test_equality(begin, end, combined);
+ test_equality(const_begin, const_end, combined);
+
+ combined.clear();
+ std::copy(const_begin, const_end, std::back_inserter(combined));
+ test_equality(begin, end, combined);
+ test_equality(const_begin, const_end, combined);
+
+ // test sizes (and std::distance)
+ test_size(begin, end, combined);
+ test_size(const_begin, const_end, combined);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_nested_container(std::cout, c.begin(), c.end(), "nested :")
+ << std::endl;
+ print_container(std::cout, begin, end, "flattened :")
+ << std::endl;
+
+ if ( begin != end )
+ {
+ std::cout << "min element: "
+ << *std::min_element(begin, end)
+ << std::endl;
+ std::cout << "max element: "
+ << *std::max_element(const_begin, const_end)
+ << std::endl;
+ }
+#endif
+
+ // perform reversals (std::reverse)
+ test_using_reverse(begin, end, combined);
+
+ // test std::max_element, dereferencing and value assigment
+ test_using_max_element(begin, end, const_begin, const_end, c);
+
+ // test std::count_if / std::remove_if
+ test_using_remove_if(begin, end, combined);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "====================" << std::endl << std::endl;
+#endif
+ }
+};
+
+
+
+// the actual test cases -- START
+template <int CaseNumber>
+struct test_case_per_container;
+
+template<>
+struct test_case_per_container<0>
+{
+ template <typename NestedContainer>
+ static inline void apply(std::string const& case_id,
+ std::string const& container_id)
+ {
+ NestedContainer c;
+ test_flatten_iterator::apply(c, case_id, container_id);
+ }
+};
+
+template<>
+struct test_case_per_container<1>
+{
+ template <typename NestedContainer>
+ static inline void apply(std::string const& case_id,
+ std::string const& container_id)
+ {
+ NestedContainer c;
+ for (int i = 0; i < 5; ++i)
+ {
+ c += typename NestedContainer::value_type();
+ }
+ test_flatten_iterator::apply(c, case_id, container_id);
+ }
+};
+
+template<>
+struct test_case_per_container<2>
+{
+ template <typename NestedContainer>
+ static inline void apply(std::string const& case_id,
+ std::string const& container_id)
+ {
+ NestedContainer c;
+ typename NestedContainer::value_type ic[4];
+
+ ic[0] += 5,4,3,2,1;
+ ic[1] += 6,7,8;
+ ic[2] += 9;
+ ic[3] += 9,8,7,6,5;
+ c += ic[0],ic[1],ic[2],ic[3];
+
+ test_flatten_iterator::apply(c, case_id, container_id);
+ }
+};
+
+template<>
+struct test_case_per_container<3>
+{
+ template <typename NestedContainer>
+ static inline void apply(std::string const& case_id,
+ std::string const& container_id)
+ {
+ NestedContainer c;
+ typename NestedContainer::value_type ic[20];
+
+ ic[2] += 5,4,3,2,1;
+ ic[3] += 6,7,8;
+ ic[8] += 9;
+ ic[9] += 9,8,7,6,5;
+ ic[14] += 4,3,2,1;
+ for (std::size_t i = 0; i < 20; ++i)
+ {
+ c += ic[i];
+ }
+
+ test_flatten_iterator::apply(c, case_id, container_id);
+ }
+};
+// the actual test cases -- END
+
+
+
+template <int CaseNumber>
+inline void test_case_all_containers(std::string const& case_id)
+{
+ typedef typename std::vector<std::vector<int> > VV;
+ typedef typename std::vector<std::list<int> > VL;
+ typedef typename std::list<std::vector<int> > LV;
+ typedef typename std::list<std::list<int> > LL;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+#endif
+ test_case_per_container<CaseNumber>::template apply<VV>(case_id, "VV");
+ test_case_per_container<CaseNumber>::template apply<VL>(case_id, "VL");
+ test_case_per_container<CaseNumber>::template apply<LV>(case_id, "LV");
+ test_case_per_container<CaseNumber>::template apply<LL>(case_id, "LL");
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "********************************************************"
+ << std::endl << std::endl;
+#endif
+}
+
+
+
+BOOST_AUTO_TEST_CASE( test_flatten_iterator_all )
+{
+ test_case_all_containers<0>("empty");
+ test_case_all_containers<1>("case1");
+ test_case_all_containers<2>("case2");
+ test_case_all_containers<3>("case3");
+}
diff --git a/src/boost/libs/geometry/test/iterators/point_iterator.cpp b/src/boost/libs/geometry/test/iterators/point_iterator.cpp
new file mode 100644
index 000000000..346021420
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/point_iterator.cpp
@@ -0,0 +1,881 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_point_iterator
+#endif
+
+#include <cstddef>
+#include <iostream>
+#include <string>
+#include <iterator>
+#include <algorithm>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/concept_check.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/iterator/iterator_concepts.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/optional.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+#include <boost/geometry/core/point_type.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/geometry/geometries/register/multi_point.hpp>
+
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+
+#include <boost/geometry/policies/compare.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/iterators/point_iterator.hpp>
+#include <boost/geometry/iterators/point_reverse_iterator.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <test_common/with_pointer.hpp>
+#include <test_geometries/copy_on_dereference_geometries.hpp>
+
+// At the end because of conflicts with Boost.QVM
+#include <boost/assign/list_of.hpp>
+
+
+namespace bg = ::boost::geometry;
+namespace ba = ::boost::assign;
+
+typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
+typedef bg::model::point<double, 3, bg::cs::cartesian> point_type_3d;
+typedef bg::model::linestring<point_type> linestring_type;
+typedef bg::model::polygon<point_type, false, false> polygon_type; //ccw, open
+
+// multi geometries
+typedef bg::model::multi_point<point_type> multi_point_type;
+typedef bg::model::multi_point<point_type_3d> multi_point_type_3d;
+typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
+typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+typedef boost::tuple<double, double> tuple_point_type;
+typedef boost::tuple<double, double, double> tuple_point_type_3d;
+typedef std::vector<tuple_point_type> tuple_multi_point_type;
+typedef std::vector<tuple_point_type_3d> tuple_multi_point_type_3d;
+
+template <typename T>
+struct vector_as_multipoint : std::vector<T> {};
+
+template <typename T>
+struct vector_as_linestring : std::vector<T> {};
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_MULTI_POINT(tuple_multi_point_type)
+BOOST_GEOMETRY_REGISTER_MULTI_POINT(tuple_multi_point_type_3d)
+
+BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(vector_as_multipoint)
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(vector_as_linestring)
+
+
+
+template <typename Geometry>
+inline Geometry from_wkt(std::string const& wkt)
+{
+ Geometry geometry;
+ boost::geometry::read_wkt(wkt, geometry);
+ return geometry;
+}
+
+
+// this function is implemented because std::max_element() requires ForwardIterator
+// but bg::point_iterator<> is InputIterator since it returns non-true reference
+template <typename InputIt, typename Pred>
+inline boost::optional<typename std::iterator_traits<InputIt>::value_type>
+max_value(InputIt first, InputIt last, Pred pred)
+{
+ typedef typename std::iterator_traits<InputIt>::value_type value_type;
+ if (first != last)
+ {
+ value_type found = *first++;
+ for (; first != last; )
+ {
+ value_type current = *first++;
+ if (pred(current, found))
+ found = current;
+ }
+ return found;
+ }
+ return boost::none;
+}
+
+
+template <typename Iterator>
+inline std::ostream& print_point_range(std::ostream& os,
+ Iterator first,
+ Iterator beyond,
+ std::string const& header)
+{
+ os << header << "(";
+ for (Iterator it = first; it != beyond; ++it)
+ {
+ os << " " << bg::dsv(*it);
+ }
+ os << " )";
+ return os;
+}
+
+
+template
+<
+ typename Geometry,
+ bool Enable = true,
+ bool IsConst = boost::is_const<Geometry>::value
+>
+struct test_iterator_concepts
+{
+ typedef bg::point_iterator<Geometry> iterator;
+ BOOST_CONCEPT_ASSERT((boost::BidirectionalIteratorConcept<iterator>));
+ BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIteratorConcept<iterator>));
+ BOOST_CONCEPT_ASSERT((boost_concepts::LvalueIteratorConcept<iterator>));
+ BOOST_CONCEPT_ASSERT
+ ((boost_concepts::BidirectionalTraversalConcept<iterator>));
+};
+
+template <typename Geometry>
+struct test_iterator_concepts<Geometry, true, false>
+ : test_iterator_concepts<Geometry, true, true>
+{
+ typedef bg::point_iterator<Geometry> iterator;
+ BOOST_CONCEPT_ASSERT
+ ((boost::Mutable_BidirectionalIteratorConcept<iterator>));
+ BOOST_CONCEPT_ASSERT
+ ((boost_concepts::WritableIteratorConcept<iterator>));
+ BOOST_CONCEPT_ASSERT
+ ((boost_concepts::SwappableIteratorConcept<iterator>));
+};
+
+template <typename Geometry, bool IsConst>
+struct test_iterator_concepts<Geometry, false, IsConst>
+{};
+
+
+
+struct equals
+{
+ template <typename Iterator>
+ static inline std::size_t number_of_elements(Iterator begin,
+ Iterator end)
+ {
+ std::size_t size = std::distance(begin, end);
+
+ std::size_t num_elems(0);
+ for (Iterator it = begin; it != end; ++it)
+ {
+ ++num_elems;
+ }
+ BOOST_CHECK(size == num_elems);
+
+ num_elems = 0;
+ for (Iterator it = end; it != begin; --it)
+ {
+ ++num_elems;
+ }
+ BOOST_CHECK(size == num_elems);
+
+ return num_elems;
+ }
+
+ template <typename Iterator1, typename Iterator2>
+ static inline bool apply(Iterator1 begin1, Iterator1 end1,
+ Iterator2 begin2, Iterator2 end2)
+ {
+ std::size_t num_points1 = number_of_elements(begin1, end1);
+ std::size_t num_points2 = number_of_elements(begin2, end2);
+
+ if (num_points1 != num_points2)
+ {
+ return false;
+ }
+
+ Iterator1 it1 = begin1;
+ Iterator2 it2 = begin2;
+ for (; it1 != end1; ++it1, ++it2)
+ {
+ if (! bg::equals(*it1, *it2))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+};
+
+
+template <bool Enable = true>
+struct test_assignment
+{
+ template <typename Iterator, typename ConstIterator, typename Value>
+ static inline void apply(Iterator it, ConstIterator cit,
+ Value const& value1, Value const& value2)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "== before assignment ==" << std::endl;
+ std::cout << "value1: " << bg::wkt(value1) << std::endl;
+ std::cout << "value2: " << bg::wkt(value2) << std::endl;
+ std::cout << "*it : " << bg::wkt(*it) << std::endl;
+ std::cout << "*cit : " << bg::wkt(*cit) << std::endl;
+#endif
+
+ BOOST_CHECK(bg::equals(*it, value1));
+ BOOST_CHECK(! bg::equals(*it, value2));
+ BOOST_CHECK(bg::equals(*cit, value1));
+ BOOST_CHECK(! bg::equals(*cit, value2));
+
+ *it = value2;
+ BOOST_CHECK(bg::equals(*it, value2));
+ BOOST_CHECK(! bg::equals(*it, value1));
+ BOOST_CHECK(bg::equals(*cit, value2));
+ BOOST_CHECK(! bg::equals(*cit, value1));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "== after 1st assignment ==" << std::endl;
+ std::cout << "value1: " << bg::wkt(value1) << std::endl;
+ std::cout << "value2: " << bg::wkt(value2) << std::endl;
+ std::cout << "*it : " << bg::wkt(*it) << std::endl;
+ std::cout << "*cit : " << bg::wkt(*cit) << std::endl;
+#endif
+
+ *it = value1;
+ BOOST_CHECK(bg::equals(*it, value1));
+ BOOST_CHECK(! bg::equals(*it, value2));
+ BOOST_CHECK(bg::equals(*cit, value1));
+ BOOST_CHECK(! bg::equals(*cit, value2));
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "== after 2nd assignment ==" << std::endl;
+ std::cout << "value1: " << bg::wkt(value1) << std::endl;
+ std::cout << "value2: " << bg::wkt(value2) << std::endl;
+ std::cout << "*it : " << bg::wkt(*it) << std::endl;
+ std::cout << "*cit : " << bg::wkt(*cit) << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+};
+
+template <>
+struct test_assignment<false>
+{
+ template <typename Iterator, typename ConstIterator, typename Value>
+ static inline void apply(Iterator, ConstIterator,
+ Value const&, Value const&)
+ {
+ }
+};
+
+
+template
+<
+ typename Geometry,
+ typename PointRange,
+ bool EnableConceptChecks = true
+>
+struct test_point_iterator_of_geometry
+{
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ template <typename G>
+ static inline void base_test(G& geometry,
+ PointRange const& point_range,
+ std::string const& header)
+ {
+ typedef bg::point_iterator<G> point_iterator;
+
+ test_iterator_concepts<G, EnableConceptChecks>();
+
+ point_iterator begin = bg::points_begin(geometry);
+ point_iterator end = bg::points_end(geometry);
+
+ BOOST_CHECK(std::size_t(std::distance(begin, end))
+ ==
+ bg::num_points(geometry));
+
+ BOOST_CHECK(equals::apply(begin, end,
+ bg::points_begin(point_range),
+ bg::points_end(point_range))
+ );
+
+ boost::ignore_unused(header);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << header << " geometry: " << bg::wkt(geometry) << std::endl;
+ print_point_range(std::cout, begin, end, "point range: ");
+ std::cout << std::endl;
+
+ typedef bg::point_iterator<PointRange const> point_range_iterator;
+
+ print_point_range(std::cout,
+ bg::points_begin(point_range),
+ bg::points_end(point_range),
+ "expected point range: ");
+ std::cout << std::endl;
+#endif
+ }
+
+ template <typename G, bool Enable>
+ struct test_reverse
+ {
+ template <typename Iterator>
+ static inline void apply(Iterator first, Iterator last,
+ G const& geometry)
+ {
+ boost::ignore_unused(geometry);
+
+ std::reverse(first, last);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_point_range(std::cout, first, last, "reversed:\n")
+ << std::endl;
+ std::cout << bg::wkt(geometry) << std::endl;
+ std::cout << std::endl;
+#endif
+
+ std::reverse(first, last);
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_point_range(std::cout, first, last, "re-reversed:\n")
+ << std::endl;
+ std::cout << bg::wkt(geometry) << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+ };
+
+ template <typename G>
+ struct test_reverse<G, false>
+ {
+ template <typename Iterator>
+ static inline void apply(Iterator, Iterator, G const&)
+ {
+ }
+ };
+
+ static inline void apply(Geometry geometry,
+ PointRange const& point_range,
+ point_type const& zero_point)
+ {
+ base_test<Geometry>(geometry, point_range, "non-const");
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+#endif
+
+ base_test<Geometry const>(geometry, point_range, "const");
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+#endif
+
+ // testing construction of const and non-const iterator
+ typedef bg::point_iterator<Geometry> point_iterator;
+ typedef bg::point_iterator<Geometry const> const_point_iterator;
+
+ point_iterator begin = bg::points_begin(geometry);
+ point_iterator end = bg::points_end(geometry);
+
+ const_point_iterator const_begin = bg::points_begin(geometry);
+ const_point_iterator const_end = bg::points_end(geometry);
+
+ // same for reverse iterator
+ typedef bg::point_reverse_iterator<Geometry> point_reverse_iterator;
+ typedef bg::point_reverse_iterator
+ <
+ Geometry const
+ > const_point_reverse_iterator;
+
+ point_reverse_iterator rbegin = bg::points_rbegin(geometry);
+ point_reverse_iterator rend = bg::points_rend(geometry);
+
+ const_point_reverse_iterator const_rbegin = bg::points_rbegin(geometry);
+ const_point_reverse_iterator const_rend = bg::points_rend(geometry);
+
+ // testing assignment of non-const to const iterator
+ const_begin = begin;
+ const_end = end;
+
+ // testing assignment of non-const to const reverse_iterator
+ const_rbegin = rbegin;
+ const_rend = rend;
+
+ // testing equality/inequality comparison
+ BOOST_CHECK(begin == const_begin);
+ BOOST_CHECK(end == const_end);
+ if (begin != end)
+ {
+ BOOST_CHECK(begin != const_end);
+ BOOST_CHECK(const_begin != end);
+ }
+
+ // testing equality/inequality comparison for reverse_iterator
+ BOOST_CHECK(rbegin == const_rbegin);
+ BOOST_CHECK(rend == const_rend);
+ if (rbegin != rend)
+ {
+ BOOST_CHECK(rbegin != const_rend);
+ BOOST_CHECK(const_rbegin != rend);
+ }
+
+ if (begin != end)
+ {
+ BOOST_CHECK(rbegin != rend);
+
+ point_reverse_iterator rlast(rend);
+ --rlast;
+ BOOST_CHECK(bg::equals(*begin, *rlast));
+
+ point_iterator last(end);
+ --last;
+ BOOST_CHECK(bg::equals(*rbegin, *last));
+ }
+
+ // testing dereferencing/assignment
+
+ bool const is_reference = boost::is_reference
+ <
+ typename std::iterator_traits<point_iterator>::reference
+ >::value;
+
+ if (begin != end)
+ {
+ if (BOOST_GEOMETRY_CONDITION(is_reference))
+ {
+ point_type p = *begin;
+ point_type q = zero_point;
+
+ test_assignment<is_reference>::apply(begin, const_begin, p, q);
+
+ *begin = q;
+ test_assignment<is_reference>::apply(begin, const_begin, q, p);
+
+ *begin = p;
+ }
+ }
+
+ // test with algorithms
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_point_range(std::cout, begin, end, "original:\n") << std::endl;
+ print_point_range(std::cout, rbegin, rend, "reverse traversal:\n")
+ << std::endl;
+ std::cout << bg::wkt(geometry) << std::endl;
+ std::cout << std::endl;
+#endif
+ test_reverse<Geometry, is_reference>::apply(begin, end, geometry);
+
+ typedef typename std::iterator_traits
+ <
+ point_iterator
+ >::value_type point;
+ if (const_begin != const_end)
+ {
+ boost::optional<point>
+ pt_max = max_value(const_begin, const_end, bg::less<point>());
+
+ BOOST_CHECK(bool(pt_max)); // to avoid warnings
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "max point: " << bg::dsv(*pt_max) << std::endl;
+#endif
+ }
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+
+ static inline void apply(Geometry geometry, PointRange const& point_range)
+ {
+ apply(geometry, point_range, bg::make_zero<point_type>());
+ }
+};
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_linestring_point_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** LINESTRING ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef linestring_type L;
+
+ typedef test_point_iterator_of_geometry<L, TMP> tester;
+
+ tester::apply(from_wkt<L>("LINESTRING()"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<L>("LINESTRING(3 3,4 4,5 5)"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_polygon_point_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** POLYGON ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef polygon_type P;
+
+ typedef test_point_iterator_of_geometry<P, TMP> tester;
+
+ tester::apply(from_wkt<P>("POLYGON()"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<P>("POLYGON(())"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<P>("POLYGON((1 1,9 1,9 9,1 9),(5 5,6 5,6 6,5 6))"),
+ ba::tuple_list_of(1,1)(9,1)(9,9)(1,9)(5,5)(6,5)(6,6)(5,6)
+ );
+
+ tester::apply(from_wkt<P>("POLYGON((3 3,4 4,5 5),(),(),(),(6 6,7 7,8 8),(),(),(9 9),())"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)
+ );
+
+ tester::apply(from_wkt<P>("POLYGON((),(3 3,4 4,5 5),(),(),(6 6,7 7,8 8),(),(),(9 9),())"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+#endif
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_multipoint_point_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTIPOINT ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef multi_point_type MP;
+
+ typedef test_point_iterator_of_geometry<MP, TMP> tester;
+
+ tester::apply(from_wkt<MP>("MULTIPOINT()"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<MP>("MULTIPOINT(3 3,4 4,5 5)"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_multipoint_3d_point_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTIPOINT 3D ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type_3d TMP;
+ typedef multi_point_type_3d MP;
+
+ typedef test_point_iterator_of_geometry<MP, TMP> tester;
+
+ tester::apply(from_wkt<MP>("MULTIPOINT()"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<MP>("MULTIPOINT(3 3 3,4 4 4,5 5 5)"),
+ ba::tuple_list_of(3,3,3)(4,4,4)(5,5,5)
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_multilinestring_point_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTILINESTRING ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef multi_linestring_type ML;
+
+ typedef test_point_iterator_of_geometry<ML, TMP> tester;
+
+ tester::apply(from_wkt<ML>("MULTILINESTRING()"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<ML>("MULTILINESTRING(())"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<ML>("MULTILINESTRING((),(),())"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<ML>("MULTILINESTRING((1 1,2 2,3 3),(3 3,4 4,5 5),(6 6))"),
+ ba::tuple_list_of(1,1)(2,2)(3,3)(3,3)(4,4)(5,5)(6,6)
+ );
+
+ tester::apply(from_wkt<ML>("MULTILINESTRING((),(),(1 1,2 2,3 3),(),(),(3 3,4 4,5 5),(),(6 6),(),(),())"),
+ ba::tuple_list_of(1,1)(2,2)(3,3)(3,3)(4,4)(5,5)(6,6)
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+#endif
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_multipolygon_point_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTIPOLYGON ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef multi_polygon_type MPL;
+
+ typedef test_point_iterator_of_geometry<MPL, TMP> tester;
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON()"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON( () )"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON( (()) )"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON( ((),()) )"),
+ TMP()
+ );
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON(((3 3,4 4,5 5),(6 6,7 7,8 8),(9 9)),((1 1,2 2,10 10),(11 11,12 12)))"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)\
+ (1,1)(2,2)(10,10)(11,11)(12,12)
+ );
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON(((3 3,4 4,5 5),(),(),(),(6 6,7 7,8 8),(),(),(9 9),()),((),(1 1,2 2,10 10),(),(),(),(11 11,12 12),(),(),(13 13),()))"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)\
+ (1,1)(2,2)(10,10)(11,11)(12,12)(13,13)
+ );
+
+ tester::apply(from_wkt<MPL>("MULTIPOLYGON(((3 3,4 4,5 5),(),(),(),(6 6,7 7,8 8),(),(),(9 9),()),((),(1 1,2 2,10 10),(),(),(),(11 11,12 12),(),(),(13 13),()),((),(),()))"),
+ ba::tuple_list_of(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)\
+ (1,1)(2,2)(10,10)(11,11)(12,12)(13,13)
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+#endif
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_multipoint_of_point_pointers )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTIPOINT OF POINT POINTERS ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef vector_as_multipoint<test::test_point_xy*> MP;
+
+ MP multipoint;
+ for (int i = 1; i < 10; i++)
+ {
+ test::test_point_xy* p = new test::test_point_xy;
+ p->x = i;
+ p->y = -i;
+ multipoint.push_back(p);
+ }
+
+ test::test_point_xy* zero = new test::test_point_xy;
+ zero->x = 0;
+ zero->y = 0;
+
+ typedef test_point_iterator_of_geometry<MP, TMP> tester;
+
+ tester::apply(multipoint,
+ ba::tuple_list_of(1,-1)(2,-2)(3,-3)(4,-4)(5,-5)(6,-6)\
+ (7,-7)(8,-8)(9,-9),
+ zero
+ );
+
+ for (unsigned int i = 0; i < multipoint.size(); i++)
+ {
+ delete multipoint[i];
+ }
+ delete zero;
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_linestring_of_point_pointers )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** LINESTRING OF POINT POINTERS ***" << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef vector_as_linestring<test::test_point_xy*> L;
+
+ L linestring;
+ for (int i = 1; i < 10; i++)
+ {
+ test::test_point_xy* p = new test::test_point_xy;
+ p->x = i;
+ p->y = -i;
+ linestring.push_back(p);
+ }
+
+ test::test_point_xy* zero = new test::test_point_xy;
+ zero->x = 0;
+ zero->y = 0;
+
+ typedef test_point_iterator_of_geometry<L, TMP> tester;
+
+ tester::apply(linestring,
+ ba::tuple_list_of(1,-1)(2,-2)(3,-3)(4,-4)(5,-5)(6,-6)\
+ (7,-7)(8,-8)(9,-9),
+ zero
+ );
+
+ for (unsigned int i = 0; i < linestring.size(); i++)
+ {
+ delete linestring[i];
+ }
+ delete zero;
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_multipoint_copy_on_dereference )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTIPOINT WITH COPY-ON-DEREFERENCE ITERATOR ***"
+ << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef multipoint_copy_on_dereference<point_type> MP;
+
+ typedef test_point_iterator_of_geometry
+ <
+ MP, TMP, false // no concept checks
+ > tester;
+
+ // bg::read_wkt does not work for this multipoint type so we have
+ // to initialize the multipoint manually
+ MP multipoint;
+ for (int i = 1; i < 10; ++i)
+ {
+ multipoint.push_back(point_type(i, -i));
+ }
+
+ tester::apply(multipoint,
+ // from_wkt<MP>("MULTIPOINT(1 -1,2 -2,3 -3,4 -4,5 -5,6 -6, 7 -7,8 -8,9 -9)"),
+ ba::tuple_list_of(1,-1)(2,-2)(3,-3)(4,-4)(5,-5)(6,-6)\
+ (7,-7)(8,-8)(9,-9)
+ );
+}
+
+
+//======================================================================
+//======================================================================
+
+
+BOOST_AUTO_TEST_CASE( test_linestring_copy_on_dereference )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** LINESTRING WITH COPY-ON-DEREFERENCE ITERATOR ***"
+ << std::endl;
+#endif
+
+ typedef tuple_multi_point_type TMP;
+ typedef linestring_copy_on_dereference<point_type> L;
+
+ typedef test_point_iterator_of_geometry
+ <
+ L, TMP, false // no concept checks
+ > tester;
+
+ tester::apply(from_wkt<L>("LINESTRING(1 -1,2 -2,3 -3,4 -4,5 -5,6 -6, 7 -7,8 -8,9 -9)"),
+ ba::tuple_list_of(1,-1)(2,-2)(3,-3)(4,-4)(5,-5)(6,-6)\
+ (7,-7)(8,-8)(9,-9)
+ );
+}
diff --git a/src/boost/libs/geometry/test/iterators/segment_iterator.cpp b/src/boost/libs/geometry/test/iterators/segment_iterator.cpp
new file mode 100644
index 000000000..f867a524d
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/segment_iterator.cpp
@@ -0,0 +1,752 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_segment_iterator
+#endif
+
+#include <algorithm>
+#include <iostream>
+#include <iterator>
+#include <string>
+#include <vector>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/assign/list_of.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/iterator/iterator_concepts.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/register/linestring.hpp>
+#include <boost/geometry/geometries/register/multi_linestring.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/core/closure.hpp>
+
+#include <boost/geometry/algorithms/convert.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/num_segments.hpp>
+
+#include <boost/geometry/policies/compare.hpp>
+
+#include <boost/geometry/iterators/segment_iterator.hpp>
+
+#include <test_common/with_pointer.hpp>
+#include <test_geometries/copy_on_dereference_geometries.hpp>
+
+namespace ba = ::boost::assign;
+namespace bg = ::boost::geometry;
+namespace bgm = bg::model;
+
+typedef bgm::point<double, 2, bg::cs::cartesian> point_type;
+typedef bgm::linestring<point_type> linestring_type;
+typedef bgm::ring<point_type, true, true> ring_cw_closed_type;
+typedef bgm::ring<point_type, true, false> ring_cw_open_type;
+typedef bgm::polygon<point_type, true, true> polygon_cw_closed_type;
+typedef bgm::polygon<point_type, true, false> polygon_cw_open_type;
+
+// multi-geometries
+typedef bgm::multi_linestring<linestring_type> multi_linestring_type;
+typedef bgm::multi_polygon<polygon_cw_closed_type> multi_polygon_cw_closed_type;
+typedef bgm::multi_polygon<polygon_cw_open_type> multi_polygon_cw_open_type;
+
+// tuple-based geometries
+typedef boost::tuple<double, double> tuple_point_type;
+typedef std::vector<tuple_point_type> tuple_linestring_type;
+typedef std::vector<tuple_linestring_type> tuple_multi_linestring_type;
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_LINESTRING(tuple_linestring_type)
+BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING(tuple_multi_linestring_type)
+
+BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
+
+
+template <typename Geometry>
+inline Geometry from_wkt(std::string const& wkt)
+{
+ Geometry geometry;
+ boost::geometry::read_wkt(wkt, geometry);
+ return geometry;
+}
+
+template <typename Iterator>
+inline std::ostream& print_geometry_range(std::ostream& os,
+ Iterator first,
+ Iterator beyond,
+ std::string const& header)
+{
+ os << header << "(";
+ for (Iterator it = first; it != beyond; ++it)
+ {
+ os << " " << bg::dsv(*it);
+ }
+ os << " )";
+ return os;
+}
+
+template <typename Geometry>
+struct test_iterator_concepts
+{
+ typedef bg::segment_iterator<Geometry> iterator;
+ BOOST_CONCEPT_ASSERT(( boost::BidirectionalIteratorConcept<iterator> ));
+ BOOST_CONCEPT_ASSERT(( boost_concepts::ReadableIteratorConcept<iterator> ));
+ BOOST_CONCEPT_ASSERT
+ (( boost_concepts::BidirectionalTraversalConcept<iterator> ));
+};
+
+struct equals
+{
+ template <typename Iterator>
+ static inline std::size_t number_of_elements(Iterator begin,
+ Iterator end)
+ {
+ std::size_t size = std::distance(begin, end);
+
+ std::size_t num_elems(0);
+ for (Iterator it = begin; it != end; ++it)
+ {
+ ++num_elems;
+ }
+ BOOST_CHECK(size == num_elems);
+
+ num_elems = 0;
+ for (Iterator it = end; it != begin; --it)
+ {
+ ++num_elems;
+ }
+ BOOST_CHECK(size == num_elems);
+
+ return num_elems;
+ }
+
+ template <typename Iterator1, typename Iterator2>
+ static inline bool apply(Iterator1 begin1, Iterator1 end1,
+ Iterator2 begin2, Iterator2 end2)
+ {
+ std::size_t num_points1 = number_of_elements(begin1, end1);
+ std::size_t num_points2 = number_of_elements(begin2, end2);
+
+ if (num_points1 != num_points2)
+ {
+ return false;
+ }
+
+ Iterator1 it1 = begin1;
+ Iterator2 it2 = begin2;
+ for (; it1 != end1; ++it1, ++it2)
+ {
+ if (! bg::equals(*it1, *it2))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+};
+
+
+template <typename Geometry, typename SegmentRange>
+struct test_segment_iterator_of_geometry
+{
+ template <typename G>
+ static inline void base_test(G const& geometry,
+ SegmentRange const& segment_range,
+ std::string const& header,
+ bool check_num_segments)
+ {
+ boost::ignore_unused(header);
+
+ typedef bg::segment_iterator<G const> segment_iterator;
+
+ test_iterator_concepts<G const>();
+
+ segment_iterator begin = bg::segments_begin(geometry);
+ segment_iterator end = bg::segments_end(geometry);
+
+ if (check_num_segments)
+ {
+ BOOST_CHECK(std::size_t(std::distance(begin, end))
+ ==
+ bg::num_segments(geometry));
+ }
+
+ BOOST_CHECK(equals::apply(begin, end,
+ bg::segments_begin(segment_range),
+ bg::segments_end(segment_range))
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::string closure
+ = (
+ (bg::closure<Geometry>::value == bg::closed)
+ ? "closed"
+ : "open"
+ );
+
+ std::cout << header << " geometry (WKT): "
+ << bg::wkt(geometry) << std::endl;
+ std::cout << header << " geometry (DSV): "
+ << bg::dsv(geometry) << std::endl;
+ std::cout << "geometry's closure: " << closure << std::endl;
+ print_geometry_range(std::cout, begin, end, "segment range: ");
+
+ std::cout << std::endl;
+
+ print_geometry_range(std::cout,
+ bg::segments_begin(segment_range),
+ bg::segments_end(segment_range),
+ "expected segment range: ");
+ std::cout << std::endl;
+#endif
+
+ // testing dereferencing
+ typedef typename std::iterator_traits
+ <
+ segment_iterator
+ >::value_type value_type;
+
+ if (bg::segments_begin(geometry) != bg::segments_end(geometry))
+ {
+ value_type first_segment = *bg::segments_begin(geometry);
+
+ boost::ignore_unused(first_segment);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ typedef bg::model::segment
+ <
+ bg::model::point<double, 2, bg::cs::cartesian>
+ > other_segment;
+ other_segment other_seg;
+ // convert is used as a workaround for geometries whose
+ // point is a pointer. WKT does not seem to work for
+ // segment iterators created this way.
+ bg::convert(first_segment, other_seg);
+ std::cout << "first segment in geometry: "
+ << bg::wkt(other_seg)
+ << std::endl;
+ std::cout << "first segment in geometry (DSV): "
+ << bg::dsv(first_segment)
+ << std::endl;
+
+ std::cout << std::endl << std::endl;
+#endif
+ }
+
+ // test copying all segments to a vector
+ std::vector<value_type> segments;
+ std::copy(bg::segments_begin(geometry),
+ bg::segments_end(geometry),
+ std::back_inserter(segments));
+
+ BOOST_CHECK(std::size_t( std::distance(bg::segments_begin(geometry),
+ bg::segments_end(geometry)) )
+ ==
+ segments.size());
+ }
+
+ static inline void apply(Geometry geometry,
+ SegmentRange const& segment_range,
+ bool check_num_segments = true)
+ {
+ base_test<Geometry>(geometry, segment_range, "const",
+ check_num_segments);
+ }
+};
+
+//======================================================================
+//======================================================================
+
+template <typename ClosedGeometry, typename ExpectedResult>
+struct dual_tester
+{
+ template <typename OpenGeometry>
+ static inline void apply(OpenGeometry const& open_g,
+ ExpectedResult expected,
+ bool check_num_segments = true)
+ {
+ typedef test_segment_iterator_of_geometry
+ <
+ OpenGeometry, ExpectedResult
+ > otester;
+
+ typedef test_segment_iterator_of_geometry
+ <
+ ClosedGeometry, ExpectedResult
+ > ctester;
+
+ otester::apply(open_g, expected, check_num_segments);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl;
+#endif
+
+ ClosedGeometry closed_g;
+
+ bg::convert(open_g, closed_g);
+
+ ctester::apply(closed_g, expected, check_num_segments);
+ }
+};
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_linestring_segment_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** LINESTRING ***" << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef linestring_type G;
+
+ typedef test_segment_iterator_of_geometry<G, TML> tester;
+
+ tester::apply(from_wkt<G>("LINESTRING(0 0,1 1,2 2,3 3,4 4)"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(1,1) )
+ ( ba::tuple_list_of(1,1)(2,2) )
+ ( ba::tuple_list_of(2,2)(3,3) )
+ ( ba::tuple_list_of(3,3)(4,4) )
+ );
+
+ // linestring with no points
+ tester::apply(from_wkt<G>("LINESTRING()"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+ // linestring with a single point
+ tester::apply(from_wkt<G>("LINESTRING(1 0)"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(1,0)(1,0) ),
+ false
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_ring_segment_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** RING ***" << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef ring_cw_open_type OG;
+ typedef ring_cw_closed_type CG;
+
+ typedef dual_tester<CG, TML> tester;
+
+ tester::apply(from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ );
+
+ // open ring with no points
+ tester::apply(from_wkt<OG>("POLYGON(())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+ // open ring with a single point (one segment)
+ tester::apply(from_wkt<OG>("POLYGON((0 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,0) ),
+ false
+ );
+
+ // open ring with a two points (two segments)
+ tester::apply(from_wkt<OG>("POLYGON((0 0,0 10))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(0,0) )
+ );
+
+ // open ring with a three points (three segments)
+ tester::apply(from_wkt<OG>("POLYGON((0 0,0 10,10 10))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(0,0) )
+ );
+
+ tester::apply(from_wkt<CG>("POLYGON((0 0,0 10,10 10,10 0,0 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ );
+
+ // closed ring with no points
+ tester::apply(from_wkt<CG>("POLYGON(())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+ // closed ring with a single point (one segment)
+ tester::apply(from_wkt<CG>("POLYGON((0 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,0) ),
+ false
+ );
+
+ // closed ring with two points (one segment)
+ tester::apply(from_wkt<CG>("POLYGON((0 0,0 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,0) )
+ );
+
+ // closed ring with three points (two segments)
+ tester::apply(from_wkt<CG>("POLYGON((0 0,0 10,0 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(0,0) )
+ );
+
+ // closed ring with four points (three segments)
+ tester::apply(from_wkt<CG>("POLYGON((0 0,0 10,10 10,0 0))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(0,0) )
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_polygon_segment_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** POLYGON ***" << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef polygon_cw_open_type OG;
+ typedef polygon_cw_closed_type CG;
+
+ typedef dual_tester<CG, TML> tester;
+
+ tester::apply(from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(1 1,9 1,9 9,1 9))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(9,1) )
+ ( ba::tuple_list_of(9,1)(9,9) )
+ ( ba::tuple_list_of(9,9)(1,9) )
+ ( ba::tuple_list_of(1,9)(1,1) )
+ );
+
+ // open polygon with no points
+ tester::apply(from_wkt<OG>("POLYGON(())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+ // open polygons with single-point rings
+ tester::apply(from_wkt<OG>("POLYGON((0 0,0 10,10 10,10 0),(1 1))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(1,1) ),
+ false
+ );
+
+ tester::apply(from_wkt<OG>("POLYGON((0 0),(1 1,9 1,9 9,1 9))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(9,1) )
+ ( ba::tuple_list_of(9,1)(9,9) )
+ ( ba::tuple_list_of(9,9)(1,9) )
+ ( ba::tuple_list_of(1,9)(1,1) ),
+ false
+ );
+
+
+ tester::apply(from_wkt<CG>("POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(9,1) )
+ ( ba::tuple_list_of(9,1)(9,9) )
+ ( ba::tuple_list_of(9,9)(1,9) )
+ ( ba::tuple_list_of(1,9)(1,1) )
+ );
+
+ // closed polygons with no points
+ tester::apply(from_wkt<CG>("POLYGON(())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("POLYGON((),())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("POLYGON((),(),())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+ // closed polygons with single-point rings
+ tester::apply(from_wkt<CG>("POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(1,1) ),
+ false
+ );
+
+ tester::apply(from_wkt<CG>("POLYGON((0 0),(1 1,9 1,9 9,1 9,1 1))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(9,1) )
+ ( ba::tuple_list_of(9,1)(9,9) )
+ ( ba::tuple_list_of(9,9)(1,9) )
+ ( ba::tuple_list_of(1,9)(1,1) ),
+ false
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_multi_linestring_segment_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTILINESTRING ***" << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef multi_linestring_type G;
+
+ typedef test_segment_iterator_of_geometry<G, TML> tester;
+
+ tester::apply(from_wkt<G>("MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(5 5,6 6,7 7,8 8),(9 9,10 10))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(1,1) )
+ ( ba::tuple_list_of(1,1)(2,2) )
+ ( ba::tuple_list_of(2,2)(3,3) )
+ ( ba::tuple_list_of(3,3)(4,4) )
+ ( ba::tuple_list_of(5,5)(6,6) )
+ ( ba::tuple_list_of(6,6)(7,7) )
+ ( ba::tuple_list_of(7,7)(8,8) )
+ ( ba::tuple_list_of(9,9)(10,10) )
+ );
+
+ // empty multi-linestrings
+ tester::apply(from_wkt<G>("MULTILINESTRING()"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<G>("MULTILINESTRING(())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<G>("MULTILINESTRING((),())"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+ // multi-linestring with a linestring with one point
+ tester::apply(from_wkt<G>("MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(5 5),(9 9,10 10))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(1,1) )
+ ( ba::tuple_list_of(1,1)(2,2) )
+ ( ba::tuple_list_of(2,2)(3,3) )
+ ( ba::tuple_list_of(3,3)(4,4) )
+ ( ba::tuple_list_of(5,5)(5,5) )
+ ( ba::tuple_list_of(9,9)(10,10) ),
+ false
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_multi_polygon_segment_iterator )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** MULTIPOLYGON ***" << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef multi_polygon_cw_open_type OG;
+ typedef multi_polygon_cw_closed_type CG;
+
+ typedef dual_tester<CG, TML> tester;
+
+ tester::apply(from_wkt<OG>("MULTIPOLYGON(((0 0,0 10,10 10,10 0),(1 1,9 1,9 9,1 9)),((20 0,20 10,30 10,30 0),(21 1,29 1,29 9,21 9)))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(9,1) )
+ ( ba::tuple_list_of(9,1)(9,9) )
+ ( ba::tuple_list_of(9,9)(1,9) )
+ ( ba::tuple_list_of(1,9)(1,1) )
+ ( ba::tuple_list_of(20,0)(20,10) )
+ ( ba::tuple_list_of(20,10)(30,10) )
+ ( ba::tuple_list_of(30,10)(30,0) )
+ ( ba::tuple_list_of(30,0)(20,0) )
+ ( ba::tuple_list_of(21,1)(29,1) )
+ ( ba::tuple_list_of(29,1)(29,9) )
+ ( ba::tuple_list_of(29,9)(21,9) )
+ ( ba::tuple_list_of(21,9)(21,1) )
+ );
+
+ tester::apply(from_wkt<CG>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1)),((20 0,20 10,30 10,30 0,20 0),(21 1,29 1,29 9,21 9,21 1)))"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(0,0)(0,10) )
+ ( ba::tuple_list_of(0,10)(10,10) )
+ ( ba::tuple_list_of(10,10)(10,0) )
+ ( ba::tuple_list_of(10,0)(0,0) )
+ ( ba::tuple_list_of(1,1)(9,1) )
+ ( ba::tuple_list_of(9,1)(9,9) )
+ ( ba::tuple_list_of(9,9)(1,9) )
+ ( ba::tuple_list_of(1,9)(1,1) )
+ ( ba::tuple_list_of(20,0)(20,10) )
+ ( ba::tuple_list_of(20,10)(30,10) )
+ ( ba::tuple_list_of(30,10)(30,0) )
+ ( ba::tuple_list_of(30,0)(20,0) )
+ ( ba::tuple_list_of(21,1)(29,1) )
+ ( ba::tuple_list_of(29,1)(29,9) )
+ ( ba::tuple_list_of(29,9)(21,9) )
+ ( ba::tuple_list_of(21,9)(21,1) )
+ );
+
+ // test empty closed multi-polygons
+ tester::apply(from_wkt<CG>("MULTIPOLYGON()"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("MULTIPOLYGON((()))"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("MULTIPOLYGON(((),()))"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("MULTIPOLYGON(((),(),()))"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("MULTIPOLYGON(((),(),()),(()))"),
+ ba::list_of<tuple_linestring_type>()
+ );
+ tester::apply(from_wkt<CG>("MULTIPOLYGON(((),(),()),((),()))"),
+ ba::list_of<tuple_linestring_type>()
+ );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl << std::endl << std::endl;
+#endif
+}
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_linestring_of_point_pointers )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** LINESTRING OF POINT POINTERS ***" << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef std::vector<test::test_point_xy*> L;
+
+ std::vector<test::test_point_xy*> linestring;
+ for (int i = 1; i < 10; i++)
+ {
+ test::test_point_xy* p = new test::test_point_xy;
+ p->x = i;
+ p->y = -i;
+ linestring.push_back(p);
+ }
+
+ test::test_point_xy* zero = new test::test_point_xy;
+ zero->x = 0;
+ zero->y = 0;
+ delete zero;
+
+ typedef test_segment_iterator_of_geometry<L, TML> tester;
+
+ tester::apply(linestring,
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(1,-1)(2,-2) )
+ ( ba::tuple_list_of(2,-2)(3,-3) )
+ ( ba::tuple_list_of(3,-3)(4,-4) )
+ ( ba::tuple_list_of(4,-4)(5,-5) )
+ ( ba::tuple_list_of(5,-5)(6,-6) )
+ ( ba::tuple_list_of(6,-6)(7,-7) )
+ ( ba::tuple_list_of(7,-7)(8,-8) )
+ ( ba::tuple_list_of(8,-8)(9,-9) )
+ );
+
+ for (unsigned int i = 0; i < linestring.size(); i++)
+ {
+ delete linestring[i];
+ }
+}
+
+//======================================================================
+//======================================================================
+
+BOOST_AUTO_TEST_CASE( test_linestring_copy_on_dereference )
+{
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** LINESTRING WITH COPY-ON-DEREFERENCE ITERATOR ***"
+ << std::endl;
+#endif
+
+ typedef tuple_multi_linestring_type TML;
+ typedef linestring_copy_on_dereference<point_type> L;
+
+ typedef test_segment_iterator_of_geometry<L, TML> tester;
+
+ tester::apply(from_wkt<L>("LINESTRING(1 -1,2 -2,3 -3,4 -4,5 -5,6 -6, 7 -7,8 -8,9 -9)"),
+ ba::list_of<tuple_linestring_type>
+ ( ba::tuple_list_of(1,-1)(2,-2) )
+ ( ba::tuple_list_of(2,-2)(3,-3) )
+ ( ba::tuple_list_of(3,-3)(4,-4) )
+ ( ba::tuple_list_of(4,-4)(5,-5) )
+ ( ba::tuple_list_of(5,-5)(6,-6) )
+ ( ba::tuple_list_of(6,-6)(7,-7) )
+ ( ba::tuple_list_of(7,-7)(8,-8) )
+ ( ba::tuple_list_of(8,-8)(9,-9) )
+ );
+}
diff --git a/src/boost/libs/geometry/test/iterators/test_iterator_common.hpp b/src/boost/libs/geometry/test/iterators/test_iterator_common.hpp
new file mode 100644
index 000000000..05b84a463
--- /dev/null
+++ b/src/boost/libs/geometry/test/iterators/test_iterator_common.hpp
@@ -0,0 +1,206 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef GEOMETRY_TEST_ITERATORS_TEST_ITERATOR_COMMON_HPP
+#define GEOMETRY_TEST_ITERATORS_TEST_ITERATOR_COMMON_HPP
+
+#include <cstddef>
+#include <iostream>
+#include <iterator>
+#include <string>
+#include <algorithm>
+
+#include <boost/test/included/unit_test.hpp>
+
+// helper functions for testing the concatenate and flatten iterators
+
+template <typename Iterator>
+inline std::ostream& print_container(std::ostream& os,
+ Iterator begin, Iterator end,
+ std::string const& header)
+{
+ std::cout << header;
+ for (Iterator it = begin; it != end; ++it)
+ {
+ os << " " << *it;
+ }
+ return os;
+}
+
+
+template <typename Iterator>
+inline std::ostream& print_nested_container(std::ostream& os,
+ Iterator begin, Iterator end,
+ std::string const& header)
+{
+ typedef typename std::iterator_traits<Iterator>::value_type inner_container;
+ typedef typename inner_container::const_iterator inner_iterator;
+
+ std::cout << header;
+ for (Iterator outer = begin; outer != end; ++outer)
+ {
+ os << " (";
+ for (inner_iterator inner = outer->begin();
+ inner != outer->end(); ++inner)
+ {
+ if ( inner != outer->begin() )
+ {
+ os << " ";
+ }
+ os << *inner;
+ }
+ os << ") ";
+ }
+ return os;
+}
+
+
+template <typename T>
+struct is_odd
+{
+ inline bool operator()(T const& t) const
+ {
+ return t % 2 != 0;
+ }
+};
+
+
+template <typename T>
+struct is_even
+{
+ inline bool operator()(T const& t) const
+ {
+ return !is_odd<T>()(t);
+ }
+};
+
+
+
+
+template <typename CombinedIterator, typename CombinedContainer>
+inline void test_size(CombinedIterator first, CombinedIterator beyond,
+ CombinedContainer const& combined)
+{
+ std::size_t size = static_cast<std::size_t>(std::distance(first, beyond));
+ BOOST_CHECK( combined.size() == size );
+
+ size = 0;
+ for (CombinedIterator it = first; it != beyond; ++it)
+ {
+ ++size;
+ }
+ BOOST_CHECK( combined.size() == size );
+
+ size = 0;
+ for (CombinedIterator it = beyond; it != first; --it)
+ {
+ ++size;
+ }
+ BOOST_CHECK( combined.size() == size );
+}
+
+
+
+template <typename CombinedIterator, typename CombinedContainer>
+inline void test_equality(CombinedIterator first, CombinedIterator beyond,
+ CombinedContainer const& combined)
+{
+ typedef typename CombinedContainer::const_iterator iterator;
+
+ iterator it = combined.begin();
+ for (CombinedIterator cit = first; cit != beyond; ++cit, ++it)
+ {
+ BOOST_CHECK( *cit == *it );
+ }
+
+ if ( combined.begin() != combined.end() )
+ {
+ BOOST_CHECK( first != beyond );
+ iterator it = combined.end();
+ CombinedIterator cit = beyond;
+ for (--cit, --it; cit != first; --cit, --it)
+ {
+ BOOST_CHECK( *cit == *it );
+ }
+ BOOST_CHECK( cit == first && it == combined.begin() );
+ BOOST_CHECK( *cit == *it );
+ }
+ else
+ {
+ BOOST_CHECK( first == beyond );
+ }
+}
+
+
+
+template <typename CombinedIterator, typename CombinedContainer>
+inline void test_using_remove_if(CombinedIterator first,
+ CombinedIterator beyond,
+ CombinedContainer& combined)
+{
+ typedef typename std::iterator_traits
+ <
+ CombinedIterator
+ >::value_type value_type;
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << "odd elements removed:" << std::endl;
+ print_container(std::cout, first, beyond, "before:") << std::endl;
+#endif
+ typename std::iterator_traits<CombinedIterator>::difference_type
+ num_even = std::count_if(first, beyond, is_even<value_type>());
+
+ CombinedIterator new_beyond =
+ std::remove_if(first, beyond, is_odd<value_type>());
+
+ std::size_t new_size = std::distance(first, new_beyond);
+
+ for (CombinedIterator it = first; it != new_beyond; ++it)
+ {
+ BOOST_CHECK( !is_odd<value_type>()(*it) );
+ }
+ BOOST_CHECK( new_size == static_cast<std::size_t>(num_even) );
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_container(std::cout, first, new_beyond, "after :") << std::endl;
+#endif
+
+ combined.erase(std::remove_if(combined.begin(), combined.end(),
+ is_odd<value_type>()),
+ combined.end());
+ test_equality(first, new_beyond, combined);
+}
+
+
+template <typename CombinedIterator, typename CombinedContainer>
+inline void test_using_reverse(CombinedIterator first,
+ CombinedIterator beyond,
+ CombinedContainer& combined)
+{
+ std::reverse(first, beyond);
+ std::reverse(combined.begin(), combined.end());
+ test_equality(first, beyond, combined);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_container(std::cout, first, beyond, "reversed:") << std::endl;
+#endif
+
+ std::reverse(first, beyond);
+ std::reverse(combined.begin(), combined.end());
+ test_equality(first, beyond, combined);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_container(std::cout, first, beyond, "re-reversed:") << std::endl;
+#endif
+}
+
+
+#endif // GEOMETRY_TEST_ITERATORS_TEST_ITERATOR_COMMON_HPP
diff --git a/src/boost/libs/geometry/test/minimal.cpp b/src/boost/libs/geometry/test/minimal.cpp
new file mode 100644
index 000000000..58bdeabc2
--- /dev/null
+++ b/src/boost/libs/geometry/test/minimal.cpp
@@ -0,0 +1,83 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+ typedef bg::model::box<point> box;
+ typedef bg::model::linestring<point> linestring;
+ typedef bg::model::multi_linestring<linestring> mlinestring;
+ typedef bg::model::polygon<point> polygon;
+ typedef bg::model::multi_polygon<polygon> mpolygon;
+
+ point p;
+ linestring ls;
+ mlinestring mls;
+ polygon po;
+ mpolygon mpo;
+
+ bg::read_wkt("POINT(0 0)", p);
+ bg::read_wkt("LINESTRING(0 0,7 7,7 9)", ls);
+ bg::read_wkt("MULTILINESTRING((0 0,7 7,7 9),(7 9, 9 9))", mls);
+ bg::read_wkt("POLYGON((0 0,0 5,5 5,5 0,0 0),(1 1,4 1,4 4,1 4,1 1))", po);
+ bg::read_wkt("MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(1 1,4 1,4 4,1 4,1 1)),((2 2,2 3,3 3,3 2,2 2)))", mpo);
+
+ BOOST_CHECK_CLOSE(bg::perimeter(po), 32.0, 0.0001);
+ BOOST_CHECK_CLOSE(bg::area(mpo), 17.0, 0.0001);
+ BOOST_CHECK_CLOSE(bg::length(mls), 13.899494936611665, 0.0001);
+
+ BOOST_CHECK(bg::covered_by(p, po));
+ BOOST_CHECK(!bg::crosses(ls, mls));
+ BOOST_CHECK(!bg::equals(ls, mls));
+ BOOST_CHECK(bg::intersects(ls, po));
+ BOOST_CHECK(bg::relate(p, ls, bg::de9im::mask("F0F******")));
+ BOOST_CHECK(bg::relation(mls, mpo).str() == "101F00212");
+ BOOST_CHECK(bg::within(po, mpo));
+ BOOST_CHECK(!bg::touches(mls, po));
+
+ mpolygon res;
+ bg::intersection(po, mpo, res);
+ BOOST_CHECK_CLOSE(bg::area(res), 16.0, 0.0001);
+ bg::clear(res);
+ bg::union_(po, mpo, res);
+ BOOST_CHECK_CLOSE(bg::area(res), 17.0, 0.0001);
+ bg::clear(res);
+ bg::difference(mpo, po, res);
+ BOOST_CHECK_CLOSE(bg::area(res), 1.0, 0.0001);
+ bg::clear(res);
+ bg::sym_difference(mpo, po, res);
+ BOOST_CHECK_CLOSE(bg::area(res), 1.0, 0.0001);
+
+ BOOST_CHECK(bg::is_simple(ls));
+ BOOST_CHECK(bg::is_valid(mpo));
+
+ point c;
+ bg::centroid(mpo, c);
+ BOOST_CHECK_CLOSE(bg::distance(p, c), 3.5355339059327378, 0.0001);
+ BOOST_CHECK_CLOSE(bg::distance(mls, mpo), 0.0, 0.0001);
+ BOOST_CHECK_CLOSE(bg::distance(po, mpo), 0.0, 0.0001);
+
+ box b;
+ bg::envelope(mls, b);
+ BOOST_CHECK_CLOSE(bg::area(b), 81.0, 0.0001);
+
+ polygon h;
+ bg::convex_hull(mls, h);
+ BOOST_CHECK_CLOSE(bg::area(h), 9.0, 0.0001);
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/policies/Jamfile b/src/boost/libs/geometry/test/policies/Jamfile
new file mode 100644
index 000000000..fd3afcf2d
--- /dev/null
+++ b/src/boost/libs/geometry/test/policies/Jamfile
@@ -0,0 +1,16 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2009-2015 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-policies
+ :
+ [ run compare.cpp : : : : policies_compare ]
+ [ run rescale_policy.cpp : : : : policies_rescale_policy ]
+ ;
diff --git a/src/boost/libs/geometry/test/policies/compare.cpp b/src/boost/libs/geometry/test/policies/compare.cpp
new file mode 100644
index 000000000..60c4021d5
--- /dev/null
+++ b/src/boost/libs/geometry/test/policies/compare.cpp
@@ -0,0 +1,256 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle 2017.
+// Modifications copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <algorithm>
+
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/geometry/policies/compare.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename Container>
+inline std::string coordinates(Container const& points)
+{
+ std::ostringstream out;
+ for (typename boost::range_const_iterator<Container>::type it = boost::begin(points);
+ it != boost::end(points);
+ ++it)
+ {
+ out << bg::dsv(*it);
+ }
+ return out.str();
+}
+
+template <typename P>
+void test_2d_compare()
+{
+ P p1 = bg::make<P>(3, 1);
+ P p2 = bg::make<P>(3, 1);
+ P p3 = bg::make<P>(1, 3);
+ P p4 = bg::make<P>(5, 2);
+ P p5 = bg::make<P>(3, 2);
+
+ // Test in all dimensions
+ {
+ bg::equal_to<P> et;
+ bg::less<P> lt;
+ bg::greater<P> gt;
+
+ BOOST_CHECK_EQUAL(et(p1, p2), true);
+ BOOST_CHECK_EQUAL(et(p1, p3), false);
+ BOOST_CHECK_EQUAL(et(p1, p4), false);
+ BOOST_CHECK_EQUAL(et(p1, p5), false);
+ BOOST_CHECK_EQUAL(et(p3, p4), false);
+
+ BOOST_CHECK_EQUAL(lt(p1, p2), false);
+ BOOST_CHECK_EQUAL(lt(p1, p3), false);
+ BOOST_CHECK_EQUAL(lt(p1, p4), true);
+ BOOST_CHECK_EQUAL(lt(p1, p5), true);
+ BOOST_CHECK_EQUAL(lt(p3, p4), true);
+
+ BOOST_CHECK_EQUAL(gt(p1, p2), false);
+ BOOST_CHECK_EQUAL(gt(p1, p3), true);
+ BOOST_CHECK_EQUAL(gt(p1, p4), false);
+ BOOST_CHECK_EQUAL(gt(p1, p5), false);
+ BOOST_CHECK_EQUAL(gt(p3, p4), false);
+ }
+
+
+ // Test in dimension 0, X
+ {
+ bg::equal_to<P, 0> et;
+ bg::less<P, 0> lt;
+ bg::greater<P, 0> gt;
+
+ BOOST_CHECK_EQUAL(et(p1, p2), true);
+ BOOST_CHECK_EQUAL(et(p1, p3), false);
+ BOOST_CHECK_EQUAL(et(p1, p4), false);
+ BOOST_CHECK_EQUAL(et(p1, p5), true);
+ BOOST_CHECK_EQUAL(et(p3, p4), false);
+
+ BOOST_CHECK_EQUAL(lt(p1, p2), false);
+ BOOST_CHECK_EQUAL(lt(p1, p3), false);
+ BOOST_CHECK_EQUAL(lt(p1, p4), true);
+ BOOST_CHECK_EQUAL(lt(p1, p5), false);
+ BOOST_CHECK_EQUAL(lt(p3, p4), true);
+
+ BOOST_CHECK_EQUAL(gt(p1, p2), false);
+ BOOST_CHECK_EQUAL(gt(p1, p3), true);
+ BOOST_CHECK_EQUAL(gt(p1, p4), false);
+ BOOST_CHECK_EQUAL(gt(p1, p5), false);
+ BOOST_CHECK_EQUAL(gt(p3, p4), false);
+ }
+
+ // Test in dimension 1, Y
+ {
+ bg::equal_to<P, 1> et;
+ bg::less<P, 1> lt;
+ bg::greater<P, 1> gt;
+
+ BOOST_CHECK_EQUAL(et(p1, p2), true);
+ BOOST_CHECK_EQUAL(et(p1, p3), false);
+ BOOST_CHECK_EQUAL(et(p1, p4), false);
+ BOOST_CHECK_EQUAL(et(p1, p5), false);
+ BOOST_CHECK_EQUAL(et(p3, p4), false);
+
+ BOOST_CHECK_EQUAL(lt(p1, p2), false);
+ BOOST_CHECK_EQUAL(lt(p1, p3), true);
+ BOOST_CHECK_EQUAL(lt(p1, p4), true);
+ BOOST_CHECK_EQUAL(lt(p1, p5), true);
+ BOOST_CHECK_EQUAL(lt(p3, p4), false);
+
+ BOOST_CHECK_EQUAL(gt(p1, p2), false);
+ BOOST_CHECK_EQUAL(gt(p1, p3), false);
+ BOOST_CHECK_EQUAL(gt(p1, p4), false);
+ BOOST_CHECK_EQUAL(gt(p1, p5), false);
+ BOOST_CHECK_EQUAL(gt(p3, p4), true);
+ }
+}
+
+
+template <typename P>
+void test_2d_sort()
+{
+ std::vector<P> v;
+ v.push_back(bg::make<P>(3, 1));
+ v.push_back(bg::make<P>(2, 3));
+ v.push_back(bg::make<P>(2, 2));
+ v.push_back(bg::make<P>(1, 3));
+
+ // Sort on coordinates in order x,y,z
+ std::sort(v.begin(), v.end(), bg::less<P>());
+ std::string s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(1, 3)(2, 2)(2, 3)(3, 1)");
+
+ // Reverse sort
+ std::sort(v.begin(), v.end(), bg::greater<P>());
+ s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(3, 1)(2, 3)(2, 2)(1, 3)");
+
+ // Sort backwards on coordinates in order x,y,z
+ //std::sort(v.begin(), v.end(), bg::greater<P>());
+ //std::string s = coordinates(v);
+ //BOOST_CHECK_EQUAL(s, "(1, 3)(2, 2)(2, 3)(3, 1)");
+
+ // Refill to remove duplicate coordinates
+ v.clear();
+ v.push_back(bg::make<P>(4, 1));
+ v.push_back(bg::make<P>(3, 2));
+ v.push_back(bg::make<P>(2, 3));
+ v.push_back(bg::make<P>(1, 4));
+
+ // Sort ascending on only x-coordinate
+ std::sort(v.begin(), v.end(), bg::less<P, 0>());
+ s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(1, 4)(2, 3)(3, 2)(4, 1)");
+
+ // Sort ascending on only y-coordinate
+ std::sort(v.begin(), v.end(), bg::less<P, 1>());
+ s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(4, 1)(3, 2)(2, 3)(1, 4)");
+
+ // Sort descending on only x-coordinate
+ std::sort(v.begin(), v.end(), bg::greater<P, 0>());
+ s = coordinates(v);
+ //BOOST_CHECK_EQUAL(s, "(4, 1)(3, 2)(2, 3)(1, 4)");
+
+ // Sort descending on only y-coordinate
+ std::sort(v.begin(), v.end(), bg::greater<P, 1>());
+ s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(1, 4)(2, 3)(3, 2)(4, 1)");
+
+ // Make non-unique vector
+ v.push_back(bg::make<P>(4, 1));
+ v.push_back(bg::make<P>(3, 2));
+ v.push_back(bg::make<P>(2, 3));
+ v.push_back(bg::make<P>(1, 4));
+ v.push_back(bg::make<P>(1, 5));
+ std::sort(v.begin(), v.end(), bg::less<P>());
+ s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(1, 4)(1, 4)(1, 5)(2, 3)(2, 3)(3, 2)(3, 2)(4, 1)(4, 1)");
+
+
+ std::vector<P> v2;
+ std::unique_copy(v.begin(), v.end(), std::back_inserter(v2), bg::equal_to<P>());
+ s = coordinates(v2);
+ BOOST_CHECK_EQUAL(s, "(1, 4)(1, 5)(2, 3)(3, 2)(4, 1)");
+}
+
+
+template <typename P>
+void test_spherical()
+{
+ //typedef typename bg::coordinate_type<P>::type ct;
+
+ std::vector<P> v;
+ v.push_back(bg::make<P>( 180.00, 70.56));
+ v.push_back(bg::make<P>( 179.73, 71.56)); // east
+ v.push_back(bg::make<P>( 177.47, 71.23)); // less east
+ v.push_back(bg::make<P>(-178.78, 72.78)); // further east, = west, this is the most left point
+ v.push_back(bg::make<P>(-180.00, 73.12));
+
+ // Sort on coordinates in order x,y,z
+ std::sort(v.begin(), v.end(), bg::less<P>());
+ std::string s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(-178.78, 72.78)(177.47, 71.23)(179.73, 71.56)(180, 70.56)(-180, 73.12)");
+
+ // Sort ascending on only y-coordinate
+ std::sort(v.begin(), v.end(), bg::less<P, 1>());
+ s = coordinates(v);
+ BOOST_CHECK_EQUAL(s, "(180, 70.56)(177.47, 71.23)(179.73, 71.56)(-178.78, 72.78)(-180, 73.12)");
+
+ // Sort ascending on only x-coordinate
+ std::sort(v.begin(), v.end(), bg::less<P, 0>());
+ s = coordinates(v);
+ BOOST_CHECK((s == "(-178.78, 72.78)(177.47, 71.23)(179.73, 71.56)(180, 70.56)(-180, 73.12)"
+ || s == "(-178.78, 72.78)(177.47, 71.23)(179.73, 71.56)(-180, 73.12)(180, 70.56)"));
+
+ // Sort ascending on only x-coordinate, but override with std-comparison,
+ // (so this is the normal sorting behaviour that would have been used
+ // if it would not have been spherical)
+ //std::sort(v.begin(), v.end(), bg::less<P, 0, std::less<ct> >());
+ //s = coordinates(v);
+ //BOOST_CHECK_EQUAL(s, "(-178.78, 70.78)(177.47, 71.23)(179.73, 71.56)");
+}
+
+
+int test_main(int, char* [])
+{
+ test_2d_compare<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_2d_compare<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_2d_sort<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_2d_sort<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_2d_sort<boost::tuple<double, double> >();
+ test_2d_sort<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_spherical<bg::model::point<double, 2, bg::cs::spherical<bg::degree> > >();
+ test_spherical<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+ test_spherical<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/policies/rescale_policy.cpp b/src/boost/libs/geometry/test/policies/rescale_policy.cpp
new file mode 100644
index 000000000..c91f31988
--- /dev/null
+++ b/src/boost/libs/geometry/test/policies/rescale_policy.cpp
@@ -0,0 +1,133 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/detail/recalculate.hpp>
+#include <boost/geometry/algorithms/length.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/iterators/point_iterator.hpp>
+#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+
+#include <geometry_test_common.hpp>
+
+
+template
+<
+ typename RescalePolicy,
+ typename Geometry1,
+ typename Geometry2
+>
+void test_one(std::string const& wkt1, std::string const& wkt2,
+ std::string const& expected_coordinates)
+{
+ Geometry1 geometry1;
+ bg::read_wkt(wkt1, geometry1);
+
+ Geometry2 geometry2;
+ bg::read_wkt(wkt2, geometry2);
+
+ RescalePolicy rescale_policy
+ = bg::get_rescale_policy<RescalePolicy>(geometry1, geometry2);
+
+ typedef typename bg::point_type<Geometry1>::type point_type;
+ typedef typename bg::robust_point_type
+ <
+ point_type, RescalePolicy
+ >::type robust_point_type;
+
+ {
+ robust_point_type robust_point;
+ bg::recalculate(robust_point, *bg::points_begin(geometry1), rescale_policy);
+
+ std::ostringstream out;
+ out << bg::get<0>(robust_point) << " " << bg::get<1>(robust_point);
+ BOOST_CHECK_EQUAL(expected_coordinates, out.str());
+ }
+
+ {
+ // Assuming Geometry1 is a polygon:
+ typedef bg::model::polygon<robust_point_type> polygon_type;
+ polygon_type geometry_out;
+ bg::recalculate(geometry_out, geometry1, rescale_policy);
+ robust_point_type p = *bg::points_begin(geometry_out);
+
+ std::ostringstream out;
+ out << bg::get<0>(p) << " " << bg::get<1>(p);
+ BOOST_CHECK_EQUAL(expected_coordinates, out.str());
+ }
+}
+
+
+
+static std::string simplex_normal[2] =
+ {"POLYGON((0 1,2 5,5 3,0 1))",
+ "POLYGON((3 0,0 3,4 5,3 0))"};
+
+static std::string simplex_large[2] =
+ {"POLYGON((0 1000,2000 5000,5000 3000,0 1000))",
+ "POLYGON((3000 0,0 3000,4000 5000,3000 0))"};
+
+
+template <bool Rescale, typename P>
+void test_rescale(std::string const& expected_normal, std::string const& expected_large)
+{
+ typedef bg::model::polygon<P> polygon;
+
+ typedef typename boost::mpl::if_c
+ <
+ Rescale,
+ typename bg::rescale_policy_type<P>::type ,
+ bg::detail::no_rescale_policy
+ >::type rescale_policy_type;
+
+ test_one<rescale_policy_type, polygon, polygon>(
+ simplex_normal[0], simplex_normal[1],
+ expected_normal);
+ test_one<rescale_policy_type, polygon, polygon>(
+ simplex_large[0], simplex_large[1],
+ expected_large);
+}
+
+template <typename T>
+void test_all(std::string const& expected_normal, std::string const& expected_large)
+{
+ typedef bg::model::d2::point_xy<T> point_type;
+ test_rescale<true, point_type>(expected_normal, expected_large);
+ //test_rescale<false, point_type>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<double>("-5000000 -3000000", "-5000000 -3000000");
+ test_all<long double>("-5000000 -3000000", "-5000000 -3000000");
+ test_all<int>("0 1", "0 1000");
+ test_all<boost::long_long_type>("0 1", "0 1000");
+ // test_all<short int>(); // compiles but overflows
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/robustness/common/common_settings.hpp b/src/boost/libs/geometry/test/robustness/common/common_settings.hpp
new file mode 100644
index 000000000..2d4153a47
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/common/common_settings.hpp
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Robustness Test
+//
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_COMMON_SETTINGS_HPP
+#define BOOST_GEOMETRY_COMMON_SETTINGS_HPP
+
+struct common_settings
+{
+ bool svg;
+ bool wkt;
+ bool also_difference;
+ double tolerance;
+
+ int field_size;
+ bool triangular;
+
+ common_settings()
+ : svg(false)
+ , wkt(false)
+ , also_difference(false)
+ , tolerance(1.0e-6)
+ , field_size(10)
+ , triangular(false)
+ {}
+};
+
+#endif // BOOST_GEOMETRY_COMMON_SETTINGS_HPP
diff --git a/src/boost/libs/geometry/test/robustness/common/make_square_polygon.hpp b/src/boost/libs/geometry/test/robustness/common/make_square_polygon.hpp
new file mode 100644
index 000000000..a40eda790
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/common/make_square_polygon.hpp
@@ -0,0 +1,46 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Robustness Test
+//
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_ROBUSTNESS_MAKE_SQUARE_POLYGON_HPP
+#define BOOST_GEOMETRY_TEST_ROBUSTNESS_MAKE_SQUARE_POLYGON_HPP
+
+#include <boost/geometry.hpp>
+
+template <typename Polygon, typename Generator, typename Settings>
+inline void make_square_polygon(Polygon& polygon, Generator& generator, Settings const& settings)
+{
+ using namespace boost::geometry;
+
+ typedef typename point_type<Polygon>::type point_type;
+ typedef typename coordinate_type<Polygon>::type coordinate_type;
+
+ coordinate_type x, y;
+ x = generator();
+ y = generator();
+
+ typename ring_type<Polygon>::type& ring = exterior_ring(polygon);
+
+ point_type p;
+ set<0>(p, x); set<1>(p, y); append(ring, p);
+ set<0>(p, x); set<1>(p, y + 1); append(ring, p);
+ set<0>(p, x + 1); set<1>(p, y + 1); append(ring, p);
+ set<0>(p, x + 1); set<1>(p, y); append(ring, p);
+ set<0>(p, x); set<1>(p, y); append(ring, p);
+
+ if (settings.triangular)
+ {
+ // Remove a point, generator says which
+ int c = generator() % 4;
+ if (c >= 1 && c <= 3)
+ {
+ ring.erase(ring.begin() + c);
+ }
+ }
+}
+
+#endif // BOOST_GEOMETRY_TEST_ROBUSTNESS_MAKE_SQUARE_POLYGON_HPP
diff --git a/src/boost/libs/geometry/test/robustness/convex_hull/Jamfile b/src/boost/libs/geometry/test/robustness/convex_hull/Jamfile
new file mode 100644
index 000000000..20521d548
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/convex_hull/Jamfile
@@ -0,0 +1,18 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+# Robustness Test - convex_hull
+#
+# Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+project random_multi_points
+ : requirements
+ <include>.
+ <library>../../../../program_options/build//boost_program_options
+ <link>static
+ ;
+
+exe random_multi_points : random_multi_points.cpp ;
diff --git a/src/boost/libs/geometry/test/robustness/convex_hull/random_multi_points.cpp b/src/boost/libs/geometry/test/robustness/convex_hull/random_multi_points.cpp
new file mode 100644
index 000000000..93662ca9d
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/convex_hull/random_multi_points.cpp
@@ -0,0 +1,224 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Robustness Test - convex_hull
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+
+#include <sstream>
+#include <fstream>
+
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+
+struct settings_type
+{
+ bool svg;
+ bool wkt;
+
+ settings_type()
+ : svg(false)
+ , wkt(false)
+ {}
+};
+
+namespace bg = boost::geometry;
+
+template <typename Geometry1, typename Geometry2>
+void create_svg(std::string const& filename, Geometry1 const& points, Geometry2 const& hull)
+{
+ typedef typename boost::geometry::point_type<Geometry1>::type point_type;
+
+ boost::geometry::model::box<point_type> box;
+ bg::envelope(hull, box);
+ bg::buffer(box, box, 1.0);
+
+ std::ofstream svg(filename.c_str());
+ boost::geometry::svg_mapper<point_type> mapper(svg, 800, 800);
+ mapper.add(box);
+
+ mapper.map(hull, "opacity:0.8;fill:none;stroke:rgb(255,0,255);stroke-width:4;stroke-dasharray:1,7;stroke-linecap:round");
+ mapper.map(points, "fill-opacity:0.5;fill:rgb(0,0,255);", 5);
+}
+
+
+template <typename MultiPoint, typename Generator>
+inline void make_multi_point(MultiPoint& mp, Generator& generator, int pcount)
+{
+ typedef typename bg::point_type<MultiPoint>::type point_type;
+ typedef typename bg::coordinate_type<MultiPoint>::type coordinate_type;
+
+ for(int i = 0; i < pcount; i++)
+ {
+ coordinate_type x, y;
+ x = generator();
+ y = generator();
+
+ point_type p;
+ bg::set<0>(p, x);
+ bg::set<1>(p, y);
+
+ mp.push_back(p);
+ }
+}
+
+template <typename MultiPoint, typename Polygon>
+bool check_hull(MultiPoint const& mp, Polygon const& poly)
+{
+ for(typename boost::range_iterator<MultiPoint const>::type it = boost::begin(mp);
+ it != boost::end(mp);
+ ++it)
+ {
+ if (! bg::covered_by(*it, poly))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+
+template <typename MultiPoint, typename Generator>
+void test_random_multi_points(MultiPoint& result, int& index,
+ Generator& generator,
+ int pcount, settings_type const& settings)
+{
+ typedef typename bg::point_type<MultiPoint>::type point_type;
+
+ MultiPoint mp;
+ bg::model::polygon<point_type> hull;
+
+ make_multi_point(mp, generator, pcount);
+ bg::convex_hull(mp, hull);
+ // Check if each point lies in the hull
+ bool correct = check_hull(mp, hull);
+ if (! correct)
+ {
+ std::cout << "ERROR! " << std::endl
+ << bg::wkt(mp) << std::endl
+ << bg::wkt(hull) << std::endl
+ << std::endl;
+ ;
+ }
+
+ if (settings.svg || ! correct)
+ {
+ std::ostringstream out;
+ out << "random_mp_" << index++ << "_" << pcount << ".svg";
+ create_svg(out.str(), mp, hull);
+ }
+ if (settings.wkt)
+ {
+ std::cout
+ << "input: " << bg::wkt(mp) << std::endl
+ << "output: " << bg::wkt(hull) << std::endl
+ << std::endl;
+ ;
+ }
+}
+
+
+template <typename T>
+void test_all(int seed, int count, int field_size, int pcount, settings_type const& settings)
+{
+ boost::timer t;
+
+ typedef boost::minstd_rand base_generator_type;
+
+ base_generator_type generator(seed);
+
+ boost::uniform_int<> random_coordinate(0, field_size - 1);
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ coordinate_generator(generator, random_coordinate);
+
+ typedef bg::model::multi_point
+ <
+ bg::model::d2::point_xy<T>
+ > mp;
+
+ int index = 0;
+ for(int i = 0; i < count; i++)
+ {
+ mp p;
+ test_random_multi_points<mp>(p, index, coordinate_generator, pcount, settings);
+ }
+ std::cout
+ << "points: " << index
+ << " type: " << typeid(T).name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== random_multi_points ===\nAllowed options");
+
+ std::string type = "double";
+ int count = 1;
+ int seed = static_cast<unsigned int>(std::time(0));
+ int pcount = 3;
+ int field_size = 10;
+ settings_type settings;
+
+ description.add_options()
+ ("help", "Help message")
+ ("seed", po::value<int>(&seed), "Initialization seed for random generator")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("number", po::value<int>(&pcount)->default_value(30), "Number of points")
+ ("size", po::value<int>(&field_size)->default_value(10), "Size of the field")
+ ("type", po::value<std::string>(&type)->default_value("double"), "Type (int,float,double)")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ if (type == "float")
+ {
+ test_all<float>(seed, count, field_size, pcount, settings);
+ }
+ else if (type == "double")
+ {
+ test_all<double>(seed, count, field_size, pcount, settings);
+ }
+ else if (type == "int")
+ {
+ test_all<int>(seed, count, field_size, pcount, settings);
+ }
+
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/Jamfile b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/Jamfile
new file mode 100644
index 000000000..96e42656d
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/Jamfile
@@ -0,0 +1,28 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
+# Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+project boost-geometry-robustness-overlay-areal_areal
+ :
+ requirements
+ <include>.
+ <library>/boost/program_options//boost_program_options
+ ;
+
+exe interior_triangles : interior_triangles.cpp ;
+exe intersection_pies : intersection_pies.cpp ;
+exe intersection_stars : intersection_stars.cpp ;
+exe intersects : intersects.cpp ;
+exe random_ellipses_stars : random_ellipses_stars.cpp ;
+exe recursive_polygons : recursive_polygons.cpp ;
+exe star_comb : star_comb.cpp ;
+
+exe ticket_9081 : ticket_9081.cpp ;
+
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/general_intersection_precision.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/general_intersection_precision.cpp
new file mode 100755
index 000000000..6413f2d18
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/general_intersection_precision.cpp
@@ -0,0 +1,224 @@
+// Boost.Geometry
+// Robustness Test
+
+// Copyright (c) 2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <sstream>
+#include <string>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+// Basic case. Union should deliver 22.0
+static std::string case_a[2] =
+ {
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 3,4 3,4 0,0 0)))",
+ "MULTIPOLYGON(((2 7,4 7,4 3,2 3,2 7)))"
+ };
+
+// Case with an interior ring. Union should deliver 73.0
+static std::string case_b[2] =
+ {
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 3,4 3,4 0,0 0)))",
+ "MULTIPOLYGON(((-1 -1,-1 8,8 8,8 -1,-1 -1),(2 7,2 3,4 3,4 7,2 7)))"
+ };
+
+static std::string case_c[2] =
+ {
+ "MULTIPOLYGON(((0 0,0 4,2 4,2 3,4 3,4 0,0 0)))",
+ "MULTIPOLYGON(((1 1,0 1,0 3,1 3,1 1)))"
+ };
+
+template <bg::overlay_type OverlayType, typename Geometry>
+bool test_overlay(std::string const& caseid,
+ Geometry const& g1, Geometry const& g2,
+ double expected_area,
+ bool do_output)
+{
+
+ typedef typename boost::range_value<Geometry>::type geometry_out;
+ typedef bg::detail::overlay::overlay
+ <
+ Geometry, Geometry,
+ bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value,
+ OverlayType == bg::overlay_difference
+ ? ! bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value
+ : bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value,
+ bg::detail::overlay::do_reverse<bg::point_order<Geometry>::value>::value,
+ geometry_out,
+ OverlayType
+ > overlay;
+
+ typedef typename bg::strategy::intersection::services::default_strategy
+ <
+ typename bg::cs_tag<Geometry>::type
+ >::type strategy_type;
+
+ strategy_type strategy;
+
+ typedef typename bg::rescale_overlay_policy_type
+ <
+ Geometry,
+ Geometry
+ >::type rescale_policy_type;
+
+ rescale_policy_type robust_policy
+ = bg::get_rescale_policy<rescale_policy_type>(g1, g2);
+
+ Geometry result;
+ bg::detail::overlay::overlay_null_visitor visitor;
+ overlay::apply(g1, g2, robust_policy, std::back_inserter(result),
+ strategy, visitor);
+
+ const double detected_area = bg::area(result);
+ if (std::fabs(detected_area - expected_area) > 0.01)
+ {
+ if (do_output)
+ {
+ std::cout << "ERROR: " << caseid << std::setprecision(18)
+ << " detected=" << detected_area
+ << " expected=" << expected_area << std::endl
+ << " " << bg::wkt(g1) << std::endl
+ << " " << bg::wkt(g2) << std::endl;
+ }
+ return false;
+ }
+ return true;
+}
+
+template <typename Ring>
+void update(Ring& ring, double x, double y, std::size_t index)
+{
+ if (index >= ring.size())
+ {
+ return;
+ }
+ bg::set<0>(ring[index], bg::get<0>(ring[index]) + x);
+ bg::set<1>(ring[index], bg::get<1>(ring[index]) + y);
+ if (index == 0)
+ {
+ ring.back() = ring.front();
+ }
+}
+
+template <bg::overlay_type OverlayType, typename MultiPolygon>
+std::size_t test_case(std::size_t& error_count,
+ std::size_t case_index, std::size_t i, std::size_t j,
+ std::size_t min_vertex_index, std::size_t max_vertex_index,
+ double x, double y, double expectation,
+ MultiPolygon const& poly1, MultiPolygon const& poly2,
+ bool do_output)
+{
+ std::size_t n = 0;
+ for (std::size_t k = min_vertex_index; k <= max_vertex_index; k++, ++n)
+ {
+ MultiPolygon poly2_adapted = poly2;
+
+ switch (case_index)
+ {
+ case 2 :
+ update(bg::interior_rings(poly2_adapted.front()).front(), x, y, k);
+ break;
+ default :
+ update(bg::exterior_ring(poly2_adapted.front()), x, y, k);
+ break;
+ }
+
+ std::ostringstream out;
+ out << "case_" << i << "_" << j << "_" << k;
+ if (! test_overlay<OverlayType>(out.str(), poly1, poly2_adapted, expectation, do_output))
+ {
+ if (error_count == 0)
+ {
+ // First failure is always reported
+ test_overlay<OverlayType>(out.str(), poly1, poly2_adapted, expectation, true);
+ }
+ error_count++;
+ }
+ }
+ return n;
+}
+
+template <typename T, bool Clockwise, bg::overlay_type OverlayType>
+std::size_t test_all(std::size_t case_index, std::size_t min_vertex_index,
+ std::size_t max_vertex_index,
+ double expectation, bool do_output)
+{
+ typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::polygon<point_type, Clockwise> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ const std::string& first = case_a[0];
+
+ const std::string& second
+ = case_index == 1 ? case_a[1]
+ : case_index == 2 ? case_b[1]
+ : case_index == 3 ? case_c[1]
+ : "";
+
+ multi_polygon poly1;
+ bg::read_wkt(first, poly1);
+
+ multi_polygon poly2;
+ bg::read_wkt(second, poly2);
+
+ std::size_t error_count = 0;
+ std::size_t n = 0;
+ for (double factor = 1.0; factor > 1.0e-10; factor /= 10.0)
+ {
+ std::size_t i = 0;
+ double const bound = 1.0e-5 * factor;
+ double const step = 1.0e-6 * factor;
+ for (double x = -bound; x <= bound; x += step, ++i)
+ {
+ std::size_t j = 0;
+ for (double y = -bound; y <= bound; y += step, ++j, ++n)
+ {
+ n += test_case<OverlayType>(error_count,
+ case_index, i, j,
+ min_vertex_index, max_vertex_index,
+ x, y, expectation,
+ poly1, poly2, do_output);
+ }
+ }
+ }
+
+ std::cout << case_index
+ << " #cases: " << n << " #errors: " << error_count << std::endl;
+ BOOST_CHECK_EQUAL(error_count, 0u);
+
+ return error_count;
+}
+
+int test_main(int argc, char** argv)
+{
+ typedef double coordinate_type;
+
+ const double factor = argc > 1 ? atof(argv[1]) : 2.0;
+ const bool do_output = argc > 2 && atol(argv[2]) == 1;
+
+ std::cout << std::endl << " -> TESTING "
+ << string_from_type<coordinate_type>::name()
+ << " " << factor
+ << std::endl;
+
+ test_all<coordinate_type, true, bg::overlay_union>(1, 0, 3, 22.0, do_output);
+ test_all<coordinate_type, true, bg::overlay_union>(2, 0, 3, 73.0, do_output);
+ test_all<coordinate_type, true, bg::overlay_intersection>(3, 1, 2, 2.0, do_output);
+ test_all<coordinate_type, true, bg::overlay_union>(3, 1, 2, 14.0, do_output);
+
+ return 0;
+ }
+
+
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/interior_triangles.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/interior_triangles.cpp
new file mode 100644
index 000000000..baf945dd9
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/interior_triangles.cpp
@@ -0,0 +1,162 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <iomanip>
+#include <string>
+
+#define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+#define BOOST_GEOMETRY_TIME_OVERLAY
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+template <typename Polygon>
+inline void make_polygon(Polygon& polygon, int count_x, int count_y, int index, int offset)
+{
+ typedef typename bg::point_type<Polygon>::type point_type;
+ bg::exterior_ring(polygon).push_back(point_type(0, 0));
+ bg::exterior_ring(polygon).push_back(point_type(0, count_y * 10));
+ bg::exterior_ring(polygon).push_back(point_type(count_x * 10 + 10, count_y * 10));
+ bg::exterior_ring(polygon).push_back(point_type(count_x * 10 + 10, 0));
+ bg::exterior_ring(polygon).push_back(point_type(0, 0));
+
+ for(int j = 0; j < count_x; ++j)
+ {
+ for(int k = 0; k < count_y; ++k)
+ {
+ polygon.inners().push_back(typename Polygon::inner_container_type::value_type());
+ polygon.inners().back().push_back(point_type(offset + j * 10 + 1, k * 10 + 1));
+ polygon.inners().back().push_back(point_type(offset + j * 10 + 7, k * 10 + 5 + index));
+ polygon.inners().back().push_back(point_type(offset + j * 10 + 5 + index, k * 10 + 7));
+ polygon.inners().back().push_back(point_type(offset + j * 10 + 1, k * 10 + 1));
+ }
+ }
+ bg::correct(polygon);
+}
+
+
+
+template <typename Polygon>
+void test_star_comb(int count_x, int count_y, int offset, p_q_settings const& settings)
+{
+ Polygon p, q;
+
+ make_polygon(p, count_x, count_y, 0, 0);
+ make_polygon(q, count_x, count_y, 1, offset);
+
+ std::ostringstream out;
+ out << "interior_triangles";
+ test_overlay_p_q
+ <
+ Polygon,
+ typename bg::coordinate_type<Polygon>::type
+ >(out.str(), p, q, settings);
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_all(int count, int count_x, int count_y, int offset, p_q_settings const& settings)
+{
+ boost::timer t;
+
+ typedef bg::model::polygon
+ <
+ bg::model::d2::point_xy<T>, Clockwise, Closed
+ > polygon;
+
+
+ for(int i = 0; i < count; i++)
+ {
+ test_star_comb<polygon>(count_x, count_y, offset, settings);
+ }
+ std::cout
+ << " type: " << string_from_type<T>::name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== interior_triangles ===\nAllowed options");
+
+ int offset = 0;
+ int count = 1;
+ int count_x = 10;
+ int count_y = 10;
+ bool ccw = false;
+ bool open = false;
+ p_q_settings settings;
+
+ description.add_options()
+ ("help", "Help message")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("count_x", po::value<int>(&count_x)->default_value(10), "Triangle count in x-direction")
+ ("count_y", po::value<int>(&count_y)->default_value(10), "Triangle count in y-direction")
+ ("offset", po::value<int>(&offset)->default_value(0), "Offset of second triangle in x-direction")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ if (ccw && open)
+ {
+ test_all<double, false, false>(count, count_x, count_y, offset, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(count, count_x, count_y, offset, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(count, count_x, count_y, offset, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(count, count_x, count_y, offset, settings);
+ }
+
+#if defined(HAVE_TTMATH)
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
+#endif
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_pies.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_pies.cpp
new file mode 100644
index 000000000..dce301c12
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_pies.cpp
@@ -0,0 +1,300 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/timer.hpp>
+
+template <typename Polygon>
+inline void make_pie(Polygon& polygon,
+ int count, int offset, int offset_y, double factor1, int total_segment_count = 36)
+{
+ typedef typename bg::point_type<Polygon>::type p;
+ typedef typename bg::select_most_precise
+ <
+ typename bg::coordinate_type<Polygon>::type,
+ long double
+ >::type coordinate_type;
+
+ // Create pie
+ coordinate_type cx = 2500.0;
+ coordinate_type cy = 2500.0 + offset_y;
+
+ bg::exterior_ring(polygon).push_back(bg::make<p>(int(cx), int(cy)));
+
+ coordinate_type const dx = 5000.0;
+ coordinate_type const dy = 5000.0;
+
+ coordinate_type const half = 0.5;
+ coordinate_type const two = 2.0;
+
+ coordinate_type const a = coordinate_type(factor1) * half * dx;
+ coordinate_type const b = coordinate_type(factor1) * half * dy;
+
+ coordinate_type const pi = boost::math::constants::pi<long double>();
+ coordinate_type const delta = pi * two / total_segment_count;
+ coordinate_type angle = coordinate_type(offset) * delta;
+ for (int i = 0; i < count; i++, angle += delta)
+ {
+ coordinate_type const s = sin(angle);
+ coordinate_type const c = cos(angle);
+ coordinate_type const x = cx + a * s;
+ coordinate_type const y = cy + b * c;
+ bg::exterior_ring(polygon).push_back(bg::make<p>(int(x), int(y)));
+ }
+ bg::exterior_ring(polygon).push_back(bg::make<p>(int(cx), int(cy)));
+ bg::correct(polygon);
+}
+
+
+/*
+sql server
+
+TWO INNERS
+1a) select geometry::STGeomFromText('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,5 5,4 6,4 4),(6 6,5 5,6 4,6 6)) ', 0).STIsValid(); -> valid
+same:
+1b) POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,5 5,6 4,6 6,5 5,4 6,4 4)) -> valid
+
+I-E tangency IET
+2a) select geometry::STGeomFromText('POLYGON((0 0,0 10,10 10,10 0,0 0),(5 0,6 1,4 1,5 0))', 0).STIsValid(); -> valid
+same by Self tangency ST
+2b) select geometry::STGeomFromText('POLYGON((0 0,0 10,10 10,10 0,5 0,6 1,4 1,5 0, 0 0))', 0).STIsValid(); -> valid
+
+Two inners all tangent
+3a) POLYGON((0 0,0 10,10 10,10 0,0 0),(5 0,6 1,4 1,5 0),(5 1,6 2,4 2,5 1)) -> valid
+
+postgis:
+1a) select ST_IsValid(ST_GeomFromText('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,5 5,4 6,4 4),(6 6,5 5,6 4,6 6))', 0)); -> valid
+1b) POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,5 5,6 4,6 6,5 5,4 6,4 4)) -> NOT valid
+
+2a) POLYGON((0 0,0 10,10 10,10 0,0 0),(5 0,6 1,4 1,5 0)) -> valid
+2b) POLYGON((0 0,0 10,10 10,10 0,5 0,6 1,4 1,5 0, 0 0)) -> NOT valid (?)
+
+3a) POLYGON((0 0,0 10,10 10,10 0,0 0),(5 0,6 1,4 1,5 0),(5 1,6 2,4 2,5 1)) -> valid
+
+
+*/
+
+template <typename Polygon>
+inline void holify(Polygon& polygon)
+{
+ typedef typename bg::point_type<Polygon>::type point_type;
+
+ Polygon p;
+ bg::exterior_ring(p).push_back(bg::make<point_type>(0, 0));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(0, 5000));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(5000, 5000));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(5000, 0));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(0, 0));
+ bg::interior_rings(p).push_back(bg::exterior_ring(polygon));
+ bg::correct(p);
+
+ polygon = p;
+}
+
+template <typename MultiPolygon>
+inline void holify_multi(MultiPolygon& multi_polygon)
+{
+ typedef typename bg::point_type<MultiPolygon>::type point_type;
+
+ typename boost::range_value<MultiPolygon>::type p;
+
+ bg::exterior_ring(p).push_back(bg::make<point_type>(0, 0));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(0, 5000));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(5000, 5000));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(5000, 0));
+ bg::exterior_ring(p).push_back(bg::make<point_type>(0, 0));
+
+ for (int i = 0; i < multi_polygon.size(); i++)
+ {
+ bg::interior_rings(p).push_back(bg::exterior_ring(multi_polygon[i]));
+ }
+
+ bg::correct(p);
+
+ multi_polygon.clear();
+ multi_polygon.push_back(p);
+}
+
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_pie(int total_segment_count, T factor_p, T factor_q,
+ bool multi, bool single_selftangent, p_q_settings const& settings)
+{
+ boost::timer t;
+ typedef bg::model::d2::point_xy<T> point_type;
+ typedef bg::model::polygon<point_type, Clockwise, Closed> polygon;
+ typedef bg::model::multi_polygon<polygon> multi_polygon;
+
+ int good_count = 0;
+ int bad_count = 0;
+
+ for (int a = 2; a < total_segment_count; a++)
+ {
+ polygon p;
+ make_pie(p, a, 0, 0, factor_p, total_segment_count);
+
+ //holify(p);
+
+ for (int b = 2; b < total_segment_count; b++)
+ {
+ for (int offset = 1; offset < total_segment_count; offset++)
+ {
+ //for (int y = 0; y <= 2500; y += 500)
+ int y = 0;
+ {
+ polygon q;
+ make_pie(q, b, offset, y, factor_q, total_segment_count);
+
+ if (! multi)
+ {
+ //holify(q);
+
+ std::ostringstream out;
+ out << "pie_" << a << "_" << b << "_" << offset << "_" << y;
+ if (test_overlay_p_q<polygon, T>(out.str(), p, q, settings))
+ {
+ good_count++;
+ }
+ else
+ {
+ bad_count++;
+ }
+ }
+ else
+ {
+ int left = total_segment_count - b - 2;
+ //std::cout << a << " " << b << " " << left << std::endl;
+ for (int c = 2; c < left; c++)
+ {
+ polygon q2;
+ make_pie(q2, c, offset + b + 1, y, factor_q, total_segment_count);
+
+ std::ostringstream out;
+ out << "pie_" << a << "_" << b << "_" << offset << "_" << y
+ << "_" << c
+ ;
+
+ bool good = false;
+
+ // Represent as either multi-polygon, or as single-self-touching-polygon (INVALID)
+ if (single_selftangent)
+ {
+ polygon q1 = q;
+ for (unsigned int i = 1; i < q2.outer().size(); i++)
+ {
+ q1.outer().push_back(q2.outer()[i]);
+ }
+ //holify(q1);
+ good = test_overlay_p_q<polygon, T>(out.str(), p, q1, settings);
+ }
+ else
+ {
+ multi_polygon mq;
+ mq.push_back(q);
+ mq.push_back(q2);
+ //holify_multi(mq);
+ good = test_overlay_p_q<polygon, T>(out.str(), p, mq, settings);
+ }
+
+ if (good)
+ {
+ good_count++;
+ }
+ else
+ {
+ bad_count++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ std::cout
+ << "Time: " << t.elapsed() << std::endl
+ << "Good: " << good_count << std::endl
+ << "Bad: " << bad_count << std::endl;
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_all(bool multi, bool single_selftangent, p_q_settings const& settings)
+{
+ test_pie<T, Clockwise, Closed>(24, 0.55, 0.45, multi, single_selftangent, settings);
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== intersection_pies ===\nAllowed options");
+
+ p_q_settings settings;
+ bool multi = false;
+ bool ccw = false;
+ bool open = false;
+ bool single_selftangent = false; // keep false, true does not work!
+
+ description.add_options()
+ ("help", "Help message")
+ ("multi", po::value<bool>(&multi)->default_value(false), "Multiple tangencies at one point")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ // template par's are: CoordinateType, Clockwise, Closed
+ if (ccw && open)
+ {
+ test_all<double, false, false>(multi, single_selftangent, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(multi, single_selftangent, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(multi, single_selftangent, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(multi, single_selftangent, settings);
+ }
+ //test_all<long double>();
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_stars.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_stars.cpp
new file mode 100644
index 000000000..0592e2af3
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersection_stars.cpp
@@ -0,0 +1,182 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/timer.hpp>
+
+template <typename Polygon>
+inline void make_star(Polygon& polygon,
+ int count, double factor1, double factor2, long double offset = 0)
+{
+ typedef typename bg::point_type<Polygon>::type p;
+ typedef typename bg::select_most_precise
+ <
+ typename bg::coordinate_type<Polygon>::type,
+ long double
+ >::type coordinate_type;
+
+ // Create star
+ coordinate_type cx = 25.0;
+ coordinate_type cy = 25.0;
+
+ coordinate_type dx = 50.0;
+ coordinate_type dy = 50.0;
+
+ coordinate_type half = 0.5;
+ coordinate_type two = 2.0;
+
+ coordinate_type a1 = coordinate_type(factor1) * half * dx;
+ coordinate_type b1 = coordinate_type(factor1) * half * dy;
+ coordinate_type a2 = coordinate_type(factor2) * half * dx;
+ coordinate_type b2 = coordinate_type(factor2) * half * dy;
+
+ coordinate_type pi = boost::math::constants::pi<long double>();
+ coordinate_type delta = pi * two / coordinate_type(count - 1);
+ coordinate_type angle = coordinate_type(offset) * delta;
+ for (int i = 0; i < count - 1; i++, angle += delta)
+ {
+ bool even = i % 2 == 0;
+ coordinate_type s = sin(angle);
+ coordinate_type c = cos(angle);
+ coordinate_type x = cx + (even ? a1 : a2) * s;
+ coordinate_type y = cy + (even ? b1 : b2) * c;
+ bg::exterior_ring(polygon).push_back(bg::make<p>(x, y));
+
+ }
+ bg::exterior_ring(polygon).push_back(bg::exterior_ring(polygon).front());
+}
+
+
+template <typename T, typename CalculationType>
+void test_star(int count, int min_points, int max_points, T rotation, p_q_settings const& settings)
+{
+ boost::timer t;
+ typedef bg::model::d2::point_xy<T> point_type;
+ typedef bg::model::polygon<point_type> polygon;
+
+ int n = 0;
+ for (int c = 0; c < count; c++)
+ {
+ for (int i = min_points; i <= max_points; i++)
+ {
+ std::ostringstream out;
+ out << "_" << string_from_type<T>::name() << "_"
+ << string_from_type<CalculationType>::name() << "_"
+ << i << "_int";
+
+ polygon p;
+ make_star(p, i * 2 + 1, 0.5, 1.0);
+ polygon q;
+ make_star(q, i * 2 + 1, 0.5, 1.0, rotation);
+
+ if (! test_overlay_p_q
+ <
+ polygon,
+ CalculationType
+ >(out.str(), p, q, settings))
+ {
+ return;
+ }
+ n++;
+ }
+ }
+ std::cout
+ << "polygons: " << n
+ << " type: " << string_from_type<T>::name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+template <typename T, typename CalculationType>
+void test_type(int count, int min_points, int max_points, T rotation, p_q_settings const& settings)
+{
+ test_star<T, CalculationType>(count, min_points, max_points, rotation, settings);
+}
+
+template <typename T>
+void test_all(std::string const& type, int count, int min_points, int max_points, T rotation, p_q_settings settings)
+{
+ if (type == "float")
+ {
+ settings.tolerance = 1.0e-3;
+ test_type<float, float>(count, min_points, max_points, rotation, settings);
+ }
+ else if (type == "double")
+ {
+ test_type<double, double>(count, min_points, max_points, rotation, settings);
+ }
+#if defined(HAVE_TTMATH)
+ else if (type == "ttmath")
+ {
+ test_type<ttmath_big, ttmath_big>(count, min_points, max_points, rotation, settings);
+ }
+#endif
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== recursive_polygons ===\nAllowed options");
+
+ int count = 1;
+ //int seed = static_cast<unsigned int>(std::time(0));
+ std::string type = "float";
+ int min_points = 9;
+ int max_points = 9;
+ bool ccw = false;
+ bool open = false;
+ double rotation = 1.0e-13;
+ p_q_settings settings;
+
+ description.add_options()
+ ("help", "Help message")
+ //("seed", po::value<int>(&seed), "Initialization seed for random generator")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("min_points", po::value<int>(&min_points)->default_value(9), "Minimum number of points")
+ ("max_points", po::value<int>(&max_points)->default_value(9), "Maximum number of points")
+ ("rotation", po::value<double>(&rotation)->default_value(1.0e-13), "Rotation angle")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("type", po::value<std::string>(&type)->default_value("float"), "Type (float,double)")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ test_all(type, count, min_points, max_points, rotation, settings);
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersects.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersects.cpp
new file mode 100644
index 000000000..6ad26d22a
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/intersects.cpp
@@ -0,0 +1,173 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <iomanip>
+#include <string>
+
+#define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+//#define BOOST_GEOMETRY_TIME_OVERLAY
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+
+template <typename MultiPolygon>
+inline void make_polygon(MultiPolygon& mp, int count_x, int count_y, int index, int width_x)
+{
+ typedef typename bg::point_type<MultiPolygon>::type point_type;
+
+ for(int j = 0; j < count_x; ++j)
+ {
+ for(int k = 0; k < count_y; ++k)
+ {
+ mp.push_back(typename MultiPolygon::value_type());
+ mp.back().outer().push_back(point_type(width_x + j * 10 + 1, k * 10 + 1));
+ mp.back().outer().push_back(point_type(width_x + j * 10 + width_x, k * 10 + 5 + index));
+ mp.back().outer().push_back(point_type(width_x + j * 10 + 5 + index, k * 10 + 7));
+ mp.back().outer().push_back(point_type(width_x + j * 10 + 1, k * 10 + 1));
+ }
+ }
+}
+
+
+
+template <typename MultiPolygon>
+void test_intersects(int count_x, int count_y, int width_x, p_q_settings const& settings)
+{
+ MultiPolygon mp;
+
+ make_polygon(mp, count_x, count_y, 0, width_x);
+
+ bool const b = bg::intersects(mp);
+ if (b)
+ {
+ std::cout << " YES";
+ }
+
+ if(settings.svg)
+ {
+ typedef typename bg::coordinate_type<MultiPolygon>::type coordinate_type;
+ typedef typename bg::point_type<MultiPolygon>::type point_type;
+ std::ostringstream filename;
+ filename << "intersects_"
+ << string_from_type<coordinate_type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+ mapper.add(mp);
+ mapper.map(mp, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ }
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_all(int count, int count_x, int count_y, int width_x, p_q_settings const& settings)
+{
+ boost::timer t;
+
+ typedef bg::model::polygon
+ <
+ bg::model::d2::point_xy<T>, Clockwise, Closed
+ > polygon;
+ typedef bg::model::multi_polygon
+ <
+ polygon
+ > multi_polygon;
+
+
+ for(int i = 0; i < count; i++)
+ {
+ test_intersects<multi_polygon>(count_x, count_y, width_x, settings);
+ }
+ std::cout
+ << " type: " << string_from_type<T>::name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== intersects ===\nAllowed options");
+
+ int width_x = 7;
+ int count = 1;
+ int count_x = 10;
+ int count_y = 10;
+ bool ccw = false;
+ bool open = false;
+ p_q_settings settings;
+
+ description.add_options()
+ ("help", "Help message")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("count_x", po::value<int>(&count_x)->default_value(10), "Triangle count in x-direction")
+ ("count_y", po::value<int>(&count_y)->default_value(10), "Triangle count in y-direction")
+ ("width_x", po::value<int>(&width_x)->default_value(7), "Width of triangle in x-direction")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ if (ccw && open)
+ {
+ test_all<double, false, false>(count, count_x, count_y, width_x, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(count, count_x, count_y, width_x, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(count, count_x, count_y, width_x, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(count, count_x, count_y, width_x, settings);
+ }
+
+#if defined(HAVE_TTMATH)
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
+#endif
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/random_ellipses_stars.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/random_ellipses_stars.cpp
new file mode 100644
index 000000000..f5b930e55
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/random_ellipses_stars.cpp
@@ -0,0 +1,251 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/timer.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+
+
+struct star_params
+{
+ int count; // points of ellipse, not of star
+ double factor_1;
+ double factor_2;
+ double center_x;
+ double center_y;
+ double rotation;
+ star_params(int c, double f1, double f2, double x, double y, double r = 0)
+ : count(c)
+ , factor_1(f1)
+ , factor_2(f2)
+ , center_x(x)
+ , center_y(y)
+ , rotation(r)
+ {}
+};
+
+
+
+template <typename Polygon>
+inline void make_star(Polygon& polygon, star_params const& p)
+{
+ typedef typename bg::point_type<Polygon>::type P;
+ typedef typename bg::select_most_precise
+ <
+ typename bg::coordinate_type<Polygon>::type,
+ long double
+ >::type coordinate_type;
+
+ // Create star
+ coordinate_type cx = 25.0;
+ coordinate_type cy = 25.0;
+
+ coordinate_type dx = 50.0;
+ coordinate_type dy = 50.0;
+
+ coordinate_type half = 0.5;
+ coordinate_type two = 2.0;
+
+ coordinate_type a1 = coordinate_type(p.factor_1) * half * dx;
+ coordinate_type b1 = coordinate_type(p.factor_1) * half * dy;
+ coordinate_type a2 = coordinate_type(p.factor_2) * half * dx;
+ coordinate_type b2 = coordinate_type(p.factor_2) * half * dy;
+
+ coordinate_type pi = boost::math::constants::pi<long double>();
+ coordinate_type delta = pi * two / coordinate_type(p.count - 1);
+ coordinate_type angle = coordinate_type(p.rotation) * delta;
+ for (int i = 0; i < p.count - 1; i++, angle += delta)
+ {
+ bool even = i % 2 == 0;
+ coordinate_type s = sin(angle);
+ coordinate_type c = cos(angle);
+ coordinate_type x = p.center_x + cx + (even ? a1 : a2) * s;
+ coordinate_type y = p.center_y + cy + (even ? b1 : b2) * c;
+ bg::exterior_ring(polygon).push_back(bg::make<P>(x, y));
+
+ }
+ bg::exterior_ring(polygon).push_back(bg::exterior_ring(polygon).front());
+ bg::correct(polygon);
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_star_ellipse(int seed, int index, star_params const& par_p,
+ star_params const& par_q, p_q_settings const& settings)
+{
+ typedef bg::model::d2::point_xy<T> point_type;
+ typedef bg::model::polygon<point_type, Clockwise, Closed> polygon;
+
+ polygon p, q;
+ make_star(p, par_p);
+ make_star(q, par_q);
+
+ std::ostringstream out;
+ out << "rse_" << seed << "_" << index;
+ test_overlay_p_q<polygon, T>(out.str(), p, q, settings);
+}
+
+template <typename T, bool Clockwise, bool Closed>
+void test_type(int seed, int count, p_q_settings const& settings)
+{
+ boost::timer t;
+
+ typedef boost::minstd_rand base_generator_type;
+
+ //boost::uniform_real<> random_factor(0.5, 1.2);
+ //boost::uniform_real<> random_location(-10.0, 10.0);
+ //boost::uniform_int<> random_points(5, 20);
+
+ // This set (next 4 lines) are now solved for the most part
+ // 2009-12-03, 3 or 4 errors in 1000000 calls
+ // 2009-12-07, no errors in 1000000 calls
+ //boost::uniform_real<> random_factor(1.0 - 1e-3, 1.0 + 1e-3);
+ //boost::uniform_real<> random_location(-1e-3, 1e-3);
+ //boost::uniform_real<> random_rotation(-1e-3, 1e-3);
+ //boost::uniform_int<> random_points(3, 3);
+
+ // 2009-12-08, still errors, see notes
+ // 2009-12-09, (probably) solved by order on side
+ // 2010-01-16: solved (no errors in 1000000 calls)
+ //boost::uniform_real<> random_factor(1.0 - 1e-3, 1.0 + 1e-3);
+ //boost::uniform_real<> random_location(-1e-3, -1e-3);
+ //boost::uniform_real<> random_rotation(-1e-3, 1e-3);
+ //boost::uniform_int<> random_points(3, 4);
+
+ // This set (next 4 lines) are now solved ("distance-zero"/"merge iiii" problem)
+ // 2009-12-03: 5,50 -> 2:1 000 000 wrong (2009-12-03)
+ // 2010-01-16: solved (no errors in 10000000 calls)
+ boost::uniform_real<> random_factor(0.3, 1.2);
+ boost::uniform_real<> random_location(-20.0, +20.0); // -25.0, +25.0
+ boost::uniform_real<> random_rotation(0, 0.5);
+ boost::uniform_int<> random_points(5, 15);
+
+ base_generator_type generator(seed);
+
+ boost::variate_generator<base_generator_type&, boost::uniform_real<> >
+ factor_generator(generator, random_factor);
+
+ boost::variate_generator<base_generator_type&, boost::uniform_real<> >
+ location_generator(generator, random_location);
+
+ boost::variate_generator<base_generator_type&, boost::uniform_real<> >
+ rotation_generator(generator, random_rotation);
+
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ int_generator(generator, random_points);
+
+ for(int i = 0; i < count; i++)
+ {
+ test_star_ellipse<T, Clockwise, Closed>(seed, i + 1,
+ star_params(int_generator() * 2 + 1,
+ factor_generator(), factor_generator(),
+ location_generator(), location_generator(), rotation_generator()),
+ star_params(int_generator() * 2 + 1,
+ factor_generator(), factor_generator(),
+ location_generator(), location_generator(), rotation_generator()),
+ settings);
+ }
+ std::cout
+ << "type: " << string_from_type<T>::name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+template <bool Clockwise, bool Closed>
+void test_all(std::string const& type, int seed, int count, p_q_settings settings)
+{
+ if (type == "float")
+ {
+ test_type<float, Clockwise, Closed>(seed, count, settings);
+ }
+ else if (type == "double")
+ {
+ test_type<double, Clockwise, Closed>(seed, count, settings);
+ }
+#if defined(HAVE_TTMATH)
+ else if (type == "ttmath")
+ {
+ test_type<ttmath_big, Clockwise, Closed>(seed, count, settings);
+ }
+#endif
+}
+
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== random_ellipses_stars ===\nAllowed options");
+
+ int count = 1;
+ int seed = static_cast<unsigned int>(std::time(0));
+ std::string type = "float";
+ bool ccw = false;
+ bool open = false;
+ p_q_settings settings;
+
+ description.add_options()
+ ("help", "Help message")
+ ("seed", po::value<int>(&seed), "Initialization seed for random generator")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("type", po::value<std::string>(&type)->default_value("float"), "Type (float,double)")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ if (ccw && open)
+ {
+ test_all<false, false>(type, seed, count, settings);
+ }
+ else if (ccw)
+ {
+ test_all<false, true>(type, seed, count, settings);
+ }
+ else if (open)
+ {
+ test_all<true, false>(type, seed, count, settings);
+ }
+ else
+ {
+ test_all<true, true>(type, seed, count, settings);
+ }
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/recursive_polygons.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/recursive_polygons.cpp
new file mode 100644
index 000000000..9baf4248b
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/recursive_polygons.cpp
@@ -0,0 +1,218 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Robustness Test
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+
+template <typename Polygon, typename Generator>
+inline void make_polygon(Polygon& polygon, Generator& generator, bool triangular)
+{
+ typedef typename bg::point_type<Polygon>::type point_type;
+ typedef typename bg::coordinate_type<Polygon>::type coordinate_type;
+
+ coordinate_type x, y;
+ x = generator();
+ y = generator();
+
+ typename bg::ring_type<Polygon>::type& ring = bg::exterior_ring(polygon);
+
+ point_type p;
+ bg::set<0>(p, x); bg::set<1>(p, y); ring.push_back(p);
+ bg::set<0>(p, x); bg::set<1>(p, y + 1); ring.push_back(p);
+ bg::set<0>(p, x + 1); bg::set<1>(p, y + 1); ring.push_back(p);
+ bg::set<0>(p, x + 1); bg::set<1>(p, y); ring.push_back(p);
+ bg::set<0>(p, x); bg::set<1>(p, y); ring.push_back(p);
+
+ if (triangular)
+ {
+ // Remove a point depending on generator
+ int c = generator() % 4;
+ if (c >= 1 && c <= 3)
+ {
+ ring.erase(ring.begin() + c);
+ }
+ }
+}
+
+
+
+template <typename MultiPolygon, typename Generator>
+bool test_recursive_boxes(MultiPolygon& result, int& index,
+ Generator& generator,
+ int level, bool triangular, p_q_settings const& settings)
+{
+ MultiPolygon p, q;
+
+ // Generate two boxes
+ if (level == 0)
+ {
+ p.resize(1);
+ q.resize(1);
+ make_polygon(p.front(), generator, triangular);
+ make_polygon(q.front(), generator, triangular);
+ bg::correct(p);
+ bg::correct(q);
+ }
+ else
+ {
+ bg::correct(p);
+ bg::correct(q);
+ if (! test_recursive_boxes(p, index, generator, level - 1, triangular, settings)
+ || ! test_recursive_boxes(q, index, generator, level - 1, triangular, settings))
+ {
+ return false;
+ }
+ }
+
+ typedef typename boost::range_value<MultiPolygon>::type polygon;
+
+ std::ostringstream out;
+ out << "recursive_box_" << index++ << "_" << level;
+
+ if (! test_overlay_p_q
+ <
+ polygon,
+ typename bg::coordinate_type<MultiPolygon>::type
+ >(out.str(), p, q, settings))
+ {
+ return false;
+ }
+
+ MultiPolygon mp;
+ bg::detail::union_::union_insert
+ <
+ polygon
+ >(p, q, std::back_inserter(mp));
+
+ bg::unique(mp);
+ bg::simplify(mp, result, 0.01);
+ bg::correct(mp);
+ return true;
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_all(int seed, int count, int field_size, int level, bool triangular, p_q_settings const& settings)
+{
+ boost::timer t;
+
+ typedef boost::minstd_rand base_generator_type;
+
+ base_generator_type generator(seed);
+
+ boost::uniform_int<> random_coordinate(0, field_size - 1);
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ coordinate_generator(generator, random_coordinate);
+
+ typedef bg::model::polygon
+ <
+ bg::model::d2::point_xy<T>, Clockwise, Closed
+ > polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+
+
+ int index = 0;
+ for(int i = 0; i < count; i++)
+ {
+ mp p;
+ test_recursive_boxes<mp>(p, index, coordinate_generator, level, triangular, settings);
+ }
+ std::cout
+ << "polygons: " << index
+ << " type: " << string_from_type<T>::name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== recursive_polygons ===\nAllowed options");
+
+ int count = 1;
+ int seed = static_cast<unsigned int>(std::time(0));
+ int level = 3;
+ int field_size = 10;
+ bool ccw = false;
+ bool open = false;
+ p_q_settings settings;
+ std::string form = "box";
+
+ description.add_options()
+ ("help", "Help message")
+ ("seed", po::value<int>(&seed), "Initialization seed for random generator")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("validity", po::value<bool>(&settings.validity)->default_value(true), "Include testing on validity")
+ ("level", po::value<int>(&level)->default_value(3), "Level to reach (higher->slower)")
+ ("size", po::value<int>(&field_size)->default_value(10), "Size of the field")
+ ("form", po::value<std::string>(&form)->default_value("box"), "Form of the polygons (box, triangle)")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help")
+ || (form != "box" && form != "triangle"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ bool triangular = form != "box";
+
+
+ if (ccw && open)
+ {
+ test_all<double, false, false>(seed, count, field_size, level, triangular, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(seed, count, field_size, level, triangular, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(seed, count, field_size, level, triangular, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(seed, count, field_size, level, triangular, settings);
+ }
+
+#if defined(HAVE_TTMATH)
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
+#endif
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.cpp
new file mode 100644
index 000000000..40bec4052
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.cpp
@@ -0,0 +1,144 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+// #define BOOST_GEOMETRY_REPORT_OVERLAY_ERROR
+#define BOOST_GEOMETRY_NO_BOOST_TEST
+// #define BOOST_GEOMETRY_TIME_OVERLAY
+
+
+#include <test_overlay_p_q.hpp>
+
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+#include <star_comb.hpp>
+
+
+template <typename Polygon>
+void add(Polygon& polygon, double x, double y, int)
+{
+ typedef typename boost::geometry::point_type<Polygon>::type p;
+ boost::geometry::exterior_ring(polygon).push_back(boost::geometry::make<p>(x, y));
+}
+
+
+template <typename Polygon>
+void test_star_comb(int star_point_count, int comb_comb_count, double factor1, double factor2, bool do_union, p_q_settings const& settings)
+{
+ Polygon star, comb;
+ make_star(star, add<Polygon>, star_point_count, factor1, factor2);
+ make_comb(comb, add<Polygon>, comb_comb_count);
+
+ std::ostringstream out;
+ out << "star_comb";
+ test_overlay_p_q
+ <
+ Polygon,
+ typename bg::coordinate_type<Polygon>::type
+ >(out.str(), star, comb, settings);
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_all(int count, int star_point_count, int comb_comb_count, double factor1, double factor2, bool do_union, p_q_settings const& settings)
+{
+ boost::timer t;
+
+ typedef bg::model::polygon
+ <
+ bg::model::d2::point_xy<T>, Clockwise, Closed
+ > polygon;
+
+ for(int i = 0; i < count; i++)
+ {
+ test_star_comb<polygon>(star_point_count, comb_comb_count, factor1, factor2, do_union, settings);
+ }
+ std::cout
+ << " type: " << string_from_type<T>::name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== star_comb ===\nAllowed options");
+
+ int count = 1;
+ bool do_union = false;
+ bool ccw = false;
+ bool open = false;
+ double factor1 = 1.1;
+ double factor2 = 0.2;
+ int point_count = 50;
+ p_q_settings settings;
+
+ description.add_options()
+ ("help", "Help message")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("point_count", po::value<int>(&point_count)->default_value(1), "Number of points in the star")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ int star_point_count = point_count * 2 + 1;
+ int comb_comb_count = point_count;
+
+
+ if (ccw && open)
+ {
+ test_all<double, false, false>(count, star_point_count, comb_comb_count, factor1, factor2, do_union, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(count, star_point_count, comb_comb_count, factor1, factor2, do_union, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(count, star_point_count, comb_comb_count, factor1, factor2, do_union, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(count, star_point_count, comb_comb_count, factor1, factor2, do_union, settings);
+ }
+
+#if defined(HAVE_TTMATH)
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
+#endif
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.hpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.hpp
new file mode 100644
index 000000000..7019a26d5
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/star_comb.hpp
@@ -0,0 +1,130 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_STAR_COMB_HPP
+#define BOOST_GEOMETRY_STAR_COMB_HPP
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <boost/timer.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/math/constants/constants.hpp>
+
+#include <test_overlay_p_q.hpp>
+
+
+template <typename Polygon, typename AddFunctor>
+inline void make_star(Polygon& polygon, AddFunctor functor,
+ int count, double factor1, double factor2,
+ double offset = 0.0,
+ bool close = true,
+ double orientation = 1.0)
+{
+ // Create star
+ double cx = 25.0;
+ double cy = 25.0;
+
+ double dx = 50.0;
+ double dy = 50.0;
+
+ double a1 = factor1 * 0.5 * dx;
+ double b1 = factor1 * 0.5 * dy;
+ double a2 = factor2 * 0.5 * dx;
+ double b2 = factor2 * 0.5 * dy;
+
+ double delta = orientation * boost::math::constants::pi<double>() * 2.0 / (count - 1);
+ double angle = offset * delta;
+ double x0, y0;
+ bool first = true;
+ for (int i = 0; i < count - 1; i++, angle += delta)
+ {
+ bool even = i % 2 == 0;
+ double x = cx + (even ? a1 : a2) * sin(angle);
+ double y = cy + (even ? b1 : b2) * cos(angle);
+ functor(polygon, x, y, i);
+ if (first)
+ {
+ x0 = x;
+ y0 = y;
+ first = false;
+ }
+
+ }
+ if (close)
+ {
+ functor(polygon, x0, y0, count);
+ }
+}
+
+template <typename Vector>
+void ccw_pushback(Vector& vector, double x, double y, int)
+{
+ vector.push_back(boost::make_tuple(x, y));
+}
+
+template <typename Polygon, typename AddFunctor>
+inline void make_comb(Polygon& polygon, AddFunctor functor,
+ int count,
+ bool close = true,
+ bool clockwise = true)
+{
+ int n = 0;
+
+ if (! clockwise)
+ {
+ typedef boost::tuple<double, double> tup;
+ typedef std::vector<tup> vector_type;
+ vector_type vec;
+
+ // Create in clockwise order
+ make_comb(vec, ccw_pushback<vector_type>, count, close, true);
+
+ // Add in reverse
+ // (For GCC 3.4 have it const)
+ vector_type const& v = vec;
+ for (vector_type::const_reverse_iterator
+ it = v.rbegin(); it != v.rend(); ++it)
+ {
+ functor(polygon, it->get<0>(), it->get<1>(), n++);
+ }
+ return;
+ }
+
+ // Create comb
+ functor(polygon, 25.0, 0.0, n++);
+ functor(polygon, 0.0, 25.0, n++);
+ functor(polygon, 25.0, 50.0, n++);
+
+ // Function parameters
+ double diff = (25.0 / (count - 0.5)) / 2.0;
+
+ double b1 = -25.0;
+ double b2 = 25.0 - diff * 2.0;
+
+ double x1 = 50.0, x2 = 25.0;
+
+ for (int i = 0; i < count - 1; i++)
+ {
+ functor(polygon, x1, (x1 + b1), n++); x1 -= diff;
+ functor(polygon, x1, (x1 + b1), n++); x1 -= diff;
+ functor(polygon, x2, (x2 + b2), n++); x2 -= diff;
+ functor(polygon, x2, (x2 + b2), n++); x2 -= diff;
+ }
+ functor(polygon, x1, (x1 + b1), n++);
+
+ if (close)
+ {
+ functor(polygon, 25.0, 0.0, 4);
+ }
+}
+
+
+#endif // BOOST_GEOMETRY_STAR_COMB_HPP
+
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/test_overlay_p_q.hpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/test_overlay_p_q.hpp
new file mode 100644
index 000000000..ac9ffa3e3
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/test_overlay_p_q.hpp
@@ -0,0 +1,293 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+//
+// Copyright (c) 2009-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_OVERLAY_P_Q_HPP
+#define BOOST_GEOMETRY_TEST_OVERLAY_P_Q_HPP
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <iomanip>
+
+#include <boost/typeof/typeof.hpp>
+
+//#define BOOST_GEOMETRY_ROBUSTNESS_USE_DIFFERENCE
+
+#include <geometry_test_common.hpp>
+
+// For mixing int/float
+#if defined(_MSC_VER)
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4267 )
+#endif
+
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/algorithms/intersects.hpp>
+#include <boost/geometry/algorithms/is_valid.hpp>
+#include <boost/geometry/algorithms/touches.hpp>
+
+struct p_q_settings
+{
+ bool svg;
+ bool also_difference;
+ bool validity;
+ bool wkt;
+ bool verify_area;
+ double tolerance;
+
+ p_q_settings()
+ : svg(false)
+ , also_difference(false)
+ , validity(false)
+ , wkt(false)
+ , verify_area(false)
+ , tolerance(1.0e-3) // since rescaling to integer the tolerance should be less. Was originally 1.0e-6
+ {}
+};
+
+template <typename Geometry>
+inline typename bg::default_area_result<Geometry>::type p_q_area(Geometry const& g)
+{
+ try
+ {
+ return bg::area(g);
+ }
+ catch(bg::empty_input_exception const&)
+ {
+ return 0;
+ }
+}
+
+struct verify_area
+{
+ template <typename Iterator>
+ static inline bool check_ring(Iterator begin, Iterator end)
+ {
+ for (Iterator it = begin; it != end; ++it)
+ {
+ double const area = bg::area(*it);
+ if (fabs(area) < 0.01)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template <typename Interiors>
+ static inline bool check_rings(Interiors const& rings)
+ {
+ return check_ring(boost::begin(rings), boost::end(rings));
+ }
+
+ template <typename Iterator>
+ static inline bool check_polys(Iterator begin, Iterator end)
+ {
+ for (Iterator it = begin; it != end; ++it)
+ {
+ // If necessary, exterior_ring can be checked too
+ if (! check_rings(bg::interior_rings(*it)))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template <typename Geometry>
+ static inline bool apply(Geometry const& g)
+ {
+ return check_polys(boost::begin(g), boost::end(g));
+ }
+};
+
+template <typename OutputType, typename CalculationType, typename G1, typename G2>
+static bool test_overlay_p_q(std::string const& caseid,
+ G1 const& p, G2 const& q,
+ p_q_settings const& settings)
+{
+ bool result = true;
+
+ typedef typename bg::coordinate_type<G1>::type coordinate_type;
+ typedef typename bg::point_type<G1>::type point_type;
+
+ bg::model::multi_polygon<OutputType> out_i, out_u, out_d1, out_d2;
+
+ CalculationType area_p = p_q_area(p);
+ CalculationType area_q = p_q_area(q);
+ CalculationType area_d1 = 0, area_d2 = 0;
+
+ bg::intersection(p, q, out_i);
+ CalculationType area_i = p_q_area(out_i);
+
+ bg::union_(p, q, out_u);
+ CalculationType area_u = p_q_area(out_u);
+
+ double sum = (area_p + area_q) - area_u - area_i;
+
+ bool wrong = std::abs(sum) > settings.tolerance;
+
+ if (settings.also_difference)
+ {
+ bg::difference(p, q, out_d1);
+ bg::difference(q, p, out_d2);
+ area_d1 = p_q_area(out_d1);
+ area_d2 = p_q_area(out_d2);
+ double sum_d1 = (area_u - area_q) - area_d1;
+ double sum_d2 = (area_u - area_p) - area_d2;
+ bool wrong_d1 = std::abs(sum_d1) > settings.tolerance;
+ bool wrong_d2 = std::abs(sum_d2) > settings.tolerance;
+
+ if (wrong_d1 || wrong_d2)
+ {
+ wrong = true;
+ }
+ }
+
+ if (settings.validity)
+ {
+ std::string message;
+ if (! bg::is_valid(out_u, message))
+ {
+ std::cout << "Union is not valid: " << message << std::endl;
+ wrong = true;
+ }
+ if (! bg::is_valid(out_i, message))
+ {
+ std::cout << "Intersection is not valid: " << message << std::endl;
+ wrong = true;
+ }
+ if (settings.also_difference)
+ {
+ if (! bg::is_valid(out_d1, message))
+ {
+ std::cout << "Difference (p-q) is not valid: " << message << std::endl;
+ wrong = true;
+ }
+ if (! bg::is_valid(out_d2, message))
+ {
+ std::cout << "Difference (q-p) is not valid: " << message << std::endl;
+ wrong = true;
+ }
+ }
+
+ if (settings.verify_area && ! verify_area::apply(out_u))
+ {
+ std::cout << "Union/interior area incorrect" << std::endl;
+ wrong = true;
+ }
+ if (settings.verify_area && ! verify_area::apply(out_i))
+ {
+ std::cout << "Intersection/interior area incorrect" << std::endl;
+ wrong = true;
+ }
+ }
+
+ if (true)
+ {
+ if ((area_i > 0 && bg::touches(p, q))
+ || (area_i <= 0 && bg::intersects(p, q) && ! bg::touches(p, q)))
+ {
+ std::cout << "Wrong 'touch'! "
+ << " Intersection area: " << area_i
+ << " Touch gives: " << std::boolalpha << bg::touches(p, q)
+ << std::endl;
+ wrong = true;
+ }
+ }
+
+ bool svg = settings.svg;
+
+ if (wrong || settings.wkt)
+ {
+ if (wrong)
+ {
+ result = false;
+ svg = true;
+ }
+ bg::unique(out_i);
+ bg::unique(out_u);
+
+ std::cout
+ << "type: " << string_from_type<CalculationType>::name()
+ << " id: " << caseid
+ << " area i: " << area_i
+ << " area u: " << area_u
+ << " area p: " << area_p
+ << " area q: " << area_q
+ << " sum: " << sum;
+
+ if (settings.also_difference)
+ {
+ std::cout
+ << " area d1: " << area_d1
+ << " area d2: " << area_d2;
+ }
+ std::cout
+ << std::endl
+ << std::setprecision(9)
+ << " p: " << bg::wkt(p) << std::endl
+ << " q: " << bg::wkt(q) << std::endl
+ << " i: " << bg::wkt(out_i) << std::endl
+ << " u: " << bg::wkt(out_u) << std::endl
+ ;
+
+ }
+
+ if(svg)
+ {
+ std::ostringstream filename;
+ filename << "overlay_" << caseid << "_"
+ << string_from_type<coordinate_type>::name()
+ << string_from_type<CalculationType>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ mapper.add(p);
+ mapper.add(q);
+
+ // Input shapes in green/blue
+ mapper.map(p, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(q, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+
+ if (settings.also_difference)
+ {
+ for (BOOST_AUTO(it, out_d1.begin()); it != out_d1.end(); ++it)
+ {
+ mapper.map(*it,
+ "opacity:0.8;fill:none;stroke:rgb(255,128,0);stroke-width:4;stroke-dasharray:1,7;stroke-linecap:round");
+ }
+ for (BOOST_AUTO(it, out_d2.begin()); it != out_d2.end(); ++it)
+ {
+ mapper.map(*it,
+ "opacity:0.8;fill:none;stroke:rgb(255,0,255);stroke-width:4;stroke-dasharray:1,7;stroke-linecap:round");
+ }
+ }
+ else
+ {
+ mapper.map(out_i, "fill-opacity:0.1;stroke-opacity:0.4;fill:rgb(255,0,128);"
+ "stroke:rgb(255,0,0);stroke-width:4");
+ mapper.map(out_u, "fill-opacity:0.1;stroke-opacity:0.4;fill:rgb(255,0,0);"
+ "stroke:rgb(255,0,255);stroke-width:4");
+ }
+ }
+ return result;
+}
+
+#endif // BOOST_GEOMETRY_TEST_OVERLAY_P_Q_HPP
diff --git a/src/boost/libs/geometry/test/robustness/overlay/areal_areal/ticket_9081.cpp b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/ticket_9081.cpp
new file mode 100644
index 000000000..91f336c6f
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/areal_areal/ticket_9081.cpp
@@ -0,0 +1,239 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) // Robustness Test
+
+// Copyright (c) 2013-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Adapted from: the attachment of ticket 9081
+
+#define CHECK_SELF_INTERSECTIONS
+#define LIST_WKT
+
+ #include <iomanip>
+ #include <iostream>
+ #include <vector>
+ #include <boost/geometry.hpp>
+ #include <boost/geometry/geometries/point_xy.hpp>
+ #include <boost/geometry/geometries/polygon.hpp>
+ #include <boost/geometry/geometries/register/point.hpp>
+ #include <boost/geometry/geometries/register/ring.hpp>
+ #include <boost/geometry/io/wkt/wkt.hpp>
+ #include <boost/geometry/geometries/multi_polygon.hpp>
+
+#include <boost/foreach.hpp>
+#include <boost/timer.hpp>
+#include <boost/algorithm/string.hpp>
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#include <fstream>
+
+
+typedef boost::geometry::model::d2::point_xy<double> pt;
+typedef boost::geometry::model::polygon<pt> polygon;
+typedef boost::geometry::model::segment<pt> segment;
+typedef boost::geometry::model::multi_polygon<polygon> multi_polygon;
+
+template <typename Geometry>
+inline void debug_with_svg(int index, char method, Geometry const& a, Geometry const& b, std::string const& headera, std::string const& headerb)
+{
+ multi_polygon output;
+ try
+ {
+ switch(method)
+ {
+ case 'i': boost::geometry::intersection(a, b, output); break;
+ case 'u': boost::geometry::union_(a, b, output); break;
+ case 'd': boost::geometry::difference(a, b, output); break;
+ case 'v': boost::geometry::difference(b, a, output); break;
+ default : return;
+ }
+ }
+ catch(...)
+ {}
+
+ std::ostringstream filename;
+ filename << "ticket_9081_" << method << "_" << (1000000 + index) << ".svg";
+ std::ofstream svg(filename.str().c_str());
+
+ boost::geometry::svg_mapper<pt> mapper(svg, 400, 400);
+ mapper.add(a);
+ mapper.add(b);
+
+ mapper.map(a, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2");
+ mapper.map(b, "fill-opacity:0.3;fill:rgb(51,51,153);stroke:rgb(51,51,153);stroke-width:2");
+ BOOST_FOREACH(polygon const& g, output)
+ {
+ mapper.map(g, "opacity:0.8;fill:none;stroke:rgb(255,128,0);stroke-width:4;stroke-dasharray:1,7;stroke-linecap:round");
+ }
+
+ std::ostringstream out;
+ out << headera << std::endl << headerb;
+ mapper.map(boost::geometry::return_centroid<pt>(a), "fill:rgb(152,204,0);stroke:rgb(153,204,0);stroke-width:0.1", 3);
+ mapper.map(boost::geometry::return_centroid<pt>(b), "fill:rgb(51,51,153);stroke:rgb(153,204,0);stroke-width:0.1", 3);
+ mapper.text(boost::geometry::return_centroid<pt>(a), headera, "fill:rgb(0,0,0);font-family:Arial;font-size:10px");
+ mapper.text(boost::geometry::return_centroid<pt>(b), headerb, "fill:rgb(0,0,0);font-family:Arial;font-size:10px");
+}
+
+int main()
+{
+ int num_orig = 50;
+ int num_rounds = 30000;
+ srand(1234);
+ std::cout << std::setprecision(16);
+ std::map<int, std::string> genesis;
+ int pj;
+
+
+ std::string wkt1, wkt2, operation;
+
+ try
+ {
+
+
+ boost::timer t;
+ std::vector<multi_polygon> poly_list;
+
+ for(int i=0;i<num_orig;i++)
+ {
+ multi_polygon mp;
+ polygon p;
+ for(int j=0;j<3;j++)
+ {
+ double x=(double)rand()/RAND_MAX;
+ double y=(double)rand()/RAND_MAX;
+ p.outer().push_back(pt(x,y));
+ }
+ boost::geometry::correct(p);
+ mp.push_back(p);
+ boost::geometry::detail::overlay::has_self_intersections(mp);
+
+ std::ostringstream out;
+ out << "original " << poly_list.size();
+ genesis[poly_list.size()] = out.str();
+ poly_list.push_back(mp);
+
+#ifdef LIST_WKT
+ std::cout << "Original " << i << " " << boost::geometry::wkt(p) << std::endl;
+#endif
+ }
+
+
+ for(int j=0;j<num_rounds;j++)
+ {
+ if (j % 100 == 0) { std::cout << " " << j; }
+ pj = j;
+ int a = rand() % poly_list.size();
+ int b = rand() % poly_list.size();
+
+ debug_with_svg(j, 'i', poly_list[a], poly_list[b], genesis[a], genesis[b]);
+
+ { std::ostringstream out; out << boost::geometry::wkt(poly_list[a]); wkt1 = out.str(); }
+ { std::ostringstream out; out << boost::geometry::wkt(poly_list[b]); wkt2 = out.str(); }
+
+ multi_polygon mp_i, mp_u, mp_d, mp_e;
+ operation = "intersection";
+ boost::geometry::intersection(poly_list[a],poly_list[b],mp_i);
+ operation = "intersection";
+ boost::geometry::union_(poly_list[a],poly_list[b],mp_u);
+ operation = "difference";
+ boost::geometry::difference(poly_list[a],poly_list[b],mp_d);
+ boost::geometry::difference(poly_list[b],poly_list[a],mp_e);
+
+#ifdef LIST_WKT
+ std::cout << j << std::endl;
+ std::cout << " Genesis a " << genesis[a] << std::endl;
+ std::cout << " Genesis b " << genesis[b] << std::endl;
+ std::cout << " Intersection " << boost::geometry::wkt(mp_i) << std::endl;
+ std::cout << " Difference a " << boost::geometry::wkt(mp_d) << std::endl;
+ std::cout << " Difference b " << boost::geometry::wkt(mp_e) << std::endl;
+#endif
+
+#ifdef CHECK_SELF_INTERSECTIONS
+ try
+ {
+ boost::geometry::detail::overlay::has_self_intersections(mp_i);
+ }
+ catch(...)
+ {
+ std::cout << "FAILED TO INTERSECT " << j << std::endl;
+ std::cout << boost::geometry::wkt(poly_list[a]) << std::endl;
+ std::cout << boost::geometry::wkt(poly_list[b]) << std::endl;
+ std::cout << boost::geometry::wkt(mp_i) << std::endl;
+ try
+ {
+ boost::geometry::detail::overlay::has_self_intersections(mp_i);
+ }
+ catch(...)
+ {
+ }
+ break;
+ }
+
+ try
+ {
+ boost::geometry::detail::overlay::has_self_intersections(mp_d);
+ }
+ catch(...)
+ {
+ std::cout << "FAILED TO SUBTRACT " << j << std::endl;
+ std::cout << boost::geometry::wkt(poly_list[a]) << std::endl;
+ std::cout << boost::geometry::wkt(poly_list[b]) << std::endl;
+ std::cout << boost::geometry::wkt(mp_d) << std::endl;
+ break;
+ }
+ try
+ {
+ boost::geometry::detail::overlay::has_self_intersections(mp_e);
+ }
+ catch(...)
+ {
+ std::cout << "FAILED TO SUBTRACT " << j << std::endl;
+ std::cout << boost::geometry::wkt(poly_list[b]) << std::endl;
+ std::cout << boost::geometry::wkt(poly_list[a]) << std::endl;
+ std::cout << boost::geometry::wkt(mp_e) << std::endl;
+ break;
+ }
+#endif
+
+ if(boost::geometry::area(mp_i) > 0)
+ {
+ std::ostringstream out;
+ out << j << " intersection(" << genesis[a] << " , " << genesis[b] << ")";
+ genesis[poly_list.size()] = out.str();
+ poly_list.push_back(mp_i);
+ }
+ if(boost::geometry::area(mp_d) > 0)
+ {
+ std::ostringstream out;
+ out << j << " difference(" << genesis[a] << " - " << genesis[b] << ")";
+ genesis[poly_list.size()] = out.str();
+ poly_list.push_back(mp_d);
+ }
+ if(boost::geometry::area(mp_e) > 0)
+ {
+ std::ostringstream out;
+ out << j << " difference(" << genesis[b] << " - " << genesis[a] << ")";
+ genesis[poly_list.size()] = out.str();
+ poly_list.push_back(mp_e);
+ }
+ }
+
+ std::cout << "FINISHED " << t.elapsed() << std::endl;
+
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << e.what()
+ << " in " << operation << " at " << pj << std::endl
+ << wkt1 << std::endl
+ << wkt2 << std::endl
+ << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/buffer/Jamfile b/src/boost/libs/geometry/test/robustness/overlay/buffer/Jamfile
new file mode 100644
index 000000000..f724fcf8c
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/buffer/Jamfile
@@ -0,0 +1,19 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+# Robustness Test - overlay - buffer
+#
+# Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+project recursive_polygons_buffer
+ : requirements
+ <include>.
+ <include>../..
+ <library>../../../../../program_options/build//boost_program_options
+ <link>static
+ ;
+
+exe recursive_polygons_buffer : recursive_polygons_buffer.cpp ;
diff --git a/src/boost/libs/geometry/test/robustness/overlay/buffer/many_ring_buffer.cpp b/src/boost/libs/geometry/test/robustness/overlay/buffer/many_ring_buffer.cpp
new file mode 100644
index 000000000..1fd54c23f
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/buffer/many_ring_buffer.cpp
@@ -0,0 +1,301 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_BUFFER_TEST_SVG_USE_ALTERNATE_BOX_FOR_INPUT
+#define BOOST_GEOMETRY_BUFFER_TEST_SVG_ALTERNATE_BOX "BOX(179 4, 180 5)"
+
+
+#include <test_buffer.hpp>
+
+#include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+
+
+
+const int point_count = 90; // points for a full circle
+
+// Function to let buffer-distance depend on alpha, e.g.:
+inline double corrected_distance(double distance, double alpha)
+{
+ return distance * 1.0 + 0.2 * sin(alpha * 6.0);
+}
+
+class buffer_point_strategy_sample
+{
+public :
+
+ template
+ <
+ typename Point,
+ typename OutputRange,
+ typename DistanceStrategy
+ >
+ void apply(Point const& point,
+ DistanceStrategy const& distance_strategy,
+ OutputRange& output_range) const
+ {
+ double const distance = distance_strategy.apply(point, point,
+ bg::strategy::buffer::buffer_side_left);
+
+ double const angle_increment = 2.0 * M_PI / double(point_count);
+
+ double alpha = 0;
+ for (std::size_t i = 0; i <= point_count; i++, alpha -= angle_increment)
+ {
+ double const cd = corrected_distance(distance, alpha);
+
+ typename boost::range_value<OutputRange>::type output_point;
+ bg::set<0>(output_point, bg::get<0>(point) + cd * cos(alpha));
+ bg::set<1>(output_point, bg::get<1>(point) + cd * sin(alpha));
+ output_range.push_back(output_point);
+ }
+ }
+};
+
+class buffer_join_strategy_sample
+{
+private :
+ template
+ <
+ typename Point,
+ typename DistanceType,
+ typename RangeOut
+ >
+ inline void generate_points(Point const& vertex,
+ Point const& perp1, Point const& perp2,
+ DistanceType const& buffer_distance,
+ RangeOut& range_out) const
+ {
+ double dx1 = bg::get<0>(perp1) - bg::get<0>(vertex);
+ double dy1 = bg::get<1>(perp1) - bg::get<1>(vertex);
+ double dx2 = bg::get<0>(perp2) - bg::get<0>(vertex);
+ double dy2 = bg::get<1>(perp2) - bg::get<1>(vertex);
+
+ // Assuming the corner is convex, angle2 < angle1
+ double const angle1 = atan2(dy1, dx1);
+ double angle2 = atan2(dy2, dx2);
+
+ while (angle2 > angle1)
+ {
+ angle2 -= 2 * M_PI;
+ }
+
+ double const angle_increment = 2.0 * M_PI / double(point_count);
+ double alpha = angle1 - angle_increment;
+
+ for (int i = 0; alpha >= angle2 && i < point_count; i++, alpha -= angle_increment)
+ {
+ double cd = corrected_distance(buffer_distance, alpha);
+
+ Point p;
+ bg::set<0>(p, bg::get<0>(vertex) + cd * cos(alpha));
+ bg::set<1>(p, bg::get<1>(vertex) + cd * sin(alpha));
+ range_out.push_back(p);
+ }
+ }
+
+public :
+
+ template <typename Point, typename DistanceType, typename RangeOut>
+ inline bool apply(Point const& ip, Point const& vertex,
+ Point const& perp1, Point const& perp2,
+ DistanceType const& buffer_distance,
+ RangeOut& range_out) const
+ {
+ generate_points(vertex, perp1, perp2, buffer_distance, range_out);
+ return true;
+ }
+
+ template <typename NumericType>
+ static inline NumericType max_distance(NumericType const& distance)
+ {
+ return distance;
+ }
+
+};
+
+class buffer_side_sample
+{
+public :
+ template
+ <
+ typename Point,
+ typename OutputRange,
+ typename DistanceStrategy
+ >
+ static inline void apply(
+ Point const& input_p1, Point const& input_p2,
+ bg::strategy::buffer::buffer_side_selector side,
+ DistanceStrategy const& distance,
+ OutputRange& output_range)
+ {
+ // Generate a block along (left or right of) the segment
+
+ double const dx = bg::get<0>(input_p2) - bg::get<0>(input_p1);
+ double const dy = bg::get<1>(input_p2) - bg::get<1>(input_p1);
+
+ // For normalization [0,1] (=dot product d.d, sqrt)
+ double const length = bg::math::sqrt(dx * dx + dy * dy);
+
+ if (bg::math::equals(length, 0))
+ {
+ return;
+ }
+
+ // Generate the normalized perpendicular p, to the left (ccw)
+ double const px = -dy / length;
+ double const py = dx / length;
+
+ // Both vectors perpendicular to input p1 and input p2 have same angle
+ double const alpha = atan2(py, px);
+
+ double const d = distance.apply(input_p1, input_p2, side);
+
+ double const cd = corrected_distance(d, alpha);
+
+ output_range.resize(2);
+
+ bg::set<0>(output_range.front(), bg::get<0>(input_p1) + px * cd);
+ bg::set<1>(output_range.front(), bg::get<1>(input_p1) + py * cd);
+ bg::set<0>(output_range.back(), bg::get<0>(input_p2) + px * cd);
+ bg::set<1>(output_range.back(), bg::get<1>(input_p2) + py * cd);
+ }
+};
+
+#ifdef TEST_WITH_SVG
+template <typename Geometry1, typename Geometry2>
+void create_svg(std::string const& filename, Geometry1 const& original, Geometry2 const& buffer, std::string const& color)
+{
+ typedef typename bg::point_type<Geometry1>::type point_type;
+ std::ofstream svg(filename.c_str());
+
+ bg::svg_mapper<point_type> mapper(svg, 800, 800);
+ mapper.add(buffer);
+
+ mapper.map(original, "fill-opacity:0.3;fill:rgb(255,0,0);stroke:rgb(0,0,0);stroke-width:1");
+
+ std::string style = "fill-opacity:0.3;fill:";
+ style += color;
+ style += ";stroke:rgb(0,0,0);stroke-width:1";
+ mapper.map(buffer, style);
+}
+#endif
+
+
+void test_many_rings(int imn, int jmx, int count,
+ double expected_area_exterior,
+ double expected_area_interior)
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> point;
+ typedef bg::model::polygon<point> polygon_type;
+ typedef bg::model::multi_polygon<polygon_type> multi_polygon_type;
+
+ // Predefined strategies
+ bg::strategy::buffer::distance_symmetric<double> distance_strategy(1.3);
+ bg::strategy::buffer::end_flat end_strategy; // not effectively used
+
+ // Own strategies
+ buffer_join_strategy_sample join_strategy;
+ buffer_point_strategy_sample point_strategy;
+ buffer_side_sample side_strategy;
+
+ // Declare output
+
+ bg::model::multi_point<point> mp;
+
+ // Use a bit of random disturbance in the otherwise too regular grid
+ typedef boost::minstd_rand base_generator_type;
+ base_generator_type generator(12345);
+ boost::uniform_real<> random_range(0.0, 0.5);
+ boost::variate_generator
+ <
+ base_generator_type&,
+ boost::uniform_real<>
+ > random(generator, random_range);
+
+ for (int i = 0; i < count; i++)
+ {
+ for (int j = 0; j < count; j++)
+ {
+ double x = i * 3.0 + random();
+ double y = j * 3.0 + random();
+ //if (i > 30 && j < 30)
+ if (i > imn && j < jmx)
+ {
+ point p(x, y);
+ mp.push_back(p);
+ }
+ }
+ }
+
+ multi_polygon_type many_rings;
+ // Create the buffer of a multi-point
+ bg::buffer(mp, many_rings,
+ distance_strategy, side_strategy,
+ join_strategy, end_strategy, point_strategy);
+
+ bg::model::box<point> envelope;
+ bg::envelope(many_rings, envelope);
+ bg::buffer(envelope, envelope, 1.0);
+
+ multi_polygon_type many_interiors;
+ bg::difference(envelope, many_rings, many_interiors);
+
+#ifdef TEST_WITH_SVG
+ create_svg("/tmp/many_interiors.svg", mp, many_interiors, "rgb(51,51,153)");
+ create_svg("/tmp/buffer.svg", mp, many_rings, "rgb(51,51,153)");
+#endif
+
+ bg::strategy::buffer::join_round join_round(100);
+ bg::strategy::buffer::end_flat end_flat;
+
+ {
+ std::ostringstream out;
+ out << "many_rings_" << count;
+ out << "_" << imn << "_" << jmx;
+ std::ostringstream wkt;
+ wkt << std::setprecision(12) << bg::wkt(many_rings);
+
+ boost::timer t;
+ test_one<multi_polygon_type, polygon_type>(out.str(), wkt.str(), join_round, end_flat, expected_area_exterior, 0.3);
+ std::cout << "Exterior " << count << " " << t.elapsed() << std::endl;
+ }
+
+ return;
+ {
+ std::ostringstream out;
+ out << "many_interiors_" << count;
+ std::ostringstream wkt;
+ wkt << std::setprecision(12) << bg::wkt(many_interiors);
+
+ boost::timer t;
+ test_one<multi_polygon_type, polygon_type>(out.str(), wkt.str(), join_round, end_flat, expected_area_interior, 0.3);
+ std::cout << "Interior " << count << " " << t.elapsed() << std::endl;
+ }
+}
+
+int test_main(int, char* [])
+{
+// test_many_rings(10, 795.70334, 806.7609);
+// test_many_rings(30, 7136.7098, 6174.4496);
+ test_many_rings(30, 30, 70, 38764.2721, 31910.3280);
+// for (int i = 30; i < 60; i++)
+// {
+// for (int j = 5; j <= 30; j++)
+// {
+// test_many_rings(i, j, 70, 38764.2721, 31910.3280);
+// }
+// }
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/buffer/multi_point_growth.cpp b/src/boost/libs/geometry/test/robustness/overlay/buffer/multi_point_growth.cpp
new file mode 100644
index 000000000..4aed939cf
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/buffer/multi_point_growth.cpp
@@ -0,0 +1,139 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Performance Test
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/foreach.hpp>
+#include <boost/timer.hpp>
+#include <fstream>
+
+
+namespace bg = boost::geometry;
+
+template
+<
+ typename GeometryOut,
+ typename Geometry
+>
+double test_growth(Geometry const& geometry, int n, int d, double distance)
+{
+
+ typedef typename bg::coordinate_type<Geometry>::type coordinate_type;
+ typedef typename bg::point_type<Geometry>::type point_type;
+
+ // extern int point_buffer_count;
+ std::ostringstream complete;
+ complete
+ << "point_growth"
+ << "_" << "r"
+ << "_" << n
+ << "_" << d
+ // << "_" << point_buffer_count
+ ;
+
+ //std::cout << complete.str() << std::endl;
+
+ std::ostringstream filename;
+ filename << "buffer_" << complete.str() << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
+ bg::svg_mapper<point_type> mapper(svg, 500, 500);
+
+ {
+ bg::model::box<point_type> box;
+ bg::envelope(geometry, box);
+
+ bg::buffer(box, box, distance * 1.01);
+ mapper.add(box);
+ }
+#endif
+
+ bg::strategy::buffer::join_round join_strategy(100);
+ bg::strategy::buffer::end_flat end_strategy;
+ bg::strategy::buffer::point_circle point_strategy;
+ bg::strategy::buffer::side_straight side_strategy;
+
+ typedef bg::strategy::buffer::distance_symmetric<coordinate_type> distance_strategy_type;
+ distance_strategy_type distance_strategy(distance);
+
+ std::vector<GeometryOut> buffered;
+
+ bg::buffer(geometry, buffered,
+ distance_strategy, side_strategy,
+ join_strategy, end_strategy, point_strategy);
+
+
+ typename bg::default_area_result<GeometryOut>::type area = 0;
+ BOOST_FOREACH(GeometryOut const& polygon, buffered)
+ {
+ area += bg::area(polygon);
+ }
+
+#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
+ // Map input geometry in green
+ mapper.map(geometry, "opacity:0.5;fill:rgb(0,128,0);stroke:rgb(0,128,0);stroke-width:10");
+
+ BOOST_FOREACH(GeometryOut const& polygon, buffered)
+ {
+ mapper.map(polygon, "opacity:0.4;fill:rgb(255,255,128);stroke:rgb(0,0,0);stroke-width:3");
+ }
+#endif
+
+ return area;
+}
+
+template <typename P>
+void test_growth(int n, int distance_count)
+{
+ srand(int(time(NULL)));
+ //std::cout << typeid(bg::coordinate_type<P>::type).name() << std::endl;
+ boost::timer t;
+
+ namespace buf = bg::strategy::buffer;
+ typedef bg::model::polygon<P> polygon;
+ typedef bg::model::multi_point<P> multi_point_type;
+
+ multi_point_type multi_point;
+ for (int i = 0; i < n; i++)
+ {
+ P point(rand() % 100, rand() % 100);
+ multi_point.push_back(point);
+ }
+
+ //std::cout << bg::wkt(multi_point) << std::endl;
+
+ double previous_area = 0;
+ double epsilon = 0.1;
+ double distance = 15.0;
+ for (int d = 0; d < distance_count; d++, distance += epsilon)
+ {
+ double area = test_growth<polygon>(multi_point, n, d, distance);
+ if (area < previous_area)
+ {
+ std::cout << "Error: " << area << " < " << previous_area << std::endl
+ << " n=" << n << " distance=" << distance
+ << bg::wkt(multi_point) << std::endl;
+ }
+ previous_area = area;
+ }
+ std::cout << "n=" << n << " time=" << t.elapsed() << std::endl;
+}
+
+int main(int, char* [])
+{
+ for (int i = 5; i <= 50; i++)
+ {
+ test_growth<bg::model::point<double, 2, bg::cs::cartesian> >(i, 20);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp b/src/boost/libs/geometry/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp
new file mode 100644
index 000000000..cd7f57ac2
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp
@@ -0,0 +1,362 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Robustness Test
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if defined(_MSC_VER)
+# pragma warning( disable : 4244 )
+# pragma warning( disable : 4267 )
+#endif
+
+#include <fstream>
+#include <sstream>
+
+#include <boost/foreach.hpp>
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp>
+
+#include <boost/geometry/strategies/buffer.hpp>
+
+#include <common/common_settings.hpp>
+#include <common/make_square_polygon.hpp>
+
+
+struct buffer_settings : public common_settings
+{
+ int join_code;
+ double distance;
+};
+
+namespace bg = boost::geometry;
+
+template <typename Geometry1, typename Geometry2>
+void create_svg(std::string const& filename
+ , Geometry1 const& mp
+ , Geometry2 const& buffer
+ )
+{
+ typedef typename boost::geometry::point_type<Geometry1>::type point_type;
+
+
+ std::ofstream svg(filename.c_str());
+ boost::geometry::svg_mapper<point_type> mapper(svg, 800, 800);
+
+ boost::geometry::model::box<point_type> box;
+ bg::envelope(mp, box);
+ bg::buffer(box, box, 1.0);
+ mapper.add(box);
+
+ if (! bg::is_empty(buffer))
+ {
+ bg::envelope(buffer, box);
+ bg::buffer(box, box, 1.0);
+ mapper.add(box);
+ }
+
+ mapper.map(mp, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(buffer, "stroke-opacity:0.9;stroke:rgb(0,0,0);fill:none;stroke-width:1");
+
+ //mapper.map(intersection,"opacity:0.6;stroke:rgb(0,128,0);stroke-width:5");
+}
+
+
+
+
+template <typename MultiPolygon, typename Settings>
+bool verify(std::string const& caseid, MultiPolygon const& mp, MultiPolygon const& buffer, Settings const& settings)
+{
+ bool result = true;
+
+ // Area of buffer must be larger than of original polygon
+ double area_mp = bg::area(mp);
+ double area_buf = bg::area(buffer);
+
+ if (area_buf < area_mp)
+ {
+ result = false;
+ }
+
+ if (result)
+ {
+ typedef typename boost::range_value<MultiPolygon const>::type polygon_type;
+ BOOST_FOREACH(polygon_type const& polygon, mp)
+ {
+ typename bg::point_type<polygon_type>::type point;
+ bg::point_on_border(point, polygon);
+ if (! bg::within(point, buffer))
+ {
+ result = false;
+ }
+ }
+ }
+
+ if (result)
+ {
+ std::string message;
+ if (! bg::is_valid(buffer, message))
+ {
+ std::cout << "Buffer is not valid: " << message << std::endl;
+ result = false;
+ }
+ }
+
+ bool svg = settings.svg;
+ bool wkt = settings.wkt;
+ if (! result)
+ {
+ std::cout << "ERROR " << caseid << std::endl;
+ //std::cout << bg::wkt(mp) << std::endl;
+ //std::cout << bg::wkt(buffer) << std::endl;
+ svg = true;
+ wkt = true;
+ }
+
+ if (svg || wkt)
+ {
+ //std::cout << caseid << std::endl;
+ }
+
+ if (svg)
+ {
+ std::ostringstream filename;
+ filename << caseid << "_"
+ << typeid(typename bg::coordinate_type<MultiPolygon>::type).name()
+ << ".svg";
+ create_svg(filename.str(), mp, buffer);
+ }
+
+ if (wkt)
+ {
+ std::ostringstream filename;
+ filename << caseid << "_"
+ << typeid(typename bg::coordinate_type<MultiPolygon>::type).name()
+ << ".wkt";
+ std::ofstream stream(filename.str().c_str());
+ stream << bg::wkt(mp) << std::endl;
+ stream << bg::wkt(buffer) << std::endl;
+ }
+
+ return result;
+}
+
+template <typename MultiPolygon, typename Generator, typename Settings>
+bool test_buffer(MultiPolygon& result, int& index,
+ Generator& generator,
+ int level, Settings const& settings)
+{
+ MultiPolygon p, q;
+
+ // Generate two boxes
+ if (level == 0)
+ {
+ p.resize(1);
+ q.resize(1);
+ make_square_polygon(p.front(), generator, settings);
+ make_square_polygon(q.front(), generator, settings);
+ bg::correct(p);
+ bg::correct(q);
+ }
+ else
+ {
+ bg::correct(p);
+ bg::correct(q);
+ if (! test_buffer(p, index, generator, level - 1, settings)
+ || ! test_buffer(q, index, generator, level - 1, settings))
+ {
+ return false;
+ }
+ }
+
+ typedef typename boost::range_value<MultiPolygon>::type polygon;
+
+ MultiPolygon mp;
+ bg::detail::union_::union_insert
+ <
+ polygon
+ >(p, q, std::back_inserter(mp));
+
+ bg::unique(mp);
+ bg::unique(mp);
+ bg::correct(mp);
+ result = mp;
+
+
+ typedef typename bg::coordinate_type<MultiPolygon>::type coordinate_type;
+ typedef bg::strategy::buffer::distance_asymmetric<coordinate_type> distance_strategy_type;
+ distance_strategy_type distance_strategy(settings.distance, settings.distance);
+
+ MultiPolygon buffered;
+
+ std::ostringstream out;
+ out << "recursive_polygons_buffer_" << index++ << "_" << level;
+
+ bg::strategy::buffer::end_round end_strategy;
+ bg::strategy::buffer::point_circle point_strategy;
+ bg::strategy::buffer::side_straight side_strategy;
+ bg::strategy::buffer::join_round join_round_strategy(32); // Compatible with MySQL
+ bg::strategy::buffer::join_miter join_miter_strategy;
+
+ try
+ {
+ switch(settings.join_code)
+ {
+ case 1 :
+ bg::buffer(mp, buffered,
+ distance_strategy, side_strategy,
+ join_round_strategy,
+ end_strategy, point_strategy);
+ break;
+ case 2 :
+ bg::buffer(mp, buffered,
+ distance_strategy, side_strategy,
+ join_miter_strategy,
+ end_strategy, point_strategy);
+ break;
+ default :
+ return false;
+ }
+ }
+ catch(std::exception const& e)
+ {
+ MultiPolygon empty;
+ std::cout << out.str() << std::endl;
+ std::cout << "Exception " << e.what() << std::endl;
+ verify(out.str(), mp, empty, settings);
+ return false;
+ }
+
+
+ return verify(out.str(), mp, buffered, settings);
+}
+
+
+template <typename T, bool Clockwise, bool Closed, typename Settings>
+void test_all(int seed, int count, int level, Settings const& settings)
+{
+ boost::timer t;
+
+ typedef boost::minstd_rand base_generator_type;
+
+ base_generator_type generator(seed);
+
+ boost::uniform_int<> random_coordinate(0, settings.field_size - 1);
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ coordinate_generator(generator, random_coordinate);
+
+ typedef bg::model::polygon
+ <
+ bg::model::d2::point_xy<T>, Clockwise, Closed
+ > polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+
+
+ int index = 0;
+ for(int i = 0; i < count; i++)
+ {
+ mp p;
+ test_buffer<mp>(p, index, coordinate_generator, level, settings);
+ }
+ std::cout
+ << "geometries: " << index
+ << " type: " << typeid(T).name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== recursive_polygons_linear_areal ===\nAllowed options");
+
+ int count = 1;
+ int seed = static_cast<unsigned int>(std::time(0));
+ int level = 3;
+ bool ccw = false;
+ bool open = false;
+ buffer_settings settings;
+ std::string form = "box";
+ std::string join = "round";
+
+ description.add_options()
+ ("help", "Help message")
+ ("seed", po::value<int>(&seed), "Initialization seed for random generator")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("level", po::value<int>(&level)->default_value(3), "Level to reach (higher->slower)")
+ ("distance", po::value<double>(&settings.distance)->default_value(1.0), "Distance (1.0)")
+ ("form", po::value<std::string>(&form)->default_value("box"), "Form of the polygons (box, triangle)")
+ ("join", po::value<std::string>(&join)->default_value("round"), "Form of the joins (round, miter)")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("size", po::value<int>(&settings.field_size)->default_value(10), "Size of the field")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help")
+ || (form != "box" && form != "triangle")
+ || (join != "round" && join != "miter")
+ )
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ settings.triangular = form != "box";
+ settings.join_code = join == "round" ? 1 : 2;
+
+ if (ccw && open)
+ {
+ test_all<double, false, false>(seed, count, level, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(seed, count, level, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(seed, count, level, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(seed, count, level, settings);
+ }
+
+#if defined(HAVE_TTMATH)
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
+#endif
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/robustness/overlay/linear_areal/Jamfile b/src/boost/libs/geometry/test/robustness/overlay/linear_areal/Jamfile
new file mode 100644
index 000000000..a31dadf15
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/linear_areal/Jamfile
@@ -0,0 +1,19 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+# Robustness Test - overlay - linear/areal
+#
+# Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+project recursive_polygons_linear_areal
+ : requirements
+ <include>.
+ <include>../..
+ <library>../../../../../program_options/build//boost_program_options
+ <link>static
+ ;
+
+exe recursive_polygons_linear_areal : recursive_polygons_linear_areal.cpp ;
diff --git a/src/boost/libs/geometry/test/robustness/overlay/linear_areal/recursive_polygons_linear_areal.cpp b/src/boost/libs/geometry/test/robustness/overlay/linear_areal/recursive_polygons_linear_areal.cpp
new file mode 100644
index 000000000..c29a0df12
--- /dev/null
+++ b/src/boost/libs/geometry/test/robustness/overlay/linear_areal/recursive_polygons_linear_areal.cpp
@@ -0,0 +1,500 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Robustness Test
+
+// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if defined(_MSC_VER)
+# pragma warning( disable : 4244 )
+# pragma warning( disable : 4267 )
+#endif
+
+#include <fstream>
+#include <sstream>
+
+#include <boost/foreach.hpp>
+#include <boost/program_options.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#include <boost/geometry/extensions/algorithms/midpoints.hpp>
+
+#include <common/common_settings.hpp>
+#include <common/make_square_polygon.hpp>
+
+
+namespace bg = boost::geometry;
+
+template <typename Geometry1, typename Geometry2, typename Geometry3>
+void create_svg(std::string const& filename
+ , Geometry1 const& mp
+ , Geometry2 const& ls
+ , Geometry3 const& difference
+ , Geometry3 const& intersection
+ )
+{
+ typedef typename boost::geometry::point_type<Geometry1>::type point_type;
+
+
+ std::ofstream svg(filename.c_str());
+ boost::geometry::svg_mapper<point_type> mapper(svg, 800, 800);
+
+ boost::geometry::model::box<point_type> box;
+ bg::envelope(mp, box);
+ bg::buffer(box, box, 1.0);
+ mapper.add(box);
+ bg::envelope(ls, box);
+ bg::buffer(box, box, 1.0);
+ mapper.add(box);
+
+ mapper.map(mp, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(ls, "stroke-opacity:0.9;stroke:rgb(0,0,0);stroke-width:1");
+
+ mapper.map(intersection,"opacity:0.6;stroke:rgb(0,128,0);stroke-width:5");
+ mapper.map(difference, "opacity:0.6;stroke:rgb(255,0,255);stroke-width:5"); //;stroke-dasharray:1,7;stroke-linecap:round
+}
+
+
+template <typename Linestring, typename Generator, typename Settings>
+inline void make_random_linestring(Linestring& line, Generator& generator, Settings const& settings)
+{
+ using namespace boost::geometry;
+
+ typedef typename point_type<Linestring>::type point_type;
+ typedef typename coordinate_type<Linestring>::type coordinate_type;
+
+ coordinate_type x, y;
+ x = generator();
+ y = generator();
+
+ int count = 3 + generator() % 6;
+ int d = 0; // direction
+
+ for (int i = 0; i <= count && x <= settings.field_size; i++, x++, d = 1 - d)
+ {
+ append(line, make<point_type>(x, y + d));
+ append(line, make<point_type>(x, y + 1 - d));
+ }
+
+ if (d == 0 && generator() % 4 < 3 && y >= 2)
+ {
+ d = 1 - d;
+ x--;
+ y -= 2;
+ count = 3 + generator() % 6;
+ for (int i = 0; i <= count && x >= 0; i++, x--, d = 1 - d)
+ {
+ append(line, make<point_type>(x, y + d));
+ append(line, make<point_type>(x, y + 1 - d));
+ }
+ }
+
+ //if (settings.triangular)
+ //{
+ // // Remove a point, generator says which
+ // int c = generator() % 4;
+ // if (c >= 1 && c <= 3)
+ // {
+ // ring.erase(ring.begin() + c);
+ // }
+ //}
+}
+
+template<typename Geometry>
+class inside_check
+{
+ Geometry const& m_geo;
+ bool& m_result;
+public :
+
+ inside_check(Geometry const& geo, bool& result)
+ : m_geo(geo)
+ , m_result(result)
+ {}
+
+ inline inside_check<Geometry> operator=(inside_check<Geometry> const& input)
+ {
+ return inside_check<Geometry>(input.m_geo, input.m_result);
+ }
+
+ template <typename Point>
+ inline void operator()(Point const& p)
+ {
+ if (! bg::covered_by(p, m_geo))
+ {
+ if (m_result)
+ {
+ std::cout << "Does not fulfill inside check" << std::endl;
+ }
+ m_result = false;
+ }
+ }
+};
+
+
+template<typename Geometry>
+class outside_check
+{
+ Geometry const& m_geo;
+ bool& m_result;
+public :
+ outside_check(Geometry const& geo, bool& result)
+ : m_geo(geo)
+ , m_result(result)
+ {}
+
+ inline outside_check<Geometry> operator=(outside_check<Geometry> const& input)
+ {
+ return outside_check<Geometry>(input.m_geo, input.m_result);
+ }
+
+ template <typename Point>
+ inline void operator()(Point const& p)
+ {
+ if (bg::within(p, m_geo))
+ {
+ if (m_result)
+ {
+ std::cout << "Does not fulfill outside check" << std::endl;
+ }
+ m_result = false;
+ }
+ }
+};
+
+template<typename Segment>
+class border2_check
+{
+ Segment const& m_segment;
+ bool& m_result;
+
+public :
+ border2_check(Segment const& seg, bool& result)
+ : m_segment(seg)
+ , m_result(result)
+ {}
+
+ inline border2_check<Segment> operator=(border2_check<Segment> const& input)
+ {
+ return border2_check<Segment>(input.m_segment, input.m_result);
+ }
+
+ template <typename Segment2>
+ inline void operator()(Segment2 const& segment)
+ {
+ // Create copies (TODO: find out why referring_segment does not compile)
+ typedef typename bg::point_type<Segment2>::type pt;
+ typedef bg::model::segment<pt> segment_type;
+
+ typedef bg::strategy::intersection::relate_cartesian_segments
+ <
+ bg::policies::relate::segments_intersection_points
+ <
+ segment_type,
+ segment_type,
+ bg::segment_intersection_points<pt>
+ >
+ > policy;
+
+ segment_type seg1, seg2;
+ bg::convert(m_segment, seg1);
+ bg::convert(segment, seg2);
+ bg::segment_intersection_points<pt> is = policy::apply(seg1, seg2);
+
+ if (is.count == 2)
+ {
+ if (m_result)
+ {
+ std::cout << "Does not fulfill border2 check" << std::endl;
+ }
+ m_result = true;
+ }
+ }
+};
+
+template<typename Geometry>
+class border_check
+{
+ Geometry const& m_geo;
+ bool& m_result;
+public :
+ border_check(Geometry const& geo, bool& result)
+ : m_geo(geo)
+ , m_result(result)
+ {}
+
+ inline border_check<Geometry> operator=(border_check<Geometry> const& input)
+ {
+ return border_check<Geometry>(input.m_geo, input.m_result);
+ }
+
+ template <typename Segment>
+ inline void operator()(Segment const& s)
+ {
+ bool on_border = false;
+ border2_check<Segment> checker(s, on_border);
+ bg::for_each_segment(m_geo, checker);
+
+ if (on_border)
+ {
+ if (m_result)
+ {
+ std::cout << "Does not fulfill border check" << std::endl;
+ }
+ m_result = false;
+ }
+ }
+};
+
+
+template <typename MultiPolygon, typename Linestring, typename Settings>
+bool verify(std::string const& caseid, MultiPolygon const& mp, Linestring const& ls, Settings const& settings)
+{
+ bg::model::multi_linestring<Linestring> difference, intersection;
+ bg::difference(ls, mp, difference);
+ bg::intersection(ls, mp, intersection);
+
+ //typedef typename bg::length_result_type<point_type>::type length_type;
+
+ bool result = true;
+
+ // 1) Check by length
+ typedef double length_type;
+ length_type len_input = bg::length(ls);
+ length_type len_difference = bg::length(difference);
+ length_type len_intersection = bg::length(intersection);
+ if (! bg::math::equals(len_input, len_difference + len_intersection))
+ {
+ std::cout << "Input: " << len_input
+ << " difference: " << len_difference
+ << " intersection: " << len_intersection
+ << std::endl;
+
+ std::cout << "Does not fulfill length check" << std::endl;
+
+ result = false;
+ }
+
+ // 2) Check by within and covered by
+ inside_check<MultiPolygon> ic(mp, result);
+ bg::for_each_point(intersection, ic);
+
+ outside_check<MultiPolygon> oc(mp, result);
+ bg::for_each_point(difference, oc);
+
+ border_check<MultiPolygon> bc(mp, result);
+ bg::for_each_segment(difference, bc);
+
+ // 3) check also the mid-points from the difference to remove false positives
+ BOOST_FOREACH(Linestring const& d, difference)
+ {
+ Linestring difference_midpoints;
+ bg::midpoints(d, false, std::back_inserter(difference_midpoints));
+ outside_check<MultiPolygon> ocm(mp, result);
+ bg::for_each_point(difference_midpoints, ocm);
+ }
+
+
+ bool svg = settings.svg;
+ bool wkt = settings.wkt;
+ if (! result)
+ {
+ std::cout << "ERROR " << caseid << std::endl;
+ std::cout << bg::wkt(mp) << std::endl;
+ std::cout << bg::wkt(ls) << std::endl;
+ svg = true;
+ wkt = true;
+ }
+
+ if (svg)
+ {
+ std::ostringstream filename;
+ filename << caseid << "_"
+ << typeid(typename bg::coordinate_type<Linestring>::type).name()
+ << ".svg";
+ create_svg(filename.str(), mp, ls, difference, intersection);
+ }
+
+ if (wkt)
+ {
+ std::ostringstream filename;
+ filename << caseid << "_"
+ << typeid(typename bg::coordinate_type<Linestring>::type).name()
+ << ".wkt";
+ std::ofstream stream(filename.str().c_str());
+ stream << bg::wkt(mp) << std::endl;
+ stream << bg::wkt(ls) << std::endl;
+ }
+
+ return result;
+}
+
+template <typename MultiPolygon, typename Generator>
+bool test_linear_areal(MultiPolygon& result, int& index,
+ Generator& generator,
+ int level, common_settings const& settings)
+{
+ MultiPolygon p, q;
+
+ // Generate two boxes
+ if (level == 0)
+ {
+ p.resize(1);
+ q.resize(1);
+ make_square_polygon(p.front(), generator, settings);
+ make_square_polygon(q.front(), generator, settings);
+ bg::correct(p);
+ bg::correct(q);
+ }
+ else
+ {
+ bg::correct(p);
+ bg::correct(q);
+ if (! test_linear_areal(p, index, generator, level - 1, settings)
+ || ! test_linear_areal(q, index, generator, level - 1, settings))
+ {
+ return false;
+ }
+ }
+
+ typedef typename boost::range_value<MultiPolygon>::type polygon;
+
+ MultiPolygon mp;
+ bg::detail::union_::union_insert
+ <
+ polygon
+ >(p, q, std::back_inserter(mp));
+
+ bg::unique(mp);
+ bg::simplify(mp, result, 0.01);
+ bg::correct(mp);
+
+ // Generate a linestring
+ typedef typename bg::point_type<MultiPolygon>::type point_type;
+ typedef bg::model::linestring<point_type> linestring_type;
+ linestring_type ls;
+ make_random_linestring(ls, generator, settings);
+
+ std::ostringstream out;
+ out << "recursive_la_" << index++ << "_" << level;
+ return verify(out.str(), mp, ls, settings);
+}
+
+
+template <typename T, bool Clockwise, bool Closed>
+void test_all(int seed, int count, int level, common_settings const& settings)
+{
+ boost::timer t;
+
+ typedef boost::minstd_rand base_generator_type;
+
+ base_generator_type generator(seed);
+
+ boost::uniform_int<> random_coordinate(0, settings.field_size - 1);
+ boost::variate_generator<base_generator_type&, boost::uniform_int<> >
+ coordinate_generator(generator, random_coordinate);
+
+ typedef bg::model::polygon
+ <
+ bg::model::d2::point_xy<T>, Clockwise, Closed
+ > polygon;
+ typedef bg::model::multi_polygon<polygon> mp;
+
+
+ int index = 0;
+ for(int i = 0; i < count; i++)
+ {
+ mp p;
+ test_linear_areal<mp>(p, index, coordinate_generator, level, settings);
+ }
+ std::cout
+ << "geometries: " << index
+ << " type: " << typeid(T).name()
+ << " time: " << t.elapsed() << std::endl;
+}
+
+int main(int argc, char** argv)
+{
+ try
+ {
+ namespace po = boost::program_options;
+ po::options_description description("=== recursive_polygons_linear_areal ===\nAllowed options");
+
+ int count = 1;
+ int seed = static_cast<unsigned int>(std::time(0));
+ int level = 3;
+ bool ccw = false;
+ bool open = false;
+ common_settings settings;
+ std::string form = "box";
+
+ description.add_options()
+ ("help", "Help message")
+ ("seed", po::value<int>(&seed), "Initialization seed for random generator")
+ ("count", po::value<int>(&count)->default_value(1), "Number of tests")
+ ("diff", po::value<bool>(&settings.also_difference)->default_value(false), "Include testing on difference")
+ ("level", po::value<int>(&level)->default_value(3), "Level to reach (higher->slower)")
+ ("form", po::value<std::string>(&form)->default_value("box"), "Form of the polygons (box, triangle)")
+ ("ccw", po::value<bool>(&ccw)->default_value(false), "Counter clockwise polygons")
+ ("open", po::value<bool>(&open)->default_value(false), "Open polygons")
+ ("size", po::value<int>(&settings.field_size)->default_value(10), "Size of the field")
+ ("wkt", po::value<bool>(&settings.wkt)->default_value(false), "Create a WKT of the inputs, for all tests")
+ ("svg", po::value<bool>(&settings.svg)->default_value(false), "Create a SVG for all tests")
+ ;
+
+ po::variables_map varmap;
+ po::store(po::parse_command_line(argc, argv, description), varmap);
+ po::notify(varmap);
+
+ if (varmap.count("help")
+ || (form != "box" && form != "triangle"))
+ {
+ std::cout << description << std::endl;
+ return 1;
+ }
+
+ settings.triangular = form != "box";
+
+ if (ccw && open)
+ {
+ test_all<double, false, false>(seed, count, level, settings);
+ }
+ else if (ccw)
+ {
+ test_all<double, false, true>(seed, count, level, settings);
+ }
+ else if (open)
+ {
+ test_all<double, true, false>(seed, count, level, settings);
+ }
+ else
+ {
+ test_all<double, true, true>(seed, count, level, settings);
+ }
+
+#if defined(HAVE_TTMATH)
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
+#endif
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "Exception " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Other exception" << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/Jamfile b/src/boost/libs/geometry/test/srs/Jamfile
new file mode 100644
index 000000000..f513108d8
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/Jamfile
@@ -0,0 +1,31 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2017, 2018, 2020.
+# Modifications copyright (c) 2017-2020, Oracle and/or its affiliates.
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# TODO: move project transformer test to strategies
+test-suite boost-geometry-srs
+ :
+ [ run projection.cpp : : : : srs_projection ]
+ [ run projection_epsg.cpp : : : : srs_projection_epsg ]
+ [ run projection_interface_d.cpp : : : : srs_projection_interface_d ]
+ [ run projection_interface_p4.cpp : : : : srs_projection_interface_p4 ]
+ [ run projection_interface_s.cpp : : : : srs_projection_interface_s ]
+ [ run projection_selftest.cpp : : : : srs_projection_selftest ]
+ [ run projections.cpp : : : : srs_projections ]
+ [ run projections_combined.cpp : : : : srs_projections_combined ]
+ [ run projections_static.cpp : : : : srs_projections_static ]
+ [ compile spar.cpp : : srs_spar ]
+ [ run srs_transformer.cpp : : : : srs_srs_transformer ]
+ [ run transformation_epsg.cpp : : : : srs_transformation_epsg ]
+ [ run transformation_interface.cpp : : : : srs_transformation_interface ]
+ ;
diff --git a/src/boost/libs/geometry/test/srs/check_geometry.hpp b/src/boost/libs/geometry/test/srs/check_geometry.hpp
new file mode 100644
index 000000000..e188ff686
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/check_geometry.hpp
@@ -0,0 +1,162 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_GEOMETRY_TEST_SRS_CHECK_GEOMETRY_HPP
+#define BOOST_GEOMETRY_TEST_SRS_CHECK_GEOMETRY_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#include <boost/geometry/views/detail/indexed_point_view.hpp>
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/size.hpp>
+#include <boost/range/value_type.hpp>
+
+
+namespace test
+{
+
+struct check_point
+{
+ template <typename Point, typename T>
+ static void apply(Point const& point1, Point const& point2, T tol)
+ {
+ typename bg::coordinate_type<Point>::type
+ x1 = bg::get<0>(point1),
+ y1 = bg::get<1>(point1),
+ x2 = bg::get<0>(point2),
+ y2 = bg::get<1>(point2);
+
+ BOOST_CHECK_CLOSE(x1, x2, tol);
+ BOOST_CHECK_CLOSE(y1, y2, tol);
+ }
+};
+
+template <typename Policy = check_point>
+struct check_range
+{
+ template <typename Range, typename T>
+ static void apply(Range const& range1, Range const& range2, T tol)
+ {
+ size_t range1_count = boost::size(range1);
+ size_t range2_count = boost::size(range2);
+ BOOST_CHECK_EQUAL(range1_count, range2_count);
+ if (range1_count == range2_count)
+ {
+ apply(boost::begin(range1), boost::end(range1),
+ boost::begin(range2), tol);
+ }
+ }
+ template <typename It, typename T>
+ static void apply(It first1, It last1, It first2, T tol)
+ {
+ for ( ; first1 != last1 ; ++first1, ++first2)
+ Policy::apply(*first1, *first2, tol);
+ }
+};
+
+
+template <typename Geometry, typename Tag = typename bg::tag<Geometry>::type>
+struct check_geometry_impl
+{};
+
+template <typename Point>
+struct check_geometry_impl<Point, bg::point_tag>
+ : check_point
+{};
+
+template <typename Segment>
+struct check_geometry_impl<Segment, bg::segment_tag>
+{
+ template <typename T>
+ static void apply(Segment const& g1, Segment const& g2, T tol)
+ {
+ bg::detail::indexed_point_view<Segment const, 0> p1(g1);
+ bg::detail::indexed_point_view<Segment const, 1> p2(g1);
+ bg::detail::indexed_point_view<Segment const, 0> q1(g2);
+ bg::detail::indexed_point_view<Segment const, 1> q2(g2);
+
+ check_point::apply(p1, q1, tol);
+ check_point::apply(p2, q2, tol);
+ }
+};
+
+template <typename MultiPoint>
+struct check_geometry_impl<MultiPoint, bg::multi_point_tag>
+ : check_range<>
+{};
+
+template <typename Linestring>
+struct check_geometry_impl<Linestring, bg::linestring_tag>
+ : check_range<>
+{};
+
+template <typename MultiLinestring>
+struct check_geometry_impl<MultiLinestring, bg::multi_linestring_tag>
+ : check_range< check_range<> >
+{};
+
+template <typename Ring>
+struct check_geometry_impl<Ring, bg::ring_tag>
+ : check_range<>
+{};
+
+template <typename Polygon>
+struct check_geometry_impl<Polygon, bg::polygon_tag>
+{
+ template <typename T>
+ static void apply(Polygon const& g1, Polygon const& g2, T tol)
+ {
+ check_range<>::apply(bg::exterior_ring(g1), bg::exterior_ring(g2), tol);
+ check_range< check_range<> >::apply(bg::interior_rings(g1), bg::interior_rings(g2), tol);
+ }
+};
+
+template <typename MultiPolygon>
+struct check_geometry_impl<MultiPolygon, bg::multi_polygon_tag>
+ : check_range
+ <
+ check_geometry_impl
+ <
+ typename boost::range_value<MultiPolygon>::type,
+ bg::polygon_tag
+ >
+ >
+{};
+
+
+template <typename Geometry, typename T>
+inline void check_geometry(Geometry const& g1, Geometry const& g2, T tol)
+{
+ check_geometry_impl<Geometry>::apply(g1, g2, tol);
+}
+
+template <typename Geometry, typename T>
+inline void check_geometry(Geometry const& g1, std::string const& wkt2, T tol)
+{
+ Geometry g2;
+ bg::read_wkt(wkt2, g2);
+ check_geometry_impl<Geometry>::apply(g1, g2, tol);
+}
+
+} // namespace test
+
+
+#endif // BOOST_GEOMETRY_TEST_SRS_CHECK_GEOMETRY_HPP
diff --git a/src/boost/libs/geometry/test/srs/proj4.hpp b/src/boost/libs/geometry/test/srs/proj4.hpp
new file mode 100644
index 000000000..10a7f4dd5
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/proj4.hpp
@@ -0,0 +1,330 @@
+// Boost.Geometry
+
+// Copyright (c) 2017-2019, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_SRS_PROJ4_HPP
+#define BOOST_GEOMETRY_TEST_SRS_PROJ4_HPP
+
+#include <string>
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/radian_access.hpp>
+
+#if defined(TEST_WITH_PROJ6)
+#define TEST_WITH_PROJ5
+#endif
+
+#if defined(TEST_WITH_PROJ5)
+#define TEST_WITH_PROJ4
+
+#include <proj.h>
+
+#endif
+
+#if defined(TEST_WITH_PROJ4)
+#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+
+#include <proj_api.h>
+
+struct pj_ptr
+{
+ explicit pj_ptr(projPJ ptr = NULL)
+ : m_ptr(ptr)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ pj_ptr(pj_ptr && other)
+ : m_ptr(other.m_ptr)
+ {
+ other.m_ptr = NULL;
+ }
+
+ pj_ptr & operator=(pj_ptr && other)
+ {
+ if (m_ptr)
+ pj_free(m_ptr);
+ m_ptr = other.m_ptr;
+ other.m_ptr = NULL;
+ return *this;
+ }
+#endif
+
+ projPJ get() const
+ {
+ return m_ptr;
+ }
+
+ ~pj_ptr()
+ {
+ if (m_ptr)
+ pj_free(m_ptr);
+ }
+
+private:
+ pj_ptr(pj_ptr const&);
+ pj_ptr & operator=(pj_ptr const&);
+
+ projPJ m_ptr;
+};
+/*
+struct pj_projection
+{
+ pj_projection(std::string const& prj)
+ : m_ptr(pj_init_plus(prj.c_str()))
+ {}
+
+ template <typename In, typename Out>
+ void forward(In const& in, Out & out) const
+ {
+ double x = boost::geometry::get_as_radian<0>(in);
+ double y = boost::geometry::get_as_radian<1>(in);
+
+ projUV p1;
+ projUV p2;
+
+ p1.u = x;
+ p1.v = y;
+
+ p2 = pj_fwd(p1, m_ptr.get());
+
+ boost::geometry::set_from_radian<0>(out, p2.u);
+ boost::geometry::set_from_radian<1>(out, p2.v);
+ }
+
+ template <typename In, typename Out>
+ void inverse(In const& in, Out & out) const
+ {
+ double lon = boost::geometry::get_as_radian<0>(in);
+ double lat = boost::geometry::get_as_radian<1>(in);
+
+ projUV p1;
+ projUV p2;
+
+ p1.u = lon;
+ p1.v = lat;
+
+ p2 = pj_inv(p1, m_ptr.get());
+
+ boost::geometry::set_from_radian<0>(out, p2.u);
+ boost::geometry::set_from_radian<1>(out, p2.v);
+ }
+
+private:
+ pj_ptr m_ptr;
+};*/
+
+struct pj_transformation
+{
+ pj_transformation(std::string const& from, std::string const& to)
+ : m_from(pj_init_plus(from.c_str()))
+ , m_to(pj_init_plus(to.c_str()))
+ {}
+
+ void forward(std::vector<double> in_x,
+ std::vector<double> in_y,
+ std::vector<double> & out_x,
+ std::vector<double> & out_y) const
+ {
+ assert(in_x.size() == in_y.size());
+ pj_transform(m_from.get(), m_to.get(), (long)in_x.size(), 1, &in_x[0], &in_y[0], NULL);
+ out_x = std::move(in_x);
+ out_y = std::move(in_y);
+ }
+
+ void forward(std::vector<double> in_xy,
+ std::vector<double> & out_xy) const
+ {
+ assert(in_xy.size() % 2 == 0);
+ pj_transform(m_from.get(), m_to.get(), (long)in_xy.size() / 2, 2, &in_xy[0], &in_xy[1], NULL);
+ out_xy = std::move(in_xy);
+ }
+
+ void forward(std::vector<std::vector<double> > const& in_xy,
+ std::vector<std::vector<double> > & out_xy) const
+ {
+ out_xy.resize(in_xy.size());
+ for (size_t i = 0 ; i < in_xy.size(); ++i)
+ forward(in_xy[i], out_xy[i]);
+ }
+
+ template <typename In, typename Out>
+ void forward(In const& in, Out & out,
+ typename boost::enable_if_c
+ <
+ boost::is_same
+ <
+ typename boost::geometry::tag<In>::type,
+ boost::geometry::point_tag
+ >::value
+ >::type* dummy = 0) const
+ {
+ transform_point(in, out, m_from, m_to);
+ }
+
+ template <typename In, typename Out>
+ void inverse(In const& in, Out & out,
+ typename boost::enable_if_c
+ <
+ boost::is_same
+ <
+ typename boost::geometry::tag<In>::type,
+ boost::geometry::point_tag
+ >::value
+ >::type* dummy = 0) const
+ {
+ transform_point(in, out, m_to, m_from);
+ }
+
+private:
+ template <typename In, typename Out>
+ static void transform_point(In const& in, Out & out,
+ pj_ptr const& from, pj_ptr const& to)
+ {
+ double x = boost::geometry::get_as_radian<0>(in);
+ double y = boost::geometry::get_as_radian<1>(in);
+
+ pj_transform(from.get(), to.get(), 1, 0, &x, &y, NULL);
+
+ boost::geometry::set_from_radian<0>(out, x);
+ boost::geometry::set_from_radian<1>(out, y);
+ }
+
+ pj_ptr m_from;
+ pj_ptr m_to;
+};
+
+#endif // TEST_WITH_PROJ4
+
+#if defined(TEST_WITH_PROJ5)
+
+struct proj5_ptr
+{
+ explicit proj5_ptr(PJ *ptr = NULL)
+ : m_ptr(ptr)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ proj5_ptr(proj5_ptr && other)
+ : m_ptr(other.m_ptr)
+ {
+ other.m_ptr = NULL;
+ }
+
+ proj5_ptr & operator=(proj5_ptr && other)
+ {
+ if (m_ptr)
+ proj_destroy(m_ptr);
+ m_ptr = other.m_ptr;
+ other.m_ptr = NULL;
+ return *this;
+ }
+#endif
+
+ PJ *get() const
+ {
+ return m_ptr;
+ }
+
+ ~proj5_ptr()
+ {
+ if (m_ptr)
+ proj_destroy(m_ptr);
+ }
+
+private:
+ proj5_ptr(proj5_ptr const&);
+ proj5_ptr & operator=(proj5_ptr const&);
+
+ PJ *m_ptr;
+};
+
+struct proj5_transformation
+{
+ proj5_transformation(std::string const& to)
+ : m_proj(proj_create(PJ_DEFAULT_CTX, to.c_str()))
+ {}
+
+ void forward(std::vector<PJ_COORD> in,
+ std::vector<PJ_COORD> & out) const
+ {
+ proj_trans_array(m_proj.get(), PJ_FWD, in.size(), &in[0]);
+ out = std::move(in);
+ }
+
+ template <typename In, typename Out>
+ void forward(In const& in, Out & out,
+ typename boost::enable_if_c
+ <
+ boost::is_same
+ <
+ typename boost::geometry::tag<In>::type,
+ boost::geometry::point_tag
+ >::value
+ >::type* dummy = 0) const
+ {
+ PJ_COORD c;
+ c.lp.lam = boost::geometry::get_as_radian<0>(in);
+ c.lp.phi = boost::geometry::get_as_radian<1>(in);
+
+ c = proj_trans(m_proj.get(), PJ_FWD, c);
+
+ boost::geometry::set_from_radian<0>(out, c.xy.x);
+ boost::geometry::set_from_radian<1>(out, c.xy.y);
+ }
+
+private:
+ proj5_ptr m_proj;
+};
+
+#endif // TEST_WITH_PROJ5
+
+#if defined(TEST_WITH_PROJ6)
+
+struct proj6_transformation
+{
+ proj6_transformation(std::string const& from, std::string const& to)
+ : m_proj(proj_create_crs_to_crs(PJ_DEFAULT_CTX, from.c_str(), to.c_str(), NULL))
+ {
+ //proj_normalize_for_visualization(0, m_proj.get());
+ }
+
+ void forward(std::vector<PJ_COORD> in,
+ std::vector<PJ_COORD> & out) const
+ {
+ proj_trans_array(m_proj.get(), PJ_FWD, in.size(), &in[0]);
+ out = std::move(in);
+ }
+
+ template <typename In, typename Out>
+ void forward(In const& in, Out & out,
+ typename boost::enable_if_c
+ <
+ boost::is_same
+ <
+ typename boost::geometry::tag<In>::type,
+ boost::geometry::point_tag
+ >::value
+ >::type* dummy = 0) const
+ {
+ PJ_COORD c;
+ c.lp.lam = boost::geometry::get_as_radian<0>(in);
+ c.lp.phi = boost::geometry::get_as_radian<1>(in);
+
+ c = proj_trans(m_proj.get(), PJ_FWD, c);
+
+ boost::geometry::set_from_radian<0>(out, c.xy.x);
+ boost::geometry::set_from_radian<1>(out, c.xy.y);
+ }
+
+private:
+ proj5_ptr m_proj;
+};
+
+#endif // TEST_WITH_PROJ6
+
+#endif // BOOST_GEOMETRY_TEST_SRS_PROJ4_HPP
diff --git a/src/boost/libs/geometry/test/srs/projection.cpp b/src/boost/libs/geometry/test/srs/projection.cpp
new file mode 100644
index 000000000..ed65c142a
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection.cpp
@@ -0,0 +1,95 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017, 2018.
+// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4305 ) // truncation double -> float
+#endif // defined(_MSC_VER)
+
+
+#define BOOST_GEOMETRY_SRS_ENABLE_STATIC_PROJECTION_HYBRID_INTERFACE
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/srs/projection.hpp>
+
+#include <boost/geometry/algorithms/transform.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <test_common/test_point.hpp>
+
+
+namespace srs = bg::srs;
+
+template <typename P1, typename P2, typename Params>
+void test_one(double lon, double lat,
+ typename bg::coordinate_type<P2>::type x,
+ typename bg::coordinate_type<P2>::type y,
+ Params const& params)
+{
+ // hybrid interface disabled by default
+ // static_proj4 default ctor, dynamic parameters passed
+ srs::projection<Params> prj(params);
+
+ P1 ll;
+ bg::set<0>(ll, lon);
+ bg::set<1>(ll, lat);
+
+ P2 xy;
+ prj.forward(ll, xy);
+
+ BOOST_CHECK_CLOSE(bg::get<0>(xy), x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(xy), y, 0.001);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef typename bg::coordinate_type<P>::type coord_type;
+ typedef bg::model::point<coord_type, 2, bg::cs::geographic<bg::degree> > point_type;
+
+ using namespace srs::spar;
+
+ // aea
+ test_one<point_type, P>
+ (4.897000, 52.371000, 334609.583974, 5218502.503686,
+ parameters<proj_aea, ellps_wgs84, units_m, lat_1<>, lat_2<> >(
+ proj_aea(), ellps_wgs84(), units_m(), lat_1<>(55), lat_2<>(65)));
+}
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(bg::cs::cartesian)
+
+int test_main(int, char* [])
+{
+ //test_all<int[2]>();
+ test_all<float[2]>();
+ test_all<double[2]>();
+
+ // 2D -> 3D
+ //test_all<test::test_point>();
+
+ //test_all<bg::model::d2::point_xy<int> >();
+ test_all<bg::model::d2::point_xy<float> >();
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::d2::point_xy<long double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projection_epsg.cpp b/src/boost/libs/geometry/test/srs/projection_epsg.cpp
new file mode 100644
index 000000000..79fcd2e83
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection_epsg.cpp
@@ -0,0 +1,93 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2017, 2018.
+// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4305 ) // truncation double -> float
+#endif // defined(_MSC_VER)
+
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/srs/epsg.hpp>
+#include <boost/geometry/srs/projection.hpp>
+
+#include <boost/geometry/core/coordinate_type.hpp>
+
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <test_common/test_point.hpp>
+
+namespace srs = bg::srs;
+
+template <int E, typename P1, typename P2>
+void test_one(double lon, double lat,
+ typename bg::coordinate_type<P2>::type x,
+ typename bg::coordinate_type<P2>::type y)
+{
+ srs::projection<srs::static_epsg<E> > prj;
+
+ P1 ll;
+ bg::set<0>(ll, lon);
+ bg::set<1>(ll, lat);
+
+ P2 xy;
+ bg::set<0>(xy, 0.0);
+ bg::set<1>(xy, 0.0);
+ prj.forward(ll, xy);
+
+ BOOST_CHECK_CLOSE(bg::get<0>(xy), x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(xy), y, 0.001);
+}
+
+template <typename D, typename P>
+void test_deg_rad(double factor)
+{
+ typedef typename bg::coordinate_type<P>::type coord_type;
+ typedef bg::model::point<coord_type, 2, bg::cs::geographic<D> > point_type;
+
+ // sterea
+ test_one<28992, point_type, P>(4.897000 * factor, 52.371000 * factor, 121590.388077, 487013.903377);
+ // utm
+ test_one<29118, point_type, P>(4.897000 * factor, 52.371000 * factor, 4938115.7568751378, 9139797.6057944782);
+}
+
+template <typename P>
+void test_all()
+{
+ test_deg_rad<bg::degree, P>(1.0);
+ test_deg_rad<bg::radian, P>(bg::math::d2r<double>());
+}
+
+int test_main(int, char* [])
+{
+ // Commented out most the types because otherwise it cannot be linked
+ //test_all<int[2]>();
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+ //test_all<test::test_point>();
+ //test_all<bg::model::d2::point_xy<int> >();
+ ////test_all<bg::model::d2::point_xy<float> >();
+ ////test_all<bg::model::d2::point_xy<long double> >();
+
+ test_all<bg::model::d2::point_xy<double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projection_interface_d.cpp b/src/boost/libs/geometry/test/srs/projection_interface_d.cpp
new file mode 100644
index 000000000..2671651ca
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection_interface_d.cpp
@@ -0,0 +1,67 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/srs/epsg.hpp>
+#include <boost/geometry/srs/esri.hpp>
+#include <boost/geometry/srs/iau2000.hpp>
+#include <boost/geometry/srs/projection.hpp>
+
+#include "check_geometry.hpp"
+
+int test_main(int, char*[])
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+
+ typedef point<double, 2, cs::geographic<degree> > point_ll;
+ typedef point<double, 2, cs::cartesian> point_xy;
+
+ {
+ point_ll pt_ll(1, 1);
+ point_ll pt_ll2(0, 0);
+ point_xy pt_xy(0, 0);
+
+ projection<> prj = epsg(2000);
+
+ prj.forward(pt_ll, pt_xy);
+ test::check_geometry(pt_xy, "POINT(9413505.3284665551 237337.74515944949)", 0.001);
+
+ prj.inverse(pt_xy, pt_ll2);
+ // TODO: investigate this wierd result
+ test::check_geometry(pt_ll2, "POINT(-2.4463131191981073 1.5066638962045082)", 0.001);
+
+ projection<> prj2 = esri(37001);
+ projection<> prj3 = iau2000(19900);
+ }
+
+ {
+ using namespace boost::geometry::srs::dpar;
+
+ point_ll pt_ll(1, 1);
+ point_ll pt_ll2(0, 0);
+ point_xy pt_xy(0, 0);
+
+ projection<> prj = parameters<>(proj_tmerc)(ellps_wgs84)(units_m);
+
+ prj.forward(pt_ll, pt_xy);
+ test::check_geometry(pt_xy, "POINT(111308.33561309829 110591.34223734379)", 0.001);
+
+ prj.inverse(pt_xy, pt_ll2);
+ test::check_geometry(pt_ll2, "POINT(1 1)", 0.001);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projection_interface_p4.cpp b/src/boost/libs/geometry/test/srs/projection_interface_p4.cpp
new file mode 100644
index 000000000..731ad4124
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection_interface_p4.cpp
@@ -0,0 +1,124 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/srs/projection.hpp>
+
+#include "check_geometry.hpp"
+
+int test_main(int, char*[])
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+
+ typedef point<double, 2, cs::geographic<degree> > point_ll;
+ typedef point<double, 2, cs::cartesian> point_xy;
+
+ {
+ point_ll pt_ll(1, 1);
+ point_ll pt_ll2(0, 0);
+ point_xy pt_xy(0, 0);
+
+ projection<> prj = proj4("+proj=tmerc +ellps=WGS84 +units=m");
+
+ prj.forward(pt_ll, pt_xy);
+ test::check_geometry(pt_xy, "POINT(111308.33561309829 110591.34223734379)", 0.001);
+
+ prj.inverse(pt_xy, pt_ll2);
+ test::check_geometry(pt_ll2, "POINT(1 1)", 0.001);
+ }
+
+ // run-time errors
+ {
+ point_ll pt_ll(1, 1);
+ point_xy pt_xy(0, 0);
+
+ BOOST_CHECK_THROW(projection<> prj1((proj4(""))), bg::projection_exception);
+
+ BOOST_CHECK_THROW(projection<> prj1((proj4("+proj=abcd"))), bg::projection_exception);
+
+ projection<> prj3 = proj4("+proj=bacon +a=6400000");
+ BOOST_CHECK_THROW(prj3.inverse(pt_xy, pt_ll), bg::projection_exception);
+ }
+
+ {
+ segment<point_ll> seg_ll;
+ segment<point_xy> seg_xy;
+ linestring<point_ll> ls_ll;
+ linestring<point_xy> ls_xy;
+ ring<point_ll> ring_ll;
+ ring<point_xy> ring_xy;
+ polygon<point_ll> poly_ll;
+ polygon<point_xy> poly_xy;
+ multi_point<point_ll> mpt_ll;
+ multi_point<point_xy> mpt_xy;
+ multi_linestring<linestring<point_ll> > mls_ll;
+ multi_linestring<linestring<point_xy> > mls_xy;
+ multi_polygon<polygon<point_ll> > mpoly_ll;
+ multi_polygon<polygon<point_xy> > mpoly_xy;
+
+ bg::read_wkt("LINESTRING(0 0, 1 1)", seg_ll);
+ bg::read_wkt("LINESTRING(0 0, 1 1, 2 2)", ls_ll);
+ bg::read_wkt("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", ring_ll);
+ bg::read_wkt("POLYGON((0 0, 0 3, 3 3, 3 0, 0 0),(1 1, 2 1, 2 2, 1 2, 1 1))", poly_ll);
+ bg::read_wkt("MULTIPOINT(0 0, 1 1, 2 2)", mpt_ll);
+ bg::read_wkt("MULTILINESTRING((0 0, 1 1),(2 2, 3 3))", mls_ll);
+ bg::read_wkt("MULTIPOLYGON(((0 0, 0 3, 3 3, 3 0, 0 0),(1 1, 2 1, 2 2, 1 2, 1 1)),((3 3,3 4,4 4,4 3,3 3)))", mpoly_ll);
+
+ projection<> prj = proj4("+proj=tmerc +ellps=WGS84 +units=m");
+
+ prj.forward(seg_ll, seg_xy);
+ prj.forward(ls_ll, ls_xy);
+ prj.forward(ring_ll, ring_xy);
+ prj.forward(poly_ll, poly_xy);
+ prj.forward(mpt_ll, mpt_xy);
+ prj.forward(mls_ll, mls_xy);
+ prj.forward(mpoly_ll, mpoly_xy);
+
+ test::check_geometry(seg_xy, "LINESTRING(0 0,111308 110591)", 0.001);
+ test::check_geometry(ls_xy, "LINESTRING(0 0,111308 110591,222550 221285)", 0.001);
+ test::check_geometry(ring_xy, "POLYGON((0 0,0 110574,111308 110591,111325 0,0 0))", 0.001);
+ test::check_geometry(poly_xy, "POLYGON((0 0,0 331726,333657 332183,334112 0,0 0),(111308 110591,222651 110642,222550 221285,111258 221183,111308 110591))", 0.001);
+ test::check_geometry(mpt_xy, "MULTIPOINT((0 0),(111308 110591),(222550 221285))", 0.001);
+ test::check_geometry(mls_xy, "MULTILINESTRING((0 0,111308 110591),(222550 221285,333657 332183))", 0.001);
+ test::check_geometry(mpoly_xy, "MULTIPOLYGON(((0 0,0 331726,333657 332183,334112 0,0 0),(111308 110591,222651 110642,222550 221285,111258 221183,111308 110591)),((333657 332183,333302 442913,444561 443388,445034 332540,333657 332183)))", 0.001);
+
+ bg::clear(seg_ll);
+ bg::clear(ls_ll);
+ bg::clear(ring_ll);
+ bg::clear(poly_ll);
+ bg::clear(mpt_ll);
+ bg::clear(mls_ll);
+ bg::clear(mpoly_ll);
+
+ prj.inverse(seg_xy, seg_ll);
+ prj.inverse(ls_xy, ls_ll);
+ prj.inverse(ring_xy, ring_ll);
+ prj.inverse(poly_xy, poly_ll);
+ prj.inverse(mpt_xy, mpt_ll);
+ prj.inverse(mls_xy, mls_ll);
+ prj.inverse(mpoly_xy, mpoly_ll);
+
+ test::check_geometry(seg_ll, "LINESTRING(0 0, 1 1)", 0.001);
+ test::check_geometry(ls_ll, "LINESTRING(0 0, 1 1, 2 2)", 0.001);
+ test::check_geometry(ring_ll, "POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", 0.001);
+ test::check_geometry(poly_ll, "POLYGON((0 0, 0 3, 3 3, 3 0, 0 0),(1 1, 2 1, 2 2, 1 2, 1 1))", 0.001);
+ test::check_geometry(mpt_ll, "MULTIPOINT(0 0, 1 1, 2 2)", 0.001);
+ test::check_geometry(mls_ll, "MULTILINESTRING((0 0, 1 1),(2 2, 3 3))", 0.001);
+ test::check_geometry(mpoly_ll, "MULTIPOLYGON(((0 0, 0 3, 3 3, 3 0, 0 0),(1 1, 2 1, 2 2, 1 2, 1 1)),((3 3,3 4,4 4,4 3,3 3)))", 0.001);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projection_interface_s.cpp b/src/boost/libs/geometry/test/srs/projection_interface_s.cpp
new file mode 100644
index 000000000..571eb3ac9
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection_interface_s.cpp
@@ -0,0 +1,96 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/srs/epsg.hpp>
+#include <boost/geometry/srs/esri.hpp>
+#include <boost/geometry/srs/iau2000.hpp>
+#include <boost/geometry/srs/projection.hpp>
+
+#include "check_geometry.hpp"
+
+int test_main(int, char*[])
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+
+ typedef point<double, 2, cs::geographic<degree> > point_ll;
+ typedef point<double, 2, cs::cartesian> point_xy;
+
+ {
+ using namespace boost::geometry::srs::spar;
+
+ point_ll pt_ll(1, 1);
+ point_ll pt_ll2(0, 0);
+ point_xy pt_xy(0, 0);
+
+ projection<parameters<proj_tmerc, ellps_wgs84, units_m> > prj;
+
+ prj.forward(pt_ll, pt_xy);
+ test::check_geometry(pt_xy, "POINT(111308.33561309829 110591.34223734379)", 0.001);
+
+ prj.inverse(pt_xy, pt_ll2);
+ test::check_geometry(pt_ll2, "POINT(1 1)", 0.001);
+ }
+
+ {
+ using namespace boost::geometry::srs::spar;
+
+ projection<parameters<proj_tmerc> > prj1;
+ projection<parameters<proj_tmerc, ellps_wgs84> > prj2;
+ projection<parameters<proj_tmerc, ellps_wgs84, datum_wgs84> > prj3;
+ projection<parameters<proj_tmerc, ellps_wgs84, x_0<>, y_0<> > > prj4
+ = parameters<proj_tmerc, ellps_wgs84, x_0<>, y_0<> >(
+ proj_tmerc(), ellps_wgs84(), x_0<>(0), y_0<>(0));
+
+ typedef spheroid<double> sph;
+ typedef ellps<sph> ell;
+ typedef proj_tmerc prj;
+ projection<parameters<ell, prj> > prj5
+ = parameters<ell, prj>(ell(sph(1000, 999)));
+ }
+
+ {
+ point_ll pt_ll(1, 1);
+ point_ll pt_ll2(0, 0);
+ point_xy pt_xy(0, 0);
+
+ projection<static_epsg<2000> > prj;
+
+ prj.forward(pt_ll, pt_xy);
+ test::check_geometry(pt_xy, "POINT(9413505.3284665551 237337.74515944949)", 0.001);
+
+ prj.inverse(pt_xy, pt_ll2);
+ // TODO: investigate this wierd result
+ test::check_geometry(pt_ll2, "POINT(-2.4463131191981073 1.5066638962045082)", 0.001);
+
+ projection<static_esri<37001> > prj2;
+ projection<static_iau2000<19900> > prj3;
+ }
+
+ // compile-time errors
+ {
+ point_ll pt_ll(1, 1);
+ point_xy pt_xy(0, 0);
+
+ //projection<spar::parameters<int> > prj1;
+ //projection<int> prj2;
+
+ projection<spar::parameters<spar::proj_bacon> > prj3;
+ //prj3.inverse(pt_xy, pt_ll);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projection_selftest.cpp b/src/boost/libs/geometry/test/srs/projection_selftest.cpp
new file mode 100644
index 000000000..cf98f3c3e
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection_selftest.cpp
@@ -0,0 +1,115 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <iostream>
+
+#include <boost/geometry/srs/projection.hpp>
+
+#include "projection_selftest_cases.hpp"
+#include "proj4.hpp"
+
+
+void test_projection(std::string const& id, std::string const& parameters,
+ const LL * fwd_in, const XY * fwd_expected,
+ const XY * inv_in, const LL * inv_expected)
+{
+ bg::srs::projection<> prj = bg::srs::proj4(parameters);
+
+#ifdef TEST_WITH_PROJ4
+ pj_projection pj_par(parameters);
+#endif
+
+ for (std::size_t i = 0 ; i < 4 ; ++i)
+ {
+ if (bg::get<0>(fwd_expected[i]) == HUGE_VAL)
+ break;
+
+ {
+ XY fwd_out;
+ prj.forward(fwd_in[i], fwd_out);
+
+ bool fwd_eq = bg::math::abs(bg::get<0>(fwd_out) - bg::get<0>(fwd_expected[i])) < 1e-7
+ && bg::math::abs(bg::get<1>(fwd_out) - bg::get<1>(fwd_expected[i])) < 1e-7;
+
+ BOOST_CHECK_MESSAGE((fwd_eq),
+ std::setprecision(16) << "Result of " << id << " forward projection {"
+ << bg::wkt(fwd_out) << "} different than expected {"
+ << bg::wkt(fwd_expected[i]) << "}");
+
+#ifdef TEST_WITH_PROJ4
+ {
+ XY pj_xy;
+ pj_par.forward(fwd_in[i], pj_xy);
+ double d1 = bg::math::abs(bg::get<0>(fwd_out) - bg::get<0>(pj_xy));
+ double d2 = bg::math::abs(bg::get<1>(fwd_out) - bg::get<1>(pj_xy));
+ double d = (std::max)(d1, d2);
+ bool same_as_pj = d < 1e-15;
+ BOOST_CHECK_MESSAGE((same_as_pj),
+ std::setprecision(16) << "Result of " << id << " forward projection {"
+ << bg::wkt(fwd_out) << "} different than Proj4 {"
+ << bg::wkt(pj_xy) << "} by " << d);
+ }
+#endif
+ }
+
+ if (bg::get<0>(inv_expected[i]) == HUGE_VAL)
+ break;
+
+ {
+ LL inv_out;
+ prj.inverse(inv_in[i], inv_out);
+
+ bool inv_eq = bg::math::abs(bg::get<0>(inv_out) - bg::get<0>(inv_expected[i])) < 1e-7
+ && bg::math::abs(bg::get<1>(inv_out) - bg::get<1>(inv_expected[i])) < 1e-7;
+
+ BOOST_CHECK_MESSAGE((inv_eq),
+ std::setprecision(16) << "Result of " << id << " inverse projection {"
+ << bg::wkt(inv_out) << "} different than expected {"
+ << bg::wkt(inv_expected[i]) << "}");
+
+#ifdef TEST_WITH_PROJ4
+ {
+ LL pj_ll;
+ pj_par.inverse(inv_in[i], pj_ll);
+ double d1 = bg::math::abs(bg::get<0>(inv_out) - bg::get<0>(pj_ll));
+ double d2 = bg::math::abs(bg::get<1>(inv_out) - bg::get<1>(pj_ll));
+ double d = (std::max)(d1, d2);
+ bool same_as_pj = d < 1e-15;
+ BOOST_CHECK_MESSAGE((same_as_pj),
+ std::setprecision(16) << "Result of " << id << " inverse projection {"
+ << bg::wkt(inv_out) << "} different than Proj4 {"
+ << bg::wkt(pj_ll) << "} by " << d);
+ }
+#endif
+ }
+ }
+}
+
+void test_projections(const projection_case * cases, std::size_t n)
+{
+ for (std::size_t i = 0 ; i < n ; ++i)
+ {
+ projection_case const& pcas = cases[i];
+
+ test_projection(pcas.id, pcas.args,
+ pcas.fwd_in, pcas.fwd_expect,
+ pcas.inv_in, pcas.inv_expect);
+ }
+}
+
+int test_main(int, char*[])
+{
+ test_projections(projection_cases, sizeof(projection_cases)/sizeof(projection_case));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projection_selftest_cases.hpp b/src/boost/libs/geometry/test/srs/projection_selftest_cases.hpp
new file mode 100644
index 000000000..1bf4dc15c
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projection_selftest_cases.hpp
@@ -0,0 +1,3935 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// This file contains test cases converted from PROJ4, http://trac.osgeo.org/proj
+// PROJ4 is originally written by Gerald Evenden (then of the USGS)
+// PROJ4 is maintained by Frank Warmerdam
+// Test cases was converted to Boost.Geometry by Adam Wulkiewicz
+
+// Original copyright notice:
+
+// Copyright (c) 1995, Gerald Evenden
+
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following conditions:
+
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef BOOST_GEOMETRY_TEST_SRS_PROJECTION_SELFTEST_CASES_HPP
+#define BOOST_GEOMETRY_TEST_SRS_PROJECTION_SELFTEST_CASES_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+
+
+struct XY { double x, y; };
+struct LL { double lon, lat; };
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(XY, double, bg::cs::cartesian, x, y)
+BOOST_GEOMETRY_REGISTER_POINT_2D(LL, double, bg::cs::geographic<bg::degree>, lon, lat)
+
+struct projection_case
+{
+ std::string id;
+ std::string args;
+ LL fwd_in[4];
+ XY fwd_expect[4];
+ XY inv_in[4];
+ LL inv_expect[4];
+};
+
+static const projection_case projection_cases[] = {
+ {
+ "aea_e",
+ "+proj=aea +ellps=GRS80 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222571.60875710563, 110653.32674302977},
+ {222706.30650839131, -110484.26714439997},
+ {-222571.60875710563, 110653.32674302977},
+ {-222706.30650839131, -110484.26714439997}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017966310597749514, 0.00090436885862202158},
+ {0.0017966300767030448, -0.00090437009538581453},
+ {-0.0017966310597749514, 0.00090436885862202158},
+ {-0.0017966300767030448, -0.00090437009538581453}
+ }
+ },{
+ "aea_s",
+ "+proj=aea +R=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223334.08517088494, 111780.43188447191},
+ {223470.15499168713, -111610.33943099028},
+ {-223334.08517088494, 111780.43188447191},
+ {-223470.15499168713, -111610.33943099028}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904935979658752, 0.00089524594491375306},
+ {0.0017904926216016812, -0.00089524716502493225},
+ {-0.0017904935979658752, 0.00089524594491375306},
+ {-0.0017904926216016812, -0.00089524716502493225}
+ }
+ },{
+ "leac_e",
+ "+proj=leac +ellps=GRS80 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {220685.14054297868, 112983.50088939646},
+ {224553.31227982609, -108128.63674487274},
+ {-220685.14054297868, 112983.50088939646},
+ {-224553.31227982609, -108128.63674487274}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017966446840328458, 0.00090435171340223211},
+ {0.0017966164523713021, -0.00090438724081843625},
+ {-0.0017966446840328458, 0.00090435171340223211},
+ {-0.0017966164523713021, -0.00090438724081843625}
+ }
+ },{
+ "leac_s",
+ "+proj=leac +R=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {221432.86859285168, 114119.45452653214},
+ {225331.72412711097, -109245.82943505641},
+ {-221432.86859285168, 114119.45452653214},
+ {-225331.72412711097, -109245.82943505641}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017905070979748127, 0.00089522906964877795},
+ {0.001790479121519977, -0.00089526404022281043},
+ {-0.0017905070979748127, 0.00089522906964877795},
+ {-0.001790479121519977, -0.00089526404022281043}
+ }
+ },{
+ "aeqd_e",
+ "+proj=aeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222616.522190051648, 110596.996549550197},
+ { 222616.522190051648, -110596.996549550211},
+ {-222616.522190051648, 110596.996549550197},
+ {-222616.522190051648, -110596.996549550211}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179663056838724787, 0.000904369476930248902},
+ { 0.00179663056838724787, -0.000904369476930248469},
+ {-0.00179663056838724787, 0.000904369476930248902},
+ {-0.00179663056838724787, -0.000904369476930248469}
+ }
+ },{
+ "aeqd_s",
+ "+proj=aeqd +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223379.456047271, 111723.757570854126},
+ { 223379.456047271, -111723.757570854126},
+ {-223379.456047271, 111723.757570854126},
+ {-223379.456047271, -111723.757570854126}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310992953335, 0.000895246554746200623},
+ { 0.00179049310992953335, -0.000895246554746200623},
+ {-0.00179049310992953335, 0.000895246554746200623},
+ {-0.00179049310992953335, -0.000895246554746200623}
+ }
+ },{
+ "airy",
+ "+proj=airy +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 189109.88690862127, 94583.752387504152},
+ { 189109.88690862127, -94583.752387504152},
+ {-189109.88690862127, 94583.752387504152},
+ {-189109.88690862127, -94583.752387504152}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "aitoff",
+ "+proj=aitoff +R=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223379.45881169615, 111706.74288385305},
+ {223379.45881169615, -111706.74288385305},
+ {-223379.45881169615, 111706.74288385305},
+ {-223379.45881169615, -111706.74288385305}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904931100388164, 0.00089524655491012516},
+ {0.0017904931100388164, -0.00089524655491012516},
+ {-0.0017904931100388164, 0.00089524655491012516},
+ {-0.0017904931100388164, -0.00089524655491012516}
+ }
+ },{
+ "wintri",
+ "+proj=wintri +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223390.80153348515, 111703.90750574505},
+ {223390.80153348515, -111703.90750574505},
+ {-223390.80153348515, 111703.90750574505},
+ {-223390.80153348515, -111703.90750574505}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904931099113196, 0.00089524655490101819},
+ {0.0017904931099113196, -0.00089524655490101819},
+ {-0.0017904931099113196, 0.00089524655490101819},
+ {-0.0017904931099113196, -0.00089524655490101819}
+ }
+ },{
+ "august",
+ "+proj=august +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223404.97818097242, 111722.34028976287},
+ {223404.97818097242, -111722.34028976287},
+ {-223404.97818097242, 111722.34028976287},
+ {-223404.97818097242, -111722.34028976287}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "bacon",
+ "+proj=bacon +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223334.13255596498, 175450.72592266591},
+ {223334.13255596498, -175450.72592266591},
+ {-223334.13255596498, 175450.72592266591},
+ {-223334.13255596498, -175450.72592266591}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "apian",
+ "+proj=apian +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223374.57735525275, 111701.07212763709},
+ { 223374.57735525275, -111701.07212763709},
+ {-223374.57735525275, 111701.07212763709},
+ {-223374.57735525275, -111701.07212763709}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "ortel",
+ "+proj=ortel +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223374.57735525275, 111701.07212763709},
+ { 223374.57735525275, -111701.07212763709},
+ {-223374.57735525275, 111701.07212763709},
+ {-223374.57735525275, -111701.07212763709}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "bipc_e",
+ "+proj=bipc +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {2452160.2177257561, -14548450.759654747},
+ {2447915.213725341, -14763427.21279873},
+ {2021695.5229349085, -14540413.695283702},
+ {2018090.5030046992, -14755620.651414108}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-73.038700284978702, 17.248118466239116},
+ {-73.03730373933017, 17.249414978178777},
+ {-73.03589317304332, 17.245536403008771},
+ {-73.034496627213585, 17.246832895573739}
+ }
+ },{
+ "bipc_s",
+ "+proj=bipc +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {2460565.7409749646, -14598319.9893308},
+ {2456306.1859352002, -14814033.339502094},
+ {2028625.4978190989, -14590255.375482792},
+ {2025008.1205891429, -14806200.018759441}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-73.038693104942126, 17.248116270440242},
+ {-73.037301330021322, 17.24940835333777},
+ {-73.035895582251086, 17.245543027866539},
+ {-73.034503807150301, 17.246835091521532}
+ }
+ },{
+ "boggs",
+ "+proj=boggs +a=6400000 +lat_1=0 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 211949.70080818201, 117720.99830541089},
+ { 211949.70080818201, -117720.99830541089},
+ {-211949.70080818201, 117720.99830541089},
+ {-211949.70080818201, -117720.99830541089},
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "bonne_e",
+ "+proj=bonne +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222605.29609715697, 55321.139565494814},
+ { 222605.29609923941, -165827.64779905154},
+ {-222605.29609715697, 55321.139565494814},
+ {-222605.29609923941, -165827.64779905154}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966987691132891, 0.50090436853737497},
+ { 0.0017966982774478867, 0.4990956309655612},
+ {-0.0017966987691132891, 0.50090436853737497},
+ {-0.0017966982774478867, 0.4990956309655612}
+ }
+ },{
+ "bonne_s",
+ "+proj=bonne +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223368.11557252839, 55884.555246393575},
+ { 223368.11557463196, -167517.59936969393},
+ {-223368.11557252839, 55884.555246393575},
+ {-223368.11557463196, -167517.59936969393}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017905615332457991, 0.50089524631087834},
+ { 0.0017905610449335603, 0.49910475320072978},
+ {-0.0017905615332457991, 0.50089524631087834},
+ {-0.0017905610449335603, 0.49910475320072978}
+ }
+ },
+ // NOT IMPLEMENTED IN Boost.Geometry
+ /*
+ {
+ "calcofi_e",
+ "+proj=calcofi +ellps=GRS80 +lat_1=0.5 +lat_2=2 +no_defs",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {508.44487214981905, -1171.7648604175156},
+ {514.99916815188112, -1145.8219814677668},
+ {500.68538412539851, -1131.4453779204598},
+ {507.36971913666355, -1106.1782014834275}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-110.36330792469906, 12.032056975840137},
+ {-98.455008863288782, 18.698723642506803},
+ {-207.4470245036909, 81.314089278595247},
+ {-62.486322854481287, 87.980755945261919}
+ }
+ },{
+ "calcofi_s",
+ "+proj=calcofi +R=6400000 +lat_1=0.5 +lat_2=2 +no_defs",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {507.09050748781806, -1164.7273751978314},
+ {513.68613637462886, -1138.9992682173072},
+ {499.33626147591531, -1124.4351309968195},
+ {506.0605703929898, -1099.3756650673038}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-110.30519040955151, 12.032056975840137},
+ {-98.322360950234085, 18.698723642506803},
+ {-207.54490681381429, 81.314089278595247},
+ {-62.576950371885275, 87.980755945261919}
+ }
+ },*/
+ // NOTE: cart projection test cases are implemented differently in Proj4
+ {
+ "cass_e",
+ "+proj=cass +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222605.28577699114, 110642.22925399939},
+ { 222605.28577699114, -110642.22925399939},
+ {-222605.28577699114, 110642.22925399939},
+ {-222605.28577699114, -110642.22925399939}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966305684613522, 0.00090436947663183841},
+ { 0.0017966305684613522, -0.00090436947663183841},
+ {-0.0017966305684613522, 0.00090436947663183841},
+ {-0.0017966305684613522, -0.00090436947663183841}
+ }
+ },{
+ "cass_s",
+ "+proj=cass +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223368.10520348375, 111769.14504058579},
+ { 223368.10520348375, -111769.14504058579},
+ {-223368.10520348375, 111769.14504058579},
+ {-223368.10520348375, -111769.14504058579}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931100023887, 0.00089524655445477922},
+ { 0.0017904931100023887, -0.00089524655445477922},
+ {-0.0017904931100023887, 0.00089524655445477922},
+ {-0.0017904931100023887, -0.00089524655445477922}
+ }
+ },{
+ "cc",
+ "+proj=cc +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223402.14425527418, 111712.41554059254},
+ {223402.14425527418, -111712.41554059254},
+ {-223402.14425527418, 111712.41554059254},
+ {-223402.14425527418, -111712.41554059254}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904931097838226, 0.00089524655481905597},
+ {0.0017904931097838226, -0.00089524655481905597},
+ {-0.0017904931097838226, 0.00089524655481905597},
+ {-0.0017904931097838226, -0.00089524655481905597}
+ }
+ },{
+ "cea_e",
+ "+proj=cea +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222638.981586547132, 110568.812396267356},
+ { 222638.981586547132, -110568.812396265886},
+ {-222638.981586547132, 110568.812396267356},
+ {-222638.981586547132, -110568.812396265886}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179663056823904264, 0.000904369476105564289},
+ { 0.00179663056823904264, -0.000904369476105564289},
+ {-0.00179663056823904264, 0.000904369476105564289},
+ {-0.00179663056823904264, -0.000904369476105564289}
+ }
+ },{
+ "cea_s",
+ "+proj=cea +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.144255274179, 111695.401198614476},
+ { 223402.144255274179, -111695.401198614476},
+ {-223402.144255274179, 111695.401198614476},
+ {-223402.144255274179, -111695.401198614476}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310978382265, 0.000895246554928338998},
+ { 0.00179049310978382265, -0.000895246554928338998},
+ {-0.00179049310978382265, 0.000895246554928338998},
+ {-0.00179049310978382265, -0.000895246554928338998}
+ }
+ },{
+ "chamb",
+ "+proj=chamb +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-27864.7795868005815, -223364.324593274243},
+ {-251312.283053493476, -223402.145526208304},
+ {-27864.7856491046077, 223364.327328827145},
+ {-251312.289116443484, 223402.142197287147}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "collg",
+ "+proj=collg +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {249872.921577929839, 99423.1747884602082},
+ {254272.532301245432, -98559.3077607425657},
+ {-249872.921577929839, 99423.1747884602082},
+ {-254272.532301245432, -98559.3077607425657}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.00158679719207879865, 0.00101017310941749921},
+ {0.001586769215623956, -0.00101018201458258111},
+ {-0.00158679719207879865, 0.00101017310941749921},
+ {-0.001586769215623956, -0.00101018201458258111}
+ }
+ },
+ // NOT IMPLEMENTED IN Boost.Geometry
+ /*{
+ "comill",
+ "+proj=comill +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223402.144255274179, 110611.859089458536},
+ {223402.144255274179, -110611.859089458536},
+ {-223402.144255274179, 110611.859089458536},
+ {-223402.144255274179, -110611.859089458536}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.00179049310978382265, 0.000904106801510605831},
+ {0.00179049310978382265, -0.000904106801510605831},
+ {-0.00179049310978382265, 0.000904106801510605831},
+ {-0.00179049310978382265, -0.000904106801510605831}
+ }
+ },*/{
+ "crast",
+ "+proj=crast +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {218280.142056780722, 114306.045604279774},
+ {218280.142056780722, -114306.045604279774},
+ {-218280.142056780722, 114306.045604279774},
+ {-218280.142056780722, -114306.045604279774}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.00183225941982580187, 0.00087483943098902331},
+ {0.00183225941982580187, -0.00087483943098902331},
+ {-0.00183225941982580187, 0.00087483943098902331},
+ {-0.00183225941982580187, -0.00087483943098902331}
+ }
+ },{
+ "denoy",
+ "+proj=denoy +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223377.422876954137, 111701.07212763709},
+ { 223377.422876954137, -111701.07212763709},
+ {-223377.422876954137, 111701.07212763709},
+ {-223377.422876954137, -111701.07212763709}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "eck1",
+ "+proj=eck1 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 204680.88820295094, 102912.17842606473},
+ { 204680.88820295094, -102912.17842606473},
+ {-204680.88820295094, 102912.17842606473},
+ {-204680.88820295094, -102912.17842606473}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0019434150820034624, 0.00097170229538813102},
+ { 0.0019434150820034624, -0.00097170229538813102},
+ {-0.0019434150820034624, 0.00097170229538813102},
+ {-0.0019434150820034624, -0.00097170229538813102}
+ }
+ },{
+ "eck2",
+ "+proj=eck2 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 204472.87090796008, 121633.73497524235},
+ { 204472.87090796008, -121633.73497524235},
+ {-204472.87090796008, 121633.73497524235},
+ {-204472.87090796008, -121633.73497524235}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0019434150820034624, 0.00082480429919795412},
+ { 0.0019434150820034624, -0.00082480429919795412},
+ {-0.0019434150820034624, 0.00082480429919795412},
+ {-0.0019434150820034624, -0.00082480429919795412}
+ }
+ },{
+ "eck3",
+ "+proj=eck3 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 188652.01572153764, 94328.919337031271},
+ { 188652.01572153764, -94328.919337031271},
+ {-188652.01572153764, 94328.919337031271},
+ {-188652.01572153764, -94328.919337031271}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0021202405520236059, 0.0010601202759750307},
+ { 0.0021202405520236059, -0.0010601202759750307},
+ {-0.0021202405520236059, 0.0010601202759750307},
+ {-0.0021202405520236059, -0.0010601202759750307}
+ }
+ },{
+ "eck4",
+ "+proj=eck4 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 188646.38935641639, 132268.54017406539},
+ { 188646.38935641639, -132268.54017406539},
+ {-188646.38935641639, 132268.54017406539},
+ {-188646.38935641639, -132268.54017406539}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0021202405520236059, 0.00075601458836610643},
+ { 0.0021202405520236059, -0.00075601458836610643},
+ {-0.0021202405520236059, 0.00075601458836610643},
+ {-0.0021202405520236059, -0.00075601458836610643}
+ }
+ },{
+ "eck5",
+ "+proj=eck5 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 197031.39213406085, 98523.198847226551},
+ { 197031.39213406085, -98523.198847226551},
+ {-197031.39213406085, 98523.198847226551},
+ {-197031.39213406085, -98523.198847226551}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.002029978749734037, 0.001014989374787388},
+ {0.002029978749734037, -0.001014989374787388},
+ {-0.002029978749734037, 0.001014989374787388},
+ {-0.002029978749734037, -0.001014989374787388}
+ }
+ },{
+ "eqc",
+ "+proj=eqc +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.144255274179, 111701.07212763709},
+ { 223402.144255274179, -111701.07212763709},
+ {-223402.144255274179, 111701.07212763709},
+ {-223402.144255274179, -111701.07212763709}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310978382265, 0.000895246554891911323},
+ { 0.00179049310978382265, -0.000895246554891911323},
+ {-0.00179049310978382265, 0.000895246554891911323},
+ {-0.00179049310978382265, -0.000895246554891911323}
+ }
+ },{
+ "eqdc_e",
+ "+proj=eqdc +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222588.440269285755, 110659.134907347048},
+ { 222756.836702042434, -110489.578087220681},
+ {-222588.440269285755, 110659.134907347048},
+ {-222756.836702042434, -110489.578087220681}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179635944879094839, 0.000904368858588402644},
+ { 0.00179635822020772734, -0.000904370095529954975},
+ {-0.00179635944879094839, 0.000904368858588402644},
+ {-0.00179635822020772734, -0.000904370095529954975}
+ }
+ },{
+ "eqdc_s",
+ "+proj=eqdc +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223351.088175113517, 111786.108747173785},
+ { 223521.200266735133, -111615.970741240744},
+ {-223351.088175113517, 111786.108747173785},
+ {-223521.200266735133, -111615.970741240744}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017902210900486641, 0.000895245944814909169},
+ { 0.00179021986984890255, -0.000895247165333684842},
+ {-0.0017902210900486641, 0.000895245944814909169},
+ {-0.00179021986984890255, -0.000895247165333684842}
+ }
+ },{
+ "fahey",
+ "+proj=fahey +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 182993.34464912376, 101603.19356988439},
+ { 182993.34464912376, -101603.19356988439},
+ {-182993.34464912376, 101603.19356988439},
+ {-182993.34464912376, -101603.19356988439}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0021857886080359551, 0.00098424601668238403},
+ {0.0021857886080359551, -0.00098424601668238403},
+ {-0.0021857886080359551, 0.00098424601668238403},
+ {-0.0021857886080359551, -0.00098424601668238403}
+ }
+ },{
+ "fouc_s",
+ "+proj=fouc_s +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.14425527424, 111695.40119861449},
+ { 223402.14425527424, -111695.40119861449},
+ {-223402.14425527424, 111695.40119861449},
+ {-223402.14425527424, -111695.40119861449}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931097838226, 0.000895246554928339},
+ { 0.0017904931097838226, -0.000895246554928339},
+ {-0.0017904931097838226, 0.000895246554928339},
+ {-0.0017904931097838226, -0.000895246554928339}
+ }
+ },{
+ "gall",
+ "+proj=gall +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 157969.17113451968, 95345.249178385886},
+ { 157969.17113451968, -95345.249178385886},
+ {-157969.17113451968, 95345.249178385886},
+ {-157969.17113451968, -95345.249178385886}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0025321396391918614, 0.001048846580346495},
+ { 0.0025321396391918614, -0.001048846580346495},
+ {-0.0025321396391918614, 0.001048846580346495},
+ {-0.0025321396391918614, -0.001048846580346495}
+ }
+ },{
+ "geos_e",
+ "+proj=geos +ellps=GRS80 +lat_1=0.5 +lat_2=2 +h=35785831",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222527.07036580026, 110551.30341332949},
+ { 222527.07036580026, -110551.30341332949},
+ {-222527.07036580026, 110551.30341332949},
+ {-222527.07036580026, -110551.30341332949}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966305689715385, 0.00090436947723267452},
+ { 0.0017966305689715385, -0.00090436947723267452},
+ {-0.0017966305689715385, 0.00090436947723267452},
+ {-0.0017966305689715385, -0.00090436947723267452}
+ }
+ },{
+ "geos_s",
+ "+proj=geos +R=6400000 +lat_1=0.5 +lat_2=2 +h=35785831",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223289.45763579503, 111677.65745653701},
+ { 223289.45763579503, -111677.65745653701},
+ {-223289.45763579503, 111677.65745653701},
+ {-223289.45763579503, -111677.65745653701}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931105078943, 0.00089524655504237148},
+ { 0.0017904931105078943, -0.00089524655504237148},
+ {-0.0017904931105078943, 0.00089524655504237148},
+ {-0.0017904931105078943, -0.00089524655504237148}
+ }
+ },{
+ "gins8",
+ "+proj=gins8 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 194350.25093959007, 111703.90763533533},
+ { 194350.25093959007, -111703.90763533533},
+ {-194350.25093959007, 111703.90763533533},
+ {-194350.25093959007, -111703.90763533533}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "sinu_e",
+ "+proj=sinu +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222605.29953946592, 110574.38855415257},
+ { 222605.29953946592, -110574.38855415257},
+ {-222605.29953946592, 110574.38855415257},
+ {-222605.29953946592, -110574.38855415257}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966305684613522, 0.00090436947707945409},
+ { 0.0017966305684613522, -0.00090436947707945409},
+ {-0.0017966305684613522, 0.00090436947707945409},
+ {-0.0017966305684613522, -0.00090436947707945409}
+ }
+ },{
+ "sinu_s",
+ "+proj=sinu +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223368.11902663155, 111701.07212763709},
+ { 223368.11902663155, -111701.07212763709},
+ {-223368.11902663155, 111701.07212763709},
+ {-223368.11902663155, -111701.07212763709}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931100023887, 0.00089524655489191132},
+ { 0.0017904931100023887, -0.00089524655489191132},
+ {-0.0017904931100023887, 0.00089524655489191132},
+ {-0.0017904931100023887, -0.00089524655489191132}
+ }
+ },{
+ "eck6",
+ "+proj=eck6 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 197021.60562899226, 126640.42073317352},
+ { 197021.60562899226, -126640.42073317352},
+ {-197021.60562899226, 126640.42073317352},
+ {-197021.60562899226, -126640.42073317352}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.002029978749734037, 0.00078963032910382171},
+ { 0.002029978749734037, -0.00078963032910382171},
+ {-0.002029978749734037, 0.00078963032910382171},
+ {-0.002029978749734037, -0.00078963032910382171}
+ }
+ },{
+ "mbtfps",
+ "+proj=mbtfps +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 204740.11747857218, 121864.72971934026},
+ { 204740.11747857218, -121864.72971934026},
+ {-204740.11747857218, 121864.72971934026},
+ {-204740.11747857218, -121864.72971934026}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0019534152166442065, 0.00082057965689633387},
+ { 0.0019534152166442065, -0.00082057965689633387},
+ {-0.0019534152166442065, 0.00082057965689633387},
+ {-0.0019534152166442065, -0.00082057965689633387}
+ }
+ },{
+ "gn_sinu",
+ "+proj=gn_sinu +a=6400000 +lat_1=0.5 +lat_2=2 +m=1 +n=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223385.13250469571, 111698.23644718733},
+ { 223385.13250469571, -111698.23644718733},
+ {-223385.13250469571, 111698.23644718733},
+ {-223385.13250469571, -111698.23644718733}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931098931057, 0.00089524655491012516},
+ { 0.0017904931098931057, -0.00089524655491012516},
+ {-0.0017904931098931057, 0.00089524655491012516},
+ {-0.0017904931098931057, -0.00089524655491012516}
+ }
+ },{
+ "gnom",
+ "+proj=gnom +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223492.92474718543, 111780.50920659291},
+ { 223492.92474718543, -111780.50920659291},
+ {-223492.92474718543, 111780.50920659291},
+ {-223492.92474718543, -111780.50920659291}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931092009798, 0.00089524655438192376},
+ { 0.0017904931092009798, -0.00089524655438192376},
+ {-0.0017904931092009798, 0.00089524655438192376},
+ {-0.0017904931092009798, -0.00089524655438192376}
+ }
+ },{
+ "goode",
+ "+proj=goode +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223368.11902663155, 111701.07212763709},
+ { 223368.11902663155, -111701.07212763709},
+ {-223368.11902663155, 111701.07212763709},
+ {-223368.11902663155, -111701.07212763709}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931100023887, 0.00089524655489191132},
+ { 0.0017904931100023887, -0.00089524655489191132},
+ {-0.0017904931100023887, 0.00089524655489191132},
+ {-0.0017904931100023887, -0.00089524655489191132}
+ }
+ },{
+ "gstmerc",
+ "+proj=gstmerc +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223413.46640632182, 111769.14504058557},
+ { 223413.46640632182, -111769.14504058668},
+ {-223413.46640632302, 111769.14504058557},
+ {-223413.46640632302, -111769.14504058668}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931097109673, 0.0008952465544509083},
+ { 0.0017904931097109673, -0.0008952465544509083},
+ {-0.0017904931097109673, 0.0008952465544509083},
+ {-0.0017904931097109673, -0.0008952465544509083}
+ }
+ },{
+ "hammer",
+ "+proj=hammer +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223373.78870324057, 111703.90739776699},
+ { 223373.78870324057, -111703.90739776699},
+ {-223373.78870324057, 111703.90739776699},
+ {-223373.78870324057, -111703.90739776699}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.001790493109965961, 0.00089524655487369749},
+ { 0.001790493109965961, -0.00089524655487369749},
+ {-0.001790493109965961, 0.00089524655487369749},
+ {-0.001790493109965961, -0.00089524655487369749}
+ }
+ },{
+ "hatano",
+ "+proj=hatano +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 189878.87894652804, 131409.8024406255 },
+ { 189881.08195244463, -131409.14227607418 },
+ {-189878.87894652804, 131409.8024406255 },
+ {-189881.08195244463, -131409.14227607418 }
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0021064624821817597, 0.00076095689425791926 },
+ { 0.0021064624821676096, -0.00076095777439265377 },
+ {-0.0021064624821817597, 0.00076095689425791926 },
+ {-0.0021064624821676096, -0.00076095777439265377 }
+ }
+ },{
+ "healpix_e",
+ "+proj=healpix +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222390.10394923863, 130406.58866448226},
+ { 222390.10394923863, -130406.58866448054},
+ {-222390.10394923863, 130406.58866448226},
+ {-222390.10394923863, -130406.58866448054}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017986411845524453, 0.00076679453057823619},
+ { 0.0017986411845524453, -0.00076679453057823619},
+ {-0.0017986411845524453, 0.00076679453057823619},
+ {-0.0017986411845524453, -0.00076679453057823619}
+ }
+ },{
+ "healpix_s",
+ "+proj=healpix +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.14425527418, 131588.04444199943},
+ { 223402.14425527418, -131588.04444199943},
+ {-223402.14425527418, 131588.04444199943},
+ {-223402.14425527418, -131588.04444199943}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931097838226, 0.00075990887733981202},
+ { 0.0017904931097838226, -0.00075990887733981202},
+ {-0.0017904931097838226, 0.00075990887733981202},
+ {-0.0017904931097838226, -0.00075990887733981202}
+ }
+ },{
+ "rhealpix_e",
+ "+proj=rhealpix +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222390.10394923863, 130406.58866448226},
+ { 222390.10394923863, -130406.58866448054},
+ {-222390.10394923863, 130406.58866448226},
+ {-222390.10394923863, -130406.58866448054}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017986411845524453, 0.00076679453057823619},
+ { 0.0017986411845524453, -0.00076679453057823619},
+ {-0.0017986411845524453, 0.00076679453057823619},
+ {-0.0017986411845524453, -0.00076679453057823619}
+ }
+ },{
+ "rhealpix_s",
+ "+proj=rhealpix +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.14425527418, 131588.04444199943},
+ { 223402.14425527418, -131588.04444199943},
+ {-223402.14425527418, 131588.04444199943},
+ {-223402.14425527418, -131588.04444199943}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931097838226, 0.00075990887733981202},
+ { 0.0017904931097838226, -0.00075990887733981202},
+ {-0.0017904931097838226, 0.00075990887733981202},
+ {-0.0017904931097838226, -0.00075990887733981202}
+ }
+ },
+ // helmert projection is not implemented in Boost.Geometry
+ // hgridshift projection is not implemented in Boost.Geometry
+ // horner projection is not implemented in Boost.Geometry
+ {
+ "igh",
+ "+proj=igh +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{ { 223878.49745627123, 111701.07212763709},
+ { 223708.37131305804, -111701.07212763709},
+ {-222857.74059699223, 111701.07212763709},
+ {-223027.86674020503, -111701.07212763709}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{ { 0.001790489447892545, 0.00089524655489191132},
+ { 0.0017904906685957927, -0.00089524655489191132},
+ {-0.001790496772112032, 0.00089524655489191132},
+ {-0.0017904955514087843, -0.00089524655489191132}
+ }
+ },{
+ "imw_p",
+ "+proj=imw_p +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222588.4411393762, 55321.128653809537},
+ { 222756.90637768712, -165827.58428832365},
+ {-222588.4411393762, 55321.128653809537},
+ {-222756.90637768712, -165827.58428832365}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966991379592214, 0.50090492361427374},
+ { 0.0017966979081574697, 0.49909507588689922},
+ {-0.0017966991379592214, 0.50090492361427374},
+ {-0.0017966979081574697, 0.49909507588689922}
+ }
+ },{
+ "isea",
+ "+proj=isea +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-1097074.9480224741, 3442909.3090371834},
+ {-1097074.9482647954, 3233611.7285857084},
+ {-1575486.3536415542, 3442168.3420281881},
+ {-1575486.353880283, 3234352.6955947056}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "krovak",
+ "+proj=krovak +ellps=GRS80 +no_defs",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-3196535.2325636409, -6617878.8675514441},
+ {-3260035.4405521089, -6898873.6148780314},
+ {-3756305.3288691747, -6478142.5615715114},
+ {-3831703.6585019818, -6759107.1701553948}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {24.836218918719162, 59.758403933233858},
+ {24.836315484509566, 59.756888425730189},
+ {24.830447747947495, 59.758403933233858},
+ {24.830351182157091, 59.756888425730189}
+ }
+ },{
+ "labrd",
+ "+proj=labrd +ellps=GRS80 +lon_0=0.5 +lat_0=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 166973.166090228391, -110536.912730266107},
+ { 166973.168287157256, -331761.993650884193},
+ {-278345.500519976194, -110469.032642031714},
+ {-278345.504185269645, -331829.870790275279}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.501797719349373672, 2.00090435742047923},
+ {0.501797717380853658, 1.99909564058898681},
+ {0.498202280650626328, 2.00090435742047923},
+ {0.498202282619146342, 1.99909564058898681}
+ }
+ },{
+ "laea_e",
+ "+proj=laea +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222602.471450095181, 110589.82722441027},
+ { 222602.471450095181, -110589.827224408786},
+ {-222602.471450095181, 110589.82722441027},
+ {-222602.471450095181, -110589.827224408786}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179663056847900867, 0.000904369475966495845},
+ { 0.00179663056847900867, -0.000904369475966495845},
+ {-0.00179663056847900867, 0.000904369475966495845},
+ {-0.00179663056847900867, -0.000904369475966495845}
+ }
+ },{
+ "laea_s",
+ "+proj=laea +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223365.281370124663, 111716.668072915665},
+ { 223365.281370124663, -111716.668072915665},
+ {-223365.281370124663, 111716.668072915665},
+ {-223365.281370124663, -111716.668072915665}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049311002060264, 0.000895246554791735271},
+ { 0.00179049311002060264, -0.000895246554791735271},
+ {-0.00179049311002060264, 0.000895246554791735271},
+ {-0.00179049311002060264, -0.000895246554791735271}
+ }
+ },{
+ "lagrng",
+ "+proj=lagrng +a=6400000 +W=2 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 111703.37591722561, 27929.8319080333386},
+ { 111699.122088816002, -83784.1780133577704},
+ {-111703.37591722561, 27929.8319080333386},
+ {-111699.122088816002, -83784.1780133577704}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "larr",
+ "+proj=larr +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223393.637624200899, 111707.215961255497},
+ {223393.637624200899, -111707.215961255497},
+ {-223393.637624200899, 111707.215961255497},
+ {-223393.637624200899, -111707.215961255497}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "lask",
+ "+proj=lask +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 217928.275907355128, 112144.32922014239},
+ { 217928.275907355128, -112144.32922014239},
+ {-217928.275907355128, 112144.32922014239},
+ {-217928.275907355128, -112144.32922014239}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "lcc",
+ "+proj=lcc +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222588.439735968423, 110660.533870799671},
+ { 222756.879700278747, -110532.797660827026},
+ {-222588.439735968423, 110660.533870799671},
+ {-222756.879700278747, -110532.797660827026}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179635940600536667, 0.000904232207322381741},
+ { 0.00179635817735249777, -0.000904233135128348995},
+ {-0.00179635940600536667, 0.000904232207322381741},
+ {-0.00179635817735249777, -0.000904233135128348995}
+ }
+ },{
+ "lcca",
+ "+proj=lcca +ellps=GRS80 +lat_0=1 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222605.285770237417, 67.8060072715846616},
+ { 222740.037637936533, -221125.539829601563},
+ {-222605.285770237417, 67.8060072715846616},
+ {-222740.037637936533, -221125.539829601563}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179690290525662526, 1.00090436621350798},
+ { 0.00179690192174008037, 0.999095632791497268},
+ {-0.00179690290525662526, 1.00090436621350798},
+ {-0.00179690192174008037, 0.999095632791497268}
+ }
+ },{
+ "loxim",
+ "+proj=loxim +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223382.295791338867, 55850.5360638185448},
+ { 223393.637462243292, -167551.608191455656},
+ {-223382.295791338867, 55850.5360638185448},
+ {-223393.637462243292, -167551.608191455656}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179056141104335601, 0.500895246554891926},
+ { 0.00179056116683692576, 0.499104753445108074},
+ {-0.00179056141104335601, 0.500895246554891926},
+ {-0.00179056116683692576, 0.499104753445108074}
+ }
+ },{
+ "lsat",
+ "+proj=lsat +ellps=GRS80 +lat_1=0.5 +lat_2=2 +lsat=1 +path=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {18241950.01455855, 9998256.83982293494},
+ {18746856.2533194572, 10215761.669925211},
+ {18565503.6836331636, 9085039.14672705345},
+ {19019696.9020289108, 9247763.0394328218}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {126.000423834530011, 0.00172378224025701425},
+ {126.002213738256714, 0.00188015467480917966},
+ {126.000734468914601, -0.00188015467480917966},
+ {126.002524372641304, -0.00172378224025701425}
+ }
+ }, {
+ "mbt_fps",
+ "+proj=mbt_fps +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 198798.176129849948, 125512.017254530627},
+ { 198798.176129849948, -125512.017254530627},
+ {-198798.176129849948, 125512.017254530627},
+ {-198798.176129849948, -125512.017254530627}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00201197086238270742, 0.000796711850174446003},
+ { 0.00201197086238270742, -0.000796711850174446003},
+ {-0.00201197086238270742, 0.000796711850174446003},
+ {-0.00201197086238270742, -0.000796711850174446003}
+ }
+ },{
+ "mbtfpp",
+ "+proj=mbtfpp +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {206804.786929820373, 120649.762565792524},
+ {206804.786929820373, -120649.762565792524},
+ {-206804.786929820373, 120649.762565792524},
+ {-206804.786929820373, -120649.762565792524}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.00193395359462902698, 0.00082883725477665357},
+ {0.00193395359462902698, -0.00082883725477665357},
+ {-0.00193395359462902698, 0.00082883725477665357},
+ {-0.00193395359462902698, -0.00082883725477665357}
+ }
+ },{
+ "mbtfpq",
+ "+proj=mbtfpq +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 209391.854738393013, 119161.040199054827},
+ { 209391.854738393013, -119161.040199054827},
+ {-209391.854738393013, 119161.040199054827},
+ {-209391.854738393013, -119161.040199054827}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00191010555824111571, 0.000839185447792341723},
+ { 0.00191010555824111571, -0.000839185447792341723},
+ {-0.00191010555824111571, 0.000839185447792341723},
+ {-0.00191010555824111571, -0.000839185447792341723}
+ }
+ },{
+ "merc_e",
+ "+proj=merc +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222638.981586547132, 110579.965218249708},
+ { 222638.981586547132, -110579.965218249112},
+ {-222638.981586547132, 110579.965218249708},
+ {-222638.981586547132, -110579.965218249112}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179663056823904264, 0.00090436947522799056},
+ { 0.00179663056823904264, -0.00090436947522799056},
+ {-0.00179663056823904264, 0.00090436947522799056},
+ {-0.00179663056823904264, -0.00090436947522799056}
+ }
+ },{
+ "merc_s",
+ "+proj=merc +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.144255274179, 111706.743574944077},
+ { 223402.144255274179, -111706.743574944485},
+ {-223402.144255274179, 111706.743574944077},
+ {-223402.144255274179, -111706.743574944485}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310978382265, 0.000895246554845297135},
+ { 0.00179049310978382265, -0.000895246554858019272},
+ {-0.00179049310978382265, 0.000895246554845297135},
+ {-0.00179049310978382265, -0.000895246554858019272}
+ }
+ },{
+ "mill",
+ "+proj=mill +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223402.144255274179, 111704.701754393827},
+ { 223402.144255274179, -111704.701754396243},
+ {-223402.144255274179, 111704.701754393827},
+ {-223402.144255274179, -111704.701754396243}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310978382265, 0.000895246554873922024},
+ { 0.00179049310978382265, -0.000895246554873922024},
+ {-0.00179049310978382265, 0.000895246554873922024},
+ {-0.00179049310978382265, -0.000895246554873922024}
+ }
+ },
+ // the following projections are not implemented in Boost.Geometry
+ /*{
+ "misrsom_e",
+ "+proj=misrsom +ellps=GRS80 +lat_1=0.5 +lat_2=2 +path=1",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {18556630.3683698252, 9533394.6753112711},
+ {19041866.0067297369, 9707182.17532352544},
+ {18816810.1301847994, 8647669.64980295487},
+ {19252610.7845367305, 8778164.08580140397}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {127.759503987730625, 0.00173515039622462014},
+ {127.761295471077958, 0.00187196632421706517},
+ {127.759775773557251, -0.00187196632421891525},
+ {127.76156725690457, -0.00173515039622462014}
+ }
+ },{
+ "misrsom_s",
+ "+proj=misrsom +R=6400000 +lat_1=0.5 +lat_2=2 +path=1",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {18641249.2791703865, 9563342.53233416565},
+ {19130982.4615812786, 9739539.59350463562},
+ {18903483.5150115378, 8675064.50061797537},
+ {19343388.3998006098, 8807471.90406848863}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {127.75950514818588, 0.00171623111593511971},
+ {127.761290323778738, 0.00185412132880796244},
+ {127.759780920856471, -0.00185412132880796244},
+ {127.761566096449329, -0.00171623111593511971}
+ }
+ },{
+ "mil_os",
+ "+proj=mil_os +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-1908527.94959420455, -1726237.4730614475},
+ {-1916673.02291848511, -1943133.88812552323},
+ {-2344429.41208962305, -1706258.05121891224},
+ {-2354637.83553299867, -1926468.60513541684}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {20.0020363939492398, 18.0009683469140498},
+ {20.0020363715837419, 17.999031631815086},
+ {19.9979636060507602, 18.0009683469140498},
+ {19.9979636284162581, 17.999031631815086}
+ }
+ },{
+ "lee_os",
+ "+proj=lee_os +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-25564478.9526050538, 154490848.8286255},
+ { 30115393.9385746419, 125193997.439701974},
+ {-31039340.5921660066, 57678685.0448915437},
+ {-3088419.93942357088, 58150091.0991110131}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-164.997479457813824, -9.99875886103541411},
+ {-164.997479438558884, -10.0012411200022751},
+ {-165.002520542186289, -9.99875886103545142},
+ {-165.002520561440946, -10.0012411200022999}
+ }
+ },{
+ "gs48",
+ "+proj=gs48 +R=6370997",
+ // All latitudes and longitudes within the continental US
+ {
+ { -119.0, 40.0},
+ { -70.0, 64.0},
+ { -80.0, 25.0},
+ { -95.0, 35.0}
+ },{
+ { -1923908.446529345820, 355874.658944479190},
+ { 1354020.375109298155, 3040846.007866524626},
+ { 1625139.160484319553, -1413614.894029108109},
+ { 90241.658071457961, -439595.048485902138}
+ },{
+ { -1923000.0, 355000.0},
+ { 1354000.0, 3040000.0},
+ { 1625000.0, -1413000.0},
+ { 90000.0, -439000.0}
+ },{
+ {-118.987112613284, 39.994449789388},
+ { -70.005208999424, 63.993387835525},
+ { -80.000346610440, 25.005602546594},
+ { -95.002606473071, 35.005424705030}
+ }
+ },{
+ "alsk_e",
+ "+proj=alsk +ellps=clrk66",
+ {
+ {-160.0, 55.0},
+ {-160.0, 70.0},
+ {-145.0, 70.0},
+ {-145.0, 60.0}
+ },{
+ {-513253.146950842060, -968928.031867943470},
+ {-305001.133897637190, 687494.464958650530},
+ {266454.305088600490, 683423.477493030950},
+ {389141.322439243960, -423913.251230396680}
+ },{
+ {-500000.0, -950000.0},
+ {-305000.0, 700000.0},
+ { 250000.0, 700000.0},
+ { 400000.0, -400000.0}
+ },{
+ {-159.830804302926, 55.183195262220},
+ {-160.042203155537, 70.111086864056},
+ {-145.381043551466, 70.163900908411},
+ {-144.758985461448, 60.202929200739}
+ }
+ },{
+ "alsk_s",
+ "+proj=alsk +R=6370997",
+ {
+ {-160.0, 55.0},
+ {-160.0, 70.0},
+ {-145.0, 70.0},
+ {-145.0, 60.0}
+ },{
+ {-511510.319410844070, -967150.991676078060},
+ {-303744.771290368980, 685439.745941123230},
+ {265354.974019662940, 681386.892874573010},
+ {387711.995394026630, -422980.685505462640}
+ },{
+ {-500000.0, -950000.0},
+ {-305000.0, 700000.0},
+ { 250000.0, 700000.0},
+ { 400000.0, -400000.0}
+ },{
+ {-159.854014457557, 55.165653849074},
+ {-160.082332371601, 70.128307617632},
+ {-145.347827407243, 70.181566919011},
+ {-144.734239827146, 60.193564732505}
+ }
+ },{
+ "gs50_e",
+ "+proj=gs50 +ellps=clrk66",
+ {
+ {-160.0, 65.0},
+ {-130.0, 45.0},
+ { -65.0, 45.0},
+ { -80.0, 36.0}
+ },{
+ {-1874628.5377402329, 2660907.942291015300},
+ { -771831.51885333552, 48465.166491304852},
+ { 4030931.8339815089, 1323687.864777399200},
+ { 3450764.2615361013, -175619.041820732440}
+ },{
+ {-1800000.0, 2600000.0},
+ { -800000.0, 500000.0},
+ { 4000000.0, 1300000.0},
+ { 3900000.0, -170000.0}
+ },{
+ {-157.989284999679, 64.851559609698},
+ {-131.171390466814, 49.084969745967},
+ { -65.491568685301, 44.992837923774},
+ { -75.550660091101, 34.191114075743}
+ }
+ },{
+ "gs50_s",
+ "+proj=gs50 +R=6370997",
+ {
+ {-160.0, 65.0},
+ {-130.0, 45.0},
+ { -65.0, 45.0},
+ { -80.0, 36.0}
+ },{
+ {-1867268.2534600089, 2656506.230401823300},
+ { -769572.18967299373, 48324.312440863941},
+ { 4019393.068680791200, 1320191.309350289200},
+ { 3442685.615172345700, -178760.423489428680}
+ },{
+ {-1800000.0, 2600000.0},
+ { -800000.0, 500000.0},
+ { 4000000.0, 1300000.0},
+ { 3900000.0, -170000.0}
+ },{
+ {-158.163295044933, 64.854288364994},
+ {-131.206816959506, 49.082915350974},
+ { -65.348945220767, 44.957292681774},
+ { -75.446820242089, 34.185406225616}
+ }
+ },*/
+ {
+ "moll",
+ "+proj=moll +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {201113.698641813244, 124066.283433859542},
+ {201113.698641813244, -124066.283433859542},
+ {-201113.698641813244, 124066.283433859542},
+ {-201113.698641813244, -124066.283433859542}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.00198873782220854774, 0.000806005080362811612},
+ {0.00198873782220854774, -0.000806005080362811612},
+ {-0.00198873782220854774, 0.000806005080362811612},
+ {-0.00198873782220854774, -0.000806005080362811612}
+ }
+ },{
+ "wag4",
+ "+proj=wag4 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 192801.218662384286, 129416.216394802992},
+ { 192801.218662384286, -129416.216394802992},
+ {-192801.218662384286, 129416.216394802992},
+ {-192801.218662384286, -129416.216394802992}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00207450259783523421, 0.000772682950537716476},
+ { 0.00207450259783523421, -0.000772682950537716476},
+ {-0.00207450259783523421, 0.000772682950537716476},
+ {-0.00207450259783523421, -0.000772682950537716476}
+ }
+ },{
+ "wag5",
+ "+proj=wag5 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 203227.05192532466, 138651.631442713202},
+ { 203227.05192532466, -138651.631442713202},
+ {-203227.05192532466, 138651.631442713202},
+ {-203227.05192532466, -138651.631442713202}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00196807227086416396, 0.00072121615041701424},
+ { 0.00196807227086416396, -0.00072121615041701424},
+ {-0.00196807227086416396, 0.00072121615041701424},
+ {-0.00196807227086416396, -0.00072121615041701424}
+ }
+ },{
+ "natearth",
+ "+proj=natearth +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 194507.265257889288, 112508.737358294515},
+ { 194507.265257889288, -112508.737358294515},
+ {-194507.265257889288, 112508.737358294515},
+ {-194507.265257889288, -112508.737358294515}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00205638349586440223, 0.000888823913291242177},
+ { 0.00205638349586440223, -0.000888823913291242177},
+ {-0.00205638349586440223, 0.000888823913291242177},
+ {-0.00205638349586440223, -0.000888823913291242177}
+ }
+ },
+ // the following projection is not implemented in Boost.Geometry
+ /*{
+ "natearth2",
+ "+proj=natearth2 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 189255.172934730799, 113022.495810907014},
+ { 189255.172934730799, -113022.495810907014},
+ {-189255.172934730799, 113022.495810907014},
+ {-189255.172934730799, -113022.495810907014}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00211344929691056112, 0.000884779612080993237},
+ { 0.00211344929691056112, -0.000884779612080993237},
+ {-0.00211344929691056112, 0.000884779612080993237},
+ {-0.00211344929691056112, -0.000884779612080993237}
+ }
+ },*/
+ {
+ "nell",
+ "+proj=nell +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223385.132504695706, 111698.23644718733},
+ { 223385.132504695706, -111698.23644718733},
+ {-223385.132504695706, 111698.23644718733},
+ {-223385.132504695706, -111698.23644718733}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310989310567, 0.000895246554910125161},
+ { 0.00179049310989310567, -0.000895246554910125161},
+ {-0.00179049310989310567, 0.000895246554910125161},
+ {-0.00179049310989310567, -0.000895246554910125161}
+ }
+ },{
+ "nell_h",
+ "+proj=nell_h +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223385.131640952837, 111698.236533561678},
+ { 223385.131640952837, -111698.236533561678},
+ {-223385.131640952837, 111698.236533561678},
+ {-223385.131640952837, -111698.236533561678}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310989310567, 0.000895246554910125378},
+ { 0.00179049310989310567, -0.000895246554910125378},
+ {-0.00179049310989310567, 0.000895246554910125378},
+ {-0.00179049310989310567, -0.000895246554910125378}
+ }
+ },{
+ "nicol",
+ "+proj=nicol +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223374.561814139714, 111732.553988545071},
+ { 223374.561814139714, -111732.553988545071},
+ {-223374.561814139714, 111732.553988545071},
+ {-223374.561814139714, -111732.553988545071}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "nsper",
+ "+proj=nsper +a=6400000 +h=1000000",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222239.816114099842, 111153.763991924759},
+ { 222239.816114099842, -111153.763991924759},
+ {-222239.816114099842, 111153.763991924759},
+ {-222239.816114099842, -111153.763991924759}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049311728792437, 0.000895246558425396135},
+ { 0.00179049311728792437, -0.000895246558425396135},
+ {-0.00179049311728792437, 0.000895246558425396135},
+ {-0.00179049311728792437, -0.000895246558425396135}
+ }
+ },{
+ "tpers",
+ "+proj=tpers +a=6400000 +h=1000000 +azi=20",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 170820.288955531199, 180460.865555804776},
+ { 246853.941538942483, -28439.8780357754222},
+ {-246853.941538942483, 28439.8780357754222},
+ {-170820.288955531199, -180460.865555804776}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00198870552603137678, 0.000228871872278689991},
+ { 0.00137632081376749859, -0.00145364129728205432},
+ {-0.00137632081376749859, 0.00145364129728205432},
+ {-0.00198870552603137678, -0.000228871872278689991}
+ }
+ },{
+ "nzmg",
+ "+proj=nzmg +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {3352675144.74742508, -7043205391.10024357},
+ {3691989502.77930641, -6729069415.33210468},
+ {4099000768.45323849, -7863208779.66724873},
+ {4466166927.36997604, -7502531736.62860489}
+ },{
+ { 200000, 100000},
+ { 200000,-100000},
+ {-200000, 100000},
+ {-200000,-100000}
+ },{
+ {175.48208682711271, -69.4226921826331846},
+ {175.756819472543611, -69.5335710883796168},
+ {134.605119233460016, -61.4599957106629091},
+ {134.333684315954827, -61.6215536756024349}
+ }
+ },{
+ "ob_tran",
+ "+proj=ob_tran +a=6400000 +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-2.6856872138416592, 1.2374302350496296},
+ {-2.6954069748943286, 1.2026833954513816},
+ {-2.8993663925401947, 1.2374302350496296},
+ {-2.8896466314875244, 1.2026833954513816}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 121.5518748407577, -2.5361001573966084},
+ { 63.261184340201858, 17.585319578673531},
+ {-141.10073322351622, 26.091712304855108},
+ {-65.862385598848391, 51.830295078417215}
+ }
+ },{
+ "ocea",
+ "+proj=ocea +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {19994423.837934087962, 223322.760576727800},
+ {20217962.128015257418, 223322.760576729401},
+ {19994423.837934091687, -223322.760576726549},
+ {20217962.128015264869, -223322.760576724948},
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 179.999104753445, 0.001790493110},
+ {-179.999104753445, 0.001790493110},
+ { 179.999104753445, -0.001790493110},
+ {-179.999104753445, -0.001790493110}
+ }
+ },{
+ "oea",
+ "+proj=oea +a=6400000 +lat_1=0.5 +lat_2=2 +n=1 +m=2 +theta=3",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 228926.872097864107, 99870.4884300760023},
+ { 217242.584036940476, -123247.885607474513},
+ {-217242.584036940476, 123247.885607474556},
+ {-228926.872097864078, -99870.4884300760168}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017411857167771369, 0.000987726819566195693},
+ { 0.00183489288577854998, -0.000800312481495174641},
+ {-0.00183489288577854954, 0.000800312481495174966},
+ {-0.00174118571677713712, -0.000987726819566195043}
+ }
+ },{
+ "omerc",
+ "+proj=omerc +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222650.796885261341, 110642.229314983808},
+ { 222650.796885261341, -110642.229314983808},
+ {-222650.796885261545, 110642.229314983808},
+ {-222650.796885261545, -110642.229314983808}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179663056816996357, 0.000904369474808157338},
+ { 0.00179663056816996357, -0.000904369474820879583},
+ {-0.0017966305681604536, 0.000904369474808157338},
+ {-0.0017966305681604536, -0.000904369474820879583}
+ }
+ },{
+ "ortho",
+ "+proj=ortho +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223322.76057672748, 111695.401198614476},
+ { 223322.76057672748, -111695.401198614476},
+ {-223322.76057672748, 111695.401198614476},
+ {-223322.76057672748, -111695.401198614476}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931102938101, 0.000895246554928338998},
+ { 0.0017904931102938101, -0.000895246554928338998},
+ {-0.0017904931102938101, 0.000895246554928338998},
+ {-0.0017904931102938101, -0.000895246554928338998}
+ }
+ },
+ // patterson projection is not implemented in Boost.Geometry
+ /*{
+ "patterson",
+ "+proj=patterson +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223402.144255274179, 113354.250397779804},
+ {223402.144255274179, -113354.250397779804},
+ {-223402.144255274179, 113354.250397779804},
+ {-223402.144255274179, -113354.250397779804}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.00179049310978382265, 0.000882190140807953657},
+ {0.00179049310978382265, -0.000882190140807953657},
+ {-0.00179049310978382265, 0.000882190140807953657},
+ {-0.00179049310978382265, -0.000882190140807953657}
+ }
+ },*/
+ // pipeline projection is not implemented in Boost.Geometry
+ // and tests are implemented differently
+ {
+ "poly_e",
+ "+proj=poly +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222605.285770237475, 110642.194561440483},
+ { 222605.285770237475, -110642.194561440483},
+ {-222605.285770237475, 110642.194561440483},
+ {-222605.285770237475, -110642.194561440483}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179663056846135222, 0.000904369476631838518},
+ { 0.00179663056846135222, -0.000904369476631838518},
+ {-0.00179663056846135222, 0.000904369476631838518},
+ {-0.00179663056846135222, -0.000904369476631838518}
+ }
+ },{
+ "poly_s",
+ "+proj=poly +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223368.105210218986, 111769.110491224754},
+ { 223368.105210218986, -111769.110491224754},
+ {-223368.105210218986, 111769.110491224754},
+ {-223368.105210218986, -111769.110491224754}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931100023887, 0.000895246554454779222},
+ { 0.0017904931100023887, -0.000895246554454779222},
+ {-0.0017904931100023887, 0.000895246554454779222},
+ {-0.0017904931100023887, -0.000895246554454779222}
+ }
+ },{
+ "putp2",
+ "+proj=putp2 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 211638.039634339279, 117895.033043379764},
+ { 211638.039634339279, -117895.033043379764},
+ {-211638.039634339279, 117895.033043379764},
+ {-211638.039634339279, -117895.033043379764}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00188980221640386672, 0.000848201580276863377},
+ { 0.00188980221640386672, -0.000848201580276863377},
+ {-0.00188980221640386672, 0.000848201580276863377},
+ {-0.00188980221640386672, -0.000848201580276863377}
+ }
+ },{
+ "putp3",
+ "+proj=putp3 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 178227.115507793525, 89124.5607860879827},
+ { 178227.115507793525, -89124.5607860879827},
+ {-178227.115507793525, 89124.5607860879827},
+ {-178227.115507793525, -89124.5607860879827}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00224405032986489889, 0.00112202516475805899},
+ { 0.00224405032986489889, -0.00112202516475805899},
+ {-0.00224405032986489889, 0.00112202516475805899},
+ {-0.00224405032986489889, -0.00112202516475805899}
+ }
+ },{
+ "putp3p",
+ "+proj=putp3p +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 178238.118539984745, 89124.5607860879827},
+ { 178238.118539984745, -89124.5607860879827},
+ {-178238.118539984745, 89124.5607860879827},
+ {-178238.118539984745, -89124.5607860879827}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00224405032969050844, 0.00112202516475805899},
+ { 0.00224405032969050844, -0.00112202516475805899},
+ {-0.00224405032969050844, 0.00112202516475805899},
+ {-0.00224405032969050844, -0.00112202516475805899}
+ }
+ },{
+ "putp4p",
+ "+proj=putp4p +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 195241.47734938623, 127796.782307926231},
+ { 195241.47734938623, -127796.782307926231},
+ {-195241.47734938623, 127796.782307926231},
+ {-195241.47734938623, -127796.782307926231}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00204852830860296001, 0.000782480174932193733},
+ { 0.00204852830860296001, -0.000782480174932193733},
+ {-0.00204852830860296001, 0.000782480174932193733},
+ {-0.00204852830860296001, -0.000782480174932193733}
+ }
+ },{
+ "weren",
+ "+proj=weren +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223378.515757633519, 146214.093042288267},
+ { 223378.515757633519, -146214.093042288267},
+ {-223378.515757633519, 146214.093042288267},
+ {-223378.515757633519, -146214.093042288267}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00179049310987240413, 0.000683917989676492265},
+ { 0.00179049310987240413, -0.000683917989676492265},
+ {-0.00179049310987240413, 0.000683917989676492265},
+ {-0.00179049310987240413, -0.000683917989676492265}
+ }
+ },{
+ "putp5",
+ "+proj=putp5 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 226367.21338056153, 113204.56855847509},
+ { 226367.21338056153, -113204.56855847509},
+ {-226367.21338056153, 113204.56855847509},
+ {-226367.21338056153, -113204.56855847509}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00176671315102969553, 0.000883356575387199546},
+ { 0.00176671315102969553, -0.000883356575387199546},
+ {-0.00176671315102969553, 0.000883356575387199546},
+ {-0.00176671315102969553, -0.000883356575387199546}
+ }
+ },{
+ "putp5p",
+ "+proj=putp5p +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 226388.175248755841, 113204.56855847509},
+ { 226388.175248755841, -113204.56855847509},
+ {-226388.175248755841, 113204.56855847509},
+ {-226388.175248755841, -113204.56855847509}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00176671315090204742, 0.000883356575387199546},
+ { 0.00176671315090204742, -0.000883356575387199546},
+ {-0.00176671315090204742, 0.000883356575387199546},
+ {-0.00176671315090204742, -0.000883356575387199546}
+ }
+ },{
+ "putp6",
+ "+proj=putp6 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 226369.395133402577, 110218.523796520662},
+ { 226369.395133402577, -110218.523796520749},
+ {-226369.395133402577, 110218.523796520662},
+ {-226369.395133402577, -110218.523796520749}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00176671315102969921, 0.000907295534210503544},
+ { 0.00176671315102969921, -0.000907295534205924308},
+ {-0.00176671315102969921, 0.000907295534210503544},
+ {-0.00176671315102969921, -0.000907295534205924308}
+ }
+ },{
+ "putp6p",
+ "+proj=putp6p +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 198034.195132195076, 125989.475461323193},
+ { 198034.195132195076, -125989.475461323193},
+ {-198034.195132195076, 125989.475461323193},
+ {-198034.195132195076, -125989.475461323193}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00201955053120177067, 0.000793716441164738612},
+ { 0.00201955053120177067, -0.000793716441164738612},
+ {-0.00201955053120177067, 0.000793716441164738612},
+ {-0.00201955053120177067, -0.000793716441164738612}
+ }
+ },{
+ "qsc_e",
+ "+proj=qsc +ellps=GRS80 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 304638.450843852363, 164123.870923793991},
+ { 304638.450843852363, -164123.870923793991},
+ {-304638.450843852363, 164123.870923793962},
+ {-304638.450843852421, -164123.870923793904}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00132134098471627126, 0.000610652900922527926},
+ { 0.00132134098471627126, -0.000610652900922527926},
+ {-0.00132134098471627126, 0.000610652900922527926},
+ {-0.00132134098471627126, -0.000610652900922527926}
+ }
+ },{
+ "qsc_s",
+ "+proj=qsc +R=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 305863.792402890511, 165827.722754715243},
+ { 305863.792402890511, -165827.722754715243},
+ {-305863.792402890511, 165827.722754715243},
+ {-305863.792402890569, -165827.722754715156}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.00131682718763827234, 0.000604493198178676161},
+ { 0.00131682718763827234, -0.000604493198178676161},
+ {-0.00131682718763827234, 0.000604493198178676161},
+ {-0.00131682718763827234, -0.000604493198178676161}
+ }
+ },{
+ "robin",
+ "+proj=robin +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{ // original expected different because float coefficients are defined
+ /*{ 189588.423282507836, 107318.530350702888},
+ { 189588.423282507836, -107318.530350702888},
+ {-189588.423282507836, 107318.530350702888},
+ {-189588.423282507836, -107318.530350702888}*/
+ { 189588.4232821252, 107318.5272684303},
+ { 189588.4232821252, -107318.5272684303},
+ {-189588.4232821252, 107318.5272684303},
+ {-189588.4232821252, -107318.5272684303}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.002109689065506131, 0.000931805533547745983},
+ { 0.002109689065506131, -0.000931805533547745983},
+ {-0.002109689065506131, 0.000931805533547745983},
+ {-0.002109689065506131, -0.000931805533547745983}
+ }
+ },{
+ "rpoly",
+ "+proj=rpoly +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223368.09830201423, 111769.110486991223},
+ { 223368.09830201423, -111769.110486991223},
+ {-223368.09830201423, 111769.110486991223},
+ {-223368.09830201423, -111769.110486991223}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },
+ // sch projection not implemented in Boost.Geometry
+ // and the tests are not implemented in Proj4 anyway
+ {
+ "euler_e",
+ "+proj=euler +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222597.63465910763, 111404.24054991946},
+ {222767.16563187627, -111234.6764910177},
+ {-222597.63465910763, 111404.24054991946},
+ {-222767.16563187627, -111234.6764910177}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017962807023075235, 0.0008983146697688839},
+ {0.0017962794738334226, -0.00089831589842987965},
+ {-0.0017962807023075235, 0.0008983146697688839},
+ {-0.0017962794738334226, -0.00089831589842987965}
+ }
+ },{
+ "euler_s",
+ "+proj=euler +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223360.65559869423, 111786.11238979101},
+ {223530.76769031584, -111615.96709862351},
+ {-223360.65559869423, 111786.11238979101},
+ {-223530.76769031584, -111615.96709862351}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017901444369360026, 0.00089524594522202015},
+ {0.001790143216840731, -0.00089524716533368484},
+ {-0.0017901444369360026, 0.00089524594522202015},
+ {-0.001790143216840731, -0.00089524716533368484}
+ }
+ },{
+ "murd1_e",
+ "+proj=murd1 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222600.81347355421, 111404.24418054636},
+ {222770.3492878644, -111234.6728566746},
+ {-222600.81347355421, 111404.24418054636},
+ {-222770.3492878644, -111234.6728566746}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017962550410516366, 0.0008983146697688839},
+ {0.0017962538125775522, -0.00089831589842987965},
+ {-0.0017962550410516366, 0.0008983146697688839},
+ {-0.0017962538125775522, -0.00089831589842987965}
+ }
+ },{
+ "murd1_s",
+ "+proj=murd1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223363.84530949194, 111786.11603286299},
+ {223533.96225925098, -111615.96345182261},
+ {-223363.84530949194, 111786.11603286299},
+ {-223533.96225925098, -111615.96345182261}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017901188633413715, 0.00089524594522202015},
+ {0.0017901176432461162, -0.00089524716492657387},
+ {-0.0017901188633413715, 0.00089524594522202015},
+ {-0.0017901176432461162, -0.00089524716492657387}
+ }
+ },{
+ "murd2_e",
+ "+proj=murd2 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222588.09975123021, 111426.14002741246},
+ {222757.72626701824, -111341.43131750476},
+ {-222588.09975123021, 111426.14002741246},
+ {-222757.72626701824, -111341.43131750476}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017963574947305447, 0.00089788747830845382},
+ {0.0017963562661689487, -0.00089788809264252983},
+ {-0.0017963574947305447, 0.00089788747830845382},
+ {-0.0017963562661689487, -0.00089788809264252983}
+ }
+ },{
+ "murd2_s",
+ "+proj=murd2 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223351.08800702673, 111808.08693438848},
+ {223521.2959691704, -111723.08785967289},
+ {-223351.08800702673, 111808.08693438848},
+ {-223521.2959691704, -111723.08785967289}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017902209670287586, 0.00089482021163422854},
+ {0.0017902197468465887, -0.00089482082161134206},
+ {-0.0017902209670287586, 0.00089482021163422854},
+ {-0.0017902197468465887, -0.00089482082161134206}
+ }
+ },{
+ "murd3_e",
+ "+proj=murd3 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222600.81407757697, 111404.24660137216},
+ {222770.35473389886, -111234.67043217793},
+ {-222600.81407757697, 111404.24660137216},
+ {-222770.35473389886, -111234.67043217793}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017962550166583809, 0.0008983146697688839},
+ {0.0017962537881492445, -0.00089831589842987965},
+ {-0.0017962550166583809, 0.0008983146697688839},
+ {-0.0017962537881492445, -0.00089831589842987965}
+ }
+ },{
+ "murd3_s",
+ "+proj=murd3 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223363.84591558515, 111786.11846198692},
+ {223533.96772395336, -111615.96101901523},
+ {-223363.84591558515, 111786.11846198692},
+ {-223533.96772395336, -111615.96101901523}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017901188390313859, 0.00089524594522202015},
+ {0.0017901176189013177, -0.00089524716533368484},
+ {-0.0017901188390313859, 0.00089524594522202015},
+ {-0.0017901176189013177, -0.00089524716533368484}
+ }
+ },{
+ "pconic_e",
+ "+proj=pconic +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222588.09884161691, 111416.60477006658},
+ {222757.71809109033, -111331.88153107995},
+ {-222588.09884161691, 111416.60477006658},
+ {-222757.71809109033, -111331.88153107995}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017963575313784969, 0.0008979644089172499},
+ {0.0017963563027642206, -0.00089796502355327969},
+ {-0.0017963575313784969, 0.0008979644089172499},
+ {-0.0017963563027642206, -0.00089796502355327969}
+ }
+ },{
+ "pconic_s",
+ "+proj=pconic +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223351.08709429545, 111798.5189920546},
+ {223521.28776521701, -111713.50533845725},
+ {-223351.08709429545, 111798.5189920546},
+ {-223521.28776521701, -111713.50533845725}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017902210035514285, 0.0008948968793741558},
+ {0.0017902197833169374, -0.00089489748965381963},
+ {-0.0017902210035514285, 0.0008948968793741558},
+ {-0.0017902197833169374, -0.00089489748965381963}
+ }
+ },{
+ "tissot_e",
+ "+proj=tissot +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222641.07869963095, 54347.828487281469},
+ {222810.61451394114, -168291.08854993948},
+ {-222641.07869963095, 54347.828487281469},
+ {-222810.61451394114, -168291.08854993948}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017962807107425871, 0.51344495513064536},
+ {0.0017962794822333915, 0.51164832456244658},
+ {-0.0017962807107425871, 0.51344495513064536},
+ {-0.0017962794822333915, 0.51164832456244658}
+ }
+ },{
+ "tissot_s",
+ "+proj=tissot +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223404.24855684943, 54534.122161157939},
+ {223574.36550660848, -168867.95732352766},
+ {-223404.24855684943, 54534.122161157939},
+ {-223574.36550660848, -168867.95732352766}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017901444453421915, 0.51344188640609856},
+ {0.001790143225212064, 0.51165139329554277},
+ {-0.0017901444453421915, 0.51344188640609856},
+ {-0.001790143225212064, 0.51165139329554277}
+ }
+ },{
+ "vitk1_e",
+ "+proj=vitk1 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222607.17121145778, 111404.25144243463},
+ {222776.71670959776, -111234.66558744459},
+ {-222607.17121145778, 111404.25144243463},
+ {-222776.71670959776, -111234.66558744459}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017962037198570686, 0.0008983146697688839},
+ {0.0017962024913830157, -0.00089831589842987965},
+ {-0.0017962037198570686, 0.0008983146697688839},
+ {-0.0017962024913830157, -0.00089831589842987965}
+ }
+ },{
+ "vitk1_s",
+ "+proj=vitk1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223370.22484047143, 111786.12331964359},
+ {223540.3515072545, -111615.9561576751},
+ {-223370.22484047143, 111786.12331964359},
+ {-223540.3515072545, -111615.9561576751}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017900677174648159, 0.00089524594522202015},
+ {0.0017900664973695916, -0.00089524716533368484},
+ {-0.0017900677174648159, 0.00089524594522202015},
+ {-0.0017900664973695916, -0.00089524716533368484}
+ }
+ },{
+ "somerc_e",
+ "+proj=somerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222638.98158654713, 110579.96521824898},
+ {222638.98158654713, -110579.96521825089},
+ {-222638.98158654713, 110579.96521824898},
+ {-222638.98158654713, -110579.96521825089}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017966305682390426, 0.00090436947704129484},
+ {0.0017966305682390426, -0.00090436947704377105},
+ {-0.0017966305682390426, 0.00090436947704129484},
+ {-0.0017966305682390426, -0.00090436947704377105}
+ }
+ },{
+ "somerc_s",
+ "+proj=somerc +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223402.14425527418, 111706.74357494408},
+ {223402.14425527418, -111706.74357494518},
+ {-223402.14425527418, 111706.74357494408},
+ {-223402.14425527418, -111706.74357494518}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904931097838226, 0.00089524655485801927},
+ {0.0017904931097838226, -0.00089524655484529714},
+ {-0.0017904931097838226, 0.00089524655485801927},
+ {-0.0017904931097838226, -0.00089524655484529714}
+ }
+ },{
+ "stere_e",
+ "+proj=stere +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222644.8545501172, 110610.8834741739},
+ { 222644.8545501172, -110610.8834741739},
+ {-222644.8545501172, 110610.8834741739},
+ {-222644.8545501172, -110610.8834741739}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966305682022392, 0.00090436947502443507},
+ { 0.0017966305682022392, -0.00090436947502443507},
+ {-0.0017966305682022392, 0.00090436947502443507},
+ {-0.0017966305682022392, -0.00090436947502443507}
+ }
+ },{
+ "stere_s",
+ "+proj=stere +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223407.81025950745, 111737.938996443},
+ { 223407.81025950745, -111737.938996443},
+ {-223407.81025950745, 111737.938996443},
+ {-223407.81025950745, -111737.938996443}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.001790493109747395, 0.00089524655465513144},
+ { 0.001790493109747395, -0.00089524655465513144},
+ {-0.001790493109747395, 0.00089524655465513144},
+ {-0.001790493109747395, -0.00089524655465513144}
+ }
+ },{
+ "ups",
+ "+proj=ups +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {2433455.5634384668, -10412543.301512826},
+ {2448749.1185681992, -10850493.419804076},
+ {1566544.4365615332, -10412543.301512826},
+ {1551250.8814318008, -10850493.419804076}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-44.998567498074834, 64.9182362867341},
+ {-44.995702709112308, 64.917020250675748},
+ {-45.004297076028529, 64.915804280954518},
+ {-45.001432287066002, 64.914588377560719}
+ }
+ },{
+ "sterea_e",
+ "+proj=sterea +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222644.89410919772, 110611.09187173686},
+ { 222644.89410919772, -110611.09187173827},
+ {-222644.89410919772, 110611.09187173686},
+ {-222644.89410919772, -110611.09187173827}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966305682019911, 0.00090436947683099009},
+ { 0.0017966305682019911, -0.00090436947684371233},
+ {-0.0017966305682019911, 0.00090436947683099009},
+ {-0.0017966305682019911, -0.00090436947684371233}
+ }
+ },{
+ "sterea_s",
+ "+proj=sterea +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223407.81025950745, 111737.93899644315},
+ { 223407.81025950745, -111737.93899644315},
+ {-223407.81025950745, 111737.93899644315},
+ {-223407.81025950745, -111737.93899644315}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.001790493109747395, 0.00089524655465446378},
+ { 0.001790493109747395, -0.00089524655465446378},
+ {-0.001790493109747395, 0.00089524655465446378},
+ {-0.001790493109747395, -0.00089524655465446378}
+ }
+ },{
+ "fouc_e",
+ "+proj=fouc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222588.12067589167, 111322.31670069379},
+ {222588.12067589167, -111322.31670069379},
+ {-222588.12067589167, 111322.31670069379},
+ {-222588.12067589167, -111322.31670069379}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017966305685702751, 0.00089831528410111959},
+ {0.0017966305685702751, -0.00089831528410111959},
+ {-0.0017966305685702751, 0.00089831528410111959},
+ {-0.0017966305685702751, -0.00089831528410111959}
+ }
+ },{
+ "fouc_s",
+ "+proj=fouc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223351.10900341379, 111703.9077217125},
+ {223351.10900341379, -111703.9077217125},
+ {-223351.10900341379, 111703.9077217125},
+ {-223351.10900341379, -111703.9077217125}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904931101116717, 0.00089524655487369749},
+ {0.0017904931101116717, -0.00089524655487369749},
+ {-0.0017904931101116717, 0.00089524655487369749},
+ {-0.0017904931101116717, -0.00089524655487369749}
+ }
+ },{
+ "kav5_e",
+ "+proj=kav5 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {200360.90530882866, 123685.08247699818},
+ {200360.90530882866, -123685.08247699818},
+ {-200360.90530882866, 123685.08247699818},
+ {-200360.90530882866, -123685.08247699818}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0019962591348533314, 0.00080848256185253912},
+ {0.0019962591348533314, -0.00080848256185253912},
+ {-0.0019962591348533314, 0.00080848256185253912},
+ {-0.0019962591348533314, -0.00080848256185253912}
+ }
+ },{
+ "kav5_s",
+ "+proj=kav5 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {201047.7031108776, 124109.05062917093},
+ {201047.7031108776, -124109.05062917093},
+ {-201047.7031108776, 124109.05062917093},
+ {-201047.7031108776, -124109.05062917093}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0019894397264987643, 0.00080572070962591153},
+ {0.0019894397264987643, -0.00080572070962591153},
+ {-0.0019894397264987643, 0.00080572070962591153},
+ {-0.0019894397264987643, -0.00080572070962591153}
+ }
+ },{
+ "qua_aut_e",
+ "+proj=qua_aut +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222613.54903309655, 111318.07788798446},
+ {222613.54903309655, -111318.07788798446},
+ {-222613.54903309655, 111318.07788798446},
+ {-222613.54903309655, -111318.07788798446}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017966305684046586, 0.00089831528412872229},
+ {0.0017966305684046586, -0.00089831528412872229},
+ {-0.0017966305684046586, 0.00089831528412872229},
+ {-0.0017966305684046586, -0.00089831528412872229}
+ }
+ },{
+ "qua_aut_s",
+ "+proj=qua_aut +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223376.62452402918, 111699.65437918637},
+ {223376.62452402918, -111699.65437918637},
+ {-223376.62452402918, 111699.65437918637},
+ {-223376.62452402918, -111699.65437918637}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017904931099477471, 0.00089524655490101819},
+ {0.0017904931099477471, -0.00089524655490101819},
+ {-0.0017904931099477471, 0.00089524655490101819},
+ {-0.0017904931099477471, -0.00089524655490101819}
+ }
+ },{
+ "mbt_s_e",
+ "+proj=mbt_s +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {204131.51785027285, 121400.33022550763},
+ {204131.51785027285, -121400.33022550763},
+ {-204131.51785027285, 121400.33022550763},
+ {-204131.51785027285, -121400.33022550763}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0019593827209883237, 0.00082369854658027549},
+ {0.0019593827209883237, -0.00082369854658027549},
+ {-0.0019593827209883237, 0.00082369854658027549},
+ {-0.0019593827209883237, -0.00082369854658027549}
+ }
+ },{
+ "mbt_s_s",
+ "+proj=mbt_s +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {204831.24057099217, 121816.46669603503},
+ {204831.24057099217, -121816.46669603503},
+ {-204831.24057099217, 121816.46669603503},
+ {-204831.24057099217, -121816.46669603503}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0019526892859206603, 0.00082088471512331508},
+ {0.0019526892859206603, -0.00082088471512331508},
+ {-0.0019526892859206603, 0.00082088471512331508},
+ {-0.0019526892859206603, -0.00082088471512331508}
+ }
+ },{
+ "tcc",
+ "+proj=tcc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223458.84419245756, 111769.14504058579},
+ {223458.84419245756, -111769.14504058579},
+ {-223458.84419245756, 111769.14504058579},
+ {-223458.84419245756, -111769.14504058579}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "tcea",
+ "+proj=tcea +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223322.76057672748, 111769.14504058579},
+ { 223322.76057672748, -111769.14504058579},
+ {-223322.76057672748, 111769.14504058579},
+ {-223322.76057672748, -111769.14504058579}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931102938101, 0.00089524655445477922},
+ { 0.0017904931102938101, -0.00089524655445477922},
+ {-0.0017904931102938101, 0.00089524655445477922},
+ {-0.0017904931102938101, -0.00089524655445477922}
+ }
+ },
+ // times projection not implemented
+ {
+ "tmerc_e",
+ "+proj=tmerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 222650.79679577847, 110642.22941192707},
+ { 222650.79679577847, -110642.22941192707},
+ {-222650.79679577847, 110642.22941192707},
+ {-222650.79679577847, -110642.22941192707}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017966305681649396, 0.00090436947663183841},
+ { 0.0017966305681649396, -0.00090436947663183841},
+ {-0.0017966305681649396, 0.00090436947663183841},
+ {-0.0017966305681649396, -0.00090436947663183841}
+ }
+ },{
+ "tmerc_s",
+ "+proj=tmerc +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223413.46640632232, 111769.14504059685},
+ { 223413.46640632232, -111769.14504059685},
+ {-223413.46640632208, 111769.14504059685},
+ {-223413.46640632208, -111769.14504059685}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931097048034, 0.00089524670602767842},
+ { 0.0017904931097048034, -0.00089524670602767842},
+ {-0.001790493109714345, 0.00089524670602767842},
+ {-0.001790493109714345, -0.00089524670602767842}
+ }
+ },{
+ "tpeqd_e",
+ "+proj=tpeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-27750.758831679042, -222599.40369177726},
+ {-250434.93702403645, -222655.93819326628},
+ {-27750.758831679042, 222599.40369177726},
+ {-250434.93702403645, 222655.93819326628}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-0.00089855554821257374, 1.2517966304145272},
+ {0.0008985555481998515, 1.2517966304145272},
+ {-0.00089855431859741167, 1.2482033692781642},
+ {0.00089855431859741167, 1.2482033692781642}
+ }
+ },{
+ "tpeqd_s",
+ "+proj=tpeqd +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {-27845.882978485075, -223362.43069526015},
+ {-251293.37876465076, -223419.15898590829},
+ {-27845.882978485075, 223362.43069526015},
+ {-251293.37876465076, 223419.15898590829}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-0.00089548606640108474, 1.2517904929571837},
+ {0.0008954860663883625, 1.2517904929571837},
+ {-0.000895484845182587, 1.248209506737604},
+ {0.00089548484516986475, 1.248209506737604}
+ }
+ },{
+ "urm5",
+ "+proj=urm5 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223393.6384339639, 111696.81878511712},
+ { 223393.6384339639, -111696.81878511712},
+ {-223393.6384339639, 111696.81878511712},
+ {-223393.6384339639, -111696.81878511712}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "urmfps",
+ "+proj=urmfps +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 196001.70813419219, 127306.84332999329},
+ { 196001.70813419219, -127306.84332999329},
+ {-196001.70813419219, 127306.84332999329},
+ {-196001.70813419219, -127306.84332999329}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.002040720839642371, 0.00078547381740438178},
+ { 0.002040720839642371, -0.00078547381740438178},
+ {-0.002040720839642371, 0.00078547381740438178},
+ {-0.002040720839642371, -0.00078547381740438178}
+ }
+ },{
+ "wag1",
+ "+proj=wag1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 195986.78156115755, 127310.07506065986},
+ { 195986.78156115755, -127310.07506065986},
+ {-195986.78156115755, 127310.07506065986},
+ {-195986.78156115755, -127310.07506065986}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.002040720839738254, 0.00078547381739207999},
+ { 0.002040720839738254, -0.00078547381739207999},
+ {-0.002040720839738254, 0.00078547381739207999},
+ {-0.002040720839738254, -0.00078547381739207999}
+ }
+ },{
+ "vandg",
+ "+proj=vandg +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223395.24954340671, 111704.59663367498},
+ { 223395.24954340671, -111704.59663367498},
+ {-223395.24954340671, 111704.59663367498},
+ {-223395.24954340671, -111704.59663367498}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.001790493715929761, 0.00089524655486993867},
+ { 0.001790493715929761, -0.00089524655486993867},
+ {-0.001790493715929761, 0.00089524655486993867},
+ {-0.001790493715929761, -0.00089524655486993867}
+ }
+ },{
+ "vandg2",
+ "+proj=vandg2 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223395.24785043663, 111718.49103722633},
+ { 223395.24785043663, -111718.49103722633},
+ {-223395.24785043663, 111718.49103722633},
+ {-223395.24785043663, -111718.49103722633}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "vandg3",
+ "+proj=vandg3 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223395.24955283134, 111704.51990442065},
+ { 223395.24955283134, -111704.51990442065},
+ {-223395.24955283134, 111704.51990442065},
+ {-223395.24955283134, -111704.51990442065}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "vandg4",
+ "+proj=vandg4 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223374.57729435508, 111701.19548415358 },
+ { 223374.57729435508, -111701.19548415358 },
+ {-223374.57729435508, 111701.19548415358 },
+ {-223374.57729435508, -111701.19548415358 }
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },
+ // vgridshift projection is not implemented in Boost.Geometry
+ // and the Proj4 test is in a different format
+ {
+ "wag2",
+ "+proj=wag2 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 206589.88809996162, 120778.04035754716},
+ { 206589.88809996162, -120778.04035754716},
+ {-206589.88809996162, 120778.04035754716},
+ {-206589.88809996162, -120778.04035754716}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0019360240367390709, 0.00082795765763814082},
+ { 0.0019360240367390709, -0.00082795765763814082},
+ {-0.0019360240367390709, 0.00082795765763814082},
+ {-0.0019360240367390709, -0.00082795765763814082}
+ }
+ },{
+ "wag3",
+ "+proj=wag3 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {223387.02171816575, 111701.07212763709},
+ {223387.02171816575, -111701.07212763709},
+ {-223387.02171816575, 111701.07212763709},
+ {-223387.02171816575, -111701.07212763709}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.001790493109880963, 0.00089524655489191132},
+ {0.001790493109880963, -0.00089524655489191132},
+ {-0.001790493109880963, 0.00089524655489191132},
+ {-0.001790493109880963, -0.00089524655489191132}
+ }
+ },{
+ "wag7",
+ "+proj=wag7 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 198601.87695731167, 125637.0457141714},
+ { 198601.87695731167, -125637.0457141714},
+ {-198601.87695731167, 125637.0457141714},
+ {-198601.87695731167, -125637.0457141714}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "wink1",
+ "+proj=wink1 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223385.13164095284, 111701.07212763709},
+ { 223385.13164095284, -111701.07212763709},
+ {-223385.13164095284, 111701.07212763709},
+ {-223385.13164095284, -111701.07212763709}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ { 0.0017904931098931057, 0.00089524655489191132},
+ { 0.0017904931098931057, -0.00089524655489191132},
+ {-0.0017904931098931057, 0.00089524655489191132},
+ {-0.0017904931098931057, -0.00089524655489191132}
+ }
+ },{
+ "wink2",
+ "+proj=wink2 +a=6400000 +lat_1=0.5 +lat_2=2",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ { 223387.39643378611, 124752.03279744535},
+ { 223387.39643378611, -124752.03279744535},
+ {-223387.39643378611, 124752.03279744535},
+ {-223387.39643378611, -124752.03279744535}
+ },
+ {},{{HUGE_VAL, HUGE_VAL}}
+ },{
+ "etmerc",
+ "+proj=etmerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {222650.79679758562, 110642.22941193319},
+ {222650.79679758562, -110642.22941193319},
+ {-222650.79679758562, 110642.22941193319},
+ {-222650.79679758562, -110642.22941193319}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {0.0017966305681649398, 0.00090436947663183873},
+ {0.0017966305681649398, -0.00090436947663183873},
+ {-0.0017966305681649398, 0.00090436947663183873},
+ {-0.0017966305681649398, -0.00090436947663183873}
+ }
+ },{
+ "utm",
+ "+proj=utm +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30",
+ {
+ { 2, 1},
+ { 2,-1},
+ {-2, 1},
+ {-2,-1}
+ },{
+ {1057002.4054912981, 110955.14117594929},
+ {1057002.4054912981, -110955.14117594929},
+ {611263.81227890507, 110547.10569680421},
+ {611263.81227890507, -110547.10569680421}
+ },{
+ { 200, 100},
+ { 200,-100},
+ {-200, 100},
+ {-200,-100}
+ },{
+ {-7.4869520833902357, 0.00090193980983462605},
+ {-7.4869520833902357, -0.00090193980983462605},
+ {-7.4905356820622613, 0.00090193535121489081},
+ {-7.4905356820622613, -0.00090193535121489081}
+ }
+ }
+};
+
+#endif // BOOST_GEOMETRY_TEST_SRS_PROJECTION_SELFTEST_CASES_HPP
diff --git a/src/boost/libs/geometry/test/srs/projections.cpp b/src/boost/libs/geometry/test/srs/projections.cpp
new file mode 100644
index 000000000..c81daef9b
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projections.cpp
@@ -0,0 +1,370 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2018.
+// Modifications copyright (c) 2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+ // WARNING: this file takes several minutes to quarters to compile on GCC
+
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4305 ) // truncation double -> float
+#endif // defined(_MSC_VER)
+
+
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include <boost/geometry/srs/projection.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+
+#include <test_common/test_point.hpp>
+
+
+namespace srs = bg::srs;
+
+inline void check(double v, double ve, std::string const& name, std::string const& axis)
+{
+ //BOOST_CHECK_CLOSE(v, ve, 0.001);
+
+ bool ok = ::boost::test_tools::check_is_close_t()(v, ve, ::boost::math::fpc::percent_tolerance(0.001));
+ BOOST_CHECK_MESSAGE((ok), name << " " << axis << " -> " << v << " != " << ve);
+}
+
+template <typename P>
+void test_forward(std::string const& name,
+ double lon, double lat,
+ typename bg::coordinate_type<P>::type x,
+ typename bg::coordinate_type<P>::type y,
+ std::string const& parameters)
+{
+ typedef typename bg::coordinate_type<P>::type coord_type;
+ typedef bg::model::point<coord_type, 2, bg::cs::geographic<bg::degree> > lonlat_type;
+
+ lonlat_type ll;
+ bg::set<0>(ll, lon);
+ bg::set<1>(ll, lat);
+
+ srs::projection<> prj = srs::proj4(parameters);
+
+ P xy;
+ prj.forward(ll, xy);
+
+ //std::cout << std::setprecision(16) << bg::get<0>(xy) << " " << bg::get<1>(xy) << std::endl;
+
+ check(bg::get<0>(xy), x, name, "x");
+ check(bg::get<1>(xy), y, name, "y");
+}
+
+template <typename P>
+void test_inverse(std::string const& name,
+ typename bg::coordinate_type<P>::type x,
+ typename bg::coordinate_type<P>::type y,
+ double lon, double lat,
+ std::string const& parameters)
+{
+ typedef typename bg::coordinate_type<P>::type coord_type;
+ typedef bg::model::point<coord_type, 2, bg::cs::geographic<bg::degree> > lonlat_type;
+
+ P xy;
+ bg::set<0>(xy, x);
+ bg::set<1>(xy, y);
+
+ srs::projection<> prj = srs::proj4(parameters);
+
+ lonlat_type ll;
+ prj.inverse(xy, ll);
+
+ //std::cout << std::setprecision(16) << bg::get<0>(ll) << " " << bg::get<1>(ll) << std::endl;
+
+ check(bg::get<0>(ll), lon, name, "lon");
+ check(bg::get<1>(ll), lat, name, "lat");
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_forward<P>("aea", 4.897000, 52.371000, 334609.583974, 5218502.503686, "+proj=aea +ellps=WGS84 +units=m +lat_1=55 +lat_2=65");
+ test_forward<P>("aeqd", 4.897000, 52.371000, 384537.462363, 5809944.807548, "+proj=aeqd +ellps=WGS84 +units=m");
+ test_forward<P>("airy", 4.897000, 52.371000, 328249.003313, 4987937.101447, "+proj=airy +ellps=WGS84 +units=m");
+ test_forward<P>("aitoff", 4.897000, 52.371000, 384096.182830, 5831239.274680, "+proj=aitoff +ellps=WGS84 +units=m");
+ test_forward<P>("alsk", -84.390000, 33.755000, 7002185.416415, -3700467.546545, "+proj=alsk +ellps=WGS84 +units=m +lon_0=-150W");
+ test_forward<P>("apian", 4.897000, 52.371000, -489503.746852, 5829913.052335, "+proj=apian +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_forward<P>("august", 4.897000, 52.371000, 472494.816642, 6557137.075680, "+proj=august +ellps=WGS84 +units=m");
+ test_forward<P>("bacon", 4.897000, 52.371000, -276322.940590, 7934660.138798, "+proj=bacon +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_forward<P>("bipc", 4.897000, 52.371000, 3693973.674143, -8459972.647559, "+proj=bipc +ellps=WGS84 +units=m");
+ test_forward<P>("boggs", 4.897000, 52.371000, -469734.523784, 5966441.169806, "+proj=boggs +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_forward<P>("bonne", 4.897000, 52.371000, 333291.091896, 274683.016972, "+proj=bonne +ellps=WGS84 +units=m +lat_1=50");
+ test_forward<P>("cass", 4.897000, 52.371000, 333274.431072, 5815921.803069, "+proj=cass +ellps=WGS84 +units=m");
+ test_forward<P>("cc", 4.897000, 52.371000, 545131.546415, 8273513.720038, "+proj=cc +ellps=WGS84 +units=m");
+ test_forward<P>("cea", 4.897000, 52.371000, -738753.247401, 5031644.669407, "+proj=cea +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_forward<P>("chamb", 4.897000, 52.371000, -3221300.532044, 872840.127676, "+proj=chamb +ellps=WGS84 +units=m +lat_1=52 +lon_1=5 +lat_2=30 +lon_2=80 +lat_3=20 +lon_3=-50");
+ test_forward<P>("collg", 4.897000, 52.371000, 280548.640940, 6148862.475491, "+proj=collg +ellps=WGS84 +units=m");
+ test_forward<P>("crast", 4.897000, 52.371000, 340944.220871, 5874029.522010, "+proj=crast +ellps=WGS84 +units=m");
+ test_forward<P>("denoy", 4.897000, 52.371000, 382253.324398, 5829913.052335, "+proj=denoy +ellps=WGS84 +units=m");
+ test_forward<P>("eck1", 4.897000, 52.371000, 356112.818167, 5371202.270688, "+proj=eck1 +ellps=WGS84 +units=m");
+ test_forward<P>("eck2", 4.897000, 52.371000, 320023.223588, 6697754.654662, "+proj=eck2 +ellps=WGS84 +units=m");
+ test_forward<P>("eck3", 4.897000, 52.371000, 417367.858470, 4923223.990430, "+proj=eck3 +ellps=WGS84 +units=m");
+ test_forward<P>("eck4", 4.897000, 52.371000, 383678.300021, 6304427.033917, "+proj=eck4 +ellps=WGS84 +units=m");
+ test_forward<P>("eck5", 4.897000, 52.371000, 387191.346304, 5142132.228246, "+proj=eck5 +ellps=WGS84 +units=m");
+ test_forward<P>("eck6", 4.897000, 52.371000, 342737.885307, 6363364.830847, "+proj=eck6 +ellps=WGS84 +units=m");
+ test_forward<P>("eqc", 4.897000, 52.371000, 545131.546415, 5829913.052335, "+proj=eqc +ellps=WGS84 +units=m");
+ test_forward<P>("eqdc", 4.897000, 52.371000, 307874.536263, 5810915.646438, "+proj=eqdc +ellps=WGS84 +units=m +lat_1=60 +lat_2=0");
+ test_forward<P>("etmerc", 4.897000, 52.371000, 333425.492123, 5815921.814393, "+proj=etmerc +ellps=WGS84 +units=m");
+ test_forward<P>("euler", 4.897000, 52.371000, 338753.024859, 5836825.984893, "+proj=euler +ellps=WGS84 +units=m +lat_1=60 +lat_2=0");
+ test_forward<P>("fahey", 4.897000, 52.371000, 388824.354103, 5705638.873094, "+proj=fahey +ellps=WGS84 +units=m");
+ test_forward<P>("fouc", 4.897000, 52.371000, 268017.369817, 6272855.564674, "+proj=fouc +ellps=WGS84 +units=m");
+ test_forward<P>("fouc_s", 4.897000, 52.371000, 545131.546415, 5051361.531375, "+proj=fouc_s +ellps=WGS84 +units=m");
+ test_forward<P>("gall", 4.897000, 52.371000, 385466.213109, 5354217.135929, "+proj=gall +ellps=WGS84 +units=m");
+ test_forward<P>("geocent", 4.897000, 52.371000, 545131.546415, 5829913.052335, "+proj=geocent +ellps=WGS84 +units=m");
+ test_forward<P>("geos", 4.897000, 52.371000, 313594.638994, 4711397.361812, "+proj=geos +ellps=WGS84 +units=m +h=40000000");
+ test_forward<P>("gins8", 4.897000, 52.371000, 409919.989781, 6235811.415629, "+proj=gins8 +ellps=WGS84 +units=m");
+ test_forward<P>("gn_sinu", 4.897000, 52.371000, 326082.668183, 6264971.711917, "+proj=gn_sinu +ellps=WGS84 +units=m +m=0.5 +n=1.785");
+ test_forward<P>("gnom", 4.897000, 52.371000, 546462.815658, 8303824.612633, "+proj=gnom +ellps=WGS84 +units=m");
+ test_forward<P>("goode", 4.897000, 52.371000, 360567.451176, 5782693.787691, "+proj=goode +ellps=WGS84 +units=m");
+ test_forward<P>("gs48", -84.390000, 33.755000, 4904886.323054, 12421187.782392, "+proj=gs48 +ellps=WGS84 +units=m +lon1=-48");
+ test_forward<P>("gs50", -84.390000, 33.755000, 3190310.148850, -564230.076744, "+proj=gs50 +ellps=WGS84 +units=m +lon1=-50");
+ test_forward<P>("gstmerc", 4.897000, 52.371000, 333173.875017, 5815062.181746, "+proj=gstmerc +ellps=WGS84 +units=m");
+ test_forward<P>("hammer", 4.897000, 52.371000, 370843.923425, 5630047.232233, "+proj=hammer +ellps=WGS84 +units=m");
+ test_forward<P>("hatano", 4.897000, 52.371000, 383644.128560, 6290117.704632, "+proj=hatano +ellps=WGS84 +units=m");
+ test_forward<P>("healpix", 4.897000, 52.371000, 1469886.5704, 6042138.5098, "+proj=healpix +ellps=WGS84 +units=m");
+ test_forward<P>("rhealpix", 4.897000, 52.371000, -11477441.24814, 13972970.8457, "+proj=rhealpix +ellps=WGS84 +units=m");
+ test_forward<P>("imw_p", 4.897000, 52.371000, 318784.808056, 3594184.939568, "+proj=imw_p +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=5");
+ test_forward<P>("isea", 4.897000, 52.371000, -413613.639976, 9218173.701546, "+proj=isea +ellps=WGS84 +units=m");
+ test_forward<P>("kav5", 4.897000, 52.371000, 383646.088858, 5997047.888175, "+proj=kav5 +ellps=WGS84 +units=m");
+ test_forward<P>("kav7", 4.897000, 52.371000, 407769.043907, 5829913.052335, "+proj=kav7 +ellps=WGS84 +units=m");
+ test_forward<P>("krovak", 14.416667, 50.083333, -743286.779768, -1043498.912060, "+proj=krovak +ellps=WGS84 +units=m");
+ test_forward<P>("laea", 4.897000, 52.371000, 371541.476735, 5608007.251007, "+proj=laea +ellps=WGS84 +units=m");
+ test_forward<P>("lagrng", 4.897000, 52.371000, 413379.673720, 6281547.821085, "+proj=lagrng +ellps=WGS84 +units=m +W=1");
+ test_forward<P>("larr", 4.897000, 52.371000, 485541.716273, 6497324.523196, "+proj=larr +ellps=WGS84 +units=m");
+ test_forward<P>("lask", 4.897000, 52.371000, 456660.618715, 6141427.377857, "+proj=lask +ellps=WGS84 +units=m");
+ test_forward<P>("latlon", 4.897000, 52.371000, 0.085469, 0.914046, "+proj=latlon +ellps=WGS84 +units=m");
+ test_forward<P>("latlong", 4.897000, 52.371000, 0.085469, 0.914046, "+proj=latlong +ellps=WGS84 +units=m");
+ test_forward<P>("lcc", 4.897000, 52.371000, 319700.820572, 5828852.504871, "+proj=lcc +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_forward<P>("lcca", 4.897000, 52.371000, 363514.402883, 2555324.493896, "+proj=lcca +ellps=WGS84 +units=m +lat_0=30n +lat_1=55n +lat_2=60n");
+ test_forward<P>("leac", 4.897000, 52.371000, 249343.870798, 6909632.226405, "+proj=leac +ellps=WGS84 +units=m");
+ test_forward<P>("lee_os", -84.390000, 33.755000, 7657412.020774, 4716426.185485, "+proj=lee_os +ellps=WGS84 +units=m");
+ test_forward<P>("longlat", 4.897000, 52.371000, 0.085469, 0.914046, "+proj=longlat +ellps=WGS84 +units=m");
+ test_forward<P>("lonlat", 4.897000, 52.371000, 0.085469, 0.914046, "+proj=lonlat +ellps=WGS84 +units=m");
+ test_forward<P>("loxim", 4.897000, 52.371000, 462770.371742, 5829913.052335, "+proj=loxim +ellps=WGS84 +units=m");
+ test_forward<P>("lsat", -84.390000, 33.755000, 16342543.294793, -2092348.169198, "+proj=lsat +ellps=WGS84 +units=m +lsat=1 +path=1");
+ test_forward<P>("mbt_fps", 4.897000, 52.371000, 392815.792409, 6007058.470101, "+proj=mbt_fps +ellps=WGS84 +units=m");
+ test_forward<P>("mbt_s", 4.897000, 52.371000, 389224.301381, 5893467.204064, "+proj=mbt_s +ellps=WGS84 +units=m");
+ test_forward<P>("mbtfpp", 4.897000, 52.371000, 345191.582111, 6098551.031494, "+proj=mbtfpp +ellps=WGS84 +units=m");
+ test_forward<P>("mbtfpq", 4.897000, 52.371000, 371214.469979, 5901319.366034, "+proj=mbtfpq +ellps=WGS84 +units=m");
+ test_forward<P>("mbtfps", 4.897000, 52.371000, 325952.066750, 6266156.827884, "+proj=mbtfps +ellps=WGS84 +units=m");
+ test_forward<P>("merc", 4.897000, 52.371000, 545131.546415, 6833623.829215, "+proj=merc +ellps=WGS84 +units=m");
+ test_forward<P>("mil_os", 4.897000, 52.371000, -1017212.552960, 3685935.358004, "+proj=mil_os +ellps=WGS84 +units=m");
+ test_forward<P>("mill", 4.897000, 52.371000, 545131.546415, 6431916.372717, "+proj=mill +ellps=WGS84 +units=m");
+ test_forward<P>("moll", 4.897000, 52.371000, 360567.451176, 6119459.421291, "+proj=moll +ellps=WGS84 +units=m");
+ test_forward<P>("murd1", 4.897000, 52.371000, 333340.993642, 5839071.944597, "+proj=murd1 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_forward<P>("murd2", 4.897000, 52.371000, 317758.821713, 6759296.097305, "+proj=murd2 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_forward<P>("murd3", 4.897000, 52.371000, 331696.409000, 5839224.186916, "+proj=murd3 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_forward<P>("natearth", 4.897000, 52.371000, 409886.629231, 5862282.218987, "+proj=natearth +ellps=WGS84 +units=m");
+ test_forward<P>("nell", 4.897000, 52.371000, 454576.246081, 5355027.851999, "+proj=nell +ellps=WGS84 +units=m");
+ test_forward<P>("nell_h", 4.897000, 52.371000, 438979.742911, 5386970.539995, "+proj=nell_h +ellps=WGS84 +units=m");
+ test_forward<P>("nicol", 4.897000, 52.371000, 360493.071000, 5836451.532406, "+proj=nicol +ellps=WGS84 +units=m");
+ test_forward<P>("nsper", 4.897000, 52.371000, 0.521191, 7.919806, "+proj=nsper +ellps=WGS84 +units=m +a=10 +h=40000000");
+ test_forward<P>("nzmg", 174.783333, -36.850000, 2669448.884228, 6482177.102194, "+proj=nzmg +ellps=WGS84 +units=m");
+ test_forward<P>("ob_tran", 4.897000, 52.371000, 8688996.467740, -3348342.663884, "+proj=ob_tran +ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50");
+ test_forward<P>("ocea", 4.897000, 52.371000, 14168517.320298, -923135.204172, "+proj=ocea +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e");
+ test_forward<P>("oea", 4.897000, 52.371000, 545723.850088, 5058869.127694, "+proj=oea +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e +m=1 +n=1");
+ test_forward<P>("omerc", 4.897000, 52.371000, 1009705.329154, 5829437.254923, "+proj=omerc +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e");
+ test_forward<P>("ortel", 4.897000, 52.371000, 360906.947408, 5829913.052335, "+proj=ortel +ellps=WGS84 +units=m");
+ test_forward<P>("ortho", 4.897000, 52.371000, 332422.874291, 5051361.531375, "+proj=ortho +ellps=WGS84 +units=m");
+ test_forward<P>("pconic", -70.400000, -23.650000, -2240096.398139, -6940342.146955, "+proj=pconic +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_0=60W");
+ test_forward<P>("qsc", 4.897000, 52.371000, 543871.545186, 7341888.620371, "+proj=qsc +ellps=WGS84 +units=m");
+ test_forward<P>("poly", 4.897000, 52.371000, 333274.269648, 5815908.957562, "+proj=poly +ellps=WGS84 +units=m");
+ test_forward<P>("putp1", 4.897000, 52.371000, 375730.931178, 5523551.121434, "+proj=putp1 +ellps=WGS84 +units=m");
+ test_forward<P>("putp2", 4.897000, 52.371000, 351480.997939, 5942668.547355, "+proj=putp2 +ellps=WGS84 +units=m");
+ test_forward<P>("putp3", 4.897000, 52.371000, 287673.972013, 4651597.610600, "+proj=putp3 +ellps=WGS84 +units=m");
+ test_forward<P>("putp3p", 4.897000, 52.371000, 361313.008033, 4651597.610600, "+proj=putp3p +ellps=WGS84 +units=m");
+ test_forward<P>("putp4p", 4.897000, 52.371000, 351947.465829, 6330828.716145, "+proj=putp4p +ellps=WGS84 +units=m");
+ test_forward<P>("putp5", 4.897000, 52.371000, 320544.316171, 5908383.682019, "+proj=putp5 +ellps=WGS84 +units=m");
+ test_forward<P>("putp5p", 4.897000, 52.371000, 436506.666600, 5908383.682019, "+proj=putp5p +ellps=WGS84 +units=m");
+ test_forward<P>("putp6", 4.897000, 52.371000, 324931.055842, 5842588.644796, "+proj=putp6 +ellps=WGS84 +units=m");
+ test_forward<P>("putp6p", 4.897000, 52.371000, 338623.512107, 6396742.919679, "+proj=putp6p +ellps=WGS84 +units=m");
+ test_forward<P>("qua_aut", 4.897000, 52.371000, 370892.621714, 5629072.862494, "+proj=qua_aut +ellps=WGS84 +units=m");
+ test_forward<P>("robin", 4.897000, 52.371000, 394576.507489, 5570940.631371, "+proj=robin +ellps=WGS84 +units=m");
+ test_forward<P>("rouss", 4.897000, 52.371000, 412826.227669, 6248368.849775, "+proj=rouss +ellps=WGS84 +units=m");
+ test_forward<P>("rpoly", 4.897000, 52.371000, 332447.130797, 5841164.662431, "+proj=rpoly +ellps=WGS84 +units=m");
+ test_forward<P>("sinu", 4.897000, 52.371000, 333528.909809, 5804625.044313, "+proj=sinu +ellps=WGS84 +units=m");
+ test_forward<P>("somerc", 4.897000, 52.371000, 545131.546415, 6833623.829215, "+proj=somerc +ellps=WGS84 +units=m");
+ test_forward<P>("stere", 4.897000, 52.371000, 414459.621827, 6255826.749872, "+proj=stere +ellps=WGS84 +units=m +lat_ts=30n");
+ test_forward<P>("sterea", 4.897000, 52.371000, 121590.388077, 487013.903377, "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m");
+ test_forward<P>("tcc", 4.897000, 52.371000, 332875.293370, 5841186.022551, "+proj=tcc +ellps=WGS84 +units=m");
+ test_forward<P>("tcea", 4.897000, 52.371000, 332422.874291, 5841186.022551, "+proj=tcea +ellps=WGS84 +units=m");
+ test_forward<P>("tissot", 4.897000, 52.371000, 431443.972539, 3808494.480735, "+proj=tissot +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_forward<P>("tmerc", 4.897000, 52.371000, 333425.492136, 5815921.814396, "+proj=tmerc +ellps=WGS84 +units=m");
+ test_forward<P>("tpeqd", 4.897000, 52.371000, 998886.128891, 873800.468721, "+proj=tpeqd +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=0 +lon_2=30e");
+ test_forward<P>("tpers", 4.897000, 52.371000, -1172311.936260, 6263306.090352, "+proj=tpers +ellps=WGS84 +units=m +tilt=50 +azi=20 +h=40000000");
+ test_forward<P>("ups", 4.897000, 52.371000, 2369508.503532, -2312783.579527, "+proj=ups +ellps=WGS84 +units=m");
+ test_forward<P>("urm5", 4.897000, 52.371000, 522185.854469, 5201544.371625, "+proj=urm5 +ellps=WGS84 +units=m +n=.3 +q=.3 +alpha=10");
+ test_forward<P>("urmfps", 4.897000, 52.371000, 439191.083465, 5919500.887257, "+proj=urmfps +ellps=WGS84 +units=m +n=0.50");
+ test_forward<P>("utm", 4.897000, 52.371000, 220721.998929, 5810228.672907, "+proj=utm +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_forward<P>("vandg", 4.897000, 52.371000, 489005.929978, 6431581.024949, "+proj=vandg +ellps=WGS84 +units=m");
+ test_forward<P>("vandg2", 4.897000, 52.371000, 488953.592205, 6434578.861895, "+proj=vandg2 +ellps=WGS84 +units=m");
+ test_forward<P>("vandg3", 4.897000, 52.371000, 489028.113123, 6430309.983824, "+proj=vandg3 +ellps=WGS84 +units=m");
+ test_forward<P>("vandg4", 4.897000, 52.371000, 360804.549444, 5831531.435618, "+proj=vandg4 +ellps=WGS84 +units=m");
+ test_forward<P>("vitk1", 4.897000, 52.371000, 338522.044182, 5839611.656064, "+proj=vitk1 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_forward<P>("wag1", 4.897000, 52.371000, 348059.961742, 6344311.295111, "+proj=wag1 +ellps=WGS84 +units=m");
+ test_forward<P>("wag2", 4.897000, 52.371000, 388567.174132, 6112322.636203, "+proj=wag2 +ellps=WGS84 +units=m");
+ test_forward<P>("wag3", 4.897000, 52.371000, 447014.436776, 5829913.052335, "+proj=wag3 +ellps=WGS84 +units=m");
+ test_forward<P>("wag4", 4.897000, 52.371000, 365021.547713, 6300040.998324, "+proj=wag4 +ellps=WGS84 +units=m");
+ test_forward<P>("wag5", 4.897000, 52.371000, 379647.914735, 6771982.379506, "+proj=wag5 +ellps=WGS84 +units=m");
+ test_forward<P>("wag6", 4.897000, 52.371000, 446107.907415, 5523551.121434, "+proj=wag6 +ellps=WGS84 +units=m");
+ test_forward<P>("wag7", 4.897000, 52.371000, 366407.198644, 6169832.906560, "+proj=wag7 +ellps=WGS84 +units=m");
+ test_forward<P>("weren", 4.897000, 52.371000, 402668.037596, 7243190.025762, "+proj=weren +ellps=WGS84 +units=m");
+ test_forward<P>("wink1", 4.897000, 52.371000, 438979.742911, 5829913.052335, "+proj=wink1 +ellps=WGS84 +units=m");
+ test_forward<P>("wink2", 4.897000, 52.371000, 472810.645318, 6313461.757868, "+proj=wink2 +ellps=WGS84 +units=m");
+ test_forward<P>("wintri", 4.897000, 52.371000, 365568.851909, 5830576.163507, "+proj=wintri +ellps=WGS84 +units=m");
+
+ test_inverse<P>("aea", 334609.583974, 5218502.503686, 4.897000, 52.371000, "+proj=aea +ellps=WGS84 +units=m +lat_1=55 +lat_2=65");
+ test_inverse<P>("aeqd", 384537.462363, 5809944.807548, 4.897000, 52.371000, "+proj=aeqd +ellps=WGS84 +units=m"); // F/I: 883.080918
+ test_inverse<P>("aitoff", 384096.182830, 5831239.274680, 4.897000, 52.371000, "+proj=aitoff +ellps=WGS84 +units=m");
+ test_inverse<P>("alsk", 7002185.416415, -3700467.546545, -84.389819, 33.754911, "+proj=alsk +ellps=WGS84 +units=m +lon_0=-150W"); // F/I: 19.398478
+ test_inverse<P>("bipc", 3693973.674143, -8459972.647559, 4.897000, 52.371000, "+proj=bipc +ellps=WGS84 +units=m");
+ test_inverse<P>("bonne", 333291.091896, 274683.016972, 4.897000, 52.371000, "+proj=bonne +ellps=WGS84 +units=m +lat_1=50");
+ test_inverse<P>("cass", 333274.431072, 5815921.803069, 4.897007, 52.371001, "+proj=cass +ellps=WGS84 +units=m"); // F/I: 0.460628
+ test_inverse<P>("cc", 545131.546415, 8273513.720038, 4.897000, 52.371000, "+proj=cc +ellps=WGS84 +units=m");
+ test_inverse<P>("cea", -738753.247401, 5031644.669407, 4.897000, 52.371000, "+proj=cea +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_inverse<P>("collg", 280548.640940, 6148862.475491, 4.897000, 52.371000, "+proj=collg +ellps=WGS84 +units=m");
+ test_inverse<P>("crast", 340944.220871, 5874029.522010, 4.897000, 52.371000, "+proj=crast +ellps=WGS84 +units=m");
+ test_inverse<P>("eck1", 356112.818167, 5371202.270688, 4.897000, 52.371000, "+proj=eck1 +ellps=WGS84 +units=m");
+ test_inverse<P>("eck2", 320023.223588, 6697754.654662, 4.897000, 52.371000, "+proj=eck2 +ellps=WGS84 +units=m");
+ test_inverse<P>("eck3", 417367.858470, 4923223.990430, 4.897000, 52.371000, "+proj=eck3 +ellps=WGS84 +units=m");
+ test_inverse<P>("eck4", 383678.300021, 6304427.033917, 4.897000, 52.371000, "+proj=eck4 +ellps=WGS84 +units=m");
+ test_inverse<P>("eck5", 387191.346304, 5142132.228246, 4.897000, 52.371000, "+proj=eck5 +ellps=WGS84 +units=m");
+ test_inverse<P>("eck6", 342737.885307, 6363364.830847, 4.897000, 52.371000, "+proj=eck6 +ellps=WGS84 +units=m");
+ test_inverse<P>("eqc", 545131.546415, 5829913.052335, 4.897000, 52.371000, "+proj=eqc +ellps=WGS84 +units=m");
+ test_inverse<P>("eqdc", 307874.536263, 5810915.646438, 4.897000, 52.371000, "+proj=eqdc +ellps=WGS84 +units=m +lat_1=60 +lat_2=0");
+ test_inverse<P>("etmerc", 333425.492123, 5815921.814393, 4.897000, 52.371000, "+proj=etmerc +ellps=WGS84 +units=m");
+ test_inverse<P>("euler", 338753.024859, 5836825.984893, 4.897000, 52.371000, "+proj=euler +ellps=WGS84 +units=m +lat_1=60 +lat_2=0");
+ test_inverse<P>("fahey", 388824.354103, 5705638.873094, 4.897000, 52.371000, "+proj=fahey +ellps=WGS84 +units=m");
+ test_inverse<P>("fouc", 268017.369817, 6272855.564674, 4.897000, 52.371000, "+proj=fouc +ellps=WGS84 +units=m");
+ test_inverse<P>("fouc_s", 545131.546415, 5051361.531375, 4.897000, 52.371000, "+proj=fouc_s +ellps=WGS84 +units=m");
+ test_inverse<P>("gall", 385466.213109, 5354217.135929, 4.897000, 52.371000, "+proj=gall +ellps=WGS84 +units=m");
+ test_inverse<P>("geocent", 545131.546415, 5829913.052335, 4.897000, 52.371000, "+proj=geocent +ellps=WGS84 +units=m");
+ test_inverse<P>("geos", 313594.638994, 4711397.361812, 4.897000, 52.371000, "+proj=geos +ellps=WGS84 +units=m +h=40000000");
+ test_inverse<P>("gn_sinu", 326082.668183, 6264971.711917, 4.897000, 52.371000, "+proj=gn_sinu +ellps=WGS84 +units=m +m=0.5 +n=1.785");
+ test_inverse<P>("gnom", 546462.815658, 8303824.612633, 4.897000, 52.371000, "+proj=gnom +ellps=WGS84 +units=m");
+ test_inverse<P>("goode", 360567.451176, 5782693.787691, 4.897000, 52.371000, "+proj=goode +ellps=WGS84 +units=m");
+ test_inverse<P>("gs48", 4904886.323054, 12421187.782392, -84.387019, 33.726470, "+proj=gs48 +ellps=WGS84 +units=m +lon1=-48"); // F/I: 3176.559347
+ test_inverse<P>("gs50", 3190310.148850, -564230.076744, -84.389678, 33.754825, "+proj=gs50 +ellps=WGS84 +units=m +lon1=-50"); // F/I: 35.589174
+ test_inverse<P>("gstmerc", 333173.875017, 5815062.181746, 4.897000, 52.371000, "+proj=gstmerc +ellps=WGS84 +units=m");
+ test_inverse<P>("hatano", 383644.128560, 6290117.704632, 4.897000, 52.371000, "+proj=hatano +ellps=WGS84 +units=m");
+ test_inverse<P>("healpix", 1469886.5704, 6042138.5098, 4.897000, 52.371000, "+proj=healpix +ellps=WGS84 +units=m");
+ test_inverse<P>("rhealpix", -11477441.24814, 13972970.8457, 4.897000, 52.371000, "+proj=rhealpix +ellps=WGS84 +units=m");
+ test_inverse<P>("imw_p", 318784.808056, 3594184.939568, 4.897000, 52.371000, "+proj=imw_p +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=5");
+ test_inverse<P>("kav5", 383646.088858, 5997047.888175, 4.897000, 52.371000, "+proj=kav5 +ellps=WGS84 +units=m");
+ test_inverse<P>("kav7", 407769.043907, 5829913.052335, 4.897000, 52.371000, "+proj=kav7 +ellps=WGS84 +units=m");
+ test_inverse<P>("krovak", -743286.779768, -1043498.912060, 14.417630, 50.084517, "+proj=krovak +ellps=WGS84 +units=m"); // F/I: 148.642889
+ test_inverse<P>("laea", 371541.476735, 5608007.251007, 4.897000, 52.371000, "+proj=laea +ellps=WGS84 +units=m");
+ test_inverse<P>("latlon", 0.085469, 0.914046, 4.897000, 52.371000, "+proj=latlon +ellps=WGS84 +units=m");
+ test_inverse<P>("latlong", 0.085469, 0.914046, 4.897000, 52.371000, "+proj=latlong +ellps=WGS84 +units=m");
+ test_inverse<P>("lcc", 319700.820572, 5828852.504871, 4.897000, 52.371000, "+proj=lcc +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_inverse<P>("lcca", 363514.402883, 2555324.493896, 4.897000, 52.371000, "+proj=lcca +ellps=WGS84 +units=m +lat_0=30n +lat_1=55n +lat_2=60n");
+ test_inverse<P>("leac", 249343.870798, 6909632.226405, 4.897000, 52.371000, "+proj=leac +ellps=WGS84 +units=m");
+ test_inverse<P>("lee_os", 7657412.020774, 4716426.185485, -84.390000, 33.755000, "+proj=lee_os +ellps=WGS84 +units=m");
+ test_inverse<P>("longlat", 0.085469, 0.914046, 4.897000, 52.371000, "+proj=longlat +ellps=WGS84 +units=m");
+ test_inverse<P>("lonlat", 0.085469, 0.914046, 4.897000, 52.371000, "+proj=lonlat +ellps=WGS84 +units=m");
+ test_inverse<P>("loxim", 462770.371742, 5829913.052335, 4.897000, 52.371000, "+proj=loxim +ellps=WGS84 +units=m");
+ test_inverse<P>("lsat", 16342543.294793, -2092348.169198, -84.390000, 33.755000, "+proj=lsat +ellps=WGS84 +units=m +lsat=1 +path=1"); // F/I: 0.001160
+ test_inverse<P>("mbt_fps", 392815.792409, 6007058.470101, 4.897000, 52.371000, "+proj=mbt_fps +ellps=WGS84 +units=m");
+ test_inverse<P>("mbt_s", 389224.301381, 5893467.204064, 4.897000, 52.371000, "+proj=mbt_s +ellps=WGS84 +units=m");
+ test_inverse<P>("mbtfpp", 345191.582111, 6098551.031494, 4.897000, 52.371000, "+proj=mbtfpp +ellps=WGS84 +units=m");
+ test_inverse<P>("mbtfpq", 371214.469979, 5901319.366034, 4.897000, 52.371000, "+proj=mbtfpq +ellps=WGS84 +units=m");
+ test_inverse<P>("mbtfps", 325952.066750, 6266156.827884, 4.897000, 52.371000, "+proj=mbtfps +ellps=WGS84 +units=m");
+ test_inverse<P>("merc", 545131.546415, 6833623.829215, 4.897000, 52.371000, "+proj=merc +ellps=WGS84 +units=m");
+ test_inverse<P>("mil_os", -1017212.552960, 3685935.358004, 4.897000, 52.371000, "+proj=mil_os +ellps=WGS84 +units=m");
+ test_inverse<P>("mill", 545131.546415, 6431916.372717, 4.897000, 52.371000, "+proj=mill +ellps=WGS84 +units=m");
+ test_inverse<P>("moll", 360567.451176, 6119459.421291, 4.897000, 52.371000, "+proj=moll +ellps=WGS84 +units=m");
+ test_inverse<P>("murd1", 333340.993642, 5839071.944597, 4.897000, 52.371000, "+proj=murd1 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_inverse<P>("murd2", 317758.821713, 6759296.097305, 4.897000, 52.371000, "+proj=murd2 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_inverse<P>("murd3", 331696.409000, 5839224.186916, 4.897000, 52.371000, "+proj=murd3 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_inverse<P>("natearth", 409886.629231, 5862282.218987, 4.897000, 52.371000, "+proj=natearth +ellps=WGS84 +units=m");
+ test_inverse<P>("nell", 454576.246081, 5355027.851999, 4.897000, 52.371000, "+proj=nell +ellps=WGS84 +units=m");
+ test_inverse<P>("nell_h", 438979.742911, 5386970.539995, 4.897000, 52.371000, "+proj=nell_h +ellps=WGS84 +units=m");
+ test_inverse<P>("nsper", 0.521191, 7.919806, 4.897000, 52.371000, "+proj=nsper +ellps=WGS84 +units=m +a=10 +h=40000000");
+ test_inverse<P>("nzmg", 2669448.884228, 6482177.102194, 174.783333, -36.850000, "+proj=nzmg +ellps=WGS84 +units=m");
+ test_inverse<P>("ob_tran", 8688996.467740, -3348342.663884, 4.897000, 52.371000, "+proj=ob_tran +ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50");
+ test_inverse<P>("ocea", 14168517.320298, -923135.204172, 4.897000, 52.371000, "+proj=ocea +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e");
+ test_inverse<P>("oea", 545723.850088, 5058869.127694, 4.897000, 52.371000, "+proj=oea +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e +m=1 +n=1");
+ test_inverse<P>("omerc", 1009705.329154, 5829437.254923, 4.897000, 52.371000, "+proj=omerc +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e");
+ test_inverse<P>("ortho", 332422.874291, 5051361.531375, 4.897000, 52.371000, "+proj=ortho +ellps=WGS84 +units=m");
+ test_inverse<P>("pconic", -2240096.398139, -6940342.146955, -70.400000, -23.650000, "+proj=pconic +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_0=60W"); // F/I: 4424863.377843
+ test_inverse<P>("qsc", 543871.545186, 7341888.620371, 4.897000, 52.371000, "+proj=qsc +ellps=WGS84 +units=m");
+ test_inverse<P>("poly", 333274.269648, 5815908.957562, 4.897000, 52.371000, "+proj=poly +ellps=WGS84 +units=m");
+ test_inverse<P>("putp1", 375730.931178, 5523551.121434, 4.897000, 52.371000, "+proj=putp1 +ellps=WGS84 +units=m");
+ test_inverse<P>("putp2", 351480.997939, 5942668.547355, 4.897000, 52.371000, "+proj=putp2 +ellps=WGS84 +units=m");
+ test_inverse<P>("putp3", 287673.972013, 4651597.610600, 4.897000, 52.371000, "+proj=putp3 +ellps=WGS84 +units=m");
+ test_inverse<P>("putp3p", 361313.008033, 4651597.610600, 4.897000, 52.371000, "+proj=putp3p +ellps=WGS84 +units=m");
+ test_inverse<P>("putp4p", 351947.465829, 6330828.716145, 4.897000, 52.371000, "+proj=putp4p +ellps=WGS84 +units=m"); // F/I: 0.003779
+ test_inverse<P>("putp5", 320544.316171, 5908383.682019, 4.897000, 52.371000, "+proj=putp5 +ellps=WGS84 +units=m");
+ test_inverse<P>("putp5p", 436506.666600, 5908383.682019, 4.897000, 52.371000, "+proj=putp5p +ellps=WGS84 +units=m");
+ test_inverse<P>("putp6", 324931.055842, 5842588.644796, 4.897000, 52.371000, "+proj=putp6 +ellps=WGS84 +units=m");
+ test_inverse<P>("putp6p", 338623.512107, 6396742.919679, 4.897000, 52.371000, "+proj=putp6p +ellps=WGS84 +units=m");
+ test_inverse<P>("qua_aut", 370892.621714, 5629072.862494, 4.897000, 52.371000, "+proj=qua_aut +ellps=WGS84 +units=m");
+ test_inverse<P>("robin", 394576.507489, 5570940.631371, 4.897000, 52.371000, "+proj=robin +ellps=WGS84 +units=m");
+ test_inverse<P>("rouss", 412826.227669, 6248368.849775, 4.959853, 52.433747, "+proj=rouss +ellps=WGS84 +units=m"); // F/I: 8188.459174
+ test_inverse<P>("sinu", 333528.909809, 5804625.044313, 4.897000, 52.371000, "+proj=sinu +ellps=WGS84 +units=m");
+ test_inverse<P>("somerc", 545131.546415, 6833623.829215, 4.897000, 52.371000, "+proj=somerc +ellps=WGS84 +units=m");
+ test_inverse<P>("sterea", 121590.388077, 487013.903377, 4.897000, 52.371000, "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m");
+ test_inverse<P>("tcea", 332422.874291, 5841186.022551, 4.897000, 52.371000, "+proj=tcea +ellps=WGS84 +units=m");
+ test_inverse<P>("tissot", 431443.972539, 3808494.480735, 4.897000, 52.371000, "+proj=tissot +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_inverse<P>("tmerc", 333425.492136, 5815921.814396, 4.897000, 52.371000, "+proj=tmerc +ellps=WGS84 +units=m");
+ test_inverse<P>("tpeqd", 998886.128891, 873800.468721, 4.897000, 52.371000, "+proj=tpeqd +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=0 +lon_2=30e");
+ test_inverse<P>("tpers", -1172311.936260, 6263306.090352, 4.897000, 52.371000, "+proj=tpers +ellps=WGS84 +units=m +tilt=50 +azi=20 +h=40000000");
+ test_inverse<P>("ups", 2369508.503532, -2312783.579527, 4.897000, 52.371000, "+proj=ups +ellps=WGS84 +units=m");
+ test_inverse<P>("urmfps", 439191.083465, 5919500.887257, 4.897000, 52.371000, "+proj=urmfps +ellps=WGS84 +units=m +n=0.50");
+ test_inverse<P>("utm", 220721.998929, 5810228.672907, 4.897000, 52.371000, "+proj=utm +ellps=WGS84 +units=m +lon_0=11d32'00E");
+ test_inverse<P>("vandg", 489005.929978, 6431581.024949, 4.897000, 52.371000, "+proj=vandg +ellps=WGS84 +units=m");
+ test_inverse<P>("vitk1", 338522.044182, 5839611.656064, 4.897000, 52.371000, "+proj=vitk1 +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n");
+ test_inverse<P>("wag1", 348059.961742, 6344311.295111, 4.897000, 52.371000, "+proj=wag1 +ellps=WGS84 +units=m");
+ test_inverse<P>("wag2", 388567.174132, 6112322.636203, 4.897000, 52.371000, "+proj=wag2 +ellps=WGS84 +units=m");
+ test_inverse<P>("wag3", 447014.436776, 5829913.052335, 4.897000, 52.371000, "+proj=wag3 +ellps=WGS84 +units=m");
+ test_inverse<P>("wag4", 365021.547713, 6300040.998324, 4.897000, 52.371000, "+proj=wag4 +ellps=WGS84 +units=m");
+ test_inverse<P>("wag5", 379647.914735, 6771982.379506, 4.897000, 52.371000, "+proj=wag5 +ellps=WGS84 +units=m");
+ test_inverse<P>("wag6", 446107.907415, 5523551.121434, 4.897000, 52.371000, "+proj=wag6 +ellps=WGS84 +units=m");
+ test_inverse<P>("weren", 402668.037596, 7243190.025762, 4.897000, 52.371000, "+proj=weren +ellps=WGS84 +units=m"); // F/I: 0.003779
+ test_inverse<P>("wink1", 438979.742911, 5829913.052335, 4.897000, 52.371000, "+proj=wink1 +ellps=WGS84 +units=m");
+
+
+ // Badly behaving inverse projections, to be reported to Gerald Evenden
+ // other (probably because it is in Southern Hemisphere and inverse turns up in Northern...
+ //test_inverse<P>("stere", 828919.243654, 12511653.499743, 2.183333, 41.383333, "+proj=stere +ellps=WGS84 +units=m +lat_ts=30n"); // F/I: 1238647.010132 // DIFFERENCE proj4/ggl: 4588423, (0.000000, 0.000000)
+}
+
+int test_main(int, char* [])
+{
+ //test_all<int[2]>();
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+ //test_all<test::test_point>();
+ //test_all<bg::model::d2::point_xy<int> >();
+ //test_all<bg::model::d2::point_xy<float> >();
+ //test_all<bg::model::d2::point_xy<double> >();
+
+ // Leave only one here, because this divides compilation time with 6 or 7
+ test_all<bg::model::d2::point_xy<long double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projections_combined.cpp b/src/boost/libs/geometry/test/srs/projections_combined.cpp
new file mode 100644
index 000000000..b4fd0958f
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projections_combined.cpp
@@ -0,0 +1,169 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2017, 2018.
+// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4305 ) // truncation double -> float
+#endif // defined(_MSC_VER)
+
+#define BOOST_GEOMETRY_SRS_ENABLE_STATIC_PROJECTION_HYBRID_INTERFACE
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/srs/projection.hpp>
+
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+#include "proj4.hpp"
+
+namespace srs = bg::srs;
+
+template <typename P>
+bool check_expected(P const& p1, P const& p2)
+{
+ return bg::math::abs(bg::get<0>(p1) - bg::get<0>(p2)) <= 1.0
+ && bg::math::abs(bg::get<1>(p1) - bg::get<1>(p2)) <= 1.0;
+}
+
+template <typename StaticParams, typename GeoPoint, typename CartPoint>
+void test_forward(std::string const& id, GeoPoint const& geo_point, CartPoint const& cart_point,
+ StaticParams const& params, std::string const& proj4 = "")
+{
+ try
+ {
+ srs::projection<StaticParams> prj = params;
+
+ CartPoint xy;
+ prj.forward(geo_point, xy);
+
+ bool ok = check_expected(xy, cart_point);
+
+ BOOST_CHECK_MESSAGE(ok,
+ " id: " << id
+ << " point: " << bg::wkt(xy)
+ << " different than expected: " << bg::wkt(cart_point));
+
+ if (! proj4.empty())
+ {
+ srs::projection<> prj2 = srs::proj4(proj4);
+
+ CartPoint xy2;
+ prj2.forward(geo_point, xy2);
+
+ bool eq2 = bg::equals(xy, xy2);
+
+ BOOST_CHECK_MESSAGE(eq2,
+ " id: " << id << " result of static: "
+ << bg::wkt(xy) << " different than dynamic: " << bg::wkt(xy2));
+
+#ifdef TEST_WITH_PROJ4
+ pj_projection prj3(proj4);
+
+ CartPoint xy3;
+ prj3.forward(geo_point, xy3);
+
+ bool eq3 = bg::equals(xy, xy3);
+
+ BOOST_CHECK_MESSAGE(eq3,
+ " id: " << id << " result: "
+ << bg::wkt(xy) << " different than proj4: " << bg::wkt(xy3));
+#endif // TEST_WITH_PROJ4
+ }
+ }
+ catch(bg::projection_exception const& e)
+ {
+ std::cout << "Exception in " << id << " : " << e.code() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Exception (unknown) in " << id << std::endl;
+ }
+}
+
+template <typename StaticParams, typename GeoPoint, typename CartPoint>
+void test_forward(std::string const& id, GeoPoint const& geo_point, CartPoint const& cart_point,
+ std::string const& proj4 = "")
+{
+ test_forward(id, geo_point, cart_point, StaticParams(), proj4);
+}
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::geographic<bg::degree> > geo_point_type;
+ typedef bg::model::point<T, 2, bg::cs::cartesian> cart;
+
+ geo_point_type amsterdam = bg::make<geo_point_type>(4.8925, 52.3731);
+ geo_point_type utrecht = bg::make<geo_point_type>(5.1213, 52.0907);
+
+ geo_point_type anchorage = bg::make<geo_point_type>(-149.90, 61.22);
+ geo_point_type juneau = bg::make<geo_point_type>(-134.42, 58.30);
+
+ geo_point_type auckland = bg::make<geo_point_type>(174.74, -36.84);
+ geo_point_type wellington = bg::make<geo_point_type>(177.78, -41.29);
+
+ geo_point_type aspen = bg::make<geo_point_type>(-106.84, 39.19);
+ geo_point_type denver = bg::make<geo_point_type>(-104.88, 39.76);
+
+ using namespace srs::spar;
+
+ // IGH (internally using moll/sinu)
+ {
+ typedef parameters<proj_igh, ellps_sphere, units_m> params_t;
+ std::string sparams = "+proj=igh +ellps=sphere +units=m";
+ test_forward<params_t>("igh-am", amsterdam, cart(1489299.1509520211, 5776413.4260336142), sparams);
+ test_forward<params_t>("igh-ut", utrecht, cart(1498750.6627020084, 5747394.3313896423), sparams);
+ test_forward<params_t>("igh-as", aspen, cart(-11708973.126426676, 4357727.1232166551), sparams);
+ test_forward<params_t>("igh-de", denver, cart(-11536624.264589204, 4421108.2015589233), sparams);
+ test_forward<params_t>("igh-au", auckland, cart(18658819.353676274, -4096419.1686476548), sparams);
+ test_forward<params_t>("igh-we", wellington, cart(18733710.557981707, -4591140.1631184481), sparams);
+ test_forward<params_t>("igh-an", anchorage, cart(-14275110.630537530, 6648284.9393376000), sparams);
+ test_forward<params_t>("igh-ju", juneau, cart(-13421076.123140398, 6368936.3597440729), sparams);
+ }
+
+ // Using moll
+ {
+ typedef parameters<proj_ob_tran, ellps_wgs84, o_proj<proj_moll>, units_m, o_lat_p<>, o_lon_p<> > params_t;
+ params_t params = params_t(proj_ob_tran(), ellps_wgs84(), o_proj<proj_moll>(), units_m(), o_lat_p<>(10), o_lon_p<>(90));
+ std::string sparams = "+proj=ob_tran +ellps=WGS84 +o_proj=moll +units=m +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50";
+ test_forward<params_t>("obt-m-am", amsterdam, cart(8688778.3518596273, -3348126.4518623645), params, sparams);
+ test_forward<params_t>("obt-m-ut", utrecht, cart(8693109.5205437448, -3379708.1134765535), params, sparams);
+ test_forward<params_t>("obt-m-as", aspen, cart(3691751.3259231807, 2371456.9674431868), params, sparams);
+ test_forward<params_t>("obt-m-de", denver, cart(3764685.2104777521, 2185616.0182080171), params, sparams);
+ }
+
+ // Using sinu
+ {
+ // In Proj4 >= 5.0.0 ob_tran projection doesn't overwrite the ellipsoid's parameters to make sphere in underlying projection
+ // So in order to use spherical sinu projection WGS84-compatible sphere has to be set manually.
+ typedef parameters<proj_ob_tran, a<>, es<>, o_proj<proj_sinu>, units_m, o_lat_p<>, o_lon_p<> > params_t;
+ params_t params = params_t(proj_ob_tran(), a<>(6378137), es<>(0), o_proj<proj_sinu>(), units_m(), o_lat_p<>(10), o_lon_p<>(90));
+ std::string sparams = "+proj=ob_tran +a=6378137 +es=0 +o_proj=sinu +units=m +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50";
+ test_forward<params_t>("obt-s-am", amsterdam, cart(9220221.4221933037, -3059652.3579233172), params, sparams);
+ test_forward<params_t>("obt-s-ut", utrecht, cart(9216281.0977674071, -3089427.4415689218), params, sparams);
+ test_forward<params_t>("obt-s-as", aspen, cart(4010672.3356677019, 2150730.9484995930), params, sparams);
+ test_forward<params_t>("obt-s-de", denver, cart(4103945.8062708224, 1979964.9315176210), params, sparams);
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/projections_static.cpp b/src/boost/libs/geometry/test/srs/projections_static.cpp
new file mode 100644
index 000000000..86e243951
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/projections_static.cpp
@@ -0,0 +1,290 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2017, 2018.
+// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4305 ) // truncation double -> float
+#endif // defined(_MSC_VER)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/srs/projection.hpp>
+
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+
+template <template <typename, typename> class Projection, typename GeoPoint>
+void test_forward(GeoPoint const& geo_point1, GeoPoint const& geo_point2,
+ std::string const& sparams, int deviation = 1)
+{
+ typedef typename bg::coordinate_type<GeoPoint>::type coordinate_type;
+ typedef bg::model::d2::point_xy<coordinate_type> cartesian_point_type;
+ typedef bg::projections::parameters<double> parameters_type;
+ typedef bg::projections::detail::static_wrapper_f
+ <
+ Projection<coordinate_type, parameters_type>,
+ parameters_type
+ > projection_type;
+
+ try
+ {
+ bg::srs::detail::proj4_parameters params(sparams);
+ parameters_type par = bg::projections::detail::pj_init<double>(params);
+
+ projection_type prj(params, par);
+
+ cartesian_point_type xy1, xy2;
+ prj.forward(geo_point1, xy1);
+ prj.forward(geo_point2, xy2);
+
+ // Calculate distances in KM
+ int const distance_expected = static_cast<int>(bg::distance(geo_point1, geo_point2) / 1000.0);
+ int const distance_found = static_cast<int>(bg::distance(xy1, xy2) / 1000.0);
+
+ int const difference = std::abs(distance_expected - distance_found);
+ BOOST_CHECK_MESSAGE(difference <= 1 || difference == deviation,
+ " projection: " << projection_type::get_name()
+ << " distance found: " << distance_found
+ << " expected: " << distance_expected);
+
+// For debug:
+// std::cout << projection_type::get_name() << " " << distance_expected
+// << " " << distance_found
+// << " " << (difference > 1 && difference != deviation ? " *** WRONG ***" : "")
+// << " " << difference
+// << std::endl;
+ }
+ catch(bg::projection_exception const& e)
+ {
+ std::cout << "Exception in " << projection_type::get_name() << " : " << e.what() << std::endl;
+ }
+ catch(...)
+ {
+ std::cout << "Exception (unknown) in " << projection_type::get_name() << std::endl;
+ }
+}
+
+template <typename T>
+void test_all()
+{
+ typedef bg::model::point<T, 2, bg::cs::geographic<bg::degree> > geo_point_type;
+
+ geo_point_type amsterdam = bg::make<geo_point_type>(4.8925, 52.3731);
+ geo_point_type utrecht = bg::make<geo_point_type>(5.1213, 52.0907);
+
+ // IMPORTANT: Compatible model has to be passed in order to assure correct initialization
+
+ test_forward<bg::projections::aea_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_1=55 +lat_2=65");
+ test_forward<bg::projections::aeqd_e>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+ test_forward<bg::projections::aeqd_s>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ test_forward<bg::projections::airy_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 4);
+ test_forward<bg::projections::aitoff_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::apian_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lon_0=11d32'00E");
+ test_forward<bg::projections::august_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 14);
+
+ test_forward<bg::projections::bacon_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lon_0=11d32'00E", 5);
+ test_forward<bg::projections::bipc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 7);
+ test_forward<bg::projections::boggs_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lon_0=11d32'00E", 2);
+
+ test_forward<bg::projections::bonne_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_1=50");
+ test_forward<bg::projections::bonne_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=50", 33);
+
+ test_forward<bg::projections::cass_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+ test_forward<bg::projections::cass_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::cc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 52);
+
+ test_forward<bg::projections::cea_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lon_0=11d32'00E", 4);
+ test_forward<bg::projections::cea_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lon_0=11d32'00E", 4);
+
+ test_forward<bg::projections::chamb_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=52 +lon_1=5 +lat_2=30 +lon_2=80 +lat_3=20 +lon_3=-50", 2);
+ test_forward<bg::projections::collg_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 5);
+ test_forward<bg::projections::crast_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::denoy_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::eck1_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::eck2_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::eck3_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::eck4_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::eck5_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+
+ test_forward<bg::projections::eck6_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ test_forward<bg::projections::eqc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 5);
+ test_forward<bg::projections::eqdc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_1=60 +lat_2=0");
+ test_forward<bg::projections::etmerc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+ test_forward<bg::projections::euler_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=60 +lat_2=0");
+
+ test_forward<bg::projections::fahey_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 5);
+ test_forward<bg::projections::fouc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 6);
+ test_forward<bg::projections::fouc_s_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 4);
+ test_forward<bg::projections::gall_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::geocent_other>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 5);
+ test_forward<bg::projections::geos_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +h=40000000", 13);
+ test_forward<bg::projections::gins8_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 7);
+
+ test_forward<bg::projections::gn_sinu_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +m=0.5 +n=1.785");
+
+ test_forward<bg::projections::gnom_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 50);
+ test_forward<bg::projections::goode_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::gstmerc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::hammer_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::hatano_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+
+ test_forward<bg::projections::healpix_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 6);
+ test_forward<bg::projections::healpix_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 6);
+ test_forward<bg::projections::rhealpix_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 6);
+ test_forward<bg::projections::rhealpix_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 6);
+
+ test_forward<bg::projections::imw_p_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=5");
+ test_forward<bg::projections::isea_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::kav5_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::kav7_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::krovak_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+ test_forward<bg::projections::laea_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::lagrng_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +W=1", 8);
+ test_forward<bg::projections::larr_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 13);
+ test_forward<bg::projections::lask_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 5);
+ test_forward<bg::projections::lcc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_1=20n +lat_2=60n", 2);
+ test_forward<bg::projections::lcca_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_0=30n +lat_1=55n +lat_2=60n", 2);
+ test_forward<bg::projections::leac_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 8);
+ test_forward<bg::projections::loxim_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 3);
+ test_forward<bg::projections::lsat_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lsat=1 +path=1", 3);
+ test_forward<bg::projections::mbt_fps_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::mbt_s_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::mbtfpp_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::mbtfpq_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+
+ test_forward<bg::projections::mbtfps_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ test_forward<bg::projections::merc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 22);
+ test_forward<bg::projections::merc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 22);
+
+ test_forward<bg::projections::mil_os_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+ test_forward<bg::projections::mill_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 14);
+ test_forward<bg::projections::moll_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::murd1_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n");
+ test_forward<bg::projections::murd2_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n");
+ test_forward<bg::projections::murd3_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n");
+ test_forward<bg::projections::natearth_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::nell_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 4);
+ test_forward<bg::projections::nell_h_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 3);
+ test_forward<bg::projections::nicol_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ test_forward<bg::projections::oea_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e +m=1 +n=1", 4);
+ test_forward<bg::projections::omerc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e");
+ test_forward<bg::projections::ortel_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::ortho_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 9);
+ test_forward<bg::projections::pconic_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n +lon_0=10E");
+ test_forward<bg::projections::qsc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 10);
+ test_forward<bg::projections::poly_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::putp1_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::putp2_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::putp3_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 6);
+ test_forward<bg::projections::putp3p_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 5);
+ test_forward<bg::projections::putp4p_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::putp5_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::putp5p_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 3);
+ test_forward<bg::projections::putp6_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::putp6p_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::qua_aut_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::robin_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::rouss_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 8);
+ test_forward<bg::projections::rpoly_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ test_forward<bg::projections::sinu_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+ test_forward<bg::projections::sinu_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ test_forward<bg::projections::somerc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 22);
+ test_forward<bg::projections::stere_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_ts=50n", 8);
+ test_forward<bg::projections::sterea_ellipsoid>(amsterdam, utrecht, "+lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m");
+ test_forward<bg::projections::tcc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::tcea_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::tissot_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n", 2);
+
+ test_forward<bg::projections::tmerc_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::tmerc_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m");
+
+ test_forward<bg::projections::tpeqd_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n +lon_1=0 +lon_2=30e");
+ test_forward<bg::projections::tpers_spheroid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +tilt=50 +azi=20 +h=40000000", 14);
+
+ // Elliptical usage required
+ // TODO: if spherical UPS is not supported then ups_spheroid should be removed
+ //test_forward<bg::projections::ups_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 3);
+ test_forward<bg::projections::ups_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m", 3);
+
+ test_forward<bg::projections::urm5_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +n=.3 +q=.3 +alpha=10", 4);
+ test_forward<bg::projections::urmfps_spheroid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +n=0.50", 4);
+
+ test_forward<bg::projections::utm_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +lon_0=11d32'00E");
+
+ test_forward<bg::projections::vandg_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 13);
+ test_forward<bg::projections::vandg2_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 13);
+ test_forward<bg::projections::vandg3_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 13);
+ test_forward<bg::projections::vandg4_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::vitk1_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m +lat_1=20n +lat_2=60n");
+ test_forward<bg::projections::wag1_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::wag2_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::wag3_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 3);
+ test_forward<bg::projections::wag4_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::wag5_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::wag6_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+ test_forward<bg::projections::wag7_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 2);
+ test_forward<bg::projections::weren_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 4);
+ test_forward<bg::projections::wink1_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 3);
+ test_forward<bg::projections::wink2_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 4);
+ test_forward<bg::projections::wintri_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m");
+
+ // We SKIP ob_tran because it internally requires the factory and is, in that sense, not a static test
+ // test_forward<bg::projections::ob_tran_oblique>(amsterdam, utrecht, "+ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50");
+ // test_forward<bg::projections::ob_tran_transverse>(amsterdam, utrecht, "+ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50");
+
+ // TODO: wrong projections or parameters or input points
+// test_forward<bg::projections::ocea_spheroid>(auckland, wellington, "+ellps=sphere +units=m +lat_1=20s +lat_2=60s +lon_1=165e +lon_2=175e"); => distance is very large
+// test_forward<bg::projections::nsper_spheroid>(amsterdam, utrecht, "+ellps=WGS84 +units=m +a=10 +h=40000000"); => distance is 0
+// test_forward<bg::projections::lee_os_ellipsoid>(amsterdam, utrecht, "+ellps=WGS84 +units=m"); => distance is 407
+
+
+ // Alaska
+ {
+ geo_point_type anchorage = bg::make<geo_point_type>(-149.90, 61.22);
+ geo_point_type juneau = bg::make<geo_point_type>(-134.42, 58.30);
+ test_forward<bg::projections::alsk_ellipsoid>(anchorage, juneau, "+ellps=WGS84 +units=m +lon_0=-150W", 1);
+ }
+ // New Zealand
+ {
+ geo_point_type auckland = bg::make<geo_point_type>(174.74, -36.84);
+ geo_point_type wellington = bg::make<geo_point_type>(177.78, -41.29);
+ test_forward<bg::projections::nzmg_ellipsoid>(auckland, wellington, "+ellps=WGS84 +units=m", 0);
+ }
+
+ // US
+ {
+ geo_point_type aspen = bg::make<geo_point_type>(-106.84, 39.19);
+ geo_point_type denver = bg::make<geo_point_type>(-104.88, 39.76);
+ // TODO: test_forward<bg::projections::gs48_ellipsoid>(aspen, denver, "+ellps=WGS84 +units=m +lon1=-48");=> distance is > 1000
+ test_forward<bg::projections::gs50_ellipsoid>(aspen, denver, "+ellps=WGS84 +units=m +lon1=-50", 2);
+ }
+
+}
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/spar.cpp b/src/boost/libs/geometry/test/srs/spar.cpp
new file mode 100644
index 000000000..c8650d8b8
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/spar.cpp
@@ -0,0 +1,63 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/geometry/srs/projection.hpp>
+
+
+namespace srs = bg::srs;
+namespace par = bg::srs::spar;
+
+
+int test_main(int, char* [])
+{
+ typedef par::proj_aea proj;
+ typedef par::ellps_clrk80 ellps;
+ typedef par::datum_ire65 datum;
+ typedef par::o_proj<par::proj_tmerc> o_proj;
+ typedef par::guam guam;
+
+ BOOST_MPL_ASSERT_MSG((par::detail::is_param_tr<par::detail::proj_traits>::pred<proj>::value),
+ PROJ, (proj));
+ BOOST_MPL_ASSERT_MSG((!par::detail::is_param_tr<par::detail::proj_traits>::pred<int>::value),
+ NOT_PROJ, (int));
+
+ BOOST_MPL_ASSERT_MSG((par::detail::is_param_tr<par::detail::ellps_traits>::pred<ellps>::value),
+ ELLPS, (ellps));
+ BOOST_MPL_ASSERT_MSG((!par::detail::is_param_tr<par::detail::ellps_traits>::pred<int>::value),
+ NOT_ELLPS, (int));
+
+ BOOST_MPL_ASSERT_MSG((par::detail::is_param_tr<par::detail::datum_traits>::pred<datum>::value),
+ DATUM, (datum));
+ BOOST_MPL_ASSERT_MSG((!par::detail::is_param_tr<par::detail::datum_traits>::pred<int>::value),
+ NOT_DATUM, (int));
+
+ BOOST_MPL_ASSERT_MSG((par::detail::is_param_t<par::o_proj>::pred<o_proj>::value),
+ O_PROJ, (o_proj));
+ BOOST_MPL_ASSERT_MSG((!par::detail::is_param_t<par::o_proj>::pred<int>::value),
+ NOT_O_PROJ, (int));
+
+ BOOST_MPL_ASSERT_MSG((par::detail::is_param<par::guam>::pred<guam>::value),
+ GUAM, (guam));
+ BOOST_MPL_ASSERT_MSG((!par::detail::is_param<par::guam>::pred<int>::value),
+ NOT_GUAM, (int));
+
+ typedef par::parameters<proj, ellps, datum, o_proj, guam> params;
+ typedef par::parameters<proj, ellps> params_e;
+ typedef par::parameters<proj, datum> params_d;
+ typedef par::parameters<proj> params_0;
+
+ boost::ignore_unused<params, params_e, params_d, params_0>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/srs_transformer.cpp b/src/boost/libs/geometry/test/srs/srs_transformer.cpp
new file mode 100644
index 000000000..a7eb50c40
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/srs_transformer.cpp
@@ -0,0 +1,108 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/srs/epsg.hpp>
+#include <boost/geometry/srs/projection.hpp>
+#include <boost/geometry/srs/transformation.hpp>
+#include <boost/geometry/strategies/transform/srs_transformer.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#include "check_geometry.hpp"
+
+
+int test_main(int, char*[])
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+ using namespace bg::strategy::transform;
+
+ typedef point<double, 2, cs::geographic<degree> > point_ll;
+ typedef point<double, 2, cs::cartesian> point_xy;
+ //typedef polygon<point_ll> polygon_ll;
+ //typedef polygon<point_xy> polygon_xy;
+
+ {
+ point_ll pt_ll(1, 1);
+ point_ll pt_ll2(0, 0);
+ point_xy pt_xy(0, 0);
+ point_xy pt_xy2(0, 0);
+
+ srs_forward_transformer<projection<> > strategy_pf = proj4("+proj=tmerc +ellps=WGS84 +units=m");
+ srs_inverse_transformer<projection<> > strategy_pi = proj4("+proj=tmerc +ellps=WGS84 +units=m");
+ srs_forward_transformer<transformation<> > strategy_tf(proj4("+proj=tmerc +ellps=WGS84 +units=m"),
+ proj4("+proj=tmerc +ellps=clrk66 +units=m"));
+ srs_inverse_transformer<transformation<> > strategy_ti(proj4("+proj=tmerc +ellps=WGS84 +units=m"),
+ proj4("+proj=tmerc +ellps=clrk66 +units=m"));
+
+ bg::transform(pt_ll, pt_xy, strategy_pf);
+ test::check_geometry(pt_xy, "POINT(111308.33561309829 110591.34223734379)", 0.0001);
+
+ bg::transform(pt_xy, pt_ll2, strategy_pi);
+ test::check_geometry(pt_ll2, "POINT(1 1)", 0.0001);
+
+ bg::transform(pt_xy, pt_xy2, strategy_tf);
+ test::check_geometry(pt_xy2, "POINT(111309.54843459482 110584.27813586517)", 0.0001);
+
+ bg::transform(pt_xy2, pt_xy, strategy_ti);
+ test::check_geometry(pt_xy, "POINT(111308.33561309829 110591.34223734379)", 0.0001);
+ }
+
+ {
+ srs_forward_transformer<projection<> > strategy_pf = epsg(2000);
+ srs_inverse_transformer<projection<> > strategy_pi = epsg(2000);
+ srs_forward_transformer<transformation<> > strategy_tf(epsg(2000), epsg(2001));
+ srs_inverse_transformer<transformation<> > strategy_ti(epsg(2000), epsg(2001));
+ }
+
+ {
+ using namespace bg::srs::spar;
+
+ srs_forward_transformer
+ <
+ projection<parameters<proj_tmerc, ellps_wgs84> >
+ > strategy_pf;
+ srs_forward_transformer
+ <
+ projection<parameters<proj_tmerc, ellps_wgs84> >
+ > strategy_pi;
+ srs_forward_transformer
+ <
+ transformation
+ <
+ parameters<proj_tmerc, ellps_wgs84>,
+ parameters<proj_tmerc, ellps_clrk66>
+ >
+ > strategy_tf;
+ srs_forward_transformer
+ <
+ transformation
+ <
+ parameters<proj_tmerc, ellps_wgs84>,
+ parameters<proj_tmerc, ellps_clrk66>
+ >
+ > strategy_ti;
+ }
+
+ {
+ srs_forward_transformer<projection<static_epsg<2000> > > strategy_pf;
+ srs_forward_transformer<projection<static_epsg<2000> > > strategy_pi;
+ srs_forward_transformer<transformation<static_epsg<2000>, static_epsg<2001> > > strategy_tf;
+ srs_forward_transformer<transformation<static_epsg<2000>, static_epsg<2001> > > strategy_ti;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/transformation_epsg.cpp b/src/boost/libs/geometry/test/srs/transformation_epsg.cpp
new file mode 100644
index 000000000..c57726d03
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/transformation_epsg.cpp
@@ -0,0 +1,57 @@
+// Boost.Geometry
+
+// Copyright (c) 2020, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/srs/epsg.hpp>
+#include <boost/geometry/srs/transformation.hpp>
+
+#include "check_geometry.hpp"
+
+template <typename T>
+void test_issue_657()
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+
+ typedef model::point<T, 2, bg::cs::cartesian> point_car;
+ typedef model::point<T, 2, cs::geographic<bg::degree> > point_geo;
+
+ transformation<> tr1((bg::srs::epsg(4326)),
+ (bg::srs::proj4(
+ "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 "
+ "+y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs")));
+ transformation<> tr2((bg::srs::epsg(4326)),
+ (bg::srs::epsg(3785)));
+ transformation<bg::srs::static_epsg<4326>,
+ bg::srs::static_epsg<3785> > tr3;
+
+ point_geo pt(-114.7399212, 36.0160698);
+ point_car pt_out(-12772789.6016, 4302832.77709);
+ point_car pt_out1, pt_out2, pt_out3;
+
+ tr1.forward(pt, pt_out1);
+ tr2.forward(pt, pt_out2);
+ tr3.forward(pt, pt_out3);
+
+ test::check_geometry(pt_out1, pt_out, 0.001);
+ test::check_geometry(pt_out2, pt_out, 0.001);
+ test::check_geometry(pt_out3, pt_out, 0.001);
+}
+
+int test_main(int, char*[])
+{
+ test_issue_657<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/srs/transformation_interface.cpp b/src/boost/libs/geometry/test/srs/transformation_interface.cpp
new file mode 100644
index 000000000..46469a4c1
--- /dev/null
+++ b/src/boost/libs/geometry/test/srs/transformation_interface.cpp
@@ -0,0 +1,204 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/srs/transformation.hpp>
+
+#include "check_geometry.hpp"
+
+//#include <proj_api.h>
+
+template <typename T>
+void test_geometries()
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+
+ typedef model::point<T, 2, cs::cartesian> point;
+ typedef model::segment<point> segment;
+ typedef model::linestring<point> linestring;
+ typedef model::ring<point> ring;
+ typedef model::polygon<point> polygon;
+ typedef model::multi_point<point> mpoint;
+ typedef model::multi_linestring<linestring> mlinestring;
+ typedef model::multi_polygon<polygon> mpolygon;
+
+ std::cout << std::setprecision(12);
+
+ double d2r = math::d2r<T>();
+ //double r2d = math::r2d<T>();
+
+ std::string from = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
+ std::string to = "+proj=longlat +ellps=airy +datum=OSGB36 +no_defs";
+
+ {
+ point pt(18.5 * d2r, 54.2 * d2r);
+ point pt2(0, 0);
+ segment seg(pt, pt);
+ segment seg2;
+ linestring ls; ls.push_back(pt);
+ linestring ls2;
+ ring rg; rg.push_back(pt);
+ ring rg2;
+ polygon poly; poly.outer() = rg;
+ polygon poly2;
+ mpoint mpt; mpt.push_back(pt);
+ mpoint mpt2;
+ mlinestring mls; mls.push_back(ls);
+ mlinestring mls2;
+ mpolygon mpoly; mpoly.push_back(poly);
+ mpolygon mpoly2;
+
+ transformation<> tr((proj4(from)), (proj4(to)));
+ //transformation<> tr((epsg(4326)), (epsg(25832)));
+
+ tr.forward(pt, pt2);
+ tr.forward(seg, seg2);
+ tr.forward(ls, ls2);
+ tr.forward(rg, rg2);
+ tr.forward(poly, poly2);
+ tr.forward(mpt, mpt2);
+ tr.forward(mls, mls2);
+ tr.forward(mpoly, mpoly2);
+
+ test::check_geometry(pt2, "POINT(0.322952937968 0.9459567165)", 0.001);
+ test::check_geometry(seg2, "LINESTRING(0.322952937968 0.9459567165,0.322952937968 0.9459567165)", 0.001);
+ test::check_geometry(ls2, "LINESTRING(0.322952937968 0.9459567165)", 0.001);
+ test::check_geometry(rg2, "POLYGON((0.322952937968 0.9459567165))", 0.001);
+ test::check_geometry(poly2, "POLYGON((0.322952937968 0.9459567165))", 0.001);
+ test::check_geometry(mpt2, "MULTIPOINT((0.322952937968 0.9459567165))", 0.001);
+ test::check_geometry(mls2, "MULTILINESTRING((0.322952937968 0.9459567165))", 0.001);
+ test::check_geometry(mpoly2, "MULTIPOLYGON(((0.322952937968 0.9459567165)))", 0.001);
+
+ tr.inverse(pt2, pt);
+ tr.inverse(seg2, seg);
+ tr.inverse(ls2, ls);
+ tr.inverse(rg2, rg);
+ tr.inverse(poly2, poly);
+ tr.inverse(mpt2, mpt);
+ tr.inverse(mls2, mls);
+ tr.inverse(mpoly2, mpoly);
+
+ test::check_geometry(pt, "POINT(0.322885911738 0.945968454552)", 0.001);
+ test::check_geometry(seg, "LINESTRING(0.322885911738 0.945968454552,0.322885911738 0.945968454552)", 0.001);
+ test::check_geometry(ls, "LINESTRING(0.322885911738 0.945968454552)", 0.001);
+ test::check_geometry(rg, "POLYGON((0.322885911738 0.945968454552))", 0.001);
+ test::check_geometry(poly, "POLYGON((0.322885911738 0.945968454552))", 0.001);
+ test::check_geometry(mpt, "MULTIPOINT((0.322885911738 0.945968454552))", 0.001);
+ test::check_geometry(mls, "MULTILINESTRING((0.322885911738 0.945968454552))", 0.001);
+ test::check_geometry(mpoly, "MULTIPOLYGON(((0.322885911738 0.945968454552)))", 0.001);
+ }
+
+ /*{
+ projPJ pj_from, pj_to;
+
+ pj_from = pj_init_plus(from.c_str());
+ pj_to = pj_init_plus(to.c_str());
+
+ double x = get<0>(pt_xy);
+ double y = get<1>(pt_xy);
+ pj_transform(pj_from, pj_to, 1, 0, &x, &y, NULL );
+
+ std::cout << x * r2d << " " << y * r2d << std::endl;
+ }*/
+}
+
+template <typename P1, typename P2, typename Tr>
+inline void test_combination(Tr const& tr, P1 const& pt,
+ std::string const& expected_fwd,
+ P1 const& expected_inv)
+{
+ using namespace boost::geometry;
+
+ P2 pt2;
+
+ tr.forward(pt, pt2);
+
+ test::check_geometry(pt2, expected_fwd, 0.001);
+
+ P1 pt1;
+
+ tr.inverse(pt2, pt1);
+
+ test::check_geometry(pt1, expected_inv, 0.001);
+}
+
+void test_combinations(std::string const& from, std::string const& to,
+ std::string const& in_deg,
+ std::string const& expected_deg,
+ std::string const& expected_rad,
+ std::string const& expected_inv_deg)
+{
+ using namespace boost::geometry;
+ using namespace boost::geometry::model;
+ using namespace boost::geometry::srs;
+
+ typedef model::point<double, 2, cs::cartesian> xy;
+ typedef model::point<double, 2, cs::geographic<degree> > ll_d;
+ typedef model::point<double, 2, cs::geographic<radian> > ll_r;
+ //typedef model::point<double, 3, cs::cartesian> xyz;
+ //typedef model::point<double, 3, cs::geographic<degree> > llz_d;
+ //typedef model::point<double, 3, cs::geographic<radian> > llz_r;
+
+ transformation<> tr((proj4(from)), (proj4(to)));
+
+ ll_d d;
+ bg::read_wkt(in_deg, d);
+ ll_r r(bg::get_as_radian<0>(d), bg::get_as_radian<1>(d));
+ xy c(bg::get<0>(r), bg::get<1>(r));
+
+ ll_d inv_d;
+ bg::read_wkt(expected_inv_deg, inv_d);
+ ll_r inv_r(bg::get_as_radian<0>(inv_d), bg::get_as_radian<1>(inv_d));
+ xy inv_c(bg::get<0>(inv_r), bg::get<1>(inv_r));
+
+ test_combination<xy, xy>(tr, c, expected_rad, inv_c);
+ test_combination<xy, ll_r>(tr, c, expected_rad, inv_c);
+ test_combination<xy, ll_d>(tr, c, expected_deg, inv_c);
+ test_combination<ll_r, xy>(tr, r, expected_rad, inv_r);
+ test_combination<ll_r, ll_r>(tr, r, expected_rad, inv_r);
+ test_combination<ll_r, ll_d>(tr, r, expected_deg, inv_r);
+ test_combination<ll_d, xy>(tr, d, expected_rad, inv_d);
+ test_combination<ll_d, ll_r>(tr, d, expected_rad, inv_d);
+ test_combination<ll_d, ll_d>(tr, d, expected_deg, inv_d);
+}
+
+int test_main(int, char*[])
+{
+ test_geometries<double>();
+ test_geometries<float>();
+
+ test_combinations("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",
+ "+proj=longlat +ellps=airy +datum=OSGB36 +no_defs",
+ "POINT(18.5 54.2)",
+ "POINT(18.5038403269 54.1993274575)",
+ "POINT(0.322952937968 0.9459567165)",
+ "POINT(18.5 54.2)");
+ test_combinations("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",
+ "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +no_defs",
+ "POINT(18.5 54.2)",
+ "POINT(2059410.57968 7208125.2609)",
+ "POINT(2059410.57968 7208125.2609)",
+ "POINT(18.5 54.2)");
+ test_combinations("+proj=longlat +ellps=clrk80 +units=m +no_defs",
+ "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs",
+ "POINT(1 1)",
+ "POINT(9413505.3284665551 237337.74515944949)",
+ "POINT(9413505.3284665551 237337.74515944949)",
+ // this result seems to be wrong, it's the same with projection
+ "POINT(-2.4463131191981073 1.5066638962045082)");
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/Jamfile b/src/boost/libs/geometry/test/strategies/Jamfile
new file mode 100644
index 000000000..e58abee7e
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/Jamfile
@@ -0,0 +1,46 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014-2019.
+# Modifications copyright (c) 2014-2019, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-strategies
+ :
+ [ run andoyer.cpp : : : : strategies_andoyer ]
+ [ run cross_track.cpp : : : : strategies_cross_track ]
+ [ run crossings_multiply.cpp : : : : strategies_crossings_multiply ]
+ [ run distance_default_result.cpp : : : : strategies_distance_default_result ]
+ [ run distance_cross_track.cpp : : : : strategies_distance_cross_track ]
+ [ run douglas_peucker.cpp : : : : strategies_douglas_peucker ]
+ [ run envelope_segment.cpp : : : : strategies_envelope_segment ]
+ [ run franklin.cpp : : : : strategies_franklin ]
+ [ run haversine.cpp : : : : strategies_haversine ]
+ [ run point_in_box.cpp : : : : strategies_point_in_box ]
+ [ run projected_point.cpp : : : : strategies_projected_point ]
+ [ run projected_point_ax.cpp : : : : strategies_projected_point_ax ]
+ [ run pythagoras.cpp : : : : strategies_pythagoras ]
+ [ run pythagoras_point_box.cpp : : : : strategies_pythagoras_point_box ]
+ [ run segment_intersection.cpp : : : : strategies_segment_intersection ]
+ [ run segment_intersection_collinear.cpp : : : : strategies_segment_intersection_collinear ]
+ [ run segment_intersection_geo.cpp : : : : strategies_segment_intersection_geo ]
+ [ run segment_intersection_sph.cpp : : : : strategies_segment_intersection_sph ]
+ [ run side_of_intersection.cpp : : : : strategies_side_of_intersection ]
+ [ run spherical_side.cpp : : : : strategies_spherical_side ]
+ [ run thomas.cpp : : : : strategies_thomas ]
+ [ run transform_cs.cpp : : : : strategies_transform_cs ]
+ [ run transformer.cpp : : : : strategies_transformer ]
+ [ run matrix_transformer.cpp : : : : strategies_matrix_transformer ]
+ [ run vincenty.cpp : : : : strategies_vincenty ]
+ [ run winding.cpp : : : : strategies_winding ]
+ ;
diff --git a/src/boost/libs/geometry/test/strategies/andoyer.cpp b/src/boost/libs/geometry/test/strategies/andoyer.cpp
new file mode 100644
index 000000000..515bbf2e8
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/andoyer.cpp
@@ -0,0 +1,346 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2016 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2016 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014-2017.
+// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/concept_check.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+#include <boost/geometry/strategies/geographic/distance_andoyer.hpp>
+#include <boost/geometry/strategies/geographic/side_andoyer.hpp>
+
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+
+
+double make_deg(double deg, double min, double sec)
+{
+ return deg + min / 60.0 + sec / 3600.0;
+}
+
+double to_rad(double deg)
+{
+ return bg::math::pi<double>() * deg / 180.0;
+}
+
+double to_deg(double rad)
+{
+ return 180.0 * rad / bg::math::pi<double>();
+}
+
+double normlized_deg(double deg)
+{
+ if (deg > 180)
+ return deg - 360;
+ else if (deg < -180)
+ return deg + 360;
+ else
+ return deg;
+}
+
+
+template <typename P1, typename P2>
+void test_distance(double lon1, double lat1, double lon2, double lat2, double expected_km)
+{
+ // Set radius type, but for integer coordinates we want to have floating point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<P1>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+
+ typedef bg::strategy::distance::andoyer<stype> andoyer_type;
+ typedef bg::strategy::distance::geographic<bg::strategy::andoyer, stype> geographic_type;
+ typedef bg::formula::andoyer_inverse<rtype, true, false> andoyer_inverse_type;
+
+ BOOST_CONCEPT_ASSERT
+ (
+ (bg::concepts::PointDistanceStrategy<andoyer_type, P1, P2>)
+ );
+
+ andoyer_type andoyer;
+ geographic_type geographic;
+ typedef typename bg::strategy::distance
+ ::services::return_type<andoyer_type, P1, P2>::type return_type;
+
+ P1 p1;
+ P2 p2;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+
+ return_type d_strategy = andoyer.apply(p1, p2);
+ return_type d_strategy2 = geographic.apply(p1, p2);
+ return_type d_function = bg::distance(p1, p2, andoyer);
+
+ double diff = bg::math::longitude_distance_signed<bg::degree>(lon1, lon2);
+ return_type d_formula;
+
+ // if the points lay on a meridian, distance strategy calls the special formula
+ // for meridian distance that returns different result than andoyer formula
+ // for nearly antipodal points
+ if (bg::math::equals(diff, 0.0)
+ || bg::math::equals(bg::math::abs(diff), 180.0))
+ {
+ d_formula = d_strategy;
+ }
+ else
+ {
+ d_formula = andoyer_inverse_type::apply(to_rad(lon1), to_rad(lat1),
+ to_rad(lon2), to_rad(lat2),
+ stype()).distance;
+ }
+
+ BOOST_CHECK_CLOSE(d_strategy / 1000.0, expected_km, 0.001);
+ BOOST_CHECK_CLOSE(d_strategy2 / 1000.0, expected_km, 0.001);
+ BOOST_CHECK_CLOSE(d_function / 1000.0, expected_km, 0.001);
+ BOOST_CHECK_CLOSE(d_formula / 1000.0, expected_km, 0.001);
+}
+
+template <typename PS, typename P>
+void test_azimuth(double lon1, double lat1,
+ double lon2, double lat2,
+ double expected_azimuth_deg)
+{
+ // Set radius type, but for integer coordinates we want to have floating point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<PS>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+ typedef bg::formula::andoyer_inverse<rtype, false, true> andoyer_inverse_type;
+
+ rtype a_formula = andoyer_inverse_type::apply(to_rad(lon1), to_rad(lat1), to_rad(lon2), to_rad(lat2), stype()).azimuth;
+
+ rtype azimuth_deg = to_deg(a_formula);
+
+ if (bg::math::equals(azimuth_deg, -180.0))
+ azimuth_deg = 180.0;
+ if (bg::math::equals(expected_azimuth_deg, -180.0))
+ expected_azimuth_deg = 180.0;
+
+ if (bg::math::equals(expected_azimuth_deg, 0.0))
+ {
+ BOOST_CHECK(bg::math::equals(azimuth_deg, expected_azimuth_deg));
+ }
+ else
+ {
+ BOOST_CHECK_CLOSE(azimuth_deg, expected_azimuth_deg, 0.001);
+ }
+}
+
+template <typename P1, typename P2>
+void test_distazi(double lon1, double lat1, double lon2, double lat2,
+ double expected_km, double expected_azimuth_deg)
+{
+ test_distance<P1, P2>(lon1, lat1, lon2, lat2, expected_km);
+ test_azimuth<P1, P2>(lon1, lat1, lon2, lat2, expected_azimuth_deg);
+}
+
+// requires SW->NE
+template <typename P1, typename P2>
+void test_distazi_symm(double lon1, double lat1, double lon2, double lat2,
+ double expected_km, double expected_azimuth_deg,
+ bool is_antipodal = false)
+{
+ double d180 = is_antipodal ? 0 : 180;
+ test_distazi<P1, P2>(lon1, lat1, lon2, lat2, expected_km, expected_azimuth_deg);
+ test_distazi<P1, P2>(-lon1, lat1, -lon2, lat2, expected_km, -expected_azimuth_deg);
+ test_distazi<P1, P2>(lon1, -lat1, lon2, -lat2, expected_km, d180 - expected_azimuth_deg);
+ test_distazi<P1, P2>(-lon1, -lat1, -lon2, -lat2, expected_km, -d180 + expected_azimuth_deg);
+}
+
+template <typename P1, typename P2>
+void test_distazi_symmNS(double lon1, double lat1, double lon2, double lat2,
+ double expected_km, double expected_azimuth_deg)
+{
+ test_distazi<P1, P2>(lon1, lat1, lon2, lat2, expected_km, expected_azimuth_deg);
+ test_distazi<P1, P2>(lon1, -lat1, lon2, -lat2, expected_km, 180 - expected_azimuth_deg);
+}
+
+
+template <typename PS, typename P>
+void test_side(double lon1, double lat1,
+ double lon2, double lat2,
+ double lon, double lat,
+ int expected_side)
+{
+ // Set radius type, but for integer coordinates we want to have floating point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<PS>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+
+ typedef bg::strategy::side::andoyer<stype> strategy_type;
+ typedef bg::strategy::side::geographic<bg::strategy::andoyer, stype> strategy2_type;
+
+ strategy_type strategy;
+ strategy2_type strategy2;
+
+ PS p1, p2;
+ P p;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+ bg::assign_values(p, lon, lat);
+
+ int side = strategy.apply(p1, p2, p);
+ int side2 = strategy2.apply(p1, p2, p);
+
+ BOOST_CHECK_EQUAL(side, expected_side);
+ BOOST_CHECK_EQUAL(side2, expected_side);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ // polar
+ test_distazi<P1, P2>(0, 90, 1, 80,
+ 1116.814237, 179);
+
+ // no point difference
+ test_distazi<P1, P2>(4, 52, 4, 52,
+ 0.0, 0.0);
+
+ // normal cases
+ test_distazi<P1, P2>(4, 52, 3, 40,
+ 1336.039890, -176.3086);
+ test_distazi<P1, P2>(3, 52, 4, 40,
+ 1336.039890, 176.3086);
+ test_distazi<P1, P2>(make_deg(17, 19, 43.28),
+ make_deg(40, 30, 31.151),
+ 18, 40,
+ 80.323245,
+ make_deg(134, 27, 50.05));
+
+ // antipodal
+ // ok? in those cases shorter path would pass through a pole
+ // but 90 or -90 would be consistent with distance?
+ test_distazi<P1, P2>(0, 0, 180, 0, 20003.9, 0.0);
+ test_distazi<P1, P2>(0, 0, -180, 0, 20003.9, 0.0);
+ test_distazi<P1, P2>(-90, 0, 90, 0, 20003.9, 0.0);
+ test_distazi<P1, P2>(90, 0, -90, 0, 20003.9, 0.0);
+
+ // 0, 45, 90 ...
+ for (int i = 0 ; i < 360 ; i += 45)
+ {
+ // 0 45 90 ...
+ double l = normlized_deg(i);
+ // -1 44 89 ...
+ double l1 = normlized_deg(i - 1);
+ // 1 46 91 ...
+ double l2 = normlized_deg(i + 1);
+
+ // near equator
+ test_distazi_symm<P1, P2>(l1, -1, l2, 1, 313.7956, 45.1964);
+
+ // near poles
+ test_distazi_symmNS<P1, P2>(l, -89.5, l, 89.5, 19892.2, 0.0);
+ test_distazi_symmNS<P1, P2>(l, -89.6, l, 89.6, 19914.6, 0.0);
+ test_distazi_symmNS<P1, P2>(l, -89.7, l, 89.7, 19936.9, 0.0);
+ test_distazi_symmNS<P1, P2>(l, -89.8, l, 89.8, 19959.2, 0.0);
+ test_distazi_symmNS<P1, P2>(l, -89.9, l, 89.9, 19981.6, 0.0);
+ test_distazi_symmNS<P1, P2>(l, -89.99, l, 89.99, 20001.7, 0.0);
+ test_distazi_symmNS<P1, P2>(l, -89.999, l, 89.999, 20003.7, 0.0);
+ // antipodal
+ test_distazi_symmNS<P1, P2>(l, -90, l, 90, 20003.9, 0.0);
+
+ test_distazi_symm<P1, P2>(normlized_deg(l-10.0), -10.0, normlized_deg(l+135), 45, 14892.1, 34.1802);
+ test_distazi_symm<P1, P2>(normlized_deg(l-30.0), -30.0, normlized_deg(l+135), 45, 17890.7, 33.7002);
+ test_distazi_symm<P1, P2>(normlized_deg(l-40.0), -40.0, normlized_deg(l+135), 45, 19319.7, 33.4801);
+ test_distazi_symm<P1, P2>(normlized_deg(l-41.0), -41.0, normlized_deg(l+135), 45, 19459.1, 33.2408);
+ test_distazi_symm<P1, P2>(normlized_deg(l-42.0), -42.0, normlized_deg(l+135), 45, 19597.8, 32.7844);
+ test_distazi_symm<P1, P2>(normlized_deg(l-43.0), -43.0, normlized_deg(l+135), 45, 19735.8, 31.7784);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.0), -44.0, normlized_deg(l+135), 45, 19873.0, 28.5588);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.1), -44.1, normlized_deg(l+135), 45, 19886.7, 27.8304);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.2), -44.2, normlized_deg(l+135), 45, 19900.4, 26.9173);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.3), -44.3, normlized_deg(l+135), 45, 19914.1, 25.7401);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.4), -44.4, normlized_deg(l+135), 45, 19927.7, 24.1668);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.5), -44.5, normlized_deg(l+135), 45, 19941.4, 21.9599);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.6), -44.6, normlized_deg(l+135), 45, 19955.0, 18.6438);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.7), -44.7, normlized_deg(l+135), 45, 19968.6, 13.1096);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.8), -44.8, normlized_deg(l+135), 45, 19982.3, 2.0300);
+ // nearly antipodal
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.9), -44.9, normlized_deg(l+135), 45, 19995.9, 0.0);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.95), -44.95, normlized_deg(l+135), 45, 20002.7, 0.0);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.99), -44.99, normlized_deg(l+135), 45, 20008.1, 0.0);
+ test_distazi_symm<P1, P2>(normlized_deg(l-44.999), -44.999, normlized_deg(l+135), 45, 20009.4, 0.0);
+ // antipodal
+ test_distazi_symm<P1, P2>(normlized_deg(l-45), -45, normlized_deg(l+135), 45, 20003.92, 0.0, true);
+ }
+
+ /* SQL Server gives:
+ 1116.82586908528, 0, 1336.02721932545
+
+ with:
+SELECT 0.001 * geography::STGeomFromText('POINT(0 90)', 4326).STDistance(geography::STGeomFromText('POINT(1 80)', 4326))
+union SELECT 0.001 * geography::STGeomFromText('POINT(4 52)', 4326).STDistance(geography::STGeomFromText('POINT(4 52)', 4326))
+union SELECT 0.001 * geography::STGeomFromText('POINT(4 52)', 4326).STDistance(geography::STGeomFromText('POINT(3 40)', 4326))
+ */
+
+
+ test_side<P1, P2>(0, 0, 0, 1, 0, 2, 0);
+ test_side<P1, P2>(0, 0, 0, 1, 0, -2, 0);
+ test_side<P1, P2>(10, 0, 10, 1, 10, 2, 0);
+ test_side<P1, P2>(10, 0, 10, -1, 10, 2, 0);
+
+ test_side<P1, P2>(10, 0, 10, 1, 0, 2, 1); // left
+ test_side<P1, P2>(10, 0, 10, -1, 0, 2, -1); // right
+
+ test_side<P1, P2>(-10, -10, 10, 10, 10, 0, -1); // right
+ test_side<P1, P2>(-10, -10, 10, 10, -10, 0, 1); // left
+ test_side<P1, P2>(170, -10, -170, 10, -170, 0, -1); // right
+ test_side<P1, P2>(170, -10, -170, 10, 170, 0, 1); // left
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+int test_main(int, char* [])
+{
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+ //test_all<bg::model::point<int, 2, bg::cs::geographic<bg::degree> > >();
+ //test_all<bg::model::point<float, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath::Big<1,4>, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/cross_track.cpp b/src/boost/libs/geometry/test/strategies/cross_track.cpp
new file mode 100644
index 000000000..861251e4e
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/cross_track.cpp
@@ -0,0 +1,181 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+
+#include <boost/geometry/strategies/spherical/distance_haversine.hpp>
+#include <boost/geometry/strategies/spherical/distance_cross_track.hpp>
+
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+
+// This test is GIS oriented.
+
+
+template <typename Point, typename LatitudePolicy>
+void test_distance(
+ typename bg::coordinate_type<Point>::type const& lon1,
+ typename bg::coordinate_type<Point>::type const& lat1,
+ typename bg::coordinate_type<Point>::type const& lon2,
+ typename bg::coordinate_type<Point>::type const& lat2,
+ typename bg::coordinate_type<Point>::type const& lon3,
+ typename bg::coordinate_type<Point>::type const& lat3,
+ typename bg::coordinate_type<Point>::type const& radius,
+ typename bg::coordinate_type<Point>::type const& expected,
+ typename bg::coordinate_type<Point>::type const& tolerance)
+{
+ typedef bg::strategy::distance::cross_track
+ <
+ typename bg::coordinate_type<Point>::type
+ > strategy_type;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ strategy_type,
+ Point,
+ Point
+ >::type return_type;
+
+
+ {
+ // compile-check if there is a strategy for this type
+ typedef typename bg::strategy::distance::services::default_strategy
+ <
+ bg::point_tag, bg::segment_tag, Point, Point
+ >::type cross_track_strategy_type;
+
+ typedef typename bg::strategy::distance::services::default_strategy
+ <
+ bg::segment_tag, bg::point_tag, Point, Point
+ >::type reversed_tags_cross_track_strategy_type;
+
+ boost::ignore_unused<cross_track_strategy_type,
+ reversed_tags_cross_track_strategy_type>();
+ }
+
+
+ BOOST_CONCEPT_ASSERT
+ (
+ (bg::concepts::PointSegmentDistanceStrategy<strategy_type, Point, Point>)
+ );
+
+
+ Point p1, p2, p3;
+ bg::assign_values(p1, lon1, LatitudePolicy::apply(lat1));
+ bg::assign_values(p2, lon2, LatitudePolicy::apply(lat2));
+ bg::assign_values(p3, lon3, LatitudePolicy::apply(lat3));
+
+
+ strategy_type strategy;
+ return_type d = strategy.apply(p1, p2, p3);
+
+ BOOST_CHECK_CLOSE(radius * d, expected, tolerance);
+
+ // The strategy should return the same result if we reverse the parameters
+ d = strategy.apply(p1, p3, p2);
+ BOOST_CHECK_CLOSE(radius * d, expected, tolerance);
+
+ // Test specifying radius explicitly
+ strategy_type strategy_radius(radius);
+ d = strategy_radius.apply(p1, p2, p3);
+ BOOST_CHECK_CLOSE(d, expected, tolerance);
+
+
+ // Test the "default strategy" registration
+ bg::model::referring_segment<Point const> segment(p2, p3);
+ d = bg::distance(p1, segment);
+ BOOST_CHECK_CLOSE(radius * d, expected, tolerance);
+}
+
+
+template <typename Point>
+void test_case_boost_geometry_list_20120625()
+{
+ // This function tests the bug submitted by Karsten Ahnert
+ // on Boost.Geometry list at 2012-06-25, and wherefore he
+ // submitted a patch a few days later.
+
+ Point p1, p2;
+ bg::model::segment<Point> s1, s2;
+
+ bg::read_wkt("POINT(1 1)", p1);
+ bg::read_wkt("POINT(5 1)", p2);
+ bg::read_wkt("LINESTRING(0 2,2 2)", s1);
+ bg::read_wkt("LINESTRING(2 2,4 2)", s2);
+
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p1, s1), 0.0174586, 0.0001);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p1, s2), 0.0246783, 0.0001);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p2, s1), 0.0551745, 0.0001);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p2, s2), 0.0246783, 0.0001);
+
+ // Check degenerated segments
+ bg::model::segment<Point> s3;
+ bg::read_wkt("LINESTRING(2 2,2 2)", s3);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p1, s3), 0.0246783, 0.0001);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p2, s3), 0.0551745, 0.0001);
+
+ // Point/Point distance should be identical:
+ Point p3;
+ bg::read_wkt("POINT(2 2)", p3);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p1, p3), 0.0246783, 0.0001);
+ BOOST_CHECK_CLOSE(boost::geometry::distance(p2, p3), 0.0551745, 0.0001);
+}
+
+
+template <typename Point, typename LatitudePolicy>
+void test_all()
+{
+ typename bg::coordinate_type<Point>::type const average_earth_radius = 6372795.0;
+
+ // distance (Paris <-> Amsterdam/Barcelona),
+ // with coordinates rounded as below ~87 km
+ // is equal to distance (Paris <-> Barcelona/Amsterdam)
+ typename bg::coordinate_type<Point>::type const p_to_ab = 86.798321 * 1000.0;
+ test_distance<Point, LatitudePolicy>(2, 48, 4, 52, 2, 41, average_earth_radius, p_to_ab, 0.1);
+ test_distance<Point, LatitudePolicy>(2, 48, 2, 41, 4, 52, average_earth_radius, p_to_ab, 0.1);
+
+ test_case_boost_geometry_list_20120625<Point>();
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> >, geographic_policy >();
+
+ // NYI: haversine for mathematical spherical coordinate systems
+ // test_all<bg::model::point<double, 2, bg::cs::spherical<bg::degree> >, mathematical_policya >();
+
+#if defined(HAVE_TTMATH)
+ typedef ttmath::Big<1,4> tt;
+ //test_all<bg::model::point<tt, 2, bg::cs::geographic<bg::degree> >, geographic_policy>();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/crossings_multiply.cpp b/src/boost/libs/geometry/test/strategies/crossings_multiply.cpp
new file mode 100644
index 000000000..f57d383f1
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/crossings_multiply.cpp
@@ -0,0 +1,87 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <strategies/test_within.hpp>
+
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> polygon;
+
+ std::string const box = "POLYGON((0 0,0 2,2 2,2 0,0 0))";
+ std::string const triangle = "POLYGON((0 0,0 4,6 0,0 0))";
+ std::string const with_hole = "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,2 1,2 2,1 2,1 1))";
+
+ bg::strategy::within::crossings_multiply<Point> s;
+
+
+ test_geometry<Point, polygon>("b1", "POINT(1 1)", box, s, true);
+ test_geometry<Point, polygon>("b2", "POINT(3 3)", box, s, false);
+
+ // Test ALL corners (officialy false but some strategies might answer true)
+ test_geometry<Point, polygon>("b3a", "POINT(0 0)", box, s, false);
+ test_geometry<Point, polygon>("b3b", "POINT(0 2)", box, s, false);
+ test_geometry<Point, polygon>("b3c", "POINT(2 2)", box, s, false);
+ test_geometry<Point, polygon>("b3d", "POINT(2 0)", box, s, false);
+
+ // Test ALL sides (officialy false but some strategies might answer true)
+ test_geometry<Point, polygon>("b4a", "POINT(0 1)", box, s, false);
+ test_geometry<Point, polygon>("b4b", "POINT(1 2)", box, s, true); // different
+ test_geometry<Point, polygon>("b4c", "POINT(2 1)", box, s, false);
+ test_geometry<Point, polygon>("b4d", "POINT(1 0)", box, s, false);
+
+
+ test_geometry<Point, polygon>("t1", "POINT(1 1)", triangle, s, true);
+ test_geometry<Point, polygon>("t2", "POINT(3 3)", triangle, s, false);
+
+ test_geometry<Point, polygon>("t3a", "POINT(0 0)", triangle, s, false);
+ test_geometry<Point, polygon>("t3b", "POINT(0 4)", triangle, s, true); // diff
+ test_geometry<Point, polygon>("t3c", "POINT(5 0)", triangle, s, false);
+
+ test_geometry<Point, polygon>("t4a", "POINT(0 2)", triangle, s, false);
+ test_geometry<Point, polygon>("t4b", "POINT(3 2)", triangle, s, false);
+ test_geometry<Point, polygon>("t4c", "POINT(2 0)", triangle, s, false);
+
+
+ test_geometry<Point, polygon>("h1", "POINT(0.5 0.5)", with_hole, s, true);
+ test_geometry<Point, polygon>("h2a", "POINT(1.5 1.5)", with_hole, s, false);
+ test_geometry<Point, polygon>("h2b", "POINT(5 5)", with_hole, s, false);
+
+ test_geometry<Point, polygon>("h3a", "POINT(1 1)", with_hole, s, true); // diff
+ test_geometry<Point, polygon>("h3b", "POINT(2 2)", with_hole, s, false);
+ test_geometry<Point, polygon>("h3c", "POINT(0 0)", with_hole, s, false);
+
+ test_geometry<Point, polygon>("h4a", "POINT(1 1.5)", with_hole, s, false);
+ test_geometry<Point, polygon>("h4b", "POINT(1.5 2)", with_hole, s, false);
+
+ // Lying ON (one of the sides of) interior ring
+ test_geometry<Point, polygon>("#77-1", "POINT(6 3.5)",
+ "POLYGON((5 3,5 4,4 4,4 5,3 5,3 6,5 6,5 5,7 5,7 6,8 6,8 5,9 5,9 2,8 2,8 1,7 1,7 2,5 2,5 3),(6 3,8 3,8 4,6 4,6 3))",
+ s, false);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/distance.cpp b/src/boost/libs/geometry/test/strategies/distance.cpp
new file mode 100644
index 000000000..876e28730
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/distance.cpp
@@ -0,0 +1,117 @@
+// Boost.Geometry
+
+// Copyright (c) 2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/concept_check.hpp>
+
+#include <boost/geometry/srs/srs.hpp>
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+typedef bg::srs::spheroid<double> stype;
+
+typedef bg::strategy::andoyer andoyer_formula;
+typedef bg::strategy::thomas thomas_formula;
+typedef bg::strategy::vincenty vincenty_formula;
+
+template <typename P>
+bool non_precise_ct()
+{
+ typedef typename bg::coordinate_type<P>::type ct;
+ return boost::is_integral<ct>::value || boost::is_float<ct>::value;
+}
+
+template <typename P1, typename P2, typename FormulaPolicy>
+void test_distance(double lon1, double lat1, double lon2, double lat2)
+{
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::select_calculation_type<P1, P2, void>::type
+ >::type calc_t;
+
+ calc_t tolerance = non_precise_ct<P1>() || non_precise_ct<P2>() ?
+ 5.0 : 0.001;
+
+ P1 p1;
+ P2 p2;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+
+ // Test strategy that implements meridian distance against formula
+ // that implements general distance
+ // That may change in the future but in any case these calls must return
+ // the same result
+
+ calc_t dist_formula = FormulaPolicy::template inverse
+ <
+ double, true, false, false, false, false
+ >::apply(lon1 * bg::math::d2r<double>(),
+ lat1 * bg::math::d2r<double>(),
+ lon2 * bg::math::d2r<double>(),
+ lat2 * bg::math::d2r<double>(),
+ stype()).distance;
+
+ bg::strategy::distance::geographic<FormulaPolicy, stype> strategy;
+ calc_t dist_strategy = strategy.apply(p1, p2);
+ BOOST_CHECK_CLOSE(dist_formula, dist_strategy, tolerance);
+}
+
+template <typename P1, typename P2, typename FormulaPolicy>
+void test_distance_reverse(double lon1, double lat1,
+ double lon2, double lat2)
+{
+ test_distance<P1, P2, FormulaPolicy>(lon1, lat1, lon2, lat2);
+ test_distance<P1, P2, FormulaPolicy>(lon2, lat2, lon1, lat1);
+}
+
+template <typename P1, typename P2, typename FormulaPolicy>
+void test_meridian()
+{
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., 70., 0., 80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(0, 70, 0., -80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., -70., 0., 80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., -70., 0., -80.);
+
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., 70., 180., 80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., 70., 180., -80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., -70., 180., 80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(0., -70., 180., -80.);
+
+ test_distance_reverse<P1, P2, FormulaPolicy>(350., 70., 170., 80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(350., 70., 170., -80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(350., -70., 170., 80.);
+ test_distance_reverse<P1, P2, FormulaPolicy>(350., -70., 170., -80.);
+}
+
+template <typename P>
+void test_all()
+{
+ test_meridian<P, P, andoyer_formula>();
+ test_meridian<P, P, thomas_formula>();
+ test_meridian<P, P, vincenty_formula>();
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<float, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<int, 2, bg::cs::geographic<bg::degree> > >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/distance_cross_track.cpp b/src/boost/libs/geometry/test/strategies/distance_cross_track.cpp
new file mode 100644
index 000000000..3ec098c85
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/distance_cross_track.cpp
@@ -0,0 +1,116 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <sstream>
+
+#include "../formulas/test_formula.hpp"
+#include "distance_cross_track_cases.hpp"
+
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+
+struct error{
+ double long_distance;
+ double short_distance;
+ double very_short_distance;
+ double very_very_short_distance;
+};
+
+void check_result(double const& result, double const& expected,
+ double const& reference, error const& reference_error)
+{
+ BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 0.1,
+ std::setprecision(20) << "result {" << result
+ << "} different than expected {" << expected << "}.");
+
+ double reference_error_value = result > 2000 ? reference_error.long_distance
+ : result > 100 ? reference_error.short_distance
+ : result > 20 ? reference_error.very_short_distance
+ : reference_error.very_very_short_distance;
+
+ BOOST_GEOMETRY_CHECK_CLOSE(result, reference, reference_error_value,
+ std::setprecision(20) << "result {" << result
+ << "} different than reference {"
+ << reference << "}.");
+}
+
+template <typename Point>
+void test_all(expected_results const& results)
+{
+ double const d2r = bg::math::d2r<double>();
+
+ double lon1r = results.p1.lon * d2r;
+ double lat1r = results.p1.lat * d2r;
+ double lon2r = results.p2.lon * d2r;
+ double lat2r = results.p2.lat * d2r;
+ double lon3r = results.p3.lon * d2r;
+ double lat3r = results.p3.lat * d2r;
+
+ typedef bg::srs::spheroid<double> Spheroid;
+
+ // WGS84
+ Spheroid spheroid(6378137.0, 6356752.3142451793);
+
+ error errors [] =
+ {
+ {0.00000001, 0.00000001, 0.00000001, 0.000001}, //vincenty
+ {0.0002, 0.002, 0.01, 0.2}, //thomas
+ {0.002, 0.4, 15, 25}, //andoyer
+ {1, 6, 15, 200} //spherical
+ };
+
+ //vincenty
+ double distance = bg::strategy::distance::detail::geographic_cross_track<bg::strategy::vincenty, Spheroid, double, true>(spheroid)
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.vincenty_bisection, results.reference, errors[0]);
+
+ distance = bg::strategy::distance::geographic_cross_track<bg::strategy::vincenty, Spheroid, double>(spheroid)
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.vincenty, results.reference, errors[0]);
+
+ //thomas
+ distance = bg::strategy::distance::detail::geographic_cross_track<bg::strategy::thomas, Spheroid, double, true>(spheroid)
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.thomas_bisection, results.reference, errors[1]);
+
+ distance = bg::strategy::distance::geographic_cross_track<bg::strategy::thomas, Spheroid, double>(spheroid)
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.thomas, results.reference, errors[1]);
+
+ //andoyer
+ distance = bg::strategy::distance::detail::geographic_cross_track<bg::strategy::andoyer, Spheroid, double, true>(spheroid)
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.andoyer_bisection, results.reference, errors[2]);
+
+ distance = bg::strategy::distance::geographic_cross_track<bg::strategy::andoyer, Spheroid, double>(spheroid)
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.andoyer, results.reference, errors[2]);
+
+ //spherical
+ distance = bg::strategy::distance::cross_track<>(bg::formula::mean_radius<double>(spheroid))
+ .apply(Point(lon3r, lat3r), Point(lon1r, lat1r), Point(lon2r, lat2r));
+ check_result(distance, results.spherical, results.reference, errors[3]);
+
+}
+
+int test_main(int, char*[])
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::radian> > point;
+
+ for (size_t i = 0; i < expected_size; ++i)
+ {
+ test_all<point>(expected[i]);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/distance_cross_track_cases.hpp b/src/boost/libs/geometry/test/strategies/distance_cross_track_cases.hpp
new file mode 100644
index 000000000..01cf2a120
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/distance_cross_track_cases.hpp
@@ -0,0 +1,518 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_DISTANCE_CROSS_TRACK_CASES_HPP
+#define BOOST_GEOMETRY_TEST_DISTANCE_CROSS_TRACK_CASES_HPP
+
+struct coordinates
+{
+ double lon;
+ double lat;
+};
+
+struct expected_results
+{
+ coordinates p1; //1st point of segment
+ coordinates p2; //2nd point of segment
+ coordinates p3; //point to compute distance from segment
+ double reference; // karney or vincenty
+ double vincenty_bisection;
+ double vincenty;
+ double thomas_bisection;
+ double thomas;
+ double andoyer_bisection;
+ double andoyer;
+ double spherical;
+};
+
+expected_results expected[] =
+{
+ {
+ { 0, 0 },{ 1, 1 },{ 0, 1 },
+ 78442.119873761606868,
+ 78442.119873761606868,
+ 78442.119873761592316,
+ 78442.118218914125464,
+ 78442.118218840550981,
+ 78440.792929481409374,
+ 78440.792934224984492,
+ 78618.810427426869865
+ } , {
+ { 0, 0 },{ 1, 1 },{ 1, 0 },
+ 78453.98942845336569,
+ 78453.98942845336569,
+ 78453.98942845336569,
+ 78453.990728736869642,
+ 78453.990728682110785,
+ 78453.54172924211889,
+ 78453.541733992169611,
+ 78630.786885094828904
+ } , {
+ { 10, 15 },{ 30, 15 },{ 15, 80 },
+ 7204174.4886689241976,
+ 7204174.4886689241976,
+ 7204174.4886689241976,
+ 7204174.4785777237266,
+ 7204174.4785777227953,
+ 7204194.9162934627384,
+ 7204194.9162937803194,
+ 7205729.8545973757282
+ } , {
+ { 10, 15 },{ 30, 15 },{ 15, 10 },
+ 571412.78107940487098,
+ 571412.78107940487098,
+ 571412.78107940475456,
+ 571412.77996722259559,
+ 571412.77996722620446,
+ 571408.51759251800831,
+ 571408.51759251928888,
+ 574226.66911869682372
+ } , {
+ { 10, 15 },{ 30, 15 },{ 5, 10 },
+ 775316.40275838342495,
+ 775316.40275838342495,
+ 775316.40275838342495,
+ 775316.40098149504047,
+ 775316.40098149504047,
+ 775309.55307898123283,
+ 775309.55307898123283,
+ 776861.2271022957284
+ } , {
+ { 10, 15 },{ 30, 15 },{ 35, 10 },
+ 775316.40275838342495,
+ 775316.40275838342495,
+ 775316.40275838342495,
+ 775316.40098149504047,
+ 775316.40098149504047,
+ 775309.55307898123283,
+ 775309.55307898123283,
+ 776861.22710229584482
+ } , {
+ { 2, 2 },{ 3, 2 },{ 3.5, 3 },
+ 123770.82713049851009,
+ 123770.82713049851009,
+ 123770.82713049851009,
+ 123770.82682863833907,
+ 123770.82682863833907,
+ 123769.27773668900772,
+ 123769.27773668900772,
+ 124295.90554402528505
+ } , {
+ { 2, 2 },{ 3, 2 },{ 1.5, 3 },
+ 123770.82713049851009,
+ 123770.82713049851009,
+ 123770.82713049851009,
+ 123770.82682863833907,
+ 123770.82682863833907,
+ 123769.27773668900772,
+ 123769.27773668900772,
+ 124295.90554402528505
+ } , {
+ { 2, 2 },{ 3, 2 },{ 2, 3 },
+ 110576.41139532231318,
+ 110576.41139532231318,
+ 110576.41139532238594,
+ 110576.41139116862905,
+ 110576.41139118297724,
+ 110575.1780244907568,
+ 110575.17802451056195,
+ 111195.07457694716868
+ } , {
+ { 2, 2 },{ 3, 2 },{ 3, 3 },
+ 110576.41139532234229,
+ 110576.41139532234229,
+ 110576.41139532234229,
+ 110576.41139242639474,
+ 110576.41139243228827,
+ 110575.17802478378871,
+ 110575.17802474705968,
+ 111195.07457694721234
+ } , {
+ { 2, 2 },{ 3, 2 },{ 3.5, 1 },
+ 123784.75399867084343,
+ 123784.75399867084343,
+ 123784.75399867084343,
+ 123784.75369734384003,
+ 123784.75369734384003,
+ 123783.19294134904339,
+ 123783.19294134904339,
+ 124311.043335600305
+ } , {
+ { 2, 2 },{ 3, 2 },{ 1.5, 1 },
+ 123784.75399867084343,
+ 123784.75399867084343,
+ 123784.75399867084343,
+ 123784.75369734384003,
+ 123784.75369734384003,
+ 123783.19294134904339,
+ 123783.19294134904339,
+ 124311.043335600305
+ } , {
+ { 2, 2 },{ 3, 2 },{ 2, 1 },
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06688667042181,
+ 110575.06688667042181,
+ 110573.82008001199574,
+ 110573.82008001199574,
+ 111195.07973463158123
+ } , {
+ { 2, 2 },{ 3, 2 },{ 3, 1 },
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06688667042181,
+ 110575.06688667042181,
+ 110573.82008001199574,
+ 110573.82008001199574,
+ 111195.07973463158123
+ } , {
+ { 2, -2 },{ 3, -2 },{ 3, -1 },
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06688667042181,
+ 110575.06688667042181,
+ 110573.82008001199574,
+ 110573.82008001199574,
+ 111195.07973463158123
+ } , {
+ { 220, 2 },{ 3, 2 },{ 3, 1 },
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06688667042181,
+ 110575.06688667042181,
+ 110573.82008001199574,
+ 110573.82008001199574,
+ 111195.07973463158123
+ } , //antimeridian
+ {
+ { 220, 2 },{ 3, 2 },{ 220, 1 },
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06481432798319,
+ 110575.06688667042181,
+ 110575.06688667042181,
+ 110573.82008001199574,
+ 110573.82008001199574,
+ 111195.07973463158123
+ } , //meridian
+ {
+ { 2, 2 },{ 2, 4 },{ 2.5, 2 },
+ 55626.064900081859,
+ 55626.064900081859,
+ 55626.064900081867,
+ 55626.06490013907,
+ 55626.064900107223,
+ 55626.065279513903,
+ 55626.065279463517,
+ 55563.670489238102
+ } , {
+ { 2, 2 },{ 2, 4 },{ 2.5, 5 },
+ 123722.15822285149,
+ 123722.15822285149,
+ 123722.15822285149,
+ 123722.15791917888,
+ 123722.15791917888,
+ 123720.64936755209,
+ 123720.64936755209,
+ 124243.00560435352
+ } , {
+ { 2, 2 },{ 2, 4 },{ 2.5, 3 },
+ 55583.973320908837,
+ 55583.973320908837,
+ 55583.97332090883,
+ 55583.973320941128,
+ 55583.973320900877,
+ 55583.97416950998,
+ 55583.974169663285,
+ 55521.343440931159
+ } , {
+ { 0, 40 },{ 180, 80 },{ 0, 20 },
+ 2217162.7761786841,
+ 2217162.7761786841,
+ 2217162.7761786841,
+ 2217162.7361901053,
+ 2217162.7361901053,
+ 2217171.9891410829,
+ 2217171.9891410829,
+ 2223901.5946926316
+ } , {
+ { 0, 40 },{ 0, 80 },{ 0, 20 },
+ 2217162.7761786841,
+ 2217162.7761786841,
+ 2217162.7761786841,
+ 2217162.7361901053,
+ 2217162.7361901053,
+ 2217171.9891410829,
+ 2217171.9891410829,
+ 2223901.5946926316
+ } , {
+ { 0, 0 },{ 0, 90 },{ 0, 80 },
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ } , {
+ { 0, 0 },{ 0, 90 },{ 1, 80 },
+ 19392.530629092114,
+ 19392.530629092114,
+ 19392.530629092107,
+ 19392.53062953979,
+ 19392.530629094777,
+ 19392.328788289116,
+ 19392.328788113067,
+ 19307.872231041671
+ } , {
+ { 1, -1 }, { 1, 0 },{ 2, 0 },
+ 111319.4907932264,
+ 111319.4907932264,
+ 111319.4907932264,
+ 111319.49079334327,
+ 111319.49079326246,
+ 111319.49079326226,
+ 111319.49079326246,
+ 111195.07973463158
+ } , //equator
+ {
+ { 2, 0 },{ 3, 0 },{ 0, 0 },
+ 222638.98158645280637,
+ 222638.98158645280637,
+ 222638.98158645280637,
+ 222638.98158654122381,
+ 222638.98158654122381,
+ 222638.98158654125291,
+ 222638.98158654125291,
+ 222390.15946926316246
+ } , {
+ { 2, 0 },{ 3, 0 },{ 2.5, 3 },
+ 331725.86989626317518,
+ 331725.86989626317518,
+ 331725.86989626317518,
+ 331725.87608870770782,
+ 331725.87608870770782,
+ 331722.14136137196328,
+ 331722.14136137196328,
+ 333585.2392038948019
+ } , {
+ { 2, 0 },{ 3, 0 },{ 2, 0 },
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ } , {
+ { 2, 0 },{ 3, 0 },{ 3, 0 },
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ } , {
+ { 2, 0 },{ 3, 0 },{ 2.5, 0 },
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ } , {
+ { 2, 0 },{ 3, 0 },{ 3.5, 3 },
+ 336358.80734967370518,
+ 336358.80734967370518,
+ 336358.80734967370518,
+ 336358.80718013871228,
+ 336358.80718013871228,
+ 336354.9292840428534,
+ 336354.9292840428534,
+ 338182.45508443051949
+ } , //segment pass by pole
+/* those cases have expected very large reference errors for spherical
+ * {
+ { 0, 0 },{ 180, 0 },{ 0, 90 },
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10007557.176116843
+ } , {
+ { 0, 0 },{ 180, 0 },{ 80, 89 },
+ 109996.81571864839,
+ 109996.81571864839,
+ 109996.81571864836,
+ 109996.81571864968,
+ 109996.81571858823,
+ 109995.58014976831,
+ 109995.58014972134,
+ 9896362.096382184,
+ }*/ // short distance to segment
+ {
+ { 0.5, 0 },{ 175.5, 0 },{ 90, 1e-3 },
+ 110.57427582169922,
+ 110.57427582169922,
+ 110.57427582169922,
+ 110.57427792305019,
+ 110.57427792305019,
+ 110.57302444153535,
+ 110.57302444153535,
+ 111.19507973475258
+ } , {
+ { 0.5, 0 },{ 175.5, 0 },{ 90, 1e-8 },
+ 0.0011057427582158647,
+ 0.0011057427582158647,
+ 0.0011057427582158647,
+ 0.0011057427792293744,
+ 0.0011057427792293744,
+ 0.0011057302444142166,
+ 0.0011057302444142166,
+ 0.0011119503057618657
+ } , {
+ // mysql Bug #29545865
+ { -16.42203, -7.52882 },{ 4.89998, -6.15568 },{ 3.32696, -6.29345 },
+ 481.73908764883043,
+ 481.73908764883043,
+ 481.73908764873721,
+ 481.74578258317035,
+ 481.74576160418479,
+ 480.34603374821353,
+ 480.34602624448405,
+ 508.0731159303939
+ } , { // same segment but the point is from the other side
+ { -16.42203, -7.52882 },{ 4.89998, -6.15568 },{ 3.3262, -6.28451},
+ 510.48273138899611,
+ 510.48273138899611,
+ 510.48273138908797,
+ 510.47605556026537,
+ 510.47605888246693,
+ 511.86547773473234,
+ 511.86548088955459,
+ 489.55321195417821
+ } , {
+ { -16.42203, -7.52882 },{ 4.89998, -6.1556 },{ 3.32696, -6.2889 },
+ 11.511229576046485,
+ 11.511229576046485,
+ 11.51122957617916,
+ 11.50474785537202,
+ 11.504394870933424,
+ 12.898977232559222,
+ 12.898968261046516,
+ 12.130727461169611
+ } , {
+ { -16.42203, -7.52882 },{ 4.89998, -6.1556 },{ 3.32696, -6.28895 },
+ 6.0009073659133909,
+ 6.0009073659133909,
+ 6.0009073659387502,
+ 5.9949823734311893,
+ 5.9941706378723278,
+ 7.3883629173067344,
+ 7.3889362323779535,
+ 17.671122161310702
+ } , {
+ // mysql Bug #29545865
+ //{ 8.65279, -2.71668 },
+ { -7.13372, 8.35583 },{ -9.09998, -1.22625 },{ -7.35561, 7.2137 },
+ 1671.2894143458557,
+ 1671.2894143458557,
+ 1671.2894143458786,
+ 1671.2962894596874,
+ 1671.296284713379,
+ 1677.2323385335374,
+ 1677.232338307874,
+ 1668.697566121507
+ }
+#ifdef GEOMETRY_TEST_INCLUDE_FAILING_TESTS
+ , {
+ { 0, 10 }, { 20, 10 }, { 18.00000000000003908, 10.054676080707787733 },
+ 0.0011398027228318023,
+ 0.0011398027228318023,
+ 0.0060057460922939617,
+ 0,
+ 0,
+ 0,
+ 0.30055333992381872,
+ 39.88666722147299
+ } , {
+ { 0, 10 }, { 20, 10 }, { 18, 10.054678231628329854 },
+ 0.23669789852514209,
+ 0.23669789852514209,
+ 0.23669789883426567,
+ 0.25069019912476698,
+ 0.23204712322540744,
+ 0.26712030782599411,
+ 0.40206187237490559,
+ 40.125767043637062
+ } , {
+ { 0, 10 }, { 20, 10 },{ 17.999999999999950262, 10.054676091041047314 },
+ 2.7930744094407741e-06,
+ 2.7930744094407741e-06,
+ 0.0058967770186943418,
+ 0,
+ 0,
+ 0,
+ 0.30055160527904862,
+ 39.887815883329125
+ }
+#endif
+ , // large distance to segment
+ {
+ { 0.5, 0 }, { 175.5, 0 }, { 90, 90 },
+ 10001965.729311479,
+ 10001965.729311479,
+ 10001965.729311479,
+ 10001965.729311479,
+ 10001965.729311479,
+ 10001958.678477952,
+ 10001958.678477952,
+ 10007557.108987356
+ } , {
+ { 0.5, -89 }, { 175.5, -89 }, { 90, 90 },
+ 19892237.59370932,
+ 19892237.59370932,
+ 19892237.59370932,
+ 19892237.570068691,
+ 19892237.570068691,
+ 19892224.746673118,
+ 19892224.746673118,
+ 19903919.272499084
+ } , //acos issue solved
+ {
+ { 90, 0 }, { 0, 1.000005 }, {0, 90},
+ 9891389.2448064201,
+ 9891389.2448064201,
+ 9891389.2448064163,
+ 9891370.4775929395,
+ 9891370.4775932431,
+ 9891383.4444574378,
+ 9891383.4444574378,
+ 9896361.5404068138
+ }
+};
+
+size_t const expected_size = sizeof(expected) / sizeof(expected_results);
+
+#endif // BOOST_GEOMETRY_TEST_DISTANCE_CROSS_TRACK_CASES_HPP
diff --git a/src/boost/libs/geometry/test/strategies/distance_default_result.cpp b/src/boost/libs/geometry/test/strategies/distance_default_result.cpp
new file mode 100644
index 000000000..e862d3313
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/distance_default_result.cpp
@@ -0,0 +1,270 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_distance_default_result
+#endif
+
+#include <cstddef>
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/geometry/util/calculation_type.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+#include <boost/geometry/strategies/default_distance_result.hpp>
+#include <boost/geometry/strategies/default_comparable_distance_result.hpp>
+
+#if defined(HAVE_TTMATH)
+#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
+
+
+template <typename DefaultResult, typename ExpectedResult>
+struct assert_equal_types
+{
+ assert_equal_types()
+ {
+ static const bool are_same =
+ boost::is_same<DefaultResult, ExpectedResult>::type::value;
+
+ BOOST_MPL_ASSERT_MSG((are_same),
+ WRONG_DEFAULT_DISTANCE_RESULT,
+ (types<DefaultResult, ExpectedResult>));
+ }
+};
+
+//=========================================================================
+
+template
+<
+ typename Geometry1,
+ typename Geometry2,
+ typename ExpectedResult,
+ typename ExpectedComparableResult
+>
+inline void test_distance_result()
+{
+ typedef typename bg::default_distance_result
+ <
+ Geometry1, Geometry2
+ >::type result12;
+
+ typedef typename bg::default_distance_result
+ <
+ Geometry2, Geometry1
+ >::type result21;
+
+ typedef typename bg::default_comparable_distance_result
+ <
+ Geometry1, Geometry2
+ >::type comparable_result12;
+
+ typedef typename bg::default_comparable_distance_result
+ <
+ Geometry2, Geometry1
+ >::type comparable_result21;
+
+ assert_equal_types<result12, ExpectedResult>();
+ assert_equal_types<result21, ExpectedResult>();
+ assert_equal_types<comparable_result12, ExpectedComparableResult>();
+ assert_equal_types<comparable_result21, ExpectedComparableResult>();
+}
+
+//=========================================================================
+
+template
+<
+ typename CoordinateType1,
+ typename CoordinateType2,
+ std::size_t Dimension,
+ typename CoordinateSystem,
+ typename ExpectedResult,
+ typename ExpectedComparableResult = ExpectedResult
+>
+struct test_distance_result_segment
+{
+ test_distance_result_segment()
+ {
+ typedef typename bg::model::point
+ <
+ CoordinateType1, Dimension, CoordinateSystem
+ > point1;
+
+ typedef typename bg::model::point
+ <
+ CoordinateType2, Dimension, CoordinateSystem
+ > point2;
+
+ typedef typename bg::model::segment<point1> segment1;
+ typedef typename bg::model::segment<point2> segment2;
+
+ test_distance_result
+ <
+ point1, point2, ExpectedResult, ExpectedComparableResult
+ >();
+
+ test_distance_result
+ <
+ point1, segment2, ExpectedResult, ExpectedComparableResult
+ >();
+
+ test_distance_result
+ <
+ point2, segment1, ExpectedResult, ExpectedComparableResult
+ >();
+ }
+};
+
+//=========================================================================
+
+template
+<
+ typename CoordinateType1,
+ typename CoordinateType2,
+ std::size_t Dimension,
+ typename ExpectedResult,
+ typename ExpectedComparableResult = ExpectedResult
+>
+struct test_distance_result_box
+{
+ test_distance_result_box()
+ {
+ typedef typename bg::model::point
+ <
+ CoordinateType1, Dimension, bg::cs::cartesian
+ > point1;
+
+ typedef typename bg::model::point
+ <
+ CoordinateType2, Dimension, bg::cs::cartesian
+ > point2;
+
+ typedef typename bg::model::box<point1> box1;
+ typedef typename bg::model::box<point2> box2;
+
+ test_distance_result
+ <
+ point1, box2, ExpectedResult, ExpectedComparableResult
+ >();
+
+ test_distance_result
+ <
+ point2, box1, ExpectedResult, ExpectedComparableResult
+ >();
+
+ test_distance_result
+ <
+ box1, box2, ExpectedResult, ExpectedComparableResult
+ >();
+ }
+};
+
+//=========================================================================
+
+template <std::size_t D, typename CoordinateSystem>
+inline void test_segment_all()
+{
+#if defined(HAVE_TTMATH)
+ typedef ttmath_big tt;
+ typedef bg::util::detail::default_integral::type default_integral;
+#endif
+ typedef typename boost::mpl::if_
+ <
+ typename boost::is_same<CoordinateSystem, bg::cs::cartesian>::type,
+ double,
+ float
+ >::type float_return_type;
+
+ test_distance_result_segment<short, short, D, CoordinateSystem, double>();
+ test_distance_result_segment<int, int, D, CoordinateSystem, double>();
+ test_distance_result_segment<int, long, D, CoordinateSystem, double>();
+ test_distance_result_segment<long, long, D, CoordinateSystem, double>();
+
+ test_distance_result_segment<int, float, D, CoordinateSystem, float_return_type>();
+ test_distance_result_segment<float, float, D, CoordinateSystem, float_return_type>();
+
+ test_distance_result_segment<int, double, D, CoordinateSystem, double>();
+ test_distance_result_segment<double, int, D, CoordinateSystem, double>();
+ test_distance_result_segment<float, double, D, CoordinateSystem, double>();
+ test_distance_result_segment<double, float, D, CoordinateSystem, double>();
+ test_distance_result_segment<double, double, D, CoordinateSystem, double>();
+
+#if defined(HAVE_TTMATH)
+ test_distance_result_segment<tt, int, D, CoordinateSystem, tt>();
+ test_distance_result_segment<tt, default_integral, D, CoordinateSystem, tt>();
+
+ test_distance_result_segment<tt, float, D, CoordinateSystem, tt>();
+ test_distance_result_segment<tt, double, D, CoordinateSystem, tt>();
+ test_distance_result_segment<tt, tt, D, CoordinateSystem, tt>();
+#endif
+}
+
+//=========================================================================
+
+template <std::size_t D>
+inline void test_box_all()
+{
+#if defined(HAVE_TTMATH)
+ typedef ttmath_big tt;
+#endif
+ typedef bg::util::detail::default_integral::type default_integral;
+
+ test_distance_result_box<short, short, D, double, default_integral>();
+ test_distance_result_box<int, int, D, double, default_integral>();
+ test_distance_result_box<int, long, D, double, default_integral>();
+ test_distance_result_box<long, long, D, double, default_integral>();
+
+ test_distance_result_box<int, float, D, double>();
+ test_distance_result_box<float, float, D, double>();
+
+ test_distance_result_box<int, double, D, double>();
+ test_distance_result_box<double, int, D, double>();
+ test_distance_result_box<float, double, D, double>();
+ test_distance_result_box<double, float, D, double>();
+ test_distance_result_box<double, double, D, double>();
+
+#if defined(HAVE_TTMATH)
+ test_distance_result_box<tt, int, D, tt>();
+ test_distance_result_box<tt, default_integral, D, tt>();
+
+ test_distance_result_box<tt, float, D, tt>();
+ test_distance_result_box<tt, double, D, tt>();
+ test_distance_result_box<tt, tt, D, tt>();
+#endif
+}
+
+//=========================================================================
+
+BOOST_AUTO_TEST_CASE( test_point_point_or_point_segment )
+{
+ test_segment_all<2, bg::cs::cartesian>();
+ test_segment_all<3, bg::cs::cartesian>();
+ test_segment_all<4, bg::cs::cartesian>();
+ test_segment_all<2, bg::cs::spherical_equatorial<bg::degree> >();
+}
+
+BOOST_AUTO_TEST_CASE( test_point_box_or_box )
+{
+ test_box_all<2>();
+ test_box_all<3>();
+ test_box_all<4>();
+}
diff --git a/src/boost/libs/geometry/test/strategies/douglas_peucker.cpp b/src/boost/libs/geometry/test/strategies/douglas_peucker.cpp
new file mode 100644
index 000000000..7f9e77f26
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/douglas_peucker.cpp
@@ -0,0 +1,422 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_douglas_peucker
+#endif
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+#ifndef BOOST_GEOMETRY_DEBUG_DOUGLAS_PEUCKER
+#define BOOST_GEOMETRY_DEBUG_DOUGLAS_PEUCKER
+#endif
+#endif
+
+#include <iostream>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/geometry/core/point_type.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/strategies/distance.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <boost/geometry/geometries/register/multi_point.hpp>
+
+#include <boost/geometry/algorithms/comparable_distance.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+
+#include <boost/assign/list_of.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/tuple/tuple.hpp>
+
+
+namespace bg = ::boost::geometry;
+namespace ba = ::boost::assign;
+namespace services = bg::strategy::distance::services;
+
+typedef boost::tuple<double, double> tuple_point_type;
+typedef std::vector<tuple_point_type> tuple_multi_point_type;
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_MULTI_POINT(tuple_multi_point_type)
+BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(std::vector)
+
+typedef bg::strategy::distance::projected_point<> distance_strategy_type;
+typedef bg::strategy::distance::projected_point
+ <
+ void, bg::strategy::distance::comparable::pythagoras<>
+ > comparable_distance_strategy_type;
+
+
+template <typename CoordinateType>
+struct default_simplify_strategy
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef typename bg::strategy::distance::services::default_strategy
+ <
+ bg::point_tag, bg::segment_tag, point_type
+ >::type default_distance_strategy_type;
+
+ typedef bg::strategy::simplify::douglas_peucker
+ <
+ point_type, default_distance_strategy_type
+ > type;
+};
+
+
+template <typename CoordinateType>
+struct simplify_regular_distance_strategy
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::strategy::simplify::douglas_peucker
+ <
+ point_type, distance_strategy_type
+ > type;
+};
+
+template <typename CoordinateType>
+struct simplify_comparable_distance_strategy
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::strategy::simplify::douglas_peucker
+ <
+ point_type, comparable_distance_strategy_type
+ > type;
+};
+
+
+
+template <typename Geometry>
+inline Geometry from_wkt(std::string const& wkt)
+{
+ Geometry geometry;
+ boost::geometry::read_wkt(wkt, geometry);
+ return geometry;
+}
+
+template <typename Iterator>
+inline std::ostream& print_point_range(std::ostream& os,
+ Iterator first,
+ Iterator beyond,
+ std::string const& header)
+{
+ os << header << "(";
+ for (Iterator it = first; it != beyond; ++it)
+ {
+ os << " " << bg::dsv(*it);
+ }
+ os << " )";
+ return os;
+}
+
+
+struct equals
+{
+ template <typename Iterator1, typename Iterator2>
+ static inline bool apply(Iterator1 begin1, Iterator1 end1,
+ Iterator2 begin2, Iterator2 end2)
+ {
+ std::size_t num_points1 = std::distance(begin1, end1);
+ std::size_t num_points2 = std::distance(begin2, end2);
+
+ if ( num_points1 != num_points2 )
+ {
+ return false;
+ }
+
+ Iterator1 it1 = begin1;
+ Iterator2 it2 = begin2;
+ for (; it1 != end1; ++it1, ++it2)
+ {
+ if ( !bg::equals(*it1, *it2) )
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template <typename Range1, typename Range2>
+ static inline bool apply(Range1 const& range1, Range2 const& range2)
+ {
+ return apply(boost::begin(range1), boost::end(range1),
+ boost::begin(range2), boost::end(range2));
+ }
+};
+
+
+
+
+template <typename Geometry>
+struct test_one_case
+{
+ template <typename Strategy, typename Range>
+ static inline void apply(std::string const& case_id,
+ std::string const& wkt,
+ double max_distance,
+ Strategy const& strategy,
+ Range const& expected_result)
+ {
+ typedef typename bg::point_type<Geometry>::type point_type;
+ std::vector<point_type> result;
+
+ Geometry geometry = from_wkt<Geometry>(wkt);
+
+ std::string typeid_name
+ = typeid(typename bg::coordinate_type<point_type>::type).name();
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << case_id << " - " << typeid_name
+ << std::endl;
+ std::cout << wkt << std::endl;
+#endif
+
+ strategy.apply(geometry, std::back_inserter(result), max_distance);
+
+ boost::ignore_unused(strategy);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ print_point_range(std::cout, boost::begin(result), boost::end(result),
+ "output: ");
+ std::cout << std::endl << std::endl;
+#endif
+ std::stringstream stream_expected;
+ print_point_range(stream_expected, boost::begin(expected_result),
+ boost::end(expected_result),
+ "");
+ std::stringstream stream_detected;
+ print_point_range(stream_detected, boost::begin(result),
+ boost::end(result),
+ "");
+
+ BOOST_CHECK_MESSAGE(equals::apply(result, expected_result),
+ "case id: " << case_id << " - " << typeid_name
+ << ", geometry: " << wkt
+ << ", Expected: " << stream_expected.str()
+ << " - Detected: " << stream_detected.str());
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "---------------" << std::endl;
+ std::cout << "---------------" << std::endl;
+ std::cout << std::endl << std::endl;
+#endif
+ }
+};
+
+
+template <typename CoordinateType, typename Strategy>
+inline void test_with_strategy(std::string label)
+{
+ std::cout.precision(20);
+ Strategy strategy;
+
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::linestring<point_type> linestring_type;
+ typedef bg::model::segment<point_type> segment_type;
+ typedef test_one_case<linestring_type> tester;
+
+ label = " (" + label + ")";
+
+ {
+ point_type const p1(-6,-13), p2(0,-15);
+ segment_type const s(point_type(12,-3), point_type(-12,5));
+
+ if (bg::comparable_distance(p1, s) >= bg::comparable_distance(p2, s))
+ {
+ tester::apply("l01c1" + label,
+ "LINESTRING(12 -3, 4 8,-6 -13,-9 4,0 -15,-12 5)",
+ 10,
+ strategy,
+ ba::tuple_list_of(12,-3)(4,8)(-6,-13)(-12,5)
+ );
+ }
+ else
+ {
+ tester::apply("l01c2" + label,
+ "LINESTRING(12 -3, 4 8,-6 -13,-9 4,0 -15,-12 5)",
+ 10,
+ strategy,
+ ba::tuple_list_of(12,-3)(4,8)(-6,-13)(-9,4)(0,-15)(-12,5)
+ );
+ }
+ }
+
+ tester::apply("l02" + label,
+ "LINESTRING(-6 -13,-9 4,0 -15,-12 5)",
+ 10,
+ strategy,
+ ba::tuple_list_of(-6,-13)(-12,5)
+ );
+
+ tester::apply("l03" + label,
+ "LINESTRING(12 -3, 4 8,-6 -13,-9 4,0 -14,-12 5)",
+ 10,
+ strategy,
+ ba::tuple_list_of(12,-3)(4,8)(-6,-13)(-12,5)
+ );
+
+ tester::apply("l04" + label,
+ "LINESTRING(12 -3, 4 8,-6 -13,-9 4,0 -14,-12 5)",
+ 14,
+ strategy,
+ ba::tuple_list_of(12,-3)(-6,-13)(-12,5)
+ );
+
+ {
+ segment_type const s(point_type(0,-1), point_type(5,-4));
+ point_type const p1(5,-1), p2(0,-4);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ bool d_larger_first = (bg::distance(p1, s) > bg::distance(p2, s));
+ bool d_larger_second = (bg::distance(p1, s) < bg::distance(p2, s));
+ bool cd_larger_first
+ = (bg::comparable_distance(p1, s) > bg::comparable_distance(p2, s));
+ bool cd_larger_second
+ = (bg::comparable_distance(p1, s) < bg::comparable_distance(p2, s));
+
+ std::cout << "segment: " << bg::dsv(s) << std::endl;
+ std::cout << "distance from " << bg::dsv(p1) << ": "
+ << bg::distance(p1, s) << std::endl;
+ std::cout << "comp. distance from " << bg::dsv(p1) << ": "
+ << bg::comparable_distance(p1, s) << std::endl;
+ std::cout << "distance from " << bg::dsv(p2) << ": "
+ << bg::distance(p2, s) << std::endl;
+ std::cout << "comp. distance from " << bg::dsv(p2) << ": "
+ << bg::comparable_distance(p2, s) << std::endl;
+ std::cout << "larger distance from "
+ << (d_larger_first ? "first" : (d_larger_second ? "second" : "equal"))
+ << std::endl;
+ std::cout << "larger comp. distance from "
+ << (cd_larger_first ? "first" : (cd_larger_second ? "second" : "equal"))
+ << std::endl;
+ std::cout << "difference of distances: "
+ << (bg::distance(p1, s) - bg::distance(p2, s))
+ << std::endl;
+ std::cout << "difference of comp. distances: "
+ << (bg::comparable_distance(p1, s) - bg::comparable_distance(p2, s))
+ << std::endl;
+#endif
+
+ std::string wkt =
+ "LINESTRING(0 0,5 0,0 -1,5 -1,0 -2,5 -2,0 -3,5 -3,0 -4,5 -4,0 0)";
+
+ if (bg::comparable_distance(p1, s) >= bg::comparable_distance(p2, s))
+ {
+ tester::apply("l05c1" + label,
+ wkt,
+ 1,
+ strategy,
+ ba::tuple_list_of(0,0)(5,0)(0,-1)(5,-1)(0,-2)(5,-2)(0,-3)(5,-4)(0,0)
+ );
+ tester::apply("l05c1a" + label,
+ wkt,
+ 2,
+ strategy,
+ ba::tuple_list_of(0,0)(5,0)(0,-1)(5,-1)(0,-2)(5,-4)(0,0)
+ );
+ }
+ else
+ {
+ tester::apply("l05c2" + label,
+ wkt,
+ 1,
+ strategy,
+ ba::tuple_list_of(0,0)(5,0)(0,-1)(5,-1)(0,-2)(5,-2)(0,-4)(5,-4)(0,0)
+ );
+ tester::apply("l05c2a" + label,
+ wkt,
+ 2,
+ strategy,
+ ba::tuple_list_of(0,0)(5,0)(0,-1)(5,-1)(0,-4)(5,-4)(0,0)
+ );
+ }
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << std::endl;
+ std::cout << std::endl;
+ std::cout << "*************************************************";
+ std::cout << std::endl;
+ std::cout << std::endl;
+#endif
+}
+
+
+BOOST_AUTO_TEST_CASE( test_default_strategy )
+{
+ test_with_strategy<int, default_simplify_strategy<int>::type>("i");
+ test_with_strategy<float, default_simplify_strategy<float>::type>("f");
+ test_with_strategy<double, default_simplify_strategy<double>::type>("d");
+ test_with_strategy
+ <
+ long double,
+ default_simplify_strategy<long double>::type
+ >("ld");
+}
+
+BOOST_AUTO_TEST_CASE( test_with_regular_distance_strategy )
+{
+ test_with_strategy
+ <
+ int,
+ simplify_regular_distance_strategy<int>::type
+ >("i");
+
+ test_with_strategy
+ <
+ float,
+ simplify_regular_distance_strategy<float>::type
+ >("f");
+
+ test_with_strategy
+ <
+ double,
+ simplify_regular_distance_strategy<double>::type
+ >("d");
+ test_with_strategy
+ <
+ long double,
+ simplify_regular_distance_strategy<long double>::type
+ >("ld");
+}
+
+BOOST_AUTO_TEST_CASE( test_with_comparable_distance_strategy )
+{
+ test_with_strategy
+ <
+ int,
+ simplify_comparable_distance_strategy<int>::type
+ >("i");
+ test_with_strategy
+ <
+ float,
+ simplify_comparable_distance_strategy<float>::type
+ >("f");
+ test_with_strategy
+ <
+ double,
+ simplify_comparable_distance_strategy<double>::type
+ >("d");
+ test_with_strategy
+ <
+ long double,
+ simplify_comparable_distance_strategy<long double>::type
+ >("ld");
+}
diff --git a/src/boost/libs/geometry/test/strategies/envelope_segment.cpp b/src/boost/libs/geometry/test/strategies/envelope_segment.cpp
new file mode 100644
index 000000000..09610e3c0
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/envelope_segment.cpp
@@ -0,0 +1,134 @@
+// Boost.Geometry
+
+// Copyright (c) 2016-2018 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <geometry_test_common.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/strategies/geographic/envelope_segment.hpp>
+#include <boost/geometry/strategies/spherical/envelope_segment.hpp>
+
+template
+<
+ typename FormulaPolicy,
+ typename P,
+ typename CT
+>
+void test_strategies_lat(P p1, P p2, CT expected_max, CT expected_min,
+ CT expected_max_sph, CT expected_min_sph, CT error = 0.0001)
+{
+ bg::model::box<P> box;
+
+ bg::strategy::envelope::geographic_segment
+ <
+ FormulaPolicy,
+ bg::srs::spheroid<CT>,
+ CT
+ > strategy_geo;
+
+ strategy_geo.apply(p1, p2, box);
+
+ CT p_min_degree_geo = bg::get<0, 1>(box);
+ CT p_max_degree_geo = bg::get<1, 1>(box);
+
+ BOOST_CHECK_CLOSE(p_max_degree_geo, expected_max, error);
+ BOOST_CHECK_CLOSE(p_min_degree_geo, expected_min, error);
+
+ typedef bg::strategy::envelope::spherical_segment<CT> strategy_sph_t;
+
+ strategy_sph_t::apply(p1, p2, box);
+
+ CT p_min_degree_sph = bg::get<0, 1>(box);
+ CT p_max_degree_sph = bg::get<1, 1>(box);
+
+ BOOST_CHECK_CLOSE(p_max_degree_sph, expected_max_sph, error);
+ BOOST_CHECK_CLOSE(p_min_degree_sph, expected_min_sph, error);
+}
+
+
+template <typename CT>
+void test_all()
+{
+ typedef bg::model::point<CT, 2, bg::cs::geographic<bg::degree> > Pg;
+
+ // Short segments
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 1), Pg(10, 5), 5.0, 1.0, 5.0, 1.0);
+
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 1), Pg(10, 1), 1.0031124506594733, 1.0, 1.0030915676477881, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(-5, 1), Pg(4, 1), 1.0031124506594733, 1.0, 1.0030915676477881, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(175, 1), Pg(184, 1), 1.0031124506594733, 1.0, 1.0030915676477881, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(355, 1), Pg(4, 1), 1.0031124506594733, 1.0, 1.0030915676477881, 1.0);
+
+ // Reverse direction
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 2), Pg(70, 1), 2.0239716998355468, 1.0, 2.0228167431951536, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(70, 1), Pg(1, 2), 2.0239716998351849, 1.0, 2.022816743195063, 1.0);
+
+ // Long segments
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(0, 1), Pg(170, 1), 11.975026023950877, 1.0, 11.325049479775814, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(0, 1), Pg(179, 1), 68.452669316418039, 1.0, 63.437566893227093, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(0, 1), Pg(179.5, 1), 78.84050225214871, 1.0, 75.96516822754981, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(0, 1), Pg(180.5, 1), 78.84050225214871, 1.0, 75.965168227550194, 1.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(0, 1), Pg(180, 1), 90.0, 1.0, 90.0, 1.0);
+
+ // South hemisphere
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, -1), Pg(10, -5), -1.0, -5.0, -1.0, -5.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, -1), Pg(10, -1), -1.0, -1.0031124506594733, -1.0, -1.0030915676477881);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, -1), Pg(170, -1), -1.0, -10.85834257048573, -1.0, -10.321374780571153);
+
+ // Different strategies for inverse
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 1), Pg(10, 1), 1.0031124506594733, 1.0,
+ 1.0030915676477881, 1.0, 0.00000001);
+ test_strategies_lat<bg::strategy::andoyer>
+ (Pg(1, 1), Pg(10, 1), 1.0031124504591062, 1.0,
+ 1.0030915676477881, 1.0, 0.00000001);
+ test_strategies_lat<bg::strategy::vincenty>
+ (Pg(1, 1), Pg(10, 1), 1.0031124508942098, 1.0,
+ 1.0030915676477881, 1.0, 0.00000001);
+
+ // Meridian and equator
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 10), Pg(1, -10), 10.0, -10.0, 10.0, -10.0);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 0), Pg(10, 0), 0.0, 0.0, 0.0, 0.0);
+
+ // One endpoint in northern hemisphere and the other in southern hemisphere
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(1, 1), Pg(150, -5), 1.0, -8.1825389632359933, 1.0, -8.0761230625567588);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(150, -5), Pg(1, 1), 1.0, -8.1825389632359933, 1.0, -8.0761230625568015);
+ test_strategies_lat<bg::strategy::thomas>
+ (Pg(150, 5), Pg(1, -1), 8.1825389632359933, -1.0, 8.0761230625568015, -1.0);
+}
+
+
+
+int test_main( int , char* [] )
+{
+ test_all<double>();
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/strategies/franklin.cpp b/src/boost/libs/geometry/test/strategies/franklin.cpp
new file mode 100644
index 000000000..6a6c5fe17
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/franklin.cpp
@@ -0,0 +1,86 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <strategies/test_within.hpp>
+
+
+template <typename Point>
+void test_all()
+{
+ typedef bg::model::polygon<Point> polygon;
+
+ std::string const box = "POLYGON((0 0,0 2,2 2,2 0,0 0))";
+ std::string const triangle = "POLYGON((0 0,0 4,6 0,0 0))";
+ std::string const with_hole = "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,2 1,2 2,1 2,1 1))";
+
+ bg::strategy::within::franklin<Point> s;
+
+ test_geometry<Point, polygon>("b1", "POINT(1 1)", box, s, true);
+ test_geometry<Point, polygon>("b2", "POINT(3 3)", box, s, false);
+
+ // Test ALL corners (officialy false but some strategies might answer true)
+ test_geometry<Point, polygon>("b3a", "POINT(0 0)", box, s, true); // different
+ test_geometry<Point, polygon>("b3b", "POINT(0 2)", box, s, false);
+ test_geometry<Point, polygon>("b3c", "POINT(2 2)", box, s, false);
+ test_geometry<Point, polygon>("b3d", "POINT(2 0)", box, s, false);
+
+ // Test ALL sides (officialy false but some strategies might answer true)
+ test_geometry<Point, polygon>("b4a", "POINT(0 1)", box, s, true); // different
+ test_geometry<Point, polygon>("b4b", "POINT(1 2)", box, s, false);
+ test_geometry<Point, polygon>("b4c", "POINT(2 1)", box, s, false);
+ test_geometry<Point, polygon>("b4d", "POINT(1 0)", box, s, true); // different
+
+
+ test_geometry<Point, polygon>("t1", "POINT(1 1)", triangle, s, true);
+ test_geometry<Point, polygon>("t2", "POINT(3 3)", triangle, s, false);
+
+ test_geometry<Point, polygon>("t3a", "POINT(0 0)", triangle, s, true); // diff
+ test_geometry<Point, polygon>("t3b", "POINT(0 4)", triangle, s, false);
+ test_geometry<Point, polygon>("t3c", "POINT(5 0)", triangle, s, true); // diff
+
+ test_geometry<Point, polygon>("t4a", "POINT(0 2)", triangle, s, true); // diff
+ test_geometry<Point, polygon>("t4b", "POINT(3 2)", triangle, s, false);
+ test_geometry<Point, polygon>("t4c", "POINT(2 0)", triangle, s, true); // diff
+
+
+ test_geometry<Point, polygon>("h1", "POINT(0.5 0.5)", with_hole, s, true);
+ test_geometry<Point, polygon>("h2a", "POINT(1.5 1.5)", with_hole, s, false);
+ test_geometry<Point, polygon>("h2b", "POINT(5 5)", with_hole, s, false);
+
+ test_geometry<Point, polygon>("h3a", "POINT(1 1)", with_hole, s, false);
+ test_geometry<Point, polygon>("h3b", "POINT(2 2)", with_hole, s, true); // diff
+ test_geometry<Point, polygon>("h3c", "POINT(0 0)", with_hole, s, true); // diff
+
+ test_geometry<Point, polygon>("h4a", "POINT(1 1.5)", with_hole, s, false);
+ test_geometry<Point, polygon>("h4b", "POINT(1.5 2)", with_hole, s, true); // diff
+
+ // Lying ON (one of the sides of) interior ring
+ test_geometry<Point, polygon>("#77-1", "POINT(6 3.5)",
+ "POLYGON((5 3,5 4,4 4,4 5,3 5,3 6,5 6,5 5,7 5,7 6,8 6,8 5,9 5,9 2,8 2,8 1,7 1,7 2,5 2,5 3),(6 3,8 3,8 4,6 4,6 3))",
+ s, false);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/haversine.cpp b/src/boost/libs/geometry/test/strategies/haversine.cpp
new file mode 100644
index 000000000..b6853954d
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/haversine.cpp
@@ -0,0 +1,266 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/concept/requires.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/strategies/spherical/distance_haversine.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+
+
+#include <boost/geometry/geometries/point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+
+
+double const average_earth_radius = 6372795.0;
+
+
+template <typename Point, typename LatitudePolicy>
+struct test_distance
+{
+ typedef bg::strategy::distance::haversine<double> haversine_type;
+ typedef typename bg::strategy::distance::services::return_type<haversine_type, Point, Point>::type return_type;
+
+ BOOST_CONCEPT_ASSERT
+ (
+ (bg::concepts::PointDistanceStrategy<haversine_type, Point, Point>)
+ );
+
+
+ static void test(double lon1, double lat1, double lon2, double lat2,
+ double radius, double expected, double tolerance)
+ {
+ haversine_type strategy(radius);
+
+ Point p1, p2;
+ bg::assign_values(p1, lon1, LatitudePolicy::apply(lat1));
+ bg::assign_values(p2, lon2, LatitudePolicy::apply(lat2));
+ return_type d = strategy.apply(p1, p2);
+
+ BOOST_CHECK_CLOSE(d, expected, tolerance);
+ }
+};
+
+template <typename Point, typename LatitudePolicy>
+void test_all()
+{
+ // earth to unit-sphere -> divide by earth circumference, then it is from 0-1,
+ // then multiply with 2 PI, so effectively just divide by earth radius
+ double e2u = 1.0 / average_earth_radius;
+
+ // ~ Amsterdam/Paris, 467 kilometers
+ double const a_p = 467.2704 * 1000.0;
+ test_distance<Point, LatitudePolicy>::test(4, 52, 2, 48, average_earth_radius, a_p, 1.0);
+ test_distance<Point, LatitudePolicy>::test(2, 48, 4, 52, average_earth_radius, a_p, 1.0);
+ test_distance<Point, LatitudePolicy>::test(4, 52, 2, 48, 1.0, a_p * e2u, 0.001);
+
+ // ~ Amsterdam/Barcelona
+ double const a_b = 1232.9065 * 1000.0;
+ test_distance<Point, LatitudePolicy>::test(4, 52, 2, 41, average_earth_radius, a_b, 1.0);
+ test_distance<Point, LatitudePolicy>::test(2, 41, 4, 52, average_earth_radius, a_b, 1.0);
+ test_distance<Point, LatitudePolicy>::test(4, 52, 2, 41, 1.0, a_b * e2u, 0.001);
+}
+
+
+template <typename P1, typename P2, typename CalculationType, typename LatitudePolicy>
+void test_services()
+{
+ namespace bgsd = bg::strategy::distance;
+ namespace services = bg::strategy::distance::services;
+
+ {
+
+ // Compile-check if there is a strategy for this type
+ typedef typename services::default_strategy
+ <
+ bg::point_tag, bg::point_tag, P1, P2
+ >::type haversine_strategy_type;
+
+ boost::ignore_unused<haversine_strategy_type>();
+ }
+
+ P1 p1;
+ bg::assign_values(p1, 4, 52);
+
+ P2 p2;
+ bg::assign_values(p2, 2, 48);
+
+ // ~ Amsterdam/Paris, 467 kilometers
+ double const km = 1000.0;
+ double const a_p = 467.2704 * km;
+ double const expected = a_p;
+
+ double const expected_lower = 460.0 * km;
+ double const expected_higher = 470.0 * km;
+
+ // 1: normal, calculate distance:
+
+ typedef bgsd::haversine<double, CalculationType> strategy_type;
+ typedef typename bgsd::services::return_type<strategy_type, P1, P2>::type return_type;
+
+ strategy_type strategy(average_earth_radius);
+ return_type result = strategy.apply(p1, p2);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+ // 2: the strategy should return the same result if we reverse parameters
+ result = strategy.apply(p2, p1);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+
+ // 3: "comparable" to construct a "comparable strategy" for P1/P2
+ // a "comparable strategy" is a strategy which does not calculate the exact distance, but
+ // which returns results which can be mutually compared (e.g. avoid sqrt)
+
+ // 3a: "comparable_type"
+ typedef typename services::comparable_type<strategy_type>::type comparable_type;
+
+ // 3b: "get_comparable"
+ comparable_type comparable = bgsd::services::get_comparable<strategy_type>::apply(strategy);
+
+ // Check vice versa:
+ // First the result of the comparable strategy
+ return_type c_result = comparable.apply(p1, p2);
+ // Second the comparable result of the expected distance
+ return_type c_expected = services::result_from_distance<comparable_type, P1, P2>::apply(comparable, expected);
+ // And that one should be equa.
+ BOOST_CHECK_CLOSE(c_result, return_type(c_expected), 0.001);
+
+ // 4: the comparable_type should have a distance_strategy_constructor as well,
+ // knowing how to compare something with a fixed distance
+ return_type c_dist_lower = services::result_from_distance<comparable_type, P1, P2>::apply(comparable, expected_lower);
+ return_type c_dist_higher = services::result_from_distance<comparable_type, P1, P2>::apply(comparable, expected_higher);
+
+ // If this is the case:
+ BOOST_CHECK(c_dist_lower < c_result && c_result < c_dist_higher);
+
+ // Calculate the Haversine by hand here:
+ return_type c_check = return_type(2.0) * asin(sqrt(c_result)) * average_earth_radius;
+ BOOST_CHECK_CLOSE(c_check, expected, 0.001);
+
+ // This should also be the case
+ return_type dist_lower = services::result_from_distance<strategy_type, P1, P2>::apply(strategy, expected_lower);
+ return_type dist_higher = services::result_from_distance<strategy_type, P1, P2>::apply(strategy, expected_higher);
+ BOOST_CHECK(dist_lower < result && result < dist_higher);
+}
+
+/****
+template <typename P, typename Strategy>
+void time_compare_s(int const n)
+{
+ boost::timer t;
+ P p1, p2;
+ bg::assign_values(p1, 1, 1);
+ bg::assign_values(p2, 2, 2);
+ Strategy strategy;
+ typename Strategy::return_type s = 0;
+ for (int i = 0; i < n; i++)
+ {
+ for (int j = 0; j < n; j++)
+ {
+ s += strategy.apply(p1, p2);
+ }
+ }
+ std::cout << "s: " << s << " t: " << t.elapsed() << std::endl;
+}
+
+template <typename P>
+void time_compare(int const n)
+{
+ time_compare_s<P, bg::strategy::distance::haversine<double> >(n);
+ time_compare_s<P, bg::strategy::distance::comparable::haversine<double> >(n);
+}
+
+#include <time.h>
+double time_sqrt(int n)
+{
+ clock_t start = clock();
+
+ double v = 2.0;
+ double s = 0.0;
+ for (int i = 0; i < n; i++)
+ {
+ for (int j = 0; j < n; j++)
+ {
+ s += sqrt(v);
+ v += 1.0e-10;
+ }
+ }
+ clock_t end = clock();
+ double diff = double(end - start) / CLOCKS_PER_SEC;
+
+ std::cout << "Check: " << s << " Time: " << diff << std::endl;
+ return diff;
+}
+
+double time_normal(int n)
+{
+ clock_t start = clock();
+
+ double v = 2.0;
+ double s = 0.0;
+ for (int i = 0; i < n; i++)
+ {
+ for (int j = 0; j < n; j++)
+ {
+ s += v;
+ v += 1.0e-10;
+ }
+ }
+ clock_t end = clock();
+ double diff = double(end - start) / CLOCKS_PER_SEC;
+
+ std::cout << "Check: " << s << " Time: " << diff << std::endl;
+ return diff;
+}
+***/
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<int, 2, bg::cs::spherical_equatorial<bg::degree> >, geographic_policy>();
+ test_all<bg::model::point<float, 2, bg::cs::spherical_equatorial<bg::degree> >, geographic_policy>();
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> >, geographic_policy>();
+
+ // NYI: haversine for mathematical spherical coordinate systems
+ // test_all<bg::model::point<double, 2, bg::cs::spherical<bg::degree> >, mathematical_policy>();
+
+ //double t1 = time_sqrt(20000);
+ //double t2 = time_normal(20000);
+ //std::cout << "Factor: " << (t1 / t2) << std::endl;
+ //time_compare<bg::model::point<double, 2, bg::cs::spherical<bg::radian> > >(10000);
+
+#if defined(HAVE_TTMATH)
+ typedef ttmath::Big<1,4> tt;
+ test_all<bg::model::point<tt, 2, bg::cs::spherical_equatorial<bg::degree> >, geographic_policy>();
+#endif
+
+
+ test_services
+ <
+ bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> >,
+ bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> >,
+ double,
+ geographic_policy
+ >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/matrix_transformer.cpp b/src/boost/libs/geometry/test/strategies/matrix_transformer.cpp
new file mode 100644
index 000000000..b617b5c20
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/matrix_transformer.cpp
@@ -0,0 +1,103 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2019 Tinko Bartels
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/transform/matrix_transformers.hpp>
+#include <boost/geometry/algorithms/transform.hpp>
+#include <boost/geometry/geometries/point.hpp>
+
+template <typename coordinate_type>
+void test_all()
+{
+ typedef bg::model::point<coordinate_type, 2, bg::cs::cartesian> point_2d;
+ typedef bg::model::point<coordinate_type, 3, bg::cs::cartesian> point_3d;
+ typedef bg::model::point<coordinate_type, 4, bg::cs::cartesian> point_4d;
+
+ point_2d p2d;
+ point_3d p3d;
+ point_4d p4d;
+
+ bg::assign_values(p2d, 3, 5);
+
+ boost::qvm::mat<coordinate_type, 5, 3> mat24;
+ boost::qvm::A<0, 0>(mat24) = 1; boost::qvm::A<0, 1>(mat24) = 0; boost::qvm::A<0, 2>(mat24) = 0;
+ boost::qvm::A<1, 0>(mat24) = 0; boost::qvm::A<1, 1>(mat24) = 1; boost::qvm::A<1, 2>(mat24) = 0;
+ boost::qvm::A<2, 0>(mat24) = 1; boost::qvm::A<2, 1>(mat24) = -1; boost::qvm::A<2, 2>(mat24) = 0;
+ boost::qvm::A<3, 0>(mat24) = -1; boost::qvm::A<3, 1>(mat24) = 1; boost::qvm::A<3, 2>(mat24) = 0;
+ boost::qvm::A<4, 0>(mat24) = 0; boost::qvm::A<4, 1>(mat24) = 0; boost::qvm::A<4, 2>(mat24) = 1;
+ bg::strategy::transform::matrix_transformer<coordinate_type, 2, 4> trans24(mat24);
+ bg::transform(p2d, p4d, trans24);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(p4d)), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(p4d)), 5.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<2>(p4d)), -2.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<3>(p4d)), 2.0, 0.001);
+
+ bg::strategy::transform::scale_transformer<coordinate_type, 4, 4> scale44(2);
+ bg::transform(p4d, p4d, scale44);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(p4d)), 6.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(p4d)), 10.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<2>(p4d)), -4.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<3>(p4d)), 4.0, 0.001);
+
+ boost::qvm::mat<coordinate_type, 4, 5> mat43;
+ boost::qvm::A<0, 0>(mat43) = 0 ; boost::qvm::A<0, 1>(mat43) = 0; boost::qvm::A<0, 2>(mat43) = 0.5; boost::qvm::A<0, 3>(mat43) = 0 ; boost::qvm::A<0, 4>(mat43) = 0;
+ boost::qvm::A<1, 0>(mat43) = 0.5; boost::qvm::A<1, 1>(mat43) = 0; boost::qvm::A<1, 2>(mat43) = 0 ; boost::qvm::A<1, 3>(mat43) = 0 ; boost::qvm::A<1, 4>(mat43) = 0;
+ boost::qvm::A<2, 0>(mat43) = 0 ; boost::qvm::A<2, 1>(mat43) = 0; boost::qvm::A<2, 2>(mat43) = 0 ; boost::qvm::A<2, 3>(mat43) = 0.5; boost::qvm::A<2, 4>(mat43) = 0;
+ boost::qvm::A<3, 0>(mat43) = 0 ; boost::qvm::A<3, 1>(mat43) = 0; boost::qvm::A<3, 2>(mat43) = 0 ; boost::qvm::A<3, 3>(mat43) = 0 ; boost::qvm::A<3, 4>(mat43) = 1;
+ bg::strategy::transform::matrix_transformer<coordinate_type, 4, 3> trans43(mat43);
+ bg::transform(p4d, p3d, trans43);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(p3d)), -2.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(p3d)), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<2>(p3d)), 2.0, 0.001);
+
+ bg::strategy::transform::matrix_transformer<coordinate_type, 3, 3> trans33(1, 0, 0, 0,
+ 0, 0, 1, 0,
+ 0, 1, 0, 0,
+ 0, 0, 0, 1);
+ bg::transform(p3d, p3d, trans33);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(p3d)), -2.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(p3d)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<2>(p3d)), 3.0, 0.001);
+
+ boost::qvm::mat<coordinate_type, 3, 4> mat32;
+ boost::qvm::A<0, 0>(mat32) = 1; boost::qvm::A<0, 1>(mat32) = 1; boost::qvm::A<0, 2>(mat32) = 1; boost::qvm::A<0, 3>(mat32) = 0;
+ boost::qvm::A<1, 0>(mat32) = -1; boost::qvm::A<1, 1>(mat32) = 0; boost::qvm::A<1, 2>(mat32) = 1; boost::qvm::A<1, 3>(mat32) = 0;
+ boost::qvm::A<2, 0>(mat32) = 0; boost::qvm::A<2, 1>(mat32) = 0; boost::qvm::A<2, 2>(mat32) = 0; boost::qvm::A<2, 3>(mat32) = 1;
+
+ bg::strategy::transform::matrix_transformer<coordinate_type, 3, 2> trans32(mat32);
+ bg::transform(p3d, p2d, trans32);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(p2d)), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(p2d)), 5.0, 0.001);
+
+ bg::strategy::transform::matrix_transformer<coordinate_type, 2, 2>
+ trans_composed(
+ trans32.matrix() * trans33.matrix() * trans43.matrix() * scale44.matrix() * trans24.matrix());
+ bg::transform(p2d, p2d, trans_composed);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(p2d)), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(p2d)), 5.0, 0.001);
+}
+
+int test_main(int, char* [])
+{
+ test_all<float>();
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/point_in_box.cpp b/src/boost/libs/geometry/test/strategies/point_in_box.cpp
new file mode 100644
index 000000000..50d5f65a3
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/point_in_box.cpp
@@ -0,0 +1,81 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <strategies/test_within.hpp>
+
+
+template <typename Point>
+void test_box_of(std::string const& wkt_point, std::string const& wkt_box,
+ bool expected_within, bool expected_covered_by)
+{
+ typedef bg::model::box<Point> box_type;
+
+ Point point;
+ box_type box;
+ bg::read_wkt(wkt_point, point);
+ bg::read_wkt(wkt_box, box);
+
+ bool detected_within = bg::within(point, box);
+ bool detected_covered_by = bg::covered_by(point, box);
+ BOOST_CHECK_EQUAL(detected_within, expected_within);
+ BOOST_CHECK_EQUAL(detected_covered_by, expected_covered_by);
+
+ // Also test with the non-default agnostic side version
+ namespace wi = bg::strategy::within;
+ wi::point_in_box_by_side<> within_strategy;
+ wi::point_in_box_by_side<wi::decide_covered_by> covered_by_strategy;
+
+ detected_within = bg::within(point, box, within_strategy);
+ detected_covered_by = bg::covered_by(point, box, covered_by_strategy);
+ BOOST_CHECK_EQUAL(detected_within, expected_within);
+ BOOST_CHECK_EQUAL(detected_covered_by, expected_covered_by);
+
+ // We might exchange strategies between within/covered by.
+ // So the lines below might seem confusing, but are as intended
+ detected_within = bg::covered_by(point, box, within_strategy);
+ detected_covered_by = bg::within(point, box, covered_by_strategy);
+ BOOST_CHECK_EQUAL(detected_within, expected_within);
+ BOOST_CHECK_EQUAL(detected_covered_by, expected_covered_by);
+
+ // Finally we call the strategies directly
+ detected_within = within_strategy.apply(point, box);
+ detected_covered_by = covered_by_strategy.apply(point, box);
+ BOOST_CHECK_EQUAL(detected_within, expected_within);
+ BOOST_CHECK_EQUAL(detected_covered_by, expected_covered_by);
+}
+
+template <typename Point>
+void test_box()
+{
+ test_box_of<Point>("POINT(1 1)", "BOX(0 0,2 2)", true, true);
+ test_box_of<Point>("POINT(0 0)", "BOX(0 0,2 2)", false, true);
+ test_box_of<Point>("POINT(2 2)", "BOX(0 0,2 2)", false, true);
+ test_box_of<Point>("POINT(0 1)", "BOX(0 0,2 2)", false, true);
+ test_box_of<Point>("POINT(1 0)", "BOX(0 0,2 2)", false, true);
+ test_box_of<Point>("POINT(3 3)", "BOX(0 0,2 2)", false, false);
+}
+
+
+int test_main(int, char* [])
+{
+ test_box<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_box<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_box<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/projected_point.cpp b/src/boost/libs/geometry/test/strategies/projected_point.cpp
new file mode 100644
index 000000000..c2307eb41
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/projected_point.cpp
@@ -0,0 +1,75 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <strategies/test_projected_point.hpp>
+
+
+template <typename P1, typename P2>
+void test_all_2d()
+{
+ test_2d<P1, P2>("POINT(1 1)", "POINT(0 0)", "POINT(2 3)", 0.27735203958327);
+ test_2d<P1, P2>("POINT(2 2)", "POINT(1 4)", "POINT(4 1)", 0.5 * sqrt(2.0));
+ test_2d<P1, P2>("POINT(6 1)", "POINT(1 4)", "POINT(4 1)", 2.0);
+ test_2d<P1, P2>("POINT(1 6)", "POINT(1 4)", "POINT(4 1)", 2.0);
+}
+
+template <typename P>
+void test_all_2d()
+{
+ //test_all_2d<P, int[2]>();
+ //test_all_2d<P, float[2]>();
+ //test_all_2d<P, double[2]>();
+ //test_all_2d<P, test::test_point>();
+ test_all_2d<P, bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all_2d<P, bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all_2d<P, bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_all_2d<P, bg::model::point<long double, 2, bg::cs::cartesian> >();
+}
+
+int test_main(int, char* [])
+{
+ test_all_2d<int[2]>();
+ test_all_2d<float[2]>();
+ test_all_2d<double[2]>();
+ //test_all_2d<test::test_point>();
+
+ test_all_2d<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_services
+ <
+ bg::model::point<double, 2, bg::cs::cartesian>,
+ bg::model::point<float, 2, bg::cs::cartesian>,
+ long double
+ >();
+
+
+#if defined(HAVE_TTMATH)
+ test_all_2d
+ <
+ bg::model::point<ttmath_big, 2, bg::cs::cartesian>,
+ bg::model::point<ttmath_big, 2, bg::cs::cartesian>
+ >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/projected_point_ax.cpp b/src/boost/libs/geometry/test/strategies/projected_point_ax.cpp
new file mode 100644
index 000000000..e9bd90964
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/projected_point_ax.cpp
@@ -0,0 +1,87 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <strategies/test_projected_point.hpp>
+
+
+template <typename P1, typename P2>
+void test_all_2d_ax()
+{
+ typedef bg::strategy::distance::detail::projected_point_ax<> strategy_type;
+ typedef bg::strategy::distance::detail::projected_point_ax
+ <
+ void,
+ bg::strategy::distance::comparable::pythagoras<>
+ > comparable_strategy_type;
+
+ typedef typename strategy_type::result_type<P1, P2>::type result_type;
+
+ strategy_type strategy;
+ comparable_strategy_type comparable_strategy;
+ boost::ignore_unused(strategy, comparable_strategy);
+
+ test_2d<P1, P2>("POINT(1 1)", "POINT(0 0)", "POINT(2 3)",
+ result_type(0, 0.27735203958327),
+ result_type(0, 0.27735203958327 * 0.27735203958327),
+ strategy, comparable_strategy);
+
+ test_2d<P1, P2>("POINT(2 2)", "POINT(1 4)", "POINT(4 1)",
+ result_type(0, 0.5 * sqrt(2.0)),
+ result_type(0, 0.5),
+ strategy, comparable_strategy);
+
+ test_2d<P1, P2>("POINT(6 1)", "POINT(1 4)", "POINT(4 1)",
+ result_type(sqrt(2.0), sqrt(2.0)),
+ result_type(2.0, 2.0),
+ strategy, comparable_strategy);
+
+ test_2d<P1, P2>("POINT(1 6)", "POINT(1 4)", "POINT(4 1)",
+ result_type(sqrt(2.0), sqrt(2.0)),
+ result_type(2.0, 2.0),
+ strategy, comparable_strategy);
+}
+
+template <typename P>
+void test_all_2d_ax()
+{
+ test_all_2d_ax<P, bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all_2d_ax<P, bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all_2d_ax<P, bg::model::point<double, 2, bg::cs::cartesian> >();
+ test_all_2d_ax<P, bg::model::point<long double, 2, bg::cs::cartesian> >();
+}
+
+int test_main(int, char* [])
+{
+ test_all_2d_ax<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all_2d_ax<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all_2d_ax<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all_2d_ax
+ <
+ bg::model::point<ttmath_big, 2, bg::cs::cartesian>,
+ bg::model::point<ttmath_big, 2, bg::cs::cartesian>
+ >();
+#endif
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/pythagoras.cpp b/src/boost/libs/geometry/test/strategies/pythagoras.cpp
new file mode 100644
index 000000000..8bb02c038
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/pythagoras.cpp
@@ -0,0 +1,363 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#if defined(_MSC_VER)
+# pragma warning( disable : 4101 )
+#endif
+
+#include <boost/timer.hpp>
+
+#include <boost/concept/requires.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P1, typename P2>
+void test_null_distance_3d()
+{
+ P1 p1;
+ bg::assign_values(p1, 1, 2, 3);
+ P2 p2;
+ bg::assign_values(p2, 1, 2, 3);
+
+ typedef bg::strategy::distance::pythagoras<> pythagoras_type;
+ typedef typename bg::strategy::distance::services::return_type<pythagoras_type, P1, P2>::type return_type;
+
+ pythagoras_type pythagoras;
+ return_type result = pythagoras.apply(p1, p2);
+
+ BOOST_CHECK_EQUAL(result, return_type(0));
+}
+
+template <typename P1, typename P2>
+void test_axis_3d()
+{
+ P1 p1;
+ bg::assign_values(p1, 0, 0, 0);
+ P2 p2;
+ bg::assign_values(p2, 1, 0, 0);
+
+ typedef bg::strategy::distance::pythagoras<> pythagoras_type;
+ typedef typename bg::strategy::distance::services::return_type<pythagoras_type, P1, P2>::type return_type;
+
+ pythagoras_type pythagoras;
+
+ return_type result = pythagoras.apply(p1, p2);
+ BOOST_CHECK_EQUAL(result, return_type(1));
+
+ bg::assign_values(p2, 0, 1, 0);
+ result = pythagoras.apply(p1, p2);
+ BOOST_CHECK_EQUAL(result, return_type(1));
+
+ bg::assign_values(p2, 0, 0, 1);
+ result = pythagoras.apply(p1, p2);
+ BOOST_CHECK_CLOSE(result, return_type(1), 0.001);
+}
+
+template <typename P1, typename P2>
+void test_arbitrary_3d()
+{
+ P1 p1;
+ bg::assign_values(p1, 1, 2, 3);
+ P2 p2;
+ bg::assign_values(p2, 9, 8, 7);
+
+ {
+ typedef bg::strategy::distance::pythagoras<> strategy_type;
+ typedef typename bg::strategy::distance::services::return_type<strategy_type, P1, P2>::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p1, p2);
+ BOOST_CHECK_CLOSE(result, return_type(10.77032961427), 0.001);
+ }
+
+ {
+ // Check comparable distance
+ typedef bg::strategy::distance::comparable::pythagoras<> strategy_type;
+ typedef typename bg::strategy::distance::services::return_type<strategy_type, P1, P2>::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p1, p2);
+ BOOST_CHECK_EQUAL(result, return_type(116));
+ }
+}
+
+template <typename P1, typename P2, typename CalculationType>
+void test_services()
+{
+ namespace bgsd = bg::strategy::distance;
+ namespace services = bg::strategy::distance::services;
+
+ {
+
+ // Compile-check if there is a strategy for this type
+ typedef typename services::default_strategy
+ <
+ bg::point_tag, bg::point_tag, P1, P2
+ >::type pythagoras_strategy_type;
+
+ boost::ignore_unused<pythagoras_strategy_type>();
+ }
+
+
+ P1 p1;
+ bg::assign_values(p1, 1, 2, 3);
+
+ P2 p2;
+ bg::assign_values(p2, 4, 5, 6);
+
+ double const sqr_expected = 3*3 + 3*3 + 3*3; // 27
+ double const expected = sqrt(sqr_expected); // sqrt(27)=5.1961524227
+
+ // 1: normal, calculate distance:
+
+ typedef bgsd::pythagoras<CalculationType> strategy_type;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::PointDistanceStrategy<strategy_type, P1, P2>) );
+
+ typedef typename bgsd::services::return_type<strategy_type, P1, P2>::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p1, p2);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+ // 2: the strategy should return the same result if we reverse parameters
+ result = strategy.apply(p2, p1);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+
+ // 3: "comparable" to construct a "comparable strategy" for P1/P2
+ // a "comparable strategy" is a strategy which does not calculate the exact distance, but
+ // which returns results which can be mutually compared (e.g. avoid sqrt)
+
+ // 3a: "comparable_type"
+ typedef typename services::comparable_type<strategy_type>::type comparable_type;
+
+ // 3b: "get_comparable"
+ comparable_type comparable = bgsd::services::get_comparable<strategy_type>::apply(strategy);
+
+ return_type c_result = comparable.apply(p1, p2);
+ BOOST_CHECK_CLOSE(c_result, return_type(sqr_expected), 0.001);
+
+ // 4: the comparable_type should have a distance_strategy_constructor as well,
+ // knowing how to compare something with a fixed distance
+ return_type c_dist5 = services::result_from_distance<comparable_type, P1, P2>::apply(comparable, 5.0);
+ return_type c_dist6 = services::result_from_distance<comparable_type, P1, P2>::apply(comparable, 6.0);
+
+ // If this is the case:
+ BOOST_CHECK(c_dist5 < c_result && c_result < c_dist6);
+
+ // This should also be the case
+ return_type dist5 = services::result_from_distance<strategy_type, P1, P2>::apply(strategy, 5.0);
+ return_type dist6 = services::result_from_distance<strategy_type, P1, P2>::apply(strategy, 6.0);
+ BOOST_CHECK(dist5 < result && result < dist6);
+}
+
+
+template <typename CoordinateType, typename CalculationType, typename AssignType>
+void test_big_2d_with(AssignType const& x1, AssignType const& y1,
+ AssignType const& x2, AssignType const& y2)
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::strategy::distance::pythagoras<CalculationType> pythagoras_type;
+
+ pythagoras_type pythagoras;
+ typedef typename bg::strategy::distance::services::return_type<pythagoras_type, point_type, point_type>::type return_type;
+
+
+ point_type p1, p2;
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
+ return_type d = pythagoras.apply(p1, p2);
+
+ /***
+ std::cout << typeid(CalculationType).name()
+ << " " << std::fixed << std::setprecision(20) << d
+ << std::endl << std::endl;
+ ***/
+
+
+ BOOST_CHECK_CLOSE(d, return_type(1076554.5485833955678294387789057), 0.001);
+}
+
+template <typename CoordinateType, typename CalculationType>
+void test_big_2d()
+{
+ test_big_2d_with<CoordinateType, CalculationType>
+ (123456.78900001, 234567.89100001,
+ 987654.32100001, 876543.21900001);
+}
+
+template <typename CoordinateType, typename CalculationType>
+void test_big_2d_string()
+{
+ test_big_2d_with<CoordinateType, CalculationType>
+ ("123456.78900001", "234567.89100001",
+ "987654.32100001", "876543.21900001");
+}
+
+template <typename CoordinateType>
+void test_integer(bool check_types)
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+
+ point_type p1, p2;
+ bg::assign_values(p1, 12345678, 23456789);
+ bg::assign_values(p2, 98765432, 87654321);
+
+ typedef bg::strategy::distance::pythagoras<> pythagoras_type;
+ typedef typename bg::strategy::distance::services::comparable_type
+ <
+ pythagoras_type
+ >::type comparable_type;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ pythagoras_type, point_type, point_type
+ >::type distance_type;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ comparable_type, point_type, point_type
+ >::type cdistance_type;
+
+ pythagoras_type pythagoras;
+ distance_type distance = pythagoras.apply(p1, p2);
+ BOOST_CHECK_CLOSE(distance, 107655455.02347542, 0.001);
+
+ comparable_type comparable;
+ cdistance_type cdistance = comparable.apply(p1, p2);
+ BOOST_CHECK_EQUAL(cdistance, 11589696996311540.0);
+
+ distance_type distance2 = sqrt(distance_type(cdistance));
+ BOOST_CHECK_CLOSE(distance, distance2, 0.001);
+
+ if (check_types)
+ {
+ BOOST_CHECK((boost::is_same<distance_type, double>::type::value));
+ // comparable_distance results in now double too, obviously because
+ // comp.distance point-segment can be fraction, even for integer input
+ BOOST_CHECK((boost::is_same<cdistance_type, double>::type::value));
+ }
+}
+
+
+template <typename P1, typename P2>
+void test_all_3d()
+{
+ test_null_distance_3d<P1, P2>();
+ test_axis_3d<P1, P2>();
+ test_arbitrary_3d<P1, P2>();
+}
+
+template <typename P>
+void test_all_3d()
+{
+ test_all_3d<P, int[3]>();
+ test_all_3d<P, float[3]>();
+ test_all_3d<P, double[3]>();
+ test_all_3d<P, test::test_point>();
+ test_all_3d<P, bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all_3d<P, bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all_3d<P, bg::model::point<double, 3, bg::cs::cartesian> >();
+}
+
+template <typename P, typename Strategy>
+void time_compare_s(int const n)
+{
+ boost::timer t;
+ P p1, p2;
+ bg::assign_values(p1, 1, 1);
+ bg::assign_values(p2, 2, 2);
+ Strategy strategy;
+ typename bg::strategy::distance::services::return_type<Strategy, P, P>::type s = 0;
+ for (int i = 0; i < n; i++)
+ {
+ for (int j = 0; j < n; j++)
+ {
+ bg::set<0>(p2, bg::get<0>(p2) + 0.001);
+ s += strategy.apply(p1, p2);
+ }
+ }
+ std::cout << "s: " << s << " t: " << t.elapsed() << std::endl;
+}
+
+template <typename P>
+void time_compare(int const n)
+{
+ time_compare_s<P, bg::strategy::distance::pythagoras<> >(n);
+ time_compare_s<P, bg::strategy::distance::comparable::pythagoras<> >(n);
+}
+
+int test_main(int, char* [])
+{
+ test_integer<int>(true);
+ test_integer<boost::long_long_type>(true);
+ test_integer<double>(false);
+
+ test_all_3d<int[3]>();
+ test_all_3d<float[3]>();
+ test_all_3d<double[3]>();
+
+ test_all_3d<test::test_point>();
+
+ test_all_3d<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all_3d<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ test_big_2d<float, float>();
+ test_big_2d<double, double>();
+ test_big_2d<long double, long double>();
+ test_big_2d<float, long double>();
+
+ test_services<bg::model::point<float, 3, bg::cs::cartesian>, double[3], long double>();
+ test_services<double[3], test::test_point, float>();
+
+
+ // TODO move this to another non-unit test
+ // time_compare<bg::model::point<double, 2, bg::cs::cartesian> >(10000);
+
+#if defined(HAVE_TTMATH)
+
+ typedef ttmath::Big<1,4> tt;
+ typedef bg::model::point<tt, 3, bg::cs::cartesian> tt_point;
+
+ //test_all_3d<tt[3]>();
+ test_all_3d<tt_point>();
+ test_all_3d<tt_point, tt_point>();
+ test_big_2d<tt, tt>();
+ test_big_2d_string<tt, tt>();
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/pythagoras_point_box.cpp b/src/boost/libs/geometry/test/strategies/pythagoras_point_box.cpp
new file mode 100644
index 000000000..4121ce02d
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/pythagoras_point_box.cpp
@@ -0,0 +1,505 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_pythagoras_point_box
+#endif
+
+#include <boost/test/included/unit_test.hpp>
+
+#if defined(_MSC_VER)
+# pragma warning( disable : 4101 )
+#endif
+
+#include <boost/core/ignore_unused.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/concept/requires.hpp>
+#include <boost/concept_check.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/expand.hpp>
+#include <boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+
+namespace bg = boost::geometry;
+
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename Box, typename Coordinate>
+inline void assign_values(Box& box,
+ Coordinate const& x1,
+ Coordinate const& y1,
+ Coordinate const& z1,
+ Coordinate const& x2,
+ Coordinate const& y2,
+ Coordinate const& z2)
+{
+ typename bg::point_type<Box>::type p1, p2;
+ bg::assign_values(p1, x1, y1, z1);
+ bg::assign_values(p2, x2, y2, z2);
+ bg::assign(box, p1);
+ bg::expand(box, p2);
+}
+
+template <typename Point, typename Box>
+inline void test_null_distance_3d()
+{
+ Point p;
+ bg::assign_values(p, 1, 2, 4);
+ Box b;
+ assign_values(b, 1, 2, 3, 4, 5, 6);
+
+ typedef bg::strategy::distance::pythagoras_point_box<> pythagoras_pb_type;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ pythagoras_pb_type, Point, Box
+ >::type return_type;
+
+ pythagoras_pb_type pythagoras_pb;
+ return_type result = pythagoras_pb.apply(p, b);
+
+ BOOST_CHECK_EQUAL(result, return_type(0));
+
+ bg::assign_values(p, 1, 3, 4);
+ result = pythagoras_pb.apply(p, b);
+ BOOST_CHECK_EQUAL(result, return_type(0));
+
+ bg::assign_values(p, 2, 3, 4);
+ result = pythagoras_pb.apply(p, b);
+ BOOST_CHECK_EQUAL(result, return_type(0));
+}
+
+template <typename Point, typename Box>
+inline void test_axis_3d()
+{
+ Box b;
+ assign_values(b, 0, 0, 0, 1, 1, 1);
+ Point p;
+ bg::assign_values(p, 2, 0, 0);
+
+ typedef bg::strategy::distance::pythagoras_point_box<> pythagoras_pb_type;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ pythagoras_pb_type, Point, Box
+ >::type return_type;
+
+ pythagoras_pb_type pythagoras_pb;
+
+ return_type result = pythagoras_pb.apply(p, b);
+ BOOST_CHECK_EQUAL(result, return_type(1));
+
+ bg::assign_values(p, 0, 2, 0);
+ result = pythagoras_pb.apply(p, b);
+ BOOST_CHECK_EQUAL(result, return_type(1));
+
+ bg::assign_values(p, 0, 0, 2);
+ result = pythagoras_pb.apply(p, b);
+ BOOST_CHECK_CLOSE(result, return_type(1), 0.001);
+}
+
+template <typename Point, typename Box>
+inline void test_arbitrary_3d()
+{
+ Box b;
+ assign_values(b, 0, 0, 0, 1, 2, 3);
+ Point p;
+ bg::assign_values(p, 9, 8, 7);
+
+ {
+ typedef bg::strategy::distance::pythagoras_point_box<> strategy_type;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ strategy_type, Point, Box
+ >::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p, b);
+ BOOST_CHECK_CLOSE(result, return_type(10.77032961427), 0.001);
+ }
+
+ {
+ // Check comparable distance
+ typedef bg::strategy::distance::comparable::pythagoras_point_box<>
+ strategy_type;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ strategy_type, Point, Box
+ >::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p, b);
+ BOOST_CHECK_EQUAL(result, return_type(116));
+ }
+}
+
+template <typename Point, typename Box, typename CalculationType>
+inline void test_services()
+{
+ namespace bgsd = bg::strategy::distance;
+ namespace services = bg::strategy::distance::services;
+
+ {
+ // Compile-check if there is a strategy for this type
+ typedef typename services::default_strategy
+ <
+ bg::point_tag, bg::box_tag, Point, Box
+ >::type pythagoras_pb_strategy_type;
+
+ // reverse geometry tags
+ typedef typename services::default_strategy
+ <
+ bg::box_tag, bg::point_tag, Box, Point
+ >::type reversed_pythagoras_pb_strategy_type;
+
+ boost::ignore_unused
+ <
+ pythagoras_pb_strategy_type,
+ reversed_pythagoras_pb_strategy_type
+ >();
+ }
+
+ Point p;
+ bg::assign_values(p, 1, 2, 3);
+
+ Box b;
+ assign_values(b, 4, 5, 6, 14, 15, 16);
+
+ double const sqr_expected = 3*3 + 3*3 + 3*3; // 27
+ double const expected = sqrt(sqr_expected); // sqrt(27)=5.1961524227
+
+ // 1: normal, calculate distance:
+
+ typedef bgsd::pythagoras_point_box<CalculationType> strategy_type;
+
+ BOOST_CONCEPT_ASSERT
+ ( (bg::concepts::PointDistanceStrategy<strategy_type, Point, Box>) );
+
+ typedef typename bgsd::services::return_type
+ <
+ strategy_type, Point, Box
+ >::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p, b);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+ // 2: the strategy should return the same result if we reverse parameters
+ // result = strategy.apply(p2, p1);
+ // BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+
+ // 3: "comparable" to construct a "comparable strategy" for Point/Box
+ // a "comparable strategy" is a strategy which does not calculate the exact distance, but
+ // which returns results which can be mutually compared (e.g. avoid sqrt)
+
+ // 3a: "comparable_type"
+ typedef typename services::comparable_type
+ <
+ strategy_type
+ >::type comparable_type;
+
+ // 3b: "get_comparable"
+ comparable_type comparable = bgsd::services::get_comparable
+ <
+ strategy_type
+ >::apply(strategy);
+
+ typedef typename bgsd::services::return_type
+ <
+ comparable_type, Point, Box
+ >::type comparable_return_type;
+
+ comparable_return_type c_result = comparable.apply(p, b);
+ BOOST_CHECK_CLOSE(c_result, return_type(sqr_expected), 0.001);
+
+ // 4: the comparable_type should have a distance_strategy_constructor as well,
+ // knowing how to compare something with a fixed distance
+ comparable_return_type c_dist5 = services::result_from_distance
+ <
+ comparable_type, Point, Box
+ >::apply(comparable, 5.0);
+
+ comparable_return_type c_dist6 = services::result_from_distance
+ <
+ comparable_type, Point, Box
+ >::apply(comparable, 6.0);
+
+ // If this is the case:
+ BOOST_CHECK(c_dist5 < c_result && c_result < c_dist6);
+
+ // This should also be the case
+ return_type dist5 = services::result_from_distance
+ <
+ strategy_type, Point, Box
+ >::apply(strategy, 5.0);
+ return_type dist6 = services::result_from_distance
+ <
+ strategy_type, Point, Box
+ >::apply(strategy, 6.0);
+ BOOST_CHECK(dist5 < result && result < dist6);
+}
+
+template
+<
+ typename CoordinateType,
+ typename CalculationType,
+ typename AssignType
+>
+inline void test_big_2d_with(AssignType const& x1, AssignType const& y1,
+ AssignType const& x2, AssignType const& y2,
+ AssignType const& zero)
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::box<point_type> box_type;
+ typedef bg::strategy::distance::pythagoras_point_box
+ <
+ CalculationType
+ > pythagoras_pb_type;
+
+ pythagoras_pb_type pythagoras_pb;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ pythagoras_pb_type, point_type, box_type
+ >::type return_type;
+
+
+ point_type p;
+ box_type b;
+ bg::assign_values(b, zero, zero, x1, y1);
+ bg::assign_values(p, x2, y2);
+ return_type d = pythagoras_pb.apply(p, b);
+
+ BOOST_CHECK_CLOSE(d, return_type(1076554.5485833955678294387789057), 0.001);
+}
+
+template <typename CoordinateType, typename CalculationType>
+inline void test_big_2d()
+{
+ test_big_2d_with<CoordinateType, CalculationType>
+ (123456.78900001, 234567.89100001,
+ 987654.32100001, 876543.21900001,
+ 0.0);
+}
+
+template <typename CoordinateType, typename CalculationType>
+inline void test_big_2d_string()
+{
+ test_big_2d_with<CoordinateType, CalculationType>
+ ("123456.78900001", "234567.89100001",
+ "987654.32100001", "876543.21900001",
+ "0.0000000000000");
+}
+
+template <typename CoordinateType>
+inline void test_integer(bool check_types)
+{
+ typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
+ typedef bg::model::box<point_type> box_type;
+
+ point_type p;
+ box_type b;
+ bg::assign_values(b, 0, 0, 12345678, 23456789);
+ bg::assign_values(p, 98765432, 87654321);
+
+ typedef bg::strategy::distance::pythagoras_point_box<> pythagoras_type;
+ typedef typename bg::strategy::distance::services::comparable_type
+ <
+ pythagoras_type
+ >::type comparable_type;
+
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ pythagoras_type, point_type, box_type
+ >::type distance_type;
+ typedef typename bg::strategy::distance::services::return_type
+ <
+ comparable_type, point_type, box_type
+ >::type cdistance_type;
+
+ pythagoras_type pythagoras;
+ distance_type distance = pythagoras.apply(p, b);
+ BOOST_CHECK_CLOSE(distance, 107655455.02347542, 0.001);
+
+ comparable_type comparable;
+ cdistance_type cdistance = comparable.apply(p, b);
+ BOOST_CHECK_EQUAL(cdistance, 11589696996311540.0);
+
+ distance_type distance2 = sqrt(distance_type(cdistance));
+ BOOST_CHECK_CLOSE(distance, distance2, 0.001);
+
+ if (check_types)
+ {
+ BOOST_CHECK((boost::is_same<distance_type, double>::type::value));
+ BOOST_CHECK((boost::is_same<cdistance_type, boost::long_long_type>::type::value));
+ }
+}
+
+template <typename P1, typename P2>
+void test_all_3d()
+{
+ test_null_distance_3d<P1, bg::model::box<P2> >();
+ test_axis_3d<P1, bg::model::box<P2> >();
+ test_arbitrary_3d<P1, bg::model::box<P2> >();
+
+ test_null_distance_3d<P2, bg::model::box<P1> >();
+ test_axis_3d<P2, bg::model::box<P1> >();
+ test_arbitrary_3d<P2, bg::model::box<P1> >();
+}
+
+template <typename P>
+void test_all_3d()
+{
+ test_all_3d<P, int[3]>();
+ test_all_3d<P, float[3]>();
+ test_all_3d<P, double[3]>();
+ test_all_3d<P, test::test_point>();
+ test_all_3d<P, bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all_3d<P, bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all_3d<P, bg::model::point<double, 3, bg::cs::cartesian> >();
+}
+
+template <typename P, typename Strategy>
+void time_compare_s(int const n)
+{
+ typedef bg::model::box<P> box_type;
+
+ boost::timer t;
+ P p;
+ box_type b;
+ bg::assign_values(b, 0, 0, 1, 1);
+ bg::assign_values(p, 2, 2);
+ Strategy strategy;
+ typename bg::strategy::distance::services::return_type
+ <
+ Strategy, P, box_type
+ >::type s = 0;
+ for (int i = 0; i < n; i++)
+ {
+ for (int j = 0; j < n; j++)
+ {
+ bg::set<0>(p, bg::get<0>(p) + 0.001);
+ s += strategy.apply(p, b);
+ }
+ }
+ std::cout << "s: " << s << " t: " << t.elapsed() << std::endl;
+}
+
+template <typename P>
+inline void time_compare(int const n)
+{
+ time_compare_s<P, bg::strategy::distance::pythagoras_point_box<> >(n);
+ time_compare_s
+ <
+ P, bg::strategy::distance::comparable::pythagoras_point_box<>
+ >(n);
+}
+
+
+
+
+BOOST_AUTO_TEST_CASE( test_integer_all )
+{
+ test_integer<int>(true);
+ test_integer<boost::long_long_type>(true);
+ test_integer<double>(false);
+}
+
+
+BOOST_AUTO_TEST_CASE( test_3d_all )
+{
+ test_all_3d<int[3]>();
+ test_all_3d<float[3]>();
+ test_all_3d<double[3]>();
+
+ test_all_3d<test::test_point>();
+
+ test_all_3d<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all_3d<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+}
+
+
+BOOST_AUTO_TEST_CASE( test_big_2d_all )
+{
+ test_big_2d<float, float>();
+ test_big_2d<double, double>();
+ test_big_2d<long double, long double>();
+ test_big_2d<float, long double>();
+}
+
+
+BOOST_AUTO_TEST_CASE( test_services_all )
+{
+ test_services
+ <
+ bg::model::point<float, 3, bg::cs::cartesian>,
+ bg::model::box<double[3]>,
+ long double
+ >();
+ test_services<double[3], bg::model::box<test::test_point>, float>();
+
+ // reverse the point and box types
+ test_services
+ <
+ double[3],
+ bg::model::box<bg::model::point<float, 3, bg::cs::cartesian> >,
+ long double
+ >();
+ test_services<test::test_point, bg::model::box<double[3]>, float>();
+}
+
+
+BOOST_AUTO_TEST_CASE( test_time_compare )
+{
+ // TODO move this to another non-unit test
+ // time_compare<bg::model::point<double, 2, bg::cs::cartesian> >(10000);
+}
+
+
+#if defined(HAVE_TTMATH)
+BOOST_AUTO_TEST_CASE( test_ttmath_all )
+{
+ typedef ttmath::Big<1,4> tt;
+ typedef bg::model::point<tt, 3, bg::cs::cartesian> tt_point;
+
+ //test_all_3d<tt[3]>();
+ test_all_3d<tt_point>();
+ test_all_3d<tt_point, tt_point>();
+ test_big_2d<tt, tt>();
+ test_big_2d_string<tt, tt>();
+}
+#endif
diff --git a/src/boost/libs/geometry/test/strategies/segment_intersection.cpp b/src/boost/libs/geometry/test/strategies/segment_intersection.cpp
new file mode 100644
index 000000000..5bccc1d43
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/segment_intersection.cpp
@@ -0,0 +1,218 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined(_MSC_VER)
+// We deliberately mix float/double's here so turn off warning
+#pragma warning( disable : 4244 )
+#endif // defined(_MSC_VER)
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+#include <boost/geometry/strategies/cartesian/intersection.hpp>
+#include <boost/geometry/strategies/intersection_result.hpp>
+
+#include <boost/geometry/policies/relate/intersection_points.hpp>
+#include <boost/geometry/policies/relate/direction.hpp>
+#include <boost/geometry/policies/relate/tupled.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
+
+
+template <typename P>
+static void test_segment_intersection(int caseid,
+ int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
+ char expected_how,
+ int expected_x1 = -99, int expected_y1 = -99,
+ int expected_x2 = -99, int expected_y2 = -99)
+{
+ using namespace boost::geometry;
+
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+ typedef bg::model::referring_segment<const P> segment_type;
+
+ P p1, p2, p3, p4;
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
+ bg::assign_values(p3, x3, y3);
+ bg::assign_values(p4, x4, y4);
+
+ segment_type s12(p1,p2);
+ segment_type s34(p3,p4);
+
+ bg::detail::segment_as_subrange<segment_type> sr12(s12);
+ bg::detail::segment_as_subrange<segment_type> sr34(s34);
+
+ std::size_t expected_count = 0;
+
+ if (expected_x1 != -99 && expected_y1 != -99)
+ {
+ expected_count++;
+ }
+ if (expected_x2 != -99 && expected_y2 != -99)
+ {
+ expected_count++;
+ }
+
+ // Using intersection_insert
+
+ std::vector<P> out;
+ bg::detail::intersection::intersection_insert<P>(s12, s34,
+ std::back_inserter(out));
+
+ // Using strategy
+ typedef bg::segment_intersection_points<P> result_type;
+
+ typedef bg::policies::relate::segments_intersection_points
+ <
+ result_type
+ > points_policy_type;
+
+ result_type is
+ = bg::strategy::intersection::cartesian_segments<>
+ ::apply(sr12, sr34, points_policy_type());
+
+ bg::policies::relate::direction_type dir
+ = bg::strategy::intersection::cartesian_segments<>
+ ::apply(sr12, sr34, bg::policies::relate::segments_direction());
+
+ //BOOST_CHECK_EQUAL(boost::size(out), expected_count);
+ BOOST_CHECK_EQUAL(is.count, expected_count);
+ BOOST_CHECK_MESSAGE(dir.how == expected_how,
+ caseid
+ << " how: detected: " << dir.how
+ << " expected: " << expected_how);
+
+ if (expected_count == 2
+ && is.count == 2
+ && boost::size(out) == 2)
+ {
+ // Two intersection points, reverse expectation if necessary
+ bool const first_matches
+ = std::fabs(bg::get<0>(out[0]) - expected_x1) < 1.0e-6
+ && std::fabs(bg::get<1>(out[0]) - expected_y1) < 1.0e-6;
+
+ if (! first_matches)
+ {
+ std::swap(expected_x1, expected_x2);
+ std::swap(expected_y1, expected_y2);
+ }
+ }
+
+ if (expected_x1 != -99 && expected_y1 != -99
+ && boost::size(out) >= 1)
+ {
+
+ BOOST_CHECK_CLOSE(bg::get<0>(out[0]), coordinate_type(expected_x1), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(out[0]), coordinate_type(expected_y1), 0.001);
+
+ BOOST_CHECK_CLOSE(bg::get<0>(is.intersections[0]), expected_x1, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(is.intersections[0]), expected_y1, 0.001);
+
+ }
+ if (expected_x2 != -99 && expected_y2 != -99
+ && boost::size(out) >= 2)
+ {
+ BOOST_CHECK_CLOSE(bg::get<0>(out[1]), coordinate_type(expected_x2), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(out[1]), coordinate_type(expected_y2), 0.001);
+
+ BOOST_CHECK_CLOSE(bg::get<0>(is.intersections[1]), expected_x2, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(is.intersections[1]), expected_y2, 0.001);
+ }
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_segment_intersection<P>( 1, 0,2, 2,0, 0,0, 2,2, 'i', 1, 1);
+ test_segment_intersection<P>( 2, 2,2, 3,1, 0,0, 2,2, 'a', 2, 2);
+ test_segment_intersection<P>( 3, 3,1, 2,2, 0,0, 2,2, 't', 2, 2);
+ test_segment_intersection<P>( 4, 0,2, 1,1, 0,0, 2,2, 'm', 1, 1);
+
+ test_segment_intersection<P>( 5, 1,1, 0,2, 0,0, 2,2, 's', 1, 1);
+ test_segment_intersection<P>( 6, 0,2, 2,0, 0,0, 1,1, 'm', 1, 1);
+ test_segment_intersection<P>( 7, 2,0, 0,2, 0,0, 1,1, 'm', 1, 1);
+ test_segment_intersection<P>( 8, 2,3, 3,2, 0,0, 2,2, 'd');
+
+ test_segment_intersection<P>( 9, 0,0, 2,2, 0,0, 2,2, 'e', 0, 0, 2, 2);
+ test_segment_intersection<P>(10, 2,2, 0,0, 0,0, 2,2, 'e', 2, 2, 0, 0);
+ test_segment_intersection<P>(11, 1,1, 3,3, 0,0, 2,2, 'c', 1, 1, 2, 2);
+ test_segment_intersection<P>(12, 3,3, 1,1, 0,0, 2,2, 'c', 1, 1, 2, 2);
+
+ test_segment_intersection<P>(13, 0,2, 2,2, 2,1, 2,3, 'm', 2, 2);
+ test_segment_intersection<P>(14, 2,2, 2,4, 2,0, 2,2, 'a', 2, 2);
+ test_segment_intersection<P>(15, 2,2, 2,4, 2,0, 2,1, 'd');
+ test_segment_intersection<P>(16, 2,4, 2,2, 2,0, 2,1, 'd');
+
+ test_segment_intersection<P>(17, 2,1, 2,3, 2,2, 2,4, 'c', 2, 2, 2, 3);
+ test_segment_intersection<P>(18, 2,3, 2,1, 2,2, 2,4, 'c', 2, 3, 2, 2);
+ test_segment_intersection<P>(19, 0,2, 2,2, 4,2, 2,2, 't', 2, 2);
+ test_segment_intersection<P>(20, 0,2, 2,2, 2,2, 4,2, 'a', 2, 2);
+
+ test_segment_intersection<P>(21, 1,2, 3,2, 2,1, 2,3, 'i', 2, 2);
+ test_segment_intersection<P>(22, 2,4, 2,1, 2,1, 2,3, 'c', 2, 1, 2, 3);
+ test_segment_intersection<P>(23, 2,4, 2,1, 2,3, 2,1, 'c', 2, 3, 2, 1);
+ test_segment_intersection<P>(24, 1,1, 3,3, 0,0, 3,3, 'c', 1, 1, 3, 3);
+
+ test_segment_intersection<P>(25, 2,0, 2,4, 2,1, 2,3, 'c', 2, 1, 2, 3);
+ test_segment_intersection<P>(26, 2,0, 2,4, 2,3, 2,1, 'c', 2, 3, 2, 1);
+ test_segment_intersection<P>(27, 0,0, 4,4, 1,1, 3,3, 'c', 1, 1, 3, 3);
+ test_segment_intersection<P>(28, 0,0, 4,4, 3,3, 1,1, 'c', 3, 3, 1, 1);
+
+ test_segment_intersection<P>(29, 1,1, 3,3, 0,0, 4,4, 'c', 1, 1, 3, 3);
+ test_segment_intersection<P>(30, 0,0, 2,2, 2,2, 3,1, 'a', 2, 2);
+ test_segment_intersection<P>(31, 0,0, 2,2, 2,2, 1,3, 'a', 2, 2);
+ test_segment_intersection<P>(32, 0,0, 2,2, 1,1, 2,0, 's', 1, 1);
+
+ test_segment_intersection<P>(33, 0,0, 2,2, 1,1, 0,2, 's', 1, 1);
+ test_segment_intersection<P>(34, 2,2, 1,3, 0,0, 2,2, 'a', 2, 2);
+ test_segment_intersection<P>(35, 2,2, 3,1, 0,0, 2,2, 'a', 2, 2);
+ test_segment_intersection<P>(36, 0,0, 2,2, 0,2, 1,1, 'm', 1, 1);
+
+ test_segment_intersection<P>(37, 0,0, 2,2, 2,0, 1,1, 'm', 1, 1);
+ test_segment_intersection<P>(38, 1,1, 0,2, 0,0, 2,2, 's', 1, 1);
+ test_segment_intersection<P>(39, 1,1, 2,0, 0,0, 2,2, 's', 1, 1);
+ test_segment_intersection<P>(40, 2,0, 1,1, 0,0, 2,2, 'm', 1, 1);
+
+ test_segment_intersection<P>(41, 1,2, 0,2, 2,2, 0,2, 'c', 1, 2, 0, 2);
+ test_segment_intersection<P>(42, 2,1, 1,1, 2,2, 0,2, 'd');
+ test_segment_intersection<P>(43, 4,1, 3,1, 2,2, 0,2, 'd');
+ test_segment_intersection<P>(44, 4,2, 3,2, 2,2, 0,2, 'd');
+
+ test_segment_intersection<P>(45, 2,0, 0,2, 0,0, 2,2, 'i', 1, 1);
+
+ // In figure: times 2
+ test_segment_intersection<P>(46, 8,2, 4,6, 0,0, 8, 8, 'i', 5, 5);
+}
+
+int test_main(int, char* [])
+{
+#if !defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
+ test_all<boost::tuple<double, double> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+#endif
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/segment_intersection_collinear.cpp b/src/boost/libs/geometry/test/strategies/segment_intersection_collinear.cpp
new file mode 100644
index 000000000..287888f92
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/segment_intersection_collinear.cpp
@@ -0,0 +1,527 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Copyright (c) 2017, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_GEOMETRY_DEFINE_STREAM_OPERATOR_SEGMENT_RATIO
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+#include <boost/geometry/strategies/cartesian/intersection.hpp>
+#include <boost/geometry/strategies/intersection_result.hpp>
+
+#include <boost/geometry/policies/relate/intersection_points.hpp>
+#include <boost/geometry/policies/relate/direction.hpp>
+#include <boost/geometry/policies/relate/tupled.hpp>
+
+#include <boost/geometry/algorithms/intersection.hpp>
+#include <boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+
+template <typename IntersectionPoints>
+static int check(IntersectionPoints const& is,
+ std::size_t index, double expected_x, double expected_y)
+{
+ if (expected_x != -99 && expected_y != -99 && is.count > index)
+ {
+ double x = bg::get<0>(is.intersections[index]);
+ double y = bg::get<1>(is.intersections[index]);
+
+ BOOST_CHECK_CLOSE(x, expected_x, 0.001);
+ BOOST_CHECK_CLOSE(y, expected_y, 0.001);
+ return 1;
+ }
+ return 0;
+}
+
+
+template <typename P>
+static void test_segment_intersection(std::string const& case_id,
+ int x1, int y1, int x2, int y2,
+ int x3, int y3, int x4, int y4,
+ char expected_how, bool expected_opposite,
+ int expected_arrival1, int expected_arrival2,
+ int expected_x1, int expected_y1,
+ int expected_x2 = -99, int expected_y2 = -99)
+
+{
+ boost::ignore_unused(case_id);
+
+ typedef bg::model::referring_segment<const P> segment_type;
+
+ P p1, p2, p3, p4;
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
+ bg::assign_values(p3, x3, y3);
+ bg::assign_values(p4, x4, y4);
+
+ segment_type s12(p1, p2);
+ segment_type s34(p3, p4);
+
+ bg::detail::segment_as_subrange<segment_type> sr12(s12);
+ bg::detail::segment_as_subrange<segment_type> sr34(s34);
+
+ typedef bg::segment_intersection_points<P> result_type;
+
+ typedef bg::policies::relate::segments_intersection_points
+ <
+ result_type
+ > points_policy_type;
+
+ // Get the intersection point (or two points)
+ result_type is
+ = bg::strategy::intersection::cartesian_segments<>
+ ::apply(sr12, sr34, points_policy_type());
+
+ // Get just a character for Left/Right/intersects/etc, purpose is more for debugging
+ bg::policies::relate::direction_type dir
+ = bg::strategy::intersection::cartesian_segments<>
+ ::apply(sr12, sr34, bg::policies::relate::segments_direction());
+
+ std::size_t expected_count =
+ check(is, 0, expected_x1, expected_y1)
+ + check(is, 1, expected_x2, expected_y2);
+
+ BOOST_CHECK_EQUAL(is.count, expected_count);
+ BOOST_CHECK_EQUAL(dir.how, expected_how);
+ BOOST_CHECK_EQUAL(dir.opposite, expected_opposite);
+ BOOST_CHECK_EQUAL(dir.arrival[0], expected_arrival1);
+ BOOST_CHECK_EQUAL(dir.arrival[1], expected_arrival2);
+}
+
+template <typename P, typename Pair>
+static void test_segment_ratio(std::string const& case_id,
+ int x1, int y1, int x2, int y2,
+ int x3, int y3, int x4, int y4,
+ Pair expected_pair_a1, Pair expected_pair_a2,
+ Pair expected_pair_b1, Pair expected_pair_b2,
+ int exp_ax1, int exp_ay1, int exp_ax2, int exp_ay2,
+ std::size_t expected_count = 2)
+
+{
+ boost::ignore_unused(case_id);
+
+ typedef bg::model::referring_segment<const P> segment_type;
+
+ P p1, p2, p3, p4;
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
+ bg::assign_values(p3, x3, y3);
+ bg::assign_values(p4, x4, y4);
+
+ segment_type s12(p1, p2);
+ segment_type s34(p3, p4);
+
+ bg::detail::segment_as_subrange<segment_type> sr12(s12);
+ bg::detail::segment_as_subrange<segment_type> sr34(s34);
+
+ typedef bg::segment_intersection_points<P> result_type;
+
+ typedef bg::policies::relate::segments_intersection_points
+ <
+ result_type
+ > points_policy_type;
+
+ // Get the intersection point (or two points)
+ result_type is
+ = bg::strategy::intersection::cartesian_segments<>
+ ::apply(sr12, sr34, points_policy_type());
+
+ typedef bg::segment_ratio<typename bg::coordinate_type<P>::type> ratio_type;
+
+ ratio_type expected_a1(expected_pair_a1.first, expected_pair_a1.second);
+ ratio_type expected_a2(expected_pair_a2.first, expected_pair_a2.second);
+ ratio_type expected_b1(expected_pair_b1.first, expected_pair_b1.second);
+ ratio_type expected_b2(expected_pair_b2.first, expected_pair_b2.second);
+
+ BOOST_CHECK_EQUAL(is.count, expected_count);
+
+ BOOST_CHECK_EQUAL(is.fractions[0].robust_ra, expected_a1);
+ BOOST_CHECK_EQUAL(is.fractions[0].robust_rb, expected_b1);
+ BOOST_CHECK_EQUAL(bg::get<0>(is.intersections[0]), exp_ax1);
+ BOOST_CHECK_EQUAL(bg::get<1>(is.intersections[0]), exp_ay1);
+
+ if (expected_count == 2)
+ {
+ BOOST_CHECK_EQUAL(bg::get<0>(is.intersections[1]), exp_ax2);
+ BOOST_CHECK_EQUAL(bg::get<1>(is.intersections[1]), exp_ay2);
+ BOOST_CHECK_EQUAL(is.fractions[1].robust_ra, expected_a2);
+ BOOST_CHECK_EQUAL(is.fractions[1].robust_rb, expected_b2);
+ }
+}
+
+
+template <typename P>
+void test_all()
+{
+ // Collinear - non opposite
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n1",
+ 2, 0, 6, 0,
+ 0, 0, 2, 0,
+ 'a', false, -1, 0,
+ 2, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n2",
+ 2, 0, 6, 0,
+ 1, 0, 3, 0,
+ 'c', false, -1, 1,
+ 2, 0, 3, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n3",
+ 2, 0, 6, 0,
+ 2, 0, 4, 0,
+ 'c', false, -1, 1,
+ 2, 0, 4, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n4",
+ 2, 0, 6, 0,
+ 3, 0, 5, 0,
+ 'c', false, -1, 1,
+ 3, 0, 5, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n5",
+ 2, 0, 6, 0,
+ 4, 0, 6, 0,
+ 'c', false, 0, 0,
+ 4, 0, 6, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n6",
+ 2, 0, 6, 0,
+ 5, 0, 7, 0,
+ 'c', false, 1, -1,
+ 5, 0, 6, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_intersection<P>("n7",
+ 2, 0, 6, 0,
+ 6, 0, 8, 0,
+ 'a', false, 0, -1,
+ 6, 0);
+
+ // Collinear - opposite
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o1",
+ 2, 0, 6, 0,
+ 2, 0, 0, 0,
+ 'f', true, -1, -1,
+ 2, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o2",
+ 2, 0, 6, 0,
+ 3, 0, 1, 0,
+ 'c', true, -1, -1,
+ 2, 0, 3, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o3",
+ 2, 0, 6, 0,
+ 4, 0, 2, 0,
+ 'c', true, -1, 0,
+ 2, 0, 4, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o4",
+ 2, 0, 6, 0,
+ 5, 0, 3, 0,
+ 'c', true, -1, 1,
+ 3, 0, 5, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o5",
+ 2, 0, 6, 0,
+ 6, 0, 4, 0,
+ 'c', true, 0, 1,
+ 4, 0, 6, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o6",
+ 2, 0, 6, 0,
+ 7, 0, 5, 0,
+ 'c', true, 1, 1,
+ 5, 0, 6, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_intersection<P>("o7",
+ 2, 0, 6, 0,
+ 8, 0, 6, 0,
+ 't', true, 0, 0,
+ 6, 0);
+
+ // a1---------->a2
+ // b1---------->b2
+ test_segment_intersection<P>("e1",
+ 2, 0, 6, 0,
+ 2, 0, 6, 0,
+ 'e', false, 0, 0,
+ 2, 0, 6, 0);
+
+ // a1---------->a2
+ // b2<----------b1
+ test_segment_intersection<P>("e1",
+ 2, 0, 6, 0,
+ 6, 0, 2, 0,
+ 'e', true, 0, 0,
+ 2, 0, 6, 0);
+
+ // Disjoint (in vertical direction, picture still horizontal)
+ // a2<---a1
+ // b2<---b1
+ test_segment_intersection<P>("case_recursive_boxes_1",
+ 10, 7, 10, 6,
+ 10, 10, 10, 9,
+ 'd', false, 0, 0,
+ -1, -1, -1, -1);
+
+}
+
+
+template <typename P>
+void test_ratios()
+{
+ // B inside A
+ // a1------------>a2
+ // b1--->b2
+ test_segment_ratio<P>("n4",
+ 2, 0, 7, 0,
+ 3, 0, 5, 0,
+ std::make_pair(1, 5), std::make_pair(3, 5), // IP located on 1/5, 3/5 w.r.t A
+ std::make_pair(0, 1), std::make_pair(1, 1), // IP located on 0, 1 w.r.t. B
+ // IP's are ordered as in A (currently)
+ 3, 0, 5, 0);
+
+ // a1------------>a2
+ // b2<---b1
+ test_segment_ratio<P>("o4",
+ 2, 0, 7, 0,
+ 5, 0, 3, 0,
+ std::make_pair(1, 5), std::make_pair(3, 5),
+ std::make_pair(1, 1), std::make_pair(0, 1),
+ 3, 0, 5, 0);
+
+ // a2<------------a1
+ // b2<---b1
+ test_segment_ratio<P>("o4b",
+ 7, 0, 2, 0,
+ 5, 0, 3, 0,
+ std::make_pair(2, 5), std::make_pair(4, 5),
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ 5, 0, 3, 0);
+
+ // a2<------------a1
+ // b1--->b2
+ test_segment_ratio<P>("o4c",
+ 7, 0, 2, 0,
+ 3, 0, 5, 0,
+ std::make_pair(2, 5), std::make_pair(4, 5),
+ std::make_pair(1, 1), std::make_pair(0, 1),
+ 5, 0, 3, 0);
+
+ // Touch-interior
+ // a1---------->a2
+ // b1--->b2
+ test_segment_ratio<P>("n3",
+ 2, 0, 7, 0,
+ 2, 0, 4, 0,
+ std::make_pair(0, 1), std::make_pair(2, 5),
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ 2, 0, 4, 0);
+
+ // a2<-------------a1
+ // b2<----b1
+ test_segment_ratio<P>("n3b",
+ 7, 0, 2, 0,
+ 7, 0, 5, 0,
+ std::make_pair(0, 1), std::make_pair(2, 5),
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ 7, 0, 5, 0);
+
+
+ // A inside B
+ // a1--->a2
+ // b1------------>b2
+ test_segment_ratio<P>("rn4",
+ 3, 0, 5, 0,
+ 2, 0, 7, 0,
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ std::make_pair(1, 5), std::make_pair(3, 5),
+ 3, 0, 5, 0);
+
+ // a2<---a1
+ // b1------------>b2
+ test_segment_ratio<P>("ro4",
+ 5, 0, 3, 0,
+ 2, 0, 7, 0,
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ std::make_pair(3, 5), std::make_pair(1, 5),
+ 5, 0, 3, 0);
+
+ // a2<---a1
+ // b2<------------b1
+ test_segment_ratio<P>("ro4b",
+ 5, 0, 3, 0,
+ 7, 0, 2, 0,
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ std::make_pair(2, 5), std::make_pair(4, 5),
+ 5, 0, 3, 0);
+
+ // a1--->a2
+ // b2<------------b1
+ test_segment_ratio<P>("ro4c",
+ 3, 0, 5, 0,
+ 7, 0, 2, 0,
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ std::make_pair(4, 5), std::make_pair(2, 5),
+ 3, 0, 5, 0);
+
+ // B inside A, boundaries intersect
+ // We change the coordinates a bit (w.r.t. n3 above) to have it asymmetrical
+ // a1---------->a2
+ // b1--->b2
+ test_segment_ratio<P>("n3",
+ 2, 0, 7, 0,
+ 2, 0, 4, 0,
+ std::make_pair(0, 1), std::make_pair(2, 5),
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ 2, 0, 4, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_ratio<P>("o3",
+ 2, 0, 7, 0,
+ 4, 0, 2, 0,
+ std::make_pair(0, 1), std::make_pair(2, 5),
+ std::make_pair(1, 1), std::make_pair(0, 1),
+ 2, 0, 4, 0);
+
+ // a1---------->a2
+ // b1--->b2
+ test_segment_ratio<P>("n5",
+ 2, 0, 7, 0,
+ 5, 0, 7, 0,
+ std::make_pair(3, 5), std::make_pair(1, 1),
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ 5, 0, 7, 0);
+
+ // a1---------->a2
+ // b2<---b1
+ test_segment_ratio<P>("o5",
+ 2, 0, 7, 0,
+ 7, 0, 5, 0,
+ std::make_pair(3, 5), std::make_pair(1, 1),
+ std::make_pair(1, 1), std::make_pair(0, 1),
+ 5, 0, 7, 0);
+
+ // Generic (overlaps)
+ // a1---------->a2
+ // b1----->b2
+ test_segment_ratio<P>("n2",
+ 2, 0, 7, 0,
+ 1, 0, 4, 0,
+ std::make_pair(0, 1), std::make_pair(2, 5),
+ std::make_pair(1, 3), std::make_pair(1, 1),
+ 2, 0, 4, 0);
+
+ // Same, b reversed
+ test_segment_ratio<P>("n2_b",
+ 2, 0, 7, 0,
+ 4, 0, 1, 0,
+ std::make_pair(0, 1), std::make_pair(2, 5),
+ std::make_pair(2, 3), std::make_pair(0, 1),
+ 2, 0, 4, 0);
+
+ // Same, both reversed
+ test_segment_ratio<P>("n2_c",
+ 7, 0, 2, 0,
+ 4, 0, 1, 0,
+ std::make_pair(3, 5), std::make_pair(1, 1),
+ std::make_pair(0, 1), std::make_pair(2, 3),
+ 4, 0, 2, 0);
+
+ // a1---------->a2
+ // b1----->b2
+ test_segment_ratio<P>("n6",
+ 2, 0, 6, 0,
+ 5, 0, 8, 0,
+ std::make_pair(3, 4), std::make_pair(1, 1),
+ std::make_pair(0, 1), std::make_pair(1, 3),
+ 5, 0, 6, 0);
+
+ // Degenerated one
+ // a1---------->a2
+ // b1/b2
+ const int ignored = 99;
+ test_segment_ratio<P>("degenerated1",
+ 2, 0, 6, 0,
+ 5, 0, 5, 0,
+ std::make_pair(3, 4), // IP located on 3/4 w.r.t A
+ std::make_pair(ignored, 1), // not checked
+ std::make_pair(0, 1), // IP located at any place w.r.t B, so 0
+ std::make_pair(ignored, 1), // not checked
+ 5, 0,
+ ignored, ignored,
+ 1);
+
+ test_segment_ratio<P>("degenerated2",
+ 5, 0, 5, 0,
+ 2, 0, 6, 0,
+ std::make_pair(0, 1), std::make_pair(ignored, 1),
+ std::make_pair(3, 4), std::make_pair(ignored, 1),
+ 5, 0,
+ ignored, ignored,
+ 1);
+
+ // Vertical one like in box_poly5 but in integer
+ test_segment_ratio<P>("box_poly5",
+ 45, 25, 45, 15,
+ 45, 22, 45, 19,
+ std::make_pair(3, 10), std::make_pair(6, 10),
+ std::make_pair(0, 1), std::make_pair(1, 1),
+ 45, 22, 45, 19);
+}
+
+int test_main(int, char* [])
+{
+ // We don't rescale but use integer points as, by nature, robust points
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_ratios<bg::model::point<int, 2, bg::cs::cartesian> >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/segment_intersection_geo.cpp b/src/boost/libs/geometry/test/strategies/segment_intersection_geo.cpp
new file mode 100644
index 000000000..16a41091c
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/segment_intersection_geo.cpp
@@ -0,0 +1,430 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include "segment_intersection_geo.hpp"
+
+
+template <typename T>
+void test_geographic()
+{
+ typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > point_t;
+ typedef bg::model::segment<point_t> segment_t;
+
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -2, -1 -1)", 'a', "POINT(-1 -1)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -2, 1 1)", "SEGMENT(-1 -2, -1 -1)", 'f', "POINT(-1 -2)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(-1 -2, -1 -1)", 't', "POINT(-1 -1)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -2)", "SEGMENT(-1 -2, -1 -1)", 'a', "POINT(-1 -2)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -2, -1 -1)", "SEGMENT(-1 -1, 1 1)", 'a', "POINT(-1 -1)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -2, -1 -1)", "SEGMENT(-1 -2, 1 1)", 'f', "POINT(-1 -2)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -2, -1 -1)", "SEGMENT(1 1, -1 -1)", 't', "POINT(-1 -1)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -2, -1 -1)", "SEGMENT(1 1, -1 -2)", 'a', "POINT(-1 -2)");
+
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -2, -1 2)", "SEGMENT(-2 -2, 2 2)",
+ great_elliptic('i', "POINT(-1 -1.000457053724121)"),
+ geodesic_vincenty('i', "POINT(-1 -1.000459099991114)"),
+ geodesic_andoyer('i', "POINT(-1 -1.000453510849886)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-2 -2, 2 2)", "SEGMENT(-1 -2, -1 2)",
+ great_elliptic('i', "POINT(-1 -1.000457053724121)"),
+ geodesic_vincenty('i', "POINT(-1 -1.000459099991114)"),
+ geodesic_andoyer('i', "POINT(-1 -1.000453510849886)"));
+
+ // crossing X
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(-45 45, 45 -45)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000001380087204053 -0.0000000000000063611)"),
+ geodesic_andoyer('i', "POINT(0 0.0003512140328446071)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(45 -45, -45 45)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000001380087204053 -0.0000000000000063611)"),
+ geodesic_andoyer('i', "POINT(0 0.0003512140328446071)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(45 45, -45 -45)", "SEGMENT(-45 45, 45 -45)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000001380087204053 -0.0000000000000063611)"),
+ geodesic_andoyer('i', "POINT(0 0.0003512140328446071)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(45 45, -45 -45)", "SEGMENT(45 -45, -45 45)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000001380087204053 -0.0000000000000063611)"),
+ geodesic_andoyer('i', "POINT(0 0.0003512140328446071)"));
+
+ // crossing X
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 1, 1 -1)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000000000000596354 -0.0000000000626626779)"),
+ geodesic_andoyer('i', "POINT(-0.000000000000000596354 0.0000055787431347552)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 -1, -1 1)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000000000000596354 -0.0000000000626626779)"),
+ geodesic_andoyer('i', "POINT(-0.000000000000000596354 0.0000055787431347552)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(-1 1, 1 -1)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000000000000596354 -0.0000000000626626779)"),
+ geodesic_andoyer('i', "POINT(-0.000000000000000596354 0.0000055787431347552)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(1 -1, -1 1)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.000000000000000596354 -0.0000000000626626779)"),
+ geodesic_andoyer('i', "POINT(-0.000000000000000596354 0.0000055787431347552)"));
+
+ // equal
+ // //
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(-45 -45, 45 45)", 'e', "POINT(-45 -45)", "POINT(45 45)", false);
+ // //
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(45 45, -45 -45)", 'e', "POINT(-45 -45)", "POINT(45 45)", true);
+
+ // starting outside s1
+ // /
+ // |
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, -1 -1)", 'a', "POINT(-1 -1)");
+ // /
+ // /|
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, 0 0)", 'm', "POINT(0 0)");
+ // /|
+ // / |
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, 1 1)", 't', "POINT(1 1)");
+ // |/
+ // /|
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, 2 2)",
+ great_elliptic('i', "POINT(0 0)"),
+ geodesic_vincenty('i', "POINT(0.00000013628420059 0.00000013624239008)"),
+ geodesic_thomas('i', "POINT(-0.00004079969079346 -0.00004078714535240)"),
+ geodesic_andoyer('i', "POINT(-0.01217344899138908 -0.01216980051876599)"));
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, -1 0)", 'a', "POINT(-1 0)");
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, 0 0)", 'c', "POINT(-1 0)", "POINT(0 0)", false);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, -2 0)", 'c', "POINT(-1 0)", "POINT(0 0)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 0, -1 0)", "SEGMENT(-2 0, 0 0)", 'c', "POINT(0 0)", "POINT(-1 0)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 0, -1 0)", "SEGMENT(0 0, -2 0)", 'c', "POINT(0 0)", "POINT(-1 0)", false);
+ // ------
+ // ---------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, 1 0)", 'c', "POINT(-1 0)", "POINT(1 0)", false);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(1 0, -2 0)", 'c', "POINT(-1 0)", "POINT(1 0)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 0, -1 0)", "SEGMENT(-2 0, 1 0)", 'c', "POINT(1 0)", "POINT(-1 0)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 0, -1 0)", "SEGMENT(1 0, -2 0)", 'c', "POINT(1 0)", "POINT(-1 0)", false);
+ // ------
+ // ------------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, 2 0)", 'c', "POINT(-1 0)", "POINT(1 0)", false);
+
+ // starting at s1
+ // /
+ // //
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, 0 0)", 'c', "POINT(-1 -1)", "POINT(0 0)", false);
+ // //
+ // //
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, 1 1)", 'e', "POINT(-1 -1)", "POINT(1 1)", false);
+ // | /
+ // |/
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, 2 2)", 'f', "POINT(-1 -1)");
+ // ------
+ // ---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, 0 0)", 'c', "POINT(-1 0)", "POINT(0 0)", false);
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, 1 0)", 'e', "POINT(-1 0)", "POINT(1 0)", false);
+ // ------
+ // ---------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, 2 0)", 'c', "POINT(-1 0)", "POINT(1 0)", false);
+
+ // starting inside
+ // //
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(0 0, 1 1)", 'c', "POINT(0 0)", "POINT(1 1)", false);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 1, 0 0)", 'c', "POINT(0 0)", "POINT(1 1)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(0 0, 1 1)", 'c', "POINT(1 1)", "POINT(0 0)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(1 1, 0 0)", 'c', "POINT(1 1)", "POINT(0 0)", false);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(0 0, 1 1)", "SEGMENT(-1 -1, 1 1)", 'c', "POINT(0 0)", "POINT(1 1)", false);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, 0 0)", "SEGMENT(-1 -1, 1 1)", 'c', "POINT(1 1)", "POINT(0 0)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(0 0, 1 1)", "SEGMENT(1 1, -1 -1)", 'c', "POINT(0 0)", "POINT(1 1)", true);
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 1, 0 0)", "SEGMENT(1 1, -1 -1)", 'c', "POINT(1 1)", "POINT(0 0)", false);
+ // |/
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(0 0, 2 2)", 's', "POINT(0 0)");
+ // ------
+ // ---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, 1 0)", 'c', "POINT(0 0)", "POINT(1 0)", false);
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, 2 0)", 'c', "POINT(0 0)", "POINT(1 0)", false);
+
+ // starting at p2
+ // |
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 1, 2 2)", 'a', "POINT(1 1)");
+ // ------
+ // ---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(1 0, 2 0)", 'a', "POINT(1 0)");
+
+ // disjoint, crossing
+ // /
+ // |
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-3 -3, -2 -2)", 'd');
+ // |
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(2 2, 3 3)", 'd');
+ // disjoint, collinear
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-3 0, -2 0)", 'd');
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(2 0, 3 0)", 'd');
+
+ // degenerated
+ // /
+ // *
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, -2 -2)", 'd');
+ // /
+ // *
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, -1 -1)", '0', "POINT(-1 -1)");
+ // /
+ // *
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(0 0, 0 0)", '0', "POINT(0 0)");
+ // *
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 1, 1 1)", '0', "POINT(1 1)");
+ // *
+ // /
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(2 2, 2 2)", 'd');
+ // similar to above, collinear
+ // * ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, -2 0)", 'd');
+ // *------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, -1 0)", '0', "POINT(-1 0)");
+ // ---*---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, 0 0)", '0', "POINT(0 0)");
+ // ------*
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(1 0, 1 0)", '0', "POINT(1 0)");
+ // ------ *
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(2 0, 2 0)", 'd');
+
+ // Northern hemisphere
+ // --- ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-3 50, -2 50)", 'd');
+ // ------
+ // ---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, -1 50)", 'a', "POINT(-1 50)");
+ // \/
+ // /\ (avoid multi-line comment)
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, 0 50)",
+ great_elliptic('i', "POINT(-0.5 50.0032229484023)"),
+ geodesic_vincenty('i', "POINT(-0.4999999996073994 50.00323192256208)"),
+ geodesic_thomas('i', "POINT(-0.4999999963998482 50.00323192258598)"),
+ geodesic_andoyer('i', "POINT(-0.4999990340391772 50.00323192463806)"));
+ // ________
+ // / _____\ (avoid multi-line comment)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, 1 50)", 't', "POINT(1 50)");
+ // _________
+ // / _____ \ (avoid multi-line comment)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, 2 50)", 'd');
+ // ______
+ // /___ \ (avoid multi-line comment)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-1 50, 0 50)", 'f', "POINT(-1 50)");
+ // ------
+ // ------
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-1 50, 1 50)", 'e', "POINT(-1 50)", "POINT(1 50)", false);
+ // ________
+ // /_____ \ (avoid multi-line comment)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-1 50, 2 50)", 'f', "POINT(-1 50)");
+ // ______
+ // / ___\ (avoid multi-line comment)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(0 50, 1 50)", 't', "POINT(1 50)");
+ // \/
+ // /\ (avoid multi-line comment)
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(0 50, 2 50)",
+ great_elliptic('i', "POINT(0.5 50.0032229484023)"),
+ geodesic_vincenty('i', "POINT(0.4999999996112415 50.00323192256208)"),
+ geodesic_thomas('i', "POINT(0.5000000051005989 50.00323192258598)"),
+ geodesic_andoyer('i', "POINT(0.5000009655139563 50.00323192463806)"));
+ // ------
+ // ---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(1 50, 2 50)", 'a', "POINT(1 50)");
+ // ------ ---
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(2 50, 3 50)", 'd');
+
+ // ___|
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(0 0, 1 0)", "SEGMENT(1 0, 1 1)", 'a', "POINT(1 0)");
+ // ___|
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(1 0, 1 1)", "SEGMENT(0 0, 1 0)", 'a', "POINT(1 0)");
+
+ // |/
+ // /|
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(10 -1, 20 1)", "SEGMENT(12.5 -1, 12.5 1)",
+ great_elliptic('i', "POINT(12.5 -0.50051443471392)"),
+ geodesic_vincenty('i', "POINT(12.5 -0.5005177749487734)"),
+ geodesic_thomas('i', "POINT(12.5 -0.5005177654827411)"),
+ geodesic_andoyer('i', "POINT(12.5 -0.500525380045163)"));
+ // |/
+ // /|
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(10 -1, 20 1)", "SEGMENT(17.5 -1, 17.5 1)",
+ great_elliptic('i', "POINT(17.5 0.50051443471392)"),
+ geodesic_vincenty('i', "POINT(17.5 0.5005177748229335)"),
+ geodesic_thomas('i', "POINT(17.5 0.5005178030678186)"),
+ geodesic_andoyer('i', "POINT(17.5 0.5004949944844279)"));
+
+ // vertical, crossing at the pole or disjoint
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 45, -90 60)", "SEGMENT(0 50, 180 70)", 'i', "POINT(0 90)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 -45, -90 -60)", "SEGMENT(0 -50, 180 -70)", 'i', "POINT(0 -90)");
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 45, -90 60)", "SEGMENT(0 -50, 180 -70)", 'd');
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 -45, -90 -60)", "SEGMENT(0 50, 180 70)", 'd');
+
+ // vertical touching at the pole
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 90, 90 45)", "SEGMENT(0 90, 0 45)", 'f', "POINT(90 90)"); // should probably be (0 90)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 90, 90 45)", "SEGMENT(0 45, 0 90)", 'a', "POINT(90 90)"); // should probably be (0 90)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 45, 90 90)", "SEGMENT(0 90, 0 45)", 'a', "POINT(90 90)"); // should probably be (0 90)
+ test_all_strategies<segment_t, point_t>(
+ "SEGMENT(90 45, 90 90)", "SEGMENT(0 45, 0 90)", 't', "POINT(90 90)"); // should probably be (0 90)
+
+ // one vertical with endpoint at a pole
+ /*test_strategies<segment_t, point_t>(
+ "SEGMENT(0 90, 90 0)", "SEGMENT(89 45, 91 45)",
+ great_elliptic('i', "POINT(90 45.00436354465514)"),
+ geodesic_vincenty('i', "POINT(90.00000000000112 45.00437824795338)"),
+ geodesic_thomas('i', "POINT(90.00000000472062 45.00437824797395)"),
+ geodesic_andoyer('i', "POINT(89.99999993672924 45.00437824794587)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(90 0, 0 90)", "SEGMENT(89 45, 91 45)",
+ great_elliptic('i', "POINT(90 45.00436354465514)"),
+ geodesic_vincenty('i', "POINT(90.00000000000112 45.00437824795338)"),
+ geodesic_thomas('i', "POINT(90.00000000472062 45.00437824797395)"),
+ geodesic_andoyer('i', "POINT(89.99999993672924 45.00437824794587)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(0 -90, 90 0)", "SEGMENT(89 -45, 91 -45)",
+ great_elliptic('i', "POINT(90 -45.00436354465514)"),
+ geodesic_vincenty('i', "POINT(90.00000000000112 -45.00437824795338)"),
+ geodesic_thomas('i', "POINT(90.00000000472062 -45.00437824797395)"),
+ geodesic_andoyer('i', "POINT(89.99999993672924 -45.00437824794587)"));
+ test_strategies<segment_t, point_t>(
+ "SEGMENT(90 0, 0 -90)", "SEGMENT(89 -45, 91 -45)",
+ great_elliptic('i', "POINT(90 -45.00436354465514)"),
+ geodesic_vincenty('i', "POINT(90.00000000000112 -45.00437824795338)"),
+ geodesic_thomas('i', "POINT(90.00000000472062 -45.00437824797395)"),
+ geodesic_andoyer('i', "POINT(89.99999993672924 -45.00437824794587)"));*/
+}
+
+template <typename T>
+void test_geographic_radian()
+{
+ typedef bg::model::point<T, 2, bg::cs::geographic<bg::radian> > point_t;
+ typedef bg::model::segment<point_t> segment_t;
+
+ bg::strategy::intersection::geographic_segments<bg::strategy::vincenty> strategy;
+
+ // https://github.com/boostorg/geometry/issues/470
+ point_t p0(0.000000001, 0.000000001);
+ point_t p1(0.000000001, 0.000000005);
+ point_t p2(0.000000005, 0.000000005);
+ segment_t s1(p0, p1);
+ segment_t s2(p1, p2);
+ test_strategy_one(s1, s1, strategy, 'e', 2, p0, p1);
+ test_strategy_one(s2, s2, strategy, 'e', 2, p1, p2);
+}
+
+int test_main(int, char* [])
+{
+ //test_geographic<float>();
+ test_geographic<double>();
+
+ test_geographic_radian<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/segment_intersection_geo.hpp b/src/boost/libs/geometry/test/strategies/segment_intersection_geo.hpp
new file mode 100644
index 000000000..4cfb571e7
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/segment_intersection_geo.hpp
@@ -0,0 +1,270 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_STRATEGIES_SEGMENT_INTERSECTION_GEO_HPP
+#define BOOST_GEOMETRY_TEST_STRATEGIES_SEGMENT_INTERSECTION_GEO_HPP
+
+
+#include "segment_intersection_sph.hpp"
+
+#include <boost/geometry/strategies/geographic/intersection.hpp>
+#include <boost/geometry/strategies/geographic/intersection_elliptic.hpp>
+
+
+template <typename S, typename P>
+void test_default_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ typename bg::strategy::intersection::services::default_strategy
+ <
+ bg::geographic_tag
+ >::type strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+
+template <typename S, typename P>
+void test_great_elliptic(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ bg::strategy::intersection::great_elliptic_segments<> strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+/*
+template <typename S, typename P>
+void test_experimental_elliptic(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ bg::strategy::intersection::experimental_elliptic_segments<> strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+*/
+template <typename S, typename P>
+void test_geodesic_vincenty(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ bg::strategy::intersection::geographic_segments<bg::strategy::vincenty, 4> strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+
+template <typename S, typename P>
+void test_geodesic_thomas(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ bg::strategy::intersection::geographic_segments<bg::strategy::thomas, 2> strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+
+template <typename S, typename P>
+void test_geodesic_andoyer(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ bg::strategy::intersection::geographic_segments<bg::strategy::andoyer, 1> strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+
+
+struct strategy_base
+{
+ strategy_base(char m_)
+ : m(m_), expected_count(0), opposite(-1)
+ {}
+ strategy_base(char m_, std::string const& wkt1_)
+ : m(m_), expected_count(1), wkt1(wkt1_), opposite(-1)
+ {}
+ strategy_base(char m_, std::string const& wkt1_, std::string const& wkt2_, bool opposite_)
+ : m(m_), expected_count(1), wkt1(wkt1_), wkt2(wkt2_), opposite(opposite_ ? 1 : 0)
+ {}
+
+ char m;
+ std::size_t expected_count;
+ std::string wkt1, wkt2;
+ int opposite;
+};
+struct strategy_default : strategy_base
+{
+ strategy_default(char m)
+ : strategy_base(m)
+ {}
+ strategy_default(char m, std::string const& wkt1)
+ : strategy_base(m, wkt1)
+ {}
+ strategy_default(char m, std::string const& wkt1, std::string const& wkt2, bool opposite)
+ : strategy_base(m, wkt1, wkt2, opposite)
+ {}
+};
+struct geodesic_vincenty : strategy_base
+{
+ geodesic_vincenty(char m)
+ : strategy_base(m)
+ {}
+ geodesic_vincenty(char m, std::string const& wkt1)
+ : strategy_base(m, wkt1)
+ {}
+ geodesic_vincenty(char m, std::string const& wkt1, std::string const& wkt2, bool opposite)
+ : strategy_base(m, wkt1, wkt2, opposite)
+ {}
+};
+struct geodesic_thomas : strategy_base
+{
+ geodesic_thomas(char m)
+ : strategy_base(m)
+ {}
+ geodesic_thomas(char m, std::string const& wkt1)
+ : strategy_base(m, wkt1)
+ {}
+ geodesic_thomas(char m, std::string const& wkt1, std::string const& wkt2, bool opposite)
+ : strategy_base(m, wkt1, wkt2, opposite)
+ {}
+};
+struct geodesic_andoyer : strategy_base
+{
+ geodesic_andoyer(char m)
+ : strategy_base(m)
+ {}
+ geodesic_andoyer(char m, std::string const& wkt1)
+ : strategy_base(m, wkt1)
+ {}
+ geodesic_andoyer(char m, std::string const& wkt1, std::string const& wkt2, bool opposite)
+ : strategy_base(m, wkt1, wkt2, opposite)
+ {}
+};
+struct great_elliptic : strategy_base
+{
+ great_elliptic(char m)
+ : strategy_base(m)
+ {}
+ great_elliptic(char m, std::string const& wkt1)
+ : strategy_base(m, wkt1)
+ {}
+ great_elliptic(char m, std::string const& wkt1, std::string const& wkt2, bool opposite)
+ : strategy_base(m, wkt1, wkt2, opposite)
+ {}
+};
+
+
+template <typename S, typename P>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ strategy_default const& s)
+{
+ test_default_strategy<S, P>(s1_wkt, s2_wkt, s.m, s.expected_count, s.wkt1, s.wkt2);
+}
+
+template <typename S, typename P>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ great_elliptic const& s)
+{
+ test_great_elliptic<S, P>(s1_wkt, s2_wkt, s.m, s.expected_count, s.wkt1, s.wkt2);
+}
+
+template <typename S, typename P>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ geodesic_vincenty const& s)
+{
+ test_geodesic_vincenty<S, P>(s1_wkt, s2_wkt, s.m, s.expected_count, s.wkt1, s.wkt2);
+}
+
+template <typename S, typename P>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ geodesic_thomas const& s)
+{
+ test_geodesic_thomas<S, P>(s1_wkt, s2_wkt, s.m, s.expected_count, s.wkt1, s.wkt2);
+}
+
+template <typename S, typename P>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ geodesic_andoyer const& s)
+{
+ test_geodesic_andoyer<S, P>(s1_wkt, s2_wkt, s.m, s.expected_count, s.wkt1, s.wkt2);
+}
+
+
+template <typename S, typename P, typename SR1>
+void test_strategies(std::string const& s1_wkt, std::string const& s2_wkt,
+ SR1 const& sr1)
+{
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr1);
+}
+template <typename S, typename P, typename SR1, typename SR2>
+void test_strategies(std::string const& s1_wkt, std::string const& s2_wkt,
+ SR1 const& sr1, SR2 const& sr2)
+{
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr1);
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr2);
+}
+template <typename S, typename P, typename SR1, typename SR2, typename SR3>
+void test_strategies(std::string const& s1_wkt, std::string const& s2_wkt,
+ SR1 const& sr1, SR2 const& sr2, SR3 const& sr3)
+{
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr1);
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr2);
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr3);
+}
+template <typename S, typename P, typename SR1, typename SR2, typename SR3, typename SR4>
+void test_strategies(std::string const& s1_wkt, std::string const& s2_wkt,
+ SR1 const& sr1, SR2 const& sr2, SR3 const& sr3, SR4 const& sr4)
+{
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr1);
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr2);
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr3);
+ test_strategy<S, P>(s1_wkt, s2_wkt, sr4);
+}
+
+
+template <typename S, typename P>
+void test_all_strategies(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::string const& ip0_wkt = "")
+{
+ std::size_t expected_count = ip0_wkt.empty() ? 0 : 1;
+
+ test_default_strategy<S, P>(s1_wkt, s2_wkt, m, expected_count, ip0_wkt);
+ test_great_elliptic<S, P>(s1_wkt, s2_wkt, m, expected_count, ip0_wkt);
+ //test_experimental_elliptic<S, P>(s1_wkt, s2_wkt, m, expected_count, ip0_wkt);
+ test_geodesic_vincenty<S, P>(s1_wkt, s2_wkt, m, expected_count, ip0_wkt);
+ test_geodesic_thomas<S, P>(s1_wkt, s2_wkt, m, expected_count, ip0_wkt);
+ test_geodesic_andoyer<S, P>(s1_wkt, s2_wkt, m, expected_count, ip0_wkt);
+}
+
+template <typename S, typename P>
+void test_all_strategies(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m,
+ std::string const& ip0_wkt, std::string const& ip1_wkt,
+ bool opposite)
+{
+ int opposite_id = opposite ? 1 : 0;
+
+ test_default_strategy<S, P>(s1_wkt, s2_wkt, m, 2, ip0_wkt, ip1_wkt, opposite_id);
+ test_great_elliptic<S, P>(s1_wkt, s2_wkt, m, 2, ip0_wkt, ip1_wkt, opposite_id);
+ //test_experimental_elliptic<S, P>(s1_wkt, s2_wkt, m, 2, ip0_wkt, ip1_wkt, opposite_id);
+ test_geodesic_vincenty<S, P>(s1_wkt, s2_wkt, m, 2, ip0_wkt, ip1_wkt, opposite_id);
+ test_geodesic_thomas<S, P>(s1_wkt, s2_wkt, m, 2, ip0_wkt, ip1_wkt, opposite_id);
+ test_geodesic_andoyer<S, P>(s1_wkt, s2_wkt, m, 2, ip0_wkt, ip1_wkt, opposite_id);
+}
+
+#endif // BOOST_GEOMETRY_TEST_STRATEGIES_SEGMENT_INTERSECTION_GEO_HPP
diff --git a/src/boost/libs/geometry/test/strategies/segment_intersection_sph.cpp b/src/boost/libs/geometry/test/strategies/segment_intersection_sph.cpp
new file mode 100644
index 000000000..37a2af248
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/segment_intersection_sph.cpp
@@ -0,0 +1,299 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#define BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR
+#include "segment_intersection_sph.hpp"
+
+
+#include <boost/geometry/strategies/spherical/intersection.hpp>
+
+
+template <typename S, typename P>
+void test_spherical_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "")
+{
+ bg::strategy::intersection::spherical_segments<> strategy;
+
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt);
+}
+
+template <typename T>
+void test_spherical()
+{
+ typedef bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > point_t;
+ typedef bg::model::segment<point_t> segment_t;
+
+ // crossing X
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(-45 45, 45 -45)", 'i', 1, "POINT(0 0)");
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(45 -45, -45 45)", 'i', 1, "POINT(0 0)");
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(45 45, -45 -45)", "SEGMENT(-45 45, 45 -45)", 'i', 1, "POINT(0 0)");
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(45 45, -45 -45)", "SEGMENT(45 -45, -45 45)", 'i', 1, "POINT(0 0)");
+ // crossing X
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 1, 1 -1)", 'i', 1, "POINT(0 0)");
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 -1, -1 1)", 'i', 1, "POINT(0 0)");
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(-1 1, 1 -1)", 'i', 1, "POINT(0 0)");
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(1 1, -1 -1)", "SEGMENT(1 -1, -1 1)", 'i', 1, "POINT(0 0)");
+
+ // equal
+ // //
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(-45 -45, 45 45)", 'e', 2, "POINT(-45 -45)", "POINT(45 45)");
+ // //
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-45 -45, 45 45)", "SEGMENT(45 45, -45 -45)", 'e', 2, "POINT(-45 -45)", "POINT(45 45)");
+
+ // starting outside s1
+ // /
+ // |
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, -1 -1)", 'a', 1, "POINT(-1 -1)");
+ // /
+ // /|
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, 0 0)", 'm', 1, "POINT(0 0)");
+ // /|
+ // / |
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, 1 1)", 't', 1, "POINT(1 1)");
+ // |/
+ // /|
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, 2 2)", 'i', 1, "POINT(0 0)");
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, -1 0)", 'a', 1, "POINT(-1 0)");
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, 0 0)", 'c', 2, "POINT(-1 0)", "POINT(0 0)");
+ // ------
+ // ---------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, 1 0)", 'c', 2, "POINT(-1 0)", "POINT(1 0)");
+ // ------
+ // ------------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, 2 0)", 'c', 2, "POINT(-1 0)", "POINT(1 0)");
+
+ // starting at s1
+ // /
+ // //
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, 0 0)", 'c', 2, "POINT(-1 -1)", "POINT(0 0)");
+ // //
+ // //
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, 1 1)", 'e', 2, "POINT(-1 -1)", "POINT(1 1)");
+ // | /
+ // |/
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, 2 2)", 'f', 1, "POINT(-1 -1)");
+ // ------
+ // ---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, 0 0)", 'c', 2, "POINT(-1 0)", "POINT(0 0)");
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, 1 0)", 'e', 2, "POINT(-1 0)", "POINT(1 0)");
+ // ------
+ // ---------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, 2 0)", 'c', 2, "POINT(-1 0)", "POINT(1 0)");
+
+ // starting inside
+ // //
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(0 0, 1 1)", 'c', 2, "POINT(0 0)", "POINT(1 1)");
+ // |/
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(0 0, 2 2)", 's', 1, "POINT(0 0)");
+ // ------
+ // ---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, 1 0)", 'c', 2, "POINT(0 0)", "POINT(1 0)");
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, 2 0)", 'c', 2, "POINT(0 0)", "POINT(1 0)");
+
+ // starting at p2
+ // |
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 1, 2 2)", 'a', 1, "POINT(1 1)");
+ // ------
+ // ---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(1 0, 2 0)", 'a', 1, "POINT(1 0)");
+
+ // disjoint, crossing
+ // /
+ // |
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-3 -3, -2 -2)", 'd', 0);
+ // |
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(2 2, 3 3)", 'd', 0);
+ // disjoint, collinear
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-3 0, -2 0)", 'd', 0);
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(2 0, 3 0)", 'd', 0);
+
+ // degenerated
+ // /
+ // *
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-2 -2, -2 -2)", 'd', 0);
+ // /
+ // *
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(-1 -1, -1 -1)", '0', 1, "POINT(-1 -1)");
+ // /
+ // *
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(0 0, 0 0)", '0', 1, "POINT(0 0)");
+ // *
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(1 1, 1 1)", '0', 1, "POINT(1 1)");
+ // *
+ // /
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 -1, 1 1)", "SEGMENT(2 2, 2 2)", 'd', 0);
+ // similar to above, collinear
+ // * ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-2 0, -2 0)", 'd', 0);
+ // *------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(-1 0, -1 0)", '0', 1, "POINT(-1 0)");
+ // ---*---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(0 0, 0 0)", '0', 1, "POINT(0 0)");
+ // ------*
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(1 0, 1 0)", '0', 1, "POINT(1 0)");
+ // ------ *
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 0, 1 0)", "SEGMENT(2 0, 2 0)", 'd', 0);
+
+ // Northern hemisphere
+ // --- ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-3 50, -2 50)", 'd', 0);
+ // ------
+ // ---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, -1 50)", 'a', 1, "POINT(-1 50)");
+ // \/
+ // /\ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, 0 50)", 'i', 1, "POINT(-0.5 50.0032229484023)");
+ // ________
+ // / _____\ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, 1 50)", 't', 1, "POINT(1 50)");
+ // _________
+ // / _____ \ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-2 50, 2 50)", 'd', 0);
+ // ______
+ // /___ \ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-1 50, 0 50)", 'f', 1, "POINT(-1 50)");
+ // ------
+ // ------
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-1 50, 1 50)", 'e', 2, "POINT(-1 50)", "POINT(1 50)");
+ // ________
+ // /_____ \ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(-1 50, 2 50)", 'f', 1, "POINT(-1 50)");
+ // ______
+ // / ___\ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(0 50, 1 50)", 't', 1, "POINT(1 50)");
+ // \/
+ // /\ (avoid multi-line comment)
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(0 50, 2 50)", 'i', 1, "POINT(0.5 50.0032229484023)");
+ // ------
+ // ---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(1 50, 2 50)", 'a', 1, "POINT(1 50)");
+ // ------ ---
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(-1 50, 1 50)", "SEGMENT(2 50, 3 50)", 'd', 0);
+
+ // ___|
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(0 0, 1 0)", "SEGMENT(1 0, 1 1)", 'a', 1, "POINT(1 0)");
+ // ___|
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(1 0, 1 1)", "SEGMENT(0 0, 1 0)", 'a', 1, "POINT(1 0)");
+
+ // |/
+ // /|
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(10 -1, 20 1)", "SEGMENT(12.5 -1, 12.5 1)", 'i', 1, "POINT(12.5 -0.50051443471392)");
+ // |/
+ // /|
+ test_spherical_strategy<segment_t, point_t>(
+ "SEGMENT(10 -1, 20 1)", "SEGMENT(17.5 -1, 17.5 1)", 'i', 1, "POINT(17.5 0.50051443471392)");
+}
+
+template <typename T>
+void test_spherical_radian()
+{
+ typedef bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::radian> > point_t;
+ typedef bg::model::segment<point_t> segment_t;
+
+ bg::strategy::intersection::spherical_segments<> strategy;
+
+ // https://github.com/boostorg/geometry/issues/470
+ point_t p0(0.00001, 0.00001);
+ point_t p1(0.00001, 0.00005);
+ point_t p2(0.00005, 0.00005);
+ segment_t s1(p0, p1);
+ segment_t s2(p1, p2);
+ test_strategy_one(s1, s1, strategy, 'e', 2, p0, p1);
+ test_strategy_one(s2, s2, strategy, 'e', 2, p1, p2);
+}
+
+int test_main(int, char* [])
+{
+ //test_spherical<float>();
+ test_spherical<double>();
+
+ test_spherical_radian<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/segment_intersection_sph.hpp b/src/boost/libs/geometry/test/strategies/segment_intersection_sph.hpp
new file mode 100644
index 000000000..687d34022
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/segment_intersection_sph.hpp
@@ -0,0 +1,221 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2016-2018, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_STRATEGIES_SEGMENT_INTERSECTION_SPH_HPP
+#define BOOST_GEOMETRY_TEST_STRATEGIES_SEGMENT_INTERSECTION_SPH_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/equals.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+
+#include <boost/geometry/policies/relate/direction.hpp>
+#include <boost/geometry/policies/relate/intersection_points.hpp>
+#include <boost/geometry/policies/relate/tupled.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp>
+
+template <typename T>
+bool equals_relaxed_val(T const& v1, T const& v2, T const& eps_scale)
+{
+ T const c1 = 1;
+ T relaxed_eps = std::numeric_limits<T>::epsilon()
+ * bg::math::detail::greatest(c1, bg::math::abs(v1), bg::math::abs(v2))
+ * eps_scale;
+ return bg::math::abs(v1 - v2) <= relaxed_eps;
+}
+
+template <typename P1, typename P2, typename T>
+bool equals_relaxed(P1 const& p1, P2 const& p2, T const& eps_scale)
+{
+ typedef typename bg::select_coordinate_type<P1, P2>::type calc_t;
+ calc_t c1 = 1;
+ calc_t p10 = bg::get<0>(p1);
+ calc_t p11 = bg::get<1>(p1);
+ calc_t p20 = bg::get<0>(p2);
+ calc_t p21 = bg::get<1>(p2);
+ calc_t relaxed_eps = std::numeric_limits<calc_t>::epsilon()
+ * bg::math::detail::greatest(c1, bg::math::abs(p10), bg::math::abs(p11), bg::math::abs(p20), bg::math::abs(p21))
+ * eps_scale;
+ calc_t diff0 = p10 - p20;
+ // needed e.g. for -179.999999 - 180.0
+ if (diff0 < -180)
+ diff0 += 360;
+ return bg::math::abs(diff0) <= relaxed_eps
+ && bg::math::abs(p11 - p21) <= relaxed_eps;
+}
+
+template <typename S1, typename S2, typename Strategy, typename P>
+void test_strategy_one(S1 const& s1, S2 const& s2,
+ Strategy const& strategy,
+ char m, std::size_t expected_count,
+ P const& ip0 = P(), P const& ip1 = P(),
+ int opposite_id = -1)
+{
+ typedef typename bg::coordinate_type<P>::type coord_t;
+ typedef bg::policies::relate::segments_tupled
+ <
+ bg::policies::relate::segments_intersection_points
+ <
+ bg::segment_intersection_points<P, bg::segment_ratio<coord_t> >
+ >,
+ bg::policies::relate::segments_direction
+ > policy_t;
+
+ typedef typename policy_t::return_type return_type;
+
+ bg::detail::segment_as_subrange<S1> sr1(s1);
+ bg::detail::segment_as_subrange<S2> sr2(s2);
+
+ return_type res = strategy.apply(sr1, sr2, policy_t());
+
+ size_t const res_count = boost::get<0>(res).count;
+ char const res_method = boost::get<1>(res).how;
+
+ BOOST_CHECK_MESSAGE(res_method == m,
+ "IP method: " << res_method << " different than expected: " << m
+ << " for " << bg::wkt(s1) << " and " << bg::wkt(s2));
+
+ BOOST_CHECK_MESSAGE(res_count == expected_count,
+ "IP count: " << res_count << " different than expected: " << expected_count
+ << " for " << bg::wkt(s1) << " and " << bg::wkt(s2));
+
+ // The EPS is scaled because during the conversion various angles may be not converted
+ // to cartesian 3d the same way which results in a different intersection point
+ // For more information read the info in spherical intersection strategy file.
+
+ // Plus in geographic CS the result strongly depends on the compiler,
+ // probably due to differences in FP trigonometric function implementations
+
+ int eps_scale = 1;
+ bool is_geographic = boost::is_same<typename bg::cs_tag<S1>::type, bg::geographic_tag>::value;
+ if (is_geographic)
+ {
+ eps_scale = 100000;
+ }
+ else
+ {
+ eps_scale = res_method != 'i' ? 1 : 1000;
+ }
+
+ if (res_count > 0 && expected_count > 0)
+ {
+ P const& res_i0 = boost::get<0>(res).intersections[0];
+ coord_t denom_a0 = boost::get<0>(res).fractions[0].robust_ra.denominator();
+ coord_t denom_b0 = boost::get<0>(res).fractions[0].robust_rb.denominator();
+ BOOST_CHECK_MESSAGE(equals_relaxed(res_i0, ip0, eps_scale),
+ "IP0: " << std::setprecision(16) << bg::wkt(res_i0) << " different than expected: " << bg::wkt(ip0)
+ << " for " << bg::wkt(s1) << " and " << bg::wkt(s2));
+ BOOST_CHECK_MESSAGE(denom_a0 > coord_t(0),
+ "IP0 fraction A denominator: " << std::setprecision(16) << denom_a0 << " is incorrect");
+ BOOST_CHECK_MESSAGE(denom_b0 > coord_t(0),
+ "IP0 fraction B denominator: " << std::setprecision(16) << denom_b0 << " is incorrect");
+ }
+ if (res_count > 1 && expected_count > 1)
+ {
+ P const& res_i1 = boost::get<0>(res).intersections[1];
+ coord_t denom_a1 = boost::get<0>(res).fractions[1].robust_ra.denominator();
+ coord_t denom_b1 = boost::get<0>(res).fractions[1].robust_rb.denominator();
+ BOOST_CHECK_MESSAGE(equals_relaxed(res_i1, ip1, eps_scale),
+ "IP1: " << std::setprecision(16) << bg::wkt(res_i1) << " different than expected: " << bg::wkt(ip1)
+ << " for " << bg::wkt(s1) << " and " << bg::wkt(s2));
+ BOOST_CHECK_MESSAGE(denom_a1 > coord_t(0),
+ "IP1 fraction A denominator: " << std::setprecision(16) << denom_a1 << " is incorrect");
+ BOOST_CHECK_MESSAGE(denom_b1 > coord_t(0),
+ "IP1 fraction B denominator: " << std::setprecision(16) << denom_b1 << " is incorrect");
+ }
+
+ if (opposite_id >= 0)
+ {
+ bool opposite = opposite_id != 0;
+ BOOST_CHECK_MESSAGE(opposite == boost::get<1>(res).opposite,
+ bg::wkt(s1) << " and " << bg::wkt(s2) << (opposite_id == 0 ? " are not " : " are ") << "opposite" );
+ }
+}
+
+template <typename T>
+T translated(T v, double t)
+{
+ v += T(t);
+ if (v > 180)
+ v -= 360;
+ return v;
+}
+
+template <typename S1, typename S2, typename Strategy, typename P>
+void test_strategy(S1 const& s1, S2 const& s2,
+ Strategy const& strategy,
+ char m, std::size_t expected_count,
+ P const& ip0 = P(), P const& ip1 = P(),
+ int opposite_id = -1)
+{
+ S1 s1t = s1;
+ S2 s2t = s2;
+ P ip0t = ip0;
+ P ip1t = ip1;
+
+#ifndef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR
+ test_strategy_one(s1t, s2t, strategy, m, expected_count, ip0t, ip1t, opposite_id);
+#else
+ double t = 0;
+ for (int i = 0; i < 4; ++i, t += 90)
+ {
+ bg::set<0, 0>(s1t, translated(bg::get<0, 0>(s1), t));
+ bg::set<1, 0>(s1t, translated(bg::get<1, 0>(s1), t));
+ bg::set<0, 0>(s2t, translated(bg::get<0, 0>(s2), t));
+ bg::set<1, 0>(s2t, translated(bg::get<1, 0>(s2), t));
+ if (expected_count > 0)
+ bg::set<0>(ip0t, translated(bg::get<0>(ip0), t));
+ if (expected_count > 1)
+ bg::set<0>(ip1t, translated(bg::get<0>(ip1), t));
+
+ test_strategy_one(s1t, s2t, strategy, m, expected_count, ip0t, ip1t, opposite_id);
+ }
+#endif
+}
+
+template <typename S1, typename S2, typename P, typename Strategy>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ Strategy const& strategy,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ S1 s1;
+ S2 s2;
+ P ip0, ip1;
+
+ bg::read_wkt(s1_wkt, s1);
+ bg::read_wkt(s2_wkt, s2);
+ if (! ip0_wkt.empty())
+ bg::read_wkt(ip0_wkt, ip0);
+ if (!ip1_wkt.empty())
+ bg::read_wkt(ip1_wkt, ip1);
+
+ test_strategy(s1, s2, strategy, m, expected_count, ip0, ip1, opposite_id);
+}
+
+template <typename S, typename P, typename Strategy>
+void test_strategy(std::string const& s1_wkt, std::string const& s2_wkt,
+ Strategy const& strategy,
+ char m, std::size_t expected_count,
+ std::string const& ip0_wkt = "", std::string const& ip1_wkt = "",
+ int opposite_id = -1)
+{
+ test_strategy<S, S, P>(s1_wkt, s2_wkt, strategy, m, expected_count, ip0_wkt, ip1_wkt, opposite_id);
+}
+
+#endif // BOOST_GEOMETRY_TEST_STRATEGIES_SEGMENT_INTERSECTION_SPH_HPP
diff --git a/src/boost/libs/geometry/test/strategies/side_of_intersection.cpp b/src/boost/libs/geometry/test/strategies/side_of_intersection.cpp
new file mode 100644
index 000000000..b42270e3d
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/side_of_intersection.cpp
@@ -0,0 +1,108 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/cartesian/side_of_intersection.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+
+namespace bg = boost::geometry;
+
+int test_main(int, char* [])
+{
+ typedef bg::model::d2::point_xy<boost::long_long_type> point;
+ typedef bg::model::segment<point> segment;
+
+ typedef bg::strategy::side::side_of_intersection side;
+
+ point no_fb(-99, -99);
+
+ segment a(point(20, 10), point(10, 20));
+
+ segment b1(point(11, 16), point(20, 14)); // IP with a: (14.857, 15.143)
+ segment b2(point(10, 16), point(20, 14)); // IP with a: (15, 15)
+
+ segment c1(point(15, 16), point(13, 8));
+ segment c2(point(15, 16), point(14, 8));
+ segment c3(point(15, 16), point(15, 8));
+
+
+ BOOST_CHECK_EQUAL( 1, side::apply(a, b1, c1, no_fb));
+ BOOST_CHECK_EQUAL(-1, side::apply(a, b1, c2, no_fb));
+ BOOST_CHECK_EQUAL(-1, side::apply(a, b1, c3, no_fb));
+
+ BOOST_CHECK_EQUAL( 1, side::apply(a, b2, c1, no_fb));
+ BOOST_CHECK_EQUAL( 1, side::apply(a, b2, c2, no_fb));
+ BOOST_CHECK_EQUAL( 0, side::apply(a, b2, c3, no_fb));
+
+ // Collinear cases
+ // 1: segments intersecting are collinear (with a fallback point):
+ {
+ point fb(5, 5);
+ segment col1(point(0, 5), point(5, 5));
+ segment col2(point(5, 5), point(10, 5)); // One IP with col1 at (5,5)
+ segment col3(point(5, 0), point(5, 5));
+ BOOST_CHECK_EQUAL( 0, side::apply(col1, col2, col3, fb));
+ }
+ // 2: segment of side calculation collinear with one of the segments
+ {
+ point fb(5, 5);
+ segment col1(point(0, 5), point(10, 5));
+ segment col2(point(5, 5), point(5, 12)); // IP with col1 at (5,5)
+ segment col3(point(5, 1), point(5, 5)); // collinear with col2
+ BOOST_CHECK_EQUAL( 0, side::apply(col1, col2, col3, fb));
+ }
+ {
+ point fb(5, 5);
+ segment col1(point(10, 5), point(0, 5));
+ segment col2(point(5, 5), point(5, 12)); // IP with col1 at (5,5)
+ segment col3(point(5, 1), point(5, 5)); // collinear with col2
+ BOOST_CHECK_EQUAL( 0, side::apply(col1, col2, col3, fb));
+ }
+ {
+ point fb(5, 5);
+ segment col1(point(0, 5), point(10, 5));
+ segment col2(point(5, 12), point(5, 5)); // IP with col1 at (5,5)
+ segment col3(point(5, 1), point(5, 5)); // collinear with col2
+ BOOST_CHECK_EQUAL( 0, side::apply(col1, col2, col3, fb));
+ }
+
+ {
+ point fb(517248, -517236);
+ segment col1(point(-172408, -517236), point(862076, -517236));
+ segment col2(point(517248, -862064), point(517248, -172408));
+ segment col3(point(517248, -172408), point(517248, -517236));
+ BOOST_CHECK_EQUAL( 0, side::apply(col1, col2, col3, fb));
+ }
+ {
+ point fb(-221647, -830336);
+ segment col1(point(-153817, -837972), point(-222457, -830244));
+ segment col2(point(-221139, -833615), point(-290654, -384388));
+ segment col3(point(-255266, -814663), point(-264389, -811197));
+ BOOST_CHECK_EQUAL(1, side::apply(col1, col2, col3, fb)); // Left of segment...
+ }
+
+
+ {
+ point fb(27671131, 30809240);
+ segment col1(point(27671116, 30809247), point(27675474, 30807351));
+ segment col2(point(27666779, 30811130), point(27671139, 30809237));
+ segment col3(point(27671122, 30809244), point(27675480, 30807348));
+ BOOST_CHECK_EQUAL(1, side::apply(col1, col2, col3, fb)); // Left of segment...
+ }
+
+ // TODO: we might add a check calculating the IP, determining the side
+ // with the normal side strategy, and verify the results are equal
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/strategies/spherical_side.cpp b/src/boost/libs/geometry/test/strategies/spherical_side.cpp
new file mode 100644
index 000000000..b834e016a
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/spherical_side.cpp
@@ -0,0 +1,173 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2015.
+// Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/cs.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+#include <boost/geometry/strategies/spherical/side_by_cross_track.hpp>
+//#include <boost/geometry/strategies/spherical/side_via_plane.hpp>
+#include <boost/geometry/strategies/spherical/ssf.hpp>
+#include <boost/geometry/strategies/cartesian/side_by_triangle.hpp>
+
+#include <boost/geometry/strategies/geographic/mapping_ssf.hpp>
+#include <boost/geometry/strategies/geographic/side_andoyer.hpp>
+#include <boost/geometry/strategies/geographic/side_thomas.hpp>
+#include <boost/geometry/strategies/geographic/side_vincenty.hpp>
+
+#include <boost/geometry/util/math.hpp>
+
+
+namespace boost { namespace geometry {
+
+template <typename Vector, typename Point1, typename Point2>
+static inline Vector create_vector(Point1 const& p1, Point2 const& p2)
+{
+ Vector v;
+ convert(p1, v);
+ subtract_point(v, p2);
+ return v;
+}
+
+}}
+
+inline char side_char(int side)
+{
+ return side == 1 ? 'L'
+ : side == -1 ? 'R'
+ : '-'
+ ;
+}
+
+template <typename Point>
+void test_side1(std::string const& /*case_id*/, Point const& p1, Point const& p2, Point const& p3,
+ int expected, int expected_cartesian)
+{
+ namespace bgss = bg::strategy::side;
+
+ // std::cout << case_id << ": ";
+ //int s = bgss::side_via_plane<>::apply(p1, p2, p3);
+ int side_ssf = bgss::spherical_side_formula<>::apply(p1, p2, p3);
+ //int side2 = bgss::side_via_plane<>::apply(p1, p2, p3);
+ int side_ct = bgss::side_by_cross_track<>::apply(p1, p2, p3);
+
+ // non-official
+ typedef bg::srs::spheroid<double> spheroid;
+ spheroid const sph(1.0, 1.0);
+ int side_mssf1 = bgss::mapping_spherical_side_formula<spheroid>(sph).apply(p1, p2, p3);
+ int side_mssf2 = bgss::mapping_spherical_side_formula<spheroid, bgss::mapping_reduced>(sph).apply(p1, p2, p3);
+ int side_mssf3 = bgss::mapping_spherical_side_formula<spheroid, bgss::mapping_geocentric>(sph).apply(p1, p2, p3);
+ int side_andoyer = bgss::andoyer<spheroid>(sph).apply(p1, p2, p3);
+ int side_thomas = bgss::thomas<spheroid>(sph).apply(p1, p2, p3);
+ int side_vincenty = bgss::vincenty<spheroid>(sph).apply(p1, p2, p3);
+
+ // cartesian
+ typedef bg::strategy::side::services::default_strategy<bg::cartesian_tag>::type cartesian_strategy;
+ int side_cart = cartesian_strategy::apply(p1, p2, p3);
+
+ BOOST_CHECK_EQUAL(side_ssf, expected);
+ BOOST_CHECK_EQUAL(side_ct, expected);
+ BOOST_CHECK_EQUAL(side_mssf1, expected);
+ BOOST_CHECK_EQUAL(side_mssf2, expected);
+ BOOST_CHECK_EQUAL(side_mssf3, expected);
+ BOOST_CHECK_EQUAL(side_andoyer, expected);
+ BOOST_CHECK_EQUAL(side_thomas, expected);
+ BOOST_CHECK_EQUAL(side_vincenty, expected);
+ BOOST_CHECK_EQUAL(side_cart, expected_cartesian);
+
+ /*
+ std::cout
+ << "exp: " << side_char(expected)
+ << " ssf: " << side_char(side1)
+ << " pln: " << side_char(side2)
+ << " ct: " << side_char(side3)
+ //<< " def: " << side_char(side4)
+ << " cart: " << side_char(side5)
+ << std::endl;
+ */
+}
+
+template <typename Point>
+void test_side(std::string const& case_id, Point const& p1, Point const& p2, Point const& p3,
+ int expected, int expected_cartesian = -999)
+{
+ if (expected_cartesian == -999)
+ {
+ expected_cartesian = expected;
+ }
+ test_side1(case_id, p1, p2, p3, expected, expected_cartesian);
+ test_side1(case_id, p2, p1, p3, -expected, -expected_cartesian);
+}
+
+
+template <typename Point>
+void test_all()
+{
+ typedef typename bg::coordinate_type<Point>::type CT;
+
+ Point amsterdam(bg::math::rounding_cast<CT>(5.9), bg::math::rounding_cast<CT>(52.4));
+ Point barcelona(2.0, 41.0);
+ Point paris(2.0, 48.0);
+ Point milan(7.0, 45.0);
+
+ //goto wrong;
+
+ test_side<Point>("bp-m", barcelona, paris, milan, -1);
+ test_side<Point>("bm-p", barcelona, milan, paris, 1);
+ test_side<Point>("mp-b", milan, paris, barcelona, 1);
+
+ test_side<Point>("am-p", amsterdam, milan, paris, -1);
+ test_side<Point>("pm-a", paris, milan, amsterdam, 1);
+
+ // http://www.gcmap.com/mapui?P=30N+10E-50N+50E,39N+30E
+ Point gcmap_p1(10.0, 30.0);
+ Point gcmap_p2(50.0, 50.0);
+ test_side<Point>("blog1", gcmap_p1, gcmap_p2, Point(30.0, 41.0), -1, 1);
+ test_side<Point>("blog1", gcmap_p1, gcmap_p2, Point(30.0, 42.0), -1, 1);
+ test_side<Point>("blog1", gcmap_p1, gcmap_p2, Point(30.0, 43.0), -1, 1);
+ test_side<Point>("blog1", gcmap_p1, gcmap_p2, Point(30.0, 44.0), 1);
+
+ // http://www.gcmap.com/mapui?P=50N+80E-60N+50W,65N+30E
+ Point gcmap_np1(80.0, 50.0);
+ Point gcmap_np2(-50.0, 60.0);
+ // http://www.gcmap.com/mapui?P=50N+140E-60N+10E,65N+30E
+ //Point gcmap_np1(140.0, 50.0);
+ //Point gcmap_np2(10.0, 60.0);
+ //test_side<Point>(gcmap_np1, gcmap_np2, gcmap_np, 1);
+ test_side<Point>("40", gcmap_np1, gcmap_np2, Point(30.0, 60.0), 1, -1);
+ test_side<Point>("45", gcmap_np1, gcmap_np2, Point(30.0, 65.0), 1, -1);
+ test_side<Point>("70", gcmap_np1, gcmap_np2, Point(30.0, 70.0), 1, -1);
+ test_side<Point>("75", gcmap_np1, gcmap_np2, Point(30.0, 75.0), -1);
+}
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::point<int, 2, bg::cs::spherical<bg::degree> > >();
+ test_all<bg::model::point<double, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ typedef ttmath::Big<1,4> tt;
+ test_all<bg::model::point<tt, 2, bg::cs::spherical_equatorial<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/test_projected_point.hpp b/src/boost/libs/geometry/test/strategies/test_projected_point.hpp
new file mode 100644
index 000000000..72a0d906d
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/test_projected_point.hpp
@@ -0,0 +1,185 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_STRATEGIES_TEST_PROJECTED_POINT_HPP
+#define BOOST_GEOMETRY_TEST_STRATEGIES_TEST_PROJECTED_POINT_HPP
+
+#include <geometry_test_common.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/geometry/strategies/cartesian/distance_projected_point.hpp>
+#include <boost/geometry/strategies/cartesian/distance_projected_point_ax.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P, typename PS, typename CalculationType>
+void test_services()
+{
+ PS p1, p2;
+ bg::assign_values(p1, 0, 0);
+ bg::assign_values(p2, 0, 4);
+
+ P p;
+ bg::assign_values(p, 2, 0);
+
+ CalculationType const sqr_expected = 4;
+ CalculationType const expected = 2;
+
+
+ namespace bgsd = bg::strategy::distance;
+ namespace services = bg::strategy::distance::services;
+
+ {
+ // compile-check if there is a strategy for this type
+ typedef typename services::default_strategy
+ <
+ bg::point_tag, bg::segment_tag, P, PS
+ >::type projected_point_strategy_type;
+
+ typedef typename services::default_strategy
+ <
+ bg::segment_tag, bg::point_tag, PS, P
+ >::type reversed_tags_projected_point_strategy_type;
+
+ boost::ignore_unused<projected_point_strategy_type,
+ reversed_tags_projected_point_strategy_type>();
+ }
+
+ // 1: normal, calculate distance:
+
+ typedef bgsd::projected_point<CalculationType> strategy_type;
+
+ BOOST_CONCEPT_ASSERT( (bg::concepts::PointSegmentDistanceStrategy<strategy_type, P, PS>) );
+
+ typedef typename services::return_type<strategy_type, P, PS>::type return_type;
+
+ strategy_type strategy;
+ return_type result = strategy.apply(p, p1, p2);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+ // 2: the strategy should return the same result if we reverse parameters
+ result = strategy.apply(p, p2, p1);
+ BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);
+
+
+ // 3: "comparable" to construct a "comparable strategy" for P1/P2
+ // a "comparable strategy" is a strategy which does not calculate the exact distance, but
+ // which returns results which can be mutually compared (e.g. avoid sqrt)
+
+ // 3a: "comparable_type"
+ typedef typename services::comparable_type<strategy_type>::type comparable_type;
+
+ // 3b: "get_comparable"
+ comparable_type comparable = bgsd::services::get_comparable<strategy_type>::apply(strategy);
+
+ return_type c_result = comparable.apply(p, p1, p2);
+ BOOST_CHECK_CLOSE(c_result, return_type(sqr_expected), 0.001);
+}
+
+template <typename T1, typename T2>
+void test_check_close(T1 const& v1, T2 const& v2, double f)
+{
+ BOOST_CHECK_CLOSE(v1, v2, f);
+}
+
+template <typename T1, typename T2>
+void test_check_close(bg::strategy::distance::detail::projected_point_ax_result<T1> const& v1,
+ bg::strategy::distance::detail::projected_point_ax_result<T2> const& v2,
+ double f)
+{
+ BOOST_CHECK_CLOSE(v1.atd, v2.atd, f);
+ BOOST_CHECK_CLOSE(v1.xtd, v2.xtd, f);
+}
+
+template <typename P1, typename P2, typename T, typename Strategy, typename ComparableStrategy>
+void test_2d(std::string const& wkt_p,
+ std::string const& wkt_sp1,
+ std::string const& wkt_sp2,
+ T expected_distance,
+ T expected_comparable_distance,
+ Strategy strategy,
+ ComparableStrategy comparable_strategy)
+{
+ P1 p;
+ P2 sp1, sp2;
+ bg::read_wkt(wkt_p, p);
+ bg::read_wkt(wkt_sp1, sp1);
+ bg::read_wkt(wkt_sp2, sp2);
+
+ BOOST_CONCEPT_ASSERT
+ (
+ (bg::concepts::PointSegmentDistanceStrategy<Strategy, P1, P2>)
+ );
+ BOOST_CONCEPT_ASSERT
+ (
+ (bg::concepts::PointSegmentDistanceStrategy<ComparableStrategy, P1, P2>)
+ );
+
+ {
+ typedef typename bg::strategy::distance::services::return_type<Strategy, P1, P2>::type return_type;
+ return_type d = strategy.apply(p, sp1, sp2);
+ test_check_close(d, expected_distance, 0.001);
+ }
+
+ // Test combination with the comparable strategy
+ {
+ typedef typename bg::strategy::distance::services::return_type<ComparableStrategy, P1, P2>::type return_type;
+ return_type d = comparable_strategy.apply(p, sp1, sp2);
+ test_check_close(d, expected_comparable_distance, 0.01);
+ }
+
+}
+
+template <typename P1, typename P2, typename T>
+void test_2d(std::string const& wkt_p,
+ std::string const& wkt_sp1,
+ std::string const& wkt_sp2,
+ T expected_distance)
+{
+ typedef bg::strategy::distance::projected_point<> strategy_type;
+ typedef bg::strategy::distance::projected_point
+ <
+ void,
+ bg::strategy::distance::comparable::pythagoras<>
+ > comparable_strategy_type;
+
+ strategy_type strategy;
+ comparable_strategy_type comparable_strategy;
+
+ T expected_squared_distance = expected_distance * expected_distance;
+ test_2d<P1, P2>(wkt_p, wkt_sp1, wkt_sp2, expected_distance, expected_squared_distance, strategy, comparable_strategy);
+}
+
+#endif // BOOST_GEOMETRY_TEST_STRATEGIES_TEST_PROJECTED_POINT_HPP
diff --git a/src/boost/libs/geometry/test/strategies/test_within.hpp b/src/boost/libs/geometry/test/strategies/test_within.hpp
new file mode 100644
index 000000000..ae9b06dde
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/test_within.hpp
@@ -0,0 +1,106 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2019.
+// Modifications copyright (c) 2014, 2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_TEST_STRATEGIES_TEST_WITHIN_HPP
+#define BOOST_GEOMETRY_TEST_STRATEGIES_TEST_WITHIN_HPP
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/within.hpp>
+
+#include <boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp>
+#include <boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp>
+#include <boost/geometry/strategies/agnostic/point_in_poly_winding.hpp>
+#include <boost/geometry/strategies/cartesian/point_in_box.hpp>
+#include <boost/geometry/strategies/cartesian/box_in_box.hpp>
+#include <boost/geometry/strategies/agnostic/point_in_box_by_side.hpp>
+
+#include <boost/geometry/strategies/cartesian/side_by_triangle.hpp>
+#include <boost/geometry/strategies/spherical/ssf.hpp>
+
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+
+
+template <typename Strategy>
+inline const char * strategy_name(Strategy const&)
+{
+ return typeid(Strategy).name();
+}
+
+template <typename P, typename PoS, typename CT>
+inline const char * strategy_name(bg::strategy::within::crossings_multiply<P, PoS, CT> const&)
+{
+ return "crossings_multiply";
+}
+
+template <typename P, typename PoS, typename CT>
+inline const char * strategy_name(bg::strategy::within::franklin<P, PoS, CT> const&)
+{
+ return "franklin";
+}
+
+template <typename P, typename PoS, typename CT>
+inline const char * strategy_name(bg::strategy::within::winding<P, PoS, CT> const&)
+{
+ return "winding";
+}
+
+
+template <typename Point, typename Polygon, typename Strategy>
+void test_point_in_polygon(std::string const& case_id,
+ Point const& point,
+ Polygon const& polygon,
+ Strategy const& strategy,
+ bool expected,
+ bool use_within = true)
+{
+ BOOST_CONCEPT_ASSERT( (bg::concepts::WithinStrategyPolygonal<Point, Polygon, Strategy>) );
+ bool detected = use_within ?
+ bg::within(point, polygon, strategy) :
+ bg::covered_by(point, polygon, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ (use_within ? "within: " : "covered_by: ") << case_id
+ << " strategy: " << strategy_name(strategy)
+ << " output expected: " << int(expected)
+ << " detected: " << int(detected)
+ );
+}
+
+
+template <typename Point, typename Polygon, typename Strategy>
+void test_geometry(std::string const& case_id,
+ std::string const& wkt_point,
+ std::string const& wkt_polygon,
+ Strategy const& strategy,
+ bool expected,
+ bool use_within = true)
+{
+ Point point;
+ Polygon polygon;
+ bg::read_wkt(wkt_point, point);
+ bg::read_wkt(wkt_polygon, polygon);
+
+ test_point_in_polygon(case_id, point, polygon, strategy, expected, use_within);
+}
+
+
+#endif // BOOST_GEOMETRY_TEST_STRATEGIES_TEST_WITHIN_HPP
diff --git a/src/boost/libs/geometry/test/strategies/thomas.cpp b/src/boost/libs/geometry/test/strategies/thomas.cpp
new file mode 100644
index 000000000..596b35045
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/thomas.cpp
@@ -0,0 +1,153 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015, 2017.
+// Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/concept_check.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+#include <boost/geometry/strategies/geographic/distance_thomas.hpp>
+#include <boost/geometry/strategies/geographic/side_thomas.hpp>
+
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+
+
+template <typename P1, typename P2>
+void test_distance(double lon1, double lat1, double lon2, double lat2, double expected_km)
+{
+ // Set radius type, but for integer coordinates we want to have floating point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<P1>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+
+ typedef bg::strategy::distance::thomas<stype> thomas_type;
+ typedef bg::strategy::distance::geographic<bg::strategy::thomas, stype> geographic_type;
+
+ BOOST_CONCEPT_ASSERT
+ (
+ (bg::concepts::PointDistanceStrategy<thomas_type, P1, P2>)
+ );
+
+ thomas_type thomas;
+ geographic_type geographic;
+ typedef typename bg::strategy::distance
+ ::services::return_type<thomas_type, P1, P2>::type return_type;
+
+
+ P1 p1;
+ P2 p2;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+
+ BOOST_CHECK_CLOSE(thomas.apply(p1, p2), return_type(1000.0 * expected_km), 0.001);
+ BOOST_CHECK_CLOSE(geographic.apply(p1, p2), return_type(1000.0 * expected_km), 0.001);
+ BOOST_CHECK_CLOSE(bg::distance(p1, p2, thomas), return_type(1000.0 * expected_km), 0.001);
+}
+
+template <typename PS, typename P>
+void test_side(double lon1, double lat1,
+ double lon2, double lat2,
+ double lon, double lat,
+ int expected_side)
+{
+ // Set radius type, but for integer coordinates we want to have floating point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<PS>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+
+ typedef bg::strategy::side::thomas<stype> strategy_type;
+ typedef bg::strategy::side::geographic<bg::strategy::thomas, stype> strategy2_type;
+
+ strategy_type strategy;
+ strategy2_type strategy2;
+
+ PS p1, p2;
+ P p;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+ bg::assign_values(p, lon, lat);
+
+ int side = strategy.apply(p1, p2, p);
+ int side2 = strategy2.apply(p1, p2, p);
+
+ BOOST_CHECK_EQUAL(side, expected_side);
+ BOOST_CHECK_EQUAL(side2, expected_side);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ test_distance<P1, P2>(0, 90, 1, 80, 1116.825795); // polar
+ test_distance<P1, P2>(0, -90, 1, -80, 1116.825795); // polar
+ test_distance<P1, P2>(4, 52, 4, 52, 0.0); // no point difference
+ test_distance<P1, P2>(4, 52, 3, 40, 1336.025365); // normal case
+
+ test_side<P1, P2>(0, 0, 0, 1, 0, 2, 0);
+ test_side<P1, P2>(0, 0, 0, 1, 0, -2, 0);
+ test_side<P1, P2>(10, 0, 10, 1, 10, 2, 0);
+ test_side<P1, P2>(10, 0, 10, -1, 10, 2, 0);
+
+ test_side<P1, P2>(10, 0, 10, 1, 0, 2, 1); // left
+ test_side<P1, P2>(10, 0, 10, -1, 0, 2, -1); // right
+
+ test_side<P1, P2>(-10, -10, 10, 10, 10, 0, -1); // right
+ test_side<P1, P2>(-10, -10, 10, 10, -10, 0, 1); // left
+ test_side<P1, P2>(170, -10, -170, 10, -170, 0, -1); // right
+ test_side<P1, P2>(170, -10, -170, 10, 170, 0, 1); // left
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+int test_main(int, char* [])
+{
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+ test_all<bg::model::point<int, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<float, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath::Big<1,4>, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/transform_cs.cpp b/src/boost/libs/geometry/test/strategies/transform_cs.cpp
new file mode 100644
index 000000000..777104eee
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/transform_cs.cpp
@@ -0,0 +1,149 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/strategy_transform.hpp>
+#include <boost/geometry/algorithms/transform.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
+template <typename T, typename P>
+inline T check_distance(P const& p)
+{
+ T x = bg::get<0>(p);
+ T y = bg::get<1>(p);
+ T z = bg::get<2>(p);
+ return sqrt(x * x + y * y + z * z);
+}
+
+template <typename T>
+void test_transformations_spherical()
+{
+ T const input_long = 15.0;
+ T const input_lat = 5.0;
+
+ T const expected_long = 0.26179938779914943653855361527329;
+ T const expected_lat = 0.08726646259971647884618453842443;
+
+ // Can be checked using http://www.calc3d.com/ejavascriptcoordcalc.html
+ // (for phi use long, in radians, for theta use lat, in radians, they are listed there as "theta, phi")
+ T const expected_polar_x = 0.084186;
+ T const expected_polar_y = 0.0225576;
+ T const expected_polar_z = 0.996195;
+
+ // Can be checked with same URL using 90-theta for lat.
+ // So for theta use 85 degrees, in radians: 0.08726646259971647884618453842443
+ T const expected_equatorial_x = 0.962250;
+ T const expected_equatorial_y = 0.257834;
+ T const expected_equatorial_z = 0.0871557;
+
+ // 1: Spherical-polar (lat=5, so it is near the pole - on a unit sphere)
+ bg::model::point<T, 2, bg::cs::spherical<bg::degree> > sp(input_long, input_lat);
+
+ // 1a: to radian
+ bg::model::point<T, 2, bg::cs::spherical<bg::radian> > spr;
+ bg::transform(sp, spr);
+ BOOST_CHECK_CLOSE(bg::get<0>(spr), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(spr), expected_lat, 0.001);
+
+ // 1b: to cartesian-3d
+ bg::model::point<T, 3, bg::cs::cartesian> pc3;
+ bg::transform(sp, pc3);
+ BOOST_CHECK_CLOSE(bg::get<0>(pc3), expected_polar_x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(pc3), expected_polar_y, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(pc3), expected_polar_z, 0.001);
+ BOOST_CHECK_CLOSE(check_distance<T>(pc3), 1.0, 0.001);
+
+ // 1c: back
+ bg::transform(pc3, spr);
+ BOOST_CHECK_CLOSE(bg::get<0>(spr), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(spr), expected_lat, 0.001);
+
+ // 2: Spherical-equatorial (lat=5, so it is near the equator)
+ bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::degree> > se(input_long, input_lat);
+
+ // 2a: to radian
+ bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::radian> > ser;
+ bg::transform(se, ser);
+ BOOST_CHECK_CLOSE(bg::get<0>(ser), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(ser), expected_lat, 0.001);
+
+ bg::transform(se, pc3);
+ BOOST_CHECK_CLOSE(bg::get<0>(pc3), expected_equatorial_x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(pc3), expected_equatorial_y, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(pc3), expected_equatorial_z, 0.001);
+ BOOST_CHECK_CLOSE(check_distance<T>(pc3), 1.0, 0.001);
+
+ // 2c: back
+ bg::transform(pc3, ser);
+ BOOST_CHECK_CLOSE(bg::get<0>(spr), expected_long, 0.001); // expected_long
+ BOOST_CHECK_CLOSE(bg::get<1>(spr), expected_lat, 0.001); // expected_lat
+
+
+ // 3: Spherical-polar including radius
+ bg::model::point<T, 3, bg::cs::spherical<bg::degree> > sp3(input_long, input_lat, 0.5);
+
+ // 3a: to radian
+ bg::model::point<T, 3, bg::cs::spherical<bg::radian> > spr3;
+ bg::transform(sp3, spr3);
+ BOOST_CHECK_CLOSE(bg::get<0>(spr3), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(spr3), expected_lat, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(spr3), 0.5, 0.001);
+
+ // 3b: to cartesian-3d
+ bg::transform(sp3, pc3);
+ BOOST_CHECK_CLOSE(bg::get<0>(pc3), expected_polar_x / 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(pc3), expected_polar_y / 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(pc3), expected_polar_z / 2.0, 0.001);
+ BOOST_CHECK_CLOSE(check_distance<T>(pc3), 0.5, 0.001);
+
+ // 3c: back
+ bg::transform(pc3, spr3);
+ BOOST_CHECK_CLOSE(bg::get<0>(spr3), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(spr3), expected_lat, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(spr3), 0.5, 0.001);
+
+
+ // 4: Spherical-equatorial including radius
+ bg::model::point<T, 3, bg::cs::spherical_equatorial<bg::degree> > se3(input_long, input_lat, 0.5);
+
+ // 4a: to radian
+ bg::model::point<T, 3, bg::cs::spherical_equatorial<bg::radian> > ser3;
+ bg::transform(se3, ser3);
+ BOOST_CHECK_CLOSE(bg::get<0>(ser3), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(ser3), expected_lat, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(ser3), 0.5, 0.001);
+
+ // 4b: to cartesian-3d
+ bg::transform(se3, pc3);
+ BOOST_CHECK_CLOSE(bg::get<0>(pc3), expected_equatorial_x / 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(pc3), expected_equatorial_y / 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(pc3), expected_equatorial_z / 2.0, 0.001);
+ BOOST_CHECK_CLOSE(check_distance<T>(pc3), 0.5, 0.001);
+
+ // 4c: back
+ bg::transform(pc3, ser3);
+ BOOST_CHECK_CLOSE(bg::get<0>(ser3), expected_long, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(ser3), expected_lat, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(ser3), 0.5, 0.001);
+}
+
+int test_main(int, char* [])
+{
+ test_transformations_spherical<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/transformer.cpp b/src/boost/libs/geometry/test/strategies/transformer.cpp
new file mode 100644
index 000000000..5cdc567e6
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/transformer.cpp
@@ -0,0 +1,119 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/strategies/transform/inverse_transformer.hpp>
+#include <boost/geometry/strategies/transform/map_transformer.hpp>
+#include <boost/geometry/strategies/transform/matrix_transformers.hpp>
+
+
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/algorithms/transform.hpp>
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename P, typename T>
+void check_inverse(P const& p, T const& trans)
+{
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+ const std::size_t dim = bg::dimension<P>::value;
+
+ bg::strategy::transform::inverse_transformer<coordinate_type, dim, dim> inverse(trans);
+
+ P i;
+ bg::transform(p, i, inverse);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(i)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(i)), 1.0, 0.001);
+}
+
+template <typename P>
+void test_all()
+{
+ typedef typename bg::coordinate_type<P>::type coordinate_type;
+ const std::size_t dim = bg::dimension<P>::value;
+
+ P p;
+ bg::assign_values(p, 1, 1);
+
+ {
+ bg::strategy::transform::translate_transformer<coordinate_type, dim, dim> trans(1, 1);
+ P tp;
+ bg::transform(p, tp, trans);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(tp)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(tp)), 2.0, 0.001);
+
+ check_inverse(tp, trans);
+ }
+
+ {
+ bg::strategy::transform::scale_transformer<coordinate_type, dim, dim> trans(10, 10);
+ P tp;
+ bg::transform(p, tp, trans);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(tp)), 10.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(tp)), 10.0, 0.001);
+
+ check_inverse(tp, trans);
+ }
+
+ {
+ bg::strategy::transform::rotate_transformer<bg::degree, double, dim, dim> trans(90.0);
+ P tp;
+ bg::transform(p, tp, trans);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(tp)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(tp)), -1.0, 0.001);
+ check_inverse(tp, trans);
+ }
+
+ {
+ // Map from 0,0,2,2 to 0,0,500,500
+ bg::strategy::transform::map_transformer<coordinate_type, dim, dim, false> trans
+ (
+ 0.0, 0.0, 2.0, 2.0, 500, 500
+ );
+ P tp;
+ bg::transform(p, tp, trans);
+
+ BOOST_CHECK_CLOSE(double(bg::get<0>(tp)), 250.0, 0.001);
+ BOOST_CHECK_CLOSE(double(bg::get<1>(tp)), 250.0, 0.001);
+
+ check_inverse(tp, trans);
+ }
+}
+
+int test_main(int, char* [])
+{
+ //test_all<int[2]>();
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+
+ test_all<boost::tuple<float, float> >();
+
+ //test_all<point<int, 2, cs::cartesian> >();
+ test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/vincenty.cpp b/src/boost/libs/geometry/test/strategies/vincenty.cpp
new file mode 100644
index 000000000..279db4677
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/vincenty.cpp
@@ -0,0 +1,330 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014, 2015, 2016, 2017.
+// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/concept_check.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/formulas/vincenty_inverse.hpp>
+#include <boost/geometry/formulas/vincenty_direct.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
+#include <boost/geometry/strategies/geographic/distance_vincenty.hpp>
+#include <boost/geometry/strategies/geographic/side_vincenty.hpp>
+
+#include <test_common/test_point.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+template <typename T>
+void normalize_deg(T & deg)
+{
+ while ( deg > T(180) )
+ deg -= T(360);
+ while ( deg <= T(-180) )
+ deg += T(360);
+}
+
+template <typename T>
+T difference_deg(T const& a1, T const& a2)
+{
+ T d = a1 - a2;
+ normalize_deg(d);
+ return d;
+}
+
+template <typename T>
+void check_deg(std::string const& name, T const& a1, T const& a2, T const& percent, T const& error)
+{
+ T diff = bg::math::abs(difference_deg(a1, a2));
+
+ if ( bg::math::equals(a1, T(0)) || bg::math::equals(a2, T(0)) )
+ {
+ if ( diff > error )
+ {
+ BOOST_ERROR(name << " - the difference {" << diff << "} between {" << a1 << "} and {" << a2 << "} exceeds {" << error << "}");
+ }
+ }
+ else
+ {
+ T greater = (std::max)(bg::math::abs(a1), bg::math::abs(a2));
+
+ if ( diff > greater * percent / T(100) )
+ {
+ BOOST_ERROR(name << " the difference {" << diff << "} between {" << a1 << "} and {" << a2 << "} exceeds {" << percent << "}%");
+ }
+ }
+}
+
+double azimuth(double deg, double min, double sec)
+{
+ min = fabs(min);
+ sec = fabs(sec);
+
+ if ( deg < 0 )
+ {
+ min = -min;
+ sec = -sec;
+ }
+
+ return deg + min/60.0 + sec/3600.0;
+}
+
+double azimuth(double deg, double min)
+{
+ return azimuth(deg, min, 0.0);
+}
+
+template <typename P>
+bool non_precise_ct()
+{
+ typedef typename bg::coordinate_type<P>::type ct;
+ return boost::is_integral<ct>::value || boost::is_float<ct>::value;
+}
+
+template <typename P1, typename P2, typename Spheroid>
+void test_vincenty(double lon1, double lat1, double lon2, double lat2,
+ double expected_distance,
+ double expected_azimuth_12,
+ double /*expected_azimuth_21*/,
+ Spheroid const& spheroid)
+{
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::select_calculation_type<P1, P2, void>::type
+ >::type calc_t;
+
+ calc_t tolerance = non_precise_ct<P1>() || non_precise_ct<P2>() ?
+ 5.0 : 0.001;
+ calc_t error = non_precise_ct<P1>() || non_precise_ct<P2>() ?
+ 1e-5 : 1e-12;
+
+ // formula
+ {
+ double const d2r = bg::math::d2r<double>();
+ double const r2d = bg::math::r2d<double>();
+
+ typedef bg::formula::vincenty_inverse<calc_t, true, true> inverse_formula;
+ typename inverse_formula::result_type
+ result_i = inverse_formula::apply(lon1 * d2r,
+ lat1 * d2r,
+ lon2 * d2r,
+ lat2 * d2r,
+ spheroid);
+ calc_t dist = result_i.distance;
+ calc_t az12 = result_i.azimuth;
+ //calc_t az21 = vi.azimuth21();
+
+ calc_t az12_deg = az12 * r2d;
+ //calc_t az21_deg = az21 * r2d;
+
+ BOOST_CHECK_CLOSE(dist, calc_t(expected_distance), tolerance);
+ check_deg("az12_deg", az12_deg, calc_t(expected_azimuth_12), tolerance, error);
+ //check_deg("az21_deg", az21_deg, calc_t(expected_azimuth_21), tolerance, error);
+
+ typedef bg::formula::vincenty_direct<calc_t> direct_formula;
+ typename direct_formula::result_type
+ result_d = direct_formula::apply(lon1 * d2r,
+ lat1 * d2r,
+ dist,
+ az12,
+ spheroid);
+ calc_t direct_lon2 = result_d.lon2;
+ calc_t direct_lat2 = result_d.lat2;
+ //calc_t direct_az21 = vd.azimuth21();
+
+ calc_t direct_lon2_deg = direct_lon2 * r2d;
+ calc_t direct_lat2_deg = direct_lat2 * r2d;
+ //calc_t direct_az21_deg = direct_az21 * r2d;
+
+ check_deg("direct_lon2_deg", direct_lon2_deg, calc_t(lon2), tolerance, error);
+ check_deg("direct_lat2_deg", direct_lat2_deg, calc_t(lat2), tolerance, error);
+ //check_deg("direct_az21_deg", direct_az21_deg, az21_deg, tolerance, error);
+ }
+
+ // distance strategies
+ {
+ typedef bg::strategy::distance::vincenty<Spheroid> vincenty_type;
+ typedef bg::strategy::distance::geographic<bg::strategy::vincenty, Spheroid> geographic_type;
+
+ BOOST_CONCEPT_ASSERT(
+ (
+ bg::concepts::PointDistanceStrategy<vincenty_type, P1, P2>)
+ );
+
+ vincenty_type vincenty(spheroid);
+ geographic_type geographic(spheroid);
+ typedef typename bg::strategy::distance::services::return_type<vincenty_type, P1, P2>::type return_type;
+
+ P1 p1;
+ P2 p2;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+
+ BOOST_CHECK_CLOSE(vincenty.apply(p1, p2), return_type(expected_distance), tolerance);
+ BOOST_CHECK_CLOSE(geographic.apply(p1, p2), return_type(expected_distance), tolerance);
+ BOOST_CHECK_CLOSE(bg::distance(p1, p2, vincenty), return_type(expected_distance), tolerance);
+ }
+}
+
+template <typename P1, typename P2>
+void test_vincenty(double lon1, double lat1, double lon2, double lat2,
+ double expected_distance,
+ double expected_azimuth_12,
+ double expected_azimuth_21)
+{
+ test_vincenty<P1, P2>(lon1, lat1, lon2, lat2,
+ expected_distance, expected_azimuth_12, expected_azimuth_21,
+ bg::srs::spheroid<double>());
+}
+
+template <typename PS, typename P>
+void test_side(double lon1, double lat1,
+ double lon2, double lat2,
+ double lon, double lat,
+ int expected_side)
+{
+ // Set radius type, but for integer coordinates we want to have floating point radius type
+ typedef typename bg::promote_floating_point
+ <
+ typename bg::coordinate_type<PS>::type
+ >::type rtype;
+
+ typedef bg::srs::spheroid<rtype> stype;
+
+ typedef bg::strategy::side::vincenty<stype> strategy_type;
+ typedef bg::strategy::side::geographic<bg::strategy::vincenty, stype> strategy2_type;
+
+ strategy_type strategy;
+ strategy2_type strategy2;
+
+ PS p1, p2;
+ P p;
+
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+ bg::assign_values(p, lon, lat);
+
+ int side = strategy.apply(p1, p2, p);
+ int side2 = strategy2.apply(p1, p2, p);
+
+ BOOST_CHECK_EQUAL(side, expected_side);
+ BOOST_CHECK_EQUAL(side2, expected_side);
+}
+
+template <typename P1, typename P2>
+void test_all()
+{
+ // See:
+ // - http://www.ga.gov.au/geodesy/datums/vincenty_inverse.jsp
+ // - http://www.ga.gov.au/geodesy/datums/vincenty_direct.jsp
+ // Values in the comments below was calculated using the above pages
+ // in some cases distances may be different, previously used values was left
+
+ // use km
+ double gda_a = 6378.1370;
+ double gda_f = 1.0 / 298.25722210;
+ double gda_b = gda_a * ( 1.0 - gda_f );
+ bg::srs::spheroid<double> gda_spheroid(gda_a, gda_b);
+
+ // Test fractional coordinates only for non-integral types
+ if ( BOOST_GEOMETRY_CONDITION(
+ ! boost::is_integral<typename bg::coordinate_type<P1>::type>::value
+ && ! boost::is_integral<typename bg::coordinate_type<P2>::type>::value ) )
+ {
+ // Flinders Peak -> Buninyong
+ test_vincenty<P1, P2>(azimuth(144,25,29.52440), azimuth(-37,57,3.72030),
+ azimuth(143,55,35.38390), azimuth(-37,39,10.15610),
+ 54.972271, azimuth(306,52,5.37), azimuth(127,10,25.07),
+ gda_spheroid);
+ }
+
+ // Lodz -> Trondheim
+ test_vincenty<P1, P2>(azimuth(19,28), azimuth(51,47),
+ azimuth(10,21), azimuth(63,23),
+ 1399.032724, azimuth(340,54,25.14), azimuth(153,10,0.19),
+ gda_spheroid);
+ // London -> New York
+ test_vincenty<P1, P2>(azimuth(0,7,39), azimuth(51,30,26),
+ azimuth(-74,0,21), azimuth(40,42,46),
+ 5602.044851, azimuth(288,31,36.82), azimuth(51,10,33.43),
+ gda_spheroid);
+
+ // Shanghai -> San Francisco
+ test_vincenty<P1, P2>(azimuth(121,30), azimuth(31,12),
+ azimuth(-122,25), azimuth(37,47),
+ 9899.698550, azimuth(45,12,44.76), azimuth(309,50,20.88),
+ gda_spheroid);
+
+ test_vincenty<P1, P2>(0, 0, 0, 50, 5540.847042, 0, 180, gda_spheroid); // N
+ test_vincenty<P1, P2>(0, 0, 0, -50, 5540.847042, 180, 0, gda_spheroid); // S
+ test_vincenty<P1, P2>(0, 0, 50, 0, 5565.974540, 90, -90, gda_spheroid); // E
+ test_vincenty<P1, P2>(0, 0, -50, 0, 5565.974540, -90, 90, gda_spheroid); // W
+
+ test_vincenty<P1, P2>(0, 0, 50, 50, 7284.879297, azimuth(32,51,55.87), azimuth(237,24,50.12), gda_spheroid); // NE
+
+ // The original distance values, azimuths calculated using the web form mentioned above
+ // Using default spheroid units (meters)
+ test_vincenty<P1, P2>(0, 89, 1, 80, 1005153.5769, azimuth(178,53,23.85), azimuth(359,53,18.35)); // sub-polar
+ test_vincenty<P1, P2>(4, 52, 4, 52, 0.0, 0, 0); // no point difference
+ test_vincenty<P1, P2>(4, 52, 3, 40, 1336039.890, azimuth(183,41,29.08), azimuth(2,58,5.13)); // normal case
+
+ test_side<P1, P2>(0, 0, 0, 1, 0, 2, 0);
+ test_side<P1, P2>(0, 0, 0, 1, 0, -2, 0);
+ test_side<P1, P2>(10, 0, 10, 1, 10, 2, 0);
+ test_side<P1, P2>(10, 0, 10, -1, 10, 2, 0);
+
+ test_side<P1, P2>(10, 0, 10, 1, 0, 2, 1); // left
+ test_side<P1, P2>(10, 0, 10, -1, 0, 2, -1); // right
+
+ test_side<P1, P2>(-10, -10, 10, 10, 10, 0, -1); // right
+ test_side<P1, P2>(-10, -10, 10, 10, -10, 0, 1); // left
+ test_side<P1, P2>(170, -10, -170, 10, -170, 0, -1); // right
+ test_side<P1, P2>(170, -10, -170, 10, 170, 0, 1); // left
+}
+
+template <typename P>
+void test_all()
+{
+ test_all<P, P>();
+}
+
+int test_main(int, char* [])
+{
+ //test_all<float[2]>();
+ //test_all<double[2]>();
+ test_all<bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<float, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<int, 2, bg::cs::geographic<bg::degree> > >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath::Big<1,4>, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();
+#endif
+
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/strategies/winding.cpp b/src/boost/libs/geometry/test/strategies/winding.cpp
new file mode 100644
index 000000000..d19244ae3
--- /dev/null
+++ b/src/boost/libs/geometry/test/strategies/winding.cpp
@@ -0,0 +1,218 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014, 2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <strategies/test_within.hpp>
+
+
+template <typename Point>
+void test_cartesian()
+{
+ typedef bg::model::polygon<Point> polygon;
+
+ std::string const box = "POLYGON((0 0,0 2,2 2,2 0,0 0))";
+ std::string const triangle = "POLYGON((0 0,0 4,6 0,0 0))";
+ std::string const with_hole = "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,2 1,2 2,1 2,1 1))";
+
+ bg::strategy::within::winding<Point> s;
+
+
+ test_geometry<Point, polygon>("b1", "POINT(1 1)", box, s, true);
+ test_geometry<Point, polygon>("b2", "POINT(3 3)", box, s, false);
+
+ // Test ALL corners (officialy false but some strategies might answer true)
+ test_geometry<Point, polygon>("b3a", "POINT(0 0)", box, s, false);
+ test_geometry<Point, polygon>("b3b", "POINT(0 2)", box, s, false);
+ test_geometry<Point, polygon>("b3c", "POINT(2 2)", box, s, false);
+ test_geometry<Point, polygon>("b3d", "POINT(2 0)", box, s, false);
+
+ // Test ALL sides (officialy false but some strategies might answer true)
+ test_geometry<Point, polygon>("b4a", "POINT(0 1)", box, s, false);
+ test_geometry<Point, polygon>("b4b", "POINT(1 2)", box, s, false);
+ test_geometry<Point, polygon>("b4c", "POINT(2 1)", box, s, false);
+ test_geometry<Point, polygon>("b4d", "POINT(1 0)", box, s, false);
+
+
+ test_geometry<Point, polygon>("t1", "POINT(1 1)", triangle, s, true);
+ test_geometry<Point, polygon>("t2", "POINT(3 3)", triangle, s, false);
+
+ test_geometry<Point, polygon>("t3a", "POINT(0 0)", triangle, s, false);
+ test_geometry<Point, polygon>("t3b", "POINT(0 4)", triangle, s, false);
+ test_geometry<Point, polygon>("t3c", "POINT(5 0)", triangle, s, false);
+
+ test_geometry<Point, polygon>("t4a", "POINT(0 2)", triangle, s, false);
+ test_geometry<Point, polygon>("t4b", "POINT(3 2)", triangle, s, false);
+ test_geometry<Point, polygon>("t4c", "POINT(2 0)", triangle, s, false);
+
+
+ test_geometry<Point, polygon>("h1", "POINT(0.5 0.5)", with_hole, s, true);
+ test_geometry<Point, polygon>("h2a", "POINT(1.5 1.5)", with_hole, s, false);
+ test_geometry<Point, polygon>("h2b", "POINT(5 5)", with_hole, s, false);
+
+ test_geometry<Point, polygon>("h3a", "POINT(1 1)", with_hole, s, false);
+ test_geometry<Point, polygon>("h3b", "POINT(2 2)", with_hole, s, false);
+ test_geometry<Point, polygon>("h3c", "POINT(0 0)", with_hole, s, false);
+
+ test_geometry<Point, polygon>("h4a", "POINT(1 1.5)", with_hole, s, false);
+ test_geometry<Point, polygon>("h4b", "POINT(1.5 2)", with_hole, s, false);
+
+ // Lying ON (one of the sides of) interior ring
+ test_geometry<Point, polygon>("#77-1", "POINT(6 3.5)",
+ "POLYGON((5 3,5 4,4 4,4 5,3 5,3 6,5 6,5 5,7 5,7 6,8 6,8 5,9 5,9 2,8 2,8 1,7 1,7 2,5 2,5 3),(6 3,8 3,8 4,6 4,6 3))",
+ s, false);
+}
+
+template <typename T>
+void test_spherical()
+{
+ typedef bg::model::point<T, 2, bg::cs::spherical_equatorial<bg::degree> > point;
+ typedef bg::model::polygon<point> polygon;
+
+ bg::strategy::within::winding<point> s;
+
+
+ // Ticket #9354
+ test_geometry<point, polygon>(
+ "#9354",
+ "POINT(-78.1239 25.9556)",
+ "POLYGON((-97.08466667 25.95683333, -97.13683333 25.954, -97.1 26, -97.08466667 25.95683333))",
+ s,
+ false);
+
+ test_geometry<point, polygon>(
+ "sph1N",
+ "POINT(0 10.001)",
+ "POLYGON((-10 10, 10 10, 10 -10, -10 -10, -10 10))",
+ s,
+ bg::strategy::side::spherical_side_formula<>::apply(
+ point(-10, 10),
+ point(10, 10),
+ point(0, (T)10.001)) == -1 // right side
+ /*true*/);
+ test_geometry<point, polygon>(
+ "sph1S",
+ "POINT(0 -10.001)",
+ "POLYGON((-10 10, 10 10, 10 -10, -10 -10, -10 10))",
+ s,
+ bg::strategy::side::spherical_side_formula<>::apply(
+ point(10, -10),
+ point(-10, -10),
+ point(0, (T)-10.001)) == -1 // right side
+ /*true*/);
+
+ test_geometry<point, polygon>(
+ "sph2S",
+ "POINT(0 10.001)",
+ "POLYGON((-10 20, 10 20, 10 10, -10 10, -10 20))",
+ s,
+ bg::strategy::side::spherical_side_formula<>::apply(
+ point(10, 10),
+ point(-10, 10),
+ point(0, (T)10.001)) == -1 // right side
+ /*false*/);
+
+ test_geometry<point, polygon>(
+ "sph3N",
+ "POINT(0 10)",
+ "POLYGON((-10 10, 10 10, 10 -10, -10 -10, -10 10))",
+ s,
+ bg::strategy::side::spherical_side_formula<>::apply(
+ point(-10, 10),
+ point(10, 10),
+ point(0, (T)10.001)) == -1 // right side
+ /*true*/);
+ test_geometry<point, polygon>(
+ "sph3S",
+ "POINT(0 -10)",
+ "POLYGON((-10 10, 10 10, 10 -10, -10 -10, -10 10))",
+ s,
+ bg::strategy::side::spherical_side_formula<>::apply(
+ point(10, -10),
+ point(-10, -10),
+ point(0, (T)-10.001)) == -1 // right side
+ /*true*/);
+
+ test_geometry<point, polygon>(
+ "sphEq1",
+ "POINT(179 10)",
+ "POLYGON((170 10, -170 10, -170 0, 170 0, 170 10))",
+ s,
+ true,
+ false);
+ test_geometry<point, polygon>(
+ "sphEq2",
+ "POINT(179 10)",
+ "POLYGON((170 20, -170 20, -170 10, 170 10, 170 20))",
+ s,
+ false,
+ false);
+ test_geometry<point, polygon>(
+ "sphEq3",
+ "POINT(-179 10)",
+ "POLYGON((170 10, -170 10, -170 0, 170 0, 170 10))",
+ s,
+ true,
+ false);
+ test_geometry<point, polygon>(
+ "sphEq4",
+ "POINT(-179 10)",
+ "POLYGON((170 20, -170 20, -170 10, 170 10, 170 20))",
+ s,
+ false,
+ false);
+
+ test_geometry<point, polygon>(
+ "sphEq5",
+ "POINT(169 10)",
+ "POLYGON((170 20, -170 20, -170 10, 170 10, 170 20))",
+ s,
+ false,
+ false);
+ test_geometry<point, polygon>(
+ "sphEq6",
+ "POINT(-169 10)",
+ "POLYGON((170 20, -170 20, -170 10, 170 10, 170 20))",
+ s,
+ false,
+ false);
+ test_geometry<point, polygon>(
+ "sphEq7",
+ "POINT(169 10)",
+ "POLYGON((170 10, -170 10, -170 0, 170 0, 170 10))",
+ s,
+ false,
+ false);
+ test_geometry<point, polygon>(
+ "sphEq8",
+ "POINT(-169 10)",
+ "POLYGON((170 10, -170 10, -170 0, 170 0, 170 10))",
+ s,
+ false,
+ false);
+}
+
+int test_main(int, char* [])
+{
+ test_cartesian<bg::model::point<float, 2, bg::cs::cartesian> >();
+ test_cartesian<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+ test_spherical<float>();
+ test_spherical<double>();
+
+#if defined(HAVE_TTMATH)
+ test_cartesian<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_spherical<ttmath_big>();
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/string_from_type.hpp b/src/boost/libs/geometry/test/string_from_type.hpp
new file mode 100644
index 000000000..df0141a58
--- /dev/null
+++ b/src/boost/libs/geometry/test/string_from_type.hpp
@@ -0,0 +1,100 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2015.
+// Modifications copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_STRING_FROM_TYPE_HPP
+#define GEOMETRY_TEST_STRING_FROM_TYPE_HPP
+
+#include <string>
+
+#if defined(HAVE_TTMATH)
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+#if defined(HAVE_CLN) || defined(HAVE_GMP)
+# include <boost/numeric_adaptor/numeric_adaptor.hpp>
+#endif
+
+
+#if defined(HAVE_GMP)
+# include <boost/numeric_adaptor/gmp_value_type.hpp>
+#endif
+#if defined(HAVE_CLN)
+# include <boost/numeric_adaptor/cln_value_type.hpp>
+#endif
+
+
+
+template <typename T>
+struct string_from_type {};
+
+template <> struct string_from_type<void>
+{ static std::string name() { return "v"; } };
+
+template <> struct string_from_type<float>
+{ static std::string name() { return "f"; } };
+
+template <> struct string_from_type<double>
+{ static std::string name() { return "d"; } };
+
+template <> struct string_from_type<long double>
+{ static std::string name() { return "e"; } };
+
+template <> struct string_from_type<short int>
+{ static std::string name() { return "s"; } };
+
+template <> struct string_from_type<int>
+{ static std::string name() { return "i"; } };
+
+template <> struct string_from_type<long>
+{ static std::string name() { return "l"; } };
+
+#if defined(BOOST_HAS_LONG_LONG)
+// this is what g++ and clang++ use
+template <> struct string_from_type<boost::long_long_type>
+{ static std::string name() { return "x"; } };
+#endif
+
+#if defined(BOOST_HAS_INT128)
+// this is what g++ and clang++ use
+template <> struct string_from_type<boost::int128_type>
+{ static std::string name() { return "n"; } };
+#endif
+
+#if defined(HAVE_TTMATH)
+ template <> struct string_from_type<ttmath_big>
+ { static std::string name() { return "t"; } };
+#endif
+
+#if defined(BOOST_RATIONAL_HPP)
+template <typename T> struct string_from_type<boost::rational<T> >
+{ static std::string name() { return "r"; } };
+#endif
+
+
+#if defined(HAVE_GMP)
+template <> struct string_from_type<boost::numeric_adaptor::gmp_value_type>
+{ static std::string name() { return "g"; } };
+#endif
+
+#if defined(HAVE_CLN)
+template <> struct string_from_type<boost::numeric_adaptor::cln_value_type>
+{ static std::string name() { return "c"; } };
+#endif
+
+
+#endif // GEOMETRY_TEST_STRING_FROM_TYPE_HPP
diff --git a/src/boost/libs/geometry/test/test_common/test_point.hpp b/src/boost/libs/geometry/test/test_common/test_point.hpp
new file mode 100644
index 000000000..31b124867
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_common/test_point.hpp
@@ -0,0 +1,111 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_TEST_COMMON_TEST_POINT_HPP
+#define GEOMETRY_TEST_TEST_COMMON_TEST_POINT_HPP
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/coordinate_system.hpp>
+#include <boost/geometry/core/coordinate_dimension.hpp>
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/geometries/register/point.hpp>
+
+// NOTE: since Boost 1.51 the Point type may always be a pointer.
+// Therefore the traits class don't need to add a pointer.
+// This obsoletes this whole test-point-type
+
+namespace test
+{
+
+// Test point class
+
+struct test_point
+{
+ float c1, c2, c3;
+};
+
+struct test_const_point
+{
+ test_const_point()
+ : c1(0.0), c2(0.0), c3(0.0) { }
+
+ test_const_point(float c1, float c2, float c3)
+ : c1(c1), c2(c2), c3(c3) { }
+
+ const float c1, c2, c3;
+};
+
+} // namespace test
+
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template<>
+struct tag<test::test_point> { typedef point_tag type; };
+
+template<>
+struct coordinate_type<test::test_point> { typedef float type; };
+
+template<>
+struct coordinate_system<test::test_point> { typedef cs::cartesian type; };
+
+template<>
+struct dimension<test::test_point>: boost::mpl::int_<3> {};
+
+template<> struct access<test::test_point, 0>
+{
+ static inline const float& get(const test::test_point& p)
+ {
+ return p.c1;
+ }
+
+ static inline void set(test::test_point& p, const float& value)
+ {
+ p.c1 = value;
+ }
+};
+
+template<> struct access<test::test_point, 1>
+{
+ static inline const float& get(const test::test_point& p)
+ {
+ return p.c2;
+ }
+
+ static inline void set(test::test_point& p, const float& value)
+ {
+ p.c2 = value;
+ }
+};
+
+template<> struct access<test::test_point, 2>
+{
+ static inline const float& get(const test::test_point& p)
+ {
+ return p.c3;
+ }
+
+ static inline void set(test::test_point& p, const float& value)
+ {
+ p.c3 = value;
+ }
+};
+
+}}} // namespace bg::traits
+
+BOOST_GEOMETRY_REGISTER_POINT_3D_CONST(test::test_const_point,
+ float,
+ boost::geometry::cs::cartesian,
+ c1, c2, c3)
+
+#endif // GEOMETRY_TEST_TEST_COMMON_TEST_POINT_HPP
diff --git a/src/boost/libs/geometry/test/test_common/with_pointer.hpp b/src/boost/libs/geometry/test/test_common/with_pointer.hpp
new file mode 100644
index 000000000..9c7b95db7
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_common/with_pointer.hpp
@@ -0,0 +1,87 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_COMMON_WITH_POINTER_HPP
+#define GEOMETRY_TEST_COMMON_WITH_POINTER_HPP
+
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/coordinate_system.hpp>
+#include <boost/geometry/core/coordinate_dimension.hpp>
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/core/tag.hpp>
+
+// NOTE: since Boost 1.51 the Point type may always be a pointer.
+// Therefore the traits class don't need to add a pointer.
+// This obsoletes this whole test-point-type
+
+
+
+namespace test
+{
+
+// Sample point, having x/y
+struct test_point_xy
+{
+ float x,y;
+};
+
+}
+
+
+namespace boost { namespace geometry { namespace traits {
+
+template<> struct tag<test::test_point_xy>
+{ typedef point_tag type; };
+
+template<> struct coordinate_type<test::test_point_xy>
+{ typedef double type; };
+
+template<> struct coordinate_system<test::test_point_xy>
+{ typedef cs::cartesian type; };
+
+template<> struct dimension<test::test_point_xy> : boost::mpl::int_<2> {};
+
+template<>
+struct access<test::test_point_xy, 0>
+{
+ static double get(test::test_point_xy const& p)
+ {
+ return p.x;
+ }
+
+ static void set(test::test_point_xy& p, double const& value)
+ {
+ p.x = value;
+ }
+
+};
+
+
+template<>
+struct access<test::test_point_xy, 1>
+{
+ static double get(test::test_point_xy const& p)
+ {
+ return p.y;
+ }
+
+ static void set(test::test_point_xy& p, double const& value)
+ {
+ p.y = value;
+ }
+
+};
+
+}}} // namespace bg::traits
+
+
+#endif // #ifndef GEOMETRY_TEST_COMMON_WITH_POINTER_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/all_custom_container.hpp b/src/boost/libs/geometry/test/test_geometries/all_custom_container.hpp
new file mode 100644
index 000000000..47d56e159
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/all_custom_container.hpp
@@ -0,0 +1,137 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_CONTAINER_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_CONTAINER_HPP
+
+#include <cstddef>
+#include <deque>
+
+
+template <typename Item>
+class all_custom_container
+{
+private :
+ std::deque<Item> m_hidden_deque;
+
+public :
+ typedef typename std::deque<Item>::iterator custom_iterator_type;
+ typedef typename std::deque<Item>::const_iterator custom_const_iterator_type;
+
+ inline std::size_t custom_size() const { return m_hidden_deque.size(); }
+
+ inline custom_const_iterator_type custom_begin() const { return m_hidden_deque.begin(); }
+ inline custom_const_iterator_type custom_end() const { return m_hidden_deque.end(); }
+ inline custom_iterator_type custom_begin() { return m_hidden_deque.begin(); }
+ inline custom_iterator_type custom_end() { return m_hidden_deque.end(); }
+
+ inline void custom_clear() { m_hidden_deque.clear(); }
+ inline void custom_push_back(Item const& p) { m_hidden_deque.push_back(p); }
+ inline void custom_resize(std::size_t new_size) { m_hidden_deque.resize(new_size); }
+};
+
+
+// 1. Adapt to Boost.Geometry (for e.g. inner rings)
+namespace boost { namespace geometry
+{
+
+namespace traits
+{
+ template <typename Item>
+ struct clear<all_custom_container<Item> >
+ {
+ static inline void apply(all_custom_container<Item>& container)
+ {
+ container.custom_clear();
+ }
+ };
+
+ template <typename Item>
+ struct push_back<all_custom_container<Item> >
+ {
+ static inline void apply(all_custom_container<Item>& container, Item const& item)
+ {
+ container.custom_push_back(item);
+ }
+ };
+
+ template <typename Item>
+ struct resize<all_custom_container<Item> >
+ {
+ static inline void apply(all_custom_container<Item>& container, std::size_t new_size)
+ {
+ container.custom_resize(new_size);
+ }
+ };
+
+} // namespace traits
+
+}} // namespace boost::geometry
+
+
+// 2a. Adapt to Boost.Range, meta-functions
+namespace boost
+{
+ template<typename Item>
+ struct range_mutable_iterator<all_custom_container<Item> >
+ {
+ typedef typename all_custom_container<Item>::custom_iterator_type type;
+ };
+
+ template<typename Item>
+ struct range_const_iterator<all_custom_container<Item> >
+ {
+ typedef typename all_custom_container<Item>::custom_const_iterator_type type;
+ };
+
+} // namespace boost
+
+
+// 2b. Adapt to Boost.Range, part 2, ADP
+
+template<typename Item>
+inline typename all_custom_container<Item>::custom_iterator_type
+ range_begin(all_custom_container<Item>& container)
+{
+ return container.custom_begin();
+}
+
+template<typename Item>
+inline typename all_custom_container<Item>::custom_const_iterator_type
+ range_begin(all_custom_container<Item> const& container)
+{
+ return container.custom_begin();
+}
+
+template<typename Item>
+inline typename all_custom_container<Item>::custom_iterator_type
+ range_end(all_custom_container<Item>& container)
+{
+ return container.custom_end();
+}
+
+template<typename Item>
+inline typename all_custom_container<Item>::custom_const_iterator_type
+ range_end(all_custom_container<Item> const& container)
+{
+ return container.custom_end();
+}
+
+// (Optional)
+template<typename Item>
+inline std::size_t range_calculate_size(all_custom_container<Item> const& container)
+{
+ return container.custom_size();
+}
+
+
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_CONTAINER_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/all_custom_linestring.hpp b/src/boost/libs/geometry/test/test_geometries/all_custom_linestring.hpp
new file mode 100644
index 000000000..133fb29a2
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/all_custom_linestring.hpp
@@ -0,0 +1,137 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_LINESTRING_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_LINESTRING_HPP
+
+#include <cstddef>
+
+#include <boost/range.hpp>
+
+
+#include <boost/geometry/core/mutable_range.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <test_geometries/all_custom_container.hpp>
+
+
+template <typename P>
+class all_custom_linestring : public all_custom_container<P>
+{};
+
+
+// 1. Adapt to Boost.Geometry
+namespace boost { namespace geometry
+{
+
+namespace traits
+{
+ template <typename Point>
+ struct tag<all_custom_linestring<Point> >
+ {
+ typedef linestring_tag type;
+ };
+
+
+ // Implement traits for the mutable als
+ // These are all optional traits (normally / default they are implemented
+ // conforming std:: functionality)
+
+ template <typename Point>
+ struct clear<all_custom_linestring<Point> >
+ {
+ static inline void apply(all_custom_linestring<Point>& als)
+ {
+ als.custom_clear();
+ }
+ };
+
+ template <typename Point>
+ struct push_back<all_custom_linestring<Point> >
+ {
+ static inline void apply(all_custom_linestring<Point>& als, Point const& point)
+ {
+ als.custom_push_back(point);
+ }
+ };
+
+ template <typename Point>
+ struct resize<all_custom_linestring<Point> >
+ {
+ static inline void apply(all_custom_linestring<Point>& als, std::size_t new_size)
+ {
+ als.custom_resize(new_size);
+ }
+ };
+
+} // namespace traits
+
+}} // namespace boost::geometry
+
+
+// 2a. Adapt to Boost.Range, meta-functions
+namespace boost
+{
+ template<typename Point>
+ struct range_mutable_iterator<all_custom_linestring<Point> >
+ {
+ typedef typename all_custom_linestring<Point>::custom_iterator_type type;
+ };
+
+ template<typename Point>
+ struct range_const_iterator<all_custom_linestring<Point> >
+ {
+ typedef typename all_custom_linestring<Point>::custom_const_iterator_type type;
+ };
+
+} // namespace boost
+
+
+// 2b. Adapt to Boost.Range, part 2, ADP
+
+template<typename Point>
+inline typename all_custom_linestring<Point>::custom_iterator_type
+ range_begin(all_custom_linestring<Point>& als)
+{
+ return als.custom_begin();
+}
+
+template<typename Point>
+inline typename all_custom_linestring<Point>::custom_const_iterator_type
+ range_begin(all_custom_linestring<Point> const& als)
+{
+ return als.custom_begin();
+}
+
+template<typename Point>
+inline typename all_custom_linestring<Point>::custom_iterator_type
+ range_end(all_custom_linestring<Point>& als)
+{
+ return als.custom_end();
+}
+
+template<typename Point>
+inline typename all_custom_linestring<Point>::custom_const_iterator_type
+ range_end(all_custom_linestring<Point> const& als)
+{
+ return als.custom_end();
+}
+
+// (Optional)
+template<typename Point>
+inline std::size_t range_calculate_size(all_custom_linestring<Point> const& als)
+{
+ return als.custom_size();
+}
+
+
+// 3. There used to be a std::back_insert adaption but that is now done using push_back
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_LINESTRING_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/all_custom_polygon.hpp b/src/boost/libs/geometry/test/test_geometries/all_custom_polygon.hpp
new file mode 100644
index 000000000..1ce9286eb
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/all_custom_polygon.hpp
@@ -0,0 +1,130 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_POLYGON_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_POLYGON_HPP
+
+#include <cstddef>
+
+#include <boost/range.hpp>
+
+
+#include <boost/geometry/core/mutable_range.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <test_geometries/all_custom_container.hpp>
+#include <test_geometries/all_custom_ring.hpp>
+
+
+template <typename P>
+class all_custom_polygon
+{
+public :
+ typedef all_custom_ring<P> custom_ring_type;
+ typedef all_custom_container<custom_ring_type> custom_int_type;
+
+ custom_ring_type& custom_ext() { return m_ext; }
+ custom_int_type& custom_int() { return m_int; }
+
+ custom_ring_type const& custom_ext() const { return m_ext; }
+ custom_int_type const& custom_int() const { return m_int; }
+
+private :
+ custom_ring_type m_ext;
+ custom_int_type m_int;
+};
+
+
+
+namespace boost { namespace geometry
+{
+
+namespace traits
+{
+
+
+
+template <typename Point>
+struct tag<all_custom_polygon<Point> >
+{
+ typedef polygon_tag type;
+};
+
+template <typename Point>
+struct ring_const_type<all_custom_polygon<Point> >
+{
+ typedef typename all_custom_polygon<Point>::custom_ring_type const& type;
+};
+
+template <typename Point>
+struct ring_mutable_type<all_custom_polygon<Point> >
+{
+ typedef typename all_custom_polygon<Point>::custom_ring_type& type;
+};
+
+
+template <typename Point>
+struct interior_const_type<all_custom_polygon<Point> >
+{
+ typedef typename all_custom_polygon<Point>::custom_int_type const& type;
+};
+
+template <typename Point>
+struct interior_mutable_type<all_custom_polygon<Point> >
+{
+ typedef typename all_custom_polygon<Point>::custom_int_type& type;
+};
+
+
+
+template <typename Point>
+struct exterior_ring<all_custom_polygon<Point> >
+{
+ typedef all_custom_polygon<Point> polygon_type;
+ typedef typename polygon_type::custom_ring_type ring_type;
+
+ static inline ring_type& get(polygon_type& p)
+ {
+ return p.custom_ext();
+ }
+
+ static inline ring_type const& get(polygon_type const& p)
+ {
+ return p.custom_ext();
+ }
+};
+
+template <typename Point>
+struct interior_rings<all_custom_polygon<Point> >
+{
+ typedef all_custom_polygon<Point> polygon_type;
+ typedef typename polygon_type::custom_int_type int_type;
+
+ static inline int_type& get(polygon_type& p)
+ {
+ return p.custom_int();
+ }
+
+ static inline int_type const& get(polygon_type const& p)
+ {
+ return p.custom_int();
+ }
+};
+
+
+} // namespace traits
+
+}} // namespace boost::geometry
+
+
+
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_POLYGON_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/all_custom_ring.hpp b/src/boost/libs/geometry/test/test_geometries/all_custom_ring.hpp
new file mode 100644
index 000000000..aa1d37cfe
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/all_custom_ring.hpp
@@ -0,0 +1,142 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_RING_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_RING_HPP
+
+#include <cstddef>
+
+#include <boost/range.hpp>
+
+
+#include <boost/geometry/core/mutable_range.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <test_geometries/all_custom_container.hpp>
+
+
+template <typename P>
+class all_custom_ring : public all_custom_container<P>
+{};
+
+
+// Note that the things below are nearly all identical to implementation
+// in *linestring, but it seems not possible to re-use this (without macro's)
+// (the only thing DIFFERENT is the tag)
+
+
+// 1. Adapt to Boost.Geometry
+namespace boost { namespace geometry
+{
+
+namespace traits
+{
+ template <typename Point>
+ struct tag<all_custom_ring<Point> >
+ {
+ typedef ring_tag type;
+ };
+
+
+ // Implement traits for mutable actions
+ // These are all optional traits (normally / default they are implemented
+ // conforming std:: functionality)
+
+ template <typename Point>
+ struct clear<all_custom_ring<Point> >
+ {
+ static inline void apply(all_custom_ring<Point>& acr)
+ {
+ acr.custom_clear();
+ }
+ };
+
+ template <typename Point>
+ struct push_back<all_custom_ring<Point> >
+ {
+ static inline void apply(all_custom_ring<Point>& acr, Point const& point)
+ {
+ acr.custom_push_back(point);
+ }
+ };
+
+ template <typename Point>
+ struct resize<all_custom_ring<Point> >
+ {
+ static inline void apply(all_custom_ring<Point>& acr, std::size_t new_size)
+ {
+ acr.custom_resize(new_size);
+ }
+ };
+
+} // namespace traits
+
+}} // namespace boost::geometry
+
+
+// 2a. Adapt to Boost.Range, meta-functions
+namespace boost
+{
+ template<typename Point>
+ struct range_mutable_iterator<all_custom_ring<Point> >
+ {
+ typedef typename all_custom_ring<Point>::custom_iterator_type type;
+ };
+
+ template<typename Point>
+ struct range_const_iterator<all_custom_ring<Point> >
+ {
+ typedef typename all_custom_ring<Point>::custom_const_iterator_type type;
+ };
+
+} // namespace boost
+
+
+// 2b. Adapt to Boost.Range, part 2, ADP
+
+template<typename Point>
+inline typename all_custom_ring<Point>::custom_iterator_type
+ range_begin(all_custom_ring<Point>& acr)
+{
+ return acr.custom_begin();
+}
+
+template<typename Point>
+inline typename all_custom_ring<Point>::custom_const_iterator_type
+ range_begin(all_custom_ring<Point> const& acr)
+{
+ return acr.custom_begin();
+}
+
+template<typename Point>
+inline typename all_custom_ring<Point>::custom_iterator_type
+ range_end(all_custom_ring<Point>& acr)
+{
+ return acr.custom_end();
+}
+
+template<typename Point>
+inline typename all_custom_ring<Point>::custom_const_iterator_type
+ range_end(all_custom_ring<Point> const& acr)
+{
+ return acr.custom_end();
+}
+
+// (Optional)
+template<typename Point>
+inline std::size_t range_calculate_size(all_custom_ring<Point> const& acr)
+{
+ return acr.custom_size();
+}
+
+
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_ALL_CUSTOM_RING_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/copy_on_dereference_geometries.hpp b/src/boost/libs/geometry/test/test_geometries/copy_on_dereference_geometries.hpp
new file mode 100644
index 000000000..2d7d9d6ed
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/copy_on_dereference_geometries.hpp
@@ -0,0 +1,177 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_COPY_ON_DEREFERENCE_GEOMETRIES_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_COPY_ON_DEREFERENCE_GEOMETRIES_HPP
+
+#include <cstddef>
+#include <iterator>
+#include <vector>
+
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+
+
+template <typename RandomAccessIterator>
+class copy_on_dereference_iterator
+ : public boost::iterator_facade
+ <
+ copy_on_dereference_iterator<RandomAccessIterator>,
+ typename std::iterator_traits<RandomAccessIterator>::value_type,
+ boost::random_access_traversal_tag,
+ typename std::iterator_traits<RandomAccessIterator>::value_type,
+ typename std::iterator_traits<RandomAccessIterator>::difference_type
+ >
+{
+private:
+ typedef boost::iterator_facade
+ <
+ copy_on_dereference_iterator<RandomAccessIterator>,
+ typename std::iterator_traits<RandomAccessIterator>::value_type,
+ boost::random_access_traversal_tag,
+ typename std::iterator_traits<RandomAccessIterator>::value_type,
+ typename std::iterator_traits<RandomAccessIterator>::difference_type
+ > base_type;
+
+public:
+ typedef typename base_type::reference reference;
+ typedef typename base_type::difference_type difference_type;
+
+ copy_on_dereference_iterator() {}
+ copy_on_dereference_iterator(RandomAccessIterator it) : m_it(it) {}
+
+ template <typename OtherRAI>
+ copy_on_dereference_iterator
+ (copy_on_dereference_iterator<OtherRAI> const& other)
+ : m_it(other.m_it)
+ {}
+
+private:
+ friend class boost::iterator_core_access;
+
+ template <typename OtherRAI>
+ friend class copy_on_dereference_iterator;
+
+ inline reference dereference() const { return *m_it; }
+ inline void increment() { ++m_it; }
+ inline void decrement() { --m_it; }
+ inline void advance(difference_type n) { m_it += n; }
+
+ template <typename OtherRAI>
+ inline bool equal(copy_on_dereference_iterator<OtherRAI> const& other) const
+ {
+ return m_it == other.m_it;
+ }
+
+ template <typename OtherRAI>
+ inline difference_type
+ distance_to(copy_on_dereference_iterator<OtherRAI> const& other) const
+ {
+ return std::distance(m_it, other.m_it);
+ }
+
+private:
+ RandomAccessIterator m_it;
+};
+
+
+template <typename Value>
+class range_copy_on_dereference : private std::vector<Value>
+{
+private:
+ typedef std::vector<Value> base_type;
+
+public:
+ typedef typename base_type::size_type size_type;
+
+ typedef copy_on_dereference_iterator
+ <
+ typename base_type::const_iterator
+ > const_iterator;
+
+ typedef const_iterator iterator;
+
+ inline iterator begin()
+ {
+ return iterator(base_type::begin());
+ }
+
+ inline iterator end()
+ {
+ return iterator(base_type::end());
+ }
+
+ inline const_iterator begin() const
+ {
+ return const_iterator(base_type::begin());
+ }
+
+ inline const_iterator end() const
+ {
+ return const_iterator(base_type::end());
+ }
+
+ inline void clear()
+ {
+ base_type::clear();
+ }
+
+ inline void push_back(Value const& value)
+ {
+ base_type::push_back(value);
+ }
+
+ inline void resize(std::size_t n)
+ {
+ base_type::resize(n);
+ }
+
+ inline size_type size() const
+ {
+ return base_type::size();
+ }
+};
+
+
+template <typename Point>
+struct multipoint_copy_on_dereference : range_copy_on_dereference<Point>
+{};
+
+template <typename Point>
+struct linestring_copy_on_dereference : range_copy_on_dereference<Point>
+{};
+
+
+namespace boost { namespace geometry
+{
+
+namespace traits
+{
+
+template <typename Point>
+struct tag< multipoint_copy_on_dereference<Point> >
+{
+ typedef multi_point_tag type;
+};
+
+template <typename Point>
+struct tag< linestring_copy_on_dereference<Point> >
+{
+ typedef linestring_tag type;
+};
+
+} // namespace traits
+
+}} // namespace boost::geometry
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_COPY_ON_DEREFERENCE_GEOMETRIES_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/custom_lon_lat_point.hpp b/src/boost/libs/geometry/test/test_geometries/custom_lon_lat_point.hpp
new file mode 100644
index 000000000..1d49dcc00
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/custom_lon_lat_point.hpp
@@ -0,0 +1,133 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_TEST_GEOMETRIES_CUSTOM_LON_LAT_POINT_HPP
+#define BOOST_GEOMETRY_TEST_TEST_GEOMETRIES_CUSTOM_LON_LAT_POINT_HPP
+
+#include <boost/mpl/int.hpp>
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/coordinate_dimension.hpp>
+#include <boost/geometry/core/coordinate_system.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+
+// read/write longitude/latitude point
+template <typename CoordinateType, typename CoordinateSystem>
+struct rw_lon_lat_point
+{
+ CoordinateType longitude, latitude;
+};
+
+
+namespace boost { namespace geometry { namespace traits
+{
+template <typename CoordinateType, typename CoordinateSystem>
+struct tag<rw_lon_lat_point<CoordinateType, CoordinateSystem> >
+{
+ typedef point_tag type;
+};
+
+template <typename CoordinateType, typename CoordinateSystem>
+struct coordinate_type<rw_lon_lat_point<CoordinateType, CoordinateSystem> >
+{
+ typedef CoordinateType type;
+};
+
+template <typename CoordinateType, typename CoordinateSystem>
+struct coordinate_system<rw_lon_lat_point<CoordinateType, CoordinateSystem> >
+{
+ typedef CoordinateSystem type;
+};
+
+template <typename CoordinateType, typename CoordinateSystem>
+struct dimension<rw_lon_lat_point<CoordinateType, CoordinateSystem> >
+ : boost::mpl::int_<2>
+{};
+
+template
+<
+ typename CoordinateType,
+ typename CoordinateSystem,
+ std::size_t Dimension
+>
+struct access<rw_lon_lat_point<CoordinateType, CoordinateSystem>, Dimension>
+{
+ static inline CoordinateType
+ get(rw_lon_lat_point<CoordinateType, CoordinateSystem> const& p)
+ {
+ return (Dimension == 0) ? p.longitude : p.latitude;
+ }
+
+ static inline
+ void set(rw_lon_lat_point<CoordinateType, CoordinateSystem>& p,
+ CoordinateType const& value)
+ {
+ ( Dimension == 0 ? p.longitude : p.latitude ) = value;
+ }
+};
+
+}}} // namespace boost::geometry::traits
+
+
+// read-only longitude/latitude point
+template <typename CoordinateType, typename CoordinateSystem>
+struct ro_lon_lat_point
+{
+ CoordinateType longitude, latitude;
+};
+
+
+namespace boost { namespace geometry { namespace traits
+{
+template <typename CoordinateType, typename CoordinateSystem>
+struct tag<ro_lon_lat_point<CoordinateType, CoordinateSystem> >
+{
+ typedef point_tag type;
+};
+
+template <typename CoordinateType, typename CoordinateSystem>
+struct coordinate_type<ro_lon_lat_point<CoordinateType, CoordinateSystem> >
+{
+ typedef CoordinateType type;
+};
+
+template <typename CoordinateType, typename CoordinateSystem>
+struct coordinate_system<ro_lon_lat_point<CoordinateType, CoordinateSystem> >
+{
+ typedef CoordinateSystem type;
+};
+
+template <typename CoordinateType, typename CoordinateSystem>
+struct dimension<ro_lon_lat_point<CoordinateType, CoordinateSystem> >
+ : boost::mpl::int_<2>
+{};
+
+template
+<
+ typename CoordinateType,
+ typename CoordinateSystem,
+ std::size_t Dimension
+>
+struct access<ro_lon_lat_point<CoordinateType, CoordinateSystem>, Dimension>
+{
+ static inline CoordinateType
+ get(ro_lon_lat_point<CoordinateType, CoordinateSystem> const& p)
+ {
+ return (Dimension == 0) ? p.longitude : p.latitude;
+ }
+};
+
+}}} // namespace boost::geometry::traits
+
+
+#endif // BOOST_GEOMETRY_TEST_TEST_GEOMETRIES_CUSTOM_LON_LAT_POINT_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/custom_segment.hpp b/src/boost/libs/geometry/test/test_geometries/custom_segment.hpp
new file mode 100644
index 000000000..b4728c2b5
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/custom_segment.hpp
@@ -0,0 +1,58 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_CUSTOM_SEGMENT_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_CUSTOM_SEGMENT_HPP
+
+
+#include <boost/geometry/geometries/register/point.hpp>
+#include <boost/geometry/geometries/register/segment.hpp>
+
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+
+namespace test
+{
+
+struct custom_point_for_segment
+{
+ double x, y;
+};
+
+
+struct custom_segment
+{
+ custom_point_for_segment one, two;
+};
+
+template <typename P>
+struct custom_segment_of
+{
+ P p1, p2;
+};
+
+struct custom_segment_4
+{
+ double a, b, c, d;
+};
+
+
+} // namespace test
+
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(test::custom_point_for_segment, double, cs::cartesian, x, y)
+
+BOOST_GEOMETRY_REGISTER_SEGMENT(test::custom_segment, test::custom_point_for_segment, one, two)
+BOOST_GEOMETRY_REGISTER_SEGMENT_TEMPLATIZED(test::custom_segment_of, p1, p2)
+BOOST_GEOMETRY_REGISTER_SEGMENT_2D_4VALUES(test::custom_segment_4, test::custom_point_for_segment, a, b, c, d)
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_CUSTOM_SEGMENT_HPP
diff --git a/src/boost/libs/geometry/test/test_geometries/wrapped_boost_array.hpp b/src/boost/libs/geometry/test/test_geometries/wrapped_boost_array.hpp
new file mode 100644
index 000000000..8f4d8e39b
--- /dev/null
+++ b/src/boost/libs/geometry/test/test_geometries/wrapped_boost_array.hpp
@@ -0,0 +1,151 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef GEOMETRY_TEST_TEST_GEOMETRIES_WRAPPED_BOOST_ARRAY_HPP
+#define GEOMETRY_TEST_TEST_GEOMETRIES_WRAPPED_BOOST_ARRAY_HPP
+
+#include <cstddef>
+
+#include <boost/array.hpp>
+#include <boost/range.hpp>
+
+#include <boost/geometry/core/mutable_range.hpp>
+#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+
+namespace test
+{
+
+template <typename Point, std::size_t Count>
+struct wrapped_boost_array
+{
+ inline wrapped_boost_array() : size(0) {}
+
+ boost::array<Point, Count> array;
+ std::size_t size;
+};
+
+
+} // namespace test
+
+
+// 1a: adapt to Boost.Range
+namespace boost
+{
+ using namespace test;
+
+ template <typename Point, std::size_t Count>
+ struct range_mutable_iterator<wrapped_boost_array<Point, Count> >
+ : public range_mutable_iterator<boost::array<Point, Count> >
+ {};
+
+ template <typename Point, std::size_t Count>
+ struct range_const_iterator<wrapped_boost_array<Point, Count> >
+ : public range_const_iterator<boost::array<Point, Count> >
+ {};
+
+
+} // namespace 'boost'
+
+
+// 1b) adapt to Boost.Range with ADP
+namespace test
+{
+ template <typename Point, std::size_t Count>
+ inline typename boost::range_iterator
+ <
+ wrapped_boost_array<Point, Count>
+ >::type range_begin(wrapped_boost_array<Point, Count>& ar)
+ {
+ return ar.array.begin();
+ }
+
+ template <typename Point, std::size_t Count>
+ inline typename boost::range_iterator
+ <
+ wrapped_boost_array<Point, Count> const
+ >::type range_begin(wrapped_boost_array<Point, Count> const& ar)
+ {
+ return ar.array.begin();
+ }
+
+ template <typename Point, std::size_t Count>
+ inline typename boost::range_iterator
+ <
+ wrapped_boost_array<Point, Count>
+ >::type range_end(wrapped_boost_array<Point, Count>& ar)
+ {
+ typename boost::range_iterator
+ <
+ wrapped_boost_array<Point, Count>
+ >::type it = ar.array.begin();
+ return it + ar.size;
+ }
+
+ template <typename Point, std::size_t Count>
+ inline typename boost::range_iterator
+ <
+ wrapped_boost_array<Point, Count> const
+ >::type range_end(wrapped_boost_array<Point, Count> const& ar)
+ {
+ typename boost::range_iterator
+ <
+ wrapped_boost_array<Point, Count> const
+ >::type it = ar.array.begin();
+ return it + ar.size;
+ }
+
+}
+
+
+// 2: adapt to Boost.Geometry
+namespace boost { namespace geometry { namespace traits
+{
+
+ template <typename Point, std::size_t Count>
+ struct tag< wrapped_boost_array<Point, Count> >
+ {
+ typedef linestring_tag type;
+ };
+
+ template <typename Point, std::size_t Count>
+ struct clear< wrapped_boost_array<Point, Count> >
+ {
+ static inline void apply(wrapped_boost_array<Point, Count>& ar)
+ {
+ ar.size = 0;
+ }
+ };
+
+ template <typename Point, std::size_t Count>
+ struct push_back< wrapped_boost_array<Point, Count> >
+ {
+ static inline void apply(wrapped_boost_array<Point, Count>& ar, Point const& point)
+ {
+ // BOOST_ASSERT((ar.size < Count));
+ ar.array[ar.size++] = point;
+ }
+ };
+
+ template <typename Point, std::size_t Count>
+ struct resize< wrapped_boost_array<Point, Count> >
+ {
+ static inline void apply(wrapped_boost_array<Point, Count>& ar, std::size_t new_size)
+ {
+ BOOST_ASSERT(new_size < Count);
+ ar.size = new_size;
+ }
+ };
+
+}}} // namespace bg::traits
+
+
+#endif // GEOMETRY_TEST_TEST_GEOMETRIES_WRAPPED_BOOST_ARRAY_HPP
diff --git a/src/boost/libs/geometry/test/to_svg.hpp b/src/boost/libs/geometry/test/to_svg.hpp
new file mode 100644
index 000000000..ad62e217a
--- /dev/null
+++ b/src/boost/libs/geometry/test/to_svg.hpp
@@ -0,0 +1,412 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+#ifndef BOOST_GEOMETRY_TEST_TO_SVG_HPP
+#define BOOST_GEOMETRY_TEST_TO_SVG_HPP
+
+#include <fstream>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
+#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrichment_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp>
+#include <boost/foreach.hpp>
+
+#include <boost/geometry/algorithms/detail/relate/turns.hpp>
+
+template <typename G, typename Turns, typename Mapper>
+inline void turns_to_svg(Turns const& turns, Mapper & mapper, bool /*enrich*/ = false)
+{
+ namespace bg = boost::geometry;
+
+ // turn points in orange, + enrichment/traversal info
+ typedef typename bg::coordinate_type<G>::type coordinate_type;
+ typedef typename boost::range_value<Turns>::type turn_info;
+
+ // Simple map to avoid two texts at same place (note that can still overlap!)
+ std::map<std::pair<int, int>, int> offsets;
+ int index = 0;
+ int const margin = 5;
+
+ BOOST_FOREACH(turn_info const& turn, turns)
+ {
+ int lineheight = 10;
+ mapper.map(turn.point, "fill:rgb(255,128,0);"
+ "stroke:rgb(0,0,0);stroke-width:1", 3);
+
+ {
+ coordinate_type half = 0.5;
+ coordinate_type ten = 10;
+ // Map characteristics
+ // Create a rounded off point
+ std::pair<int, int> p
+ = std::make_pair(
+ boost::numeric_cast<int>(half
+ + ten * bg::get<0>(turn.point)),
+ boost::numeric_cast<int>(half
+ + ten * bg::get<1>(turn.point))
+ );
+ std::string style = "fill:rgb(0,0,0);font-family:Arial;font-size:12px";
+
+ if (turn.discarded)
+ {
+ style = "fill:rgb(92,92,92);font-family:Arial;font-size:10px";
+ lineheight = 6;
+ }
+
+ //if (! turn.discarded && ! turn.blocked() && ! turn.both(bg::detail::overlay::operation_union))
+ //if (! turn.discarded)
+ {
+ std::ostringstream out;
+ out << index
+ << ": " << bg::method_char(turn.method);
+
+ if ( turn.discarded )
+ out << " (discarded)\n";
+ else if ( turn.blocked() )
+ out << " (blocked)\n";
+ else
+ out << '\n';
+
+ out << bg::operation_char(turn.operations[0].operation)
+ <<": seg: " << turn.operations[0].seg_id.source_index
+ << ' ' << turn.operations[0].seg_id.multi_index
+ << ' ' << turn.operations[0].seg_id.ring_index
+ << ' ' << turn.operations[0].seg_id.segment_index << ", ";
+ out << "other: " << turn.operations[1].seg_id.source_index
+ << ' ' << turn.operations[1].seg_id.multi_index
+ << ' ' << turn.operations[1].seg_id.ring_index
+ << ' ' << turn.operations[1].seg_id.segment_index;
+
+ /*if ( enrich )
+ {
+ out << ", ";
+ if (turn.operations[0].enriched.next_ip_index != -1)
+ {
+ out << "ip: " << turn.operations[0].enriched.next_ip_index;
+ }
+ else
+ {
+ out << "vx: " << turn.operations[0].enriched.travels_to_vertex_index
+ << " -> ip: " << turn.operations[0].enriched.travels_to_ip_index;
+ }
+ }*/
+
+ out << '\n';
+
+ out << bg::operation_char(turn.operations[1].operation)
+ << ": seg: " << turn.operations[1].seg_id.source_index
+ << ' ' << turn.operations[1].seg_id.multi_index
+ << ' ' << turn.operations[1].seg_id.ring_index
+ << ' ' << turn.operations[1].seg_id.segment_index << ", ";
+ out << "other: " << turn.operations[0].seg_id.source_index
+ << ' ' << turn.operations[0].seg_id.multi_index
+ << ' ' << turn.operations[0].seg_id.ring_index
+ << ' ' << turn.operations[0].seg_id.segment_index;
+
+ /*if ( enrich )
+ {
+ out << ", ";
+ if (turn.operations[1].enriched.next_ip_index != -1)
+ {
+ out << "ip: " << turn.operations[1].enriched.next_ip_index;
+ }
+ else
+ {
+ out << "vx: " << turn.operations[1].enriched.travels_to_vertex_index
+ << " -> ip: " << turn.operations[1].enriched.travels_to_ip_index;
+ }
+ }*/
+
+ //out << std::endl;
+
+ /*out
+
+ << std::setprecision(3)
+ << "dist: " << boost::numeric_cast<double>(turn.operations[0].enriched.distance)
+ << " / " << boost::numeric_cast<double>(turn.operations[1].enriched.distance)
+ << std::endl
+ << "vis: " << bg::visited_char(turn.operations[0].visited)
+ << " / " << bg::visited_char(turn.operations[1].visited);
+ */
+
+ /*
+ out << index
+ << ": " << bg::operation_char(turn.operations[0].operation)
+ << " " << bg::operation_char(turn.operations[1].operation)
+ << " (" << bg::method_char(turn.method) << ")"
+ << (turn.ignore() ? " (ignore) " : " ")
+ << std::endl
+
+ << "ip: " << turn.operations[0].enriched.travels_to_ip_index
+ << "/" << turn.operations[1].enriched.travels_to_ip_index;
+
+ if (turn.operations[0].enriched.next_ip_index != -1
+ || turn.operations[1].enriched.next_ip_index != -1)
+ {
+ out << " [" << turn.operations[0].enriched.next_ip_index
+ << "/" << turn.operations[1].enriched.next_ip_index
+ << "]"
+ ;
+ }
+ out << std::endl;
+
+
+ out
+ << "vx:" << turn.operations[0].enriched.travels_to_vertex_index
+ << "/" << turn.operations[1].enriched.travels_to_vertex_index
+ << std::endl
+
+ << std::setprecision(3)
+ << "dist: " << turn.operations[0].enriched.distance
+ << " / " << turn.operations[1].enriched.distance
+ << std::endl
+ */
+
+
+
+ offsets[p] += lineheight;
+ int offset = offsets[p];
+ offsets[p] += lineheight * 3;
+ mapper.text(turn.point, out.str(), style, margin, offset, lineheight);
+ }
+ index++;
+ }
+ }
+}
+
+template <typename G1, typename P>
+inline void geom_to_svg(G1 const& g1,
+ boost::geometry::svg_mapper<P> & mapper)
+{
+ mapper.add(g1);
+
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+}
+
+template <typename G1, typename G2, typename P>
+inline void geom_to_svg(G1 const& g1, G2 const& g2,
+ boost::geometry::svg_mapper<P> & mapper)
+{
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+}
+
+template <typename G1>
+inline void geom_to_svg(G1 const& g1, std::string const& filename)
+{
+ namespace bg = boost::geometry;
+ typedef typename bg::point_type<G1>::type mapper_point_type;
+
+ std::ofstream svg(filename.c_str(), std::ios::trunc);
+ bg::svg_mapper<mapper_point_type> mapper(svg, 500, 500);
+
+ geom_to_svg(g1, mapper);
+}
+
+template <typename G1, typename G2>
+inline void geom_to_svg(G1 const& g1, G2 const& g2, std::string const& filename)
+{
+ namespace bg = boost::geometry;
+ typedef typename bg::point_type<G1>::type mapper_point_type;
+
+ std::ofstream svg(filename.c_str(), std::ios::trunc);
+ bg::svg_mapper<mapper_point_type> mapper(svg, 500, 500);
+
+ geom_to_svg(g1, g2, mapper);
+}
+
+template <typename G1>
+inline void geom_to_svg(std::string const& wkt1, std::string const& filename)
+{
+ namespace bg = boost::geometry;
+
+ G1 g1;
+ bg::read_wkt(wkt1, g1);
+ geom_to_svg(g1, filename);
+}
+
+template <typename G1, typename G2>
+inline void geom_to_svg(std::string const& wkt1, std::string const& wkt2, std::string const& filename)
+{
+ namespace bg = boost::geometry;
+
+ G1 g1;
+ G2 g2;
+ bg::read_wkt(wkt1, g1);
+ bg::read_wkt(wkt2, g2);
+ geom_to_svg(g1, g2, filename);
+}
+
+struct to_svg_assign_policy
+ : boost::geometry::detail::overlay::assign_null_policy
+{
+ static bool const include_no_turn = false;
+ static bool const include_degenerate = false;
+ static bool const include_opposite = false;
+};
+
+template <typename G>
+inline void to_svg(G const& g, std::string const& filename, bool /*sort*/ = true)
+{
+ namespace bg = boost::geometry;
+
+ typedef typename bg::point_type<G>::type P;
+
+ std::ofstream svg(filename.c_str(), std::ios::trunc);
+
+ bg::svg_mapper<P> mapper(svg, 500, 500);
+
+ mapper.add(g);
+
+ mapper.map(g, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+
+ // GET TURNS
+
+ typedef bg::segment_ratio<double> sr;
+ typedef bg::detail::overlay::traversal_turn_info<P, sr> turn_info;
+ typedef bg::detail::overlay::assign_null_policy AssignPolicy;
+ //typedef to_svg_assign_policy AssignPolicy;
+
+ typedef std::deque<turn_info> Turns;
+ typedef bg::detail::self_get_turn_points::no_interrupt_policy InterruptPolicy;
+
+ Turns turns;
+ InterruptPolicy interrupt_policy;
+
+ typedef bg::detail::overlay::get_turn_info<AssignPolicy> TurnPolicy;
+
+ bg::detail::self_get_turn_points::get_turns
+ <
+ false, TurnPolicy
+ >::apply(g, bg::detail::no_rescale_policy(), turns, interrupt_policy);
+
+ turns_to_svg<G>(turns, mapper);
+}
+
+template <typename G1, typename G2>
+inline void to_svg(G1 const& g1, G2 const& g2, std::string const& filename, bool sort = true, bool use_old_turns_policy = false, bool enrich = false)
+{
+ namespace bg = boost::geometry;
+
+ typedef typename bg::point_type<G1>::type mapper_point_type;
+
+ std::ofstream svg(filename.c_str(), std::ios::trunc);
+
+ bg::svg_mapper<mapper_point_type> mapper(svg, 500, 500);
+
+ mapper.add(g1);
+ mapper.add(g2);
+
+ mapper.map(g1, "fill-opacity:0.5;fill:rgb(153,204,0);"
+ "stroke:rgb(153,204,0);stroke-width:3");
+ mapper.map(g2, "fill-opacity:0.3;fill:rgb(51,51,153);"
+ "stroke:rgb(51,51,153);stroke-width:3");
+
+ // GET TURNS
+
+ typedef typename bg::detail::relate::turns::get_turns<G1, G2>::turn_info turn_info;
+ //typedef bg::detail::overlay::traversal_turn_info<P1> turn_info;
+ //typedef bg::detail::overlay::assign_null_policy AssignPolicy;
+ typedef to_svg_assign_policy AssignPolicy;
+
+ typedef std::deque<turn_info> Turns;
+ typedef bg::detail::get_turns::no_interrupt_policy InterruptPolicy;
+ static const bool Reverse1 = bg::detail::overlay::do_reverse<bg::point_order<G1>::value>::value;
+ static const bool Reverse2 = bg::detail::overlay::do_reverse<bg::point_order<G2>::value>::value;
+
+ Turns turns;
+ InterruptPolicy interrupt_policy;
+
+ if ( use_old_turns_policy )
+ {
+ boost::geometry::get_turns
+ <
+ Reverse1, Reverse2, AssignPolicy
+ >(g1, g2, bg::detail::no_rescale_policy(), turns, interrupt_policy);
+ }
+ else
+ {
+ typedef bg::detail::get_turns::get_turn_info_type
+ <
+ G1, G2, AssignPolicy
+ > TurnPolicy;
+
+ bg::detail::relate::turns::get_turns
+ <
+ G1, G2, TurnPolicy
+ >::apply(turns, g1, g2);
+ }
+
+ if ( sort )
+ {
+ typedef bg::detail::relate::turns::less
+ <
+ 0,
+ bg::detail::relate::turns::less_op_xxx_linear
+ <
+ 0, bg::detail::relate::turns::op_to_int<>
+ >,
+ typename bg::cs_tag<G1>::type
+ > less;
+ std::sort(boost::begin(turns), boost::end(turns), less());
+ }
+
+ /*if ( enrich )
+ {
+ typedef typename bg::strategy::side::services::default_strategy
+ <
+ typename bg::cs_tag<G1>::type
+ >::type side_strategy_type;
+
+ bg::enrich_intersection_points<bg::detail::overlay::do_reverse<bg::point_order<G1>::value>::value,
+ bg::detail::overlay::do_reverse<bg::point_order<G2>::value>::value>
+ (turns, bg::detail::overlay::operation_union,
+ g1, g1,
+ bg::detail::no_rescale_policy(),
+ side_strategy_type());
+ }*/
+
+ turns_to_svg<G1>(turns, mapper, enrich);
+}
+
+template <typename G>
+inline void to_svg(std::string const& wkt, std::string const& filename)
+{
+ G g;
+ boost::geometry::read_wkt(wkt, g);
+ to_svg(g, filename);
+}
+
+template <typename G1, typename G2>
+inline void to_svg(std::string const& wkt1, std::string const& wkt2, std::string const& filename, bool sort = true, bool reverse_by_geometry_id = false, bool enrich = false)
+{
+ G1 g1;
+ G2 g2;
+ boost::geometry::read_wkt(wkt1, g1);
+ boost::geometry::read_wkt(wkt2, g2);
+ to_svg(g1, g2, filename, sort, reverse_by_geometry_id, enrich);
+}
+
+#endif // BOOST_GEOMETRY_TEST_TO_SVG_HPP
diff --git a/src/boost/libs/geometry/test/util/Jamfile b/src/boost/libs/geometry/test/util/Jamfile
new file mode 100644
index 000000000..12adec94b
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/Jamfile
@@ -0,0 +1,30 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+#
+# This file was modified by Oracle on 2014, 2015, 2019.
+# Modifications copyright (c) 2014-2019, Oracle and/or its affiliates.
+#
+# Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-util
+ :
+ [ run calculation_type.cpp : : : : util_calculation_type ]
+ [ run for_each_coordinate.cpp : : : : util_for_each_coordinate ]
+ [ run math_abs.cpp : : : : util_math_abs ]
+ [ run math_equals.cpp : : : : util_math_equals ]
+ [ run math_sqrt.cpp : : : : util_math_sqrt ]
+ [ run promote_integral.cpp : : : : util_promote_integral ]
+ [ run range.cpp : : : : util_range ]
+ [ run rational.cpp : : : : util_rational ]
+ [ run select_most_precise.cpp : : : : util_select_most_precise ]
+ [ run tuples.cpp : : : : util_tuples ]
+ [ run write_dsv.cpp : : : : util_write_dsv ]
+ ;
diff --git a/src/boost/libs/geometry/test/util/calculation_type.cpp b/src/boost/libs/geometry/test/util/calculation_type.cpp
new file mode 100644
index 000000000..6e026676f
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/calculation_type.cpp
@@ -0,0 +1,208 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2012 Mateusz Loskot, London, UK.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/util/calculation_type.hpp>
+
+template <typename G1, typename G2>
+inline std::string helper()
+{
+ std::string result;
+ result += typeid(typename bg::coordinate_type<G1>::type).name();
+ result += "/";
+ result += typeid(typename bg::coordinate_type<G2>::type).name();
+ return result;
+}
+
+template <typename G1, typename G2, typename G3>
+inline std::string helper3()
+{
+ std::string result;
+ result += typeid(typename bg::coordinate_type<G1>::type).name();
+ result += "/";
+ result += typeid(typename bg::coordinate_type<G2>::type).name();
+ result += "/";
+ result += typeid(typename bg::coordinate_type<G3>::type).name();
+ return result;
+}
+
+template
+<
+ typename G1,
+ typename G2,
+ typename DefaultFP,
+ typename DefaultInt,
+ typename ExpectedType
+>
+void test()
+{
+ typedef typename bg::util::calculation_type::geometric::binary
+ <
+ G1,
+ G2,
+ void,
+ DefaultFP,
+ DefaultInt
+ >::type type;
+
+ std::string const caption = helper<G1, G2>();
+
+ BOOST_CHECK_MESSAGE((boost::is_same<type, ExpectedType>::type::value),
+ "Failure, types do not agree;"
+ << " input: " << caption
+ << " defaults: " << typeid(DefaultFP).name()
+ << "/" << typeid(DefaultInt).name()
+ << " expected: " << typeid(ExpectedType).name()
+ << " detected: " << typeid(type).name()
+ );
+}
+
+template
+<
+ typename G1,
+ typename G2,
+ typename CalculationType,
+ typename ExpectedType
+>
+void test_with_calculation_type()
+{
+ typedef typename bg::util::calculation_type::geometric::binary
+ <
+ G1,
+ G2,
+ CalculationType,
+ double,
+ int
+ >::type type;
+
+ std::string const caption = helper<G1, G2>();
+
+ BOOST_CHECK_MESSAGE((boost::is_same<type, ExpectedType>::type::value),
+ "Failure, types do not agree;"
+ << " input: " << caption
+ << " calculation type: " << typeid(CalculationType).name()
+ << " expected: " << typeid(ExpectedType).name()
+ << " detected: " << typeid(type).name()
+ );
+}
+
+template
+<
+ typename Geometry,
+ typename DefaultFP,
+ typename DefaultInt,
+ typename ExpectedType
+>
+void test_unary()
+{
+ typedef typename bg::util::calculation_type::geometric::unary
+ <
+ Geometry,
+ void,
+ DefaultFP,
+ DefaultInt
+ >::type type;
+
+ BOOST_CHECK_MESSAGE((boost::is_same<type, ExpectedType>::type::value),
+ "Failure, types do not agree;"
+ << " input: " << typeid(typename bg::coordinate_type<Geometry>::type).name()
+ << " defaults: " << typeid(DefaultFP).name()
+ << "/" << typeid(DefaultInt).name()
+ << " expected: " << typeid(ExpectedType).name()
+ << " detected: " << typeid(type).name()
+ );
+}
+
+
+template
+<
+ typename G1,
+ typename G2,
+ typename G3,
+ typename DefaultFP,
+ typename DefaultInt,
+ typename ExpectedType
+>
+void test_ternary()
+{
+ typedef typename bg::util::calculation_type::geometric::ternary
+ <
+ G1,
+ G2,
+ G3,
+ void,
+ DefaultFP,
+ DefaultInt
+ >::type type;
+
+ std::string const caption = helper3<G1, G2, G3>();
+
+ BOOST_CHECK_MESSAGE((boost::is_same<type, ExpectedType>::type::value),
+ "Failure, types do not agree;"
+ << " input: " << caption
+ << " defaults: " << typeid(DefaultFP).name()
+ << "/" << typeid(DefaultInt).name()
+ << " expected: " << typeid(ExpectedType).name()
+ << " detected: " << typeid(type).name()
+ );
+}
+
+
+struct user_defined {};
+
+int test_main(int, char* [])
+{
+ using namespace boost::geometry;
+ typedef model::point<double, 2, cs::cartesian> d;
+ typedef model::point<float, 2, cs::cartesian> f;
+ typedef model::point<int, 2, cs::cartesian> i;
+ typedef model::point<char, 2, cs::cartesian> c;
+ typedef model::point<short int, 2, cs::cartesian> s;
+ typedef model::point<boost::long_long_type, 2, cs::cartesian> ll;
+ typedef model::point<user_defined, 2, cs::cartesian> u;
+
+ // Calculation type "void" so
+ test<f, f, double, int, double>();
+ test<d, d, double, int, double>();
+ test<f, d, double, int, double>();
+
+ // FP/int mixed
+ test<i, f, double, int, double>();
+ test<s, f, double, short int, double>();
+
+ // integers
+ test<s, s, double, short int, short int>();
+ test<i, i, double, int, int>();
+ test<c, i, double, int, int>();
+ test<c, c, double, char, char>();
+ test<c, c, double, int, int>();
+ test<i, i, double, boost::long_long_type, boost::long_long_type>();
+
+ // Even if we specify "int" as default-calculation-type, it should never go downwards.
+ // So it will select "long long"
+ test<ll, ll, double, int, boost::long_long_type>();
+
+ // user defined
+ test<u, i, double, char, user_defined>();
+ test<u, d, double, double, user_defined>();
+
+ test_with_calculation_type<i, i, double, double>();
+ test_with_calculation_type<u, u, double, double>();
+
+ test_unary<i, double, int, int>();
+ test_unary<u, double, double, user_defined>();
+ test_ternary<u, u, u, double, double, user_defined>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/compress_variant.cpp b/src/boost/libs/geometry/test/util/compress_variant.cpp
new file mode 100644
index 000000000..ab7a61ca9
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/compress_variant.cpp
@@ -0,0 +1,77 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/geometry/util/compress_variant.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/equal.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/variant/variant.hpp>
+
+
+template <typename ExpectedTypes, BOOST_VARIANT_ENUM_PARAMS(typename T)>
+void check_variant_types(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>)
+{
+ BOOST_MPL_ASSERT((
+ boost::mpl::equal<
+ typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::types,
+ ExpectedTypes
+ >
+ ));
+}
+
+template <typename Variant, typename ExpectedTypes>
+void test_variant_result()
+{
+ check_variant_types<ExpectedTypes>(typename boost::geometry::compress_variant<Variant>::type());
+}
+
+template <typename Variant, typename ExpectedType>
+void test_single_type_result()
+{
+ BOOST_MPL_ASSERT((
+ boost::is_same<
+ typename boost::geometry::compress_variant<Variant>::type,
+ ExpectedType
+ >
+ ));
+}
+
+
+int test_main(int, char* [])
+{
+ test_variant_result<
+ boost::variant<int, float, double>,
+ boost::mpl::vector<int, float, double>
+ >();
+
+ test_variant_result<
+ boost::variant<int, float, double, int, int, float, double, double, float>,
+ boost::mpl::vector<int, double, float>
+ >();
+
+ test_single_type_result<
+ boost::variant<int>,
+ int
+ >();
+
+ test_single_type_result<
+ boost::variant<double, double, double, double, double>,
+ double
+ >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/for_each_coordinate.cpp b/src/boost/libs/geometry/test/util/for_each_coordinate.cpp
new file mode 100644
index 000000000..140d6f6cb
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/for_each_coordinate.cpp
@@ -0,0 +1,84 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+
+#include <boost/geometry/util/for_each_coordinate.hpp>
+
+#include <boost/geometry/algorithms/assign.hpp>
+
+
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/adapted/c_array.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+#include <test_common/test_point.hpp>
+
+BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+struct test_operation
+{
+ template <typename P, int I>
+ static void apply(P& p)
+ {
+ bg::set<I>(p, bg::get<I>(p) * 10);
+ }
+};
+
+struct get_operation
+{
+ std::string s;
+
+ template <typename P, int I>
+ inline void apply(P const& p)
+ {
+ std::ostringstream out;
+ out << bg::get<I>(p);
+ s += out.str();
+ }
+};
+
+
+template <typename P>
+void test_all()
+{
+ P p;
+ bg::assign_values(p, 1, 2, 3);
+ bg::for_each_coordinate(p, test_operation());
+ BOOST_CHECK(bg::get<0>(p) == 10);
+ BOOST_CHECK(bg::get<1>(p) == 20);
+ BOOST_CHECK(bg::get<2>(p) == 30);
+
+ P const& cp = p;
+ get_operation op;
+ op = bg::for_each_coordinate(cp, op);
+ BOOST_CHECK(op.s == std::string("102030"));
+}
+
+int test_main(int, char* [])
+{
+ test_all<int[3]>();
+ test_all<float[3]>();
+ test_all<double[3]>();
+ test_all<test::test_point>();
+ test_all<bg::model::point<int, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<float, 3, bg::cs::cartesian> >();
+ test_all<bg::model::point<double, 3, bg::cs::cartesian> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/is_implemented.cpp b/src/boost/libs/geometry/test/util/is_implemented.cpp
new file mode 100644
index 000000000..3eed994b4
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/is_implemented.cpp
@@ -0,0 +1,88 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014 Samuel Debionne, Grenoble, France.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/core/reverse_dispatch.hpp>
+#include <boost/geometry/core/tag_cast.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/strategies/tags.hpp>
+
+#include <boost/geometry/algorithms/not_implemented.hpp>
+
+#include <boost/geometry/util/is_implemented.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+namespace strategy { namespace services
+{
+
+
+template <typename Strategy> struct tag
+{
+
+ typedef not_implemented type;
+
+};
+
+}} // namespace strategy::services
+
+
+template
+<
+ typename Geometry1, typename Geometry2,
+ typename Strategy,
+ typename Tag1 = typename tag_cast<typename tag<Geometry1>::type, multi_tag>::type,
+ typename Tag2 = typename tag_cast<typename tag<Geometry2>::type, multi_tag>::type,
+ typename StrategyTag = typename strategy::services::tag<Strategy>::type,
+ bool Reverse = reverse_dispatch<Geometry1, Geometry2>::type::value
+>
+struct algorithm_archetype
+ : not_implemented<>
+{};
+
+
+struct strategy_archetype
+{
+ template <typename Geometry1, typename Geometry2>
+ static void apply(Geometry1, Geometry2) {}
+};
+
+
+}} // namespace boost::geometry
+
+
+int test_main(int, char* [])
+{
+ typedef bg::model::d2::point_xy<double> point_type;
+
+ BOOST_MPL_ASSERT((
+ boost::is_same<
+ bg::util::is_implemented2
+ <
+ point_type, point_type,
+ bg::algorithm_archetype<point_type, point_type, bg::strategy_archetype>
+ >::type,
+ boost::mpl::false_
+ >
+ ));
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/math_abs.cpp b/src/boost/libs/geometry/test/util/math_abs.cpp
new file mode 100644
index 000000000..c1cfbf51e
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/math_abs.cpp
@@ -0,0 +1,102 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_math_abs
+#endif
+
+#include <cmath>
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/config.hpp>
+
+#include "number_types.hpp"
+
+// important: the include above must precede the include below,
+// otherwise the test will fail for the custom number type:
+// custom_with_global_sqrt
+
+#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = boost::geometry;
+namespace bgm = boost::geometry::math;
+
+template <typename T>
+bool eq(T const& l, T const& r)
+{
+ return !(l < r || r < l);
+}
+
+BOOST_AUTO_TEST_CASE( test_math_abs )
+{
+ {
+ float p1 = bgm::pi<float>();
+ double p2 = bgm::pi<double>();
+ long double p3 = bgm::pi<long double>();
+
+ BOOST_CHECK(bgm::abs(p1) == p1);
+ BOOST_CHECK(bgm::abs(p2) == p2);
+ BOOST_CHECK(bgm::abs(p3) == p3);
+
+ float n1 = -p1;
+ double n2 = -p2;
+ long double n3 = -p3;
+
+ BOOST_CHECK(bgm::abs(n1) == p1);
+ BOOST_CHECK(bgm::abs(n2) == p2);
+ BOOST_CHECK(bgm::abs(n3) == p3);
+ }
+
+ {
+ number_types::custom<double> p1(bgm::pi<double>());
+ number_types::custom_with_global_sqrt<double> p2(bgm::pi<double>());
+ custom_global<double> p3(bgm::pi<double>());
+ custom_raw<double> p4(bgm::pi<double>());
+
+ BOOST_CHECK(eq(bgm::abs(p1), p1));
+ BOOST_CHECK(eq(bgm::abs(p2), p2));
+ BOOST_CHECK(eq(bgm::abs(p3), p3));
+ BOOST_CHECK(eq(bgm::abs(p4), p4));
+
+ number_types::custom<double> n1 = -p1;
+ number_types::custom_with_global_sqrt<double> n2 = -p2;
+ custom_global<double> n3 = -p3;
+ custom_raw<double> n4 = -p4;
+
+ BOOST_CHECK(eq(bgm::abs(n1), p1));
+ BOOST_CHECK(eq(bgm::abs(n2), p2));
+ BOOST_CHECK(eq(bgm::abs(n3), p3));
+ BOOST_CHECK(eq(bgm::abs(n4), p4));
+ }
+
+#ifdef HAVE_TTMATH
+ {
+ ttmath_big p1 = bgm::pi<ttmath_big>();
+ ttmath::Big<1, 4> p1 = bgm::pi<ttmath::Big<1, 4> >();
+
+ BOOST_CHECK(bgm::abs(p1) == p1);
+ BOOST_CHECK(bgm::abs(p2) == p2);
+
+ ttmath_big n1 = -p1;
+ ttmath::Big<1, 4> n2 = -p2;
+
+ BOOST_CHECK(bgm::abs(n1) == p1);
+ BOOST_CHECK(bgm::abs(n2) == p2);
+ }
+#endif
+}
+
diff --git a/src/boost/libs/geometry/test/util/math_equals.cpp b/src/boost/libs/geometry/test/util/math_equals.cpp
new file mode 100644
index 000000000..0f26f6951
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/math_equals.cpp
@@ -0,0 +1,79 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <limits>
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/util/math.hpp>
+
+namespace bgm = bg::math;
+
+template <typename T>
+void test_all()
+{
+ BOOST_CHECK(bgm::equals(0, 0));
+ BOOST_CHECK(bgm::equals(1, 1));
+ BOOST_CHECK(bgm::equals(123456, 123456));
+
+ T eps = std::numeric_limits<T>::epsilon();
+ if ( eps > 0 )
+ {
+ BOOST_CHECK(bgm::equals(0, 0+eps));
+ BOOST_CHECK(bgm::equals(0+eps, 0));
+ BOOST_CHECK(bgm::equals(1, 1+eps));
+ BOOST_CHECK(bgm::equals(1+eps, 1));
+ BOOST_CHECK(bgm::equals(12345+eps, 12345));
+ }
+
+ if (BOOST_GEOMETRY_CONDITION(std::numeric_limits<T>::has_infinity))
+ {
+ T inf = std::numeric_limits<T>::infinity();
+ BOOST_CHECK(!bgm::equals(0, inf));
+ BOOST_CHECK(!bgm::equals(0, -inf));
+ BOOST_CHECK(!bgm::equals(1, inf));
+ BOOST_CHECK(!bgm::equals(1, -inf));
+ BOOST_CHECK(!bgm::equals(12345, inf));
+ BOOST_CHECK(!bgm::equals(12345, -inf));
+ BOOST_CHECK(!bgm::equals(inf, 0));
+ BOOST_CHECK(!bgm::equals(-inf, 0));
+ BOOST_CHECK(!bgm::equals(inf, 1));
+ BOOST_CHECK(!bgm::equals(-inf, 1));
+ BOOST_CHECK(!bgm::equals(inf, 12345));
+ BOOST_CHECK(!bgm::equals(-inf, 12345));
+ BOOST_CHECK(bgm::equals(inf, inf));
+ BOOST_CHECK(bgm::equals(-inf, -inf));
+ BOOST_CHECK(!bgm::equals(inf, -inf));
+ BOOST_CHECK(!bgm::equals(-inf, inf));
+ }
+
+ if (BOOST_GEOMETRY_CONDITION(std::numeric_limits<T>::has_quiet_NaN))
+ {
+ T nan = std::numeric_limits<T>::quiet_NaN();
+ BOOST_CHECK(!bgm::equals(0, nan));
+ BOOST_CHECK(!bgm::equals(nan, 0));
+ BOOST_CHECK(!bgm::equals(nan, nan));
+ BOOST_CHECK(!bgm::equals(1, nan));
+ BOOST_CHECK(!bgm::equals(nan, 1));
+ BOOST_CHECK(!bgm::equals(12345, nan));
+ BOOST_CHECK(!bgm::equals(nan, 12345));
+ }
+}
+
+int test_main(int, char* [])
+{
+ test_all<int>();
+ test_all<float>();
+ test_all<double>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/math_sqrt.cpp b/src/boost/libs/geometry/test/util/math_sqrt.cpp
new file mode 100644
index 000000000..2ca4834a1
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/math_sqrt.cpp
@@ -0,0 +1,153 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_math_sqrt
+#endif
+
+#include <cmath>
+#include <iostream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/config.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+
+#include "number_types.hpp"
+
+// important: the include above must precede the include below,
+// otherwise the test will fail for the custom number type:
+// custom_with_global_sqrt
+
+#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
+
+#ifdef HAVE_TTMATH
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
+
+namespace bg = boost::geometry;
+
+
+
+
+// call BOOST_CHECK
+template <typename Argument, bool IsFundamental /* true */>
+struct check
+{
+ template <typename Result>
+ static inline void apply(Argument const& arg, Result const& result)
+ {
+ BOOST_CHECK_CLOSE(static_cast<double>(bg::math::sqrt(arg)),
+ static_cast<double>(result),
+ 0.00001);
+ }
+};
+
+
+template <typename Argument>
+struct check<Argument, false>
+{
+ template <typename Result>
+ static inline void apply(Argument const& arg, Result const& result)
+ {
+ Result const tol(0.00001);
+ BOOST_CHECK( bg::math::abs(bg::math::sqrt(arg) - result) < tol );
+ }
+};
+
+
+
+
+
+
+// test sqrt return type and value
+template
+<
+ typename Argument,
+ typename ExpectedResult,
+ typename Result = typename bg::math::detail::square_root
+ <
+ Argument
+ >::return_type,
+ bool IsFundamental = boost::is_fundamental<Argument>::value
+>
+struct check_sqrt
+ : bg::not_implemented<Argument, Result, ExpectedResult>
+{};
+
+
+template <typename Argument, typename Result, bool IsFundamental>
+struct check_sqrt<Argument, Result, Result, IsFundamental>
+{
+ static inline void apply(Argument const& arg, Result const& result)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "testing: " << typeid(Result).name()
+ << " sqrt(" << typeid(Argument).name()
+ << ")" << std::endl;
+#endif
+ check<Argument, IsFundamental>::apply(arg, result);
+ }
+};
+
+
+
+
+
+
+// test cases
+BOOST_AUTO_TEST_CASE( test_math_sqrt_fundamental )
+{
+ static const double sqrt2 = std::sqrt(2.0);
+ static const long double sqrt2L = std::sqrt(2.0L);
+ static const float sqrt2F = std::sqrt(2.0F);
+
+ check_sqrt<float, float>::apply(2.0F, sqrt2F);
+ check_sqrt<double, double>::apply(2.0, sqrt2);
+ check_sqrt<long double, long double>::apply(2.0L, sqrt2L);
+
+ check_sqrt<char, double>::apply(2, sqrt2);
+ check_sqrt<signed char, double>::apply(2, sqrt2);
+ check_sqrt<short, double>::apply(2, sqrt2);
+ check_sqrt<int, double>::apply(2, sqrt2);
+ check_sqrt<long, double>::apply(2L, sqrt2);
+#if !defined(BOOST_NO_LONG_LONG)
+ check_sqrt<long long, double>::apply(2LL, sqrt2);
+#endif
+#ifdef BOOST_HAS_LONG_LONG
+ check_sqrt
+ <
+ boost::long_long_type, double
+ >::apply(boost::long_long_type(2), sqrt2);
+#endif
+}
+
+
+BOOST_AUTO_TEST_CASE( test_math_sqrt_custom )
+{
+ typedef number_types::custom<double> custom1;
+ typedef custom_global<double> custom2;
+ typedef number_types::custom_with_global_sqrt<double> custom3;
+
+ static const double sqrt2 = std::sqrt(2.0);
+
+ check_sqrt<custom1, custom1>::apply(custom1(2.0), custom1(sqrt2));
+ check_sqrt<custom2, custom2>::apply(custom2(2.0), custom2(sqrt2));
+ check_sqrt<custom3, custom3>::apply(custom3(2.0), custom3(sqrt2));
+
+#ifdef HAVE_TTMATH
+ typedef ttmath_big custom4;
+ typedef ttmath::Big<1, 4> custom5;
+
+ check_sqrt<custom4, custom4>::apply(custom4(2.0), custom4(sqrt2));
+ check_sqrt<custom5, custom5>::apply(custom5(2.0), custom5(sqrt2));
+#endif
+}
diff --git a/src/boost/libs/geometry/test/util/number_types.hpp b/src/boost/libs/geometry/test/util/number_types.hpp
new file mode 100644
index 000000000..815dc956d
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/number_types.hpp
@@ -0,0 +1,187 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_GEOMETRY_TEST_UTIL_NUMBER_TYPES_HPP
+#define BOOST_GEOMETRY_TEST_UTIL_NUMBER_TYPES_HPP
+
+#include <cmath>
+
+
+// define a custom number type and its sqrt in own namespace
+namespace number_types
+{
+
+template <typename T>
+struct custom
+{
+ typedef custom<T> self;
+
+ T m_value;
+
+ custom() : m_value(0) {}
+ explicit custom(T const& value) : m_value(value) {}
+
+ bool operator<(self const& other) const
+ {
+ return m_value < other.m_value;
+ }
+
+ self operator-() const
+ {
+ return self(-m_value);
+ }
+
+ self operator-(self const& other) const
+ {
+ return self(m_value - other.m_value);
+ }
+};
+
+template <typename T>
+inline custom<T> sqrt(custom<T> const& c)
+{
+ return custom<T>(std::sqrt(c.m_value));
+}
+
+template <typename T>
+inline custom<T> fabs(custom<T> const& c)
+{
+ return custom<T>(c.m_value < T(0) ? c.m_value : -c.m_value);
+}
+
+} // namespace number_types
+
+
+
+
+
+
+// define a custom number type with sqrt in global namespace
+namespace number_types
+{
+
+template <typename T>
+struct custom_with_global_sqrt
+{
+ typedef custom_with_global_sqrt<T> self;
+
+ T m_value;
+
+ custom_with_global_sqrt() : m_value(0) {}
+ explicit custom_with_global_sqrt(T const& value) : m_value(value) {}
+
+ bool operator<(self const& other) const
+ {
+ return m_value < other.m_value;
+ }
+
+ self operator-() const
+ {
+ return self(-m_value);
+ }
+
+ self operator-(self const& other) const
+ {
+ return self(m_value - other.m_value);
+ }
+};
+
+} // namespace number_types
+
+template <typename T>
+inline number_types::custom_with_global_sqrt<T>
+sqrt(number_types::custom_with_global_sqrt<T> const& c)
+{
+ return number_types::custom_with_global_sqrt<T>(std::sqrt(c.m_value));
+}
+
+template <typename T>
+inline number_types::custom_with_global_sqrt<T>
+fabs(number_types::custom_with_global_sqrt<T> const& c)
+{
+ return number_types::custom_with_global_sqrt<T>
+ (c.m_value < T(0) ? c.m_value : -c.m_value);
+}
+
+
+
+
+
+
+// define a custom number type and its sqrt in global namespace
+template <typename T>
+struct custom_global
+{
+ typedef custom_global<T> self;
+
+ T m_value;
+
+ custom_global() : m_value(0) {}
+ explicit custom_global(T const& value) : m_value(value) {}
+
+ bool operator<(self const& other) const
+ {
+ return m_value < other.m_value;
+ }
+
+ self operator-() const
+ {
+ return self(-m_value);
+ }
+
+ self operator-(self const& other) const
+ {
+ return self(m_value - other.m_value);
+ }
+};
+
+template <typename T>
+inline custom_global<T> sqrt(custom_global<T> const& c)
+{
+ return custom_global<T>(std::sqrt(c.m_value));
+}
+
+template <typename T>
+inline custom_global<T> fabs(custom_global<T> const& c)
+{
+ return custom_global<T>(c.m_value < T(0) ? c.m_value : -c.m_value);
+}
+
+
+
+// custom number type without functions definition
+template <typename T>
+struct custom_raw
+{
+ typedef custom_raw<T> self;
+
+ T m_value;
+
+ custom_raw() : m_value(0) {}
+ explicit custom_raw(T const& value) : m_value(value) {}
+
+ bool operator<(self const& other) const
+ {
+ return m_value < other.m_value;
+ }
+
+ self operator-() const
+ {
+ return self(-m_value);
+ }
+
+ self operator-(self const& other) const
+ {
+ return self(m_value - other.m_value);
+ }
+};
+
+#endif // BOOST_GEOMETRY_TEST_UTIL_NUMBER_TYPES_HPP
diff --git a/src/boost/libs/geometry/test/util/promote_integral.cpp b/src/boost/libs/geometry/test/util/promote_integral.cpp
new file mode 100644
index 000000000..92d1b8ce4
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/promote_integral.cpp
@@ -0,0 +1,547 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2015, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+
+// Licensed under the Boost Software License version 1.0.
+// http://www.boost.org/users/license.html
+
+#ifndef BOOST_TEST_MODULE
+#define BOOST_TEST_MODULE test_promote_integral
+#endif
+
+#include <climits>
+#include <cstddef>
+#include <algorithm>
+#include <limits>
+#include <iostream>
+#include <string>
+#include <sstream>
+
+#include <boost/test/included/unit_test.hpp>
+
+#include <boost/config.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/util/condition.hpp>
+#include <boost/geometry/util/promote_integral.hpp>
+
+#if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER)
+#include <boost/multiprecision/cpp_int.hpp>
+#endif
+
+#if defined(BOOST_GEOMETRY_TEST_DEBUG)
+#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128)
+void print_uint128_t(std::ostream& os, boost::uint128_type i)
+{
+ if (i == 0)
+ {
+ os << "0";
+ return;
+ }
+
+ std::stringstream stream;
+ while (i > 0)
+ {
+ stream << static_cast<int>(i % 10);
+ i /= 10;
+ }
+ std::string str = stream.str();
+ std::reverse(str.begin(), str.end());
+ os << str;
+}
+
+std::ostream& operator<<(std::ostream& os, boost::int128_type i)
+{
+ if (i < 0)
+ {
+ os << "-";
+ print_uint128_t(os, static_cast<boost::uint128_type>(-i));
+ }
+ else
+ {
+ print_uint128_t(os, static_cast<boost::uint128_type>(i));
+ }
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, boost::uint128_type i)
+{
+ print_uint128_t(os, i);
+ return os;
+}
+#endif // BOOST_HAS_INT128 && BOOST_GEOMETRY_ENABLE_INT128
+#endif // BOOST_GEOMETRY_TEST_DEBUG
+
+namespace bg = boost::geometry;
+
+template
+<
+ typename T,
+ bool Signed = boost::is_fundamental<T>::type::value
+ && ! boost::is_unsigned<T>::type::value
+>
+struct absolute_value
+{
+ static inline T apply(T const& t)
+ {
+ return t < 0 ? -t : t;
+ }
+};
+
+template <typename T>
+struct absolute_value<T, false>
+{
+ static inline T apply(T const& t)
+ {
+ return t;
+ }
+};
+
+
+
+template
+<
+ typename Integral,
+ typename Promoted,
+ bool Signed = ! boost::is_unsigned<Promoted>::type::value
+>
+struct test_max_values
+{
+ static inline void apply()
+ {
+ Promoted min_value = (std::numeric_limits<Integral>::min)();
+ min_value *= min_value;
+ BOOST_CHECK(absolute_value<Promoted>::apply(min_value) == min_value);
+ Promoted max_value = (std::numeric_limits<Integral>::max)();
+ max_value *= max_value;
+ BOOST_CHECK(absolute_value<Promoted>::apply(max_value) == max_value);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "integral min_value^2: " << min_value << std::endl;
+ std::cout << "promoted max_value: "
+ << (std::numeric_limits<Promoted>::max)() << std::endl;
+#endif
+ }
+};
+
+template <typename Integral, typename Promoted>
+struct test_max_values<Integral, Promoted, false>
+{
+ static inline void apply()
+ {
+ Promoted max_value = (std::numeric_limits<Integral>::max)();
+ Promoted max_value_sqr = max_value * max_value;
+ BOOST_CHECK(max_value_sqr < (std::numeric_limits<Promoted>::max)()
+ &&
+ max_value_sqr > max_value);
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "integral max_value^2: " << max_value_sqr << std::endl;
+ std::cout << "promoted max_value: "
+ << (std::numeric_limits<Promoted>::max)() << std::endl;
+#endif
+ }
+};
+
+
+// helper function that returns the bit size of a type
+template
+<
+ typename T,
+ bool IsFundamental = boost::is_fundamental<T>::type::value
+>
+struct bit_size_impl : boost::mpl::size_t<0>
+{};
+
+template <typename T>
+struct bit_size_impl<T, true> : bg::detail::promote_integral::bit_size<T>::type
+{};
+
+#if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER)
+template
+<
+ typename Backend,
+ boost::multiprecision::expression_template_option ExpressionTemplates
+>
+struct bit_size_impl
+ <
+ boost::multiprecision::number<Backend, ExpressionTemplates>,
+ false
+ > : bg::detail::promote_integral::bit_size
+ <
+ boost::multiprecision::number<Backend, ExpressionTemplates>
+ >
+{};
+#endif
+
+
+template <typename T>
+std::size_t bit_size()
+{
+ return bit_size_impl<T>::type::value;
+}
+
+template <bool PromoteUnsignedToUnsigned>
+struct test_promote_integral
+{
+ template <typename Type, typename ExpectedPromotedType>
+ static inline void apply(std::string const& case_id)
+ {
+ typedef typename bg::promote_integral
+ <
+ Type, PromoteUnsignedToUnsigned
+ >::type promoted_integral_type;
+
+ bool const same_types = boost::is_same
+ <
+ promoted_integral_type, ExpectedPromotedType
+ >::type::value;
+
+ BOOST_CHECK_MESSAGE(same_types,
+ "case ID: " << case_id
+ << "input type: " << typeid(Type).name()
+ << "; detected: "
+ << typeid(promoted_integral_type).name()
+ << "; expected: "
+ << typeid(ExpectedPromotedType).name());
+
+ if (BOOST_GEOMETRY_CONDITION((! boost::is_same
+ <
+ Type, promoted_integral_type
+ >::type::value)))
+ {
+ test_max_values<Type, promoted_integral_type>::apply();
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "case ID: " << case_id << std::endl
+ << "type : " << typeid(Type).name()
+ << ", sizeof (bits): " << bit_size<Type>()
+ << ", min value: "
+ << (std::numeric_limits<Type>::min)()
+ << ", max value: "
+ << (std::numeric_limits<Type>::max)()
+ << std::endl;
+ std::cout << "detected promoted type : "
+ << typeid(promoted_integral_type).name()
+ << ", sizeof (bits): " << bit_size<promoted_integral_type>()
+ << ", min value: "
+ << (std::numeric_limits<promoted_integral_type>::min)()
+ << ", max value: "
+ << (std::numeric_limits<promoted_integral_type>::max)()
+ << std::endl;
+ std::cout << "expected promoted type : "
+ << typeid(ExpectedPromotedType).name()
+ << ", sizeof (bits): " << bit_size<ExpectedPromotedType>()
+ << ", min value: "
+ << (std::numeric_limits<ExpectedPromotedType>::min)()
+ << ", max value: "
+ << (std::numeric_limits<ExpectedPromotedType>::max)()
+ << std::endl;
+ std::cout << std::endl;
+#endif
+ }
+};
+
+template
+<
+ typename T,
+ bool PromoteUnsignedToUnsigned = false,
+ bool IsSigned = ! boost::is_unsigned<T>::type::value
+>
+struct test_promotion
+{
+ static inline void apply(std::string case_id)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** "
+ << (IsSigned ? "signed" : "unsigned")
+ << " -> signed ***" << std::endl;
+#endif
+
+ typedef test_promote_integral<PromoteUnsignedToUnsigned> tester;
+
+ case_id += (PromoteUnsignedToUnsigned ? "-t" : "-f");
+
+ std::size_t min_size = 2 * bit_size<T>() - 1;
+ if (BOOST_GEOMETRY_CONDITION(! IsSigned))
+ {
+ min_size += 2;
+ }
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "min size: " << min_size << std::endl;
+#endif
+
+ if (bit_size<short>() >= min_size)
+ {
+ tester::template apply<T, short>(case_id);
+ }
+ else if (bit_size<int>() >= min_size)
+ {
+ tester::template apply<T, int>(case_id);
+ }
+ else if (bit_size<long>() >= min_size)
+ {
+ tester::template apply<T, long>(case_id);
+ }
+#if defined(BOOST_HAS_LONG_LONG)
+ else if (bit_size<boost::long_long_type>() >= min_size)
+ {
+ tester::template apply<T, boost::long_long_type>(case_id);
+ }
+#endif
+#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128)
+ else if (bit_size<boost::int128_type>() >= min_size)
+ {
+ tester::template apply<T, boost::int128_type>(case_id);
+ }
+#endif
+ else
+ {
+#if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER)
+ namespace bm = boost::multiprecision;
+ typedef bm::number
+ <
+ bm::cpp_int_backend
+ <
+ 2 * CHAR_BIT * sizeof(T) + (IsSigned ? -1 : 1),
+ 2 * CHAR_BIT * sizeof(T) + (IsSigned ? -1 : 1),
+ bm::signed_magnitude,
+ bm::unchecked,
+ void
+ >
+ > multiprecision_integer_type;
+
+ tester::template apply<T, multiprecision_integer_type>(case_id);
+#else
+ tester::template apply<T, T>(case_id);
+#endif
+ }
+ }
+};
+
+template <typename T>
+struct test_promotion<T, true, false>
+{
+ static inline void apply(std::string case_id)
+ {
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "*** unsigned -> unsigned ***" << std::endl;
+#endif
+ case_id += "-t";
+
+ typedef test_promote_integral<true> tester;
+
+ std::size_t min_size = 2 * bit_size<T>();
+
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
+ std::cout << "min size: " << min_size << std::endl;
+#endif
+
+ if (bit_size<unsigned short>() >= min_size)
+ {
+ tester::apply<T, unsigned short>(case_id);
+ }
+ else if (bit_size<unsigned int>() >= min_size)
+ {
+ tester::apply<T, unsigned int>(case_id);
+ }
+ else if (bit_size<unsigned long>() >= min_size)
+ {
+ tester::apply<T, unsigned long>(case_id);
+ }
+ else if (bit_size<std::size_t>() >= min_size)
+ {
+ tester::apply<T, std::size_t>(case_id);
+ }
+#if defined(BOOST_HAS_LONG_LONG)
+ else if (bit_size<boost::ulong_long_type>() >= min_size)
+ {
+ tester::template apply<T, boost::ulong_long_type>(case_id);
+ }
+#endif
+#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128)
+ else if (bit_size<boost::uint128_type>() >= min_size)
+ {
+ tester::template apply<T, boost::uint128_type>(case_id);
+ }
+#endif
+ else
+ {
+#if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER)
+ namespace bm = boost::multiprecision;
+ typedef bm::number
+ <
+ bm::cpp_int_backend
+ <
+ 2 * CHAR_BIT * sizeof(T),
+ 2 * CHAR_BIT * sizeof(T),
+ bm::unsigned_magnitude,
+ bm::unchecked,
+ void
+ >
+ > multiprecision_integer_type;
+
+ tester::apply<T, multiprecision_integer_type>(case_id);
+#else
+ tester::apply<T, T>(case_id);
+#endif
+ }
+ }
+};
+
+
+
+BOOST_AUTO_TEST_CASE( test_char )
+{
+ test_promotion<char>::apply("char");
+ test_promotion<char, true>::apply("char");
+ test_promotion<signed char>::apply("schar");
+ test_promotion<signed char, true>::apply("schar");
+ test_promotion<unsigned char>::apply("uchar");
+ test_promotion<unsigned char, true>::apply("uchar");
+}
+
+BOOST_AUTO_TEST_CASE( test_short )
+{
+ test_promotion<short>::apply("short");
+ test_promotion<short, true>::apply("short");
+ test_promotion<unsigned short>::apply("ushort");
+ test_promotion<unsigned short, true>::apply("ushort");
+}
+
+BOOST_AUTO_TEST_CASE( test_int )
+{
+ test_promotion<int>::apply("int");
+ test_promotion<int, true>::apply("int");
+ test_promotion<unsigned int>::apply("uint");
+ test_promotion<unsigned int, true>::apply("uint");
+}
+
+BOOST_AUTO_TEST_CASE( test_long )
+{
+ test_promotion<long>::apply("long");
+ test_promotion<long, true>::apply("long");
+ test_promotion<unsigned long>::apply("ulong");
+ test_promotion<unsigned long, true>::apply("ulong");
+}
+
+BOOST_AUTO_TEST_CASE( test_std_size_t )
+{
+ test_promotion<std::size_t>::apply("size_t");
+ test_promotion<std::size_t, true>::apply("size_t");
+}
+
+#ifdef BOOST_HAS_LONG_LONG
+BOOST_AUTO_TEST_CASE( test_long_long )
+{
+ test_promotion<boost::long_long_type>::apply("long long");
+ test_promotion<boost::long_long_type, true>::apply("long long");
+ test_promotion<boost::ulong_long_type>::apply("ulong long");
+ test_promotion<boost::ulong_long_type, true>::apply("ulong long");
+}
+#endif
+
+#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128)
+BOOST_AUTO_TEST_CASE( test_int128 )
+{
+ test_promotion<boost::int128_type>::apply("int128_t");
+ test_promotion<boost::int128_type, true>::apply("int128_t");
+ test_promotion<boost::uint128_type>::apply("uint128_t");
+ test_promotion<boost::uint128_type, true>::apply("uint128_t");
+}
+#endif
+
+#if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER)
+BOOST_AUTO_TEST_CASE( test_user_types )
+{
+ namespace bm = boost::multiprecision;
+ typedef bm::number
+ <
+ bm::cpp_int_backend
+ <
+ 17,
+ 17,
+ bm::signed_magnitude,
+ bm::unchecked,
+ void
+ >
+ > user_signed_type1;
+
+ typedef bm::number
+ <
+ bm::cpp_int_backend
+ <
+ 17,
+ 17,
+ bm::unsigned_magnitude,
+ bm::unchecked,
+ void
+ >
+ > user_unsigned_type1;
+
+ typedef bm::number
+ <
+ bm::cpp_int_backend
+ <
+ 500,
+ 500,
+ bm::signed_magnitude,
+ bm::unchecked,
+ void
+ >
+ > user_signed_type2;
+
+ typedef bm::number
+ <
+ bm::cpp_int_backend
+ <
+ 500,
+ 500,
+ bm::unsigned_magnitude,
+ bm::unchecked,
+ void
+ >
+ > user_unsigned_type2;
+
+ // for user defined number types we do not do any promotion
+ typedef test_promote_integral<true> tester1;
+ typedef test_promote_integral<false> tester2;
+ tester1::apply<user_signed_type1, user_signed_type1>("u1s");
+ tester1::apply<user_signed_type2, user_signed_type2>("u2s");
+ tester1::apply<user_unsigned_type1, user_unsigned_type1>("u1u");
+ tester1::apply<user_unsigned_type2, user_unsigned_type2>("u2u");
+
+ tester2::apply<user_signed_type1, user_signed_type1>("u1s");
+ tester2::apply<user_signed_type2, user_signed_type2>("u2s");
+ tester2::apply<user_unsigned_type1, user_unsigned_type1>("u1u");
+ tester2::apply<user_unsigned_type2, user_unsigned_type2>("u1u");
+}
+#endif
+
+BOOST_AUTO_TEST_CASE( test_floating_point )
+{
+ typedef test_promote_integral<true> tester1;
+ typedef test_promote_integral<false> tester2;
+
+ // for floating-point types we do not do any promotion
+ tester1::apply<float, float>("fp-f");
+ tester1::apply<double, double>("fp-d");
+ tester1::apply<long double, long double>("fp-ld");
+
+ tester2::apply<float, float>("fp-f");
+ tester2::apply<double, double>("fp-d");
+ tester2::apply<long double, long double>("fp-ld");
+
+#ifdef HAVE_TTMATH
+ tester1::apply<ttmath_big, ttmath_big>("fp-tt");
+ tester2::apply<ttmath_big, ttmath_big>("fp-tt");
+#endif
+}
diff --git a/src/boost/libs/geometry/test/util/range.cpp b/src/boost/libs/geometry/test/util/range.cpp
new file mode 100644
index 000000000..56cfdfb11
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/range.cpp
@@ -0,0 +1,244 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2014-2015 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <iterator>
+#include <vector>
+
+#include <boost/range/iterator_range.hpp>
+
+#include <boost/geometry/util/range.hpp>
+
+namespace bgt {
+
+template <bool MutableIterator>
+struct beginner
+{
+ template <typename Range>
+ typename boost::range_iterator<Range>::type
+ operator()(Range & rng)
+ {
+ return boost::begin(rng);
+ }
+};
+template <>
+struct beginner<false>
+{
+ template <typename Range>
+ typename boost::range_iterator<Range const>::type
+ operator()(Range & rng)
+ {
+ return boost::const_begin(rng);
+ }
+};
+
+template <bool MutableIterator>
+struct ender
+{
+ template <typename Range>
+ typename boost::range_iterator<Range>::type
+ operator()(Range & rng)
+ {
+ return boost::end(rng);
+ }
+};
+template <>
+struct ender<false>
+{
+ template <typename Range>
+ typename boost::range_iterator<Range const>::type
+ operator()(Range & rng)
+ {
+ return boost::const_end(rng);
+ }
+};
+
+struct NonMovable
+{
+ NonMovable(int ii = 0) : i(ii) {}
+ NonMovable(NonMovable const& ii) : i(ii.i) {}
+ NonMovable & operator=(NonMovable const& ii) { i = ii.i; return *this; }
+ bool operator==(NonMovable const& ii) const { return i == ii.i; }
+ int i;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+private:
+ NonMovable(NonMovable && ii);
+ NonMovable & operator=(NonMovable && ii);
+#endif
+};
+
+struct CopyableAndMovable
+{
+ CopyableAndMovable(int ii = 0) : i(ii) {}
+ CopyableAndMovable(CopyableAndMovable const& ii) : i(ii.i) {}
+ CopyableAndMovable & operator=(CopyableAndMovable const& ii) { i = ii.i; return *this; }
+ bool operator==(CopyableAndMovable const& ii) const { return i == ii.i; }
+ int i;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ CopyableAndMovable(CopyableAndMovable && ii) : i(std::move(ii.i)) {}
+ CopyableAndMovable & operator=(CopyableAndMovable && ii) { i = std::move(ii.i); return *this; }
+#endif
+};
+
+} // namespace bgt
+
+namespace bgr = bg::range;
+
+template <typename T, bool MutableIterator>
+void test_all()
+{
+ bgt::beginner<MutableIterator> begin;
+ bgt::ender<MutableIterator> end;
+
+ std::vector<T> v;
+ for (int i = 0 ; i < 20 ; ++i)
+ {
+ bgr::push_back(v, i);
+ }
+
+ for (int i = 0 ; i < 20 ; ++i)
+ {
+ BOOST_CHECK(bgr::at(v, i) == i);
+ }
+
+ {
+ std::vector<T> w;
+ std::copy(v.begin(), v.end(), bgr::back_inserter(w));
+ BOOST_CHECK(v.size() == w.size() && std::equal(v.begin(), v.end(), w.begin()));
+ }
+
+ BOOST_CHECK(bgr::front(v) == 0);
+ BOOST_CHECK(bgr::back(v) == 19);
+
+ BOOST_CHECK(boost::size(v) == 20); // [0,19]
+ bgr::resize(v, 15);
+ BOOST_CHECK(boost::size(v) == 15); // [0,14]
+ BOOST_CHECK(bgr::back(v) == 14);
+
+ bgr::pop_back(v);
+ BOOST_CHECK(boost::size(v) == 14); // [0,13]
+ BOOST_CHECK(bgr::back(v) == 13);
+
+ typename std::vector<T>::iterator
+ it = bgr::erase(v, end(v) - 1);
+ BOOST_CHECK(boost::size(v) == 13); // [0,12]
+ BOOST_CHECK(bgr::back(v) == 12);
+ BOOST_CHECK(it == end(v));
+
+ it = bgr::erase(v, end(v) - 3, end(v));
+ BOOST_CHECK(boost::size(v) == 10); // [0,9]
+ BOOST_CHECK(bgr::back(v) == 9);
+ BOOST_CHECK(it == end(v));
+
+ it = bgr::erase(v, begin(v) + 2);
+ BOOST_CHECK(boost::size(v) == 9); // {0,1,3..9}
+ BOOST_CHECK(bgr::at(v, 1) == 1);
+ BOOST_CHECK(bgr::at(v, 2) == 3);
+ BOOST_CHECK(bgr::back(v) == 9);
+ BOOST_CHECK(it == bgr::pos(v, 2));
+
+ it = bgr::erase(v, begin(v) + 2, begin(v) + 2);
+ BOOST_CHECK(boost::size(v) == 9); // {0,1,3..9}
+ BOOST_CHECK(bgr::at(v, 1) == 1);
+ BOOST_CHECK(bgr::at(v, 2) == 3);
+ BOOST_CHECK(bgr::back(v) == 9);
+ BOOST_CHECK(it == bgr::pos(v, 2));
+
+ it = bgr::erase(v, begin(v) + 2, begin(v) + 5);
+ BOOST_CHECK(boost::size(v) == 6); // {0,1,6..9}
+ BOOST_CHECK(bgr::at(v, 1) == 1);
+ BOOST_CHECK(bgr::at(v, 2) == 6);
+ BOOST_CHECK(bgr::back(v) == 9);
+ BOOST_CHECK(it == bgr::pos(v, 2));
+
+ it = bgr::erase(v, begin(v));
+ BOOST_CHECK(boost::size(v) == 5); // {1,6..9}
+ BOOST_CHECK(bgr::at(v, 0) == 1);
+ BOOST_CHECK(bgr::at(v, 1) == 6);
+ BOOST_CHECK(bgr::back(v) == 9);
+ BOOST_CHECK(it == bgr::pos(v, 0));
+
+ it = bgr::erase(v, begin(v), begin(v) + 3);
+ BOOST_CHECK(boost::size(v) == 2); // {8,9}
+ BOOST_CHECK(bgr::at(v, 0) == 8);
+ BOOST_CHECK(bgr::at(v, 1) == 9);
+ BOOST_CHECK(bgr::back(v) == 9);
+ BOOST_CHECK(it == bgr::pos(v, 0));
+
+ it = bgr::erase(v, begin(v), end(v));
+ BOOST_CHECK(boost::size(v) == 0);
+ BOOST_CHECK(it == end(v));
+}
+
+void test_detail()
+{
+ int arr[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+ bgr::detail::copy_or_move(arr + 1, arr + 10, arr);
+ BOOST_CHECK(arr[0] == 1);
+
+ std::vector<int> v(10, 0);
+ bgr::detail::copy_or_move(v.begin() + 1, v.begin() + 10, v.begin());
+ BOOST_CHECK(boost::size(v) == 10);
+ bgr::erase(v, v.begin() + 1);
+ BOOST_CHECK(boost::size(v) == 9);
+
+ bgt::NonMovable * arr2[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ bgt::NonMovable foo;
+ arr2[1] = &foo;
+ bgr::detail::copy_or_move(arr2 + 1, arr2 + 10, arr2);
+ BOOST_CHECK(arr2[0] == &foo);
+
+ // Storing pointers in a std::vector is not possible in MinGW C++98
+#if __cplusplus >= 201103L
+ std::vector<bgt::NonMovable*> v2(10, (bgt::NonMovable*)NULL);
+ bgr::detail::copy_or_move(v2.begin() + 1, v2.begin() + 10, v2.begin());
+ BOOST_CHECK(boost::size(v2) == 10);
+ bgr::erase(v2, v2.begin() + 1);
+ BOOST_CHECK(boost::size(v2) == 9);
+#endif
+}
+
+template <class Iterator>
+void test_pointers()
+{
+ int arr[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+
+ boost::iterator_range<Iterator> r1(arr, arr + 10);
+ std::pair<Iterator, Iterator> r2(arr, arr + 10);
+
+ BOOST_CHECK(bgr::front(r1) == 0);
+ BOOST_CHECK(bgr::front(r2) == 0);
+ BOOST_CHECK(bgr::back(r1) == 9);
+ BOOST_CHECK(bgr::back(r2) == 9);
+ BOOST_CHECK(bgr::at(r1, 5) == 5);
+ BOOST_CHECK(bgr::at(r2, 5) == 5);
+}
+
+int test_main(int, char* [])
+{
+ test_all<int, true>();
+ test_all<int, false>();
+ // Storing non-movable elements in a std::vector is not possible in some implementations of STD lib
+#ifdef BOOST_GEOMETRY_TEST_NONMOVABLE_ELEMENTS
+ test_all<bgt::NonMovable, true>();
+ test_all<bgt::NonMovable, false>();
+#endif
+ test_all<bgt::CopyableAndMovable, true>();
+ test_all<bgt::CopyableAndMovable, false>();
+
+ test_detail();
+ test_pointers<int*>();
+ test_pointers<int const*>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/rational.cpp b/src/boost/libs/geometry/test/util/rational.cpp
new file mode 100644
index 000000000..8ec47eb9c
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/rational.cpp
@@ -0,0 +1,61 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/util/rational.hpp>
+
+void test_coordinate_cast(std::string const& s, int expected_nom, int expected_denom)
+{
+ boost::rational<int> a = bg::detail::coordinate_cast<boost::rational<int> >::apply(s);
+ BOOST_CHECK_EQUAL(a.numerator(), expected_nom);
+ BOOST_CHECK_EQUAL(a.denominator(), expected_denom);
+}
+
+
+void test_wkt(std::string const& wkt, std::string const expected_wkt)
+{
+ bg::model::point<boost::rational<int>, 2, bg::cs::cartesian> p;
+ bg::read_wkt(wkt, p);
+ std::ostringstream out;
+ out << bg::wkt(p);
+
+ BOOST_CHECK_EQUAL(out.str(), expected_wkt);
+}
+
+int test_main(int, char* [])
+{
+ test_coordinate_cast("0", 0, 1);
+ test_coordinate_cast("1", 1, 1);
+ test_coordinate_cast("-1", -1, 1);
+ test_coordinate_cast("-0.5", -1, 2);
+ test_coordinate_cast("-1.5", -3, 2);
+ test_coordinate_cast("0.5", 1, 2);
+ test_coordinate_cast("1.5", 3, 2);
+ test_coordinate_cast("2.12345", 42469, 20000);
+ test_coordinate_cast("1.", 1, 1);
+
+ test_coordinate_cast("3/2", 3, 2);
+ test_coordinate_cast("-3/2", -3, 2);
+
+ test_wkt("POINT(1.5 2.75)", "POINT(3/2 11/4)");
+ test_wkt("POINT(3/2 11/4)", "POINT(3/2 11/4)");
+ test_wkt("POINT(-1.5 2.75)", "POINT(-3/2 11/4)");
+ test_wkt("POINT(-3/2 11/4)", "POINT(-3/2 11/4)");
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/select_most_precise.cpp b/src/boost/libs/geometry/test/util/select_most_precise.cpp
new file mode 100644
index 000000000..3ec2dec73
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/select_most_precise.cpp
@@ -0,0 +1,78 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/util/select_most_precise.hpp>
+
+
+struct user_defined {};
+
+template <typename T1, typename T2, typename ExpectedType>
+void test()
+{
+ typedef typename bg::select_most_precise<T1, T2>::type type;
+ bool is_same = boost::is_same<type, ExpectedType>::type::value;
+
+ BOOST_CHECK_MESSAGE(is_same,
+ "The most precise of types " <<
+ "T1: {" << typeid(T1).name() << " | s: " << sizeof(T1) << "}" <<
+ " and " <<
+ "T2: {" << typeid(T2).name() << " | s: " << sizeof(T2) << "}" <<
+ " does not match " <<
+ "ExpectedType: {" << typeid(ExpectedType).name() << " | s: " << sizeof(ExpectedType) << "}");
+}
+
+int test_main(int, char* [])
+{
+ // fp only
+ test<float, float, float>();
+ test<float, double, double>();
+ test<double, float, double>();
+ test<double, double, double>();
+
+ // integer only
+ test<int, int, int>();
+ test<int, short int, int>();
+ test<short int, int, int>();
+ test<short int, short int, short int>();
+
+ // int/fp
+ test<double, int, double>();
+ test<int, double, double>();
+ test<long double, long double, long double>();
+ test<float, int, float>();
+ test<int, float, float>();
+
+ if ( sizeof(long double) > sizeof(double) )
+ {
+ // This cannot be done for MSVC because double/long double is the same
+ // This is also true for Android
+ test<double, long double, long double>();
+ test<long double, double, long double>();
+ }
+
+ // with any other non-integer/float class
+ test<int, user_defined, user_defined>();
+ test<user_defined, int, user_defined>();
+ test<long double, user_defined, user_defined>();
+ test<user_defined, long double, user_defined>();
+ test<user_defined, user_defined, user_defined>();
+
+ // should not compile
+ //test<void, void, void>();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/transform_variant.cpp b/src/boost/libs/geometry/test/util/transform_variant.cpp
new file mode 100644
index 000000000..4594e591a
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/transform_variant.cpp
@@ -0,0 +1,68 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/geometry/util/transform_variant.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/equal.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/variant/variant.hpp>
+
+using boost::mpl::placeholders::_;
+
+
+template <typename ExpectedTypes, BOOST_VARIANT_ENUM_PARAMS(typename T)>
+void check(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>)
+{
+ BOOST_MPL_ASSERT((
+ boost::mpl::equal<
+ typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::types,
+ ExpectedTypes
+ >
+ ));
+}
+
+
+int test_main(int, char* [])
+{
+ // Transform Variant to Variant
+ typedef boost::geometry::transform_variant<
+ boost::variant<int, float, long>,
+ boost::add_pointer<_>
+ >::type transformed1;
+
+ check<boost::mpl::vector<int*, float*, long*> >(transformed1());
+
+ // Transform Sequence to Variant (without inserter)
+ typedef boost::geometry::transform_variant<
+ boost::mpl::vector<int, float, long>,
+ boost::add_pointer<_>
+ >::type transformed2;
+
+ check<boost::mpl::vector<int*, float*, long*> >(transformed2());
+
+ // Transform Sequence to Variant (with inserter)
+ typedef boost::geometry::transform_variant<
+ boost::mpl::vector<int, float, long>,
+ boost::add_pointer<_>,
+ boost::mpl::back_inserter<boost::mpl::vector0<> >
+ >::type transformed3;
+
+ check<boost::mpl::vector<int*, float*, long*> >(transformed3());
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/tuples.cpp b/src/boost/libs/geometry/test/util/tuples.cpp
new file mode 100644
index 000000000..19583fb38
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/tuples.cpp
@@ -0,0 +1,141 @@
+// Boost.Geometry
+// Unit Test
+
+// Copyright (c) 2019 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/util/tuples.hpp>
+
+namespace bt = boost::tuples;
+namespace bgt = boost::geometry::tuples;
+namespace bm = boost::mpl;
+
+template <typename T>
+struct is_double
+ : boost::is_same<T, double>
+{};
+
+template <typename T>
+struct is_float
+ : boost::is_same<T, float>
+{};
+
+
+template <typename Tuple>
+struct is_boost_tuple
+ : boost::integral_constant<bool, false>
+{};
+
+template <class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+struct is_boost_tuple<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+ : boost::integral_constant<bool, true>
+{};
+
+template <typename Tuple>
+struct is_boost_tuples_cons
+ : boost::integral_constant<bool, false>
+{};
+
+template <typename HT, typename TT>
+struct is_boost_tuples_cons<boost::tuples::cons<HT, TT> >
+ : boost::integral_constant<bool, true>
+{};
+
+template <typename Tuple>
+struct is_std_pair
+ : boost::integral_constant<bool, false>
+{};
+
+template <typename F, typename S>
+struct is_std_pair<std::pair<F, S> >
+ : boost::integral_constant<bool, true>
+{};
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+
+template <typename Tuple>
+struct is_std_tuple
+ : boost::integral_constant<bool, false>
+{};
+
+template <typename ...Ts>
+struct is_std_tuple<std::tuple<Ts...> >
+ : boost::integral_constant<bool, true>
+{};
+
+#endif
+
+template <typename Tuple>
+void test_all()
+{
+ typedef Tuple tuple_id;
+ tuple_id tup_id(1, 2.0);
+
+ BOOST_CHECK_EQUAL((bgt::get<0>(tup_id)), 1);
+ BOOST_CHECK_EQUAL((bgt::get<1>(tup_id)), 2.0);
+
+ BOOST_CHECK_EQUAL(int(bgt::size<tuple_id>::value), 2);
+
+ BOOST_CHECK_EQUAL((bgt::find_index_if<tuple_id, is_double>::value), 1);
+ BOOST_CHECK((boost::is_same<typename bgt::find_if<tuple_id, is_double>::type, double>::value));
+
+ BOOST_CHECK_EQUAL((bgt::find_index_if<tuple_id, is_float>::value), 2);
+ BOOST_CHECK((boost::is_same<typename bgt::find_if<tuple_id, is_float>::type, boost::tuples::null_type>::value));
+
+ typedef typename bgt::push_back<tuple_id, float>::type tuple_idf;
+ tuple_idf tup_idf = bgt::push_back<tuple_id, float>::apply(tup_id, 3.0f);
+
+ BOOST_CHECK_EQUAL((bgt::get<0>(tup_idf)), 1);
+ BOOST_CHECK_EQUAL((bgt::get<1>(tup_idf)), 2.0);
+ BOOST_CHECK_EQUAL((bgt::get<2>(tup_idf)), 3.0f);
+
+ BOOST_CHECK_EQUAL(int(bgt::size<tuple_idf>::value), 3);
+
+ BOOST_CHECK_EQUAL((bgt::find_index_if<tuple_idf, is_float>::value), 2);
+ BOOST_CHECK((boost::is_same<typename bgt::find_if<tuple_idf, is_float>::type, float>::value));
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+
+ BOOST_CHECK((
+ (is_boost_tuple<tuple_id>::value && is_boost_tuples_cons<tuple_idf>::value)
+ || (!is_boost_tuple<tuple_id>::value && is_std_tuple<tuple_idf>::value)
+ ));
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+ tup_idf = bgt::push_back<tuple_id, float>::apply(std::move(tup_id), 3.0f);
+
+ BOOST_CHECK_EQUAL((bgt::get<0>(tup_idf)), 1);
+ BOOST_CHECK_EQUAL((bgt::get<1>(tup_idf)), 2.0);
+ BOOST_CHECK_EQUAL((bgt::get<2>(tup_idf)), 3.0f);
+
+#endif
+
+#else
+
+ BOOST_CHECK((is_boost_tuples_cons<tuple_idf>::type, float>::value));
+
+#endif
+}
+
+int test_main(int, char* [])
+{
+ test_all<boost::tuple<int, double> >();
+ test_all<std::pair<int, double> >();
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+
+ test_all<std::tuple<int, double> >();
+
+#endif
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/util/write_dsv.cpp b/src/boost/libs/geometry/test/util/write_dsv.cpp
new file mode 100644
index 000000000..ebb70636a
--- /dev/null
+++ b/src/boost/libs/geometry/test/util/write_dsv.cpp
@@ -0,0 +1,73 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <sstream>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/io/dsv/write.hpp>
+
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+
+template <typename G>
+void test_dsv(std::string const& wkt, std::string const& dsv)
+{
+ G geometry;
+
+ bg::read_wkt(wkt, geometry);
+
+ std::ostringstream out;
+ out << bg::dsv(geometry);
+ BOOST_CHECK_EQUAL(out.str(), dsv);
+}
+
+
+#ifndef GEOMETRY_TEST_MULTI
+template <typename T>
+void test_all()
+{
+ using namespace boost::geometry;
+ typedef model::point<T, 2, cs::cartesian> P;
+
+ test_dsv<P >("POINT(1 2)", "(1, 2)");
+ test_dsv<model::linestring<P> >(
+ "LINESTRING(1 1,2 2,3 3)",
+ "((1, 1), (2, 2), (3, 3))");
+ test_dsv<model::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0))",
+ "(((0, 0), (0, 4), (4, 4), (4, 0), (0, 0)))");
+
+ test_dsv<model::ring<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0))",
+ "((0, 0), (0, 4), (4, 4), (4, 0), (0, 0))");
+
+ test_dsv<model::box<P> >("BOX(0 0,1 1)",
+ "((0, 0), (1, 1))");
+}
+#endif
+
+
+int test_main(int, char* [])
+{
+ test_all<double>();
+ test_all<int>();
+
+
+ return 0;
+}
+
diff --git a/src/boost/libs/geometry/test/views/Jamfile b/src/boost/libs/geometry/test/views/Jamfile
new file mode 100644
index 000000000..3b23c2f36
--- /dev/null
+++ b/src/boost/libs/geometry/test/views/Jamfile
@@ -0,0 +1,19 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
+# Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
+# Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-views
+ :
+ [ run segment_view.cpp : : : : views_segment_view ]
+ [ run box_view.cpp : : : : views_box_view ]
+ [ run reversible_view.cpp : : : : views_reversible_view ]
+ [ run closeable_view.cpp : : : : views_closeable_view ]
+ [ run reversible_closeable.cpp : : : : views_reversible_closeable ]
+ ;
diff --git a/src/boost/libs/geometry/test/views/box_view.cpp b/src/boost/libs/geometry/test/views/box_view.cpp
new file mode 100644
index 000000000..ef511fefa
--- /dev/null
+++ b/src/boost/libs/geometry/test/views/box_view.cpp
@@ -0,0 +1,81 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/views/box_view.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+
+template <typename Box, bool Reverse>
+void test_geometry(std::string const& wkt, std::string const& expected,
+ bg::order_selector expected_order)
+{
+
+ Box box;
+ bg::read_wkt(wkt, box);
+
+ typedef bg::box_view<Box, Reverse> view_type;
+ view_type range(box);
+
+ {
+ std::ostringstream out;
+ for (typename boost::range_iterator<view_type>::type it = boost::begin(range);
+ it != boost::end(range); ++it)
+ {
+ out << " " << bg::get<0>(*it) << bg::get<1>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), expected);
+ }
+
+ {
+ // Check forward/backward behaviour
+ typename boost::range_iterator<view_type>::type it = boost::begin(range);
+ it++;
+ it--;
+ // Not verified further, same as segment
+ }
+
+ {
+ // Check random access behaviour
+ int const n = boost::size(range);
+ BOOST_CHECK_EQUAL(n, 5);
+ }
+
+ // Check Boost.Range concept
+ BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<view_type>) );
+
+ // Check order
+ bg::order_selector order = bg::point_order<view_type>::value;
+ BOOST_CHECK_EQUAL(order, expected_order);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::box<P>, true> ("polygon((1 1,2 2))", " 11 12 22 21 11", bg::clockwise);
+ test_geometry<bg::model::box<P>, false>("polygon((1 1,2 2))", " 11 21 22 12 11", bg::counterclockwise);
+ test_geometry<bg::model::box<P>, true> ("polygon((3 3,5 5))", " 33 35 55 53 33", bg::clockwise);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/views/closeable_view.cpp b/src/boost/libs/geometry/test/views/closeable_view.cpp
new file mode 100644
index 000000000..3cbabbf95
--- /dev/null
+++ b/src/boost/libs/geometry/test/views/closeable_view.cpp
@@ -0,0 +1,134 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/views/closeable_view.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+
+// The closeable view should also work on normal std:: containers
+void test_non_geometry()
+{
+ typedef bg::closeable_view
+ <
+ std::vector<int> const, bg::open
+ >::type view_type;
+
+ std::vector<int> v;
+ v.push_back(1);
+ v.push_back(2);
+ v.push_back(3);
+
+ view_type view(v);
+
+ typedef boost::range_iterator<view_type const>::type iterator;
+ iterator it = boost::begin(view);
+ iterator end = boost::end(view);
+
+ std::ostringstream out;
+ for ( ; it != end; ++it)
+ {
+ out << *it;
+ }
+ BOOST_CHECK_EQUAL(out.str(), "1231");
+
+ // Check operators =, ++, --, +=, -=
+ it = boost::begin(view);
+ BOOST_CHECK_EQUAL(*it, 1);
+ it += 2;
+ BOOST_CHECK_EQUAL(*it, 3);
+ it -= 2;
+ BOOST_CHECK_EQUAL(*it, 1);
+ it++;
+ BOOST_CHECK_EQUAL(*it, 2);
+ it--;
+ BOOST_CHECK_EQUAL(*it, 1);
+
+ // Also check them in the last regions
+ it = boost::begin(view) + 3;
+ BOOST_CHECK_EQUAL(*it, 1);
+ it--;
+ BOOST_CHECK_EQUAL(*it, 3);
+ it++;
+ BOOST_CHECK_EQUAL(*it, 1);
+ it -= 2;
+ BOOST_CHECK_EQUAL(*it, 2);
+ it += 2;
+ BOOST_CHECK_EQUAL(*it, 1);
+
+ BOOST_CHECK_EQUAL(boost::size(view), 4u);
+}
+
+
+template <bg::closure_selector Closure, typename Range>
+void test_optionally_closing(Range const& range, std::string const& expected)
+{
+ typedef typename bg::closeable_view<Range const, Closure>::type view_type;
+ typedef typename boost::range_iterator<view_type const>::type iterator;
+
+ view_type view(range);
+
+ bool first = true;
+ std::ostringstream out;
+ iterator end = boost::end(view);
+ for (iterator it = boost::begin(view); it != end; ++it, first = false)
+ {
+ out << (first ? "" : " ") << bg::dsv(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ std::string const& expected_false,
+ std::string const& expected_true)
+{
+ Geometry geo;
+ bg::read_wkt(wkt, geo);
+
+ test_optionally_closing<bg::closed>(geo, expected_false);
+ test_optionally_closing<bg::open>(geo, expected_true);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::ring<P> >(
+ "POLYGON((1 1,1 4,4 4,4 1))",
+ "(1, 1) (1, 4) (4, 4) (4, 1)",
+ "(1, 1) (1, 4) (4, 4) (4, 1) (1, 1)");
+}
+
+
+int test_main(int, char* [])
+{
+ test_non_geometry();
+
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<boost::tuple<double, double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/views/reversible_closeable.cpp b/src/boost/libs/geometry/test/views/reversible_closeable.cpp
new file mode 100644
index 000000000..fcdfbc8a5
--- /dev/null
+++ b/src/boost/libs/geometry/test/views/reversible_closeable.cpp
@@ -0,0 +1,165 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/views/closeable_view.hpp>
+#include <boost/geometry/views/reversible_view.hpp>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <typename View>
+void test_option(View const& view, std::string const& expected)
+{
+
+ bool first = true;
+ std::ostringstream out;
+
+ typedef typename boost::range_iterator<View const>::type iterator;
+
+ iterator end = boost::end(view);
+ for (iterator it = boost::begin(view); it != end; ++it, first = false)
+ {
+ out << (first ? "" : " ") << bg::dsv(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+template <bg::closure_selector Closure, bg::iterate_direction Direction, typename Range>
+void test_close_reverse(Range const& range, std::string const& expected)
+{
+ typedef typename bg::reversible_view<Range const, Direction>::type rview;
+ typedef typename bg::closeable_view<rview const, Closure>::type cview;
+
+ rview view1(range);
+ cview view2(view1);
+
+ test_option(view2, expected);
+}
+
+
+template <bg::iterate_direction Direction, bg::closure_selector Closure, typename Range>
+void test_reverse_close(Range const& range, std::string const& expected)
+{
+ typedef typename bg::closeable_view<Range const, Closure>::type cview;
+ typedef typename bg::reversible_view<cview const, Direction>::type rview;
+
+ cview view1(range);
+ rview view2(view1);
+ test_option(view2, expected);
+}
+
+
+template
+<
+ bg::iterate_direction Direction1,
+ bg::iterate_direction Direction2,
+ typename Range
+>
+void test_reverse_reverse(Range const& range, std::string const& expected)
+{
+ typedef typename bg::reversible_view<Range const, Direction1>::type rview1;
+ typedef typename bg::reversible_view<rview1 const, Direction2>::type rview2;
+
+ rview1 view1(range);
+ rview2 view2(view1);
+ test_option(view2, expected);
+}
+
+template
+<
+ bg::closure_selector Closure1,
+ bg::closure_selector Closure2,
+ typename Range
+>
+void test_close_close(Range const& range, std::string const& expected)
+{
+ typedef typename bg::closeable_view<Range const, Closure1>::type cview1;
+ typedef typename bg::closeable_view<cview1 const, Closure2>::type cview2;
+
+ cview1 view1(range);
+ cview2 view2(view1);
+ test_option(view2, expected);
+}
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ std::string const& expected_n,
+ std::string const& expected_r,
+ std::string const& closing,
+ std::string const& rclosing
+ )
+{
+ std::string expected;
+ Geometry geo;
+ bg::read_wkt(wkt, geo);
+
+ test_close_reverse<bg::closed, bg::iterate_forward>(geo, expected_n);
+ test_close_reverse<bg::open, bg::iterate_forward>(geo, expected_n + closing);
+ test_close_reverse<bg::closed, bg::iterate_reverse>(geo, expected_r);
+
+ // 13-12-2010, this case was problematic in MSVC
+ // SOLVED: caused by IMPLICIT constructor! It is now explicit and should be kept like that.
+ test_close_reverse<bg::open, bg::iterate_reverse>(geo, expected_r + rclosing);
+
+ test_reverse_close<bg::iterate_forward, bg::closed>(geo, expected_n);
+ test_reverse_close<bg::iterate_forward, bg::open>(geo, expected_n + closing);
+ test_reverse_close<bg::iterate_reverse, bg::closed>(geo, expected_r);
+
+ // first closed, then reversed:
+ expected = boost::trim_copy(closing + " " + expected_r);
+ test_reverse_close<bg::iterate_reverse, bg::open>(geo, expected);
+
+ test_reverse_reverse<bg::iterate_forward, bg::iterate_forward>(geo, expected_n);
+ test_reverse_reverse<bg::iterate_reverse, bg::iterate_reverse>(geo, expected_n);
+ test_reverse_reverse<bg::iterate_forward, bg::iterate_reverse>(geo, expected_r);
+ test_reverse_reverse<bg::iterate_reverse, bg::iterate_forward>(geo, expected_r);
+
+ test_close_close<bg::closed, bg::closed>(geo, expected_n);
+ test_close_close<bg::open, bg::closed>(geo, expected_n + closing);
+ test_close_close<bg::closed, bg::open>(geo, expected_n + closing);
+ test_close_close<bg::open, bg::open>(geo, expected_n + closing + closing);
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::ring<P> >(
+ "POLYGON((1 1,1 4,4 4,4 1))",
+ "(1, 1) (1, 4) (4, 4) (4, 1)",
+ "(4, 1) (4, 4) (1, 4) (1, 1)",
+ " (1, 1)", // closing
+ " (4, 1)" // rclosing
+ );
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<boost::tuple<double, double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/views/reversible_view.cpp b/src/boost/libs/geometry/test/views/reversible_view.cpp
new file mode 100644
index 000000000..1e4d53e92
--- /dev/null
+++ b/src/boost/libs/geometry/test/views/reversible_view.cpp
@@ -0,0 +1,81 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/views/reversible_view.hpp>
+
+#include <boost/geometry/io/wkt/wkt.hpp>
+#include <boost/geometry/io/dsv/write.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
+
+BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
+
+
+template <bg::iterate_direction Direction, typename Range>
+void test_forward_or_reverse(Range const& range, std::string const& expected)
+{
+ typedef typename bg::reversible_view
+ <
+ Range const,
+ Direction
+ >::type view_type;
+
+ view_type view(range);
+
+ bool first = true;
+ std::ostringstream out;
+ for (typename boost::range_iterator<view_type const>::type
+ it = boost::begin(view);
+ it != boost::end(view);
+ ++it, first = false)
+ {
+ out << (first ? "" : " ") << bg::dsv(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), expected);
+}
+
+
+
+template <typename Geometry>
+void test_geometry(std::string const& wkt,
+ std::string const& expected_forward, std::string const& expected_reverse)
+{
+ Geometry geo;
+ bg::read_wkt(wkt, geo);
+
+ test_forward_or_reverse<bg::iterate_forward>(geo, expected_forward);
+ test_forward_or_reverse<bg::iterate_reverse>(geo, expected_reverse);
+}
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::linestring<P> >(
+ "linestring(1 1,2 2,3 3)",
+ "(1, 1) (2, 2) (3, 3)",
+ "(3, 3) (2, 2) (1, 1)");
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<bg::model::d2::point_xy<double> >();
+ test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
+ test_all<boost::tuple<double, double> >();
+
+ return 0;
+}
diff --git a/src/boost/libs/geometry/test/views/segment_view.cpp b/src/boost/libs/geometry/test/views/segment_view.cpp
new file mode 100644
index 000000000..8de5319c9
--- /dev/null
+++ b/src/boost/libs/geometry/test/views/segment_view.cpp
@@ -0,0 +1,86 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/views/segment_view.hpp>
+#include <boost/geometry/io/wkt/read.hpp>
+
+
+
+template <typename Segment>
+void test_geometry(std::string const& wkt, std::string const& expected)
+{
+
+ Segment segment;
+ bg::read_wkt(wkt, segment);
+
+ typedef bg::segment_view<Segment> range_type;
+ range_type range(segment);
+
+ {
+ std::ostringstream out;
+ for (typename boost::range_iterator<range_type>::type it = boost::begin(range);
+ it != boost::end(range); ++it)
+ {
+ out << " " << bg::get<0>(*it) << bg::get<1>(*it);
+ }
+ BOOST_CHECK_EQUAL(out.str(), expected);
+ }
+
+ {
+ // Check forward/backward behaviour
+ std::ostringstream out;
+ typename boost::range_iterator<range_type>::type it = boost::begin(range);
+ it++;
+ it--;
+ out << " " << bg::get<0>(*it) << bg::get<1>(*it);
+ typename boost::range_iterator<range_type>::type it2 = boost::end(range);
+ it2--;
+ out << " " << bg::get<0>(*it2) << bg::get<1>(*it2);
+ BOOST_CHECK_EQUAL(out.str(), expected);
+ }
+
+ {
+ // Check random access behaviour
+ int const n = boost::size(range);
+ BOOST_CHECK_EQUAL(n, 2);
+ }
+
+ // Check Boost.Range concept
+ BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<range_type>) );
+
+}
+
+
+template <typename P>
+void test_all()
+{
+ test_geometry<bg::model::segment<P> >("linestring(1 1,2 2)", " 11 22");
+ test_geometry<bg::model::segment<P> >("linestring(4 4,3 3)", " 44 33");
+}
+
+
+int test_main(int, char* [])
+{
+ std::vector<int> a;
+ a.push_back(1);
+ boost::range_iterator<std::vector<int> const>::type it = a.end();
+ --it;
+ std::cout << *it << std::endl;
+ test_all<bg::model::d2::point_xy<double> >();
+ return 0;
+}