ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Finding the value from an input list meeting a specified criteria

Available with Spatial Analyst license.

  • Popularity
  • Rank

There are two local tools that assign an output value for a cell based on which value or values meet a specified criteria from a list of values obtained from a group of input rasters. The tools are Popularity and Rank.

Popularity

The Popularity tool determines for each location the value that is the nth most popular value of the input values identified from the input rasters. It requires a list of input rasters and the popularity value, which can either be a constant or raster, identifying the nth most popular value.

Examples

For example, if the popularity value specified is 2, then for each cell, the second most popular value from a list of the values derived from the input rasters should be output. If the input values for a specific location are as follows

PopularityInRas1InRas2InRas3InRas4InRas5

2

3

3

5

3

5

Example input cell values for Popularity

Then the values will be sorted in the following way:

ValueInput raster

3

InRas1

3

InRas2

3

InRas4

5

InRas3

5

InRas5

Sorted values list

As a result, the most popular value in the list is 3, with three occurrences, and the next most popular value is 5, with two instances. Since the specified popularity value is 2, then the output from the tool for this cell location will be 5.

For another example, the following graphic identifies the second most popular value for the three input rasters.

Popularity illustration
OutRas = Popularity(2, [InRas1, InRas2, InRas3])

If a cell for any location on any of the input rasters is NoData, that location will receive NoData for the output.

If a particular location has no value that is second in popularity, the cell location will receive NoData. This situation can occur under the following conditions:

  • All values are unique.
  • There are equal numbers of different values.

Rank

The Rank tool creates for each cell an internal argument list of the values from the input rasters. The values in the argument list are ordered from smallest to largest. The value at the rank order position defined by the input rank raster (the nth smallest value) is output.

Example

For example, the input rank raster is RankRas, and the input list of rasters is InRas1, InRas2, InRas3 and InRas4. The RankRas raster has all cell values with a constant value of 3, indicating that the third smallest value is to be returned.

InRas1InRas2InRas3InRas4

4

6

3

8

Example input values for Rank tool

These values are ranked:

PositionCell value

1

3

2

4

3

6

4

8

Rank order argument list

Since the position defined by the value in the rank input is the third position (3), the output value for this cell will be 6.

Related Topics

  • An overview of the Local toolset
  • Popularity
  • Rank
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal