0

I'm having trouble to insert a line geometry into a personal geodatabase (using Python/ArcGIS 9.3.1). Everything works fine if the target feature is a shapefile. My guess is that calling:

traj.shape = lineArray

is causing the exception:

 File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 570, 
 in __setattr__ raise AttributeError("Property '%s.%s' can not be set." %
 (self._username_, attr))AttributeError: Property '<unknown>.shape' can not be set.

However, lineArray holds the coordinates of the vertexes. To populate a new row I call:

newTraj = rowInserter.newRow() 
newTraj.shape = lineArray
rowInserter.insertRow(newTraj)
lineArray.RemoveAll()
del rowInserter

Is there maybe someone with some experience on this topic?

0

1 Answer 1

1

I solved the mystery. Shape refers to the data type 'Geometry', which has an alias field name. It turned out that this is 'SHAPE' if you're dealing with shape-files but 'GEOMETRIE' with our geodatabase. However, there is no documentation whatsoever on the how's and why's for assigning the array object to the geometry field name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.