public static string GetPrjFileName(string outDir, string filename, ISpatialReference projRef, string blockname) { string outFileNmae = ""; string orbitFilename = Path.GetFileName(filename); string prjIdentify; prjIdentify = GetPrjShortName(projRef); string otname = new GenericFilename().PrjBlockFilename(orbitFilename, prjIdentify, blockname, ".ldf"); outFileNmae = Path.Combine(outDir, otname); return(CreateOnlyFilename(outFileNmae)); }
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) )); }
private static string GetPrjShortName(ISpatialReference projRef) { string prjIdentify; if (projRef == null || string.IsNullOrWhiteSpace(projRef.Name)) { prjIdentify = "GLL"; } else if (projRef.ProjectionCoordSystem == null) { prjIdentify = GenericFilename.GetProjectionIdentify(projRef.GeographicsCoordSystem.Name); } else { prjIdentify = GenericFilename.GetProjectionIdentify(projRef.ProjectionCoordSystem.Name.Name); } return(prjIdentify); }