CSV Importer erweitert.
HAUSREV6.0 Implementiert
This commit is contained in:
@@ -14,8 +14,8 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
|
||||
{
|
||||
public async Task<bool> Export(string projektname,EKodierungssystem kodierungssystem, List<Kanal> haltungen, List<Schacht> schaechte, IWWLog log)
|
||||
{
|
||||
KANDIS_HALTUNG60 haltung = new KANDIS_HALTUNG60(projektname, haltungen,log);
|
||||
KANDIS_SCHACHT60 schacht = new KANDIS_SCHACHT60(projektname, schaechte,log);
|
||||
KANDIS_HALTUNG60 haltung = new KANDIS_HALTUNG60(projektname, haltungen, log);
|
||||
KANDIS_SCHACHT60 schacht = new KANDIS_SCHACHT60(projektname, schaechte, log);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,12 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
|
||||
{
|
||||
public static Dictionary<string, int> LineSize = new Dictionary<string, int>()
|
||||
{
|
||||
{ "KANSCH4.0",557 },
|
||||
{ "KANSCH6.0",2041 },
|
||||
{ "KANHAL4.0",530 },
|
||||
{ "KANHAL6.0",2167 }
|
||||
{ "KANSCH4.0", 557 },
|
||||
{ "KANSCH6.0", 2041 },
|
||||
{ "KANHAL4.0", 530 },
|
||||
{ "KANHAL6.0", 2167 },
|
||||
{ "HAUSREV4.0", 355 },
|
||||
{ "HAUSREV6.0", 1708 }
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +30,8 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
|
||||
public enum kType
|
||||
{
|
||||
HALTUNG,
|
||||
SCHACHT
|
||||
SCHACHT,
|
||||
REVSCHACHT
|
||||
}
|
||||
|
||||
private StreamWriter sw;
|
||||
@@ -63,6 +66,15 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
|
||||
}
|
||||
}
|
||||
break;
|
||||
case kType.REVSCHACHT:
|
||||
{
|
||||
switch(exportType)
|
||||
{
|
||||
case EExportType.KANDIS4: version = "HAUSREV4.0"; break;
|
||||
case EExportType.KANDIS6: version = "HAUSREV6.0"; break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ExporterHelper.LineSize.ContainsKey(version))
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using SewerStammGen.Shared.Contracts;
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.Shared.Enum;
|
||||
|
||||
namespace WWTech_KanalSchnittstelle.Exporter.Kandis
|
||||
{
|
||||
internal class KANDIS_HAUSREV60 : KANDIS_Exporter
|
||||
{
|
||||
public KANDIS_HAUSREV60(string filename, List<Schacht> schaechte, IWWLog log) : base(filename + ".rev", EExportType.KANDIS6, kType.REVSCHACHT, log)
|
||||
{
|
||||
foreach(Schacht schacht in schaechte)
|
||||
{
|
||||
WriteContent(new Tuple<uint, uint>(3, 17), schacht.Objektbezeichnung);
|
||||
WriteContent(new Tuple<uint, uint>(19, 28), "ABW"); // Revisionschachtart
|
||||
WriteContent(new Tuple<uint, uint>(30, 39), "K"); // Kanalart
|
||||
WriteContent(new Tuple<uint, uint>(41, 50), "S"); // Entwässerungskennzeichen
|
||||
WriteContent(new Tuple<uint, uint>(52, 61), "IB");
|
||||
WriteContent(new Tuple<uint, uint>(191, 198), schacht.DeckelHoehe.ToString()); // Deckelhöhe
|
||||
WriteContent(new Tuple<uint, uint>(200, 209), "1"); // Status Deckelhöhe
|
||||
WriteContent(new Tuple<uint, uint>(211,218), schacht.SohlHoehe.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(220, 229), "1"); // Status Sohlhöhe
|
||||
// Schachtmittelpunktkoordinaten
|
||||
WriteContent(new Tuple<uint, uint>(293,307), schacht.SohlRechtsWert.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(309, 323), schacht.SohlHochWert.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(325, 334), "1"); // Status Schachtmittelkoordinaten
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,8 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
|
||||
WriteContent(new Tuple<uint, uint>(210, 217), schacht.SohlHoehe.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(219, 228), "1"); // Status Sohlhöhe
|
||||
// Schachtmittelpunktkoordinaten
|
||||
WriteContent(new Tuple<uint, uint>(284, 298), schacht.DeckelRechtsWert.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(300, 314), schacht.DeckelHochWert.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(284, 298), schacht.SohlRechtsWert.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(300, 314), schacht.SohlHochWert.ToString());
|
||||
WriteContent(new Tuple<uint, uint>(316, 325), "1"); // Status der Schachtmittelpunktkoordinaten
|
||||
// Deckelkoordinaten
|
||||
WriteContent(new Tuple<uint, uint>(370, 384), schacht.DeckelRechtsWert.ToString());
|
||||
|
||||
@@ -36,10 +36,20 @@ namespace WWTech_KanalSchnittstelle.Importer
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<Schacht> LoadSchaechte(string filename, EEntwaeserung entwaeserung)
|
||||
public List<Schacht> LoadSchaechte(string filename, string vermesser)
|
||||
{
|
||||
List<Schacht> result = new List<Schacht>();
|
||||
|
||||
Dictionary<string, EEntwaeserung> entwaesserungKennung = new Dictionary<string, EEntwaeserung>()
|
||||
{
|
||||
{ "1100", EEntwaeserung.Schmutzwasser },
|
||||
{ "1200", EEntwaeserung.Mischwasser },
|
||||
{ "1300", EEntwaeserung.Regenwasser },
|
||||
{ "3110", EEntwaeserung.Schmutzwasser },
|
||||
{ "3210", EEntwaeserung.Mischwasser },
|
||||
{ "3310", EEntwaeserung.Regenwasser }
|
||||
};
|
||||
|
||||
if(!File.Exists(filename))
|
||||
{
|
||||
throw new FileNotFoundException(filename);
|
||||
@@ -80,10 +90,17 @@ namespace WWTech_KanalSchnittstelle.Importer
|
||||
schacht.SohlHoehe = parseKoordinate(parsed[3]);
|
||||
}
|
||||
|
||||
|
||||
if (parsed.Length >= 4)
|
||||
{
|
||||
schacht.Entwaesserung = entwaesserungKennung[parsed[4]];
|
||||
}
|
||||
else
|
||||
{
|
||||
schacht.Entwaesserung = EEntwaeserung.Schmutzwasser;
|
||||
}
|
||||
schacht.Projekt = projekt;
|
||||
schacht.Entwaesserung = entwaeserung;
|
||||
schacht.Vermesser = "Marwede";
|
||||
|
||||
schacht.Vermesser = vermesser;
|
||||
schacht.AufnahmeDatum = DateTime.Now.ToShortDateString();
|
||||
|
||||
if (neueSchacht)
|
||||
|
||||
Reference in New Issue
Block a user