//获取shp投影方式 public ICoordinateTransformation getmapTransform(config.ProjPara proj) { CoordinateTransformationFactory ctFac = new CoordinateTransformationFactory(); CoordinateSystemFactory cFac = new CoordinateSystemFactory(); ICoordinateTransformation transform = null; //等经纬,shp数据原始投影 var epsg4326 = cFac.CreateFromWkt("GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_84\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"); //目标坐标系 var epsg3857 = cFac.CreateFromWkt(getSrcCoordinate(proj)); transform = ctFac.CreateFromCoordinateSystems(epsg4326, epsg3857); return(transform); }
public void setCfg(config incfg) { cfg = incfg; pjPara = incfg.pjPara; }