Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

da.UpdateCurso: Where clause for geometry

$
0
0
Hi Forum

I have a versioned database, where I want to make short lines longer. So in Python I try to select the short lines like this
Code:

        >>> uCursor = arcpy.da.UpdateCursor(inFeatures, [ 'OID@', 'SHAPE@', 'GM_LABEL', 'GM_USER_DEF' ], 'SHAPE@LENGTH < 300' )
edit = arcpy.da.Editor(arcpy.env.workspace)
edit.startEditing()
edit.startOperation()

which goes without problems but on
Code:

line = uCursor.next()
I get this error
Code:

Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
RuntimeError: Underlying DBMS error [ORA-04054: databaselink LENGTH does not exist
] [G100.geopoint_line]

I tried also this where clause, that works in ArcMap Select by attributes:
Code:

SHAPE.LEN < 300
Because there is also a field called SHAPE.LEN.
I tried with and without quotes with no success.

Is it possible at all to make a constraint based on geometry?

/Marianne

Viewing all articles
Browse latest Browse all 2485

Trending Articles