mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
fix unit test
This commit is contained in:
parent
ec7d930980
commit
c87d7de8b9
@ -1,3 +1,5 @@
|
|||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <Functions/geometryConverters.h>
|
#include <Functions/geometryConverters.h>
|
||||||
|
|
||||||
#include <boost/geometry.hpp>
|
#include <boost/geometry.hpp>
|
||||||
@ -8,8 +10,6 @@ namespace bg = boost::geometry;
|
|||||||
|
|
||||||
TEST(Geometry, Area)
|
TEST(Geometry, Area)
|
||||||
{
|
{
|
||||||
size_t max = 0, min = 0;
|
|
||||||
|
|
||||||
bg::model::polygon<bg::model::point<float, 2, bg::cs::spherical_equatorial<bg::degree> > > sph_poly;
|
bg::model::polygon<bg::model::point<float, 2, bg::cs::spherical_equatorial<bg::degree> > > sph_poly;
|
||||||
bg::read_wkt("POLYGON ((33.905868 35.090882, 33.913619 35.090882, 33.921474 35.080702, 33.914446 35.073054, 33.908245 35.070729, 33.906524 35.069122, 33.906506 35.069105, 33.898116 35.061272, 33.880133 35.073054, 33.874655 35.067525, 33.867627 35.060497, 33.855122 35.053417, 33.841169 35.051092, 33.834865 35.056621, 33.827113 35.061272, 33.813781 35.055794, 33.804375 35.049541, 33.799001 35.038534, 33.822359 35.030059, 33.830214 35.023031, 33.829387 35.001176, 33.829387 35.001172, 33.840342 34.993369, 33.859049 34.991819, 33.859049 34.974662, 33.850471 34.973009, 33.838068 34.963707, 33.84582 34.959728, 33.864423 34.962983, 33.891841 34.958139, 33.8838 34.949123, 33.874522 34.94123, 33.862315 34.937893, 33.847423 34.94245, 33.819672 34.964748, 33.80421 34.972602, 33.781896 34.976212, 33.784945 34.976212, 33.788046 34.976988, 33.7928 34.977763, 33.79435 34.977763, 33.791146 34.982414, 33.786495 34.984687, 33.782568 34.984687, 33.777917 34.984687, 33.77399 34.988666, 33.766135 34.990268, 33.761484 34.990268, 33.75921 34.988666, 33.765411 34.985566, 33.769339 34.983964, 33.770889 34.980088, 33.77554 34.980088, 33.780191 34.979313, 33.780986 34.976338, 33.780935 34.976345, 33.760427 34.979682, 33.717296 34.977769, 33.70152 34.97289, 33.702935 34.987943, 33.711461 34.985566, 33.71544 34.997296, 33.699731 35.002722, 33.69663 35.008975, 33.705312 35.015228, 33.702211 35.022256, 33.685003 35.029284, 33.679444 35.033891, 33.679435 35.033899, 33.675649 35.037036, 33.674099 35.046441, 33.678853 35.055794, 33.69446 35.058171, 33.705312 35.06675, 33.714717 35.06675, 33.719368 35.06277, 33.711461 35.040963, 33.707585 35.029284, 33.718489 35.032385, 33.739677 35.047216, 33.766135 35.03161, 33.77554 35.040188, 33.786495 35.038534, 33.79435 35.040188, 33.798278 35.052642, 33.824012 35.06675, 33.834865 35.063597, 33.842719 35.056621, 33.853571 35.058171, 33.866904 35.06675, 33.871555 35.073054, 33.876929 35.076826, 33.871555 35.085456, 33.871555 35.100236, 33.876206 35.118994, 33.889435 35.118994, 33.891812 35.110468, 33.89884 35.108814, 33.903594 35.099512, 33.905868 35.09636, 33.905868 35.090882), (33.742792 35.001233, 33.746689 35.002711, 33.752063 35.004323, 33.752063 35.0144, 33.746151 35.015207, 33.741314 35.013729, 33.740239 35.010101, 33.738761 35.005264, 33.739702 35.002576, 33.742792 35.001233))", sph_poly);
|
bg::read_wkt("POLYGON ((33.905868 35.090882, 33.913619 35.090882, 33.921474 35.080702, 33.914446 35.073054, 33.908245 35.070729, 33.906524 35.069122, 33.906506 35.069105, 33.898116 35.061272, 33.880133 35.073054, 33.874655 35.067525, 33.867627 35.060497, 33.855122 35.053417, 33.841169 35.051092, 33.834865 35.056621, 33.827113 35.061272, 33.813781 35.055794, 33.804375 35.049541, 33.799001 35.038534, 33.822359 35.030059, 33.830214 35.023031, 33.829387 35.001176, 33.829387 35.001172, 33.840342 34.993369, 33.859049 34.991819, 33.859049 34.974662, 33.850471 34.973009, 33.838068 34.963707, 33.84582 34.959728, 33.864423 34.962983, 33.891841 34.958139, 33.8838 34.949123, 33.874522 34.94123, 33.862315 34.937893, 33.847423 34.94245, 33.819672 34.964748, 33.80421 34.972602, 33.781896 34.976212, 33.784945 34.976212, 33.788046 34.976988, 33.7928 34.977763, 33.79435 34.977763, 33.791146 34.982414, 33.786495 34.984687, 33.782568 34.984687, 33.777917 34.984687, 33.77399 34.988666, 33.766135 34.990268, 33.761484 34.990268, 33.75921 34.988666, 33.765411 34.985566, 33.769339 34.983964, 33.770889 34.980088, 33.77554 34.980088, 33.780191 34.979313, 33.780986 34.976338, 33.780935 34.976345, 33.760427 34.979682, 33.717296 34.977769, 33.70152 34.97289, 33.702935 34.987943, 33.711461 34.985566, 33.71544 34.997296, 33.699731 35.002722, 33.69663 35.008975, 33.705312 35.015228, 33.702211 35.022256, 33.685003 35.029284, 33.679444 35.033891, 33.679435 35.033899, 33.675649 35.037036, 33.674099 35.046441, 33.678853 35.055794, 33.69446 35.058171, 33.705312 35.06675, 33.714717 35.06675, 33.719368 35.06277, 33.711461 35.040963, 33.707585 35.029284, 33.718489 35.032385, 33.739677 35.047216, 33.766135 35.03161, 33.77554 35.040188, 33.786495 35.038534, 33.79435 35.040188, 33.798278 35.052642, 33.824012 35.06675, 33.834865 35.063597, 33.842719 35.056621, 33.853571 35.058171, 33.866904 35.06675, 33.871555 35.073054, 33.876929 35.076826, 33.871555 35.085456, 33.871555 35.100236, 33.876206 35.118994, 33.889435 35.118994, 33.891812 35.110468, 33.89884 35.108814, 33.903594 35.099512, 33.905868 35.09636, 33.905868 35.090882), (33.742792 35.001233, 33.746689 35.002711, 33.752063 35.004323, 33.752063 35.0144, 33.746151 35.015207, 33.741314 35.013729, 33.740239 35.010101, 33.738761 35.005264, 33.739702 35.002576, 33.742792 35.001233))", sph_poly);
|
||||||
auto area = bg::area(sph_poly);
|
auto area = bg::area(sph_poly);
|
||||||
|
Loading…
Reference in New Issue
Block a user