Select to view content in your preferred language

Signed versus unsigned

6311
5
03-23-2012 10:48 AM
JessicaPetersen
New Contributor
The ultimate goal is to create a signed integer raster file to use in Fragstats. I've been creating rasters from polygon feature classes in a file geodatabase. The problem is that when I create the raster it is unsigned. I then 'Copy Raster' and change it 'signed'. However, only when the raster is created within the geodatabase does it actually change the pixel type. When I 'Copy Raster' into a folder (Data Type: File System Raster) it does not change the pixle type to signed as I indicated it should. Is there any way to get a signed integer raster that is independent of a file geodatabase? Fragstats doesn't recognize the raster within a geodatabase.
Thanks for any suggestions.
0 Kudos
5 Replies
JeffreySwain
Esri Regular Contributor
I would create the raster as an .img or .tif and be sure to specify the bit depth.  If you are using ESRI GRIDs then they are always 32 bit float, per the help.  Here is the information on the supported raster formats.
0 Kudos
JessicaPetersen
New Contributor
Well, I cannot use a tif or img because FRAGSTATS does not recognize those formats. I am using a GRID file and when I convert (Feature to Raster or Polygon to Raster, I've tried both) I get a GRID file that is an 8 bit unsigned integer when it is saved as a stand alone Raster in just a folder, but I get a 16 bit unsigned integer file when I save the raster as part of a File Geodatabase. I'm really confused and at a total loss right now.
0 Kudos
JeffreySwain
Esri Regular Contributor
If you are saving the 8 bit out to another location and not specifying a NoData value, then depending on the data, it will be promoted to avoid losing data(just like FragStats mentions in their help.)  You can try to export the data in a Esri GRID format and then specify the NoData value, but bear in mind, it will still be a 32 bit raster, only ArcCatalog will report it as the closest appropriate bit depth.  

I am not sure if it matters in FragStats.  After reading the data formats background data, it seems to allow a few different formats.  Per the documentation on FragStats, it specifies
FRAGSTATS accepts raster images in a variety of formats, including ArcGrid, ASCII, BINARY, ERDAS, and IDRISI image files.
  Also it indicates it will accept 16 bit rasters, and will convert the data to 32 bit when exported to avoid losing data. Further down, it appears that FragStats will also accept .img files. Per their help,
FRAGSTATS accepts .gis, .lan, and .img files used by current versions of ERDAS IMAGINE, including signed 8-, 16-, and 32-bit integer grids.


I am not sure why your output is causing a problem, it sounds like it should be accepted by FragStats.
0 Kudos
ShannonChapin
Emerging Contributor
A work around can be done by reclassifying one of the classes in your grid to a negative number.  This should automatically change the grid from unsigned to signed.  Good luck!
0 Kudos
BenediktBjörnsson
New Contributor
I´ve browsed for a sulution for a long period. Now it´s solved!
Thanke you very much.
Easy and simple, just think man!
0 Kudos