2

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?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Exile79
  • 495
  • 3
  • 10

2 Answers2

5

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

Kirk Kuykendall
  • 25,787
  • 8
  • 65
  • 153
1

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.

Hairy
  • 4,843
  • 1
  • 26
  • 45