move out geo area tests

Signed-off-by: tison <wander4096@gmail.com>
This commit is contained in:
tison
2023-06-07 09:49:08 +08:00
parent 71efb31941
commit 336a58a43a
4 changed files with 36 additions and 27 deletions

View File

@ -0,0 +1,15 @@
# ----------------------------------------------------------------------
# Test of GEOMETRY AREA.
# ----------------------------------------------------------------------
drop table if exists gis_polygon;
create table if not exists gis_polygon (
poly Polygon not null srid 4396
);
insert into gis_polygon values (ST_srid(ST_GeomFromText('Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))'), 4396));
select area(poly) from gis_polygon;
area(poly)
4
select st_area(poly) from gis_polygon;
st_area(poly)
4
drop table if exists gis_polygon;

View File

@ -132,15 +132,3 @@ Outputs & filters:
range_key([gis_point_alias.__pk_increment]), range(MIN ; MAX), range_key([gis_point_alias.__pk_increment]), range(MIN ; MAX),
range_cond([gis_point_alias.__pk_increment = :0]) range_cond([gis_point_alias.__pk_increment = :0])
drop table if exists gis_point; drop table if exists gis_point;
drop table if exists gis_polygon;
create table if not exists gis_polygon (
poly Polygon not null srid 4396
);
insert into gis_polygon values (ST_srid(ST_GeomFromText('Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))'), 4396));
select area(poly) from gis_polygon;
area(poly)
4
select st_area(poly) from gis_polygon;
st_area(poly)
4
drop table if exists gis_polygon;

View File

@ -0,0 +1,21 @@
#owner: ht353245
#owner group: shenzhen
--echo # ----------------------------------------------------------------------
--echo # Test of GEOMETRY BASIC.
--echo # ----------------------------------------------------------------------
--source mysql_test/test_suite/geometry/t/import_default_srs_data_mysql.inc
--disable_warnings
drop table if exists gis_polygon;
--enable_warnings
create table if not exists gis_polygon (
poly Polygon not null srid 4396
);
insert into gis_polygon values (ST_srid(ST_GeomFromText('Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))'), 4396));
select area(poly) from gis_polygon;
select st_area(poly) from gis_polygon;
drop table if exists gis_polygon;

View File

@ -111,18 +111,3 @@ call geom_insert(10000);
explain select x,y,st_astext(poi) from gis_point order by x,y desc limit 1; explain select x,y,st_astext(poi) from gis_point order by x,y desc limit 1;
drop table if exists gis_point; drop table if exists gis_point;
--disable_warnings
drop table if exists gis_polygon;
--enable_warnings
create table if not exists gis_polygon (
poly Polygon not null srid 4396
);
insert into gis_polygon values (ST_srid(ST_GeomFromText('Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))'), 4396));
select area(poly) from gis_polygon;
select st_area(poly) from gis_polygon;
drop table if exists gis_polygon;