The SDE features are clipped using an AOI, that arrives in the workbench in the form of an ESRI JSON parameter. The ESRIJSON string / AOI is converted into a FME geometry using a ‘GeometryReplacer’. So far, so good.
AOI = {"rings" :quo131064.8258, 451340.5549], 5131064.8258,454729.4129], 4135194.9964, 454729.4129], 4135194.9964, 451340.5549], 5131064.8258,451340.5549]]],"spatialReference" :{"wkid" : 28992}}
The first thing I notice is that after interpreting the AOI as a FME geometry some floating point differences occur. Which are not really a reason for concern at this point.:
Figure1 - AOI coordinates after interpreting the geometry.
The next step is to clip features from ArcSDE using the AOI. Actually I am also interested in the features outside the project area that are intersecting the AOI, since the original shape of the features will be restored in another process.
Figure 2 - Result of the clipping process.
In Figure 2 above, the results of the clipping process is presented. So far, so good. On the ‘clipping line’ newcoordinates are added which get known values from the AOI. (xmax 135194.9964).
During the next step, the features arewritten to separate FGDB’s (exportinside.fgdb and exportoutside.fgdb) (based onan XML template extracted from SDE), with the exact same precision and domainsettings etc.
Figure 3 - Feature 'outside' as stored in FGDB.
Figure 4 - Feature 'inside' as stored in FGDB.
In the above figures the features are extracted from the FGDB’s. As you can see the coordinates are changed to135194.997000000137 and 135194.99639999886. I do understand that the coordinates can be changed while writing them to FGDB, due to the precision anddomain values. What I do not understandis that the same coordinate is stored different for both features.
The (received) AOI clipper is not necessarily on the same scale and precision as the clippees / features that are extracted from the ArcSDE. In most cases the AOI will origin from ESRI Workflowmanager, but actually the workbench should be able to support any ESRIJSON polygon as AOI.
Improvements that I already made:
- Use XML template for bothFGDB’s (based on origin SDE).
- Experimented with preprocessingthe AOI by using the CoordinateRounder, ArcSDEGridSnapper and AnchoredSnapper.
I don’t understand why I am not able to fix this by using the ArcSDEGridSnapper to ‘project’ the AOI and the XML templates control the FGDB’s.
Figure5 - ArcSDE and FGDB settings.
Figure6 - ArcSDE Domain, Resolution and Tolerance
Figure7 - ArcSDEGridSnapper settings