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.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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

share|improve this answer

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.

share|improve this answer

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.