1 | % |
---|
2 | % HOW TO BUILD TOOLMAP DATAMODEL |
---|
3 | % |
---|
4 | % Created by Lucien Schreiber on 2013-02-19. |
---|
5 | % Copyright (c) 2013. All rights reserved. |
---|
6 | % |
---|
7 | |
---|
8 | \documentclass[a4paper, 12pt]{article} |
---|
9 | \usepackage{crealp-report} |
---|
10 | \usepackage{upquote} %to force Latex not substitute ' by ` |
---|
11 | \usepackage{tocbibind} |
---|
12 | \usepackage{mdwlist} |
---|
13 | %\usepackage{natbib} |
---|
14 | |
---|
15 | \begin{document} |
---|
16 | \crealptitle {Tutorial} {How to create a ToolMap datamodel using TmDmCreator} {Lucien Schreiber} {lucien.schreiber@crealp.vs.ch} |
---|
17 | \tableofcontents |
---|
18 | \pagebreak |
---|
19 | |
---|
20 | \section{Introduction} |
---|
21 | This tutorial explains how to create a project ToolMap manually. This approach has the following advantages: |
---|
22 | \begin{enumerate*} |
---|
23 | \item It ensures the IDs used |
---|
24 | \item It generates a multilingual model |
---|
25 | \item It allows better monitoring of model changes |
---|
26 | \end{enumerate*} |
---|
27 | The main disadvantage of this approach is the lack of user interface as well as the need for the user to have some knowledge of SQL. Finally, this approach has been developed to meet the need for rigor in the management of the geological data model. |
---|
28 | |
---|
29 | |
---|
30 | \section{Conceptual Workflow} |
---|
31 | The diagram shown in figure~\ref{fig:conceptual-workflow} illustrates the proposed workflow. User edits the user\_structure.sql and user\_content.txt files. These files as well as base\_structure.sql are used by the software TmDmCreator to produces either: |
---|
32 | \begin{enumerate*} |
---|
33 | \item a SQL file defining the project (output 1) |
---|
34 | \item a ToolMap project (output 2) |
---|
35 | \end{enumerate*} |
---|
36 | |
---|
37 | \begin{figure} [htbp] |
---|
38 | \centering |
---|
39 | \includegraphics[width=1\textwidth]{img/workflow.pdf} |
---|
40 | \caption{Conceptual workflow} |
---|
41 | \label{fig:conceptual-workflow} |
---|
42 | \end{figure} |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | \section{Data needed} |
---|
47 | In order to produce a ToolMap project, TmDmCreator needs the following files: |
---|
48 | %\begin{itemize} |
---|
49 | \begin{description*} |
---|
50 | \item[base\_structure.sql]\hfill \\ contains the necessary SQL code base for all ToolMap projects. This file should normally not be edited by users |
---|
51 | \item[user\_structure.sql]\hfill \\ contains the SQL structure describing the layers attributes |
---|
52 | \item[user\_content.txt]\hfill \\ Is a tabular file (editable in Excel for example) containing the definition of layers, objects, and attribute values. |
---|
53 | \end{description*} |
---|
54 | %\end{itemize} |
---|
55 | The recommended way to work with user\_structure.sql and user\_content.txt is described below |
---|
56 | |
---|
57 | |
---|
58 | \section{Preparing user data} |
---|
59 | |
---|
60 | \subsection{Layers} |
---|
61 | Open user\_content.txt using a spreadsheet and edit the thematic\_layers part. Each of the layers that we want to export should appear here. The structure is as follows (see figure ???): |
---|
62 | \begin{description*} |
---|
63 | \item [LAYER\_INDEX] unique identifier of the layer |
---|
64 | \item [TYPE\_CD] layer spatial type as follow |
---|
65 | \begin{description*} |
---|
66 | \item [0] Line |
---|
67 | \item [1] Point |
---|
68 | \item [2] Polygon |
---|
69 | \end{description*} |
---|
70 | \item [LAYER\_NAME] the layer name. This name will be given to the SHP file when exporting |
---|
71 | \end{description*} |
---|
72 | |
---|
73 | \subsection{Objects} |
---|
74 | |
---|
75 | \subsection{Attributes structure} |
---|
76 | |
---|
77 | \subsection{Value domain of the attributes} |
---|
78 | |
---|
79 | |
---|
80 | \end{document} |
---|