I have this model attached here wich has the left side (osm1) where the points input are beeing buffered - bounding box and the osm_highway is beeing downloaded.
The left side (osm2) should be an alternative option if the osm_highway is already known. OSM2 input is not mandatory.The conditional branch is checking if the boolean checkbox "check" is activated:
The Conditional Branch is working - osm1 / osm2 are beeing generated. So far so good. The problem that I have is at the level of the function "Snap ponts on lines" where I an trying to define the line input as the following expression :
if(@check ,@reproject_osm2_OUTPUT ,@osm1_OUTPUT )
where the dependencies of the function "Snap ponts on lines" where choosen like follow:
The result of "Snap ponts on lines" is working just for osm1 , osm2 is not functioning. Any idea where the error lies?
I don't necessarily need the checkbox, I just didn't know how to implement the task differently. In summary, what I plan to do is: If OSM2 layer ( not mandatory ) has not been selected and is therefore empty, download OSM, otherwise use input from OSM2 selected layer for the function Snap points on line.