项目报错提示:

Binary geometry function st_contains given two geometries of different srids: 0 and 4326

报错原因:数据库中srids值有两种,一种是0,一种是4326,统一一下即可。


geoserver总算报这个错误,找不到原因,露眼是看不出来的,需要用下面的函数进行转换。


解决方案:

UPDATE 表名 SET the_geom = ST_GEOMFROMTEXT(ST_ASTEXT(the_geom), 4326)

UPDATE 表名 SET geometry = ST_GEOMFROMTEXT(ST_ASTEXT(geometry), 4326)