Select to view content in your preferred language

ArcGIS Pro 3.4.2: Setting a mask brings “ERROR 000539” when performing the “raster calculator” tool,

200
4
2 weeks ago
JamalNUMAN
Legendary Contributor

ArcGIS Pro 3.4.2: Setting a mask brings “ERROR 000539” when performing the “raster calculator” tool,

In the screenshots below, if the mask is set to the “LandsatTM2001.img” raster, then performing the “raster calculator” tool results in “ERROR 000539”. If the mask is left blank, the “raster calculator” tool works successfully.

What could be the issue here?

The data is attached

Clip_2122.jpgClip_2123.jpgClip_2124.jpgClip_2125.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

000539: Error message from Python.—ArcGIS Pro | Documentation

apparently it is related to the syntax of your raster calculator expression.  Check the brackets

a, b, c, d  replace with Raster(path)

128 * ((a) + b )) / ( c) + d )))  + 128

You may have been dropping extra brackets in to make the expression look like it was working

128 * ( a + b ) / ( c + d ) + 128

doesn't raise syntax errors but I am not sure what you are calculating or what the 128 is for

doesn't work


... sort of retired...
JamalNUMAN
Legendary Contributor

Hi Dan,
The issue shouldn’t be related to how the equation is written in the Raster Calculator, as the same equation works fine when the mask is left blank.

 


If you're interested in the equation itself, the reference is:
Goodenough, D.G., Bhogal, A.S., Dyk, A., Apps, M., Hall, R., Tickle, P., Chen, H., Butler, K., & Gim, M. (2000, July). Determination of above ground carbon in Canada's forests—a multi-source approach. In IGARSS 2000. IEEE 2000 International Geoscience and Remote Sensing Symposium. Taking the Pulse of the Planet: The Role of Remote Sensing in Managing the Environment. Proceedings (Cat. No. 00CH37120), Vol. 3, pp. 949–953. IEEE.

 

Clip_2130.jpgClip_2129.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
DanPatterson
MVP Esteemed Contributor

No clue then since the form you have written now in the raster calculator looks totally different than the parsing error that was being thrown in an earlier image.

If the raster extents, cell size and alignments are all the same, your current form should work.

Tech Support is your next option


... sort of retired...
JamalNUMAN
Legendary Contributor

Hi Dan,
From the very beginning, the issue has not been with how the equation is written. The problem can be reproduced by using the same equation—once with a mask applied and once without.

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos