Kia ora,
I am trying to run a pipeline with multiple hazard and exposure layers. I am joining these to NZ regional boundaries and once I include this step the pipeline is running so much slower. Is something wrong with my code that would speed up the process more? I’ve added in the snippet on area layers.
Thanks!
input(relation: ‘Population’, name: ‘population’)
→ select({population}) as populations
→ join(on: true) as population_join_areas3
→ select({, sample_one(geometry:population, coverage: area3) as area3})
→ join(on: true) as population_join_areas2
→ select({, sample_one(geometry:population, coverage: area2) as area2})
→ join(on: true) as population_join_areas1
→ select({, sample_one(geometry: population, coverage: area1) as area1})
→ join(on: true) as population_join_hazards
→ select({, sample_centroid(geometry: population, coverage: event.coverage) as hazard})
→ select({}) as sampled_population
→ select({, consequence: map(hazard, hv → is_exposed(population, hazard))})
→ select({*}) as population_impact_table
input(relation: ‘StatisticalArea2’, name: ‘area1’) as areas1_input
→ group({to_coverage(area1) as area1}) as areas1
→ select({area1}) as areas1_POP
areas1_POP
→ population_join_areas1.rhs