| OCR Text |
Show 70 layer CCA and get a geometry called 'geom1 ', the format is: "foreach ( layer (CCA) geom1 )."This foreach statement brings a one geometry into scope for the following statement, and the geometry goes out of scope afterwards. The 'foreach' statement initializes a traverse through all geometries on a given layer and executes the next statement each time a new geometry object is fetched. Two-Layer Analysis To go through pairs of geometries, the 'foreach' operator takes two layers as arguments and brings two objects into scope. It has the following form : "foreach ( layer (<expr>, <expr>) <geom_name>, <geom_name>)." For example, if objects on CCA and objects on CCP are being paired and the resulting pairs are to be called geom_cca and geom_ccp, the form would be: "foreach(layer (CCA, CCP) geom_cca, geom_ccp) ."This brings two geometry objects into scope for the following statement with each iteration. Because this is not a search of all possible pairs, only a search of pairs in proximity, one other ACRE statement plays heavily into how the iterator behaves. It is the 'set' statement with the 'search_distance' option. This clamps a window around the first geometry and the iterator limits the search to that window when looking for second geometry pairs. In the case where the layers of the analysis are the same, the iterator takes care not to yield the same pair of geometries twice or return one geometry as a pair. The search is a diagonal sweep from upper left to lower right. |