地理空间查询准备工作
- 创建DLI表geotbl:
create table geotbl(id String,name String,loadtime date,location String)
- 向表中插入数据若干,其中location字段插入以WKT字符串表示的空间数据坐标串。例如:
insert into geotbl select '1','amy','2015-05-01','POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'
insert into geotbl select '2','amy','2015-05-01','POLYGON ((60 10,70 60,80 0,60 10))'
insert into geotbl select '3','amy','2015-05-01','MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))'
insert into geotbl select '4','amy','2015-05-01','POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10),(20 30, 35 35, 30 20, 20 30))'
insert into geotbl select '5','amy','2015-05-01','LINESTRING (30 10, 40 40, 20 40, 10 20, 30 10)'
insert into geotbl select '6','amy','2015-05-01','POINT (11 22)'
insert into geotbl select '7','amy','2015-05-01','MULTILINESTRING ((30 10, 40 40, 20 40, 10 20, 30 10),(30 10, 40 40, 20 40, 10 20, 30 10))'
insert into geotbl select '8','amy','2015-05-01','MULTIPOINT ((11 22),(10 22))'
后续空间查询的示例将基于这个表进行展示。

当前版本不支持直接创建有空间类型字段的表和空间数据批量导入。
