Issues troubleshooting model

Hi there,

I am having issues troubleshooting this RiskScape model.

description = Model to determine buildings on the Taranaki coastline exposed to inundation

[model total-exposed]
description = Summarizes the total number of exposed buildings
framework = wizard
input-exposures.layer = TEST_Shoreline2.shp
input-exposures.geoprocess = false
input-hazards.layer = Taranaki-buildings.shp
input-hazards.geoprocess = true
sample.hazards-by = ALL_INTERSECTIONS
sample.exposure-buffer = left, 1000
analysis.function = is_exposed[0] = summary[0] = *[0] = ‘Total’ as Results
report-summary.aggregate[0] = count(hazard) as Number_Exposed
report-summary.aggregate[1] = count(exposure) as Total_buildings
report-summary.format = csv
report-event-impact.format = csv

The exposure layer is a line shapefile, and the hazard layers are polygons representing building outlines. I simply want the model to count the number of buildings on the left side and within 1m of the line shapefile.

When I run the model, I do not get any output .csv files and warning messages related to parameters being ignored, not all wizard questions have been answered, and typos in the parameters come up in the command prompt.

Any ideas?

Hi Igar,

It seems you might’ve swapped your exposure and hazard layers. input-exposures.layer should be the name of your building polygons shapefile, Taranaki-buildings.shp, and vice versa.

It may be worth running the command line wizard again to fix your inputs and parameters - sample.exposure-buffer isn’t a parameter, for example.



I ran the wizard and this is the updated model.

[model TEST-exposure]
framework = wizard
version = 1.3.0-wizard-v1
input-exposures.layer = Building Taranaki (exposure-layer)
input-exposures.geoprocess = false
input-hazards.layer = Shoreline TEST (hazard-layer)
input-hazards.geoprocess = true
input-hazards.enlarge = true
input-hazards.enlarge-by[mode] = MITRED_FLAT
input-hazards.enlarge-by[remove-overlaps] = true
input-hazards.enlarge-by[distance] = 10
sample.hazards-by = ALL_INTERSECTIONS
sample.hazards-buffer = 10 = false
analysis.function = is_exposed
analysis.aggregate-consequences = true
analysis.aggregate-consequences-function = count = true[0] = consequence as consequence
report-event-impact.format = csv

The hazard file is a line shapefile. The output now counts the buildings that intersect the line shapefile but I also need to include the buildings on the left side of the line as exposed.

Tried to upload a screenshot of what I mean.

Any recommendations on how to do that?

Sorry, RiskScape doesn’t have directional concepts, like ‘on the left’. To count a building as exposed it will have to intersect a polygon.

You could try manually modifying your hazard-layer so that it has the areas you’re interested in as polygons rather than lines, e.g.

  • buffer the line by 10m
  • create a much larger polygon that covers everything left of the line. You could use a much larger buffer distance (e.g. 10km or however large your area of interest is). Then cut the large polygon by the original line and keep the left-hand side.

It’s probably easier to do that sort of processing in GIS software (you can do it in an advanced RiskScape pipeline, but it’s a bit complicated).

Another alternative approach with shoreline retreat is to start off with polygon data that represents the landmass. You can use negative buffer distances to shrink the land polygon, and then count any buildings that no longer intersect the land as exposed.

Hope that helps,

Hi Igar,

If you’re just trying to capture the buildings on the left (and don’t actually care that they are “on the left”, just that you want to expand the catchment area of the road, you can edit your answers and increase the enlarge by distance until it’s big enough that it catches all the features you’re interested in. It’s worth noting that distance units in RiskScape are always metres, so the value of 10 from the example you posted is quite small and looks like it’s too small to capture the buildings from your screenshot (assuming those shapes are buildings?).

If it’s more like what Tim says, e.g. you need to bisect the area of interest so that you pick all the buildings to the left/west of the line, then i’m fairly sure there’s no built in feature in RiskScape that’s going to do that for you. It’s going to be a case of using GiS to adapt your hazard lines so that the become polygons, then try again.

Hope that helps,