Skip to content

Commit

Permalink
Replace ctry_PROJ with aoi_proj and _PROJ with _proj
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed Jun 15, 2024
1 parent b18e065 commit 5fc7810
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions far_functions/far_get_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def finished(self, result):
# Plot
fcc123_file = opj(self.DATA, "fcc123.tif")
png_file = opj(self.OUT, "fcc123.png")
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
fig_fcc123 = far.plot.fcc123(
input_fcc_raster=fcc123_file,
maxpixels=1e8,
Expand All @@ -258,7 +258,7 @@ def finished(self, result):
var_group = root.addGroup("Variables")

# Add border layer to QGis project
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
border_layer = QgsVectorLayer(border_file, "border", "ogr")
border_layer.loadNamedStyle(opj("qgis_layer_style", "border.qml"))
add_layer(far_project, border_layer)
Expand Down
4 changes: 2 additions & 2 deletions far_functions/far_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def plot_prob(self, model, date):
"""Plot probability of deforestation."""
prob_file = opj(self.outdir, f"prob_{model}_{date}.tif")
png_file = opj(self.outdir, f"prob_{model}_{date}.png")
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
fig_prob = far.plot.prob(
input_prob_raster=prob_file,
maxpixels=1e8,
Expand Down Expand Up @@ -274,7 +274,7 @@ def finished(self, result):
predict_group = root.addGroup("FAR models")

# Add border layer to QGis project
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
border_layer = QgsVectorLayer(border_file, "border", "ogr")
border_layer.loadNamedStyle(opj("qgis_layer_style", "border.qml"))
add_layer(far_project, border_layer)
Expand Down
6 changes: 3 additions & 3 deletions rmj_functions/bm_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def plot_prob(self, model, date):
"""Plot probability of deforestation."""
prob_file = opj(self.outdir, f"prob_{model}_{date}.tif")
png_file = opj(self.outdir, f"prob_{model}_{date}.png")
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
fig_prob = rmj.benchmark.plot.vulnerability_map(
input_map=prob_file,
maxpixels=1e8,
Expand Down Expand Up @@ -154,7 +154,7 @@ def run(self):

# Rasterize subjurisdictions
rmj.benchmark.rasterize_subjurisdictions(
input_file=opj(self.DATA, "ctry_PROJ.gpkg"),
input_file=opj(self.DATA, "aoi_proj.gpkg"),
fcc_file=opj(self.datadir, "fcc.tif"),
output_file=opj(self.outdir, "subj.tif"),
verbose=False)
Expand Down Expand Up @@ -243,7 +243,7 @@ def finished(self, result):
mw_group = root.addGroup("Benchmark")

# Add border layer to QGis project
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
border_layer = QgsVectorLayer(
border_file, "border", "ogr")
border_layer.loadNamedStyle(
Expand Down
4 changes: 2 additions & 2 deletions rmj_functions/bm_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def plot_prob(self, model, date):
"""Plot probability of deforestation."""
prob_file = opj(self.outdir, f"prob_{model}_{date}.tif")
png_file = opj(self.outdir, f"prob_{model}_{date}.png")
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
fig_prob = rmj.benchmark.plot.vulnerability_map(
input_map=prob_file,
maxpixels=1e8,
Expand Down Expand Up @@ -218,7 +218,7 @@ def finished(self, result):
mw_group = root.addGroup("Benchmark")

# Add border layer to QGis project
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
border_layer = QgsVectorLayer(border_file, "border", "ogr")
border_layer.loadNamedStyle(opj("qgis_layer_style", "border.qml"))
add_layer(far_project, border_layer)
Expand Down
4 changes: 2 additions & 2 deletions rmj_functions/mw_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def plot_prob(self, model, date):
"""Plot probability of deforestation."""
prob_file = opj(self.outdir, f"prob_{model}_{date}.tif")
png_file = opj(self.outdir, f"prob_{model}_{date}.png")
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
fig_prob = rmj.plot.riskmap(
input_risk_map=prob_file,
maxpixels=1e8,
Expand Down Expand Up @@ -211,7 +211,7 @@ def finished(self, result):
mw_group = root.addGroup("Moving window")

# Add border layer to QGis project
border_file = opj(self.DATA, "ctry_PROJ.gpkg")
border_file = opj(self.DATA, "aoi_proj.gpkg")
border_layer = QgsVectorLayer(border_file, "border", "ogr")
border_layer.loadNamedStyle(opj("qgis_layer_style", "border.qml"))
add_layer(far_project, border_layer)
Expand Down

0 comments on commit 5fc7810

Please sign in to comment.