24#ifndef SPATIAL_INCLUDED
25#define SPATIAL_INCLUDED
67 point_xy(
double x_arg,
double y_arg) :
x(x_arg),
y(y_arg) {}
91 MBR(
const double xmin_arg,
const double ymin_arg,
const double xmax_arg,
92 const double ymax_arg)
106 void add_xy(
const char *px,
const char *py) {
179 assert(d >= 0 && d <= 2);
206 if (
p ==
nullptr)
return;
207 char *cp =
static_cast<char *
>(
p);
371 uint32 extra_point_space = 0)
const {
403 if (
no_data(nbytes))
return true;
431 uint32 extra_point_space = 0) {
476 String *wkb [[maybe_unused]]) {
483 const char *wkb [[maybe_unused]],
484 uint len [[maybe_unused]],
486 String *res [[maybe_unused]]) {
525 virtual int get_x(
double *)
const {
return -1; }
526 virtual int get_y(
double *)
const {
return -1; }
586 bool *long_out_of_range,
587 bool *lat_out_of_range,
588 double *out_of_range_value) = 0;
594 uint32 data_len,
bool has_srid =
true);
596 bool has_srid =
true) {
602 bool init_stream =
true,
603 bool check_trailing =
true);
609 if (wkt->
reserve(len + 2, 512))
return true;
611 wkt->
append(
"GEOMETRYCOLLECTION");
626 m_ptr =
const_cast<void *
>(data);
631 m_ptr =
const_cast<void *
>(
static_cast<const void *
>(c->
data()));
680 assert(0xfff >=
flag);
700 uint32 offset,
bool bracket_pt =
false)
const;
762 "Flags are expected to line up exactly with an uint64.");
782 m_ptr =
const_cast<void *
>(ptr);
812 assert(dim > 0 && dim < 5);
1067 const char *
p =
static_cast<const char *
>(p0);
1074 char *
p =
static_cast<char *
>(p0);
1085 const char *
p =
static_cast<const char *
>(p0);
1097 char *
p =
static_cast<char *
>(p0);
1106 char *
p =
static_cast<char *
>(p0);
1114 char *
p =
static_cast<char *
>(p0);
1122 char *
p =
static_cast<char *
>(p0);
1172 bool get_mbr(
MBR *mbr, wkb_parser *wkb)
const override;
1190 bool *long_out_of_range,
1191 bool *lat_out_of_range,
1192 double *out_of_range_value)
override;
1223 void set_ptr(
void *ptr,
size_t len);
1228 template <std::
size_t K>
1231 ((
m_ptr !=
nullptr &&
1243 if (
m_ptr ==
nullptr)
return 0;
1253 template <std::
size_t K>
1254 void set(
double const &value) {
1260 if (
m_ptr ==
nullptr) {
1262 if (
m_ptr ==
nullptr) {
1276 bool x = get<0>(), px = pt.
get<0>();
1277 return x == px ? get<1>() < pt.
get<1>() : x < px;
1281 return (get<0>() == pt.
get<0>() && get<1>() == pt.
get<1>());
1289template <
typename T>
1315template <
typename T>
1395 bool operator!=(
const self &itr)
const {
return !(*
this == itr); }
1599 assert(itr.m_owner !=
NULL && itr.m_curidx >= 0 &&
1600 itr.m_curidx <
static_cast<index_type>(itr.m_owner->size()));
1601 return (*
m_owner)[itr.m_curidx];
1621 itr.m_curidx = newidx;
1671 :
base(idx, owner) {}
1695 this->
move_by(*
this, 1,
false);
1704 this->
move_by(*
this, 1,
false);
1713 this->
move_by(*
this, 1,
true);
1722 this->
move_by(*
this, 1,
true);
1758 this->
move_by(*
this, n,
false);
1783 this->
move_by(*
this, n,
true);
1841 this->
move_by(itr, offset,
false);
1842 assert(itr.m_owner !=
NULL && itr.m_curidx >= 0 &&
1843 itr.m_curidx <
static_cast<index_type>(this->m_owner->size()));
1844 return (*this->
m_owner)[itr.m_curidx];
1855template <
typename T>
1865template <
typename T>
1885template <
typename T>
1901template <
typename T>
1985 return *((
const T *)
p);
2002 const Geometry *
p = &((*m_geo_vect)[i]);
2003 return *((
const T *)
p);
2073 void set_ptr(
void *ptr,
size_t len);
2113 int is_closed(
int *closed)
const override;
2122 bool *long_out_of_range,
2123 bool *lat_out_of_range,
2124 double *out_of_range_value)
override;
2160 :
base(wkb, nbytes,
flags, srid, true) {
2202 bool *long_out_of_range,
2203 bool *lat_out_of_range,
2204 double *out_of_range_value)
override;
2256 void set_ptr(
void *ptr,
size_t len);
2309 bool *long_out_of_range,
2310 bool *lat_out_of_range,
2311 double *out_of_range_value)
override;
2344 int is_closed(
int *closed)
const override;
2349 bool *long_out_of_range,
2350 bool *lat_out_of_range,
2351 double *out_of_range_value)
override;
2387 bool *long_out_of_range,
2388 bool *lat_out_of_range,
2389 double *out_of_range_value)
override;
2401 :
base(ptr, nbytes,
flags, srid, true) {
2430 bool get_mbr(
MBR *mbr, wkb_parser *wkb)
const override;
2440 bool *long_out_of_range,
2441 bool *lat_out_of_range,
2442 double *out_of_range_value)
override;
2472 uint32 len,
bool has_hdr) = 0;
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:571
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
Definition: spatial.h:460
Class_info(const char *name, int type_id, create_geom_t create_func)
Definition: spatial.cc:198
const LEX_CSTRING m_name
Definition: spatial.h:462
int m_type_id
Definition: spatial.h:463
create_geom_t m_create_func
Definition: spatial.h:464
Highest byte is stores byte order, dimension, nomem and geotype as follows: bo: byte order,...
Definition: spatial.h:739
uint64 nomem
Definition: spatial.h:754
uint64 zm
Definition: spatial.h:758
uint64 dim
Definition: spatial.h:753
uint64 bo
Definition: spatial.h:752
uint64 nbytes
Definition: spatial.h:756
uint64 props
Definition: spatial.h:757
uint64 unused
Definition: spatial.h:759
Flags_t(wkbType type, size_t len)
Definition: spatial.h:743
Flags_t()
Definition: spatial.h:741
uint64 geotype
Definition: spatial.h:755
Constant storage for WKB.
Definition: spatial.h:331
const char * m_data_end
Definition: spatial.h:334
uint32 length() const
Definition: spatial.h:347
wkb_container(const char *data, const char *data_end)
Definition: spatial.h:338
bool no_data(size_t data_amount) const
Check if there's enough data remaining as requested.
Definition: spatial.h:355
void set(const char *data, const char *data_end)
Definition: spatial.h:341
const char * m_data
Definition: spatial.h:333
const char * data() const
Definition: spatial.h:345
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:370
const char * data_end() const
Definition: spatial.h:346
WKB parser, designed to traverse through WKB data from beginning of the buffer towards the end using ...
Definition: spatial.h:384
bool scan_wkb_header(wkb_header *header)
Definition: spatial.h:411
bool scan_non_zero_uint4(uint32 *number)
Definition: spatial.h:427
bool skip(size_t nbytes)
Definition: spatial.h:402
bool scan_n_points_and_check_data(uint32 *n_points, uint32 extra_point_space=0)
Definition: spatial.h:430
bool skip_coord()
Definition: spatial.h:408
wkb_parser(const char *data, const char *data_end)
Definition: spatial.h:394
void get_float8(double *x)
Definition: spatial.h:389
void scan_xy_unsafe(point_xy *p)
Definition: spatial.h:437
bool skip_wkb_header()
Definition: spatial.h:407
bool scan_xy(point_xy *p)
Definition: spatial.h:444
void skip_unsafe(size_t nbytes)
Definition: spatial.h:398
bool scan_coord(double *x)
Definition: spatial.h:449
bool scan_uint4(uint32 *number)
Definition: spatial.h:421
void get_uint4(uint32 *number)
Definition: spatial.h:386
Geometry vector class.
Definition: spatial.h:1886
Inplace_vector< T > base
Definition: spatial.h:1887
Geometry_vector()
Definition: spatial.h:1890
Definition: spatial.h:213
virtual bool get_data_as_wkt(String *txt, wkb_parser *wkb) const
Definition: spatial.h:490
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:903
enum_coordinate_reference_system get_coordsys() const
Definition: spatial.h:519
void set_byte_order(Geometry::wkbByteOrder bo)
Definition: spatial.h:805
static String bad_geometry_data
Definition: spatial.h:322
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:1000
void set_ownmem(bool b)
Set whether this object has its own memory.
Definition: spatial.h:909
virtual uint32 get_data_size() const
Definition: spatial.h:472
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:780
Geometry & operator=(const Geometry &rhs)
Assignment operator for Geometry class, assignment operators of children classes calls this to do gen...
Definition: spatial.cc:1170
enum_coordinate_reference_system
Definition: spatial.h:316
@ coord_first
Definition: spatial.h:317
@ coord_last
Definition: spatial.h:319
@ cartesian
Definition: spatial.h:318
bool as_wkt(String *wkt, wkb_parser *wkb) const
Definition: spatial.h:607
void * m_ptr
Pointer to the geometry's wkb data's 1st byte, right after its wkb header if any.
Definition: spatial.h:1050
char * get_cptr() const
Definition: spatial.h:797
static Class_info * ci_collection[wkb_last+1]
Definition: spatial.h:639
virtual bool init_from_wkt(Gis_read_stream *trs, String *wkb)
Definition: spatial.h:475
virtual void shallow_push(const Geometry *)
Definition: spatial.h:1029
bool is_components_no_overlapped() const
Definition: spatial.h:665
static bool is_valid_geotype(uint32 gtype)
Check if a given geometry type is a valid internal geometry type.
Definition: spatial.h:842
static Geometry * create_by_typeid(Geometry_buffer *buffer, int type_id)
Definition: spatial.cc:295
bool get_mbr_for_points(MBR *mbr, wkb_parser *wkb, uint offset) const
Get most bounding rectangle (mbr) for X points.
Definition: spatial.cc:1088
static Geometry * construct(Geometry_buffer *buffer, const String *str, bool has_srid=true)
Definition: spatial.h:595
wkbByteOrder
Definition: spatial.h:311
@ wkb_invalid
Definition: spatial.h:314
@ wkb_ndr
Definition: spatial.h:313
@ wkb_xdr
Definition: spatial.h:312
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:483
Geometry * get_owner() const
Definition: spatial.h:801
Geometry *(* create_geom_t)(char *)
Callback which creates Geometry objects on top of a given placement.
Definition: spatial.h:458
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:1017
Geometry()
Definition: spatial.h:764
virtual uint32 feature_dimension() const
Definition: spatial.h:520
void has_out_of_line_components(bool b)
Definition: spatial.h:1021
bool create_point(String *result, wkb_parser *wkb) const
Create a point from data.
Definition: spatial.cc:1036
char get_dimension() const
Definition: spatial.h:922
static const uint32 MAX_GEOM_WKB_LENGTH
Definition: spatial.h:273
virtual bool get_mbr(MBR *mbr, wkb_parser *wkb) const
Definition: spatial.h:497
virtual int start_point(String *) const
Definition: spatial.h:536
static const int MULTIPOLYGON_NO_OVERLAPPED_COMPS
Definition: spatial.h:269
virtual int end_point(String *) const
Definition: spatial.h:537
static bool is_valid_geotype(Geometry::wkbType gt)
Check if a given geometry type is a valid internal geometry type.
Definition: spatial.h:862
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:3804
gis::srid_t m_srid
Srid of this object.
Definition: spatial.h:1058
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:827
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:396
uint16 get_props() const
Definition: spatial.h:684
void set_flags(const Flags_t &flags)
Definition: spatial.h:1063
bool as_wkt(String *wkt) const
Definition: spatial.h:617
static const int GEOM_LENGTH_VERIFIED
Definition: spatial.h:237
virtual int exterior_ring(String *) const
Definition: spatial.h:538
static Class_info * find_class(int type_id)
Definition: spatial.h:693
static const int POLYGON_INNER_RING
Definition: spatial.h:223
void set_length_verified(bool b) const
Definition: spatial.h:708
virtual int num_points(uint32 *) const
Definition: spatial.h:532
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:542
virtual int get_x(double *) const
Definition: spatial.h:525
void set_owner(Geometry *o)
Definition: spatial.h:803
Geometry * m_owner
The topmost (root) geometry object, whose m_ptr is the 1st byte of a wkb memory buffer.
Definition: spatial.h:1040
virtual int copy_points(String *) const
Definition: spatial.h:534
wkbType
Definition: spatial.h:290
@ wkb_multipolygon
Definition: spatial.h:298
@ wkb_multilinestring
Definition: spatial.h:297
@ wkb_point
Definition: spatial.h:293
@ wkb_polygon
Definition: spatial.h:295
@ wkb_invalid_type
Definition: spatial.h:291
@ wkb_geometrycollection
Definition: spatial.h:299
@ wkb_last
Definition: spatial.h:309
@ wkb_linestring
Definition: spatial.h:294
@ wkb_multipoint
Definition: spatial.h:296
@ wkb_polygon_inner_rings
Definition: spatial.h:308
@ wkb_first
Definition: spatial.h:292
bool envelope(String *result) const
Definition: spatial.cc:958
bool has_geom_header_space() const
Definition: spatial.h:653
bool dimension(uint32 *dim) const
Definition: spatial.h:512
static const int HAS_GEOM_HEADER_SPACE
Definition: spatial.h:260
virtual int num_geometries(uint32 *) const
Definition: spatial.h:533
virtual int num_interior_ring(uint32 *) const
Definition: spatial.h:529
virtual int interior_ring_n(uint32 num, String *result) const
Definition: spatial.h:546
bool is_polygon_ring() const
Definition: spatial.h:641
bool is_polygon_inner_ring() const
Definition: spatial.h:649
void set_srid(gis::srid_t id)
Definition: spatial.h:686
void set_ptr(const void *ptr)
Definition: spatial.h:952
Flags_t get_flags() const
Definition: spatial.h:1061
bool get_mbr(MBR *mbr)
Definition: spatial.h:501
void set_props(uint16 flag)
Definition: spatial.h:679
virtual uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res)
Definition: spatial.h:482
void set_dimension(char dim)
Definition: spatial.h:810
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:944
wkbType get_type() const
Definition: spatial.h:516
void * get_ptr() const
Definition: spatial.h:795
void polygon_is_wkb_form(bool b)
Definition: spatial.h:1004
static const int POLYGON_OUTER_RING
Definition: spatial.h:222
gis::srid_t get_srid() const
Definition: spatial.h:688
virtual int geometry_n(uint32 num, String *result) const
Definition: spatial.h:550
bool get_ownmem() const
Returns whether this object has its own memory.
Definition: spatial.h:915
void set_bg_adapter(bool b) const
Set whether this object is a BG adapter.
Definition: spatial.h:970
Geometry::wkbByteOrder get_byte_order() const
Definition: spatial.h:917
Flags_t m_flags
Flags and meta information about this object.
Definition: spatial.h:1055
uchar * get_ucptr() const
Definition: spatial.h:799
virtual const Class_info * get_class_info() const
Definition: spatial.h:470
void has_geom_header_space(bool b)
Definition: spatial.h:658
bool is_polygon_outer_ring() const
Definition: spatial.h:645
static const int HAS_OUT_OF_LINE_COMPONENTS
Definition: spatial.h:243
virtual ~Geometry()
Definition: spatial.cc:1121
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:1060
virtual int get_y(double *) const
Definition: spatial.h:526
void set_geotype(Geometry::wkbType gt)
Definition: spatial.h:890
bool is_bg_adapter() const
Whether the Geometry object is created to be used by Boost Geometry or only by MySQL.
Definition: spatial.h:960
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:4078
void set_data_ptr(const wkb_container *c)
Definition: spatial.h:630
virtual int is_closed(int *) const
Definition: spatial.h:528
Geometry::wkbType get_geotype() const
Definition: spatial.h:924
void set_components_no_overlapped(bool b)
Definition: spatial.h:669
virtual void donate_data()
Definition: spatial.h:982
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:715
virtual int geom_length(double *) const
Definition: spatial.h:527
virtual bool dimension(uint32 *dim, wkb_parser *wkb) const
Definition: spatial.h:505
void set_nbytes(size_t n) const
Definition: spatial.h:896
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:435
void set_data_ptr(const void *data, size_t data_len)
Definition: spatial.h:625
void * get_data_ptr() const
Definition: spatial.h:634
static const int POLYGON_IN_WKB_FORM
Definition: spatial.h:250
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:322
bool is_length_verified() const
Definition: spatial.h:703
size_t get_nbytes() const
Definition: spatial.h:946
static const int IS_BOOST_GEOMETRY_ADAPTER
Definition: spatial.h:231
static const gis::srid_t default_srid
Definition: spatial.h:275
Definition: spatial.h:2409
const Class_info * get_class_info() const override
Definition: spatial.cc:3580
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:3508
static Geometry * scan_header_and_create(wkb_parser *wkb, Geometry_buffer *buffer)
Create a Geometry object from WKB.
Definition: spatial.cc:3042
int num_geometries(uint32 *num) const override
Definition: spatial.cc:3434
bool dimension(uint32 *dim, wkb_parser *wkb) const override
Definition: spatial.cc:3489
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:3379
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:3404
Gis_geometry_collection()
Definition: spatial.h:2415
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:3547
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:3293
bool append_geometry(const Geometry *geo, String *gcbuf)
Append geometry into geometry collection which can be empty.
Definition: spatial.cc:3077
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:3441
uint32 get_data_size() const override
Definition: spatial.cc:3246
uint32 feature_dimension() const override
Definition: spatial.h:2434
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:3336
Definition: spatial.h:2099
Gis_line_string(const void *wkb, size_t len, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2135
int point_n(uint32 n, String *result) const override
Definition: spatial.cc:1574
Gis_wkb_vector< Gis_point > base_type
Definition: spatial.h:2128
int is_closed(int *closed) const override
Definition: spatial.cc:1530
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:1507
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:1455
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:1413
Gis_line_string(const self &ls)=default
static const uint32 max_n_points
Definition: spatial.h:2101
uint32 feature_dimension() const override
Definition: spatial.h:2118
Gis_line_string & operator=(const Gis_line_string &)=default
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:1486
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:1603
int num_points(uint32 *n_points) const override
Definition: spatial.cc:1554
Gis_line_string(bool is_bg_adapter=true)
Definition: spatial.h:2131
uint32 get_data_size() const override
Definition: spatial.cc:1391
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:1583
int end_point(String *point) const override
Definition: spatial.cc:1566
int geom_length(double *len) const override
Definition: spatial.cc:1511
const Class_info * get_class_info() const override
Definition: spatial.cc:1630
int start_point(String *point) const override
Definition: spatial.cc:1559
Definition: spatial.h:2333
int geom_length(double *len) const override
Definition: spatial.cc:2659
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:2640
uint32 feature_dimension() const override
Definition: spatial.h:2345
const Class_info * get_class_info() const override
Definition: spatial.cc:2769
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2624
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:2535
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2562
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:2736
Gis_multi_line_string(const void *ptr, size_t nbytes, const Flags_t &, gis::srid_t srid)
Definition: spatial.h:2362
uint32 get_data_size() const override
Definition: spatial.cc:2509
int is_closed(int *closed) const override
Definition: spatial.cc:2682
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2600
Gis_multi_line_string(bool is_bg_adapter=true)
Definition: spatial.h:2358
int num_geometries(uint32 *num) const override
Definition: spatial.cc:2635
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2699
Gis_wkb_vector< Gis_line_string > base
Definition: spatial.h:2355
Definition: spatial.h:2290
int num_geometries(uint32 *num) const override
Definition: spatial.cc:2427
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2423
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2405
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:2335
Gis_multi_point(bool is_bg_adapter=true)
Definition: spatial.h:2318
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2445
static const uint32 max_n_points
Definition: spatial.h:2292
uint32 get_data_size() const override
Definition: spatial.cc:2317
Gis_wkb_vector< Gis_point > base_type
Definition: spatial.h:2315
uint32 feature_dimension() const override
Definition: spatial.h:2305
const Class_info * get_class_info() const override
Definition: spatial.cc:2504
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:2471
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2378
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:2432
Gis_multi_point(const void *ptr, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2322
Definition: spatial.h:2373
Gis_multi_polygon(const void *ptr, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2399
int num_geometries(uint32 *num) const override
Definition: spatial.cc:2917
uint32 get_data_size() const override
Definition: spatial.cc:2774
Gis_wkb_vector< Gis_polygon > base
Definition: spatial.h:2393
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2868
uint32 feature_dimension() const override
Definition: spatial.h:2383
Gis_multi_polygon(const self &mpl)=default
int geometry_n(uint32 num, String *result) const override
Definition: spatial.cc:2922
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2900
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2951
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:2805
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:2989
const Class_info * get_class_info() const override
Definition: spatial.cc:3023
Gis_multi_polygon(bool is_bg_adapter=true)
Definition: spatial.h:2395
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2831
Definition: spatial.h:1152
int get_y(double *y) const override
Definition: spatial.h:1182
Gis_point(bool is_bg_adapter=true)
Definition: spatial.h:1199
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:1333
Gis_point & operator=(const Gis_point &rhs)
Deep assignment from point 'p' to this object.
Definition: spatial.cc:1222
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:1321
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:1368
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:1346
Gis_point(const void *ptr, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Default constructor, no initialization.
Definition: spatial.h:1206
bool operator<(const Gis_point &pt) const
Definition: spatial.h:1275
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:1297
const Class_info * get_class_info() const override
Definition: spatial.cc:1386
~Gis_point() override=default
int get_x(double *x) const override
Definition: spatial.h:1178
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:1354
int get_xy(point_xy *p) const
Definition: spatial.h:1174
bool operator!=(const Gis_point &pt) const
Definition: spatial.h:1284
double get() const
Get a coordinate.
Definition: spatial.h:1229
uint32 feature_dimension() const override
Definition: spatial.h:1186
Geometry base
Definition: spatial.h:1197
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.h:1166
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:1275
uint32 get_data_size() const override
Definition: spatial.cc:1289
bool operator==(const Gis_point &pt) const
Definition: spatial.h:1280
void set(double const &value)
Set a coordinate.
Definition: spatial.h:1254
Definition: spatial.h:2152
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:1809
Gis_wkb_vector< Gis_point > base
Definition: spatial.h:2154
Gis_polygon_ring & operator=(const Gis_polygon_ring &)=default
~Gis_polygon_ring() override=default
Gis_polygon_ring()
Definition: spatial.h:2170
Gis_polygon_ring(const void *wkb, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.h:2158
Definition: spatial.h:2187
uint init_from_wkb(THD *thd, const char *wkb, uint len, wkbByteOrder bo, String *res) override
Definition: spatial.cc:2026
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:2170
const Class_info * get_class_info() const override
Definition: spatial.cc:2206
int interior_ring_n(uint32 num, String *result) const override
Definition: spatial.cc:2115
uint32 feature_dimension() const override
Definition: spatial.h:2198
inner_container_type * m_inn_rings
Definition: spatial.h:2283
int num_interior_ring(uint32 *n_int_rings) const override
Definition: spatial.cc:2108
bool get_mbr(MBR *mbr, wkb_parser *wkb) const override
Definition: spatial.cc:2080
void set_inner_rings(inner_container_type *inns) SUPPRESS_UBSAN
Definition: spatial.h:2278
void clear()
Clears outer and inner rings.
Definition: spatial.h:2232
bool get_data_as_wkt(String *txt, wkb_parser *wkb) const override
Definition: spatial.cc:2059
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:1757
Gis_polygon_ring ring_type
Definition: spatial.h:2208
void to_wkb_unparsed()
Make the polygon's data in a single buffer as WKB format.
Definition: spatial.cc:1784
ring_type & outer() const
Definition: spatial.h:2211
void donate_data() override
Definition: spatial.h:2263
inner_container_type * inner_rings() const SUPPRESS_UBSAN
Definition: spatial.h:2273
Gis_polygon(bool isbgadapter=true)
Definition: spatial.h:2245
Gis_polygon & operator=(const Gis_polygon &rhs)
Deep assignment from polygon 'o' to this object.
Definition: spatial.cc:1723
int exterior_ring(String *result) const override
Definition: spatial.cc:2091
uint32 get_data_size() const override
Definition: spatial.cc:1970
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override
Definition: spatial.cc:1999
void make_rings()
Make outer ring and inner rings objects for this polygon if it doesn't have one yet.
Definition: spatial.cc:1953
~Gis_polygon() override
Definition: spatial.cc:1688
Gis_wkb_vector< ring_type > inner_container_type
Definition: spatial.h:2209
Gis_polygon(const void *wkb, size_t nbytes, const Flags_t &flags, gis::srid_t srid)
Definition: spatial.cc:1672
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.cc:2140
inner_container_type & inners() const
Definition: spatial.h:2221
bool set_polygon_ring_order()
Set this polygon's outer ring to be CCW and inner rings to be CW.
Definition: spatial.cc:1929
Gis_wkb_vector_const_iterator is const_iterator class for Gis_wkb_vector, and base class of Gis_wkb_v...
Definition: spatial.h:1316
bool operator>=(const self &itr) const
Greater equal comparison operator.
Definition: spatial.h:1414
bool operator==(const self &itr) const
Equality comparison operator.
Definition: spatial.h:1387
void move_by(self &itr, difference_type n, bool back) const
Definition: spatial.h:1610
Gis_wkb_vector< T > owner_t
Definition: spatial.h:1319
~Gis_wkb_vector_const_iterator()=default
const self & operator=(const self &itr)
Assignment operator.
Definition: spatial.h:1493
value_type & reference
This is the return type for operator[].
Definition: spatial.h:1333
owner_t::size_type size_type
Definition: spatial.h:1330
const self & operator-=(difference_type n)
Move this iterator backward by n elements.
Definition: spatial.h:1538
self & operator++()
Pre-increment.
Definition: spatial.h:1445
self operator+(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1505
Gis_wkb_vector_const_iterator(index_type idx, const owner_t *owner)
Definition: spatial.h:1357
std::random_access_iterator_tag iterator_category
Definition: spatial.h:1337
ptrdiff_t index_type
Definition: spatial.h:1320
self & operator--()
Pre-decrement.
Definition: spatial.h:1469
bool operator>(const self &itr) const
Greater comparison operator.
Definition: spatial.h:1420
index_type m_curidx
Current element's index, starting from 0.
Definition: spatial.h:1626
self operator++(int)
Post-increment.
Definition: spatial.h:1456
owner_t * m_owner
The owner container of this iteraotr.
Definition: spatial.h:1628
difference_type operator-(const self &itr) const
Iterator distance operator.
Definition: spatial.h:1553
self operator--(int)
Post-decrement.
Definition: spatial.h:1481
Gis_wkb_vector_const_iterator()
Definition: spatial.h:1352
difference_type distance_type
Definition: spatial.h:1329
const self & operator+=(difference_type n)
Move this iterator forward by n elements.
Definition: spatial.h:1515
T value_type
Definition: spatial.h:1327
bool operator<=(const self &itr) const
Less equal comparison operator.
Definition: spatial.h:1409
pointer operator->() const
Arrow operator.
Definition: spatial.h:1582
ptrdiff_t difference_type
Definition: spatial.h:1328
reference operator*() const
Dereference operator.
Definition: spatial.h:1570
bool operator<(const self &itr) const
Less than comparison operator.
Definition: spatial.h:1401
reference operator[](difference_type offset) const
Iterator index operator.
Definition: spatial.h:1595
self operator-(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1527
value_type * pointer
Definition: spatial.h:1334
bool operator!=(const self &itr) const
Unequal compare, identical to !operator(==itr)
Definition: spatial.h:1395
Gis_wkb_vector_const_iterator(const self &vi)
Definition: spatial.h:1347
This class is the iterator class for Gis_wkb_vector, its instances can be used to mutate their refere...
Definition: spatial.h:1640
difference_type distance_type
Definition: spatial.h:1650
Gis_wkb_vector_iterator(const base &obj)
Definition: spatial.h:1668
Gis_wkb_vector_iterator(index_type idx, const owner_t *owner)
Definition: spatial.h:1670
ptrdiff_t index_type
Definition: spatial.h:1647
self operator-(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1770
value_type & reference
Definition: spatial.h:1651
Gis_wkb_vector_iterator(const self &vi)
Definition: spatial.h:1664
const self & operator-=(difference_type n)
Move this iterator forward by n elements.
Definition: spatial.h:1782
value_type * pointer
Definition: spatial.h:1652
std::random_access_iterator_tag iterator_category
Definition: spatial.h:1654
reference operator*() const
Dereference operator.
Definition: spatial.h:1815
pointer operator->() const
Arrow operator.
Definition: spatial.h:1827
self operator++(int)
Post-increment.
Definition: spatial.h:1702
Gis_wkb_vector_const_iterator< T > base
Definition: spatial.h:1643
const self & operator+=(difference_type n)
Move this iterator backward by n elements.
Definition: spatial.h:1757
Gis_wkb_vector< T > owner_t
Definition: spatial.h:1644
Gis_wkb_vector_iterator()
Definition: spatial.h:1666
self operator+(difference_type n) const
Iterator movement operator.
Definition: spatial.h:1746
ptrdiff_t difference_type
Definition: spatial.h:1649
self & operator--()
Pre-decrement.
Definition: spatial.h:1712
const self & operator=(const self &itr)
Assignment operator.
Definition: spatial.h:1732
reference operator[](difference_type offset) const
Iterator index operator.
Definition: spatial.h:1839
self & operator++()
Pre-increment.
Definition: spatial.h:1694
self operator--(int)
Post-decrement.
Definition: spatial.h:1720
difference_type operator-(const self &itr) const
Iterator distance operator.
Definition: spatial.h:1798
~Gis_wkb_vector_iterator()=default
T value_type
Definition: spatial.h:1648
Gis_wkb_vector class template definition.
Definition: spatial.h:1902
const_iterator end() const
Create an open boundary iterator.
Definition: spatial.h:1961
size_t size_type
Definition: spatial.h:1912
iterator end()
Create an open boundary iterator.
Definition: spatial.h:1953
const_reference back() const
Definition: spatial.h:1978
void set_geo_vect(Geo_vector *ptr)
Definition: spatial.h:2059
iterator begin()
Definition: spatial.h:1933
T value_type
Definition: spatial.h:1909
const_iterator begin() const
Create a const iterator.
Definition: spatial.h:1944
ptrdiff_t index_type
Definition: spatial.h:1905
bool reverse_coordinates() override
Reverses the coordinates of a geometry.
Definition: spatial.h:2080
const_reference operator[](index_type i) const
Definition: spatial.h:1998
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:4149
const T * const_pointer
Definition: spatial.h:1913
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:4515
ptrdiff_t difference_type
Definition: spatial.h:1917
size_t get_nbytes_free() const
Get number of free bytes in the buffer held by m_ptr.
Definition: spatial.cc:4622
Gis_wkb_vector< Gis_point > Linestring
Definition: spatial.h:2090
size_t current_size() const
Returns payload number of bytes of the topmost geometry holding this geometry, i.e.
Definition: spatial.cc:4609
void donate_data() override
Definition: spatial.h:2066
void clear()
Update support We suppose updating a geometry can happen in the following ways:
Definition: spatial.cc:4584
reference back()
Definition: spatial.h:1988
bool validate_coordinate_range(double, bool *, bool *, double *) override
Check that the coordinates of a geometry is within the valid range.
Definition: spatial.h:2084
void clear_wkb_data()
Definition: spatial.h:2042
Gis_wkb_vector_iterator< T > iterator
Definition: spatial.h:1911
const T & const_reference
Definition: spatial.h:1914
self & operator=(const self &rhs)
Deep assignment from vector 'rhs' to this object.
Definition: spatial.cc:4438
Gis_wkb_vector_const_iterator< T > const_iterator
Definition: spatial.h:1910
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:1926
size_type size() const
Get container size.
Definition: spatial.h:1971
T * pointer
Definition: spatial.h:1915
~Gis_wkb_vector() override
Definition: spatial.h:2020
void resize(size_t sz)
Definition: spatial.cc:4784
Geometry base
Definition: spatial.h:1906
bool empty() const
Definition: spatial.h:1976
Geo_vector * get_geo_vect(bool create_if_null=false)
Definition: spatial.h:2052
reference operator[](index_type i)
Definition: spatial.h:2006
void set_ptr(void *ptr, size_t len)
Definition: spatial.cc:4539
Geo_vector * get_geo_vect() const
Definition: spatial.h:2057
Gis_wkb_vector< Linestring > Multi_linestrings
Definition: spatial.h:2091
T & reference
Definition: spatial.h:1916
Geometry_vector< T > Geo_vector
Definition: spatial.h:1919
void push_back(const T &val)
Definition: spatial.cc:4645
Gis_wkb_vector()
Definition: spatial.h:2018
Utility container class to store elements stably and scalably.
Definition: inplace_vector.h:60
const objtype & back() const
STL std::vector::back interface.
Definition: inplace_vector.h:225
size_t size() const
STL std::vector::size interface.
Definition: inplace_vector.h:199
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
bool append(const String &s)
Definition: sql_string.cc:419
bool reserve(size_t space_needed)
Definition: sql_string.h:578
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: spatial.h:2456
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:2485
virtual ~WKB_scanner_event_handler()=default
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4573
Point with coordinates X and Y.
Definition: spatial.h:62
point_xy(double x_arg, double y_arg)
Definition: spatial.h:67
bool eq(point_xy p) const
Compare to another point.
Definition: spatial.h:73
double x
Definition: spatial.h:64
double distance(const point_xy &p) const
Distance to another point.
Definition: spatial.cc:179
double y
Definition: spatial.h:65
const char * p
Definition: ctype-mb.cc:1225
#define U
Definition: ctype-tis620.cc:74
static constexpr unsigned PSI_INSTRUMENT_ME
Definition: psi_bits.h:43
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
Functions for reading and storing in machine-independent format.
void float8store(char *V, double M)
Definition: my_byteorder.h:210
double float8get(const char *M)
Definition: my_byteorder.h:206
void int4store(char *pT, uint32 A)
Definition: my_byteorder.h:180
uint32 uint4korr(const char *pT)
Definition: my_byteorder.h:152
Header for compiler-dependent features.
#define SUPPRESS_UBSAN
Definition: my_compiler.h:123
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
uint64_t uint64
Definition: my_inttypes.h:69
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
#define UINT_MAX32
Definition: my_inttypes.h:79
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
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:76
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:36
std::uint32_t srid_t
A spatial reference system ID (SRID).
Definition: srid.h:33
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
Performance schema instrumentation interface.
required string type
Definition: replication_group_member_actions.proto:34
wkbByteOrder
Definition: sp_defs.h:45
wkbType
Definition: sp_defs.h:35
const uint SRID_SIZE
Definition: spatial.h:51
const uint SIZEOF_STORED_DOUBLE
Definition: spatial.h:52
const uint WKB_HEADER_SIZE
Definition: spatial.h:54
Gis_polygon_ring * outer_ring(const Geometry *g)
Definition: spatial.h:2180
void * gis_wkb_realloc(void *p, size_t sz)
Definition: spatial.cc:65
void gis_wkb_free(void *p)
Definition: spatial.h:205
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:1084
const uint GEOM_HEADER_SIZE
Definition: spatial.h:55
const uint GEOM_DIM
Definition: spatial.h:50
void set_byte_order(void *p0, Geometry::wkbByteOrder bo)
Definition: spatial.h:1073
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:799
const uint32 GET_SIZE_ERROR
Definition: spatial.h:57
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:3804
Geometry::wkbByteOrder get_byte_order(const void *p0)
Definition: spatial.h:1066
void * gis_wkb_alloc(size_t sz)
Definition: spatial.cc:57
bool polygon_is_packed(Geometry *plgn, Geometry *mplgn)
Check whether plgn is packed into its owner mplgn's WKB buffer.
Definition: spatial.cc:2287
void gis_wkb_raw_free(void *p)
Definition: spatial.h:211
void own_rings(Geometry *geo)
Definition: spatial.cc:2308
char * write_wkb_header(void *p0, Geometry::wkbType geotype)
Definition: spatial.h:1096
const uint POINT_DATA_SIZE
Definition: spatial.h:53
struct wkb_header_st wkb_header
char * write_geometry_header(void *p0, gis::srid_t srid, Geometry::wkbType geotype)
Definition: spatial.h:1112
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:1856
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:2220
void * gis_wkb_fixed_alloc(size_t sz)
Definition: spatial.h:201
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:29
Gis_polygon objects and Gis_wkb_vector<> objects are of same size, and Gis_point and Geometry objects...
Definition: spatial.h:2452
char data[sizeof(Gis_polygon)]
Definition: spatial.h:2453
double xmin
Definition: spatial.h:84
int covered_by(const MBR *mbr) const
Definition: spatial.h:136
MBR()
Definition: spatial.h:86
int equals(const MBR *mbr) const
Definition: spatial.h:118
int dimension() const
The dimension maps to an integer as:
Definition: spatial.h:156
MBR(const double xmin_arg, const double ymin_arg, const double xmax_arg, const double ymax_arg)
Definition: spatial.h:91
MBR(const point_xy &min, const point_xy &max)
Definition: spatial.h:95
int contains(const MBR *mbr) const
Definition: spatial.h:134
int overlaps(const MBR *mbr) const
Definition: spatial.h:172
void add_xy(point_xy p)
Definition: spatial.h:105
void add_xy(double x, double y)
Definition: spatial.h:98
void add_xy(const char *px, const char *py)
Definition: spatial.h:106
double ymax
Definition: spatial.h:84
int within(const MBR *mbr) const
Definition: spatial.cc:75
int covers(const MBR *mbr) const
Definition: spatial.h:142
bool inner_point(double x, double y) const
Definition: spatial.h:144
double xmax
Definition: spatial.h:84
double ymin
Definition: spatial.h:84
int intersects(const MBR *mbr) const
Definition: spatial.h:130
void add_mbr(const MBR *mbr)
Definition: spatial.h:111
int disjoint(const MBR *mbr) const
Definition: spatial.h:124
Definition: mysql_lex_string.h:40
size_t length
Definition: mysql_lex_string.h:42
#define NULL
Definition: types.h:55
void q_append(const char c, String *str)
Definition: unsafe_string_append.h:35
void qs_append(const char *str_in, size_t len, String *str)
Definition: sql_string.cc:650
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:510
int n
Definition: xcom_base.cc:509