Last active
May 30, 2017 22:46
-
-
Save tyler-austin/1c3a63190cd433882aced39652ca687d to your computer and use it in GitHub Desktop.
arcpy create scratch fgdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
def set_scratch_environment(self, scratch_dir, cpu_core): | |
self.core_scratch_dir = os.path.join(scratch_dir, 'scratch_{0}'.format(cpu_core)) | |
os.mkdir(self.core_scratch_dir) | |
arcpy.env.scratchWorkspace = self.core_scratch_dir | |
arcpy.env.workspace = arcpy.env.scratchGDB | |
self.scratch_gdb = os.path.join(self.core_scratch_dir, 'scratch.gdb') | |
# Set workspace environment variables | |
ctx.set_scratch_environment(cfg.scratch_dir, cfg.cpu_core) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment