public static string GetSectorImagePath(ISector sector, string root = null) { if (root == null) { root = GetRenderRoot(); } if (sector is MercatorSector) { var parent = sector.GetChildrenAtLevel(sector.Zoom + 1)[0].GetAllParents().Where(x => x.Zoom == 10); var parent5 = sector.GetChildrenAtLevel(sector.Zoom + 1)[0].GetAllParents().Where(x => x.Zoom == 5); if (parent.Count() != 0) { return(Path.Combine(root, parent5.Single().ToString(), parent.Single().ToString() + ".PNG")); } if (parent5.Count() != 0) { return(Path.Combine(root, parent5.Single().ToString(), sector.ToString() + ".PNG")); } return(Path.Combine(root, sector.ToString() + ".PNG")); } if (sector is CubeSector) { var parent = sector.GetChildrenAtLevel(sector.Zoom + 1)[0].GetAllParents().Where(x => x.Zoom == 8); var parent4 = sector.GetChildrenAtLevel(sector.Zoom + 1)[0].GetAllParents().Where(x => x.Zoom == 4); if (parent.Count() != 0) { return(Path.Combine(root, ((CubeSector)sector).sectorFace.GetFaceAcronym() + "Face", parent4.Single().ToString(), parent.Single().ToString() + ".PNG")); } if (parent4.Count() != 0) { return(Path.Combine(root, ((CubeSector)sector).sectorFace.GetFaceAcronym() + "Face", parent4.Single().ToString(), sector.ToString() + ".PNG")); } return(Path.Combine(root, ((CubeSector)sector).sectorFace.GetFaceAcronym() + "Face", sector.ToString() + ".PNG")); } throw new NotImplementedException(); }
public override string ToString() { return("BigTrees, " + sector.ToString()); }
public override string ToString() { return("HotDay, " + sector.ToString()); }
public override string ToString() { return(sector.ToString()); }
public override string ToString() { return("Dia lluvioso, " + sector.ToString()); }
public override string ToString() { return "Gente asustada, " + sector.ToString(); }
public override string ToString() { return("Mucho viento, " + sector.ToString()); }
public override string ToString() { return("ScaredPeople, " + sector.ToString()); }
public override string ToString() { return("Arboles grandes, " + sector.ToString()); }
public override string ToString() { return("DryGrass, " + sector.ToString()); }
internal static void ConvertHGTZIPsToHGTZIP(ISector sector, string rootFolder, bool overwrite) { string outputPath = Path.Combine(rootFolder, sector.GetAllParents().Where(x => x.Zoom == 4).Single().ToString(), sector.ToString() + ".HGT.ZIP"); if (!overwrite && File.Exists(outputPath)) { return; } int[,] shorts = ConvertHGTZIPsToShorts(sector); byte[] outputBytes = new byte[REZ * REZ * 2]; for (int x = 0; x < REZ; x++) { for (int y = 0; y < REZ; y++) { outputBytes[(REZ * y + x) * 2] = (byte)(shorts[x, y] / 256); outputBytes[(REZ * y + x) * 2 + 1] = (byte)(shorts[x, y] % 256); } } string directoryName = Path.GetDirectoryName(outputPath); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } Compression.ZipToFile(outputPath, outputBytes); }
public override string ToString() { return("Pasto seco, " + sector.ToString()); }
public override string ToString() { return("RainingDay, " + sector.ToString()); }
public override string ToString() { return("Mucho calor, " + sector.ToString()); }