Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify parameters for buildings addons #70

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,35 @@

# %option G_OPT_R_INPUT
# % key: ndsm
# % type: string
# % required: yes
# % label: Name of the nDSM
# % label: Name of the nDSM raster
# %end

# %option G_OPT_R_INPUT
# % key: ndvi_raster
# % type: string
# % required: yes
# % label: Name of the NDVI raster
# %end

# %option G_OPT_V_INPUT
# % key: fnk_vector
# % type: string
# % required: no
# % label: Vector map containing Flaechennutzungskartierung
# % label: Name of vector map containing the Flaechennutzungskartierung
# %end

# %option G_OPT_R_INPUT
# % key: fnk_raster
# % type: string
# % required: no
# % label: Raster map containing Flaechennutzungskartierung
# % label: Name of raster map containing the Flaechennutzungskartierung
# %end

# %option G_OPT_R_INPUT
# %option G_OPT_DB_COLUMN
# % key: fnk_column
# % type: string
# % required: no
# % label: Integer column containing FNK-code
# % label: Name of integer column containing FNK-code
# %end

# %option
# % key: min_size
# % type: integer
# % required: no
# % required: yes
# % multiple: no
# % label: Minimum size of buildings in sqm
# % answer: 20
Expand All @@ -85,7 +77,7 @@
# %option
# % key: max_fd
# % type: double
# % required: no
# % required: yes
# % multiple: no
# % label: Maximum value of fractal dimension of identified objects (see v.to.db)
# % answer: 2.1
Expand All @@ -101,8 +93,6 @@

# %option G_OPT_R_OUTPUT
# % key: output
# % type: string
# % required: yes
# % label: Name for output vector map
# %end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,37 @@

# %option G_OPT_R_INPUT
# % key: ndsm
# % type: string
# % required: yes
# % label: Name of the nDSM raster
# % answer: ndsm
# % guisection: Input
# %end

# %option G_OPT_R_INPUT
# % key: ndvi_raster
# % type: string
# % required: yes
# % label: Name of the NDVI raster
# % answer: dop_ndvi_05
# % guisection: Input
# %end

# %option G_OPT_V_INPUT
# % key: fnk_vector
# % type: string
# % required: yes
# % label: Vector map containing Flaechennutzungskartierung
# % label: Name of vector map containing the Flaechennutzungskartierung
# % answer: fnk
# % guisection: Input
# % guidependency: fnk_column
# %end

# %option G_OPT_DB_COLUMN
# % key: fnk_column
# % type: string
# % required: yes
# % multiple: no
# % label: Integer column containing FNK-code
# % label: Name of integer column containing FNK-code
# % guisection: Input
# %end

# %option
# % key: min_size
# % type: integer
# % required: no
# % required: yes
# % multiple: no
# % label: Minimum size of buildings in sqm
# % answer: 20
Expand All @@ -71,36 +66,37 @@
# %option
# % key: max_fd
# % type: double
# % required: no
# % required: yes
# % multiple: no
# % label: Maximum value of fractal dimension of identified objects (see v.to.db)
# % answer: 2.1
# % guisection: Parameters
# %end

# %option
# % key: ndvi_thresh
# % key: ndvi_perc
# % type: integer
# % required: no
# % multiple: no
# % label: Define fix NDVI threshold (on a scale from 0-255) instead of estimating it from FNK
# % label: NDVI percentile in vegetated areas to use for thresholding
# TODO: make radio button and add default
# # % answer: 5
# % guisection: Parameters
# %end

# %option
# % key: ndvi_perc
# % key: ndvi_thresh
# % type: integer
# % required: no
# % multiple: no
# % label: NDVI percentile in vegetated areas to use for thresholding
# % label: Fix NDVI threshold (on a scale from 0-255) instead of estimated value from ndvi_perc and FNK
# TODO: make radio button and add default
# # % answer: 145
# % guisection: Parameters
# %end

# %option G_OPT_V_OUTPUT
# % key: output
# % type: string
# % required: yes
# % label: Name for output vector map
# % answer: buildings
# % guisection: Output
# %end

Expand All @@ -119,7 +115,7 @@
# % type: integer
# % required: yes
# % multiple: no
# % label: Define edge length of grid tiles for parallel processing
# % label: Edge length of grid tiles for parallel processing
# % answer: 1000
# % guisection: Parallel processing
# %end
Expand Down Expand Up @@ -638,7 +634,7 @@ def main():
quiet=True,
)

grass.message(_(f"Created output vector layer {output_vect}"))
grass.message(_(f"Created output vector layer <{output_vect}>."))


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
# % keyword: worker
# %end

# %option G_OPT_V_INPUT
# % key: area
# % label: Vector map containing area
# %end

# %option
# % key: new_mapset
# % type: string
Expand All @@ -32,59 +37,38 @@
# % label: Name of new mapset where to compute the building MASK
# %end

# %option G_OPT_V_INPUT
# % key: area
# % type: string
# % required: yes
# % label: Vector map containing area
# %end

# %option G_OPT_V_INPUT
# % key: building_outlines
# % type: string
# % required: yes
# % label: Vector map containing outlines of buildings
# % label: Name of vector map containing outlines of buildings
# %end

# %option G_OPT_R_INPUT
# % key: buildings
# % type: string
# % required: yes
# % label: Raster map containing buildings
# % label: Name of raster map containing buildings
# %end

# %option G_OPT_R_INPUT
# % key: ndsm
# % type: string
# % required: yes
# % label: Name of the nDSM raster
# %end

# %option G_OPT_R_INPUT
# % key: gb_ratio
# % type: string
# % required: yes
# % label: Name of the GB-ratio raster
# %end

# %option G_OPT_R_INPUT
# % key: rg_ratio
# % type: string
# % required: yes
# % label: Name of the RG-ratio raster
# %end

# %option G_OPT_R_INPUT
# % key: brightness
# % type: string
# % required: yes
# % label: Name of the brightness raster
# %end

# %option G_OPT_R_INPUT
# % key: ndvi
# % type: string
# % required: yes
# % label: Name of the NDVI raster
# %end

Expand All @@ -93,31 +77,31 @@
# % type: integer
# % required: yes
# % multiple: no
# % label: Define fix Green_blue_ratio threshold (on a scale from 0-255)
# % label: Fix value for green-blue-ratio threshold (on a scale from 0-255)
# %end

# %option
# % key: ndsm_med
# % type: integer
# % required: no
# % multiple: no
# % label: Define fix nDSM median
# % label: Value for nDSM median
# %end

# %option
# % key: ndsm_p_low
# % type: integer
# % required: no
# % multiple: no
# % label: Define fix nDSM low percentile
# % label: Fix value for nDSM low percentile
# %end

# %option
# % key: ndsm_p_high
# % type: integer
# % required: no
# % multiple: no
# % label: Define fix nDSM high percentile
# % label: Fix value for nDSM high percentile
# %end

# %option
Expand All @@ -140,8 +124,7 @@

# %option G_OPT_V_OUTPUT
# % key: output_vegetation
# % required: yes
# % label: Name of output roof vegetation vector map
# % label: Name for output roof vegetation vector map
# %end

# %option G_OPT_MEMORYMB
Expand Down
Loading