Ascii to Raster: How to classify?

412 views
Skip to first unread message

Newton Pimentel de Ulhôa Barbosa

unread,
Sep 21, 2010, 7:39:01 PM9/21/10
to Maxent
Hy guys,

I'm working with maxent and I decided to work with the output data in
ArcGis. I transformed the ascii file in raster (FLOATED) but now I
can't classify the raster. This message appears:

"too many unique values (>65536)"


I don't know what is this and how I can make a legend with the
classes.

Someone could help me?

Thank you very much!

Newton P de U Barbosa
Univerisdade Federal de Minas Gerais, Brasil / University of Alberta,
Canada

John B

unread,
Sep 21, 2010, 10:21:39 PM9/21/10
to Maxent
Hi Newton,

Your grid has more than 65536 unique values. In order to classify the
data, you either need to (a) increase the number of unique values that
will be rendered by ArcMAP (i.e. in ArcMAP options, under dataset in
ArcGIS 10... you might have to look for it elsewhere in 9.x), or (b)
reduce the number of unique values.

Option (b) is probably preferable, and way to reduce the number of
unique values is to round all data off to x decimal points.

If you have a Spatial Analyst license, this can be done in the Raster
Calculator (in the dropdown menu on your toolbar in ArcGIS 9.x, or in
ArcToolbox > Spatial Analyst tools > Map Algebra in ArcGIS 10). Do it
like this:

1. If using 9.x, check under Spatial Analyst options (in the dropdown)
to make sure output location, cell size, extent are all correct.

2. Run Raster Calculator and then type the following command:

Float(Con([gridname] >= 0,Int([gridname] * 10000 + .5),Int([gridname]
* 10000 - .5))) /10000

Replace gridname with the name of the layer you are processing.

The '10000's will cause rounding to 4 decimal places. For fewer
decimal places, drop off zeroes, and for more decimal places add
zeroes. Just remember that the more decimal places you include, the
more unique values you will end up having.

This command will round negative numbers correctly. A simple command
could be used if you have no negative numbers in the grid, but it
won't hurt to use this command regardless.

Note that if you're using ArcGIS 10 the gridname should be surrounded
by double quotes... "gridname" ... rather than square brackets.

Fire me an email or reply here if you are still having trouble.

Cheers,
John









On Sep 22, 9:39 am, Newton Pimentel de Ulhôa Barbosa

Newton Pimentel de Ulhôa Barbosa

unread,
Sep 22, 2010, 12:02:43 PM9/22/10
to max...@googlegroups.com
Hey people, 

Thanks for your help. 

It's just a bug in ArcGis that can be fixed by installing a service pack:

This is the easiest way that I found.

Thank You Martina! :)


Cheers,

--

Newton Pimentel de Ulhôa Barbosa



--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To post to this group, send email to max...@googlegroups.com.
To unsubscribe from this group, send email to maxent+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maxent?hl=en.


temunka

unread,
Sep 22, 2010, 6:05:26 AM9/22/10
to Maxent
Hi,

I had the same thing... but it is just a bug in ArcGis which you can
fix by installing a patch ... or a service pack

There is a discussion about this issue on ESRI forum:
http://forums.esri.com/Thread.asp?c=93&f=1730&t=258642

I dont remember, but I think it was this one:
http://resources.arcgis.com/content/patches-and-service-packs?fa=viewPatch&PID=17&MetaID=1443

Hope it works...

Temunka



On Sep 22, 1:39 am, Newton Pimentel de Ulhôa Barbosa

Newton Pimentel de Ulhôa Barbosa

unread,
Sep 22, 2010, 1:40:40 PM9/22/10
to max...@googlegroups.com
It worked!

Thanks a lot!

Cheers, 


--

Newton Pimentel de Ulhôa Barbosa



2010/9/22 temunka <martina....@gmail.com>

martina temunovic

unread,
Sep 22, 2010, 1:43:36 PM9/22/10
to max...@googlegroups.com
No problem :)

what do you work with?

Why not the facebook haha ....

cheers,

martina

2010/9/22 Newton Pimentel de Ulhôa Barbosa <newto...@gmail.com>:

John Baumgartner

unread,
Sep 22, 2010, 5:13:09 PM9/22/10
to max...@googlegroups.com
Wow, good to know this!

Thanks Martina.
John

Reply all
Reply to author
Forward
0 new messages