添加投影坐标系 修复SRID错误
//import { Projection, addProjection } from 'ol/proj'
import proj4 from 'proj4';
import epsg from 'epsg';
import { register } from 'ol/proj/proj4';
function add_epsg() {
var srsName = SRS;
proj4.defs(srsName, epsg[srsName]);
register(proj4);
}
add_epsg();
see
https://blog.csdn.net/qq_42248939/article/details/102687311
https://blog.csdn.net/freeland1/article/details/78579813
GeoServer WFS查询报错org.postgresql.util.PSQLException:错误: Operation on mixed SRID geometries
从shpfile导入数据库时,SRID未设置(默认为0),需要手动设置:
select UpdateGeometrySRID('shp_video', 'geom', 4549);
select st_srid(geom),gid from shp_video;
或者通过QGIS导入:
see
https://www.cnblogs.com/giser-s/p/11528595.html
https://www.136.la/mysql/show-44408.html
https://blog.csdn.net/duanmuxiao/article/details/38902071