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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2209 - (show annotations)
Sun May 16 09:38:48 2004 UTC (20 years, 9 months ago) by jan
Original Path: trunk/thuban/Doc/manual/thuban-manual.xml
File MIME type: text/xml
File size: 86077 byte(s)
updated sample file to use FindOrInsertMenu().

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26