Using Reclassify to do NoData Values

395
4
09-13-2023 06:29 AM
SoratoMarques
New Contributor III

Hi,

I have one raster and would like to transform all values between -0,9 - 0 like 1 value, and 0 - 0,9 like NoData.

How can I to this in python?

Thank´s

Tags (1)
0 Kudos
4 Replies
JimCousins
MVP Regular Contributor

SoratoMarques,

 This is a standard function that has an arcpy sample as part of the help about this function.

Do you have the spatial analyst or 3D analyst extension? One of these is necessary for access to the tool.

If none of this helps you solve this issue, what is the error or problem with the methodology?

Regards,
 - Jim

0 Kudos
SoratoMarques
New Contributor III

I have spatial analyst!

this code below no work properly:

arcpy.gp.Reclassify_sa(negativo_tif, "Value", "-0,900000 0 1;0 0,900000 NODATA", reclass_negavt_tif, "DATA")

 

0 Kudos
KenBuja
MVP Esteemed Contributor

I would suggest using the Con tool instead

0 Kudos
JimCousins
MVP Regular Contributor

KenBuja - excellent call. I agree with you.

0 Kudos