Extracting Point Coordinates from a SEDF: Using the ArcGIS API for Python and a Spatially Enabled Data Frame (SEDF) I would like to know if there is an easy way similar to using GeoPandas to extract the x and y coordinates of points (census tract centroids) and assign them to new items/variables? For instance in GeoPandas:
df_tract['XC'] = df_tract.geometry.x and df_tract['YC'] = df_tract.geometry.y
This will produce an Attribute Error: 'DataFrame' object has no attribute 'geometry'
I know the SEDF stores geometry as a SHAPE dictionary and have tried various direct ways to get these coordinated short of iterating through the distionary such as:
df_tract['XC'] = df_tract.get("x") and df_tract['YC'] = df_tract.get("y")
No error this way but resulting values are None
I am slowly becoming more familar with using Python so any suggestions would be greatly appreciated.