Skip to content
Snippets Groups Projects
Commit dadc9f9c authored by paul.tresson_ird.fr's avatar paul.tresson_ird.fr
Browse files

dirty temporary fix for gpd io error if using pygrio (try except causes a rasterio error ??)

parent 29a46d0e
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ import joblib ...@@ -7,6 +7,7 @@ import joblib
from collections import Counter from collections import Counter
from pathlib import Path from pathlib import Path
from typing import Dict, Any from typing import Dict, Any
from qgis.core import ( from qgis.core import (
Qgis, Qgis,
QgsGeometry, QgsGeometry,
...@@ -25,11 +26,23 @@ from qgis.core import ( ...@@ -25,11 +26,23 @@ from qgis.core import (
QgsProcessingParameterDefinition, QgsProcessingParameterDefinition,
QgsProcessingParameterVectorLayer, QgsProcessingParameterVectorLayer,
) )
import rasterio import rasterio
from rasterio import windows from rasterio import windows
from rasterio.enums import Resampling from rasterio.enums import Resampling
import geopandas as gpd import geopandas as gpd
# SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
# PLUGIN_ROOT_DIR = os.path.realpath(
# os.path.abspath(os.path.join(SCRIPT_DIR, ".."))
# )
# try:
# tmp = gpd.read_file(os.path.abspath(os.path.join(PLUGIN_ROOT_DIR, 'assets','ml.shp')))
# except ValueError:
# gpd.options.io_engine = "fiona"
# print('Using fiona as gpd backend')
gpd.options.io_engine = "fiona"
from shapely.geometry import box from shapely.geometry import box
import torch import torch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment