1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-13467: Feature request: Support for ST_Distance_Sphere()

- Cherry-pick 51e48b9f89 - vscode gitignore
- Thanks Robin Dupret for the review.

Reviewed by:daniel@mariadb.org
            holyfoot@mariadb.com
This commit is contained in:
Anel Husakovic
2020-10-29 01:40:31 +01:00
parent 48141f3c17
commit 6769d1a078
14 changed files with 598 additions and 39 deletions

View File

@ -332,6 +332,11 @@ public:
m_data+= WKB_HEADER_SIZE;
}
const char *get_data_ptr() const
{
return m_data;
}
bool envelope(String *result) const;
static Class_info *ci_collection[wkb_last+1];
@ -410,6 +415,17 @@ public:
return 0;
}
int get_xy_radian(double *x, double *y) const
{
if (!get_xy(x, y))
{
*x= (*x)*M_PI/180;
*y= (*y)*M_PI/180;
return 0;
}
return 1;
}
int get_x(double *x) const
{
if (no_data(m_data, SIZEOF_STORED_DOUBLE))
@ -436,6 +452,10 @@ public:
}
int store_shapes(Gcalc_shape_transporter *trn) const;
const Class_info *get_class_info() const;
double calculate_haversine(const Geometry *g, const double sphere_radius,
int *error);
int spherical_distance_multipoints(Geometry *g, const double r, double *result,
int *error);
};
@ -535,6 +555,8 @@ public:
}
int store_shapes(Gcalc_shape_transporter *trn) const;
const Class_info *get_class_info() const;
int spherical_distance_multipoints(Geometry *g, const double r, double *res,
int *error);
};