Select to view content in your preferred language

Spatial Analyst CreateRandomRaster issue

715
6
05-17-2018 06:22 AM
AlbertoAloe
Occasional Contributor

Hi everybody.

I have a strange issue here when running arcpy.sa.CreateRandomRaster depending on the size of the extent.

I'm running ArcGIS Desktop 10.6 with 64bit geoprocessing in Windows 10

if I run this code in the python window:

ext1 = arcpy.Extent(4054000,2329000,4260000,2597000)

ras1 = arcpy.sa.CreateRandomRaster(1, 100, ext1)

everything works as expected and I get my raster

but....

when I run:

ext2 = arcpy.Extent(4743000,4518000,5240000,5309000)

ras2 = arcpy.sa.CreateRandomRaster(1, 100, ext2)

I get a popup window saying that the background processing has encountered a serious error.

Obviously I get the same issue running the tool from the sa toolbox even in foreground processing mode.

A colleague here with ArcGIS 10.5.1 with 64bit geoprocessing in Windows 10 does not absolutely have this issue.

Any idea ?

Alberto

Tags (2)
0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

turn of background geoprocessing.  You don't need it to create a random raster.

If the arcpy extent ( http://pro.arcgis.com/en/pro-app/arcpy/classes/extent.htm ) worked for your colleague then it can't be and extent issue

AlbertoAloe
Occasional Contributor

Dan,

I did it already.  When I said "even in foreground processing mode " I meant  I switched background gp off.

I have another pc with 10.6. Same exact behaviour.

Do you have 10.6 to make a simple test like:

ext2 = arcpy.Extent(4743000,4518000,5240000,5309000)

ras2 = arcpy.sa.CreateRandomRaster(1, 100, ext2)

Alberto

0 Kudos
DanPatterson_Retired
MVP Emeritus
import arcpy

ext2 = arcpy.Extent(4743000,4518000,5240000,5309000)
ras2 = arcpy.sa.CreateRandomRaster(1, 100, ext2)

str(ras2.extent)
Out[10]: '4743000 4518000 5240000 5309000 NaN NaN NaN NaN'

works for me

AlbertoAloe
Occasional Contributor

Not for me...

Very strange. Two computers with 10.6 are behaving this way the others with 10.5.1 are ok.

It must depend on some local settings.

I'll try to investigate the message.

Thanks Dan

Alberto

0 Kudos
AlbertoAloe
Occasional Contributor

but....if I make it a bit smaller...(maxx= 5000000, maxy=4750000)

it works !!

Alberto

0 Kudos
DanPatterson_Retired
MVP Emeritus

Then you lack memory to complete the task

0 Kudos