Eric, I was currently solving this problem why it doesnt work for like 2 hours. Thanks alot for helping me!
Hi Matt,The FocalMean command you're familiar with is not available in the new raster calculator. The documentation you pointed to is wrong and I will submit a defect to have it changed. To accomplish this task you need to use FocalStatistics with the mean statistic type within your Con statement. It should look like this:**unspecified**= Con(IsNull("point2ras"),FocalStatistics("point2ras",NbrRectangle(3,3),"MEAN"),"point2ras")..........
>>> from arcpy.sa import * >>> m2w = Con(IsNull("wt1"),FocalStatistics("wt1", NbrRectangle(3,3),"MEAN"),"wt1")
Jamal,Your expression is using �??wt�?� but your layer name is �??wt1�?�.Eric
Hi Jamal,I reviewed your screenshot and you are specifying FOCALMEAN which is not a command in map algebra at 10.0. Please review my earlier post wherein I provide the syntax to use at 10.0. i.e. FocalStatisticsRegards,Eric
Thanks Dan. I checked with the Arc10 Resource Center (URL: http://help.arcgis.com/EN/ArcGISDesktop/10.0/Help/00q8/00q80000006m000000.htm) for help with the syntax and case but unfortunately it's still not working: Con(IsNull([point2ras]), FOCALMEAN ([point2ras] , RECTANGLE , 3 , 3, data), [point2ras]) When I run the expression with that structure, Spatial Analyst returns an error saying that the name of the input raster is not defined. I inserted "" around the layer name, re-ran it, and got a different error ['expected a raster or layer name']. I've attached a screen-capture of the error messages, for reference. Any other suggestions? Thanks, Matt
Hi Matt,The FocalMean command you're familiar with is not available in the new raster calculator. The documentation you pointed to is wrong and I will submit a defect to have it changed. To accomplish this task you need to use FocalStatistics with the mean statistic type within your Con statement. It should look like this:**unspecified**= Con(IsNull("point2ras"),FocalStatistics("point2ras",NbrRectangle(3,3),"MEAN"),"point2ras")Where **unspecified** is my output name and i'm using a 3 x 3 rectangular neighborhood.You may find this link helpful as it discusses differences between 9.x and 10.http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Comparing_Map_Algebra_between_9_x_and_10/00p600000018000000/What is Map Algebra (in 10)http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_Map_Algebra/00p600000002000000/Let me know if this helps.Regards,Eric
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.