Exemplo n.º 1
0
        public static string GetPrjFileName(string outDir, string filename, SpatialReference projRef, string blockname)
        {
            string outFileNmae   = "";
            string orbitFilename = Path.GetFileName(filename);
            string prjIdentify;

            prjIdentify = GetPrjShortName(projRef);
            string otname = new GenericFilename().PrjBlockFilename(orbitFilename, prjIdentify, blockname, ".tif");

            outFileNmae = Path.Combine(outDir, otname);
            return(CreateOnlyFilename(outFileNmae));
        }
Exemplo n.º 2
0
        private static string GetPrjShortName(SpatialReference projRef)
        {
            string prjIdentify;

            if (projRef == null || string.IsNullOrWhiteSpace(projRef.__str__()))
            {
                prjIdentify = "GLL";
            }
            else if (projRef.IsGeographic() == 1)
            {
                prjIdentify = GenericFilename.GetProjectionIdentify(projRef.GetAttrValue("GEOGCS", 0));
            }
            else
            {
                prjIdentify = GenericFilename.GetProjectionIdentify(projRef.GetAttrValue("PROJCS", 0));
            }
            return(prjIdentify);
        }
Exemplo n.º 3
0
        public static string GetL1PrjFilenameWithOutDir(string orbitFilename, string satellite, string sensor,
                                                        DateTime orbitTime, string prjIdentify, string blockName, float resolution)
        {
            if (string.IsNullOrWhiteSpace(satellite) || string.IsNullOrWhiteSpace(sensor))
            {
                string filename = new GenericFilename().PrjBlockFilename(orbitFilename, prjIdentify, blockName, ".ldf");
                return(Path.GetFileName(filename));
            }

            return(string.Format("{0}_{1}_{2}_{3}_{4}_{5}_{6}_{7}.ldf",
                                 satellite,
                                 sensor,
                                 blockName,
                                 prjIdentify,
                                 "L1",
                                 orbitTime.ToString("yyyyMMdd"),
                                 orbitTime.ToString("HHmm"),
                                 prjIdentify == "GLL" ? GLLResolutionIdentify(resolution) : ResolutionIdentify(resolution)
                                 ));
        }