Problem Creating Raster Dataset

6534
11
02-17-2011 10:14 AM
BrianTavernia
New Contributor
Hello,

I am running into an issue creating a new raster dataset using the Extract by Mask tool.  Specifically, I am trying to use a polygon to extract a section (a single watershed) of the National Land Cover 2001 (v 2.0) dataset (http://www.mrlc.gov/nlcd2001_news.php).  The NLCD 2001 dataset is a .img file.  The NLCD is a large file, so I have set the Extent settings in the Environments to be equal to the extent of the polygon to ensure the result of the extraction will not be too large.  Whenever I attempt the extraction, I am consistently getting this error:

Could not save raster dataset to C:\Temp\g_g_g5 with output format GRID.
Failed to execute (ExtractByMask).

The error suggest there is a problem in converting form the .img to the GRID format.  Is this the case?  If so, is there a way to get around this? 

So far I have tried:

1) Ensuring that I have the latest Service Packs installed
2) Rebooting the computer
3) Turning off the Spatial Analyst extension and then turning it back on
4) shortening the names of the raster and feature input files
5) placing both the raster and feature file into the same source folder
6) Changing the output destination folder
7) specifying the scratch workspace as "C:\Temp" in the Environments setting
😎 Clearing all the files from the Temp folder to ensure there is enough space

I greatly appreciate any solutions that folks might have. 

Thanks,

Brian
0 Kudos
11 Replies
DanPatterson_Retired
MVP Emeritus
both are in the same coordinate system?
0 Kudos
LeoneBrown
New Contributor
Hi Brian,
Did you find a solution for this problem?
I have been getting this error a lot trying to do various things from clipping my raster to a smaller area (I am using the NLCD 2006), to converting the raster to a different format, to extracting values by mask.
Thanks,
Lee
0 Kudos
KatieDosch
New Contributor
Hi all,

I am having the same problem.  I'm running ArcGIS 9.3 on Windows 7 64 bit.  I have been able to run the extract by mask function in spatial analyst in the past (e.g. last time was Feb 28th, 2011) on NLCD 2006 data downloaded by zones (downloaded at least 1 yr ago) and it has always worked.  I recently downloaded the national coverage NLCD 2006 landcover and impervious surfaces layer (.img) and now I can no longer extract by mask without getting the following error (this occurs with both the regional layer that was successful in the past and the national layer):

ERROR 010240: Could not save raster dataset to C:\Users\Katie\AppData\Local\Temp\g_g_g2 with output format GRID.
Failed to execute (ExtractByMask).

I have tried the following steps to no avail:
1. update ArcGIS 9.3 with all available patches and service packs
2. update Windows 7 with all available updates
3. change temporary workspace in spatial analyst
4. change temporary workspace in Windows 7
5. clean out/empty temp workspace
6. change, shorten, or update names used to fit raster formatting rules

Any help you can provide would be much appreciated!!!
Katie
0 Kudos
KatieDosch
New Contributor
Ok, if I double check projections, I can still extract by mask on the 2006 NLCD dataset that I downloaded by zone (dated 02-2007).  However, double checking projections does not solve the problem with the new national layer (dated 2-14-11).

Does anyone have any idea why spatial analyst is not working on the updated data layers?

Thanks so much!
Katie
0 Kudos
KatieDosch
New Contributor
Hi all,

So I've solved this problem (hooray)!  It seems that there is an issue converting the new NLCD layers (dated 02-14-2011) from ERDAS Imagine (.img) files to ESRI Grids.  The USGS (creators of the NLCD data) have provided this work around to do the conversion:

in ArcMap:
1. Add image (NLCD raster)
2. Zoom (or draw) area of interest
3. Export area of interest to GRID  
    a. Extent = Data Frame (Current)   
    b.  Spatial Reference = Raster Dataset (Original)   
    c.  Rename the file name and select a desired output file format (i.e. GRID)  
    d. Click Save
  *Ignore "Failed to Save Raster Dataset"   
    e.  click OK
in ArcCatalog:
4. Arc toolbox - Data Management Tools>Raster>Raster Properties>Build Raster Attribute Table
    a.  input grid file
    b.  check Overwright 
    c.  run
5. Data Management Tools>Joins>Join Field  
    a.  Input Dataset = grid file
    b.  Input join field = value
    c.  Join table = (source NLCD image)
    d.  Output join field = value
    e.  Join fields  
    d.  check - Red, Green, Blue, Opacity, Land cover
    f.  run 

While this work around does work, if you are using ArcGIS 9.3 as I am, you don't have the join field option in the toolbox, so I used python to do the last step (I can provide code on request).

Thanks to Richard Vandersnick who supplied the work around from the USGS.

Hope that helps!
Katie
0 Kudos
GopiGoteti
New Contributor
Hi Katie

I am having similar issues with NLCD data in ArcGIS (version 9.2). Could you please send me the python script you used for the last step.

Thanks in advance.
Gopi
0 Kudos
MeganMaloney
New Contributor
Hi -
I'm having the same problem. Trying to clip an NLCD 2001 impervious surface raster to a buffer shapefile prompts "Error 010240: Could not save raster dataset to (location) with output format GRID." Both are in the same projection and I tried editing file names and changing workspaces.

I'm using 9.3.1, so if anyone has the last step to that work-around, it'd be much appreciated.

Thanks -
0 Kudos
JamesZack
New Contributor
I assert that the problem is a result of the USGS including the COUNT field (and LAND_COVER field in Land Cover product) as part of the colormap for the .img, .tif, and .jpg Land Cover image tiles they provide via the National Map download option. I further assert that some of the values of the COUNT field exceed the maximum 32-bit signed long int value of 2**31 (2,147,483,648). It wasn't until I deleted the COUNT field from my *.tif file that I was able to convert the TIFF into a GRID.

Jim Zack
Xtra-Spatial Productions, LLC
0 Kudos
JeffreySwain
Esri Regular Contributor
The issue does seem to be the format.  For datasets like this, I recommend exporting the color map to an external file (.clr) and then deleting the four columns (Red, Green, Blue, Opacity).  This allows the raster to be treated as relatively normal. There is an existing bug report for the behavior, but it is not published. Please contact Support to be added to the bug report. The rejection of the bug states that the data must be 'cleaned' and those columns removed to be used in analysis. Once you have the color map exported, you can reapply it like normal colormap based rasters.
0 Kudos