PostGIS 测试 - 曲线多边形(CURVEPOLYGON)

1.建表

CREATE TABLE curvepolygontable ( 
  id SERIAL PRIMARY KEY,
  name VARCHAR(128),
   geom GEOMETRY(CURVEPOLYGON, 26910)
);

2.添加GIST索引

CREATE INDEX curvepolygontable_gix ON curvepolygontable USING GIST (geom); 

3.插入数据

INSERT INTO curvepolygontable (name, geom) VALUES ('p1',
  ST_GeomFromText('CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0),CIRCULARSTRING(0 0, 1 0, 1 1,0 1, 0 0))', 26910)
);

INSERT INTO curvepolygontable (name, geom) VALUES ('p2',
  ST_GeomFromText('CURVEPOLYGON(CIRCULARSTRING(7 0, 9 0, 9 4, 7 4, 7 0), (7 0, 9 0, 8 2, 7 0))', 26910)
);

4.QGIS中显示几何数据

  PostGIS 测试 - 曲线多边形(CURVEPOLYGON)_第1张图片

你可能感兴趣的:(PostGIS)