Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
Fixed macos gdal import bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroalberti committed Mar 10, 2021
1 parent e6a05fa commit 1e24085
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
5 changes: 4 additions & 1 deletion BestFitPlaneTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@

import sqlite3

from osgeo import ogr
try:
from osgeo import ogr
except ImportError:
import ogr

from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
Expand Down
7 changes: 5 additions & 2 deletions DEMPlaneIntersectionTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@

from qgis.core import *
from qgis.gui import *

from osgeo import ogr

try:
from osgeo import ogr
except ImportError:
import ogr

from .pygsf.topography.plane_intersect import plane_dem_intersection
from .pygsf.orientations.orientations import Plane, Direct
Expand Down
5 changes: 4 additions & 1 deletion PtsPlnDistances.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *

from osgeo import ogr
try:
from osgeo import ogr
except ImportError:
import ogr

from .config.general_params import *
from .config.plane_points_distances_params import output_table_fields_pars
Expand Down
2 changes: 1 addition & 1 deletion config/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version: 2.1.1
version: 2.1.2
tools:
bestfitplane_tool_params:
tool_nm: Best fit plane
Expand Down
4 changes: 0 additions & 4 deletions help/help_di.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

<h3>qgSurf - DEM-plane intersection - help</h3>

<div style="font-size: 90%; font-style: italic;">
plugin creator: Mauro Alberti.
</div>

<h4>Rationale</h4>

<div>
Expand Down
4 changes: 2 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name=qgSurf
description=Processing of geological planes and surfaces
about=qgSurf is a field-mapping/structural-geology plugin for: a) estimating the attitude of sub-planar geological surfaces given three or more points on a topographic surface; b) determining the intersection between a geological plane and a topographic surface; c) calculating the distance between points and a geological plane; d) plotting geological data in a stereonet.
category=Plugins
version=version 2.2.0
version=version 2.1.2
experimental=False
qgisMinimumVersion=3.0
author=Mauro Alberti
Expand All @@ -12,7 +12,7 @@ icon=./icons/qgsurf.png

; start of optional metadata
changelog=
2.2.0: [20200606-...] adding funcs to stereoplot submodule
2.1.2: [20210310] updated embedded mplstereonet and apsg modules; fixed macOs gdal import error
2.1.1: [20200502] fixed bugs related to (1) apsg plane plotting and (2) plot of linear data
2.1.0: [20190312] in DEM-plane intersection, dip angle is decimal (with one digit)
[20190501] in Geological Plane - Points Distances, more variables for each point are calculated
Expand Down
6 changes: 5 additions & 1 deletion pygsf/libs_utils/gdal/gdal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

import numpy as np

import gdal
try:
from osgeo import gdal
except ImportError:
import gdal


from .exceptions import *

Expand Down
5 changes: 4 additions & 1 deletion pygsf/libs_utils/gdal/ogr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import os
from typing import Dict, Tuple, Union, List

from osgeo import ogr, osr
try:
from osgeo import ogr, osr
except ImportError:
import ogr, osr

from .exceptions import *

Expand Down

0 comments on commit 1e24085

Please sign in to comment.