In my current project, a feature layer is created based on shape data generated after some complicated surface analysis procedure.

The sequence right now is like [Surface Analysis Algorithm] -> [array of xyz data] -> [shp file written to disk] -> [create feature class from shape] -> [create feature layer from feature class]

I'm on the process of optimizing the project, so I wondered if there was any way to display directly the in memory shape data in a layer, bypassing the read/write to hard disk?

2 Answers 2


When you create your featureclass, try using an InMemoryWorkspaceFactory instead of a ShapefileWorkspaceFactory. See code here.


If you do this 'in_memory', and in ArcMap, it will display as a layer, until you stop ArcMap, or delete the data. It stays in memory for the session as such, so once you create it, it will show, unless you are running the script outside of ArcMap.

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.