Skip to main content
Hi there,

 

 

I have a line feature class in an SDE database that changes daily. I need to compare this feature class with the newer shapefile and add the changes to the SDE feature class. Currently, I have a reader for the SDE feature class, a reader for the shape file, they go through the change detector transform, and then I have a writer to the same SDE feature class. However, the change detector is not detecting any duplicates, even when I test with the exact same file (so all output should be unchanged).

 

 

This works correctly if I have two readers that are both shapefiles, or two readers that both read from an SDE feature class. Any ideas why it won't detect duplicates with a combination?

 

 

Thank you.
Hi Mandy!

 

 

A little bit of guessing here: 

 

1. Do the features have the same Featuretype? Or is the features from ArcSDE called something else than the features from the Shapefile?

 

2. Are you also comparing attributes?

 

3. Are there some decimals in the coordinates of each feature?

 

4. Can you take a screenshot from Data Inspector of the attributes from one Feature from the Shapefile and the same feature from the ArcSDE?

 

 

You can also play with the GOIDGenerator to get a unique ID for each feature and compare these.

 

 

"GOIDGenerator   Calculates a GOID (Geographic Object IDentifier) for each incoming feature, and adds it as a new attribute.   The GOID is a unique 128-bit number that incorporates the position of a feature with other numbers. The result is a unique value that may be used to distinguish features from each other. The 128-bit GOID is composed of 32 hex digits in an ASCII string. The first 16 characters correspond to the position, the next 10 to the time, the next 4 to the sequence number."
Thanks for the quick reply!

 

1) Yes, they have the same feature type - with the exception that the ones pulled in from SDE have DBO in front of them. Do these need to be exactly the same?

 

2) I have tried also comparing attributes, and not comparing attributes. If I ONLY compare attributes this works, but I cannot assume any of the attributes will be unique to a feature.

 

3) Yes there are decimals. After comparing the shape file feature class and the SDE feature class, I see that these differ despite the coordinate systems being the same. I have tried using lenient geometry matching but this still does not help. These differ even if I start with a blank SDE feature class and use the writer to populate it with the first shape file.

 

4) I will get those screenshots and upload them.

 

Thanks!
Ok. Lenient matching does not "round coordinates" however it does, according to the manual:

 

"Composition differences between paths and lines will be ignored. For example, consider two lines, each with 10 vertices: One line is a path composed of 3 segments, and the other is just a simple line. These lines are considered to have a different composition. Lenient geometry matching will treat all these as matching, as long as they have the same vertices (no more and no less). Strict geometry matching will say they do not match."

 

 

As a test, add a CoordinateRounder before the ORIGINAL and REVISED, and then see if it goes through.
That works great. Thanks!
Hi,

 

 

To avoid all the nasty geometry issues SigTill mentions when comparing features, this fmepedia example of change detection works like a charm and is usually faster than the changedetector. 

Reply