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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2369 - (show annotations)
Sun Oct 3 19:37:37 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Doc/manual/thuban-manual-de.xml
File MIME type: text/xml
File size: 86381 byte(s)
Started translation of Map chapter.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26