最近利用GDAL的gdalwarp来切图,却总是出现
Cannot compute bounding box of cutline
经过许久的验证,发现是用来Grid时候的Postgis的某个表检查约束丢失引起的,加入以下约束,成功!
ALTER TABLE xx ADD CONSTRAINT enforce_dims_the_geom CHECK ((st_ndims(the_geom) = 2));
ALTER TABLE xx ADD CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text OR the_geom IS NULL);
ALTER TABLE xx ADD CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326);