I was wondering the difference is between Make Feature Layer (Data Management) and using an in_memory workspace?

To me, one can use either to do some steps in memory, instead of writing data to a location on disk or a network location, and expedite the process.


We may get more technical distinctions offered as answers, and I welcome them, but the way I think about this distinction is:

A layer (unless written to a layer file or saved as part of a map document) is only stored in memory, but it is not stored in an in_memory workspace.

Remember that when you are in ArcMap, what you see in the Catalog window are spatial datasets (i.e. not much more than x,y coordinates, coordinate system and attributes), and that they only obtain a myriad of other properties to configure such as symbology, MapTips, hyperlinks, etc after you have added them as layers (which appear in the Table of Contents). This is the same distinction as above.

  • Just like to add, the purpose of Make Feature Layer is confusing, in fact I am still uncertain on its role in my workflow. Just today I used Make Feature Layer to create what I thought was a scratch piece of data to edit (edit vertices, delete and add features). arcpy.MakeFeatureLayer_management('path/to/feat_to_edit', 'feat_to_edit_lyr') created feat_to_edit_lyr from the original feature class. I edited and saved it. BUT not only was feat_to_edit_lyr edited, so was the original fc. Moral of story - this tool has a narrow purpose which does NOT include intermediary data - I think (?). Mar 8 at 19:42
  • @NW_Photo_Laureate Perhaps review gis.stackexchange.com/a/26373/115 for differences between layers and feature classes. Whenever you use a layer to edit you are editing the data source that layer points to.
    – PolyGeo
    Mar 8 at 22:59
  • Thanks @PolyGeo ! That makes sense - my confusion arose from similar workflows that incorporate layers into geoprocessing scripts using arcpy.MakeFeatureLayer_management for example - buffering and merging multiple buffer values. BUT those were different (I see now) since arcpy.Buffer_analysis will output a new feature class / shapefile whereas I want to duplicate the dataset and edit it as intermediary data before exporting it to the final, clean gdb. I imagine the appropriate step for my workflow would have been FeatureClasstoFeatureClass_conversion using "in_memory" and edit there. Mar 8 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.