Geographic Information Systems Asked on December 18, 2020
In many Esri examples, including this one, they code in the output ".shp". What is the best way if you want to be able to handle a shapefile OR a feature class output. Let say if a GDB is provided as the workspace, then features class, if a folder directory then .shp. Is there any ArcPy built-in to handing this?
As commented, it doesnt matter. Just supply the path and ~filename without the .shp
extension and arcpy will know what to do.
For example:
r"C:GISdataoutputdataset"
a shape named outputdataset.shp
(and all other shape extensions) will be created in itr"C:GISdatadatabase.gdboutputdataset"
Correct answer by BERA on December 18, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP