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.

I am running my script to do geoprocessing in the python window of ArcMap.

Since the geoprocessing includes lots of intermediate files, and these files were added in ArcMap at the same time of the processing.

I thought it is a waste of time to display all these intermediate files in ArcMap.

Can anyone help to suggest a way to only operate on these intermediate files in background and without adding them to ArcMap?

share|improve this question
1  
Use the in_memory workspace and delete once you're done with the intermediate step. –  Paul Aug 7 at 18:37

2 Answers 2

In ArcMap click on the Geoprocessing menu and go to Geoprocessing Options.

Uncheck the second to last box-

Add results of geoprocessing operations to the display

share|improve this answer

@ian provided a great method to stop adding the results to the display. There are several additional ways to deal with intermediate data in Python scripts:

1) Use an integrated development environment like PyScripter or IDLE outside of ArcMap. This is the most straight-forward way to avoid adding layers to the ArcMap display when using Python.

2) Create and delete using Delete (Data Management)

3) Use the in_memory workspace

4) Create temporary layers with Make Feature Layer (Data Management) or Make Raster Layer (Data Management)

share|improve this answer
    
Nice summary of the four methods. Could you also suggest on which method probably is the most computationally efficient? If dealing with large dataset and processing speed is a big concern. –  enaJ Aug 7 at 20:24
    
Using the in_memory workspace is highly efficient and I try to integrate this into any Python processing that I do. –  Aaron Aug 7 at 20:44
    
Well, that was different from my expectation. I thought using stand-alone python script running at IDLE would be more efficient. I'll dive deeper on this front. And if you have more information related this topic, please feel free to share. –  enaJ Aug 7 at 20:49
1  
@enaJ I never run scripts directly in ArcMap and always opt for PyScripter or IDLE. –  Aaron Aug 7 at 20:55

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.