Skip to content

Commit

Permalink
Restore utils.py and small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelegissi committed Jul 31, 2023
1 parent 13655a1 commit 4cf480b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion qgis2fds_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@

import os, sys
from .types import (
utils,
FDSCase,
Domain,
OBSTTerrain,
GEOMTerrain,
LanduseType,
Texture,
Wind,
utils,
)
from . import algos
import processing
Expand Down
4 changes: 2 additions & 2 deletions qgis2fds_export_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)
import processing, math
from .qgis2fds_params import *
from . import utilities
from .types import utils

DEBUG = True

Expand Down Expand Up @@ -150,7 +150,7 @@ def processAlgorithm(self, parameters, context, model_feedback):
wgs84_origin = origin.clone()
wgs84_origin.transform(prj_to_wgs84_tr)

utm_epsg = utilities.lonlat_to_epsg(lon=wgs84_origin.x(), lat=wgs84_origin.y())
utm_epsg = utils.lonlat_to_epsg(lon=wgs84_origin.x(), lat=wgs84_origin.y())
utm_crs = QgsCoordinateReferenceSystem(utm_epsg)
wgs84_to_utm_tr = QgsCoordinateTransform(wgs84_crs, utm_crs, project)
utm_origin = wgs84_origin.clone() # FIXME better way?
Expand Down
8 changes: 4 additions & 4 deletions types/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def __init__(
# Calc domain XB, relative to origin,
# and a little smaller than the terrain
dom_xb = (
utm_extent.xMinimum() - utm_origin.x() + 1.,
utm_extent.xMaximum() - utm_origin.x() - 1.,
utm_extent.yMinimum() - utm_origin.y() + 1.,
utm_extent.yMaximum() - utm_origin.y() - 1.,
utm_extent.xMinimum() - utm_origin.x() + 1.0,
utm_extent.xMaximum() - utm_origin.x() - 1.0,
utm_extent.yMinimum() - utm_origin.y() + 1.0,
utm_extent.yMaximum() - utm_origin.y() - 1.0,
min_z,
max_z + cell_size * 10, # 10 cells over max z
)
Expand Down
1 change: 0 additions & 1 deletion types/landuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


class LanduseType:

_scan_id = re.compile( # search ID value in SURF
r"""
[,\s\t]+ # 1+ separator
Expand Down
2 changes: 0 additions & 2 deletions types/terrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ def _save_bingeom(self) -> None:
fds_volus=list(),
)



def get_fds(self) -> str:
"""Get the FDS text and save."""
self._save_bingeom()
Expand Down
File renamed without changes.

0 comments on commit 4cf480b

Please sign in to comment.