ClickHouse/tests/queries/0_stateless/01302_polygons_distance.sql

9 lines
719 B
MySQL
Raw Normal View History

2021-02-15 19:22:13 +00:00
select polygonsDistanceCartesian([[[(0, 0),(0, 3),(1, 2.9),(2, 2.6),(2.6, 2),(2.9, 1),(3, 0),(0, 0)]]], [[[(1., 1.),(1., 4.),(4., 4.),(4., 1.),(1., 1.)]]]);
select polygonsDistanceCartesian([[[(0, 0), (0, 0.1), (0.1, 0.1), (0.1, 0)]]], [[[(1., 1.),(1., 4.),(4., 4.),(4., 1.),(1., 1.)]]]);
2021-01-18 23:51:34 +00:00
select polygonsDistanceGeographic([[[(23.725750, 37.971536)]]], [[[(4.3826169, 50.8119483)]]]);
2021-01-19 14:52:53 +00:00
drop table if exists polygon_01302;
2021-01-18 23:51:34 +00:00
create table polygon_01302 (x Array(Array(Array(Tuple(Float64, Float64)))), y Array(Array(Array(Tuple(Float64, Float64))))) engine=Memory();
insert into polygon_01302 values ([[[(23.725750, 37.971536)]]], [[[(4.3826169, 50.8119483)]]]);
2021-01-19 14:52:53 +00:00
select polygonsDistanceGeographic(x, y) from polygon_01302;