I'm using a rubbersheet transformation on some features in a layer, and I want to use existing feature classes for the link and anchor layers in the operation; however, I don't want add the link and anchor layers to the map - instead I just want to use them directly from their respective feature classes. Is there someway to do this in Pro? I was able to do this in ArcGIS Desktop.
Using LayerFactory seems like an option since rubbersheet requires the Link and Anchor inputs to be layers, but there doesn't seem to be any way to do this without adding the layers to the map.
Another possibility might be using the MakeFeatureLayer geoprocessing tool without adding the result to the map, but them I'm not sure how to access the in-memory feature layer that is created.
Any help will be greatly appreciated.
Here is the rubbersheet code I'm using:
var transformFeatures = new EditOperation();
transformFeatures.Name = "test";
transformFeatures.Rubbersheet(LayerBeingTransformed, linkLayer, anchorLayer, null, true);
This code works fine if all of the input layers are in the map.
I don't see a way to rubbersheet in Pro without using layers present in a map.
Perhaps horizontal grid shift geotransformation could achieve the same results as rubbersheeting.
A grid shift file facilitates the conversion from one coordinate system to another. A grid shift file is often used for defining a transformation over a large area when the distortion in one of the coordinate systems inhibits the use of an exact set of transformation parameters. One of the first grid shift files used in Canada is the National Transformation version 2 (NTv2) which performs coordinate transformations from NAD27 (high distortion) to NAD83. Since NTv2 was developed, other grid shift files have been created using the same format.
The hard part is creating the gsb file. The file format isn't well documented. Proj.org says:
Details about all three formats can be found in the GDAL documentation and/or driver source code. GDAL reads and writes all three formats. Using GDAL for construction of new grids is recommended.
I don't see anything relevant to gsb in the GDAL docs search results though.
Or ... it might just be easier to learn to live with link layers in your map.
Thanks for looking into this. For now I think I'll just have to live with the link layers in the map since I need to get results that exactly match the results I was getting with rubbersheeting in ArcGIS Desktop. So I guess I'll have to settle for doing this in a less aesthetically pleasing way. However, I would ultimately prefer using an open source solution so thanks for the information about the grid shift transformation. It gives me starting point for doing this.