/[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 1475 by jonathan, Thu Jul 24 11:19:51 2003 UTC revision 2311 by jan, Sat Jul 31 11:12:20 2004 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 "60">]>
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>
17          <author>
18            <firstname>Frank</firstname><surname>Koormann</surname>
19          </author>
20            </authorgroup>
21      <copyright>      <copyright>
22        <year>2003</year>        <year>2003, 2004</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         <revision>
28            <revnumber>CVS version $Id$</revnumber>
29            <date></date>
30            <revremark>Under development.</revremark>
31         </revision>
32         <revision>
33            <revnumber>1.0.0</revnumber>
34            <date>22-Jan-2004</date>
35            <revremark>
36                            Corresponds to Thuban 1.0.0.
37                            New: Installation instructions for Win32.
38                    </revremark>
39         </revision>
40         <revision>
41            <revnumber>1.0pre3</revnumber>
42            <date>04-Dec-2003</date>
43            <revremark>
44                            Corresponds to Thuban 1.0rc1.
45                            New: I18n, right button legend menu, EPSG projectons,
46                PostGIS support.
47                    </revremark>
48         </revision>
49         <revision>
50            <revnumber>1.0pre2</revnumber>
51            <date>29-Aug-2003</date>
52            <revremark>
53                            Corresponds to Thuban development release 0.8.1.
54                            New: chapter on extensions.
55                    </revremark>
56         </revision>
57         <revision>
58            <revnumber>1.0pre1</revnumber>
59            <date>08-Aug-2003</date>
60            <revremark>Corresponds to Thuban development release 0.8.1.</revremark>
61         </revision>
62      </revhistory>
63    
64    </bookinfo>    </bookinfo>
65    
66    <chapter><title>Introduction</title>    <chapter><title>Introduction</title>
67      <para>      <para>
68      Thuban is a Free Software Geographic Information Systems (GIS) viewer.      Thuban is an interactive geographic data viewer.
69      It is being developed because there is currently no simple interactive      Its development had been started because there was no simple interactive
70      viewer for geographic information available as Free Software. Thuban is      viewer for geographic information available as Free Software. Thuban is
71      written in Python and C++ and uses the wxWindows library allowing it to      written mainly in Python and uses the wxWidgets (former wxWindows)
72        library allowing it to
73      run on many different platforms, including GNU/Linux and Windows.      run on many different platforms, including GNU/Linux and Windows.
74      </para>      </para>
75      <para>      <para>
76      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
77            get a visual
78      impression of the positional relationship of the information that may not      impression of the positional relationship of the information that may not
79      be apparent from simple inspection of the data values themselves.      be apparent from simple inspection of the data values themselves.
80      Thuban allows the user to create a session that displays      Thuban allows the user to create a session that displays
# Line 36  Line 83 
83      </para>      </para>
84      <para>      <para>
85      Thuban arranges a session in a hierarchy. A session contains a map which      Thuban arranges a session in a hierarchy. A session contains a map which
86      consists of layers. Each layer represents one kind of data set. For      consists of layers. Each layer represents a data set. For
87      instance, there may be a layer for roads and another layer for buildings.      instance, there may be a layer for roads and another layer for buildings.
88      These layers can either be vector shapes or images.      These layers can either be vector shapes or images.
89      </para>      </para>
# Line 44  Line 91 
91          <section><title>Installation</title>          <section><title>Installation</title>
92          <para>          <para>
93          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,
94          and Windows 2000. All the necessary files can be found on the          and Windows 2000. Thuban depends on the following packages. These
95            packages can also be found on the
96          <ulink url="http://thuban.intevation.org/download.html">          <ulink url="http://thuban.intevation.org/download.html">
97          Thuban Download site          Thuban Download site
98          </ulink>.          </ulink>.
99            </para>
100            <para>
101            Required:
102            <itemizedlist>
103                <listitem><para>Python 2.2.1
104                            (<literal>http://www.python.org</literal>)
105                            </para></listitem>
106                <listitem><para>wxWindows 2.4
107                            (<literal>http://www.wxwindows.org</literal>)
108                            </para></listitem>
109                <listitem><para>wxPython 2.4
110                            (<literal>http://www.wxpython.org</literal>)
111                            </para></listitem>
112                <listitem><para>proj 4.4.5 Projection Library
113                            (<literal>http://www.remotesensing.org/proj/</literal>)
114                            </para></listitem>
115                <listitem><para>SQLite 2.8.3
116                            <literal>http://www.hwaci.com/sw/sqlite/</literal>)
117                            </para></listitem>
118                <listitem><para>PySQLite 0.4.3
119                            (<literal>http://pysqlite.sourceforge.net</literal>)
120                            </para></listitem>
121            </itemizedlist>
122            </para>
123            <para>
124            Optional:
125            <itemizedlist>
126                <listitem><para>GDAL 1.1.8
127                            (<literal>http://www.remotesensing.org/gdal/</literal>)
128                            </para></listitem>
129                <listitem><para>psycopg 1.0.8
130                            (<literal>http://initd.org/software/psycopg</literal>)
131                            </para></listitem>
132                </itemizedlist>
133          </para>          </para>
134                    <para>
135                    Along with the source codes, the download page also offers full
136                    installation packages for Debian, Windows and RPM-based systems
137                    (Mandrake, RedHat, SuSE, etc).
138                    </para>
139                    <section><title>RPM-based GNU/Linux Systems</title>
140                            <section><title>Installing Binary Packages</title>
141                                    <para>
142                                    The most wide-spread RPM-based GNU/Linux
143                                    Systems are RedHat, Mandrake and SuSE.
144                                    The documentation of these distributions
145                                    should contain information about how to
146                                    install third-party RPM packages.
147                                    Nonetheless, a short summary is provided here.
148                                    </para>
149                                    <para>
150                                    RPM packages can be installed applying several
151                                    tools. The most basic one is the command line
152                                    program "rpm".  The hardware architecture is
153                                    identified in the name of RPM packages, eg.
154                                    'i386' for most Intel/AMD architectures.  
155                                    If you have a different hardware architecture,
156                                    where no binary RPM packages are provided,
157                                    you must rebuild binary packages from the
158                                    RPM source packages first (see below).
159                                    Typical rpm commands look like:
160    
161                                    <programlisting>
162                                    rpm --install Thuban-0.9.0-1.i386.rpm
163                                    </programlisting>
164    
165                                    Depending on what you already have installed
166                                    on your system, you are informed that some
167                                    packages are required, but not installed.
168                                    You need to install them first. Either they
169                                    are provided by your GNU/Linux distributor
170                                    or available somewhere on the Internet.  
171                                    The more essential and special ones are
172                                    provided together with the Thuban package.
173                                    </para>
174    
175                                    <para>
176                                    For rpm exist some graphical user interfaces, notably
177                                    kpackage, GnoRPM and xrpm.
178                                    </para>
179    
180                                    <para>
181                                    Make yourself familiar with one of the tools and apply it
182                                    to install the packages.
183                                    Note, that you need to be administrator (root) for the system
184                                    to do that.
185                                    </para>
186                            </section>
187                            <section><title>Build Binaries from Source Packages</title>
188                                    <para>
189                                    This section describes howto build RPM install-packages
190                                    from RPM source-packages.
191                                    This adapts and optimizes an install-package specifically
192                                    to your system.
193                                    This is especially helpful to resolve version conflicts of
194                                    dependent packages. Furthermore, install-packages for other
195                                    platforms (e.g. PowerPC) can be created.
196                                    </para>
197    
198                                    <para>
199                                    Note: rpm must be at least version 4. Execute
200                                    <literal>rpm --version</literal> to find out about the version.
201                                    </para>
202    
203                                    <para>
204                                    You need to do the following preparations to be able to
205                                    build the packages as a regular user. You should now
206                                    perform the package buling as root since this
207                                    might cause damage to your system.
208                            <itemizedlist>
209                            <listitem>
210                                                    <para>
211                                                    Create RPM directory structure:
212                                                    Choose a directory (e.g. $HOME/myrpm) and create the
213                                                    subdirectories BUILD, RPM, SOURCES, SPECS and SRPMS.
214                                                    A possible command sequence for this is:
215                                                    <programlisting>
216                                                    mkdir $HOME/freegisrpm
217                                                    cd $HOME/freegisrpm
218                                                    mkdir BUILD RPMS SOURCES SPECS SRPMS
219                                                    </programlisting>
220                                                    </para>
221                                            </listitem>
222                                            <listitem>
223                                                    <para>
224                                                    Set environment variable RPM_DIR:
225                                                    <programlisting>
226                                                    export RPM_DIR=$HOME/freegisrpm
227                                                    </programlisting>
228                                                    </para>
229                                            </listitem>
230                                            <listitem>
231                                                    <para>
232                                                    Create $HOME/.rpmmacros:
233                                                    This file sets general preferences and some
234                                                    specific settings for signing packages.
235                                                    If you don't have a GnuPG-key, you can skip
236                                                    the signature settings i.e. drop the last 4 lines.
237                                                    A signature becomes important when you want to
238                                                    give away packages to third parties.
239                                                    <programlisting>
240    <![CDATA[
241    %packager Name Lastname <[email protected]>
242    
243    %_topdir /home/mylogin/myrpm
244    
245    %_signature gpg
246    %_gpg_name Name Lastname
247    %_pgp_path ~/.gnupg
248    %_pgpbin /usr/bin/gpg
249    ]]>
250                                                    </programlisting>
251                                                    </para>
252                                            </listitem>
253                            </itemizedlist>
254    
255                                    Now you can install any RPM source-package.
256                                    It's components are installed into the corresponding
257                                    subdirectories of your rpm-directory.
258                                    Essentially these are the sources (into directory SOURCES)
259                                    and the so-called spec-file which contains all build
260                                    instructions. The spec-file will go into the SPEC directory.
261                                    Example:
262                                    <literal>rpm --install Thuban-0.9.0-1.src.rpm</literal>
263                                    </para>
264    
265                                    <para>
266                                    Create install-package:
267                                    Go to the directory with the spec-files and rebuild the
268                                    package:
269                                    <programlisting>
270    cd $HOME/mypm/SPECS
271    rpm -bb thuban.spec
272                                    </programlisting>
273                                    Next, you will find the newly created package in
274                                    $HOME/myrpm/RPMS/i386.
275                                    If you build the package for another architecture than
276                                    i386, then the name of the directory has a corresponding name.
277                                    </para>
278                                    <para>
279                                    For documentation of RPM, either type
280                                    <literal>man rpm</literal> or <literal>rpm --help</literal>.
281                                    This will provide you with information on the various command
282                                    line options of RPM.
283                                    For more information see the
284                            <ulink url="http://www.rpm.org/">homepage of RPM</ulink>.
285                                    </para>
286                            </section>
287                    </section> <!-- Intro - Installation - RPM-->
288    
289                    <section><title>Win32 Systems</title>
290                    <para>
291                            A common installation package of Thuban for Win32
292                            systems is available from the Thuban website download
293                            section. This installation package is configured for
294                            displaying file based vector data (Shapefiles). For the
295                            display of raster data or the connection to spatial
296                            databases additional steps are needed.  
297                    </para>
298                    <para>
299                            The required Python packages are listed and linked on
300                            the download page as well.  If you don't have Python
301                            installed already, download the packages for Python,
302                            wxPython for Python and the SQLite Python Libraries as
303                            well as the Thuban package. Install all four packages
304                            in the order: Python, wxPython, SQLite, Thuban. Follow
305                            the installation instructions provided by the seperate
306                            setups. The Thuban installation package will add an
307                            entry in the menu folder you configured.
308                    </para>
309                    <section><title>Raster Data: Installation of GDAL</title>
310                    <para>
311                            Enabling the raster data features of Thuban is
312                            straight forward. For the examples we assume that
313                            Thuban has been installed under
314                            <literal>C:\Thuban</literal>:
315                            <itemizedlist>
316                            <listitem>
317                            <para>
318                            Download the zip-archive <ulink
319                            url="ftp://intevation.de/thuban/win2k/gdal-win2k.zip"
320                            >gdal-win2k</ulink>.
321                            </para></listitem>
322                            <listitem><para>Extract the archive (e.g. with
323                            <ulink
324                            url="http://www.info-zip.org/pub/infozip/WiZ.html"
325                            >WiZ (InfoZip)</ulink>) into the
326                            <literal>C:\Thuban\Lib</literal>
327                            directory of your Thuban installation.
328                            </para>
329                            </listitem>
330                            <listitem>
331                            <para>
332                            Extent the <varname>PYTHONPATH</varname>
333                            environment variable (in your Windows Control Panel)
334                            to make the new libraries available for Thuban.
335                            <programlisting>
336    %PYTHONPATH%;C:\Thuban\Lib\gdal;C:\Thuban\Lib\gdal\pymod
337                            </programlisting>
338                            </para>
339                            </listitem>
340                            <listitem>
341                            <para>
342                            Extent also the <varname>PATH</varname>
343                            environment variable accordingly:
344                            <programlisting>
345    %PATH%;C:\Thuban\Lib\gdal
346                            </programlisting>
347                            </para>
348                            </listitem>
349                            </itemizedlist>
350                            After this installation steps Thuban is ready to
351                            display raster data (e.g. the
352                            <literal>island.tif</literal> from the Iceland Demo
353                            data set.
354                    </para>
355                    </section> <!-- Win32: GDAL-->
356    
357                    <section><title>Working with PostGIS: Installation of PsycoPG</title>
358                    <para>
359                            To access PostgreSQL/PostGIS spatial databases with
360                            Thuban you have to install the PsycoPG package for
361                            Windows:
362                            <itemizedlist>
363                            <listitem>
364                            <para>
365                            Download the zip-archive
366                            <ulink
367                                    url="http://stickpeople.com/projects/python/win-psycopg/win-psycopg22.zip"
368                            >win-psycopg22.zip</ulink>.
369                            </para>
370                            </listitem>
371                            <listitem>
372                            <para>
373                            Extract the zip-archive into a directory either already
374                            in your <varname>PYTHONPATH</varname> or extent your
375                            <varname>PYTHONPATH</varname> variable to the directory
376                            you have extracted the archive to.
377                            </para>
378                            </listitem>
379                            </itemizedlist>
380                            For installation and maintenance of spatial databases
381                            we refer to the  <ulink
382                            url="http://postgis.refractions.net"
383                            >PostGIS Homepage</ulink>.
384                    </para>
385                    </section> <!-- Win32: PsycoPG-->
386    
387                    </section> <!-- Intro - Installation - Win32 -->
388          </section>          </section>
389    
390            <section><title>Internationalization</title>
391            <para>
392            Thuban is implemented with internationalization support. So far Thuban
393            is translated by volunteers to the following languages (apart from its
394            main language: English):
395            <itemizedlist>
396                <listitem><para>French</para></listitem>
397                <listitem><para>German</para></listitem>
398                <listitem><para>Italian</para></listitem>
399                    <listitem><para>Portuguese (Brazilian)</para></listitem>
400                <listitem><para>Russian</para></listitem>
401                <listitem><para>Spanish</para></listitem>
402            </itemizedlist>
403            </para>
404    
405            <para>
406            To use internationalization under POSIX systems (like GNU/Linux)
407            you have to set the environment variable LC_ALL accordingly (e.g.
408            LC_ALL=fr_FR for the french language support). Please check your
409            systems documentation for details and supported settings.
410            Specifiying LC_ALL on the command line while launching thuban
411            allows appication specific language settings:
412            </para>
413            <programlisting>
414            LC_ALL=fr_FR thuban.py
415            </programlisting>
416    
417            <para>
418            MS Windows users have to specify the language to be used via the control
419            bar (which effects all applications).
420            </para>
421            </section>
422    
423          <section><title>The Main Window</title>          <section><title>The Main Window</title>
424          <para>          <para>
425          <screenshot>          <figure>
426          <screeninfo>The Main Window</screeninfo>          <title>The Main Window</title>
427          <mediaobject>          <mediaobject>
428          <imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG"/> </imageobject>          <imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG" scale="&imgscale;"/> </imageobject>
429          <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>  
430          </mediaobject>          </mediaobject>
431          </screenshot>          </figure>
432          </para>          </para>
433    
434          <para>          <para>
# Line 97  Line 464 
464          The tool bar provides quick access to the commonly needed tools.          The tool bar provides quick access to the commonly needed tools.
465          By hovering over each button the user can see a short messages          By hovering over each button the user can see a short messages
466          describing what the tool does. The tools provided are Zoom In, Zoom          describing what the tool does. The tools provided are Zoom In, Zoom
467          Out, Pan, Full Extent, Full Layer Extent, Full Shape Extent, Indentify,          Out, Pan, Full Extent, Full Layer Extent, Full Shape Extent, Identify,
468          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
469          in the manual.          in the manual.
470          </para>          </para>
# Line 113  Line 480 
480          <menuchoice>          <menuchoice>
481          <guimenu>File</guimenu>          <guimenu>File</guimenu>
482          <guimenuitem>New Session</guimenuitem>          <guimenuitem>New Session</guimenuitem>
483          </menuchoice>.          </menuchoice>.
   
484          If a session is already loaded and has been modified without          If a session is already loaded and has been modified without
485          being saved a prompt will ask if the current session should          being saved a prompt will ask if the current session should
486          be saved.          be saved. A new session consists of an empty map with no
487            layers and no tables.
488          </para>          </para>
489          </section>          </section>
490    
# Line 128  Line 494 
494          <menuchoice>          <menuchoice>
495          <guimenu>File</guimenu>          <guimenu>File</guimenu>
496          <guimenuitem>Open Session</guimenuitem>          <guimenuitem>Open Session</guimenuitem>
497          </menuchoice>.          </menuchoice>. A dialog box will open allowing the user to browse
498            for a Thuban Session file. Thuban session files end with
499            <varname>.thuban</varname>. Selecting a file a clicking
500            <guibutton>OK</guibutton> will load the session into Thuban.
501    
502          If a session is already loaded and has been modified without          If a session is already loaded and has been modified without
503          being saved a prompt will ask if the current session should          being saved a prompt will ask if the current session should
# Line 142  Line 511 
511          <menuchoice>          <menuchoice>
512          <guimenu>File</guimenu>          <guimenu>File</guimenu>
513          <guimenuitem>Save Session</guimenuitem>          <guimenuitem>Save Session</guimenuitem>
514          </menuchoice>.          </menuchoice>. A dialog box will open allowing the user to browse
515            the file system and select a place to save the session. Thuban
516            sessions should be saved under a name ending in
517            <varname>.thuban</varname>. If the file already exists the user
518            will be prompted to save under a different name or overwrite the
519            existing file.
520          </para>          </para>
521          </section>          </section>
522    
523          <section><title>The Session Info-Tree</title>          <section><title>The Session Info-Tree</title>
524            <para>
525            <figure>
526            <title>Session Info Tree</title>
527            <mediaobject>
528            <imageobject><imagedata fileref="../images/2_4_session_tree.png" format="PNG" scale="&imgscale;"/></imageobject>
529            <imageobject><imagedata fileref="./images/2_4_session_tree.eps" format="EPS" scale="&imgscale;"/></imageobject>
530            </mediaobject>
531            </figure>
532            </para>
533          <para>          <para>
534                  (primarily for developers)          The session info-tree is primarily intended for developers working
535            with Thuban. It displays many of the internal values for the session,
536            map, and layers. It can be opened from
537            <menuchoice>
538            <guimenu>File</guimenu>
539            <guimenuitem>Session Tree</guimenuitem>
540            </menuchoice>.
541          </para>          </para>
542          </section>          </section>
543    </chapter>    </chapter>
# Line 160  Line 548 
548      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
549      visually explore the data.      visually explore the data.
550      </para>      </para>
551        <para>
552        The map can have a name that will appear in the Thuban title bar.
553        The map name can be changed using
554        <menuchoice>
555        <guimenu>Map</guimenu>
556        <guimenuitem>Rename</guimenuitem>
557        </menuchoice>.
558        </para>
559        <para>
560        <inlinemediaobject>
561        <imageobject>
562        <imagedata fileref="../images/3_rename_map.png" format="PNG" scale="&imgscale;"/>
563        </imageobject>
564        <imageobject>
565        <imagedata fileref="./images/3_rename_map.eps" format="EPS" scale="&imgscale;"/>
566        </imageobject>
567        <textobject> <phrase>Rename Map</phrase> </textobject>
568        </inlinemediaobject>
569        </para>
570    
571          <section><title>Adding and Removing Layers</title>          <section><title>Adding and Removing Layers</title>
572          <para>          <para>
573          There are two types of layers that can use added to a map: shape layers          There are three types of layers that can be added to a map:
574            Shape layers, database layers
575          and image layers. Shape layers are stored in Shapefile format, a          and image layers. Shape layers are stored in Shapefile format, a
576          standard file format for storing geographic objects. Normally, these          widely used file format for storing geographic objects. These
577          files have the extension ``.shp''. Associated with          files have the extension ``.shp''. Associated with
578          the object information is a database file which stores attributes for          the shape file is a database file which stores attributes for
579          each shape in the Shapefile. This file, stored in DB2 format, usually          each shape in the Shape file. This file, in dBase format,
580          has the extension ``.dbf''. Both files should have the same base name.          has the extension ``.dbf''. Both files must have the same base name.
581          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
582          also be a file roads.dbf.          also be a file roads.dbf.
583          </para>          </para>
584          <para>          <itemizedlist>
585            <listitem>
586            <para>
587          Shape layers can be added to the map with          Shape layers can be added to the map with
588          <menuchoice>          <menuchoice>
589          <guimenu>Map</guimenu>          <guimenu>Map</guimenu>
590          <guimenuitem>Add Layer</guimenuitem>          <guimenuitem>Add Layer</guimenuitem>
591          </menuchoice>.          </menuchoice>.
592          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
593          matter if the Shapefile or database file is selected.                  selection. However, if you switch to display all files and select one
594          </para>                  of the associated files (e.g. ``.dbf''), Thuban will recognize the base
595                    name and load the corresponding Shape file.
596            </para>
597                    <para>
598                    The file dialog for Shape files allows to select multiple files.
599                    Use the shift-button together with the left mouse button to extend
600                    the selection.
601            </para>
602            </listitem>
603    
604            <listitem>
605            <para>Database layers can be added to the map with
606            <menuchoice>
607            <guimenu>Map</guimenu>
608            <guimenuitem>Add Database Layer</guimenuitem>
609            </menuchoice>.
610            A dialog with two is list is opened. The left list displays all
611            database connections currently open for the session. You can retrieve
612            a list of available layers from the selected database which is
613            displayed on the right hand. From this list one layer can be selected,
614            the dialog is closed afterwards.
615            </para>
616            <para>
617            See appendix ``Working with PostGIS'' for details.
618            </para>
619            </listitem>
620    
621            <listitem>
622          <para>          <para>
623          Image layers can be added to the map with          Image layers can be added to the map with
624          <menuchoice>          <menuchoice>
# Line 190  Line 626 
626          <guimenuitem>Add Image Layer</guimenuitem>          <guimenuitem>Add Image Layer</guimenuitem>
627          </menuchoice>.          </menuchoice>.
628          It is important to select a valid image file that has geographic          It is important to select a valid image file that has geographic
629          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,
630          or in another file. If geographic information cannot be found, Thuban          or in another file. If geographic information cannot be found, Thuban
631          will report an error.          will report an error.
632          </para>          </para>
633            </listitem>
634            </itemizedlist>
635          </section>          </section>
636    
637          <section><title>Navigation</title>          <section><title>Navigation</title>
638          <para>          <para>
639          The map can be explored by using the navigation tools available on          The map can be explored by using the navigation tools available on
640          the tool bar, or from the          the tool bar or from the
641          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.
642          </para>          </para>
643            <itemizedlist>
644            <listitem>
645          <para>          <para>
646          The ZoomIn tool          The ZoomIn tool
647          <inlinemediaobject>          <inlinemediaobject>
648          <imageobject>          <imageobject>
649          <imagedata fileref="../images/3_2_zoomin.png" format="PNG"/>          <imagedata fileref="../images/3_2_zoomin.png" format="PNG" scale="&imgscale;"/>
650          </imageobject>          </imageobject>
651          <imageobject>          <imageobject>
652          <imagedata fileref="./images/3_2_zoomin.eps" format="EPS"/>          <imagedata fileref="./images/3_2_zoomin.eps" format="EPS" scale="&imgscale;"/>
653          </imageobject>          </imageobject>
654          <textobject> <phrase>ZoomIn Tool</phrase> </textobject>          <textobject> <phrase>ZoomIn Tool</phrase> </textobject>
655          </inlinemediaobject>          </inlinemediaobject>
656          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
657          will double the magnification and center the map on the point that          will double the magnification and center the map on the point that
658          was clicked. Clicking and dragging lets the user select a region          was clicked. Clicking and dragging selects a region that will be
659          to be enlarged to fit the window.          enlarged to fit the window.
660          </para>          </para>
661            </listitem>
662            <listitem>
663          <para>          <para>
664          The ZoomOut tool          The ZoomOut tool
665          <inlinemediaobject>          <inlinemediaobject>
666          <imageobject>          <imageobject>
667          <imagedata fileref="../images/3_2_zoomout.png" format="PNG"/>          <imagedata fileref="../images/3_2_zoomout.png" format="PNG" scale="&imgscale;"/>
668          </imageobject>          </imageobject>
669          <imageobject>          <imageobject>
670          <imagedata fileref="./images/3_2_zoomout.eps" format="EPS"/>          <imagedata fileref="./images/3_2_zoomout.eps" format="EPS" scale="&imgscale;"/>
671          </imageobject>          </imageobject>
672          <textobject> <phrase>ZoomOut Tool</phrase> </textobject>          <textobject> <phrase>ZoomOut Tool</phrase> </textobject>
673          </inlinemediaobject>          </inlinemediaobject>
# Line 234  Line 676 
676          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
677          scaled to fit into that box.          scaled to fit into that box.
678          </para>          </para>
679            </listitem>
680            <listitem>
681          <para>          <para>
682          The Pan tool          The Pan tool
683          <inlinemediaobject>          <inlinemediaobject>
684          <imageobject>          <imageobject>
685          <imagedata fileref="../images/3_2_pan.png" format="PNG"/>          <imagedata fileref="../images/3_2_pan.png" format="PNG" scale="&imgscale;"/>
686          </imageobject>          </imageobject>
687          <imageobject>          <imageobject>
688          <imagedata fileref="./images/3_2_pan.eps" format="EPS"/>          <imagedata fileref="./images/3_2_pan.eps" format="EPS" scale="&imgscale;"/>
689          </imageobject>          </imageobject>
690          <textobject> <phrase>Pan Tool</phrase> </textobject>          <textobject> <phrase>Pan Tool</phrase> </textobject>
691          </inlinemediaobject>          </inlinemediaobject>
692          allows the user to move the map around by clicking and dragging.          allows the user to move the map around by clicking and dragging.
693          </para>          </para>
694            </listitem>
695            <listitem>
696          <para>          <para>
697          The Full Extent tool          The Full Extent tool
698          <inlinemediaobject>          <inlinemediaobject>
699          <imageobject>          <imageobject>
700          <imagedata fileref="../images/3_2_fullextent.png" format="PNG"/>          <imagedata fileref="../images/3_2_fullextent.png" format="PNG" scale="&imgscale;"/>
701          </imageobject>          </imageobject>
702          <imageobject>          <imageobject>
703          <imagedata fileref="./images/3_2_fullextent.eps" format="EPS"/>          <imagedata fileref="./images/3_2_fullextent.eps" format="EPS" scale="&imgscale;"/>
704          </imageobject>          </imageobject>
705          <textobject> <phrase>Full Extent Tool</phrase> </textobject>          <textobject> <phrase>Full Extent Tool</phrase> </textobject>
706          </inlinemediaobject>          </inlinemediaobject>
707          rescales the viewable region so that the entire map is visible.          rescales the viewable region so that the entire map is visible.
708          </para>          </para>
709            </listitem>
710            <listitem>
711          <para>          <para>
712          The Full Layer Extent tool          The Full Layer Extent tool
713          <inlinemediaobject>          <inlinemediaobject>
714          <imageobject>          <imageobject>
715          <imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG"/>          <imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG" scale="&imgscale;"/>
716          </imageobject>          </imageobject>
717          <imageobject>          <imageobject>
718          <imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS"/>          <imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS" scale="&imgscale;"/>
719          </imageobject>          </imageobject>
720          <textobject> <phrase>Full Layer Extent Tool</phrase> </textobject>          <textobject> <phrase>Full Layer Extent Tool</phrase> </textobject>
721          </inlinemediaobject>          </inlinemediaobject>
# Line 275  Line 723 
723          layer fits within the window. If no layer is selected this button          layer fits within the window. If no layer is selected this button
724          will be disabled.          will be disabled.
725          </para>          </para>
726            </listitem>
727            <listitem>
728          <para>          <para>
729          The Full Shape Extent tool          The Full Shape Extent tool
730          <inlinemediaobject>          <inlinemediaobject>
731          <imageobject>          <imageobject>
732          <imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG"/>          <imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG" scale="&imgscale;"/>
733          </imageobject>          </imageobject>
734          <imageobject>          <imageobject>
735          <imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS"/>          <imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS" scale="&imgscale;"/>
736          </imageobject>          </imageobject>
737          <textobject> <phrase>Full Shape Extent Tool</phrase> </textobject>          <textobject> <phrase>Full Shape Extent Tool</phrase> </textobject>
738          </inlinemediaobject>          </inlinemediaobject>
739          rescales the viewable region so that the currently selected          rescales the viewable region so that the currently selected
740          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
741          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
742          selected this button will be disabled.          selected this button will be disabled. This feature is especially
743            helpful when identifying an object related to a selected record
744            in a tableview (see below).
745    
746          </para>          </para>
747            </listitem>
748            </itemizedlist>
749          </section>          </section>
750    
751          <section><title>Object Identification</title>          <section><title>Object Identification</title>
# Line 298  Line 753 
753          Objects on the map can be identified using the Identify tool          Objects on the map can be identified using the Identify tool
754          <inlinemediaobject>          <inlinemediaobject>
755          <imageobject>          <imageobject>
756          <imagedata fileref="../images/3_3_identify.png" format="PNG"/>          <imagedata fileref="../images/3_3_identify.png" format="PNG" scale="&imgscale;"/>
757          </imageobject>          </imageobject>
758          <imageobject>          <imageobject>
759          <imagedata fileref="./images/3_3_identify.eps" format="EPS"/>          <imagedata fileref="./images/3_3_identify.eps" format="EPS" scale="&imgscale;"/>
760          </imageobject>          </imageobject>
761          <textobject> <phrase>Identify Tool</phrase> </textobject>          <textobject> <phrase>Identify Tool</phrase> </textobject>
762          </inlinemediaobject>.          </inlinemediaobject>.
763          Clicking on an object selects that object and opens a dialog which          Clicking on an object selects that object and opens a dialog which
764          shows all the table attributes for that object. Any current selection          shows all the table attributes for that object. Any current selection
765          is lost.          is lost. Objects on the map are typically shapes and this document
766            will often refer to objects as shapes.
767          </para>          </para>
768          </section>          </section>
769    
770          <section><title>Object Labelling</title>          <section><title>Object Labeling</title>
771          <para>          <para>
772          Objects can be labelled using the Label tool          Objects can be labeled using the Label tool
773          <inlinemediaobject>          <inlinemediaobject>
774          <imageobject>          <imageobject>
775          <imagedata fileref="../images/3_3_label.png" format="PNG"/>          <imagedata fileref="../images/3_3_label.png" format="PNG" scale="&imgscale;"/>
776          </imageobject>          </imageobject>
777          <imageobject>          <imageobject>
778          <imagedata fileref="./images/3_3_label.eps" format="EPS"/>          <imagedata fileref="./images/3_3_label.eps" format="EPS" scale="&imgscale;"/>
779          </imageobject>          </imageobject>
780          <textobject> <phrase>Label Tool</phrase> </textobject>          <textobject> <phrase>Label Tool</phrase> </textobject>
781          </inlinemediaobject>.          </inlinemediaobject>.
782          Clicking on an object selects that object and opens a dialog which          Clicking on an object selects that object and opens a dialog which
783          displays the table attributes for that object. An attribute can          displays the table attributes for that object. An attribute can
784          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
785          object that already has a label will remove the label.          at the center of the shape. Clicking on an object that already has
786            a label will remove the label.
787          </para>          </para>
788          </section>          </section>
789    
790          <section><title>The Legend</title>          <section><title>The Legend</title>
791            <para>
792            <inlinemediaobject>
793            <imageobject>
794            <imagedata fileref="../images/3_5_legend.png" format="PNG" scale="&imgscale;"/>
795            </imageobject>
796            <imageobject>
797            <imagedata fileref="./images/3_5_legend.eps" format="EPS" scale="&imgscale;"/>
798            </imageobject>
799            <textobject> <phrase>Legend</phrase> </textobject>
800            </inlinemediaobject>
801            </para>
802          <para>          <para>
803          The Legend provides an overview of the layers in the map. Layers          The Legend provides an overview of the layers in the map. Layers
804          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 343  Line 811 
811          <para>          <para>
812          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
813          to some of the layer manipulation options under          to some of the layer manipulation options under
814          <menuchoice> <guimenu>Map</guimenu> </menuchoice>.          <menuchoice><guimenu>Map</guimenu></menuchoice>.
815            </para>
816    
817            <itemizedlist>
818            <listitem>
819            <para>
820            The Move Layer to Top tool
821            <inlinemediaobject>
822            <imageobject>
823            <imagedata fileref="../images/3_5_totop.png" format="PNG" scale="&imgscale;"/>
824            </imageobject>
825            <imageobject>
826            <imagedata fileref="./images/3_5_totop.eps" format="EPS" scale="&imgscale;"/>
827            </imageobject>
828            <textobject> <phrase>Move Layer to Top</phrase> </textobject>
829            </inlinemediaobject> raises the selected layer to the top of the map.
830            </para>
831            </listitem>
832            <listitem>
833    
834            <para>
835            The Move Layer Up tool
836            <inlinemediaobject>
837            <imageobject>
838            <imagedata fileref="../images/3_5_moveup.png" format="PNG" scale="&imgscale;"/>
839            </imageobject>
840            <imageobject>
841            <imagedata fileref="./images/3_5_moveup.eps" format="EPS" scale="&imgscale;"/>
842            </imageobject>
843            <textobject> <phrase>Move Layer Up</phrase> </textobject>
844            </inlinemediaobject> raises the selected layer one level.
845            </para>
846            </listitem>
847            <listitem>
848    
849            <para>
850            The Move Layer Down tool
851            <inlinemediaobject>
852            <imageobject>
853            <imagedata fileref="../images/3_5_movedown.png" format="PNG" scale="&imgscale;"/>
854            </imageobject>
855            <imageobject>
856            <imagedata fileref="./images/3_5_movedown.eps" format="EPS" scale="&imgscale;"/>
857            </imageobject>
858            <textobject> <phrase>Move Layer Down</phrase> </textobject>
859            </inlinemediaobject> lowers the selected layer one level.
860            </para>
861    
862            </listitem>
863            <listitem>
864            <para>
865            The Move Layer to Bottom tool
866            <inlinemediaobject>
867            <imageobject>
868            <imagedata fileref="../images/3_5_tobottom.png" format="PNG" scale="&imgscale;"/>
869            </imageobject>
870            <imageobject>
871            <imagedata fileref="./images/3_5_tobottom.eps" format="EPS" scale="&imgscale;"/>
872            </imageobject>
873            <textobject> <phrase>Move Layer to Bottom</phrase> </textobject>
874            </inlinemediaobject> lowers the selected layer to the bottom of the map.
875            </para>
876    
877            </listitem>
878            <listitem>
879            <para>
880            The Visible tool
881            <inlinemediaobject>
882            <imageobject>
883            <imagedata fileref="../images/3_5_visible.png" format="PNG" scale="&imgscale;"/>
884            </imageobject>
885            <imageobject>
886            <imagedata fileref="./images/3_5_visible.eps" format="EPS" scale="&imgscale;"/>
887            </imageobject>
888            <textobject> <phrase>Visible</phrase> </textobject>
889            </inlinemediaobject> shows the selected layer in the map if it was
890            hidden.
891            </para>
892    
893            </listitem>
894            <listitem>
895            <para>
896            The Invisible tool
897            <inlinemediaobject>
898            <imageobject>
899            <imagedata fileref="../images/3_5_invisible.png" format="PNG" scale="&imgscale;"/>
900            </imageobject>
901            <imageobject>
902            <imagedata fileref="./images/3_5_invisible.eps" format="EPS" scale="&imgscale;"/>
903            </imageobject>
904            <textobject> <phrase>Invisible</phrase> </textobject>
905            </inlinemediaobject> hides the selected layer in the map.
906            </para>
907    
908            </listitem>
909            <listitem>
910            <para>
911            The Properties tool
912            <inlinemediaobject>
913            <imageobject>
914            <imagedata fileref="../images/3_5_props.png" format="PNG" scale="&imgscale;"/>
915            </imageobject>
916            <imageobject>
917            <imagedata fileref="./images/3_5_props.eps" format="EPS" scale="&imgscale;"/>
918            </imageobject>
919            <textobject> <phrase>Properties</phrase> </textobject>
920            </inlinemediaobject> opens the layer's properties dialog box.
921          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
922          properties dialog for that layer.          properties dialog for that layer.
923          </para>          </para>
924            </listitem>
925            </itemizedlist>
926    
927            <para>
928            The most used layer related actions are also available from a
929            popup menu. It is raised when a layer is clicked with the right mouse
930            button.
931            </para>
932            
933            <para>
934            <figure>
935            <title>Layer Popup Menu</title>
936            <mediaobject>
937            <imageobject><imagedata fileref="../images/3_5_popup_menu.png" format="PNG" scale="&imgscale;"/></imageobject>
938            <imageobject><imagedata fileref="./images/3_5_popup_menu.eps" format="EPS" scale="&imgscale;"/></imageobject>
939            </mediaobject>
940            </figure>
941            </para>
942    
943            <para>
944            Along the bottom of the legend is the scalebar. The scalebar
945            will be available if there are any layers and the  map has a
946            projection set.
947            </para>
948            </section>
949    
950            <section><title>Exporting</title>
951            <para>
952            Under Windows, maps can be exported in Enhanced Metafile format
953            (<varname>.wmf</varname>)
954            from
955            <menuchoice>
956            <guimenu>Map</guimenu>
957            <guimenuitem>Export</guimenuitem>
958            </menuchoice> for use in reports, presentations, or further
959            modification. The current map view, legend, and, if available,
960            scalebar are exported. Under other platforms this option is not
961            available. Clicking this menu item open a file selection dialog
962            that lets the user select a location to export the map.
963            </para>
964          </section>          </section>
965    
966          <section><title>Printing</title>          <section><title>Printing</title>
# Line 356  Line 969 
969          <menuchoice>          <menuchoice>
970          <guimenu>Map</guimenu>          <guimenu>Map</guimenu>
971          <guimenuitem>Print</guimenuitem>          <guimenuitem>Print</guimenuitem>
972          </menuchoice>. A standard printing dialog will open allowing the          </menuchoice>. The current map view, legend, and, if available,
973          user to configure the printer.          scalebar are printed. A standard printing dialog will open allowing
974            the user to configure the printer. This dialog will differ depending
975            on which platform Thuban is running.
976          </para>          </para>
977          </section>          </section>
978    
979    </chapter>    </chapter>
980    
981    <chapter><title>Layer Management</title>    <chapter><title>Layer Management</title>
# Line 368  Line 984 
984    
985          <section><title>Types of Layers</title>          <section><title>Types of Layers</title>
986          <para>          <para>
987          There are two types of layers supported by Thuban: shape layers and          There are three types of layers supported by Thuban: shape layers,
988            database layers and
989          image layers. Shape layers consist of vector based shapes with          image layers. Shape layers consist of vector based shapes with
990          geo-referenced coordinates. There are three types of supported          geo-referenced coordinates. There are three types of supported
991          shapes: polygons, lines, and points. Image layers can be any image          shapes: polygons, lines (arc), and points. Database layers are similar
992          file format supported by GDAL. The images must have geographic          to shape layers but loaded from a database instead of the file system.
993          coordinate data either embedded within the file, or in a seperate          Image layers can be any image
994            file format supported by the Geo-spatial Data Abstraction Library
995            (GDAL). The images must have geographic
996            coordinate data either embedded within the file or in a separate
997          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
998          work very well with Thuban and were designed specifically to be image          work very well with Thuban and were designed specifically to be image
999          layers in GIS programs.          layers in GIS programs.
1000          </para>          </para>
1001            <para>
1002            All actions in the
1003            <menuchoice>
1004            <guimenu>Layer</guimenu>
1005            </menuchoice> menu act on the currently selected layer in the legend.
1006            </para>
1007          </section>          </section>
1008    
1009          <section><title>Properties</title>          <section><title>Properties</title>
1010          <para>          <para>
1011          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
1012          how it is drawn on the map. Polygons and points can be drawn with an          legend. The menu option
1013          outline color and a fill color, while lines have only a line color.          <menuchoice>
1014            <guimenu>Layer</guimenu>
1015            <guimenuitem>Properties</guimenuitem>
1016            </menuchoice> opens a dialog that displays a layer's properties.
1017            All layers have a title which can be modified in the text field
1018            provided. The type of layer is also shows. If the type is a type
1019            of shape (polygon, arc, point) the classification table will be
1020            shown. Image layers have no other properties other than title
1021            and type.
1022            </para>
1023            <para>
1024            <figure>
1025            <title>Properties Window</title>
1026            <mediaobject>
1027            <imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
1028            <imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
1029            </mediaobject>
1030            </figure>
1031            </para>
1032            <para>
1033            <figure>
1034            <title>Properties Window</title>
1035            <mediaobject>
1036            <imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
1037            <imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
1038            </mediaobject>
1039            </figure>
1040          </para>          </para>
1041          </section>          </section>
1042    
# Line 393  Line 1045 
1045          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.
1046          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
1047          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
1048          each time the map is changed. Each layer can be independently          all the layers each time the map is changed. Each layer can be
1049          turned on or off using the          independently turned on or off using the
1050          <menuchoice>          <menuchoice>
1051          <guimenu>Layer</guimenu>          <guimenu>Layer</guimenu>
1052          <guimenuitem>Show</guimenuitem>          <guimenuitem>Show</guimenuitem>
# Line 407  Line 1059 
1059          </para>          </para>
1060          </section>          </section>
1061    
         <section><title>Sequence</title>  
         <para>  
         </para>  
         </section>  
   
1062          <section><title>Duplication</title>          <section><title>Duplication</title>
1063          <para>          <para>
1064          Layers and all their properties, including classifications, can          Layers and all their properties, including classifications, can
# Line 421  Line 1068 
1068          <guimenuitem>Duplicate</guimenuitem>          <guimenuitem>Duplicate</guimenuitem>
1069          </menuchoice>. Duplicating a layer is useful if the user wishes          </menuchoice>. Duplicating a layer is useful if the user wishes
1070          to model a layer in several different ways. Even though the layers          to model a layer in several different ways. Even though the layers
1071          overlap by carefully selecting the shape properties it is possible          overlap, by carefully selecting the shape properties it is possible
1072          to display several pieces of information at once. For example, one          to display several pieces of information at once. For example, one
1073          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
1074          another copy may be classified on a type property. if the length          another copy may be classified on a type property. If the length
1075          property was expressed with color and the type property expressed          property was expressed with color and the type property expressed
1076          with line thickness then it would be possible to view both          with line thickness then it would be possible to view both
1077          classifications by placing the type property copy over the          classifications by placing the type property copy over the
# Line 442  Line 1089 
1089      cannot be classified.      cannot be classified.
1090      </para>      </para>
1091      <para>      <para>
1092      A classification consists of a number of groups, with each group      A classification consists of a number of groups, each group
1093      having a value or range of values to match against, and symbol      having a value or range of values to match against, and symbol
1094      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
1095      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 455  Line 1102 
1102      <para>      <para>
1103      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
1104      map, a default classification is created with the DEFAULT group. This      map, a default classification is created with the DEFAULT group. This
1105      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
1106      attributes, will match this group.      layer, regardless of its attributes, will match this group if no other
1107        group matches.
1108      </para>      </para>
1109    
1110          <section><title>Editing Classifications</title>          <section><title>Editing Classifications</title>
# Line 473  Line 1121 
1121          button.          button.
1122          </para>          </para>
1123          <para>          <para>
1124            To apply the changes to the map the user can click
1125            either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1126            <guibutton>Try</guibutton> will not close the dialog box, allowing
1127            the user to see how the classification changes the map.
1128            <guibutton>Revert</guibutton> will undo the last classification applied
1129            to the map. <guibutton>OK</guibutton> will commit the changes and
1130            close the dialog. The user will be unable to undo the changes.
1131            <guibutton>Close</guibutton> simply closes the dialog box. If any
1132            changes have not been applied with <guibutton>Try</guibutton> the
1133            changes will not be applied to the map.
1134            </para>
1135            <para>
1136            <figure>
1137            <title>Properties Window</title>
1138            <mediaobject>
1139            <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>
1140            <imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject>
1141            </mediaobject>
1142            </figure>
1143            </para>
1144            <para>
1145          The order of the groups in the classification is significant          The order of the groups in the classification is significant
1146          except for the DEFAULT group, which remains at the top. When shapes          except for the DEFAULT group, which remains at the top. When shapes
1147          are matched against groups the matching begins at the first group          are matched against groups the matching begins at the first group
1148          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
1149          be checked first. Matching for a          be checked first. Matching for a
1150          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
1151          use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton>          use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton>
1152          to change the order of the groups. The DEFAULT group will always          to change the order of the groups. The DEFAULT group will always
1153          match a shape that hasn't matched another group.          match a shape that hasn't matched another group.
1154          </para>          </para>
1155          <para>              <section><title>Visible</title>
1156          The Value column of the classification table is the value that will              <para>
1157          be matched when the map is being drawn. The type of data that can              The Visible column has check-boxes that determine whether a
1158          entered into this field depends on the type of data of the              classification group will be displayed in the legend. This is
1159          classification field.              useful if the user knows that the groups completely cover
1160          </para>              the data set and don't want the DEFAULT group to be displayed
1161          <para>              in the legend and on a printout.
1162          If the field is of type Text, anything entered              </para>
1163          into the field is valid. The text will be compared literally to the          </section>
1164          value of the shape attribute, including case sensitivity.              <section><title>Symbols</title>
1165          If the type is Integer, then any valid integer may be entered. In              <para>
1166          addition, with special syntax, a range of values can be entered.              Each type of shape has its own type of symbol. Thuban supports three
1167          A range from <varname>start</varname> to <varname>end</varname>              types of shapes: polygons, lines, and points. Polygons and points
1168          inclusive is specifed like this: <literal>[start;end]</literal>.              have outline and fill color, while lines have only line color. Each
1169          The exclusive range is specified like this:              group has associated symbol properties. To edit the symbol
1170          <literal>]start;end[</literal>. Ranges can include infinity like              properties for a group the user can double click on the Symbol
1171          this: <literal>[-oo;oo]</literal>. Field types can also be of type              column or select a group and click the
1172          Decimal. They represent any rational number and can be used in ranges              <guibutton>Edit Symbol</guibutton> button.
1173          as well.              </para>
1174          </para>              </section>
1175          </section>          <section><title>Value</title>
1176                <para>
1177          <section><title>Symbols</title>              The Value column of the classification table is the value that will
1178          <para>              be matched when the map is being drawn. The type of data that can
1179          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
1180          types of shapes: polygons, lines, and points. Polygons and points have              classification field.
1181          outline and fill color, while lines have only line color. Each group              </para>
1182          has associated symbol properties. To edit the symbol properties for a              <para>
1183          group the user can double click on the Symbol column or select a              If the field is of type Text, anything entered
1184          group and click the <guibutton>Edit Symbol</guibutton> button.              into the field is valid. The text will be compared literally to the
1185          </para>              value of the shape attribute, including case sensitivity.
1186                If the type is Integer, then any valid integer may be entered. In
1187                addition, with special syntax, a range of values can be entered.
1188                A range from <varname>start</varname> to <varname>end</varname>
1189                inclusive is specified like this: <literal>[start;end]</literal>.
1190                The exclusive range is specified like this:
1191                <literal>]start;end[</literal>. Ranges can include infinity like
1192                this: <literal>[-oo;oo]</literal>. Field types can also be of type
1193                Decimal. They represent any rational number and can be used in
1194                ranges as well.
1195                </para>
1196                </section>
1197                <section><title>Label</title>
1198                <para>
1199                By default, the text that is displayed for a group in the legend
1200                is the value for that group. The label can substitute a more
1201                descriptive term in the legend.
1202                </para>
1203            </section>
1204          </section>          </section>
1205    
1206          <section><title>Generating Classes</title>          <section><title>Generating Classes</title>
1207          <para>          <para>
1208            <figure>
1209            <title>Generate Class</title>
1210            <mediaobject>
1211            <imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject>
1212            <imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject>
1213            </mediaobject>
1214            </figure>
1215            </para>
1216            <para>
1217          Creating a classification by hand can be tedious.          Creating a classification by hand can be tedious.
1218          Thuban, therefore, provides a means of generating an entire          Thuban, therefore, provides a means of generating an entire
1219          classification at once while still giving the user control over          classification at once while still giving the user control over
1220          how it appears. Clicking <guibutton>Generate Class</guibutton>          how it appears. Clicking <guibutton>Generate Class</guibutton>
1221          opens the <varname>Generate Classification</varname> dialog.          opens the <varname>Generate Classification</varname> dialog.
1222          Under the <varname>Generate</varname> pulldown there are at most          Under the <varname>Generate</varname> pull down there are at most
1223          three different ways to generate classifications:          three different ways to generate classifications:
1224          Unique Values, Unique Distribution, and Quantiles. Some options          Unique Values, Uniform Distribution, and Quantiles. Some options
1225          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
1226          support them. For instance, <varname>Unique Distribution</varname>          support them. For instance, <varname>Uniform Distribution</varname>
1227          doesn't make sense for a Text field.          doesn't make sense for a Text field.
1228          </para>          </para>
1229          <para>          <para>
1230          For every way of generating a classification, a color scheme must          For every way of generating a classification, a color scheme must
1231          be selected. Thuban provides several different color schemes that          be selected. Thuban provides several different color schemes that
1232          affect how the group properties change over the classification.          affect how the group properties change over the classification.
1233            It may be desirable that only certain properties change over the
1234            classification. If the shape type is a polygon or a point then
1235            the <guibutton>Fix Border Color</guibutton> option will be available.
1236            This allows the user to select a border color for all classification
1237            groups.
1238          It is also possible to create a custom color scheme. Selecting          It is also possible to create a custom color scheme. Selecting
1239          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
1240          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
1241          properties of the last group. Thuban will interpolate between these          properties of the last group. Thuban will interpolate between these
1242          two properties to generate the other groups.          two properties to generate the other groups.
1243            <figure>
1244            <title>Custom Color Scheme</title>
1245            <mediaobject>
1246            <imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject>
1247            <imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject>
1248            </mediaobject>
1249            </figure>
1250          </para>          </para>
1251          <para>          <para>
1252          The Unique Values option lets the user select specific values that          The Unique Values option lets the user select specific values that
# Line 548  Line 1256 
1256          right. Each list can be sorted or reversed for easier searching.          right. Each list can be sorted or reversed for easier searching.
1257          The classification that is generated will be in the same order as          The classification that is generated will be in the same order as
1258          the list on the right.          the list on the right.
1259            <figure>
1260            <title>Unique Values</title>
1261            <mediaobject>
1262            <imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject>
1263            <imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject>
1264            </mediaobject>
1265            </figure>
1266          </para>          </para>
1267          <para>          <para>
1268          The Unique Distribution option creates a user specified number of          The Uniform Distribution option creates a user specified number of
1269          groups of ranges such that each range covers equal intervals. The          groups of ranges such that each range covers equal intervals. The
1270          minimum and maximum values can automatically be retrieved from the          minimum and maximum values can automatically be retrieved from the
1271          table by clicking <guibutton>Retrieve From Table</guibutton>. The          table by clicking <guibutton>Retrieve From Table</guibutton>. The
1272          stepping is how large each interval is. Adjusting this value will          stepping is how large each interval is. Adjusting this value will
1273          automatically recalculate how many groups is appropriate.          automatically recalculate how many groups is appropriate.
1274            <figure>
1275            <title>Uniform Distribution</title>
1276            <mediaobject>
1277            <imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject>
1278            <imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject>
1279            </mediaobject>
1280            </figure>
1281          </para>          </para>
1282          <para>          <para>
1283          The Quantiles option generates ranges based on the number items          The Quantiles option generates ranges based on the number of items
1284          in the input set. For example, by specifying 5 groups Thuban will          in the table. For example, by specifying five groups Thuban will
1285          generate groups with appropriate ranges such that 20% of the table          generate five groups with appropriate ranges such that 20% of the table
1286          data is in each group. If it is impossible to generate exact          data is in each group. If it is impossible to generate exact
1287          grouping, Thuban will issue a warning but allow the user to continue.          groupings, Thuban will issue a warning but allow the user to continue.
1288            <figure>
1289            <title>Quantiles</title>
1290            <mediaobject>
1291            <imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject>
1292            <imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject>
1293            </mediaobject>
1294            </figure>
1295          </para>          </para>
1296          </section>          </section>
1297    </chapter>    </chapter>
# Line 571  Line 1300 
1300      <para>      <para>
1301      Projections control how the geographic data is displayed on the screen.      Projections control how the geographic data is displayed on the screen.
1302      If multiple layers are loaded into Thuban where the geographic data      If multiple layers are loaded into Thuban where the geographic data
1303      is in a different projection system, then the user must tell Thuban      is in a different projection system, then the user must specify a
1304      which projection each layer has. The user must also tell Thuban which      projection for each layer. The user must also tell Thuban which
1305      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
1306      projection in which case the layers are reprojected into that space.      projection in which case the layers are reprojected into that space.
1307      The map projection can be set using      The map projection can be set using
# Line 584  Line 1313 
1313      <guimenu>Layer</guimenu>      <guimenu>Layer</guimenu>
1314      <guimenuitem>Projection</guimenuitem>      <guimenuitem>Projection</guimenuitem>
1315      </menuchoice>.      </menuchoice>.
1316        <figure>
1317        <title>Projection Window</title>
1318        <mediaobject>
1319        <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>
1320        <imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject>
1321        </mediaobject>
1322        </figure>
1323      </para>      </para>
1324      <para>      <para>
1325      Thuban is distributed with a sample collection of projections. The      Thuban is distributed with a sample collection of projections and the
1326        set of coordinate systems as used by the EPSG
1327        (European Petroleum Survey Group). This quite large set is only displayed
1328        if activated by the according checkbox. The set falls into two parts:
1329        deprecated lists all projections which are no longer part of the
1330        EPSG data base.
1331        </para>
1332        <para>
1333             The
1334      user can create new projections and make them available to all      user can create new projections and make them available to all
1335      future Thuban sessions. They may also be exported and imported so      future Thuban sessions. They may also be exported and imported so
1336      that custom projections can be distributed to others.      that custom projections can be distributed.
1337      </para>      </para>
1338          <section><title>Selecting a Projection</title>          <section><title>Selecting a Projection</title>
1339          <para>          <para>
1340          The available projections are listed on the left. If the layer          The available projections are listed on the left. If the layer
1341          or map already has a projection it will be initially highlighted          or map already has a projection it will initially be highlighted
1342          and will end with <varname>(current)</varname>. Selecting          and will end with <varname>(current)</varname>. Selecting
1343          <varname>None</varname>will cause Thuban to use the data as          <varname>&lt;None&gt;</varname> will cause Thuban to use the data as
1344          it appears in the source file and will not use a projection.          it appears in the source file and will not use a projection.
1345          </para>          </para>
1346      </section>      </section>
# Line 605  Line 1349 
1349          Whenever a projection is selected from the list its properties          Whenever a projection is selected from the list its properties
1350          are displayed on the right. These properties can be changed          are displayed on the right. These properties can be changed
1351          and the changes saved to the selected projection using          and the changes saved to the selected projection using
1352          the <guibutton>Update</guibutton>. Only a projection that comes          <guibutton>Update</guibutton>. Only a projection that comes
1353          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
1354          is selectd, <guibutton>Update</guibutton> will be disabled.          is selected, <guibutton>Update</guibutton> will be disabled.
1355          The <guibutton>Add to List</guibutton> adds the projection to the          <guibutton>Add to List</guibutton> adds the projection to the
1356          list of available projections as a new entry, and thus make it          list of available projections as a new entry, and thus makes it
1357          available to future Thuban sessions. Clicking <guibutton>New</guibutton>          available to future Thuban sessions. Clicking <guibutton>New</guibutton>
1358          will create an entirely new, empty projection. The          will create an entirely new, empty projection. The
1359          <guibutton>Remove</guibutton> button will permanantly remove a          <guibutton>Remove</guibutton> button will permanently remove a
1360          projection from the list of available projections.          projection from the list of available projections.
1361          </para>          </para>
1362            <para>
1363            To apply the selected projection to the map the user can click
1364            either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1365            <guibutton>Try</guibutton> will not close the dialog box, allowing
1366            the user to see how the projeciton changes the map.
1367            <guibutton>Revert</guibutton> will undo the last projection applied
1368            to the map. <guibutton>OK</guibutton> will commit the changes and
1369            close the dialog. The user will be unable to undo the changes.
1370            <guibutton>Close</guibutton> simply closes the dialog box. If no
1371            selection has been applied with <guibutton>Try</guibutton> the
1372            selection will not be applied to the map.
1373            </para>
1374      </section>      </section>
1375          <section><title>Importing/Exporting Projections</title>          <section><title>Importing/Exporting Projections</title>
1376          <para>          <para>
1377          The projections that appear in the list of available projections          The projections that appear in the list of available projections
1378          can be exported to another file that the user chooses. By selecting          can be exported to another file that the user chooses. By selecting
1379          one or more projections and clicking <guibutton>Export</guibutton>          one or more projections and clicking <guibutton>Export</guibutton>
1380          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
1381            projections.
1382          The file can then be distributed to other Thuban users. To import          The file can then be distributed to other Thuban users. To import
1383          a projection file the user can click <guibutton>Import</guibutton>.          a projection file the user can click <guibutton>Import</guibutton>.
1384          The imported projections are added to the list and are then available          The imported projections are added to the list and are then available
1385          to the current session and any future Thuban session.          to the current session and any future Thuban sessions.
1386          </para>          </para>
1387      </section>      </section>
1388    </chapter>    </chapter>
1389    
1390    <chapter><title>Table Management</title>    <chapter><title>Table Management</title>
1391      <para>      <para>
1392        Thuban distinguishes two different types of tables: Attribute tables
1393        (which belong to a layer) and normal data tables. Both provide
1394            the same general functionality with the difference that actions on an
1395        attribute table might also effect the map display.
1396      </para>      </para>
1397    
1398        <section><title>Table View</title>
1399            <para>
1400            <figure>
1401            <title>Table View</title>
1402            <mediaobject>
1403            <imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject>
1404            <imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject>
1405            </mediaobject>
1406            </figure>
1407            </para>
1408            <para>
1409            Thuban provides a standard dialog to display table contents, the
1410            Table View. The view has five sections: The title, selections,
1411            the table grid, export functions, and the status bar.
1412            </para>
1413            <para>
1414            The title bar identifies the table with its name.
1415            </para>
1416            <para>
1417            The selections box let the user perform simple analysis on the data
1418            based on comparisons: The first choice must be a field identifier of
1419            the table, the second choice determines the type of comparison. The
1420            third choice can be either a specific value (interpreted as numerical
1421            or string depending on the type of the first field) or a second field
1422            identifier. Thus you can perform analysis like selecting all
1423            records where <literal>population > 10000</literal> or
1424            <literal>cars_per_inhabitant < bikes_per_inhabitant</literal>
1425            (note that the field names are only explanatory, the dBase files
1426            allow only 11 character field names).
1427          
1428            Selections can be combined either by applying a selection only on
1429            a previously selected set of records or by adding the results of a
1430            selection to a previous set. The default is that a selection replaces
1431            earlier results.
1432            </para>
1433            <para>
1434            The table grid shows the contents of the table (one record per row),
1435            with highlighted selection results. Columns and rows can be resized.
1436            </para>
1437            <para>
1438            The contents of a table can be exported into a file, either dBase
1439            format (DBF) or comma separated values (CSV). The
1440            <guibutton>Export</guibutton> button
1441            raises a file dialog to specify a path and file name, the export type
1442            is determined by the file extension (either .dbf or .csv).
1443    
1444            The <guibutton>Export Selection</guibutton> button works similarly
1445            but exports only the selected records.
1446    
1447            The <guibutton>Close</guibutton> button closes the table view window.
1448            This is different from the menu item
1449            <menuchoice>
1450            <guimenu>Table</guimenu>
1451            <guimenuitem>Close</guimenuitem>
1452            </menuchoice> which unloads the table from Thuban.
1453            </para>
1454            <para>
1455            The status bar displays some statistics about the table and optional
1456            selection results.
1457            </para>
1458        </section>
1459    
1460        <section><title>General Functionality (Menu Table)</title>
1461            <para>
1462            The general functions affect all tables open in Thuban. Attribute
1463            tables are considered here as normal data tables (with the exception
1464            that they cannot be closed).
1465            </para>
1466            <section><title>Open</title>
1467                <para>
1468                The
1469                <menuchoice>
1470                <guimenu>Table</guimenu>
1471                <guimenuitem>Open</guimenuitem>
1472                </menuchoice>
1473                item raises a file dialog to let you select a
1474                dBase file from the file system to be loaded into Thuban read-only.
1475                On <guibutton>OK</guibutton> the selected file is loaded and a
1476                table view is opened.
1477                </para>
1478            </section>
1479    
1480            <section><title>Close</title>
1481                <para>
1482                The
1483                <menuchoice>
1484                <guimenu>Table</guimenu>
1485                <guimenuitem>Close</guimenuitem>
1486                </menuchoice>
1487                item raises a dialog listing the currently open
1488                data tables
1489                (loaded via
1490                <menuchoice>
1491                <guimenu>Table</guimenu>
1492                <guimenuitem>Open</guimenuitem>
1493                </menuchoice>). Selected tables are dereferenced on confirmation.
1494                Since tables are opened read-only the contents of the tables are
1495                not affected.
1496    
1497                Any open views of the tables are closed as well.
1498    
1499                Tables used in a join cannot be closed.
1500                </para>
1501            </section>
1502    
1503            <section><title>Rename</title>
1504                <para>
1505                <menuchoice>
1506                <guimenu>Table</guimenu>
1507                <guimenuitem>Rename</guimenuitem>
1508                </menuchoice> changes the table title.
1509                </para>
1510            </section>
1511    
1512            <section><title>Show</title>
1513                <para>
1514                The
1515                <menuchoice>
1516                <guimenu>Table</guimenu>
1517                <guimenuitem>Show</guimenuitem>
1518                </menuchoice>
1519                item raises a list of available tables (explicitly
1520                loaded, attribute tables, results of a join). Selected tables are
1521                show in tables views on <guibutton>OK</guibutton>.
1522                </para>
1523            </section>
1524    
1525            <section><title>Join</title>
1526                <para>
1527                <figure>
1528                <title>Join Tables</title>
1529                <mediaobject>
1530                <imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject>
1531                <imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject>
1532                </mediaobject>
1533                </figure>
1534                </para>
1535                <para>
1536                The
1537                <menuchoice>
1538                <guimenu>Table</guimenu>
1539                <guimenuitem>Join</guimenuitem>
1540                </menuchoice>
1541                item raises a dialog to specify the two tables to be
1542                joined. The join results in a new table named 'Join of "left table"
1543                and "right table"'.
1544    
1545                The dialog lets you select the two tables to be joined and the two
1546                fields the join has to be performed on. By default, the new
1547                table contains only those records which are matched by the join.
1548    
1549                If you want to preserve the records of the left table you can
1550                perform an outer join. The fields from the right table for records
1551                not matched by the join are filled with <varname>None</varname> in
1552                this case.
1553                </para>
1554            </section>
1555    
1556        </section>
1557        <section><title>Attribute Tables</title>
1558            <para>
1559                To clearly separate between both types of tables (data and
1560            attribute), Thuban provides functionality regarding the attribute
1561            tables under the <menuchoice><guimenu>Layer</guimenu></menuchoice> menu.
1562            </para>
1563    
1564            <section><title>Show Table</title>
1565                <para>
1566                <menuchoice>
1567                <guimenu>Layer</guimenu>
1568                <guimenuitem>Show Table</guimenuitem>
1569                </menuchoice>
1570                opens the attribute table of the currently active layer in a table
1571                view.
1572    
1573                In addition to the functionality described above selections
1574                affect also the map display: objects related to selected records
1575                are highlighted.
1576                </para>
1577            </section>
1578    
1579            <section><title>Join Table</title>
1580                <para>
1581                Unlike the join described above, the join does not result in a
1582                new table. The attribute table of the currently active layer is the
1583                left table and other tables are joined to this table. The results of
1584                the join are available for classification.
1585    
1586                As a consequence, the join cannot result in fewer
1587                records than the source attribute table. The user is warned if the
1588                right table does not fulfill this constraint. An outer join must be
1589                used in such cases.
1590                </para>
1591            </section>
1592    
1593            <section><title>Unjoin Table</title>
1594                <para>
1595                As said above, a normal table cannot be closed while it is still
1596                used in a join. While the joined table resulting from a join of
1597                normal tables can be simply closed (and thereby dereferencing
1598                the source tables), this is not possible for attribute tables.
1599    
1600                Hence joins on attribute tables must be solved explicitly. This is
1601                what the
1602                <menuchoice>
1603                <guimenu>Layer</guimenu>
1604                <guimenuitem>Unjoin Table</guimenuitem>
1605                </menuchoice>
1606                item is used for: The last join for the currently
1607                active layer is solved.
1608                </para>
1609            </section>
1610        </section>
1611      </chapter>
1612    
1613      <chapter><title>Extensions</title>
1614            <para>
1615            Thuban is designed to be extensible. The term Extension is used as a
1616            general term for anything that extends Thuban.
1617            This chapter introduces into some oppportunities how to add and
1618            handle extra functionality developed by your own or third parties.
1619            </para>
1620    
1621            <section><title>Add personal extensions via thubanstart.py</title>
1622                    <para>
1623                    After Thuban has been started for the first time, a directory
1624                    .thuban is created within your home directory.
1625                    There you can add a file thubanstart.py  which will be imported
1626                    by Thuban at start-up. It is recommended to add only import-statements
1627                    to this file to keep the actual code of extensions separate.
1628                    </para>
1629                    <para>
1630                    The modules to import must either be found through the environment
1631                    variable PYTHONPATH or directly be placed into the .thuban-directory.
1632                    </para>
1633                    <para>
1634                    As an example, copy the file examples/simple_extensions/hello_world.py
1635                    of the Thuban source code into the .thuban-directory of your home
1636                    directory. Now add add the statement import hello_world to the
1637                    file thubanstart.py and run Thuban. You will notice an additional
1638                    menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where
1639                    the new item for the Hello-World extension is placed - select it
1640                    to see the Hello-World message.
1641                    </para>
1642            </section>
1643    
1644            <section><title>Extensions included in Thuban package</title>
1645                    <para>
1646                    The extensions described in this section are part of the
1647                    Thuban package, but not activated by default.
1648                    You will find them in the Thuban installation directory
1649                    under <literal>Extensions/</literal>. Activate them as personal
1650                    extensions via PYTHONPATH as described in the previous section.
1651                    Stable extensions will appear under the menu
1652                    <menuchoice><guimenu>Extensions</guimenu></menuchoice> and
1653                    extensions which are in experimental state and therefore
1654                    not fully functional under
1655                    <menuchoice><guimenu>Experimental</guimenu></menuchoice>.
1656                    </para>
1657    
1658                    <section><title>Stable extensions</title>
1659                            <para>
1660                            These extensions provide extra-functionality to Thuban
1661                            that has not (yet) been integrated in the main application.
1662                            They are considered to be free of bugs, but may be
1663                            further polished with helpful user interactions.
1664                            </para>
1665                            <section><title>gns2shp</title>
1666                                    <para>
1667                                    This tool converts data of the Geospatial Names Server
1668                                    (GNS, see <ulink url="http://www.nima.mil/gns"/>)
1669                                    into Shapefile format.
1670                                    The above web-site offer to download named places
1671                                    information grouped by countries for all of the world
1672                                    except USA for which other data are provided.
1673                                    </para>
1674                                    <para>
1675                                    If you download and unpack a package, you will have
1676                                    a text-file with suffix .txt.
1677                                    Selecting such a file via gns2shp will create the
1678                                    corresponding Shapefile with the same basename and
1679                                    place it in the same direcory. Afterwards it
1680                                    is automatically loaded into Thuban.
1681                                    The Shapefile will not automatically be delete afterwards.
1682                                    </para>
1683                                    <para>
1684                                    The gns2shp.py module can also be executed on the
1685                                    command line for batch processing purposes.
1686                                    </para>
1687                                    <para>
1688                                    A sample (<literal>ls.txt</literal> for Liechtenstein)
1689                                    is included in the directory
1690                                    <literal>Extensions/gns2shp/test</literal>.
1691                                    </para>
1692                            </section>
1693                    </section>
1694                    <section><title>Experimental extensions</title>
1695                            <para>
1696                            All all of these functions have to be handled with care,
1697                            since they are neither complete nor well tested.
1698                            They are to be seen as a proof-of-concept and may
1699                            additionally in some cases of practical help.
1700                            </para>
1701                            <para>
1702                            Any interest on further improvement of these extensions
1703                            should be communicated towards the developer and user
1704                            community.
1705                            </para>
1706    
1707                            <section><title>importAPR</title>
1708                                    <para>
1709                                    This command offer to load an ESRI� ArcView� project
1710                                    file (suffix .apr) and convert it for use within Thuban.
1711                                    After selecting a apr-file to load, a list
1712                                    will be presented that offers to select one of the views
1713                                    of the apr-file, provided there is more than one.
1714                                    Furthermore, the Session Info-Tree is extended with
1715                                    a complete representation of the parsed apr-file.
1716                                    </para>
1717                                    <para>
1718                                    The legend of Thuban does not yet cover all of the elements as
1719                                    supported by the legend of ArcView�. Therefore, the Thuban
1720                                    map will look different. Furthermore, the apr-format is
1721                                    a proprietary format, not openly documented.
1722                                    Therefore, the interpretation is
1723                                    partly based on reverse engeneering and good guessing.
1724                                    </para>
1725                                    <para>
1726                                    The file-paths within the apr-file may not fit and potentially
1727                                    are subject to fix in the apr-file. You can do this
1728                                    applying any text editor. The paths are either absolute
1729                                    or relative from where Thuban has been started.
1730                                    </para>
1731                                    <para>
1732                                    A sample for the Iceland data is included as
1733                                    <literal>Extensions/importAPR/samples/iceland.apr</literal>.
1734                                    The file-paths are relative from the Thuban main directory.
1735                                    </para>
1736                            </section>
1737                    </section>
1738            </section>
1739    
1740            <section><title>Writing simple extensions</title>
1741                    <para>
1742                    Writing an extension for Thuban basically means to
1743                    implement the extra functionality in Python with all of the
1744                    Thuban classes, methods and variables available.
1745                    </para>
1746                    <para>
1747                    All classes and their methods are documented in the source code
1748                    (see their doc-strings). Here is an example from
1749                    Thuban/Model/layer.py that describes some of the methods
1750                    of a Layer object:
1751                    </para>
1752                    <programlisting>
1753                    <![CDATA[
1754    class BaseLayer(TitledObject, Modifiable):
1755    
1756        """Base class for the layers."""
1757    
1758        def __init__(self, title, visible = True, projection = None):
1759            """Initialize the layer.
1760    
1761            title -- the title
1762            visible -- boolean. If true the layer is visible.
1763            """
1764            TitledObject.__init__(self, title)
1765            Modifiable.__init__(self)
1766            self.visible = visible
1767            self.projection = projection
1768    
1769        def Visible(self):
1770            """Return true if layer is visible"""
1771            return self.visible
1772    
1773        def SetVisible(self, visible):
1774            """Set the layer's visibility."""
1775            self.visible = visible
1776            self.issue(LAYER_VISIBILITY_CHANGED, self)
1777    
1778        def HasClassification(self):
1779            """Determine if this layer support classifications."""
1780    ...
1781                    ]]>
1782                    </programlisting>
1783                    <para>
1784                    This example intends to give you an impression of the
1785                    source-code-level documentation.
1786                    You have to make yourself familiar with
1787                    the Python programming language to understand some special
1788                    code elements.
1789                    </para>
1790                    <section><title>hello_world.py</title>
1791                      <para>
1792                      Traditionally, the first example should welcome the world.
1793                      Most of the code handles the frame for integrating a menu
1794                      item into Thuban while the actual raising of a message
1795                      is done in a single line.
1796                      </para>
1797                            <programlisting>
1798                            <![CDATA[
1799    # Copyright (C) 2003 by Intevation GmbH
1800    # Authors:
1801    # Jan-Oliver Wagner <[email protected]>
1802    #
1803    # This program is free software under the GPL (>=v2)
1804    # Read the file COPYING coming with Thuban for details.
1805    
1806    """
1807    Extend Thuban with a sample Hello World to demonstrate simple
1808    extensions.
1809    """
1810    
1811    __version__ = '$Revision$'
1812    
1813    # use _() already now for all strings that may later be translated
1814    from Thuban import _
1815    
1816    # Thuban has named commands which can be registered in the central
1817    # instance registry.
1818    from Thuban.UI.command import registry, Command
1819    
1820    # The instance of the main menu of the Thuban application
1821    # See Thuban/UI/menu.py for the API of the Menu class
1822    from Thuban.UI.mainwindow import main_menu
1823    
1824    def hello_world_dialog(context):
1825        """Just raise a simple dialog to greet the world.
1826    
1827        context -- The Thuban context.
1828        """
1829        context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!'))
1830    
1831    
1832    # create a new command and register it
1833    registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog,
1834                         helptext = _('Welcome everyone on this planet')))
1835    
1836    # find the extensions menu (create it anew if not found)
1837    extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
1838    
1839    # finally bind the new command with an entry in the extensions menu
1840    extensions_menu.InsertItem('hello_world')
1841                            ]]>
1842                            </programlisting>
1843                    </section>
1844                    <section><title>Registering a Command</title>
1845                      <para>
1846                      Mainly, our new function has to be registered to the Thuban
1847                      framework in order to connect it to the menu. A registered
1848                      command can also be connected to e.g. a toolbar button.
1849                      </para>
1850                      <para>
1851                      The instances and classes for this are imported at the beginning.
1852                      Any code not inside a method or class is directly executed when
1853                      the source-code module is imported. Therefore, the second
1854                      part of this example consist of the plain statements to create a new
1855                      Command and to add it to the menu.
1856                      </para>
1857                      <para>
1858                      By convention, it looks for a menu registered as ``extensions'' to
1859                      insert the new command. If it does not exist yet, it gets created.
1860                      It is advisable to copy this code for any of your extensions.
1861                      </para>
1862                    </section>
1863                    <section><title>The Thuban context</title>
1864                            <para>
1865                            A registered command that is called, always receives the
1866                            Thuban context. This instance provides our method with
1867                            hook references to all important components of the Thuban
1868                            application.
1869                            </para>
1870                            <para>
1871                    In the example hello_world.py, our function uses the
1872                            mainwindow component which offers a method to raise a
1873                            message dialog. In total there are three hooks:
1874                            <itemizedlist>
1875                            <listitem>
1876                            <para>application:
1877                            This object is the instance of the Thuban Application class.
1878                            Except maybe for loading or savinf sessions, you will not
1879                            need this object for a simple extension.
1880                            See Thuban/UI/application.py for the API.
1881                            </para>
1882                            </listitem>
1883                            <listitem>
1884                            <para>session:
1885                            The instance of the current session. It manages the sessions'
1886                            map and tables. You can set and remove the map or tables.
1887                            In may also get the map object. However, you should know that
1888                            internally it is already prepared to handle many maps.
1889                            Therfore, currently you would always receive a list with exactlty
1890                            one element. In the future, if there are more than one map,
1891                            you will not know which one is the currently display one and
1892                            therefore you should use the mainwindow as hook to find
1893                            the currently displayed map.
1894                            See Thuban/Model/session.py for the API.
1895                            </para>
1896                            </listitem>
1897                            <listitem>
1898                            <para>
1899                            mainwindow: The mainwindow object is central to manage various
1900                            GUI things such as the Legend sub-window. Most notably,
1901                            you get access to the canvas which is the window part where
1902                            the map is drawn. The canvas knows, which map it currently
1903                            draws and therefore you get the current map via
1904                            context.mainwindow.canvas.Map().
1905                            See Thuban/UI/mainwindow.py for the API.
1906                            </para>
1907                            </listitem>
1908                            </itemizedlist>
1909                </para>
1910                    </section>
1911            </section>
1912    </chapter>    </chapter>
1913    
1914    <chapter><title>Trouble Shooting</title>    <chapter><title>Trouble Shooting</title>
1915      <para>      <para>
1916        Here are a few problems that users have encountered when first using Thuban.
1917        </para>
1918        <para>
1919    
1920        <itemizedlist>
1921        <listitem>
1922        <para>After adding two or more layers nothing is drawn in the map window.
1923        </para>
1924        <para>
1925        This is probably because the layers have different projections. Projections
1926        must be set on all layers and on the map itself if the layers' projections
1927        are different.
1928        </para>
1929        </listitem>
1930    
1931        <listitem>
1932        <para>Thuban crashes on startup with the error
1933            <literal>NameError: global name 'False' is not defined</literal>.
1934        </para>
1935        <para>
1936        <varname>True</varname> and <varname>False</varname> were only introduced
1937        in Python 2.2.1. Thuban depends on at least Python 2.2.1.
1938      </para>      </para>
1939        </listitem>
1940    
1941        <listitem>
1942        <para>After compiling Thuban, Thuban crashes with an error similar to
1943            <literal>
1944            ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0
1945            </literal>
1946        </para>
1947        <para>
1948        Thuban depends on the wxWindows library. If Thuban is compiled with an
1949        incompatible version of the compiler than wxWindows was compiled with
1950        this error may occur. Try compiling with a different version of the
1951        compiler.
1952        </para>
1953        </listitem>
1954        </itemizedlist>
1955        </para>
1956        <para>
1957        If an error occurs Thuban will display a dialog indicating the error
1958        before closing. The text should be copied and reported to the
1959        <ulink url="http://thuban.intevation.org/bugtracker.html">
1960        Intevation bugtracker
1961        </ulink>.
1962        More information about the system is available from
1963        <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.
1964        This should also be included in the bug report.
1965        <figure>
1966        <title>Error Dialog</title>
1967        <mediaobject>
1968        <imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject>
1969        <imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject>
1970        </mediaobject>
1971        </figure>
1972        </para>
1973    
1974    </chapter>    </chapter>
1975    
1976    <appendix><title>Supported Data Sources</title>    <appendix><title>Supported Data Sources</title>
# Line 646  Line 1979 
1979      <variablelist>      <variablelist>
1980      <varlistentry>      <varlistentry>
1981      <term>Shapefile</term>      <term>Shapefile</term>
1982      <listitem><para></para></listitem>      <listitem>
1983            <para>
1984            The Shapefile format has become a standard format for saving
1985            geographic vector information. It supports polygons, lines, and
1986            points.
1987            
1988            <ulink url="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf">
1989            Technical Specification.
1990            </ulink>  
1991            </para>
1992        </listitem>
1993      </varlistentry>      </varlistentry>
1994    
1995      <varlistentry>      <varlistentry>
1996      <term>DB2 file</term>      <term>dBase file</term>
1997      <listitem><para></para></listitem>      <listitem>
1998            <para>
1999            dBase files are used to store the attributes for each layer. This
2000            is closely associated with the Shapefile format. For detailed
2001            specifications on the correct format of a dBase file used with
2002            Thuban please see the Technical Specification for the Shapefile
2003            format above.
2004            </para>
2005        </listitem>
2006        </varlistentry>
2007    
2008        <varlistentry>
2009        <term>PostGIS</term>
2010        <listitem>
2011            <para>
2012            PostGIS adds support for geographic objects to the PostgreSQL
2013            object-relational database. Different layer types (as for Shapefiles)
2014            are supported. <ulink url="http://postgis.refractions.net">PostGIS
2015            Homepage</ulink>
2016            </para>
2017        </listitem>
2018        </varlistentry>
2019    
2020        <varlistentry>
2021        <term>Raster files</term>
2022        <listitem>
2023            <para>
2024            Binding the GDAL library Thuban supports numerous raster file formats,
2025            see <ulink url="http://www.remotesensing.org/gdal/formats_list.html">
2026            GDAL format list</ulink> for details.</para>
2027    
2028            <para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis>
2029            format: Raster maps are provided as TIFF images, with an additional
2030            "world file" storing the geographic reference (usually with an
2031            extension ".tfw").
2032            </para>
2033        </listitem>
2034      </varlistentry>      </varlistentry>
2035    
2036      </variablelist>      </variablelist>
2037    </appendix>    </appendix>
2038    
2039      <appendix><title>Working with PostGIS</title>
2040      <para>
2041      This section focusses on the use of PostGIS in the Thuban framework. For
2042      installation and maintenance of spatial databases we refer to the  
2043      <ulink url="http://postgis.refractions.net">PostGIS Homepage</ulink>.
2044      The Thuban PostGIS support requires the
2045      <ulink url="http://initd.org/software/psycopg">psycopg module</ulink>.
2046      </para>
2047    
2048      <para>
2049            Working with PostGIS Databases is seperated into two steps:
2050            <itemizedlist>
2051            <listitem><para>Opening a Database Connection</para></listitem>
2052            <listitem><para>Loading a Data Layer</para></listitem>
2053            </itemizedlist>
2054      </para>
2055            <section><title>Opening a Database Connection</title>
2056            <para>
2057                    Before a data layer can be loaded from a PostGIS database a
2058                    connection with the database has to be established.
2059                    <menuchoice>
2060                    <guimenu>Session</guimenu>
2061                    <guimenuitem>Database Connections ...</guimenuitem>
2062                    </menuchoice> opens a dialog for database connection
2063                    management. In the dialog new connections can be added
2064                    and existing ones can be removed. Removing a database
2065                    connection is not possible if the map still displays a
2066                    layer provided by this database connection.
2067            </para>
2068        <figure>
2069        <title>Database Management Dialog</title>
2070        <mediaobject>
2071        <imageobject><imagedata fileref="../images/app_postgis_db_management.png" format="PNG" scale="&imgscale;"/></imageobject>
2072        <imageobject><imagedata fileref="./images/app_postgis_db_management.eps" format="EPS" scale="&imgscale;"/></imageobject>
2073        </mediaobject>
2074        </figure>
2075    
2076            <para>
2077                    To add a new database connection to the session a dialog is
2078                    opened to specify the relevant connection data. Enter all
2079                    data relevant for your connection. If the connection fails
2080                    the dialog remains open and provides some hints on the failure.
2081            </para>
2082            <figure>
2083            <title>Add Database Dialog</title>
2084            <mediaobject>
2085            <imageobject><imagedata fileref="../images/app_postgis_db_add.png" format="PNG" scale="&imgscale;"/></imageobject>
2086            <imageobject><imagedata fileref="./images/app_postgis_db_add.eps" format="EPS" scale="&imgscale;"/></imageobject>
2087            </mediaobject>
2088            </figure>
2089            
2090            <para>
2091            It is important to note that information on database connections are
2092            also stored with the session. Passwords are NOT stored. If you load a
2093            session with database connections you are asked to enter these
2094            passwords again where required.
2095            </para>
2096    
2097            </section>
2098    
2099            <section><title>Loading a Data Layer</title>
2100            <para>
2101            Data layers as part of a map are loaded with the
2102            <menuchoice>
2103            <guimenu>Map</guimenu>
2104            <guimenuitem>Add Database Layer ...</guimenuitem>
2105            </menuchoice> menu item. A dialog is raised displaying two choice
2106            lists. In the left list all connected databases are shown.
2107            Highlighting
2108            one of these and issuing a retrieval results in a list of available
2109            layer tables from that database. After selection of a
2110            layer the dialog is closed.
2111            </para>
2112            <figure>
2113            <title>Add Database Dialog</title>
2114            <mediaobject>
2115            <imageobject><imagedata fileref="../images/app_postgis_add_layer.png" format="PNG" scale="&imgscale;"/></imageobject>
2116            <imageobject><imagedata fileref="./images/app_postgis_add_layer.eps" format="EPS" scale="&imgscale;"/></imageobject>
2117            </mediaobject>
2118            </figure>
2119            
2120            </section>
2121    
2122      </appendix>
2123    
2124    <appendix><title>Supported Projections</title>    <appendix><title>Supported Projections</title>
2125      <para>      <para>
2126        The following types of projections are directly support by
2127        Thuban. The specific values for each are provided by the user
2128        to create custom projections. Thuban comes with predefined
2129        projections which are available through the Projections dialog.
2130        </para>
2131        <itemizedlist>
2132        <listitem>
2133            <para>Geographic</para>
2134            <itemizedlist>
2135            <listitem><para><literal>Ellipsoid</literal></para></listitem>
2136            <listitem><para>
2137                    <literal>Source Data</literal>: either Degrees or Radians
2138                    </para></listitem>
2139            </itemizedlist>
2140        </listitem>
2141        <listitem>
2142            <para>Lambert Conic Conformal</para>
2143        <itemizedlist>
2144            <listitem><para><literal>Ellipsoid</literal></para></listitem>
2145            <listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem>
2146            <listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem>
2147            <listitem><para><literal>Central Meridian</literal></para></listitem>
2148            <listitem><para><literal>Latitude of Origin</literal></para></listitem>
2149            <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
2150            <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
2151        </itemizedlist>
2152        </listitem>
2153        <listitem>
2154            <para>Transverse Mercator</para>
2155        <itemizedlist>
2156            <listitem><para><literal>Ellipsoid</literal></para></listitem>
2157            <listitem><para><literal>Latitude</literal>of origin</para></listitem>
2158            <listitem><para><literal>Longitude</literal>at central meridian</para></listitem>
2159            <listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem>
2160            <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
2161            <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
2162        </itemizedlist>
2163        </listitem>
2164        <listitem>
2165            <para>Universal Transverse Mercator</para>
2166        <itemizedlist>
2167            <listitem><para><literal>Ellipsoid</literal></para></listitem>
2168            <listitem><para><literal>Zone</literal>
2169                    (can be guessed appling the Propose button)</para></listitem>
2170            <listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem>
2171        </itemizedlist>
2172        </listitem>
2173        </itemizedlist>
2174        
2175        <para>
2176        Thuban comes with a sample set of map projections for various
2177        European countries. Apart from the basic projection they differ
2178        especially in their parameterization:
2179        </para>
2180        <itemizedlist>
2181        <listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para>
2182        </listitem>
2183    
2184        <listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para>
2185        </listitem>
2186    
2187        <listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)
2188        </para>
2189        </listitem>
2190    
2191        <listitem><para>Reseau Geodesique Francaise
2192        (France, Lambert Conic Conformal)</para>
2193        </listitem>
2194    
2195        <listitem><para>UK National Grid (United Kingdom, Transverse Mercartor)
2196        </para>
2197        </listitem>
2198        </itemizedlist>
2199    
2200        <para>
2201        Thuban uses the comprehensive PROJ library for projections. PROJ provides
2202        more than the four commonly used projections described above. If needed
2203        Thuban can be easily extended to a new projection covered by PROJ.
2204      </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>  
2205    </appendix>    </appendix>
2206    
2207  </book>  </book>
2208    

Legend:
Removed from v.1475  
changed lines
  Added in v.2311

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26