Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1054315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:23:10+00:00 2026-05-16T17:23:10+00:00

I have a python script that makes an attribute table of a raster. This

  • 0

I have a python script that makes an attribute table of a raster. This runs through all the rasters that I have which are floats, converts them to ints, then makes an attribute table.

On the first 3 rasters, I get a warning message,

Value range for c:\raster2 exceeds 100000 and number of unique values exceeds 500.
Please use BUILDVAT if a VAT is required.

but an attribute table is generated. After this, however the program crashes and I don’t know how to fix it. This is the error message printed to screen:

Value range for c:\raster2 exceeds 100000 and number of unique values exceeds 500.
Please use BUILDVAT if a VAT is required.
Traceback (most recent call last):
  File "LEED_raster_attribute.py", line 50, in <module>
    make_attribute( 20, 'C:\\Analysis\\Raster_Distances\\city' )
  File "Raster_attribute.py", line 40, in make_attribute
    gp.BuildRasterAttributeTable_management(outRaster)
arcgisscripting.ExecuteError: ERROR 000521: The number of unique values exceeds the limit.
Failed to execute (BuildRasterAttributeTable).

Googling the error message does not help, nor do the help files. Are there any solutions to this problem?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:23:10+00:00Added an answer on May 16, 2026 at 5:23 pm

    For grids, a raster attribute table is built by default for any integer grid that results from an expression if the range of values in the raster is less than 100,000 or if the number of unique values in the raster is less than 500. If the range is less than 100,000, the number of unique values in the raster can be as large as 100,000. If the range is greater than 100,000, a raster attribute table will still be built if the number of unique values is less than 500. If the range of values is greater than 100,000 and the number of unique values is greater than 500, then a raster attribute table is not automatically built.
    By default, the size of a raster attribute table is limited to 65,535 unique values. You can increase this number on the Options dialog box by clicking the Raster Attribute Table tab on the Raster tab.

    I just re-read the raster documentation, and it is possible to manually increase the value that allows attribute tables to be constructed using the GUI. I manually entered a huge value and my script worked.


    Not certain if this question/answer is useful. I’ll leave it here for a day or two and see.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python script that runs a program, which generates few .exe files
I have a Python script that makes use of 'Print' for printing to stdout.
I have a python script that uses threads and makes lots of HTTP requests.
I have a python function that makes a subprocess call to a shell script
I have a python script that runs on a cron job. The script uses
I have a python script that makes about ten INSERTs into a MySQL database.
I have a python script that makes a series of url calls using urllib2.
I have Jenkins running a python script that makes some SVN calls, my problem
I have a python script that I want always to run in the background.
I have a Python script that needs to issue a number of shell commands.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.