I am using the GeometryExtractor transformer to extract the geometry as WKT (OGC Well Known Text, version 1.2, precision 64-bit).
The geometry is created by FME using the Dissolver, Sorter, Aggregator and GeometryRefiner transformers based on a geometry from ArcSDE Geodatabase - on Oracle DB.
Vertices are aligned using ArcSDEGridSnapper and CoordinateRounder, so there are no issues with vertices geometry, as all of them are matching.
An example of a WKT created by FME is the following:
MULTIPOLYGON (((22.5462822 47.250064,22.5467275 47.25037864,22.546993 47.24920386,22.5468165 47.24918507,22.5463433 47.24908748,22.5460432 47.24890993,22.5459305 47.24885194,22.5455702 47.24880224,22.545533 47.24879591,22.5453175 47.24953065,22.5459866 47.24989446,22.5462822 47.250064)),((22.5493802 47.25255987,22.5494253 47.25113137,22.5494042 47.25081984,22.5494009 47.25078482,22.5487585 47.25060518,22.548664 47.2507213,22.5477242 47.2505618,22.5472852 47.25204817,22.5472769 47.25207047,22.5480557 47.25250925,22.5495008 47.2533228,22.5493708 47.25285712,22.5493802 47.25255987)))
However, when reading the geometry from the database (SDE MS SQL in Azure) the parts of sequence of the polygons in the multipart polygon are inversed:
MULTIPOLYGON (((22.5493802 47.25255987,22.5494253 47.25113137,22.5494042 47.25081984,22.5494009 47.25078482,22.5487585 47.25060518,22.548664 47.2507213,22.5477242 47.2505618,22.5472852 47.25204817,22.5472769 47.25207047,22.5480557 47.25250925,22.5495008 47.2533228,22.5493708 47.25285712,22.5493802 47.25255987)),((22.5462822 47.250064,22.5467275 47.25037864,22.546993 47.24920386,22.5468165 47.24918507,22.5463433 47.24908748,22.5460432 47.24890993,22.5459305 47.24885194,22.5455702 47.24880224,22.545533 47.24879591,22.5453175 47.24953065,22.5459866 47.24989446,22.5462822 47.250064)))
I know that setting the "Lanient Geometry Matching" to "Yes" in the ChangeDetector transformer will not pick anymore this as a geometry change, but still the WKT is different.
I use the WKT to describe the geometry change in a Log table. Therefore this change is indicated for a certain number of multipart polygons simply because the order of the parts in the multipart is changed when writing the geometry in the destination.
Is there any solution to have the same sequence of the polygons in the multipart geometry produced by FME as the one that is written in the database by FME?
Or there is any solution to change the order of multipart geometry when reading it into FME, to match with the one that is produced by FME?