我的github

第一步:为postgis添加geometry类型字段

第二步:设置属性 set the_geom = make_point()

1. select AddGeometryColumn('tablename','the_geom',4326, 'POINT', 2);//三维点的话这里2要改成3

2. UPDATE chp01.firenews SET the_geom = ST_SetSRID(ST_MakePoint(x,y), 4326);//三维点的话是ST_MakePoint(x,y,z)

参考:https://www.cnblogs.com/2008nmj/p/14839911.html

           https://blog.csdn.net/An1090239782/article/details/123509658

>>ST_SetSRID:设置几何图形的SRID。

>>2d点转3d点:先删除geom,再根据属性lgtd,lttd,elevation生成the_geom属性。

发布geoserver服务之前,the_geom要改为geom。

posted on 2022-12-26 16:05  XiaoNiuFeiTian  阅读(367)  评论(0编辑  收藏  举报