I was looking to merge some features to improve the performance of some of my layers on my ArcGIS Server. I have a few very large polyline layers for our fiber network that are exported out of a CAD based program (Mapcom M4) every week and into a GeoDatabase. I did notice that some of the features have the same attributes and fiber ID's, but are separated into up to between 4-15 different lines. When I tested this out and manually dissolved the featueres into one based on fiber ID it drastically improved performance. This would be a significant expense of time to do every week, though, and I was looking to make it part of my Weekly FME Workbench. I just wasn't sure what transformer would make the most sense to use to merge all the features with the same Fiber ID before writing them to the Geodatabase.
[GIS] Merging/Dissolving features with same ID using Transformer in FME
fmeshapefiletransformer
Related Solutions
If you are not too attached to the ESRI reprojection engine the simplest solution is to use the CsmapReprojector instead. The _AZMEA_
dynamic coordinate system will automatically determine the origin point of each feature and reproject accordingly.
However, Alex Markov is on the right track when he suggests it is possible to use @Reproject to do this using the ESRI engine.
Assuming you have set central_meridian
and lat_origin
attributes on your features you can pass them to an FMEFunctionCaller transformer that contains this string:
@Reproject(ESRI,"ESRIWKT|GCS_WGS_1984|GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]","ESRIWKT|esri_azmea|PROJCS["esri_azmea",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",@Value(central_meridian)],PARAMETER["Latitude_Of_Origin",@Value(lat_origin)],UNIT["Meter",1.0]]",,Forward,--,NearestNeighbor,PreserveCells)
- Note the @Value function being used to substitute your origin values into the WKT string that represents the ESRI coordinate system.
- I generated the @Reproject parameters by creating an EsriReprojector with a specific input coordinate system and custom AZMEA target, then copied the transformer into a text editor to examine the underlying function.
- If you are not working with WGS84 data you will need to pass different WKT to @Reproject.
I think the key is setting your data to be read in the correct order.
Flat files can be controlled better (more easily) than the way they are stored in a database.
single clipper, multiple clippers, and clippers first are more geared to performance handling
The 'Clippers First' setting (under Clipper Type) tells FME that the flow of data is A) all Clipper features, then B) all Clippee features. The Clipper reads features one at a time as before, but as soon as a Clippee feature is encountered, can assume that the set of Clippers is exhausted. Now Clippee features can be processed one at a time without having to hold the entire group in memory. The only features stored in memory are the Clippers - and there are generally fewer of those.
So how does a user ensure that all Clipper features are first? There are three ways:
Clippers and Clippees are normally held in separate datasets. FME reads all datasets in the order shown in the navigation pane; top dataset first. Therefore, by moving the Clipper dataset to the top of the list, (right-click it and choose the option to 'move up in list') a user can force those features to be read first. If the Clippers are held in the same stream of data (but obviously split up before entering the Clipper), then the Sorter transformer can be used to promote the Clipper features in front of the Clippees. The FeatureHolder transformer put before features enter the Clippee port is an alternative for the Sorter.
When used this way, the Clipper becomes a successful alternative to the PointOnAreaOverlayer.
This is the source and guide for the clipper transformer and it's options:
http://fmepedia.safe.com/articles/Samples_and_Demos/Example-of-Using-the-Clipper-Transformer
Best Answer
Aggregator will merge geometries based on a specified attribute. If you aren't concerned with any other attributes you can tell it not to keep other attributes, otherwise it can concatenate/sum/average those too.