Export unique values to shapefiles

679
1
04-04-2017 01:15 PM
LindaCollins
New Contributor

How can I modify this to create a subdirectory with unique value name and then write the shapefile to it?

#unique value

Tags (1)
0 Kudos
1 Reply
IanMurray
Frequent Contributor

You can create new directories with the os module mkdir function.  I would recommend using that along with os.path.join to write the output file name for your shapefile

os.mkdir()

https://docs.python.org/2/library/os.html#os.mkdir

os.path.join()

https://docs.python.org/2/library/os.path.html#os.path.isfile