Friday, 16 February 2018

arcgis desktop - Creating layer from in-memory shape data using ArcObjects?


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?



Answer



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


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...