ArcGIS Pro SDK Projection Engine not transforming elevation

468
1
11-15-2022 01:48 AM
BillSmith
New Contributor III

Hello, I would expect the Projection Engine to transform Z.  It appears not to.  I have an input vertical coordinate system with international feet [FOOT .3048] and an output of WGS84 meters [METER 1.0].

Here is some sample code, and the Z is not changed after the transform.

private static int PackGeometry(
   int layer_index,
   Feature feature,
   bool modify,
   bool selectable,
   bool editable)
{
Geometry geom = feature.GetShape();
if (geom == null) return -1;

// Reserve space for count - backfill with actual count at end.
int num_bytes = 0;
int start_offset = _offset;
_offset += sizeof(int);

// Everything goes to SOCET GXP as WGS84/ellipsoid.
SfaLayer layer = SfaSettings.Layers[layer_index];  // internal class
Geometry projected_geom = null;

if (layer.SpatialRef.HasVcs) {

// input of layer spatial ref is feet, output Util.GeoCS is WGS84 meters.

// Z = 5908.123
   ProjectionTransformation proj_trans =
   ProjectionTransformation.CreateWithVertical(layer.SpatialRef, Util.GeoCS);

   projected_geom = GeometryEngine.Instance.ProjectEx(geom, proj_trans);

// Z still = 5908.123

} else {
   projected_geom = GeometryEngine.Instance.Project(geom, Util.GeoCS);
}

if (projected_geom == null) return -1;

1 Reply
Margaret_M_Maher
New Contributor III

In order to perform vertical datum transformations, as well as some of the latest and greatest horizontal transformations from NOAA and the NGS, you must install the ArcGIS Pro Per-User Coordinate System Data appliance which can be downloaded from My Esri.   I've attached a screenshot of how this appears on the My Esri page.  In the screenshot the item below is the appliance to download and install for ArcGIS Pro.  This enormous utility incorporates the GeoCON utility created by the NGS and NOAA that Esri has licensed from the federal government and put in a wrapper to work with Esri software.  

Two different applications are provided because ArcGIS Pro is a 64-bit application, while ArcGIS Desktop and ArcMap are 32-bit.  

In addition, download and extract the Geographic Transformations list from the ZIP file.  That contains lists of all the supported Geographic and Vertical transformations from current versions of Esri software.  The software will select default transformations for you in many  cases, but it is essential that you be familiar with the appropriate transformations for your area of interest.  The default transformation may not be the most appropriate for your area of interest.