I am not familiar with Python in ArcGIS, so I used ModelBuilder first to set the environment and put the tool in. The model worked right and the output raster seemed good.

Then I exported the model to a Python script. The raster output is generated, but the value of raster is from from 3.40282e+038 to -3.40282e+038. Why did this happen and how can I fix it?

My script is like this:

# Import arcpy module
import arcpy

# Check out any necessary licenses

# Set Geoprocessing environments
arcpy.env.scratchWorkspace = "C:\\Documents\\ArcGIS\\biomass.gdb"
arcpy.env.outputCoordinateSystem = "PROJCS['WGS_1984_Plate_Carree',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Plate_Carree'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],UNIT['Meter',1.0]]"

arcpy.env.extent = "60.8785969898536 -11.0048500049116 148.898540012983 53.560734"
arcpy.env.cellSize = "MAXOF"
arcpy.env.workspace = "C:\\Desktop\\shape"
arcpy.env.mask = "newasia.shp"
# Local variables:
xyz_shp = "xyz.shp"
b1_ald22222 = "C:\\Documents\\ArcGIS\\mass.gdb\\b1_ald22222"
# Process: IDW
arcpy.Idw_3d(xyz_shp, "ALDX", b1_ald22222, "27000", "2", "VARIABLE 8", "")

The reason is probably in ArcMap unable to recognize a NoData value set by the IDW tool as either 3.40282e+038 or -3.40282e+038.

I'd recommend using SetNull tool for these two values on the result and see if that gets rid of any senseless values (should set them correctly to NoData). If not, a flaw in the input data might be present (I'm unsure if IDW handles NULL values correctly, for example).


I have solved this problem and there is a little error here. The range of the interpolation is 27000 meters but the extent of the arcpy environment is in degree unit. So the only thing need to do is to unify the units.

  • Just in case: I wouldn't use 2D interpolation such as IDW in angular coordinate systems, but rather project the data to a projected coordinate system (such as UTM) and then use them in 2D. Jan 1 '15 at 17:22
  • I also have the same problem when using Point to Raster tool in ArcGIS 10.3 Can you please say e clearly how you solved the problem?
    – K.M.Muha
    Aug 24 '16 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.