Changeset 14
- Timestamp:
- 02/20/13 17:18:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tutorial/model_tutorial.tex
r13 r14 21 21 This tutorial explains how to create a ToolMap project manually. This approach has the following advantages: 22 22 \begin{enumerate*} 23 \item It ensures th e IDs used24 \item It generatesa multilingual model23 \item It ensures that the ID remain consistent 24 \item It could generate a multilingual model 25 25 \item It allows better monitoring of model changes 26 26 \end{enumerate*} … … 45 45 46 46 \section{Data needed} 47 In order to produce a ToolMap project, TmDmCreator needs the following files:47 In order work, TmDmCreator needs the following files: 48 48 %\begin{itemize} 49 49 \begin{description*} … … 55 55 The recommended way to work with user\_structure.sql and user\_content.txt is described below 56 56 57 57 \clearpage 58 58 \section{Preparing user data} 59 59 … … 70 70 \item [LAYER\_NAME] the layer name. This name will be given to the SHP file when exporting 71 71 \end{description*} 72 73 Make sure you choose an Unicode format (Unicode Text (*.txt) or UTF-16 Unicode Text (*.txt)) when saving from the spreadsheet. 72 74 73 75 \begin{figure} [hbp] … … 86 88 \item [OBJECT\_CD] object code, should not necessarily be unique 87 89 \item [OBJECT\_TYPE\_CD] object spatial type, uses same values as those described above for TYPE\_CD in thematic\_layers 88 \item [THEMATIC\_LAYERS\_LAYER\_INDEX] the index of the layer that the object refers to. The value 1 shown in the example (Figure 2) therefore relates to the theme Boreholes\_PT.90 \item [THEMATIC\_LAYERS\_LAYER\_INDEX] the index of the layer that the object refers to. The value 1 shown in the example (Figure~\ref{fig:objects}) therefore relates to the theme Boreholes\_PT. 89 91 \item [OBJECT\_DESC\_0,1,2,3,4,5] object description in up to 5 languages. 90 92 \item [OBJECT\_ISFREQ] Set to 1 for frequent objects and 0 otherwise. This parameter is only taken into account for line type objects. Set to 0 for all point or polygon objects. … … 103 105 104 106 \subsection{Attributes structure} 105 Edit the file user\_structure.sql with Notepad (or even better with Notepad + +). For each topiccontaining attributes, there must be a SQL code of the type:107 Edit the file user\_structure.sql with Notepad (or even better with Notepad + +). For each layer containing attributes, there must be a SQL code of the type: 106 108 107 109 \crealplisting{SQL} … … 117 119 This 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. 118 120 Below are described the five attributes that can be used in a ToolMap data model as well as the corresponding SQL code 119 \subsubsection {Enumeration} 121 \subsubsection {Enumeration} 122 \label{sec:enumeration} 120 123 \crealplisting{SQL} 121 124 \begin{lstlisting} … … 149 152 \subsection{Attributes values} 150 153 \label{sec:attribute-values} 151 For each enumeration field previously added in the user\_structure.sql file, it is necessary to define the allowed values. Therefore it is necessary to edit the attributes section of user\_content.txt. The structure of the Attributes section is shown in Figure~\ref{fig:attributs}. This table is divided into two parts, the first three columns describe the attribute fields, the remaining columns describe the values supported by these fields. Below is a description of each column.154 For each enumeration field previously added in the user\_structure.sql file, it is necessary to define the allowed values. Therefore it is necessary to edit the attributes section of user\_content.txt. The structure of the attributes section is shown in Figure~\ref{fig:attributs}. This table is divided into two parts, the first three columns describe the attribute fields, the remaining columns describe the values supported by these fields. Below is a description of each column. 152 155 153 156 \begin{description*} 154 157 \item [ATTRIBUT\_ID] attribute unique ID. 155 \item [LAYER\_INDEX] the index of the layer that the attribute refers to. The value 1 shown in the example (Figure 4, row 42 and 43) therefore relates to the theme Boreholes\_PT.158 \item [LAYER\_INDEX] the index of the layer that the attribute refers to. The value 1 shown in the example (Figure~\ref{fig:attributs}, row 42 and 43) therefore relates to the theme Boreholes\_PT. 156 159 \item [ATTRIBUT\_NAME] attribute name. This name will be used as the column name in the exported SHP. Some limitations apply to SHP format for column names, for more information you can refer to \url{http://en.wikipedia.org/wiki/Shapefile#Shapefile\_attribute\_format\_.28.dbf.29} or \url{http://www.gdal.org/ogr/drv\_shapefile.html} 157 160 \item [CATALOG\_ID] attribute value unique ID
Note: See TracChangeset
for help on using the changeset viewer.