/[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 2314 - (show annotations)
Sun Aug 1 21:31:30 2004 UTC (20 years, 7 months ago) by jan
Original Path: trunk/thuban/Doc/manual/thuban-manual.xml
File MIME type: text/xml
File size: 86416 byte(s)
(Chapter Session Management): Fixed unprecise description for Save Session.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26