Split Index Function

1159
1
07-28-2017 12:14 AM
AbhishekSobbana
New Contributor II

I have been trying to split a lot and retrieve the index. 

Lot -->
split(x) {{~Length : SPLITZ | ~Length : SPLITZ | Road_Width : Road_Color}* | ~Length : SPLITZ }

SPLITZ --> split(z) {{~Width : Extrude_Building | ~Width : Extrude_Building | Road_Width : Road_Color}* | ~Width : Extrude_Building }

Extrude_Building -->
extrude (world.y, Extruding)
comp(f) {top : Numbering | side: Colorize}

Numbering -->
set(SplitCount, split.index)
texture("assets/no/no_"+SplitCount+".png")
alignScopeToGeometry(zUp, 0, world.lowest)
setupProjection(0, scope.xy, '1.0000, '1.0000)
projectUV(0)

Result

What I am looking for is

Any suggestion to achieve the index like that with spliting the plot

Thanks

Ab

0 Kudos
1 Reply
CherylLau
Esri Regular Contributor

You can pass the values for split.index and split.total to future rules.

Lot -->
     split(x) { ~1: Col(split.index, split.total) }*
     
Col(col_ind, nCols) -->
     split(z) { ~1: Cell(split.index, col_ind, nCols) }*
     
Cell(row_ind, col_ind, nCols) -->
     //cell index starting at 0 = row_ind*nCols + col_ind
     //cell index starting at 1 = row_ind*nCols + col_ind + 1
‍‍‍‍‍‍‍‍‍     ...