SEDF creating additional fields; Shape_Length and Shape_Area in gdb fc

393
2
02-14-2023 03:41 PM
TylerT
by
Occasional Contributor III

Hello,

I work a lot with Spatially Enabled DataFrames (SEDFs).  I have noticed that when using the df.spatial.to_featureclass(*some.gdb) method, two additional fields are created in the in the output gdb feature class (Shape_Length and Shape_Area (if applicable)) without request. 

Has anybody else noticed this behavior and have any ideas how to suppress this?

Thank you,

Tyler

ArcGIS Pro 3.0.3

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

some fields in a file gdb can't be deleted or their creation suppressed because they are required and managed by the gdb.

Field—ArcGIS Pro | Documentation

 

import arcpy

z0 = r"C:\Arc_projects\Test_29\Test_29.gdb\clp"

[f"{i.name}, {i.required}" for i in arcpy.ListFields(z0)]
['OBJECTID, True', 'Shape, True', 'Shape_Length, True', 'Shape_Area, True']

 

You can hide them

ADDENDUM

added ... or their creation suppressed ...

to clarify


... sort of retired...
0 Kudos
TylerT
by
Occasional Contributor III

I wasn't asking to delete them, rather to not create them without explicitly doing so.  I have plenty of feature classes without those fields.  Anybody else?

One reason I'm looking to avoid their creation is because Shape_Length and Shape_Area are reserved names for web layers. 

Tyler

0 Kudos