问题描述:
PostGIS中将导入的shapefile插入另一张表后执行更新操作时报错:
Operation on mixed SRID geometries
原因:
导入shp时没有指定相应的SRID,会造成入库数据中SRID取值为-1
解决方法:
需要在执行插入命令时对geom字段设置srid
insert into table_a("id","name","geom")
SELECT "adminid","name",st_setsrid("geom",4326) from table_b