MySQL 5.6是否支持3D点?

时间:2018-07-25 19:23:51

标签: mysql django sqlite geodjango

最近,我一直在尝试从sqlite迁移到MySQL 5.6(5.7的GIS字段有问题)。我意识到我的3D点都没有导入到MySQL数据库中,因此我进入并手动尝试使用Django dumpdata输出来更新行,但显然它不接受3d点,并且未给出任何警告或错误。 >

我应该切换到另一个数据库系统吗?我在做错什么吗?

mysql> UPDATE entrance SET location=GeomFromText("POINT Z (32.077624 36.58562 123)") WHERE id=1;
Query OK, 0 rows affected (0.03 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql> UPDATE entrance SET location=GeomFromText("POINT(32.077624 36.58562)") WHERE id=1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> SHOW COLUMNS FROM entrance;
+---------------------------+--------------+------+-----+---------+----------------+
| Field                     | Type         | Null | Key | Default | Extra          
|
+---------------------------+--------------+------+-----+---------+----------------+
...
| location                  | point        | YES  |     | NULL    |           
...

0 个答案:

没有答案