Updated:
It looks like geometry comparisons are working, but there is a slight difference for how coordinates are stored in AGOL compared to FGDB's; coordinates were off by only a few micrometers. I've had luck using the CoordinateRounder tool and setting the precision to 3 decimal places. Also, instead of using FeatureMerger, I've found that the inputs and outputs of UpdateDetector is a lot more intuitive. The graphic below shows the results as 6 updated features (2 features with attributes modified, 4 with geometry edits), 8 deleted features, 16 new inserted features, and 248 features that were unchanged.
------
Original Question:
------
I am trying to update features from a FileGeodatabase (FGDB) to a hosted ArcGIS Online Feature Layer. I'm using @LauraAtSafe tutorial on "How do I write updates to an existing ArcGIS Online feature service?" and I've hit a snag. My results are not showing edited features, and all be the new and deleted features are saying they need to be updated, even though a small subset of them need to be updated.
The FeatureMerger method allows you to just update and delete features that have been modified, added, or deleted. The AGOL Reader takes the place of the requestor, and the FGDB reader takes the place of the supplier. Since I have no unique identifier in the field data for my features, I am using the ArcGIS GlobalID Field to make the join.
Note: For anyone who's attempting to do this, AGOL stores Global ID's slightly differently than they appear in FGDB's. Set the requester value to {@UpperCase(@Value(GlobalID))} to make the AGOL Global ID Match the FGDB Global ID. Thanks @MarkAtSafe for this one.
I've updated all of the features so that AGOL and the FGDB have all the same features with "matching" Global IDs (See note above), so all of the features are the same. After they were uploaded, I went into my FGDB and made some modifications:
* Modified the attributes of 2 features
* Modified the geometry of 4 features
* Deleted 8 features
* Created 16 features
When I ran the Feature Merger, the results were not what I expected.
From the graphic above, I expected to see somewhere that listed the 6 modified features that needed to be updated, but all I saw was the 16 new features, the 8 deleted features, and the remaining features that were left over. Essentially, there should be 248 features that don't need to be changed in AGOL, 8 that need to be deleted, 6 that need to be modified, and 16 that need to be added (for a total of 22 updates and 8 deletes).
I'm not sure exactly what I'm doing wrong. Here's the FeatureMerger window to show the settings:
My only guess as to why this is failing is that, after the join, the FeatureMerger is still comparing the GlobalIDs, which do no match; AGOL stores them as an actual GlobalID Type while the FGDB stores them as a char. I am not sure how to prevent the FeatureMerger from comparing GlobalIDs after the join.