AnsweredAssumed Answered

Raster Calculator "Merge" two Rasters - SyntaxError

Question asked by igf1979 on Apr 6, 2014
Latest reply on May 18, 2014 by luismunozd
Greetings guys,

first i must apologize for my english, i am no nativ speaker
I have a problem with the Raster Calculator in ArcGis 10.2.1 (ArcInfo)

Situation description:

I have two different Rasters ("basic_raster" and "damm").

The "basic_raster" contains the normal Environment with z values
[ATTACH=CONFIG]32841[/ATTACH]

The "damm" raster contains a damm with z values
[ATTACH=CONFIG]32843[/ATTACH]

I would like to add the "Z" value from the Damm Raster to the Environment Raster.
At the end it should looks like this picture but of course in one Raster
[ATTACH=CONFIG]32842[/ATTACH]

In the Forum they said i had to create a "condition" raster. To do that i used the reclassify funktion from the spatial Analyst to create "Reclass_damm" (check the picture).
[ATTACH=CONFIG]32840[/ATTACH]

87 = the infos i want to add to the other Raster (87meter is the height for the damm)
0 = ignor this areas, i want to keep the infos from the basic_raster


Next i started the Raster calculator and tried this command:

New_Raster = Con(condition > 0, "Reclass_damm", "basic_raster")

But something with the condition is wrong i get all the time this error:

Messages
Executing: RasterCalculator "New_Raster = con(condition > 0, "Reclass_damm" "basic_raster")" "E:\Master Thesis\Datenbank.mdb\New_Raster"
Start Time: Sun Apr 06 10:15:45 2014
New_Raster = con(condition > 0, Raster(r"Reclass_damm") Raster(r"basic_raster"))
ERROR 000539: Parsing error SyntaxError: invalid syntax (line 5)
Failed to execute (RasterCalculator).
Failed at Sun Apr 06 10:15:46 2014 (Elapsed Time: 0,55 seconds)


Maybe somebody out there who could help ?

Attachments

Outcomes