1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Added GIS extension

BitKeeper/etc/ignore:
  Added myisam/rt_test myisam/sp_test to the ignore list
This commit is contained in:
unknown
2002-02-22 15:24:42 +04:00
parent 3d5dc65dfd
commit 32a08516c9
31 changed files with 3674 additions and 48 deletions

View File

@ -570,3 +570,82 @@ inline Item *and_conds(Item *a,Item *b)
cond->update_used_tables();
return cond;
}
/**************************************************************
Spatial relations
***************************************************************/
class Item_func_spatial_rel :public Item_bool_func2
{
enum Functype spatial_rel;
public:
Item_func_spatial_rel(Item *a,Item *b, enum Functype sp_rel) :
Item_bool_func2(a,b) { spatial_rel = sp_rel; }
longlong val_int();
enum Functype functype() const
{
switch (spatial_rel)
{
case SP_CONTAINS_FUNC:
return SP_WITHIN_FUNC;
case SP_WITHIN_FUNC:
return SP_CONTAINS_FUNC;
default:
return spatial_rel;
}
}
enum Functype rev_functype() const { return spatial_rel; }
const char *func_name() const
{
switch (spatial_rel)
{
case SP_CONTAINS_FUNC:
return "contains";
case SP_WITHIN_FUNC:
return "within";
case SP_EQUALS_FUNC:
return "equals";
case SP_DISJOINT_FUNC:
return "disjoint";
case SP_INTERSECTS_FUNC:
return "intersects";
case SP_TOUCHES_FUNC:
return "touches";
case SP_CROSSES_FUNC:
return "crosses";
case SP_OVERLAPS_FUNC:
return "overlaps";
default:
return "sp_unknown";
}
}
};
class Item_func_isempty :public Item_bool_func
{
public:
Item_func_isempty(Item *a) :Item_bool_func(a) {}
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
const char *func_name() const { return "isempty"; }
};
class Item_func_issimple :public Item_bool_func
{
public:
Item_func_issimple(Item *a) :Item_bool_func(a) {}
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
const char *func_name() const { return "issimple"; }
};
class Item_func_isclosed :public Item_bool_func
{
public:
Item_func_isclosed(Item *a) :Item_bool_func(a) {}
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
const char *func_name() const { return "isclosed"; }
};