larsec wrote:
Hi Mark,
First of all, thank you for your input. I have read through everything that I can find related to the change detection, including the article you refer to, and still no luck. Hopefully I'm just missing some silly setting or something :-)
I have attached a zip file containing my fmw file and a file gdb containing one of my layers (the original).
Within my workspace, the first part downloads and extracts a file gdb from the public source, which my feature reader reads. The paths will have to be updated to a local path, but other than that, it should run straight through.
I have made 4 small attribute changes in the Original dataset, så it should, theoretically, just update those 4 features. Thanx :-)
With regards to the coordinateRounder - if my Update Detection Key Attribute is set and matches the original and revised data, then even changes in the coordinates should still be parsed as Updates, and not Delete all the original and Insert all the revised data, shouldn't it?
With regards to the CoordinateRounder - if my Update Detection Key Attribute is set and matches the original and revised data, then even changes in the coordinates should still be parsed as Updates, and not Delete all the original and Insert all the revised data, shouldn't it?
This is true, but as you can see in the inspector, the format of the ID "OBJEKT_ID" is different in the 2 sets.
GEN_ARTSFUND_LN_GDB.gdb
- A36BE99A-F167-4045-9639-F9C964948332
Danske Grunddata Test.gdb
- {A36BE99A-F167-4045-9639-F9C964948332}
As these differ the ChangeDetector sees 81 inserts and 81 deletes instead of 81 updates.
So if you add an AttributeCreator where you set OBJEKT_ID = {@Value(OBJEKT_ID)} in the stream from GEN_ARTSFUND_LN_GDB.gdb it returns 81 updates.
Next, if you add the changelist you can see all the differences.
- VERSION_ID is also missing curly braces.
- STARTDATO 20080219 differs from 2008-02-19 00:00:00.0000000
- etc.
If you drill down to geometry, you see the coordinates differ from one to another. The first point of OBJEKT_ID {01FEE9E4-945C-443D-9EAF-A29F84AC66B8}
GEN_ARTSFUND_LN_GDB.gdb
- 649969.0008001328, 6203418.002200127
Danske Grunddata Test.gdb
But with {57CAEB1E-064E-437C-A6E3-7669E8BDFD53} it is the other way around:
GEN_ARTSFUND_LN_GDB.gdb
- 658306.7469000816, 6195865.634500027
Danske Grunddata Test.gdb
- 658306.7000000002, 6195865.6
This is why @Mark Stoakes suggests you to add CoordinateRounders.
I personally prefer to check for changes with rounded geometry and then restore the original geometry. This can easily be done with the GeometryExtractor (geometry to attribute) before the CoordinateRounder and a GeometryReplacer (attribute to geometry) after the ChangeDetector, to prevent putting rounded data in my source database.
I also see you have added fme_db_operation manually, but the ChangeDetector generates this attribute so you don't have to do that.
In the Writer, make sure you set Feature Operation to fme_db_operation and Match Columns to OBJECTID. In the sample workspace it is set to Insert.