Monday 27 March 2017

python - Cause of ArcGIS Raster Calculator Parsing error : invalid syntax?


This is my first attempt at much code in the raster calculator of ArcMap 10.0, but I think I'm close.


I have nine rasters (A-I below) and want a new raster with value = 1 where any of the rasters have field 1 >= 1 and <= 366 and field 2 not equal to 5.


Here's what I've got:


Con(([A].1|[B].1|[C].1|[D].1|[E].1|[F].1|[G].1|[H].1|[I].1 >= 1  &  <= 366) & ([A].2|[B].2|[C].2|[D].2|[E].2|[F].2|[G].2|[H].2|[I].2 != 5) , 1,0)

I get the little red circle with an X in the top left of the raster calculator window and an error message:



Parsing error : invalid syntax (line 1).




Anyone know what I've got wrong?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...