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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2507 - (hide annotations)
Mon Dec 27 09:02:00 2004 UTC (20 years, 2 months ago) by jan
Original Path: trunk/thuban/Doc/manual/thuban-manual-de.xml
File MIME type: text/xml
File size: 88326 byte(s)
More translations.

1 jan 2309 <?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 jan 2313 <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 jan 2309
467     </chapter>
468    
469     <chapter><title>Session Management</title>
470    
471 jan 2313 <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 jan 2309
486 jan 2313 <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 jan 2309
499 jan 2313 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 jan 2309
505 jan 2313 <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 jan 2309
526 jan 2313 <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 jan 2309 </chapter>
548    
549 jan 2369 <chapter><title>Karten Management</title>
550 jan 2309 <para>
551 jan 2369 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 jan 2309 </para>
555     <para>
556 jan 2369 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 jan 2309 <menuchoice>
560 jan 2369 <guimenu>Karte</guimenu>
561     <guimenuitem>Umbennen</guimenuitem>
562 jan 2309 </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 jan 2369 <textobject> <phrase>Karte umbennen</phrase> </textobject>
573 jan 2309 </inlinemediaobject>
574     </para>
575    
576 jan 2369 <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 jan 2309 <itemizedlist>
591     <listitem>
592     <para>
593 jan 2369 Shape Ebenen können zur Karte hinzugefügt werden mit
594 jan 2309 <menuchoice>
595 jan 2369 <guimenu>Karte</guimenu>
596     <guimenuitem>Ebene hinzufügen</guimenuitem>
597 jan 2309 </menuchoice>.
598 jan 2369 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 jan 2309 <para>
606 jan 2369 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 jan 2309 </listitem>
612    
613     <listitem>
614 jan 2369 <para>Datenbankebenen können zu Karte hinzugefügt werden mit
615 jan 2309 <menuchoice>
616 jan 2369 <guimenu>Karte</guimenu>
617     <guimenuitem>Datenbankebene hinzufügen</guimenuitem>
618 jan 2309 </menuchoice>.
619 jan 2369 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 jan 2309 </para>
626     <para>
627 jan 2369 Siehe auch Anhang ``Mit PostGIS arbeiten'' für weitere Details.
628 jan 2309 </para>
629     </listitem>
630    
631     <listitem>
632     <para>
633 jan 2369 Bildebenen können zur Karte hinzugefügt werden mit
634 jan 2309 <menuchoice>
635 jan 2369 <guimenu>Karte</guimenu>
636     <guimenuitem>Bildebene hinzufügen</guimenuitem>
637 jan 2309 </menuchoice>.
638 jan 2369 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 jan 2309 </para>
644     </listitem>
645     </itemizedlist>
646     </section>
647    
648     <section><title>Navigation</title>
649     <para>
650 jan 2369 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 jan 2309 </para>
654     <itemizedlist>
655     <listitem>
656     <para>
657 jan 2369 Das ZoomIn Werkzeug
658 jan 2309 <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 jan 2369 <textobject> <phrase>ZoomIn Werkzeug</phrase> </textobject>
666 jan 2309 </inlinemediaobject>
667 jan 2369 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 jan 2309 </para>
672     </listitem>
673     <listitem>
674     <para>
675 jan 2369 Das ZoomOut Werkzeug
676 jan 2309 <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 jan 2369 <textobject> <phrase>ZoomOut Werkzeug</phrase> </textobject>
684 jan 2309 </inlinemediaobject>
685 jan 2369 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 jan 2309 </para>
690     </listitem>
691     <listitem>
692     <para>
693 jan 2507 Das Verschieben Werkzeug
694 jan 2309 <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 jan 2507 <textobject> <phrase>Verschieben Werkzeug</phrase> </textobject>
702 jan 2309 </inlinemediaobject>
703 jan 2507 gestattet es dem Benutzer die Karte durch klicken und
704     ziehen mit gedrückter Maustaste zu verschieben.
705 jan 2309 </para>
706     </listitem>
707     <listitem>
708     <para>
709 jan 2507 Das Volle Ausdehnung Werkzeug
710 jan 2309 <inlinemediaobject>
711     <imageobject>
712     <imagedata fileref="../images/3_2_fullextent.png" format="PNG" scale="&imgscale;"/>
713     </imageobject>
714     <imageobject>
715     <imagedata fileref="./images/3_2_fullextent.eps" format="EPS" scale="&imgscale;"/>
716     </imageobject>
717 jan 2507 <textobject> <phrase>Volle Ausdehnung Werkzeug</phrase> </textobject>
718 jan 2309 </inlinemediaobject>
719 jan 2507 skaliert die Zoom-Stufe so, dass die gesamte sichtbare Karte im
720     Fenster dargestellt wird.
721 jan 2309 </para>
722     </listitem>
723     <listitem>
724     <para>
725 jan 2507 Das Voll Ebenen-Ausdehnung Werkzeug
726 jan 2309 <inlinemediaobject>
727     <imageobject>
728     <imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG" scale="&imgscale;"/>
729     </imageobject>
730     <imageobject>
731     <imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS" scale="&imgscale;"/>
732     </imageobject>
733 jan 2507 <textobject> <phrase>Volle Ebenen-Ausdehnung Werkzeug</phrase> </textobject>
734 jan 2309 </inlinemediaobject>
735 jan 2507 skaliert die Zoom-Stufe so, dass die akutelle Ebene vollständig
736     im Fenster dargestellt wird. Ist keine Ebene ausgewählt, so
737     ist dieser Knopf ausgegraut und damit nicht verfügbar.
738 jan 2309 </para>
739     </listitem>
740     <listitem>
741     <para>
742 jan 2507 Das Volle Shape-Ausdehnung Werkzeug
743 jan 2309 <inlinemediaobject>
744     <imageobject>
745     <imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG" scale="&imgscale;"/>
746     </imageobject>
747     <imageobject>
748     <imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS" scale="&imgscale;"/>
749     </imageobject>
750 jan 2507 <textobject> <phrase>Volle Shape-Ausdehnung Werkzeug</phrase> </textobject>
751 jan 2309 </inlinemediaobject>
752 jan 2507 skaliert die Zoom-Stufe so, dass die aktuell ausgewählten Shapes
753     vollständig in das Fenster eingepasst sind.
754     Handelt es sich bei der Auswahl nur um einen einzelnen Punkt
755     so wird dieser zentriert dargestellt und bis zu einem gewissen
756     grad gezoomed.
757     Ist kein Shape selektiert, so ist dieser Knopf ausgegraut und damit
758     nicht verfügbar.
759     Dieses Werkzeug ist besonders für den Fall hilfreich wenn man Objekte
760     in einer Ebenen-Tabelle auswählt und sie auf der Karte schnell
761     anspringen machen möchte.
762 jan 2309 </para>
763     </listitem>
764     </itemizedlist>
765     </section>
766    
767     <section><title>Object Identification</title>
768     <para>
769     Objects on the map can be identified using the Identify tool
770     <inlinemediaobject>
771     <imageobject>
772     <imagedata fileref="../images/3_3_identify.png" format="PNG" scale="&imgscale;"/>
773     </imageobject>
774     <imageobject>
775     <imagedata fileref="./images/3_3_identify.eps" format="EPS" scale="&imgscale;"/>
776     </imageobject>
777     <textobject> <phrase>Identify Tool</phrase> </textobject>
778     </inlinemediaobject>.
779     Clicking on an object selects that object and opens a dialog which
780     shows all the table attributes for that object. Any current selection
781     is lost. Objects on the map are typically shapes and this document
782     will often refer to objects as shapes.
783     </para>
784     </section>
785    
786     <section><title>Object Labeling</title>
787     <para>
788     Objects can be labeled using the Label tool
789     <inlinemediaobject>
790     <imageobject>
791     <imagedata fileref="../images/3_3_label.png" format="PNG" scale="&imgscale;"/>
792     </imageobject>
793     <imageobject>
794     <imagedata fileref="./images/3_3_label.eps" format="EPS" scale="&imgscale;"/>
795     </imageobject>
796     <textobject> <phrase>Label Tool</phrase> </textobject>
797     </inlinemediaobject>.
798     Clicking on an object selects that object and opens a dialog which
799     displays the table attributes for that object. An attribute can
800     be selected to be the label on the map. The label will be placed
801     at the center of the shape. Clicking on an object that already has
802     a label will remove the label.
803     </para>
804     </section>
805    
806     <section><title>The Legend</title>
807     <para>
808     <inlinemediaobject>
809     <imageobject>
810     <imagedata fileref="../images/3_5_legend.png" format="PNG" scale="&imgscale;"/>
811     </imageobject>
812     <imageobject>
813     <imagedata fileref="./images/3_5_legend.eps" format="EPS" scale="&imgscale;"/>
814     </imageobject>
815     <textobject> <phrase>Legend</phrase> </textobject>
816     </inlinemediaobject>
817     </para>
818     <para>
819     The Legend provides an overview of the layers in the map. Layers
820     that appear higher in the legend will appear ``closer'' to the user.
821     If a layer supports classification (currently, only shape layers
822     have this feature) then the classification groups will be shown
823     below each layer. The properties for each group are also displayed
824     with a small graphic. Polygon layers appear as rectangles, lines
825     appear as curved lines, and points appear as circles.
826     </para>
827     <para>
828     Along the top of the legend is a toolbar which allows quick access
829     to some of the layer manipulation options under
830     <menuchoice><guimenu>Map</guimenu></menuchoice>.
831     </para>
832    
833     <itemizedlist>
834     <listitem>
835     <para>
836     The Move Layer to Top tool
837     <inlinemediaobject>
838     <imageobject>
839     <imagedata fileref="../images/3_5_totop.png" format="PNG" scale="&imgscale;"/>
840     </imageobject>
841     <imageobject>
842     <imagedata fileref="./images/3_5_totop.eps" format="EPS" scale="&imgscale;"/>
843     </imageobject>
844     <textobject> <phrase>Move Layer to Top</phrase> </textobject>
845     </inlinemediaobject> raises the selected layer to the top of the map.
846     </para>
847     </listitem>
848     <listitem>
849    
850     <para>
851     The Move Layer Up tool
852     <inlinemediaobject>
853     <imageobject>
854     <imagedata fileref="../images/3_5_moveup.png" format="PNG" scale="&imgscale;"/>
855     </imageobject>
856     <imageobject>
857     <imagedata fileref="./images/3_5_moveup.eps" format="EPS" scale="&imgscale;"/>
858     </imageobject>
859     <textobject> <phrase>Move Layer Up</phrase> </textobject>
860     </inlinemediaobject> raises the selected layer one level.
861     </para>
862     </listitem>
863     <listitem>
864    
865     <para>
866     The Move Layer Down tool
867     <inlinemediaobject>
868     <imageobject>
869     <imagedata fileref="../images/3_5_movedown.png" format="PNG" scale="&imgscale;"/>
870     </imageobject>
871     <imageobject>
872     <imagedata fileref="./images/3_5_movedown.eps" format="EPS" scale="&imgscale;"/>
873     </imageobject>
874     <textobject> <phrase>Move Layer Down</phrase> </textobject>
875     </inlinemediaobject> lowers the selected layer one level.
876     </para>
877    
878     </listitem>
879     <listitem>
880     <para>
881     The Move Layer to Bottom tool
882     <inlinemediaobject>
883     <imageobject>
884     <imagedata fileref="../images/3_5_tobottom.png" format="PNG" scale="&imgscale;"/>
885     </imageobject>
886     <imageobject>
887     <imagedata fileref="./images/3_5_tobottom.eps" format="EPS" scale="&imgscale;"/>
888     </imageobject>
889     <textobject> <phrase>Move Layer to Bottom</phrase> </textobject>
890     </inlinemediaobject> lowers the selected layer to the bottom of the map.
891     </para>
892    
893     </listitem>
894     <listitem>
895     <para>
896     The Visible tool
897     <inlinemediaobject>
898     <imageobject>
899     <imagedata fileref="../images/3_5_visible.png" format="PNG" scale="&imgscale;"/>
900     </imageobject>
901     <imageobject>
902     <imagedata fileref="./images/3_5_visible.eps" format="EPS" scale="&imgscale;"/>
903     </imageobject>
904     <textobject> <phrase>Visible</phrase> </textobject>
905     </inlinemediaobject> shows the selected layer in the map if it was
906     hidden.
907     </para>
908    
909     </listitem>
910     <listitem>
911     <para>
912     The Invisible tool
913     <inlinemediaobject>
914     <imageobject>
915     <imagedata fileref="../images/3_5_invisible.png" format="PNG" scale="&imgscale;"/>
916     </imageobject>
917     <imageobject>
918     <imagedata fileref="./images/3_5_invisible.eps" format="EPS" scale="&imgscale;"/>
919     </imageobject>
920     <textobject> <phrase>Invisible</phrase> </textobject>
921     </inlinemediaobject> hides the selected layer in the map.
922     </para>
923    
924     </listitem>
925     <listitem>
926     <para>
927     The Properties tool
928     <inlinemediaobject>
929     <imageobject>
930     <imagedata fileref="../images/3_5_props.png" format="PNG" scale="&imgscale;"/>
931     </imageobject>
932     <imageobject>
933     <imagedata fileref="./images/3_5_props.eps" format="EPS" scale="&imgscale;"/>
934     </imageobject>
935     <textobject> <phrase>Properties</phrase> </textobject>
936     </inlinemediaobject> opens the layer's properties dialog box.
937     Double-clicking on a layer or a group of a layer will open the
938     properties dialog for that layer.
939     </para>
940     </listitem>
941     </itemizedlist>
942    
943     <para>
944     The most used layer related actions are also available from a
945     popup menu. It is raised when a layer is clicked with the right mouse
946     button.
947     </para>
948    
949     <para>
950     <figure>
951     <title>Layer Popup Menu</title>
952     <mediaobject>
953     <imageobject><imagedata fileref="../images/3_5_popup_menu.png" format="PNG" scale="&imgscale;"/></imageobject>
954     <imageobject><imagedata fileref="./images/3_5_popup_menu.eps" format="EPS" scale="&imgscale;"/></imageobject>
955     </mediaobject>
956     </figure>
957     </para>
958    
959     <para>
960     Along the bottom of the legend is the scalebar. The scalebar
961     will be available if there are any layers and the map has a
962     projection set.
963     </para>
964     </section>
965    
966     <section><title>Exporting</title>
967     <para>
968     Under Windows, maps can be exported in Enhanced Metafile format
969     (<varname>.wmf</varname>)
970     from
971     <menuchoice>
972     <guimenu>Map</guimenu>
973     <guimenuitem>Export</guimenuitem>
974     </menuchoice> for use in reports, presentations, or further
975     modification. The current map view, legend, and, if available,
976     scalebar are exported. Under other platforms this option is not
977     available. Clicking this menu item open a file selection dialog
978     that lets the user select a location to export the map.
979     </para>
980     </section>
981    
982     <section><title>Printing</title>
983     <para>
984     The map can be printed using
985     <menuchoice>
986     <guimenu>Map</guimenu>
987     <guimenuitem>Print</guimenuitem>
988     </menuchoice>. The current map view, legend, and, if available,
989     scalebar are printed. A standard printing dialog will open allowing
990     the user to configure the printer. This dialog will differ depending
991     on which platform Thuban is running.
992     </para>
993     </section>
994    
995     </chapter>
996    
997     <chapter><title>Layer Management</title>
998     <para>
999     </para>
1000    
1001     <section><title>Types of Layers</title>
1002     <para>
1003     There are three types of layers supported by Thuban: shape layers,
1004     database layers and
1005     image layers. Shape layers consist of vector based shapes with
1006     geo-referenced coordinates. There are three types of supported
1007     shapes: polygons, lines (arc), and points. Database layers are similar
1008     to shape layers but loaded from a database instead of the file system.
1009     Image layers can be any image
1010     file format supported by the Geo-spatial Data Abstraction Library
1011     (GDAL). The images must have geographic
1012     coordinate data either embedded within the file or in a separate
1013     file that is in the same directory as the image file. GeoTIFF files
1014     work very well with Thuban and were designed specifically to be image
1015     layers in GIS programs.
1016     </para>
1017     <para>
1018     All actions in the
1019     <menuchoice>
1020     <guimenu>Layer</guimenu>
1021     </menuchoice> menu act on the currently selected layer in the legend.
1022     </para>
1023     </section>
1024    
1025     <section><title>Properties</title>
1026     <para>
1027     To view the properties for a layer it must first be selected in the
1028     legend. The menu option
1029     <menuchoice>
1030     <guimenu>Layer</guimenu>
1031     <guimenuitem>Properties</guimenuitem>
1032     </menuchoice> opens a dialog that displays a layer's properties.
1033     All layers have a title which can be modified in the text field
1034     provided. The type of layer is also shows. If the type is a type
1035     of shape (polygon, arc, point) the classification table will be
1036     shown. Image layers have no other properties other than title
1037     and type.
1038     </para>
1039     <para>
1040     <figure>
1041     <title>Properties Window</title>
1042     <mediaobject>
1043     <imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
1044     <imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
1045     </mediaobject>
1046     </figure>
1047     </para>
1048     <para>
1049     <figure>
1050     <title>Properties Window</title>
1051     <mediaobject>
1052     <imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
1053     <imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
1054     </mediaobject>
1055     </figure>
1056     </para>
1057     </section>
1058    
1059     <section><title>Visibility</title>
1060     <para>
1061     Sometimes it is not desirable to view all layers at the same time.
1062     Some layers may take a long time to draw and so while navigating
1063     around the map the user may not want to wait for the map to redraw
1064     all the layers each time the map is changed. Each layer can be
1065     independently turned on or off using the
1066     <menuchoice>
1067     <guimenu>Layer</guimenu>
1068     <guimenuitem>Show</guimenuitem>
1069     </menuchoice>
1070     or
1071     <menuchoice>
1072     <guimenu>Layer</guimenu>
1073     <guimenuitem>Hide</guimenuitem>
1074     </menuchoice> options respectively.
1075     </para>
1076     </section>
1077    
1078     <section><title>Duplication</title>
1079     <para>
1080     Layers and all their properties, including classifications, can
1081     be duplicated using
1082     <menuchoice>
1083     <guimenu>Layer</guimenu>
1084     <guimenuitem>Duplicate</guimenuitem>
1085     </menuchoice>. Duplicating a layer is useful if the user wishes
1086     to model a layer in several different ways. Even though the layers
1087     overlap, by carefully selecting the shape properties it is possible
1088     to display several pieces of information at once. For example, one
1089     copy of a roads layer may be classified on a length property and
1090     another copy may be classified on a type property. If the length
1091     property was expressed with color and the type property expressed
1092     with line thickness then it would be possible to view both
1093     classifications by placing the type property copy over the
1094     length property copy.
1095     </para>
1096     </section>
1097    
1098     </chapter>
1099    
1100     <chapter><title>Layer Classifications</title>
1101     <para>
1102     A layer classification is a way of assigning drawing properties to
1103     groups of shapes based on attributes stored in the layer's table.
1104     Only layer's with shapes can have a classification; image layers
1105     cannot be classified.
1106     </para>
1107     <para>
1108     A classification consists of a number of groups, each group
1109     having a value or range of values to match against, and symbol
1110     properties which control how a shape is drawn on the map. The user
1111     selects which field in the table is used by the classification and
1112     when the map is drawn the value for that field for each shape is
1113     compared with each group's value. The properties of the first group
1114     to match are used to draw the shape. This allows the user to get a
1115     visual impression of not only how the data is laid out but also what
1116     kind of data lies where.
1117     </para>
1118     <para>
1119     A layer always has a classification. When a new layer is added to the
1120     map, a default classification is created with the DEFAULT group. This
1121     group cannot be removed but can be hidden (see below). Every shape in the
1122     layer, regardless of its attributes, will match this group if no other
1123     group matches.
1124     </para>
1125    
1126     <section><title>Editing Classifications</title>
1127     <para>
1128     A layer's classification can be modified under the properties dialog
1129     (<menuchoice>
1130     <guimenu>Layer</guimenu>
1131     <guimenuitem>Properties</guimenuitem>
1132     </menuchoice>). The layer's classification field can be set to None,
1133     which simply assigns a DEFAULT group to the classification. No new
1134     groups can be added to the classification if the field is None.
1135     The user must first select a field to classify on. New groups can
1136     be added to the classification with the <guibutton>Add</guibutton>
1137     button.
1138     </para>
1139     <para>
1140     To apply the changes to the map the user can click
1141     either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1142     <guibutton>Try</guibutton> will not close the dialog box, allowing
1143     the user to see how the classification changes the map.
1144     <guibutton>Revert</guibutton> will undo the last classification applied
1145     to the map. <guibutton>OK</guibutton> will commit the changes and
1146     close the dialog. The user will be unable to undo the changes.
1147     <guibutton>Close</guibutton> simply closes the dialog box. If any
1148     changes have not been applied with <guibutton>Try</guibutton> the
1149     changes will not be applied to the map.
1150     </para>
1151     <para>
1152     <figure>
1153     <title>Properties Window</title>
1154     <mediaobject>
1155     <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>
1156     <imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject>
1157     </mediaobject>
1158     </figure>
1159     </para>
1160     <para>
1161     The order of the groups in the classification is significant
1162     except for the DEFAULT group, which remains at the top. When shapes
1163     are matched against groups the matching begins at the first group
1164     after the DEFAULT group so that groups higher in the list will
1165     be checked first. Matching for a
1166     given shape will stop at the first group that matches. The user can
1167     use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton>
1168     to change the order of the groups. The DEFAULT group will always
1169     match a shape that hasn't matched another group.
1170     </para>
1171     <section><title>Visible</title>
1172     <para>
1173     The Visible column has check-boxes that determine whether a
1174     classification group will be displayed in the legend. This is
1175     useful if the user knows that the groups completely cover
1176     the data set and don't want the DEFAULT group to be displayed
1177     in the legend and on a printout.
1178     </para>
1179     </section>
1180     <section><title>Symbols</title>
1181     <para>
1182     Each type of shape has its own type of symbol. Thuban supports three
1183     types of shapes: polygons, lines, and points. Polygons and points
1184     have outline and fill color, while lines have only line color. Each
1185     group has associated symbol properties. To edit the symbol
1186     properties for a group the user can double click on the Symbol
1187     column or select a group and click the
1188     <guibutton>Edit Symbol</guibutton> button.
1189     </para>
1190     </section>
1191     <section><title>Value</title>
1192     <para>
1193     The Value column of the classification table is the value that will
1194     be matched when the map is being drawn. The type of data that can
1195     entered into this field depends on the type of data of the
1196     classification field.
1197     </para>
1198     <para>
1199     If the field is of type Text, anything entered
1200     into the field is valid. The text will be compared literally to the
1201     value of the shape attribute, including case sensitivity.
1202     If the type is Integer, then any valid integer may be entered. In
1203     addition, with special syntax, a range of values can be entered.
1204     A range from <varname>start</varname> to <varname>end</varname>
1205     inclusive is specified like this: <literal>[start;end]</literal>.
1206     The exclusive range is specified like this:
1207     <literal>]start;end[</literal>. Ranges can include infinity like
1208     this: <literal>[-oo;oo]</literal>. Field types can also be of type
1209     Decimal. They represent any rational number and can be used in
1210     ranges as well.
1211     </para>
1212     </section>
1213     <section><title>Label</title>
1214     <para>
1215     By default, the text that is displayed for a group in the legend
1216     is the value for that group. The label can substitute a more
1217     descriptive term in the legend.
1218     </para>
1219     </section>
1220     </section>
1221    
1222     <section><title>Generating Classes</title>
1223     <para>
1224     <figure>
1225     <title>Generate Class</title>
1226     <mediaobject>
1227     <imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject>
1228     <imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject>
1229     </mediaobject>
1230     </figure>
1231     </para>
1232     <para>
1233     Creating a classification by hand can be tedious.
1234     Thuban, therefore, provides a means of generating an entire
1235     classification at once while still giving the user control over
1236     how it appears. Clicking <guibutton>Generate Class</guibutton>
1237     opens the <varname>Generate Classification</varname> dialog.
1238     Under the <varname>Generate</varname> pull down there are at most
1239     three different ways to generate classifications:
1240     Unique Values, Uniform Distribution, and Quantiles. Some options
1241     may not be available if the data type for the field does not
1242     support them. For instance, <varname>Uniform Distribution</varname>
1243     doesn't make sense for a Text field.
1244     </para>
1245     <para>
1246     For every way of generating a classification, a color scheme must
1247     be selected. Thuban provides several different color schemes that
1248     affect how the group properties change over the classification.
1249     It may be desirable that only certain properties change over the
1250     classification. If the shape type is a polygon or a point then
1251     the <guibutton>Fix Border Color</guibutton> option will be available.
1252     This allows the user to select a border color for all classification
1253     groups.
1254     It is also possible to create a custom color scheme. Selecting
1255     this option will display two symbols: the one of the left has the
1256     properties of the first group and the one on the right has the
1257     properties of the last group. Thuban will interpolate between these
1258     two properties to generate the other groups.
1259     <figure>
1260     <title>Custom Color Scheme</title>
1261     <mediaobject>
1262     <imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject>
1263     <imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject>
1264     </mediaobject>
1265     </figure>
1266     </para>
1267     <para>
1268     The Unique Values option lets the user select specific values that
1269     appear in the table. Clicking <guibutton>Retrieve From Table</guibutton>
1270     searches the table for all unique values and displays them in the
1271     list on the left. Items can be selected and moved to the list on the
1272     right. Each list can be sorted or reversed for easier searching.
1273     The classification that is generated will be in the same order as
1274     the list on the right.
1275     <figure>
1276     <title>Unique Values</title>
1277     <mediaobject>
1278     <imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject>
1279     <imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject>
1280     </mediaobject>
1281     </figure>
1282     </para>
1283     <para>
1284     The Uniform Distribution option creates a user specified number of
1285     groups of ranges such that each range covers equal intervals. The
1286     minimum and maximum values can automatically be retrieved from the
1287     table by clicking <guibutton>Retrieve From Table</guibutton>. The
1288     stepping is how large each interval is. Adjusting this value will
1289     automatically recalculate how many groups is appropriate.
1290     <figure>
1291     <title>Uniform Distribution</title>
1292     <mediaobject>
1293     <imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject>
1294     <imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject>
1295     </mediaobject>
1296     </figure>
1297     </para>
1298     <para>
1299     The Quantiles option generates ranges based on the number of items
1300     in the table. For example, by specifying five groups Thuban will
1301     generate five groups with appropriate ranges such that 20% of the table
1302     data is in each group. If it is impossible to generate exact
1303     groupings, Thuban will issue a warning but allow the user to continue.
1304     <figure>
1305     <title>Quantiles</title>
1306     <mediaobject>
1307     <imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject>
1308     <imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject>
1309     </mediaobject>
1310     </figure>
1311     </para>
1312     </section>
1313     </chapter>
1314    
1315     <chapter><title>Projection Management</title>
1316     <para>
1317     Projections control how the geographic data is displayed on the screen.
1318     If multiple layers are loaded into Thuban where the geographic data
1319     is in a different projection system, then the user must specify a
1320     projection for each layer. The user must also tell Thuban which
1321     projection the map is in. This can be the same as the layers or a different
1322     projection in which case the layers are reprojected into that space.
1323     The map projection can be set using
1324     <menuchoice>
1325     <guimenu>Map</guimenu>
1326     <guimenuitem>Projection</guimenuitem>
1327     </menuchoice> and the layer projection can be set using
1328     <menuchoice>
1329     <guimenu>Layer</guimenu>
1330     <guimenuitem>Projection</guimenuitem>
1331     </menuchoice>.
1332     <figure>
1333     <title>Projection Window</title>
1334     <mediaobject>
1335     <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>
1336     <imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject>
1337     </mediaobject>
1338     </figure>
1339     </para>
1340     <para>
1341     Thuban is distributed with a sample collection of projections and the
1342     set of coordinate systems as used by the EPSG
1343     (European Petroleum Survey Group). This quite large set is only displayed
1344     if activated by the according checkbox. The set falls into two parts:
1345     deprecated lists all projections which are no longer part of the
1346     EPSG data base.
1347     </para>
1348     <para>
1349     The
1350     user can create new projections and make them available to all
1351     future Thuban sessions. They may also be exported and imported so
1352     that custom projections can be distributed.
1353     </para>
1354     <section><title>Selecting a Projection</title>
1355     <para>
1356     The available projections are listed on the left. If the layer
1357     or map already has a projection it will initially be highlighted
1358     and will end with <varname>(current)</varname>. Selecting
1359     <varname>&lt;None&gt;</varname> will cause Thuban to use the data as
1360     it appears in the source file and will not use a projection.
1361     </para>
1362     </section>
1363     <section><title>Editing a Projection</title>
1364     <para>
1365     Whenever a projection is selected from the list its properties
1366     are displayed on the right. These properties can be changed
1367     and the changes saved to the selected projection using
1368     <guibutton>Update</guibutton>. Only a projection that comes
1369     from a file can be updated, so if the current layer's projection
1370     is selected, <guibutton>Update</guibutton> will be disabled.
1371     <guibutton>Add to List</guibutton> adds the projection to the
1372     list of available projections as a new entry, and thus makes it
1373     available to future Thuban sessions. Clicking <guibutton>New</guibutton>
1374     will create an entirely new, empty projection. The
1375     <guibutton>Remove</guibutton> button will permanently remove a
1376     projection from the list of available projections.
1377     </para>
1378     <para>
1379     To apply the selected projection to the map the user can click
1380     either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1381     <guibutton>Try</guibutton> will not close the dialog box, allowing
1382     the user to see how the projeciton changes the map.
1383     <guibutton>Revert</guibutton> will undo the last projection applied
1384     to the map. <guibutton>OK</guibutton> will commit the changes and
1385     close the dialog. The user will be unable to undo the changes.
1386     <guibutton>Close</guibutton> simply closes the dialog box. If no
1387     selection has been applied with <guibutton>Try</guibutton> the
1388     selection will not be applied to the map.
1389     </para>
1390     </section>
1391     <section><title>Importing/Exporting Projections</title>
1392     <para>
1393     The projections that appear in the list of available projections
1394     can be exported to another file that the user chooses. By selecting
1395     one or more projections and clicking <guibutton>Export</guibutton>
1396     the user will be able to select a file in which to store those
1397     projections.
1398     The file can then be distributed to other Thuban users. To import
1399     a projection file the user can click <guibutton>Import</guibutton>.
1400     The imported projections are added to the list and are then available
1401     to the current session and any future Thuban sessions.
1402     </para>
1403     </section>
1404     </chapter>
1405    
1406     <chapter><title>Table Management</title>
1407     <para>
1408     Thuban distinguishes two different types of tables: Attribute tables
1409     (which belong to a layer) and normal data tables. Both provide
1410     the same general functionality with the difference that actions on an
1411     attribute table might also effect the map display.
1412     </para>
1413    
1414     <section><title>Table View</title>
1415     <para>
1416     <figure>
1417     <title>Table View</title>
1418     <mediaobject>
1419     <imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject>
1420     <imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject>
1421     </mediaobject>
1422     </figure>
1423     </para>
1424     <para>
1425     Thuban provides a standard dialog to display table contents, the
1426     Table View. The view has five sections: The title, selections,
1427     the table grid, export functions, and the status bar.
1428     </para>
1429     <para>
1430     The title bar identifies the table with its name.
1431     </para>
1432     <para>
1433     The selections box let the user perform simple analysis on the data
1434     based on comparisons: The first choice must be a field identifier of
1435     the table, the second choice determines the type of comparison. The
1436     third choice can be either a specific value (interpreted as numerical
1437     or string depending on the type of the first field) or a second field
1438     identifier. Thus you can perform analysis like selecting all
1439     records where <literal>population > 10000</literal> or
1440     <literal>cars_per_inhabitant < bikes_per_inhabitant</literal>
1441     (note that the field names are only explanatory, the dBase files
1442     allow only 11 character field names).
1443    
1444     Selections can be combined either by applying a selection only on
1445     a previously selected set of records or by adding the results of a
1446     selection to a previous set. The default is that a selection replaces
1447     earlier results.
1448     </para>
1449     <para>
1450     The table grid shows the contents of the table (one record per row),
1451     with highlighted selection results. Columns and rows can be resized.
1452     </para>
1453     <para>
1454     The contents of a table can be exported into a file, either dBase
1455     format (DBF) or comma separated values (CSV). The
1456     <guibutton>Export</guibutton> button
1457     raises a file dialog to specify a path and file name, the export type
1458     is determined by the file extension (either .dbf or .csv).
1459    
1460     The <guibutton>Export Selection</guibutton> button works similarly
1461     but exports only the selected records.
1462    
1463     The <guibutton>Close</guibutton> button closes the table view window.
1464     This is different from the menu item
1465     <menuchoice>
1466     <guimenu>Table</guimenu>
1467     <guimenuitem>Close</guimenuitem>
1468     </menuchoice> which unloads the table from Thuban.
1469     </para>
1470     <para>
1471     The status bar displays some statistics about the table and optional
1472     selection results.
1473     </para>
1474     </section>
1475    
1476     <section><title>General Functionality (Menu Table)</title>
1477     <para>
1478     The general functions affect all tables open in Thuban. Attribute
1479     tables are considered here as normal data tables (with the exception
1480     that they cannot be closed).
1481     </para>
1482     <section><title>Open</title>
1483     <para>
1484     The
1485     <menuchoice>
1486     <guimenu>Table</guimenu>
1487     <guimenuitem>Open</guimenuitem>
1488     </menuchoice>
1489     item raises a file dialog to let you select a
1490     dBase file from the file system to be loaded into Thuban read-only.
1491     On <guibutton>OK</guibutton> the selected file is loaded and a
1492     table view is opened.
1493     </para>
1494     </section>
1495    
1496     <section><title>Close</title>
1497     <para>
1498     The
1499     <menuchoice>
1500     <guimenu>Table</guimenu>
1501     <guimenuitem>Close</guimenuitem>
1502     </menuchoice>
1503     item raises a dialog listing the currently open
1504     data tables
1505     (loaded via
1506     <menuchoice>
1507     <guimenu>Table</guimenu>
1508     <guimenuitem>Open</guimenuitem>
1509     </menuchoice>). Selected tables are dereferenced on confirmation.
1510     Since tables are opened read-only the contents of the tables are
1511     not affected.
1512    
1513     Any open views of the tables are closed as well.
1514    
1515     Tables used in a join cannot be closed.
1516     </para>
1517     </section>
1518    
1519     <section><title>Rename</title>
1520     <para>
1521     <menuchoice>
1522     <guimenu>Table</guimenu>
1523     <guimenuitem>Rename</guimenuitem>
1524     </menuchoice> changes the table title.
1525     </para>
1526     </section>
1527    
1528     <section><title>Show</title>
1529     <para>
1530     The
1531     <menuchoice>
1532     <guimenu>Table</guimenu>
1533     <guimenuitem>Show</guimenuitem>
1534     </menuchoice>
1535     item raises a list of available tables (explicitly
1536     loaded, attribute tables, results of a join). Selected tables are
1537     show in tables views on <guibutton>OK</guibutton>.
1538     </para>
1539     </section>
1540    
1541     <section><title>Join</title>
1542     <para>
1543     <figure>
1544     <title>Join Tables</title>
1545     <mediaobject>
1546     <imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject>
1547     <imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject>
1548     </mediaobject>
1549     </figure>
1550     </para>
1551     <para>
1552     The
1553     <menuchoice>
1554     <guimenu>Table</guimenu>
1555     <guimenuitem>Join</guimenuitem>
1556     </menuchoice>
1557     item raises a dialog to specify the two tables to be
1558     joined. The join results in a new table named 'Join of "left table"
1559     and "right table"'.
1560    
1561     The dialog lets you select the two tables to be joined and the two
1562     fields the join has to be performed on. By default, the new
1563     table contains only those records which are matched by the join.
1564    
1565     If you want to preserve the records of the left table you can
1566     perform an outer join. The fields from the right table for records
1567     not matched by the join are filled with <varname>None</varname> in
1568     this case.
1569     </para>
1570     </section>
1571    
1572     </section>
1573     <section><title>Attribute Tables</title>
1574     <para>
1575     To clearly separate between both types of tables (data and
1576     attribute), Thuban provides functionality regarding the attribute
1577     tables under the <menuchoice><guimenu>Layer</guimenu></menuchoice> menu.
1578     </para>
1579    
1580     <section><title>Show Table</title>
1581     <para>
1582     <menuchoice>
1583     <guimenu>Layer</guimenu>
1584     <guimenuitem>Show Table</guimenuitem>
1585     </menuchoice>
1586     opens the attribute table of the currently active layer in a table
1587     view.
1588    
1589     In addition to the functionality described above selections
1590     affect also the map display: objects related to selected records
1591     are highlighted.
1592     </para>
1593     </section>
1594    
1595     <section><title>Join Table</title>
1596     <para>
1597     Unlike the join described above, the join does not result in a
1598     new table. The attribute table of the currently active layer is the
1599     left table and other tables are joined to this table. The results of
1600     the join are available for classification.
1601    
1602     As a consequence, the join cannot result in fewer
1603     records than the source attribute table. The user is warned if the
1604     right table does not fulfill this constraint. An outer join must be
1605     used in such cases.
1606     </para>
1607     </section>
1608    
1609     <section><title>Unjoin Table</title>
1610     <para>
1611     As said above, a normal table cannot be closed while it is still
1612     used in a join. While the joined table resulting from a join of
1613     normal tables can be simply closed (and thereby dereferencing
1614     the source tables), this is not possible for attribute tables.
1615    
1616     Hence joins on attribute tables must be solved explicitly. This is
1617     what the
1618     <menuchoice>
1619     <guimenu>Layer</guimenu>
1620     <guimenuitem>Unjoin Table</guimenuitem>
1621     </menuchoice>
1622     item is used for: The last join for the currently
1623     active layer is solved.
1624     </para>
1625     </section>
1626     </section>
1627     </chapter>
1628    
1629     <chapter><title>Extensions</title>
1630     <para>
1631     Thuban is designed to be extensible. The term Extension is used as a
1632     general term for anything that extends Thuban.
1633     This chapter introduces into some oppportunities how to add and
1634     handle extra functionality developed by your own or third parties.
1635     </para>
1636    
1637     <section><title>Add personal extensions via thubanstart.py</title>
1638     <para>
1639     After Thuban has been started for the first time, a directory
1640     .thuban is created within your home directory.
1641     There you can add a file thubanstart.py which will be imported
1642     by Thuban at start-up. It is recommended to add only import-statements
1643     to this file to keep the actual code of extensions separate.
1644     </para>
1645     <para>
1646     The modules to import must either be found through the environment
1647     variable PYTHONPATH or directly be placed into the .thuban-directory.
1648     </para>
1649     <para>
1650     As an example, copy the file examples/simple_extensions/hello_world.py
1651     of the Thuban source code into the .thuban-directory of your home
1652     directory. Now add add the statement import hello_world to the
1653     file thubanstart.py and run Thuban. You will notice an additional
1654     menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where
1655     the new item for the Hello-World extension is placed - select it
1656     to see the Hello-World message.
1657     </para>
1658     </section>
1659    
1660     <section><title>Extensions included in Thuban package</title>
1661     <para>
1662     The extensions described in this section are part of the
1663     Thuban package, but not activated by default.
1664     You will find them in the Thuban installation directory
1665     under <literal>Extensions/</literal>. Activate them as personal
1666     extensions via PYTHONPATH as described in the previous section.
1667     Stable extensions will appear under the menu
1668     <menuchoice><guimenu>Extensions</guimenu></menuchoice> and
1669     extensions which are in experimental state and therefore
1670     not fully functional under
1671     <menuchoice><guimenu>Experimental</guimenu></menuchoice>.
1672     </para>
1673    
1674     <section><title>Stable extensions</title>
1675     <para>
1676     These extensions provide extra-functionality to Thuban
1677     that has not (yet) been integrated in the main application.
1678     They are considered to be free of bugs, but may be
1679     further polished with helpful user interactions.
1680     </para>
1681 bernhard 2482 <section><title>gns2shp</title>
1682 jan 2309 <para>
1683     This tool converts data of the Geospatial Names Server
1684     (GNS, see <ulink url="http://www.nima.mil/gns"/>)
1685     into Shapefile format.
1686     The above web-site offer to download named places
1687     information grouped by countries for all of the world
1688     except USA for which other data are provided.
1689     </para>
1690     <para>
1691     If you download and unpack a package, you will have
1692     a text-file with suffix .txt.
1693     Selecting such a file via gns2shp will create the
1694     corresponding Shapefile with the same basename and
1695     place it in the same direcory. Afterwards it
1696     is automatically loaded into Thuban.
1697     The Shapefile will not automatically be delete afterwards.
1698     </para>
1699     <para>
1700     The gns2shp.py module can also be executed on the
1701     command line for batch processing purposes.
1702     </para>
1703     <para>
1704     A sample (<literal>ls.txt</literal> for Liechtenstein)
1705     is included in the directory
1706     <literal>Extensions/gns2shp/test</literal>.
1707     </para>
1708 bernhard 2482 </section>
1709     <section><title>SVG Export</title>
1710     <para>
1711     Map and legend can be exported separately in the
1712     Thuban-Map-SVG format.
1713     You get files that comply with
1714     the Scalable Vector Graphics (SVG) 1.1 Specification
1715     and can be read by many vector drawing applications.
1716     </para>
1717     <para>
1718     Goal of svgexport is to provide
1719     the start of a printing pipeline for Thuban.
1720     For this purpose the written Thuban-Map-SVG files
1721     contain information that can be used in postprocessing.
1722     Typically a general vector drawing application is
1723     more powerful then a geographic information viewer;
1724     e.g. having much fancier symbols and fonts.
1725     Also users benefit much more when learning to use a
1726     more general application they can also use for other
1727     tasks. So the charming idea is to enable
1728     the drawing application to postprocess a Thuban maps.
1729     So thee xtra information in the format will make it
1730     possible to export from Thuban and if a few geoobjects
1731     change, and keep the general layout and style
1732     of the full map in the vector drawing appplication.
1733     </para>
1734     <para>
1735     Markus Rechtien has developed a prototype of this
1736     printing pipline as his Diplom thetis, showing
1737     the feasability of Bernhard Reiter's concept.
1738     Scripts exist for the drawing application Skencil
1739     (<ulink url="http://www.skencil.org"/>).
1740     </para>
1741     <para>
1742     Technical notes: the names of the layers are used
1743     as base for ids within the SVG format.
1744     If you try to export with two layers having
1745     the same name, you will get a name clash error.
1746     Just change one of the layer names and try again.
1747     </para>
1748     </section>
1749 jan 2309 </section>
1750     <section><title>Experimental extensions</title>
1751     <para>
1752     All all of these functions have to be handled with care,
1753     since they are neither complete nor well tested.
1754     They are to be seen as a proof-of-concept and may
1755     additionally in some cases of practical help.
1756     </para>
1757     <para>
1758     Any interest on further improvement of these extensions
1759     should be communicated towards the developer and user
1760     community.
1761     </para>
1762    
1763     <section><title>importAPR</title>
1764     <para>
1765     This command offer to load an ESRI® ArcView® project
1766     file (suffix .apr) and convert it for use within Thuban.
1767     After selecting a apr-file to load, a list
1768     will be presented that offers to select one of the views
1769     of the apr-file, provided there is more than one.
1770     Furthermore, the Session Info-Tree is extended with
1771     a complete representation of the parsed apr-file.
1772     </para>
1773     <para>
1774     The legend of Thuban does not yet cover all of the elements as
1775     supported by the legend of ArcView®. Therefore, the Thuban
1776     map will look different. Furthermore, the apr-format is
1777     a proprietary format, not openly documented.
1778     Therefore, the interpretation is
1779     partly based on reverse engeneering and good guessing.
1780     </para>
1781     <para>
1782     The file-paths within the apr-file may not fit and potentially
1783     are subject to fix in the apr-file. You can do this
1784     applying any text editor. The paths are either absolute
1785     or relative from where Thuban has been started.
1786     </para>
1787     <para>
1788     A sample for the Iceland data is included as
1789     <literal>Extensions/importAPR/samples/iceland.apr</literal>.
1790     The file-paths are relative from the Thuban main directory.
1791     </para>
1792     </section>
1793     </section>
1794     </section>
1795    
1796     <section><title>Writing simple extensions</title>
1797     <para>
1798     Writing an extension for Thuban basically means to
1799     implement the extra functionality in Python with all of the
1800     Thuban classes, methods and variables available.
1801     </para>
1802     <para>
1803     All classes and their methods are documented in the source code
1804     (see their doc-strings). Here is an example from
1805     Thuban/Model/layer.py that describes some of the methods
1806     of a Layer object:
1807     </para>
1808     <programlisting>
1809     <![CDATA[
1810     class BaseLayer(TitledObject, Modifiable):
1811    
1812     """Base class for the layers."""
1813    
1814     def __init__(self, title, visible = True, projection = None):
1815     """Initialize the layer.
1816    
1817     title -- the title
1818     visible -- boolean. If true the layer is visible.
1819     """
1820     TitledObject.__init__(self, title)
1821     Modifiable.__init__(self)
1822     self.visible = visible
1823     self.projection = projection
1824    
1825     def Visible(self):
1826     """Return true if layer is visible"""
1827     return self.visible
1828    
1829     def SetVisible(self, visible):
1830     """Set the layer's visibility."""
1831     self.visible = visible
1832     self.issue(LAYER_VISIBILITY_CHANGED, self)
1833    
1834     def HasClassification(self):
1835     """Determine if this layer support classifications."""
1836     ...
1837     ]]>
1838     </programlisting>
1839     <para>
1840     This example intends to give you an impression of the
1841     source-code-level documentation.
1842     You have to make yourself familiar with
1843     the Python programming language to understand some special
1844     code elements.
1845     </para>
1846     <section><title>hello_world.py</title>
1847     <para>
1848     Traditionally, the first example should welcome the world.
1849     Most of the code handles the frame for integrating a menu
1850     item into Thuban while the actual raising of a message
1851     is done in a single line.
1852     </para>
1853     <programlisting>
1854     <![CDATA[
1855     # Copyright (C) 2003 by Intevation GmbH
1856     # Authors:
1857     # Jan-Oliver Wagner <[email protected]>
1858     #
1859     # This program is free software under the GPL (>=v2)
1860     # Read the file COPYING coming with Thuban for details.
1861    
1862     """
1863     Extend Thuban with a sample Hello World to demonstrate simple
1864     extensions.
1865     """
1866    
1867     __version__ = '$Revision$'
1868    
1869     # use _() already now for all strings that may later be translated
1870     from Thuban import _
1871    
1872     # Thuban has named commands which can be registered in the central
1873     # instance registry.
1874     from Thuban.UI.command import registry, Command
1875    
1876     # The instance of the main menu of the Thuban application
1877     # See Thuban/UI/menu.py for the API of the Menu class
1878     from Thuban.UI.mainwindow import main_menu
1879    
1880     def hello_world_dialog(context):
1881     """Just raise a simple dialog to greet the world.
1882    
1883     context -- The Thuban context.
1884     """
1885     context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!'))
1886    
1887    
1888     # create a new command and register it
1889     registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog,
1890     helptext = _('Welcome everyone on this planet')))
1891    
1892     # find the extensions menu (create it anew if not found)
1893     extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
1894    
1895     # finally bind the new command with an entry in the extensions menu
1896     extensions_menu.InsertItem('hello_world')
1897     ]]>
1898     </programlisting>
1899     </section>
1900     <section><title>Registering a Command</title>
1901     <para>
1902     Mainly, our new function has to be registered to the Thuban
1903     framework in order to connect it to the menu. A registered
1904     command can also be connected to e.g. a toolbar button.
1905     </para>
1906     <para>
1907     The instances and classes for this are imported at the beginning.
1908     Any code not inside a method or class is directly executed when
1909     the source-code module is imported. Therefore, the second
1910     part of this example consist of the plain statements to create a new
1911     Command and to add it to the menu.
1912     </para>
1913     <para>
1914     By convention, it looks for a menu registered as ``extensions'' to
1915     insert the new command. If it does not exist yet, it gets created.
1916     It is advisable to copy this code for any of your extensions.
1917     </para>
1918     </section>
1919     <section><title>The Thuban context</title>
1920     <para>
1921     A registered command that is called, always receives the
1922     Thuban context. This instance provides our method with
1923     hook references to all important components of the Thuban
1924     application.
1925     </para>
1926     <para>
1927     In the example hello_world.py, our function uses the
1928     mainwindow component which offers a method to raise a
1929     message dialog. In total there are three hooks:
1930     <itemizedlist>
1931     <listitem>
1932     <para>application:
1933     This object is the instance of the Thuban Application class.
1934     Except maybe for loading or savinf sessions, you will not
1935     need this object for a simple extension.
1936     See Thuban/UI/application.py for the API.
1937     </para>
1938     </listitem>
1939     <listitem>
1940     <para>session:
1941     The instance of the current session. It manages the sessions'
1942     map and tables. You can set and remove the map or tables.
1943     In may also get the map object. However, you should know that
1944     internally it is already prepared to handle many maps.
1945     Therfore, currently you would always receive a list with exactlty
1946     one element. In the future, if there are more than one map,
1947     you will not know which one is the currently display one and
1948     therefore you should use the mainwindow as hook to find
1949     the currently displayed map.
1950     See Thuban/Model/session.py for the API.
1951     </para>
1952     </listitem>
1953     <listitem>
1954     <para>
1955     mainwindow: The mainwindow object is central to manage various
1956     GUI things such as the Legend sub-window. Most notably,
1957     you get access to the canvas which is the window part where
1958     the map is drawn. The canvas knows, which map it currently
1959     draws and therefore you get the current map via
1960     context.mainwindow.canvas.Map().
1961     See Thuban/UI/mainwindow.py for the API.
1962     </para>
1963     </listitem>
1964     </itemizedlist>
1965     </para>
1966     </section>
1967     </section>
1968     </chapter>
1969    
1970     <chapter><title>Trouble Shooting</title>
1971     <para>
1972     Here are a few problems that users have encountered when first using Thuban.
1973     </para>
1974     <para>
1975    
1976     <itemizedlist>
1977     <listitem>
1978     <para>After adding two or more layers nothing is drawn in the map window.
1979     </para>
1980     <para>
1981     This is probably because the layers have different projections. Projections
1982     must be set on all layers and on the map itself if the layers' projections
1983     are different.
1984     </para>
1985     </listitem>
1986    
1987     <listitem>
1988     <para>Thuban crashes on startup with the error
1989     <literal>NameError: global name 'False' is not defined</literal>.
1990     </para>
1991     <para>
1992     <varname>True</varname> and <varname>False</varname> were only introduced
1993     in Python 2.2.1. Thuban depends on at least Python 2.2.1.
1994     </para>
1995     </listitem>
1996    
1997     <listitem>
1998     <para>After compiling Thuban, Thuban crashes with an error similar to
1999     <literal>
2000     ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0
2001     </literal>
2002     </para>
2003     <para>
2004     Thuban depends on the wxWindows library. If Thuban is compiled with an
2005     incompatible version of the compiler than wxWindows was compiled with
2006     this error may occur. Try compiling with a different version of the
2007     compiler.
2008     </para>
2009     </listitem>
2010     </itemizedlist>
2011     </para>
2012     <para>
2013     If an error occurs Thuban will display a dialog indicating the error
2014     before closing. The text should be copied and reported to the
2015     <ulink url="http://thuban.intevation.org/bugtracker.html">
2016     Intevation bugtracker
2017     </ulink>.
2018     More information about the system is available from
2019     <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.
2020     This should also be included in the bug report.
2021     <figure>
2022     <title>Error Dialog</title>
2023     <mediaobject>
2024     <imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject>
2025     <imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject>
2026     </mediaobject>
2027     </figure>
2028     </para>
2029    
2030     </chapter>
2031    
2032     <appendix><title>Supported Data Sources</title>
2033     <para>
2034     </para>
2035     <variablelist>
2036     <varlistentry>
2037     <term>Shapefile</term>
2038     <listitem>
2039     <para>
2040     The Shapefile format has become a standard format for saving
2041     geographic vector information. It supports polygons, lines, and
2042     points.
2043    
2044     <ulink url="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf">
2045     Technical Specification.
2046     </ulink>
2047     </para>
2048     </listitem>
2049     </varlistentry>
2050    
2051     <varlistentry>
2052     <term>dBase file</term>
2053     <listitem>
2054     <para>
2055     dBase files are used to store the attributes for each layer. This
2056     is closely associated with the Shapefile format. For detailed
2057     specifications on the correct format of a dBase file used with
2058     Thuban please see the Technical Specification for the Shapefile
2059     format above.
2060     </para>
2061     </listitem>
2062     </varlistentry>
2063    
2064     <varlistentry>
2065     <term>PostGIS</term>
2066     <listitem>
2067     <para>
2068     PostGIS adds support for geographic objects to the PostgreSQL
2069     object-relational database. Different layer types (as for Shapefiles)
2070     are supported. <ulink url="http://postgis.refractions.net">PostGIS
2071     Homepage</ulink>
2072     </para>
2073     </listitem>
2074     </varlistentry>
2075    
2076     <varlistentry>
2077     <term>Raster files</term>
2078     <listitem>
2079     <para>
2080     Binding the GDAL library Thuban supports numerous raster file formats,
2081     see <ulink url="http://www.remotesensing.org/gdal/formats_list.html">
2082     GDAL format list</ulink> for details.</para>
2083    
2084     <para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis>
2085     format: Raster maps are provided as TIFF images, with an additional
2086     "world file" storing the geographic reference (usually with an
2087     extension ".tfw").
2088     </para>
2089     </listitem>
2090     </varlistentry>
2091    
2092     </variablelist>
2093     </appendix>
2094    
2095     <appendix><title>Working with PostGIS</title>
2096     <para>
2097     This section focusses on the use of PostGIS in the Thuban framework. For
2098     installation and maintenance of spatial databases we refer to the
2099     <ulink url="http://postgis.refractions.net">PostGIS Homepage</ulink>.
2100     The Thuban PostGIS support requires the
2101     <ulink url="http://initd.org/software/psycopg">psycopg module</ulink>.
2102     </para>
2103    
2104     <para>
2105     Working with PostGIS Databases is seperated into two steps:
2106     <itemizedlist>
2107     <listitem><para>Opening a Database Connection</para></listitem>
2108     <listitem><para>Loading a Data Layer</para></listitem>
2109     </itemizedlist>
2110     </para>
2111     <section><title>Opening a Database Connection</title>
2112     <para>
2113     Before a data layer can be loaded from a PostGIS database a
2114     connection with the database has to be established.
2115     <menuchoice>
2116     <guimenu>Session</guimenu>
2117     <guimenuitem>Database Connections ...</guimenuitem>
2118     </menuchoice> opens a dialog for database connection
2119     management. In the dialog new connections can be added
2120     and existing ones can be removed. Removing a database
2121     connection is not possible if the map still displays a
2122     layer provided by this database connection.
2123     </para>
2124     <figure>
2125     <title>Database Management Dialog</title>
2126     <mediaobject>
2127     <imageobject><imagedata fileref="../images/app_postgis_db_management.png" format="PNG" scale="&imgscale;"/></imageobject>
2128     <imageobject><imagedata fileref="./images/app_postgis_db_management.eps" format="EPS" scale="&imgscale;"/></imageobject>
2129     </mediaobject>
2130     </figure>
2131    
2132     <para>
2133     To add a new database connection to the session a dialog is
2134     opened to specify the relevant connection data. Enter all
2135     data relevant for your connection. If the connection fails
2136     the dialog remains open and provides some hints on the failure.
2137     </para>
2138     <figure>
2139     <title>Add Database Dialog</title>
2140     <mediaobject>
2141     <imageobject><imagedata fileref="../images/app_postgis_db_add.png" format="PNG" scale="&imgscale;"/></imageobject>
2142     <imageobject><imagedata fileref="./images/app_postgis_db_add.eps" format="EPS" scale="&imgscale;"/></imageobject>
2143     </mediaobject>
2144     </figure>
2145    
2146     <para>
2147     It is important to note that information on database connections are
2148     also stored with the session. Passwords are NOT stored. If you load a
2149     session with database connections you are asked to enter these
2150     passwords again where required.
2151     </para>
2152    
2153     </section>
2154    
2155     <section><title>Loading a Data Layer</title>
2156     <para>
2157     Data layers as part of a map are loaded with the
2158     <menuchoice>
2159     <guimenu>Map</guimenu>
2160     <guimenuitem>Add Database Layer ...</guimenuitem>
2161     </menuchoice> menu item. A dialog is raised displaying two choice
2162     lists. In the left list all connected databases are shown.
2163     Highlighting
2164     one of these and issuing a retrieval results in a list of available
2165     layer tables from that database. After selection of a
2166     layer the dialog is closed.
2167     </para>
2168     <figure>
2169     <title>Add Database Dialog</title>
2170     <mediaobject>
2171     <imageobject><imagedata fileref="../images/app_postgis_add_layer.png" format="PNG" scale="&imgscale;"/></imageobject>
2172     <imageobject><imagedata fileref="./images/app_postgis_add_layer.eps" format="EPS" scale="&imgscale;"/></imageobject>
2173     </mediaobject>
2174     </figure>
2175    
2176     </section>
2177    
2178     </appendix>
2179    
2180     <appendix><title>Supported Projections</title>
2181     <para>
2182     The following types of projections are directly support by
2183     Thuban. The specific values for each are provided by the user
2184     to create custom projections. Thuban comes with predefined
2185     projections which are available through the Projections dialog.
2186     </para>
2187     <itemizedlist>
2188     <listitem>
2189     <para>Geographic</para>
2190     <itemizedlist>
2191     <listitem><para><literal>Ellipsoid</literal></para></listitem>
2192     <listitem><para>
2193     <literal>Source Data</literal>: either Degrees or Radians
2194     </para></listitem>
2195     </itemizedlist>
2196     </listitem>
2197     <listitem>
2198     <para>Lambert Conic Conformal</para>
2199     <itemizedlist>
2200     <listitem><para><literal>Ellipsoid</literal></para></listitem>
2201     <listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem>
2202     <listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem>
2203     <listitem><para><literal>Central Meridian</literal></para></listitem>
2204     <listitem><para><literal>Latitude of Origin</literal></para></listitem>
2205     <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
2206     <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
2207     </itemizedlist>
2208     </listitem>
2209     <listitem>
2210     <para>Transverse Mercator</para>
2211     <itemizedlist>
2212     <listitem><para><literal>Ellipsoid</literal></para></listitem>
2213     <listitem><para><literal>Latitude</literal>of origin</para></listitem>
2214     <listitem><para><literal>Longitude</literal>at central meridian</para></listitem>
2215     <listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem>
2216     <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
2217     <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
2218     </itemizedlist>
2219     </listitem>
2220     <listitem>
2221     <para>Universal Transverse Mercator</para>
2222     <itemizedlist>
2223     <listitem><para><literal>Ellipsoid</literal></para></listitem>
2224     <listitem><para><literal>Zone</literal>
2225     (can be guessed appling the Propose button)</para></listitem>
2226     <listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem>
2227     </itemizedlist>
2228     </listitem>
2229     </itemizedlist>
2230    
2231     <para>
2232     Thuban comes with a sample set of map projections for various
2233     European countries. Apart from the basic projection they differ
2234     especially in their parameterization:
2235     </para>
2236     <itemizedlist>
2237     <listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para>
2238     </listitem>
2239    
2240     <listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para>
2241     </listitem>
2242    
2243     <listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)
2244     </para>
2245     </listitem>
2246    
2247     <listitem><para>Reseau Geodesique Francaise
2248     (France, Lambert Conic Conformal)</para>
2249     </listitem>
2250    
2251     <listitem><para>UK National Grid (United Kingdom, Transverse Mercartor)
2252     </para>
2253     </listitem>
2254     </itemizedlist>
2255    
2256     <para>
2257     Thuban uses the comprehensive PROJ library for projections. PROJ provides
2258     more than the four commonly used projections described above. If needed
2259     Thuban can be easily extended to a new projection covered by PROJ.
2260     </para>
2261     </appendix>
2262    
2263     </book>
2264    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26