Ejemplo n.º 1
0
        private void InitLocationArgs(AbstractWarpDataset srcRaster)
        {
            double nReslution = 5000;
            var    infoDic    = srcRaster.TryReadDataTable(fileInfo);
            string proj       = "+proj=geos +no_defs +a=6378137.0 +b=6356752.3 +h=35785863";// +h=35785863 +a=6378137.0 +b=6356752.3 +lon_0={0} ";

            if (infoDic.ContainsKey("NOMCenterLon"))
            {
                proj += string.Format(" +lon_0={0}", infoDic["NOMCenterLon"]);
            }
            else
            {
                proj += string.Format(" +lon_0={0}", infoDic["104.5"]);
            }

            double[] geoTransform = new double[6];
            geoTransform[0] = -5720000;
            geoTransform[1] = nReslution;
            geoTransform[2] = 0;
            geoTransform[3] = 5720000 - 0 * nReslution;
            geoTransform[4] = 0;
            geoTransform[5] = -nReslution;
            _srcSpatialRef  = new SpatialReference("");
            _srcSpatialRef.ImportFromProj4(proj);
            _srcGeoTrans = geoTransform;
        }