AnsweredAssumed Answered

Working with in_memory

Question asked by TomGeo on Sep 12, 2012
Latest reply on Sep 16, 2012 by TomGeo
Dear all,

I try to work having my data in memory and I'm running in some problems.

What am I doing?

I set my workspace to my database and load two feature layer into memory using MakeFeatureLayer.
Then I create a SearchCursor to iterate over one of the layers in memory and use the SearchCursor in a for-loop.
Within the for-loop I read the ID and the coordinates of the current point in question out and use SelectLayerByAttribute to select this point.
Based on the selection I buffer the point by 500 meters and intersect the resulting buffer with the second layer in memory.

All this seems to work, but then my problem starts.

I tried to create a field within the result of the intersection process. the result of the intersection is written as well into memory, using in_memory. But I can't get it to work.

arcpy.AddField_management(inMemoryIntersect, "Traffic", "DOUBLE")


To overcome the problem I created the field in one of the input datasets. But how can I calculate fields of datasets that are loaded into memory, e.g. the result of the intersection? I would also like to know how I can get a list of field names of a dataset loaded into memory.

Does anybody has a solution for this?

Bests Thomas

Outcomes