0

This question already has an answer here:

I have a database table that has the column and types defined. But it's a database table. I need a feature class so I can add spatial functionality, like add a SHAPE field. How do I create a feature class from a database table?

Update - I'm starting from a database table. The destination is an existing feature class in my enterprise SDE. I need to take some fields from the table and build a value for a SHAPE field. I also need to be able to use my fieldmappings to map fields from the source to the destination; hence the need to get this data into a feature class instead of a table.

marked as duplicate by PolyGeo arcpy Oct 31 '16 at 8:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Does your table not have spatial info already? Like you don't have a WKT or something stored in there, correct? Also, where did the data come from? – Branco Aug 6 '15 at 19:56
  • @Branco correct. I'm using some of the fields from the row to build my SHAPE field. – DenaliHardtail Aug 6 '15 at 19:57
  • Points/lines/polygons? – Branco Aug 6 '15 at 20:01
  • @Branco - points for now. This may change to include lines and polygons in the future. – DenaliHardtail Aug 6 '15 at 20:02
  • Look at this (resources.arcgis.com/en/help/main/10.1/index.html#//…) for your points. For the lines/polygon part, it would be a little more tricky but doable I believe. – Branco Aug 6 '15 at 20:02
0

You can use JoinField_management to join the table in which you have the schema to the Feature Class that has no fields defined. If you join by OBJECT_ID, the Feature Class will receive all the fields from the join table.

Details and code block for this solution as well as an alternative solution you can find here:

Creating geodatabase feature class using geodatabase table schema with ArcPy?

Not the answer you're looking for? Browse other questions tagged or ask your own question.