Unable to remove name of raster from geodatabase

116
6
09-16-2019 09:32 AM
Highlighted
New Contributor III

Hi all,

Sometimes, I am unable to remove rasters from a geodatabase that I have created. Even though the name continues to appear in the geodatabase, it is not "really" there. Does anyone else experience this? Is there a way to delete the names of rasters that don't exist anymore, without having to simply create a new geodatabase?

Here is an example:

arcpy.ListRasters("*")
Out[13]:
['image',
 'dem',
 'tmpr1pqjrdo',
 'Segmented_201909121301327226310_interIndex',
 'image2019']

arcpy.Delete_management('tmpr1pqjrdo')
Out[14]: <Result 'true'>

arcpy.ListRasters("*")
Out[15]:
['image',
 'dem',
 'tmpr1pqjrdo',
 'Segmented_201909121301327226310_interIndex',
 'image2019']

You can see that the image name is still there. However, tempRast = arcpy.Raster('tmpr1pqjrdo') results in an error that states the raster doesn't exist.

Reply
0 Kudos
6 Replies
Highlighted
MVP Esteemed Contributor

Try saving the project after deletion to see if the gdb gets updated.

Reply
0 Kudos
Highlighted
New Contributor III

I have tried that, and the rasters are still in the geodatabase. This has happened to me on multiple computers in both Arcgis 10.x and Pro. It is annoying to have to create a new geodatabase every time this happens.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

It has popped up before

NIM003288: Cannot delete raster (grid) when first attempt to de.. 

and associated bugs/references

other references

Assuming that they are just plain gdb rasters and not part of mosaic datasets or similar raster packaging forms? (there are different tools for those)

Reply
0 Kudos
Highlighted
New Contributor III

Thanks Dan,

Your links do suggest that this is a known issue. As far as I can tell, there aren't any solutions provided. It has been a pain for me for quite some time and just keeps clogging up my geodatabases. Should I report it as a bug?

Wade

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I would Wade, since it pops up in various incarnations.  Tech support will probably need test data and details of your workflow.  Worth a shot

Highlighted
Occasional Contributor II

Thanks Dan. We do need some additional information. NIM003288 is very old and I believe it was fixed at v9.2.

Wade Wall‌ Deleting a raster should remove all corresponding entries. If you can contact Support and share you case ID I will work with the analyst. There are two possibilities:

1.  A specific workflow is leading to the behavior. If so, it should be logged as a defect.

2. For any reasons, your FGDB got corrupted. We can potentially review the gdb system tables for the orphan names.

Here is Support contact info: Esri Support Contact Support 


If you are not current on maintenance, please send me an email at pyadav AT esr.com.

Regards,

Pavan

Pavan Yadav | Technology Lead

Esri Support Services, Esri | 380 New York Street, Redlands CA 92373 | USA

T 909-793-2853  | pyadav AT esri.com | esri.com

 

THE SCIENCE OF WHERE ®

Reply
0 Kudos