Monday, 2 April 2018

Sorting integer field in ArcGIS Modelbuilder and using smallest value as variable for tool?




I have to populate a new field using a formula containing the smallest value of an existing field.


As this is a small part of a larger model I am wondering which is the most efficient method.


My thoughts are as follows:



  1. Sort the field ascending and somehow use the top value or

  2. Use a formula to search for the smallest integer greater than zero and use this value as a variable?


Which method would be most viable with ModelBuilder from ArcGIS 10.3.1 for Desktop?



Answer




To do this I would use Summary Statistics to get the minimum value into a one row table, and then use the Get Field Value (Model Only tool) to read that row and field.


A very similar technique is described in Examples of using Model Only tools in ModelBuilder.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...