Skip to content

Commit

Permalink
update cool_distance to cool_dsitances
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Jun 13, 2024
1 parent ad32642 commit 40a2733
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ abstract class AbstractBDTopoWorkflow extends BDTopoUtils {
"BUILDING_HEIGHT_WEIGHTED", "BUILDING_SURFACE_DENSITY",
"BUILDING_HEIGHT_DIST", "FRONTAL_AREA_INDEX", "SEA_LAND_FRACTION", "ASPECT_RATIO",
"SVF", "HEIGHT_OF_ROUGHNESS_ELEMENTS", "TERRAIN_ROUGHNESS_CLASS", "URBAN_SPRAWL_AREAS",
"URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCE"]
"URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCES"]
def allowedOutputIndicators = allowed_grid_indicators.intersect(list_indicators*.toUpperCase())
if (allowedOutputIndicators) {
//Update the RSU indicators list according the grid indicators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ String rasterizeIndicators(JdbcDataSource datasource,
/*
* Make aggregation process with previous grid and current rsu lcz
*/
if (list_indicators_upper.intersect(["LCZ_FRACTION", "LCZ_PRIMARY", "URBAN_SPRAWL_AREAS", "URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCE"]) && rsu_lcz) {
if (list_indicators_upper.intersect(["LCZ_FRACTION", "LCZ_PRIMARY", "URBAN_SPRAWL_AREAS", "URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCES"]) && rsu_lcz) {
def indicatorName = "LCZ_PRIMARY"
String upperScaleAreaStatistics = Geoindicators.GenericIndicators.upperScaleAreaStatistics(
datasource, grid, grid_column_identifier,
Expand Down Expand Up @@ -2176,15 +2176,15 @@ Map sprawlIndicators(JdbcDataSource datasource, String grid_indicators, String i
}

//Concert the list of indicators to upper case
allowed_indicators = ["URBAN_SPRAWL_AREAS", "URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCE"]
allowed_indicators = ["URBAN_SPRAWL_AREAS", "URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCES"]
def list_indicators_upper = list_indicators.collect { it.toUpperCase() }

def tablesToDrop = []
def tablesToJoin = [:]
tablesToJoin.put(grid_indicators, id_grid)
String sprawl_areas
String cool_areas
if (list_indicators_upper.intersect(["URBAN_SPRAWL_AREAS", "URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCE"]) && grid_indicators) {
if (list_indicators_upper.intersect(["URBAN_SPRAWL_AREAS", "URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCES"]) && grid_indicators) {
sprawl_areas = Geoindicators.SpatialUnits.computeSprawlAreas(datasource, grid_indicators, distance )
}
if (sprawl_areas) {
Expand All @@ -2207,7 +2207,7 @@ Map sprawlIndicators(JdbcDataSource datasource, String grid_indicators, String i
}
}
}
if (list_indicators_upper.contains("URBAN_SPRAWL_COOL_DISTANCE")) {
if (list_indicators_upper.contains("URBAN_SPRAWL_COOL_DISTANCES")) {
cool_areas = Geoindicators.SpatialUnits.extractCoolAreas(datasource, grid_indicators, sprawl_areas, (distance / 2) as float)
if (cool_areas) {
String inverse_cool_areas = Geoindicators.SpatialUnits.inversePolygonsLayer(datasource, sprawl_areas,cool_areas)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ def extractProcessingParameters(def processing_parameters) throws Exception {
"BUILDING_HEIGHT_WEIGHTED", "BUILDING_SURFACE_DENSITY", "BUILDING_HEIGHT_DIST",
"FRONTAL_AREA_INDEX", "SEA_LAND_FRACTION", "ASPECT_RATIO", "SVF",
"HEIGHT_OF_ROUGHNESS_ELEMENTS", "TERRAIN_ROUGHNESS_CLASS", "URBAN_SPRAWL_AREAS",
"URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCE"]
"URBAN_SPRAWL_DISTANCES", "URBAN_SPRAWL_COOL_DISTANCES"]
def allowedOutputIndicators = allowed_grid_indicators.intersect(list_indicators*.toUpperCase())
if (allowedOutputIndicators) {
//Update the RSU indicators list according the grid indicators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ class WorflowOSMTest extends WorkflowAbstractTest {
// "HEIGHT_OF_ROUGHNESS_ELEMENTS", "TERRAIN_ROUGHNESS_CLASS",
"URBAN_SPRAWL_AREAS",
"URBAN_SPRAWL_DISTANCES",
"URBAN_SPRAWL_COOL_DISTANCE"]/*,
"URBAN_SPRAWL_COOL_DISTANCES"]/*,
"lcz_lod":1*/
], "worldpop_indicators": true
/*
Expand Down

0 comments on commit 40a2733

Please sign in to comment.