SingleOutputMapAlgebra syntax errors

313
1
08-05-2011 10:11 AM
jduval
by
New Contributor II
I am trying to execute SingleOutputMapAlgebra in python using arcgisscripting.create(), executing in ArcGIS 10.0 SP1.

I get an execute error:
ERROR 010328: Syntax error at or near symbol SPACE
ERROR 010267: Syntax error in parsing grid expression

This is what it is trying to do (from error message):
SingleOutputMapAlgebra (X:\gbp\Deliverables\2012\GBtools\tmpIP\bndgrid * X:\gbp\Deliverables\2012\GBtools\BaseIP\p7\landcover) X:\gbp\Deliverables\2012\GBtools\tmpIP\lcov #

This is the actual code used in my python script.  The dictionaries are used between multiple functions.
        fcDICT["bndgrid"] = r"X:\gbp\Deliverables\2012\GBtools\tmpIP\bndgrid "
        fcDICT["p7lcov"] = r"X:\gbp\Deliverables\2012\GBtools\BaseIP\p7\landcover"
        fcDICT["lcov"] = r"X:\gbp\Deliverables\2012\GBtools\tmpIP\lcov"

        xpr0 = "(" + fcDICT["bndgrid"] + " * " + fcDICT["p7lcov"] + ")"
        gp.SingleOutputMapAlgebra_sa(xpr0, fcDICT["lcov"])
GISP
0 Kudos
1 Reply
PrasantaBhattarai
Esri Contributor
Not sure if this is giving the problem!!
On your code, for: fcDICT["bndgrid"] = r"X:\gbp\Deliverables\2012\GBtools\tmpIP\bndgrid "
I see that there is an extra space on the path name, ...\...\bndgrid "
Try removing extra space after \bndgrid, I think it's worth trying!!
0 Kudos