/[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 1530 by jonathan, Thu Jul 31 09:57:25 2003 UTC revision 1624 by jan, Thu Aug 21 16:02:17 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         <revision>
28            <revnumber>1.0pre1 CVS $Id$</revnumber>
29            <date>$Date$</date>
30            <revremark>Under development.</revremark>
31         </revision>
32         <revision>
33            <revnumber>1.0pre1</revnumber>
34            <date>08-Aug-2003</date>
35            <revremark>Corresponds to Thuban development release 0.8.1</revremark>
36         </revision>
37      </revhistory>
38    
39    </bookinfo>    </bookinfo>
40    
41    <chapter><title>Introduction</title>    <chapter><title>Introduction</title>
42      <para>      <para>
43      Thuban is a Free Software Geographic Information Systems (GIS) viewer.      Thuban is an interactive geographic data viewer.
44      It is being developed because there is currently no simple interactive      It has been developed because there was no simple interactive
45      viewer for geographic information available as Free Software. Thuban is      viewer for geographic information available as Free Software. Thuban is
46      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
47      run on many different platforms, including GNU/Linux and Windows.      run on many different platforms, including GNU/Linux and Windows.
48      </para>      </para>
49      <para>      <para>
50      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
51            get a visual
52      impression of the positional relationship of the information that may not      impression of the positional relationship of the information that may not
53      be apparent from simple inspection of the data values themselves.      be apparent from simple inspection of the data values themselves.
54      Thuban allows the user to create a session that displays      Thuban allows the user to create a session that displays
# Line 48  Line 65 
65          <section><title>Installation</title>          <section><title>Installation</title>
66          <para>          <para>
67          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,          Thuban is actively supported under Debian Testing (sarge), RedHat 7.2,
68          and Windows 2000. The following list of files that Thuban requires          and Windows 2000. Thuban depends on the following packages. These
69          can be found on the          packages can also be found on the
70          <ulink url="http://thuban.intevation.org/download.html">          <ulink url="http://thuban.intevation.org/download.html">
71          Thuban Download site          Thuban Download site
72          </ulink>.          </ulink>.
73          <variablelist>          <itemizedlist>
74          <varlistentry>              <listitem><para>Python 2.2.1 (<literal>http://www.python.org</literal>)</para></listitem>
75          <term>Debian Testing (sarge)</term>              <listitem><para>wxWindows 2.4 (<literal>http://www.wxwindows.org</literal>)</para></listitem>
76          <listitem>              <listitem><para>wxPython 2.4 (<literal>http://www.wxpython.org</literal>)</para></listitem>
77              <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>
78              <para>GTK 1.2.3</para>              <listitem><para>GDAL 1.1.8 (<literal>http://www.remotesensing.org/gdal/</literal>)</para></listitem>
79              <para>Python 2.2.1</para>              <listitem><para>SQLite 2.8.3 (<literal>http://www.hwaci.com/sw/sqlite/</literal>)</para></listitem>
80              <para>Python 2.2 XML Base Tools</para>              <listitem><para>PySQLite 0.4.3 (<literal>http://pysqlite.sourceforge.net</literal>)</para></listitem>
81              <para>wxWindows 2.4</para>              </itemizedlist>
82              <para>wxWindows 2.4 Python Bindings</para>          </para>
83              <para>proj 4.4.5 Projection Library</para>                  <para>
84              <para>SQLite Python Bindings 0.4.3</para>                  Along with the source codes, the download page also offers
85              <para>GDAL 1.1.8</para>                  full installation packages for Debian, Windows and RPM-based systems
86          </listitem>                  (Mandrake, RedHat, SuSE, etc).
87          </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>  
88          </section>          </section>
89    
90          <section><title>The Main Window</title>          <section><title>The Main Window</title>
91          <para>          <para>
92          <screenshot>          <figure>
93          <screeninfo>The Main Window</screeninfo>          <title>The Main Window</title>
94          <mediaobject>          <mediaobject>
95          <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>
96          <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>  
97          </mediaobject>          </mediaobject>
98          </screenshot>          </figure>
99          </para>          </para>
100    
101          <para>          <para>
# Line 198  Line 189 
189    
190          <section><title>The Session Info-Tree</title>          <section><title>The Session Info-Tree</title>
191          <para>          <para>
192          <screenshot>          <figure>
193          <screeninfo>Session Info Tree</screeninfo>          <title>Session Info Tree</title>
194          <mediaobject>          <mediaobject>
195          <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>
196          <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>  
197          </mediaobject>          </mediaobject>
198          </screenshot>          </figure>
199          </para>          </para>
200          <para>          <para>
201          The session info-tree is primarily intended for developers working          The session info-tree is primarily intended for developers working
# Line 248  Line 237 
237    
238          <section><title>Adding and Removing Layers</title>          <section><title>Adding and Removing Layers</title>
239          <para>          <para>
240          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
241          and image layers. Shape layers are stored in Shapefile format, a          and image layers. Shape layers are stored in Shapefile format, a
242          standard file format for storing geographic objects. These          widely used file format for storing geographic objects. These
243          files have the extension ``.shp''. Associated with          files have the extension ``.shp''. Associated with
244          the shape file is a database file which stores attributes for          the shape file is a database file which stores attributes for
245          each shape in the shape file. This file, in dBase format,          each shape in the Shape file. This file, in dBase format,
246          has the extension ``.dbf''. Both files must have the same base name.          has the extension ``.dbf''. Both files must have the same base name.
247          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
248          also be a file roads.dbf.          also be a file roads.dbf.
# Line 264  Line 253 
253          <guimenu>Map</guimenu>          <guimenu>Map</guimenu>
254          <guimenuitem>Add Layer</guimenuitem>          <guimenuitem>Add Layer</guimenuitem>
255          </menuchoice>.          </menuchoice>.
256          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
257          matter if the shape file or database file is selected.                  selection. However, if you switch to display all files and select one
258                    of the associated files (e.g. ``.dbf''), Thuban will recognize the base
259                    name and load the corresponding Shape file.
260            </para>
261                    <para>
262                    The file dialog for Shape files allows to select multiple files.
263                    Use the shift-button together with the left mouse button to extend
264                    the selection.
265          </para>          </para>
266    
267          <para>          <para>
# Line 287  Line 283 
283          the tool bar or from the          the tool bar or from the
284          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.          <menuchoice><guimenu>Map</guimenu></menuchoice> menu.
285          </para>          </para>
286            <itemizedlist>
287            <listitem>
288          <para>          <para>
289          The ZoomIn tool          The ZoomIn tool
290          <inlinemediaobject>          <inlinemediaobject>
# Line 303  Line 301 
301          was clicked. Clicking and dragging selects a region that will be          was clicked. Clicking and dragging selects a region that will be
302          enlarged to fit the window.          enlarged to fit the window.
303          </para>          </para>
304            </listitem>
305            <listitem>
306          <para>          <para>
307          The ZoomOut tool          The ZoomOut tool
308          <inlinemediaobject>          <inlinemediaobject>
# Line 319  Line 319 
319          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
320          scaled to fit into that box.          scaled to fit into that box.
321          </para>          </para>
322            </listitem>
323            <listitem>
324          <para>          <para>
325          The Pan tool          The Pan tool
326          <inlinemediaobject>          <inlinemediaobject>
# Line 332  Line 334 
334          </inlinemediaobject>          </inlinemediaobject>
335          allows the user to move the map around by clicking and dragging.          allows the user to move the map around by clicking and dragging.
336          </para>          </para>
337            </listitem>
338            <listitem>
339          <para>          <para>
340          The Full Extent tool          The Full Extent tool
341          <inlinemediaobject>          <inlinemediaobject>
# Line 345  Line 349 
349          </inlinemediaobject>          </inlinemediaobject>
350          rescales the viewable region so that the entire map is visible.          rescales the viewable region so that the entire map is visible.
351          </para>          </para>
352            </listitem>
353            <listitem>
354          <para>          <para>
355          The Full Layer Extent tool          The Full Layer Extent tool
356          <inlinemediaobject>          <inlinemediaobject>
# Line 360  Line 366 
366          layer fits within the window. If no layer is selected this button          layer fits within the window. If no layer is selected this button
367          will be disabled.          will be disabled.
368          </para>          </para>
369            </listitem>
370            <listitem>
371          <para>          <para>
372          The Full Shape Extent tool          The Full Shape Extent tool
373          <inlinemediaobject>          <inlinemediaobject>
# Line 379  Line 387 
387          in a tableview (see below).          in a tableview (see below).
388    
389          </para>          </para>
390            </listitem>
391            </itemizedlist>
392          </section>          </section>
393    
394          <section><title>Object Identification</title>          <section><title>Object Identification</title>
# Line 447  Line 457 
457          <menuchoice><guimenu>Map</guimenu></menuchoice>.          <menuchoice><guimenu>Map</guimenu></menuchoice>.
458          </para>          </para>
459    
460            <itemizedlist>
461            <listitem>
462          <para>          <para>
463          The Move Layer to Top tool          The Move Layer to Top tool
464          <inlinemediaobject>          <inlinemediaobject>
# Line 459  Line 471 
471          <textobject> <phrase>Move Layer to Top</phrase> </textobject>          <textobject> <phrase>Move Layer to Top</phrase> </textobject>
472          </inlinemediaobject> raises the selected layer to the top of the map.          </inlinemediaobject> raises the selected layer to the top of the map.
473          </para>          </para>
474            </listitem>
475            <listitem>
476    
477          <para>          <para>
478          The Move Layer Up tool          The Move Layer Up tool
# Line 472  Line 486 
486          <textobject> <phrase>Move Layer Up</phrase> </textobject>          <textobject> <phrase>Move Layer Up</phrase> </textobject>
487          </inlinemediaobject> raises the selected layer one level.          </inlinemediaobject> raises the selected layer one level.
488          </para>          </para>
489            </listitem>
490            <listitem>
491    
492          <para>          <para>
493          The Move Layer Down tool          The Move Layer Down tool
# Line 486  Line 502 
502          </inlinemediaobject> lowers the selected layer one level.          </inlinemediaobject> lowers the selected layer one level.
503          </para>          </para>
504    
505            </listitem>
506            <listitem>
507          <para>          <para>
508          The Move Layer to Bottom tool          The Move Layer to Bottom tool
509          <inlinemediaobject>          <inlinemediaobject>
# Line 499  Line 517 
517          </inlinemediaobject> lowers the selected layer to the bottom of the map.          </inlinemediaobject> lowers the selected layer to the bottom of the map.
518          </para>          </para>
519    
520            </listitem>
521            <listitem>
522          <para>          <para>
523          The Visible tool          The Visible tool
524          <inlinemediaobject>          <inlinemediaobject>
# Line 513  Line 533 
533          hidden.          hidden.
534          </para>          </para>
535    
536            </listitem>
537            <listitem>
538          <para>          <para>
539          The Invisible tool          The Invisible tool
540          <inlinemediaobject>          <inlinemediaobject>
# Line 526  Line 548 
548          </inlinemediaobject> hides the selected layer in the map.          </inlinemediaobject> hides the selected layer in the map.
549          </para>          </para>
550    
551            </listitem>
552            <listitem>
553          <para>          <para>
554          The Properties tool          The Properties tool
555          <inlinemediaobject>          <inlinemediaobject>
# Line 540  Line 564 
564          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
565          properties dialog for that layer.          properties dialog for that layer.
566          </para>          </para>
567            </listitem>
568            </itemizedlist>
569          <para>          <para>
570          Along the bottom of the legend is the scalebar. The scalebar          Along the bottom of the legend is the scalebar. The scalebar
571          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 644 
644          and type.          and type.
645          </para>          </para>
646          <para>          <para>
647          <screenshot>          <figure>
648          <screeninfo>Properties Window</screeninfo>          <title>Properties Window</title>
649          <mediaobject>          <mediaobject>
650          <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>
651          <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>  
652          </mediaobject>          </mediaobject>
653          </screenshot>          </figure>
654          </para>          </para>
655          <para>          <para>
656          <screenshot>          <figure>
657          <screeninfo>Properties Window</screeninfo>          <title>Properties Window</title>
658          <mediaobject>          <mediaobject>
659          <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>
660          <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>  
661          </mediaobject>          </mediaobject>
662          </screenshot>          </figure>
663          </para>          </para>
664          </section>          </section>
665    
# Line 735  Line 756 
756          changes will not be applied to the map.          changes will not be applied to the map.
757          </para>          </para>
758          <para>          <para>
759          <screenshot>          <figure>
760          <screeninfo>Properties Window</screeninfo>          <title>Properties Window</title>
761          <mediaobject>          <mediaobject>
762          <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>          <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>
763          <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>  
764          </mediaobject>          </mediaobject>
765          </screenshot>          </figure>
766          </para>          </para>
767          <para>          <para>
768          The order of the groups in the classification is significant          The order of the groups in the classification is significant
# Line 809  Line 828 
828    
829          <section><title>Generating Classes</title>          <section><title>Generating Classes</title>
830          <para>          <para>
831          <screenshot>          <figure>
832          <screeninfo>Generate Class</screeninfo>          <title>Generate Class</title>
833          <mediaobject>          <mediaobject>
834          <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>
835          <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>  
836          </mediaobject>          </mediaobject>
837          </screenshot>          </figure>
838          </para>          </para>
839          <para>          <para>
840          Creating a classification by hand can be tedious.          Creating a classification by hand can be tedious.
# Line 846  Line 863 
863          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
864          properties of the last group. Thuban will interpolate between these          properties of the last group. Thuban will interpolate between these
865          two properties to generate the other groups.          two properties to generate the other groups.
866          <screenshot>          <figure>
867          <screeninfo>Custom Color Scheme</screeninfo>          <title>Custom Color Scheme</title>
868          <mediaobject>          <mediaobject>
869          <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>
870          <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>  
871          </mediaobject>          </mediaobject>
872          </screenshot>          </figure>
873          </para>          </para>
874          <para>          <para>
875          The Unique Values option lets the user select specific values that          The Unique Values option lets the user select specific values that
# Line 864  Line 879 
879          right. Each list can be sorted or reversed for easier searching.          right. Each list can be sorted or reversed for easier searching.
880          The classification that is generated will be in the same order as          The classification that is generated will be in the same order as
881          the list on the right.          the list on the right.
882          <screenshot>          <figure>
883          <screeninfo>Unique Values</screeninfo>          <title>Unique Values</title>
884          <mediaobject>          <mediaobject>
885          <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>
886          <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>  
887          </mediaobject>          </mediaobject>
888          </screenshot>          </figure>
889          </para>          </para>
890          <para>          <para>
891          The Uniform Distribution option creates a user specified number of          The Uniform Distribution option creates a user specified number of
# Line 881  Line 894 
894          table by clicking <guibutton>Retrieve From Table</guibutton>. The          table by clicking <guibutton>Retrieve From Table</guibutton>. The
895          stepping is how large each interval is. Adjusting this value will          stepping is how large each interval is. Adjusting this value will
896          automatically recalculate how many groups is appropriate.          automatically recalculate how many groups is appropriate.
897          <screenshot>          <figure>
898          <screeninfo>Uniform Distribution</screeninfo>          <title>Uniform Distribution</title>
899          <mediaobject>          <mediaobject>
900          <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>
901          <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>  
902          </mediaobject>          </mediaobject>
903          </screenshot>          </figure>
904          </para>          </para>
905          <para>          <para>
906          The Quantiles option generates ranges based on the number of items          The Quantiles option generates ranges based on the number of items
# Line 897  Line 908 
908          generate five groups with appropriate ranges such that 20% of the table          generate five groups with appropriate ranges such that 20% of the table
909          data is in each group. If it is impossible to generate exact          data is in each group. If it is impossible to generate exact
910          groupings, Thuban will issue a warning but allow the user to continue.          groupings, Thuban will issue a warning but allow the user to continue.
911          <screenshot>          <figure>
912          <screeninfo>Quantiles</screeninfo>          <title>Quantiles</title>
913          <mediaobject>          <mediaobject>
914          <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>
915          <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>  
916          </mediaobject>          </mediaobject>
917          </screenshot>          </figure>
918          </para>          </para>
919          </section>          </section>
920    </chapter>    </chapter>
# Line 927  Line 936 
936      <guimenu>Layer</guimenu>      <guimenu>Layer</guimenu>
937      <guimenuitem>Projection</guimenuitem>      <guimenuitem>Projection</guimenuitem>
938      </menuchoice>.      </menuchoice>.
939      <screenshot>      <figure>
940      <screeninfo>Projection Window</screeninfo>      <title>Projection Window</title>
941      <mediaobject>      <mediaobject>
942      <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>      <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>
943      <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>  
944      </mediaobject>      </mediaobject>
945      </screenshot>      </figure>
946      </para>      </para>
947      <para>      <para>
948      Thuban is distributed with a sample collection of projections. The      Thuban is distributed with a sample collection of projections. The
# Line 1005  Line 1012 
1012    
1013      <section><title>Table View</title>      <section><title>Table View</title>
1014          <para>          <para>
1015          <screenshot>          <figure>
1016          <screeninfo>Table View</screeninfo>          <title>Table View</title>
1017          <mediaobject>          <mediaobject>
1018          <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>
1019          <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>  
1020          </mediaobject>          </mediaobject>
1021          </screenshot>          </figure>
1022          </para>          </para>
1023          <para>          <para>
1024          Thuban provides a standard dialog to display table contents, the          Thuban provides a standard dialog to display table contents, the
# Line 1134  Line 1139 
1139    
1140          <section><title>Join</title>          <section><title>Join</title>
1141              <para>              <para>
1142              <screenshot>              <figure>
1143              <screeninfo>Join Tables</screeninfo>              <title>Join Tables</title>
1144              <mediaobject>              <mediaobject>
1145              <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>
1146              <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>  
1147              </mediaobject>              </mediaobject>
1148              </screenshot>              </figure>
1149              </para>              </para>
1150              <para>              <para>
1151              The              The
# Line 1222  Line 1225 
1225      </section>      </section>
1226    </chapter>    </chapter>
1227    
1228      <chapter><title>Extensions</title>
1229            <para>
1230            Thuban is designed to be extensible. The term Extension is used as a
1231            general term for anything that extends Thuban.
1232            This chapter introduces into some oppportunities how to add and
1233            handle extra functionality developed by your own or third parties.
1234            </para>
1235    
1236            <section><title>Add personal extensions via thubanstart.py</title>
1237                    <para>
1238                    After Thuban has been started for the first time, a directory
1239                    .thuban is created within your home directory.
1240                    There you can add a file thubanstart.py  which will be imported
1241                    by Thuban at start-up. It is recommended to add only import-statements
1242                    to this file to keep the actual code of extensions separate.
1243                    </para>
1244                    <para>
1245                    The modules to import must either be found though the environment
1246                    variable PYTHONPATH or directly be placed into the .thuban-directory.
1247                    </para>
1248                    <para>
1249                    As an example, copy the file examples/simple_extensions/hello_world.py
1250                    of the Thuban source code into the .thuban-directory of your home
1251                    directory. Now add add the statement import hello_world to the
1252                    file thubanstart.py and run Thuban. You will notice an additional
1253                    menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where
1254                    the new item for the Hello-World extension is placed - select it
1255                    to see the Hello-World message.
1256                    </para>
1257            </section>
1258    
1259            <section><title>Writing simple extensions</title>
1260                    <para>
1261                    Writing an extension for Thuban basically means to
1262                    implement the extra functionality in Python with all of the
1263                    Thuban classes, methods and variables available.
1264                    </para>
1265                    <para>
1266                    All classes and their methods are documented in the source code
1267                    (see their doc-strings). Here is an example from
1268                    Thuban/Model/layer.py that describes some of the methods
1269                    of a Layer object:
1270                    </para>
1271                    <programlisting>
1272                    <![CDATA[
1273    class BaseLayer(TitledObject, Modifiable):
1274    
1275        """Base class for the layers."""
1276    
1277        def __init__(self, title, visible = True, projection = None):
1278            """Initialize the layer.
1279    
1280            title -- the title
1281            visible -- boolean. If true the layer is visible.
1282            """
1283            TitledObject.__init__(self, title)
1284            Modifiable.__init__(self)
1285            self.visible = visible
1286            self.projection = projection
1287    
1288        def Visible(self):
1289            """Return true if layer is visible"""
1290            return self.visible
1291    
1292        def SetVisible(self, visible):
1293            """Set the layer's visibility."""
1294            self.visible = visible
1295            self.issue(LAYER_VISIBILITY_CHANGED, self)
1296    
1297        def HasClassification(self):
1298            """Determine if this layer support classifications."""
1299    ...
1300                    ]]>
1301                    </programlisting>
1302                    <para>
1303                    This example intends to give you an impression of the
1304                    source-code-level documentation.
1305                    You have to make yourself familiar with
1306                    the Python programming language to understand some special
1307                    code elements.
1308                    </para>
1309                    <section><title>hello_world.py</title>
1310                      <para>
1311                      Traditionally, the first example should welcome the world.
1312                      Most of the code handles the frame for integrating a menu
1313                      item into Thuban while the actual raising of a message
1314                      is done in a single line.
1315                      </para>
1316                            <programlisting>
1317                            <![CDATA[
1318    # Copyright (C) 2003 by Intevation GmbH
1319    # Authors:
1320    # Jan-Oliver Wagner <[email protected]>
1321    #
1322    # This program is free software under the GPL (>=v2)
1323    # Read the file COPYING coming with Thuban for details.
1324    
1325    """
1326    Extend Thuban with a sample Hello World to demonstrate simple
1327    extensions.
1328    """
1329    
1330    __version__ = '$Revision$'
1331    
1332    # use _() already now for all strings that may later be translated
1333    from Thuban import _
1334    
1335    # Thuban has named commands which can be registered in the central
1336    # instance registry.
1337    from Thuban.UI.command import registry, Command
1338    
1339    # The instance of the main menu of the Thuban application
1340    # See Thuban/UI/menu.py for the API of the Menu class
1341    from Thuban.UI.mainwindow import main_menu
1342    
1343    def hello_world_dialog(context):
1344        """Just raise a simple dialog to greet the world.
1345    
1346        context -- The Thuban context.
1347        """
1348        context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!'))
1349    
1350    
1351    # create a new command and register it
1352    registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog,
1353                         helptext = _('Welcome everyone on this planet')))
1354    
1355    # find the extensions menu (create it anew if not found)
1356    extensions_menu = main_menu.find_menu('extensions')
1357    if extensions_menu is None:
1358        extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
1359    
1360    # finally bind the new command with an entry in the extensions menu
1361    extensions_menu.InsertItem('hello_world')
1362                            ]]>
1363                            </programlisting>
1364                    </section>
1365                    <section><title>Registering a Command</title>
1366                      <para>
1367                      Mainly, our new function has to be registered to the Thuban
1368                      framework in order to connect it to the menu. A registered
1369                      command can also be connected to e.g. a toolbar button.
1370                      </para>
1371                      <para>
1372                      The instances and classes for this are imported at the beginning.
1373                      Any code not inside a method or class is directly executed when
1374                      the source-code module is imported. Therefore, the second
1375                      part of this example consist of the plain statements to create a new
1376                      Command and to add it to the menu.
1377                      </para>
1378                      <para>
1379                      By convention, it looks for a menu registered as ``extensions'' to
1380                      insert the new command. If it does not exist yet, it gets created.
1381                      It is advisable to copy this code for any of your extensions.
1382                      </para>
1383                    </section>
1384                    <section><title>The Thuban context</title>
1385                            <para>
1386                            A registered command that is called, always receives the
1387                            Thuban context. This instance provides our method with
1388                            hook references to all important components of the Thuban
1389                            application.
1390                            </para>
1391                            <para>
1392                    In the example hello_world.py, our function uses the
1393                            mainwindow component which offers a method to raise a
1394                            message dialog. In total there are three hooks:
1395                            <itemizedlist>
1396                            <listitem>
1397                            <para>application:
1398                            This object is the instance of the Thuban Application class.
1399                            Except maybe for loading or savinf sessions, you will not
1400                            need this object for a simple extension.
1401                            See Thuban/UI/application.py for the API.
1402                            </para>
1403                            </listitem>
1404                            <listitem>
1405                            <para>session:
1406                            The instance of the current session. It manages the sessions'
1407                            map and tables. You can set and remove the map or tables.
1408                            In may also get the map object. However, you should know that
1409                            internally it is already prepared to handle many maps.
1410                            Therfore, currently you would always receive a list with exactlty
1411                            one element. In the future, if there are more than one map,
1412                            you will not know which one is the currently display one and
1413                            therefore you should use the mainwindow as hook to find
1414                            the currently displayed map.
1415                            See Thuban/Model/session.py for the API.
1416                            </para>
1417                            </listitem>
1418                            <listitem>
1419                            <para>
1420                            mainwindow: The mainwindow object is central to manage various
1421                            GUI things such as the Legend sub-window. Most notably,
1422                            you get access to the canvas which is the window part where
1423                            the map is drawn. The canvas knows, which map it currently
1424                            draws and therefore you get the current map via
1425                            context.mainwindow.canvas.Map().
1426                            See Thuban/UI/mainwindow.py for the API.
1427                            </para>
1428                            </listitem>
1429                            </itemizedlist>
1430                </para>
1431                    </section>
1432            </section>
1433      </chapter>
1434    
1435    <chapter><title>Trouble Shooting</title>    <chapter><title>Trouble Shooting</title>
1436      <para>      <para>
1437      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.
1438      </para>      </para>
1439      <para>      <para>
     <variablelist>  
1440    
1441      <varlistentry>      <itemizedlist>
     <term>After adding two or more layers nothing is drawn in the map window.  
     </term>  
1442      <listitem>      <listitem>
1443        <para>After adding two or more layers nothing is drawn in the map window.
1444        </para>
1445      <para>      <para>
1446      This is probably because the layers have different projections. Projections      This is probably because the layers have different projections. Projections
1447      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
1448      are different.      are different.
1449      </para>      </para>
1450      </listitem>      </listitem>
     </varlistentry>  
1451    
     <varlistentry>  
     <term>Thuban crashes on startup with the error  
         <literal>NameError: global name 'False' is not defined</literal>.  
     </term>  
1452      <listitem>      <listitem>
1453        <para>Thuban crashes on startup with the error
1454            <literal>NameError: global name 'False' is not defined</literal>.
1455        </para>
1456      <para>      <para>
1457      <varname>True</varname> and <varname>False</varname> were only introduced      <varname>True</varname> and <varname>False</varname> were only introduced
1458      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.
1459      </para>      </para>
1460      </listitem>      </listitem>
     </varlistentry>  
1461    
1462      <varlistentry>      <listitem>
1463      <term>After compiling Thuban, Thuban crashes with an error similar to      <para>After compiling Thuban, Thuban crashes with an error similar to
1464          <literal>          <literal>
1465          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
1466          </literal>          </literal>
1467      </term>      </para>
     <listitem>  
1468      <para>      <para>
1469      Thuban depends on the wxWindows library. If Thuban is compiled with an      Thuban depends on the wxWindows library. If Thuban is compiled with an
1470      incompatible version of the compiler than wxWindows was compiled with      incompatible version of the compiler than wxWindows was compiled with
# Line 1267  Line 1472 
1472      compiler.      compiler.
1473      </para>      </para>
1474      </listitem>      </listitem>
1475      </varlistentry>      </itemizedlist>
     </variablelist>  
1476      </para>      </para>
1477      <para>      <para>
1478      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 1279  Line 1483 
1483      More information about the system is available from      More information about the system is available from
1484      <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.      <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.
1485      This should also be included in the bug report.      This should also be included in the bug report.
1486      <screenshot>      <figure>
1487      <screeninfo>Error Dialog</screeninfo>      <title>Error Dialog</title>
1488      <mediaobject>      <mediaobject>
1489      <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>
1490      <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>  
1491      </mediaobject>      </mediaobject>
1492      </screenshot>      </figure>
1493      </para>      </para>
1494    
1495    </chapter>    </chapter>
# Line 1324  Line 1526 
1526      </listitem>      </listitem>
1527      </varlistentry>      </varlistentry>
1528    
1529        <varlistentry>
1530        <term>Raster files</term>
1531        <listitem>
1532            <para>
1533            Binding the GDAL library Thuban supports numerous raster file formats,
1534            see <ulink url="http://www.remotesensing.org/gdal/formats_list.html">
1535            GDAL format list</ulink> for details.</para>
1536    
1537            <para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis>
1538            format: Raster maps are provided as TIFF images, with an additional
1539            "world file" storing the geographic reference (usually with an
1540            extension ".tfw").
1541            </para>
1542        </listitem>
1543        </varlistentry>
1544    
1545      </variablelist>      </variablelist>
1546    </appendix>    </appendix>
1547    
# Line 1334  Line 1552 
1552      to create custom projections. Thuban comes with predefined      to create custom projections. Thuban comes with predefined
1553      projections which are available through the Projections dialog.      projections which are available through the Projections dialog.
1554      </para>      </para>
1555      <variablelist>      <itemizedlist>
1556      <varlistentry>      <listitem>
1557          <term>Geographic</term>          <para>Geographic</para>
1558          <listitem><para><literal>Ellipsoid</literal></para>          <itemizedlist>
1559          <para><literal>Source Data</literal>: either Degrees or Radians          <listitem><para><literal>Ellipsoid</literal></para></listitem>
1560            <listitem><para>
1561                    <literal>Source Data</literal>: either Degrees or Radians
1562                  </para></listitem>                  </para></listitem>
1563      </varlistentry>          </itemizedlist>
1564      <varlistentry>      </listitem>
1565          <term>Lambert Conic Conformal</term>      <listitem>
1566          <listitem><para><literal>Ellipsoid</literal></para>          <para>Lambert Conic Conformal</para>
1567          <para><literal>Latitude of 1st standard parallel</literal></para>      <itemizedlist>
1568          <para><literal>Latitude of 2nd standard parallel</literal></para>          <listitem><para><literal>Ellipsoid</literal></para></listitem>
1569          <para><literal>Central Meridian</literal></para>          <listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem>
1570          <para><literal>Latitude of Origin</literal></para>          <listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem>
1571          <para><literal>False Easting</literal> (meters)</para>          <listitem><para><literal>Central Meridian</literal></para></listitem>
1572          <para><literal>False Northing</literal> (meters)</para></listitem>          <listitem><para><literal>Latitude of Origin</literal></para></listitem>
1573      </varlistentry>          <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
1574      <varlistentry>          <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
1575          <term>Transverse Mercator</term>      </itemizedlist>
1576          <listitem><para><literal>Ellipsoid</literal></para>      </listitem>
1577          <para><literal>Latitude</literal>of origin</para>      <listitem>
1578          <para><literal>Longitude</literal>at central meridian</para>          <para>Transverse Mercator</para>
1579          <para><literal>Scale Factor</literal>at central meridian</para>      <itemizedlist>
1580          <para><literal>False Easting</literal> (meters)</para>          <listitem><para><literal>Ellipsoid</literal></para></listitem>
1581          <para><literal>False Northing</literal> (meters)</para></listitem>          <listitem><para><literal>Latitude</literal>of origin</para></listitem>
1582      </varlistentry>          <listitem><para><literal>Longitude</literal>at central meridian</para></listitem>
1583      <varlistentry>          <listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem>
1584          <term>Universal Transverse Mercator</term>          <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
1585          <listitem><para><literal>Ellipsoid</literal></para>          <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
1586          <para><literal>Zone</literal>      </itemizedlist>
1587                  (can be guessed appling the Propose button)</para>      </listitem>
1588          <para><literal>Southern Hemisphere</literal> flag</para></listitem>      <listitem>
1589      </varlistentry>          <para>Universal Transverse Mercator</para>
1590      </variablelist>      <itemizedlist>
1591            <listitem><para><literal>Ellipsoid</literal></para></listitem>
1592            <listitem><para><literal>Zone</literal>
1593                    (can be guessed appling the Propose button)</para></listitem>
1594            <listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem>
1595        </itemizedlist>
1596        </listitem>
1597        </itemizedlist>
1598            
1599      <para>      <para>
1600      Thuban comes with a sample set of map projections for various      Thuban comes with a sample set of map projections for various
1601      European countries. Apart from the basic projection they differ      European countries. Apart from the basic projection they differ
1602      especially in their parameterization:      especially in their parameterization:
1603      </para>      </para>
1604      <variablelist>      <itemizedlist>
1605      <varlistentry><term>Belgium Datum 1972 (Lambert Conic Conformal)</term>      <listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para>
1606          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1607    
1608      <varlistentry><term>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</term>      <listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para>
1609          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1610    
1611      <varlistentry><term>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)      <listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)
1612      </term>      </para>
1613          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1614    
1615      <varlistentry><term>Reseau Geodesique Francaise      <listitem><para>Reseau Geodesique Francaise
1616      (France, Lambert Conic Conformal)</term>      (France, Lambert Conic Conformal)</para>
1617          <listitem><para></para></listitem>      </listitem>
     </varlistentry>  
1618    
1619      <varlistentry><term>UK National Grid (United Kingdom, Transverse Mercartor)      <listitem><para>UK National Grid (United Kingdom, Transverse Mercartor)
1620      </term>      </para>
1621          <listitem><para></para></listitem>      </listitem>
1622      </varlistentry>      </itemizedlist>
     </variablelist>  
1623    
1624      <para>      <para>
1625      Thuban uses the comprehensive PROJ library for projections. PROJ provides      Thuban uses the comprehensive PROJ library for projections. PROJ provides

Legend:
Removed from v.1530  
changed lines
  Added in v.1624

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26