Dear Python and SDF experts,
I encountered an issue when using SDF/SeDF.
I have two supposedly identical datasets in both local FGDB (featureclass) and AGOL (hosted featurelayer). To keep both datasets in sync, I am using Pandas and Spatial DataFrame to compare two dataset and to identify any difference in attributes and/or geometry/Shape. If the changes are detected in source dataset, I will modify the target dataset accordingly. It is tested great for all the attributes. However, there is an issue to compare the geometry/SHAPE field between two "supposedly identical" SDF created from gdb and agol.
I found that the precision of coordinators would be altered after a feature is copied/published from FGDB to AGOL, or vice versa. Although the difference is tinny, 9th or 10th digits after decimal, it failed to pass the "identical test" with SDF merge operation. Below is a example:
Does any one encountered similar issue? and know how to resolve this issue?
I thought of using the Pandas.dataframe.round("SHAPE",8) function to round the decimal of the SHAPE coodinators to 8 or even less. However, it seem that the SHAPE in sdf is not a "number" type and the round would not work if I direct use the round function against "SHAPE". Any thoughts and suggestions?
Thanks,
Ming
Solved! Go to Solution.
Oh, very interesting workaround! Glad you found a solution!