geotools 将sharpfile导入postgis碰到的问题
问题:ERROR: new row for relation “mainriver” violates check constraint “enforce_geotype_the_geom”
解决:在postgis中对应表中的 CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = ‘MULTIPOLYGONM’::text OR the_geom IS NULL) 加入geometrytype(the_geom) = ‘POLYGONM’::text
如:CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = ‘POLYGONM’::text OR geometrytype(the_geom) = ‘MULTIPOLYGONM’::text OR the_geom IS NULL)
或直接去掉
本文版权属www.e7oo.com所有,如需转载请注明出处!
本文链接:http://www.e7oo.com/blog/5d670af1314115dc0131411fd42a000a.htm
转载自:https://blog.csdn.net/cason0308/article/details/83497640