/[thuban]/branches/WIP-pyshapelib-bramz/Doc/manual/thuban-manual.xml
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Doc/manual/thuban-manual.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1478 by frank, Thu Jul 24 17:00:25 2003 UTC revision 1719 by jan, Fri Sep 19 09:17:10 2003 UTC
# Line 1  Line 1 
1  <?xml version="1.0" encoding="ISO-8859-1"?>  <?xml version="1.0" encoding="ISO-8859-1"?>
2  <!DOCTYPE book  <!DOCTYPE book
3          PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"          PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
5        [<!ENTITY imgscale "70">]>
6  <!-- $Revision$ -->  <!-- $Revision$ -->
7  <book>  <book>
8    <bookinfo>    <bookinfo>
9      <title>Thuban Manual</title>      <title>User's Manual for Thuban 1.0</title>
10      <author>          <authorgroup>
11        <firstname>Jonathan</firstname><surname>Coles</surname>        <author>
12      </author>          <firstname>Jonathan</firstname><surname>Coles</surname>
13      <author>        </author>
14        <firstname>Jan-Oliver</firstname><surname>Wagner</surname>        <author>
15      </author>          <firstname>Jan-Oliver</firstname><surname>Wagner</surname>
16      <author>        </author>
17        <firstname>Frank</firstname><surname>Koormann</surname>        <author>
18      </author>          <firstname>Frank</firstname><surname>Koormann</surname>
19          </author>
20            </authorgroup>
21      <copyright>      <copyright>
22        <year>2003</year>        <year>2003</year>
23        <holder>Intevation GmbH</holder>        <holder>Intevation GmbH</holder>
24      </copyright>      </copyright>
25       <revhistory>
26    <!-- comment this first revision out when releasing a real version -->
27    <!--
28         <revision>
29            <revnumber>CVS version $Id$</revnumber>
30            <date></date>
31            <revremark>Under development.</revremark>
32         </revision>
33    -->
34         <revision>
35            <revnumber>1.0pre2</revnumber>
36            <date>29-Aug-2003</date>
37            <revremark>
38                            Corresponds to Thuban development release 0.8.1.
39                            New: chapter on extensions.
40                    </revremark>
41         </revision>
42         <revision>
43            <revnumber>1.0pre1</revnumber>
44            <date>08-Aug-2003</date>
45            <revremark>Corresponds to Thuban development release 0.8.1.</revremark>
46         </revision>
47      </revhistory>
48    
49    </bookinfo>    </bookinfo>
50    
51    <chapter><title>Introduction</title>    <chapter><title>Introduction</title>
52      <para>      <para>
53      Thuban is a Free Software Geographic Information Systems (GIS) viewer.      Thuban is an interactive geographic data viewer.
54      It is being developed because there is currently no simple interactive      It has been developed because there was no simple interactive
55      viewer for geographic information available as Free Software. Thuban is      viewer for geographic information available as Free Software. Thuban is
56      written in Python and C++ and uses the wxWindows library allowing it to      written in Python and C++ and uses the wxWindows library allowing it to
57      run on many different platforms, including GNU/Linux and Windows.      run on many different platforms, including GNU/Linux and Windows.
58      </para>      </para>
59      <para>      <para>
60      GIS viewers are a necessary tool as they allow one to get a visual      Geographic data viewers are a necessary tool as they allow one to
61            get a visual
62      impression of the positional relationship of the information that may not      impression of the positional relationship of the information that may not
63      be apparent from simple inspection of the data values themselves.      be apparent from simple inspection of the data values themselves.
64      Thuban allows the user to create a session that displays      Thuban allows the user to create a session that displays
# Line 47  Line 75 
75          <section><title>Installation</title>          <section><title>Installation</title>
76          <para>          <para>
77          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,
78          and Windows 2000. All the necessary files can be found on the          and Windows 2000. Thuban depends on the following packages. These
79            packages can also be found on the
80          <ulink url="http://thuban.intevation.org/download.html">          <ulink url="http://thuban.intevation.org/download.html">
81          Thuban Download site          Thuban Download site
82          </ulink>.          </ulink>.
83          </para>          <itemizedlist>
84                <listitem><para>Python 2.2.1 (<literal>http://www.python.org</literal>)</para></listitem>
85                <listitem><para>wxWindows 2.4 (<literal>http://www.wxwindows.org</literal>)</para></listitem>
86                <listitem><para>wxPython 2.4 (<literal>http://www.wxpython.org</literal>)</para></listitem>
87                <listitem><para>proj 4.4.5 Projection Library (<literal>http://www.remotesensing.org/proj/</literal>)</para></listitem>
88                <listitem><para>GDAL 1.1.8 (<literal>http://www.remotesensing.org/gdal/</literal>)</para></listitem>
89                <listitem><para>SQLite 2.8.3 (<literal>http://www.hwaci.com/sw/sqlite/</literal>)</para></listitem>
90                <listitem><para>PySQLite 0.4.3 (<literal>http://pysqlite.sourceforge.net</literal>)</para></listitem>
91                </itemizedlist>
92            </para>
93                    <para>
94                    Along with the source codes, the download page also offers
95                    full installation packages for Debian, Windows and RPM-based systems
96                    (Mandrake, RedHat, SuSE, etc).
97                    </para>
98                    <section><title>RPM-based GNU/Linux Systems</title>
99                            <section><title>Installing Binary Packages</title>
100                                    <para>
101                                    The most wide-spread RPM-based GNU/Linux Systems are RedHat,
102                                    Mandrake and SuSE. The documentation of these distributions
103                                    should contain information about how to install third-party
104                                    RPM packages. Nonetheless, a short summary is provided here.
105                                    </para>
106                                    <para>
107                                    RPM packages can be installed applying several tools.
108                                    The most basic one is the command line program "rpm".
109                                    The hardware architecture is identified in the name
110                                    of RPM packages, eg. 'i386' for most Intel/AMD architectures.
111                                    If you have a different hardware architecture, where no
112                                    binary RPM packages are provided, you must rebuild binary
113                                    packages from the RPM source packages first (see below).
114                                    Typical rpm commands look like:
115    
116                                    <programlisting>
117                                    rpm --install Thuban-0.9.0-1.i386.rpm
118                                    </programlisting>
119    
120                                    Depending on what you already have installed on your
121                                    system, you are informed that some packages are
122                                    required, but not installed. You need to install them
123                                    first. Either they are provided by your GNU/Linux distributor
124                                    or available somewhere on the Internet.
125                                    The more essential and special ones are provided together
126                                    with the Thuban package.
127                                    </para>
128    
129                                    <para>
130                                    For rpm exist some graphical user interfaces, notably
131                                    kpackage, GnoRPM and xrpm.
132                                    </para>
133    
134                                    <para>
135                                    Make yourself familiar with one of the tools and apply it
136                                    to install the packages.
137                                    Note, that you need to be administrator (root) for the system
138                                    to do that.
139                                    </para>
140                            </section>
141                            <section><title>Build Binaries from Source Packages</title>
142                                    <para>
143                                    This section describes howto build RPM install-packages
144                                    from RPM source-packages.
145                                    This adapts and optimizes an install-package specifically
146                                    to your system.
147                                    This is especially helpful to resolve version conflicts of
148                                    dependent packages. Furthermore, install-packages for other
149                                    platforms (e.g. PowerPC) can be created.
150                                    </para>
151    
152                                    <para>
153                                    Note: rpm must be at least version 4. Execute
154                                    <literal>rpm --version</literal> to find out about the version.
155                                    </para>
156    
157                                    <para>
158                                    You need to do the following preparations to be able to
159                                    build the packages as a regular user. You should now
160                                    perform the package buling as root since this
161                                    might cause damage to your system.
162                            <itemizedlist>
163                            <listitem>
164                                                    <para>
165                                                    Create RPM directory structure:
166                                                    Choose a directory (e.g. $HOME/myrpm) and create the
167                                                    subdirectories BUILD, RPM, SOURCES, SPECS and SRPMS.
168                                                    A possible command sequence for this is:
169                                                    <programlisting>
170                                                    mkdir $HOME/freegisrpm
171                                                    cd $HOME/freegisrpm
172                                                    mkdir BUILD RPMS SOURCES SPECS SRPMS
173                                                    </programlisting>
174                                                    </para>
175                                            </listitem>
176                                            <listitem>
177                                                    <para>
178                                                    Set environment variable RPM_DIR:
179                                                    <programlisting>
180                                                    export RPM_DIR=$HOME/freegisrpm
181                                                    </programlisting>
182                                                    </para>
183                                            </listitem>
184                                            <listitem>
185                                                    <para>
186                                                    Create $HOME/.rpmmacros:
187                                                    This file sets general preferences and some
188                                                    specific settings for signing packages.
189                                                    If you don't have a GnuPG-key, you can skip
190                                                    the signature settings i.e. drop the last 4 lines.
191                                                    A signature becomes important when you want to
192                                                    give away packages to third parties.
193                                                    <programlisting>
194    <![CDATA[
195    %packager Name Lastname <[email protected]>
196    
197    %_topdir /home/mylogin/myrpm
198    
199    %_signature gpg
200    %_gpg_name Name Lastname
201    %_pgp_path ~/.gnupg
202    %_pgpbin /usr/bin/gpg
203    ]]>
204                                                    </programlisting>
205                                                    </para>
206                                            </listitem>
207                            </itemizedlist>
208    
209                                    Now you can install any RPM source-package.
210                                    It's components are installed into the corresponding
211                                    subdirectories of your rpm-directory.
212                                    Essentially these are the sources (into directory SOURCES)
213                                    and the so-called spec-file which contains all build
214                                    instructions. The spec-file will go into the SPEC directory.
215                                    Example:
216                                    <literal>rpm --install Thuban-0.9.0-1.src.rpm</literal>
217                                    </para>
218    
219                                    <para>
220                                    Create install-package:
221                                    Go to the directory with the spec-files and rebuild the
222                                    package:
223                                    <programlisting>
224    cd $HOME/mypm/SPECS
225    rpm -bb thuban.spec
226                                    </programlisting>
227                                    Next, you will find the newly created package in
228                                    $HOME/myrpm/RPMS/i386.
229                                    If you build the package for another architecture than
230                                    i386, then the name of the directory has a corresponding name.
231                                    </para>
232                                    <para>
233                                    For documentation of RPM, either type
234                                    <literal>man rpm</literal> or <literal>rpm --help</literal>.
235                                    This will provide you with information on the various command
236                                    line options of RPM.
237                                    For more information see the
238                            <ulink url="http://www.rpm.org/">homepage of RPM</ulink>.
239                                    </para>
240                            </section>
241                    </section>
242          </section>          </section>
243    
244          <section><title>The Main Window</title>          <section><title>The Main Window</title>
245          <para>          <para>
246          <screenshot>          <figure>
247          <screeninfo>The Main Window</screeninfo>          <title>The Main Window</title>
248          <mediaobject>          <mediaobject>
249          <imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG"/> </imageobject>          <imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG" scale="&imgscale;"/> </imageobject>
250          <imageobject> <imagedata fileref="./images/1_2_mainwindow.ps" format="EPS"/> </imageobject>          <imageobject> <imagedata fileref="./images/1_2_mainwindow.ps" format="EPS" scale="&imgscale;"/> </imageobject>
         <textobject><phrase>The Main Window</phrase></textobject>  
         <caption><para>The Main Window</para></caption>  
251          </mediaobject>          </mediaobject>
252          </screenshot>          </figure>
253          </para>          </para>
254    
255          <para>          <para>
# Line 100  Line 285 
285          The tool bar provides quick access to the commonly needed tools.          The tool bar provides quick access to the commonly needed tools.
286          By hovering over each button the user can see a short messages          By hovering over each button the user can see a short messages
287          describing what the tool does. The tools provided are Zoom In, Zoom          describing what the tool does. The tools provided are Zoom In, Zoom
288          Out, Pan, Full Extent, Full Layer Extent, Full Shape Extent, Indentify,          Out, Pan, Full Extent, Full Layer Extent, Full Shape Extent, Identify,
289          and Label. Each of the tools will be explained in further detail later          and Label. Each of the tools will be explained in further detail later
290          in the manual.          in the manual.
291          </para>          </para>
# Line 116  Line 301 
301          <menuchoice>          <menuchoice>
302          <guimenu>File</guimenu>          <guimenu>File</guimenu>
303          <guimenuitem>New Session</guimenuitem>          <guimenuitem>New Session</guimenuitem>
304          </menuchoice>.          </menuchoice>.
   
305          If a session is already loaded and has been modified without          If a session is already loaded and has been modified without
306          being saved a prompt will ask if the current session should          being saved a prompt will ask if the current session should
307          be saved.          be saved. A new session consists of an empty map with no
308            layers and no tables.
309          </para>          </para>
310          </section>          </section>
311    
# Line 131  Line 315 
315          <menuchoice>          <menuchoice>
316          <guimenu>File</guimenu>          <guimenu>File</guimenu>
317          <guimenuitem>Open Session</guimenuitem>          <guimenuitem>Open Session</guimenuitem>
318          </menuchoice>.          </menuchoice>. A dialog box will open allowing the user to browse
319            for a Thuban Session file. Thuban session files end with
320            <varname>.thuban</varname>. Selecting a file a clicking
321            <guibutton>OK</guibutton> will load the session into Thuban.
322    
323          If a session is already loaded and has been modified without          If a session is already loaded and has been modified without
324          being saved a prompt will ask if the current session should          being saved a prompt will ask if the current session should
# Line 145  Line 332 
332          <menuchoice>          <menuchoice>
333          <guimenu>File</guimenu>          <guimenu>File</guimenu>
334          <guimenuitem>Save Session</guimenuitem>          <guimenuitem>Save Session</guimenuitem>
335          </menuchoice>.          </menuchoice>. A dialog box will open allowing the user to browse
336            the file system and select a place to save the session. Thuban
337            sessions should be saved under a name ending in
338            <varname>.thuban</varname>. If the file already exists the user
339            will be prompted to save under a different name or overwrite the
340            existing file.
341          </para>          </para>
342          </section>          </section>
343    
344          <section><title>The Session Info-Tree</title>          <section><title>The Session Info-Tree</title>
345            <para>
346            <figure>
347            <title>Session Info Tree</title>
348            <mediaobject>
349            <imageobject><imagedata fileref="../images/2_4_session_tree.png" format="PNG" scale="&imgscale;"/></imageobject>
350            <imageobject><imagedata fileref="./images/2_4_session_tree.eps" format="EPS" scale="&imgscale;"/></imageobject>
351            </mediaobject>
352            </figure>
353            </para>
354          <para>          <para>
355                  (primarily for developers)          The session info-tree is primarily intended for developers working
356            with Thuban. It displays many of the internal values for the session,
357            map, and layers. It can be opened from
358            <menuchoice>
359            <guimenu>File</guimenu>
360            <guimenuitem>Session Tree</guimenuitem>
361            </menuchoice>.
362          </para>          </para>
363          </section>          </section>
364    </chapter>    </chapter>
# Line 163  Line 369 
369      different type of data set. By interacting with the map the user can      different type of data set. By interacting with the map the user can
370      visually explore the data.      visually explore the data.
371      </para>      </para>
372        <para>
373        The map can have a name that will appear in the Thuban title bar.
374        The map name can be changed using
375        <menuchoice>
376        <guimenu>Map</guimenu>
377        <guimenuitem>Rename</guimenuitem>
378        </menuchoice>.
379        </para>
380        <para>
381        <inlinemediaobject>
382        <imageobject>
383        <imagedata fileref="../images/3_rename_map.png" format="PNG" scale="&imgscale;"/>
384        </imageobject>
385        <imageobject>
386        <imagedata fileref="./images/3_rename_map.eps" format="EPS" scale="&imgscale;"/>
387        </imageobject>
388        <textobject> <phrase>Rename Map</phrase> </textobject>
389        </inlinemediaobject>
390        </para>
391    
392          <section><title>Adding and Removing Layers</title>          <section><title>Adding and Removing Layers</title>
393          <para>          <para>
394          There are two types of layers that can use added to a map: shape layers          There are two types of layers that can be added to a map: Shape layers
395          and image layers. Shape layers are stored in Shapefile format, a          and image layers. Shape layers are stored in Shapefile format, a
396          standard file format for storing geographic objects. Normally, these          widely used file format for storing geographic objects. These
397          files have the extension ``.shp''. Associated with          files have the extension ``.shp''. Associated with
398          the object information is a database file which stores attributes for          the shape file is a database file which stores attributes for
399          each shape in the Shapefile. This file, stored in DB2 format, usually          each shape in the Shape file. This file, in dBase format,
400          has the extension ``.dbf''. Both files should have the same base name.          has the extension ``.dbf''. Both files must have the same base name.
401          For example, if there is a Shapefile named roads.shp there should          For example, if there is a shape file named roads.shp there must
402          also be a file roads.dbf.          also be a file roads.dbf.
403          </para>          </para>
404          <para>          <para>
# Line 182  Line 407 
407          <guimenu>Map</guimenu>          <guimenu>Map</guimenu>
408          <guimenuitem>Add Layer</guimenuitem>          <guimenuitem>Add Layer</guimenuitem>
409          </menuchoice>.          </menuchoice>.
410          Thuban will load all files with the same base name, so it doesn't          Initially, only the ``.shp'' files are shown which is enough for the
411          matter if the Shapefile or database file is selected.                  selection. However, if you switch to display all files and select one
412                    of the associated files (e.g. ``.dbf''), Thuban will recognize the base
413                    name and load the corresponding Shape file.
414            </para>
415                    <para>
416                    The file dialog for Shape files allows to select multiple files.
417                    Use the shift-button together with the left mouse button to extend
418                    the selection.
419          </para>          </para>
420    
421          <para>          <para>
# Line 193  Line 425 
425          <guimenuitem>Add Image Layer</guimenuitem>          <guimenuitem>Add Image Layer</guimenuitem>
426          </menuchoice>.          </menuchoice>.
427          It is important to select a valid image file that has geographic          It is important to select a valid image file that has geographic
428          data associated with it. This can be embedded in the file itself,          data associated with it. The data can be embedded in the file itself,
429          or in another file. If geographic information cannot be found, Thuban          or in another file. If geographic information cannot be found, Thuban
430          will report an error.          will report an error.
431          </para>          </para>
# Line 202  Line 434 
434          <section><title>Navigation</title>          <section><title>Navigation</title>
435          <para>          <para>
436          The map can be explored by using the navigation tools available on          The map can be explored by using the navigation tools available on
437          the tool bar, or from the          the tool bar or from the
438          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.
439          </para>          </para>
440            <itemizedlist>
441            <listitem>
442          <para>          <para>
443          The ZoomIn tool          The ZoomIn tool
444          <inlinemediaobject>          <inlinemediaobject>
445          <imageobject>          <imageobject>
446          <imagedata fileref="../images/3_2_zoomin.png" format="PNG"/>          <imagedata fileref="../images/3_2_zoomin.png" format="PNG" scale="&imgscale;"/>
447          </imageobject>          </imageobject>
448          <imageobject>          <imageobject>
449          <imagedata fileref="./images/3_2_zoomin.eps" format="EPS"/>          <imagedata fileref="./images/3_2_zoomin.eps" format="EPS" scale="&imgscale;"/>
450          </imageobject>          </imageobject>
451          <textobject> <phrase>ZoomIn Tool</phrase> </textobject>          <textobject> <phrase>ZoomIn Tool</phrase> </textobject>
452          </inlinemediaobject>          </inlinemediaobject>
453          can be used to enlarge a region of the map. Clicking once on the map          enlarges a region of the map. Clicking once on the map
454          will double the magnification and center the map on the point that          will double the magnification and center the map on the point that
455          was clicked. Clicking and dragging lets the user select a region          was clicked. Clicking and dragging selects a region that will be
456          to be enlarged to fit the window.          enlarged to fit the window.
457          </para>          </para>
458            </listitem>
459            <listitem>
460          <para>          <para>
461          The ZoomOut tool          The ZoomOut tool
462          <inlinemediaobject>          <inlinemediaobject>
463          <imageobject>          <imageobject>
464          <imagedata fileref="../images/3_2_zoomout.png" format="PNG"/>          <imagedata fileref="../images/3_2_zoomout.png" format="PNG" scale="&imgscale;"/>
465          </imageobject>          </imageobject>
466          <imageobject>          <imageobject>
467          <imagedata fileref="./images/3_2_zoomout.eps" format="EPS"/>          <imagedata fileref="./images/3_2_zoomout.eps" format="EPS" scale="&imgscale;"/>
468          </imageobject>          </imageobject>
469          <textobject> <phrase>ZoomOut Tool</phrase> </textobject>          <textobject> <phrase>ZoomOut Tool</phrase> </textobject>
470          </inlinemediaobject>          </inlinemediaobject>
# Line 237  Line 473 
473          selects a box such that the current contents of the window will be          selects a box such that the current contents of the window will be
474          scaled to fit into that box.          scaled to fit into that box.
475          </para>          </para>
476            </listitem>
477            <listitem>
478          <para>          <para>
479          The Pan tool          The Pan tool
480          <inlinemediaobject>          <inlinemediaobject>
481          <imageobject>          <imageobject>
482          <imagedata fileref="../images/3_2_pan.png" format="PNG"/>          <imagedata fileref="../images/3_2_pan.png" format="PNG" scale="&imgscale;"/>
483          </imageobject>          </imageobject>
484          <imageobject>          <imageobject>
485          <imagedata fileref="./images/3_2_pan.eps" format="EPS"/>          <imagedata fileref="./images/3_2_pan.eps" format="EPS" scale="&imgscale;"/>
486          </imageobject>          </imageobject>
487          <textobject> <phrase>Pan Tool</phrase> </textobject>          <textobject> <phrase>Pan Tool</phrase> </textobject>
488          </inlinemediaobject>          </inlinemediaobject>
489          allows the user to move the map around by clicking and dragging.          allows the user to move the map around by clicking and dragging.
490          </para>          </para>
491            </listitem>
492            <listitem>
493          <para>          <para>
494          The Full Extent tool          The Full Extent tool
495          <inlinemediaobject>          <inlinemediaobject>
496          <imageobject>          <imageobject>
497          <imagedata fileref="../images/3_2_fullextent.png" format="PNG"/>          <imagedata fileref="../images/3_2_fullextent.png" format="PNG" scale="&imgscale;"/>
498          </imageobject>          </imageobject>
499          <imageobject>          <imageobject>
500          <imagedata fileref="./images/3_2_fullextent.eps" format="EPS"/>          <imagedata fileref="./images/3_2_fullextent.eps" format="EPS" scale="&imgscale;"/>
501          </imageobject>          </imageobject>
502          <textobject> <phrase>Full Extent Tool</phrase> </textobject>          <textobject> <phrase>Full Extent Tool</phrase> </textobject>
503          </inlinemediaobject>          </inlinemediaobject>
504          rescales the viewable region so that the entire map is visible.          rescales the viewable region so that the entire map is visible.
505          </para>          </para>
506            </listitem>
507            <listitem>
508          <para>          <para>
509          The Full Layer Extent tool          The Full Layer Extent tool
510          <inlinemediaobject>          <inlinemediaobject>
511          <imageobject>          <imageobject>
512          <imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG"/>          <imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG" scale="&imgscale;"/>
513          </imageobject>          </imageobject>
514          <imageobject>          <imageobject>
515          <imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS"/>          <imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS" scale="&imgscale;"/>
516          </imageobject>          </imageobject>
517          <textobject> <phrase>Full Layer Extent Tool</phrase> </textobject>          <textobject> <phrase>Full Layer Extent Tool</phrase> </textobject>
518          </inlinemediaobject>          </inlinemediaobject>
# Line 278  Line 520 
520          layer fits within the window. If no layer is selected this button          layer fits within the window. If no layer is selected this button
521          will be disabled.          will be disabled.
522          </para>          </para>
523            </listitem>
524            <listitem>
525          <para>          <para>
526          The Full Shape Extent tool          The Full Shape Extent tool
527          <inlinemediaobject>          <inlinemediaobject>
528          <imageobject>          <imageobject>
529          <imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG"/>          <imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG" scale="&imgscale;"/>
530          </imageobject>          </imageobject>
531          <imageobject>          <imageobject>
532          <imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS"/>          <imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS" scale="&imgscale;"/>
533          </imageobject>          </imageobject>
534          <textobject> <phrase>Full Shape Extent Tool</phrase> </textobject>          <textobject> <phrase>Full Shape Extent Tool</phrase> </textobject>
535          </inlinemediaobject>          </inlinemediaobject>
536          rescales the viewable region so that the currently selected          rescales the viewable region so that the currently selected
537          shape fits within the window. If the shape is a point, it is          shape fits within the window. If the shape is a point, it is
538          centered and the map is zoomed all the way in. If no shape is          centered and the map is zoomed all the way in. If no shape is
539          selected this button will be disabled.          selected this button will be disabled. This feature is especially
540            helpful when identifying an object related to a selected record
541            in a tableview (see below).
542    
543          </para>          </para>
544            </listitem>
545            </itemizedlist>
546          </section>          </section>
547    
548          <section><title>Object Identification</title>          <section><title>Object Identification</title>
# Line 301  Line 550 
550          Objects on the map can be identified using the Identify tool          Objects on the map can be identified using the Identify tool
551          <inlinemediaobject>          <inlinemediaobject>
552          <imageobject>          <imageobject>
553          <imagedata fileref="../images/3_3_identify.png" format="PNG"/>          <imagedata fileref="../images/3_3_identify.png" format="PNG" scale="&imgscale;"/>
554          </imageobject>          </imageobject>
555          <imageobject>          <imageobject>
556          <imagedata fileref="./images/3_3_identify.eps" format="EPS"/>          <imagedata fileref="./images/3_3_identify.eps" format="EPS" scale="&imgscale;"/>
557          </imageobject>          </imageobject>
558          <textobject> <phrase>Identify Tool</phrase> </textobject>          <textobject> <phrase>Identify Tool</phrase> </textobject>
559          </inlinemediaobject>.          </inlinemediaobject>.
560          Clicking on an object selects that object and opens a dialog which          Clicking on an object selects that object and opens a dialog which
561          shows all the table attributes for that object. Any current selection          shows all the table attributes for that object. Any current selection
562          is lost.          is lost. Objects on the map are typically shapes and this document
563            will often refer to objects as shapes.
564          </para>          </para>
565          </section>          </section>
566    
567          <section><title>Object Labelling</title>          <section><title>Object Labeling</title>
568          <para>          <para>
569          Objects can be labelled using the Label tool          Objects can be labeled using the Label tool
570          <inlinemediaobject>          <inlinemediaobject>
571          <imageobject>          <imageobject>
572          <imagedata fileref="../images/3_3_label.png" format="PNG"/>          <imagedata fileref="../images/3_3_label.png" format="PNG" scale="&imgscale;"/>
573          </imageobject>          </imageobject>
574          <imageobject>          <imageobject>
575          <imagedata fileref="./images/3_3_label.eps" format="EPS"/>          <imagedata fileref="./images/3_3_label.eps" format="EPS" scale="&imgscale;"/>
576          </imageobject>          </imageobject>
577          <textobject> <phrase>Label Tool</phrase> </textobject>          <textobject> <phrase>Label Tool</phrase> </textobject>
578          </inlinemediaobject>.          </inlinemediaobject>.
579          Clicking on an object selects that object and opens a dialog which          Clicking on an object selects that object and opens a dialog which
580          displays the table attributes for that object. An attribute can          displays the table attributes for that object. An attribute can
581          be selected to be the label on the map. Using this tool for an          be selected to be the label on the map. The label will be placed
582          object that already has a label will remove the label.          at the center of the shape. Clicking on an object that already has
583            a label will remove the label.
584          </para>          </para>
585          </section>          </section>
586    
587          <section><title>The Legend</title>          <section><title>The Legend</title>
588            <para>
589            <inlinemediaobject>
590            <imageobject>
591            <imagedata fileref="../images/3_5_legend.png" format="PNG" scale="&imgscale;"/>
592            </imageobject>
593            <imageobject>
594            <imagedata fileref="./images/3_5_legend.eps" format="EPS" scale="&imgscale;"/>
595            </imageobject>
596            <textobject> <phrase>Legend</phrase> </textobject>
597            </inlinemediaobject>
598            </para>
599          <para>          <para>
600          The Legend provides an overview of the layers in the map. Layers          The Legend provides an overview of the layers in the map. Layers
601          that appear higher in the legend will appear ``closer'' to the user.          that appear higher in the legend will appear ``closer'' to the user.
# Line 346  Line 608 
608          <para>          <para>
609          Along the top of the legend is a toolbar which allows quick access          Along the top of the legend is a toolbar which allows quick access
610          to some of the layer manipulation options under          to some of the layer manipulation options under
611          <menuchoice> <guimenu>Map</guimenu> </menuchoice>.          <menuchoice><guimenu>Map</guimenu></menuchoice>.
612            </para>
613    
614            <itemizedlist>
615            <listitem>
616            <para>
617            The Move Layer to Top tool
618            <inlinemediaobject>
619            <imageobject>
620            <imagedata fileref="../images/3_5_totop.png" format="PNG" scale="&imgscale;"/>
621            </imageobject>
622            <imageobject>
623            <imagedata fileref="./images/3_5_totop.eps" format="EPS" scale="&imgscale;"/>
624            </imageobject>
625            <textobject> <phrase>Move Layer to Top</phrase> </textobject>
626            </inlinemediaobject> raises the selected layer to the top of the map.
627            </para>
628            </listitem>
629            <listitem>
630    
631            <para>
632            The Move Layer Up tool
633            <inlinemediaobject>
634            <imageobject>
635            <imagedata fileref="../images/3_5_moveup.png" format="PNG" scale="&imgscale;"/>
636            </imageobject>
637            <imageobject>
638            <imagedata fileref="./images/3_5_moveup.eps" format="EPS" scale="&imgscale;"/>
639            </imageobject>
640            <textobject> <phrase>Move Layer Up</phrase> </textobject>
641            </inlinemediaobject> raises the selected layer one level.
642            </para>
643            </listitem>
644            <listitem>
645    
646            <para>
647            The Move Layer Down tool
648            <inlinemediaobject>
649            <imageobject>
650            <imagedata fileref="../images/3_5_movedown.png" format="PNG" scale="&imgscale;"/>
651            </imageobject>
652            <imageobject>
653            <imagedata fileref="./images/3_5_movedown.eps" format="EPS" scale="&imgscale;"/>
654            </imageobject>
655            <textobject> <phrase>Move Layer Down</phrase> </textobject>
656            </inlinemediaobject> lowers the selected layer one level.
657            </para>
658    
659            </listitem>
660            <listitem>
661            <para>
662            The Move Layer to Bottom tool
663            <inlinemediaobject>
664            <imageobject>
665            <imagedata fileref="../images/3_5_tobottom.png" format="PNG" scale="&imgscale;"/>
666            </imageobject>
667            <imageobject>
668            <imagedata fileref="./images/3_5_tobottom.eps" format="EPS" scale="&imgscale;"/>
669            </imageobject>
670            <textobject> <phrase>Move Layer to Bottom</phrase> </textobject>
671            </inlinemediaobject> lowers the selected layer to the bottom of the map.
672            </para>
673    
674            </listitem>
675            <listitem>
676            <para>
677            The Visible tool
678            <inlinemediaobject>
679            <imageobject>
680            <imagedata fileref="../images/3_5_visible.png" format="PNG" scale="&imgscale;"/>
681            </imageobject>
682            <imageobject>
683            <imagedata fileref="./images/3_5_visible.eps" format="EPS" scale="&imgscale;"/>
684            </imageobject>
685            <textobject> <phrase>Visible</phrase> </textobject>
686            </inlinemediaobject> shows the selected layer in the map if it was
687            hidden.
688            </para>
689    
690            </listitem>
691            <listitem>
692            <para>
693            The Invisible tool
694            <inlinemediaobject>
695            <imageobject>
696            <imagedata fileref="../images/3_5_invisible.png" format="PNG" scale="&imgscale;"/>
697            </imageobject>
698            <imageobject>
699            <imagedata fileref="./images/3_5_invisible.eps" format="EPS" scale="&imgscale;"/>
700            </imageobject>
701            <textobject> <phrase>Invisible</phrase> </textobject>
702            </inlinemediaobject> hides the selected layer in the map.
703            </para>
704    
705            </listitem>
706            <listitem>
707            <para>
708            The Properties tool
709            <inlinemediaobject>
710            <imageobject>
711            <imagedata fileref="../images/3_5_props.png" format="PNG" scale="&imgscale;"/>
712            </imageobject>
713            <imageobject>
714            <imagedata fileref="./images/3_5_props.eps" format="EPS" scale="&imgscale;"/>
715            </imageobject>
716            <textobject> <phrase>Properties</phrase> </textobject>
717            </inlinemediaobject> opens the layer's properties dialog box.
718          Double-clicking on a layer or a group of a layer will open the          Double-clicking on a layer or a group of a layer will open the
719          properties dialog for that layer.          properties dialog for that layer.
720          </para>          </para>
721            </listitem>
722            </itemizedlist>
723            <para>
724            Along the bottom of the legend is the scalebar. The scalebar
725            will be available if there are any layers and the  map has a
726            projection set.
727            </para>
728            </section>
729    
730            <section><title>Exporting</title>
731            <para>
732            Under Windows, maps can be exported in Enhanced Metafile format
733            (<varname>.wmf</varname>)
734            from
735            <menuchoice>
736            <guimenu>Map</guimenu>
737            <guimenuitem>Export</guimenuitem>
738            </menuchoice> for use in reports, presentations, or further
739            modification. The current map view, legend, and, if available,
740            scalebar are exported. Under other platforms this option is not
741            available. Clicking this menu item open a file selection dialog
742            that lets the user select a location to export the map.
743            </para>
744          </section>          </section>
745    
746          <section><title>Printing</title>          <section><title>Printing</title>
# Line 359  Line 749 
749          <menuchoice>          <menuchoice>
750          <guimenu>Map</guimenu>          <guimenu>Map</guimenu>
751          <guimenuitem>Print</guimenuitem>          <guimenuitem>Print</guimenuitem>
752          </menuchoice>. A standard printing dialog will open allowing the          </menuchoice>. The current map view, legend, and, if available,
753          user to configure the printer.          scalebar are printed. A standard printing dialog will open allowing
754            the user to configure the printer. This dialog will differ depending
755            on which platform Thuban is running.
756          </para>          </para>
757          </section>          </section>
758    
759    </chapter>    </chapter>
760    
761    <chapter><title>Layer Management</title>    <chapter><title>Layer Management</title>
# Line 374  Line 767 
767          There are two types of layers supported by Thuban: shape layers and          There are two types of layers supported by Thuban: shape layers and
768          image layers. Shape layers consist of vector based shapes with          image layers. Shape layers consist of vector based shapes with
769          geo-referenced coordinates. There are three types of supported          geo-referenced coordinates. There are three types of supported
770          shapes: polygons, lines, and points. Image layers can be any image          shapes: polygons, lines (arc), and points. Image layers can be any image
771          file format supported by GDAL. The images must have geographic          file format supported by the Geo-spatial Data Abstraction Library
772          coordinate data either embedded within the file, or in a seperate          (GDAL). The images must have geographic
773            coordinate data either embedded within the file or in a separate
774          file that is in the same directory as the image file. GeoTIFF files          file that is in the same directory as the image file. GeoTIFF files
775          work very well with Thuban and were designed specifically to be image          work very well with Thuban and were designed specifically to be image
776          layers in GIS programs.          layers in GIS programs.
777          </para>          </para>
778            <para>
779            All actions in the
780            <menuchoice>
781            <guimenu>Layer</guimenu>
782            </menuchoice> menu act on the currently selected layer in the legend.
783            </para>
784          </section>          </section>
785    
786          <section><title>Properties</title>          <section><title>Properties</title>
787          <para>          <para>
788          Each shape in a shape layer can have various properties which control          To view the properties for a layer it must first be selected in the
789          how it is drawn on the map. Polygons and points can be drawn with an          legend. The menu option
790          outline color and a fill color, while lines have only a line color.          <menuchoice>
791            <guimenu>Layer</guimenu>
792            <guimenuitem>Properties</guimenuitem>
793            </menuchoice> opens a dialog that displays a layer's properties.
794            All layers have a title which can be modified in the text field
795            provided. The type of layer is also shows. If the type is a type
796            of shape (polygon, arc, point) the classification table will be
797            shown. Image layers have no other properties other than title
798            and type.
799            </para>
800            <para>
801            <figure>
802            <title>Properties Window</title>
803            <mediaobject>
804            <imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
805            <imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
806            </mediaobject>
807            </figure>
808            </para>
809            <para>
810            <figure>
811            <title>Properties Window</title>
812            <mediaobject>
813            <imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
814            <imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
815            </mediaobject>
816            </figure>
817          </para>          </para>
818          </section>          </section>
819    
# Line 396  Line 822 
822          Sometimes it is not desirable to view all layers at the same time.          Sometimes it is not desirable to view all layers at the same time.
823          Some layers may take a long time to draw and so while navigating          Some layers may take a long time to draw and so while navigating
824          around the map the user may not want to wait for the map to redraw          around the map the user may not want to wait for the map to redraw
825          each time the map is changed. Each layer can be independently          all the layers each time the map is changed. Each layer can be
826          turned on or off using the          independently turned on or off using the
827          <menuchoice>          <menuchoice>
828          <guimenu>Layer</guimenu>          <guimenu>Layer</guimenu>
829          <guimenuitem>Show</guimenuitem>          <guimenuitem>Show</guimenuitem>
# Line 410  Line 836 
836          </para>          </para>
837          </section>          </section>
838    
         <section><title>Sequence</title>  
         <para>  
         </para>  
         </section>  
   
839          <section><title>Duplication</title>          <section><title>Duplication</title>
840          <para>          <para>
841          Layers and all their properties, including classifications, can          Layers and all their properties, including classifications, can
# Line 424  Line 845 
845          <guimenuitem>Duplicate</guimenuitem>          <guimenuitem>Duplicate</guimenuitem>
846          </menuchoice>. Duplicating a layer is useful if the user wishes          </menuchoice>. Duplicating a layer is useful if the user wishes
847          to model a layer in several different ways. Even though the layers          to model a layer in several different ways. Even though the layers
848          overlap by carefully selecting the shape properties it is possible          overlap, by carefully selecting the shape properties it is possible
849          to display several pieces of information at once. For example, one          to display several pieces of information at once. For example, one
850          copy of a roads layer may be classified on a length property and          copy of a roads layer may be classified on a length property and
851          another copy may be classified on a type property. if the length          another copy may be classified on a type property. If the length
852          property was expressed with color and the type property expressed          property was expressed with color and the type property expressed
853          with line thickness then it would be possible to view both          with line thickness then it would be possible to view both
854          classifications by placing the type property copy over the          classifications by placing the type property copy over the
# Line 445  Line 866 
866      cannot be classified.      cannot be classified.
867      </para>      </para>
868      <para>      <para>
869      A classification consists of a number of groups, with each group      A classification consists of a number of groups, each group
870      having a value or range of values to match against, and symbol      having a value or range of values to match against, and symbol
871      properties which control how a shape is drawn on the map. The user      properties which control how a shape is drawn on the map. The user
872      selects which field in the table is used by the classification and      selects which field in the table is used by the classification and
# Line 458  Line 879 
879      <para>      <para>
880      A layer always has a classification. When a new layer is added to the      A layer always has a classification. When a new layer is added to the
881      map, a default classification is created with the DEFAULT group. This      map, a default classification is created with the DEFAULT group. This
882      group cannot be removed. Every shape in the layer, regardless of its      group cannot be removed but can be hidden (see below). Every shape in the
883      attributes, will match this group.      layer, regardless of its attributes, will match this group if no other
884        group matches.
885      </para>      </para>
886    
887          <section><title>Editing Classifications</title>          <section><title>Editing Classifications</title>
# Line 476  Line 898 
898          button.          button.
899          </para>          </para>
900          <para>          <para>
901            To apply the changes to the map the user can click
902            either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
903            <guibutton>Try</guibutton> will not close the dialog box, allowing
904            the user to see how the classification changes the map.
905            <guibutton>Revert</guibutton> will undo the last classification applied
906            to the map. <guibutton>OK</guibutton> will commit the changes and
907            close the dialog. The user will be unable to undo the changes.
908            <guibutton>Close</guibutton> simply closes the dialog box. If any
909            changes have not been applied with <guibutton>Try</guibutton> the
910            changes will not be applied to the map.
911            </para>
912            <para>
913            <figure>
914            <title>Properties Window</title>
915            <mediaobject>
916            <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>
917            <imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject>
918            </mediaobject>
919            </figure>
920            </para>
921            <para>
922          The order of the groups in the classification is significant          The order of the groups in the classification is significant
923          except for the DEFAULT group, which remains at the top. When shapes          except for the DEFAULT group, which remains at the top. When shapes
924          are matched against groups the matching begins at the first group          are matched against groups the matching begins at the first group
925          other than the DEFAULT group so that groups higher in the list will          after the DEFAULT group so that groups higher in the list will
926          be checked first. Matching for a          be checked first. Matching for a
927          given shape will stop at the first group that matches. The user can          given shape will stop at the first group that matches. The user can
928          use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton>          use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton>
929          to change the order of the groups. The DEFAULT group will always          to change the order of the groups. The DEFAULT group will always
930          match a shape that hasn't matched another group.          match a shape that hasn't matched another group.
931          </para>          </para>
932          <para>              <section><title>Visible</title>
933          The Value column of the classification table is the value that will              <para>
934          be matched when the map is being drawn. The type of data that can              The Visible column has check-boxes that determine whether a
935          entered into this field depends on the type of data of the              classification group will be displayed in the legend. This is
936          classification field.              useful if the user knows that the groups completely cover
937          </para>              the data set and don't want the DEFAULT group to be displayed
938          <para>              in the legend and on a printout.
939          If the field is of type Text, anything entered              </para>
940          into the field is valid. The text will be compared literally to the          </section>
941          value of the shape attribute, including case sensitivity.              <section><title>Symbols</title>
942          If the type is Integer, then any valid integer may be entered. In              <para>
943          addition, with special syntax, a range of values can be entered.              Each type of shape has its own type of symbol. Thuban supports three
944          A range from <varname>start</varname> to <varname>end</varname>              types of shapes: polygons, lines, and points. Polygons and points
945          inclusive is specifed like this: <literal>[start;end]</literal>.              have outline and fill color, while lines have only line color. Each
946          The exclusive range is specified like this:              group has associated symbol properties. To edit the symbol
947          <literal>]start;end[</literal>. Ranges can include infinity like              properties for a group the user can double click on the Symbol
948          this: <literal>[-oo;oo]</literal>. Field types can also be of type              column or select a group and click the
949          Decimal. They represent any rational number and can be used in ranges              <guibutton>Edit Symbol</guibutton> button.
950          as well.              </para>
951          </para>              </section>
952          </section>          <section><title>Value</title>
953                <para>
954          <section><title>Symbols</title>              The Value column of the classification table is the value that will
955          <para>              be matched when the map is being drawn. The type of data that can
956          Each type of shape has its own type of symbol. Thuban supports three              entered into this field depends on the type of data of the
957          types of shapes: polygons, lines, and points. Polygons and points have              classification field.
958          outline and fill color, while lines have only line color. Each group              </para>
959          has associated symbol properties. To edit the symbol properties for a              <para>
960          group the user can double click on the Symbol column or select a              If the field is of type Text, anything entered
961          group and click the <guibutton>Edit Symbol</guibutton> button.              into the field is valid. The text will be compared literally to the
962          </para>              value of the shape attribute, including case sensitivity.
963                If the type is Integer, then any valid integer may be entered. In
964                addition, with special syntax, a range of values can be entered.
965                A range from <varname>start</varname> to <varname>end</varname>
966                inclusive is specified like this: <literal>[start;end]</literal>.
967                The exclusive range is specified like this:
968                <literal>]start;end[</literal>. Ranges can include infinity like
969                this: <literal>[-oo;oo]</literal>. Field types can also be of type
970                Decimal. They represent any rational number and can be used in
971                ranges as well.
972                </para>
973                </section>
974                <section><title>Label</title>
975                <para>
976                By default, the text that is displayed for a group in the legend
977                is the value for that group. The label can substitute a more
978                descriptive term in the legend.
979                </para>
980            </section>
981          </section>          </section>
982    
983          <section><title>Generating Classes</title>          <section><title>Generating Classes</title>
984          <para>          <para>
985            <figure>
986            <title>Generate Class</title>
987            <mediaobject>
988            <imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject>
989            <imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject>
990            </mediaobject>
991            </figure>
992            </para>
993            <para>
994          Creating a classification by hand can be tedious.          Creating a classification by hand can be tedious.
995          Thuban, therefore, provides a means of generating an entire          Thuban, therefore, provides a means of generating an entire
996          classification at once while still giving the user control over          classification at once while still giving the user control over
997          how it appears. Clicking <guibutton>Generate Class</guibutton>          how it appears. Clicking <guibutton>Generate Class</guibutton>
998          opens the <varname>Generate Classification</varname> dialog.          opens the <varname>Generate Classification</varname> dialog.
999          Under the <varname>Generate</varname> pulldown there are at most          Under the <varname>Generate</varname> pull down there are at most
1000          three different ways to generate classifications:          three different ways to generate classifications:
1001          Unique Values, Unique Distribution, and Quantiles. Some options          Unique Values, Uniform Distribution, and Quantiles. Some options
1002          may not be available if they data type for the field does not          may not be available if the data type for the field does not
1003          support them. For instance, <varname>Unique Distribution</varname>          support them. For instance, <varname>Uniform Distribution</varname>
1004          doesn't make sense for a Text field.          doesn't make sense for a Text field.
1005          </para>          </para>
1006          <para>          <para>
1007          For every way of generating a classification, a color scheme must          For every way of generating a classification, a color scheme must
1008          be selected. Thuban provides several different color schemes that          be selected. Thuban provides several different color schemes that
1009          affect how the group properties change over the classification.          affect how the group properties change over the classification.
1010            It may be desirable that only certain properties change over the
1011            classification. If the shape type is a polygon or a point then
1012            the <guibutton>Fix Border Color</guibutton> option will be available.
1013            This allows the user to select a border color for all classification
1014            groups.
1015          It is also possible to create a custom color scheme. Selecting          It is also possible to create a custom color scheme. Selecting
1016          this option will display two symbols: the one of the left has the          this option will display two symbols: the one of the left has the
1017          properties of the first group and the one on the right has the          properties of the first group and the one on the right has the
1018          properties of the last group. Thuban will interpolate between these          properties of the last group. Thuban will interpolate between these
1019          two properties to generate the other groups.          two properties to generate the other groups.
1020            <figure>
1021            <title>Custom Color Scheme</title>
1022            <mediaobject>
1023            <imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject>
1024            <imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject>
1025            </mediaobject>
1026            </figure>
1027          </para>          </para>
1028          <para>          <para>
1029          The Unique Values option lets the user select specific values that          The Unique Values option lets the user select specific values that
# Line 551  Line 1033 
1033          right. Each list can be sorted or reversed for easier searching.          right. Each list can be sorted or reversed for easier searching.
1034          The classification that is generated will be in the same order as          The classification that is generated will be in the same order as
1035          the list on the right.          the list on the right.
1036            <figure>
1037            <title>Unique Values</title>
1038            <mediaobject>
1039            <imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject>
1040            <imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject>
1041            </mediaobject>
1042            </figure>
1043          </para>          </para>
1044          <para>          <para>
1045          The Unique Distribution option creates a user specified number of          The Uniform Distribution option creates a user specified number of
1046          groups of ranges such that each range covers equal intervals. The          groups of ranges such that each range covers equal intervals. The
1047          minimum and maximum values can automatically be retrieved from the          minimum and maximum values can automatically be retrieved from the
1048          table by clicking <guibutton>Retrieve From Table</guibutton>. The          table by clicking <guibutton>Retrieve From Table</guibutton>. The
1049          stepping is how large each interval is. Adjusting this value will          stepping is how large each interval is. Adjusting this value will
1050          automatically recalculate how many groups is appropriate.          automatically recalculate how many groups is appropriate.
1051            <figure>
1052            <title>Uniform Distribution</title>
1053            <mediaobject>
1054            <imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject>
1055            <imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject>
1056            </mediaobject>
1057            </figure>
1058          </para>          </para>
1059          <para>          <para>
1060          The Quantiles option generates ranges based on the number items          The Quantiles option generates ranges based on the number of items
1061          in the input set. For example, by specifying 5 groups Thuban will          in the table. For example, by specifying five groups Thuban will
1062          generate groups with appropriate ranges such that 20% of the table          generate five groups with appropriate ranges such that 20% of the table
1063          data is in each group. If it is impossible to generate exact          data is in each group. If it is impossible to generate exact
1064          grouping, Thuban will issue a warning but allow the user to continue.          groupings, Thuban will issue a warning but allow the user to continue.
1065            <figure>
1066            <title>Quantiles</title>
1067            <mediaobject>
1068            <imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject>
1069            <imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject>
1070            </mediaobject>
1071            </figure>
1072          </para>          </para>
1073          </section>          </section>
1074    </chapter>    </chapter>
# Line 574  Line 1077 
1077      <para>      <para>
1078      Projections control how the geographic data is displayed on the screen.      Projections control how the geographic data is displayed on the screen.
1079      If multiple layers are loaded into Thuban where the geographic data      If multiple layers are loaded into Thuban where the geographic data
1080      is in a different projection system, then the user must tell Thuban      is in a different projection system, then the user must specify a
1081      which projection each layer has. The user must also tell Thuban which      projection for each layer. The user must also tell Thuban which
1082      projection the map is in. This can be the same as the layers or a different      projection the map is in. This can be the same as the layers or a different
1083      projection in which case the layers are reprojected into that space.      projection in which case the layers are reprojected into that space.
1084      The map projection can be set using      The map projection can be set using
# Line 587  Line 1090 
1090      <guimenu>Layer</guimenu>      <guimenu>Layer</guimenu>
1091      <guimenuitem>Projection</guimenuitem>      <guimenuitem>Projection</guimenuitem>
1092      </menuchoice>.      </menuchoice>.
1093        <figure>
1094        <title>Projection Window</title>
1095        <mediaobject>
1096        <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>
1097        <imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject>
1098        </mediaobject>
1099        </figure>
1100      </para>      </para>
1101      <para>      <para>
1102      Thuban is distributed with a sample collection of projections. The      Thuban is distributed with a sample collection of projections. The
1103      user can create new projections and make them available to all      user can create new projections and make them available to all
1104      future Thuban sessions. They may also be exported and imported so      future Thuban sessions. They may also be exported and imported so
1105      that custom projections can be distributed to others.      that custom projections can be distributed.
1106      </para>      </para>
1107          <section><title>Selecting a Projection</title>          <section><title>Selecting a Projection</title>
1108          <para>          <para>
1109          The available projections are listed on the left. If the layer          The available projections are listed on the left. If the layer
1110          or map already has a projection it will be initially highlighted          or map already has a projection it will initially be highlighted
1111          and will end with <varname>(current)</varname>. Selecting          and will end with <varname>(current)</varname>. Selecting
1112          <varname>None</varname> will cause Thuban to use the data as          <varname>&lt;None&gt;</varname> will cause Thuban to use the data as
1113          it appears in the source file and will not use a projection.          it appears in the source file and will not use a projection.
1114          </para>          </para>
1115      </section>      </section>
# Line 608  Line 1118 
1118          Whenever a projection is selected from the list its properties          Whenever a projection is selected from the list its properties
1119          are displayed on the right. These properties can be changed          are displayed on the right. These properties can be changed
1120          and the changes saved to the selected projection using          and the changes saved to the selected projection using
1121          the <guibutton>Update</guibutton>. Only a projection that comes          <guibutton>Update</guibutton>. Only a projection that comes
1122          from a file can be updated, so if the current layer's projection          from a file can be updated, so if the current layer's projection
1123          is selectd, <guibutton>Update</guibutton> will be disabled.          is selected, <guibutton>Update</guibutton> will be disabled.
1124          The <guibutton>Add to List</guibutton> adds the projection to the          <guibutton>Add to List</guibutton> adds the projection to the
1125          list of available projections as a new entry, and thus make it          list of available projections as a new entry, and thus makes it
1126          available to future Thuban sessions. Clicking <guibutton>New</guibutton>          available to future Thuban sessions. Clicking <guibutton>New</guibutton>
1127          will create an entirely new, empty projection. The          will create an entirely new, empty projection. The
1128          <guibutton>Remove</guibutton> button will permanantly remove a          <guibutton>Remove</guibutton> button will permanently remove a
1129          projection from the list of available projections.          projection from the list of available projections.
1130          </para>          </para>
1131            <para>
1132            To apply the selected projection to the map the user can click
1133            either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1134            <guibutton>Try</guibutton> will not close the dialog box, allowing
1135            the user to see how the projeciton changes the map.
1136            <guibutton>Revert</guibutton> will undo the last projection applied
1137            to the map. <guibutton>OK</guibutton> will commit the changes and
1138            close the dialog. The user will be unable to undo the changes.
1139            <guibutton>Close</guibutton> simply closes the dialog box. If no
1140            selection has been applied with <guibutton>Try</guibutton> the
1141            selection will not be applied to the map.
1142            </para>
1143      </section>      </section>
1144          <section><title>Importing/Exporting Projections</title>          <section><title>Importing/Exporting Projections</title>
1145          <para>          <para>
1146          The projections that appear in the list of available projections          The projections that appear in the list of available projections
1147          can be exported to another file that the user chooses. By selecting          can be exported to another file that the user chooses. By selecting
1148          one or more projections and clicking <guibutton>Export</guibutton>          one or more projections and clicking <guibutton>Export</guibutton>
1149          the user will be able to select a file to store those projections.          the user will be able to select a file in which to store those
1150            projections.
1151          The file can then be distributed to other Thuban users. To import          The file can then be distributed to other Thuban users. To import
1152          a projection file the user can click <guibutton>Import</guibutton>.          a projection file the user can click <guibutton>Import</guibutton>.
1153          The imported projections are added to the list and are then available          The imported projections are added to the list and are then available
1154          to the current session and any future Thuban session.          to the current session and any future Thuban sessions.
1155          </para>          </para>
1156      </section>      </section>
1157    </chapter>    </chapter>
1158    
1159    <chapter><title>Table Management</title>    <chapter><title>Table Management</title>
1160      <para>      <para>
1161              Thuban distinguishes two different types of tables: Attribute tables      Thuban distinguishes two different types of tables: Attribute tables
1162              (which belong to a layer) and usual data tables. Both provide in      (which belong to a layer) and normal data tables. Both provide
1163          general the same functionality with the difference that actions on an          the same general functionality with the difference that actions on an
1164              attribute table might also effect the map display.      attribute table might also effect the map display.
1165      </para>      </para>
1166    
1167      <section><title>Table View</title>      <section><title>Table View</title>
1168        <para>          <para>
1169            <figure>
1170            <title>Table View</title>
1171            <mediaobject>
1172            <imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject>
1173            <imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject>
1174            </mediaobject>
1175            </figure>
1176            </para>
1177            <para>
1178          Thuban provides a standard dialog to display table contents, the          Thuban provides a standard dialog to display table contents, the
1179          Table View. The view falls into five sections: The title, selections,          Table View. The view has five sections: The title, selections,
1180          the table grid, export functions and the status bar.          the table grid, export functions, and the status bar.
1181        </para>          </para>
1182        <para>          <para>
1183          The title bar identifies the table with it's name.          The title bar identifies the table with its name.
1184        </para>          </para>
1185        <para>          <para>
1186          The functions box let the user perform simple analysis on the data          The selections box let the user perform simple analysis on the data
1187          based on comparisons: First choice must be a field identifier of the          based on comparisons: The first choice must be a field identifier of
1188          table, the second choice determines the type of comparison. The third          the table, the second choice determines the type of comparison. The
1189          choice can be either a specific value (interpreted as numerical          third choice can be either a specific value (interpreted as numerical
1190          or string depending on the type of the first field) or a second field          or string depending on the type of the first field) or a second field
1191          identifier. Thus you can perform analysis like selecting all          identifier. Thus you can perform analysis like selecting all
1192          records where "population > 10000" or          records where <literal>population > 10000</literal> or
1193          "cars_per_habitants <  bike_per_habitants" (note that the field names          <literal>cars_per_inhabitant < bikes_per_inhabitant</literal>
1194          are only explanatory, the currently considered dbase files allow only          (note that the field names are only explanatory, the dBase files
1195          11 character field names).          allow only 11 character field names).
1196                  
1197          Selections can be combined, either by applying a selection only on          Selections can be combined either by applying a selection only on
1198          a previously selected set of records or by adding the results of a          a previously selected set of records or by adding the results of a
1199          selection to a previous set. The default is that a selection replaces          selection to a previous set. The default is that a selection replaces
1200          earlier results.          earlier results.
1201        </para>          </para>
1202        <para>          <para>
1203          The table grid shows the contents of the table (a record per column),          The table grid shows the contents of the table (one record per row),
1204          with highlighted selection results. Columns and rows can be resized.          with highlighted selection results. Columns and rows can be resized.
1205        </para>          </para>
1206        <para>          <para>
1207          The contents of a table can be exported into a file, either dbase          The contents of a table can be exported into a file, either dBase
1208          format (DBF) or comma seperated values (CSV). The 'Export' button          format (DBF) or comma separated values (CSV). The
1209            <guibutton>Export</guibutton> button
1210          raises a file dialog to specify a path and file name, the export type          raises a file dialog to specify a path and file name, the export type
1211          is determined by the file extension (either .dbf or .csv).          is determined by the file extension (either .dbf or .csv).
1212    
1213          The 'Export Selection' button works similar but exports only the          The <guibutton>Export Selection</guibutton> button works similarly
1214          selected records.          but exports only the selected records.
1215    
1216          The 'Close' button closes the table view. In difference to the          The <guibutton>Close</guibutton> button closes the table view window.
1217          menu item 'Close' just the dialog is closed, the table is still loaded          This is different from the menu item
1218          in Thuban.          <menuchoice>
1219        </para>          <guimenu>Table</guimenu>
1220        <para>          <guimenuitem>Close</guimenuitem>
1221            </menuchoice> which unloads the table from Thuban.
1222            </para>
1223            <para>
1224          The status bar displays some statistics about the table and optional          The status bar displays some statistics about the table and optional
1225          selection results.          selection results.
1226        </para>          </para>
1227      </section>      </section>
1228    
1229      <section><title>General Functionality (Menu Table)</title>      <section><title>General Functionality (Menu Table)</title>
1230        <para>          <para>
1231          The general functions affect all tables open in Thuban. Attribute          The general functions affect all tables open in Thuban. Attribute
1232          tables are considered as here as usual data tables (with the exception          tables are considered here as normal data tables (with the exception
1233          that they cannot be closed).          that they cannot be closed).
       </para>  
       <section><title>Open</title>  
         <para>  
           The 'Open' item raises a file dialog to let you select a  
           dbase file from the file system to be loaded into Thuban read-only.  
           On OK the selected file is loaded and a table view is opened.  
1234          </para>          </para>
1235        </section>          <section><title>Open</title>
1236                <para>
1237        <section><title>Close</title>              The
1238          <para>              <menuchoice>
1239            The 'Close' item raises a dialog listing the currently open              <guimenu>Table</guimenu>
1240            data tables (loaded via the 'Open' functionality'). You can select              <guimenuitem>Open</guimenuitem>
1241            tables which are dereferenced on confirmation. Since tables are              </menuchoice>
1242            opened read-only the contents of the tables are not affected.              item raises a file dialog to let you select a
1243                dBase file from the file system to be loaded into Thuban read-only.
1244            A still open table view is closed as well.              On <guibutton>OK</guibutton> the selected file is loaded and a
1245                table view is opened.
1246            Tables used in a join can not be closed.              </para>
1247          </para>          </section>
1248        </section>  
1249            <section><title>Close</title>
1250        <section><title>Rename</title>              <para>
1251          <para>              The
1252            Changes the table title.              <menuchoice>
1253          </para>              <guimenu>Table</guimenu>
1254        </section>              <guimenuitem>Close</guimenuitem>
1255                </menuchoice>
1256        <section><title>Show</title>              item raises a dialog listing the currently open
1257          <para>              data tables
1258            The 'Show' item raises a list of available tables (explicitly loaded,           attribute tables, results of a join). Selected tables are show in              (loaded via
1259            tables views on 'OK'.                        <menuchoice>
1260          </para>              <guimenu>Table</guimenu>
1261        </section>              <guimenuitem>Open</guimenuitem>
1262                </menuchoice>). Selected tables are dereferenced on confirmation.
1263        <section><title>Join</title>              Since tables are opened read-only the contents of the tables are
1264          <para>              not affected.
1265            The 'Join' item raises a dialog to specify the two tables to be  
1266            joined. The join results in a new table named 'Join of "left table"              Any open views of the tables are closed as well.
1267            and "right table"'.  
1268                Tables used in a join cannot be closed.
1269            The dialog let you select the two tables to be joined and the two              </para>
1270            fields the join has to be performed on. By default the new          </section>
1271            table contains only those records which are mathced by the join.  
1272            <section><title>Rename</title>
1273            If you want to preserve the records of the left table you can perform              <para>
1274            an outer join. The fields from the right table for records not              <menuchoice>
1275            matched by the join are filled with <varname>None</varname> in this              <guimenu>Table</guimenu>
1276            case.              <guimenuitem>Rename</guimenuitem>
1277          </para>              </menuchoice> changes the table title.
1278        </section>              </para>
1279            </section>
1280    
1281            <section><title>Show</title>
1282                <para>
1283                The
1284                <menuchoice>
1285                <guimenu>Table</guimenu>
1286                <guimenuitem>Show</guimenuitem>
1287                </menuchoice>
1288                item raises a list of available tables (explicitly
1289                loaded, attribute tables, results of a join). Selected tables are
1290                show in tables views on <guibutton>OK</guibutton>.
1291                </para>
1292            </section>
1293    
1294            <section><title>Join</title>
1295                <para>
1296                <figure>
1297                <title>Join Tables</title>
1298                <mediaobject>
1299                <imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject>
1300                <imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject>
1301                </mediaobject>
1302                </figure>
1303                </para>
1304                <para>
1305                The
1306                <menuchoice>
1307                <guimenu>Table</guimenu>
1308                <guimenuitem>Join</guimenuitem>
1309                </menuchoice>
1310                item raises a dialog to specify the two tables to be
1311                joined. The join results in a new table named 'Join of "left table"
1312                and "right table"'.
1313    
1314                The dialog lets you select the two tables to be joined and the two
1315                fields the join has to be performed on. By default, the new
1316                table contains only those records which are matched by the join.
1317    
1318                If you want to preserve the records of the left table you can
1319                perform an outer join. The fields from the right table for records
1320                not matched by the join are filled with <varname>None</varname> in
1321                this case.
1322                </para>
1323            </section>
1324    
1325      </section>      </section>
1326      <section><title>Attribute Tables</title>      <section><title>Attribute Tables</title>
     <para>  
             To clearly separate between both types, Thuban provides functionality  
             regarding the attribute tables under the Layer menu.  
     </para>  
   
       <section><title>Show Table</title>  
         <para>  
           Opens the attribute table of the currently active layer in a table  
           view.  
   
           In addition to the functionality described above selections  
           affect also the map display: objects related to selected records  
           are highlighted.  
         </para>  
       </section>  
   
       <section><title>Join Table</title>  
1327          <para>          <para>
1328             In difference to the join described above the join results not in a              To clearly separate between both types of tables (data and
1329            attribute), Thuban provides functionality regarding the attribute
1330            tables under the <menuchoice><guimenu>Layer</guimenu></menuchoice> menu.
1331            </para>
1332    
1333            <section><title>Show Table</title>
1334                <para>
1335                <menuchoice>
1336                <guimenu>Layer</guimenu>
1337                <guimenuitem>Show Table</guimenuitem>
1338                </menuchoice>
1339                opens the attribute table of the currently active layer in a table
1340                view.
1341    
1342                In addition to the functionality described above selections
1343                affect also the map display: objects related to selected records
1344                are highlighted.
1345                </para>
1346            </section>
1347    
1348            <section><title>Join Table</title>
1349                <para>
1350                Unlike the join described above, the join does not result in a
1351              new table. The attribute table of the currently active layer is the              new table. The attribute table of the currently active layer is the
1352              left table and other tables are join to this table. Results of the              left table and other tables are joined to this table. The results of
1353              join in turn are available for classifications.              the join are available for classification.
   
             As a consequence of the above the join cannot result in less  
             records than the source attribute table. You are warned if the  
             right table does not fulfill this constraint. Use an outer join  
             in such cases.  
         </para>  
       </section>  
1354    
1355        <section><title>Unjoin Table</title>              As a consequence, the join cannot result in fewer
1356          <para>              records than the source attribute table. The user is warned if the
1357              As said above, a usual table can not be closed while still used in              right table does not fulfill this constraint. An outer join must be
1358              a join. While the join table resulting from a join of usual tables              used in such cases.
1359              can be simply closed (and therewith dereferences the source tables)              </para>
1360              this is not possible for attribute tables.          </section>
1361    
1362              Hence joins on attribute tables must be solved explicitely. This is          <section><title>Unjoin Table</title>
1363              what the 'Unjoin' item is used for: The last join for the currently              <para>
1364                As said above, a normal table cannot be closed while it is still
1365                used in a join. While the joined table resulting from a join of
1366                normal tables can be simply closed (and thereby dereferencing
1367                the source tables), this is not possible for attribute tables.
1368    
1369                Hence joins on attribute tables must be solved explicitly. This is
1370                what the
1371                <menuchoice>
1372                <guimenu>Layer</guimenu>
1373                <guimenuitem>Unjoin Table</guimenuitem>
1374                </menuchoice>
1375                item is used for: The last join for the currently
1376              active layer is solved.              active layer is solved.
1377          </para>              </para>
1378        </section>          </section>
   
1379      </section>      </section>
1380    </chapter>    </chapter>
1381    
1382      <chapter><title>Extensions</title>
1383            <para>
1384            Thuban is designed to be extensible. The term Extension is used as a
1385            general term for anything that extends Thuban.
1386            This chapter introduces into some oppportunities how to add and
1387            handle extra functionality developed by your own or third parties.
1388            </para>
1389    
1390            <section><title>Add personal extensions via thubanstart.py</title>
1391                    <para>
1392                    After Thuban has been started for the first time, a directory
1393                    .thuban is created within your home directory.
1394                    There you can add a file thubanstart.py  which will be imported
1395                    by Thuban at start-up. It is recommended to add only import-statements
1396                    to this file to keep the actual code of extensions separate.
1397                    </para>
1398                    <para>
1399                    The modules to import must either be found through the environment
1400                    variable PYTHONPATH or directly be placed into the .thuban-directory.
1401                    </para>
1402                    <para>
1403                    As an example, copy the file examples/simple_extensions/hello_world.py
1404                    of the Thuban source code into the .thuban-directory of your home
1405                    directory. Now add add the statement import hello_world to the
1406                    file thubanstart.py and run Thuban. You will notice an additional
1407                    menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where
1408                    the new item for the Hello-World extension is placed - select it
1409                    to see the Hello-World message.
1410                    </para>
1411            </section>
1412    
1413            <section><title>Writing simple extensions</title>
1414                    <para>
1415                    Writing an extension for Thuban basically means to
1416                    implement the extra functionality in Python with all of the
1417                    Thuban classes, methods and variables available.
1418                    </para>
1419                    <para>
1420                    All classes and their methods are documented in the source code
1421                    (see their doc-strings). Here is an example from
1422                    Thuban/Model/layer.py that describes some of the methods
1423                    of a Layer object:
1424                    </para>
1425                    <programlisting>
1426                    <![CDATA[
1427    class BaseLayer(TitledObject, Modifiable):
1428    
1429        """Base class for the layers."""
1430    
1431        def __init__(self, title, visible = True, projection = None):
1432            """Initialize the layer.
1433    
1434            title -- the title
1435            visible -- boolean. If true the layer is visible.
1436            """
1437            TitledObject.__init__(self, title)
1438            Modifiable.__init__(self)
1439            self.visible = visible
1440            self.projection = projection
1441    
1442        def Visible(self):
1443            """Return true if layer is visible"""
1444            return self.visible
1445    
1446        def SetVisible(self, visible):
1447            """Set the layer's visibility."""
1448            self.visible = visible
1449            self.issue(LAYER_VISIBILITY_CHANGED, self)
1450    
1451        def HasClassification(self):
1452            """Determine if this layer support classifications."""
1453    ...
1454                    ]]>
1455                    </programlisting>
1456                    <para>
1457                    This example intends to give you an impression of the
1458                    source-code-level documentation.
1459                    You have to make yourself familiar with
1460                    the Python programming language to understand some special
1461                    code elements.
1462                    </para>
1463                    <section><title>hello_world.py</title>
1464                      <para>
1465                      Traditionally, the first example should welcome the world.
1466                      Most of the code handles the frame for integrating a menu
1467                      item into Thuban while the actual raising of a message
1468                      is done in a single line.
1469                      </para>
1470                            <programlisting>
1471                            <![CDATA[
1472    # Copyright (C) 2003 by Intevation GmbH
1473    # Authors:
1474    # Jan-Oliver Wagner <[email protected]>
1475    #
1476    # This program is free software under the GPL (>=v2)
1477    # Read the file COPYING coming with Thuban for details.
1478    
1479    """
1480    Extend Thuban with a sample Hello World to demonstrate simple
1481    extensions.
1482    """
1483    
1484    __version__ = '$Revision$'
1485    
1486    # use _() already now for all strings that may later be translated
1487    from Thuban import _
1488    
1489    # Thuban has named commands which can be registered in the central
1490    # instance registry.
1491    from Thuban.UI.command import registry, Command
1492    
1493    # The instance of the main menu of the Thuban application
1494    # See Thuban/UI/menu.py for the API of the Menu class
1495    from Thuban.UI.mainwindow import main_menu
1496    
1497    def hello_world_dialog(context):
1498        """Just raise a simple dialog to greet the world.
1499    
1500        context -- The Thuban context.
1501        """
1502        context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!'))
1503    
1504    
1505    # create a new command and register it
1506    registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog,
1507                         helptext = _('Welcome everyone on this planet')))
1508    
1509    # find the extensions menu (create it anew if not found)
1510    extensions_menu = main_menu.find_menu('extensions')
1511    if extensions_menu is None:
1512        extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
1513    
1514    # finally bind the new command with an entry in the extensions menu
1515    extensions_menu.InsertItem('hello_world')
1516                            ]]>
1517                            </programlisting>
1518                    </section>
1519                    <section><title>Registering a Command</title>
1520                      <para>
1521                      Mainly, our new function has to be registered to the Thuban
1522                      framework in order to connect it to the menu. A registered
1523                      command can also be connected to e.g. a toolbar button.
1524                      </para>
1525                      <para>
1526                      The instances and classes for this are imported at the beginning.
1527                      Any code not inside a method or class is directly executed when
1528                      the source-code module is imported. Therefore, the second
1529                      part of this example consist of the plain statements to create a new
1530                      Command and to add it to the menu.
1531                      </para>
1532                      <para>
1533                      By convention, it looks for a menu registered as ``extensions'' to
1534                      insert the new command. If it does not exist yet, it gets created.
1535                      It is advisable to copy this code for any of your extensions.
1536                      </para>
1537                    </section>
1538                    <section><title>The Thuban context</title>
1539                            <para>
1540                            A registered command that is called, always receives the
1541                            Thuban context. This instance provides our method with
1542                            hook references to all important components of the Thuban
1543                            application.
1544                            </para>
1545                            <para>
1546                    In the example hello_world.py, our function uses the
1547                            mainwindow component which offers a method to raise a
1548                            message dialog. In total there are three hooks:
1549                            <itemizedlist>
1550                            <listitem>
1551                            <para>application:
1552                            This object is the instance of the Thuban Application class.
1553                            Except maybe for loading or savinf sessions, you will not
1554                            need this object for a simple extension.
1555                            See Thuban/UI/application.py for the API.
1556                            </para>
1557                            </listitem>
1558                            <listitem>
1559                            <para>session:
1560                            The instance of the current session. It manages the sessions'
1561                            map and tables. You can set and remove the map or tables.
1562                            In may also get the map object. However, you should know that
1563                            internally it is already prepared to handle many maps.
1564                            Therfore, currently you would always receive a list with exactlty
1565                            one element. In the future, if there are more than one map,
1566                            you will not know which one is the currently display one and
1567                            therefore you should use the mainwindow as hook to find
1568                            the currently displayed map.
1569                            See Thuban/Model/session.py for the API.
1570                            </para>
1571                            </listitem>
1572                            <listitem>
1573                            <para>
1574                            mainwindow: The mainwindow object is central to manage various
1575                            GUI things such as the Legend sub-window. Most notably,
1576                            you get access to the canvas which is the window part where
1577                            the map is drawn. The canvas knows, which map it currently
1578                            draws and therefore you get the current map via
1579                            context.mainwindow.canvas.Map().
1580                            See Thuban/UI/mainwindow.py for the API.
1581                            </para>
1582                            </listitem>
1583                            </itemizedlist>
1584                </para>
1585                    </section>
1586            </section>
1587      </chapter>
1588    
1589    <chapter><title>Trouble Shooting</title>    <chapter><title>Trouble Shooting</title>
1590      <para>      <para>
1591        Here are a few problems that users have encountered when first using Thuban.
1592        </para>
1593        <para>
1594    
1595        <itemizedlist>
1596        <listitem>
1597        <para>After adding two or more layers nothing is drawn in the map window.
1598        </para>
1599        <para>
1600        This is probably because the layers have different projections. Projections
1601        must be set on all layers and on the map itself if the layers' projections
1602        are different.
1603        </para>
1604        </listitem>
1605    
1606        <listitem>
1607        <para>Thuban crashes on startup with the error
1608            <literal>NameError: global name 'False' is not defined</literal>.
1609        </para>
1610        <para>
1611        <varname>True</varname> and <varname>False</varname> were only introduced
1612        in Python 2.2.1. Thuban depends on at least Python 2.2.1.
1613        </para>
1614        </listitem>
1615    
1616        <listitem>
1617        <para>After compiling Thuban, Thuban crashes with an error similar to
1618            <literal>
1619            ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0
1620            </literal>
1621        </para>
1622        <para>
1623        Thuban depends on the wxWindows library. If Thuban is compiled with an
1624        incompatible version of the compiler than wxWindows was compiled with
1625        this error may occur. Try compiling with a different version of the
1626        compiler.
1627        </para>
1628        </listitem>
1629        </itemizedlist>
1630        </para>
1631        <para>
1632        If an error occurs Thuban will display a dialog indicating the error
1633        before closing. The text should be copied and reported to the
1634        <ulink url="http://thuban.intevation.org/bugtracker.html">
1635        Intevation bugtracker
1636        </ulink>.
1637        More information about the system is available from
1638        <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.
1639        This should also be included in the bug report.
1640        <figure>
1641        <title>Error Dialog</title>
1642        <mediaobject>
1643        <imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject>
1644        <imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject>
1645        </mediaobject>
1646        </figure>
1647      </para>      </para>
1648    
1649    </chapter>    </chapter>
1650    
1651    <appendix><title>Supported Data Sources</title>    <appendix><title>Supported Data Sources</title>
# Line 806  Line 1654 
1654      <variablelist>      <variablelist>
1655      <varlistentry>      <varlistentry>
1656      <term>Shapefile</term>      <term>Shapefile</term>
1657      <listitem><para></para></listitem>      <listitem>
1658            <para>
1659            The Shapefile format has become a standard format for saving
1660            geographic vector information. It supports polygons, lines, and
1661            points.
1662            
1663            <ulink url="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf">
1664            Technical Specification.
1665            </ulink>  
1666            </para>
1667        </listitem>
1668      </varlistentry>      </varlistentry>
1669    
1670      <varlistentry>      <varlistentry>
1671      <term>DB2 file</term>      <term>dBase file</term>
1672      <listitem><para></para></listitem>      <listitem>
1673            <para>
1674            dBase files are used to store the attributes for each layer. This
1675            is closely associated with the Shapefile format. For detailed
1676            specifications on the correct format of a dBase file used with
1677            Thuban please see the Technical Specification for the Shapefile
1678            format above.
1679            </para>
1680        </listitem>
1681        </varlistentry>
1682    
1683        <varlistentry>
1684        <term>Raster files</term>
1685        <listitem>
1686            <para>
1687            Binding the GDAL library Thuban supports numerous raster file formats,
1688            see <ulink url="http://www.remotesensing.org/gdal/formats_list.html">
1689            GDAL format list</ulink> for details.</para>
1690    
1691            <para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis>
1692            format: Raster maps are provided as TIFF images, with an additional
1693            "world file" storing the geographic reference (usually with an
1694            extension ".tfw").
1695            </para>
1696        </listitem>
1697      </varlistentry>      </varlistentry>
1698    
1699      </variablelist>      </variablelist>
# Line 819  Line 1701 
1701    
1702    <appendix><title>Supported Projections</title>    <appendix><title>Supported Projections</title>
1703      <para>      <para>
1704        The following types of projections are directly support by
1705        Thuban. The specific values for each are provided by the user
1706        to create custom projections. Thuban comes with predefined
1707        projections which are available through the Projections dialog.
1708        </para>
1709        <itemizedlist>
1710        <listitem>
1711            <para>Geographic</para>
1712            <itemizedlist>
1713            <listitem><para><literal>Ellipsoid</literal></para></listitem>
1714            <listitem><para>
1715                    <literal>Source Data</literal>: either Degrees or Radians
1716                    </para></listitem>
1717            </itemizedlist>
1718        </listitem>
1719        <listitem>
1720            <para>Lambert Conic Conformal</para>
1721        <itemizedlist>
1722            <listitem><para><literal>Ellipsoid</literal></para></listitem>
1723            <listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem>
1724            <listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem>
1725            <listitem><para><literal>Central Meridian</literal></para></listitem>
1726            <listitem><para><literal>Latitude of Origin</literal></para></listitem>
1727            <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
1728            <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
1729        </itemizedlist>
1730        </listitem>
1731        <listitem>
1732            <para>Transverse Mercator</para>
1733        <itemizedlist>
1734            <listitem><para><literal>Ellipsoid</literal></para></listitem>
1735            <listitem><para><literal>Latitude</literal>of origin</para></listitem>
1736            <listitem><para><literal>Longitude</literal>at central meridian</para></listitem>
1737            <listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem>
1738            <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
1739            <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
1740        </itemizedlist>
1741        </listitem>
1742        <listitem>
1743            <para>Universal Transverse Mercator</para>
1744        <itemizedlist>
1745            <listitem><para><literal>Ellipsoid</literal></para></listitem>
1746            <listitem><para><literal>Zone</literal>
1747                    (can be guessed appling the Propose button)</para></listitem>
1748            <listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem>
1749        </itemizedlist>
1750        </listitem>
1751        </itemizedlist>
1752        
1753        <para>
1754        Thuban comes with a sample set of map projections for various
1755        European countries. Apart from the basic projection they differ
1756        especially in their parameterization:
1757        </para>
1758        <itemizedlist>
1759        <listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para>
1760        </listitem>
1761    
1762        <listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para>
1763        </listitem>
1764    
1765        <listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)
1766        </para>
1767        </listitem>
1768    
1769        <listitem><para>Reseau Geodesique Francaise
1770        (France, Lambert Conic Conformal)</para>
1771        </listitem>
1772    
1773        <listitem><para>UK National Grid (United Kingdom, Transverse Mercartor)
1774        </para>
1775        </listitem>
1776        </itemizedlist>
1777    
1778        <para>
1779        Thuban uses the comprehensive PROJ library for projections. PROJ provides
1780        more than the four commonly used projections described above. If needed
1781        Thuban can be easily extended to a new projection covered by PROJ.
1782      </para>      </para>
     <variablelist>  
     <varlistentry>  
     <term>Geographic</term>  
     <listitem><para>Geographic</para></listitem>  
     </varlistentry>  
     <varlistentry>  
     <term>Lambert Conic Conformal</term>  
     <listitem><para>Lambert Conic Conformal</para></listitem>  
     </varlistentry>  
     <varlistentry>  
     <term>Transverse Mercator</term>  
     <listitem><para>Transverse Mercator</para></listitem>  
     </varlistentry>  
     <varlistentry>  
     <term>Universal Transverse Mercator</term>  
     <listitem><para>Universal Transverse Mercator</para></listitem>  
     </varlistentry>  
     </variablelist>  
1783    </appendix>    </appendix>
1784    
1785  </book>  </book>
1786    

Legend:
Removed from v.1478  
changed lines
  Added in v.1719

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26