Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into local_git_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
EllingOftedalKV committed Jan 26, 2024
2 parents 46dad1b + b65413d commit e692a2b
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 140 deletions.
97 changes: 52 additions & 45 deletions file_manager/n100/file_manager_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ def generate_file_name_lyrx(
table_management = "table_management"
grunnriss_to_point = "grunnriss_to_point"


# create_simplified_building_polygons.py
simplify_building_polygons = "simplify_building_polygons"
aggregate_polygons = "aggregate_building_polygons"
simplify_buildings_1 = "simplify_buildings_1"
simplify_buildings_2 = "simplify_buildings_2"
simplify_polygons = "simplify_polygons"
join_and_add_fields = "join_and_add_fields"

# create_cartographic_partitions.py
create_cartographic_partitions = "create_cartographic_partitions"
Expand Down Expand Up @@ -346,11 +351,6 @@ class Building_N100(Enum):
)
)

grunnriss_to_point__aggregated_polygon__n100 = generate_file_name_gdb(
function_name=grunnriss_to_point,
description="aggregated_polygon",
scale=scale,
)
grunnriss_to_point__grunnriss_feature_to_point__n100 = generate_file_name_gdb(
function_name=grunnriss_to_point,
description="grunnriss_feature_to_point",
Expand All @@ -363,71 +363,78 @@ class Building_N100(Enum):
scale=scale,
)

grunnriss_to_point__simplified_building_points_simplified_building_1__n100 = (
grunnriss_to_point__merged_points_created_from_grunnriss__n100 = (
generate_file_name_gdb(
function_name=grunnriss_to_point,
description="simplified_building_points_simplified_building_1",
description="merged_points_created_from_grunnriss",
scale=scale,
)
)

grunnriss_to_point__simplified_building_points_simplified_building_2__n100 = (
generate_file_name_gdb(
function_name=grunnriss_to_point,
description="simplified_building_points_simplified_building_2",
scale=scale,
)
###########################################################
########### CREATE SIMPLIFIED BUILDING POLYGONS ###########
###########################################################

# Function: aggregate_polygons

aggregate_polygons__fill_hole__n100 = generate_file_name_gdb(
function_name=aggregate_polygons,
description="fill_hole",
scale=scale,
)

grunnriss_to_point__collapsed_points_simplified_polygon__n100 = (
generate_file_name_gdb(
function_name=grunnriss_to_point,
description="collapsed_points_simplified_polygon",
scale=scale,
)
# Function: simplify_buildings_1

simplify_buildings_1_simplifying__n100 = generate_file_name_gdb(
function_name=simplify_buildings_1,
description="simplifying",
scale=scale,
)

grunnriss_to_point__merged_points_created_from_grunnriss__n100 = (
generate_file_name_gdb(
function_name=grunnriss_to_point,
description="merged_points_created_from_grunnriss",
scale=scale,
)
simplify_buildings_1__points__n100 = generate_file_name_gdb(
function_name=grunnriss_to_point,
description="points",
scale=scale,
)

###########################################################
########### CREATE SIMPLIFIED BUILDING POLYGONS ###########
###########################################################
# Function: simplify_buildings_2

# Function: simplify_building_polygons
simplify_buildings_2_simplifying__n100 = generate_file_name_gdb(
function_name=simplify_buildings_2,
description="simplifying",
scale=scale,
)

simplify_building_polygons__simplified_building_1__n100 = generate_file_name_gdb(
function_name=simplify_building_polygons,
description="simplified_building_1",
simplify_buildings_2__points__n100 = generate_file_name_gdb(
function_name=grunnriss_to_point,
description="points",
scale=scale,
)

simplify_building_polygons__simplified_building_2__n100 = generate_file_name_gdb(
function_name=simplify_building_polygons,
description="simplified_building_2",
# Function: simplify_polygons
simplify_polygons__simplifying__n100 = generate_file_name_gdb(
function_name=simplify_polygons,
description="simplifying",
scale=scale,
)

simplify_building_polygons__simplified_polygon__n100 = generate_file_name_gdb(
function_name=simplify_building_polygons,
description="simplified_polygon",
simplify_polygons__points__n100 = generate_file_name_gdb(
function_name=grunnriss_to_point,
description="points",
scale=scale,
)

simplify_building_polygons__spatial_joined_polygon__n100 = generate_file_name_gdb(
function_name=simplify_building_polygons,
description="spatial_joined_polygon",
# Function: join_and_add_fields

join_and_add_fields__spatial_join_polygons__n100 = generate_file_name_gdb(
function_name=join_and_add_fields,
description="spatial_join_polygons",
scale=scale,
)

simplify_building_polygons__simplified_grunnriss__n100 = generate_file_name_gdb(
function_name=simplify_building_polygons,
description="simplified_grunnriss",
join_and_add_fields__building_polygons_final__n100 = generate_file_name_gdb(
function_name=join_and_add_fields,
description="building_polygons_final",
scale=scale,
)

Expand Down
8 changes: 4 additions & 4 deletions generalization/n100/building/create_points_from_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def grunnriss_to_point():
custom_arcpy.select_location_and_make_feature_layer(
input_layer=Building_N100.selecting_grunnriss_for_generalization__large_enough_grunnriss__n100.value,
overlap_type=custom_arcpy.OverlapType.INTERSECT,
select_features=Building_N100.grunnriss_to_point__aggregated_polygon__n100.value,
select_features=Building_N100.aggregate_building__polygon__n100.value,
output_name=Building_N100.grunnriss_to_point__intersect_aggregated_and_original__n100.value,
inverted=True,
)
Expand All @@ -73,9 +73,9 @@ def grunnriss_to_point():

# List of input features which will be spatially joined
input_features = [
Building_N100.grunnriss_to_point__collapsed_points_simplified_polygon__n100.value,
Building_N100.grunnriss_to_point__simplified_building_points_simplified_building_1__n100.value,
Building_N100.grunnriss_to_point__simplified_building_points_simplified_building_2__n100.value,
Building_N100.simplify_polygons__points__n100.value,
Building_N100.simplify_buildings_1__points__n100.value,
Building_N100.simplify_buildings_2__points__n100.value,
]

# Feature with the field information which will be used for spatial join
Expand Down
Loading

0 comments on commit e692a2b

Please sign in to comment.