PostgreSQL创建空间数据库

创建数据库


添加postgis扩展,使之成为支持空间类型的空间数据库

create extension postgis

字段设置为geometry类型

插入空间数据

insert into test(id,shape) values(1,point(12.32232442,43.2324535)::geometry);

查询空间数据

insert into test(id,shape) values(1,point(12.32232442,43.2324535)::geometry);

原文地址:https://www.cnblogs.com/jiefu/p/13904912.html