I have set of site address points that instead of a single house number, they contain a range of house numbers. I would like to create a point in the same location for each of the house numbers in the range. Here is the beginning of the python logic:
addrRange <SPAN class="operator token">=</SPAN> <SPAN class="string token">'8909-8927'</SPAN> <SPAN class="comment token"># the hyphenated string is in the HouseNumber field</SPAN>
begin <SPAN class="operator token">=</SPAN> int<SPAN class="punctuation token">(</SPAN>addrRange<SPAN class="punctuation token">.</SPAN>split<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'-'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN>
end <SPAN class="operator token">=</SPAN> int<SPAN class="punctuation token">(</SPAN>addrRange<SPAN class="punctuation token">.</SPAN>split<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'-'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN>
addresses <SPAN class="operator token">=</SPAN> int<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>end <SPAN class="operator token">-</SPAN> begin<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">/</SPAN> <SPAN class="number token">2</SPAN><SPAN class="punctuation token">)</SPAN>
houseNumberList <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN>begin<SPAN class="punctuation token">]</SPAN>
<SPAN class="keyword token">for</SPAN> i <SPAN class="keyword token">in</SPAN> range<SPAN class="punctuation token">(</SPAN>addresses<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
begin <SPAN class="operator token">+=</SPAN><SPAN class="number token">2</SPAN>
houseNumberList<SPAN class="punctuation token">.</SPAN>append<SPAN class="punctuation token">(</SPAN>begin<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Now I have a list of house numbers and the goal is to create a new point for each of list elements:
<SPAN class="punctuation token">[</SPAN><SPAN class="number token">8909</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8911</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8913</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8915</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8917</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8919</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8921</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8923</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8925</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">8927</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Basically, where there was one point, (in this case) I want ten points stacked on top of each other. Could be it's Friday, or could be I just can't wrap my head around the next step (that will involve an insert cursor) but I need another set of eyes on this. Each new point attribute record will be a copy of the original but the value in the HouseNumber field will correspond with the list element.
Thanks in advance