1#ifndef SQL_GIS_RTREE_SUPPORT_H_INCLUDED
2#define SQL_GIS_RTREE_SUPPORT_H_INCLUDED
36class Spatial_reference_system;
150 const double *b,
int n_dim);
166 const double *b,
int n_dim);
223 const uchar *mbr_a,
const uchar *mbr_b,
int mbr_len,
Definition: spatial_reference_system.h:53
bool store(THD *thd, const Table *tp)
Stores the SDI for a table.
Definition: sdi.cc:607
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
std::uint32_t srid_t
A spatial reference system ID (SRID).
Definition: srid.h:33
double rtree_area_increase(const dd::Spatial_reference_system *srs, const uchar *mbr_a, const uchar *mbr_b, int mbr_len, double *ab_area)
Computes the extra area covered if an MBR is expanded to cover another MBR.
Definition: rtree_support.cc:421
struct rtr_mbr rtr_mbr_t
In memory representation of a minimum bounding rectangle.
bool mbr_disjoint_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a, rtr_mbr_t *b)
Checks if two MBRs are disjoint.
Definition: rtree_support.cc:178
double mbr_join_area(const dd::Spatial_reference_system *srs, const double *a, const double *b, int n_dim)
Computes the combined area of two MBRs.
Definition: rtree_support.cc:294
bool mbr_equal_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a, rtr_mbr_t *b)
Checks if two MBRs are equal.
Definition: rtree_support.cc:109
int get_mbr_from_store(const dd::Spatial_reference_system *srs, const uchar *store, uint size, uint n_dims, double *mbr, gis::srid_t *srid)
Computes the MBR of a geometry.
Definition: rtree_support.cc:354
double rtree_area_overlapping(const dd::Spatial_reference_system *srs, const uchar *mbr_a, const uchar *mbr_b, int mbr_len)
Calculates the overlapping area between two MBRs.
Definition: rtree_support.cc:475
bool mbr_contain_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a, rtr_mbr_t *b)
Checks if one MBR covers another MBR.
Definition: rtree_support.cc:73
bool mbr_within_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a, rtr_mbr_t *b)
Checks if one MBR is covered by another MBR.
Definition: rtree_support.cc:209
bool mbr_intersect_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a, rtr_mbr_t *b)
Checks if two MBRs intersect each other.
Definition: rtree_support.cc:147
double compute_area(const dd::Spatial_reference_system *srs, const double *a, int n_dim)
Computes the area of an MBR.
Definition: rtree_support.cc:328
void mbr_join(const dd::Spatial_reference_system *srs, double *a, const double *b, int n_dim)
Expands an MBR to also cover another MBR.
Definition: rtree_support.cc:260
dd::Spatial_reference_system * fetch_srs(gis::srid_t srid)
Fetches a copy of the dictionary entry for a spatial reference system.
Definition: rtree_support.cc:60
In memory representation of a minimum bounding rectangle.
Definition: rtree_support.h:40
double xmin
minimum on x
Definition: rtree_support.h:42
double xmax
maximum on x
Definition: rtree_support.h:44
double ymin
minimum on y
Definition: rtree_support.h:46
double ymax
maximum on y
Definition: rtree_support.h:48
unsigned int uint
Definition: uca9-dump.cc:75