Ignore:
Timestamp:
02/28/13 14:38:27 (11 years ago)
Author:
lucsch
Message:

Correcting attributes:

  • Prominent_Lithological_Features_L

Correcting small typo in tutorial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/model_tutorial.tex

    r21 r27  
    3636 
    3737\begin{figure} [htbp] 
    38         \centering 
    39     \includegraphics[width=1\textwidth]{img/workflow.pdf} 
    40     \caption{Conceptual workflow} 
    41     \label{fig:conceptual-workflow} 
     38  \centering 
     39  \includegraphics[width=1\textwidth]{img/workflow.pdf} 
     40  \caption{Conceptual workflow} 
     41  \label{fig:conceptual-workflow} 
    4242\end{figure} 
    4343 
     
    4545 
    4646\section{Data needed} 
    47 In order work, TmDmCreator needs the following files: 
     47For proper operation,  TmDmCreator requires the following files: 
    4848%\begin{itemize} 
    49     \begin{description*} 
     49\begin{description*} 
    5050  \item[base\_structure.sql]\hfill \\ contains the necessary SQL code base for all ToolMap projects. This file should normally not be edited by users 
    5151  \item[user\_structure.sql]\hfill \\ contains the SQL structure describing the layers attributes 
     
    7474 
    7575\begin{figure} [hbp] 
    76         \centering 
    77     \includegraphics[width=.6\textwidth]{img/layers.png} 
    78     \caption{List of layers as shown in user\_content.txt} 
    79     \label{fig:layers} 
     76  \centering 
     77  \includegraphics[width=.6\textwidth]{img/layers.png} 
     78  \caption{List of layers as shown in user\_content.txt} 
     79  \label{fig:layers} 
    8080\end{figure} 
    8181 
     
    9797 
    9898\begin{figure} [hbp] 
    99         \centering 
    100     \includegraphics[height=.9\textheight]{img/objects.png} 
    101     \caption{Objects structure as described in user\_content.txt} 
    102     \label{fig:objects} 
     99  \centering 
     100  \includegraphics[height=.9\textheight]{img/objects.png} 
     101  \caption{Objects structure as described in user\_content.txt} 
     102  \label{fig:objects} 
    103103\end{figure} 
    104104 
     
    111111-- layer_at1 -- 
    112112CREATE TABLE `layer_at1` ( 
    113   `OBJECT_ID` int(10) unsigned NOT NULL, 
    114   -- add user attributes here -- 
    115   PRIMARY KEY (`OBJECT_ID`), 
    116   KEY `LAYER_ATX_FKIndex1` (`OBJECT_ID`) 
     113`OBJECT_ID` int(10) unsigned NOT NULL, 
     114-- add user attributes here -- 
     115PRIMARY KEY (`OBJECT_ID`), 
     116KEY `LAYER_ATX_FKIndex1` (`OBJECT_ID`) 
    117117) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    118118\end{lstlisting} 
    119119This code is the basic template for creating an attribute table. The number after layer\_at (see line 2) indicates the layer index and refers to the LAYER\_INDEX column in user\_content.txt. In our example layer\_at1 describe the attributes for the layer Boreholes\_PT. User attributes can then be added on line 4 of this template. 
    120120Below are described the five attributes that can be used in a ToolMap data model as well as the corresponding SQL code 
     121 
     122 
    121123\subsubsection {Enumeration} 
    122124\label{sec:enumeration} 
    123     \crealplisting{SQL} 
    124     \begin{lstlisting} 
    125     `D_C_UNDERG` int(11) DEFAULT NULL COMMENT 'ENUMERATION', 
    126     \end{lstlisting} 
    127     If you add such fields, then you must also fill the list of supported values (see section~\ref{sec:attribute-values}). 
    128     \subsubsection {Text} 
    129     \begin{lstlisting} 
    130     `DESCRIPT` varchar(255) DEFAULT NULL, 
    131     \end{lstlisting} 
    132     The number next to the keyword varchar indicates the maximum text length.  
    133     \subsubsection {Integer} 
    134     \begin{lstlisting} 
    135     `NUM_REF` int(11) DEFAULT NULL,        
    136     \end{lstlisting} 
    137     There is no special option for integer fields 
    138   \subsubsection {Float} 
     125\crealplisting{SQL} 
     126\begin{lstlisting} 
     127`D_C_UNDERG` int(11) DEFAULT NULL COMMENT 'ENUMERATION', 
     128\end{lstlisting} 
     129If you add such fields, then you must also fill the list of supported values (see section~\ref{sec:attribute-values}). 
     130\subsubsection {Text} 
     131\begin{lstlisting} 
     132`DESCRIPT` varchar(255) DEFAULT NULL, 
     133\end{lstlisting} 
     134The number next to the keyword varchar indicates the maximum text length.  
     135\subsubsection {Integer} 
     136\begin{lstlisting} 
     137`NUM_REF` int(11) DEFAULT NULL,        
     138\end{lstlisting} 
     139There is no special option for integer fields 
    139140 
    140     \begin{lstlisting} 
    141     `TEMP` decimal(5,2) DEFAULT NULL, 
    142     \end{lstlisting} 
    143     The two digits next to the keyword decimal indicate the field precision and scale. In this example, 5 is the precision and 2 is the scale. The precision represents the number of significant digits that are stored for values, and the scale represents the number of digits that can be stored following the decimal point. In this case, values that can be stored range from -999.99 to 999.99. 
    144     \subsubsection {Date} 
    145141 
    146     \begin{lstlisting} 
    147     `REF_DATE` date DEFAULT NULL, 
    148     \end{lstlisting} 
    149     There is no special option for date fields 
     142\subsubsection {Float} 
     143 
     144\begin{lstlisting} 
     145`TEMP` decimal(5,2) DEFAULT NULL, 
     146\end{lstlisting} 
     147The two digits next to the keyword decimal indicate the field precision and scale. In this example, 5 is the precision and 2 is the scale. The precision represents the number of significant digits that are stored for values, and the scale represents the number of digits that can be stored following the decimal point. In this case, values that can be stored range from -999.99 to 999.99. 
     148\subsubsection {Date} 
     149 
     150\begin{lstlisting} 
     151`REF_DATE` date DEFAULT NULL, 
     152\end{lstlisting} 
     153There is no special option for date fields 
    150154 
    151155 
     
    165169 
    166170\begin{figure} [htbp] 
    167         \centering 
    168     \includegraphics[width=.9\textwidth]{img/attributs.png} 
    169     \caption{Attributes section structure} 
    170     \label{fig:attributs} 
     171  \centering 
     172  \includegraphics[width=.9\textwidth]{img/attributs.png} 
     173  \caption{Attributes section structure} 
     174  \label{fig:attributs} 
    171175\end{figure} 
    172176 
Note: See TracChangeset for help on using the changeset viewer.