Package: thuban / 1.2.2-14

gdal.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: Import ogr and gdal from osgeo module.
Author: Francesco Paolo Lovergine <frankie@debian.org>
Last-Update: 2011-11-03

--- a/Extensions/ogr/ogrdialog.py
+++ b/Extensions/ogr/ogrdialog.py
@@ -14,7 +14,7 @@ import sys, traceback
 import wx
 
 try:
-    import ogr
+    from osgeo import ogr
 except ImportError:
     ogr = None
 
--- a/Extensions/ogr/ogrshapes.py
+++ b/Extensions/ogr/ogrshapes.py
@@ -12,7 +12,7 @@ __version__ = "$Revision: 2770 $"
 # $Id: ogrshapes.py 2770 2007-05-22 08:54:41Z bh $
 
 try:
-    import ogr
+    from osgeo import ogr
 except ImportError:
     ogr = None
 
--- a/Thuban/Model/layer.py
+++ b/Thuban/Model/layer.py
@@ -395,8 +395,8 @@ class Layer(BaseLayer):
 
 
 if resource.has_gdal_support():
-    import gdal
-    from gdalconst import GA_ReadOnly
+    from osgeo import gdal
+    from osgeo.gdalconst import GA_ReadOnly
 
 class RasterLayer(BaseLayer):