\chapter{Data combination}\label{sec:DataCombination}

\section{Location}\label{sec:location}
The locations are described with a name and RD-coordinates; a point element in GIS files.
Each location is connected to a crosssection; a line element in GIS files.

The combination of data from GIS files is made based on these point and line elements.\\
If the input data is available in a GIS file with line elements the data is collected at the intersection of the crosssection with the line element, see \autoref{fig:GISLine}.

\begin{figure}[H]
	\centering
		\includegraphics[width=0.7\textwidth]{pictures/GISLine.png}
	\caption{Data is collected from the line element at the intersection}
	\label{fig:GISLine}
\end{figure}

If the input data is available in a GIS file with area elements the data is collected at from the area where the location point is situated, see \autoref{fig:GISArea}.

\begin{figure}[H]
	\centering
		\includegraphics[width=0.7\textwidth]{pictures/GISArea.png}
	\caption{Data is collected from the area element where the location point is situated}
	\label{fig:GISArea}
\end{figure}

If the inputdata is not available in GIS files, all input data can be linked to each location via a table (csv-format).

\section{Subsoil}
The subsoil model is made up of the following elements:
\begin{itemize}
	\item Soil segments
	\item Soil profiles
	\item Soil layers
	\item Soil materialparameters
\end{itemize}

A soil segment is located on a map and can contain several soil scenarios. A soil scenario is a combination of a soil profile and its probability.
Each soil profile is build up from layers (1D- profile) or areas (2D-profile). A layer (or area) has the name of a material. And finally this material is described via soil type and several parameters (such as strength parameters).\\
All is displayed in \autoref{fig:SubSoilElements}.

\begin{figure}[H]
	\centering
		\includegraphics[width=1\textwidth]{pictures/SubSoilElements.png}
	\caption{The elements of the subsoil model and their properties}
	\label{fig:SubSoilElements}
\end{figure}

By linking the location to a soil segment, see \autoref{sec:location}, \ProgramName combines the location to all soil profiles of the soil segment. The procedure for combining a surfaceline with a soil profile is described in \autoref{sec:CombiSurfaceLineSoilProfile}.

\section{Combination of surface line with soil profile}\label{sec:CombiSurfaceLineSoilProfile}
\subsection{Combination of surface line with a 1D soilprofile}\label{sec:CombiSurfaceLine1DSoilProfile}
A 1D soil profile is a summation of layers with layer boundaries (Z-values) and materialnames. Combination with a surfaceline is uncomplicated if all the Z-values of the surface line are within the boundaries of the soil profile.
If not, the user can define a filling material.

\subsection{Combination of surface line with a 2D soilprofile}\label{sec:CombiSurfaceLine2DSoilProfile}
A 2D profile already has a topboundary with different Z-values. Combiniation with a surface line is more complicated since this top boundary and surfacel may differ in X and/or Z-values.
The origin of the surfaceline can differ from the origin of the top boundary of the soil profile. The user can define this difference. The surfaceline is determing the final length of the combinated 2D-profile.
If the surface line $\l$ soil profile length: subsoil at the right side will be deleted
If the surface line $\g$ soil profile length: subsoil at the right side will be generated with Z-values at boundary.

