Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

world,

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? Thanks for your help in advance,

Lars

share|improve this question
    
Well GIS-World, 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. Cheers, Lars –  LarsVegas Jan 19 '12 at 12:17
add comment

1 Answer 1

up vote 0 down vote accepted

Well GIS-World,

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.

Cheers, Lars

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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