23#ifndef SPATIAL_INCLUDED
24#define SPATIAL_INCLUDED
66 point_xy(
double x_arg,
double y_arg) :
x(x_arg),
y(y_arg) {}
90 MBR(
const double xmin_arg,
const double ymin_arg,
const double xmax_arg,
91 const double ymax_arg)
105 void add_xy(
const char *px,
const char *py) {
178 assert(d >= 0 && d <= 2);
205 if (
p ==
nullptr)
return;
206 char *cp =
static_cast<char *
>(
p);
370 uint32 extra_point_space = 0)
const {
402 if (
no_data(nbytes))
return true;
430 uint32 extra_point_space = 0) {
475 String *wkb [[maybe_unused]]) {
482 const char *wkb [[maybe_unused]],
483 uint len [[maybe_unused]],
485 String *res [[maybe_unused]]) {
524 virtual int get_x(
double *)
const {
return -1; }
525 virtual int get_y(
double *)
const {
return -1; }
585 bool *long_out_of_range,
586 bool *lat_out_of_range,
587 double *out_of_range_value) = 0;
593 uint32 data_len,
bool has_srid =
true);
595 bool has_srid =
true) {
601 bool init_stream =
true,
602 bool check_trailing =
true);
608 if (wkt->
reserve(len + 2, 512))
return true;
610 wkt->
append(
"GEOMETRYCOLLECTION");
625 m_ptr =
const_cast<void *
>(data);
630 m_ptr =
const_cast<void *
>(
static_cast<const void *
>(c->
data()));
679 assert(0xfff >=
flag);
699 uint32 offset,
bool bracket_pt =
false)
const;
761 "Flags are expected to line up exactly with an uint64.");
781 m_ptr =
const_cast<void *
>(ptr);
811 assert(dim > 0 && dim < 5);
1066 const char *
p =
static_cast<const char *
>(p0);
1073 char *
p =
static_cast<char *
>(p0);
1084 const char *
p =
static_cast<const char *
>(p0);
1096 char *
p =
static_cast<char *
>(p0);
1105 char *
p =
static_cast<char *
>(p0);
1113 char *
p =
static_cast<char *
>(p0);
1121 char *
p =
static_cast<char *
>(p0);
1171 bool get_mbr(
MBR *mbr, wkb_parser *wkb)
const override;
1189 bool *long_out_of_range,
1190 bool *lat_out_of_range,
1191 double *out_of_range_value)
override;
1222 void set_ptr(
void *ptr,
size_t len);
1227 template <std::
size_t K>
1230 ((
m_ptr !=
nullptr &&
1242 if (
m_ptr ==
nullptr)
return 0;
1252 template <std::
size_t K>
1253 void set(
double const &value) {
1259 if (
m_ptr ==
nullptr) {
1261 if (
m_ptr ==
nullptr) {
1275 bool x = get<0>(), px = pt.
get<0>();
1276 return x == px ? get<1>() < pt.
get<1>() : x < px;
1280 return (get<0>() == pt.
get<0>() && get<1>() == pt.
get<1>());
1288template <
typename T>
1314template <
typename T>
1394 bool operator!=(
const self &itr)
const {
return !(*
this == itr); }
1598 assert(itr.m_owner !=
NULL && itr.m_curidx >= 0 &&
1599 itr.m_curidx <
static_cast<index_type>(itr.m_owner->size()));
1600 return (*
m_owner)[itr.m_curidx];
1620 itr.m_curidx = newidx;
1670 :
base(idx, owner) {}
1694 this->
move_by(*
this, 1,
false);
1703 this->
move_by(*
this, 1,
false);
1712 this->
move_by(*
this, 1,
true);
1721 this->
move_by(*
this, 1,
true);
1757 this->
move_by(*
this, n,
false);
1782 this->
move_by(*
this, n,
true);
1840 this->
move_by(itr, offset,
false);
1841 assert(itr.m_owner !=
NULL && itr.m_curidx >= 0 &&
1842 itr.m_curidx <
static_cast<index_type>(this->m_owner->size()));
1843 return (*this->
m_owner)[itr.m_curidx];
1854template <
typename T>
1864template <
typename T>
1884template <
typename T>
1900template <
typename T>
1984 return *((
const T *)
p);
2001 const Geometry *
p = &((*m_geo_vect)[i]);
2002 return *((
const T *)
p);
2072 void set_ptr(
void *ptr,
size_t len);
2112 int is_closed(
int *closed)
const override;
2121 bool *long_out_of_range,
2122 bool *lat_out_of_range,
2123 double *out_of_range_value)
override;
2159 :
base(wkb, nbytes,
flags, srid, true) {
2201 bool *long_out_of_range,
2202 bool *lat_out_of_range,
2203 double *out_of_range_value)
override;
2255 void set_ptr(
void *ptr,
size_t len);
2308 bool *long_out_of_range,
2309 bool *lat_out_of_range,
2310 double *out_of_range_value)
override;
2343 int is_closed(
int *closed)
const override;
2348 bool *long_out_of_range,
2349 bool *lat_out_of_range,
2350 double *out_of_range_value)
override;
2386 bool *long_out_of_range,
2387 bool *lat_out_of_range,
2388 double *out_of_range_value)
override;
2400 :
base(ptr, nbytes,
flags, srid, true) {
2429 bool get_mbr(
MBR *mbr, wkb_parser *wkb)
const override;
2439 bool *long_out_of_range,
2440 bool *lat_out_of_range,
2441 double *out_of_range_value)
override;
2471 uint32 len,
bool has_hdr) = 0;
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:570
Definition: spatial.h:459
Class_info(const char *name, int type_id, create_geom_t create_func)
Definition: spatial.cc:196
const LEX_CSTRING m_name
Definition: spatial.h:461
int m_type_id
Definition: spatial.h:462
create_geom_t m_create_func
Definition: spatial.h:463
Highest byte is stores byte order, dimension, nomem and geotype as follows: bo: byte order,...
Definition: spatial.h:738
uint64 nomem
Definition: spatial.h:753
uint64 zm
Definition: spatial.h:757
uint64 dim
Definition: spatial.h:752
uint64 bo
Definition: spatial.h:751
uint64 nbytes
Definition: spatial.h:755
uint64 props
Definition: spatial.h:756
uint64 unused
Definition: spatial.h:758
Flags_t(wkbType type, size_t len)
Definition: spatial.h:742
Flags_t()
Definition: spatial.h:740
uint64 geotype
Definition: spatial.h:754
Constant storage for WKB.
Definition: spatial.h:330
const char * m_data_end
Definition: spatial.h:333
uint32 length() const
Definition: spatial.h:346
wkb_container(const char *data, const char *data_end)
Definition: spatial.h:337
bool no_data(size_t data_amount) const
Check if there's enough data remaining as requested.
Definition: spatial.h:354
void set(const char *data, const char *data_end)
Definition: spatial.h:340
const char * m_data
Definition: spatial.h:332
const char * data() const
Definition: spatial.h:344
bool not_enough_points(uint32 expected_points, uint32 extra_point_space=0) const
Check if there're enough points remaining as requested.
Definition: spatial.h:369
const char * data_end() const
Definition: spatial.h:345
WKB parser, designed to traverse through WKB data from beginning of the buffer towards the end using ...
Definition: spatial.h:383
bool scan_wkb_header(wkb_header *header)
Definition: spatial.h:410
bool scan_non_zero_uint4(uint32 *number)
Definition: spatial.h:426
bool skip(size_t nbytes)
Definition: spatial.h:401
bool scan_n_points_and_check_data(uint32 *n_points, uint32 extra_point_space=0)
Definition: spatial.h:429
bool skip_coord()
Definition: spatial.h:407
wkb_parser(const char *data, const char *data_end)
Definition: spatial.h:393
void get_float8(double *x)
Definition: spatial.h:388
void scan_xy_unsafe(point_xy *p)
Definition: spatial.h:436
bool skip_wkb_header()
Definition: spatial.h:406
bool scan_xy(point_xy *p)
Definition: spatial.h:443
void skip_unsafe(size_t nbytes)
Definition: spatial.h:397
bool scan_coord(double *x)
Definition: spatial.h:448
bool scan_uint4(uint32 *number)
Definition: spatial.h:420
void get_uint4(uint32 *number)
Definition: spatial.h:385
Geometry vector class.
Definition: spatial.h:1885
Inplace_vector< T > base
Definition: spatial.h:1886
Geometry_vector()
Definition: spatial.h:1889
Definition: spatial.h:212
virtual bool get_data_as_wkt(String *txt, wkb_parser *wkb) const
Definition: spatial.h:489
static Geometry * create_from_wkb(THD *thd, Geometry_buffer *buffer, const char *wkb, uint32 len, String *res, bool init)
Read from 'wkb' (which contains WKB encoded in either endianness) the geometry data,...
Definition: spatial.cc:902
enum_coordinate_reference_system get_coordsys() const
Definition: spatial.h:518
void set_byte_order(Geometry::wkbByteOrder bo)
Definition: spatial.h:804
static String bad_geometry_data
Definition: spatial.h:321
bool polygon_is_wkb_form() const
In a polygon usable by boost geometry, the m_ptr points to the outer ring object, and m_inn_rings poi...
Definition: spatial.h:999
void set_ownmem(bool b)
Set whether this object has its own memory.
Definition: spatial.h:908
virtual uint32 get_data_size() const
Definition: spatial.h:471
Geometry(const void *ptr, size_t len, const Flags_t &flags, gis::srid_t srid)
Constructor used as BG adapter or by default constructors of children classes.
Definition: spatial.h:779
Geometry & operator=(const Geometry &rhs)
Assignment operator for Geometry class, assignment operators of children classes calls this to do gen...
Definition: spatial.cc:1169
enum_coordinate_reference_system
Definition: spatial.h:315
@ coord_first
Definition: spatial.h:316
@ coord_last
Definition: spatial.h:318
@ cartesian
Definition: spatial.h:317
bool as_wkt(String *wkt, wkb_parser *wkb) const
Definition: spatial.h:606
void * m_ptr
Pointer to the geometry's wkb data's 1st byte, right after its wkb header if any.
Definition: spatial.h:1049
char * get_cptr() const
Definition: spatial.h:796
static Class_info * ci_collection[wkb_last+1]
Definition: spatial.h:638
virtual bool init_from_wkt(Gis_read_stream *trs, String *wkb)
Definition: spatial.h:474
virtual void shallow_push(const Geometry *)
Definition: spatial.h:1028
bool is_components_no_overlapped() const
Definition: spatial.h:664
static bool is_valid_geotype(uint32 gtype)
Check if a given geometry type is a valid internal geometry type.
Definition: spatial.h:841
static Geometry * create_by_typeid(Geometry_buffer *buffer, int type_id)
Definition: spatial.cc:293
bool get_mbr_for_points(MBR *mbr, wkb_parser *wkb, uint offset) const
Get most bounding rectangle (mbr) for X points.
Definition: spatial.cc:1087
static Geometry * construct(Geometry_buffer *buffer, const String *str, bool has_srid=true)
Definition: spatial.h:594
wkbByteOrder
Definition: spatial.h:310
@ wkb_invalid
Definition: spatial.h:313
@ wkb_ndr
Definition: spatial.h:312
@ wkb_xdr
Definition: spatial.h:311
bool as_geometry(String *wkb, bool shallow_copy) const
Write this geometry's GEOMETRY byte string into specified buffer, the SRID will be written before the...
Definition: spatial.cc:482
Geometry * get_owner() const
Definition: spatial.h:800
Geometry *(* create_geom_t)(char *)
Callback which creates Geometry objects on top of a given placement.
Definition: spatial.h:457
bool has_out_of_line_components() const
If call Gis_wkb_vector<T>::resize() to add a component to X, the geometry may have a geometry not sto...
Definition: spatial.h:1016
Geometry()
Definition: spatial.h:763
virtual uint32 feature_dimension() const
Definition: spatial.h:519
void has_out_of_line_components(bool b)
Definition: spatial.h:1020
bool create_point(String *result, wkb_parser *wkb) const
Create a point from data.
Definition: spatial.cc:1035
char get_dimension() const
Definition: spatial.h:921
static const uint32 MAX_GEOM_WKB_LENGTH
Definition: spatial.h:272
virtual bool get_mbr(MBR *mbr, wkb_parser *wkb) const
Definition: spatial.h:496
virtual int start_point(String *) const
Definition: spatial.h:535
static const int MULTIPOLYGON_NO_OVERLAPPED_COMPS
Definition: spatial.h:268
virtual int end_point(String *) const
Definition: spatial.h:536
static bool is_valid_geotype(Geometry::wkbType gt)
Check if a given geometry type is a valid internal geometry type.
Definition: spatial.h:861
friend void parse_wkb_data(Geometry *geom, const char *p, size_t num_geoms)
Parse the wkb buffer to build the component vector m_geo_vect for geom.
Definition: spatial.cc:3801
gis::srid_t m_srid
Srid of this object.
Definition: spatial.h:1057
static bool is_valid_opengis_geotype(uint32 gtype)
Check if a given geometry type is a valid geometry type according to OpenGIS.
Definition: spatial.h:826
static Geometry * create_from_wkt(Geometry_buffer *buffer, Gis_read_stream *trs, String *wkt, bool init_stream=true, bool check_trailing=true)
Read wkt text from trs, and write little endian wkb encoding into 'wkt', and create a Geometry instan...
Definition: spatial.cc:395
uint16 get_props() const
Definition: spatial.h:683
void set_flags(const Flags_t &flags)
Definition: spatial.h:1062
bool as_wkt(String *wkt) const
Definition: spatial.h:616
static const int GEOM_LENGTH_VERIFIED
Definition: spatial.h:236
virtual int exterior_ring(String *) const
Definition: spatial.h:537
static Class_info * find_class(int type_id)
Definition: spatial.h:692
static const int POLYGON_INNER_RING
Definition: spatial.h:222
void set_length_verified(bool b) const
Definition: spatial.h:707
virtual int num_points(uint32 *) const
Definition: spatial.h:531
virtual bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value)=0
Check that the coordinates of a geometry is within the valid range.
virtual int point_n(uint32 num, String *result) const
Definition: spatial.h:541
virtual int get_x(double *) const
Definition: spatial.h:524
void set_owner(Geometry *o)
Definition: spatial.h:802
Geometry * m_owner
The topmost (root) geometry object, whose m_ptr is the 1st byte of a wkb memory buffer.
Definition: spatial.h:1039
virtual int copy_points(String *) const
Definition: spatial.h:533
wkbType
Definition: spatial.h:289
@ wkb_multipolygon
Definition: spatial.h:297
@ wkb_multilinestring
Definition: spatial.h:296
@ wkb_point
Definition: spatial.h:292
@ wkb_polygon
Definition: spatial.h:294
@ wkb_invalid_type
Definition: spatial.h:290
@ wkb_geometrycollection
Definition: spatial.h:298
@ wkb_last
Definition: spatial.h:308
@ wkb_linestring
Definition: spatial.h:293
@ wkb_multipoint
Definition: spatial.h:295
@ wkb_polygon_inner_rings
Definition: spatial.h:307
@ wkb_first
Definition: spatial.h:291
bool envelope(String *result) const
Definition: spatial.cc:957
bool has_geom_header_space() const
Definition: spatial.h:652
bool dimension(uint32 *dim) const
Definition: spatial.h:511
static const int HAS_GEOM_HEADER_SPACE
Definition: spatial.h:259
virtual int num_geometries(uint32 *) const
Definition: spatial.h:532
virtual int num_interior_ring(uint32 *) const
Definition: spatial.h:528
virtual int interior_ring_n(uint32 num, String *result) const
Definition: spatial.h:545
bool is_polygon_ring() const
Definition: spatial.h:640
bool is_polygon_inner_ring() const
Definition: spatial.h:648
void set_srid(gis::srid_t id)
Definition: spatial.h:685
void set_ptr(const void *ptr)
Definition: spatial.h:951
Flags_t get_flags() const
Definition: spatial.h:1060
bool get_mbr(MBR *mbr)
Definition: spatial.h:500
void set_props(uint16 flag)
Definition: spatial.h:678
virtual uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res)
Definition: spatial.h:481
void set_dimension(char dim)
Definition: spatial.h:809
virtual bool reverse_coordinates()=0
Reverses the coordinates of a geometry.
uint32 get_ogc_geotype() const
Build an OGC standard type value from m_flags.zm and m_flags.geotype.
Definition: spatial.h:943
wkbType get_type() const
Definition: spatial.h:515
void * get_ptr() const
Definition: spatial.h:794
void polygon_is_wkb_form(bool b)
Definition: spatial.h:1003
static const int POLYGON_OUTER_RING
Definition: spatial.h:221
gis::srid_t get_srid() const
Definition: spatial.h:687
virtual int geometry_n(uint32 num, String *result) const
Definition: spatial.h:549
bool get_ownmem() const
Returns whether this object has its own memory.
Definition: spatial.h:914
void set_bg_adapter(bool b) const
Set whether this object is a BG adapter.
Definition: spatial.h:969
Geometry::wkbByteOrder get_byte_order() const
Definition: spatial.h:916
Flags_t m_flags
Flags and meta information about this object.
Definition: spatial.h:1054
uchar * get_ucptr() const
Definition: spatial.h:798
virtual const Class_info * get_class_info() const
Definition: spatial.h:469
void has_geom_header_space(bool b)
Definition: spatial.h:657
bool is_polygon_outer_ring() const
Definition: spatial.h:644
static const int HAS_OUT_OF_LINE_COMPONENTS
Definition: spatial.h:242
virtual ~Geometry()
Definition: spatial.cc:1120
void append_points(String *txt, uint32 n_points, wkb_parser *wkb, uint32 offset, bool bracket_pt=false) const
Append N points from packed format to text Before calling this function, caller must have already che...
Definition: spatial.cc:1059
virtual int get_y(double *) const
Definition: spatial.h:525
void set_geotype(Geometry::wkbType gt)
Definition: spatial.h:889
bool is_bg_adapter() const
Whether the Geometry object is created to be used by Boost Geometry or only by MySQL.
Definition: spatial.h:959
const void * normalize_ring_order()
In place normalize polygons' rings, making outer ring CCW and inner rings CW by reversing the ring's ...
Definition: spatial.cc:4075
void set_data_ptr(const wkb_container *c)
Definition: spatial.h:629
virtual int is_closed(int *) const
Definition: spatial.h:527
Geometry::wkbType get_geotype() const
Definition: spatial.h:923
void set_components_no_overlapped(bool b)
Definition: spatial.h:668
virtual void donate_data()
Definition: spatial.h:981
static bool is_well_formed(const char *from, size_t length, wkbType type, wkbByteOrder bo)
Verify that a string is a well-formed GEOMETRY string.
Definition: spatial.cc:714
virtual int geom_length(double *) const
Definition: spatial.h:526
virtual bool dimension(uint32 *dim, wkb_parser *wkb) const
Definition: spatial.h:504
void set_nbytes(size_t n) const
Definition: spatial.h:895
bool as_wkb(String *wkb, bool shallow_copy) const
Write this geometry's WKB byte string into specified buffer, the SRID is not written into the buffer.
Definition: spatial.cc:434
void set_data_ptr(const void *data, size_t data_len)
Definition: spatial.h:624
void * get_data_ptr() const
Definition: spatial.h:633
static const int POLYGON_IN_WKB_FORM
Definition: spatial.h:249
static Geometry * construct(Geometry_buffer *buffer, const char *data, uint32 data_len, bool has_srid=true)
Construct a Geometry object using GEOMETRY byte string.
Definition: spatial.cc:320
bool is_length_verified() const
Definition: spatial.h:702
size_t get_nbytes() const
Definition: spatial.h:945
static const int IS_BOOST_GEOMETRY_ADAPTER
Definition: spatial.h:230
static const gis::srid_t default_srid
Definition: spatial.h:274
Definition: spatial.h:2408
const Class_info * get_class_info() const override
Definition: spatial.cc:3577
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:3505
static Geometry * scan_header_and_create(wkb_parser *wkb, Geometry_buffer *buffer)
Create a Geometry object from WKB.
Definition: spatial.cc:3041
int num_geometries(uint32 *num) const override
Definition: spatial.cc:3431
bool dimension(uint32 *dim, wkb_parser *wkb) const override
Definition: spatial.cc:3486
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:3376
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:3401
Gis_geometry_collection()
Definition: spatial.h:2414
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:3544
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:3290
bool append_geometry(const Geometry *geo, String *gcbuf)
Append geometry into geometry collection which can be empty.
Definition: spatial.cc:3076
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:3438
uint32 get_data_size() const override
Definition: spatial.cc:3243
uint32 feature_dimension() const override
Definition: spatial.h:2433
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:3333
Definition: spatial.h:2098
Gis_line_string(const void *wkb, size_t len, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2134
int point_n(uint32 n, String *result) const override
Definition: spatial.cc:1573
Gis_wkb_vector< Gis_point > base_type
Definition: spatial.h:2127
int is_closed(int *closed) const override
Definition: spatial.cc:1529
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:1506
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:1454
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:1412
Gis_line_string(const self &ls)=default
static const uint32 max_n_points
Definition: spatial.h:2100
uint32 feature_dimension() const override
Definition: spatial.h:2117
Gis_line_string & operator=(const Gis_line_string &)=default
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:1485
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:1602
int num_points(uint32 *n_points) const override
Definition: spatial.cc:1553
Gis_line_string(bool is_bg_adapter=true)
Definition: spatial.h:2130
uint32 get_data_size() const override
Definition: spatial.cc:1390
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:1582
int end_point(String *point) const override
Definition: spatial.cc:1565
int geom_length(double *len) const override
Definition: spatial.cc:1510
const Class_info * get_class_info() const override
Definition: spatial.cc:1629
int start_point(String *point) const override
Definition: spatial.cc:1558
Definition: spatial.h:2332
int geom_length(double *len) const override
Definition: spatial.cc:2658
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:2639
uint32 feature_dimension() const override
Definition: spatial.h:2344
const Class_info * get_class_info() const override
Definition: spatial.cc:2768
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2623
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:2534
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2561
Gis_multi_line_string(const self &mls)=default
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:2735
Gis_multi_line_string(const void *ptr, size_t nbytes, const Flags_t &, gis::srid_t srid)
Definition: spatial.h:2361
uint32 get_data_size() const override
Definition: spatial.cc:2508
int is_closed(int *closed) const override
Definition: spatial.cc:2681
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2599
Gis_multi_line_string(bool is_bg_adapter=true)
Definition: spatial.h:2357
int num_geometries(uint32 *num) const override
Definition: spatial.cc:2634
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2698
Gis_wkb_vector< Gis_line_string > base
Definition: spatial.h:2354
Definition: spatial.h:2289
int num_geometries(uint32 *num) const override
Definition: spatial.cc:2426
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2422
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2404
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:2334
Gis_multi_point(bool is_bg_adapter=true)
Definition: spatial.h:2317
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2444
static const uint32 max_n_points
Definition: spatial.h:2291
uint32 get_data_size() const override
Definition: spatial.cc:2316
Gis_wkb_vector< Gis_point > base_type
Definition: spatial.h:2314
uint32 feature_dimension() const override
Definition: spatial.h:2304
const Class_info * get_class_info() const override
Definition: spatial.cc:2503
Gis_multi_point(const self &mpts)=default
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:2470
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2377
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:2431
Gis_multi_point(const void *ptr, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2321
Definition: spatial.h:2372
Gis_multi_polygon(const void *ptr, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2398
int num_geometries(uint32 *num) const override
Definition: spatial.cc:2916
uint32 get_data_size() const override
Definition: spatial.cc:2773
Gis_wkb_vector< Gis_polygon > base
Definition: spatial.h:2392
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2867
uint32 feature_dimension() const override
Definition: spatial.h:2382
Gis_multi_polygon(const self &mpl)=default
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:2921
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2899
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2950
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:2804
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:2988
const Class_info * get_class_info() const override
Definition: spatial.cc:3022
Gis_multi_polygon(bool is_bg_adapter=true)
Definition: spatial.h:2394
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2830
Definition: spatial.h:1151
int get_y(double *y) const override
Definition: spatial.h:1181
Gis_point(bool is_bg_adapter=true)
Definition: spatial.h:1198
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:1332
Gis_point & operator=(const Gis_point &rhs)
Deep assignment from point 'p' to this object.
Definition: spatial.cc:1221
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:1320
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:1367
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:1345
Gis_point(const void *ptr, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Default constructor, no initialization.
Definition: spatial.h:1205
bool operator<(const Gis_point &pt) const
Definition: spatial.h:1274
bool init_from_wkt(Gis_read_stream *trs, String *wkb, const bool parens)
Initialize from a partial WKT string (everything following "POINT").
Definition: spatial.cc:1296
const Class_info * get_class_info() const override
Definition: spatial.cc:1385
~Gis_point() override=default
int get_x(double *x) const override
Definition: spatial.h:1177
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:1353
int get_xy(point_xy *p) const
Definition: spatial.h:1173
bool operator!=(const Gis_point &pt) const
Definition: spatial.h:1283
double get() const
Get a coordinate.
Definition: spatial.h:1228
uint32 feature_dimension() const override
Definition: spatial.h:1185
Geometry base
Definition: spatial.h:1196
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.h:1165
void set_ptr(void *ptr, size_t len)
Shallow assignment, let this point object refer to the specified memory address as its WKB data,...
Definition: spatial.cc:1274
uint32 get_data_size() const override
Definition: spatial.cc:1288
bool operator==(const Gis_point &pt) const
Definition: spatial.h:1279
void set(double const &value)
Set a coordinate.
Definition: spatial.h:1253
Definition: spatial.h:2151
Gis_polygon_ring(const self &r)=default
bool set_ring_order(bool want_ccw)
Set the specified ring to counter-clockwise(CCW) or clockwise(CW) if it's not.
Definition: spatial.cc:1808
Gis_wkb_vector< Gis_point > base
Definition: spatial.h:2153
Gis_polygon_ring & operator=(const Gis_polygon_ring &)=default
~Gis_polygon_ring() override=default
Gis_polygon_ring()
Definition: spatial.h:2169
Gis_polygon_ring(const void *wkb, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2157
Definition: spatial.h:2186
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2025
bool validate_coordinate_range(double srs_angular_unit, bool *long_out_of_range, bool *lat_out_of_range, double *out_of_range_value) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.cc:2169
const Class_info * get_class_info() const override
Definition: spatial.cc:2205
int interior_ring_n(uint32 num, String *result) const override
Definition: spatial.cc:2114
uint32 feature_dimension() const override
Definition: spatial.h:2197
inner_container_type * m_inn_rings
Definition: spatial.h:2282
int num_interior_ring(uint32 *n_int_rings) const override
Definition: spatial.cc:2107
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2079
void set_inner_rings(inner_container_type *inns) SUPPRESS_UBSAN
Definition: spatial.h:2277
void clear()
Clears outer and inner rings.
Definition: spatial.h:2231
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2058
void set_ptr(void *ptr, size_t len)
Set WKB data to this object, the WKB data will be used read only.
Definition: spatial.cc:1756
Gis_polygon_ring ring_type
Definition: spatial.h:2207
void to_wkb_unparsed()
Make the polygon's data in a single buffer as WKB format.
Definition: spatial.cc:1783
ring_type & outer() const
Definition: spatial.h:2210
void donate_data() override
Definition: spatial.h:2262
inner_container_type * inner_rings() const SUPPRESS_UBSAN
Definition: spatial.h:2272
Gis_polygon(bool isbgadapter=true)
Definition: spatial.h:2244
Gis_polygon & operator=(const Gis_polygon &rhs)
Deep assignment from polygon 'o' to this object.
Definition: spatial.cc:1722
int exterior_ring(String *result) const override
Definition: spatial.cc:2090
uint32 get_data_size() const override
Definition: spatial.cc:1969
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:1998
void make_rings()
Make outer ring and inner rings objects for this polygon if it doesn't have one yet.
Definition: spatial.cc:1952
~Gis_polygon() override
Definition: spatial.cc:1687
Gis_wkb_vector< ring_type > inner_container_type
Definition: spatial.h:2208
Gis_polygon(const void *wkb, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.cc:1671
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2139
inner_container_type & inners() const
Definition: spatial.h:2220
bool set_polygon_ring_order()
Set this polygon's outer ring to be CCW and inner rings to be CW.
Definition: spatial.cc:1928
Gis_wkb_vector_const_iterator is const_iterator class for Gis_wkb_vector, and base class of Gis_wkb_v...
Definition: spatial.h:1315
bool operator>=(const self &itr) const
Greater equal comparison operator.
Definition: spatial.h:1413
bool operator==(const self &itr) const
Equality comparison operator.
Definition: spatial.h:1386
void move_by(self &itr, difference_type n, bool back) const
Definition: spatial.h:1609
Gis_wkb_vector< T > owner_t
Definition: spatial.h:1318
~Gis_wkb_vector_const_iterator()=default
const self & operator=(const self &itr)
Assignment operator.
Definition: spatial.h:1492
value_type & reference
This is the return type for operator[].
Definition: spatial.h:1332
owner_t::size_type size_type
Definition: spatial.h:1329
const self & operator-=(difference_type n)
Move this iterator backward by n elements.
Definition: spatial.h:1537
self & operator++()
Pre-increment.
Definition: spatial.h:1444
self operator+(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1504
Gis_wkb_vector_const_iterator(index_type idx, const owner_t *owner)
Definition: spatial.h:1356
std::random_access_iterator_tag iterator_category
Definition: spatial.h:1336
ptrdiff_t index_type
Definition: spatial.h:1319
self & operator--()
Pre-decrement.
Definition: spatial.h:1468
bool operator>(const self &itr) const
Greater comparison operator.
Definition: spatial.h:1419
index_type m_curidx
Current element's index, starting from 0.
Definition: spatial.h:1625
self operator++(int)
Post-increment.
Definition: spatial.h:1455
owner_t * m_owner
The owner container of this iteraotr.
Definition: spatial.h:1627
difference_type operator-(const self &itr) const
Iterator distance operator.
Definition: spatial.h:1552
self operator--(int)
Post-decrement.
Definition: spatial.h:1480
Gis_wkb_vector_const_iterator()
Definition: spatial.h:1351
difference_type distance_type
Definition: spatial.h:1328
const self & operator+=(difference_type n)
Move this iterator forward by n elements.
Definition: spatial.h:1514
T value_type
Definition: spatial.h:1326
bool operator<=(const self &itr) const
Less equal comparison operator.
Definition: spatial.h:1408
pointer operator->() const
Arrow operator.
Definition: spatial.h:1581
ptrdiff_t difference_type
Definition: spatial.h:1327
reference operator*() const
Dereference operator.
Definition: spatial.h:1569
bool operator<(const self &itr) const
Less than comparison operator.
Definition: spatial.h:1400
reference operator[](difference_type offset) const
Iterator index operator.
Definition: spatial.h:1594
self operator-(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1526
value_type * pointer
Definition: spatial.h:1333
bool operator!=(const self &itr) const
Unequal compare, identical to !operator(==itr)
Definition: spatial.h:1394
Gis_wkb_vector_const_iterator(const self &vi)
Definition: spatial.h:1346
This class is the iterator class for Gis_wkb_vector, its instances can be used to mutate their refere...
Definition: spatial.h:1639
difference_type distance_type
Definition: spatial.h:1649
Gis_wkb_vector_iterator(const base &obj)
Definition: spatial.h:1667
Gis_wkb_vector_iterator(index_type idx, const owner_t *owner)
Definition: spatial.h:1669
ptrdiff_t index_type
Definition: spatial.h:1646
self operator-(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1769
value_type & reference
Definition: spatial.h:1650
Gis_wkb_vector_iterator(const self &vi)
Definition: spatial.h:1663
const self & operator-=(difference_type n)
Move this iterator forward by n elements.
Definition: spatial.h:1781
value_type * pointer
Definition: spatial.h:1651
std::random_access_iterator_tag iterator_category
Definition: spatial.h:1653
reference operator*() const
Dereference operator.
Definition: spatial.h:1814
pointer operator->() const
Arrow operator.
Definition: spatial.h:1826
self operator++(int)
Post-increment.
Definition: spatial.h:1701
Gis_wkb_vector_const_iterator< T > base
Definition: spatial.h:1642
const self & operator+=(difference_type n)
Move this iterator backward by n elements.
Definition: spatial.h:1756
Gis_wkb_vector< T > owner_t
Definition: spatial.h:1643
Gis_wkb_vector_iterator()
Definition: spatial.h:1665
self operator+(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1745
ptrdiff_t difference_type
Definition: spatial.h:1648
self & operator--()
Pre-decrement.
Definition: spatial.h:1711
const self & operator=(const self &itr)
Assignment operator.
Definition: spatial.h:1731
reference operator[](difference_type offset) const
Iterator index operator.
Definition: spatial.h:1838
self & operator++()
Pre-increment.
Definition: spatial.h:1693
self operator--(int)
Post-decrement.
Definition: spatial.h:1719
difference_type operator-(const self &itr) const
Iterator distance operator.
Definition: spatial.h:1797
~Gis_wkb_vector_iterator()=default
T value_type
Definition: spatial.h:1647
Gis_wkb_vector class template definition.
Definition: spatial.h:1901
const_iterator end() const
Create an open boundary iterator.
Definition: spatial.h:1960
size_t size_type
Definition: spatial.h:1911
iterator end()
Create an open boundary iterator.
Definition: spatial.h:1952
const_reference back() const
Definition: spatial.h:1977
void set_geo_vect(Geo_vector *ptr)
Definition: spatial.h:2058
iterator begin()
Definition: spatial.h:1932
T value_type
Definition: spatial.h:1908
const_iterator begin() const
Create a const iterator.
Definition: spatial.h:1943
ptrdiff_t index_type
Definition: spatial.h:1904
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.h:2079
const_reference operator[](index_type i) const
Definition: spatial.h:1997
void reassemble()
Because of resize, a geometry's components may reside not in one chunk, some may in the m_ptr's chunk...
Definition: spatial.cc:4146
const T * const_pointer
Definition: spatial.h:1912
void shallow_push(const Geometry *g) override SUPPRESS_UBSAN
The copy constructors of Geometry classes always do deep copy, but when pushing a Geometry object int...
Definition: spatial.cc:4512
ptrdiff_t difference_type
Definition: spatial.h:1916
size_t get_nbytes_free() const
Get number of free bytes in the buffer held by m_ptr.
Definition: spatial.cc:4619
Gis_wkb_vector< Gis_point > Linestring
Definition: spatial.h:2089
size_t current_size() const
Returns payload number of bytes of the topmost geometry holding this geometry, i.e.
Definition: spatial.cc:4606
void donate_data() override
Definition: spatial.h:2065
void clear()
Update support We suppose updating a geometry can happen in the following ways:
Definition: spatial.cc:4581
reference back()
Definition: spatial.h:1987
bool validate_coordinate_range(double, bool *, bool *, double *) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.h:2083
void clear_wkb_data()
Definition: spatial.h:2041
Gis_wkb_vector_iterator< T > iterator
Definition: spatial.h:1910
const T & const_reference
Definition: spatial.h:1913
self & operator=(const self &rhs)
Deep assignment from vector 'rhs' to this object.
Definition: spatial.cc:4435
Gis_wkb_vector_const_iterator< T > const_iterator
Definition: spatial.h:1909
Geo_vector * m_geo_vect
The geometry vector of this geometry object's components, each of which is an object of Geometry or i...
Definition: spatial.h:1925
size_type size() const
Get container size.
Definition: spatial.h:1970
T * pointer
Definition: spatial.h:1914
~Gis_wkb_vector() override
Definition: spatial.h:2019
void resize(size_t sz)
Definition: spatial.cc:4781
Geometry base
Definition: spatial.h:1905
bool empty() const
Definition: spatial.h:1975
Geo_vector * get_geo_vect(bool create_if_null=false)
Definition: spatial.h:2051
reference operator[](index_type i)
Definition: spatial.h:2005
void set_ptr(void *ptr, size_t len)
Definition: spatial.cc:4536
Geo_vector * get_geo_vect() const
Definition: spatial.h:2056
Gis_wkb_vector< Linestring > Multi_linestrings
Definition: spatial.h:2090
T & reference
Definition: spatial.h:1915
Geometry_vector< T > Geo_vector
Definition: spatial.h:1918
void push_back(const T &val)
Definition: spatial.cc:4642
Gis_wkb_vector()
Definition: spatial.h:2017
Utility container class to store elements stably and scalably.
Definition: inplace_vector.h:59
const objtype & back() const
STL std::vector::back interface.
Definition: inplace_vector.h:224
size_t size() const
STL std::vector::size interface.
Definition: inplace_vector.h:198
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
bool append(const String &s)
Definition: sql_string.cc:445
bool reserve(size_t space_needed)
Definition: sql_string.h:555
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Definition: spatial.h:2455
virtual void on_wkb_end(const void *wkb)=0
Notified when scanner sees the end of a geometry WKB.
virtual void on_wkb_start(Geometry::wkbByteOrder bo, Geometry::wkbType geotype, const void *wkb, uint32 len, bool has_hdr)=0
Notified when scanner sees the start of a geometry WKB.
virtual bool continue_scan() const
Definition: spatial.h:2484
virtual ~WKB_scanner_event_handler()=default
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4365
Point with coordinates X and Y.
Definition: spatial.h:61
point_xy(double x_arg, double y_arg)
Definition: spatial.h:66
bool eq(point_xy p) const
Compare to another point.
Definition: spatial.h:72
double x
Definition: spatial.h:63
double distance(const point_xy &p) const
Distance to another point.
Definition: spatial.cc:177
double y
Definition: spatial.h:64
const char * p
Definition: ctype-mb.cc:1236
#define U
Definition: ctype-tis620.cc:74
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
static constexpr unsigned PSI_INSTRUMENT_ME
Definition: psi_bits.h:42
static int flags[50]
Definition: hp_test1.cc:39
static int flag
Definition: hp_test1.cc:39
Functions for reading and storing in machine-independent format.
void float8store(char *V, double M)
Definition: my_byteorder.h:202
double float8get(const char *M)
Definition: my_byteorder.h:198
void int4store(char *pT, uint32 A)
Definition: my_byteorder.h:172
uint32 uint4korr(const char *pT)
Definition: my_byteorder.h:144
Header for compiler-dependent features.
#define SUPPRESS_UBSAN
Definition: my_compiler.h:133
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:51
uint64_t uint64
Definition: my_inttypes.h:68
uint16_t uint16
Definition: my_inttypes.h:64
uint32_t uint32
Definition: my_inttypes.h:66
#define UINT_MAX32
Definition: my_inttypes.h:78
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:80
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1054
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
bool intersection(const dd::Spatial_reference_system *srs, const Geometry *g1, const Geometry *g2, const char *func_name, std::unique_ptr< Geometry > *result) noexcept
Finds the intersection between two geometries.
Definition: intersection.cc:35
std::uint32_t srid_t
A spatial reference system ID (SRID).
Definition: srid.h:32
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:419
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:85
Performance schema instrumentation interface.
required string type
Definition: replication_group_member_actions.proto:33
wkbByteOrder
Definition: sp_defs.h:44
wkbType
Definition: sp_defs.h:34
const uint SRID_SIZE
Definition: spatial.h:50
const uint SIZEOF_STORED_DOUBLE
Definition: spatial.h:51
const uint WKB_HEADER_SIZE
Definition: spatial.h:53
Gis_polygon_ring * outer_ring(const Geometry *g)
Definition: spatial.h:2179
void * gis_wkb_realloc(void *p, size_t sz)
Definition: spatial.cc:63
void gis_wkb_free(void *p)
Definition: spatial.h:204
Geometry::wkbType get_wkb_geotype(const void *p0)
Get wkbType value from WKB, the WKB is always little endian, so need platform specific conversion.
Definition: spatial.h:1083
const uint GEOM_HEADER_SIZE
Definition: spatial.h:54
const uint GEOM_DIM
Definition: spatial.h:49
void set_byte_order(void *p0, Geometry::wkbByteOrder bo)
Definition: spatial.h:1072
const char * wkb_scanner(THD *thd, const char *wkb, uint32 *len, uint32 geotype, bool has_hdr, WKB_scanner_event_handler *handler)
Scan WKB byte string and notify WKB events by calling registered callbacks.
Definition: spatial.cc:798
const uint32 GET_SIZE_ERROR
Definition: spatial.h:56
void parse_wkb_data(Geometry *geom, const char *p, size_t num_geoms=0)
Parse the wkb buffer to build the component vector m_geo_vect for geom.
Definition: spatial.cc:3801
Geometry::wkbByteOrder get_byte_order(const void *p0)
Definition: spatial.h:1065
void * gis_wkb_alloc(size_t sz)
Definition: spatial.cc:55
bool polygon_is_packed(Geometry *plgn, Geometry *mplgn)
Check whether plgn is packed into its owner mplgn's WKB buffer.
Definition: spatial.cc:2286
void gis_wkb_raw_free(void *p)
Definition: spatial.h:210
void own_rings(Geometry *geo)
Definition: spatial.cc:2307
char * write_wkb_header(void *p0, Geometry::wkbType geotype)
Definition: spatial.h:1095
const uint POINT_DATA_SIZE
Definition: spatial.h:52
struct wkb_header_st wkb_header
char * write_geometry_header(void *p0, gis::srid_t srid, Geometry::wkbType geotype)
Definition: spatial.h:1111
Gis_wkb_vector_const_iterator< T > operator+(typename Gis_wkb_vector_const_iterator< T >::difference_type n, const Gis_wkb_vector_const_iterator< T > &itr)
Definition: spatial.h:1855
void * get_packed_ptr(const Geometry *geo, size_t *pnbytes)
Packup a polygon's outer ring and inner rings into a single chunk of memory as result.
Definition: spatial.cc:2219
void * gis_wkb_fixed_alloc(size_t sz)
Definition: spatial.h:200
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:32
Gis_polygon objects and Gis_wkb_vector<> objects are of same size, and Gis_point and Geometry objects...
Definition: spatial.h:2451
char data[sizeof(Gis_polygon)]
Definition: spatial.h:2452
double xmin
Definition: spatial.h:83
int covered_by(const MBR *mbr) const
Definition: spatial.h:135
MBR()
Definition: spatial.h:85
int equals(const MBR *mbr) const
Definition: spatial.h:117
int dimension() const
The dimension maps to an integer as:
Definition: spatial.h:155
MBR(const double xmin_arg, const double ymin_arg, const double xmax_arg, const double ymax_arg)
Definition: spatial.h:90
MBR(const point_xy &min, const point_xy &max)
Definition: spatial.h:94
int contains(const MBR *mbr) const
Definition: spatial.h:133
int overlaps(const MBR *mbr) const
Definition: spatial.h:171
void add_xy(point_xy p)
Definition: spatial.h:104
void add_xy(double x, double y)
Definition: spatial.h:97
void add_xy(const char *px, const char *py)
Definition: spatial.h:105
double ymax
Definition: spatial.h:83
int within(const MBR *mbr) const
Definition: spatial.cc:73
int covers(const MBR *mbr) const
Definition: spatial.h:141
bool inner_point(double x, double y) const
Definition: spatial.h:143
double xmax
Definition: spatial.h:83
double ymin
Definition: spatial.h:83
int intersects(const MBR *mbr) const
Definition: spatial.h:129
void add_mbr(const MBR *mbr)
Definition: spatial.h:110
int disjoint(const MBR *mbr) const
Definition: spatial.h:123
Definition: mysql_lex_string.h:39
size_t length
Definition: mysql_lex_string.h:41
#define NULL
Definition: types.h:54
unsigned int uint
Definition: uca9-dump.cc:74
void q_append(const char c, String *str)
Definition: unsafe_string_append.h:34
void qs_append(const char *str_in, size_t len, String *str)
Definition: sql_string.cc:675
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:509
int n
Definition: xcom_base.cc:508