我想用Postgresql 10处理多边形
创建了表格
CREATE TABLE "public"."geometry_test" (
"position" point,
"polygon" polygon,
"id" int2 NOT NULL DEFAULT nextval('geometry_test_id_seq'::regclass)
)
并插入多边形数据
INSERT INTO geometry_test ("polygon") VALUES ( ST_PolygonFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))') )
但是,据说这是一个几何。
ERROR: column "polygon" is of type polygon but expression is of type geometry
LINE 1: INSERT INTO geometry_test ("polygon") VALUES ( ST_PolygonFro...
^
HINT: You will need to rewrite or cast the expression.
如何返回多边形类型?
目标是确定多边形中是否存在点
x86_64-pc-linux-gnu上的PostgreSQL 10.6,由gcc(GCC)4.9.3,64位编译
PosyGIS版本:2.4 USE_GEOS = 1 USE_PROJ = 1 USE_STATS = 1
谢谢