8.2. Extensions included in Thuban package

The extensions described in this section are part of the Thuban package. Since version 1.2.1, Thuban will attempt to import all interesting extensions. The administrator can configure this for the installation in the file thuban_cfg.py. You will find the code of the extentions in the Thuban installation directory under Extensions/. If they are not imported by thuban_cfg.py you can activate them as personal personal extensions via PYTHONPATH as described in the previous section. Extensions will appear under the menu Extensions and extensions which are in the state of being experimental or testing will be indicated as such in their menu entry text.

8.2.1. Stable extensions

These extensions provide extra-functionality to Thuban that has not (yet) been integrated in the main application. They are considered to be free of bugs, but may be further polished with helpful user interactions.

8.2.1.1. gns2shp

This tool converts data of the Geospatial Names Server (GNS, see http://www.nima.mil/gns) into Shapefile format. The above web-site offer to download named places information grouped by countries for all of the world except USA for which other data are provided.

If you download and unpack a package, you will have a text-file with suffix .txt. Selecting such a file via gns2shp will create the corresponding Shapefile with the same basename and place it in the same direcory. Afterwards it is automatically loaded into Thuban. The Shapefile will not automatically be delete afterwards.

The gns2shp.py module can also be executed on the command line for batch processing purposes.

A sample (ls.txt for Liechtenstein) is included in the directory Extensions/gns2shp/test.

8.2.1.2. SVG Export

Map and legend can be exported separately in the Thuban-Map-SVG format. You get files that comply with the Scalable Vector Graphics (SVG) 1.1 Specification and can be read by many vector drawing applications.

Goal of svgexport is to provide the start of a printing pipeline for Thuban. For this purpose the written Thuban-Map-SVG files contain information that can be used in postprocessing. Typically a general vector drawing application is more powerful then a geographic information viewer; e.g. having much fancier symbols and fonts. Also users benefit much more when learning to use a more general application they can also use for other tasks. So the charming idea is to enable the drawing application to postprocess a Thuban maps. So thee xtra information in the format will make it possible to export from Thuban and if a few geoobjects change, and keep the general layout and style of the full map in the vector drawing appplication.

Markus Rechtien has developed a prototype of this printing pipline as his Diplom thetis, showing the feasability of Bernhard Reiter's concept. Scripts exist for the drawing application Skencil (http://www.skencil.org).

Technical notes: the names of the layers are used as base for ids within the SVG format. If you try to export with two layers having the same name, you will get a name clash error. Just change one of the layer names and try again.

8.2.2. Experimental extensions

All all of these functions have to be handled with care, since they are neither complete nor well tested. They are to be seen as a proof-of-concept and may additionally in some cases of practical help.

Any interest on further improvement of these extensions should be communicated towards the developer and user community.

8.2.2.1. importAPR

This command offer to load an ESRI® ArcView® project file (suffix .apr) and convert it for use within Thuban. After selecting a apr-file to load, a list will be presented that offers to select one of the views of the apr-file, provided there is more than one. Furthermore, the Session Info-Tree is extended with a complete representation of the parsed apr-file.

The legend of Thuban does not yet cover all of the elements as supported by the legend of ArcView®. Therefore, the Thuban map will look different. Furthermore, the apr-format is a proprietary format, not openly documented. Therefore, the interpretation is partly based on reverse engeneering and good guessing.

The file-paths within the apr-file may not fit and potentially are subject to fix in the apr-file. You can do this applying any text editor. The paths are either absolute or relative from where Thuban has been started.

A sample for the Iceland data is included as Extensions/importAPR/samples/iceland.apr. The file-paths are relative from the Thuban main directory.