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.

answered Apr 27, 2016 at 14:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.