Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/Location.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/Location.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/Location.cs (revision 3087) @@ -0,0 +1,56 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Deltares.LayerOnSlopeTool.LayerCreator +{ + /// + public class Location + { + /// Gets or sets the location identifier. + /// The location identifier. + public string LocationId { get; set; } + + /// Gets or sets the surfaceline identifier. + /// The surfaceline identifier. + public string SurfacelineId { get; set; } + + /// Gets or sets the name of the soil geometry. + /// The name of the soil geometry. + public string SoilGeometryName { get; set; } + + /// Gets or sets the x offset. + /// The x offset. + public double XOffset { get; set; } + + /// Gets or sets the layer thickness. + /// The layer thickness. + public double LayerThickness { get; set; } + + /// Gets or sets the layer material. + /// The layer material. + public string LayerMaterial { get; set; } + + /// Gets or sets the dike material. + /// The dike material. + public string DikeMaterial { get; set; } + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/Deltares.LayerOnSlopeTool.LayerCreator.csproj =================================================================== diff -u -r3066 -r3087 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/Deltares.LayerOnSlopeTool.LayerCreator.csproj (.../Deltares.LayerOnSlopeTool.LayerCreator.csproj) (revision 3066) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/Deltares.LayerOnSlopeTool.LayerCreator.csproj (.../Deltares.LayerOnSlopeTool.LayerCreator.csproj) (revision 3087) @@ -44,7 +44,11 @@ + + + + Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/SurfaceLine.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/SurfaceLine.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/SurfaceLine.cs (revision 3087) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Deltares.LayerOnSlopeTool.LayerCreator +{ + public class SurfaceLine + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Deltares.LayerOnSlopeTool.Application.csproj =================================================================== diff -u -r3070 -r3087 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Deltares.LayerOnSlopeTool.Application.csproj (.../Deltares.LayerOnSlopeTool.Application.csproj) (revision 3070) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Deltares.LayerOnSlopeTool.Application.csproj (.../Deltares.LayerOnSlopeTool.Application.csproj) (revision 3087) @@ -58,5 +58,11 @@ + + + {561636be-1d0b-412d-a419-d852ca17b26a} + Deltares.LayerOnSlopeTool.LayerCreator + + \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Program.cs =================================================================== diff -u -r3070 -r3087 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Program.cs (.../Program.cs) (revision 3070) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Program.cs (.../Program.cs) (revision 3087) @@ -24,6 +24,7 @@ namespace Deltares.LayerOnSlopeTool.Application { + /// Main program internal class Program { static void Main(string[] args) @@ -35,7 +36,11 @@ { if (success) { - // TODO Add call to LayerCreator + var layerCreator = new LayerCreator.LayerCreator( + commandLineArguments.InputFolderName, + commandLineArguments.GeometriesFolderName, + commandLineArguments.OutputFolderName); + layerCreator.Execute(); } else { Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/LayerCreator.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/LayerCreator.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/LayerCreator.cs (revision 3087) @@ -0,0 +1,92 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; + +namespace Deltares.LayerOnSlopeTool.LayerCreator +{ + /// + public class LayerCreator + { + /// Initializes a new instance of the class. + /// Name of the input folder. + /// Name of the geometries folder. + /// Name of the output folder. + public LayerCreator(string inputFolderName, string geometriesFolderName, string outputFolderName) + { + InputFolderName = inputFolderName; + GeometriesFolderName = geometriesFolderName; + OutputFolderName = outputFolderName; + + } + + /// Gets the name of the output folder. + /// The name of the output folder. + public string OutputFolderName { get; } + + /// Gets the name of the geometries folder. + /// The name of the geometries folder. + public string GeometriesFolderName { get;} + + /// Gets the name of the input folder. + /// The name of the input folder. + public string InputFolderName { get; } + + private List locations = new List(); + private List surfaceLines = new List(); + public void Execute() + { + locations = ReadLocations(InputFolderName); + surfaceLines = ReadSurfaceLines(InputFolderName); + ProcessLocations(); + } + + private void ProcessLocations() + { + foreach (var location in locations) + { + SurfaceLine surfaceLine = FindSurfaceLine(location.SurfacelineId); + var geometryCreator = new GeometryCreator(location, surfaceLine, OutputFolderName); + geometryCreator.Execute(); + } + throw new System.NotImplementedException(); + } + + private SurfaceLine FindSurfaceLine(string surfaceLineId) + { + // TODO find surfaceline with surfaceLineId + throw new System.NotImplementedException(); + } + + private List ReadSurfaceLines(string inputFolderName) + { + // TODO read surfaceLines + throw new System.NotImplementedException(); + } + + private List ReadLocations(string inputFolderName) + { + // TODO read locations + throw new System.NotImplementedException(); + } + } + +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/GeometryCreator.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/GeometryCreator.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/GeometryCreator.cs (revision 3087) @@ -0,0 +1,44 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Deltares.LayerOnSlopeTool.LayerCreator +{ + /// + internal class GeometryCreator + { + /// Initializes a new instance of the class. + /// The location. + /// The surface line. + /// Name of the output folder. + /// + public GeometryCreator(Location location, SurfaceLine surfaceLine, string outputFolderName) + { + throw new System.NotImplementedException(); + } + + /// Executes this instance. + /// + public void Execute() + { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/CommandOptions.cs =================================================================== diff -u -r3070 -r3087 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/CommandOptions.cs (.../CommandOptions.cs) (revision 3070) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/CommandOptions.cs (.../CommandOptions.cs) (revision 3087) @@ -29,10 +29,14 @@ { public const string DefaultInputFolder = "Input"; public const string DefaultOutputFolder = "Output"; + public const string DefaultGeometriesFolder = "Geometries"; [Option("i", "input", Required = true, DefaultValue = DefaultInputFolder, HelpText = "Name and path of the input folder.")] public string InputFolderName { get; set; } + [Option("g", "geometries", Required = true, DefaultValue = DefaultGeometriesFolder, HelpText = "Name and path of the geometries folder.")] + public string GeometriesFolderName { get; set; } + [Option("o", "output", Required = false, DefaultValue = DefaultOutputFolder, HelpText = "Name and path of the output folder.")] public string OutputFolderName { get; set; }