I have an empty point feature class in a file geodatabase. I also need an exact copy of this in a line and polygon feature class type (in the same file geodatabase).
I am unable to identify any tools or arcpy workflows that allow me to change an existing empty feature class type.
An export to shapefile will remove all the subtypes and long field names and field alias.
I use ArcGIS Pro 2.2 - Advanced license level.
My hope was a python code with the following flow:
- Create a copy of the existing point feature class in the same file geodatabase
- Changing feature class type to line/polygon
Any help is greatly appreciated.
I also need an exact copy of this in a line and polygon feature class type (in the same file geodatabase).
Do you mean you need a line and polygon feature class of the same schema/attributes and spatial coordinate system as the point feature class?
Use your point feature class as the 'template'
It seems kind of hacky, but one approach might be to do this:
- Export the feature class to an XML workspace document (schema only)
- Use Python to modify the XML file, specifically the geometry type and feature class name
- Import the XML workspace document
That should maintain all of the subtypes and such.
That sounds good to me: certainly worth a look. Thomas; how many feature classes are you talking about? Is this something you need to do often over time?