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 |
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. All the necessary files can be found on the |
and Windows 2000. Thuban depends on the following packages. These |
79 |
|
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 |
</para> |
<itemizedlist> |
84 |
|
<listitem><para>Python 2.2.1 (<literal>http://www.python.org</literal>)</para></listitem> |
85 |
|
<listitem><para>wxWindows 2.4 (<literal>http://www.wxwindows.org</literal>)</para></listitem> |
86 |
|
<listitem><para>wxPython 2.4 (<literal>http://www.wxpython.org</literal>)</para></listitem> |
87 |
|
<listitem><para>proj 4.4.5 Projection Library (<literal>http://www.remotesensing.org/proj/</literal>)</para></listitem> |
88 |
|
<listitem><para>GDAL 1.1.8 (<literal>http://www.remotesensing.org/gdal/</literal>)</para></listitem> |
89 |
|
<listitem><para>SQLite 2.8.3 (<literal>http://www.hwaci.com/sw/sqlite/</literal>)</para></listitem> |
90 |
|
<listitem><para>PySQLite 0.4.3 (<literal>http://pysqlite.sourceforge.net</literal>)</para></listitem> |
91 |
|
</itemizedlist> |
92 |
|
</para> |
93 |
|
<para> |
94 |
|
Along with the source codes, the download page also offers |
95 |
|
full installation packages for Debian, Windows and RPM-based systems |
96 |
|
(Mandrake, RedHat, SuSE, etc). |
97 |
|
</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> |
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 |
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 use 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. |
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> |
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> |
308 |
</inlinemediaobject> |
</inlinemediaobject> |
309 |
enlarges a region of the map. Clicking once on the map |
enlarges a region of the map. Clicking once on the map |
310 |
will double the magnification and center the map on the point that |
will double the magnification and center the map on the point that |
311 |
was clicked. Clicking and dragging selects a region that will |
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> |
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> |
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> |
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> |
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> |
392 |
rescales the viewable region so that the currently selected |
rescales the viewable region so that the currently selected |
393 |
shape fits within the window. If the shape is a point, it is |
shape fits within the window. If the shape is a point, it is |
394 |
centered and the map is zoomed all the way in. If no shape is |
centered and the map is zoomed all the way in. If no shape is |
395 |
selected this button will be disabled. |
selected this button will be disabled. This feature is especially |
396 |
|
helpful when identifying an object related to a selected record |
397 |
|
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> |
415 |
</inlinemediaobject>. |
</inlinemediaobject>. |
416 |
Clicking on an object selects that object and opens a dialog which |
Clicking on an object selects that object and opens a dialog which |
417 |
shows all the table attributes for that object. Any current selection |
shows all the table attributes for that object. Any current selection |
418 |
is lost. |
is lost. Objects on the map are typically shapes and this document |
419 |
|
will often refer to objects as shapes. |
420 |
</para> |
</para> |
421 |
</section> |
</section> |
422 |
|
|
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> |
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 |
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 |
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> |
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> |
543 |
hidden. |
hidden. |
544 |
</para> |
</para> |
545 |
|
|
546 |
|
</listitem> |
547 |
|
<listitem> |
548 |
<para> |
<para> |
549 |
The Invisible tool |
The Invisible tool |
550 |
<inlinemediaobject> |
<inlinemediaobject> |
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> |
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> |
580 |
|
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 |
582 |
|
projection set. |
583 |
|
</para> |
584 |
</section> |
</section> |
585 |
|
|
586 |
<section><title>Exporting</title> |
<section><title>Exporting</title> |
591 |
<menuchoice> |
<menuchoice> |
592 |
<guimenu>Map</guimenu> |
<guimenu>Map</guimenu> |
593 |
<guimenuitem>Export</guimenuitem> |
<guimenuitem>Export</guimenuitem> |
594 |
</menuchoice>. Under other platforms this option is not available. |
</menuchoice> for use in reports, presentations, or further |
595 |
Clicking this menu item open a file selection dialog that lets the |
modification. The current map view, legend, and, if available, |
596 |
user select a location to export the map. |
scalebar are exported. Under other platforms this option is not |
597 |
|
available. Clicking this menu item open a file selection dialog |
598 |
|
that lets the user select a location to export the map. |
599 |
</para> |
</para> |
600 |
</section> |
</section> |
601 |
|
|
605 |
<menuchoice> |
<menuchoice> |
606 |
<guimenu>Map</guimenu> |
<guimenu>Map</guimenu> |
607 |
<guimenuitem>Print</guimenuitem> |
<guimenuitem>Print</guimenuitem> |
608 |
</menuchoice>. A standard printing dialog will open allowing the |
</menuchoice>. The current map view, legend, and, if available, |
609 |
user to configure the printer. This dialog will differ depending |
scalebar are printed. A standard printing dialog will open allowing |
610 |
|
the user to configure the printer. This dialog will differ depending |
611 |
on which platform Thuban is running. |
on which platform Thuban is running. |
612 |
</para> |
</para> |
613 |
</section> |
</section> |
623 |
There are two types of layers supported by Thuban: shape layers and |
There are two types of layers supported by Thuban: shape layers and |
624 |
image layers. Shape layers consist of vector based shapes with |
image layers. Shape layers consist of vector based shapes with |
625 |
geo-referenced coordinates. There are three types of supported |
geo-referenced coordinates. There are three types of supported |
626 |
shapes: polygons, lines, and points. Image layers can be any image |
shapes: polygons, lines (arc), and points. Image layers can be any image |
627 |
file format supported by the Geo-spatial Data Abstraction Library |
file format supported by the Geo-spatial Data Abstraction Library |
628 |
(GDAL). The images must have geographic |
(GDAL). The images must have geographic |
629 |
coordinate data either embedded within the file or in a separate |
coordinate data either embedded within the file or in a separate |
631 |
work very well with Thuban and were designed specifically to be image |
work very well with Thuban and were designed specifically to be image |
632 |
layers in GIS programs. |
layers in GIS programs. |
633 |
</para> |
</para> |
634 |
|
<para> |
635 |
|
All actions in the |
636 |
|
<menuchoice> |
637 |
|
<guimenu>Layer</guimenu> |
638 |
|
</menuchoice> menu act on the currently selected layer in the legend. |
639 |
|
</para> |
640 |
</section> |
</section> |
641 |
|
|
642 |
<section><title>Properties</title> |
<section><title>Properties</title> |
647 |
<guimenu>Layer</guimenu> |
<guimenu>Layer</guimenu> |
648 |
<guimenuitem>Properties</guimenuitem> |
<guimenuitem>Properties</guimenuitem> |
649 |
</menuchoice> opens a dialog that displays a layer's properties. |
</menuchoice> opens a dialog that displays a layer's properties. |
650 |
All layers have a title and it can be modified in the text field |
All layers have a title which can be modified in the text field |
651 |
provided. The type of layer is also shows. If the type is a type |
provided. The type of layer is also shows. If the type is a type |
652 |
of shape (polygon, arc, point) the classification table will be |
of shape (polygon, arc, point) the classification table will be |
653 |
shown. Image layers have no other properties other than title |
shown. Image layers have no other properties other than title |
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 |
|
|
735 |
<para> |
<para> |
736 |
A layer always has a classification. When a new layer is added to the |
A layer always has a classification. When a new layer is added to the |
737 |
map, a default classification is created with the DEFAULT group. This |
map, a default classification is created with the DEFAULT group. This |
738 |
group cannot be removed. Every shape in the layer, regardless of its |
group cannot be removed but can be hidden (see below). Every shape in the |
739 |
attributes, will match this group if no other group matches. |
layer, regardless of its attributes, will match this group if no other |
740 |
|
group matches. |
741 |
</para> |
</para> |
742 |
|
|
743 |
<section><title>Editing Classifications</title> |
<section><title>Editing Classifications</title> |
754 |
button. |
button. |
755 |
</para> |
</para> |
756 |
<para> |
<para> |
757 |
<screenshot> |
To apply the changes to the map the user can click |
758 |
<screeninfo>Properties Window</screeninfo> |
either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>. |
759 |
|
<guibutton>Try</guibutton> will not close the dialog box, allowing |
760 |
|
the user to see how the classification changes the map. |
761 |
|
<guibutton>Revert</guibutton> will undo the last classification applied |
762 |
|
to the map. <guibutton>OK</guibutton> will commit the changes and |
763 |
|
close the dialog. The user will be unable to undo the changes. |
764 |
|
<guibutton>Close</guibutton> simply closes the dialog box. If any |
765 |
|
changes have not been applied with <guibutton>Try</guibutton> the |
766 |
|
changes will not be applied to the map. |
767 |
|
</para> |
768 |
|
<para> |
769 |
|
<figure> |
770 |
|
<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 |
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. |
854 |
opens the <varname>Generate Classification</varname> dialog. |
opens the <varname>Generate Classification</varname> dialog. |
855 |
Under the <varname>Generate</varname> pull down there are at most |
Under the <varname>Generate</varname> pull down there are at most |
856 |
three different ways to generate classifications: |
three different ways to generate classifications: |
857 |
Unique Values, Unique Distribution, and Quantiles. Some options |
Unique Values, Uniform Distribution, and Quantiles. Some options |
858 |
may not be available if the data type for the field does not |
may not be available if the data type for the field does not |
859 |
support them. For instance, <varname>Unique Distribution</varname> |
support them. For instance, <varname>Uniform Distribution</varname> |
860 |
doesn't make sense for a Text field. |
doesn't make sense for a Text field. |
861 |
</para> |
</para> |
862 |
<para> |
<para> |
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 |
|
<figure> |
877 |
|
<title>Custom Color Scheme</title> |
878 |
|
<mediaobject> |
879 |
|
<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> |
881 |
|
</mediaobject> |
882 |
|
</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 |
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 |
|
<figure> |
893 |
|
<title>Unique Values</title> |
894 |
|
<mediaobject> |
895 |
|
<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> |
897 |
|
</mediaobject> |
898 |
|
</figure> |
899 |
</para> |
</para> |
900 |
<para> |
<para> |
901 |
The Unique Distribution option creates a user specified number of |
The Uniform Distribution option creates a user specified number of |
902 |
groups of ranges such that each range covers equal intervals. The |
groups of ranges such that each range covers equal intervals. The |
903 |
minimum and maximum values can automatically be retrieved from the |
minimum and maximum values can automatically be retrieved from the |
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 |
|
<figure> |
908 |
|
<title>Uniform Distribution</title> |
909 |
|
<mediaobject> |
910 |
|
<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> |
912 |
|
</mediaobject> |
913 |
|
</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 |
917 |
in the input set. For example, by specifying five groups Thuban will |
in the table. For example, by specifying five groups Thuban will |
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 |
|
<figure> |
922 |
|
<title>Quantiles</title> |
923 |
|
<mediaobject> |
924 |
|
<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> |
926 |
|
</mediaobject> |
927 |
|
</figure> |
928 |
</para> |
</para> |
929 |
</section> |
</section> |
930 |
</chapter> |
</chapter> |
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 |
984 |
<guibutton>Remove</guibutton> button will permanently remove a |
<guibutton>Remove</guibutton> button will permanently remove a |
985 |
projection from the list of available projections. |
projection from the list of available projections. |
986 |
</para> |
</para> |
987 |
|
<para> |
988 |
|
To apply the selected projection to the map the user can click |
989 |
|
either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>. |
990 |
|
<guibutton>Try</guibutton> will not close the dialog box, allowing |
991 |
|
the user to see how the projeciton changes the map. |
992 |
|
<guibutton>Revert</guibutton> will undo the last projection applied |
993 |
|
to the map. <guibutton>OK</guibutton> will commit the changes and |
994 |
|
close the dialog. The user will be unable to undo the changes. |
995 |
|
<guibutton>Close</guibutton> simply closes the dialog box. If no |
996 |
|
selection has been applied with <guibutton>Try</guibutton> the |
997 |
|
selection will not be applied to the map. |
998 |
|
</para> |
999 |
</section> |
</section> |
1000 |
<section><title>Importing/Exporting Projections</title> |
<section><title>Importing/Exporting Projections</title> |
1001 |
<para> |
<para> |
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 |
1035 |
Table View. The view falls has five sections: The title, selections, |
Table View. The view has five sections: The title, selections, |
1036 |
the table grid, export functions, and the status bar. |
the table grid, export functions, and the status bar. |
1037 |
</para> |
</para> |
1038 |
<para> |
<para> |
1045 |
third choice can be either a specific value (interpreted as numerical |
third choice can be either a specific value (interpreted as numerical |
1046 |
or string depending on the type of the first field) or a second field |
or string depending on the type of the first field) or a second field |
1047 |
identifier. Thus you can perform analysis like selecting all |
identifier. Thus you can perform analysis like selecting all |
1048 |
records where "population > 10000" or |
records where <literal>population > 10000</literal> or |
1049 |
"cars_per_inhabitant < bikes_per_inhabitant" (note that the field names |
<literal>cars_per_inhabitant < bikes_per_inhabitant</literal> |
1050 |
are only explanatory, the dBase files allow only |
(note that the field names are only explanatory, the dBase files |
1051 |
11 character field names). |
allow only 11 character field names). |
1052 |
|
|
1053 |
Selections can be combined either by applying a selection only on |
Selections can be combined either by applying a selection only on |
1054 |
a previously selected set of records or by adding the results of a |
a previously selected set of records or by adding the results of a |
1056 |
earlier results. |
earlier results. |
1057 |
</para> |
</para> |
1058 |
<para> |
<para> |
1059 |
The table grid shows the contents of the table (a record per column), |
The table grid shows the contents of the table (one record per row), |
1060 |
with highlighted selection results. Columns and rows can be resized. |
with highlighted selection results. Columns and rows can be resized. |
1061 |
</para> |
</para> |
1062 |
<para> |
<para> |
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 |
1181 |
</section> |
</section> |
1182 |
<section><title>Attribute Tables</title> |
<section><title>Attribute Tables</title> |
1183 |
<para> |
<para> |
1184 |
To clearly separate between both types, Thuban provides |
To clearly separate between both types of tables (data and |
1185 |
functionality regarding the attribute tables under the Layer menu. |
attribute), Thuban provides functionality regarding the attribute |
1186 |
|
tables under the <menuchoice><guimenu>Layer</guimenu></menuchoice> menu. |
1187 |
</para> |
</para> |
1188 |
|
|
1189 |
<section><title>Show Table</title> |
<section><title>Show Table</title> |
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. |
1448 |
</para> |
</para> |
1449 |
<variablelist> |
<para> |
1450 |
|
|
1451 |
<varlistentry> |
<itemizedlist> |
|
<term>After adding two or more layers nothing is being 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 layer's 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 |
1482 |
compiler. |
compiler. |
1483 |
</para> |
</para> |
1484 |
</listitem> |
</listitem> |
1485 |
</varlistentry> |
</itemizedlist> |
1486 |
</variablelist> |
</para> |
1487 |
|
<para> |
1488 |
|
If an error occurs Thuban will display a dialog indicating the error |
1489 |
|
before closing. The text should be copied and reported to the |
1490 |
|
<ulink url="http://thuban.intevation.org/bugtracker.html"> |
1491 |
|
Intevation bugtracker |
1492 |
|
</ulink>. |
1493 |
|
More information about the system is available from |
1494 |
|
<menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box. |
1495 |
|
This should also be included in the bug report. |
1496 |
|
<figure> |
1497 |
|
<title>Error Dialog</title> |
1498 |
|
<mediaobject> |
1499 |
|
<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> |
1501 |
|
</mediaobject> |
1502 |
|
</figure> |
1503 |
|
</para> |
1504 |
|
|
1505 |
</chapter> |
</chapter> |
1506 |
|
|
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 |
|
|
1560 |
The following types of projections are directly support by |
The following types of projections are directly support by |
1561 |
Thuban. The specific values for each are provided by the user |
Thuban. The specific values for each are provided by the user |
1562 |
to create custom projections. Thuban comes with predefined |
to create custom projections. Thuban comes with predefined |
1563 |
projections and are available through the Projections dialog. |
projections which are available through the Projections dialog. |
1564 |
|
</para> |
1565 |
|
<itemizedlist> |
1566 |
|
<listitem> |
1567 |
|
<para>Geographic</para> |
1568 |
|
<itemizedlist> |
1569 |
|
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
1570 |
|
<listitem><para> |
1571 |
|
<literal>Source Data</literal>: either Degrees or Radians |
1572 |
|
</para></listitem> |
1573 |
|
</itemizedlist> |
1574 |
|
</listitem> |
1575 |
|
<listitem> |
1576 |
|
<para>Lambert Conic Conformal</para> |
1577 |
|
<itemizedlist> |
1578 |
|
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
1579 |
|
<listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem> |
1580 |
|
<listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem> |
1581 |
|
<listitem><para><literal>Central Meridian</literal></para></listitem> |
1582 |
|
<listitem><para><literal>Latitude of Origin</literal></para></listitem> |
1583 |
|
<listitem><para><literal>False Easting</literal> (meters)</para></listitem> |
1584 |
|
<listitem><para><literal>False Northing</literal> (meters)</para></listitem> |
1585 |
|
</itemizedlist> |
1586 |
|
</listitem> |
1587 |
|
<listitem> |
1588 |
|
<para>Transverse Mercator</para> |
1589 |
|
<itemizedlist> |
1590 |
|
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
1591 |
|
<listitem><para><literal>Latitude</literal>of origin</para></listitem> |
1592 |
|
<listitem><para><literal>Longitude</literal>at central meridian</para></listitem> |
1593 |
|
<listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem> |
1594 |
|
<listitem><para><literal>False Easting</literal> (meters)</para></listitem> |
1595 |
|
<listitem><para><literal>False Northing</literal> (meters)</para></listitem> |
1596 |
|
</itemizedlist> |
1597 |
|
</listitem> |
1598 |
|
<listitem> |
1599 |
|
<para>Universal Transverse Mercator</para> |
1600 |
|
<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> |
1610 |
|
Thuban comes with a sample set of map projections for various |
1611 |
|
European countries. Apart from the basic projection they differ |
1612 |
|
especially in their parameterization: |
1613 |
|
</para> |
1614 |
|
<itemizedlist> |
1615 |
|
<listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para> |
1616 |
|
</listitem> |
1617 |
|
|
1618 |
|
<listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para> |
1619 |
|
</listitem> |
1620 |
|
|
1621 |
|
<listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor) |
1622 |
|
</para> |
1623 |
|
</listitem> |
1624 |
|
|
1625 |
|
<listitem><para>Reseau Geodesique Francaise |
1626 |
|
(France, Lambert Conic Conformal)</para> |
1627 |
|
</listitem> |
1628 |
|
|
1629 |
|
<listitem><para>UK National Grid (United Kingdom, Transverse Mercartor) |
1630 |
|
</para> |
1631 |
|
</listitem> |
1632 |
|
</itemizedlist> |
1633 |
|
|
1634 |
|
<para> |
1635 |
|
Thuban uses the comprehensive PROJ library for projections. PROJ provides |
1636 |
|
more than the four commonly used projections described above. If needed |
1637 |
|
Thuban can be easily extended to a new projection covered by PROJ. |
1638 |
</para> |
</para> |
|
<variablelist> |
|
|
<varlistentry> |
|
|
<term>Geographic</term> |
|
|
<listitem><para></para></listitem> |
|
|
</varlistentry> |
|
|
<varlistentry> |
|
|
<term>Lambert Conic Conformal</term> |
|
|
<listitem><para></para></listitem> |
|
|
</varlistentry> |
|
|
<varlistentry> |
|
|
<term>Transverse Mercator</term> |
|
|
<listitem><para></para></listitem> |
|
|
</varlistentry> |
|
|
<varlistentry> |
|
|
<term>Universal Transverse Mercator</term> |
|
|
<listitem><para></para></listitem> |
|
|
</varlistentry> |
|
|
</variablelist> |
|
1639 |
</appendix> |
</appendix> |
1640 |
|
|
1641 |
</book> |
</book> |