23 |
|
|
24 |
import os, sys |
import os, sys |
25 |
|
|
26 |
# only import GUI when not called as command line tool |
# only import GUI and register when not called as command line tool |
27 |
if __name__ != '__main__': |
if __name__ != '__main__': |
28 |
from wxPython.wx import * |
from wxPython.wx import * |
29 |
|
|
32 |
from Thuban import _ |
from Thuban import _ |
33 |
from Thuban.Model.layer import Layer |
from Thuban.Model.layer import Layer |
34 |
|
|
35 |
|
from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry |
36 |
|
|
37 |
import shapelib |
import shapelib |
38 |
import dbflib |
import dbflib |
39 |
|
|
40 |
|
|
41 |
|
ext_registry.add(ExtensionDesc( |
42 |
|
name = 'gns2shp', |
43 |
|
version = '1.0.0', |
44 |
|
authors= [ 'Jan-Oliver Wagner' ], |
45 |
|
copyright = '2003, 2004 Intevation GmbH', |
46 |
|
desc = _("Converts GNS (Geographical Name Service\n" \ |
47 |
|
"of NIMA) to Shapefile format and\n" \ |
48 |
|
"displays the data."))) |
49 |
|
|
50 |
|
|
51 |
def gns2shp(src_fname, dest_fname): |
def gns2shp(src_fname, dest_fname): |
52 |
"""Convert a file from gns textformat into a Shapefile. |
"""Convert a file from gns textformat into a Shapefile. |
53 |
|
|