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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1510 by jonathan, Tue Jul 29 14:48:41 2003 UTC revision 1689 by jan, Fri Aug 29 10:03:49 2003 UTC
# Line 6  Line 6 
6  <!-- $Revision$ -->  <!-- $Revision$ -->
7  <book>  <book>
8    <bookinfo>    <bookinfo>
9      <title>Thuban Manual</title>      <title>User's Manual for Thuban 1.0</title>
10      <author>          <authorgroup>
11        <firstname>Jonathan</firstname><surname>Coles</surname>        <author>
12      </author>          <firstname>Jonathan</firstname><surname>Coles</surname>
13      <author>        </author>
14        <firstname>Jan-Oliver</firstname><surname>Wagner</surname>        <author>
15      </author>          <firstname>Jan-Oliver</firstname><surname>Wagner</surname>
16      <author>        </author>
17        <firstname>Frank</firstname><surname>Koormann</surname>        <author>
18      </author>          <firstname>Frank</firstname><surname>Koormann</surname>
19          </author>
20            </authorgroup>
21      <copyright>      <copyright>
22        <year>2003</year>        <year>2003</year>
23        <holder>Intevation GmbH</holder>        <holder>Intevation GmbH</holder>
24      </copyright>      </copyright>
25       <revhistory>
26    <!-- comment this first revision out when releasing a real version -->
27    <!--
28         <revision>
29            <revnumber>CVS version $Id$</revnumber>
30            <date></date>
31            <revremark>Under development.</revremark>
32         </revision>
33    -->
34         <revision>
35            <revnumber>1.0pre2</revnumber>
36            <date>29-Aug-2003</date>
37            <revremark>
38                            Corresponds to Thuban development release 0.8.1.
39                            New: chapter on extensions.
40                    </revremark>
41         </revision>
42         <revision>
43            <revnumber>1.0pre1</revnumber>
44            <date>08-Aug-2003</date>
45            <revremark>Corresponds to Thuban development release 0.8.1.</revremark>
46         </revision>
47      </revhistory>
48    
49    </bookinfo>    </bookinfo>
50    
51    <chapter><title>Introduction</title>    <chapter><title>Introduction</title>
52      <para>      <para>
53      Thuban is a Free Software Geographic Information Systems (GIS) viewer.      Thuban is an interactive geographic data viewer.
54      It is being developed because there is currently no simple interactive      It has been developed because there was no simple interactive
55      viewer for geographic information available as Free Software. Thuban is      viewer for geographic information available as Free Software. Thuban is
56      written in Python and C++ and uses the wxWindows library allowing it to      written in Python and C++ and uses the wxWindows library allowing it to
57      run on many different platforms, including GNU/Linux and Windows.      run on many different platforms, including GNU/Linux and Windows.
58      </para>      </para>
59      <para>      <para>
60      GIS viewers are a necessary tool as they allow one to get a visual      Geographic data viewers are a necessary tool as they allow one to
61            get a visual
62      impression of the positional relationship of the information that may not      impression of the positional relationship of the information that may not
63      be apparent from simple inspection of the data values themselves.      be apparent from simple inspection of the data values themselves.
64      Thuban allows the user to create a session that displays      Thuban allows the user to create a session that displays
# Line 48  Line 75 
75          <section><title>Installation</title>          <section><title>Installation</title>
76          <para>          <para>
77          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,
78          and Windows 2000. The following list of files that Thuban requires          and Windows 2000. Thuban depends on the following packages. These
79          can be found on the          packages can also be found on the
80          <ulink url="http://thuban.intevation.org/download.html">          <ulink url="http://thuban.intevation.org/download.html">
81          Thuban Download site          Thuban Download site
82          </ulink>.          </ulink>.
83          <variablelist>          <itemizedlist>
84          <varlistentry>              <listitem><para>Python 2.2.1 (<literal>http://www.python.org</literal>)</para></listitem>
85          <term>Debian Testing (sarge)</term>              <listitem><para>wxWindows 2.4 (<literal>http://www.wxwindows.org</literal>)</para></listitem>
86          <listitem>              <listitem><para>wxPython 2.4 (<literal>http://www.wxpython.org</literal>)</para></listitem>
87              <para>Thuban-0.8.1-1-debian.i386.rpm</para>              <listitem><para>proj 4.4.5 Projection Library (<literal>http://www.remotesensing.org/proj/</literal>)</para></listitem>
88              <para>GTK 1.2.3</para>              <listitem><para>GDAL 1.1.8 (<literal>http://www.remotesensing.org/gdal/</literal>)</para></listitem>
89              <para>Python 2.2.1</para>              <listitem><para>SQLite 2.8.3 (<literal>http://www.hwaci.com/sw/sqlite/</literal>)</para></listitem>
90              <para>Python 2.2 XML Base Tools</para>              <listitem><para>PySQLite 0.4.3 (<literal>http://pysqlite.sourceforge.net</literal>)</para></listitem>
91              <para>wxWindows 2.4</para>              </itemizedlist>
92              <para>wxWindows 2.4 Python Bindings</para>          </para>
93              <para>proj 4.4.5 Projection Library</para>                  <para>
94              <para>SQLite Python Bindings 0.4.3</para>                  Along with the source codes, the download page also offers
95              <para>GDAL 1.1.8</para>                  full installation packages for Debian, Windows and RPM-based systems
96          </listitem>                  (Mandrake, RedHat, SuSE, etc).
97          </varlistentry>                  </para>
         <varlistentry>  
         <term>RedHat 7.2</term>  
         <listitem>  
             <para>Thuban-0.8.1-1.i386.rpm</para>  
             <para>Python 2.2.1</para>  
             <para>wxPython 2.4 for Python 2.2 with wxGTK</para>  
             <para>proj 4.4.5 Projection Library</para>  
             <para>SQLite 2.8.3</para>  
             <para>PySQLite 0.4.3</para>  
             <para>GDAL 1.1.8</para>  
         </listitem>  
         </varlistentry>  
         <varlistentry>  
         <term>Windows 2000</term>  
         <listitem>  
             <para>Thuban-0.8.1-0.exe</para>  
             <para>Python 2.2.1</para>  
             <para>wxWindows 2.4 for Python 2.2</para>  
             <para>SQLite Python Libraries</para>  
             <para>GDAL for Thuban</para>  
         </listitem>  
         </varlistentry>  
         </variablelist>  
         </para>  
98          </section>          </section>
99    
100          <section><title>The Main Window</title>          <section><title>The Main Window</title>
101          <para>          <para>
102          <screenshot>          <figure>
103          <screeninfo>The Main Window</screeninfo>          <title>The Main Window</title>
104          <mediaobject>          <mediaobject>
105          <imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG" scale="&imgscale;"/> </imageobject>          <imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG" scale="&imgscale;"/> </imageobject>
106          <imageobject> <imagedata fileref="./images/1_2_mainwindow.ps" format="EPS" scale="&imgscale;"/> </imageobject>          <imageobject> <imagedata fileref="./images/1_2_mainwindow.ps" format="EPS" scale="&imgscale;"/> </imageobject>
         <textobject><phrase>The Main Window</phrase></textobject>  
         <caption><para>The Main Window</para></caption>  
107          </mediaobject>          </mediaobject>
108          </screenshot>          </figure>
109          </para>          </para>
110    
111          <para>          <para>
# Line 198  Line 199 
199    
200          <section><title>The Session Info-Tree</title>          <section><title>The Session Info-Tree</title>
201          <para>          <para>
202          <screenshot>          <figure>
203          <screeninfo>Session Info Tree</screeninfo>          <title>Session Info Tree</title>
204          <mediaobject>          <mediaobject>
205          <imageobject><imagedata fileref="../images/2_4_session_tree.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/2_4_session_tree.png" format="PNG" scale="&imgscale;"/></imageobject>
206          <imageobject><imagedata fileref="./images/2_4_session_tree.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/2_4_session_tree.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Session Info Tree</phrase></textobject>  
         <caption><para>Session Info Tree</para></caption>  
207          </mediaobject>          </mediaobject>
208          </screenshot>          </figure>
209          </para>          </para>
210          <para>          <para>
211          The session info-tree is primarily intended for developers working          The session info-tree is primarily intended for developers working
# Line 248  Line 247 
247    
248          <section><title>Adding and Removing Layers</title>          <section><title>Adding and Removing Layers</title>
249          <para>          <para>
250          There are two types of layers that can be added to a map: shape layers          There are two types of layers that can be added to a map: Shape layers
251          and image layers. Shape layers are stored in Shapefile format, a          and image layers. Shape layers are stored in Shapefile format, a
252          standard file format for storing geographic objects. These          widely used file format for storing geographic objects. These
253          files have the extension ``.shp''. Associated with          files have the extension ``.shp''. Associated with
254          the shape file is a database file which stores attributes for          the shape file is a database file which stores attributes for
255          each shape in the shape file. This file, in dBase format,          each shape in the Shape file. This file, in dBase format,
256          has the extension ``.dbf''. Both files must have the same base name.          has the extension ``.dbf''. Both files must have the same base name.
257          For example, if there is a shape file named roads.shp there must          For example, if there is a shape file named roads.shp there must
258          also be a file roads.dbf.          also be a file roads.dbf.
# Line 264  Line 263 
263          <guimenu>Map</guimenu>          <guimenu>Map</guimenu>
264          <guimenuitem>Add Layer</guimenuitem>          <guimenuitem>Add Layer</guimenuitem>
265          </menuchoice>.          </menuchoice>.
266          Thuban will load all files with the same base name, so it doesn't          Initially, only the ``.shp'' files are shown which is enough for the
267          matter if the shape file or database file is selected.                  selection. However, if you switch to display all files and select one
268                    of the associated files (e.g. ``.dbf''), Thuban will recognize the base
269                    name and load the corresponding Shape file.
270            </para>
271                    <para>
272                    The file dialog for Shape files allows to select multiple files.
273                    Use the shift-button together with the left mouse button to extend
274                    the selection.
275          </para>          </para>
276    
277          <para>          <para>
# Line 287  Line 293 
293          the tool bar or from the          the tool bar or from the
294          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.
295          </para>          </para>
296            <itemizedlist>
297            <listitem>
298          <para>          <para>
299          The ZoomIn tool          The ZoomIn tool
300          <inlinemediaobject>          <inlinemediaobject>
# Line 303  Line 311 
311          was clicked. Clicking and dragging selects a region that will be          was clicked. Clicking and dragging selects a region that will be
312          enlarged to fit the window.          enlarged to fit the window.
313          </para>          </para>
314            </listitem>
315            <listitem>
316          <para>          <para>
317          The ZoomOut tool          The ZoomOut tool
318          <inlinemediaobject>          <inlinemediaobject>
# Line 319  Line 329 
329          selects a box such that the current contents of the window will be          selects a box such that the current contents of the window will be
330          scaled to fit into that box.          scaled to fit into that box.
331          </para>          </para>
332            </listitem>
333            <listitem>
334          <para>          <para>
335          The Pan tool          The Pan tool
336          <inlinemediaobject>          <inlinemediaobject>
# Line 332  Line 344 
344          </inlinemediaobject>          </inlinemediaobject>
345          allows the user to move the map around by clicking and dragging.          allows the user to move the map around by clicking and dragging.
346          </para>          </para>
347            </listitem>
348            <listitem>
349          <para>          <para>
350          The Full Extent tool          The Full Extent tool
351          <inlinemediaobject>          <inlinemediaobject>
# Line 345  Line 359 
359          </inlinemediaobject>          </inlinemediaobject>
360          rescales the viewable region so that the entire map is visible.          rescales the viewable region so that the entire map is visible.
361          </para>          </para>
362            </listitem>
363            <listitem>
364          <para>          <para>
365          The Full Layer Extent tool          The Full Layer Extent tool
366          <inlinemediaobject>          <inlinemediaobject>
# Line 360  Line 376 
376          layer fits within the window. If no layer is selected this button          layer fits within the window. If no layer is selected this button
377          will be disabled.          will be disabled.
378          </para>          </para>
379            </listitem>
380            <listitem>
381          <para>          <para>
382          The Full Shape Extent tool          The Full Shape Extent tool
383          <inlinemediaobject>          <inlinemediaobject>
# Line 379  Line 397 
397          in a tableview (see below).          in a tableview (see below).
398    
399          </para>          </para>
400            </listitem>
401            </itemizedlist>
402          </section>          </section>
403    
404          <section><title>Object Identification</title>          <section><title>Object Identification</title>
# Line 447  Line 467 
467          <menuchoice><guimenu>Map</guimenu></menuchoice>.          <menuchoice><guimenu>Map</guimenu></menuchoice>.
468          </para>          </para>
469    
470            <itemizedlist>
471            <listitem>
472          <para>          <para>
473          The Move Layer to Top tool          The Move Layer to Top tool
474          <inlinemediaobject>          <inlinemediaobject>
# Line 459  Line 481 
481          <textobject> <phrase>Move Layer to Top</phrase> </textobject>          <textobject> <phrase>Move Layer to Top</phrase> </textobject>
482          </inlinemediaobject> raises the selected layer to the top of the map.          </inlinemediaobject> raises the selected layer to the top of the map.
483          </para>          </para>
484            </listitem>
485            <listitem>
486    
487          <para>          <para>
488          The Move Layer Up tool          The Move Layer Up tool
# Line 472  Line 496 
496          <textobject> <phrase>Move Layer Up</phrase> </textobject>          <textobject> <phrase>Move Layer Up</phrase> </textobject>
497          </inlinemediaobject> raises the selected layer one level.          </inlinemediaobject> raises the selected layer one level.
498          </para>          </para>
499            </listitem>
500            <listitem>
501    
502          <para>          <para>
503          The Move Layer Down tool          The Move Layer Down tool
# Line 486  Line 512 
512          </inlinemediaobject> lowers the selected layer one level.          </inlinemediaobject> lowers the selected layer one level.
513          </para>          </para>
514    
515            </listitem>
516            <listitem>
517          <para>          <para>
518          The Move Layer to Bottom tool          The Move Layer to Bottom tool
519          <inlinemediaobject>          <inlinemediaobject>
# Line 499  Line 527 
527          </inlinemediaobject> lowers the selected layer to the bottom of the map.          </inlinemediaobject> lowers the selected layer to the bottom of the map.
528          </para>          </para>
529    
530            </listitem>
531            <listitem>
532          <para>          <para>
533          The Visible tool          The Visible tool
534          <inlinemediaobject>          <inlinemediaobject>
# Line 513  Line 543 
543          hidden.          hidden.
544          </para>          </para>
545    
546            </listitem>
547            <listitem>
548          <para>          <para>
549          The Invisible tool          The Invisible tool
550          <inlinemediaobject>          <inlinemediaobject>
# Line 526  Line 558 
558          </inlinemediaobject> hides the selected layer in the map.          </inlinemediaobject> hides the selected layer in the map.
559          </para>          </para>
560    
561            </listitem>
562            <listitem>
563          <para>          <para>
564          The Properties tool          The Properties tool
565          <inlinemediaobject>          <inlinemediaobject>
# Line 540  Line 574 
574          Double-clicking on a layer or a group of a layer will open the          Double-clicking on a layer or a group of a layer will open the
575          properties dialog for that layer.          properties dialog for that layer.
576          </para>          </para>
577            </listitem>
578            </itemizedlist>
579          <para>          <para>
580          Along the bottom of the legend is the scalebar. The scalebar          Along the bottom of the legend is the scalebar. The scalebar
581          will be available if there are any layers and the  map has a          will be available if there are any layers and the  map has a
# Line 619  Line 654 
654          and type.          and type.
655          </para>          </para>
656          <para>          <para>
657          <screenshot>          <figure>
658          <screeninfo>Properties Window</screeninfo>          <title>Properties Window</title>
659          <mediaobject>          <mediaobject>
660          <imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
661          <imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Properties Window</phrase></textobject>  
         <caption><para>The Properties Window for a Shape Layer</para></caption>  
662          </mediaobject>          </mediaobject>
663          </screenshot>          </figure>
664          </para>          </para>
665          <para>          <para>
666          <screenshot>          <figure>
667          <screeninfo>Properties Window</screeninfo>          <title>Properties Window</title>
668          <mediaobject>          <mediaobject>
669          <imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
670          <imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Properties Window</phrase></textobject>  
         <caption><para>The Properties Window for an Image Layer</para></caption>  
671          </mediaobject>          </mediaobject>
672          </screenshot>          </figure>
673          </para>          </para>
674          </section>          </section>
675    
# Line 735  Line 766 
766          changes will not be applied to the map.          changes will not be applied to the map.
767          </para>          </para>
768          <para>          <para>
769          <screenshot>          <figure>
770          <screeninfo>Properties Window</screeninfo>          <title>Properties Window</title>
771          <mediaobject>          <mediaobject>
772          <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>
773          <imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Properties Window</phrase></textobject>  
         <caption><para>The Properties Window with Classifications</para></caption>  
774          </mediaobject>          </mediaobject>
775          </screenshot>          </figure>
776          </para>          </para>
777          <para>          <para>
778          The order of the groups in the classification is significant          The order of the groups in the classification is significant
# Line 809  Line 838 
838    
839          <section><title>Generating Classes</title>          <section><title>Generating Classes</title>
840          <para>          <para>
841          <screenshot>          <figure>
842          <screeninfo>Generate Class</screeninfo>          <title>Generate Class</title>
843          <mediaobject>          <mediaobject>
844          <imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject>
845          <imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Generate Class</phrase></textobject>  
         <caption><para>The Generate Classifications Dialog</para></caption>  
846          </mediaobject>          </mediaobject>
847          </screenshot>          </figure>
848          </para>          </para>
849          <para>          <para>
850          Creating a classification by hand can be tedious.          Creating a classification by hand can be tedious.
# Line 836  Line 863 
863          For every way of generating a classification, a color scheme must          For every way of generating a classification, a color scheme must
864          be selected. Thuban provides several different color schemes that          be selected. Thuban provides several different color schemes that
865          affect how the group properties change over the classification.          affect how the group properties change over the classification.
866            It may be desirable that only certain properties change over the
867            classification. If the shape type is a polygon or a point then
868            the <guibutton>Fix Border Color</guibutton> option will be available.
869            This allows the user to select a border color for all classification
870            groups.
871          It is also possible to create a custom color scheme. Selecting          It is also possible to create a custom color scheme. Selecting
872          this option will display two symbols: the one of the left has the          this option will display two symbols: the one of the left has the
873          properties of the first group and the one on the right has the          properties of the first group and the one on the right has the
874          properties of the last group. Thuban will interpolate between these          properties of the last group. Thuban will interpolate between these
875          two properties to generate the other groups.          two properties to generate the other groups.
876          <screenshot>          <figure>
877          <screeninfo>Custom Color Scheme</screeninfo>          <title>Custom Color Scheme</title>
878          <mediaobject>          <mediaobject>
879          <imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject>
880          <imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Custom Color Scheme</phrase></textobject>  
         <caption><para>Custom Color Scheme</para></caption>  
881          </mediaobject>          </mediaobject>
882          </screenshot>          </figure>
883          </para>          </para>
884          <para>          <para>
885          The Unique Values option lets the user select specific values that          The Unique Values option lets the user select specific values that
# Line 859  Line 889 
889          right. Each list can be sorted or reversed for easier searching.          right. Each list can be sorted or reversed for easier searching.
890          The classification that is generated will be in the same order as          The classification that is generated will be in the same order as
891          the list on the right.          the list on the right.
892          <screenshot>          <figure>
893          <screeninfo>Unique Values</screeninfo>          <title>Unique Values</title>
894          <mediaobject>          <mediaobject>
895          <imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject>
896          <imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Unique Values</phrase></textobject>  
         <caption><para>Unique Values Classification</para></caption>  
897          </mediaobject>          </mediaobject>
898          </screenshot>          </figure>
899          </para>          </para>
900          <para>          <para>
901          The Uniform Distribution option creates a user specified number of          The Uniform Distribution option creates a user specified number of
# Line 876  Line 904 
904          table by clicking <guibutton>Retrieve From Table</guibutton>. The          table by clicking <guibutton>Retrieve From Table</guibutton>. The
905          stepping is how large each interval is. Adjusting this value will          stepping is how large each interval is. Adjusting this value will
906          automatically recalculate how many groups is appropriate.          automatically recalculate how many groups is appropriate.
907          <screenshot>          <figure>
908          <screeninfo>Uniform Distribution</screeninfo>          <title>Uniform Distribution</title>
909          <mediaobject>          <mediaobject>
910          <imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject>
911          <imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Uniform Distribution</phrase></textobject>  
         <caption><para>Uniform Distribution Classification</para></caption>  
912          </mediaobject>          </mediaobject>
913          </screenshot>          </figure>
914          </para>          </para>
915          <para>          <para>
916          The Quantiles option generates ranges based on the number of items          The Quantiles option generates ranges based on the number of items
# Line 892  Line 918 
918          generate five groups with appropriate ranges such that 20% of the table          generate five groups with appropriate ranges such that 20% of the table
919          data is in each group. If it is impossible to generate exact          data is in each group. If it is impossible to generate exact
920          groupings, Thuban will issue a warning but allow the user to continue.          groupings, Thuban will issue a warning but allow the user to continue.
921          <screenshot>          <figure>
922          <screeninfo>Quantiles</screeninfo>          <title>Quantiles</title>
923          <mediaobject>          <mediaobject>
924          <imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject>
925          <imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Quantiles</phrase></textobject>  
         <caption><para>Quantiles Classification</para></caption>  
926          </mediaobject>          </mediaobject>
927          </screenshot>          </figure>
928          </para>          </para>
929          </section>          </section>
930    </chapter>    </chapter>
# Line 922  Line 946 
946      <guimenu>Layer</guimenu>      <guimenu>Layer</guimenu>
947      <guimenuitem>Projection</guimenuitem>      <guimenuitem>Projection</guimenuitem>
948      </menuchoice>.      </menuchoice>.
949      <screenshot>      <figure>
950      <screeninfo>Projection Window</screeninfo>      <title>Projection Window</title>
951      <mediaobject>      <mediaobject>
952      <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>      <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>
953      <imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject>      <imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject>
     <textobject><phrase>Projection Window</phrase></textobject>  
     <caption><para>The Projection Window</para></caption>  
954      </mediaobject>      </mediaobject>
955      </screenshot>      </figure>
956      </para>      </para>
957      <para>      <para>
958      Thuban is distributed with a sample collection of projections. The      Thuban is distributed with a sample collection of projections. The
# Line 1000  Line 1022 
1022    
1023      <section><title>Table View</title>      <section><title>Table View</title>
1024          <para>          <para>
1025          <screenshot>          <figure>
1026          <screeninfo>Table View</screeninfo>          <title>Table View</title>
1027          <mediaobject>          <mediaobject>
1028          <imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject>
1029          <imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject>
         <textobject><phrase>Table View</phrase></textobject>  
         <caption><para>The Table View</para></caption>  
1030          </mediaobject>          </mediaobject>
1031          </screenshot>          </figure>
1032          </para>          </para>
1033          <para>          <para>
1034          Thuban provides a standard dialog to display table contents, the          Thuban provides a standard dialog to display table contents, the
# Line 1129  Line 1149 
1149    
1150          <section><title>Join</title>          <section><title>Join</title>
1151              <para>              <para>
1152              <screenshot>              <figure>
1153              <screeninfo>Join Tables</screeninfo>              <title>Join Tables</title>
1154              <mediaobject>              <mediaobject>
1155              <imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject>              <imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject>
1156              <imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject>              <imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject>
             <textobject><phrase>Join Tables</phrase></textobject>  
             <caption><para>The Join Tables Dialog</para></caption>  
1157              </mediaobject>              </mediaobject>
1158              </screenshot>              </figure>
1159              </para>              </para>
1160              <para>              <para>
1161              The              The
# Line 1217  Line 1235 
1235      </section>      </section>
1236    </chapter>    </chapter>
1237    
1238      <chapter><title>Extensions</title>
1239            <para>
1240            Thuban is designed to be extensible. The term Extension is used as a
1241            general term for anything that extends Thuban.
1242            This chapter introduces into some oppportunities how to add and
1243            handle extra functionality developed by your own or third parties.
1244            </para>
1245    
1246            <section><title>Add personal extensions via thubanstart.py</title>
1247                    <para>
1248                    After Thuban has been started for the first time, a directory
1249                    .thuban is created within your home directory.
1250                    There you can add a file thubanstart.py  which will be imported
1251                    by Thuban at start-up. It is recommended to add only import-statements
1252                    to this file to keep the actual code of extensions separate.
1253                    </para>
1254                    <para>
1255                    The modules to import must either be found though the environment
1256                    variable PYTHONPATH or directly be placed into the .thuban-directory.
1257                    </para>
1258                    <para>
1259                    As an example, copy the file examples/simple_extensions/hello_world.py
1260                    of the Thuban source code into the .thuban-directory of your home
1261                    directory. Now add add the statement import hello_world to the
1262                    file thubanstart.py and run Thuban. You will notice an additional
1263                    menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where
1264                    the new item for the Hello-World extension is placed - select it
1265                    to see the Hello-World message.
1266                    </para>
1267            </section>
1268    
1269            <section><title>Writing simple extensions</title>
1270                    <para>
1271                    Writing an extension for Thuban basically means to
1272                    implement the extra functionality in Python with all of the
1273                    Thuban classes, methods and variables available.
1274                    </para>
1275                    <para>
1276                    All classes and their methods are documented in the source code
1277                    (see their doc-strings). Here is an example from
1278                    Thuban/Model/layer.py that describes some of the methods
1279                    of a Layer object:
1280                    </para>
1281                    <programlisting>
1282                    <![CDATA[
1283    class BaseLayer(TitledObject, Modifiable):
1284    
1285        """Base class for the layers."""
1286    
1287        def __init__(self, title, visible = True, projection = None):
1288            """Initialize the layer.
1289    
1290            title -- the title
1291            visible -- boolean. If true the layer is visible.
1292            """
1293            TitledObject.__init__(self, title)
1294            Modifiable.__init__(self)
1295            self.visible = visible
1296            self.projection = projection
1297    
1298        def Visible(self):
1299            """Return true if layer is visible"""
1300            return self.visible
1301    
1302        def SetVisible(self, visible):
1303            """Set the layer's visibility."""
1304            self.visible = visible
1305            self.issue(LAYER_VISIBILITY_CHANGED, self)
1306    
1307        def HasClassification(self):
1308            """Determine if this layer support classifications."""
1309    ...
1310                    ]]>
1311                    </programlisting>
1312                    <para>
1313                    This example intends to give you an impression of the
1314                    source-code-level documentation.
1315                    You have to make yourself familiar with
1316                    the Python programming language to understand some special
1317                    code elements.
1318                    </para>
1319                    <section><title>hello_world.py</title>
1320                      <para>
1321                      Traditionally, the first example should welcome the world.
1322                      Most of the code handles the frame for integrating a menu
1323                      item into Thuban while the actual raising of a message
1324                      is done in a single line.
1325                      </para>
1326                            <programlisting>
1327                            <![CDATA[
1328    # Copyright (C) 2003 by Intevation GmbH
1329    # Authors:
1330    # Jan-Oliver Wagner <[email protected]>
1331    #
1332    # This program is free software under the GPL (>=v2)
1333    # Read the file COPYING coming with Thuban for details.
1334    
1335    """
1336    Extend Thuban with a sample Hello World to demonstrate simple
1337    extensions.
1338    """
1339    
1340    __version__ = '$Revision$'
1341    
1342    # use _() already now for all strings that may later be translated
1343    from Thuban import _
1344    
1345    # Thuban has named commands which can be registered in the central
1346    # instance registry.
1347    from Thuban.UI.command import registry, Command
1348    
1349    # The instance of the main menu of the Thuban application
1350    # See Thuban/UI/menu.py for the API of the Menu class
1351    from Thuban.UI.mainwindow import main_menu
1352    
1353    def hello_world_dialog(context):
1354        """Just raise a simple dialog to greet the world.
1355    
1356        context -- The Thuban context.
1357        """
1358        context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!'))
1359    
1360    
1361    # create a new command and register it
1362    registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog,
1363                         helptext = _('Welcome everyone on this planet')))
1364    
1365    # find the extensions menu (create it anew if not found)
1366    extensions_menu = main_menu.find_menu('extensions')
1367    if extensions_menu is None:
1368        extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
1369    
1370    # finally bind the new command with an entry in the extensions menu
1371    extensions_menu.InsertItem('hello_world')
1372                            ]]>
1373                            </programlisting>
1374                    </section>
1375                    <section><title>Registering a Command</title>
1376                      <para>
1377                      Mainly, our new function has to be registered to the Thuban
1378                      framework in order to connect it to the menu. A registered
1379                      command can also be connected to e.g. a toolbar button.
1380                      </para>
1381                      <para>
1382                      The instances and classes for this are imported at the beginning.
1383                      Any code not inside a method or class is directly executed when
1384                      the source-code module is imported. Therefore, the second
1385                      part of this example consist of the plain statements to create a new
1386                      Command and to add it to the menu.
1387                      </para>
1388                      <para>
1389                      By convention, it looks for a menu registered as ``extensions'' to
1390                      insert the new command. If it does not exist yet, it gets created.
1391                      It is advisable to copy this code for any of your extensions.
1392                      </para>
1393                    </section>
1394                    <section><title>The Thuban context</title>
1395                            <para>
1396                            A registered command that is called, always receives the
1397                            Thuban context. This instance provides our method with
1398                            hook references to all important components of the Thuban
1399                            application.
1400                            </para>
1401                            <para>
1402                    In the example hello_world.py, our function uses the
1403                            mainwindow component which offers a method to raise a
1404                            message dialog. In total there are three hooks:
1405                            <itemizedlist>
1406                            <listitem>
1407                            <para>application:
1408                            This object is the instance of the Thuban Application class.
1409                            Except maybe for loading or savinf sessions, you will not
1410                            need this object for a simple extension.
1411                            See Thuban/UI/application.py for the API.
1412                            </para>
1413                            </listitem>
1414                            <listitem>
1415                            <para>session:
1416                            The instance of the current session. It manages the sessions'
1417                            map and tables. You can set and remove the map or tables.
1418                            In may also get the map object. However, you should know that
1419                            internally it is already prepared to handle many maps.
1420                            Therfore, currently you would always receive a list with exactlty
1421                            one element. In the future, if there are more than one map,
1422                            you will not know which one is the currently display one and
1423                            therefore you should use the mainwindow as hook to find
1424                            the currently displayed map.
1425                            See Thuban/Model/session.py for the API.
1426                            </para>
1427                            </listitem>
1428                            <listitem>
1429                            <para>
1430                            mainwindow: The mainwindow object is central to manage various
1431                            GUI things such as the Legend sub-window. Most notably,
1432                            you get access to the canvas which is the window part where
1433                            the map is drawn. The canvas knows, which map it currently
1434                            draws and therefore you get the current map via
1435                            context.mainwindow.canvas.Map().
1436                            See Thuban/UI/mainwindow.py for the API.
1437                            </para>
1438                            </listitem>
1439                            </itemizedlist>
1440                </para>
1441                    </section>
1442            </section>
1443      </chapter>
1444    
1445    <chapter><title>Trouble Shooting</title>    <chapter><title>Trouble Shooting</title>
1446      <para>      <para>
1447      Here are a few problems that users have encountered when first using Thuban.      Here are a few problems that users have encountered when first using Thuban.
1448      </para>      </para>
1449      <para>      <para>
     <variablelist>  
1450    
1451      <varlistentry>      <itemizedlist>
     <term>After adding two or more layers nothing is drawn in the map window.  
     </term>  
1452      <listitem>      <listitem>
1453        <para>After adding two or more layers nothing is drawn in the map window.
1454        </para>
1455      <para>      <para>
1456      This is probably because the layers have different projections. Projections      This is probably because the layers have different projections. Projections
1457      must be set on all layers and on the map itself if the layers' projections      must be set on all layers and on the map itself if the layers' projections
1458      are different.      are different.
1459      </para>      </para>
1460      </listitem>      </listitem>
     </varlistentry>  
1461    
     <varlistentry>  
     <term>Thuban crashes on startup with the error  
         <literal>NameError: global name 'False' is not defined</literal>.  
     </term>  
1462      <listitem>      <listitem>
1463        <para>Thuban crashes on startup with the error
1464            <literal>NameError: global name 'False' is not defined</literal>.
1465        </para>
1466      <para>      <para>
1467      <varname>True</varname> and <varname>False</varname> were only introduced      <varname>True</varname> and <varname>False</varname> were only introduced
1468      in Python 2.2.1. Thuban depends on at least Python 2.2.1.      in Python 2.2.1. Thuban depends on at least Python 2.2.1.
1469      </para>      </para>
1470      </listitem>      </listitem>
     </varlistentry>  
1471    
1472      <varlistentry>      <listitem>
1473      <term>After compiling Thuban, Thuban crashes with an error similar to      <para>After compiling Thuban, Thuban crashes with an error similar to
1474          <literal>          <literal>
1475          ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0          ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0
1476          </literal>          </literal>
1477      </term>      </para>
     <listitem>  
1478      <para>      <para>
1479      Thuban depends on the wxWindows library. If Thuban is compiled with an      Thuban depends on the wxWindows library. If Thuban is compiled with an
1480      incompatible version of the compiler than wxWindows was compiled with      incompatible version of the compiler than wxWindows was compiled with
# Line 1262  Line 1482 
1482      compiler.      compiler.
1483      </para>      </para>
1484      </listitem>      </listitem>
1485      </varlistentry>      </itemizedlist>
     </variablelist>  
1486      </para>      </para>
1487      <para>      <para>
1488      If an error occurs Thuban will display a dialog indicating the error      If an error occurs Thuban will display a dialog indicating the error
# Line 1274  Line 1493 
1493      More information about the system is available from      More information about the system is available from
1494      <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.      <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.
1495      This should also be included in the bug report.      This should also be included in the bug report.
1496      <screenshot>      <figure>
1497      <screeninfo>Error Dialog</screeninfo>      <title>Error Dialog</title>
1498      <mediaobject>      <mediaobject>
1499      <imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject>      <imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject>
1500      <imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject>      <imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject>
     <textobject><phrase>Error Dialog</phrase></textobject>  
     <caption><para>Error Dialog</para></caption>  
1501      </mediaobject>      </mediaobject>
1502      </screenshot>      </figure>
1503      </para>      </para>
1504    
1505    </chapter>    </chapter>
# Line 1319  Line 1536 
1536      </listitem>      </listitem>
1537      </varlistentry>      </varlistentry>
1538    
1539        <varlistentry>
1540        <term>Raster files</term>
1541        <listitem>
1542            <para>
1543            Binding the GDAL library Thuban supports numerous raster file formats,
1544            see <ulink url="http://www.remotesensing.org/gdal/formats_list.html">
1545            GDAL format list</ulink> for details.</para>
1546    
1547            <para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis>
1548            format: Raster maps are provided as TIFF images, with an additional
1549            "world file" storing the geographic reference (usually with an
1550            extension ".tfw").
1551            </para>
1552        </listitem>
1553        </varlistentry>
1554    
1555      </variablelist>      </variablelist>
1556    </appendix>    </appendix>
1557    
# Line 1329  Line 1562 
1562      to create custom projections. Thuban comes with predefined      to create custom projections. Thuban comes with predefined
1563      projections which are available through the Projections dialog.      projections which are available through the Projections dialog.
1564      </para>      </para>
1565      <variablelist>      <itemizedlist>
1566      <varlistentry>      <listitem>
1567          <term>Geographic</term>          <para>Geographic</para>
1568          <listitem><para><literal>Ellipsoid</literal></para>          <itemizedlist>
1569          <para><literal>Source Data</literal>: either Degrees or Radians          <listitem><para><literal>Ellipsoid</literal></para></listitem>
1570            <listitem><para>
1571                    <literal>Source Data</literal>: either Degrees or Radians
1572                  </para></listitem>                  </para></listitem>
1573      </varlistentry>          </itemizedlist>
1574      <varlistentry>      </listitem>
1575          <term>Lambert Conic Conformal</term>      <listitem>
1576          <listitem><para><literal>Ellipsoid</literal></para>          <para>Lambert Conic Conformal</para>
1577          <para><literal>Latitude of 1st standard parallel</literal></para>      <itemizedlist>
1578          <para><literal>Latitude of 2nd standard parallel</literal></para>          <listitem><para><literal>Ellipsoid</literal></para></listitem>
1579          <para><literal>Central Meridian</literal></para>          <listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem>
1580          <para><literal>Latitude of Origin</literal></para>          <listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem>
1581          <para><literal>False Easting</literal> (meters)</para>          <listitem><para><literal>Central Meridian</literal></para></listitem>
1582          <para><literal>False Northing</literal> (meters)</para></listitem>          <listitem><para><literal>Latitude of Origin</literal></para></listitem>
1583      </varlistentry>          <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
1584      <varlistentry>          <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
1585          <term>Transverse Mercator</term>      </itemizedlist>
1586          <listitem><para><literal>Ellipsoid</literal></para>      </listitem>
1587          <para><literal>Latitude</literal>of origin</para>      <listitem>
1588          <para><literal>Longitude</literal>at central meridian</para>          <para>Transverse Mercator</para>
1589          <para><literal>Scale Factor</literal>at central meridian</para>      <itemizedlist>
1590          <para><literal>False Easting</literal> (meters)</para>          <listitem><para><literal>Ellipsoid</literal></para></listitem>
1591          <para><literal>False Northing</literal> (meters)</para></listitem>          <listitem><para><literal>Latitude</literal>of origin</para></listitem>
1592      </varlistentry>          <listitem><para><literal>Longitude</literal>at central meridian</para></listitem>
1593      <varlistentry>          <listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem>
1594          <term>Universal Transverse Mercator</term>          <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
1595          <listitem><para><literal>Ellipsoid</literal></para>          <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
1596          <para><literal>Zone</literal>      </itemizedlist>
1597                  (can be guessed appling the Propose button)</para>      </listitem>
1598          <para><literal>Southern Hemisphere</literal> flag</para></listitem>      <listitem>
1599      </varlistentry>          <para>Universal Transverse Mercator</para>
1600      </variablelist>      <itemizedlist>
1601            <listitem><para><literal>Ellipsoid</literal></para></listitem>
1602            <listitem><para><literal>Zone</literal>
1603                    (can be guessed appling the Propose button)</para></listitem>
1604            <listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem>
1605        </itemizedlist>
1606        </listitem>
1607        </itemizedlist>
1608            
1609      <para>      <para>
1610      Thuban comes with a sample set of map projections for various      Thuban comes with a sample set of map projections for various
1611      European countries. Apart from the basic projection they differ      European countries. Apart from the basic projection they differ
1612      especially in their parameterization:      especially in their parameterization:
1613      </para>      </para>
1614      <variablelist>      <itemizedlist>
1615      <varlistentry><term>Belgium Datum 1972 (Lambert Conic Conformal)</term>      <listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para>
1616          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1617    
1618      <varlistentry><term>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</term>      <listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para>
1619          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1620    
1621      <varlistentry><term>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)      <listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)
1622      </term>      </para>
1623          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1624    
1625      <varlistentry><term>Reseau Geodesique Francaise      <listitem><para>Reseau Geodesique Francaise
1626      (France, Lambert Conic Conformal)</term>      (France, Lambert Conic Conformal)</para>
1627          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1628    
1629      <varlistentry><term>UK National Grid (United Kingdom, Transverse Mercartor)      <listitem><para>UK National Grid (United Kingdom, Transverse Mercartor)
1630      </term>      </para>
1631          <listitem><para></para></listitem>      </listitem>
1632      </varlistentry>      </itemizedlist>
     </variablelist>  
1633    
1634      <para>      <para>
1635      Thuban uses the comprehensive PROJ library for projections. PROJ provides      Thuban uses the comprehensive PROJ library for projections. PROJ provides

Legend:
Removed from v.1510  
changed lines
  Added in v.1689

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26