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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2023 - (hide annotations)
Fri Dec 5 13:54:46 2003 UTC (21 years, 3 months ago) by frank
Original Path: trunk/thuban/Doc/manual/thuban-manual.xml
File MIME type: text/xml
File size: 82537 byte(s)
Documentation synced with 1.0rc1

* Doc/manual/thuban-manual.xml:
	Minor formatting changes and references to database layers .
	Introduction.Internationalization: New section on i18n.
	MapManagement.AddingandRemovingLayers: Added item on database layers.
	MapManagement.TheLegend: Added section and screenshot on popup menu.
	ProjectionManagement: Updated screenshot and sentence on EPSG.
	Appendix.SupportedDataSources: Added PostGIS.
	Appendix.WorkingwithPostGIS: New section.

* Doc/manual/images/6_projection.png: Updated screenshot including
	EPSG checkboxes.

* Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.

* Doc/manual/images/app_postgis_add_layer.png,
	Doc/manual/images/app_postgis_db_add.png,
	Doc/manual/images/app_postgis_db_management.png:
	New screenshots focussing on database layers

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

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26