Skip to main content
Question

How to create a list of integers between two numeric values for individual features?

  • July 13, 2023
  • 1 reply
  • 94 views

achambers
Contributor
Forum|alt.badge.img

I have a land records data set that has a beginning page and an ending page. Both are numeric values. I would like to create a list of all possible page numbers (integers) between the beginning and ending page number. Is there an easy way to accomplish this?

1 reply

caracadrian
Contributor
Forum|alt.badge.img+22
  • Contributor
  • July 14, 2023

You can easily create clones and calculate a "current page number" for each feature in the interval.

Use an AttributeManager to calculate a page_interval attribute with a calculated value @Value(page_end)-@Value(page_start)+1 (the +1 is needed to get the correct number of page 25-1=24 but you have 25 pages so +1).

Send the results to a Cloner with number of copies value from the page_interval attribute.

Send that to a second AttributeManager where you create a page_number attribute with the value set as @Value(page_start)+@Value(_copynum).

If your first page always has a value of 0 (zero) just use the last page attribute in the Cloner without any other calculations.

clone by page


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings