PG+PostGIS 使用笔记1
发布网友
发布时间:2023-05-01 13:57
我来回答
共1个回答
热心网友
时间:2023-10-12 04:26
1、空间扩展语句
CREATE EXTENSION postgis;
CREATE EXTENSION pgrouting;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION postgis_tiger_geocoder;
CREATE EXTENSION address_standardizer;
3、插入数据
//插入点数据
insert into lkdl (id, mc, type, glid, remark, geom) values (10,'路口10','路口',0,'',st_geometryfromtext('POINT(118.424799777229 31.3672389990829)',4326));
//插入线数据
MULTILINESTRING((117.283233641008 31.8687840943519,117.28283746075 31.8675455848983))
//插面线数据
"MULTIPOLYGON(((117.27181976314 31.8572903062516,117.272516945214 31.8573854846919,117.272640677187 31.8566835436949,117.271950633495 31.8565788474108,117.27181976314 31.8572903062516)))"