1

I have a shapefile with a "Random Number" Column. I'd like to use ModelBuilder to Select and export the lowest N values. I've seen this post about selecting the top 10 records which is pretty similar.

Selecting limited TOP n from specific column in ArcGIS query builder?

But the problem I'm having is this post uses a Query Builder, but I'm not sure how to adapt this for model builder into the 'Select tool'. I'm using ArcGIS desktop

0

1 Answer 1

2

Run the data through the SORT tool, sorting by your random number field, sorting in an ascending sequence, send the output into IN_MEMORY.

For example input data is:

Initial data

The sort tool creates an FID field which is sequential, so all you need to so is select rows where FID <= 10 as shown below:

Sorted, lowest 10

If you need the lowest 20 then select FID <= 20. This can all be easily included into a model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.